query
stringlengths 7
33.1k
| document
stringlengths 7
335k
| metadata
dict | negatives
listlengths 3
101
| negative_scores
listlengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
/ added so we can add a special id at the top level for the "mark_address" for dmitriy | public String getBodyClassId() {
return "spotmouth_default_id";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addNewID(AddressDetails address) {\n address.setMessageID(newID());\n }",
"public void setAddress(String address) { this.address = address; }",
"@Override\n\tpublic List<Studentbean2> Addaddress(List<AddressBean> findAllAddress) {\n\t\tfor(AddressBean a:findAllAddress)\n\t\t\tfor(Studentbean2 e:stu2)\n\t\t\t{ \n\t\t\t\tif(e.getId()==a.getId())\n\t\t\t\t{ \n\t\t\t\t\te.setA(a);\n\t\t\t\t}\n\t\t\t}\n\t\treturn stu2;\n\t}",
"public void resolveAddress(){\n for(int i = 0; i < byteCodeList.size(); i++){\n if(byteCodeList.get(i) instanceof LabelCode){\n LabelCode code = (LabelCode)byteCodeList.get(i);\n labels.put(code.getLabel(), i);\n }else if(byteCodeList.get(i) instanceof LineCode){\n LineCode code = (LineCode)byteCodeList.get(i);\n lineNums.add(code.n);\n }\n }\n \n //walk through byteCodeList and assgin proper address\n for(int i = 0; i < byteCodeList.size(); i++){\n if(byteCodeList.get(i) instanceof GoToCode){\n GoToCode code = (GoToCode)byteCodeList.get(i);\n code.setNum((Integer)labels.get(code.getLabel()));\n }else if(byteCodeList.get(i) instanceof FalseBranchCode){\n FalseBranchCode code = (FalseBranchCode)byteCodeList.get(i);\n code.setNum((Integer)labels.get(code.getLabel()));\n }else if(byteCodeList.get(i) instanceof CallCode){\n CallCode code = (CallCode)byteCodeList.get(i);\n code.setNum((Integer)labels.get(code.getFuncName()));\n }\n }\n }",
"private void addMarkerByAddress(String addr, DialogInterface dialog)\n {\n try {\n Geocoder selected_place_geocoder = new Geocoder(MarkerActivity.this);\n List<Address> address;\n\n address = selected_place_geocoder.getFromLocationName(addr, 5);\n\n if (address != null && address.size() > 0)\n {\n Address found = address.get(0);\n\n // add marker\n map.addMarker(new MarkerOptions().position(new LatLng(found.getLatitude(), found.getLongitude())));\n\n // close dialog\n dialog.dismiss();\n }\n else {\n Toast.makeText(this, \"Your address is not found, please try another keyword.\", Toast.LENGTH_SHORT).show();\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n Toast.makeText(this, \"Error when trying to find your address location, please try again.\", Toast.LENGTH_SHORT).show();\n }\n }",
"public void setAddress(int address)\n {\n this.address = address;\n }",
"public Short getAddressId() {\r\n return addressId;\r\n }",
"public abstract String getAddressLine1();",
"void addHasAddress(String newHasAddress);",
"private OrdPerson initAddress(String id) {\n\t\t\r\n\t\tUserAddress userAddress = receiverUserServiceAdapter.queryAddressByAddressNo(id);\r\n\t\t \r\n\t\tif (userAddress == null) {\r\n\t\t\tthrow new NullPointerException(\"收件地址不存在\");\r\n\t\t}\r\n\t\t// 地址\r\n\t\tList<OrdAddress> addressList = new ArrayList<OrdAddress>();\r\n\t\tOrdAddress ordAddress = new OrdAddress();\r\n\t\tordAddress.setProvince(userAddress.getProvince());\r\n\t\tordAddress.setCity(userAddress.getCity());\r\n\t\tordAddress.setStreet(userAddress.getAddress());\r\n\t\tordAddress.setPostalCode(userAddress.getPostCode());\r\n\t\taddressList.add(ordAddress);\r\n\r\n\t\t// 游玩人\r\n\t\tOrdPerson ordPerson = new OrdPerson();\r\n\t\tordPerson.setFullName(userAddress.getUserName());\r\n\t\tordPerson.setMobile(userAddress.getMobileNumber());\r\n\t\tordPerson.setObjectType(\"ORD_INVOICE\");\r\n\t\tordPerson.setPersonType(IReceiverUserServiceAdapter.RECEIVERS_TYPE.ADDRESS.name());\r\n\t\tordPerson.setAddressList(addressList);\r\n\t\treturn ordPerson;\r\n\t}",
"public void setAddress(String address) {\n this.address = address;\n }",
"public IndividualAddress(final int address)\n\t{\n\t\tsuper(address);\n\t}",
"public void setAddress(String adrs) {\n address = adrs;\n }",
"public Integer getAddressId() {\n return addressId;\n }",
"public void setAddress(String _address){\n address = _address;\n }",
"public com.apatar.cdyne.ws.demographix.PlaceInfo getPlaceIDbyAddress(java.lang.String addressLine1, java.lang.String city, java.lang.String stateAbbrev, java.lang.String zipCode, java.lang.String licenseKey) throws java.rmi.RemoteException;",
"public String getAddress() {return address;}",
"public void addressdetails(List<Student> s,List<Address> a)\n{\nMap<Object, Object> m=s.stream().collect(Collectors.toMap(st->st.getFirstName(), st->a.get(st.getid()-1)));\n\tm.forEach((k,v)->System.out.println(\"FirstName:\"+k+\"\\n\"+\"Address:\"+\"\\n\"+v));\n}",
"public void setADDRESSIND(java.lang.CharSequence value) {\n this.ADDRESS_IND = value;\n }",
"public void setAddress(String address){\n\t\tthis.address = address;\n\t}",
"public void setAddress(String address){\n\t\tthis.address = address;\n\t}",
"private void translateIDAddress(Tree tree, int registerIndex) {\n\t\tString name = tree.toString();\n\t\tVariable variable = this.findVariable(name);\n\n\t\tint deplacementVariable = variable.getOffset();\n\t\tString typeOfVar;\n\t\tif (deplacementVariable < 0) { // Si variable est une variable locale\n\t\t\tdeplacementVariable -= 2; // On doit compter le déplacement statique\n\t\t\ttypeOfVar = \"variable locale\";\n\t\t} else { // variable est un argument de fonction\n\t\t\tdeplacementVariable += 4; // Taille de l'adresse de retour\n\t\t\ttypeOfVar = \"argument\";\n\t\t}\n\n\t\tint countStaticChain = this.countStaticChainToVariable(tree.toString());\n\n\t\tthis.writer.writeFunction(String.format(\"LDW R%d, BP // ID_BEGIN : Préparation pour le chargement de l'adresse de %s \\\"%s\\\" dans un registre\", registerIndex, typeOfVar, name)); // Copie le registre de base dans le registre résultat\n\t\tif (countStaticChain > 0) { // S'il y des chaînages statiques à remonter :\n\n\t\t\tint loopRegister = this.registerManager.provideRegister();\n\n\t\t\tthis.writer.writeFunction(String.format(\"LDW R%d, #%d // Début de remontée de chaînage statique pour charger l'adresse de %s \\\"%s\\\" dans un registre\", loopRegister, countStaticChain, typeOfVar, name));\n\t\t\t// Début de boucle :\n\t\t\tthis.writer.writeFunction(String.format(\"LDW R%d, (R%d)%d\", registerIndex, registerIndex, -2));\n\t\t\tthis.writer.writeFunction(String.format(\"ADQ -1, R%d\", loopRegister));\n\t\t\tthis.writer.writeFunction(String.format(\"BNE -10 // Fin de remontée de chaînage statique pour charger l'adresse de %s \\\"%s\\\" dans un registre\", typeOfVar, name)); // Jump à (6 - 2)/3 = 2 instructions plus tôt. Le -2 c'est pour cette instruction de saut\n\t\t\t// Fin de boucle\n\n\t\t\tthis.registerManager.freeRegister();\n\t\t}\n\t\tthis.writer.writeFunction(String.format(\"ADI R%d, R%d, #%d // ID_END : Chargement de l'adresse de %s \\\"%s\\\" dans un registre\", registerIndex, registerIndex, deplacementVariable, typeOfVar, name)); // L'adresse de la variable recherchée est maintenant dans registre voulu\n\t}",
"public abstract String getAddressLine2();",
"@Override\n public void onAddressClicked(int position) {\n }",
"public int getAddress() {\n return address;\n }",
"public Address getAddress() { return address; }",
"public void setAddress(String address)\n {\n this.address = address;\n }",
"public void setAddress(String s) {\r\n\t\t// Still deciding how to do the address to incorporate apartments\r\n\t\taddress = s;\t\t\r\n\t}",
"private void setValueForEditAddrss() {\n ServiceCaller serviceCaller = new ServiceCaller(context);\n serviceCaller.callGetAllAddressByIdService(addressid, new IAsyncWorkCompletedCallback() {\n @Override\n public void onDone(String workName, boolean isComplete) {\n if (isComplete) {\n if (!workName.trim().equalsIgnoreCase(\"no\") && !workName.equalsIgnoreCase(\"\")) {\n ContentDataAsArray contentDataAsArray = new Gson().fromJson(workName, ContentDataAsArray.class);\n for (Data data : contentDataAsArray.getData()) {\n if (data != null) {\n edt_name.setText(data.getName());\n edt_phone.setText(data.getPhone());\n edt_landmark.setText(data.getLandmark());\n edt_address.setText(data.getAddress());\n edt_city.setText(data.getCity());\n edt_state.setText(data.getState());\n }\n }\n }\n }\n }\n });\n\n }",
"public void setAddress(String address) {\r\n this.address = address;\r\n }",
"public void setAddress(String address) {\r\n this.address = address;\r\n }",
"public void setAddress(String address) {\r\n this.address = address;\r\n }",
"@Override\r\n\tpublic int ModifyAddress(EasybuyAddress address) {\n\t\tString sql=\"update easybuy_address set ad_user_id=?,ad_address=? where ad_id=?\";\r\n\t\treturn super.op(sql, new Object[]{address.getAd_user_id(),address.getAd_address(),address.getAd_id()});\r\n\t}",
"private void addMarkData(MarkData markData, MobileResponse mobileResponse) {\n //markData.saySomethingTextArea.getValue()\n ItemHolder itemHolder = mobileResponse.getItemHolder();\n GWT.log(\"adding itemholder \" + itemHolder.getId());\n if (markData.replyItemHolder != null) {\n markData.replyItemHolder.getChildrenItemHolders().add(itemHolder);\n } else {\n if (markData.expandData.locationResult.getItemHolders() == null) {\n markData.expandData.locationResult.setItemHolders(new ArrayList<ItemHolder>());\n }\n markData.expandData.locationResult.getItemHolders().add(itemHolder);\n }\n }",
"public String toString(){ \n\t return id+\" \"+name+\" \"+address; \n\t }",
"private void addMoreAddress() {\n toolbar.setTitle(R.string.deliver_address);\n DeliveryAddressFragment deliveryAddressFragment = new DeliveryAddressFragment();\n displaySelectedFragment(deliveryAddressFragment);\n }",
"private void getAddress(double lat, double longit) {\n\t\tLocationAddress.getAddressFromLocation(lat, longit, \n cont, new GeocoderHandler());\n// Log.d(\"address\", addr);\n\t\t\n\t}",
"public void setAddress(String address);",
"public void setAddress(String address);",
"public void setAddress(String address);",
"public void setAddress(String address);",
"@Override\n\tpublic BranchAddressVo c_selectAddress(String id) throws SQLException {\n\t\treturn sqlSession.selectOne(\"yes.c_selectAddress\", id);\n\t}",
"public void setAddress(String address) {\n this.address = address;\n }",
"public void setAddress(String address) {\n this.address = address;\n }",
"protected abstract String getAddressPropertyName();",
"public abstract void setAddressLine1(String sValue);",
"public interface Address {\n public static final String ADDRESS = \"ADDR\";\n public static final String CONTINUATION = \"CONT\";\n public static final String ADDRESS_LINE1 = \"ADR1\";\n public static final String ADDRESS_LINE2 = \"ADR2\";\n public static final String CITY = \"CITY\";\n public static final String STATE = \"STAE\";\n public static final String POSTAL_CODE = \"POST\";\n public static final String COUNTRY = \"CTRY\";\n public static final String PHONE = \"PHON\";\n\n public List getAddressLines(); // List of String\n\n public void setAddressLines(List addressLines);\n\n public String getAddressLine1();\n\n public void setAddressLine1(String line1);\n\n public String getAddressLine2();\n\n public void setAddressLine2(String line2);\n\n public String getCity();\n\n public void setCity(String city);\n\n public String getState();\n\n public void setState(String state);\n\n public String getPostalCode();\n\n public void setPostalCode(String postalCode);\n\n public String getCountry();\n\n public void setCountry(String country);\n\n public String getPhoneNumber();\n\n public void setPhoneNumber(String phoneNumber);\n\n public List getPhoneNumbers(); // List of String\n\n public void setPhoneNumbers(List phoneNumbers);\n}",
"public void editAttractionAddress(String address){\r\n this.address = address;\r\n }",
"public void setAddress2(String address2);",
"public String getAddress(){\r\n return address;\r\n }",
"public int getAddress()\n {\n return address;\n }",
"public void setAddress(String address) {\n this.address = address;\n }",
"public void setAddress(String address) {\n this.address = address;\n }",
"public void setAddress(String address) {\n this.address = address;\n }",
"public void setAddress(String address) {\n this.address = address;\n }",
"public void setAddress(String address) {\n this.address = address;\n }",
"public void setAddress(String address) {\n this.address = address;\n }",
"public void setAddress(String address) {\n this.address = address;\n }",
"public void setAddress(String address) {\n this.address = address;\n }",
"public void setAddress(String address) {\n this.address = address;\n }",
"public void setAddress(String address) {\n this.address = address;\n }",
"public void setAddress(String address) {\n this.address = address;\n }",
"public void setAddress(String address) {\n this.address = address;\n }",
"public void setAddress(String address) {\n this.address = address;\n }",
"public void setAddress(String address) {\n this.address = address;\n }",
"public void setAddress(String address) {\n this.address = address;\n }",
"public void setAddress(String address) {\n this.address = address;\n }",
"public void setAddress(String address) {\n this.address = address;\n }",
"public void setAdress(Adress adr) {\r\n // Bouml preserved body begin 00040F82\r\n\t this.adress = adr;\r\n // Bouml preserved body end 00040F82\r\n }",
"private String getAddress() {\n String add = \"\";\n if (mLocationHelper != null) {\n add = getString(R.string.address, mLocationHelper.getAddress());\n }\n return add;\n }",
"@Override\n\tpublic String getAddressDetails() {\n\t\treturn \"[\" + this.street + \" \" + this.city + \" \" + this.state + \" \" + this.zip + \"]\";\n\t}",
"public void setAddress(Address address) {\n this.address = address;\n }",
"public void setAddress(Address address) {\n this.address = address;\n }",
"public void setAddress(Address address) {\n this.address = address;\n }",
"public void setAddress(final String address){\n this.address=address;\n }",
"kr.pik.message.Profile.ProfileMessage.ContactAddress getContactAddress(int index);",
"public String getAddress() {\r\n\t\t// Still deciding how to do the address to incorporate apartments\r\n\t\treturn address;\t\t\r\n\t}",
"@Override\n\tpublic int addAddress(Address address) {\n\t\treturn sqlSessionTemplate.insert(sqlId(\"addFullAddress\"),address);\n\t}",
"public void setInternalAddress(String address);",
"public void setAddressline1(String addressline1) {\n this.addressline1 = addressline1;\n }",
"public void setExternalAddress(String address);",
"@ApiModelProperty(required = true, value = \"The aliased address in hexadecimal.\")\n public String getAddress() {\n return address;\n }",
"public void setStreetNo(int value) {\n this.streetNo = value;\n }",
"public String getAddress(){\n\t\treturn address;\n\t}",
"public void setAddressId(Integer addressId) {\n this.addressId = addressId;\n }",
"private static int generateMarkerId(){\n return snextMarkerId.incrementAndGet();\n\n }",
"public Address getAddress(){\n\t\treturn address;\n\t}",
"public String getUniqueIdentifier(){\n return (streetAddress + aptNumber + zip).toLowerCase().replaceAll(\"\\\\s+\",\"\"); \n }",
"public String getAddress(){\n return address;\n\n }",
"String getAddress(int type);",
"@Override\n public void definirId(Endereco objeto, int id) {\n objeto.setId(id);\n }",
"@Test\n\tpublic void searhEmpIdtoAddress() {\n\t\tEmployee employee = employeeService.searhEmpIdtoAddress();\n\t\tAssert.assertEquals(id.intValue(), employee.getId().intValue());\n\t\n\t}",
"public void setAddress(String address) {\n\t\tthis.address = address;\n\t}",
"public void setAddress(String address) {\n\t\tthis.address = address;\n\t}",
"public void setAddress(String address) {\n\t\tthis.address = address;\n\t}",
"public void setAddress(String address) {\n\t\tthis.address = address;\n\t}",
"public void setAddress(String address) {\n\t\tthis.address = address;\n\t}",
"public String getAddressline1() {\n return addressline1;\n }",
"public String getAddress()\n {\n \treturn address;\n }",
"public void addAddress(String Address, Coord coord);",
"Address getAddress() {\n\t\t\treturn editedAddress;\n\t\t}"
]
| [
"0.6128928",
"0.5773172",
"0.5770471",
"0.57497853",
"0.5746515",
"0.5627575",
"0.56234145",
"0.5598163",
"0.559112",
"0.5572826",
"0.55686736",
"0.5557232",
"0.5542288",
"0.55375934",
"0.55332357",
"0.55244744",
"0.5517739",
"0.5483578",
"0.54812664",
"0.5478912",
"0.5478912",
"0.547573",
"0.5469629",
"0.5451732",
"0.54146487",
"0.5409359",
"0.5407147",
"0.54065955",
"0.5402223",
"0.5399687",
"0.5399687",
"0.5399687",
"0.5397798",
"0.5394502",
"0.5390102",
"0.5366949",
"0.5363873",
"0.5362392",
"0.5362392",
"0.5362392",
"0.5362392",
"0.5356976",
"0.53511435",
"0.53511435",
"0.53380024",
"0.5334638",
"0.53309095",
"0.5329572",
"0.53214467",
"0.5317583",
"0.53123987",
"0.53091055",
"0.53091055",
"0.53091055",
"0.53091055",
"0.53091055",
"0.53091055",
"0.53091055",
"0.53091055",
"0.53091055",
"0.53091055",
"0.53091055",
"0.53091055",
"0.53091055",
"0.53091055",
"0.53091055",
"0.53091055",
"0.53091055",
"0.5295254",
"0.5289626",
"0.5288136",
"0.52876455",
"0.52876455",
"0.52876455",
"0.52855885",
"0.5278321",
"0.5273687",
"0.52715224",
"0.5266562",
"0.52616715",
"0.5261144",
"0.5259083",
"0.5257956",
"0.5251506",
"0.52502716",
"0.52417505",
"0.5238426",
"0.5236373",
"0.5235054",
"0.5234079",
"0.5220917",
"0.5209035",
"0.5206234",
"0.5206234",
"0.5206234",
"0.5206234",
"0.5206234",
"0.5205171",
"0.5202541",
"0.52012986",
"0.52005684"
]
| 0.0 | -1 |
do nothing but override | public void addedToDom() {
activateTab();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void just() {\n\t\t\r\n\t}",
"@Override\n\tpublic void imprimir() {\n\t\t\n\t}",
"public void doNothing(){\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tpublic void doYouWantTo() {\n\n\t}",
"public void method_6349() {\r\n super.method_6349();\r\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\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 verkaufen() {\n\t}",
"@Override\r\n\tpublic void method() {\n\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tpublic void erstellen() {\n\t\t\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"protected void doSomethingElse()\r\n {\r\n \r\n }",
"@Override\n\tpublic void some() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"protected void method_3848() {\r\n super.method_3848();\r\n }",
"@Override\r\n\tpublic void loeschen() {\r\n//\t\tsuper.leuchterAbmelden(this);\r\n\t\tsuper.loeschen();\r\n\t}",
"public void method_1449() {\r\n super.method_1449();\r\n }",
"public void method_1449() {\r\n super.method_1449();\r\n }",
"public void method_1449() {\r\n super.method_1449();\r\n }",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"@Override\n\tvoid methodabstract() {\n\t\t\n\t}",
"void berechneFlaeche() {\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }",
"@Override\n public void reset()\n {\n super.reset();\n }",
"@Override\n\tpublic void leti() \n\t{\n\t}",
"@Override\n public void reset() {\n super.reset();\n }",
"@Override\n\tpublic void detalhar() {\n\t\t\n\t}",
"@Override\n\tpublic void doIt() {\n\t\t\n\t}",
"@Override\n\tpublic void dibuja() {\n\t\t\n\t}",
"@Override\n\tpublic void e() {\n\n\t}",
"protected abstract void switchOnCustom();",
"@Override\n\tpublic void deneme() {\n\t\tsuper.deneme();\n\t}",
"@Override\n\tpublic void dosomething2() {\n\t\t\n\t}",
"public void avvia() {\n /** invoca il metodo sovrascritto della superclasse */\n super.avvia();\n }",
"@Override\n public void apply() {\n }",
"@Override\n public void action() {\n }",
"@Override\n public void action() {\n }",
"@Override\n public void action() {\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}",
"@Override\n public void memoria() {\n \n }",
"public final void mo51373a() {\n }",
"@Override\n\tpublic void yürü() {\n\n\t}",
"public void smell() {\n\t\t\n\t}",
"@Override\r\n public void salir() {\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void action() {\n\t\t\r\n\t}",
"public /* bridge */ /* synthetic */ void mo55096c() {\n super.mo55096c();\n }",
"protected void execute() {\n \t// literally still do nothing\n }",
"public void override() {\n isOverridden = true;\n }",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\r\n\tpublic void a() {\n\t\t\r\n\t}",
"public void doGeneralThings() {\n logger.debug(\"Overrided or implememted method - doGeneralThings!\");\n }",
"@Override\n public void reset() \n {\n\n }",
"@Override\n public void defaultMethod() {\n I4.super.defaultMethod();\n }",
"@Override\n\tpublic void moverse() {\n\t\t\n\t}",
"@Override\n\tpublic void alterar() {\n\t\t\n\t}",
"@Override\n protected void doAct() {\n }",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"public final /* bridge */ /* synthetic */ void mo43566a() {\n super.mo43566a();\n }",
"@Override\r\npublic int method() {\n\treturn 0;\r\n}",
"public void run() {\r\n\t\t// overwrite in a subclass.\r\n\t}",
"@Override\n\tpublic void type() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"public static void doNothing(){\n\t}",
"@Override\n\tpublic void function() {\n\t\t\n\t}",
"@Override\n public void b() {\n }",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"protected void h() {}",
"public /* bridge */ /* synthetic */ void mo55097d() {\n super.mo55097d();\n }"
]
| [
"0.7355132",
"0.7285345",
"0.7242531",
"0.7229735",
"0.71686447",
"0.716388",
"0.71557957",
"0.7117079",
"0.7117079",
"0.70831317",
"0.7060123",
"0.7043038",
"0.7027902",
"0.6985686",
"0.6979337",
"0.6946172",
"0.6916933",
"0.6907796",
"0.6876875",
"0.6867335",
"0.6863918",
"0.6806914",
"0.67879635",
"0.6775921",
"0.677087",
"0.677087",
"0.67554927",
"0.67554927",
"0.6754218",
"0.6700725",
"0.667204",
"0.666219",
"0.6660619",
"0.6642293",
"0.66398114",
"0.66221434",
"0.6620157",
"0.6603299",
"0.65884507",
"0.6588162",
"0.65833235",
"0.65776294",
"0.6570389",
"0.6541234",
"0.6541234",
"0.6541234",
"0.6539274",
"0.6537071",
"0.65178037",
"0.6510302",
"0.6509323",
"0.65062153",
"0.6505799",
"0.6486034",
"0.6479166",
"0.6453595",
"0.644906",
"0.6445169",
"0.6439803",
"0.6439013",
"0.64364463",
"0.6434218",
"0.6430556",
"0.64247257",
"0.64247257",
"0.64247257",
"0.64231837",
"0.6411872",
"0.6408389",
"0.64054656",
"0.6391516",
"0.63819355",
"0.63747513",
"0.63734597",
"0.6371772",
"0.6368874",
"0.6365057",
"0.6360765",
"0.63528854",
"0.6348394",
"0.6347487",
"0.6345865",
"0.6345237",
"0.6343179",
"0.63407606",
"0.6337403",
"0.6336888",
"0.6336148",
"0.63341194",
"0.63341075",
"0.63219386",
"0.6317251",
"0.63148737",
"0.63080484",
"0.6302211",
"0.62908655",
"0.62908655",
"0.62908655",
"0.62908655",
"0.6286722",
"0.6274365"
]
| 0.0 | -1 |
lbl2.setText("you selected: " + event.getValue()); lbl1.setText(""); | public void onValueChange(ValueChangeEvent event) {
rating.setReadOnly(true);
getMessagePanel().clear();
saveVote(voteForId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void labelEdit2MouseClicked(MouseEvent e) {\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n\n myFirstLabel.setText(\"You just clicked a button!\");\n }",
"@Override\r\n\tpublic void itemStateChanged(ItemEvent e) {\n\t\tint a=c1.getSelectedIndex();\r\n\t\tString b=c1.getItemAt(a).toString();\r\n\t\tl1.setText(\"\"+b);\r\n\t}",
"@Override\n\tpublic void valueChanged(ListSelectionEvent e) {\n\t\tint idx = jlst.getSelectedIndex();\n\t\t\n\t\tif(idx != -1)\n\t\t\tjlab.setText(\"Current selection: \" + names[idx]);\n\t\t\n\t\telse \n\t\t\t\n\t\t\tjlab.setText(\"Please choose a name\");\n\t\t\n\t\t\n\t}",
"@Override\n public void handle(ActionEvent t) {\n e1.setText(\"\");\n e2.setText(\"\");\n }",
"public void valueChanged (TreeSelectionEvent event)\n {\n updateSelection();\n }",
"@Override\n public void actionPerformed(ActionEvent e)\n {\n area2.setText(area1.getText());\n }",
"@Override\r\npublic void actionPerformed(ActionEvent e) {\n\tif(e.getSource()==b1) {\r\n\t\tta.setText(\"you have selected north\");\r\n\t}\r\n\tif(e.getSource()==b2) {\r\n\t\tta.setText(\"you have selected south\");\r\n\t}\r\n\tif(e.getSource()==b3) {\r\n\t\tta.setText(\"you have selected east\");\r\n\t}\r\n\tif(e.getSource()==b4) {\r\n\t\tta.setText(\"you have selected west\");\r\n\t}\r\n\t\r\n}",
"@Override\n\tpublic void valueChanged(ListSelectionEvent e) {\n\t\tJList list = (JList) e.getSource();\n\t\t// System.out.println(list.getSelectedIndex() + \" \" +results.size() );\n\t\tif (results.size() < list.getSelectedIndex()\n\t\t\t\t|| list.getSelectedIndex() < 0) {\n\t\t\tupdateLabel(results.toArray(new String[0])[0]);\n\t\t} else\n\t\t\tupdateLabel(results.toArray(new String[0])[list.getSelectedIndex()]);\n\t}",
"public void actionPerformed(ActionEvent ae)\n {\n int num1 = Integer.parseInt(t1.getText());\n int num2 = Integer.parseInt(t2.getText());\n int value = num1 + num2;\n //set Text needs string so added \"\" with value\n l1.setText(value + \"\");\n \n \n }",
"public void update(){\n label = tag.getSelectedItemPosition() == 0 ? \"all\" : mLabel[tag.getSelectedItemPosition()];\n Refresh();\n }",
"public void actionPerformed(ActionEvent e) {\n String text = textField1.getText();\n textField2.setText(text);\n\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(e.getSource() == e1) {\r\n\t\t\t\t\ttext.setText(\"4\");\r\n\t\t\t\t}\r\n\t\t\t}",
"@Override\n public void valueChanged(javax.swing.event.ListSelectionEvent e)\n {\n this.choice = e.getFirstIndex();\n }",
"public void stateChanged(ChangeEvent event){\n\t\t\t\t\t\t\tlabelLargeur.setText(2*((JSlider)event.getSource()).getValue()-1 + \" cases :\");\n\t\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tString get=textField.getText();\r\n\t\t\t\t\t\ttextField_1.setText(get);\r\n\t\t\t\t\t}",
"@Override\n public void valueChanged(TreeSelectionEvent e) {\n\n }",
"@Override\n public void notifyNewSelection(NoeudBinaire nb) {\n if(nb == null){\n clefJLabel.setText(\"\");\n valeurJLabel.setText(\"\");\n }else{\n clefJLabel.setText(\"\"+nb.getVal().getCle());\n valeurJLabel.setText(\"\"+nb.getVal().getLibelle());\n }\n }",
"public void stateChanged(ChangeEvent event){\n\t\t\t\t\t\t\tlabelHauteur.setText(2*((JSlider)event.getSource()).getValue()-1 + \" cases :\");\n\t\t\t\t\t\t}",
"@Override\n public void valueChanged(ListSelectionEvent arg0) {\n\n }",
"@Override\n public void actionPerformed(ActionEvent actionEvent) {\n total = total * amount2;\n String.valueOf(total);\n //displaying what user chose\n JOptionPane.showMessageDialog(null, total + \" seconds \" + nameItem +\" \"+ amount2 );\n }",
"@Override\n\tpublic void onClick(View v) {\n\t\te1.setText(\"\");\n\t}",
"@Override\n public void actionPerformed(ActionEvent actionEvent) {\n total = total * amount1;\n String.valueOf(amount1);\n String.valueOf(total);\n //displaying what user chose\n JOptionPane.showMessageDialog(null, total + \" seconds \" + nameItem +\" \"+ amount1 );\n }",
"@Override\n public void handle(ActionEvent t) {\n c1.setText(\"\");\n c2.setText(\"\");\n }",
"public void valueChanged(ListSelectionEvent le) {\n\n int idx = jlist.getSelectedIndex();\n\n /** Display the selection */\n if (idx != -1)\n jl.setText(\"Current Selection = \" + names[idx]);\n else\n jl.setText(\"Please choose a name !\");\n }",
"@Override\n public void mousePressed(MouseEvent e) {\n// textFieldModifierNom_Match.setText(selectedMatch.getCodeMatch());\n\t }",
"@Override\r\n public void valueChanged(TreeSelectionEvent e) {\n }",
"String usernameLabelSelected();",
"@FXML\n void radioSelected(ActionEvent event) {\n if (inHouseRbtn.isSelected()) {\n companyNameLbl.setText(\"Machine ID\");\n } else {\n companyNameLbl.setText(\"Company Name\");\n }\n\n }",
"@Override\n public void changed(ObservableValue<? extends Ingredient> observableValue, Ingredient ingredient, Ingredient t1) {\n if (t1 != null){\n //if the new ingredient selected is not null then\n //get the Quantity name from the selected ingredient in the listView\n Ingredient selectedIngredient = lv.getSelectionModel().getSelectedItem();\n String quantityName = selectedIngredient.getQuantityName();\n label.setText(quantityName);\n }\n }",
"public void onClick(View v) {\n lbl.setText(\"Hola jose\");\n }",
"public void valueChanged(ListSelectionEvent e) {\n\t\t\t\tif(!e.getValueIsAdjusting()){\n\n\t\t\t\t\tlabel.setText(\"\");\n\n\t\t\t\t\t//get the product\n\t\t\t\t\tProduct product = catalog.getProduct(list.getSelectedValue()+\"\");\n\t\t\t\t\tlabelTypeInfo.setText(product.getType());\n\t\t\t\t\tlabelNameInfo.setText(product.getName());\n\t\t\t\t\tlabelCodeInfo.setText(product.getCode());\n\t\t\t\t\tlabelPriceInfo.setText(product.getPrice() + \"\");\n\n\n\t\t\t\t\t//judge product is coffee or tea milk, output the different value to the label.\n\t\t\t\t\tif (product.getType() == \"Coffee\") {\n\n\t\t\t\t\t\tlabelTempInfo.setText(((Coffee)product).getTemperature());\n\t\t\t\t\t\tlabelTempInfo.setBorder(new LineBorder(Color.BLACK, 1, true));\n\t\t\t\t\t\tlabelOriginInfo.setText(((Coffee)product).getOrigin());\n\t\t\t\t\t\tlabelOriginInfo.setBorder(new LineBorder(Color.BLACK, 1, true));\n\t\t\t\t\t\tlabelSweetInfo.setText(\"\");\n\t\t\t\t\t\tlabelSweetInfo.setBorder(new LineBorder(Color.LIGHT_GRAY, 1, true));\n\n\n\t\t\t\t\t}else if (product.getType() == \"TeaMilk\") {\n\n\t\t\t\t\t\tlabelSweetInfo.setText(((TeaMilk)product).isSweetness() + \"\");\n\t\t\t\t\t\tlabelSweetInfo.setBorder(new LineBorder(Color.BLACK, 1, true));\n\t\t\t\t\t\tlabelTempInfo.setText(\"\");\n\t\t\t\t\t\tlabelTempInfo.setBorder(new LineBorder(Color.LIGHT_GRAY, 1, true));\n\t\t\t\t\t\tlabelOriginInfo.setText(\"\");\n\t\t\t\t\t\tlabelOriginInfo.setBorder(new LineBorder(Color.LIGHT_GRAY, 1, true));\n\n\t\t\t\t\t}else {\n\t\t\t\t\t\tSystem.out.println(\"an Error\");\n\t\t\t\t\t}\n\n\t\t\t\t\t// set the image to the label to display the product appearance.\n\t\t\t\t\tImageIcon icon = new ImageIcon(\"src/image/\" + product.getName() + \".jpg\");\n\t\t\t\t\timageLabel.setIcon(icon);\n\t\t\t\t\timageLabel.setSize(200, 200);\n\t\t\t\t\tpanelImage.add(imageLabel);\t\n\t\t\t\t}\n\n\n\t\t\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tta1.setText(\" \");\r\n\t\t\t}",
"@Override\r\n public void valueChanged(ListSelectionEvent e) {\n selectionChanged();\r\n }",
"@Override\n\tpublic void valueChanged(ListSelectionEvent arg0) {\n\t\t\n\t}",
"private void jComboBox2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox2ActionPerformed\r\n jComboBox3.removeAllItems();\r\n jLabel21.setText(\" \");\r\n jLabel14.setText(\" \");\r\n jLabel19.setText(\" \");\r\n }",
"private void tblaktivitasMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tblaktivitasMouseClicked\n //txttanggal.setText(tblaktivitas.getValueAt(tblaktivitas.getSelectedRow(),0).toString());\n txtgrup.setSelectedItem(tblaktivitas.getValueAt(tblaktivitas.getSelectedRow(),0).toString());\n txtcompart.setSelectedItem(tblaktivitas.getValueAt(tblaktivitas.getSelectedRow(),1).toString());\n txtaktivitas.setText(tblaktivitas.getValueAt(tblaktivitas.getSelectedRow(),2).toString());\n txtha.setText(tblaktivitas.getValueAt(tblaktivitas.getSelectedRow(),3).toString());\n txtharga.setText(tblaktivitas.getValueAt(tblaktivitas.getSelectedRow(),4).toString());\n }",
"public void valueChanged(TreeSelectionEvent e) {\n\t}",
"public void valueChanged(TreeSelectionEvent e) {\r\n DefaultMutableTreeNode node = (DefaultMutableTreeNode)\r\n tree.getLastSelectedPathComponent();\r\n \r\n Node n = (Node)node.getUserObject();\r\n \r\n if (tree == null) return;\r\n \r\n htmlPane.setText(Homework1.inorder(n)+\"=\"+Homework1.calculate(n));\r\n \r\n }",
"public void limpiarLabelsVacios() {\r\n label_nombre.setText(\"\");\r\n label_horas_teoria.setText(\"\");\r\n label_horas_practica.setText(\"\");\r\n label_creditos.setText(\"\");\r\n }",
"@Override\n public void mousePressed(MouseEvent e) {\n//\t textFieldModifierNom_Match.setText(selectedMatch.getCodeMatch());\n\t }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tet1.setText(\"\");\n\t\t\t}",
"@Override\r\n\tpublic void valueChanged(ListSelectionEvent e) {\n\t\tif(!e.getValueIsAdjusting()) {\r\n\t\t\tthis.getRightPanel().getReqDetial().setText(this.getRightPanel().getApprovedReqList().getSelectedValue().showUPDetails());\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.getRightPanel().getReqDetial().setText(\"\");\r\n\t\t}\r\n\t\t\r\n\t}",
"public void onClick(View arg0) {\n // change the text to state that radio button one was clicked\n tv_display.setText(R.string.tv_display_rb1);\n }",
"public void mouseClicked(MouseEvent e){\r\n \t input[num].setText(\"\");\r\n \t}",
"@Override\r\n public void selectionRemoved(ChangeEvent e) {\n\r\n }",
"protected void labelClear(){\n N11.setText(null);N12.setText(null);N13.setText(null);N14.setText(null);\n N21.setText(null);N22.setText(null);N23.setText(null);N24.setText(null);\n N31.setText(null);N32.setText(null);N33.setText(null);N34.setText(null);\n N41.setText(null);N42.setText(null);N43.setText(null);N44.setText(null);\n n11.setText(null);n12.setText(null);n13.setText(null);n14.setText(null);\n n21.setText(null);n22.setText(null);n23.setText(null);n24.setText(null);\n n31.setText(null);n32.setText(null);n33.setText(null);n34.setText(null);\n n41.setText(null);n42.setText(null);n43.setText(null);n44.setText(null);\n G11.setText(null);G12.setText(null);G13.setText(null);G14.setText(null);\n G21.setText(null);G22.setText(null);G23.setText(null);G24.setText(null);\n G31.setText(null);G32.setText(null);G33.setText(null);G34.setText(null);\n G41.setText(null);G42.setText(null);G43.setText(null);G44.setText(null);\n g11.setText(null);g12.setText(null);g13.setText(null);g14.setText(null);\n g21.setText(null);g22.setText(null);g23.setText(null);g24.setText(null);\n g31.setText(null);g32.setText(null);g33.setText(null);g34.setText(null);\n g41.setText(null);g42.setText(null);g43.setText(null);g44.setText(null);\n E11.setText(null);E12.setText(null);E13.setText(null);E14.setText(null);\n E21.setText(null);E22.setText(null);E23.setText(null);E24.setText(null);\n E31.setText(null);E32.setText(null);E33.setText(null);E34.setText(null);\n E41.setText(null);E42.setText(null);E43.setText(null);E44.setText(null);\n e11.setText(null);e12.setText(null);e13.setText(null);e14.setText(null);\n e21.setText(null);e22.setText(null);e23.setText(null);e24.setText(null);\n e31.setText(null);e32.setText(null);e33.setText(null);e34.setText(null);\n e41.setText(null);e42.setText(null);e43.setText(null);e44.setText(null);\n }",
"public void switchToLabel() {\n if (deckPanel.getVisibleWidget() == LABEL_INDEX) {\n return;\n }\n // Fires the ValueChanged event.\n setValue(textArea.getText(), true);\n deckPanel.showWidget(LABEL_INDEX);\n }",
"@Override\n public void handle(ActionEvent event) \n {\n // Call the changeLabels method with parameter of 2.\n selection = 2;\n changeLabels(selection);\n\n // Set the scene to the user input form\n primaryStage.setScene(sceneForm);\n }",
"private void studentSubTotalActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( txt_showresult.getText().equals( \"0\" )){ \n\t\t\t\t\t\t\t\ttxt_showresult.setText(\"2\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// if textfield show other value , add number after the value\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttxt_showresult.setText( txt_showresult.getText() + \"2\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}",
"@Override\n\tpublic void widgetSelected(SelectionEvent e) {\n\t\tint i = typecombo.getSelectionIndex();\n\t\tif(i == 0){\n\t\t\tcosttext.setText(\"3元\");\n\t\t}\n\t\telse if(i == 1){\n\t\t\tcosttext.setText(\"5元\");\n\t\t}\n\t}",
"@Override\r\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\tSystem.out.println(\"Clicked on: \" + x + \",\" + y);\r\n\t\t\tif (lastSelected != null) {\r\n\t\t\t\tlastSelected.setBorder(null);\r\n\t\t\t}\r\n\t\t\tsetBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));\r\n\t\t\tGCollector.getInstance().getEnv().setAgentPosTextFields(x, y);\r\n\t\t\tGCollector.getInstance().getEnv().setModifyPosTextFields(x, y);\r\n\r\n\t\t\tlastSelected = (JLabel) e.getComponent();\r\n\t\t}",
"public void setLabel( String label )\n { \n this.label = label;\n show_text();\n }",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tl1.setText(\"You cliked the mouse\");\r\n\t}",
"private void btnSpeaker2ActionPerformed(java.awt.event.ActionEvent evt) {\n txtSpeaker2.setText(Dialog());\n \n }",
"@Override\n\tpublic void itemStateChanged(ItemEvent e) {\n\t\tString res = jc.getSelectedItem().toString();\n\t\tjt.setText(res);\n\n\t}",
"public void onClick(View arg0) {\n // change the text to state that radio button one was clicked\n tv_display.setText(R.string.tv_display_rb2);\n }",
"public CharSequence getSelectedLabel()\n\t{\n\t\treturn _current.label.getText();\n\t}",
"public void radioSelect(ActionEvent e)\n\t{\n\t\tString rep=\"\";\n\t\tif(rdoOui.isSelected())\n\t\t\trep=\"Oui\";\n\t\telse if(rdoNon.isSelected())\n\t\t\trep=\"Non\";\n\t\telse\n\t\t\trep=\"Peut être\";\n\t\tlblRadio.setText(rep);\n\t}",
"private void jLabel97MouseClicked(java.awt.event.MouseEvent evt) {\n }",
"@Override\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\tint perPersonTipPercentage=((JSlider) e.getSource()).getValue();\n\t\t\t\tfloat perPersonNewTip=(((float)perPersonTipPercentage)/100)*(Float.valueOf(TipCalcView.getInstance().totalTip.getText()).floatValue());\n\t\t\n\t\t\t\tDecimalFormat decimalFormat=new DecimalFormat(\"#.##\");\n\t\t\t\tTipTailorView.getInstance().labels[no].setText(String.valueOf(decimalFormat.format(perPersonNewTip)));\n\t\t\t\tTipCalcView.getInstance().perPersonTip.setText(\"Not Applicable\");\n\t\t\t\tTipCalcView.getInstance().perPersonTip.setEditable(false);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"public void setLabelText(String text);",
"@Override\n\tpublic void onValueSelected(Entry e, int dataSetIndex, Highlight h) {\n\t\t\n\t}",
"@Override\n\tpublic void setLabelText(String label) {\n\t}",
"public void valueChanged(ListSelectionEvent e) {\n\t\t\n\t}",
"@Override\n public void valueChanged(final ListSelectionEvent e) {\n if (e.getValueIsAdjusting()) {\n return;\n }\n showObject();\n }",
"@Override\r\n\t\tpublic void valueChanged(ListSelectionEvent e) {\r\n\t\t\t\r\n\t\t}",
"@FXML\r\n void actionOutsourcedRadioButton(ActionEvent event) {\r\n\r\n labelPartIdName.setText(\"Company Name\");\r\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjtf1.setText(\"\");\n\t\t\t\tjpsf.setText(\"\");\n\t\t\t}",
"private void comboBox1ItemStateChanged(ItemEvent e) {\n textField1.setText(\"\");\n textField2.setText(\"\");\n// textField3.setText(\"\");\n// textField4.setText(\"\");\n// textField5.setText(\"\");\n// textField6.setText(\"\");\n if(comboBox1.getSelectedIndex()<2){\n label2.setVisible(true);\n textField1.setVisible(true);\n label3.setVisible(false);\n// label4.setVisible(false);\n// label5.setVisible(false);\n// label6.setVisible(false);\n// label7.setVisible(false);\n// label8.setVisible(false);\n textField2.setVisible(false);\n// textField3.setVisible(false);\n// textField4.setVisible(false);\n// textField5.setVisible(false);\n// textField6.setVisible(false);\n// comboBox2.setVisible(false);\n }else{\n label2.setVisible(false);\n textField1.setVisible(false);\n label3.setVisible(true);\n// label4.setVisible(true);\n// label5.setVisible(true);\n// label6.setVisible(true);\n// label7.setVisible(true);\n// label8.setVisible(true);\n textField2.setVisible(true);\n// textField3.setVisible(true);\n// textField4.setVisible(true);\n// textField5.setVisible(true);\n// textField6.setVisible(true);\n// comboBox2.setVisible(true);\n }\n }",
"@Override\n public void changed(ObservableValue observableValue, Object oldValue, Object newValue) {\n if(verTabla.getSelectionModel().getSelectedItem() != null) { \n //System.out.println(newValue);\n String []values = newValue.toString().replace(\"[\", \"\").replace(\"]\", \"\") .split(\",\");\n editarIDProv.setText(values[0]);\n editarNombrePro.setText(values[1]);\n editarDescripcionPro.setText(values[2]);\n editarCantidadPro.setText(values[3]);\n editarIVAProv.setText(values[4]);\n editarPrecioPro.setText(values[5]);\n editarIDProvePro.setText(values[6]);\n }\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint a = Integer.parseInt(field.getText());\n\t\t\t\tint b = Integer.parseInt(field2.getText());\n\t\t\t\tint c = a+b;\n\t\t\t\tlabel.setText(\"Value is: \" + c);\n\t\t\t}",
"public void radioButtonChenged() {\n if (this.radioButtons.getSelectedToggle().equals(this.btn1))\r\n radioButtonlabel.setText(\"You selected table 1\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn2))\r\n radioButtonlabel.setText(\"You selected table 2\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn3))\r\n radioButtonlabel.setText(\"You selected table 3\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn4))\r\n radioButtonlabel.setText(\"You selected table 4\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn5))\r\n radioButtonlabel.setText(\"You selected table 5\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn6))\r\n radioButtonlabel.setText(\"You selected table 6\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn7))\r\n radioButtonlabel.setText(\"You selected table 7\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn8))\r\n radioButtonlabel.setText(\"You selected table 8\");\r\n\r\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent cb_e) {\n\t\t\t\tinx1 = cb[1].getSelectedIndex();\n\t\t\t}",
"@Override\npublic void actionPerformed(ActionEvent ae) {\nObject obj = ae.getSource(); \n\nif(obj == myCalcView.getJbt_one()){ \n myCalcView.getJtf_result().setText(myCalcView.getJtf_result().getText()+\"1\"); \n}else if(obj == myCalcView.getJbt_two()){ \n myCalcView.getJtf_result().setText(myCalcView.getJtf_result().getText()+\"2\"); \n}else if(obj == myCalcView.getJbt_plus()){ \n v1 = myCalcView.getJtf_result().getText(); \n System.out.println(\"v1 : \"+v1); \n op = \"+\"; \n myCalcView.getJtf_result().setText(\"\"); \n}else if(obj == myCalcView.getJbt_equals()){ \n v2 = myCalcView.getJtf_result().getText(); \n System.out.println(\"v1:\"+v1 +\"-> v2 : \"+v2+\" op : \"+op); \n String result = calcurate(v1,v2,op); \n myCalcView.getJtf_result().setText(result); \n}else if(obj == myCalcView.getJbt_clear()){ \n myCalcView.getJtf_result().setText(\"\"); \n} \n}",
"@Subscribe\r\n\tpublic void onSelectExperiement(ExpressionDataSelectedEvent event)\r\n\t{\r\n\t\tgetView().updateSelectionLabel(event.GetPayload().getName());\r\n\t}",
"public void setLabel()\r\n {\r\n int i = Converter(Input);\r\n \r\n if(j<i && label.getText().equals(\"Player 1\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n \r\n }else if(j<i && label.getText().equals(\"Player 2\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n }else if(j<i && label.getText().equals(\"Player 3\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n }else if(j==i && label.getText().equals(\"Player \"+j))\r\n {\r\n j=1;\r\n label.setText(\"Player \"+j);\r\n }\r\n \r\n \r\n }",
"@Override\n public void handle(ActionEvent event) \n {\n // Call the changeLabels method with parameter of 2.\n selection = 3;\n changeLabels(selection);\n\n // Set the scene to the user input form\n primaryStage.setScene(sceneForm);\n }",
"private void defaultButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_defaultButtonActionPerformed\n ampBox.setText(\"5\");\n durBox.setText(\"150\");\n freqBox.setText(\"20\");\n owBox.setText(\"15\"); \n }",
"private void txtDisplayActionPerformed(java.awt.event.ActionEvent evt) {\n \n }",
"@Override\n\tpublic void mousePressed(MouseEvent e) {\n\n\t\tLabel_Selected((JLabel) e.getComponent());\n\t\t\n\t\tnow_x = e.getXOnScreen() - e.getComponent().getX();\n\t\tnow_y = e.getYOnScreen() - e.getComponent().getY();\n\t\tnow_w = e.getComponent().getWidth();\n\t\tnow_h = e.getComponent().getHeight();\n\t\tnow_L = e.getComponent().getX()+e.getComponent().getWidth();\n\t\tnow_D = e.getComponent().getY()+e.getComponent().getHeight();\n\t\t\n\t\tif(e.getX() > e.getComponent().getWidth()-5 && e.getX() < e.getComponent().getWidth() + 5) {\n\t\t\tnow_X = 'R';\n\t\t} else if(e.getX() > -5 && e.getX() < 5) {\n\t\t\tnow_X = 'L';\n\t\t}\n\t\tif(e.getY() > e.getComponent().getHeight()-5 && e.getY() < e.getComponent().getHeight() + 5) {\n\t\t\tnow_Y = 'D';\n\t\t} else if(e.getY() > -5 && e.getY() < 5) {\n\t\t\tnow_Y = 'U';\n\t\t}\n\t\t\n\t\tText_Set();\n\t}",
"public void valueChanged(ListSelectionEvent event) {\n String contratoId = jTableContratos.getValueAt(jTableContratos.getSelectedRow(), 0).toString(); \n String clienteId = jTableContratos.getValueAt(jTableContratos.getSelectedRow(), 6).toString(); \n String activo = jTableContratos.getValueAt(jTableContratos.getSelectedRow(), 8).toString(); \n \n \n if(activo.equalsIgnoreCase(\"1\")){\n radioActivoEdit.setSelected(true);\n }else if(activo.equalsIgnoreCase(\"0\")){\n radioInactivoEdit.setSelected(true);\n }\n \n lblClienteid.setText(clienteId);\n lblContratoId.setText(contratoId);\n \n }",
"@Override\n public void onChanged(String s) {\n mode.setTitle(String.format(\"%s %s %s\",context.getResources()\n .getString(R.string.selected),s ,\n context.getResources().getString(R.string.item) ));\n }",
"private void nombretxtActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"public void valueChanged(ListSelectionEvent arg0) {\n\t\t\r\n\t}",
"@Override\n public void changed(ObservableValue observableValue, Object oldValue, Object newValue) {\n if(verTabla.getSelectionModel().getSelectedItem() != null) { \n //System.out.println(newValue);\n String []values = newValue.toString().replace(\"[\", \"\").replace(\"]\", \"\") .split(\",\");\n editarIDProv.setText(values[0]);\n editarNombrePro.setText(values[1]);\n editarDescripcionPro.setText(values[2]);\n editarCantidadPro.setText(values[3]);\n editarIVAProv.setText(values[4]);\n editarPrecioPro.setText(values[5]);\n editarIDProvePro.setText(values[6]);\n }\n }",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( txt_showresult.getText().equals( \"0\" )){ \n\t\t\t\t\t\t\t\ttxt_showresult.setText(\"8\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// if textfield show other value , add number after the value\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttxt_showresult.setText( txt_showresult.getText() + \"8\");\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tstr1=t1.getText();\r\n\t\tstr2=t2.getText();\r\n\t\t\t\ta=Integer.parseInt(str1);\r\n\t\t\t\tb=Integer.parseInt(str2);\r\n\t\tif(e.getSource()==b1)\r\n\t\t{\r\n\t\t\ts=a+b;\r\n\t\t\tstr3=String.valueOf(s);\r\n\t\t\tt3.setText(str3);\r\n\t\t}\r\n\t\tif(e.getSource()==b2)\r\n\t\t{\r\n\t\t\ts=a-b;\r\n\t\t\tstr3=String.valueOf(s);\r\n\t\t\tt3.setText(str3);\r\n\t\t}\r\n\t}",
"@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tint selectedRow = table.getSelectedRow();//获得选中行的索引\n\t\t\t\tif(selectedRow!= -1) //是否存在选中行\n\t\t\t {\n\t\t\t Object oa = tableModel.getValueAt(selectedRow, 0);\n\t\t\t Object ob = tableModel.getValueAt(selectedRow, 1);\n\t\t\t comboBox_1.setSelectedItem(oa.toString());\n\t\t\t textField2.setText(ob.toString());\n\t\t\t }\n\t\t\t else{\n\t\t\t textField2.setText(\"\");\n\t\t\t }\n\t\t\t}",
"@Override\n\tpublic void selectionChanged(SelectionChangedEvent arg0) {\n\t\t\n\t}",
"private void clearValue(Event e)\n\t{\n\t\tif (e.getSource() == btnClear) \n\t\t{\n\t\t tfNum1.setText(\"\");\n\t\t tfNum2.setText(\"\");\n\t\t FinalAnswer.setText(\"\");\n\t\t FileMenu.setValue(\"\");\n\t\t tfNum1.requestFocus();\n\t\t return;\n\t\t}\n\t}",
"private String getLabel(MouseEvent e) {\n \n final JFrame parent = new JFrame();\n JButton button = new JButton();\n\n button.setText(\"Click me to show dialog!\");\n parent.add(button);\n //button.doClick();\n parent.pack();\n parent.setVisible(true);\n //String name;\n //button.doClick();\n //button.doClick();\n button.addActionListener(new java.awt.event.ActionListener() {\n @Override\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n label = JOptionPane.showInputDialog(parent,\n \"Set label for this segment\", null); \n \n getLabels().add(label);\n parent.dispose();\n //System.exit(0);\n //setLabel(name);\n //System.out.println(\"rectangle sizes = \"+startDrag.x+\",\"+ startDrag.y+\",\"+ e.getX()+\",\"+ e.getY()+\" = \"+label);\n }\n \n });\n button.doClick();\n \n \n return label;\n }",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( txt_showresult.getText().equals( \"0\" )){ \n\t\t\t\t\t\t\t\ttxt_showresult.setText(\"1\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// if textfield show other value , add number after the value\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttxt_showresult.setText( txt_showresult.getText() + \"1\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}",
"public void updateSelection() {\n\t\t\n\t}",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( txt_showresult.getText().equals( \"0\" )){ \n\t\t\t\t\t\t\t\ttxt_showresult.setText(\"7\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// if textfield show other value , add number after the value\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttxt_showresult.setText( txt_showresult.getText() + \"7\");\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}",
"@Override\n\tpublic void textValueChanged(TextEvent e) {\n\t\t\n\t}",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( txt_showresult.getText().equals( \"0\" )){ \n\t\t\t\t\t\t\t\ttxt_showresult.setText(\"6\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// if textfield show other value , add number after the value\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttxt_showresult.setText( txt_showresult.getText() + \"6\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}",
"public void setSelectedValue(int value) {\n\t\tthis.labelValueSelected.setText(\"Select a value: \" + value);\n\t}",
"@Override\n public void actionPerformed(ActionEvent actionEvent) {\n total = total * amount3;\n String.valueOf(total);\n //displaying what user chose\n JOptionPane.showMessageDialog(null, total + \" seconds \" + nameItem +\" \"+ amount3 );\n }",
"public void changeVarLabel() {\n if (inHouse.isSelected()) {\n varLabel.setText(\"Machine ID\");\n variableTextField.setPromptText(\"Machine ID...\");\n variableTextField.setMaxLength(9);\n int textLength = partId.getText().length();\n variableTextField.setText(variableTextField.getText().replaceAll(\"[^\\\\d.]\", \"\"));\n variableTextField.positionCaret(textLength);\n } else if (outsourced.isSelected()) {\n varLabel.setText(\"Company Name\");\n variableTextField.setPromptText(\"Company Name...\");\n variableTextField.setMaxLength(26);\n }\n }"
]
| [
"0.70287406",
"0.66837406",
"0.66350245",
"0.65894216",
"0.6580198",
"0.65541816",
"0.6498749",
"0.64980155",
"0.6496659",
"0.64734703",
"0.6416056",
"0.6395283",
"0.6358075",
"0.6337422",
"0.6332333",
"0.63142174",
"0.63076556",
"0.6302549",
"0.6290413",
"0.62442106",
"0.62383443",
"0.6222632",
"0.6210112",
"0.62040985",
"0.6199683",
"0.61970294",
"0.617498",
"0.6162196",
"0.61512464",
"0.6149371",
"0.6146815",
"0.61270976",
"0.61220455",
"0.61201614",
"0.611643",
"0.61048645",
"0.6102035",
"0.6075829",
"0.60728717",
"0.6069544",
"0.6065432",
"0.6064219",
"0.6059349",
"0.60495794",
"0.60443336",
"0.60368663",
"0.6030428",
"0.6028211",
"0.6025226",
"0.6022271",
"0.6015233",
"0.6015105",
"0.6004112",
"0.5995089",
"0.59911984",
"0.5983974",
"0.5977127",
"0.59770113",
"0.59759504",
"0.5969795",
"0.59642464",
"0.59507823",
"0.5949765",
"0.59486616",
"0.5944197",
"0.5944085",
"0.5941742",
"0.59376276",
"0.5937427",
"0.5936893",
"0.59356284",
"0.59308964",
"0.5930319",
"0.5923902",
"0.59234416",
"0.59223884",
"0.5921973",
"0.5920366",
"0.5916536",
"0.59161025",
"0.59151125",
"0.59120363",
"0.5910776",
"0.59075284",
"0.5904665",
"0.5903257",
"0.59031385",
"0.5898667",
"0.5897166",
"0.58957857",
"0.58911383",
"0.5884373",
"0.58823764",
"0.58820474",
"0.587952",
"0.58734775",
"0.5871294",
"0.5871155",
"0.5855748",
"0.5855545",
"0.58532584"
]
| 0.0 | -1 |
we need to be logged in to vote | protected void saveVote(Long voteForId) {
if (mywebapp.getAuthenticatedUser() == null) {
getMessagePanel().displayMessage("Please login before voting.");
return;
}
ContestRequest contestRequest = new ContestRequest();
GWT.log("authToken=" + mywebapp.getAuthToken());
contestRequest.setAuthToken(mywebapp.getAuthToken());
//we don't init the check boxes when it's location only
for (Long contestId : ratingMap.keySet()) {
Rating rating = ratingMap.get(contestId);
//only register if there was a vote
Integer val = rating.getValue();
if (val > 0) {
ContestEntryHolder ceh = new ContestEntryHolder();
ceh.setContestId(contestId);
ceh.setRating(val);
ceh.setVoteForId(voteForId);
contestRequest.getContestEntryHolders().add(ceh);
}
}
ApiServiceAsync myService = mywebapp.getApiServiceAsync();
myService.vote(contestRequest, new AsyncCallback() {
public void onFailure(Throwable caught) {
//postDialog.hide();
getMessagePanel().displayError(caught.getMessage());
}
public void onSuccess(Object result) {
MobileResponse mobileResponse = (MobileResponse) result;
if (mobileResponse.getStatus() == 1) {
getMessagePanel().displayMessage("Thanks for voting");
} else {
//postDialog.hide();
getMessagePanel().displayErrors(mobileResponse.getErrorMessages());
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void doVote() {\n }",
"public static void doVoteAndComment() {\n }",
"private void loggedInUser() {\n\t\t\n\t}",
"private void postVote() {\n if ( unvotedParties() == 0 )\n TransactionManager.getTransactionManager().resolveTransaction(txId);\n }",
"public synchronized void beginVoting() {\n\t\tvotingThread = new Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// votes should be filled with [each delegate] -> `null`\n\t\t\t\tfor (int i = 0; i < 2 /* rounds */; i++) {\n\t\t\t\t\tfor (Delegate delegate : votes.keySet()) {\n\t\t\t\t\t\tif (votes.get(delegate) != null) {\n\t\t\t\t\t\t\t// Already voted.\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentlyVoting = delegate;\n\t\t\t\t\t\tlblCurrentVoter.setText(delegate.getName());\n\t\t\t\t\t\tlblCurrentVoter.setIcon(delegate.getSmallIcon());\n\n\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\t\tfinal List<Map<Vote, JButton>> maplist = Arrays.asList(\n\t\t\t\t\t\t\t\tbuttons_roundOne, buttons_roundTwo);\n\t\t\t\t\t\tfor (Map<Vote, JButton> map : maplist) {\n\t\t\t\t\t\t\tfor (Vote vote : map.keySet()) {\n\t\t\t\t\t\t\t\tmap.get(vote)\n\t\t\t\t\t\t\t\t\t\t.setText(\n\t\t\t\t\t\t\t\t\t\t\t\tdelegate.getStatus().hasVetoPower ? vote.vetoText\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: vote.normalText);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tsynchronized (votingThread) {\n\t\t\t\t\t\t\t\tvotingThread.wait();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinal Vote cast = votes.get(delegate);\n\t\t\t\t\t\tif (cast == Vote.PASS) {\n\t\t\t\t\t\t\tvotes.put(delegate, null);\n\t\t\t\t\t\t\t// So he goes again.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (JButton button : votingButtons) {\n\t\t\t\t\t\t\tbutton.setEnabled(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlayout.show(pnlVoting, pnlSecondRound.getName());\n\t\t\t\t}\n\t\t\t\t// When done, disable again.\n\t\t\t\tfor (JButton button : votingButtons) {\n\t\t\t\t\tbutton.setEnabled(false);\n\t\t\t\t}\n\t\t\t\tcurrentlyVoting = null;\n\t\t\t\tlblCurrentVoter.setText(null);\n\t\t\t\tlblCurrentVoter.setIcon(null);\n\t\t\t\tpnlVoting.setVisible(false);\n\t\t\t}\n\t\t});\n\t\tvotingThread.start();\n\t}",
"boolean hasVotedInTerm() {\n return null != votedFor;\n }",
"void votedOnPoll(String pollId);",
"public RequestVoteRsp RequestVote(RequestVoteReq candidate) {\n boolean voted = false;\n //if term > currentTerm\n if (candidate.getTerm() > this.persistentState.getCurrentTerm()) {\n // currentTerm = term;\n this.persistentState.setCurrentTerm(candidate.getTerm());\n //step down if leader or candidate\n if (this.role != Role.FOLLOWER) {\n this.role = Role.FOLLOWER;\n }\n }\n //if term = currentTerm, voteFor is null or candidateId, and candidate's log is at least as complete as local log\n if (candidate.getTerm() == this.persistentState.getCurrentTerm() && (this.persistentState.getVotedFor() == 0 || this.persistentState.getVotedFor() == candidate.getCandidateId())\n && candidate.getLastLogIndex() >= this.lastEntry.getIndex()) {\n //grant vote\n voted = true;\n //reset election timeout\n resetElectionTimeout();\n }\n return new RequestVoteRsp(this.persistentState.getCurrentTerm(), voted);\n }",
"@FXML\n public void start_vote(ActionEvent e)\n {\n //calling functions to get ballot count and candidate count\n can_counter();\n ball_counter();\n //checks there are any candidates and ballots\n if((candidate_count!=0)&&(ballot_count!=0))\n {\n //if candidates and voters available, voting will start\n voting_state=1;\n a=new Alert(Alert.AlertType.INFORMATION);\n a.setContentText(\"Voting Has Been Started !\");\n a.show();\n }\n //for 0 candidate count with ballots\n else if ((candidate_count==0)&&(ballot_count!=0))\n {\n a=new Alert(Alert.AlertType.ERROR);\n a.setContentText(\"Cannot Start Voting With 0 Candidates !\");\n a.show();\n }\n //for 0 ballots with candidates\n else if ((ballot_count==0)&&(candidate_count!=0))\n {\n a=new Alert(Alert.AlertType.ERROR);\n a.setContentText(\"Cannot Start Voting With 0 Ballots !\");\n a.show();\n }\n else\n {\n a=new Alert(Alert.AlertType.ERROR);\n a.setContentText(\"Cannot Start Voting With 0 Candidates And 0 Ballots !\");\n a.show();\n }\n }",
"public void voteIdea(String username, Long ideaId, boolean vote) throws VotingException, DataAccessException {\n try {\n MyUser user = myUserFacade.getUser(username);\n Idea idea = this.find(ideaId);\n Boolean previousVote = user.getVotes().get(idea);\n if (previousVote == null) {\n // If the user never voted for this idea, then create a new Vote:\n user.addVote(idea, vote);\n if (vote) {\n idea.upvote();\n } else {\n idea.downvote();\n }\n } else {\n // The user had previously voted for this idea.\n // Case 1: trying to upvote twice the idea:\n if (previousVote && vote) {\n throw new VotingException((null), \"Cannot upvote twice the same post\");\n } // Case 2: trying to downvote twice the idea:\n else if (!previousVote && !vote) {\n throw new VotingException((null), \"Cannot downvote twice the same post\");\n } // Case 3: one is upvote and the other downvote. Vote is removed\n else {\n user.removeVote(idea);\n if (vote) {\n idea.setUpvotes(idea.getUpvotes() - 1);\n } else {\n idea.setDownvotes(idea.getDownvotes() - 1);\n }\n }\n }\n myUserFacade.edit(user);\n this.edit(idea);\n } catch (PersistenceException | EJBException pe) {\n throw new DataAccessException(pe, \"Error while voting post\");\n }\n }",
"private boolean isLoggedInUser(){\n return true;\n }",
"public void countVotes() {\n int[] voteResponses = RaftResponses.getVotes(mConfig.getCurrentTerm());\n int numVotes = 0;\n if(voteResponses == null) {\n //System.out.println(mID + \" voteResponses null\");\n //System.out.println(\"cur \" + mConfig.getCurrentTerm() + \" RR: \" + RaftResponses.getTerm());\n }\n else {\n for(int i = 1; i <= mConfig.getNumServers(); i++) {\n //If vote has not been received yet, resend request\n //if(voteResponses[i] == -1)\n //this.remoteRequestVote(i, mConfig.getCurrentTerm(), mID, mLog.getLastIndex(), mLog.getLastTerm());\n if(voteResponses[i] == 0)\n numVotes++;\n }\n }\n //If election is won, change to leader\n if(numVotes >= (mConfig.getNumServers()/2.0)) {\n electionTimer.cancel();\n voteCountTimer.cancel();\n RaftServerImpl.setMode(new LeaderMode());\n }\n else {\n voteCountTimer = scheduleTimer((long) 5, 2);\n }\n }",
"public void addVote() {\n this.votes++;\n }",
"public void addVote(String token);",
"public boolean didStudentVote() {\n\t\treturn voted;\n\t}",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\n\t\t\t\t\tdoVote(getIntent().getStringExtra(\"aid\"), getIntent().getStringExtra(\"id\"));\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\n\t\t\t\t\tJSONObject votejson = Json.getJson(MainActivity.website+\"/video/vote?ri=\"+rowItems.get(positionzhang).getVID()+\"&vt=STANDOUT\",MainActivity.httpclient);\n\t\t\t\t\tToast toast;\n\t\t\t\t\tString Votestate = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tVotestate = votejson.getString(\"result\");\n\t\t\t\t\t} catch (JSONException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (Votestate.equals(\"unknown\")){\n\t\t\t\t\t\t toast = Toast.makeText(MainActivity.nowcontext,\n\t\t\t\t\t \"Please Login first\",\n\t\t\t\t\t Toast.LENGTH_SHORT);\n\t\t\t\t\t toast.setGravity(Gravity.BOTTOM|Gravity.CENTER_HORIZONTAL, 0, 0);\n\t\t\t\t\t toast.show();\n\t\t\t\t\t Intent intent = new Intent(MainActivity.nowcontext, Login.class);\n\t\t\t\t\t MainActivity.nowcontext.startActivity(intent);\n\t\t\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t}else{\n\t\t\t\t\ttry {\n\t\t\t\t\t\t\n\t\t\t\t\t\ttoast = Toast.makeText(MainActivity.nowcontext,\n\t\t\t\t\t\t\t\t MainActivity.convertNodeToText(Jsoup.parse(votejson.getString(\"message\"))),\n\t\t\t\t\t\t Toast.LENGTH_SHORT);\n\t\t\t\t\t\ttoast.setGravity(Gravity.BOTTOM|Gravity.CENTER_HORIZONTAL, 0, 0);\n\t\t\t\t toast.show();\n\t\t\t\t \n\t\t\t\t //Login.writeFileSdcardFile(\"/sdcard/as.txt\", rowItems.get(position).getVID());\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t \n\t\t\t Log.i(\"vote\",votejson.toString());\n\t\t\t\t\t\n\t\t\t\t}",
"public JsonObject addVote(String login, String token, String target,\r\n String voteRating) throws IOException {\r\n /*\r\n\r\n Refactoring notes: this function is overgrown.\r\n */\r\n JsonObject object = utils.authCheck(login, token);\r\n if (!StringUtils.isBlank(object.get(\"error\").getAsString())) {\r\n return object;\r\n }\r\n if (StringUtils.isBlank(target)) {\r\n object.addProperty(\"error\", \"target user parameter is blank\");\r\n return object;\r\n }\r\n if (!reader.loginExistCheck(target)) {\r\n object.addProperty(\"error\", \"target user doesn't exist\");\r\n return object;\r\n }\r\n if (target.equals(login)) {\r\n object.addProperty(\"error\", \"you cannot vote for yourself\");\r\n return object;\r\n }\r\n int voteRate;\r\n if (StringUtils.isBlank(voteRating)) {\r\n voteRate = 1;\r\n } else {\r\n try {\r\n voteRate = Integer.parseInt(voteRating);\r\n } catch (Exception e) {\r\n voteRate = 1;\r\n }\r\n }\r\n if (voteRate < 0) {\r\n voteRate = -1;\r\n } else {\r\n voteRate = 1;\r\n }\r\n JsonArray featured = serializer.getFeaturedMentors(login);\r\n boolean isFeatured = false;\r\n if (featured.size() > 0) {\r\n for (int i = 0; i < featured.size(); i++) {\r\n if (featured.get(i).getAsString().equals(target)) {\r\n isFeatured = true;\r\n break;\r\n }\r\n }\r\n }\r\n if (isFeatured) {\r\n if (voteRate == -1) {\r\n serializer.deleteFeaturedMentor(login, target);\r\n utils.addFlash(login, \"user \" + target + \" unfeatured\", \"this \" +\r\n \"user is removed from featured list\",\r\n \"user featured deleted\");\r\n }\r\n } else {\r\n if (voteRate == 1) {\r\n serializer.addFeaturedMentor(login, target);\r\n utils.addFlash(login, \"user \" + target + \" featured\", \"this user \" +\r\n \"is added to featured list\", \"user featured deleted\");\r\n stats.produceUserStatsIncreasing(login, \"users_interesting\", 1);\r\n }\r\n }\r\n JsonObject vote = new JsonObject();\r\n vote.addProperty(\"login\", login);\r\n vote.addProperty(\"vote\", voteRate);\r\n JsonArray votes = serializer.getVotes(target);\r\n if (votes.size() > 0) {\r\n for (int i = 0; i < votes.size(); i++) {\r\n JsonObject oldVote = votes.get(i).getAsJsonObject();\r\n if (oldVote.get(\"login\").getAsString().equals(login)) {\r\n int old = Integer.parseInt(oldVote.get(\"vote\").getAsString());\r\n if (old == voteRate) {\r\n if (voteRate == 1) {\r\n object.addProperty(\"error\", \"you already voted for this user, \" +\r\n \"but you can vote against\");\r\n utils.addFlash(login, \"already voted for \" + target,\r\n object.get(\"error\").getAsString(), \"vote failed\");\r\n } else {\r\n object.addProperty(\"error\", \"you already voted against this \" +\r\n \"user, but you can vote for him\");\r\n utils.addFlash(login, \"already voted against \" + target,\r\n object.get(\"error\").getAsString(), \"vote failed\");\r\n }\r\n return object;\r\n }\r\n }\r\n }\r\n }\r\n serializer.addVote(target, vote);\r\n String type = \"new vote\";\r\n String title = login + \" voted for you\";\r\n String description = \"You have received a thumbs up vote.\";\r\n if (!(voteRate == 1)) {\r\n title = login + \" voted against you\";\r\n description = \"You have received a thumbs down vote. Please contact \" +\r\n \"us if you feel this is an error or want to dispute. \";\r\n }\r\n utils.addFlash(target, title, description, type);\r\n if (voteRate == 1) {\r\n stats.produceUserStatsIncreasing(login, \"votes_for\", 1);\r\n title = \"Your thumbs up vote for \" + target + \" was received.\";\r\n } else {\r\n stats.produceUserStatsIncreasing(login, \"votes_against\", 1);\r\n title = \"Your thumbs down vote for \" + target + \" was received.\";\r\n }\r\n description = \"you always can change your vote\";\r\n utils.addFlash(login, title, description, type);\r\n stats.produceUserStatsIncreasing(login, \"time_action\",\r\n System.currentTimeMillis());\r\n stats.writeUserAction(login, \"vote added\", \"success\",\r\n \"target - \" + target + \", vote - \" + voteRate);\r\n return object;\r\n }",
"void addVote(UserId userId, QuestionId questionId, int vote);",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\n\t\t\t\t\tJSONObject votejson = Json.getJson(MainActivity.website+\"/video/vote?ri=\"+rowItems.get(positionzhang).getVID()+\"&vt=STANDOUT\",MainActivity.httpclient);\n\t\t\t\t\tToast toast;\n\t\t\t\t\tString Votestate = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tVotestate = votejson.getString(\"result\");\n\t\t\t\t\t} catch (JSONException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (Votestate.equals(\"unknown\")){\n\t\t\t\t\t\t toast = Toast.makeText(MainActivity.nowcontext,\n\t\t\t\t\t \"Please Login first\",\n\t\t\t\t\t Toast.LENGTH_SHORT);\n\t\t\t\t\t toast.setGravity(Gravity.BOTTOM|Gravity.CENTER_HORIZONTAL, 0, 0);\n\t\t\t\t\t toast.show();\n\t\t\t\t\t Intent intent = new Intent(MainActivity.nowcontext, Login.class);\n\t\t\t\t\t MainActivity.nowcontext.startActivity(intent);\n\t\t\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t}else{\n\t\t\t\t\ttry {\n\t\t\t\t\t\t\n\t\t\t\t\t\ttoast = Toast.makeText(MainActivity.nowcontext,\n\t\t\t\t\t\t\t\t MainActivity.convertNodeToText(Jsoup.parse(votejson.getString(\"message\"))),\n\t\t\t\t\t\t Toast.LENGTH_SHORT);\n\t\t\t\t\t\ttoast.setGravity(Gravity.BOTTOM|Gravity.CENTER_HORIZONTAL, 0, 0);\n\t\t\t\t toast.show();\n\t\t\t\t \n\t\t\t\t //Login.writeFileSdcardFile(\"/sdcard/as.txt\", rowItems.get(position).getVID());\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t \n\t\t\t Log.i(\"vote\",votejson.toString());\n\t\t\t\t\t\n\t\t\t\t}",
"void castVote(Peer candidate) {\n votedFor = candidate;\n }",
"public VotingSystem() {\n votingList=new ArrayList<>();\n }",
"public void LogIn() {\n\t\t\r\n\t}",
"private static void logedIn(Request req, Response res, CloudService cloud) {\r\n\t\t\tif (cloud.getKorisnici().get(req.cookie(\"userID\")) == null) {\r\n\t\t\t\tString[] params = req.splat();\r\n\t\t\t\tString path;\r\n\t\t\t\tif(params.length == 0)\r\n\t\t\t\t\tpath = \"\";\r\n\t\t\t\telse\r\n\t\t\t\t\tpath = params[0];\r\n\t\t\t\tif(path.equals(\"checkLogin\") || path.equals(\"favicon.ico\"))\r\n\t\t\t\t\treturn;\r\n\t\t\t\tres.redirect(\"/login.html\");\r\n\t\t\t\thalt(302);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif(req.session().attribute(\"user\") == null) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tKorisnik k = cloud.getKorisnici().get(req.cookie(\"userID\"));\r\n\t\t\t\t\treq.session().attribute(\"user\", k); // postavi mu korisnika za sesiju\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}",
"@Pointcut(\"@annotation(com.revature.aspects.LoggedIn)\")\n\tprivate void loggedInHook() {}",
"@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t\tloadprofiletinfo(MainActivity.website+\"/video/search?ss=artist&so=most_voted&sp=\"+uid);\n\t\t\tMessage msglvpro= new Message();\n\t msglvpro.what=1;\n\t handlerlvpro.sendMessage(msglvpro);\n \t \n }",
"@Override\n public void onLoggedInVerified(User user) {\n bakery.toastShort(user.getEmail());\n loadTaskActivity();\n }",
"public abstract boolean isLoggedIn();",
"private void receiveVote() {\n\t\t//Se la postazione termina la connessione informiamo lo staff con un messaggio di errore\n\t\tif(!link.hasNextLine()) {\n\t\t\tcontroller.printError(\"Errore di Comunicazione\", \"La postazione \"+ ip.getHostAddress() + \" non ha inviato i pacchetti di voto.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Vengono recuperati i voti cifrati\n\t\tMessage request;\n\t\tWrittenBallot[] encryptedBallots;\n\t\ttry {\n\t\t\trequest = (Message) Message.fromB64(link.read(), \"postazione \" + ip.getHostAddress());\n\t\t\tString[] required = {\"encryptedBallots\"};\n\t\t\tClass<?>[] types = {WrittenBallot[].class};\n\t\t\t\n\t\t\trequest.verifyMessage(Protocol.sendVoteToStation, required, types, \"postazione \" + ip.getHostAddress());\n\t\t\tencryptedBallots = request.getElement(\"encryptedBallots\");\n\t\t\t\n\t\t\t//I voti vengono memorizzati nel seggio in attesa dell'invio all'urna\n\t\t\tif(((Controller) controller).storeVoteLocally(encryptedBallots, ip))\n\t\t\t\tlink.write(Protocol.votesReceivedAck);\n\t\t\telse\n\t\t\t\tlink.write(Protocol.votesReceivedNack);\n\t\t\t\n\t\t} catch (PEException e) {\n\t\t\tlink.write(Protocol.votesReceivedNack);\n\t\t\tcontroller.printError(e);\n\t\t}\n\t}",
"public VotingSystem(){\n votingList = new ArrayList<Voting>();\n }",
"private void authorize() {\r\n\r\n\t}",
"@Override\r\n\tprotected void verificaUtentePrivilegiato() {\n\r\n\t}",
"boolean hasLoggedIn();",
"@Test\n public void vote() {\n System.out.println(client.makeVotes(client.companyName(0), \"NO\"));\n }",
"public void addKickVote()\n\t{\n\t\tthis.numberOfKickVotes++;\n\t}",
"private void signIn() {\n }",
"void handle(VoteMessage vote);",
"public void sendVoteNotification() {\n\t\t\t\t\tWorld.sendWorldMessage(\"<img=5>[Vote Feed]: colorhere\" + getDisplayName() + \" </col>voted for\" + \n\t\t\t\t\t\t\t\t\t\t\t\"colorhere \"+ voteDisplayAmount +\" Vote Tickets!</col> \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"World votes are now at colorhere\"+ WorldVote.getVotes()+\"</col>.\", false);\t\n\t}",
"public void vote(int rating) {\n\t\tnew WebTraceTask(this, String.valueOf(rating)).execute(WebTraceTask.VOTE);\n\t}",
"private void vote(Connection connection, Matcher matcher) {\n\n final EventBus bus = getEventBus();\n if (!matcher.matches()) {\n bus.publish(new ConnectionMessageCommandEvent(connection, \"Invalid command!\"));\n return;\n }\n\n long pollID = Long.parseLong(matcher.group(1));\n int optionID = Integer.parseInt(matcher.group(2));\n\n try {\n StrawpollAPI.vote(pollID, optionID);\n bus.publish(new ConnectionMessageCommandEvent(connection, System.lineSeparator() + \"You voted successfully\"));\n }\n catch (Exception e) {\n bus.publish(new ConnectionMessageCommandEvent(connection, System.lineSeparator() + \"Whoops, it looks like we did not find a poll with the given id or index\"));\n e.printStackTrace();\n }\n\n }",
"private void botVoting(){\n int stockPos;\n int myStockPos = getMostShares(playerList.lastIndexOf(player));\n Collections.sort(playerList);\n if(playerList.get(0) == player){ //if i am the leader\n stockPos = getMostShares(1); //get the second players info\n }else{\n stockPos = getMostShares(0); //else get the first players info\n }\n\n //if my most shares are the same as other players most shares, don't vote.\n if(game.getStockByIndex(stockPos) != game.getStockByIndex(myStockPos)){\n //offensive play against leader\n if(game.isCardPositive(game.getStockByIndex(stockPos))){\n game.getStockByIndex(stockPos).vote(0);\n player.getVotedStocks().append(game.getStockByIndex(stockPos).getName().charAt(0));\n player.deductVotesLeft();\n System.out.println(\"bot voted NO for \" + game.getStockByIndex(stockPos).getName() );\n }else{\n game.getStockByIndex(stockPos).vote(1);\n player.getVotedStocks().append(game.getStockByIndex(stockPos).getName().charAt(0));\n player.deductVotesLeft();\n System.out.println(\"bot voted YES for \" + game.getStockByIndex(stockPos).getName());\n }\n //defensive play, votes that will benefit me\n if(game.isCardPositive(game.getStockByIndex(myStockPos))){\n game.getStockByIndex(myStockPos).vote(1);\n player.getVotedStocks().append(game.getStockByIndex(myStockPos).getName().charAt(0));\n player.deductVotesLeft();\n System.out.println(\"bot voted YES for \" + game.getStockByIndex(myStockPos).getName());\n }else{\n game.getStockByIndex(myStockPos).vote(0);\n player.getVotedStocks().append(game.getStockByIndex(myStockPos).getName().charAt(0));\n player.deductVotesLeft();\n System.out.println(\"bot voted NO for \" + game.getStockByIndex(myStockPos).getName());\n }\n }\n }",
"@Override\n\tpublic void changeLoggedIn(int id, int logged_in) {\n\t\t\n\t}",
"@Override\n public void onLoggedIn() {\n\n }",
"public void setVotes(int votes) {\n this.votes = votes;\n }",
"protected void login() {\n\t\t\r\n\t}",
"@RequestMapping(value=\"/players/vote\", method=RequestMethod.POST)\n\t@ResponseBody\n\tpublic void placeVote(String id) {\n\t\tSystem.out.println(\"in place vote \");\n\t\tplayerService.placeVoteOn(playerService.getPlayerById(id));\n\t}",
"public void vote(int index,Person voter,ArrayList<String> choices){\n votingList.get(index).vote(voter,choices);\n\n }",
"private synchronized void delegateVoted(Vote voteType) {\n\t\tvotes.put(currentlyVoting, voteType);\n\t\tif (currentlyVoting.getStatus().hasVetoPower && voteType.isVoteAgainst) {\n\t\t\t// A delegate with veto power voted against.\n\t\t\tvetoed = true;\n\t\t}\n\t\tsynchronized (votingThread) {\n\t\t\tvotingThread.notify();\n\t\t}\n\t}",
"public void login() {\n\t\tloggedIn = true;\n\t}",
"@Override\n public void processElection() {\n if (context.getState().equals(LEADER) || !context.getActive()) {\n return;\n }\n\n log.info(\"Peer #{} Start election\", context.getId());\n\n context.setState(CANDIDATE);\n Long term = context.incCurrentTerm();\n context.setVotedFor(context.getId());\n\n List<Integer> peersIds = context.getPeers().stream().map(Peer::getId).collect(Collectors.toList());\n long voteGrantedCount = 1L;\n long voteRevokedCount = 0L;\n\n //while didn't get heartbeat from leader or new election started\n while (checkCurrentElectionStatus(term)) {\n List<AnswerVoteDTO> answers = getVoteFromAllPeers(term, peersIds);\n peersIds = new ArrayList<>();\n for (AnswerVoteDTO answer : answers) {\n if (answer.getStatusCode().equals(OK)) {\n if (answer.getTerm() > context.getCurrentTerm()) {\n //• If RPC request or response contains term T > currentTerm: set currentTerm = T, convert to follower (§5.1)\n context.setTermGreaterThenCurrent(answer.getTerm());\n return;\n }\n if (answer.isVoteGranted()) {\n log.info(\"Peer #{} Vote granted from {}\", context.getId(), answer.getId());\n context.getPeer(answer.getId()).setVoteGranted(true);\n voteGrantedCount++;\n } else\n log.info(\"Peer #{} Vote revoked from {}\", context.getId(), answer.getId());\n voteRevokedCount++;\n } else {\n log.info(\"Peer #{} No vote answer from {}\", context.getId(), answer.getId());\n peersIds.add(answer.getId());\n }\n }\n if (voteGrantedCount >= context.getQuorum()) {\n winElection(term);\n return;\n } else if (voteRevokedCount >= context.getQuorum()) {\n loseElection(term);\n return;\n } //else retry\n delay();\n }\n }",
"@Override\n\tpublic boolean isLoggedIn() {\n\t\treturn false;\n\t}",
"@Override\n public void onThirdVote(String arg0) {\n\n }",
"boolean hasVotedOnPoll(String pollId);",
"private void checkLogIn(boolean loggedIn) {\n if (loggedIn) {\n Log.i(TAG, \"User is logged in\");\n // Launch the Main Feed activity\n Intent intent = new Intent(this, MainFeedActivity.class);\n // Send the request code to add the quote upon returning\n startActivityForResult(intent, LAUNCH_MAIN_VIEW);\n } else {\n Log.i(TAG, \"User is not logged in\");\n // Launch the Log In Activity\n Intent intent = new Intent(this, LogInActivity.class);\n startActivityForResult(intent, LAUNCH_LOG_IN);\n }\n }",
"@RequestMapping(value=\"/players/setVoted\", method=RequestMethod.POST)\n\t@ResponseBody\n\tpublic void setVoted(String id) {\n\t\tPlayer thePlayer = playerService.getPlayerById(id);\n\t\tthePlayer.switchHasVoted();\n\t\tplayerService.setVoted(thePlayer);\n\n\t}",
"public void sendVoteRequests() {\n for(int i = 1; i <= mConfig.getNumServers(); i++) {\n this.remoteRequestVote(i, mConfig.getCurrentTerm(), mID, mLog.getLastIndex(), mLog.getLastTerm());\n }\n //Initiate count vote timer\n voteCountTimer = scheduleTimer((long) 5, 2);\n }",
"public boolean isUserLoggedIn();",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tfor (int i = 0; i < 2 /* rounds */; i++) {\n\t\t\t\t\tfor (Delegate delegate : votes.keySet()) {\n\t\t\t\t\t\tif (votes.get(delegate) != null) {\n\t\t\t\t\t\t\t// Already voted.\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentlyVoting = delegate;\n\t\t\t\t\t\tlblCurrentVoter.setText(delegate.getName());\n\t\t\t\t\t\tlblCurrentVoter.setIcon(delegate.getSmallIcon());\n\n\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\t\tfinal List<Map<Vote, JButton>> maplist = Arrays.asList(\n\t\t\t\t\t\t\t\tbuttons_roundOne, buttons_roundTwo);\n\t\t\t\t\t\tfor (Map<Vote, JButton> map : maplist) {\n\t\t\t\t\t\t\tfor (Vote vote : map.keySet()) {\n\t\t\t\t\t\t\t\tmap.get(vote)\n\t\t\t\t\t\t\t\t\t\t.setText(\n\t\t\t\t\t\t\t\t\t\t\t\tdelegate.getStatus().hasVetoPower ? vote.vetoText\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: vote.normalText);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tsynchronized (votingThread) {\n\t\t\t\t\t\t\t\tvotingThread.wait();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinal Vote cast = votes.get(delegate);\n\t\t\t\t\t\tif (cast == Vote.PASS) {\n\t\t\t\t\t\t\tvotes.put(delegate, null);\n\t\t\t\t\t\t\t// So he goes again.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (JButton button : votingButtons) {\n\t\t\t\t\t\t\tbutton.setEnabled(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlayout.show(pnlVoting, pnlSecondRound.getName());\n\t\t\t\t}\n\t\t\t\t// When done, disable again.\n\t\t\t\tfor (JButton button : votingButtons) {\n\t\t\t\t\tbutton.setEnabled(false);\n\t\t\t\t}\n\t\t\t\tcurrentlyVoting = null;\n\t\t\t\tlblCurrentVoter.setText(null);\n\t\t\t\tlblCurrentVoter.setIcon(null);\n\t\t\t\tpnlVoting.setVisible(false);\n\t\t\t}",
"private boolean validVoter(long sid) {\n return self.getCurrentAndNextConfigVoters().contains(sid);\n }",
"private void shareOnP2A() {\n if (mSession != null) {\n final int userId = mSession.get_session_user_id();\n if (userId > 1 && !P2ASharedSystemPreferences.getToken(P2AContext.getContext()).equals(\"\")) {\n // Has existed the P2A user\n // Get user's account information\n final P2AContext appContext = (P2AContext) getApplicationContext();\n\n final User p2aUser = appContext.getcUser();\n if (p2aUser != null) {\n // Invoke submit score task to P2A server.\n invokeSubmitP2AScoreService(p2aUser);\n }\n\n } else {\n // This is Anonymous now.\n // Allow Anonymous to commit on P2A server? OK -> Request user log in\n // Show Request Login form\n showRequestLoginForm();\n }\n } else {\n }\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tPrintWriter out = response.getWriter();\n\t\ttry {\n\t\t\tConnection con = null;\n\t \t\tString url = \"jdbc:postgresql://localhost:5432/elec_management\"; //PostgreSQL URL and followed by the database name\n\t \t\tString username = \"postgres\"; //PostgreSQL username\n\t \t\tString password = \"123\"; //PostgreSQL password\n\t\t\t\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\t\t\tcon = DriverManager.getConnection(url, username, password); //attempting to connect to PostgreSQL database\n\t \t\t\n\t\t\tHttpSession session = request.getSession();\n\t\t\t\n\t\t\tString club= (String) session.getAttribute(\"voteforclub\");\n\t\t\tString user_id = (String) session.getAttribute(\"user_id\");\n\t\t\tString cand_id = request.getParameter(\"voteto\");\n\t\t\tif(cand_id==null) {\n\t\t\t\tout = response.getWriter();\n\t\t\t\tout.println(\"<meta http-equiv = 'refresh' content='3; URL= showlist.jsp'>\");\n\t\t\t\tout.println(\"<p style = 'color: red;'> you have not selected anything !!!</p>\");\n\t\t\t}\n\t\t\t\n\t\t\tString sql= \"insert into votes values(?,?,?,?)\";\n\t\t\tPreparedStatement st = con.prepareStatement(sql);\n\t\t\tst.setString(1, user_id);\n\t\t\tst.setString(2, club);\n\t\t\tst.setString(3, cand_id);\n\t\t\tst.setString(4, club);\n\t\t\tint i= st.executeUpdate();\n\t\t\tif(i>0) {\n\t\t\t\tString sql1 = \"update candidate set vote_count = vote_count + 1 where s_id = ?\";\n\t\t\t\tPreparedStatement st1 = con.prepareStatement(sql1);\n\t\t\t\tst1.setString(1, cand_id);\n\t\t\t\tint i1 = st1.executeUpdate();\n\t\t\t\tif(i1>0) {\n\t\t\t\t\tout.println(\"<meta http-equiv = 'refresh' content='3; URL= dashboard.jsp'>\");\n\t\t\t\t\tout.println(\"<p><h3 style = 'color: green;'> your response has been saved successfully !!!</h3></p>\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void upVote(Post p) {\n p.upvote();\n }",
"void setHasLoggedIn(Boolean value);",
"public void userLoggedIn(CurrentUser user) \n\t\t{\n\t\t\tLog.i(\"OpenFeint\", \"User logged in\");\t\t\n\t\t\tMainActivity.this.userLoggedIn();\n\t\t}",
"boolean isSignedIn();",
"@RequestMapping(path = \"/upVote\", method = RequestMethod.POST)\n public ResponseEntity upVote(HttpSession session, @RequestBody Yada yada) throws Exception {\n\n String username = (String) session.getAttribute(\"username\");\n User user = users.findFirstByUsername(username);\n\n Yada yadaToUpVote = yadas.findOne(yada.getId());\n\n if (username != null) {\n\n if (yadaUserJoinRepo.findByUserAndYada(user, yada) == null) {\n YadaUserJoin yuj = new YadaUserJoin(user, yada, yada.getId());\n\n if (!yuj.isUpvoted() && !yuj.isDownvoted()) {\n\n yadaToUpVote.setKarma(yuj.getYada().getKarma() + 1);\n yadaToUpVote.setUpvotes(yuj.getYada().getUpvotes() + 1);\n User yadaAuthor = yuj.getYada().getUser();\n yadaAuthor.setKarma(yadaAuthor.getKarma() + 1);\n yuj.setUpvoted(true);\n yuj.setDownvoted(false);\n\n //link calculations\n Link link = links.findOne(yadaToUpVote.getLink().getId());\n link.setTotalVotes(link.getTotalVotes() + 1);\n link.setUpVotes(link.getUpVotes() + 1);\n \n yadas.save(yadaToUpVote);\n yadaUserJoinRepo.save(yuj);\n links.save(link);\n users.save(yadaAuthor);\n\n return new ResponseEntity<>(links.findAllByOrderByLinkScoreDesc(), HttpStatus.OK);\n }\n else {\n return new ResponseEntity<>(HttpStatus.FORBIDDEN);\n }\n }\n else {\n\n YadaUserJoin yuj = yadaUserJoinRepo.findByUserAndYada(user, yada);\n\n if (!yuj.isUpvoted() && yuj.isDownvoted()) {\n\n yadaToUpVote.setKarma(yuj.getYada().getKarma() + 2);\n yadaToUpVote.setUpvotes(yuj.getYada().getUpvotes() + 1);\n yadaToUpVote.setDownvotes(yuj.getYada().getDownvotes() - 1);\n User yadaAuthor = yuj.getYada().getUser();\n yadaAuthor.setKarma(yadaAuthor.getKarma() + 2);\n yuj.setUpvoted(true);\n yuj.setDownvoted(false);\n\n //link calculations\n Link link = links.findOne(yadaToUpVote.getLink().getId());\n link.setUpVotes(link.getUpVotes() + 1);\n link.setDownVotes(link.getDownVotes() - 1);\n\n yadas.save(yadaToUpVote);\n yadaUserJoinRepo.save(yuj);\n links.save(link);\n users.save(yadaAuthor);\n\n return new ResponseEntity<>(links.findAllByOrderByLinkScoreDesc(), HttpStatus.OK);\n }\n else if (!yuj.isUpvoted() && !yuj.isDownvoted()) {\n\n yadaToUpVote.setKarma(yuj.getYada().getKarma() + 1);\n yadaToUpVote.setUpvotes(yuj.getYada().getUpvotes() + 1);\n User yadaAuthor = yuj.getYada().getUser();\n yadaAuthor.setKarma(yadaAuthor.getKarma() + 1);\n yuj.setUpvoted(true);\n yuj.setDownvoted(false);\n\n //link calculations\n Link link = links.findOne(yadaToUpVote.getLink().getId());\n link.setUpVotes(link.getUpVotes() + 1);\n link.setTotalVotes(link.getTotalVotes() + 1);\n\n yadas.save(yadaToUpVote);\n yadaUserJoinRepo.save(yuj);\n links.save(link);\n users.save(yadaAuthor);\n\n return new ResponseEntity<>(links.findAllByOrderByLinkScoreDesc(), HttpStatus.OK);\n }\n else if (yuj.isUpvoted() && !yuj.isDownvoted()) {\n\n yadaToUpVote.setKarma(yuj.getYada().getKarma() - 1);\n yadaToUpVote.setUpvotes(yuj.getYada().getUpvotes() - 1);\n User yadaAuthor = yuj.getYada().getUser();\n yadaAuthor.setKarma(yadaAuthor.getKarma() - 1);\n yuj.setUpvoted(false);\n\n //link calculations\n Link link = links.findOne(yadaToUpVote.getLink().getId());\n link.setUpVotes(link.getUpVotes() - 1);\n link.setTotalVotes(link.getTotalVotes() - 1);\n\n yadas.save(yadaToUpVote);\n yadaUserJoinRepo.save(yuj);\n links.save(link);\n users.save(yadaAuthor);\n\n return new ResponseEntity<>(links.findAllByOrderByLinkScoreDesc(), HttpStatus.OK);\n }\n else {\n return new ResponseEntity<>(HttpStatus.FORBIDDEN);\n }\n }\n }\n else {\n return new ResponseEntity<>(HttpStatus.FORBIDDEN);\n }\n\n }",
"public boolean currentlyUpvoted(String articleId) {\n return ArticleVoteLocalRepository.VoteType.UPVOTE.equals(localRepository.getVote(articleId));\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try\r\n { \r\n HttpSession session=request.getSession(false);\r\n String usertype=(String)session.getAttribute(\"usertype\");\r\n if(usertype.trim().equalsIgnoreCase(\"candidate\"))\r\n {\r\n String name=request.getParameter(\"username\");\r\n System.out.println(\"name of the candidate to login=\"+name);\r\n String id = name.substring(5, name.length());\r\n System.out.println(\"name of the candidate to login after the substring=\"+id);\r\n try {\r\n database db=new database();\r\n Connection con=db.getCon();\r\n PreparedStatement ps1 = con.prepareStatement(\"select * from candidate where ID =?\");\r\n\t\t ps1.setString(1,id);\r\n\t\t ResultSet rs = ps1.executeQuery();\r\n System.out.println(\"ID OF THE CANDIDATE\"+id);\r\n\t\t if(rs.next())\r\n {\r\n candidatename= rs.getString(\"NAME\");\r\n phone= rs.getString(\"PHONE_NO\"); \r\n email= rs.getString(\"EMAIL_ID\");\r\n }\r\n ps1=con.prepareStatement(\"select count(*) from voting\");\r\n System.out.println(\"777777777777\");\r\n rs = ps1.executeQuery();\r\n if(rs.next())\r\n {\r\n totalvote=rs.getInt(1);\r\n }\r\n ps1=con.prepareStatement(\"select count(*) from voting where CANDIDATE_ID =?\");\r\n ps1.setString(1,id);\r\n rs = ps1.executeQuery();\r\n if(rs.next())\r\n {\r\n yourvote=rs.getInt(1);\r\n }\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(\"Exception \"+e);\r\n }\r\n PrintWriter out= response.getWriter();\r\n Candidate can =new Candidate();\r\n String a= can.display(id, candidatename, phone, email, totalvote,yourvote);\r\n out.print(a);\r\n\r\n }else\r\n {\r\n response.sendRedirect(\"Logout\");\r\n }\r\n }catch(Exception e)\r\n {\r\n response.sendRedirect(\"Logout\");\r\n }\r\n }",
"private void checkAccessAndLoggIn() {\n // Make sure we have access\n ConnectionChecker connectionHelper = new ConnectionChecker(this);\n boolean haveAccess = connectionHelper.canConnectInternet();\n if (haveAccess) {\n // Check if user is logged in\n final ParseUser user = ParseUser.getCurrentUser();\n boolean isLoggedIn = (user != null);\n Log.d(TAG, \"User logged in = \" + isLoggedIn);\n checkLogIn(isLoggedIn);\n } else {\n // Alert user we need access to internet\n Toast.makeText(this, \"We are unable to access Good Feed. Please check your connection\", Toast.LENGTH_LONG).show();\n }\n }",
"@Test(expected= VotingException.class)\n public void VotingMadeByAuthorThrowsException() throws Exception {\n\n bob.upVote(bobPost);\n bob.downVote(bobPost);\n alice.upVote(question);\n alice.downVote(question);\n }",
"@Override\n protected boolean isCalledForCurrentUserLocked() {\n return true;\n }",
"public void voteCommit() {\n boolean b = preVote();\n synchronized ( this ) {\n if ( b == true ) \n commitVotes++; \n else {\n rbVotes++;\n votedCommit = false;\n }\n }\n postVote();\n }",
"public void userLoggedIn(CurrentUser user) \n\t\t{\n\t\t\tLog.i(\"OpenFeint\", \"User logged in\");\n\t\t\tMainActivity.this.userLoggedIn();\n\t\t}",
"private void vote(Vote whichVoteButton, MenuItem item, PostData p) {\n if (!RedditLoginInformation.isLoggedIn()) {\n Toast.makeText(this, R.string.you_must_be_logged_in_to_vote, Toast.LENGTH_SHORT).show();\n return;\n }\n\n Intent intent = new Intent(Consts.BROADCAST_UPDATE_SCORE);\n intent.putExtra(Consts.EXTRA_PERMALINK, p.getPermalink());\n\n switch (whichVoteButton) {\n case DOWN:\n switch (p.getVote()) {\n case DOWN:\n RedditService.vote(this, p.getName(), Vote.NEUTRAL);\n item.setIcon(R.drawable.ic_action_downvote);\n p.setVote(Vote.NEUTRAL);\n p.setScore(p.getScore() + 1);\n break;\n\n case NEUTRAL:\n case UP:\n RedditService.vote(this, p.getName(), Vote.DOWN);\n item.setIcon(R.drawable.ic_action_downvote_highlighted);\n p.setVote(Vote.DOWN);\n mUpvoteMenuItem.setIcon(R.drawable.ic_action_upvote);\n p.setScore(p.getScore() - 1);\n break;\n }\n break;\n\n case UP:\n switch (p.getVote()) {\n case NEUTRAL:\n case DOWN:\n RedditService.vote(this, p.getName(), Vote.UP);\n item.setIcon(R.drawable.ic_action_upvote_highlighted);\n p.setVote(Vote.UP);\n p.setScore(p.getScore() + 1);\n mDownvoteMenuItem.setIcon(R.drawable.ic_action_downvote);\n break;\n\n case UP:\n RedditService.vote(this, p.getName(), Vote.NEUTRAL);\n item.setIcon(R.drawable.ic_action_upvote);\n p.setVote(Vote.NEUTRAL);\n p.setScore(p.getScore() - 1);\n break;\n }\n\n break;\n\n default:\n break;\n }\n\n // Broadcast the intent to update the score in the ImageDetailFragment\n intent.putExtra(Consts.EXTRA_SCORE, p.getScore());\n LocalBroadcastManager.getInstance(this).sendBroadcast(intent);\n }",
"@Before(unless = { \"signin\", \"doLogin\" })\n\tprivate static void checkAuthentification() {\n\t\t// get ID from secure social plugin\n\t\tString uid = session.get(PLAYUSER_ID);\n\t\tif (uid == null) {\n\t\t\tsignin(null);\n\t\t}\n\n\t\t// get the user from the store. TODO Can also get it from the cache...\n\t\tUser user = null;\n\t\tif (Cache.get(uid) == null) {\n\t\t\ttry {\n\t\t\t\tuser = UserClient.getUserFromID(uid);\n\t\t\t\tCache.set(uid, user);\n\t\t\t} catch (ApplicationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\t}\n\t\t} else {\n\t\t\tuser = (User) Cache.get(uid);\n\t\t}\n\n\t\tif (user == null) {\n\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\tAuthentifier.logout();\n\t\t}\n\n\t\tif (user.avatarURL == null) {\n\t\t\tuser.avatarURL = Gravatar.get(user.email, 100);\n\t\t}\n\n\t\t// push the user object in the request arguments for later display...\n\t\trenderArgs.put(PLAYUSER, user);\n\t}",
"private void observeIsUserLoggedInLiveData() {\n viewModel.getIsUserLoggedInLiveData()\n .observe(this, loggedInStatus -> isUserLoggedIn = loggedInStatus);\n }",
"public boolean isLiked();",
"@Override\n\tpublic void setLoggedIn(boolean arg0) {\n\t\t\n\t}",
"protected void Star() {\r\n\t\tcheckin();\r\n\t}",
"private void doLogin() {\r\n\t\tloggedIn = true;\r\n\t\tdoctor.setOnline(1);\r\n\t\t// Set doctor as logged in\r\n\t\tdbAdapter.updateDoctor(doctor);\r\n\t\t// Get a list of currently logged in doctors\r\n\t\tdoctors = dbAdapter.getDoctors(this.doctor);\r\n\t\t// Add listeners to keep the list updated\r\n\t\ttry {\r\n\t\t\teb.addListener(new LogoutListener(this.doctor.getMac(),\r\n\t\t\t\t\tthis.location));\r\n\t\t\teb.addListener(new DeviceDetectedListener());\r\n\t\t\teb.addListener(new DevicedMovedListener());\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO: Handle\r\n\t\t}\r\n\t\tnotifyObservers();\r\n\t}",
"public void onPlayerLoggedIn() {\n\t\tshowPlayerButtons();\n\t}",
"public synchronized boolean voteTeam() {\n //tally the votes\n int yes = 0, no = 0;\n for (boolean vote : playerVotes.values()) {\n if (vote) {\n yes++;\n } else {\n no++;\n }\n }\n\n if (yes > no) {\n doMissionState = voteTeamState.acceptTeam();\n state = State.DO_MISSION;\n successiveRejections = 0;\n teamMemberChoices = new HashMap<>();\n return true;\n } else {\n pickTeamState = voteTeamState.rejectTeam();\n state = State.PICK_TEAM;\n successiveRejections++;\n teamSelection = new HashSet<>();\n return false;\n }\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\n\t\t\t\tcheckUser();\n\t\t\t}",
"private void vote(ActionEvent x) {\n\t\tProject p = this.list.getSelectedValue();\n\t\tif (p != null) {\n\t\t\tif (this.controller.vote(p.getName())) {\n\t\t\t\tfield3.addSupported(p);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\n Entity user = LoginServlet.getUser(request);\n\n long authorId = user.getKey().getId();\n\n Filter productFilter = new FilterPredicate(\"productID\", FilterOperator.EQUAL, ideaComments.productID);\n Filter authorFilter = new FilterPredicate(\"authorId\", FilterOperator.EQUAL, authorId);\n\n CompositeFilter filter = CompositeFilterOperator.and(productFilter, authorFilter);\n Query query = new Query(\"Vote\").setFilter(filter);\n List<Entity> results = datastore.prepare(query).asList(FetchOptions.Builder.withDefaults());\n Entity taskEntity = new Entity(\"Vote\");\n if(results.size()>0){\n taskEntity = results.get(0);\n }\n Integer voteValue = Integer.parseInt(request.getParameter(\"voteValue\"));\n double sentimentAnalysisScore = 9.5;\n\n taskEntity.setProperty(\"productID\",ideaComments.productID);\n taskEntity.setProperty(\"authorId\",authorId);\n taskEntity.setProperty(\"voteValue\",voteValue);\n\n datastore.put(taskEntity);\n\n response.sendRedirect(\"/IdeaPage.html\");\n }",
"private void checkSessionState() {\n // get logged in mUser\n mUser = getStoredUser();\n // check if valid\n mIsLoggedIn = (mUser != null && mUser.getId() != null);\n }",
"public void sendPostUpVote(){\n Intent intent = getIntent();\n final int heritageId = intent.getIntExtra(\"heritageId\", -1);\n Retrofit retrofit = ApiClient.getApiClient();\n final SharedPreferences sharedPref = getSharedPreferences(\"TOKENSHARED\", Context.MODE_PRIVATE);\n final String token = sharedPref.getString(\"TOKEN\", null);\n ApiInterface apiInterface = retrofit.create(ApiInterface.class);\n Call<JsonResponseVote> call = apiInterface.vote(new VoteBody(true, heritageId),\"Token \" + token);\n call.enqueue(new Callback<JsonResponseVote>() {\n @Override\n public void onResponse(Call<JsonResponseVote> call, Response<JsonResponseVote> response) {\n\n if (response.isSuccessful()) {\n Toast.makeText(getApplicationContext(), \"SUCCESSFUL UPVOTE\", Toast.LENGTH_SHORT).show();\n voteCount.setText(Integer.toString(response.body().getUpvote_count()-response.body().getDownvote_count()));\n deleteVote.setEnabled(true);\n upVote.setEnabled(false);\n downVote.setEnabled(true);\n\n } else {\n Toast.makeText(getApplicationContext(), \"Sorry for inconvince server is down\" + response.code(), Toast.LENGTH_SHORT).show();\n Log.d(\"response\", response.raw().body().toString());\n }\n\n }\n\n @Override\n public void onFailure(Call<JsonResponseVote> call, Throwable t) {\n Toast.makeText(getApplicationContext(), \"ERROR while posting\", Toast.LENGTH_SHORT).show();\n }\n });\n\n }",
"public void addVote(String vote){\r\n\t\tif(allVotes.get(vote) == null){\r\n\t\t\tallVotes.put(vote, 1);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tallVotes.put(vote, allVotes.get(vote) + 1);\r\n\t\t}\r\n\t\tsetChanged();\r\n\t\tnotifyObservers(\"vote\");\r\n\t}",
"public synchronized void reportVotes() {\n StringBuilder voteReport = new StringBuilder(\"\");\n for (Player player : playerVotes.keySet()) {\n voteReport.append(player.getUserName()).append(\": \").append(\n playerVotes.get(player) ? \"yes\\n\" : \"no\\n\");\n }\n sendPublicMessage(\"The votes were:\\n\" + voteReport.toString());\n }",
"public void updateCurrentTrempitUser() {\n\n // create the trempituser object\n TrempitUser currentUser = new TrempitUser();\n currentUser.setFullName(Profile.getCurrentProfile().getName());\n currentUser.setId(Long.valueOf(Profile.getCurrentProfile().getId()));\n\n // update the global variable so all activities can access the user\n globalState.setCurrentUser(currentUser);\n\n // insert the user to the server\n insertTrempitUserToServer(currentUser);\n\n Toast.makeText(this, \"logged in to facebook:\" + globalState.getCurrentUser().getFullName(), Toast.LENGTH_LONG).show();\n }",
"public void signInExistingUser(View v) {\n attemptLogin();\n\n }",
"@GetMapping(\"/up-question-votes/{id}\")\n @Timed\n public ResponseEntity<UpQuestionVote> getUpQuestionVote(@PathVariable Long id) {\n log.debug(\"REST request to get UpQuestionVote : {}\", id);\n UpQuestionVote upQuestionVote = upQuestionVoteService.findOne(id);\n return Optional.ofNullable(upQuestionVote)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }",
"public Float getVote() {\n return vote;\n }",
"private boolean preVote() {\n try {\n if (timeout > 0 ) {\n bar.attemptBarrier(timeout);\n } else {\n bar.barrier();\n }\n } catch ( Exception e ) {\n _logger.log(Level.FINE, \"synchronization.prevote.failed\", e);\n return false;\n }\n return true;\n }",
"@RequestMapping(path = \"/upVoteExt\", method = RequestMethod.POST)\n public ResponseEntity upVoteExt(HttpSession session, @RequestBody Yada yada) throws Exception {\n\n String username = (String) session.getAttribute(\"username\");\n User user = users.findFirstByUsername(username);\n\n Yada yadaToUpVote = yadas.findOne(yada.getId());\n\n if (username != null) {\n\n if (yadaUserJoinRepo.findByUserAndYada(user, yada) == null) {\n YadaUserJoin yuj = new YadaUserJoin(user, yada, yada.getId());\n\n if (!yuj.isUpvoted() && !yuj.isDownvoted()) {\n\n yadaToUpVote.setKarma(yuj.getYada().getKarma() + 1);\n yadaToUpVote.setUpvotes(yuj.getYada().getUpvotes() + 1);\n User yadaAuthor = yuj.getYada().getUser();\n yadaAuthor.setKarma(yadaAuthor.getKarma() + 1);\n yuj.setUpvoted(true);\n yuj.setDownvoted(false);\n\n //link calculations\n Link link = links.findOne(yadaToUpVote.getLink().getId());\n link.setTotalVotes(link.getTotalVotes() + 1);\n link.setUpVotes(link.getUpVotes() + 1);\n\n\n yadas.save(yadaToUpVote);\n yadaUserJoinRepo.save(yuj);\n links.save(link);\n users.save(yadaAuthor);\n return new ResponseEntity<>(link, HttpStatus.OK);\n }\n else {\n return new ResponseEntity<>(HttpStatus.FORBIDDEN);\n }\n }\n else {\n\n YadaUserJoin yuj = yadaUserJoinRepo.findByUserAndYada(user, yada);\n\n if (!yuj.isUpvoted() && yuj.isDownvoted()) {\n\n yadaToUpVote.setKarma(yuj.getYada().getKarma() + 2);\n yadaToUpVote.setUpvotes(yuj.getYada().getUpvotes() + 1);\n yadaToUpVote.setDownvotes(yuj.getYada().getDownvotes() - 1);\n User yadaAuthor = yuj.getYada().getUser();\n yadaAuthor.setKarma(yadaAuthor.getKarma() + 2);\n yuj.setUpvoted(true);\n yuj.setDownvoted(false);\n\n //link calculations\n Link link = links.findOne(yadaToUpVote.getLink().getId());\n link.setUpVotes(link.getUpVotes() + 1);\n link.setDownVotes(link.getDownVotes() - 1);\n\n\n yadas.save(yadaToUpVote);\n yadaUserJoinRepo.save(yuj);\n links.save(link);\n users.save(yadaAuthor);\n return new ResponseEntity<>(link, HttpStatus.OK);\n }\n else if (!yuj.isUpvoted() && !yuj.isDownvoted()) {\n\n yadaToUpVote.setKarma(yuj.getYada().getKarma() + 1);\n yadaToUpVote.setUpvotes(yuj.getYada().getUpvotes() + 1);\n User yadaAuthor = yuj.getYada().getUser();\n yadaAuthor.setKarma(yadaAuthor.getKarma() + 1);\n yuj.setUpvoted(true);\n yuj.setDownvoted(false);\n\n //link calculations\n Link link = links.findOne(yadaToUpVote.getLink().getId());\n link.setUpVotes(link.getUpVotes() + 1);\n link.setTotalVotes(link.getTotalVotes() + 1);\n\n\n\n yadas.save(yadaToUpVote);\n yadaUserJoinRepo.save(yuj);\n links.save(link);\n users.save(yadaAuthor);\n\n return new ResponseEntity<>(link, HttpStatus.OK);\n }\n else if (yuj.isUpvoted() && !yuj.isDownvoted()) {\n\n yadaToUpVote.setKarma(yuj.getYada().getKarma() - 1);\n yadaToUpVote.setUpvotes(yuj.getYada().getUpvotes() - 1);\n User yadaAuthor = yuj.getYada().getUser();\n yadaAuthor.setKarma(yadaAuthor.getKarma() - 1);\n yuj.setUpvoted(false);\n\n //link calculations\n Link link = links.findOne(yadaToUpVote.getLink().getId());\n link.setUpVotes(link.getUpVotes() - 1);\n link.setTotalVotes(link.getTotalVotes() - 1);\n\n\n yadas.save(yadaToUpVote);\n yadaUserJoinRepo.save(yuj);\n links.save(link);\n users.save(yadaAuthor);\n\n return new ResponseEntity<>(link, HttpStatus.OK);\n }\n else {\n return new ResponseEntity<>(HttpStatus.FORBIDDEN);\n }\n }\n }\n else {\n return new ResponseEntity<>(HttpStatus.FORBIDDEN);\n }\n\n }",
"private void checkIfLoggedIn() {\n LocalStorage localStorage = new LocalStorage(getApplicationContext());\n\n if(localStorage.checkIfAuthorityPresent()){\n Intent intent = new Intent(getApplicationContext(),AuthorityPrimaryActivity.class);\n startActivity(intent);\n } else if(localStorage.checkIfUserPresent()){\n Intent intent = new Intent(getApplicationContext(), UserPrimaryActivity.class);\n startActivity(intent);\n }\n }",
"private void masuk(){\n Preferences.setLoggedInUser(getBaseContext(),Preferences.getRegisteredUser(getBaseContext()));\n Preferences.setLoggedInStatus(getBaseContext(), true);\n startActivity(new Intent(getBaseContext(),MainActivity.class));\n finish();\n }",
"void passivate();",
"@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\tif (Constants.userID == 0) { // If no one is signed in\n\t\t\t\t\tdispose();\n\t\t\t\t\tgame.setScreen(new UserInfoScreen(game));\n\t\t\t\t} else { // If a user is currently signed in\n\t\t\t\t\tConstants.userID = 0;\n\t\t\t\t\tConstants.user = \"Temporary User\";\n\t\t\t\t\tcreate();\n\t\t\t\t}\n\t\t\t}",
"public void printVottingQuestion(){\n for (Voting voting : votingList){\n System.out.println(\"question : \"+voting.getQuestion());\n }\n\n }"
]
| [
"0.69467866",
"0.642985",
"0.641622",
"0.62646985",
"0.61441207",
"0.61340034",
"0.61124635",
"0.5989791",
"0.58878416",
"0.58773994",
"0.5874826",
"0.5857361",
"0.58415294",
"0.5759949",
"0.5735374",
"0.57264066",
"0.5714496",
"0.5712484",
"0.5709636",
"0.5673171",
"0.56354976",
"0.56176746",
"0.5605654",
"0.55959433",
"0.5590779",
"0.5577843",
"0.5576785",
"0.5556325",
"0.55496204",
"0.5537146",
"0.55356467",
"0.552471",
"0.55237526",
"0.55211484",
"0.55102795",
"0.5503796",
"0.54973316",
"0.54868484",
"0.54768026",
"0.5471284",
"0.5470269",
"0.54663724",
"0.5460946",
"0.54568607",
"0.5446012",
"0.54413676",
"0.5438704",
"0.54344547",
"0.54228497",
"0.5411733",
"0.5408841",
"0.54084474",
"0.5407346",
"0.54024744",
"0.54019004",
"0.53939056",
"0.53784466",
"0.5376351",
"0.5373944",
"0.5373609",
"0.5371543",
"0.5370845",
"0.5370248",
"0.53678095",
"0.53636205",
"0.5359536",
"0.53545004",
"0.53544354",
"0.5341866",
"0.53375757",
"0.53326404",
"0.5329264",
"0.53245294",
"0.5317787",
"0.5317449",
"0.53172386",
"0.53167105",
"0.5313972",
"0.5304183",
"0.5285117",
"0.5281833",
"0.5271049",
"0.52698374",
"0.5267452",
"0.52635884",
"0.5262254",
"0.52620023",
"0.52584445",
"0.5253328",
"0.5249094",
"0.5245956",
"0.5239746",
"0.52381444",
"0.52332735",
"0.52309185",
"0.52307516",
"0.52305293",
"0.52293086",
"0.52280676",
"0.5227205"
]
| 0.5705926 | 19 |
need to set the hidden send variable to true sendHidden.setValue("true"); uploadMediaFiles(); formPanel.submit(); | public void onClick(ClickEvent event) {
getItemHolder().setSend(true);
saveHandler.onClick(event);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void showUpload(){\n\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n int geekid = Integer.parseInt(request.getParameter(\"geekid\"));\n if (ServletFileUpload.isMultipartContent(request)) {\n try {\n\n List<FileItem> multiparts = new ServletFileUpload(new DiskFileItemFactory()).parseRequest(request);\n\n for (FileItem item : multiparts) {\n\n if (!item.isFormField()) {\n item.write(new File(UPLOAD_DIRECTORY + File.separator + \"image\" + geekid + \".jpg\"));\n\n }\n \n String fileName = UPLOAD_DIRECTORY + File.separator + \"image\" + geekid + \".jpg\";\n\n }\n\n //File uploaded successfully\n request.setAttribute(\"message\", \"File Uploaded Successfully\");\n\n } catch (Exception ex) {\n\n request.setAttribute(\"message\", \"File Upload Failed due to \" + ex);\n\n }\n\n } else {\n\n request.setAttribute(\"message\",\n \"Sorry this Servlet only handles file upload request\");\n\n }\n\n request.getRequestDispatcher(\"/result.jsp\").forward(request, response);\n\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n // detecta si es una carga multimedia\n if (!ServletFileUpload.isMultipartContent(request)) {\n // detente si no\n PrintWriter writer = response.getWriter();\n writer.println (\"Error: el formulario debe contener enctype = multipart / form-data\");\n writer.flush();\n return;\n }\n\n // Configurar parámetros de carga\n DiskFileItemFactory factory = new DiskFileItemFactory();\n // Establecer los archivos temporales de umbral de memoria se generarán y almacenarán en el directorio temporal\n factory.setSizeThreshold(MEMORY_THRESHOLD);\n // Establecer el directorio de almacenamiento temporal\n factory.setRepository(new File(System.getProperty(\"java.io.tmpdir\")));\n\n ServletFileUpload upload = new ServletFileUpload(factory);\n\n // Establecer el valor máximo de carga de archivos\n upload.setFileSizeMax(MAX_FILE_SIZE);\n\n // Establecer el valor máximo de solicitud (incluidos los datos de archivo y formulario)\n upload.setSizeMax(MAX_REQUEST_SIZE);\n\n // procesamiento chino\n upload.setHeaderEncoding(\"UTF-8\");\n\n // Construye una ruta temporal para almacenar archivos cargados\n // Esta ruta es relativa al directorio actual de la aplicación\n String uploadPath = request.getServletContext().getRealPath(\"./\") + File.separator + UPLOAD_DIRECTORY;\n\n // Crear si el directorio no existe\n File uploadDir = new File(uploadPath);\n if (!uploadDir.exists()) {\n uploadDir.mkdir();\n }\n\n try {\n // Analiza el contenido solicitado para extraer los datos del archivo\n @SuppressWarnings(\"unchecked\")\n List<FileItem> formItems = upload.parseRequest(request);\n\n if (formItems != null && formItems.size() > 0) {\n // iterar sobre los datos del formulario\n for (FileItem item : formItems) {\n // manejar campos que no están en el formulario\n if (!item.isFormField()) {\n String fileName = new File(item.getName()).getName();\n String filePath = uploadPath + File.separator + fileName;\n File storeFile = new File(filePath);\n // Salida de la ruta de carga del archivo en la consola\n System.out.println(filePath);\n // guardar archivo en el disco duro\n item.write(storeFile);\n request.setAttribute (\"mensaje\", \"¡Archivo cargado correctamente!\");\n hilo = new HiloCargadeDatos(storeFile);\n hilo.start();\n }\n }\n }\n } catch (Exception ex) {\n request.setAttribute (\"mensaje\", \"Mensaje de error:\" + ex.getMessage ());\n }\n\n // Nos redirigimos a la página para que nos muestre los errores\n request.getServletContext().getRequestDispatcher(\"/subir.jsp\").forward(request, response);\n }",
"@FXML\n\tprivate void submitForm()\n\t{\n \tSystem.out.println(\"submitted\");\n \tsubmit.setDisable(true);\n \tif ( file_path.getText().isEmpty() )\n \t{\n \t\tfinal DirectoryChooser fileChooser = new DirectoryChooser(); \n \t\tStage stage = new Stage();\n \t\tstage.setTitle(\"Choose Directory\");\n \t\t\n \t\tFile folder = fileChooser.showDialog(stage);\n \t\toutput.openFile(folder.toString() + \"\\\\OverwatchGames.csv\");\n \t\tfile_path.setText(folder.toString() + \"\\\\OverwatchGames.csv\");\n \t}\n \telse\n \t{\n \t\tSystem.out.println(\"File Path: \" + file_path.getText());\n \t}\n \toutput.outputResults( mainApp.getPlayers(),\n \t\t\tmainApp.getHeros(), \n \t\t\tmainApp.getMap(), \n \t\t\tmainApp.getTimerList());\n \tsubmit.setDisable(false);\n\t}",
"public void submit() {\n fileUploadContainer.upload.submit();\n }",
"void sendFile() {\r\n\t\t// 특정 클라이언트에게 파일을 보냄\r\n\t}",
"public void onSubmitComplete(FormPanel.SubmitCompleteEvent event) {\n GWT.log(event.getResults());\n mywebapp.log(\"saveMediaFile complete non-markdata style\");\n if (event.getResults().equals(\"SUCCESS\")) {\n doSave();\n } else {\n postDialog.hide();\n mywebapp.getMessagePanel().displayError(event.getResults());\n }\n }",
"private void fileUpload(HttpServletRequest request, HttpServletResponse response) {\n\t \ttry {\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * String appPath = request.getServletContext().getRealPath(\"\");\r\n\t\t\t\t\t * System.out.println(appPath); String savePath = appPath + File.separator +\r\n\t\t\t\t\t * SAVE_DIR; System.out.println(savePath);\r\n\t\t\t\t\t */\r\n\t \t\t\r\n\t \t\t//String appPath = getServletContext().getRealPath(SAVE_DIR);\r\n\t \t\tSystem.out.println(appPath);\r\n\t \t\t String savePath = appPath + \"//\" +SAVE_DIR; \r\n\t \t\t System.out.println(savePath);\r\n\t\t\t\t\t\tCollection<Part>cp= request.getParts();\r\n\t \t String fileName = up.fileUpload(cp,appPath);\r\n\t \t System.out.println(fileName);\r\n\t \t \r\n\t \t request.setAttribute(\"message\", \"The file \"+fileName+\" has been uploaded successfully!\");\r\n\t \t RequestDispatcher dispatcher = request.getRequestDispatcher(\"success.jsp\");\r\n\t \t dispatcher.forward(request, response);\r\n\t}catch(Exception ex) {\r\n System.out.println(ex);\r\n }\r\n\t }",
"public synchronized void upload(){\n\t}",
"public void doPost(HttpServletRequest request,\n HttpServletResponse response)\n throws ServletException, java.io.IOException {\n isMultipart = ServletFileUpload.isMultipartContent(request);\n response.setContentType(\"text/html\");\n java.io.PrintWriter out = response.getWriter();\n if (!isMultipart) {\n out.println(\"<html>\");\n out.println(\"<head>\");\n out.println(\"<title>Servlet upload</title>\");\n out.println(\"</head>\");\n out.println(\"<body>\");\n out.println(\"<p>No file uploaded</p>\");\n out.println(\"</body>\");\n out.println(\"</html>\");\n return;\n }\n DiskFileItemFactory factory = new DiskFileItemFactory();\n // maximum size that will be stored in memory\n //factory.setSizeThreshold(maxMemSize);\n // Location to save data that is larger than maxMemSize.\n //factory.setRepository(new File(\"c:\\\\temp\"));\n\n // Create a new file upload handler\n ServletFileUpload upload = new ServletFileUpload(factory);\n // maximum file size to be uploaded.\n //upload.setSizeMax(maxFileSize);\n try {\n // Parse the request to get file items.\n List fileItems = upload.parseRequest(request);\n // Process the uploaded file items\n Iterator i = fileItems.iterator();\n out.println(\"<html>\");\n out.println(\"<head>\");\n out.println(\"<title>Servlet upload</title>\");\n out.println(\"</head>\");\n out.println(\"<body>\");\n HttpSession session = request.getSession(true);\n String feedType = null;\n String redirectTo = null;\n String companyKey = session.getAttribute(\"companyKey\").toString();\n String userKey = session.getAttribute(\"userKey\").toString();\n String departmentKey = null;\n String isFeedCompanyWide = null;\n String feedTitle = null;\n String feedDescription = null;\n String fileName = null;\n FileItem forFile = null;\n while (i.hasNext()) {\n FileItem fi = (FileItem) i.next();\n if (fi.isFormField()) {\n if (fi.getFieldName().equals(\"feedType\")) {\n feedType = fi.getString();\n } else if (fi.getFieldName().equals(\"departmentKey\")) {\n departmentKey = fi.getString();\n } else if (fi.getFieldName().equals(\"isFeedCompanyWide\")) {\n isFeedCompanyWide = fi.getString();\n } else if (fi.getFieldName().equals(\"feedTitle\")) {\n feedTitle = fi.getString();\n } else if (fi.getFieldName().equals(\"feedDescription\")) {\n feedDescription = fi.getString();\n } else if (fi.getFieldName().equals(\"redirectTo\")) {\n redirectTo = fi.getString();\n }\n } else if (!fi.isFormField()) {\n forFile = fi;\n }\n }\n SmProperties.folderPath = request.getRealPath(\"\")+ File.separator + \"cropData\" + File.separator;\n if (redirectTo.equals(\"newsroom\")) {\n if (forFile != null) {\n if (forFile.getName() != null && forFile.getName() != \"\") {\n String milliSecond = System.currentTimeMillis() + \"\";\n fileName = \"company-\" + session.getAttribute(\"companyKey\") + \"/user feed/\" +\n \"feed-\" + milliSecond + \".png\";\n\n filePath = SmProperties.folderPath + \"company-\" + session.getAttribute(\"companyKey\") + File.separator +\"user feed\"+ File.separator +\n \"feed-\" + milliSecond + \".png\";\n\n file = new File(filePath);\n\n forFile.write(file);\n }\n }\n int result = FeedMaster.insert(feedType, companyKey, userKey, departmentKey,\n isFeedCompanyWide, feedTitle, feedDescription, fileName);\n response.sendRedirect(\"home.jsp\");\n } else if (redirectTo.equals(\"myFeed\")) {\n if (forFile != null) {\n if (forFile.getName() != null && forFile.getName() != \"\") {\n String milliSecond = System.currentTimeMillis() + \"\";\n fileName = \"company-\" + session.getAttribute(\"companyKey\") + \"/user feed/\"+ \n \"feed-\" + milliSecond + \".png\";\n\n filePath = SmProperties.folderPath + \"company-\" + session.getAttribute(\"companyKey\") +File.separator+ \"user feed\"+File.separator\n + \"feed-\" + milliSecond + \".png\";\n\n file = new File(filePath);\n forFile.write(file);\n }\n }\n int result = FeedMaster.insert(feedType, companyKey, userKey, departmentKey,\n isFeedCompanyWide, feedTitle, feedDescription, fileName);\n response.sendRedirect(\"homeMyFeeds.jsp\");\n } else if (redirectTo.equals(\"internalFeed\")) {\n if (forFile != null) {\n if (forFile.getName() != null && forFile.getName() != \"\") {\n String milliSecond = System.currentTimeMillis() + \"\";\n fileName = \"company-\" + session.getAttribute(\"companyKey\") +\"/department feed/\"\n + \"feed-\" + milliSecond + \".png\";\n\n filePath = SmProperties.folderPath + \"company-\" + session.getAttribute(\"companyKey\") +File.separator+ \"user feed\"+File.separator\n + \"feed-\" + milliSecond + \".png\";\n\n file = new File(filePath);\n forFile.write(file);\n }\n }\n int result = FeedMaster.insert(feedType, companyKey, userKey, departmentKey,\n isFeedCompanyWide, feedTitle, feedDescription, fileName);\n response.sendRedirect(\"corporate.jsp\");\n } else if (redirectTo.equals(\"announcement\")) {\n if (forFile != null) {\n if (forFile.getName() != null && forFile.getName() != \"\") {\n String milliSecond = System.currentTimeMillis() + \"\";\n fileName = \"company-\" + session.getAttribute(\"companyKey\") +\"/department feed/\"\n + \"feed-\" + milliSecond + \".png\";\n\n filePath = SmProperties.folderPath + \"company-\" + session.getAttribute(\"companyKey\") +File.separator+ \"user feed\"+File.separator\n + \"feed-\" + milliSecond + \".png\";\n\n file = new File(filePath);\n forFile.write(file);\n }\n }\n int result = FeedMaster.insert(feedType, companyKey, userKey, departmentKey,\n isFeedCompanyWide, feedTitle, feedDescription, fileName);\n MemoryTest.test(\"footer start\");\n System.gc();\n MemoryTest.test(\"footer end\");\n response.sendRedirect(\"corporateDepartmentPage.jsp?open=announcement&key=\" + departmentKey);\n }\n } catch (Exception ex) {\n ErrorMaster.insert(\"Exception at CreateFeed : \" + ex.getMessage());\n }\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String codeLabWorker1 = \"\";\n if (!ServletFileUpload.isMultipartContent(request)) {\n\t\t PrintWriter writer = response.getWriter();\n\t\t writer.println(\"Error: enctype=multipart/form-data\");\n\t\t writer.flush();\n\t\t return;\n\t\t}\n\n DiskFileItemFactory factory = new DiskFileItemFactory();\n factory.setSizeThreshold(MEMORY_THRESHOLD);\n factory.setRepository(new File(System.getProperty(\"java.io.tmpdir\")));\n \n ServletFileUpload upload = new ServletFileUpload(factory); \n upload.setFileSizeMax(MAX_FILE_SIZE);\n upload.setSizeMax(MAX_REQUEST_SIZE);\n String uploadPath = getServletContext().getRealPath(\"./\") + File.separator + UPLOAD_DIRECTORY;\n \n File uploadDir = new File(uploadPath);\n if (!uploadDir.exists()) {\n uploadDir.mkdir();\n }\n try {\n @SuppressWarnings(\"unchecked\")\n List<FileItem> formItems = upload.parseRequest(request);\n if (formItems != null && formItems.size() > 0) {\n File storeFile = null;\n String codeResult = \"\";\n String codeLabWorker = \"\"; \n String dateToday = getDateToday();\n String time = getTime();\n for (FileItem item : formItems) { \n if (!item.isFormField()) {\n String fileName = new File(item.getName()).getName();\n String filePath = uploadPath + File.separator + fileName;\n storeFile = new File(filePath);\n System.out.println(filePath);\n item.write(storeFile); \n }else{\n String fieldName = item.getFieldName();\n String fieldValue = item.getString();\n if (fieldName.equals(\"codeLabWorker\")) {\n codeLabWorker = fieldValue;\n codeLabWorker1=codeLabWorker;\n }else if (fieldName.equals(\"codeResult\")) {\n codeResult = fieldValue;\n }\n } \n }\n //Enviar a guardar\n LabWorkerDB labDB = new LabWorkerDB();\n labDB.updateResult(codeLabWorker, storeFile, dateToday, time, codeResult);\n JOptionPane.showMessageDialog(null,\"Se guardo con exito\");\n }\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null,ex);\n } \n request.setAttribute(\"username\", codeLabWorker1);\n \n request.getRequestDispatcher(\"/labWorkerGUI/principallabWorker.jsp\").forward(request, response);\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\n\t throws ServletException, IOException {\n\t\t \n\t boolean isMultipart = ServletFileUpload.isMultipartContent(request);\n\t \n\t if (isMultipart) {\n\t \t// Create a factory for disk-based file items\n\t \tFileItemFactory factory = new DiskFileItemFactory();\n \n\t \t// Create a new file upload handler\n\t \tServletFileUpload upload = new ServletFileUpload(factory);\n\t \tString uploadpath=\"c:/nice/uploads\";\n\t \tFile path = new File(uploadpath);\n\t \t String fileName = \"\";\n\t try {\n\t \t// Parse the request\n\t \t/* FileItem */\n\t \tList items = upload.parseRequest(request);\n\t Iterator iterator = items.iterator();\n\t while (iterator.hasNext()) {\n\t FileItem item = (FileItem) iterator.next();\n\t if (!item.isFormField()) {\n\t fileName = item.getName();\t \n\t // String root = getServletContext().getRealPath(\"/\");\n\t // File path = new File(root + \"/uploads\");\n\t //File path = new File(\"c:/uploads\");\n\t if (!path.exists()) {\n\t \t\n\t boolean status = path.mkdirs();\n\t System.out.println(\"Status \" +status);\n\t \n\t }\n\t \n\t File uploadedFile = new File(path + \"/\" + fileName);\n\t \n\t System.out.println(uploadedFile.getAbsolutePath());\n\t item.write(uploadedFile);\n\t \n\t \n\t \n\t \n\t }\n\t }\n\t \n\t \n\t \n\t \n\t } catch (FileUploadException e) {\n\t e.printStackTrace();\n\t } catch (Exception e) {\n\t e.printStackTrace();\n\t }\n\t \n\t }\n\t \n\t \n\t String message=\"Image uploaded Sucessfully\";\n\t RequestDispatcher rd = getServletContext().getRequestDispatcher(\"/fileupload.jsp?message=\" +message);\n\t rd.forward(request, response);\n\t }",
"public void doPost(HttpServletRequest request,\n HttpServletResponse response) throws ServletException, IOException\n\t{\n\tresponse.setContentType(\"text/html\");\n\tMap params = request.getParameterMap();\n\tfor(Object key :params.entrySet())\n\t{\n\tSystem.out.println(\"key:::\"+key);\n\t}\n\tSystem.out.println(\"uploads:::::::::::::::\"+request.getParameter(\"__UPLOADS\"));\n\t/*List<FileUpload> uploads = (List<FileUpload>) request.getParameter(\"__UPLOADS\");\n\tSystem.out.println(uploads.size());*/\n\t// Actual logic goes here.\n\tPrintWriter out = response.getWriter();\n\tSystem.out.println(\"<h1>\" + message + \"</h1>\");\n\tout.println(\"<h1>\" + message + \"</h1>\");\n\t}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n uploadFile(request, response);\n\n }",
"public void uploadFile() {\n \n InputStream input = null;\n try {\n input = file.getInputStream();\n System.out.println(\"chay qua inpustream\");\n String itemName = file.getSubmittedFileName();\n String filename = itemName.substring(\n itemName.lastIndexOf(\"\\\\\") + 1);\n String dirPath = FacesContext.getCurrentInstance().getExternalContext().getRealPath(\"/upload/images\");\n fileNamed = \"/upload/images/\"+filename;\n File f = new File(dirPath + \"\\\\\" + filename);\n if (!f.exists()) {\n f.createNewFile();\n }\n FileOutputStream output = new FileOutputStream(f);\n byte[] buffer = new byte[1024];\n int length;\n while ((length = input.read(buffer)) > 0) {\n output.write(buffer, 0, length);\n }\n // resize(dirPath + \"\\\\\" + filename, dirPath + \"\\\\\" + filename, 200, 200);\n input.close();\n output.close();\n } catch (IOException ex) {\n System.out.println(\"loi io\");\n Logger.getLogger(ArtistsManagedBean.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }",
"private void userUpload(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {\n\tString s=getServletContext().getRealPath(\"\");\r\n\tSystem.out.println(\"realpath:\"+s);\r\n\tString loginid=request.getParameter(\"usern\");\r\n\t\t System.out.println(\"from servlet:\"+loginid);\r\n\t\t Part filePart = request.getPart(\"file\");\r\n\t\t \r\n\t\t UserFunctions uf=new UserFunctionsImpl();\r\n\t\t \r\n\t\tif( uf.uploadFile(loginid,filePart,appPath,SAVE_DIR))\r\n\t\t{\r\n\t\t\tArrayList<String>al=uf.listAllFiles(loginid);\r\n\t\t\tSystem.out.println(al);\r\n\t\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(\"successupload.jsp\"); \r\n\t\t\trequest.setAttribute(\"list\", al); \r\n\t dispatcher.forward(request, response);\r\n\t\t}\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t}",
"private void intUloadPanel(){\n \n m_UploadPanel = new JPanel();\n m_UploadPanel.setLayout(new FlowLayout());\n m_uploadLabel = new JLabel(\"Upload File\");\n m_upload = new JButton(\"Upload\");\n m_upload.addActionListener(new ActionListener(){\n public void actionPerformed(ActionEvent e){\n System.err.println(file.getAbsoluteFile());\n if (!file.exists()) {\n try {\n file.createNewFile();\n \n SaveDialog s = new SaveDialog(m_db,m_TP);\n if(s.SaveFile(file)){\n\n if(CLOUD.upload(m_sid, file)!=null){\n JOptionPane.showMessageDialog(null,\n \"Uplaod Succsesful\",\n \"Upload Status\",\n JOptionPane.INFORMATION_MESSAGE);\n }else{\n JOptionPane.showMessageDialog(null,\n \"Failed to upload the file\",\n \"Uplpad Failed\",\n JOptionPane.ERROR_MESSAGE);\n }\n }else{\n JOptionPane.showMessageDialog(null,\n \"error making file\",\n \"Uplpad Failed\",\n JOptionPane.ERROR_MESSAGE);\n }\n } catch (IOException ex) {\n Logger.getLogger(\n SaveDialog.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }\n });\n m_UploadPanel.add(m_uploadLabel);\n\n m_UploadPanel.add(m_upload);\n \n m_UploadPanel.validate();\n m_UploadPanel.setOpaque(true);\n this.getContentPane().add(m_UploadPanel);\n }",
"default void uploadVideo() {\r\n\t\tSystem.out.println(\"upload the video\");\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tprotected void storeInSessionFlashOrHTML5(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\tServletFileUpload upload = new ServletFileUpload(factory);\n\t\t\n\t\ttry {\n\t\t\tif(ServletFileUpload.isMultipartContent(request)){\n\t\t\t\tList<FileItem> fileItemList = upload.parseRequest(request);\n\t\t\t\tList<Map<String,Object>> jsonResponse = new ArrayList<Map<String,Object>>();\n\t\t\t\tStringBuilder stringResponse = new StringBuilder();\n\t\t\t\t\n\t\t\t\tString params = request.getParameter(\"params\");\n\t\t\t\t\n\t\t\t\tJsonNode jparams = JacksonUtils.toNode(params);\n\t\t\t\tString method = jparams.get(\"method\").getTextValue();//request.getParameter(\"method\"); \n\t\t\t\tlogger.info(\"Upload file, METHOD: \" + method);\n\t\t\t\t\n\t\t\t\tif(\"flash\".equals(method)){\n\t\t\t\t\tresponse.setContentType(\"text/plain\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tresponse.setContentType(\"text/json\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(FileItem fileItem : fileItemList){\n\t\t\t\t\tif(fileItem.isFormField()){\n\t\t\t\t\t\tConstants.LOGGER.info(\"FileUploadServlet.storeInSessionFlashOrHTML5 - file item is form field::: \" + fileItem);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t\n\t\t\t\t\t\tConstants.LOGGER.info(\"FileUploadServlet.storeInSessionFlashOrHTML5.NOT formField \" + fileItem);\n//\t\t\t\t\t\tImageFile imageFile = webClientBean.storeImageInUploads(fileItem);\n\t\t\t\t\t\tString id = UUID.randomUUID().toString();\n\t\t\t\t\t\trequest.getSession().setAttribute(id, fileItem);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//--- RESPONSE - \n\t\t\t\t\t\tif(\"flash\".equals(method)){\n\t\t\t\t\t\t\tstringResponse.append(generateFlashResponse(fileItem, id));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t//-- FireFox/HTML5\n\t\t\t\t\t\t\tMap<String,Object> o = generateJsonResponse(fileItem);\n\t\t\t\t\t\t\to.put(\"fileItemId\", id);\n\t\t\t\t\t\t\tjsonResponse.add(o);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(\"flash\".equals(method)){\n\t\t\t\t\tresponse.getWriter().print(stringResponse);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tJacksonUtils.serialize(jsonResponse, response.getWriter());\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t\tcatch (Exception exp) {\n\t\t\tConstants.LOGGER.error(exp.getMessage(),exp);\n\t\t\tJacksonUtils.serialize(EntityModel.createErrorMessage(\"FileUpload Exception\", exp.getMessage()), response.getWriter());\n\t\t} \n\t}",
"public void actionPerformed(ActionEvent actionEvent) {\r\n Object source = actionEvent.getSource();\r\n /*if Upload , then set 'fileSelected' as true, get the filename from file chooser and set it to the txtFilename,\r\n set the BLOB data and enable the view button*/\r\n if(source.equals(awardAddDocumentForm.btnUpload)){\r\n CoeusFileChooser fileChooser = new CoeusFileChooser(dlgAwardUploadDoc);\r\n fileChooser.setAcceptAllFileFilterUsed(true);\r\n fileChooser.showFileChooser();\r\n if(fileChooser.isFileSelected()){\r\n String fileName = fileChooser.getSelectedFile();\r\n if(fileName != null && !fileName.trim().equals(EMPTY_STRING)){\r\n int index = fileName.lastIndexOf('.');\r\n if(index != -1 && index != fileName.length()){\r\n setFileSelected(true);\r\n awardAddDocumentForm.txtFileName.setText(fileChooser.getFileName().getName());\r\n setBlobData(fileChooser.getFile());\r\n //Added with case 4007: Icon based on mime type\r\n CoeusDocumentUtils docTypeUtils = CoeusDocumentUtils.getInstance();\r\n CoeusAttachmentBean attachmentBean = new CoeusAttachmentBean(fileName,getBlobData());\r\n setMimeType(docTypeUtils.getDocumentMimeType(attachmentBean));\r\n //4007 End\r\n awardAddDocumentForm.btnView.setEnabled(true);\r\n }else{\r\n CoeusOptionPane.showErrorDialog(coeusMessageResources.parseMessageKey(\r\n \"correspType_exceptionCode.1012\"));\r\n setFileSelected(false);\r\n setBlobData(null);\r\n setMimeType(null);//4007\r\n return;\r\n }\r\n }\r\n }\r\n } else if(source.equals(awardAddDocumentForm.btnOk)){\r\n try{\r\n /*Check the function type and awardDocumentBean is null or not*/\r\n if(awardDocumentBean != null){\r\n if(functionType == MODIFY_DOCUMENT){\r\n awardDocumentBean.setAcType(TypeConstants.UPDATE_RECORD);\r\n newVersion = false;\r\n newDocumentId = false;\r\n ComboBoxBean cmbTypeCode =(ComboBoxBean)awardAddDocumentForm.cmbDocumentType.getSelectedItem();\r\n if(!cmbTypeCode.getCode().equals(\"\") && !cmbTypeCode.getDescription().equals(\"\")){\r\n if(awardAddDocumentForm.cmbDocumentType.getSelectedItem() != null\r\n && !awardAddDocumentForm.cmbDocumentType.getSelectedItem().equals(EMPTY_STRING)){\r\n cmbTypeCode =(ComboBoxBean)awardAddDocumentForm.cmbDocumentType.getSelectedItem();\r\n awardDocumentBean.setDocumentTypeCode(Integer.parseInt(cmbTypeCode.getCode()));\r\n awardDocumentBean.setDocumentTypeDescription((awardAddDocumentForm.cmbDocumentType.getSelectedItem().toString()));\r\n docTypeEmpty = false;\r\n }\r\n }\r\n \r\n if(awardAddDocumentForm.txtDescription.getText() != null &&\r\n !awardAddDocumentForm.txtDescription.getText().equals(EMPTY_STRING)){\r\n if(awardAddDocumentForm.txtDescription.getText().length() > 200){\r\n String description = awardAddDocumentForm.txtDescription.getText().substring(0,201);\r\n awardDocumentBean.setDescription(description);\r\n docTypeEmpty = false;\r\n }else{\r\n awardDocumentBean.setDescription(awardAddDocumentForm.txtDescription.getText());\r\n }\r\n }else {\r\n CoeusOptionPane.showInfoDialog(coeusMessageResources.parseMessageKey(\"awardDocuments_DescDoc_exceptionCode.1115\"));\r\n docTypeEmpty = true;\r\n awardAddDocumentForm.txtDescription.requestFocusInWindow();\r\n return;\r\n }\r\n if(awardAddDocumentForm.txtFileName.getText() != null\r\n && !awardAddDocumentForm.txtFileName.getText().equals(EMPTY_STRING)){\r\n awardDocumentBean.setFileName(awardAddDocumentForm.txtFileName.getText());\r\n docTypeEmpty = false;\r\n }else{\r\n CoeusOptionPane.showInfoDialog(coeusMessageResources.parseMessageKey(\"awardDocuments_AttachDoc_exceptionCode.1113\"));\r\n docTypeEmpty = true;\r\n awardAddDocumentForm.btnUpload.requestFocusInWindow();\r\n return;\r\n }\r\n if(fileSelected && getBlobData() != null){\r\n awardDocumentBean.setDocument(getBlobData());\r\n awardDocumentBean.setMimeType(getMimeType());\r\n }\r\n modifyFormData(awardDocumentBean);\r\n }\r\n } else {\r\n saveFormData();\r\n }\r\n// if(okClicked){\r\n if(isOkClicked() || !docTypeEmpty){\r\n dlgAwardUploadDoc.dispose();\r\n }\r\n }catch(Exception e){\r\n e.printStackTrace();\r\n }\r\n }\r\n /* if View, check value for fileSelected,\r\n if true the display the blob data else throw an error msg*/\r\n else if(source.equals(awardAddDocumentForm.btnView)){\r\n if(fileSelected){\r\n try{\r\n viewDocument();\r\n }catch (Exception exception){\r\n exception.printStackTrace();\r\n if(!( exception.getMessage().equals(\r\n coeusMessageResources.parseMessageKey(\r\n \"protoDetFrm_exceptionCode.1130\")) )){\r\n CoeusOptionPane.showInfoDialog(exception.getMessage());\r\n return;\r\n }\r\n }\r\n }\r\n } else if(source.equals(awardAddDocumentForm.btnCancel)){\r\n dataValuesChanged();\r\n if(dataChanged){\r\n int option = CoeusOptionPane.showQuestionDialog(\r\n coeusMessageResources.parseMessageKey(\"saveConfirmCode.1002\"),\r\n CoeusOptionPane.OPTION_YES_NO_CANCEL,\r\n JOptionPane.YES_OPTION);\r\n switch(option){\r\n case JOptionPane.YES_OPTION:\r\n try{\r\n if(this.functionType != 'M'){\r\n saveFormData();\r\n } else{\r\n dlgAwardUploadDoc.dispose();\r\n }\r\n if(isOkClicked()){\r\n dlgAwardUploadDoc.dispose();\r\n }\r\n }catch(Exception e){\r\n e.printStackTrace();\r\n }\r\n break;\r\n case JOptionPane.NO_OPTION :\r\n dlgAwardUploadDoc.dispose();\r\n break;\r\n default:\r\n \r\n try {\r\n requestDefaultFocusToComp();\r\n } catch (CoeusException ex) {\r\n ex.printStackTrace();\r\n }\r\n break;\r\n }\r\n }else{\r\n dlgAwardUploadDoc.dispose();\r\n }\r\n }\r\n }",
"public void submit()\n\t{\n\t\tString trackCsv = trackCsvInput.getText();\n\t\tString trackName = trackNameInput.getText();\n\t\t\n\t\tRadioButton selectedButton = (RadioButton) toggleColors.getSelectedToggle();\n\t\tString color = selectedButton.getText().toUpperCase();\n\t\t\n\t\tif (addTrack(trackName, trackCsv, color)) \n\t\t{\n\t\t\tStage currStage = (Stage) trackCsvInput.getScene().getWindow();\n\t\t\tcurrStage.close();\n\t\t\tCTC.ctcController.displayTrack();\n\t\t\tCTC.ctcController.displayLegend();\n\t\t}\n\t\telse\n\t\t\terrorMessage.setVisible(true);\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException { \r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n PrintWriter out = response.getWriter();\r\n \r\n HttpSession session = request.getSession(true); \r\n Inmobiliaria inmobiliaria= (Inmobiliaria) session.getAttribute(\"inmobiliaria\"); \r\n if(inmobiliaria==null) inmobiliaria = Inmobiliaria.darObjeto(); \r\n session.setAttribute(\"inmobiliaria\", inmobiliaria);\r\n \r\n MultipartFormDataRequest mrequest = null; \r\n RequestDispatcher dispatcher = null; \r\n UploadBean upBean = null;//UploadBean es una libreria que se usa para poder llevar objetos al servidor en este caso la imagen \r\n \r\n String operacion = null; \r\n String mensaje = null;\r\n String url = null;\r\n \r\n try{ \r\n \r\n mrequest= new MultipartFormDataRequest(request); //le indicamos que recoga todo lo que nos esta mandando el .jsp \r\n operacion = mrequest.getParameter(\"btn_aceptar\");\r\n \r\n if ((operacion != null) && (operacion.equalsIgnoreCase(\"Agregar\"))) { \r\n \r\n //recuperar campos de texto:\r\n String dir = mrequest.getParameter(\"txt_direccion\"); \r\n String barrio = mrequest.getParameter(\"txt_barrio\"); \r\n String tel = mrequest.getParameter(\"txt_telefono\"); \r\n String tipo = mrequest.getParameter(\"dpd_tipoInmueble\"); \r\n String categoria = mrequest.getParameter(\"dpd_categoria\"); \r\n String tamanio = mrequest.getParameter(\"txt_tamano\"); \r\n int precio = Integer.parseInt(mrequest.getParameter(\"txt_precio\")); \r\n String ciudad = mrequest.getParameter(\"dpd_ciudad\"); \r\n \r\n String imagen = dir.replaceAll(\" \",\"\")+\".jpg\"; \r\n //-------------------- \r\n \r\n //enviar datos:\r\n try {\r\n \r\n inmobiliaria.adicionarInmueble(barrio, dir, tel, tipo, tamanio, precio, imagen, categoria, ciudad); \r\n mensaje = inmobiliaria.getMensaje(); \r\n \r\n if(mensaje.equals(\"El inmueble se adicionó con Exito\")){\r\n //recuperar archivo (imagen): \r\n Hashtable files = mrequest.getFiles();\r\n if ((files != null) && (!files.isEmpty())) { \r\n UploadFile file = (UploadFile) files.get(\"uploadfile\");\r\n \r\n file.setFileName(imagen);\r\n upBean = new UploadBean(); \r\n\r\n upBean.setFolderstore(\"D:\\\\DOCUMENTOS\\\\UMARIANA\\\\proyNetbeans\\\\Inmobiliaria\\\\web\\\\images\\\\inmuebles\\\\\"); \r\n upBean.store(mrequest, \"uploadfile\"); //Con el Store le decimos al MultipartFormRequest que obtenta tambien la imagen \r\n\r\n } else {\r\n System.out.println(\"<li>No uploaded files\");\r\n }\r\n //----------------------------------------------------- \r\n }\r\n \r\n } catch (Exception e) {\r\n out.println(e.getMessage());\r\n }\r\n \r\n \r\n url = \"AgregarInmueble.jsp\";\r\n \r\n session.setAttribute(\"mensaje\", mensaje);\r\n session.setAttribute(\"url\", url);\r\n\r\n response.sendRedirect(\"./Mensajes.jsp\"); \r\n \r\n }//if de (operacion) \r\n \r\n //modificar un inmueble:\r\n if ((operacion != null) && (operacion.equalsIgnoreCase(\"Modificar\"))) {\r\n String dirOriginal = mrequest.getParameter(\"txt_dir_original\"); //direccion original del inmueble \r\n \r\n String dir = mrequest.getParameter(\"txt_direccion\"); \r\n String barrio = mrequest.getParameter(\"txt_barrio\"); \r\n String tel = mrequest.getParameter(\"txt_telefono\"); \r\n String tipo = mrequest.getParameter(\"dpd_tipoInmueble\"); \r\n String categoria = mrequest.getParameter(\"dpd_categoria\"); \r\n String tamanio = mrequest.getParameter(\"txt_tamano\"); \r\n int precio = Integer.parseInt(mrequest.getParameter(\"txt_precio\")); \r\n String ciudad = mrequest.getParameter(\"dpd_ciudad\"); \r\n String imagenOriginal = dirOriginal.replaceAll(\" \",\"\")+\".jpg\";\r\n String imagenNueva = dir.replaceAll(\" \",\"\")+\".jpg\";\r\n \r\n try {\r\n //eliminar archivo anterior:\r\n String imagenCambiada = mrequest.getParameter(\"imagenCambiada\"); \r\n if(imagenCambiada.equals(\"1\")){\r\n String ruta=\"D:/DOCUMENTOS/UMARIANA/proyNetbeans/Inmobiliaria/web/images/inmuebles/\"+imagenOriginal;\r\n inmobiliaria.eliminarArchivo(ruta);\r\n } \r\n else imagenNueva = imagenOriginal;\r\n \r\n inmobiliaria.modificarInmueble(barrio, dir, tel, tipo, categoria, tamanio, precio, ciudad, imagenNueva, dirOriginal); \r\n \r\n //recuperar archivo (imagen): \r\n Hashtable files = mrequest.getFiles();\r\n if ((files != null) && (!files.isEmpty())) { \r\n UploadFile file = (UploadFile) files.get(\"uploadfile\"); \r\n file.setFileName(imagenNueva);\r\n upBean = new UploadBean(); \r\n upBean.setFolderstore(\"D:\\\\DOCUMENTOS\\\\UMARIANA\\\\proyNetbeans\\\\Inmobiliaria\\\\web\\\\images\\\\inmuebles\\\\\"); \r\n upBean.store(mrequest, \"uploadfile\"); //Con el Store le decimos al MultipartFormRequest que obtenga tambien la imagen \r\n\r\n } else {\r\n out.write(\"es null\");\r\n } \r\n \r\n } catch (Exception e) {\r\n }\r\n \r\n mensaje = inmobiliaria.getMensaje();\r\n url = \"AdministrarInmuebles.jsp\";\r\n \r\n session.setAttribute(\"url\", url);\r\n session.setAttribute(\"mensaje\", mensaje);\r\n \r\n response.sendRedirect(\"./Mensajes.jsp\"); \r\n \r\n \r\n }//if(modificar)\r\n \r\n }catch( UploadException exc){\r\n System.out.println(\"Error en lo primero: \"+exc.getMessage());\r\n } \r\n \r\n }",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\r\n\t\tSystem.out.println(\"doPost\");\r\n\t\t\r\n\t\tint yourMaxRequestSize = 100 * 1024 * 1024; // 1M\r\n\t\tint yourMaxMemorySize = 100 * 1024;\r\n\t\t\r\n\t\t// form field 의 데이터(String)\r\n\t\tString id = \"\";\r\n\t\tString title = \"\";\r\n\t\tString content = \"\";\r\n\r\n\t\t// file data\r\n\t\tString filename = \"\";\r\n\r\n\t\t\r\n\t\tString path = req.getServletContext().getRealPath(\"/upload\");\r\n\t\t\r\n\t\t\r\n\t\t// String path = \"d:\\\\tmp\";\r\n\t\t/*\r\n\t\tSystem.out.println(path);\r\n\t\tMultipartRequest mreq = new MultipartRequest(req, path);\r\n\t\tEnumeration t = mreq.getParameterNames();\r\n\t\t*/\r\n\t\t/*\r\n\t\twhile(t.hasMoreElements()) {\r\n\t\t\tString name = (String)t.nextElement();\r\n\t\t\tString conver =new String(mreq.getParameter(name).getBytes(\"8859_1\"), \"UTF-8\");\r\n\t\t\tSystem.out.println(name + \" : \" + mreq.getParameter(name) + \" : \" + conver);\r\n\t\t}\r\n\t\t*/\r\n\t\tboolean isMultipart = ServletFileUpload.isMultipartContent(req);\r\n\t\tSystem.out.println(isMultipart);\r\n\t\tif(isMultipart){\r\n\t\t\r\n\t\t// FileItem 을 생성하는 함수\r\n\t\t DiskFileItemFactory factory = new DiskFileItemFactory();\r\n\t\t \r\n\t\t factory.setSizeThreshold(yourMaxMemorySize);\r\n\t\t factory.setRepository(new File(path));\r\n\t\t \r\n\t\t ServletFileUpload upload = new ServletFileUpload(factory);\r\n\t\t upload.setSizeMax(yourMaxRequestSize);\r\n\t\t \r\n\t\t // list저장\r\n\t\t List<FileItem> items = null;\r\n\t\ttry {\r\n\t\t\titems = upload.parseRequest(req);\r\n\t\t} catch (FileUploadException 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 Iterator<FileItem> it = items.iterator();\r\n\t\t \r\n\t\t while(it.hasNext()){\r\n\t\t \r\n\t\t FileItem item = it.next();\r\n\t\t // id, title, content\r\n\t\t if(item.isFormField()){\r\n\t\t if(item.getFieldName().equals(\"id\")){\r\n\t\t \tid = item.getString(\"utf-8\");\r\n\t\t }\r\n\t\t else if(item.getFieldName().equals(\"title\")){\r\n\t\t title = item.getString(\"utf-8\");\r\n\t\t }\r\n\t\t else if(item.getFieldName().equals(\"content\")){\r\n\t\t content = item.getString(\"utf-8\");\r\n\t\t }\r\n\t\t }\r\n\t\t // file\r\n\t\t else{\r\n\t\t if(item.getFieldName().equals(\"fileload\")){\r\n\t\t filename = processUploadFile(item, path);\r\n\t\t System.out.println(\"path:\" + path);\r\n\t\t } \r\n\t\t } \r\n\t\t }\r\n\t\t \r\n\t}\r\n\t\tiReferRoomDao dao = ReferRoomDao.getInstance();\r\n\r\n\t\tboolean isS = dao.add_ReferR(new ReferRoomDto(id, title, content, filename));\r\n\t\t\r\n\t\tresp.sendRedirect(\"ReferListCtlr\");\r\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tuploadButton.setLabel(\"Uploading...\");\n\t\t\t\tsubmitConfiguration();\n\t\t\t\tuploadButton.setLabel(\"Upload\");\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlog.info(\"画上传界面\");\n\t\t\t\t\n\t\t\t\tinfomation.drawUpload();\n\t\t\t\t//frmIpfs.add(infomation);\n\t\t\t\tlog.info(\"画完了\");\n\t\t\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n String FOLDER = \"/Image/AvatarImg\";\r\n HttpSession session = (HttpSession) request.getSession(false);\r\n User user = (User) session.getAttribute(\"user\");\r\n Boolean updateResult;\r\n User cgeUser = new User();\r\n \r\n //Creazione variabili \r\n String email = user.getEmail();\r\n String nominativo = request.getParameter(\"nominativo\");\r\n String password = request.getParameter(\"password\");\r\n Boolean send;\r\n send = request.getParameter(\"send\") != null;\r\n String url;\r\n \r\n //IMMAGINE ################################################################################\r\n Part filePart = request.getPart(\"file1\");\r\n if((filePart != null) && (filePart.getSize() > 0)){\r\n //delete current immage\r\n String imageFolder = getServletContext().getRealPath(user.getImage()); //cerca il link assoluto dell immagine\r\n if(imageFolder != null){\r\n imageFolder = imageFolder.replace(\"\\\\build\", \"\"); //rimuove build dal link assoluto\r\n File currentFile = new File(imageFolder); //carica il file nel ogetto \r\n if(currentFile.exists()){ //controlla se esiste il file\r\n try{\r\n ImageDispatcher.deleteImgFromDirectory(imageFolder);\r\n cgeUser.setImage(null);\r\n }catch(Exception e){\r\n System.out.println(\"Cancella immagine errata\");\r\n System.out.println(e);\r\n }\r\n }\r\n }\r\n //save new immage\r\n String extension = Paths.get(filePart.getSubmittedFileName()).getFileName().toString().split(Pattern.quote(\".\"))[1];\r\n String foldername = getServletContext().getRealPath(FOLDER);\r\n foldername = foldername.replace(\"\\\\build\", \"\");\r\n String filename;\r\n if(email.equals(\"\")){\r\n filename = ImageDispatcher.setImgName(user.getEmail(), extension);\r\n }else{\r\n filename = ImageDispatcher.setImgName(email, extension);\r\n }\r\n File file1 = new File(foldername,filename);\r\n try (InputStream fileContent = filePart.getInputStream()) {\r\n Files.copy(fileContent, file1.toPath());\r\n cgeUser.setImage(\"Image/AvatarImg/\" + filename);\r\n } catch (RuntimeException e) {\r\n throw e;\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n }\r\n //IMMAGINE ################################################################################\r\n\r\n //Aggiornamento dei campi nominativo, email, e password\r\n cgeUser.setEmail(email);\r\n cgeUser.setNominativo(nominativo);\r\n cgeUser.setPassword(password);\r\n cgeUser.setSendEmail(send);\r\n \r\n try {\r\n User finaluser = userdao.changeUser(cgeUser, user);\r\n if (finaluser != null) {\r\n updateResult = true;\r\n session.setAttribute(\"user\", finaluser);\r\n session.setAttribute(\"updateResult\", updateResult);\r\n }\r\n } catch (DAOException ex) {\r\n Logger.getLogger(updateUser.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n //Redirect\r\n if (session.getAttribute(\"user\") != null) {\r\n url = \"/Lists/profile.jsp\";\r\n } else {\r\n url = \"homepage.jsp\";\r\n out.println(\"Errore di tipo utente\");\r\n }\r\n\r\n response.sendRedirect(url);\r\n\r\n }",
"private void summbitBlank() {\n\t\tMyFile fileToUpload = new MyFile(ClientUI.clientHandler.myDetails.getId(), examID, \"manual\");\n\t\tfileToUpload.setUserType(\"student\");\n\t\tClientUI.clientHandler.handleMessageFromClientUI(fileToUpload);\n\n\t}",
"private boolean upload(MimeMessage m, boolean bPostMsg, String changedSubj)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t Object msgContent = m.getContent();\r\n\t if (!(msgContent instanceof MimeMultipart))\r\n\t {\r\n\t \treject(m, \"Post/Upload command failed. Unsupported message type - you must use MimeMultipart.\");\r\n\t \treturn false;\r\n\t }\r\n\r\n\t // get the target object ID\r\n\t //subj = subj.replace(\"fw:\", \"\").replace(\"re:\", \"\").trim();\r\n\t String commandS = \"\";\r\n\r\n\t\t\t// upload/post 12345 user's optional subject\r\n\t String subj = null;\r\n\t if (changedSubj == null) {\r\n\t \tsubj = m.getSubject();\r\n\t }\r\n\t else {\r\n\t \tsubj = changedSubj;\t\t// for [EGIFN-1.1], changedSubj is now \"post EGIFN-1.1 xxx\"\r\n\t }\r\n\t String [] sa = subj.split(\" \");\r\n\t if (sa.length < 2)\r\n\t {\r\n\t \treject(m, \"Post/Upload command failed. You must specify the target task ID or project tag for the files to be uploaded to.\");\r\n\t \treturn false;\r\n\t }\r\n\r\n\t String pjAbbrev = null;\r\n\t String taskIdS = sa[1].trim();\r\n\r\n\t commandS = sa[0] + \" \" + sa[1];\t\t\t// e.g. upload 12345 or post ABC-2.1\r\n\r\n\t int taskId = 0;\t\t\t\t\t\t\t// taskId\r\n\t String taskMatchName = null;\r\n\t try {taskId = Integer.parseInt(taskIdS);}\r\n\t catch (Exception e)\r\n\t {\r\n\t\t\t\t// now support doing: post/upload UCAHP-2.1\r\n\t \t// UCAHP-2.1 or UCAHP\r\n\t \t// also support UCAHP-competition (match the first occurrence of the word \"competition\" for task name\r\n\t \tint idx = taskIdS.indexOf(\"-\");\r\n\t \tif (idx == -1) {\r\n\t \t\t// case of UCAHP only\r\n\t\t\t\t\tpjAbbrev = taskIdS;\t\t// UCAHP\r\n\t\t\t\t\ttaskIdS = \"\";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// case of UCAHP-2.1 or UCAHP-competition\r\n\t\t\t\t\tpjAbbrev = taskIdS.substring(0, idx).trim();\t// UCAHP\r\n\t\t\t\t\ttaskIdS = taskIdS.substring(idx+1).trim();\t\t// assume 2.1\r\n\t\t\t\t\ttry {Float.parseFloat(taskIdS);}\r\n\t\t\t\t\tcatch (Exception ee) {\r\n\t\t\t\t\t\t// it is not 2.1, assume it is UCAHP-competition\r\n\t\t\t\t\t\ttaskMatchName = taskIdS;\r\n\t\t\t\t\t\ttaskIdS = \"\";\t\t// turn it into the case like UCAHP only and be handle below\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t }\r\n\r\n\t String optSubj = null;\r\n\t if (sa.length > 2) {\r\n\t \toptSubj = subj.substring(subj.indexOf(sa[2]));\t// remove post... or [EGIFN-1.1] etc.\r\n\t }\r\n\r\n\t // get ready to check for link file collision later\r\n\t \tboolean bReject = false;\r\n\t \tPstAbstractObject [] linkDocArr = new PstAbstractObject[0];\r\n\t\t\tint [] ids = attMgr.findId(jwu, \"Link='\" + taskIdS + \"'\");\r\n\t\t\tlinkDocArr = attMgr.get(jwu, ids);\r\n\r\n\t // authorization check\r\n\t // only project team member can upload to the project task\r\n\t int idx1;\r\n\t PstAbstractObject taskObj, pjObj=null;\r\n\t user uObj;\r\n\t String fromEmail = getPlainFrom(m);\r\n\t System.out.println(\"Processing RoboMail request from [\" + fromEmail + \"]\");\r\n\t try {uObj = (user)uMgr.get(jwu, fromEmail);}\r\n\t catch (Exception e)\r\n\t {\r\n\t\t\t\t// try to see if fromEmail is found in Email attribute\r\n\t\t\t\tint [] tempIds = uMgr.findId(jwu, \"Email='\" + fromEmail + \"'\");\r\n\t\t\t\tif (tempIds.length <= 0) return false;\r\n\t\t\t\tuObj = (user)uMgr.get(jwu, tempIds[0]);\r\n\t\t\t}\r\n\t int uid = uObj.getObjectId();\r\n\t String myName = uObj.getFullName();\r\n\r\n\t // check to see if I need to get taskId from project abbreviation\r\n\t if (taskId == 0) {\r\n\t \t// try decode post UCAHP-2.1. Using UCAHP-2.1 to find taskId\r\n\t \tpjObj = pjMgr.getProjectByAbbreviation(uObj, pjAbbrev);\r\n\t \tif (pjObj == null) {\r\n\t \t\treject(m, \"Post/Upload command failed. (\" + subj + \") is not a valid command. E.g. upload 12345\");\r\n\t \t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// now get task from header number. e.g. 2.1\r\n\t\t\t\tif (taskIdS != \"\") {\r\n\t\t\t\t\ttry {Float.parseFloat(taskIdS);}\r\n\t\t\t\t\tcatch (Exception e) {\r\n\t\t\t\t\t\t// now support doing: post/upload UCAHP-2.1\r\n\t\t\t\t\t\treject(m, \"Post/Upload command failed. (\" + subj + \") is not a valid command. E.g. upload UCAHP-2.1\");\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// the case of UCAHP-2.1\r\n\t\t\t\t\t// taskIdS is 2.1 or something like that\r\n\t\t\t\t\ttaskIdS = ((project)pjObj).getTaskByHeader(uObj, taskIdS);\r\n\t\t\t\t\ttaskId = Integer.parseInt(taskIdS);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// either the case of UCAHP without the task header number (same as UCAHP-other)\r\n\t\t\t\t\t// or the case of UCAHP-competition\r\n\t\t\t\t\ttask tk;\r\n\t\t\t\t\tString tkName;\r\n\t\t\t\t\tint [] tids = ((project)pjObj).getCurrentTasks(uObj);\r\n\t\t\t\t\tfor (int i=0; i<tids.length; i++) {\r\n\t\t\t\t\t\ttk = (task)tMgr.get(uObj, tids[i]);\r\n\t\t\t\t\t\ttkName = ((String)tk.getPlanTask(uObj).getAttribute(\"Name\")[0]).trim().toLowerCase();\r\n\t\t\t\t\t\tif ( (taskMatchName!=null && tkName.contains(taskMatchName)) ||\r\n\t\t\t\t\t\t\t tkName.equals(\"other\") ||\r\n\t\t\t\t\t\t\t tkName.equals(\"others\")) {\r\n\t\t\t\t\t\t\t// found task\r\n\t\t\t\t\t\t\ttaskId = tids[i];\r\n\t\t\t\t\t\t\ttaskIdS = String.valueOf(taskId);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (taskId == 0) {\r\n\t\t\t\t\t\treject(m, \"Post/Upload command failed. (\" + subj + \") cannot find the task to complete the command.\");\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tl.info(\"Robomail translated [\" + commandS + \"] to task [\" + taskIdS + \"]\");\r\n\t\t\t}\r\n\r\n\t taskObj = tMgr.get(jwu, taskId);\r\n\t String projIdS = (String)taskObj.getAttribute(\"ProjectID\")[0];\r\n\t if (pjObj == null)\r\n\t \tpjObj = pjMgr.get(jwu, Integer.parseInt(projIdS));\r\n\t if (pjObj.getAttribute(\"Type\")[0].equals(\"Private\") && !Util2.foundAttribute(pjObj, \"TeamMembers\", uid))\r\n\t {\r\n\t \treject(m, \"Post/Upload command failed. You don't have authority to post to this task (\" + taskId + \")\");\r\n\t \treturn false;\r\n\t }\r\n\r\n\t //\r\n\t // now ready to upload the file attachments\r\n\t //\r\n\t String s;\r\n InputStream io;\r\n\t\t\tbyte [] contentBuf = new byte[8192];\r\n\t\t\tFileOutputStream fos;\r\n\t\t\tFile newF=null, dirObj;\r\n\t\t\tFileTransfer ft = new FileTransfer(uObj);\r\n\t\t\tPstAbstractObject attObj;\r\n\t\t\tString sessErrMsg = \"\";\r\n\t\t\tString fileLinkS = \"\";\r\n\t\t\tString optMsg = null;\r\n\t\t\tboolean bUploadedFile = false;\r\n\t\t\tString mailContentType = null;\t// to support multi-byte charset\r\n\t\t\tString charsetName = null;\r\n\t\t\tint ct = 0;\r\n\t\t\tint mpCount = 0;\r\n\r\n\t\t\tMimeMultipart mp = (MimeMultipart) msgContent;\r\n\t\t\ttry {mpCount = mp.getCount();}\r\n\t\t\tcatch (MessagingException e) {\r\n\t\t\t\tl.error(\"Error in upload(): failed to get multipart in mail. mp.getCount() Exception.\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n if (mp!=null && mpCount>0)\r\n {\r\n \t// ensure the upload directory is there\r\n \tString dirStr = UPLOAD_PATH + \"/\" + taskIdS;\r\n \tdirObj = new File(dirStr);\r\n \tif (!dirObj.exists())\r\n \t\tdirObj.mkdirs();\t\t\t// create the C:/Repository/CR/12345 directory\r\n\r\n for (int j=0; j<mpCount; j++)\r\n {\r\n MimeBodyPart bp = (MimeBodyPart) mp.getBodyPart(j);\r\n\r\n // get the attachment content\r\n String fname = bp.getFileName();\r\n\r\n if (!bPostMsg && fname==null)\r\n \tcontinue;\r\n\r\n\t\t\t\t\tif (fname==null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// this is the content of the message\r\n\t\t\t\t\t\tif (bp.getContent() instanceof MimeMultipart)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tMimeMultipart tempMp = (MimeMultipart) bp.getContent();\r\n\t\t\t\t\t\t\tbp = (MimeBodyPart)tempMp.getBodyPart(0);\t\t\t\t// this is just the content\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\toptMsg = bp.getContent().toString();\r\n\t\t\t\t\t\ts = bp.getContentType();\r\n\t\t\t\t\t\tif (s != null) s = s.toLowerCase();\r\n\t\t\t\t\t\tSystem.out.println(\"Robomail handling email content type: \" + s);\r\n\t\t\t\t\t\tif (s==null || !s.contains(\"html\")) {\r\n\t\t\t\t\t\t\t// mainly have to deal with RTF email\r\n\t\t\t\t\t\t\toptMsg = optMsg.replaceAll(\"<\\\\S[^>]*>\", \"\");\r\n\t\t\t\t\t\t\toptMsg = optMsg.replaceAll(\"\\n\", \"<br>\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (s!=null && s.contains(\"charset\")) {\r\n\t\t\t\t\t\t\tmailContentType = bp.getContentType();\t// support multibype charset\r\n\t\t\t\t\t\t\tSystem.out.println(\"encoding=\" + bp.getEncoding());\r\n\t\t\t\t\t\t\tint idx = s.indexOf(\"charset=\");\r\n\t\t\t\t\t\t\tcharsetName = mailContentType.substring(idx+8);\r\n\t\t\t\t\t\t\tSystem.out.println(\"charset=\"+charsetName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t // reject if upload file collide with link files in this task\r\n\t\t\t\t\t// error checking: if the filename match any linked file, reject the upload\r\n\t\t\t\t\tbReject = false;\r\n\t\t\t\t\tfor (int i=0; i<linkDocArr.length; i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (Util3.getOnlyFileName(linkDocArr[i]).equalsIgnoreCase(fname))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tbReject = true;\r\n\t\t\t\t\t\t\tif (sessErrMsg.length() <= 0)\r\n\t\t\t\t\t\t\t\tsessErrMsg = \"The following file(s) are not uploaded:<br>\";\r\n\t\t\t\t\t\t\tsessErrMsg += \"- \" + fname + \": filename collides with a linked file.<br>\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (bReject) continue;\r\n\r\n io = bp.getInputStream();\r\n newF = new File(fname);\r\n newF.createNewFile();\r\n fos = new FileOutputStream(newF);\r\n\r\n\t\t\t\t\tint count = 0;\r\n\t\t\t\t\tint len = 0; // Check total length read\r\n\t\t\t\t\twhile((count = io.read(contentBuf)) != -1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfos.write(contentBuf, 0, count);\r\n\t\t\t\t\t\tfos.flush();\r\n\t\t\t\t\t\tlen += count;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfos.close();\r\n\t\t\t\t\tio.close();\r\n\t\t\t\t\tbUploadedFile = true;\r\n\r\n\t\t\t\t\t// save the file and update task object\r\n\t\t\t\t\tattObj = ft.saveFile(taskId, projIdS, newF, null, attachment.TYPE_TASK, null, null, true);\t// versioning on\r\n\t\t\t\t\ttaskObj.appendAttribute(\"AttachmentID\", String.valueOf(attObj.getObjectId()));\r\n\t\t\t\t\ttMgr.commit(taskObj);\r\n\t\t\t\t\tct++;\r\n\r\n\t\t\t\t\t// build fileLinkS for display in the blog and email notification\r\n\t\t\t\t\tif (fileLinkS.length() > 0) fileLinkS += \"<br>\";\r\n\t\t\t\t\ts = (String)attObj.getAttribute(\"Location\")[0];\r\n\t\t\t\t\tif ((idx1 = s.lastIndexOf('/')) != -1)\r\n\t\t\t\t\t\ts = s.substring(idx1+1);\r\n\t\t\t\t\tfileLinkS += \"<li><a class='plaintext' href='\" + HOST + \"/servlet/ShowFile?attId=\" + attObj.getObjectId() + \"'><u>\"\r\n\t\t\t\t\t\t\t\t+ s + \"</u></a>\";\r\n\r\n l.info(\"RoboMail uploaded attachment: \" + (String)attObj.getAttribute(\"Location\")[0] + \" (\" + len + \" B)\");\r\n }\t// end for each attachment file\r\n if (bReject)\r\n \treject(m, \"Post/Upload command completed with warning.<br>\" + sessErrMsg);\r\n\r\n // most of the following notification/blog code is from post_updtask.jsp\r\n if (ct>0 || optMsg!=null)\r\n {\r\n \tString projName = ((project)pjObj).getDisplayName();\r\n \tids = ptMgr.findId(jwu, \"TaskID='\" + taskIdS + \"'\");\r\n \tArrays.sort(ids);\r\n \tint pTaskId = ids[ids.length-1];\r\n \t\tString taskName = (String)ptMgr.get(jwu, pTaskId).getAttribute(\"Name\")[0];\r\n \t\tif (optSubj == null)\r\n \t\t{\r\n\t \t\tif (ct > 0)\r\n\t \t\t{\r\n\t\t \t\t\tsubj = ct + \" file\";\r\n\t\t \t\t\tif (ct > 1) subj += \"s are \";\r\n\t\t \t\t\telse subj += \" is \";\r\n\t \t\t}\r\n\t \t\telse\r\n\t \t\t\tsubj = \"A blog is \";\r\n\t\t \t\tsubj += \"posted on (\" + projName + \")\";\r\n \t\t}\r\n \t\telse {\r\n \t\t\tsubj = optSubj.trim();\t// this should only be the email subject w/o post...\r\n \t\t}\r\n \t\tsubj = \"[\" + app + \" Blog] \" + subj;\r\n \t\tString nowS = df0.format(new Date());\r\n\r\n \t\tStringBuffer msgBuf = new StringBuffer(4096);\r\n \t\tif (optMsg != null)\r\n \t\t{\r\n \t\t\t\t//optMsg = \"Message from \" + myName + \":<br><div STYLE='font-size: 14px; font-family: Courier New'><br>\"\r\n \t\t\t\toptMsg = \"Message from \" + myName + \":<br><div><br>\"\r\n\t\t\t\t\t\t+ optMsg + \"</div><br />\";\r\n \t\t\tmsgBuf = msgBuf.append(optMsg);\r\n \t\t\tif (ct > 0) msgBuf.append(\"<hr>\");\r\n \t\t}\r\n \t\tif (ct > 0)\r\n \t\t{\r\n\t \t\tmsgBuf.append(myName + \" has posted \" + ct + \" new file\");\r\n\t \t\tif (ct > 1) msgBuf.append(\"s\");\r\n\t \t\tmsgBuf.append(\" on \" + nowS + \"<blockquote><table>\");\r\n\t \t\tmsgBuf.append(\"<tr><td class='plaintext' width='80'>PROJECT:</td><td class='plaintext'><a href='\" + HOST + \"/project/cr.jsp?projId=\");\r\n\t \t\tmsgBuf.append(projIdS + \"'><u>\" + projName + \"</u></a></td></tr>\");\r\n\t \t\tmsgBuf.append(\"<tr><td class='plaintext' width='80'>TASK:</td><td class='plaintext'><a href='\" + HOST + \"/project/task_update.jsp?projId=\");\r\n\t \t\tmsgBuf.append( projIdS + \"&taskId=\" + taskIdS + \"'><u>\" + taskName + \"</u></a></td></tr>\");\r\n\t \t\tmsgBuf.append(\"</table></blockquote>You may click on the following filename to open the file:<blockquote><ul>\");\r\n\t \t\tmsgBuf.append(fileLinkS);\r\n\t \t\tmsgBuf.append(\"</ul></blockquote>\");\r\n \t\t}\r\n\r\n \t\t// we must blog, but check to see if we need to send notification email\r\n \t\tObject [] userIdArr = null;\r\n \t\tString optStr = (String)pjObj.getAttribute(\"Option\")[0];\r\n \t\tif (optStr!=null && optStr.indexOf(project.OP_NOTIFY_BLOG)!=-1)\r\n \t\t{\r\n \t\t\t// need to send team notification email\r\n \t\t\tuserIdArr = pjObj.getAttribute(\"TeamMembers\");\t\t// userIdArr was null\r\n \t\t\tUtil.sendMailAsyn(uObj, fromEmail, userIdArr, null, null, subj, msgBuf.toString(),\r\n \t\t\t\t\tMAILFILE, null, null, false, mailContentType);\r\n \t\t}\r\n\r\n \t\t// @ECC071408 post blog whether sending email or not\r\n \t\tString blogIdS = Util2.postBlog(uObj, result.TYPE_TASK_BLOG, taskIdS, projIdS, subj,\r\n \t\t\t\tmsgBuf.toString(), charsetName);\r\n \t\t\r\n \t\t/////////////\r\n \t\t// send notification event\r\n \t\t// the below code is basically from post_addblog.jsp\r\n\t\t\t\t\tString lnkStr = \"<blockquote class='bq_com'>uploaded email ... <a class='listlink' \"\r\n\t\t\t\t\t\t+ \"href='../blog/blog_task.jsp?blogId=\" + blogIdS\r\n\t\t\t\t\t\t+ \"&projId=\" + projIdS + \"&taskId=\" + taskIdS\r\n\t\t\t\t\t\t+ \"'>read more & reply</a></blockquote>\";\t\t// this link is used by both original blog or comment on task\r\n\r\n\t\t\t\t\ts = (String)pjObj.getAttribute(\"TownID\")[0];\r\n\t\t\t\t\tevent evt = PrmEvent.create(uObj, PrmEvent.EVT_BLG_PROJ, null, s, null);\r\n\t\t\t\t\tString temp = \"<a href='\" + Prm.getPrmHost() + \"/project/proj_plan.jsp?projId=\"\r\n\t\t\t\t\t\t+ projIdS + \"'>\" + ((project)pjObj).getDisplayName() + \"</a>\";\r\n\t\t\t\t\tPrmEvent.setValueToVar(evt, \"var1\", temp);\r\n\t\t\t\t\tPrmEvent.setValueToVar(evt, \"var2\", lnkStr);\r\n\t\t\t\t\tif (Prm.isPRM()) {\r\n\t\t\t\t\t\t// send to project memebers\r\n\t\t\t\t\t\tids = Util2.toIntArray(pjObj.getAttribute(\"TeamMembers\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tids = uMgr.findId(uObj, \"Towns=\" + s);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tct = PrmEvent.stackEvent(uObj, ids, evt);\r\n\t\t\t \tl.info(uid + \" RoboMail triggered Event [\" + PrmEvent.EVT_BLG_PROJ + \"] to \"\r\n\t\t\t \t\t\t+ ct + \" users for project (\" + projIdS + \") blog.\");\r\n\r\n \t\t// @ECC091108 recalculate project space\r\n \t\tif (bUploadedFile) {\r\n\t \tUtilThread th = new UtilThread(UtilThread.CAL_PROJ_SPACE, uObj);\r\n\t \tth.setParam(0, projIdS);\r\n\t \tth.start();\r\n \t\t}\r\n }\r\n }\t// end if there is any attachment\r\n else\r\n {\r\n \tl.info(\"There is no attachment for this command.\");\r\n }\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\treject(m, \"Post/Upload command failed in upload() operation. \" + e.toString());\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public void showTaskMediaDialog() {\n\t\tdialogHandlerAction.getMediaDialog().initBean(globalEditViewHandler.getSelectedPatient(),\r\n\t\t\t\tnew HasDataList[] { globalEditViewHandler.getSelectedTask() }, false);\r\n\r\n\t\t// enabeling upload to task\r\n\t\tdialogHandlerAction.getMediaDialog().enableUpload(new HasDataList[] { globalEditViewHandler.getSelectedTask() },\r\n\t\t\t\tnew DocumentType[] { DocumentType.U_REPORT, DocumentType.COUNCIL_REPLY,\r\n\t\t\t\t\t\tDocumentType.BIOBANK_INFORMED_CONSENT, DocumentType.OTHER });\r\n\r\n\t\t// setting info text\r\n\t\tdialogHandlerAction.getMediaDialog().setActionDescription(resourceBundle.get(\"dialog.media.headline.info.task\",\r\n\t\t\t\tglobalEditViewHandler.getSelectedTask().getTaskID()));\r\n\r\n\t\t// show dialog\r\n\t\tdialogHandlerAction.getMediaDialog().prepareDialog();\r\n\t}",
"public void showUploadList() {\n\t\tButton btn = (Button) ((Sync) initiator).findViewById(R.id.btn_sync_uplist);\n\t\t// On le desactive\n\t\tbtn.setEnabled(false);\n\t\t\n\t\t// On prend le bouton de download\n\t\tbtn = (Button) ((Sync) initiator).findViewById(R.id.btn_sync_downlist);\n\t\t// On l active\n\t\tbtn.setEnabled(true);\n\t\t\n\t\tsetDirectionUpload();\n\t\t((Sync) initiator).showListView();\n\t\t\n\t}",
"public JPanelUpload() {\n initComponents();\n JPanelTrack.setBase(tracksStart);\n updateTrackList();\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n HttpSession session=request.getSession(); \n /*\n *Change the directory. Must be absolute. \n */\n String UPLOAD_DIRECTORY = \"C:\\\\Users\\\\Yuta\\\\Documents\\\\NetBeansProjects\\\\hoamisgit\\\\web\\\\ourFiles\\\\uploads\";\n if(ServletFileUpload.isMultipartContent(request)){\n try {\n List<FileItem> multiparts = new ServletFileUpload(new DiskFileItemFactory()).parseRequest(request);\n for(FileItem item : multiparts){\n if(!item.isFormField()){\n File a = new File(UPLOAD_DIRECTORY + File.separator + item.getName());\n String name = a.getName();\n String loc = UPLOAD_DIRECTORY + File.separator + item.getName();\n User user = (User)session.getAttribute(\"UserObj\");\n \n if (a.exists()){\n //session.setAttribute(\"message\", \"File Already exists\");\n }\n else{\n // session.setAttribute(\"message\", \"File Uploaded Successfully\");\n item.write( new File(UPLOAD_DIRECTORY + File.separator + name));\n }\n \n \n Document document = new Document(name, loc, new Folder(Integer.parseInt(String.valueOf(session.getAttribute(\"curFolder\")))), user);\n System.out.println(\"Document ID: \"+document.getDescription());\n System.out.println(\"Folder ID: \"+document.getFolder().getFolderID());\n if(DocumentDAO.checkDuplicateDoc(document)){\n if(evaluateSize(item)){\n if(name.length() <=45){\n DocumentDAO.addDocument(document);\n session.setAttribute(\"message\", \"File Uploaded Successfully\");\n }\n else{\n session.setAttribute(\"message\", \"File Name too long [45 Characters]\");\n }\n }\n else{\n session.setAttribute(\"message\", \"File Size Exceeds Limit [100MB]\");\n } \n }\n else{\n session.setAttribute(\"message\", \"File Already exists\");\n }\n }\n } //File uploaded successfully\n } catch (Exception ex) {\n request.setAttribute(\"message\", \"File Upload Failed due to \" + ex);\n } \n response.sendRedirect(\"HomeDocu?fid=\"+String.valueOf(session.getAttribute(\"curFolder\")));\n }\n\n }",
"protected void doPost(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tboolean isMultipart = ServletFileUpload.isMultipartContent(request);\r\n\r\n\t\tif (!isMultipart) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Create a factory for disk-based file items\r\n\t\tDiskFileItemFactory factory = new DiskFileItemFactory();\r\n\r\n\t\t// Sets the size threshold beyond which files are written directly to\r\n\t\t// disk.\r\n\t\tfactory.setSizeThreshold(MAX_MEMORY_SIZE);\r\n\r\n\t\t// Sets the directory used to temporarily store files that are larger\r\n\t\t// than the configured size threshold. We use temporary directory for\r\n\t\t// java\r\n\t\tfactory.setRepository(new File(System.getProperty(\"java.io.tmpdir\")));\r\n\r\n\t\t// constructs the folder where uploaded file will be stored\r\n\t\t// String uploadFolder = getServletContext().getRealPath(\"\")\r\n\t\t// + File.separator + DATA_DIRECTORY;\r\n\r\n\t\tString[] route = getServletContext().getRealPath(\"\").split(Pattern.quote(File.separator));\r\n\t\tStringBuffer uploadFolderSb = new StringBuffer();\r\n\t\t// uploadFolderSb.append(File.separator);\r\n\t\tfor (int i = 0; i < route.length - 2; i++) {\r\n\t\t\tuploadFolderSb.append(route[i]);\r\n\t\t\tuploadFolderSb.append(File.separator);\r\n\t\t}\r\n\r\n\t\tuploadFolderSb.append(\"docroot\");\r\n\t\tuploadFolderSb.append(File.separator + DATA_DIRECTORY);\r\n\t\tString uploadFolder = uploadFolderSb.toString();\r\n\r\n\t\t// String uploadFolderRel = getServletContext().getContextPath()\r\n\t\t// + File.separator + DATA_DIRECTORY;\r\n//\t\tString uploadFolderRel = \"\\\\\" + DATA_DIRECTORY;\r\n\t\t// Create a new file upload handler\r\n\t\tServletFileUpload upload = new ServletFileUpload(factory);\r\n\r\n\t\t// Set overall request size constraint\r\n\t\tupload.setSizeMax(MAX_REQUEST_SIZE);\r\n\t\tList<String> webLinks = new ArrayList<String>();\r\n\t\tString publishedYear = \"0000\";\r\n\t\tString title = \"\";\r\n\t\tString isbn = \"0\";\r\n\t\tString pagesCount = \"0\";\r\n\t\tString author = \"0\";\r\n\t\tLong userAppId = null;\r\n\t\ttry {\r\n\t\t\t// Parse the request\r\n\t\t\tList items = upload.parseRequest(request);\r\n\t\t\tIterator iter = items.iterator();\r\n\t\t\twhile (iter.hasNext()) {\r\n\t\t\t\tFileItem item = (FileItem) iter.next();\r\n\r\n\t\t\t\tif (!item.isFormField()) {\r\n\t\t\t\t\tString fileName = new File(item.getName()).getName();\r\n\t\t\t\t\tString filePath = uploadFolder + File.separator + fileName;\r\n\t\t\t\t\tString fileRelPath = \r\n\t\t\t\t\t\t\t//uploadFolderRel + \r\n\t\t\t\t\t\t\tFile.separator\r\n\t\t\t\t\t\t\t+ fileName;\r\n\t\t\t\t\tFile uploadedFile = new File(filePath);\r\n\r\n\t\t\t\t\t// saves the file to upload directory\r\n\t\t\t\t\titem.write(uploadedFile);\r\n\t\t\t\t\tString finalPath = fileRelPath.replace(\"//\", \"/\");\r\n\t\t\t\t\twebLinks.add(finalPath);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (item.getFieldName().equals(\r\n\t\t\t\t\t\t\tConstants.BLOB_PUBLISHED_YEAR)) {\r\n\t\t\t\t\t\tpublishedYear = item.getString();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (item.getFieldName().equals(Constants.BLOB_TITLE)) {\r\n\t\t\t\t\t\ttitle = item.getString();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (item.getFieldName().equals(Constants.ISBN)) {\r\n\t\t\t\t\t\tisbn = item.getString();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (item.getFieldName().equals(Constants.PAGES_COUNT)) {\r\n\t\t\t\t\t\tpagesCount = item.getString();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (item.getFieldName().equals(Constants.BLOB_AUTHOR)) {\r\n\t\t\t\t\t\tauthor = item.getString();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (item.getFieldName().equals(Constants.BLOB_UPLOADER)) {\r\n\t\t\t\t\t\tuserAppId = Long.parseLong(item.getString());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tProfessor professor = ((GWTServiceImpl) gwtServiceImpl)\r\n\t\t\t\t\t.findProfessor(userAppId);\r\n\t\t\tLocalBook localBook = new LocalBook(professor, author, isbn,\r\n\t\t\t\t\tpagesCount, publishedYear, title);\r\n//\t\t\tString absPath = getServletContext().getRealPath(\"\").substring(0,\r\n//\t\t\t\t\t52)\r\n//\t\t\t\t\t+ File.separator + \"docroot\" + File.separator;\r\n\t\t\tList<String> imagesWebLinks = convert(uploadFolder\r\n\t\t\t\t\t+ webLinks.get(0),uploadFolder);\r\n\t\t\tlocalBook.setWebLinks(imagesWebLinks);\r\n\t\t\tprofessor.getBooks().add(localBook);\r\n\t\t\tsaveUser((Professor) professor);\r\n\t\t\t// displays done.jsp page after upload finished\r\n\t\t\t// getServletContext().getRequestDispatcher(\"/done.jsp\").forward(request,\r\n\t\t\t// response);\r\n\r\n\t\t} catch (FileUploadException ex) {\r\n\t\t\tthrow new ServletException(ex);\r\n\t\t} catch (ProfessorNotFoundException pnfe) {\r\n\r\n\t\t} catch (Exception ex) {\r\n\t\t\tthrow new ServletException(ex);\r\n\t\t}\r\n\t}",
"public handleFileUpload() {\r\n\t\tsuper();\r\n\t}",
"protected boolean usesFakeFullSubmit()\n {\n return false;\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tint carID = Integer.parseInt(request.getParameter(\"carID\"));\n\t\tString name = request.getParameter(\"nameCar\").toString();\n\t\tint nsx = Integer.parseInt(request.getParameter(\"productDate\"));\n\t\tlong price = Long.parseLong(request.getParameter(\"price\"));\n\t\tint quantityStock = Integer.parseInt(request.getParameter(\"quantityStock\"));\n\t\tString description = request.getParameter(\"description\").toString();\n\t\tString brand = request.getParameter(\"brand\").toString();\n\t\tString imageCar = \"\";\n\t\tString fileName = request.getParameter(\"photo\");\n\t\t\t DiskFileItemFactory factory = new DiskFileItemFactory();\n\t\t\t\t// sets memory threshold - beyond which files are stored in disk\n\t\t\t\tfactory.setSizeThreshold(MEMORY_THRESHOLD);\n\t\t\t\t// sets temporary location to store files\n\t\t\t\tfactory.setRepository(new File(System.getProperty(\"java.io.tmpdir\")));\n\t\t\n\t\t\t\tServletFileUpload upload = new ServletFileUpload(factory);\n\t\t\n\t\t\t\t// sets maximum size of upload file\n\t\t\t\tupload.setFileSizeMax(MAX_FILE_SIZE);\n\t\t\n\t\t\t\t// sets maximum size of request (include file + form data)\n\t\t\t\tupload.setSizeMax(MAX_REQUEST_SIZE);\n\t\t\n\t\t\t\t// constructs the directory path to store upload file\n\t\t\t\t// this path is relative to application's directory\n\t\t\t\n\n\t\t\t\ttry{\n\t\t\t\t\tList<Part> fileParts = request.getParts().stream().filter(part -> \"photo\".equals(part.getName())).collect(Collectors.toList()); // Retrieves <input type=\"file\" name=\"file\" multiple=\"true\">\n\t\t \t\tString uploadPath = \"C:\\\\Users\\\\AnhXtanh\\\\workspace\\\\hungptit\\\\WebContent\\\\\" + UPLOAD_DIRECTORY;\n\t\t \t\tFile uploadDir = new File(uploadPath);\n\t\t \t\tif (!uploadDir.exists()) {\n\t\t\t\t\t\tuploadDir.mkdir();\n\t\t\t\t\t}\n\t\t \t\tfor (Part filePart : fileParts) {\n\t\t\t\t imageCar = Paths.get(filePart.getSubmittedFileName()).getFileName().toString(); // MSIE fix.\n\t\t\t\t System.out.println(imageCar);\n\t\t\t\t String filePath = uploadPath + File.separator + imageCar;\n\t\t\t\t filePart.write(uploadPath);\n\t\t\t\t } \n\t\t\t\t}catch(Exception ex){\n\t\t\t\t\trequest.setAttribute(\"message\", \"There was an error: \" + ex.getMessage());\n\t\t\t\t}\n\t\t\t\tif (imageCar.equals(\"\")) {\n\t\t\t\t\tCar car = new Car (name, description, brand, nsx, price, quantityStock);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcardao.updateCarNoneImage(car, carID);\n\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tCar car = new Car (name, description, brand, nsx, price, quantityStock, imageCar);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcardao.updateCar(car, carID);\n\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tArrayList<Car> listCar;\n\t\t\t\ttry {\n\t\t\t\t\tlistCar = cardao.findAllCar();\n\t\t\t\t\trequest.setAttribute(\"cars\", listCar);\n\t\t\t\t\tRequestDispatcher rd = request.getRequestDispatcher(\"/WEB-INF/view/listCars.jsp\");\n\t\t\t\t\trd.forward(request, response);\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t}",
"public void uploader(WebDriver driver, String image, By browse, By upload) throws InterruptedException {\n\t\t String imageDir = Common.localImageDir;\n\t\t String imagePath = imageDir + File.separator + image;\n\t\t try{\n \t driver.findElement(browse).sendKeys(imagePath);\n \t Thread.sleep(1000);\n \t driver.findElement(upload).click();\n \t waitUntilElementInvisibility(driver, 10, Common.ajaxThrobber, \"Throbber\", new Exception().getStackTrace()[0]);\n }catch(Throwable e) { e.printStackTrace(); }\n }",
"@Override\n public boolean configure(StaplerRequest req, JSONObject formData) throws FormException {\n req.bindParameters(this, \"ArtifactUploader\");\n return super.configure(req, formData);\n }",
"public uploadScreen() {\r\n \tsetTitle(\"Upload Screen\");\r\n setVisible(true);\r\n screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n setSize(screenSize.width, screenSize.height);\r\n setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n setLayout(new BorderLayout());\r\n review = new JTextArea(\"No file select\");\r\n panelB = new JPanel();\r\n upload = new JPanel();\r\n uploadF = new JButton(\"File select\");\r\n uploadP = new JButton(\"Picture select\");\r\n uploadW = new JButton(\"Website select\");\r\n previewFile = new JButton(\"Open Files\");\r\n uploadB = new JButton(\"Upload\");\r\n Back = new JButton(\"Back to Home page\");\r\n start();\r\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException\r\n {\r\n \r\n\r\n// get next incident id\r\n int maxIncidentID = 0;\r\n String msg_title= \"\";\r\n String msg_description= \"\";\r\n String time= \"\";\r\n String latLong = \"\";\r\n String userID=\"\";\r\n String password=\"\";\r\n ArrayList<String> imagePaths = new ArrayList<String>();\r\n List<FileItem> items = null;\r\n // run a query to insert a row with the incident id (already received) and latlong and message details and image paths.\r\n \r\n String currTime = new Timestamp(new Date().getTime()).toString();\r\n String name = currTime.replaceAll(\"\\\\:|\\\\-|\\\\s+|\\\\.\", \"\");\r\n System.out.println(name);\r\n String sImagePath = \"C:/incidentImages/\"+name+\"/\";\r\n boolean success = ( new File(sImagePath)).mkdirs();\r\n if (success) {\r\n System.out.println(\"Directory: \" + sImagePath + \" created\");\r\n } \r\n new File(sImagePath);\r\n try\r\n {\r\n items = new ServletFileUpload(new\r\n DiskFileItemFactory()).parseRequest(request);\r\n for (FileItem item : items)\r\n {\r\n if(item.getFieldName().equals(\"message\"))\r\n {\r\n// File dataFile = new\r\n// File(sImagePath+System.currentTimeMillis());\r\n msg_description = item.getString();\r\n /*FileWriter v = new FileWriter(dataFile);\r\n v.append(sVal);\r\n v.close();*/\r\n }\r\n \r\n if(item.getFieldName().equals(\"latitude\"))\r\n {\r\n /*File dataFile = new File(sImagePath+\"gps_\"+System.currentTimeMillis() +\".txt\");\r\n String sVal = item.getString();\r\n FileWriter v = new FileWriter(dataFile);\r\n v.append(sVal);\r\n v.close();*/\r\n latLong = item.getString();\r\n }\r\n if(item.getFieldName().equals(\"longitude\"))\r\n { \r\n latLong = latLong + \",\" + item.getString(); \r\n }\r\n \r\n if(item.getFieldName().equals(\"message_title\"))\r\n { \r\n msg_title = item.getString();\r\n }\r\n \r\n if(item.getFieldName().equals(\"reporting_time\"))\r\n { \r\n time = item.getString();\r\n }\r\n \r\n if(item.getFieldName().equals(\"uid\"))\r\n {\r\n userID=item.getString();\r\n }\r\n \r\n if(item.getFieldName().equals(\"pass\"))\r\n {\r\n password=item.getString();\r\n }\r\n if (item.getFieldName().equals(\"image\"))\r\n {\r\n String fileName = item.getName();\r\n //String fileContentType = item.getContentType();\r\n InputStream fileContent = item.getInputStream();\r\n\r\n BufferedImage bImageFromConvert = ImageIO.read(fileContent);\r\n imagePaths.add(sImagePath+fileName);\r\n \r\n File vImageFile = new File(sImagePath+fileName);\r\n\r\n ImageIO.write(bImageFromConvert, \"jpg\", vImageFile);\r\n //Image img = ImageIO.read(new File(sImagePath+fileName)).getScaledInstance(100, 100, BufferedImage.SCALE_SMOOTH);\r\n \r\n BufferedImage img = new BufferedImage(100, 100, BufferedImage.TYPE_INT_RGB);\r\n img.createGraphics().drawImage(ImageIO.read(vImageFile).getScaledInstance(100, 100, Image.SCALE_SMOOTH),0,0,null);\r\n ImageIO.write(img, \"jpg\", new File(sImagePath+fileName+\"_thumb.jpg\"));\r\n\r\n }\r\n \r\n }\r\n } catch (Exception e) {\r\n throw new ServletException(\"Cannot parse multipart request.\", e);\r\n }\r\n maxIncidentID = insertIncidentMsg(msg_title,msg_description,time,latLong,imagePaths);\r\n processRequest(request, response);\r\n\r\n }",
"public void uploader(WebDriver driver, String image, By browse, By upload, Robot robot, String name) throws NumberFormatException, IOException {\n\t\t String parentWindowHandle = driver.getWindowHandle();\n\t\t int i = 0;\n\t\t String xpath = \"//a[contains(@type,'image/jpeg;')][text()='\" + image + \"']\";\n\t\t By element = By.xpath(xpath);\n\t\t int size = driver.findElements(element).size();\t\t \n\t\t while (size == 0) {\n\t\t try {\n\t\t \t String previousURL = driver.getCurrentUrl();\n\t\t if (i > 0) { fileWriterPrinter(\"Not a successful \\\"\" + image + \"\\\" \" + name + \" upload...will try again...\"); }\n\t\t\t \n\t\t robot.keyPress(KeyEvent.VK_CANCEL); // close previous in the beginning\n\t\t robot.keyRelease(KeyEvent.VK_CANCEL);\n\t\t driver.findElement(browse).click();\n\t\t\t \n\t\t waitUntilUrl(driver, previousURL); \n\t\t chooseImageRobot(driver, image, robot);\n\t\t alertHandler(driver);\n\t\t closeAllOtherWindows(driver, parentWindowHandle);// driver.switchTo().window(parentWindowHandle);\n\t\t \n\t\t\t driver.findElement(upload).click();\n\t\t\t waitUntilElementInvisibility(driver, 10, Common.ajaxThrobber, \"Throbber\", new Exception().getStackTrace()[0]);\n\t\t } catch(Exception e) {}\n\t\t i++;\n\t\t size = driver.findElements(element).size(); \n\t }\n\t\t if (size == 1) { fileWriterPrinter(\"Successful \\\"\" + image + \"\\\" \" + name + \" upload!\"); }\n\t }",
"@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tsuper.run();\r\n\t\t\t\t\t\tMap<String, String> params = new HashMap<String, String>();\r\n\t\t\t\t\t\tparams.put(\"des\", mEdit.getText().toString());\r\n\t\t\t\t\t\tparams.put(\"pwd\", \"0\");\r\n\t\t\t\t\t\tparams.put(\"isPwd\", \"0\");\r\n\t\t\t\t\t\tFile uploadFile = new File(filepath);\r\n\t\t\t\t\t\tFormFile formfile = new FormFile(filename, uploadFile,\r\n\t\t\t\t\t\t\t\t\"file\", \"audio/mpeg\");\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tif (SocketHttpRequester.post(\r\n\t\t\t\t\t\t\t\t\t\"http://shengbo.sinaapp.com/update.php\",\r\n\t\t\t\t\t\t\t\t\tparams, formfile)) {\r\n\t\t\t\t\t\t\t\t// ok\r\n\t\t\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\t\t\tmessage.what = 0;\r\n\t\t\t\t\t\t\t\tmHandler.sendMessage(message);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// error\r\n\t\t\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\t\t\tmessage.what = 1;\r\n\t\t\t\t\t\t\t\tmHandler.sendMessage(message);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t// error\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}",
"public void run() {\n\t\t\t\t\tString resultString = upload(url, formParameters, datas);\n\t\t\t\t\tif (null != resultString) {\n\t\t\t\t\t\tMessage message = handler.obtainMessage(MessageWhat.UPLOADRESP, resultString);\n\t\t\t\t\t\thandler.sendMessage(message);\n\t\t\t\t\t}\n\t\t\t\t}",
"@Override\n\t public Void doInBackground() throws FileNotFoundException, IOException {\n\t boolean done1 = false;\n\t int i = 0;\n\t GUIinteractor guii = new GUIinteractor();\n\t guii.upload(file_uplo, language, type_file);\n\t //System.out.println(\"aaya\");\n\t progressBar.setVisible(false);\n progressBar.setString(\"Document Uploaded\");\n progressBar.setIndeterminate(false);\n progressBar.setStringPainted(false);\n JOptionPane.showOptionDialog(null, \"Document Uploaded\",\"Success\", JOptionPane.DEFAULT_OPTION,JOptionPane.INFORMATION_MESSAGE, null, new Object[]{\"Ok\"}, null);\n \n\t return null;\n\t }",
"public void run() {\n\t\t\t\t\tMessage msg;\n\t\t\t\t\tVector<File> files = new Vector<File>();\n\t\t\t\t\tfiles.add(new File(fileName));\n\t\t\t\t\tString result = upload(url, formParameters, files);\n\t\t\t\t\tif (StringUtils.isEmpty(result)) {\n\t\t\t\t\t\tmsg = handler.obtainMessage(Constant.UPLOAD_FAIL_CODE, Constant.UPLOAD_EXCEPTION);\n\t\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tLog.i(TAG, result);\n\t\t\t\t\t\tmsg = handler.obtainMessage(messageWhat, result);\n\t\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\t}\n\n\t\t\t\t}",
"public void uploader(WebDriver driver, String image, By browse, By upload, String name, StackTraceElement t) throws InterruptedException, NumberFormatException, IOException {\n\t\t String imageDir = Common.localImageDir;\n\t\t String imagePath = imageDir + File.separator + image;\n\t\t \n\t\t int i = 0;\n\t\t String xpath = \"//a[contains(@type,'image/jpeg;')][text()='\" + image + \"']\";\n\t\t By element = By.xpath(xpath);\n\t\t int size = 0;\n\t\t int errors = 0;\n\t\t while ((size == 0) && (errors == 0)) {\t\t\t \t\t \t \n\t\t \t if (i > 0) { fileWriterPrinter(\"Not a successful \\\"\" + image + \"\\\" \" + name + \" upload...will try again...\" + \"[Attempt #\" + (i+1) + \"]\"); }\n\t\t \t driver.findElement(browse).sendKeys(imagePath);\n\t\t \t Thread.sleep(1000);\n\t\t \t driver.findElement(upload).click();\n\t\t \t waitUntilElementInvisibility(driver, 10, Common.ajaxThrobber, \"Throbber\", new Exception().getStackTrace()[0]);\n\t\t \t if (i > 1) { errors = driver.findElements(By.xpath(Drupal.errorUpload)).size(); }\n\t\t \t if (errors > 0) { \n\t\t \t\t fileWriterPrinter(\"\\n\" + \"ERROR! The file could not be uploaded...\");\n\t\t \t\t moveToElement(driver, Drupal.confirmButton);\n\t\t \t\t }\n\t\t \t if (errors > 0) { assertWebElementNotExist(driver, t, By.xpath(Drupal.errorUpload)); }\t \n\t\t i++;\n\t\t Thread.sleep(1000);\n\t\t waitUntilElementPresence(driver, 2, element, \"\\\"\" + image + \"\\\"\", t, false);\n\t\t size = driver.findElements(element).size();\t\t \n\t\t }\n\t\t if (size == 1) { fileWriterPrinter(\"Successful \\\"\" + image + \"\\\" \" + name + \" upload!\"); }\n\t\t Thread.sleep(1000);\n\t }",
"@Override\n\tprotected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\t// Verify the post has the correct encoding\n\t\tif ( ! ServletFileUpload.isMultipartContent(request) ) {\n\t\t\tsendErrMsg(response, \"Invalid request contents format for this service.\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Get the contents from the post request\n\t\tString username = null;\n\t\ttry {\n\t\t\tusername = DashboardUtils.cleanUsername(request.getUserPrincipal().getName().trim());\n\t\t} catch (Exception ex) {\n\t\t\t; // leave username null for error message later\n\t\t}\n\t\t// Get the contents from the post request\n\t\tString datasetIds = null;\n\t\tString uploadTimestamp = null;\n\t\tString isSupToken = null;\n\t\tList<FileItem> fileList = null;\n File uploadFile = null;\n\t\ttry {\n\t\t\tMap<String,List<FileItem>> paramMap = metadataUpload.parseParameterMap(request);\n\t\t\ttry {\n\t\t\t\tList<FileItem> itemList;\n\n\t\t\t\titemList = paramMap.get(\"datasetids\");\n\t\t\t\tif ( (itemList != null) && (itemList.size() == 1) ) {\n\t\t\t\t\tdatasetIds = itemList.get(0).getString();\n\t\t\t\t}\n\t\n\t\t\t\titemList = paramMap.get(\"timestamp\");\n\t\t\t\tif ( (itemList != null) && (itemList.size() == 1) ) {\n\t\t\t\t\tuploadTimestamp = itemList.get(0).getString();\n\t\t\t\t}\n\t\n\t\t\t\titemList = paramMap.get(\"supplemental\");\n\t\t\t\tif ( (itemList != null) && (itemList.size() == 1) ) {\n\t\t\t\t\tisSupToken = itemList.get(0).getString();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfileList = paramMap.get(\"metadataupload\");\n//\t\t\t\tif ( (itemList != null) && (itemList.size() == 1) ) {\n//\t\t\t\t\tmetadataItem = itemList.get(0);\n//\t\t\t\t}\n\t\t\t\t\n\t\t\t} finally {\n\t\t\t\t// Delete everything except for the uploaded metadata file\n\t\t\t\tfor ( List<FileItem> itemList : paramMap.values() ) {\n\t\t\t\t\tif ( ! itemList.equals(fileList) ) {\n \t\t\t\t\tfor ( FileItem item : itemList ) {\n\t\t\t\t\t\t\titem.delete();\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// Verify page contents seem okay\n\t\t\tDashboardConfigStore configStore = DashboardConfigStore.get(true);\n\t\t\tif ( (username == null) || (datasetIds == null) || (uploadTimestamp == null) ||\n\t\t\t\t (fileList == null) || ! Users.validateUser(username) ) {\n\t\t\t\tif ( fileList != null ) {\n\t\t\t\t\tfor ( FileItem item : fileList ) {\n\t\t\t\t\t\titem.delete();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsendErrMsg(response, \"Invalid request contents for this service.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tboolean isSupplemental = isSupToken != null ? Boolean.parseBoolean(isSupToken) : false;\n\t\t\t// TODO: validate parameters\n\t\t\t// save file\n\t\t\tArrayList<String> idList = DashboardUtils.decodeStringArrayList(datasetIds);\n\t\t\tif ( idList.size() > 1 && ! isSupplemental ) {\n\t\t\t\tthrow new IllegalArgumentException(\"Dataset metadata document can only be uploaded for one dataset.\");\n\t\t\t}\n\t\t\tString version = configStore.getUploadVersion();\n for ( FileItem metadataItem : fileList ) {\n \t\t\tString uploadFilename = DashboardUtils.baseName(metadataItem.getName());\n uploadFile = getUploadedFile(metadataItem);\n \t\t\tfor (String datasetId : idList) {\n try ( InputStream is = new FileInputStream(uploadFile);) {\n \t\t\t\tString filename = isSupplemental ? uploadFilename : MetadataFileHandler.metadataFilename(datasetId); \n \t\t\t\tMetadataFileHandler metadataHandler = configStore.getMetadataFileHandler();\n \t\t\t\t// TODO: backup existing ?\n \n DashboardMetadata metadata = \n metadataHandler.saveMetadataFileItem(datasetId, username, uploadTimestamp, \n \t\t\t filename, version, is);\n \t\t\t\t// TODO: validate metadata XML\n \t\t\t\t// TODO: generate PDF\n \t\t\t\t\n \t\t\t\tif ( isSupplemental ) {\n \t\t\t\t\tDataFileHandler cruiseHandler = configStore.getDataFileHandler();\n \t\t\t\t\tcruiseHandler.addAddlDocTitleToDataset(datasetId, metadata);\n \t\t\t\t} else {\n \t\t\t\t\tDataFileHandler df = configStore.getDataFileHandler();\n \t\t\t\t\tDashboardDataset dataset = df.getDatasetFromInfoFile(datasetId);\n \t\t\t\t\tdataset.setMdTimestamp(uploadTimestamp);\n \t\t\t\t\tdf.saveDatasetInfoToFile(dataset, \"Updating metadata timestamp on user upload metadata file.\");\n \t\t\t\t}\n \t\t\t}\n }\n if ( uploadFile != null ) {\n uploadFile.delete();\n uploadFile = null;\n }\n }\n\t\t\t\n\t\t\t// Send the success response\n\t\t\tresponse.setStatus(HttpServletResponse.SC_OK);\n\t\t\tresponse.setContentType(\"text/html;charset=UTF-8\");\n\t\t\ttry ( PrintWriter respWriter = response.getWriter(); ) {\n \t\t\trespWriter.println(DashboardUtils.SUCCESS_HEADER_TAG);\n \t\t\tresponse.flushBuffer();\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\tsendErrMsg(response, \"Error processing the request\\n\" + ex.getMessage());\n\t\t\treturn;\n\t\t} finally {\n if ( uploadFile != null ) {\n uploadFile.delete();\n }\n\t\t}\n\t}",
"protected void doPost(HttpServletRequest request,\n HttpServletResponse response) throws ServletException, IOException {\n String userName = request.getParameter(\"userName\");\n String password = request.getParameter(\"password\");\n\n try {\n // constructs SQL statement\n String sql = \"INSERT INTO users(name,password) VALUES ('\"+ userName + \"','\"+ \n password +\"')\";\n // String sql = \"Insert into gallery(name, description, valu\"\n PreparedStatement statement = conn.prepareStatement(sql);\n // statement.setString(1, taskName);\n // statement.setString(2, taskDesc);\n\n //if (inputStream != null) {\n // fetches input stream of the upload file for the blob column\n // statement.setBlob(3, inputStream);\n // }\n statement.executeUpdate(sql);\n // sends the statement to the database server\n //int row = statement.executeUpdate();\n // if (row > 0) {\n // message = \"Image is uploaded successfully into the Database\";\n // }\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n // sets the message in request scope\n // request.setAttribute(\"Message\", message);\n\n // forwards to the message page\n // getServletContext().getRequestDispatcher(\"/gallery.xhtml\").forward(\n // request, response);\n response.sendRedirect(\"welcome.xhtml\");\n }",
"private void uploadPhotoButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_uploadPhotoButtonActionPerformed\n\n clearInformation();\n String key = keyUploadTextField.getText();\n String secret = secretUploadTextField.getText();\n if (key.equals(EMPTY)) {\n this.displayInformation(PLEASE_EDIT_KEY);\n } else if (secret.equals(EMPTY)) {\n this.displayInformation(PLEASE_EDIT_SECRET);\n } else {\n\n Rsp rsp = flickrService.getFrob(key, secret);\n frob = ((Frob) (rsp.getAny())).getValue();\n String url = flickrService.getUrlAuth(key, secret, frob);\n urlTextField.setText(url);\n displayInformation(REQUEST_OK);\n }\n validatedUrlButton.setEnabled(true);\n }",
"public Onlineupload() {\n initComponents();\n }",
"private void uploadRequest(String msg){\n String path = \"\";\r\n try {\r\n path = getPath(imageUri);\r\n }\r\n catch (URISyntaxException e){\r\n showMsg(\"wrong uri\");\r\n }\r\n String number = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).getString(\"number\",\"12345\");\r\n\r\n AndroidNetworking.upload(Endpoints.upload_request)\r\n .addMultipartFile(\"file\",new File(path))\r\n .addQueryParameter(\"message\",msg)\r\n .addQueryParameter(\"number\",number)\r\n .setPriority(Priority.HIGH)\r\n .build()\r\n .setUploadProgressListener(new UploadProgressListener() {\r\n @Override\r\n public void onProgress(long bytesUploaded, long totalBytes) {\r\n // do anything with progress\r\n long progress = (bytesUploaded/totalBytes*100);\r\n chooseImageText.setText(String.valueOf(progress));\r\n chooseImageText.setOnClickListener(null);\r\n }\r\n })\r\n .getAsJSONObject(new JSONObjectRequestListener() {\r\n @Override\r\n public void onResponse(JSONObject response) {\r\n try {\r\n if(response.getBoolean(\"success\")){\r\n showMsg(\"Succes\");\r\n MakeRequestActivity.this.finish();\r\n }\r\n else {\r\n showMsg(response.getString(\"message\"));\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n\r\n @Override\r\n public void onError(ANError anError) {\r\n\r\n }\r\n });\r\n\r\n }",
"public void handleFileUpload(FileUploadEvent event) {\r\n FacesMessage msg = new FacesMessage(\"Succesful\", event.getFile().getFileName() + \" is uploaded.\");\r\n UploadedFile file = event.getFile();\r\n try {\r\n file.write(super.getUploadFolder() + \"/\" + file.getFileName());\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n// RequestContext.getCurrentInstance().execute(\"PF('uploadJs').start()\");\r\n System.out.println(event.getFile().getFileName());\r\n FacesContext.getCurrentInstance().addMessage(null, msg);\r\n }",
"public void uploader(WebDriver driver, String image, By browse, By upload, Robot robot) throws NumberFormatException, IOException {\n\t\t String parentWindowHandle = driver.getWindowHandle();\n\t\t int i = 0;\n\t\t String xpath = \"//a[contains(@type,'image/jpeg;')][text()='\" + image + \"']\";\n\t\t By element = By.xpath(xpath);\n\t\t int size = driver.findElements(element).size();\t\t \n\t\t while (size == 0) {\n\t\t try {\n\t\t \t String previousURL = driver.getCurrentUrl();\n\t\t if (i > 0) { fileWriterPrinter(\"Not a successful \\\"\" + image + \"\\\" image upload...will try again...\"); }\n\t\t\t \n\t\t robot.keyPress(KeyEvent.VK_CANCEL); // close previous in the beginning\n\t\t robot.keyRelease(KeyEvent.VK_CANCEL);\n\t\t driver.findElement(browse).click();\n\t\t\t \n\t\t waitUntilUrl(driver, previousURL); \n\t\t chooseImageRobot(driver, image, robot);\n\t\t alertHandler(driver);\n\t\t closeAllOtherWindows(driver, parentWindowHandle);// driver.switchTo().window(parentWindowHandle);\n\t\t \n\t\t\t driver.findElement(upload).click();\n\t\t\t waitUntilElementInvisibility(driver, 10, Common.ajaxThrobber, \"Throbber\", new Exception().getStackTrace()[0]);\n\t\t } catch(Exception e) {}\n\t\t i++;\n\t\t size = driver.findElements(element).size(); \n\t }\n\t\t if (size == 1) { fileWriterPrinter(\"Successful \\\"\" + image + \"\\\" image upload!\"); }\n\t }",
"@RequestMapping(value = \"/singleUpload\", method = RequestMethod.POST)\r\n\tpublic @ResponseBody boolean test(HttpServletRequest request,\r\n\t\t\t@RequestParam(\"file\") CommonsMultipartFile singleUploadFile) {\r\n\t\tboolean status = false;\r\n\t\tSystem.out.println(\"////// Inside there\");\r\n\r\n\t\tSystem.out.println(\"////// Inside there reh\" + singleUploadFile.getOriginalFilename());\r\n\r\n\t\tString fileName[] = singleUploadFile.getOriginalFilename().split(\"_\");\r\n\t\tString folderName = fileName[0];\r\n\t\t\r\n\t\t/*\r\n\t\t * try { ServletContext context = request.getServletContext(); String\r\n\t\t * uploadPath = context.getRealPath(\"/\" + folderName); File uploadDir =\r\n\t\t * new File(uploadPath); if (!uploadDir.exists()) { boolean success =\r\n\t\t * uploadDir.mkdir();\r\n\t\t * \r\n\t\t * if (success) { success = (new File(uploadDir + \"/\" +\r\n\t\t * subFolderName)).mkdir(); }\r\n\t\t * \r\n\t\t * } String path = uploadDir + \"/\" + subFolderName + \"/\" +fileName[2];\r\n\t\t * System.out.println(\"Path is\" + path); File serverFile = new\r\n\t\t * File(path); BufferedOutputStream stream = new\r\n\t\t * BufferedOutputStream(new FileOutputStream(serverFile));\r\n\t\t * stream.write(singleUploadFile.getBytes()); stream.close(); url =\r\n\t\t * folderName+\"_\"+subFolderName+\"_\"+fileName[2];\r\n\t\t * \r\n\t\t * }\r\n\t\t */ \r\n\t\ttry {\r\n\t\t\tServletContext context = request.getServletContext();\r\n\t\t\tString uploadPath = context.getRealPath(\"/\" + folderName);\r\n\t\t\tFile uploadDir = new File(uploadPath);\r\n\t\t\tif (!uploadDir.exists()) {\r\n\t\t\t\tboolean success = uploadDir.mkdir();\r\n\t\t\t\tif (success) {\r\n\t\t\t\t\tsuccess = (new File(uploadDir + \"/temp\")).mkdir();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tString path = uploadDir + \"/temp/\" + fileName[1];\r\n\t\t\tSystem.out.println(\"Path is\" + path);\r\n\t\t\tFile serverFile = new File(path);\r\n\t\t\tBufferedOutputStream stream = new BufferedOutputStream(new FileOutputStream(serverFile));\r\n\t\t\tstream.write(singleUploadFile.getBytes());\r\n\t\t\tstatus = true;\r\n\t\t\tstream.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tAdminResponseClass adminResponseClass = new AdminResponseClass();\r\n\t\tadminResponseClass.setStatus(status);\r\n\t\treturn adminResponseClass.isStatus();\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tprotected void storeInSessionFlash(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\tServletFileUpload upload = new ServletFileUpload(factory);\n\t\t\n\t\ttry {\n\t\t\tif(ServletFileUpload.isMultipartContent(request)){\n\t\t\t\tList<FileItem> fileItemList = upload.parseRequest(request);\n\t\t\t\tMap<String,Object> jsonResponse = new HashMap<String,Object>();\n\t\t\t\tresponse.setContentType(\"text/json\");\n\t\t\t\tfor(FileItem fileItem : fileItemList){\n\t\t\t\t\tif(fileItem.isFormField()){\n\t\t\t\t\t\tlogger.info(\"FileUploadServlet.storeInSessionFlash - file item is form field::: \" + fileItem);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t\n\t\t\t\t\t\tlogger.info(\"FileUploadServlet.storeInSessionFlash.NOT formField \" + fileItem);\n\t\t\t\t\t\tString id = UUID.randomUUID().toString();\n\t\t\t\t\t\trequest.getSession().setAttribute(id, fileItem);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//--- RESPONSE - \n\t\t\t\t\t\tjsonResponse = generateJsonResponse(fileItem);\n\t\t\t\t\t\tjsonResponse.put(\"id\", id);\n\t\t\t\t\t\tjsonResponse.put(\"sessionAttributeId\", id);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//IE is very sensitive on the response\n\t\t\t\tJacksonUtils.serialize(jsonResponse, response.getWriter());\n\t\t\t\t\n\t\t\t}\n\t\t} \n\t\tcatch (Exception exp) {\n\t\t\tlogger.error(exp.getMessage(),exp);\n\t\t\tJacksonUtils.serialize(EntityModel.createErrorMessage(\"Problem Uploading Audio\", exp.getMessage()), response.getWriter());\n\t\t} \n\t}",
"@And(\"Select Attach File Button\")\n\tpublic void AttachFile() throws IOException, InterruptedException {\n\t\tdriver.findElement(By.xpath(\"//div[@class='bAK' ]//child::div[@aria-label='Attach files']\")).click();\n\t\tRuntime.getRuntime().exec( System.getProperty(\"user.dir\")+ \"\\\\src\\\\test\\\\resources\\\\FileUpload.exe\");\n\t\tThread.sleep(10000); \n\t\t}",
"public void _WWWFORMB() {\n if (mOp.Equal(m$.var(\"YBUTT\").get(),\"\")) {\n return;\n }\n //<< NEW YPRINT,YQ,YTARGET,blnButtons,newForm,strPic,idType,oldYBACK,idYLFN\n mVar YPRINT = m$.var(\"YPRINT\");\n mVar YQ = m$.var(\"YQ\");\n mVar YTARGET = m$.var(\"YTARGET\");\n mVar blnButtons = m$.var(\"blnButtons\");\n mVar newForm = m$.var(\"newForm\");\n mVar strPic = m$.var(\"strPic\");\n mVar idType = m$.var(\"idType\");\n mVar oldYBACK = m$.var(\"oldYBACK\");\n mVar idYLFN = m$.var(\"idYLFN\");\n m$.newVar(YPRINT,YQ,YTARGET,blnButtons,newForm,strPic,idType,oldYBACK,idYLFN);\n //<< \n //<< set blnButtons = $$$WWW120PicturesAsButtons($get(YVOR))\n blnButtons.set(include.WWWConst.$$$WWW120PicturesAsButtons(m$,m$.Fnc.$get(m$.var(\"YVOR\"))));\n //<< set idYLFN = $get(YLFN)\n idYLFN.set(m$.Fnc.$get(m$.var(\"YLFN\")));\n //<< \n //<< ;IF YBEDBER=1 WRITE YCR,YCR,\"<!-- ************************* EXTRA BUTTON (WWWFORMB) ************************* -->\",YCR,YCR\n //<< \n //<< SET YBUTT=$TRANSLATE(YBUTT,\";\",\",\")\n mVar YBUTT = m$.var(\"YBUTT\");\n YBUTT.set(m$.Fnc.$translate(m$.var(\"YBUTT\").get(),\";\",\",\"));\n //<< \n //<< ;---------------------------------------\n //<< ; YA = Button Record\n //<< ; YVOR = Form Definition\n //<< ;---------------------------------------\n //<< \n //<< set oldYBACK = YBACK\n oldYBACK.set(m$.var(\"YBACK\").get());\n //<< \n //<< for YI=1:1 {\n mVar YI = m$.var(\"YI\");\n for (YI.set(1);(true);YI.set(mOp.Add(YI.get(),1))) {\n //<< quit:$PIECE(YBUTT,\",\",YI)=\"\"\n if (mOp.Equal(m$.Fnc.$piece(YBUTT.get(),\",\",YI.get()),\"\")) {\n break;\n }\n //<< \n //<< set YLFN = $piece(YBUTT,\",\",YI) ;NÄCHSTER BUTTEN\n mVar YLFN = m$.var(\"YLFN\");\n YLFN.set(m$.Fnc.$piece(YBUTT.get(),\",\",YI.get()));\n //<< set YA = $get(^WWW124(0,YFORM,SPRACHE,YLFN,1))\n mVar YA = m$.var(\"YA\");\n YA.set(m$.Fnc.$get(m$.var(\"^WWW124\",0,m$.var(\"YFORM\").get(),m$.var(\"SPRACHE\").get(),YLFN.get(),1)));\n //<< continue:YA=\"\"\n if (mOp.Equal(YA.get(),\"\")) {\n continue;\n }\n //<< \n //<< set YBACK = oldYBACK\n mVar YBACK = m$.var(\"YBACK\");\n YBACK.set(oldYBACK.get());\n //<< if $EXTRACT($$$WWW124TargetFrameName(YA))=\"@\" set YBACK=\"\" ;TYBD;OHNE YBACK ;without\n if (mOp.Equal(m$.Fnc.$extract(include.WWWConst.$$$WWW124TargetFrameName(m$,YA)),\"@\")) {\n YBACK.set(\"\");\n }\n //<< \n //<< set strPic = $$$WWW124PictureFileOnButton(YA)\n strPic.set(include.WWWConst.$$$WWW124PictureFileOnButton(m$,YA));\n //<< if blnButtons && (strPic=\"\") {\n if (mOp.Logical(blnButtons.get()) && (mOp.Equal(strPic.get(),\"\"))) {\n //<< set strPic = $zconvert($extract($$^WWWUMLAU($$$WWW124ButtonDescription(YA),3)),\"L\")\n strPic.set(m$.Fnc.$zconvert(m$.Fnc.$extract(m$.fnc$(\"WWWUMLAU.main\",include.WWWConst.$$$WWW124ButtonDescription(m$,YA),3)),\"L\"));\n //<< if '$find(\"abcdefghijklmnopqrstuvwxyzöäüß@?1234567890\",strPic) SET strPic=\"x\"\n if (mOp.Not(m$.Fnc.$find(\"abcdefghijklmnopqrstuvwxyzöäüß@?1234567890\",strPic.get()))) {\n strPic.set(\"x\");\n }\n //<< set strPic = strPic_\".gif\" ;KEIN BUTTON ABER BUTTON ;no yet\n strPic.set(mOp.Concat(strPic.get(),\".gif\"));\n }\n //<< }\n //<< \n //<< set newForm = $$$WWW124NewFormOnClick(YA)\n newForm.set(include.WWWConst.$$$WWW124NewFormOnClick(m$,YA));\n //<< continue:$$Disabled(newForm,blnButtons,strPic,1,\"\",\"\",idYLFN) ;BR014409\n if (mOp.Logical(m$.fnc$(\"Disabled\",newForm.get(),blnButtons.get(),strPic.get(),1,\"\",\"\",idYLFN.get()))) {\n continue;\n }\n //<< continue:$$^WWWACCESS($$$WWW124Authorization1(YA),$$$WWW124Module1(YA))'=1 ;KEIN ZUGANG ;no\n if (mOp.NotEqual(m$.fnc$(\"WWWACCESS.main\",include.WWWConst.$$$WWW124Authorization1(m$,YA),include.WWWConst.$$$WWW124Module1(m$,YA)),1)) {\n continue;\n }\n //<< continue:$$DontShow()\n if (mOp.Logical(m$.fnc$(\"DontShow\"))) {\n continue;\n }\n //<< \n //<< if $$$WWW124AutomaticSUBMIT(YA) &&\n //<< (newForm'=\"\") &&\n //<< ($$$WWW124HyperEventOnClick(YA)'=\"\") &&\n //<< ($$$WWW124ExecuteOnClick(YA)=\"\") {\n if (mOp.Logical(include.WWWConst.$$$WWW124AutomaticSUBMIT(m$,YA)) && (mOp.NotEqual(newForm.get(),\"\")) && (mOp.NotEqual(include.WWWConst.$$$WWW124HyperEventOnClick(m$,YA),\"\")) && (mOp.Equal(include.WWWConst.$$$WWW124ExecuteOnClick(m$,YA),\"\"))) {\n //<< \n //<< set $$$WWW124ExecuteOnClick(YA)=\"SUBMIT\" ;AUTOSUBMIT\n include.WWWConst.$$$WWW124ExecuteOnClickSet(m$,YA,\"SUBMIT\");\n }\n //<< }\n //<< set YPRINT=\"\"\n YPRINT.set(\"\");\n //<< if $$$WWW124OutputWithWindowprint(YA)=$$$YES set YPRINT=$$$YES ;ZIEL DRUCKEN ;target print\n if (mOp.Equal(include.WWWConst.$$$WWW124OutputWithWindowprint(m$,YA),include.COMSYS.$$$YES(m$))) {\n YPRINT.set(include.COMSYS.$$$YES(m$));\n }\n //<< \n //<< set YTARGETF = $$$WWW124TargetFrameName(YA)\n mVar YTARGETF = m$.var(\"YTARGETF\");\n YTARGETF.set(include.WWWConst.$$$WWW124TargetFrameName(m$,YA));\n //<< if $extract(YTARGETF)=\"@\" set YTARGETF = @$extract(YTARGETF,2,99) ;FIS;26.09.03;ZIELTARGET AUS PARAMETER ;out of parameter\n if (mOp.Equal(m$.Fnc.$extract(YTARGETF.get()),\"@\")) {\n YTARGETF.set(m$.indirectVar(m$.Fnc.$extract(YTARGETF.get(),2,99)).get());\n }\n //<< set YTARGET = YTARGETF\n YTARGET.set(YTARGETF.get());\n //<< if $get(YVOR1)'=\"\" set YTARGET = $piece($$$WWW012TargetFrameName(YVOR1),\"/\",1)_YUSER\n if (mOp.NotEqual(m$.Fnc.$get(m$.var(\"YVOR1\")),\"\")) {\n YTARGET.set(mOp.Concat(m$.Fnc.$piece(include.WWWConst.$$$WWW012TargetFrameName(m$,m$.var(\"YVOR1\")),\"/\",1),m$.var(\"YUSER\").get()));\n }\n //<< \n //<< set YCONF1=\"\" ;VOR URL ;pre- URL\n mVar YCONF1 = m$.var(\"YCONF1\");\n YCONF1.set(\"\");\n //<< set YCONF2=\"\"\n mVar YCONF2 = m$.var(\"YCONF2\");\n YCONF2.set(\"\");\n //<< if $$$WWW124AcknowledgementTextBefore(YA)'=\"\" { ; FIXME : Internationalise\n if (mOp.NotEqual(include.WWWConst.$$$WWW124AcknowledgementTextBefore(m$,YA),\"\")) {\n //<< set YCONF1 = \"if (confirm('\"_$TRANSLATE($$$WWW124AcknowledgementTextBefore(YA),\"'\"\"\",\"´´\")_\"')) {\" ;FIS;31.01.05\n YCONF1.set(mOp.Concat(mOp.Concat(\"if (confirm('\",m$.Fnc.$translate(include.WWWConst.$$$WWW124AcknowledgementTextBefore(m$,YA),\"'\\\"\",\"´´\")),\"')) {\"));\n //<< set YCONF2 = \"}\"\n YCONF2.set(\"}\");\n }\n //<< }\n //<< \n //<< ;-----------------------------------\n //<< ; *** EXECUTE # ***\n //<< ;-----------------------------------\n //<< \n //<< if $$$WWW124SearchFunctionOnClick(YA)'=\"\" {\n if (mOp.NotEqual(include.WWWConst.$$$WWW124SearchFunctionOnClick(m$,YA),\"\")) {\n //<< set $$$WWW124DoNotPrepareHTML(YA)=0\n include.WWWConst.$$$WWW124DoNotPrepareHTMLSet(m$,YA,0);\n //<< set idType = $case(YART,\"M\":3,\"D\":2,\"P\":1,:\"\")\n idType.set(m$.Fnc.$case(m$.var(\"YART\").get(),\"M\",3,\"D\",2,\"P\",1,\"\"));\n //<< if idType'=\"\" {\n if (mOp.NotEqual(idType.get(),\"\")) {\n //<< set $$$WWW124ExecuteOnClick(YA) = \"D ^WWWSBU(\"_idType_\")\"\n include.WWWConst.$$$WWW124ExecuteOnClickSet(m$,YA,mOp.Concat(mOp.Concat(\"D ^WWWSBU(\",idType.get()),\")\"));\n }\n }\n //<< }\n //<< }\n //<< \n //<< if $$$WWW124HyperEventOnClick(YA)'=\"\" {\n if (mOp.NotEqual(include.WWWConst.$$$WWW124HyperEventOnClick(m$,YA),\"\")) {\n //<< do HYPER\n m$.Cmd.Do(\"HYPER\");\n }\n //<< \n //<< } elseif $$$WWW124ExecuteForManualLink(YA)'=\"\" {\n else if (mOp.NotEqual(include.WWWConst.$$$WWW124ExecuteForManualLink(m$,YA),\"\")) {\n //<< do MANU\n m$.Cmd.Do(\"MANU\");\n }\n //<< \n //<< } elseif $$$WWW124ChangeoversWithOnClick(YA)'=\"\" {\n else if (mOp.NotEqual(include.WWWConst.$$$WWW124ChangeoversWithOnClick(m$,YA),\"\")) {\n //<< do SEITE\n m$.Cmd.Do(\"SEITE\");\n }\n //<< \n //<< } else {\n else {\n //<< if $$$WWW124QueryOnClick(YA)'=\"\" set $$$WWW124ExecuteOnClick(YA)=\"QUERY,\"_$$$WWW124QueryOnClick(YA) ;QUERY AUFRUFEN\n if (mOp.NotEqual(include.WWWConst.$$$WWW124QueryOnClick(m$,YA),\"\")) {\n include.WWWConst.$$$WWW124ExecuteOnClickSet(m$,YA,mOp.Concat(\"QUERY,\",include.WWWConst.$$$WWW124QueryOnClick(m$,YA)));\n }\n //<< \n //<< if newForm'=\"\" {\n if (mOp.NotEqual(newForm.get(),\"\")) {\n //<< do NORM\n m$.Cmd.Do(\"NORM\");\n }\n //<< \n //<< } elseif ($$$WWW124ExecuteOnClick(YA)'=\"\") || ($$$WWW124FunctionJavaScriptOnClick(YA)'=\"\") {\n else if ((mOp.NotEqual(include.WWWConst.$$$WWW124ExecuteOnClick(m$,YA),\"\")) || (mOp.NotEqual(include.WWWConst.$$$WWW124FunctionJavaScriptOnClick(m$,YA),\"\"))) {\n //<< write \"<TD ALIGN='ABSTOP'>\" ;BR014771\n m$.Cmd.Write(\"<TD ALIGN='ABSTOP'>\");\n //<< do EXEC\n m$.Cmd.Do(\"EXEC\");\n //<< write \"</TD>\" ;BR014771\n m$.Cmd.Write(\"</TD>\");\n }\n //<< \n //<< } elseif $$$WWW124LinkWithexeOrHttp(YA)'=\"\" {\n else if (mOp.NotEqual(include.WWWConst.$$$WWW124LinkWithexeOrHttp(m$,YA),\"\")) {\n //<< do VERKN\n m$.Cmd.Do(\"VERKN\");\n }\n }\n }\n //<< }\n //<< }\n //<< }\n //<< \n //<< set YLFN=idYLFN ;BR014409\n mVar YLFN = m$.var(\"YLFN\");\n YLFN.set(idYLFN.get());\n //<< \n //<< QUIT\n return;\n }",
"private void submit() {\r\n\t\tassignTracked();\r\n\t\tBkitPoma.startLoading(constants.BkitPoma_startLoading_wating());\r\n\t\tpostSubmit();\r\n\t}",
"public void testSubmitWithoutUploadFile()\n\t{\n\t\ttester.startPage(MockFormFileUploadPage.class);\n\t\tMockFormFileUploadPage page = (MockFormFileUploadPage)tester.getLastRenderedPage();\n\n\t\tSession.get().setLocale(Locale.US);\n\n\t\tFormTester formTester = tester.newFormTester(\"form\");\n\t\t// without file upload\n\t\tformTester.submit();\n\t\tassertNull(page.getFileUpload());\n\n\t\ttester.assertErrorMessages(new String[] { \"Field 'file' is required.\" });\n\t}",
"public void onSaveFile(){\n\n\t\t\n\t\tFormUtil.dlg.setText(\"Saving...\");\n\t\tFormUtil.dlg.show();\n\t\tGWT.runAsync(new RunAsyncCallback() {\n\t public void onFailure(Throwable caught) {}\n\t public void onSuccess() {\t \n\t\t\t\t//DeferredCommand.addCommand(new Command() {\n\t \t Scheduler scheduler = Scheduler.get();\n\t \t scheduler.scheduleDeferred(new Command() {\n\t\t\t\t\tpublic void execute() {\n\t\t\t\t\t FormDef form = controller.getSelectedForm();\t\t\t\t \t\t\t\t\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\tif(form != null){\n\t\t\t\t\t\t\t\tsaveFile(false);\n\t\t\t\t\t\t\t\tFormUtil.dlg.hide();\n\t\t\n\t\t\t\t\t\t\t\tString fileName = \"filename\";\n\t\t\t\t\t\t\t\tfileName = form.getName();\n\t\t\t\t\t\t\t\tString xmlFormStr = FormHandler.writeToXML(form);\n\t\t\t\t\t\t\t\tSaveToFileDialog dlg = SaveToFileDialog.getInstnace(xmlFormStr, fileName);\n\t\t\t\t\t\t\t\tdlg.center();\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tFormUtil.dlg.hide();\n\t\t\t\t\t\t\t\tWindow.alert(\"No form to save\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(Exception ex){\n\t\t\t\t\t\t\tFormUtil.displayException(ex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t }\n\t\t});\n\t}",
"private void showImageUpload() {\n\n //Showing dialog\n\n final Dialog dialog = new Dialog(UserHomeActivity.this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.useruploadimage);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n dialog.show();\n\n\n //Hooks\n // backButton = dialog.findViewById(R.id.backButton);\n\n //User will click on back button\n/* backButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n dialog.dismiss();\n }\n });*/\n\n\n submitUserImage = dialog.findViewById(R.id.submitUserQuoteandJokes);\n uploadUserImageView = dialog.findViewById(R.id.uploadImage);\n imageType = dialog.findViewById(R.id.typeDetails);\n\n\n userUploadContent = dialog.findViewById(R.id.shareAndUploadJokesAndQuote);\n\n\n //getting the url from upload image\n uploadUserImageView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n //calling choose picture\n\n choosePicture();\n\n }\n });\n\n\n\n userUploadContent.setText(\"Upload Jokes and Quotes\");\n\n // Uncheck or reset the radio buttons initially\n\n imageType.clearCheck();\n\n\n // Add the Listener to the RadioGroup\n imageType.setOnCheckedChangeListener(\n new RadioGroup\n .OnCheckedChangeListener() {\n @Override\n\n // The flow will come here when\n // any of the radio buttons in the radioGroup\n // has been clicked\n\n // Check which radio button has been clicked\n public void onCheckedChanged(RadioGroup group,\n int checkedId) {\n // Get the selected Radio Button\n RadioButton\n radioButton\n = (RadioButton) group\n .findViewById(checkedId);\n }\n });\n\n\n\n\n //Submit image user\n submitUserImage.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n //checking internet Connectivity\n\n InternetConnectivityCheck connectivityCheck = new InternetConnectivityCheck();\n\n if (connectivityCheck.isNetworkAvailable(UserHomeActivity.this)) {\n\n // When submit button is clicked,\n // Ge the Radio Button which is set\n // If no Radio Button is set, -1 will be returned\n\n int selectedId = imageType.getCheckedRadioButtonId();\n\n if (selectedId == -1) {\n Toast.makeText(UserHomeActivity.this,\n \"Please select the type\",\n Toast.LENGTH_SHORT)\n .show();\n } else if (imageUri == null) {\n\n Toast.makeText(UserHomeActivity.this,\n \"Image would not be empty\",\n Toast.LENGTH_SHORT)\n .show();\n\n } else {\n RadioButton radioButton\n = (RadioButton) imageType\n .findViewById(selectedId);\n\n //Calling method to upload image\n\n updateImage(resultUri, radioButton.getText().toString(),dialog);\n\n }\n }\n else{\n\n Toast.makeText(UserHomeActivity.this, \"Network error\", Toast.LENGTH_SHORT).show();\n }\n\n }\n\n });\n\n\n }",
"UploadInfo advancedUpload(AdvanceFile file);",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\n String schemeName = request.getParameter(\"txtName\");\r\n String desc = request.getParameter(\"txtDesc\");\r\n String segment = request.getParameter(\"txtSegment\");\r\n String purpose = request.getParameter(\"txtPurpose\");\r\n \r\n InputStream inputStream = null; // input stream of the upload file\r\n \r\n // obtains the upload file part in this multipart request\r\n Part filePart = request.getPart(\"file\");\r\n if (filePart != null) {\r\n // prints out some information for debugging\r\n System.out.println(filePart.getName());\r\n System.out.println(filePart.getSize());\r\n System.out.println(filePart.getContentType());\r\n \r\n // obtains input stream of the upload file\r\n inputStream = filePart.getInputStream();\r\n }\r\n \r\n Connection conn = null; // connection to the database\r\n String message = null; // message will be sent back to client\r\n \r\n try {\r\n // connects to the database\r\n DriverManager.registerDriver(new com.mysql.jdbc.Driver());\r\n conn = DriverManager.getConnection(dbURL, dbUser, dbPass);\r\n \r\n // constructs SQL statement\r\n String sql = \"INSERT INTO `scheme` (`id`, `schemeName`, `desc`, `segment`, `purpose`, `file`) values (?,?,?,?,?,?)\";\r\n PreparedStatement statement = conn.prepareStatement(sql);\r\n statement.setInt(1, 0);\r\n statement.setString(2, schemeName);\r\n statement.setString(3, desc);\r\n statement.setString(4, segment);\r\n statement.setString(5, purpose);\r\n \r\n if (inputStream != null) {\r\n // fetches input stream of the upload file for the blob column\r\n statement.setBlob(6, inputStream);\r\n }\r\n \r\n // sends the statement to the database server\r\n int row = statement.executeUpdate();\r\n if (row > 0) {\r\n message = \"File uploaded and saved into database\";\r\n }\r\n } catch (SQLException ex) {\r\n message = \"ERROR: \" + ex.getMessage();\r\n ex.printStackTrace();\r\n } finally {\r\n if (conn != null) {\r\n // closes the database connection\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n // sets the message in request scope\r\n request.setAttribute(\"Message\", message);\r\n \r\n // forwards to the message page\r\n getServletContext().getRequestDispatcher(\"/Message.jsp\").forward(request, response);\r\n }\r\n \r\n }",
"@Override\n public void onClick(View v) {\n new UploadFileToServer().execute();\n }",
"protected javax.swing.JButton getJButtonSend() {\n\t\tif(jButton == null) {\n\t\t\tjButton = new javax.swing.JButton();\n\t\t\tjButton.setPreferredSize(new java.awt.Dimension(85,25));\n\t\t\tjButton.setText(\"Send\");\n\t\t\tjButton.setName(\"Send\");\n\t\t\tjButton.setMnemonic(java.awt.event.KeyEvent.VK_S);\n\t\t\t\n\t\t\tjButton.setToolTipText(\"Send the play list file and save it locally\");\n\n\t\t\tjButton.addActionListener(new java.awt.event.ActionListener() { \n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\t\n\t\t\t\t\tString msg = getInvalidMsg();\n\t\t\t\t\tif( msg != null ) {\t\t\t\t\t\t\t\n\t\t\t\t\t\tJOptionPane.showMessageDialog(PlayListDialog.this,\n\t\t\t\t\t\t\tmsg,\n\t\t\t\t\t\t\t\"Invalid Input\", JOptionPane.OK_OPTION);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\twriteToPropFile( LMMUtils.PLAYER_FILE );\n\t\n\t\t\t\t\t\t\tsendFileMsg();\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch( IOException ioe ) {\n\t\t\t\t\t\t\tLMMLogger.error( \"Unable to write & send play list file\", ioe );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tdispose();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn jButton;\n\t}",
"@Override\n\t\tprotected String [] doInBackground(String... params) {\n\t\t\t \n\t\t\n\t\t\t \t String fileName = params[0];\n\t\t\t Date d=new Date();\n\t\t\t start_upload=d.getTime();\n\t\t\t DataOutputStream dos = null; \n\t\t\t String lineEnd = \"\\r\\n\";\n\t\t\t String twoHyphens = \"--\";\n\t\t\t String boundary = \"*****\";\n\t\t\t int bytesRead, bytesAvailable, bufferSize;\n\t\t\t byte[] buffer;\n\t\t\t int maxBufferSize = 1 * 1024 * 1024; \n\t\t\t File sourceFile = new File(params[0]); \n\t\t\t \n\t\t\t \n\t\t\t {\n\t\t\t\t try { \n\t\t\t\t \t \n\t\t\t\t \t if (isCancelled())\n\t\t\t\t\t {fileInputStream.close();}\n\t\t\t\t \t else\n\t\t\t\t \t {\n\t\t\t\t \t \n\t\t\t\t \t \n\t\t\t\t \t // open a URL connection to the Servlet\n\t\t\t\t fileInputStream = new FileInputStream(sourceFile);\n\t\t\t\t URL url = new URL(upLoadServerUri);\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t // Open a HTTP connection to the URL\n\t\t\t\t conn = (HttpURLConnection) url.openConnection(); \n\t\t\t\t conn.setDoInput(true); // Allow Inputs\n\t\t\t\t conn.setDoOutput(true); // Allow Outputs\n\t\t\t\t conn.setUseCaches(false); // Don't use a Cached Copy\n\t\t\t\t conn.setRequestMethod(\"POST\");\n\t\t\t\t conn.setRequestProperty(\"Connection\", \"Keep-Alive\");\n\t\t\t\t conn.setRequestProperty(\"ENCTYPE\", \"multipart/form-data\");\n\t\t\t\t conn.setRequestProperty(\"Content-Type\", \"multipart/form-data;boundary=\" + boundary);\n\t\t\t\t conn.setRequestProperty(\"uploaded_file\", fileName); \n\t\t\t\t \n\t\t\t\t dos = new DataOutputStream(conn.getOutputStream());\n\t\t\t\t \n\t\t\t\t dos.writeBytes(twoHyphens + boundary + lineEnd); \n\t\t\t\t dos.writeBytes(\"Content-Disposition: form-data; name=\\\"uploaded_file\\\";filename=\\\"\"\n\t\t\t\t \t\t + fileName + \"\\\"\" + lineEnd);\n\t\t\t\t \n\t\t\t\t dos.writeBytes(lineEnd);\n\t\t\t\t \n\t\t\t\t // create a buffer of maximum size\n\t\t\t\t bytesAvailable = fileInputStream.available(); \n\t\t\t\t \n\t\t\t\t bufferSize = Math.min(bytesAvailable, maxBufferSize);\n\t\t\t\t buffer = new byte[bufferSize];\n\t\t\t\t int totalBytesWritten=0;\n\t\t\t\t // read file and write it into form...\n\t\t\t\t bytesRead = fileInputStream.read(buffer, 0, bufferSize); \n\t\t\t\t \n\t\t\t\t while (bytesRead > 0) {\n\t\t\t\t \t \n\t\t\t\t dos.write(buffer, 0, bufferSize);\n\t\t\t\t // sentBytes += bufferSize;\n\t\t\t\t // sentBytes += bufferSize;\n\t\t\t\t Log.d(\"bytes Read\", \"\"+bytesRead);\n\t\t\t\t totalBytesWritten =totalBytesWritten+bufferSize;\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t bytesAvailable = fileInputStream.available();\n\t\t\t\t Log.d(\"bytesAvailable\", \"\"+bytesAvailable);\n\t\t\t\t bufferSize = Math.min(bytesAvailable, maxBufferSize);\n\t\t\t\t Log.d(\"bufferSize\",\"\"+bufferSize);\n\t\t\t\t bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n\t\t\t\t Log.d(\"bytesRead\", \"\"+bytesRead);\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 // send multipart form data necesssary after file data...\n\t\t\t\t dos.writeBytes(lineEnd);\n\t\t\t\t dos.writeBytes(twoHyphens + boundary + twoHyphens + lineEnd);\n\t\t\t\t \n\t\t\t\t // Responses from the server (code and message)\n\t\t\t\t serverResponseCode = conn.getResponseCode();\n\t\t\t\t String serverResponseMessage = conn.getResponseMessage();\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t Log.i(\"uploadFile\", \"HTTP Response is : \" \n\t\t\t\t \t\t + serverResponseMessage + \": \" + serverResponseCode);\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 if(serverResponseCode == 200){\n\t\t\t\t \t \n\t\t\t\t \n\t\t\t\t } \n\t\t\t\t \n\t\t\t\t //close the streams //\n\t\t\t\t fileInputStream.close();\n\t\t\t\t dos.flush();\n\t\t\t\t dos.close();\n\t\t\t\t \t }\n\t\t\t\t } catch (MalformedURLException ex) {\n\t\t\t\t \t \n\t\t\t\t Ret[0]=ex.getMessage();\n\t\t\t\t Log.e(\"Upload file to server\", \"error: \" + ex.getMessage(), ex); \n\t\t\t\t } catch (Exception e) {\n\t\t\t\t \t Ret[1]=e.getMessage();\n\t\t\t\t \n\t\t\t\t Log.e(\"Upload file to server Exception\", \"Exception : \" \n\t\t\t\t \t\t + e.getMessage(), e); \n\t\t\t\t }\n\t\t\t\t Ret[2]=String.valueOf(serverResponseCode);\n\t\t\t\t return Ret; \n\t\t\t } \n\t\t\t }",
"public void uploadvideo(View view) {\n Helper.hideSoftKeyboard(getActivity());\n //getting name for the image\n String name = hashtag.getText().toString().trim();\n\n //getting the actual path of the image\n //Uploading code\n try {\n String uploadId = UUID.randomUUID().toString();\n uploadReceiver.setDelegate(this);\n uploadReceiver.setUploadID(uploadId);\n //Creating a multi part request\n new MultipartUploadRequest(this, uploadId, Constants.UPLOAD_VIDEO)\n .addFileToUpload(file, \"file\") //Adding file\n .addParameter(\"category_id\", category_id) //Adding text parameter to the request//Adding text parameter to the request\n .addParameter(\"name\", name) //Adding text parameter to the request\n .addHeader(\"Authorization\", token)\n .setNotificationConfig(new UploadNotificationConfig())\n .setMaxRetries(2)\n .startUpload(); //Starting the upload\n showToast(view);\n } catch (Exception exc) {\n\n }\n }",
"private synchronized void handleActionPauseAllUpload() {\n Log.d(TAG, \"handle pause all action\");\n // 1. Pause upload thread\n pauseUploadThread();\n // 2. Set all wait and uploading state record to pause state\n for (int i = 0; i < mWaitDataList.size(); i++) {\n UploadFile file = mWaitDataList.get(i);\n int state = file.getState();\n if (state == UploadFileState.UPLOADING || state == UploadFileState.WAIT_UPLOAD)\n file.setState(UploadFileState.PAUSE_UPLOAD);\n uploadFileDataSource.updateUploadFile(file);\n }\n sendChangedBroadcast(EVENT_PAUSE_ALL_UPLOAD_SUCCESS);\n }",
"@SuppressWarnings(\"unchecked\")\n\tprotected void storeInSession(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\tServletFileUpload upload = new ServletFileUpload(factory);\n\t\t\n\t\ttry {\n\t\t\tif(ServletFileUpload.isMultipartContent(request)){\n\t\t\t\tList<FileItem> fileItemList = upload.parseRequest(request);\n//\t\t\t\tJsonNode jparams = JacksonUtils.toNode(request.getParameter(\"params\"));\n\t\t\t\tresponse.setContentType(\"text/html\");\n\t\t\t\tfor(FileItem fileItem : fileItemList){\n\t\t\t\t\tif(fileItem.isFormField()){\n//\t\t\t\t\t\tConstants.LOGGER.info(\"FileUploadServlet.storeInSession - file item is form field::: \" + fileItem);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t\n\t\t\t\t\t\tConstants.LOGGER.info(\"FileUploadServlet.storeImageInSession.NOT formField \" + fileItem);\n//\t\t\t\t\t\tImageFile imageFile = webClientBean.storeImageInUploads(fileItem);\n\t\t\t\t\t\tString id = UUID.randomUUID().toString();\n\t\t\t\t\t\trequest.getSession().setAttribute(id, fileItem);\n\t\t\t\t\t\t\n\t\t\t\t\t\tresponse.getWriter().print(\"<textarea>{target: 'SESSION',id: '\" + id + \"'}</textarea>\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t} \n\t\tcatch (Exception exp) {\n\t\t\tConstants.LOGGER.error(exp.getMessage(),exp);\n\t\t\tJacksonUtils.serialize(EntityModel.createErrorMessage(\"FileUpload Exception\", exp.getMessage()), response.getWriter());\n\t\t} \n\t}",
"private void uploadDocFiles()\n {\n fileCount = imageDragableGridView.getUpdatedImageListWithoutPlus().size() - 1;\n base64String = Helper.convertFileToByteArray(imageDragableGridView.getUpdatedImageListWithoutPlus().get(fileCount).getPath());\n\n String filePath = \"\";\n if (imageDragableGridView.getUpdatedImageListWithoutPlus().get(fileCount).getDocPath().isEmpty())\n {\n filePath = imageDragableGridView.getUpdatedImageListWithoutPlus().get(fileCount).getPath();\n } else\n {\n filePath = imageDragableGridView.getUpdatedImageListWithoutPlus().get(fileCount).getDocPath();\n }\n\n if (HelperHttp.isNetworkAvailable(getActivity()))\n\n {\n //Add parameters to request in arraylist\n ArrayList<Parameter> parameterList = new ArrayList<Parameter>();\n parameterList.add(new Parameter(\"userHash\", DataManager.getInstance().user.getUserHash(), String.class));\n parameterList.add(new Parameter(\"bas64Doc\", base64String, String.class));\n parameterList.add(new Parameter(\"fileName\", filePath, String.class));\n parameterList.add(new Parameter(\"planTaskID\", planTaskId, String.class));\n\n //create web service inputs\n DataInObject inObj = new DataInObject();\n inObj.setMethodname(\"NewSupportRequestDoc\");\n inObj.setNamespace(Constants.TEMP_URI_NAMESPACE);\n inObj.setSoapAction(Constants.TEMP_URI_NAMESPACE + \"IPlannerService/NewSupportRequestDoc\");\n inObj.setUrl(Constants.PLANNER_WEBSERVICE_URL);\n inObj.setParameterList(parameterList);\n\n //Network call\n showProgressDialog();\n new WebServiceTask(getActivity(), inObj, false, new TaskListener()\n {\n\n @Override\n public void onTaskComplete(Object result)\n {\n CustomDialogManager.showOkDialog(getActivity(), successMessage, new DialogListener()\n {\n @Override\n public void onButtonClicked(int type)\n {\n hideProgressDialog();\n if (getFragmentManager().getBackStackEntryCount() != 0)\n {\n getFragmentManager().popBackStack();\n } else\n\n {\n getActivity().finish();\n }\n }\n });\n }\n }).execute();\n } else\n {\n CustomDialogManager.showOkDialog(getActivity(), getString(R.string.no_internet_connection));\n }\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jTextField1 = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jFileChooser1 = new javax.swing.JFileChooser();\n jButton3 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jButton1.setText(\"Upload\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Cancel\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jFileChooser1.setPreferredSize(new java.awt.Dimension(1, 1));\n\n jButton3.setText(\"Browse\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout 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(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton3))\n .addComponent(jFileChooser1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton1)\n .addGap(20, 20, 20)\n .addComponent(jButton2)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(33, 33, 33)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jFileChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 23, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addContainerGap())\n );\n\n pack();\n }",
"public void uploadeNewFileByRequestName(String concatUpload, String requestName) {\n try {\n int isFind = findRequestByName(requestName);\n if (isFind == -1) {\n getLogger().info(\"Can not find any request has name is: \" + requestName);\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"End of Upload createNewRequest File\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n } else {\n clickElement(newRequestTable.findElement(By.xpath(\"./div[\" + isFind + \"]//label\")));\n Thread.sleep(largeTimeOut);\n getLogger().info(\"Input path of file..\");\n// upLoadRequestFile(concatUpload);\n StringSelection ss = new StringSelection(concatUpload);\n Toolkit.getDefaultToolkit().getSystemClipboard().setContents(ss, null);\n Robot robot = new Robot();\n robot.keyPress(KeyEvent.VK_ENTER);\n robot.keyRelease(KeyEvent.VK_ENTER);\n robot.keyPress(KeyEvent.VK_CONTROL);\n robot.keyPress(KeyEvent.VK_V);\n robot.keyRelease(KeyEvent.VK_V);\n robot.keyRelease(KeyEvent.VK_CONTROL);\n robot.keyPress(KeyEvent.VK_ENTER);\n robot.keyRelease(KeyEvent.VK_ENTER);\n// getLogger().info(\"Waiting for checkSign visible..\");\n// waitForCssValueChanged(checkUploadRequest.get(isFind), \"checkSuccessful\", \"display\", \"inline-block\");\n// closeAddNewRequestWindow();\n// waitSomeSeconds(2);\n NXGReports.addStep(\"End of Upload createNewRequest File\", LogAs.PASSED, null);\n }\n } catch (InterruptedException itr) {\n AbstractService.sStatusCnt++;\n itr.printStackTrace();\n NXGReports.addStep(\"End of Upload createNewRequest File\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n } catch (AWTException e) {\n e.printStackTrace();\n }\n\n }",
"@FXML\n\tprivate String attachButtonPressed(MouseEvent event) throws InterruptedException, IOException {\n\t\tFileChooser fileChooser = new FileChooser();\n\t\tfileChooser.setTitle(\"Open Attachment\");\n\t\tFile file = fileChooser.showOpenDialog(stage);\n\t\tif (file != null) {\n\t\t\tString path = file.toString().substring(file.toString().lastIndexOf(\"/\") + 1);\n\t\t\tthis.append(client.username + \" would like to share '\" + path + \"' with you!\", client.username);\n\t\t\tSystem.out.println(file);\n\t\t\tclient.uploadFile(file);\n\t\t}\n\t\treturn null;\n\t}",
"public ActionForward uploadResumePage(ActionMapping mapping, ActionForm form,\r\n HttpServletRequest request, HttpServletResponse response)\r\n throws Exception {\n ResumeUploadActionForm resumeUploadActionForm = (ResumeUploadActionForm) form;\r\n HttpSession session = request.getSession();\r\n CmnUserMst lObjCmnUserMst = (CmnUserMst) session.getAttribute(\"cmnUserMst\");\r\n ResourceBundle resourceBundle = ResourceBundle.getBundle(\"common/resources/Constants\");\r\n\r\n\r\n File folder = new File(MessageFormat.format(resourceBundle.getString(\"UPLOADPATH.RESUME\"), System.getenv(resourceBundle.getString(\"UPLOADPATH.BASE\")), lObjCmnUserMst.getUserId()));\r\n File[] listOfFiles = folder.listFiles();\r\n\r\n for (File file : listOfFiles) {\r\n if (file.isFile()) {\r\n resumeUploadActionForm.setResume(file);\r\n\r\n }\r\n }\r\n return mapping.findForward(\"success\");\r\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n PrintWriter writer = null;\n InputStream is = null;\n FileOutputStream fos = null;\n\n try {\n writer = response.getWriter();\n } catch (IOException ex) {\n log(MultiContentServlet.class.getName() + \"has thrown an exception: \" + ex.getMessage());\n }\n\n boolean isMultiPart = ServletFileUpload.isMultipartContent(request);\n\n if (isMultiPart) {\n log(\"Content-Type: \" + request.getContentType());\n // Create a factory for disk-based file items\n DiskFileItemFactory diskFileItemFactory = new DiskFileItemFactory();\n\n /*\n * Set the file size limit in bytes. This should be set as an\n * initialization parameter\n */\n diskFileItemFactory.setSizeThreshold(1024 * 1024 * 10); //10MB.\n\n\n // Create a new file upload handler\n ServletFileUpload upload = new ServletFileUpload(diskFileItemFactory);\n\n List items = null;\n\n try {\n items = upload.parseRequest(request);\n } catch (FileUploadException ex) {\n log(\"Could not parse request\", ex);\n }\n\n ListIterator li = items.listIterator();\n\n while (li.hasNext()) {\n FileItem fileItem = (FileItem) li.next();\n if (fileItem.isFormField()) {\n if (debug) {\n processFormField(fileItem);\n }\n } else {\n writer.print(processUploadedFile(fileItem));\n }\n }\n }\n\n if (\"application/octet-stream\".equals(request.getContentType())) {\n log(\"Content-Type: \" + request.getContentType());\n String filename = request.getHeader(\"X-File-Name\");\n\n try {\n is = request.getInputStream();\n fos = new FileOutputStream(new File(realPath + filename));\n IOUtils.copy(is, fos);\n response.setStatus(HttpServletResponse.SC_OK);\n writer.print(\"{success: true}\");\n } catch (FileNotFoundException ex) {\n response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\n writer.print(\"{success: false}\");\n log(MultiContentServlet.class.getName() + \"has thrown an exception: \" + ex.getMessage());\n } catch (IOException ex) {\n response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\n writer.print(\"{success: false}\");\n log(MultiContentServlet.class.getName() + \"has thrown an exception: \" + ex.getMessage());\n } finally {\n try {\n fos.close();\n is.close();\n } catch (IOException ignored) {\n }\n }\n\n writer.flush();\n writer.close();\n }\n }",
"@Test\n public void test043() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"\", \"]~BY#\\\"!X6:::ePl:Q\");\n // Undeclared exception!\n try {\n FormElement formElement0 = hidden0.imageSubmit(\"]~BY#\\\"!X6:::ePl:Q\", \"]~BY#\\\"!X6:::ePl:Q\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n }\n }",
"private void expected() {\n\t\td.dismiss();\n\t\ttoastsettext(\"Uploaded Successfully\");\n\t\tadapter.getSelected().clear();\n\t\tinitImageLoader();\n\t\tinit();\n\t\ttry {\n\t\t\tThread.sleep(8000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (stng_stay != null && stng_stay.contentEquals(\"fold\")) {\n\t\t\tsetResult(RESULT_OK);\n\t\t\tfinish();\n\t\t} else if (stng_enter != null && stng_enter.contentEquals(\"enter\")) {\n\t\t\tsetResult(RESULT_OK);\n\t\t\tfinish();\n\t\t\tIntent intent = new Intent(this, Folder_LoginActivity.class);\n\t\t\tBundle bundle = new Bundle();\n\t\t\tbundle.putBoolean(\"ran\", false);\n\t\t\tbundle.putString(\"back\", \"false\");\n\t\t\tbundle.putString(\"fld_id\", Constant.con_fldid);\n\t\t\tbundle.putString(\"fld_nm\", Constant.con_fldnm);\n\t\t\tbundle.putStringArrayList(\"array_id\", Constant.con_list);\n\t\t\tbundle.putStringArrayList(\"array_nm\", Constant.con_name);\n\t\t\tintent.putExtras(bundle);\n\t\t\tstartActivityForResult(intent, 111);\n\t\t} else {\n\t\t\tif (Constant.con_fldid == null\n\t\t\t\t\t|| Constant.con_fldid.contentEquals(\"exit\")) {\n\t\t\t\tsetResult(RESULT_OK);\n\t\t\t\tfinish();\n\t\t\t} else {\n\t\t\t\tsetResult(RESULT_OK);\n\t\t\t\tfinish();\n\t\t\t\tIntent intent = new Intent(this, Folder_LoginActivity.class);\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tbundle.putBoolean(\"ran\", false);\n\t\t\t\tbundle.putString(\"back\", \"false\");\n\t\t\t\tbundle.putString(\"fld_id\", Constant.con_fldid);\n\t\t\t\tbundle.putString(\"fld_nm\", Constant.con_fldnm);\n\t\t\t\tbundle.putStringArrayList(\"array_id\", Constant.con_list);\n\t\t\t\tbundle.putStringArrayList(\"array_nm\", Constant.con_name);\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tstartActivityForResult(intent, 111);\n\t\t\t}\n\t\t}\n\t}",
"public void upload(View view) {\n new Thread() {\n @Override\n public void run() {\n String url = \"http://124.71.115.4/FlyMonitor/servlet/upload\";\n// String filename = \"evo.jpg\";\n String filename = \"tonghuazhen.mp3\";\n // external=/storage/emulated/0\n String path = \"/mnt/sdcard/\" + filename;\n try {\n HttpEngine.upload(url, path, filename);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }.start();\n\n }",
"public FileTransfer sendMultimediaFile(File file)\n throws Exception {\n return null;\n }",
"@Override\r\n protected String doInBackground(String... params) {\n Thread th = new Thread(new Runnable() {\r\n\r\n @Override\r\n public void run() {\r\n // TODO Auto-generated method stub\r\n upload();\r\n }\r\n });\r\n th.start();\r\n try {\r\n th.join();\r\n } catch (InterruptedException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n return null;\r\n }",
"public void upload(UploadedFile file) {\n FacesContext faces = FacesContext.getCurrentInstance();\n\n getSelected().setUrlImage(file.getFileName());\n String fileExtension = file.getFileName().split(\"\\\\.\")[file.getFileName().split(\"\\\\.\").length - 1];\n\n //String generatedFileName = \"file\" + System.currentTimeMillis();\n File directory = new File(faces.getExternalContext().getRealPath(UPLOAD_DIRECTORY_IMAGE_RELATIVE));\n\n if (!directory.exists()) {\n directory.mkdir();\n }\n\n File newFile = new File(faces.getExternalContext().getRealPath(UPLOAD_DIRECTORY_IMAGE_RELATIVE) + File.separator + file.getFileName());\n try {\n if (!newFile.createNewFile()) {\n String nameGenerated = \"file_generated\" + System.currentTimeMillis();\n newFile = new File(faces.getExternalContext().getRealPath(UPLOAD_DIRECTORY_IMAGE_RELATIVE) + File.separator + nameGenerated + \".\" + fileExtension);\n getSelected().setUrlImage(nameGenerated);\n }\n\n FileOutputStream output = new FileOutputStream(newFile);\n\n byte[] buffer = new byte[BUFFER];\n\n int bulk;\n\n InputStream input = file.getInputstream();\n\n while (true) {\n bulk = input.read(buffer);\n\n if (bulk < 0) {\n break;\n }\n\n output.write(buffer, 0, bulk);\n output.flush();\n }\n\n output.close();\n input.close();\n\n } catch (Exception ex) {\n ex.printStackTrace();\n FacesContext.getCurrentInstance().addMessage(\"\", new FacesMessage(bundle.getString(\"Error_file_created\")));\n }\n\n }",
"@Override\n\tpublic void onMessagePlayCompleted() {\n\t\tbtnSend.setEnabled(true);\n\t}",
"public void actionPerformed(ActionEvent arg0) {\n \tlblWarning.setVisible(false);\r\n \t\r\n \t\r\n \t//初始化文件选择框\r\n \tJFileChooser fDialog = new JFileChooser();\r\n \t//设置文件选择框的标题 \r\n \tfDialog.setDialogTitle(\"请选择要上传的图片\");\r\n \t//弹出选择框\r\n \tint returnVal = fDialog.showOpenDialog(null);\r\n \t// 如果是选择了文件\r\n \tif(JFileChooser.APPROVE_OPTION == returnVal){ \r\n \t\t//把路径值 写到 textField 中\t\r\n \t\ttxtPicPath.setText(fDialog.getSelectedFile().toString());\r\n \t}\r\n \tString path = txtPicPath.getText().toString();\r\n \t//Limit this field to jpg and png and \r\n \t//Force this field must be filled \r\n \tif (!path.isEmpty() && !path.equals(\"\") && !path.equals(null) \r\n \t\t\t&& (path.endsWith(\"jpg\") || path.endsWith(\"png\"))) {\r\n \t\t\r\n \tFile upload = new File(path);\r\n \t\r\n\t \ttry{ \r\n\t\t \tFileOutputStream fos1 = new FileOutputStream(fileUploadedProduct1); \r\n\t\t \tFileInputStream fis=new FileInputStream(upload); \r\n\t\t \tbyte[] buffer=new byte[1024]; \r\n\t\t \tint len=0; \r\n\t\t \twhile((len=fis.read(buffer))>0){ \r\n\t\t \t\tfos1.write(buffer,0,len); \r\n\t\t \t\t\r\n\t\t \t} \r\n\t\t \tfos1.close(); \r\n\t\t \tfis.close();\r\n\t } catch (Exception e) { \r\n\t \te.printStackTrace(); \r\n\t \tJOptionPane.showMessageDialog(null, e.getMessage(), \"错误\", JOptionPane.ERROR_MESSAGE);\r\n\t } \r\n } \r\n else {\r\n \t//For warning msg\r\n \t//lblWarning = new JLabel(\"上传图片的格式或者路径不对\");\r\n \tfr.add(lblWarning);\r\n \t\t//Font font = new Font(\"Dialog\",1,16);\r\n \t\t//lblWarning.setFont(font);\r\n \t\tlblWarning.setVisible(true);\r\n \t\t//lblWarning.setBounds(150,400,400,50);\r\n }\r\n }",
"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 protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException\n {\n resp.setContentType(\"text/html;charset=UTF-8\");\n\n final Part filePart = req.getPart(\"file\");\n final String fileName = getFileName(filePart);\n\n File file = new File(Config.fileDirectory + File.separator + fileName);\n\n // TODO: return error saying file exists\n if(file.exists())\n {\n resp.setStatus(resp.SC_BAD_REQUEST);\n req.getRequestDispatcher(\"/\").forward(req, resp);\n return;\n }\n\n OutputStream out = null;\n InputStream fileContent = null;\n final PrintWriter writer = resp.getWriter();\n\n try\n {\n out = new FileOutputStream(new File(Config.fileDirectory + File.separator\n + fileName));\n fileContent = filePart.getInputStream();\n\n int read = 0;\n final byte[] bytes = new byte[1024];\n\n while ((read = fileContent.read(bytes)) != -1)\n out.write(bytes, 0, read);\n\n log.info(\"File {} being uploaded to {}\", fileName, Config.fileDirectory);\n }\n catch (FileNotFoundException fne)\n {\n log.error(\"Problems during file upload. Error: {}\", fne.getMessage());\n }\n finally\n {\n req.getRequestDispatcher(\"/\").forward(req, resp);\n if (out != null)\n out.close();\n if (fileContent != null)\n fileContent.close();\n if (writer != null)\n writer.close();\n }\n }",
"public void setSubmitVisible(int i) {\n if (this.doconfirmmappoint != null) {\n if (i > 0) {\n this.doconfirmmappoint.setVisibility(0);\n } else {\n this.doconfirmmappoint.setVisibility(8);\n }\n }\n }",
"private void updateImformation(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tint fileId= Integer.parseInt(request.getParameter(\"fileId\"));\n\t\tString caption= request.getParameter(\"caption\");\n\t\tString label= request.getParameter(\"label\");\n\t\tString fileName= request.getParameter(\"fileName\");\n\t\tFiles file= new Files(fileId, fileName, label, caption);\n\t\tnew FilesDAO().update(fileId, caption, label);;\n\t\tlistingPage(request, response);\n\t}",
"@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n progressDialog.dismiss();\n\n //and displaying a success toast\n Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n // picup =true;\n }",
"public void onSubmit(SubmitEvent event)\r\n {\n String fileName = fileUpload.getFilename();\r\n if (Utils.isEmpty(fileName))\r\n {\r\n Window.alert(constants.mappingUploadAlertNofile());\r\n event.cancel();\r\n return;\r\n }\r\n if (textVersion.getText().length() == 0)\r\n {\r\n Window.alert(constants.mappingUploadAlertNoVersion());\r\n event.cancel();\r\n }\r\n textId.setValue(Long.toString(loginInfo.getAppUserShared().id));\r\n AppLoadingView.getInstance().start();\r\n\r\n }",
"@java.lang.Override\n public boolean getIsUploadEnabled() {\n return isUploadEnabled_;\n }",
"public void clickOnSubmitButton() throws FileNotFoundException, IOException, ParseException, InterruptedException\n\t{\n\t\twaitForVisibility(sbmnit);\n\t\tsbmnit.click();\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n \n PrintWriter out = null;\n JSONObject outputObject = new JSONObject();\n try {\n \n HashMap<String,String> bigItemIds = new HashMap<>();\n Iterator mIterator = bigItemIds.keySet().iterator();\n out = response.getWriter();\n // Create a factory for disk-based file items\n DiskFileItemFactory factory = new DiskFileItemFactory();\n\n // Configure a repository (to ensure a secure temp location is used)\n ServletContext servletContext = this.getServletConfig().getServletContext();\n File repository = (File) servletContext.getAttribute(\"javax.servlet.context.tempdir\");\n factory.setRepository(repository);\n\n // Create a new file upload handler\n ServletFileUpload upload = new ServletFileUpload(factory);\n // Parse the request\n List<FileItem> items = upload.parseRequest(request);\n \n final String moveId = UUID.randomUUID().toString();\n final MovesDb movesDb = new MovesDb();\n // Process the uploaded items\n Iterator<FileItem> iter = items.iterator();\n while (iter.hasNext()) {\n FileItem item = iter.next();\n\n if (item.isFormField()) {\n \n System.out.println(\"Form field\" +item.getString());\n \n bigItemIds = processFormField(new JSONObject( item.getString()), out,moveId,movesDb);\n mIterator = bigItemIds.keySet().iterator();\n System.out.println(\"ITEM ID SIZE \"+bigItemIds.size());\n \n } else {\n //processUploadedFile(item);\n System.out.print(\"Photo Field\");\n String key = (String) mIterator.next();\n File mFile = new File(bigItemIds.get(key));\n item.write(mFile);\n \n \n \n \n }\n }\n new Thread(){\n \n public void run(){\n pushMovetoMailQueue moveToMailQueue= new pushMovetoMailQueue();\n moveToMailQueue.pushMoveToMailQueue(movesDb);\n }\n }.start();\n outputObject = new JSONObject();\n try {\n outputObject.put(Constants.JSON_STATUS, Constants.JSON_SUCCESS);\n outputObject.put(Constants.JSON_MSG,Constants.JSON_GET_QUOTE);\n } catch (JSONException ex1) {\n Logger.getLogger(doSignUp.class.getName()).log(Level.SEVERE, null, ex1);\n }\n \n out.println(outputObject.toString());\n \n \n \n \n }catch(Exception ex){\n \n outputObject = new JSONObject();\n try {\n outputObject.put(Constants.JSON_STATUS, Constants.JSON_FAILURE);\n outputObject.put(Constants.JSON_MSG,Constants.JSON_EXCEPTION);\n } catch (JSONException ex1) {\n Logger.getLogger(doSignUp.class.getName()).log(Level.SEVERE, null, ex1);\n }\n \n out.println(outputObject.toString());\n Logger.getLogger(doSignUp.class.getName()).log(Level.SEVERE, null, ex);\n }finally{\n out.close();\n }\n }",
"final void a() {\n if (this.jGU.getActionBar() != null) {\n Bundle bundle = new Bundle();\n bundle.putBoolean(\"close_window_confirm_dialog_switch\", true);\n bundle.putString(\"close_window_confirm_dialog_title_cn\", this.fcq.getString(R.l.webview_jssdk_video_uploading_tips));\n bundle.putString(\"close_window_confirm_dialog_title_eng\", this.fcq.getString(R.l.webview_jssdk_video_uploading_tips));\n bundle.putString(\"close_window_confirm_dialog_ok_cn\", this.fcq.getString(R.l.webview_jssdk_upload_video_cancel));\n bundle.putString(\"close_window_confirm_dialog_ok_eng\", this.fcq.getString(R.l.webview_jssdk_upload_video_cancel));\n bundle.putString(\"close_window_confirm_dialog_cancel_cn\", this.fcq.getString(R.l.webview_jssdk_upload_video_continue));\n bundle.putString(\"close_window_confirm_dialog_cancel_eng\", this.fcq.getString(R.l.webview_jssdk_upload_video_continue));\n this.jGU.getActionBar().setCloseWindowConfirmInfo(bundle);\n }\n aSz();\n }",
"protected void doDSPost(Context context, HttpServletRequest request,\n HttpServletResponse response) throws ServletException, IOException,\n SQLException, AuthorizeException\n {\n // First, see if we have a multipart request (uploading a metadata file)\n String contentType = request.getContentType();\n HttpSession session = request.getSession(true); \n if ((contentType != null) && (contentType.indexOf(\"multipart/form-data\") != -1))\n {\n // Process the file uploaded\n try\n {\n // Get the changes\n log.info(LogManager.getHeader(context, \"metadataimport\", \"loading file\"));\n ArrayList<BulkEditChange> changes = processUpload(context, request);\n log.debug(LogManager.getHeader(context, \"metadataimport\", changes.size() + \" items with changes identifed\")); \n\n // Were there any changes detected?\n if (changes.size() != 0)\n {\n request.setAttribute(\"changes\", changes);\n request.setAttribute(\"changed\", false);\n\n // Is the user allowed to make this many changes?\n if (changes.size() <= limit)\n {\n request.setAttribute(\"allow\", true);\n }\n else\n {\n request.setAttribute(\"allow\", false);\n session.removeAttribute(\"csv\");\n log.info(LogManager.getHeader(context, \"metadataimport\", \"too many changes: \" +\n changes.size() + \" (\" + limit + \" allowed)\"));\n }\n\n JSPManager.showJSP(request, response, \"/dspace-admin/metadataimport-showchanges.jsp\");\n }\n else\n {\n request.setAttribute(\"message\", \"No changes detected\");\n JSPManager.showJSP(request, response, \"/dspace-admin/metadataimport.jsp\");\n }\n }\n catch (Exception e)\n {\n request.setAttribute(\"message\", e.getMessage());\n log.debug(LogManager.getHeader(context, \"metadataimport\", \"Error encountered while looking for changes: \" + e.getMessage())); \n JSPManager.showJSP(request, response, \"/dspace-admin/metadataimport-error.jsp\");\n }\n }\n else if (\"confirm\".equals(request.getParameter(\"type\")))\n {\n // Get the csv lines from the session\n DSpaceCSV csv = (DSpaceCSV)session.getAttribute(\"csv\");\n\n // Make the changes\n try\n {\n MetadataImport mImport = new MetadataImport(context, csv.getCSVLines());\n ArrayList<BulkEditChange> changes = mImport.runImport(true, false, false, false);\n\n // Commit the changes\n context.commit();\n log.debug(LogManager.getHeader(context, \"metadataimport\", changes.size() + \" items changed\"));\n\n // Blank out the session data\n session.removeAttribute(\"csv\");\n\n request.setAttribute(\"changes\", changes);\n request.setAttribute(\"changed\", true);\n request.setAttribute(\"allow\", true);\n JSPManager.showJSP(request, response, \"/dspace-admin/metadataimport-showchanges.jsp\");\n }\n catch (Exception e)\n {\n request.setAttribute(\"message\", e.getMessage());\n log.debug(LogManager.getHeader(context, \"metadataimport\", \"Error encountered while making changes: \" + e.getMessage()));\n JSPManager.showJSP(request, response, \"/dspace-admin/metadataimport-error.jsp\");\n }\n }\n else if (\"cancel\".equals(request.getParameter(\"type\")))\n {\n // Blank out the session data\n session.removeAttribute(\"csv\");\n\n request.setAttribute(\"message\", \"Changes cancelled. No items have been modified.\");\n log.debug(LogManager.getHeader(context, \"metadataimport\", \"Changes cancelled\"));\n JSPManager.showJSP(request, response, \"/dspace-admin/metadataimport.jsp\");\n }\n else\n {\n // Show the upload screen\n JSPManager.showJSP(request, response, \"/dspace-admin/metadataimport.jsp\");\n }\n }",
"@Override\n public void onClick(View v) {\n if (\"\".equals(answer_content.getText().toString() + \"\")) {\n Toast.makeText(AnswerQuestionActivity.this, \"请输入您的答案!\", 0)\n .show();\n } else {\n showprocessdialog();\n if (imgList.size() > 0) {\n uploadImg(imgList);\n sumbmit.setEnabled(false);\n } else {\n showprocessdialog();\n sumbmit.setEnabled(false);\n publishQueston();\n }\n\n }\n }",
"public void postPhoto() throws InterruptedException, IOException, AWTException{\n\t\tString filepath= getTargetFilePath(\"PhotoToUpload\", \"Image\", \"jpeg\");\n\t\tSystem.out.println(\"File path is:\"+ filepath);\n\t\t\n\t\tclick(profileIcon);\n\t\tThread.sleep(1000);\n\t\tclick(PhotoTab);\n\t\tThread.sleep(1000);\n\t\tdriver.findElement(PhotoUpload).sendKeys(filepath);\n\t\tclick(PostBttn);\n\t}",
"public imageupload() {\nsuper(); \n this.setTitle(\"Friends Hub <3\");\n initComponents();\n initComponents1();\n this.setVisible(true); \n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n try {\n if (!request.getParameter(\"setID\").equals(\"\") && !request.getParameter(\"photoID\").equals(\"\")) {\n\n int setID = Integer.parseInt(request.getParameter(\"setID\"));\n int photoID = Integer.parseInt(request.getParameter(\"photoID\"));\n String isPrivate = request.getParameter(\"isPrivacy\");\n\n if (isPrivate != null) {\n setService.addPhotoToSet(setID, photoID, true);\n } else {\n setService.addPhotoToSet(setID, photoID, false);\n }\n\n request.getRequestDispatcher(\"succes.jsp\").forward(request, response);\n\n } else {\n throw new ParameterException(\"Incorrect parameters\");\n }\n } catch (Exception e) {\n request.setAttribute(\"error\", \"An error has occured.. \" + e.getMessage());\n request.getRequestDispatcher(\"error.jsp\").forward(request, response);\n }\n\n }",
"public void upload() {\r\n if (file != null) {\r\n try {\r\n String filepath = super.getUploadFolder() + \"/\" + file.getFileName();\r\n filepath = FileUtil.alternativeFilepathIfExists(filepath);\r\n FileUtil.createFile(filepath);\r\n\r\n file.write(filepath);\r\n super.info(\"Succesful\", file.getFileName() + \" is uploaded.\");\r\n\r\n Upload upload = new Upload();\r\n upload.setDescription(description);\r\n upload.setFilepath(filepath);\r\n upload.setTag(Md5Util.getMd5Sum(filepath));\r\n this.description = null;\r\n uploads.add(upload);\r\n // update ui and ready for save in db\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n }\r\n }",
"@Override\n public void onClick(View v) {\n try {\n // new UploadFileToServer().execute();\n\n\t\t\t\t\t\tdialog = ProgressDialog.show(UploadActivity.this, \"\", \"Uploading file...\", true);\n\t\t\t\t\t\tnew Thread(new Runnable() {\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t//tv.setText(\"uploading started.....\");\n\n\t\t\t\t\t\t\t\t\t\ttxtdescr.setText(\"Uploading Started\");\n\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tint response= uploadFile(\"/sdcard/android_1.png\");\n\t\t\t\t\t\t\t\tSystem.out.println(\"RES : \" + response);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}).start();\n\t\t\t\t\t\t//dialog.setCancelable(true);\n\n\t\t\t\t\t} catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"private File processMultipartForm() {\n\n File storeDirectory = Configuration\n .getParameterValueAsFile(PENDING_DIR);\n\n int fileSizeLimit = Configuration\n .getParameterValueAsInt(METADATA_MAX_BYTES);\n\n DiskFileItemFactory factory = new DiskFileItemFactory();\n factory.setSizeThreshold(fileSizeLimit);\n\n RestletFileUpload upload = new RestletFileUpload(factory);\n\n List<FileItem> items;\n\n try {\n Request request = getRequest();\n items = upload.parseRequest(request);\n } catch (FileUploadException e) {\n throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST, e\n .getMessage(), e);\n }\n\n for (FileItem fi : items) {\n if (fi.getName() != null) {\n String uuid = UUID.randomUUID().toString();\n File file = new File(storeDirectory, uuid);\n try {\n fi.write(file);\n return file;\n } catch (Exception consumed) {\n }\n }\n }\n\n throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST,\n \"no valid file uploaded\");\n }"
]
| [
"0.59570396",
"0.58884114",
"0.5788498",
"0.5780577",
"0.5772449",
"0.57723516",
"0.56933165",
"0.5683217",
"0.56283957",
"0.5615343",
"0.5613463",
"0.55768126",
"0.5493653",
"0.5471667",
"0.5465413",
"0.5435596",
"0.5411485",
"0.53932655",
"0.5391923",
"0.53865325",
"0.536849",
"0.53493387",
"0.5323813",
"0.53230894",
"0.5312273",
"0.5297212",
"0.5289402",
"0.52862614",
"0.528226",
"0.5247214",
"0.52355516",
"0.5235158",
"0.5226191",
"0.51897377",
"0.5174989",
"0.51701045",
"0.51589644",
"0.51551956",
"0.51509726",
"0.5148768",
"0.5147836",
"0.5144356",
"0.5139813",
"0.5136553",
"0.5124177",
"0.5120432",
"0.5099811",
"0.50870115",
"0.50869614",
"0.50829476",
"0.5067019",
"0.5060506",
"0.5059589",
"0.505119",
"0.5044396",
"0.504357",
"0.50429744",
"0.5042868",
"0.5042256",
"0.5038149",
"0.50331354",
"0.50310326",
"0.5021967",
"0.502131",
"0.5018933",
"0.5015797",
"0.5013729",
"0.50114995",
"0.50083816",
"0.50069296",
"0.5002118",
"0.4997879",
"0.49975997",
"0.49874613",
"0.4982875",
"0.49644873",
"0.49634242",
"0.49483585",
"0.49412754",
"0.4938665",
"0.4936124",
"0.49354228",
"0.49321154",
"0.49275374",
"0.492532",
"0.4920267",
"0.4917644",
"0.49138117",
"0.49135247",
"0.49132115",
"0.4912011",
"0.49059054",
"0.49046743",
"0.49026242",
"0.4897286",
"0.4896515",
"0.4894699",
"0.48904878",
"0.48904526",
"0.48894578",
"0.48883778"
]
| 0.0 | -1 |
text is the anchor text, and token is the href | protected void addImageIcon(String text, String token, ImageResource bigImage, ImageResource mobileImage, FlowPanel flowPanel, String tooltip) {
if (MyWebApp.isSmallFormat()) {
Image image = new Image(mobileImage);
addImageIcon(token, text, image, flowPanel, tooltip);
} else {
Image image = new Image(bigImage);
addImageIcon(token, text, image, flowPanel, tooltip);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Text href() {\n\t\tText href = text();\r\n\r\n\t\tif (syntaxError)\r\n\t\t\treturn null;\r\n\r\n\t\treturn href;\r\n\t}",
"public abstract String linkText();",
"private void addHyperlinkToken(int start, int end, int tokenType) {\n\t\tint so = start + offsetShift;\n\t\taddToken(zzBuffer, start,end, tokenType, so, true);\n\t}",
"private void addHyperlinkToken(int start, int end, int tokenType) {\n\t\tint so = start + offsetShift;\n\t\taddToken(zzBuffer, start,end, tokenType, so, true);\n\t}",
"public static CharSequence setLinkBetweenTokens(CharSequence text, String token,\n OnClickListener listener, boolean underline, CharacterStyle... cs) {\n // Start and end refer to the points where the span will apply\n int tokenLen = token.length();\n int start = text.toString().indexOf(token) + tokenLen;\n int end = text.toString().indexOf(token, start);\n\n if (start > -1 && end > -1) {\n // Copy the spannable string to a mutable spannable string\n SpannableStringBuilder ssb = new SpannableStringBuilder(text);\n\n ssb.setSpan(new UiUtils().new InternalUrlSpan(listener, underline), start, end, 0);\n for (CharacterStyle c : cs)\n ssb.setSpan(c, start, end, 0);\n\n // Delete the tokens before and after the span\n ssb.delete(end, end + tokenLen);\n ssb.delete(start - tokenLen, start);\n\n text = ssb;\n }\n\n return text;\n }",
"public static CharSequence setLinkBetweenTokens(CharSequence text, String token,\n OnClickListener listener, CharacterStyle... cs) {\n return setLinkBetweenTokens(text, token, listener, true, cs);\n }",
"public Hyperlink(){\n this.href = \"\";\n this.text = new TextSpan(\"\");\n }",
"private Link link() {\n\r\n\t\tLink link = null;\r\n\r\n\t\tToken tok = lex.getToken();\r\n\r\n\t\t// Expect '<link' (we know it is OK)\r\n\t\tif (tok.getToken() != TokensId.OPENLINK) {\r\n\t\t\tsyntaxError(String.format(\"Expected '<link', found '%s'\",\r\n\t\t\t\t\ttok.getLexeme()), tok.getLine());\r\n\t\t}\r\n\r\n\t\t// Expect 'href'\r\n\t\ttok = lex.getToken();\r\n\t\tif (tok.getToken() != TokensId.HREF) {\r\n\t\t\tsyntaxError(String.format(\r\n\t\t\t\t\t\"Expected 'href' in link declaration, found '%s'\",\r\n\t\t\t\t\ttok.getLexeme()), tok.getLine());\r\n\t\t}\r\n\r\n\t\t// Expect '='\r\n\t\ttok = lex.getToken();\r\n\t\tif (tok.getToken() != TokensId.EQ) {\r\n\t\t\tsyntaxError(String.format(\r\n\t\t\t\t\t\"Expected '=' after attribute 'href', found '%s'\",\r\n\t\t\t\t\ttok.getLexeme()), tok.getLine());\r\n\t\t}\r\n\r\n\t\t// Expect '\"'\r\n\t\ttok = lex.getToken();\r\n\t\tif (tok.getToken() != TokensId.QUOTE) {\r\n\t\t\tsyntaxError(String.format(\r\n\t\t\t\t\t\"Expected '\\\"' surrounding the value of 'href', found '%s'\",\r\n\t\t\t\t\ttok.getLexeme()), tok.getLine());\r\n\t\t}\r\n\r\n\t\t// Expect href\r\n\t\tText href = href();\r\n\r\n\t\t// Expect '\"'\r\n\t\ttok = lex.getToken();\r\n\t\tif (tok.getToken() != TokensId.QUOTE) {\r\n\t\t\tsyntaxError(String.format(\r\n\t\t\t\t\t\"Expected '\\\"' surrounding the value of 'href', found '%s'\",\r\n\t\t\t\t\ttok.getLexeme()), tok.getLine());\r\n\t\t}\r\n\r\n\t\t// Expect 'rel'\r\n\t\ttok = lex.getToken();\r\n\t\tif (tok.getToken() != TokensId.REL) {\r\n\t\t\tsyntaxError(String.format(\r\n\t\t\t\t\t\"Expected 'rel' in link declaration, found '%s'\",\r\n\t\t\t\t\ttok.getLexeme()), tok.getLine());\r\n\t\t}\r\n\r\n\t\t// Expect '='\r\n\t\ttok = lex.getToken();\r\n\t\tif (tok.getToken() != TokensId.EQ) {\r\n\t\t\tsyntaxError(String.format(\r\n\t\t\t\t\t\"Expected '=' after attribute 'rel', found '%s'\",\r\n\t\t\t\t\ttok.getLexeme()), tok.getLine());\r\n\t\t}\r\n\r\n\t\t// Expect '\"'\r\n\t\ttok = lex.getToken();\r\n\t\tif (tok.getToken() != TokensId.QUOTE) {\r\n\t\t\tsyntaxError(String.format(\r\n\t\t\t\t\t\"Expected '\\\"' surrounding the value of 'rel', found '%s'\",\r\n\t\t\t\t\ttok.getLexeme()), tok.getLine());\r\n\t\t}\r\n\r\n\t\t// Expect rel\r\n\t\tText rel = rel();\r\n\r\n\t\t// Expect '\"'\r\n\t\ttok = lex.getToken();\r\n\t\tif (tok.getToken() != TokensId.QUOTE) {\r\n\t\t\tsyntaxError(String.format(\r\n\t\t\t\t\t\"Expected '\\\"' surrounding the value of 'rel', found '%s'\",\r\n\t\t\t\t\ttok.getLexeme()), tok.getLine());\r\n\t\t}\r\n\r\n\t\t// Expect 'type'\r\n\t\ttok = lex.getToken();\r\n\t\tif (tok.getToken() != TokensId.TYPE) {\r\n\t\t\tsyntaxError(String.format(\r\n\t\t\t\t\t\"Expected 'type' in link declaration, found '%s'\",\r\n\t\t\t\t\ttok.getLexeme()), tok.getLine());\r\n\t\t}\r\n\r\n\t\t// Expect '='\r\n\t\ttok = lex.getToken();\r\n\t\tif (tok.getToken() != TokensId.EQ) {\r\n\t\t\tsyntaxError(String.format(\r\n\t\t\t\t\t\"Expected '=' after attribute 'type', found '%s'\",\r\n\t\t\t\t\ttok.getLexeme()), tok.getLine());\r\n\t\t}\r\n\r\n\t\t// Expect '\"'\r\n\t\ttok = lex.getToken();\r\n\t\tif (tok.getToken() != TokensId.QUOTE) {\r\n\t\t\tsyntaxError(String.format(\r\n\t\t\t\t\t\"Expected '\\\"' surrounding the value of 'type', found '%s'\",\r\n\t\t\t\t\ttok.getLexeme()), tok.getLine());\r\n\t\t}\r\n\r\n\t\t// Expect type\r\n\t\tText type = type();\r\n\r\n\t\t// Expect '\"'\r\n\t\ttok = lex.getToken();\r\n\t\tif (tok.getToken() != TokensId.QUOTE) {\r\n\t\t\tsyntaxError(String.format(\r\n\t\t\t\t\t\"Expected '\\\"' surrounding the value of 'type', found '%s'\",\r\n\t\t\t\t\ttok.getLexeme()), tok.getLine());\r\n\t\t}\r\n\r\n\t\t// Expect '>'\r\n\t\ttok = lex.getToken();\r\n\t\tif (tok.getToken() != TokensId.TAGCLOSE) {\r\n\t\t\tsyntaxError(String.format(\r\n\t\t\t\t\t\"Expected '>' closing the tag 'link', found '%s'\",\r\n\t\t\t\t\ttok.getLexeme()), tok.getLine());\r\n\t\t}\r\n\r\n\t\tif (href != null && rel != null && type != null)\r\n\t\t\tlink = new Link(href, rel, type);\r\n\r\n\t\tif (syntaxError)\r\n\t\t\treturn null;\r\n\r\n\t\treturn link;\r\n\t}",
"private String externalLink2Anchor(String href) {\n\t\t\n\t\tString replaceText = null;\n\t\tString id = baseId + \"-\" + UUID.uuid(4);\n\t\tString target = (openLinksinNewTab) ? \"_blank\" : \"_self\";\n\t\t\n\t\tLinkInfo pli = new LinkInfo(id, LinkType.EXTERNAL, href, target);\n\t\tparserResult.linkInfos.add(pli);\n\t\treplaceText = \"<a id='\" + id + \"' target='\" + target + \"' href='\" + href + \"'\";\n\t\t\n\t\treturn replaceText;\n\t}",
"String nextLink();",
"public List<String> getAnchorText(){\n\t\treturn AnchorText;\n\t\t\n\t}",
"public String getAnchor()\r\n {\r\n return this.anchor;\r\n }",
"HtmlPage clickLink();",
"public String verifyLinkTextByText(String object, String data) {\n\t\tlogger.debug(\"Verifying link Text\");\n\t\ttry {\n\t\t\t\n\t\t\twaitForPageLoad(driver);\n\t\t\tString actual = wait.until(explicitWaitForElement(By.linkText(OR.getProperty(object)))).getText().trim();\n\t\t\tString expected = data.trim();\n\n\t\t\tif (actual.equals(expected)) {\n\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\t} else {\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- Link text not verified \\t actual is =>\" + actual + \"expected is =>\" + expected;\n\t\t\t}\n\n\t\t} catch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}catch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" -- Link text not verified\" + e.getMessage();\n\n\t\t}\n\n\t}",
"String getHref();",
"public static String renderAsLinkWithAnchor(final String text)\n {\n return renderAsLinkWithAnchor(text, \"#\", false, false);\n }",
"public String verifyLinkTextBytext(String object, String data) {\n\t\tlogger.debug(\"Verifying link Text\");\n\t\ttry {\n\t\t\tString actual = wait.until(explicitWaitForElement(By.linkText(OR.getProperty(object)))).getText();\n\t\t\tString expected = data.trim();\n\t\t\tlogger.debug(actual + \"actual\");\n\t\t\tlogger.debug(expected + \"expec\");\n\t\t\tif (actual.equals(expected))\n\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\telse\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- Link text not verified\";\n\n\t\t} \n\t\tcatch(TimeoutException ex){\n\t\t\treturn Constants.KEYWORD_FAIL + ex.getCause();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\treturn Constants.KEYWORD_FAIL + \" -- Link text not verified\" + e.getMessage();\n\n\t\t}\n\n\t}",
"public String verifyLinkText(String object, String data) {\n\t\tlogger.debug(\"Verifying link Text\");\n\t\ttry {\n\t\t\tString actual = wait.until(explicitWaitForElement((By.xpath(OR.getProperty(object))))).getText();\n\t\t\tString expected = data.trim();\n\t\t\tlogger.debug(\"act\" + actual);\n\t\t\tlogger.debug(\"expected\" + expected);\n\t\t\tif (actual.equals(expected))\n\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\telse\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- Link text not verified\";\n\n\t\t} \n\t\tcatch(TimeoutException ex){\n\t\t\treturn Constants.KEYWORD_FAIL + ex.getCause();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\treturn Constants.KEYWORD_FAIL + \" -- Link text not verified\" + e.getMessage();\n\n\t\t}\n\n\t}",
"private String getAnchorTagDataPart(String string) {\r\n string = string.toLowerCase();\r\n \r\n /*this data should be in the form of <a herf=\"action.jsp&objected=1.1.1.1\">Value</a>*/\r\n int anchorBegin = string.indexOf(\"<a \");\r\n int anchorEnd = string.indexOf(\"</a>\");\r\n /*If the string is not of above specified format i.e. not begining with '<a' or ending with '</a>' \r\n then return the original string.*/ \r\n if(anchorBegin == -1 || anchorEnd == -1)\r\n return string;\r\n /*\r\n * Remove the </a> part from the stirng\r\n * Now the string becomes <a herf=\"action.jsp&objected=1.1.1.1\">Value\r\n * */\r\n string = string.substring(anchorBegin, anchorEnd);\r\n /*Now get the index of '>' and return the sub string of string.indexOf('>') + 1*/\r\n string = string.substring(string.indexOf('>') + 1);\r\n \r\n return string;\r\n }",
"@Override\n public void onTextLinkClick(View textView, String clickedString) {\n if(clickedString.equalsIgnoreCase(\"_fertilization\")){\n Log.e(\"Hyperlink is :1: \" + clickedString, \"Hyperlink is :: \" + clickedString);\n }else if(clickedString.equalsIgnoreCase(\"_Nitrogen\")){\n Intent i = new Intent(CP_Fertilization.this,Nitrogen.class);\n startActivity(i);\n }else if(clickedString.equalsIgnoreCase(\"_Phosphorous_and_potash\")) {\n Intent i = new Intent(CP_Fertilization.this,PhosphorusandPotash.class);\n startActivity(i);\n }else if(clickedString.equalsIgnoreCase(\"_calcium\")) {\n Intent i = new Intent(CP_Fertilization.this,CalciumnMagnisium.class);\n startActivity(i);\n }else if(clickedString.equalsIgnoreCase(\"_sulphur\")) {\n Intent i = new Intent(CP_Fertilization.this,Sulphur.class);\n startActivity(i);\n }else if(clickedString.equalsIgnoreCase(\"_micronutrients\")) {\n Intent i = new Intent(CP_Fertilization.this,Micronutrient.class);\n startActivity(i);\n }else\n {\n Log.e(\"Hyperlink is :x: \" + clickedString, \"Hyperlink is :: \" + clickedString);\n }\n }",
"String getLink();",
"@Test\n public void hrefPatternTest() {\n Pattern aTeg = Pattern.compile(\"(?i)<a([^>]+)>(.+?)</a>\");\n Pattern href = Pattern.compile(\"\\\\s*(?i)href\\\\s*=\\\\s*(\\\\\\\"([^\\\"]+\\\\\\\")|'[^']+'|([^'\\\">\\\\s]+))\");\n String[] validLinkTegs = {\"<li><a href=\\\"/toolbar-creator\\\">Create a Custom Toolbar</a></li>\",\n \"<a href=\\\"http://stlpublicradio.org/programs/slota/archivedetail.php?date='2012-02-29'\\\" title=\\\"\\\" class=\\\"menu_icon menu-17197 \\\" >Грузовые перевозки</a></li>\",\n \"<li><a href='http://www.tipsntracks.com/date/2012/03' title='March 2012'>March 2012</a></li>\"};\n String[] invalidLinkTags = {\"<a href=\\\"\\\"style=\\\"\\\"><img width=\\\"148\\\" height=\\\"32\\\" src=\\\"/images/buttons/btn-www-survey.gif\\\" /></a>\"};\n String[] validLinks = new String[validLinkTegs.length];\n String[] invalidLinks = new String[invalidLinkTags.length];\n for (int i = 0; i < validLinkTegs.length; i++) {\n Matcher matcher = aTeg.matcher(validLinkTegs[i]);\n Assert.assertTrue(matcher.find());\n validLinks[i] = matcher.group(1);\n }\n for (int i = 0; i < invalidLinkTags.length; i++) {\n Matcher matcher = aTeg.matcher(invalidLinkTags[i]);\n Assert.assertTrue(matcher.find());\n invalidLinks[i] = matcher.group(1);\n }\n for (int i = 0; i < validLinkTegs.length; i++) {\n Matcher matcher = href.matcher(validLinks[i]);\n Assert.assertTrue(matcher.find());\n String s = matcher.group(1);\n System.out.println(s.substring(1, s.length() - 1));\n }\n for (int i = 0; i < invalidLinkTags.length; i++) {\n Matcher matcher = href.matcher(invalidLinks[i]);\n Assert.assertFalse(matcher.find());\n }\n }",
"public static String insertLink(final String token, final String data, final String name, final String url) {\n \n /* Validate parameters */\n if (token == null || token.equals(\"\")) { throw new IllegalArgumentException(\"token must be a non-empty string\"); }\n if (data == null || data.equals(\"\")) { throw new IllegalArgumentException(\"data must be a non-empty string\"); }\n if (name == null || name.equals(\"\")) { throw new IllegalArgumentException(\"name must be a non-empty string\"); }\n if (url == null || url.equals(\"\")) { throw new IllegalArgumentException(\"url must be a non-empty string\"); }\n \n final String link = \"<a href=\\\"\" + url + \"\\\">\" + name + \"</a>\";\n \n return data.replaceAll(token, link);\n }",
"private String link2Anchor(String expression, LinkType type) {\n\t\tString replaceText = null;\n\n\t\tint index = expression.indexOf(\"|\");\n\t\tif (index > 0) {\n\t\t\tString pageName = expression.substring(0, index);\n\t\t\tpageName = StringUtils.removeAllFormatting(pageName);\n\t\t\tpageName = StringUtils.unescapeXML(pageName);\n\t\t\tString id = baseId + \"-\" + UUID.uuid(4);\n\n\t\t\tString linkText = expression.substring(index + 1).trim();\t\n\t\t\treplaceText = this.getReplaceText(id, linkText, expression, type);\n\t\t\t\n\t\t\tLinkInfo pli = new LinkInfo(id, type, pageName, \"\");\n\t\t\tparserResult.linkInfos.add(pli);\n\t\t}\n\n\t\treturn replaceText;\n\t}",
"public static String renderAsLinkWithAnchor(final String text, final boolean invalidate)\n {\n return renderAsLinkWithAnchor(text, \"#\", false, invalidate);\n }",
"public String getAnchor() {\n/* 42 */ return this.anchor;\n/* */ }",
"protected String getLinkRef(By searcharticlelocator2) {\n\t\tWebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(searcharticlelocator2));\n\t\tString text = element.getAttribute(\"href\");\n\t\treturn text;\n\t}",
"public String getLink();",
"public List<String> linkTexts()\n\t{\n\t\t\n\t\tList<String> links=new ArrayList<String>();\n\t\tlinks.add(linkString);\n\t\tlinks.add(\"Facebook.com\");\n\t\tlinks.add(\"google.com;\");\n\t\tlinks.add(\"gmail.com\");\n\t\tlinks.add(\"shine.com\");\n\t\tlinks.add(\"nukari.com\");\n\t\t\n\t\t// Like the above we have to add number of link text are passed to achieve the DataDriven approach through BBD \n\t\t\t\n\t\treturn links;\n\t\t\n\t}",
"CharNode getLink();",
"public WebElement searchResultsLinks(String linkContaingText) {\r\n\t\treturn driver.findElement(By.xpath(\"//h2[contains(text(),'\"+linkContaingText+\"')]\"));\r\n\t}",
"public Link linkTo() {\n Label text = Label.of(name);\n URIObject target = FSURICodec.encode(this);\n return Link.textTarget(text, target);\n }",
"@Override\n public void onClick(View view) {\n Log.d(\"LoginActivity\", \"// span link clicked..\");\n }",
"public SymbolicElement<T> getAnchor();",
"public LinkButton( String text) {\n\t\tsuper( text);\n\t\tinit();\n\t}",
"void openLink(Link target);",
"public static String getArticleHref(Element content) {\n Elements texts = content.select(\".text a\");\n return BBC_URL + texts.attr(\"href\");\n }",
"public void linkPressed(String href) {\r\n String[] s = href.split(\":\");\r\n if (s.length >= 2) {\r\n /* Ex: \"toggle:Window lamp\"\r\n this means we should toggle the Window lamp. */\r\n if (s[0].equals(\"toggle\")) {\r\n GenRoomObject o = (GenRoomObject) roomObjects.get(s[1]);\r\n if (o != null) {\r\n toggleRoomObject(o.address, o.byteValue);\r\n }\r\n }\r\n /* Ex: \"on:Window lamp\"\r\n this means we should turn ON the Window lamp. */\r\n else if (s[0].equals(\"on\")) {\r\n GenRoomObject o = (GenRoomObject) roomObjects.get(s[1]);\r\n if (o != null) {\r\n setRoomObject(o.address, o.byteValue ,true);\r\n }\r\n }\r\n /* Ex: \"off:Window lamp\"\r\n this means we should turn OFF the Window lamp. */\r\n else if (s[0].equals(\"off\")) {\r\n GenRoomObject o = (GenRoomObject) roomObjects.get(s[1]);\r\n if (o != null) {\r\n setRoomObject(o.address, o.byteValue, false);\r\n }\r\n }\r\n }\r\n }",
"public HTMLPage(Link link, String text) {\r\n this.link = link;\r\n this.text = text;\r\n }",
"SimpleLink createSimpleLink();",
"public java.util.List getAnchor();",
"public void clickAssertionLinkAdd() {\r\n\t\tString Expected1 = \"The link has been added.\";\r\n\t\tString Actualtext1 = driver.findElement(By.xpath(\"//*[@id=\\\"content-section\\\"]/div/div[2]\")).getText();\r\n\t\tAssert.assertEquals(Actualtext1, Expected1);\r\n\t\tSystem.out.println(Actualtext1);\r\n\r\n\t}",
"public void setAnchor(String name)\r\n {\r\n this.anchor = name;\r\n }",
"public String getHref() {\n return href;\n }",
"EObject getAnchor();",
"Link createLink();",
"public String clickLink_partialLinkText(String object, String data) {\n\n\t\tlogger.debug(\"Clicking on link \");\n\t\ttry {\n\t\t\t\n\t\t\twaitForPageLoad(driver);\n\t\t\tdriver.findElement(By.partialLinkText(OR.getProperty(object))).click();\n\t\t\t//browserSpecificPause(object, data);\n\t\t\treturn Constants.KEYWORD_PASS;\n\t\t} catch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" -- \" + OR.getProperty(object) + \" link not present\";\n\t\t}\n\t}",
"private void writeLink() throws SAXException, IOException {\n if (state.uri != null && state.uri.trim().length() > 0) {\n xhtml.startElement(\"a\", \"href\", state.uri);\n xhtml.characters(state.hrefAnchorBuilder.toString());\n xhtml.endElement(\"a\");\n } else {\n try {\n //if it isn't a uri, output this anyhow\n writeString(state.hrefAnchorBuilder.toString());\n } catch (IOException e) {\n handleCatchableIOE(e);\n }\n }\n state.hrefAnchorBuilder.setLength(0);\n state.inLink = false;\n state.uri = null;\n\n }",
"private void onWhatTokenButtonClick() {\r\n\r\n //Open related web post\r\n Intent i = new Intent(Intent.ACTION_VIEW);\r\n i.setData(Uri.parse(getString(R.string.url_github_about_tokens)));\r\n startActivity(i);\r\n }",
"public String getText_click_My_Rewards_Link(){\r\n\t\treturn click_My_Rewards_Link.getText();\r\n\t}",
"public String getLink(String link,long id) throws IllegalArgumentException, UnsupportedEncodingException \n\t{\n\t\treturn link+userToken.generateToken(id);\n\t}",
"public String getHref() {\r\n return href;\r\n }",
"public ArrayList<String> findLinks(Text value) throws CharacterCodingException{\n\t\tint start = value.find(\"<text\");\n\t\tstart = value.find(\">\", start);\n\t\tint end = value.find(\"</text>\", start);\n\t\t//start+=1;\n\t\tString textBlock=new String();\n\t\ttry{\n\t\tif(end < value.getLength())\n\t\t\ttextBlock = Text.decode(value.getBytes(), start, end-start);\n\t\telse\n\t\t\ttextBlock = Text.decode(value.getBytes(), start, value.getLength()-start);\n\t\t} catch(Exception e){\n\t\t\treturn null;\n\t\t}\n\t\tArrayList<String> List = new ArrayList<String>();\n\t\t\n\t\tPattern wikiLinkRegEx = Pattern.compile(\"\\\\[\\\\[(?:[^|\\\\]]*\\\\|)?([^\\\\]]+)\\\\]\\\\]\");\n\t\tMatcher patternMatcher = wikiLinkRegEx.matcher(textBlock);\n\t\twhile(patternMatcher.find()) {\n\t\t\tint flag=0;\n\t\t\tint startIndex = patternMatcher.start();\n\t\t\tint endIndex = patternMatcher.end();\n\t\t\tString wikiLink = textBlock.substring(startIndex+2, endIndex-2);\n\t\t\twikiLink = wikiLink.replace(\" \", \"_\");\n\n\t\t\t//Checking for the occurrence of '|'\n\t\t\tif(wikiLink.contains(\"|\")){\n\t\t\t\tint pipeIndex = wikiLink.indexOf(\"|\");\n\t\t\t\twikiLink = wikiLink.substring(0, pipeIndex);\n\t\t\t}\n\t\t\t\n\t\t\t//Flagging all the invalid WikiLinks \n\t\t\t//if(wikiLink.contains(\":\") || wikiLink.contains(\"#\") || wikiLink.contains(\"/\") ){\n\t\t\t//\tflag=1;\n\t\t\t//}\n\t\t\t\n\t\t\t// Add the valid WikiLinks in the List\n\t\t\tif(flag==0){\n\t\t\t\twikiLink = wikiLink.replace(\"&\", \"&\");\n\t\t\t\tList.add(wikiLink);\n\t\t\t}\n\t }\n\t\treturn List;\n\t}",
"private ViewParameters findLink(Document hit, String freetext) {\n String pageno = hit.get(DocFields.PAGESEQ_START);\r\n if (pageno != null) {\r\n NavParams togo = new NavParams();\r\n togo.itemID = hit.get(\"identifier\");\r\n if (togo.itemID == null) {\r\n Logger.log.warn(\"Warning: identifier not found for \" + hit);\r\n togo.itemID = hit.get(\"itemID\");\r\n }\r\n togo.pageseq = Integer.parseInt(pageno);\r\n DarwinUtil.chooseBestView(togo, itemcollection);\r\n togo.viewID = FramesetProducer.VIEWID;\r\n\r\n togo.keywords = freetext;\r\n return togo;\r\n }\r\n else {\r\n RecordParams togo = new RecordParams(hit.get(\"identifier\"));\r\n return togo;\r\n }\r\n }",
"final String parseForLink(String upperCaseInput,String input)\r\n {\r\n int i,j,k,l;\r\n\tString temp=null;\r\n\tString link=null;\r\n\r\n\t// Look for links to other pages. Eg:- Normal links <A>..</A>\r\n i=upperCaseInput.indexOf(\"HREF\");\r\n\tif(i!=-1)\r\n\t{\r\n\t // Locate position of the quote marks.\r\n\t j=upperCaseInput.indexOf(\"\\\"\",i);\r\n\t k=upperCaseInput.indexOf(\"\\\"\",j+1);\r\n\t // Locate position of </a>\r\n\t l=upperCaseInput.indexOf(\"</A>\",i);\r\n\t // If double quotes were not found then try using single quote marks.\r\n\t if(j==-1 || k==-1 || (j>1 && k==-1))\r\n\t {\r\n\t j=upperCaseInput.indexOf(\"\\'\",i);\r\n\t\tk=upperCaseInput.indexOf(\"\\'\",j+1);\r\n\t }\r\n\t // Remove leading trailing spaces.\r\n if(j!=-1 && k!=-1)\r\n\t {\r\n\t temp=input.substring(j+1,k); // Extrct the link name.\r\n\t\tlink=temp.trim(); // Remove leading and trailing spaces.\r\n\t\treturn(link);\r\n\t }\r\n\t}\r\n\t// 2. Frames,\r\n\ti=upperCaseInput.indexOf(\"FRAME\");\r\n\tif(i!=-1)\r\n\t{\r\n\t l=upperCaseInput.indexOf(\"SRC\",i); // Locate position of source tag.\r\n\t if(l!=-1)\r\n\t {\r\n\t // Locate position of quote marks.\r\n\t\tj=upperCaseInput.indexOf(\"\\\"\",l);\r\n\t\tk=upperCaseInput.indexOf(\"\\\"\",j+1);\r\n\t\t// If double quotes were not found then try single quote marks\r\n\t\tif(j==-1)\r\n\t\t{\r\n\t\t j=upperCaseInput.indexOf(\"\\\"\",i);\r\n\t\t k=upperCaseInput.indexOf(\"\\\"\",j+1);\r\n\t\t}\r\n\t\t// Remove leading and trailing spaces.\r\n\t\tif(j!=-1 && k!=-1)\r\n\t\t{\r\n\t\t temp=input.substring(j+1,k); // Extract the link name\r\n\t\t link=temp.trim();\r\n\t\t return(link);\r\n\t\t}\r\n\t }\r\n\t}\r\n\treturn(null);\r\n }",
"public void linkByHref(WebDriver driver, String text2) {\r\n double start = System.currentTimeMillis();\r\n double res = (System.currentTimeMillis() - start) / 1000;\r\n String result = String.valueOf(res);\r\n if (!driver.findElement(By.xpath(\"//a[@href='\" + text2 + \"']\")).getText().equals(driver.findElement(By.xpath(\"//a[@href='\" + \"\" + \"']\")))) {\r\n log = \"+\";\r\n PASSED_TEST++;\r\n } else {\r\n log = \"!\";\r\n FAILED_TEST++;\r\n }\r\n resultLinkByHref = log + \" [checkLinkPresentByHref \\\"\" + driver.findElement(By.xpath(\"//a[@href='\" + text2 + \"']\")).getText() + \"\\\"]\" + \" \" + result + \"\\n\";\r\n resTime += res;\r\n countTESTS++;\r\n }",
"private Hyperlink makeHyperlink(){\n\t\tHyperlink ret = new Hyperlink();\n\t\tret.setId(\"variable\");\n\t\tret.setOnMouseClicked(e -> clickedVariable(ret));\n\t\tvBox.getChildren().add(ret);\n\t\treturn ret;\n\t}",
"public interface LinkParser {\n\n /**\n * Parse text content in format defined in RFC RFC6690 into array of links {@link Link}.\n *\n * @param bytes content to parse as array of bytes.\n */\n Link[] parseCoreLinkFormat(byte[] bytes) throws LinkParseException;\n}",
"public String getHref() {\n return href;\n }",
"public String getTextUrl(String text) {\n return StrUtils.createUrlFromString(text);\n }",
"@Override\n public void onClick(View v) {\n Toast.makeText(c, \"yes\" + article.getWeblink(), Toast.LENGTH_LONG).show();\n }",
"LINK createLINK();",
"public static String renderAsLinkWithAnchor(final String text, final String href,\n final boolean openInNewWindow)\n {\n return renderAsLinkWithAnchor(text, href, openInNewWindow, false);\n }",
"public static void main(String[] args) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n Pattern pattern = Pattern.compile(\"<a\\\\s+(href=[^>]+)>([^<]+)<\\\\/a>\");\n\n StringBuilder sb = new StringBuilder();\n String currentLine = reader.readLine();\n\n while (!\"END\".equals(currentLine)) {\n sb.append(currentLine).append(System.getProperty(\"line.separator\"));\n currentLine = reader.readLine();\n }\n\n Matcher matcher = pattern.matcher(sb);\n\n while (matcher.find()) {\n // group 1 = <a da stane => [URL\n // group 3 = > da stane => ]\n // group 5 = </a> da stane => [/URL]\n\n int startIndex = matcher.start();\n int endIndex = matcher.end();\n\n String replacedTag = \"[URL \" + matcher.group(1) + \"]\" + matcher.group(2) + \"[/URL]\";\n sb.replace(startIndex, endIndex, replacedTag);\n matcher = pattern.matcher(sb);\n\n }\n\n\n\n\n System.out.println(sb);\n\n\n }",
"public LinkImpl(String href) {\n this.href = href;\n }",
"public String verifyPaginationLinks(String object, String data) {\n\n\t\ttry {\n\t\t\t//waitForPageLoad(driver);\n\t\t\tString pagenationText = wait.until(explicitWaitForElement(By.xpath(OR.getProperty(object)))).getText();\n\n\t\t\tif (pagenationText.contains(OR.getProperty(\"first_link\")) && pagenationText.contains(OR.getProperty(\"next_link\"))\n\t\t\t\t\t&& pagenationText.contains(OR.getProperty(\"previous_link\")) && pagenationText.contains(OR.getProperty(\"last_link\"))) {\n\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\t}\n\n\t\t\treturn Constants.KEYWORD_FAIL;\n\t\t}catch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t} catch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" Object not found \" + e.getLocalizedMessage();\n\t\t}\n\n\t}",
"public String makeLink(@SuppressWarnings(\"unused\") int type, @SuppressWarnings(\"unused\") String link, @SuppressWarnings(\"unused\") String text) {\n\t\treturn null;\n\t\t/*\n\t\t * if( text == null ) text = link;\n\t\t * \n\t\t * text = callMutatorChain( m_linkMutators, text );\n\t\t * \n\t\t * return m_renderer.makeLink( type, link, text );\n\t\t */\n\t}",
"@Override\n protected void onComponentTag(final ComponentTag _tag)\n {\n super.onComponentTag(_tag);\n _tag.setName(\"a\");\n _tag.put(\"href\", \"#\");\n onComponentTagInternal(_tag);\n }",
"public static JXHyperlink createHyperLink(int level, String text, ActionListener listener) {\n JXHyperlink ret = new JXHyperlink();\n ret.setText(text);\n if (level == LEVEL_1) {\n ret.setForeground(Constants.LINK_COLOR_BOLD);\n ret.setClickedColor(Color.blue);//Constants.LINK_COLOR_BOLD);\n }\n else {\n ret.setFont(new Font(\"Verdana\", Font.PLAIN, 10));//FrameworkConstants.SMALL_FONT);\n ret.setForeground(Color.blue);//Constants.LINK_COLOR_BOLD);\n ret.setClickedColor(Color.blue);//Constants.LINK_COLOR_BOLD);\n }\n ret.addActionListener(listener);\n ret.setFocusable(false);\n return ret;\n }",
"public String getSourceText() {\n\t\treturn getSource().replaceAll(\"<a.*>(.*)</a>\", \"$1\");\n\t}",
"public String clickLink_linkText(String object, String data) throws InterruptedException {\n\t\tlogger.debug(\"Clicking on link \");\n\t\t\n\t\tWebElement ele=null;\n\t\ttry {\n\t\t\t\n\t\t\t\n\t\t\twaitForPageLoad(driver);\n\t\t\tisInConsistentAlert(object,data);\n\t\t\tele = wait.until(explicitWaitForElement(By.linkText(OR.getProperty(object))));\n\t\t\tele.click();\n\t\t\t//browserSpecificPause(object, data);\n\t\t\treturn Constants.KEYWORD_PASS;\n\t\t}\n\t\tcatch(TimeoutException ex){\n\t\t\treturn Constants.KEYWORD_FAIL + ex.getCause();\n\t\t}\n\t\tcatch (UnhandledAlertException f) {\n\t\t\t\n\t\t try {\n\t\t Alert alert = driver.switchTo().alert();\n\t\t String alertText = alert.getText();\n\t\t \n\t\t if(expectedAlert.equals(alertText)){\n\t\t Thread.sleep(2000);\n\t\t alert.accept();\n\t\t return Constants.KEYWORD_PASS +\" handle Incosistent Alert with alert message as --\"+ alertText;\n\t\t }\n\t\t //return Constants.KEYWORD_PASS;\n\t\t } catch (NoAlertPresentException e) {\n\t\t e.getCause();\n\t\t }\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" -- \" + OR.getProperty(object) + \" link not present\";\n\t\t}\n\t\treturn Constants.KEYWORD_PASS;\n\t}",
"public void clickLink(String link){\n\t\tSystem.out.println(\"CONTROLLER: LINK WAS CLICKED: \" + link);\n\t\tURL url_ = null;\n\t\ttry{\n\t\t\turl_ = new URL(new URL(this.url), link);\n\t\t\tthis.content = BrowsrDocumentValidator.assertIsValidBrowsrDocument(url_);\n\t\t\tthis.url = url_.toString();\n\t\t\tSystem.out.println(\"URL CONTROLLER:\" + this.url);\n\t\t} catch (Exception exception){\n\t\t\tthis.content = new Text(exception.toString());\n\t\t}\n\n\t}",
"public String getLink() {\r\n return link;\r\n }",
"public static void a(StringBuffer aBuf, String aHref, String aParams, String aData,\n String aTarget, String aOnClick) {\n aBuf.append(\"<a href=\\\"\").append(aHref);\n if (aParams.length() >0) {\n aBuf.append(\"?\").append(aParams);\n }\n aBuf.append(\" TARGET=\\\"\").append(aTarget);\n aBuf.append(\"\\\" ONCLICK=\\\"\").append(aOnClick).append(\"\\\"\");\n\n aBuf.append(\"\\\">\").append(aData).append(\"</a>\");\n}",
"public String getLink() {\n return link;\n }",
"HtmlPage clickSiteLink();",
"public static String renderAsLinkWithAnchor(final String text, final String href,\n final boolean openInNewWindow, final boolean invalidate)\n {\n final Element anchor = DOM.createAnchor();\n DOM.setInnerHTML(anchor, text);\n\n DOM.setElementProperty(anchor, \"href\", href);\n if (openInNewWindow)\n {\n DOM.setElementProperty(anchor, \"target\", \"blank\");\n }\n if (invalidate)\n {\n anchor.addClassName(INVALID_STYLE_CLASS);\n }\n return DOM.toString(anchor);\n }",
"private String getAnchorAttrs(FacesContext context, String clientId,\n int action) {\n int currentPage = 1;\n //int formNumber = getFormNumber(context);\n Integer curPage = (Integer) getAttributes().get(\"currentPage\");\n if (curPage != null) {\n currentPage = curPage;\n }\n String formId = getFormId(context);\n if (formId == null){\n return\n (\"href=\\\"javascript:void(0);document.forms[0]['\" + clientId +\n \"_action'].value='\" +\n action +\n \"'; \" +\n \"document.forms[0]['\" + clientId +\n \"_curPage'].value='\" +\n currentPage +\n \"'; \" +\n \"document.forms[0].submit()\\\"\");\n } else {\n return\n (\"href=\\\"javascript:void(0);document.forms['\" + formId + \"']['\" + clientId +\n \"_action'].value='\" +\n action +\n \"'; \" +\n \"document.forms['\" + formId + \"']['\" + clientId +\n \"_curPage'].value='\" +\n currentPage +\n \"'; \" +\n \"document.forms['\" + formId + \"'].submit()\\\"\");\n }\n }",
"@Test\n public void sourceTextInReferenceTest() {\n final String transcription = \"This is a test moo\";\n final String expected = \"This is a test <a class=\\\"internal-ref\\\" href=\\\"javascript:;\\\" \" +\n \"data-targetid=\\\"https://example.com/col/book/page/canvas\\\" \" +\n \"data-label=\\\"test\\\" \" +\n \"data-manifestid=\\\"https://example.com/col/book/manifest\\\">moo</a>\";\n\n String result = adapter.addInternalRefs(fakeCollection, transcription, Collections.singletonList(weirdRef()));\n assertEquals(expected, result);\n }",
"public void setHref(String href) {\r\n this.href = href;\r\n }",
"public static String transformPlainText(String text) {\r\n\t\t// url auto-linking\r\n\t\ttext = text.replaceAll(\"((http|https)://[0-9A-Za-z-_=\\\\?\\\\.\\\\$#&/]*)\", \"<a href=\\\"$1\\\">$1</a>\");\r\n\t\tString html = \"<pre>\" + text + \"</pre>\";\r\n\t\treturn html;\r\n\t}",
"public String getText_click_Fuel_Rewards_Link(){\r\n\t\treturn click_Fuel_Rewards_Link.getText();\r\n\t}",
"@SuppressWarnings(\"static-method\")\n\tprotected ReferenceContext extractReferencableElements(String text) {\n\t\tfinal ReferenceContext context = new ReferenceContext();\n\n\t\t// Visit the links and record the transformations\n\t\tfinal MutableDataSet options = new MutableDataSet();\n\t\tfinal Parser parser = Parser.builder(options).build();\n\t\tfinal Node document = parser.parse(text);\n\t\tfinal Pattern pattern = Pattern.compile(SECTION_PATTERN_AUTONUMBERING);\n\t\tNodeVisitor visitor = new NodeVisitor(\n\t\t\t\tnew VisitHandler<>(Paragraph.class, it -> {\n\t\t\t\t\tfinal CharSequence paragraphText = it.getContentChars();\n\t\t\t\t\tfinal Matcher matcher = pattern.matcher(paragraphText);\n\t\t\t\t\tif (matcher.find()) {\n\t\t\t\t\t\tfinal String number = matcher.group(2);\n\t\t\t\t\t\tfinal String title = matcher.group(3);\n\t\t\t\t\t\tfinal String key1 = computeHeaderId(number, title);\n\t\t\t\t\t\tfinal String key2 = computeHeaderId(null, title);\n\t\t\t\t\t\tcontext.registerSection(key1, key2, title);\n\t\t\t\t\t}\n\t\t\t\t}));\n\t\tvisitor.visitChildren(document);\n\n\t\tfinal Pattern pattern1 = Pattern.compile(SECTION_PATTERN_TITLE_EXTRACTOR_WITHOUT_MD_PREFIX);\n\t\tvisitor = new NodeVisitor(\n\t\t\t\tnew VisitHandler<>(Heading.class, it -> {\n\t\t\t\t\tString key = it.getAnchorRefId();\n\t\t\t\t\tString title = it.getText().toString();\n\t\t\t\t\t// Sometimes, the title already contains the section number.\n\t\t\t\t\t// It should be removed.\n\t\t\t\t\tfinal Matcher matcher = pattern1.matcher(title);\n\t\t\t\t\tif (matcher.find()) {\n\t\t\t\t\t\tfinal String number = matcher.group(1);\n\t\t\t\t\t\ttitle = matcher.group(2);\n\t\t\t\t\t\tif (Strings.isEmpty(key)) {\n\t\t\t\t\t\t\tkey = computeHeaderId(number, title);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfinal String key2 = computeHeaderId(null, title);\n\t\t\t\t\tif (Strings.isEmpty(key)) {\n\t\t\t\t\t\tkey = key2;\n\t\t\t\t\t}\n\t\t\t\t\tcontext.registerSection(key, key2, title);\n\t\t\t\t}));\n\t\tvisitor.visitChildren(document);\n\n\t\treturn context;\n\t}",
"@NotNull\n private static String addHyperlinksToText(@NotNull String text, @NotNull NotificationHyperlink... hyperlinks) {\n if (hyperlinks.length == 0) {\n return text;\n }\n StringBuilder b = new StringBuilder();\n b.append(text);\n\n for (NotificationHyperlink hyperlink : hyperlinks) {\n b.append(\"<br>\\n\").append(hyperlink.toHtml());\n }\n\n return b.toString();\n }",
"private String readLink(XmlPullParser parser) throws IOException, XmlPullParserException {\n\t String link = \"\";\n\t parser.require(XmlPullParser.START_TAG, ns, \"link\");\n\t String tag = parser.getName();\n\t String relType = parser.getAttributeValue(null, \"rel\"); \n\t if (tag.equals(\"link\")) {\n\t if (relType.equals(\"alternate\")){\n\t link = parser.getAttributeValue(null, \"href\");\n\t parser.nextTag();\n\t } \n\t }\n\t parser.require(XmlPullParser.END_TAG, ns, \"link\");\n\t return link;\n\t }",
"public void clickOnText(String text);",
"String getToken();",
"String getToken();",
"String getToken();",
"String getToken();",
"String getToken();",
"public String getLink()\n {\n return link;\n }",
"public String getHref()\r\n\t{\r\n\t\treturn _href;\r\n\t}",
"public void setLink(String link) {\r\n this.link = link;\r\n }",
"public void setLink(String link)\n {\n this.link = link;\n }",
"private String urlLink(final String url, final String name) {\n Tag aTag = new Tag(\"a\");\n aTag.add(name);\n aTag.addParameter(\"href\", baseUrl + url);\n return aTag.toString();\n }",
"private @NotNull List<String> getAllLinks(final String text, final String urlStart) {\n List<String> links = new ArrayList<>();\n\n int i = 0;\n while (text.indexOf(urlStart, i) != -1) {\n int linkStart = text.indexOf(urlStart, i);\n int linkEnd = text.indexOf(\" \", linkStart);\n if (linkEnd != -1) {\n String link = text.substring(linkStart, linkEnd);\n links.add(link);\n } else {\n String link = text.substring(linkStart);\n links.add(link);\n }\n i = text.indexOf(urlStart, i) + urlStart.length();\n }\n\n return links;\n }",
"abstract Color linkColor(String link);",
"@Test\n\tpublic void testGetLinksMultipleLinks() {\n\t\tList<String> results = helper.getLinks(\n\t\t\t\t\"drop tables; <A HREF=\\\"test.com\\\"> <a href=\\\"nexttest.org\\\". junk junk\", null);\n\t\tassertEquals(2, results.size());\n\t\tassertEquals(\"test.com\", results.get(0));\n\t\tassertEquals(\"nexttest.org\", results.get(1));\n\t}",
"TextWithReferences getTextWithReferences();",
"private void checkTextAnnotation(MGraph g, UriRef textAnnotation, String content) {\n Iterator<Triple> selectedTextIterator = g.filter(textAnnotation,\n Properties.ENHANCER_SELECTED_TEXT, null);\n // check if the selected text is added\n assertTrue(selectedTextIterator.hasNext());\n // test if the selected text is part of the TEXT_TO_TEST\n Resource object = selectedTextIterator.next().getObject();\n assertTrue(object instanceof Literal);\n Literal selectedText = (Literal)object;\n object = null;\n assertTrue(content.indexOf(selectedText.getLexicalForm()) >= 0);\n // test if context is added\n //context not present for Zemanta\n// Iterator<Triple> selectionContextIterator = g.filter(textAnnotation,\n// Properties.ENHANCER_SELECTION_CONTEXT, null);\n// assertTrue(selectionContextIterator.hasNext());\n// // test if the selected text is part of the TEXT_TO_TEST\n// object = selectionContextIterator.next().getObject();\n// assertTrue(object instanceof Literal);\n// assertTrue(content.indexOf(((Literal)object).getLexicalForm()) >= 0);\n// object = null;\n //test start/end if present\n Iterator<Triple> startPosIterator = g.filter(textAnnotation,\n ENHANCER_START, null);\n Iterator<Triple> endPosIterator = g.filter(textAnnotation,\n ENHANCER_END, null);\n //start end is optional, but if start is present, that also end needs to be set\n if(startPosIterator.hasNext()){\n Resource resource = startPosIterator.next().getObject();\n //only a single start position is supported\n assertTrue(!startPosIterator.hasNext());\n assertTrue(resource instanceof TypedLiteral);\n TypedLiteral startPosLiteral = (TypedLiteral) resource;\n resource = null;\n int start = LiteralFactory.getInstance().createObject(Integer.class, startPosLiteral);\n startPosLiteral = null;\n //now get the end\n //end must be defined if start is present\n assertTrue(endPosIterator.hasNext());\n resource = endPosIterator.next().getObject();\n //only a single end position is supported\n assertTrue(!endPosIterator.hasNext());\n assertTrue(resource instanceof TypedLiteral);\n TypedLiteral endPosLiteral = (TypedLiteral) resource;\n resource = null;\n int end = LiteralFactory.getInstance().createObject(Integer.class, endPosLiteral);\n endPosLiteral = null;\n //check for equality of the selected text and the text on the selected position in the content\n //System.out.println(\"TA [\"+start+\"|\"+end+\"]\"+selectedText.getLexicalForm()+\"<->\"+content.substring(start,end));\n assertTrue(content.substring(start, end).equals(selectedText.getLexicalForm()));\n } else {\n //if no start position is present, there must also be no end position defined\n assertTrue(!endPosIterator.hasNext());\n }\n }"
]
| [
"0.6687694",
"0.6345262",
"0.62863106",
"0.62863106",
"0.61882496",
"0.60733515",
"0.60464114",
"0.598636",
"0.5841459",
"0.576989",
"0.5748046",
"0.57344717",
"0.5728003",
"0.570851",
"0.5697042",
"0.5677886",
"0.56635237",
"0.5661931",
"0.5580637",
"0.5568872",
"0.5538564",
"0.54567873",
"0.5419179",
"0.53955775",
"0.53873414",
"0.5385849",
"0.5353625",
"0.5327299",
"0.53109205",
"0.5275744",
"0.5248067",
"0.5246824",
"0.52344126",
"0.52266204",
"0.52241033",
"0.5209675",
"0.5207575",
"0.51971644",
"0.51780796",
"0.51728326",
"0.5168393",
"0.51495713",
"0.51491404",
"0.51477516",
"0.5129199",
"0.51262194",
"0.5124861",
"0.5124315",
"0.5118733",
"0.51162356",
"0.51042336",
"0.5103742",
"0.5094129",
"0.50769407",
"0.50653",
"0.50621885",
"0.50253797",
"0.5010199",
"0.50087076",
"0.49501902",
"0.49381155",
"0.4925964",
"0.49257743",
"0.49229088",
"0.49068415",
"0.48934224",
"0.4889271",
"0.4879214",
"0.48711416",
"0.48700473",
"0.48544",
"0.48516157",
"0.48495558",
"0.48453584",
"0.48451072",
"0.48411697",
"0.4832405",
"0.48244363",
"0.4821005",
"0.4819272",
"0.4815609",
"0.4805405",
"0.48017845",
"0.48008877",
"0.4789516",
"0.47871986",
"0.4778353",
"0.4778353",
"0.4778353",
"0.4778353",
"0.4778353",
"0.47771692",
"0.47708592",
"0.47669122",
"0.4765579",
"0.47646862",
"0.4756254",
"0.4750511",
"0.47481188",
"0.47466335",
"0.47411638"
]
| 0.0 | -1 |
mywebapp.log("checkRequired message=" + message); | protected void checkRequired(TextBoxBase textBox, String message) {
if (textBox == null) return;
if (textBox.getValue() == null || textBox.getValue().length() == 0) {
getMessagePanel().displayError(message);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void logSevere(String pMessage)\n{\n\n Logger.getLogger(getClass().getName()).log(Level.SEVERE, pMessage);\n\n}",
"private void logIt(String msg) {\n\tSystem.out.println(\"PLATINUM-SYNC-LOG: \" + msg);\n}",
"void log(Message message);",
"public void getMessage() {\n\r\n\t}",
"public void error(Object message)\n/* */ {\n/* 199 */ if (message != null) {\n/* 200 */ getLogger().error(String.valueOf(message));\n/* */ }\n/* */ }",
"public void log(String message) {\n\t}",
"public String get_log(){\n }",
"public void log(String msg) {\n\n\t}",
"void log();",
"public void logMessage( Object p_msg);",
"public void log(String msg) {\n if(Debug.isEnabled()){ \n filterConfig.getServletContext().log(msg); //Shows in the Tomcat logs \n Debug.println(msg);\n }\n }",
"void log(String string);",
"@Override\r\n\tprotected void logMessage(String message) {\n\t\t\r\n\t}",
"void log(HandlerInput input, String message) {\n System.out.printf(\"[%s] [%s] : %s]\\n\",\n input.getRequestEnvelope().getRequest().getRequestId().toString(),\n new Date(),\n message);\n }",
"String getMessage();",
"String getMessage();",
"String getMessage();",
"public void log(String text) {\n }",
"void logTiMessages(final String msg);",
"abstract void logMessage(String message);",
"private static void LogStatic(String action) {\r\n\t}",
"@Then(\"My logi success\")\r\n\tpublic void my_logi_success() {\n\t\tSystem.out.println(\"code for sucess\");\r\n\t}",
"private static void log(String aMsg){\n\t System.out.println(aMsg);\n\t }",
"java.lang.String getLogMessage();",
"void showAlert(String message);",
"public static void main(String[] args) {\n\r\n\t\tlog.error(\"Demo1 Unable to click on button\");\r\n\t\tlog.fatal(\"Demo1 Fatal error displayed\");\r\n\t\tlog.info(\"Demo1 successfully entered username and password\");\r\n\t\tlog.debug(\"Demo1 debug information displayed\");\r\n\t}",
"public void printFailure() {\n //\n }",
"private void assertMessage(String aMessage){\n\t\tSystem.out.println(aMessage);\n\t\terror = true;\n\t}",
"private void doIt() {\n\t\tlogger.debug(\"hellow this is the first time I use Logback\");\n\t\t\n\t}",
"public static void main(String[] args){ \r\n\t\t /* PropertyConfigurator.configure(\"application.properties\");\r\n\t\t log.debug(\"Hello this is a debug message\"); \r\n\t log.info(\"Hello this is an info message\"); \r\n\t System.out.println(\"Hi..Cool\");\r\n\t URLTest u=new URLTest();\r\n\t u.sendGET();*/\r\n\t\t\r\n\t\t System.out.println(\"Hi..IMI\");\r\n\t }",
"public void onLogMessage(String message);",
"public static void logGenericUserError() {\n\n }",
"@Override\n public void log(String message) {\n }",
"private void logUser() {\n }",
"void displayErrorMessage(String message);",
"@Test\n public void loginWithEmptyName(){\n\n Assert.assertEquals(createUserChecking.creationChecking(\"\",email),\"APPLICATION ERROR #11\");\n log.info(\"Empty login and email \"+ email+\" were typed\");\n }",
"private void Log(String action) {\r\n\t}",
"public void log(String txt);",
"@RequestMapping(\"/\")\n String hello(){\n logger.debug(\"Debug message\");\n logger.info(\"Info message\");\n logger.warn(\"Warn message\");\n logger.error(\"Error message\");\n return \"Done\";\n }",
"String getLogHandled();",
"String getStatusMessage( );",
"public void consoleLog(String actual, String expected){\n\t if(actual.equalsIgnoreCase(expected)){\n\t\t Reporter.log(actual + \" is correct.\");\n\t }\t \n }",
"void logHTTPRequest(HttpServletRequest request, Logger logger);",
"public void logData(){\n }",
"void showErrorMsg(String string);",
"private void action_error(HttpServletRequest request, HttpServletResponse response, String message) {\n\n FailureResult fail = new FailureResult(getServletContext());\n fail.activate(message, request, response);\n }",
"private static void log(String message) {\n System.out.println(message);\n }",
"public void checkForAlerts() {\n }",
"private void showToastRequired(String message) {\n Toast.makeText(this, getString(R.string.validation_required, message),\n Toast.LENGTH_SHORT).show();\n }",
"private void log(String message) {\n System.out.println(message);\n }",
"protected final void message(String message) {\r\n Harness.log(name, message);\r\n }",
"private void log(String message) {\n System.out.println(message);\n }",
"@Test\n public void loginAsEmptyUser(){\n Assert.assertEquals(createUserChecking.creationChecking(\"\",\"\"),\"APPLICATION ERROR #11\");\n log.info(\"Empty login and email were typed\");\n }",
"protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please specify at least one component\");\n else {\n \t\t//TODO add more checks\n \t\tok();\n }\n }",
"public static void main(String[] args) {\n // logger.info(\"Message\");\n // System.out.println(\"cdkdk\");\n\n }",
"private static void log(String msg) {\n System.out.println(msg);\n }",
"String getStatusMessage();",
"public void info(Object message)\n/* */ {\n/* 145 */ if (message != null) {\n/* 146 */ getLogger().info(String.valueOf(message));\n/* */ }\n/* */ }",
"void info(String message);",
"public static void main(String[] args)throws IOException ,SQLException {\nlog.debug(\"Hello this is a debug message\");\r\nlog.info(\"Hello this is a info message\");\r\nlog.warn(\"Sample warn message \");\r\nlog.error(\"Sample error message \");\r\nlog.fatal(\"Sample fatal message \");\r\n\r\n}",
"public String getMessage();",
"public String getMessage();",
"public String getMessage();",
"public String getMessage();",
"public String getMessage();",
"public String getMessage();",
"public String getMessage();",
"private void logError(String msgText) {\n System.out.println (\"[ERROR] \" + msgText);\n \n }",
"void showError(String message);",
"void showError(String message);",
"abstract void errorLogMessage(String message);",
"private void logInvalidMessage(String msg){\n \tif (null != utilLog){\n \t\tutilLog.error(msg);\n \t}\n \telse{\n \t\tSystem.out.println(msg);\n \t}\n }",
"void criticalNotification(PortletRequest request, MimeResponse response,\n String caption, String message, String details, String url)\n throws IOException {\n \n // clients JS app is still running, but server application either\n // no longer exists or it might fail to perform reasonably.\n // send a notification to client's application and link how\n // to \"restart\" application.\n \n if (caption != null) {\n caption = \"\\\"\" + caption + \"\\\"\";\n }\n if (details != null) {\n if (message == null) {\n message = details;\n } else {\n message += \"<br/><br/>\" + details;\n }\n }\n if (message != null) {\n message = \"\\\"\" + message + \"\\\"\";\n }\n if (url != null) {\n url = \"\\\"\" + url + \"\\\"\";\n }\n \n // Set the response type\n response.setContentType(\"application/json; charset=UTF-8\");\n final OutputStream out = response.getPortletOutputStream();\n final PrintWriter outWriter = new PrintWriter(new BufferedWriter(\n new OutputStreamWriter(out, \"UTF-8\")));\n outWriter.print(\"for(;;);[{\\\"changes\\\":[], \\\"meta\\\" : {\"\n + \"\\\"appError\\\": {\" + \"\\\"caption\\\":\" + caption + \",\"\n + \"\\\"message\\\" : \" + message + \",\" + \"\\\"url\\\" : \" + url\n + \"}}, \\\"resources\\\": {}, \\\"locales\\\":[]}]\");\n outWriter.close();\n }",
"protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please type in the License Server\");\n else {\n \t//TODO add more checks\n \tok();\n }\n }",
"private void logToFile() {\n }",
"private DemoProcessStartEmailForWebservice() {\n\n }",
"final void out (String msg) { if (m_debugMode) { Logger.println (msg); } }",
"public abstract String getMessage();",
"public void verifyRegistrationwelcomemsg(String welcomemessage){\r\n\t\tString weolcome = getValue(welcomemessage);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- continue Registartion button clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tif(getAndVerifyPartialText(locator_split(\"Regwelcomemsg\"),weolcome)) { \r\n\t\t\t\twaitForPageToLoad(20);\r\n\t\t\t}\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Welcome msg Displayed\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Welcome msg Displayed is displayed \"+elementProperties.getProperty(\"Regwelcomemsg\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \" + elementProperties.getProperty(\"Regwelcomemsg\").toString().replace(\"By.\", \" \") + \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"@Override\n\tpublic void message(String arg0) {\n\n\t}",
"public abstract void logd(String str);",
"@Override\r\n\tpublic void getMessage() {\n\t\tSystem.out.println(\"getMessage() 출력...\");\r\n\t}",
"void displayMessage(String message);",
"public abstract void logKenaiUsage(Object... parameters);",
"public static void main(String[] args) throws Exception {\n \n// // Log actions into a text file\n// String currentDirectory = System.getProperty(\"user.dir\");\n// String configurationFilename = \"logging.properties\";\n// String configFilePath = currentDirectory + \"/\" + configurationFilename;\n// try {\n// FileInputStream config = new FileInputStream(configFilePath);\n// LogManager.getLogManager().readConfiguration(config);\n// String logFilename = System.getProperty(\"user.home\") + \"/.ihale/log.txt\";\n// // Allow appending to the logging file.\n// Handler fh = new FileHandler(logFilename, true);\n// Logger.getLogger(\"\").setLevel(Level.OFF);\n// Logger.getLogger(\"\").addHandler(fh);\n// }\n// catch (IOException ioe) {\n// // CheckStyle was complaining about use of tabs when there wasn't so this long string is\n// // placed into a String variable to comply with the warning.\n// System.out.println(\"Error, logging properties file not found at \" + configFilePath);\n// System.out.println(\"Log messages will be appended to the console\");\n// }\n \n Server server = new Server(port);\n Context context = new Context(server, \"/\" + contextPath, Context.SESSIONS);\n\n ServletHolder servletHolder = new ServletHolder(new WicketServlet());\n servletHolder.setInitParameter(\"applicationClassName\", applicationClass);\n servletHolder.setInitOrder(1);\n context.addServlet(servletHolder, \"/*\");\n try {\n server.start();\n System.out.printf(\"%nApplication at http://localhost:%s/%s. Press return to exit.%n\", port,\n contextPath);\n while (System.in.available() == 0) {\n Thread.sleep(5000);\n }\n server.stop();\n server.join();\n }\n catch (Exception e) {\n e.printStackTrace();\n System.exit(1);\n }\n }",
"private void log(String message) {\n\t\tif (isLoggerOn) {\n\t\t\tSystem.out.println(\"JaxbConverter: \" + message);\n\t\t}\n\t}",
"public void assertMsgCheck() {\r\n\t\tassertEquals(successMsg.getText().substring(0,36), \"Success: You have modified products!\");\r\n\t\tSystem.out.println(\"Asserted that the msg has been displayed: \"+ successMsg.getText().substring(0,36));\r\n\t}",
"public void showMessage(String message);",
"void printHellow() {\n logger.debug(\"hellow world begin....\");\n logger.info(\"it's a info message\");\n logger.warn(\"it's a warning message\");\n loggerTest.warn(\"from test1 :....\");\n loggerTest.info(\"info from test1 :....\");\n\n // print internal state\n LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();\n StatusPrinter.print(lc);\n }",
"boolean hasErrormessage();",
"String getFailureMessage();",
"protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please specify a configuration\");\n else {\n \t\t//TODO add more checks\n \t\tok();\n }\n }",
"public static void displayMsg() {\n\t}",
"public static void wtf(String message, Object... args) {\n log(ASSERT, null, null, message, args);\n }",
"java.lang.String getTheMessage();",
"@Test\n public void testFailedStoreCreationCheck() {\n window.textBox(\"storeNameTFld\").setText(\"store1\");\n window.textBox(\"numOfSeatsTFld\").setText(\"155\");\n window.textBox(\"storeAddressTFld\").setText(\"address\");\n window.textBox(\"storeCityTFld\").setText(\"city\");\n window.textBox(\"storePhoneTFld\").setText(\"123123\");\n window.textBox(\"emailTFld\").setText(\"hlias.karasyahoo.gr\");\n window.textBox(\"fromOpenHoursTFld\").setText(\"00:00\");\n window.textBox(\"toOpenHoursTFld\").setText(\"00:00\"); \n window.button(\"addStoreBtn\").click();\n window.optionPane().requireInformationMessage().requireMessage(\"Store Creation Failed\\n\");\n }",
"public void test_getLogMessage_1() {\n String logMessage = instance.getLogMessage();\n\n assertTrue(\"'getLogMessage' should be correct.\",\n logMessage.indexOf(\"type: type id: 1 operator:operator - message\") != -1);\n assertTrue(\"'getLogMessage' should be correct.\", logMessage.indexOf(\"java.lang.Exception\") != -1);\n }",
"@Override\n public String getMessage(){\n \n }",
"void log(String message) {\n System.out.println(buildMessage(message));\n }",
"private static void print(Object msg){\n if (WAMClient.Debug){\n System.out.println(msg);\n }\n\n }",
"@Override\n public void logs() {\n \n }"
]
| [
"0.58472776",
"0.5749218",
"0.5740663",
"0.5639807",
"0.5581124",
"0.55147886",
"0.5500994",
"0.5492412",
"0.54920536",
"0.54868114",
"0.54831606",
"0.54804087",
"0.5478861",
"0.54711425",
"0.54615515",
"0.54615515",
"0.54615515",
"0.5438442",
"0.5425292",
"0.5423176",
"0.54185444",
"0.5410286",
"0.54066294",
"0.54027766",
"0.54008806",
"0.5398704",
"0.53905994",
"0.53888386",
"0.537975",
"0.5361519",
"0.53478867",
"0.53438604",
"0.53434503",
"0.5342271",
"0.53388375",
"0.5333786",
"0.53259325",
"0.5277908",
"0.5258494",
"0.5250792",
"0.52488875",
"0.5246305",
"0.52434987",
"0.52392805",
"0.52359",
"0.52354753",
"0.52256835",
"0.5202774",
"0.52016336",
"0.5189535",
"0.51822233",
"0.51729834",
"0.5158895",
"0.51497495",
"0.51379293",
"0.51282907",
"0.5126995",
"0.5121522",
"0.51078844",
"0.5106749",
"0.5103938",
"0.5103938",
"0.5103938",
"0.5103938",
"0.5103938",
"0.5103938",
"0.5103938",
"0.51022774",
"0.50952584",
"0.50952584",
"0.5088253",
"0.50873625",
"0.508586",
"0.50842834",
"0.50693893",
"0.5064594",
"0.5063476",
"0.5062106",
"0.50617844",
"0.50484294",
"0.5047407",
"0.5043836",
"0.5039273",
"0.5037083",
"0.5035284",
"0.5033102",
"0.502069",
"0.50171965",
"0.5016857",
"0.50159234",
"0.5013157",
"0.5011175",
"0.50077164",
"0.500404",
"0.4998717",
"0.49966618",
"0.4993353",
"0.49921438",
"0.49893248",
"0.49884513",
"0.49870294"
]
| 0.0 | -1 |
need to change the URL so we can go back to search form | public void performSearch() {
History.newItem(MyWebApp.SEARCH_RESULTS);
getMessagePanel().clear();
if (keywordsTextBox.getValue().isEmpty()) {
getMessagePanel().displayMessage("Search term is required.");
return;
}
mywebapp.getResultsPanel().resetSearchParameters();
//keyword search does not restrict to spots
mywebapp.addCurrentLocation();
if (markFilterCheckbox != null) {
mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(markFilterCheckbox.getValue());
}
if (contestFilterCheckbox != null) {
mywebapp.getResultsPanel().getSearchParameters().setContests(contestFilterCheckbox.getValue());
}
if (geoFilterCheckbox != null) {
mywebapp.getResultsPanel().getSearchParameters().setGeospatialOff(!geoFilterCheckbox.getValue());
}
if (plateFilterCheckbox != null) {
mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(plateFilterCheckbox.getValue());
}
if (spotFilterCheckbox != null) {
mywebapp.getResultsPanel().getSearchParameters().setSpots(spotFilterCheckbox.getValue());
}
String color = getValue(colorsListBox);
mywebapp.getResultsPanel().getSearchParameters().setColor(color);
String manufacturer = getValue(manufacturersListBox);
if (manufacturer != null) {
Long id = new Long(manufacturer);
mywebapp.getResultsPanel().getSearchParameters().setManufacturerId(id);
}
String vehicleType = getValue(vehicleTypeListBox);
mywebapp.getResultsPanel().getSearchParameters().setVehicleType(vehicleType);
// for (TagHolder tagHolder : tagHolders) {
// mywebapp.getResultsPanel().getSearchParameters().getTags().add(tagHolder);
// }
mywebapp.getResultsPanel().getSearchParameters().setKeywords(keywordsTextBox.getValue());
mywebapp.getMessagePanel().clear();
mywebapp.getResultsPanel().performSearch();
mywebapp.getTopMenuPanel().setTitleBar("Search");
//mywebapp.getResultsPanel().setImageResources(resources.search(), resources.searchMobile());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getSearchUrl();",
"private String getSearchUrl(String url ){\n String params = searchEditText.getText().toString();\n params = params.replace(\" \",\"+\");\n url += params + \"&filter=ebooks&prettyPrint=false\";\n return url;\n }",
"private void doSearchRedirect(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n String search = request.getParameter(\"search\");\n \n if(search == null || search.trim().isEmpty()) {\n error(\"Recherche invalide\", request, response);\n return;\n }\n \n redirect(String.format(\"./search/%s\", search), \"Recherche en cours ...\",\n request, response);\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //processRequest(request, response);\n String searchLikeThis = request.getParameter(\"searchLikeThis\");\n if (searchLikeThis != null) {\n //List<Item> foundItems = itemService.searchItemByString(searchLikeThis);\n request.setAttribute(\"search\", searchLikeThis);\n response.sendRedirect(getServletContext().getContextPath() + \"/search?search=\"+searchLikeThis); \n }\n }",
"public void back_searchResult(View view){\n // Goes back to Login page\n Intent i = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(i);\n }",
"private void searchWeb()\n {\n searchWeb = true;\n search();\n }",
"@Override\r\n public boolean onQueryTextChange(String s) {\r\n\r\n if(s.equals(\"\")){ //When search bar is empty again the page is reloaded\r\n\r\n Intent refresh = new Intent(getApplicationContext(), MyDevicesActivity.class);\r\n\r\n startActivity(refresh);\r\n\r\n finish();\r\n\r\n }\r\n return false;\r\n }",
"@Override\n public boolean onQueryTextSubmit(String s) {\n Intent intent = new Intent(getApplicationContext(), SearchActivity.class);\n intent.putExtra(\"idBeca\", s);\n startActivity(intent);\n return true;\n }",
"@Override\n\tpublic void onBackPressed () {\n\t\tif (searchMode) {\n\t\t\ttoggleSearch();\n\t\t\treturn;\n\t\t}\n\t\tsuper.onBackPressed();\n\t}",
"@Override\n\tpublic String queryURL(String search) {\n\t\tString searchUTF8 = null;\n\t\t\n\t\ttry {\n\t\t\tsearchUTF8 = URLEncoder.encode(search, \"UTF-8\");\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tStringBuilder queryURL = new StringBuilder();\n\t\tqueryURL.append(NaverSecret.NURL.MOVIE);\n\t\t\n\t\tString queryString = String.format(\"?query=%s\", searchUTF8);\n\t\tqueryURL.append(queryString);\n\t\t\n\t\tqueryString = String.format(\"&display=%d\", 10);\n\t\tqueryURL.append(queryString);\n\t\tlog.debug(\"queryURL 확인 : \" + queryURL.toString());\n\t\t\n\t\treturn queryURL.toString();\n\t}",
"private String doGoBack( HttpServletRequest request )\r\n {\r\n String strJspBack = request.getParameter( StockConstants.MARK_JSP_BACK );\r\n\r\n return StringUtils.isNotBlank( strJspBack ) ? ( AppPathService.getBaseUrl( request ) + strJspBack )\r\n : ( AppPathService.getBaseUrl( request ) + JSP_MANAGE_CATEGORYS );\r\n }",
"private URL buildSearchUrl(final String model) {\n final UrlBuilder urlBuilder = UrlBuilder.empty() //\n .withScheme(\"http\") //\n .withHost(\"ark.intel.com\") //\n .withPath(\"/search\") //\n .addParameter(\"q\", model);\n return urlBuilder.toUrl();\n }",
"public void changeUrl() {\n url();\n }",
"@Test\n\tpublic void testUrlFromSearchResult() {\n\t\tdriver.get(\"http://automationpractice.com\");\n\n\t\t// Text input for keyword\n\t\tString keyword = \"Blouse\";\n\n\t\t// The expected result\n\t\tString expected = \"http://automationpractice.com/index.php?controller=search&orderby=position&orderway=desc&search_query=Blouse\";\n\n\t\t// Find the Search box element by its name\n\t\telement = driver.findElement(By.name(\"search_query\"));\n\n\t\t// Enter keyword to search for\n\t\telement.sendKeys(keyword);\n\n\t\t// Now submit the form\n\t\telement.submit();\n\n\t\t// Get the Url from Search result\n\t\tString actual = driver.getCurrentUrl();\n\n\t\t// Compare the expected VS actual result\n\t\tAssert.assertEquals(expected, actual);\n\t}",
"public String search() {\r\n\t\tgetNavigationPanel(3);\r\n\t\treturn SUCCESS;\r\n\t}",
"private void returnHome(){\n if (Boolean.toString(UpdatedHomePage.updatedHomeStarted).equals(\"false\")) {\n startActivity(new Intent(FinalPlan.this, Home.class));\n } else {\n Intent intent = new Intent(this, UpdatedHomePage.class);\n Bundle extras = new Bundle();\n extras.putBoolean(\"filtered\", true);\n intent.putExtras(extras);\n startActivity(intent);\n }\n }",
"public abstract String redirectTo();",
"@Override\n\tpublic void onBackPressed()\n\t{\n\t\tsuper.onBackPressed();\n\t\t// MainActivity.isReSearch = true;\n\t}",
"@Override\r\n public boolean onQueryTextSubmit(String query) {\n searchView.setQuery(\"\", true);\r\n searchView.setIconified(true);\r\n AuxiliarHelper.getAuxiliar().setModificado(false);\r\n\r\n JSON_URL = Uri.encode(\"https://www.e-ranti.com/servicioWeb-1.0/footpathperu/producto/listar/\" + query + \"/\" + AuxiliarHelper.getAuxiliar().getIdioma() + 1, ALLOWED_URI_CHARS);\r\n jsoBandera = false;\r\n iniciarCarga();\r\n new BanderasHelper().getBandera().setBanderaInicio(true);\r\n return true;\r\n }",
"@Override\n public void onBackPressed() {\n if (locationFound) {\n mEditSearch.setText(\"\");\n resetSearchAheadList();\n resetDoctorsList();\n } else {\n super.onBackPressed();\n }\n }",
"@Override\n public boolean onQueryTextSubmit(String query) {\n searchQueryToRestore = query;\n // update the state variable\n searchQueryIsSubmitted = true;\n // remove focus from SearchView\n rootLayout.requestFocus();\n return false;\n }",
"public boolean onQueryTextSubmit(String query) {\n Intent next = new Intent(BinActivity.this, SearchActivity.class);\n next.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);\n next.putExtra(\"title\",query);\n startActivity(next);\n return true;\n }",
"public boolean onQueryTextSubmit(String query) {\n Intent i=new Intent(getApplicationContext(),SearchActivity.class);\n i.putExtra(\"search-key\",query);\n\n startActivity(i);\n searchView.setQuery(\"\", false);\n searchView.setIconified(true);\n return false;\n\n\n }",
"private void searchforResults() {\n\n List<String> queryList = new SavePreferences(this).getStringSetPref();\n if(queryList != null && queryList.size() > 0){\n Log.i(TAG, \"Searching for results \" + queryList.get(0));\n Intent searchIntent = new Intent(Intent.ACTION_WEB_SEARCH);\n searchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n searchIntent.putExtra(SearchManager.QUERY, queryList.get(0));\n this.startActivity(searchIntent);\n }\n }",
"public String getUrl() {\n return _Web_search.getBaseUrl() + getQuery();\n }",
"@Override\n public void onClick(View view) {\n activity.searchAgain();\n }",
"private void readyToSearch() {\n Intent intent = new Intent(this, SearchActivity.class);\n startActivityForResult(intent, 21);\n }",
"@Override\n public boolean onQueryTextSubmit(String query) {\n searchview.clearFocus();\n return false;\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n response.sendRedirect(\"/viewSearch.jsp\");\n }",
"@Override\n public void onClick(View v) {\n if (!mTrackingLocation) {\n iniciarLocal();\n //Intent it = new Intent(Intent.ACTION_WEB_SEARCH);\n //it.putExtra(SearchManager.QUERY, \"Lojas Geek próximas \"+ lastAdress);\n //startActivity(it);\n } else {\n pararLocal();\n }\n }",
"private void searchItem(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}",
"@Override\n public boolean onQueryTextSubmit(String query) {\n // If the list contains the search query\n // than filter the adapter\n // using the filter method\n // with the query as its argument\n //placesAdaptor.getFilter( ).filter(query);\n //TODO: set to intent if needed\n /*Intent intent = new Intent(getApplicationContext(),LandmarkDetailsActivity.class);\n\n intent.putExtra(\"placeName\", \"Geisel Library\");\n //hard code to geisel details page\n startActivity(intent);*/\n\n return false;\n }",
"private void search()\n {\n JTextField searchField = (currentSearchView.equals(SEARCH_PANE_VIEW))? searchBar : resultsSearchBar;\n String searchTerm = searchField.getText();\n \n showTransition(2000);\n \n currentPage = 1;\n showResultsView(true);\n paginate(1, getResultsPerPage());\n\n if(searchWeb) showResultsTableView(WEB_RESULTS_PANE);\n else showResultsTableView(IMAGE_RESULTS_PANE);\n\n \n showSearchView(RESULTS_PANE_VIEW);\n resultsSearchBar.setText(searchTerm);\n }",
"Request back();",
"public boolean action(Event e,Object o)\r\n {\r\n String text; // Search text entered by the user.\r\n\tString searchText; // Lower case version of above.\r\n\tURL newURL=null;\r\n\r\n\t// Chech to see if the option menu has been selected.\r\n\r\n\tif(e.target instanceof Choice)\r\n\t{\r\n\t Choice c=(Choice)e.target;\r\n\t try\r\n\t {\r\n\t maxSearch=Integer.parseInt(c.getSelectedItem(),10);\r\n\t }\r\n\t catch(NumberFormatException ne)\r\n\t {\r\n\t maxSearch=MAX_NUMBER_PAGES;\r\n\t }\r\n\t}\r\n\r\n\t// Check to see if a check box has been pressed.\r\n\tif(e.target instanceof Checkbox)\r\n\t{\r\n\t if(caseSensitive.getState() == true)\r\n\t matchCase=true;\r\n else matchCase=false;\r\n\t if(matchWholeWord.getState() ==true)\r\n\t matchWord=true;\r\n else matchWord=false;\r\n\t}\r\n\r\n // A Button has been pressed - which determine.\r\n\tif(e.target instanceof Button)\r\n\t{\r\n\t if(e.target == search)\r\n\t {\r\n\t // Search button pressed - read in search text entered \r\n\t\ttext=inputArea.getText();\r\n\t\t// Make sure there's something to search for\r\n\t\tif(text.length()==0)\r\n\t\t return(false);\r\n\t\t// New Search so clear the GUI out\r\n\t\tif(resultsArea.countItems()>0)\r\n\t\t resultsArea.clear();\r\n disableButtons();\r\n\t\tabort.enable();\r\n\t\tstatusArea.setText(\"\");\r\n\t\t// Clear out previous search data\r\n\t\tpageNames.removeAllElements();\r\n\t\tpageMatch.removeAllElements();\r\n\t\t// We're off start the search thread\r\n\t\tcp=new SearchPages(this,hostName,text,maxSearch);\r\n\t\tcp.start();\r\n\t }\r\n\t else if(e.target == abort)\r\n\t {\r\n\t // Abort button Pressed - stop the thread.\r\n\t\tif(cp != null)\r\n\t\t cp.stop();\r\n\t\tcp=null;\r\n\t\t// Enable Button for another search.\r\n\t\tenableButtons();\r\n\t\tabort.disable();\r\n\t }\r\n\t else\r\n\t {\r\n\t // Clear Button Pressed - clear all the fields and return.\r\n\t\tinputArea.setText(\"\");\r\n\t\tstatusArea.setText(\"\");\r\n\r\n\t\t// Clear radio Buttons.\r\n\t\tcaseSensitive.setState(false);\r\n\t\tcaseInsensitive.setState(true);\r\n\t\tmatchWholeWord.setState(false);\r\n\r\n\t\t// Clear option menu.\r\n\t\tnumPagesChoice.select(0);\r\n\t\ttry\r\n\t\t{\r\n\t\t maxSearch=Integer.parseInt(numPagesChoice.getSelectedItem(),10);\r\n\t\t}\r\n\t\tcatch(NumberFormatException ex)\r\n\t\t{\r\n\t\t maxSearch=MAX_NUMBER_PAGES;\r\n\t\t}\r\n\t\t\r\n\t\tif(resultsArea.countItems()>0)\r\n\t\t resultsArea.clear();\r\n cp=null;\r\n\t }\r\n\t}\r\n\r\n\t// Selection made from the list of matches.\r\n\tif(e.target instanceof java.awt.List)\r\n\t{\r\n\t java.awt.List list=(java.awt.List)e.target;\r\n\t int index=list.getSelectedIndex();\r\n\r\n\t // Extract the page name from the list.\r\n\t if(index<pageMatch.size())\r\n\t {\r\n\t String URLSelected=(String)pageMatch.elementAt(index);\r\n\t\ttry\r\n\t\t{\r\n\t\t // If URL store then use it.\r\n\t\t if(URLSelected.startsWith(\"http:\") || URLSelected.startsWith(\"file:\"))\r\n\t\t newURL=new URL(URLSelected);\r\n else if(server==null)\r\n\t\t newURL=new URL(\"http://www.\"+hostName+\"/\"+URLSelected);\r\n else newURL=new URL(server+URLSelected);\r\n\t\t}\r\n\t\tcatch(MalformedURLException except){}\r\n\t\tgetAppletContext().showDocument(newURL,\"_self\");\r\n\t }\r\n\t}\r\n\treturn true; // We are done.\r\n }",
"private void showSearch() {\n\t\tonSearchRequested();\n\t}",
"protected void showSearch() {\n \t\tIntent search = new Intent(this, SearchActivity.class);\t\t\t\t\n \t\tthis.startActivity(search);\n \t}",
"private void executeSearch() {\n if (!view.getSearchContent().getText().isEmpty()) {\n SearchModuleDataHolder filter = SearchModuleDataHolder.getSearchModuleDataHolder();\n //set search content text for full text search\n filter.setSearchText(view.getSearchContent().getText());\n forwardToCurrentView(filter);\n } else {\n eventBus.showPopupNoSearchCriteria();\n }\n }",
"private void search() {\n \t\tString searchString = m_searchEditText.getText().toString();\n \n \t\t// Remove the refresh if it's scheduled\n \t\tm_handler.removeCallbacks(m_refreshRunnable);\n \t\t\n\t\tif ((searchString != null) && (!searchString.equals(\"\"))) {\n \t\t\tLog.d(TAG, \"Searching string: \\\"\" + searchString + \"\\\"\");\n \n \t\t\t// Save the search string\n \t\t\tm_lastSearch = searchString;\n \n \t\t\t// Disable the Go button to show that the search is in progress\n \t\t\tm_goButton.setEnabled(false);\n \n \t\t\t// Remove the keyboard to better show results\n \t\t\t((InputMethodManager) this\n \t\t\t\t\t.getSystemService(Service.INPUT_METHOD_SERVICE))\n \t\t\t\t\t.hideSoftInputFromWindow(m_searchEditText.getWindowToken(),\n \t\t\t\t\t\t\t0);\n \n \t\t\t// Start the search task\n \t\t\tnew HTTPTask().execute(searchString);\n \t\t\t\n \t\t\t// Schedule the refresh\n \t\t\tm_handler.postDelayed(m_refreshRunnable, REFRESH_DELAY);\n \t\t} else {\n \t\t\tLog.d(TAG, \"Ignoring null or empty search string.\");\n \t\t}\n \t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent int_search = new Intent(getApplicationContext(),Search.class);\n\t\t \tstartActivity(int_search);\t\t\t\n\t\t\t}",
"@GetMapping(value = { \"/search\" })\n\tpublic String searchPage() {\n\t\treturn \"search\";\n\t}",
"private void forwardToCurrentView(SearchModuleDataHolder filter) {\n switch (Storage.getCurrentlyLoadedView()) {\n case Constants.HOME_SUPPLIERS_BY_DEFAULT:\n eventBus.goToHomeSuppliersModule(filter);\n break;\n default:\n eventBus.goToHomeDemandsModule(filter);\n break;\n }\n }",
"String getQueryResultsUrl();",
"@RequestMapping \npublic String ForwardToCompanyMainPage (Model model)\n{\n\treturn \"company\";\t\n}",
"private void back_home(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\tresponse.sendRedirect(\"restaurant\");\n\t\treturn;\n\t}",
"public static void searchAction(TextField input, String URL){\n\t\tString fileName = null;\n\t\ttry {\n\t\t\tfileName = input.getText();\n\t\t\tinput.clear();\n\t\t\tSystem.out.println(\"Fetching url...\");\n\t\t\tURL = FetchURL.fetchFinalURL(fileName);\n\t\t} catch (IOException er) {\n\t\t\tSystem.err.println(\"ERROR: Unable to access website to fetch FCKH and URL; website may be down...\");\n\t\t}\n\t\tfinalActivity(fileName, URL);\n\t}",
"@Event(value = R.id.search_Layout)\n\t\tprivate void search_relativeClick(View v){\n\t\t\tif(title != null) {\n\t\t\t\tkeywordEt.setText(title);\n\t\t\t\teditString = title;\n\t\t\t\tpage(title, 104);\n\n\t\t\t}\n\t\t}",
"@RequestMapping(value = \"search\")\n \tpublic String search(@RequestParam String q) {\n \t\tLong incidentId = Long.valueOf(q);\n \t\treturn \"forward:/incident/\" + incidentId;\n \t}",
"@Override\n public void onClick(View v) {\n String url = buildSearchURL(input.getText().toString()); // build the url from input\n // create new string request\n StringRequest stringRequest = new StringRequest(url,responseListener,errorListener);\n // add the string request into the queue\n MySingleton.getInstance(c).addToRequestQueue(stringRequest);\n }",
"public void searchForPageToChange(String searchPage)\n\t{\n\t\twait.waitElementToBeDisplayed(By.xpath(\"//td/input[@class='z-textbox' and @z.type='zul.vd.Txbox']\"));\n\t\tdriver.findElement(By.xpath(\"//td/input[@class='z-textbox' and @z.type='zul.vd.Txbox']\")).sendKeys(searchPage);\n\t\tList<WebElement> searchBtn=driver.findElements(By.xpath(\"//img[@src='/cmscockpit/cockpit/images/BUTTON_search.png']\"));\n\t\tif(searchBtn!=null&&searchBtn.size()>0)\n\t\t{\n\t\t\tsearchBtn.get(0).click();\n\t\t}\n\t}",
"@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tif(checkNetworkState()){\n\t\t\t\t\t\t\tSearchUtil.getInstance().setSearchtype(serchtype);\n\t\t\t\t\t\t\tSearchUtil.getInstance().setCallbacklabel(label2);\n\t\t\t\t\t\t\tIntent intent=new Intent(mContext,SearchResultActivity.class);\n\t\t\t\t\t\t\tmContext.startActivity(intent);\t\t\t\t\t\t\n\t\t\t\t\t\t\t((Activity) mContext).finish();\t\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tToast.makeText(mContext, mContext.getResources().getString(R.string.Broken_network_prompt), 0).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"private void searchMenu(){\n\t\t\n\t}",
"private void search() {\n if (isConnected()) {\r\n query = searchField.getText().toString();\r\n mLoader.setVisibility(View.VISIBLE);\r\n emptyStateTextView.setText(\"\");\r\n //restart the loader with the new data\r\n loaderManager.restartLoader(1, null, this);\r\n } else {\r\n String message = getString(R.string.no_internet);\r\n new AlertDialog.Builder(this).setMessage(message).show();\r\n }\r\n }",
"@Override\r\n\tpublic void getCurrentUrl() {\n\t\t\r\n\t}",
"public String back() {\r\n\t\treturn \"/private/admin/Admin?faces-redirect=true\";\r\n\t}",
"String getQueryRequestUrl();",
"public void searchSwitch() {\r\n\t\tif (searchEmails) {\r\n\t\t\tsearchEmails = false;\r\n\t\t\tlblNewLabel_1.setText(srchPatrons);\r\n\t\t} else {\r\n\t\t\tsearchEmails = true;\r\n\t\t\tlblNewLabel_1.setText(srchEmails);\r\n\t\t}\r\n\t}",
"@RequestMapping(method = RequestMethod.GET)\n\tpublic String get(@ModelAttribute(\"search\") Search search) {\n\t\treturn \"searchForm\";\n\t}",
"public void setNewSearch(String query){\n isNewSearch = true;\n this.query = query;\n }",
"@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\tif(checkNetworkState()){\n\t\t\t\t\t\tSearchUtil.getInstance().setSearchtype(serchtype);\n\t\t\t\t\t\tSearchUtil.getInstance().setCallbacklabel(label1);\n\t\t\t\t\t\tIntent intent=new Intent(mContext,SearchResultActivity.class);\n\t\t\t\t\t\tmContext.startActivity(intent);\n\t\t\t\t\t\t((Activity) mContext).finish();\n\t\t\t\t\t}else{\n\t\t\t\t\t\tToast.makeText(mContext, mContext.getResources().getString(R.string.Broken_network_prompt), 0).show();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}",
"@Override\n public void onSubmit()\n {\n Page page = ((DccdSession)Session.get()).getRedirectPage(RegistrationPage.class);\n if (page != null)\n {\n \tlogger.debug(\"Back to Page class: \" + page.getClass().getSimpleName());\n \tsetResponsePage(page);\n }\n else\n {\n \t// Homepage seems a good fallback\n \tsetResponsePage(HomePage.class);\n }\n }",
"public String back2() {\r\n\t\treturn \"/private/admin/Aktienerfassen?faces-redirect=true\";\r\n\t}",
"@RequestMapping(value = \"/search\")\n\tpublic String search() {\n\t\treturn \"musicsearch\";\n\t}",
"protected void goTo(String url) {\n \t\tcontext.goTo(url);\n \t}",
"public void setSearchName(String name) {\n\n searchName = \"&q=\" + name;\n System.out.println(\"searchName changing = \" + searchName);\n }",
"private void onClickSearch() {\n if (lat.isEmpty() || lon.isEmpty()) {\n Toast.makeText(\n self,\n getResources()\n .getString(R.string.wait_for_getting_location),\n Toast.LENGTH_SHORT).show();\n getLatLong();\n }\n //get current distance search :\n distance = ((double) skbDistance.getProgress() / 10) + \"\";\n\n Bundle b = new Bundle();\n b.putString(GlobalValue.KEY_SEARCH, edtSearch.getText().toString());\n b.putString(GlobalValue.KEY_CATEGORY_ID, categoryId);\n b.putString(GlobalValue.KEY_CITY_ID, cityId);\n b.putString(GlobalValue.KEY_OPEN, ALL_OR_OPEN);\n b.putString(GlobalValue.KEY_DISTANCE, distance);\n b.putString(GlobalValue.KEY_SORT_BY, SORT_BY);\n b.putString(GlobalValue.KEY_SORT_TYPE, SORT_TYPE);\n if (Constant.isFakeLocation) {\n b.putString(GlobalValue.KEY_LAT, GlobalValue.glatlng.latitude + \"\");\n b.putString(GlobalValue.KEY_LONG, GlobalValue.glatlng.longitude + \"\");\n } else {\n b.putString(GlobalValue.KEY_LAT, lat);\n b.putString(GlobalValue.KEY_LONG, lon);\n }\n\n if (isSelectShop)\n ((MainTabActivity) getParent()).gotoActivity(\n SearchShopResultActivity.class, b);\n else\n ((MainTabActivity) getParent()).gotoActivity(\n SearchProductResultActivity.class, b);\n }",
"public void onClick(View v) {\n\t\t\t\tString searchInput = searchField.getText().toString();\n\t\t\t\tsavedString = searchInput;\n\t\t\t\tlist.setFilterText(searchInput);\n\t\t\t}",
"public static void goToFormPage() throws MalformedURLException {\n\t\tCommonUtils.homeFabClick();\n\t\tHomepageAction.select_dialog_list(\"Form\");\n\t}",
"String getQueryStateUrl();",
"@RequestMapping(value= {\"/flight-home\",\"/\"})\n\tpublic ModelAndView flightSearchPage() {\n\t\treturn new ModelAndView (\"home\");\n\t}",
"public void searchProduct(String url){\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(url));\n\n if(intent.resolveActivity(getContext().getPackageManager()) != null) {\n getContext().startActivity(intent);\n }\n }",
"@Override\n public void onClick(View view) {\n Intent searchIntent = SearchActivity.newIntent(getApplicationContext());\n startActivity(searchIntent);\n }",
"private void setCurSearch(String search)\n\t{\n\t\tif (mToNavi)\n\t\t\tmCurSearch = search;\n\t\telse\n\t\t\tmCurSearchNavi = search;\n\t}",
"public void goTo() { // Navigate to home page\n\t\tBrowser.goTo(url);\n\t}",
"@Override\n public void onClick(View v) {\n if (searchTerm.getText().length() > 0) {\n String searchWord =searchTerm.getText().toString().replace(\" \", \"%20\");\n MainActivity.searchTerm = searchWord;\n new PhotoSearch(fragment).execute(MainActivity.searchTerm);\n\n } else\n Toast.makeText(getContext(), \"Enter a travel search term.\", Toast.LENGTH_SHORT).show();\n }",
"@RequestMapping(value = \"/search\", method = RequestMethod.GET)\n public String renderSearchPage(Model model) {\n model.addAttribute(\"nosites\", true);\n model.addAttribute(\"siteList\", new ArrayList<Site>());\n model.addAttribute(\"statisticsUtils\", new StatisticsUtils());\n return \"search/search-page\";\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //processRequest(request, response);\n String searchLikeThis = request.getParameter(\"search\");\n if ( searchLikeThis != null ) {\n List<Item> foundItems = itemService.searchItemByString(searchLikeThis);\n request.setAttribute(\"foundItems\", foundItems);\n }\n this.getServletContext().getRequestDispatcher(\"/jsp/searchObject.jsp\").forward(request, response);\n }",
"public void search(View v) {\n\t\tIntent intent = new Intent(RootMenuActivity.this, SearchActivity.class);\n\t\tintent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\tstartActivity(intent);\n\t}",
"@Override\n public boolean onQueryTextChange(String newText) {\n currentSearchData = new ArrayList<String>();\n getCurrentSearchData(newText);\n RelativeLayout searchDataRelativeView = (RelativeLayout) findViewById(R.id.search_relative_view);\n searchDataRelativeView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n\n }\n });\n showCurrentData();\n System.out.println(\"\");\n return false;\n }",
"@Test\n public void stage04_searchAndPage() {\n String keyWord = \"bilgisayar\";\n Integer pageNumber = 2;\n //Searching with parameters\n SearchKey searchKey = new SearchKey(driver);\n HomePage homePage = searchKey.search(keyWord, pageNumber);\n //Getting current url\n String currentUrl = homePage.getCurrentURL();\n //Testing if this is desired page\n assertEquals(currentUrl, \"https://www.gittigidiyor.com/arama/?k=bilgisayar&sf=2\");\n //logging\n if (currentUrl.equals(\"https://www.gittigidiyor.com/arama/?k=bilgisayar&sf=2\")) {\n logger.info(\"( stage02_testOpenLoginPage )Actual location : \" + currentUrl);\n } else {\n logger.error(\"( stage02_testOpenLoginPage )Actual location : \" + currentUrl);\n }\n }",
"private void makeList(String url, String site_name)\n {\n // originalSiteList will be null if we're modifying an existing search\n String originalSiteList = savedSiteList.getString(site_name, null);\n\n // get a SharedPreferences.Editor to store new url/site name pair\n SharedPreferences.Editor preferencesEditor = savedSiteList.edit();\n preferencesEditor.putString(site_name, url); // store current search\n preferencesEditor.apply(); // store the updated preferences\n \n // if this is a new site name, add its GUI\n if (originalSiteList == null) \n reloadButtons(site_name); // adds a new button for this list\n }",
"private void clearQueryString() {\n this.setQueryString(\"\");\n }",
"protected abstract void onSearch(AjaxRequestTarget target, String searchString);",
"@Test\n\tpublic void searchPage() throws Exception {\n\t\tgetRequest().andExpect(content().string(CoreMatchers.containsString(\"searchForm\")));\n\t}",
"protected void onSearchExit() {\n if ((mListContext != null) && mListContext.isSearch()) {\n mActivity.finish();\n } else {\n // Re show the search icon.\n mActivity.invalidateOptionsMenu();\n }\n }",
"public void onEditSearch(ActionEvent event) {\r\n \tgetController().onEditSearch( event ); \t\r\n }",
"public void onClickSearch (View v)\n\t{\n\t\tstartActivity (new Intent(getApplicationContext(), SearchActivity.class));\n\t}",
"@Override\n\t\t public boolean onQueryTextSubmit(String query) {\n\t\t \tcloseSearch();\n\t\t return false;\n\t\t }",
"@Override\n public void onClick(View view) {\n EditText searchField = (EditText) v.findViewById(R.id.searchField);\n // Setting inputedString to the current text in searchField\n String inputedString = searchField.getText().toString();\n\n // Calling the *searchGoogle* method with passed in text from the EditText\n // This method allows for users to Short-hand type in a phrase to search google, rather then go to google and then type it in and then hit search.\n listener.searchGoogle(\"https://www.google.com/?q=\" + inputedString + \"#q=\" + inputedString);\n \n // Utilizing public method dismiss(); to dismiss the search fragment dialog.\n dismiss();\n }",
"@Override\r\n\tprotected String getUrl() {\n\t\treturn urlWS + \"/GuardarSustento\";\r\n\t}",
"@Override\n public void onClick(View v) {\n EditText searchBox = (EditText) getActivity().findViewById(R.id.destSearch);\n String searchString = searchBox.getText().toString();\n\n //Send it to search activity\n Intent searchIntent = new Intent(getActivity(), SearchActivity.class);\n searchIntent.putExtra(\"searchString\", searchString);\n startActivity(searchIntent);\n }",
"@Override\n\t\t\tpublic boolean shouldOverrideUrlLoading(WebView view, String url) {\n\t\t\t\tint len = url.length();\n\t\t\t\tif (len > 8) {\n\n\t\t\t\t\tString id = url.substring(7, len - 1);\n\t\t\t\t\tchangePage(id);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}",
"public void ClickSearch() {\r\n\t\tsearch.click();\r\n\t\t\tLog(\"Clicked the \\\"Search\\\" button on the GIS Locator page\");\r\n\t}",
"private String getUrlPlanetSearch() {\n return this.url + this.resource + this.resourceSearch;\n }",
"@Action\r\n public String search() {\n ServiceFunctions.clearCache();\r\n\r\n if (isAdmin()) {\r\n return adminSearch();\r\n }\r\n\r\n return publicSearch();\r\n }",
"@Override\n public void onClick(View v) {\n Intent i = new Intent(search_bar_activity.this, MainActivity.class);\n i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(i);\n }",
"public void onClick()\n\t\t\t{\n\t\t\t\t((DccdSession)Session.get()).setRedirectPage(SearchResultDownloadPage.class, getPage());\n\t\t\t\tsetResponsePage(new SearchResultDownloadPage((SearchModel) SearchResultsDownloadPanel.this.getDefaultModel(), \n\t\t\t\t\t\t(DccdSearchResultPanel) callingPanel));\n\t\t\t}",
"public void Case23(){\n infoFilter();\n driver.navigate().back();\n driver.navigate().back();\n System.out.println(\"Case 34 Done\");\n }",
"public void performSearch() {\n final String url = String.format(BING_SEARCH_URL, Words.getRandomWord(), Words.getRandomWord());\n\n //open page with custom data\n openWebPage(url, \"Search url: \" + url);\n }",
"public String btnSimpleSearch_action()\n {\n String userInput = \"\";\n if(this.getTxSimpleSearch().getValue()!= null)\n userInput = this.getTxSimpleSearch().getValue().toString();\n userInput = userInput.trim();\n System.out.println(1);\n if(userInput.length()==0){\n //Se desabilitan las banderas de busqueda simple y avanzada\n this.getgermplasm$SementalSessionBean().setQueryModeSimple(false);\n this.getgermplasm$SementalSessionBean().setQueryMode(false);\n //Finalmente se setea el data provider del paginador con los datos por default\n this.getgermplasm$SementalSessionBean().getPagination().setTotalResults\n (getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().\n countAllSemental().intValue());\n }\n else{\n //Setear el string para consulta simple del SessionBean\n this.getgermplasm$SementalSessionBean().setConsultaSimple(userInput);\n //Indicarle al SessionBean que el paginador debe \"trabajar\" en modo busqueda simple\n this.getgermplasm$SementalSessionBean().setQueryModeSimple(true);\n //Desabilitar la bandera de busqueda avanzada\n this.getgermplasm$SementalSessionBean().setQueryMode(false);\n //Finalmente se inicializa el data provider del paginador con los resultados de la consulta\n this.getgermplasm$SementalSessionBean().getPagination().setTotalResults\n (getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().\n countSementalSimpleSearch(\n userInput).intValue());\n }\n //set the first result of the query\n this.getgermplasm$SementalSessionBean().getPagination().firstResults();\n return null;\n }"
]
| [
"0.66660035",
"0.66557544",
"0.64468914",
"0.6361724",
"0.6314853",
"0.6314677",
"0.6297045",
"0.6264075",
"0.6221517",
"0.6180256",
"0.6157509",
"0.60405284",
"0.6003897",
"0.5972202",
"0.5952076",
"0.59069645",
"0.5875507",
"0.58436537",
"0.5837242",
"0.5828487",
"0.5812031",
"0.5805112",
"0.5792776",
"0.5778879",
"0.5764843",
"0.57587916",
"0.5753479",
"0.5735797",
"0.573341",
"0.571069",
"0.5698432",
"0.56967944",
"0.5689468",
"0.5674936",
"0.5674117",
"0.56624705",
"0.5650413",
"0.5642312",
"0.56348246",
"0.5632147",
"0.56155366",
"0.56138724",
"0.56011707",
"0.5600741",
"0.56004614",
"0.5597879",
"0.5595802",
"0.55957866",
"0.55864155",
"0.5574911",
"0.5571998",
"0.5549366",
"0.5544501",
"0.5537701",
"0.55317676",
"0.5530068",
"0.5523827",
"0.5497259",
"0.5489488",
"0.5487994",
"0.54817057",
"0.5477518",
"0.5472106",
"0.5467376",
"0.5461631",
"0.54533875",
"0.54438794",
"0.5440903",
"0.54391414",
"0.5431089",
"0.5417069",
"0.5416072",
"0.54155624",
"0.5415165",
"0.54022574",
"0.53948635",
"0.5390722",
"0.53887856",
"0.5386944",
"0.5385131",
"0.53842694",
"0.5383014",
"0.5382367",
"0.53748435",
"0.53723437",
"0.5366021",
"0.53634197",
"0.53589886",
"0.5358706",
"0.53559107",
"0.5350419",
"0.53486365",
"0.5348317",
"0.5348045",
"0.53459305",
"0.5340425",
"0.53403664",
"0.53399175",
"0.53368855",
"0.5333503"
]
| 0.5711647 | 29 |
IQuoteService.Util.getInstance().getQuote(req, new TagSuggestCallback(req, callback)); TagSuggestCallback tagSuggestCallback = new TagSuggestCallback(req, callback); | public void requestSuggestions(SuggestOracle.Request req, SuggestOracle.Callback callback) {
fetchPostalCodes(req, callback);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void mo20159a(SuggestBuyItem suggestBuyItem);",
"private void onPreRequestData(int tag) {\n }",
"public void getTagCommand() {\n\n }",
"public void requestSuggestions(SuggestOracle.Request req, SuggestOracle.Callback callback) {\n fetchTags(req, callback);\n }",
"amdocs.iam.pd.pdwebservices.GetQuoteDocument.GetQuote addNewGetQuote();",
"protected void initTag()\n {\n }",
"amdocs.iam.pd.pdwebservices.GetQuoteDocument.GetQuote getGetQuote();",
"public interface TagService {\n\n boolean retagIdea(ArrayList<Tag> newTag, Idea idea, User user);\n\n /**\n * Saves the tags provided as a comma separate string.\n * It Parses the tag string and checks for de-dupe and finally save them\n * into data store.\n * \n * @param tags The String object representing the comma separated tag\n * strings.\n * @return list of saved tag objects.\n */\n List<Tag> saveTags(String tags);\n\n /**\n * Retrieves a list of Tags by keys.\n * \n * @param keys the collection of keys of Tag objects.\n * @return Returns the list of Tag objects corresponding to keys.\n */\n List<Tag> getTagsByKeys(Collection<String> keys);\n\n /**\n * Retrieves the tags staring with a specific string.\n * \n * @param startString the start string to be matched with the title of\n * the tags\n * @param retrievalInfo the {@link RetrievalInfo} object containing the\n * request parameters\n * \n * @return list of fetched tags\n */\n List<Tag> getTagsWithSpecificStartString(String startString, RetrievalInfo retrievalInfo);\n\n /**\n * Get the data for auto suggestion of tags.\n * \n * @param startString the start string for which the suggestions are to\n * be fetched.\n * @param retrievalInfo the {@link RetrievalInfo} object containing the\n * request parameters\n * @return the list of fetched tags\n */\n List<Tag> getTagsForAutoSuggestion(String startString, RetrievalInfo retrievalInfo);\n\n /**\n * Get the data for Tag Cloud.The tags returned are sorted alphabetically.\n * \n * @param retrievalInfo the {@link RetrievalInfo} object containing the\n * request parameters\n * @return the list of tags for tag cloud\n */\n List<Tag> getTagsForTagCloud(RetrievalInfo retrievalInfo);\n\n /**\n * Get the tag with title equal to the tagName param.\n * \n * @param tagName the title of the tag to be fetched\n * @return the {@link Tag} object\n */\n Tag getTagByName(String tagName);\n\n /**\n * Get the tags associated with ideas owned by a user.\n * \n * @param user the user whose tags are to be fetched\n * @return list of tags associated with ideas of the user\n */\n List<Tag> getMyTagCloud(User user);\n\n /**\n * Iterates through the list of objects and increment the weight if each Tag\n * {@link Tag} object.\n * \n * @param tags comma separated tags string.\n * @return list of tags for which, weight successfully incremented.\n */\n\n List<Tag> incrementWeights(String tags);\n\n /**\n * Save a tag\n * \n * @param tag the {@link Tag} object to be saved\n * @return the saved {@link Tag} object\n */\n Tag saveTag(Tag tag);\n\n /**\n * Iterates through the list of objects and decrement the weight of each Tag\n * {@link Tag} object.\n * \n * @param tags comma separated tags string.\n * @return list of tags for which, weight successfully decremented.\n */\n\n List<Tag> decrementWeights(String tags);\n\n /**\n * Remove tags with zero weight from the list\n * \n * @param tagList the list of {@link Tag} objects from which to remove\n * objects with zero weight\n * @return the filtered list\n */\n List<Tag> removeTagWithZeroWeight(List<Tag> tagList);\n}",
"public interface TickerCallBack {\n void search();\n}",
"public interface SinglePlaceCallbacks {\n void setReviewsTxt(String reviewsTxt);\n}",
"private final class <init> extends com.ebay.nautilus.kernel.util.t>\n{\n\n final _cls1 this$1;\n\n public com.ebay.nautilus.kernel.util.t> get(String s, String s1, String s2, Attributes attributes)\n throws SAXException\n {\n if (\"http://www.ebay.com/marketplace/mobile/v1/services\".equals(s) && \"roiFactoryResponse\".equals(s1))\n {\n return new com.ebay.nautilus.kernel.util.SaxHandler.TextElement() {\n\n final RoiTrackEventResponse.RootElement.RoiTrackEventResponses this$2;\n\n public void text(String s3)\n throws SAXException\n {\n if (urls == null)\n {\n urls = new ArrayList();\n }\n urls.add(s3);\n }\n\n \n {\n this$2 = RoiTrackEventResponse.RootElement.RoiTrackEventResponses.this;\n super();\n }\n };\n } else\n {\n return super.t>(s, s1, s2, attributes);\n }\n }",
"public void onCoachMark() {\n\n }",
"public interface ISimpleSuggestionPluginProvider extends ISuggestionPluginProvider {\n\n Collection<String> getSuggestions(String input, SuggestionRequestContext context);\n\n}",
"public String getSuggestIntentData() {\n/* 143 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public QuoteFilter(){\n this.sentenceTagger = new SentenceTagger();\n }",
"public interface ITagService {\n\n\t/**\n\t * 1.创建标签\n\t *\n\t * @param accessToken\n\t * @param name\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic Tag create(String accessToken, String name) throws Exception;\n\n\t/**\n\t * 2.获取公众号已创建的标签\n\t *\n\t * @param accessToken\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic Tags get(String accessToken) throws Exception;\n\n\t/**\n\t * 3.编辑标签\n\t *\n\t * @param accessToken\n\t * @param id\n\t * @param name\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic JSONObject updateTag(String accessToken, String id, String name) throws Exception;\n\n\t/**\n\t * 4.删除标签\n\t *\n\t * @param accessToken\n\t * @param grouid\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic JSONObject delete(String accessToken, int grouid) throws Exception;\n\n\t/**\n\t * 5. 获取标签下粉丝列表\n\t *\n\t * @param tagid\n\t * @param next_openid\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic JSONObject tagGetOpenids(String accessToken,int tagid, String next_openid) throws Exception;\n\n\t/**\n\t * 6. 批量为用户打标签\n\t *\n\t * @param openid_list\n\t * @param tagid\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic JSONObject batchTagging(String accessToken,List<String> openid_list, int tagid) throws Exception;\n\n\t/**\n\t * 7.批量为用户取消标签\n\t *\n\t * @param openid_list\n\t * @param tagid\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic JSONObject batchuntagging(String accessToken,List<String> openid_list, int tagid) throws Exception;\n\n\t/**\n\t * 8.获取用户身上的标签列表\n\t *\n\t * @param accessToken\n\t * @param openid\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic JSONObject getIdList(String accessToken, String openid) throws Exception;\n\n\n\n}",
"@Override\n public void getTags(@NonNull final ILoadTagsCallback callback) {\n Log.d(TAG, \"Processing request to get tags from the remote API\");\n final long startTime = System.nanoTime();\n\n Call<List<Tag>> call = mApi.getTags();\n call.enqueue(new Callback<List<Tag>>() {\n @Override\n public void onResponse(@NonNull Call<List<Tag>> call, @NonNull Response<List<Tag>> response) {\n if (response.isSuccessful()) {\n List<Tag> tags = response.body();\n callback.onTagsLoaded(tags);\n } else {\n Log.e(TAG, \"Error getting tags from remote API: \" + response.errorBody());\n try {\n @SuppressWarnings(\"ConstantConditions\")\n final String msg = response.errorBody().string();\n callback.onDataNotAvailable(msg);\n } catch (IOException io) {\n callback.onDataNotAvailable(\n TaggerApplication.getInstance().getString(R.string.error_remote_api));\n }\n long elapsedTime = System.nanoTime() - startTime;\n Log.d(TAG, \"Total time to pull tags from remote API [\"\n + TimeUnit.NANOSECONDS.toSeconds(elapsedTime) + \"] seconds\");\n }\n }\n\n @Override\n public void onFailure(@NonNull Call<List<Tag>> call, @NonNull Throwable t) {\n Log.e(TAG, \"Error getting tags from remote API: \" + t.getMessage());\n callback.onDataNotAvailable(t.getLocalizedMessage());\n }\n });\n }",
"@Override\n\t\tpublic void onGetSuggestionResult(MKSuggestionResult arg0, int arg1) {\n\t\t\t\n\t\t}",
"Quote createQuote();",
"public /* synthetic */ void m93352a(DbEditorHashTagSuggestHolder dbEditorHashTagSuggestHolder) {\n dbEditorHashTagSuggestHolder.mo88793a((DbEditorHashTagSuggestHolder.AbstractC18274a) new DbEditorHashTagSuggestHolder.AbstractC18274a() {\n /* class com.zhihu.android.p1480db.fragment.customview.DbEditorSuggestTagCustomView.C182531 */\n\n @Override // com.zhihu.android.p1480db.holder.DbEditorHashTagSuggestHolder.AbstractC18274a\n /* renamed from: a */\n public void mo88643a(String str) {\n if (DbEditorSuggestTagCustomView.this.f64772f != null) {\n DbEditorSuggestTagCustomView.this.f64772f.mo88522a(str);\n }\n }\n });\n }",
"void getTicker(String pair,HibtcApiCallback<Object> callback);",
"void kiemTraThangHopLi() {\n }",
"@Override\r\n\tpublic void onTrade(Trade trade) throws Exception {\n\t\t\r\n\t}",
"@Override\n\tpublic void suggestExchange() {\n\t\t\n\t}",
"private void test2() {\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(baseUrl)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n IQuote iQuote = retrofit.create(IQuote.class);\n //set request params\n Call<List<QuoteBean>> call = iQuote.getQuote(\"rand\", \"1\");\n call.enqueue(new Callback<List<QuoteBean>>() {\n @Override\n public void onResponse(Call<List<QuoteBean>> call, Response<List<QuoteBean>> response) {\n List<QuoteBean> quotes = response.body();\n Log.d(TAG + \"onresponse\", quotes.get(0).toString());\n }\n\n @Override\n public void onFailure(Call<List<QuoteBean>> call, Throwable t) {\n Log.d(TAG + \"onFailure\", \"\");\n }\n });\n }",
"boolean accept(StockQuote pQuote);",
"public interface PostTagRefService extends IService<PostTagRef> {\n\n}",
"@Override\n public void onGetGeoCodeResult(GeoCodeResult arg0) {\n\n }",
"@Override\n\t\t\tpublic void onGetSuggestionResult(MKSuggestionResult arg0, int arg1) {\n\t\t\t\t\n\t\t\t}",
"public List<Suggestion> searchByTag(String tag) {\n List<Suggestion> sugs = libraryDao.getSuggestionsByTag(tag);\n if (sugs == null) {\n return new ArrayList<Suggestion>();\n }\n return sugs;\n }",
"protected GeneTAG() {/* intentionally empty block */}",
"public interface AutoCompleterCallback {\n /** Notification that an item is suggested. */\n void itemSuggested(String autoCompleteString, boolean keepPopupVisible, boolean triggerAction);\n }",
"private void fetchTag() {\n String url = URL_TO_TAG;\n // Volley's json array request object\n JsonArrayRequest req = new JsonArrayRequest(url,\n new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n //Log.d(TAG, response.toString());\n tagList.clear();\n if (response.length() > 0 && response != null) {\n // looping through json and adding to event list\n for (int i = 0; i < response.length(); i++) {\n try {\n JSONObject json_data = response.getJSONObject(i);\n tagList.add(json_data.getString(\"tag_name\"));\n\n } catch (JSONException e) {\n Log.e(\"Error\", \"JSON Parsing error: \" + e.getMessage());\n }\n }\n\n tagadapter.notifyDataSetChanged();\n }\n\n // stopping swipe refresh\n //swipeRefreshLayout.setRefreshing(false);\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Error\", \"Server Error: \" + error.getCause());\n if (error.getClass().getName().equals(\"com.android.volley.ParseError\")){\n Toast.makeText(AdQuestionActivity.this, \"No tag yet\", Toast.LENGTH_SHORT).show();\n }else\n Toast.makeText(AdQuestionActivity.this, \"No Internet Connection or Service Unavailable Right Now\"\n + error.getMessage(), Toast.LENGTH_SHORT).show();\n\n // stopping swipe refresh\n //swipeRefreshLayout.setRefreshing(false);\n }\n });\n\n // Adding request to request queue\n MyApplication.getInstance().addToRequestQueue(req);\n }",
"private void initAutoCompleteAdapter(){\n adapterAcGeneric = new GenericAcAdapter(getActivity(),\n android.R.layout.simple_dropdown_item_1line);\n ac_generics.setThreshold(0);\n ac_generics.setAdapter(adapterAcGeneric);\n ac_generics.setOnItemClickListener(\n new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n //selectedText.setText(autoSuggestAdapter.getObject(position));\n genericName = adapterAcGeneric.getObject(position);\n makeApiCallForSearch();\n CommonMethods.hideKeybaord(getActivity());\n }\n });\n ac_generics.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int\n count, int after) {\n }\n @Override\n public void onTextChanged(CharSequence s, int start, int before,\n int count) {\n genericName = \"\";\n handlerGeneric.removeMessages(TRIGGER_AUTO_COMPLETE);\n handlerGeneric.sendEmptyMessageDelayed(TRIGGER_AUTO_COMPLETE,\n AUTO_COMPLETE_DELAY);\n }\n @Override\n public void afterTextChanged(Editable s) {\n }\n });\n handlerGeneric = new Handler(new Handler.Callback() {\n @Override\n public boolean handleMessage(Message msg) {\n if (msg.what == TRIGGER_AUTO_COMPLETE) {\n if (!TextUtils.isEmpty(ac_generics.getText())) {\n // Log.d(\"DEBUG\", \"in generic\");\n makeApiCall(ac_generics.getText().toString(), 1);\n }\n }\n return false;\n }\n });\n\n\n adapterAcCompany = new CompanyAcAdapter(getActivity(),\n android.R.layout.simple_dropdown_item_1line);\n ac_companies.setThreshold(0);\n ac_companies.setAdapter(adapterAcCompany);\n ac_companies.setOnItemClickListener(\n new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n //selectedText.setText(autoSuggestAdapter.getObject(position));\n companyName = adapterAcCompany.getObject(position);\n makeApiCallForSearch();\n CommonMethods.hideKeybaord(getActivity());\n }\n });\n ac_companies.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int\n count, int after) {\n }\n @Override\n public void onTextChanged(CharSequence s, int start, int before,\n int count) {\n companyName = \"\";\n handlerCompany.removeMessages(TRIGGER_AUTO_COMPLETE);\n handlerCompany.sendEmptyMessageDelayed(TRIGGER_AUTO_COMPLETE,\n AUTO_COMPLETE_DELAY);\n }\n @Override\n public void afterTextChanged(Editable s) {\n }\n });\n handlerCompany = new Handler(new Handler.Callback() {\n @Override\n public boolean handleMessage(Message msg) {\n if (msg.what == TRIGGER_AUTO_COMPLETE) {\n if (!TextUtils.isEmpty(ac_companies.getText())) {\n //Log.d(\"DEBUG\", \"in company\");\n makeApiCall(ac_companies.getText().toString(), 2);\n }\n }\n return false;\n }\n });\n\n\n ac_companies.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View view, boolean hasFocus) {\n if (hasFocus) {\n Log.d(\"DEBUG\", \"1\");\n makeApiCall(\"\", 2);\n\n // Toast.makeText(getActivity(), \"Got the focus\", Toast.LENGTH_SHORT).show();\n } else {\n // Toast.makeText(getActivity(), \"Lost the focus\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n ac_generics.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View view, boolean hasFocus) {\n if (hasFocus) {\n Log.d(\"DEBUG\", \"2\");\n makeApiCall(\"\", 1);\n // Toast.makeText(getActivity(), \"Got the focus\", Toast.LENGTH_SHORT).show();\n } else {\n // Toast.makeText(getActivity(), \"Lost the focus\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n\n }",
"@Override\n public void onGetSuggestionResult(MKSuggestionResult mkSuggestionResult, int i) {\n if (getActivity() != null && mkSuggestionResult != null\n && mkSuggestionResult.getAllSuggestions() != null) {\n mSuggestAdapter.clear();\n List<MKSuggestionInfo> sugList = mkSuggestionResult.getAllSuggestions();\n for (MKSuggestionInfo info : sugList) {\n if (info.key != null) {\n mSuggestAdapter.add(info.key);\n }\n }\n mSuggestAdapter.notifyDataSetChanged();\n }\n }",
"public interface UHFCallbackLiatener {\n void refreshSettingCallBack(ReaderSetting readerSetting);\n void onInventoryTagCallBack(RXInventoryTag tag);\n void onInventoryTagEndCallBack(RXInventoryTag.RXInventoryTagEnd tagEnd);\n void onOperationTagCallBack(RXOperationTag tag);\n}",
"@Override\r\n\tpublic String getTagName() {\n\t\treturn \"PlaceSearchResponse\";\r\n\t}",
"public abstract String getTag();",
"@Override\n public void onUtteranceCompleted(String utteranceId) {\n }",
"public TagInfo[] getTags() {\n/* 164 */ return this.tags;\n/* */ }",
"String getTag();",
"public int tag () { return MyTag; }",
"public interface SearchCallback {\n\n void success(ArrayList<Tweet> result, boolean isNewQuery);\n\n void failure(String e);\n\n}",
"void tag1() { }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n final AutocompletePrediction item = mAdapter.getItem(position);\n final String placeId = item.getPlaceId();\n final CharSequence primaryText = item.getPrimaryText(null);\n// mAutocompleteViewDest.setText(parent.toString());\n// Log.i(TAG, \"Autocomplete item selected: \" + primaryText);\n\n /*\n Issue a request to the Places Geo Data API to retrieve a Place object with additional\n details about the place.\n */\n PendingResult<PlaceBuffer> placeResult = Places.GeoDataApi\n .getPlaceById(mGoogleApiClient, placeId);\n placeResult.setResultCallback(mUpdatePlaceDetailsCallback);\n\n\n// Toast.makeText(getApplicationContext(), \"Clicked: \" + primaryText,\n// Toast.LENGTH_SHORT).show();\n\n\n }",
"void setGetQuote(amdocs.iam.pd.pdwebservices.GetQuoteDocument.GetQuote getQuote);",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View rootView = inflater.inflate(R.layout.fragment_search, container, false);\n //keyword = rootView.findViewById(R.id.keyword);\n category = rootView.findViewById(R.id.category);\n distance = rootView.findViewById(R.id.distance);\n distanceUnit = rootView.findViewById(R.id.distanceUnit);\n radioGroup = rootView.findViewById(R.id.radio_locations);\n radioButtonHere= (RadioButton) rootView.findViewById(R.id.radio_here);\n radioButtonOther = (RadioButton) rootView.findViewById(R.id.radio_other);\n locationText = rootView.findViewById(R.id.locationText);\n search = (Button) rootView.findViewById(R.id.search);\n clear = rootView.findViewById(R.id.clear);\n locationText.setEnabled(false);\n keyword = rootView.findViewById(R.id.keyword);\n autoSuggestAdapter = new AutoCompleteAdapter(getContext(),\n android.R.layout.simple_dropdown_item_1line);\n keyword.setOnItemClickListener(\n new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n\n itemPositon = autoSuggestAdapter.getObject(position);\n }\n });\n keyword.setThreshold(2);\n keyword.setAdapter(autoSuggestAdapter);\n keyword.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int\n count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before,\n int count) {\n handler.removeMessages(TRIGGER_AUTO_COMPLETE);\n handler.sendEmptyMessageDelayed(TRIGGER_AUTO_COMPLETE,\n AUTO_COMPLETE_DELAY);\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n\n handler = new Handler(new Handler.Callback() {\n @Override\n public boolean handleMessage(Message msg) {\n if (msg.what == TRIGGER_AUTO_COMPLETE) {\n if (!TextUtils.isEmpty(keyword.getText())) {\n Log.d(\"From autocomplete call\",keyword.getText().toString());\n makeApiCall(keyword.getText().toString());\n }\n }\n return false;\n }\n });\n\n radioButtonHere.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n locationText.setText(\"\");\n locationText.setEnabled(false);\n }\n });\n\n radioButtonOther.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n locationText.setEnabled(true);\n\n }\n });\n\n //Does Validation and if validation passes, then send data to TM.\n search.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n // Code here executes on main thread after user presses button\n //Keyword field is empty\n if(keyword.getText().toString().trim().length() == 0){\n rootView.findViewById(R.id.errorKeyword).setVisibility(View.VISIBLE);\n Toast toast = Toast.makeText(getActivity().getApplicationContext(),\n \"Please fix all fields with errors\", Toast.LENGTH_SHORT);\n toast.show();\n keywordFlag = false;\n }\n else {\n rootView.findViewById((R.id.errorKeyword)).setVisibility(View.GONE);\n keywordFlag = true;\n }\n if(radioButtonHere.isChecked()){\n //Take current location\n rootView.findViewById(R.id.errorLocation).setVisibility(View.GONE);\n locationFlag = true;\n }\n if(radioButtonOther.isChecked()){\n if(locationText.getText().toString().trim().length()==0) {\n rootView.findViewById(R.id.errorLocation).setVisibility(View.VISIBLE);\n Toast toast = Toast.makeText(getActivity().getApplicationContext(),\n \"Please fix all fields with errors\", Toast.LENGTH_SHORT);\n toast.show();\n locationFlag = false;\n }\n else{\n rootView.findViewById(R.id.errorLocation).setVisibility(View.GONE);\n locationFlag = true;\n }\n }\n if(keywordFlag && locationFlag){\n //Valid data, make the URL for first TM Event search.\n //If User selects here\n if(radioButtonHere.isChecked()){\n //Use current lat and long values\n params = \"current_location?latitude=\"+latitude+\"&longitude=\"+longitude;\n String current_url = URL + params;\n Log.d(\"current_URL\",current_url);\n getCurrentResponse(current_url);\n }\n //If User has typed in custom location\n if(radioButtonOther.isChecked()) {\n params = \"geocoding?location=\" + Uri.encode(locationText.getText().toString()) + \"&api_key=\" + api_key;\n geocoding_url = URL + params;\n Log.d(\"Before Geocoding sent\", geocoding_url);\n getGeocodeResponse(geocoding_url);\n }\n }\n }\n });\n\n clear.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n keyword.setText(\"\");\n distance.setText(\"\");\n locationText.setText(\"\");\n radioButtonHere.setChecked(true);\n locationText.setEnabled(false);\n rootView.findViewById(R.id.errorKeyword).setVisibility(View.GONE);\n rootView.findViewById(R.id.errorLocation).setVisibility(View.GONE);\n }\n });\n return rootView;\n }",
"public interface GekozenWoordCallback {\n /**\n * Wordt uitgevoerd om te wachten op het resultaat van de query\n * @param gekozenWoord string van het gekozen woord\n */\n void onCallback(String gekozenWoord);\n\n}",
"public interface DialogCallBack {\n public void onTweetPost();\n}",
"public List<ITag> getTags ();",
"@Override\n\t\tpublic void onGetGeoCodeResult(GeoCodeResult arg0) {\n\t\t\t\n\t\t}",
"public void onTagsReceived(Map<String, Object> tags);",
"public interface TaggedService {\n @GET(\"/v2/tagged\")\n Call<BaseBean<List<PostsItem>>> getTaggedPosts(@Query(\"tag\") String tag,\n @Query(\"filter\") String filter,\n @Query(\"before\") long timestamp,\n @Query(\"limit\") int limit);\n\n}",
"List<Tag> getMyTagCloud(User user);",
"public interface SDKCallback {\n void onSDKSuccess(String tag, Object message);\n\n void onSDKFail(String tag, String message);\n\n}",
"public String getFromTag();",
"@Override\n\tpublic void onCallback() {\n\t\t\n\t}",
"public String getTag();",
"void itemSuggested(String autoCompleteString, boolean keepPopupVisible, boolean triggerAction);",
"void setAutoCompleterCallback(AutoCompleterCallback callback);",
"public void transcribe (String utterance, float confidence) \n{\n //println(utterance);\n if (!utterance.equals(\"\"))\n {\n result = utterance;\n ListenForKeywords(result);\n println(result);\n inputResult = result;\n result = \"\";\n \n //CheckCommandValidity(result);\n \n }\n}",
"QuoteItem createQuoteItem();",
"private void makeTag(String query, String tag) {\n\t\t\n\t\tString Originalquery = savedSearches.getString(tag, null);\n\t\t\n\t\t// Getting Sharedprefernces.editor to store new tag/query pair\n\t\tSharedPreferences.Editor preferncesEditor = savedSearches.edit();\n\t\tpreferncesEditor.putString(tag, query);\n\t\tpreferncesEditor.apply(); // Stores the updated prefernces\n\t\t\n\t\tif (Originalquery==null) {\n\t\t\trefreshButtons(tag); // Adds new button for this tag\n\t\t}\n\t\t\n\t\t\n\t}",
"@Override\n\t\t\tpublic void onGetGeoCodeResult(GeoCodeResult arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tpublic void onListTags(Context context, int errorCode,\n\t\t\tList<String> tags, String requestId) {\n\t\t\n\t}",
"@GET(\"w/api.php?action=opensearch&format=json&suggest&redirects=resolve\")\n Call<JsonElement> getSuggestionsFromSearch(@Query(\"search\") String search);",
"public String getSuggestAuthority() {\n/* 56 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"private SearchAutoCompleteAPI(Context context,String nameOrCode){\n this.context=context;\n this.nameOrCode=nameOrCode;\n }",
"@Test\n public void testGetVerifiedAssociatedTags() {\n String insertedTagList = \" #awesome, #dry, #newTag \";\n List<Tag> verifiedTags = tagServ.getVerifiedAssociatedTags(insertedTagList);\n List<Tag> allTags = tagServ.getAllTags();\n Assert.assertEquals(5, allTags.size());\n Assert.assertEquals(3, verifiedTags.size());\n }",
"@Override\n public void onThirdVote(String arg0) {\n\n }",
"public interface WordSearchInterface {\n\n public void OnProcessFinished(String Description, String MobileUrl, String title, ArrayList list, ArrayList<String> links, boolean redirect);\n\n\n}",
"private TagHome( )\r\n {\r\n }",
"public interface OtherYqCallback {\n public void onValue(String data);\n}",
"@Override\r\n\t\t\tpublic void onRequest() {\n\t\t\t\t\r\n\t\t\t}",
"public void onQuote(Quote event) {\n quoteCount++;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n layoutResource = R.layout.fragment_review_user;\n View rootView = super.onCreateView(inflater,container,savedInstanceState);\n\n searchTags.changeListeners.add(new QuickCallback() {\n @Override\n public void Activate(@Nullable Object... objects) {\n searchCloud.removeAllViews();\n for( Tag tag : searchTags.Tags()) {\n searchCloud.addChip(tag.phrase);\n }\n }\n });\n TagUtils.GetMostUsedTags(searchTags);\n searchBar.addTextChangedListener(searchBarWatcher);\n searchCloud.setChipListener(new ChipListener() {\n @Override\n public void chipSelected(int i) {\n Tag tag = searchTags.Get(i);\n int position = topTags.GetPosition(tag);\n if ( position == -1 )\n topTags.Add( tag );\n else {\n topCloud.setSelectedChip(position);\n }\n searchTags.Remove( tag );\n }\n\n @Override\n public void chipDeselected(int i) {\n Tag tag = searchTags.Get(i);\n int position = topTags.GetPosition(tag);\n if ( position != -1 ) {\n Chip chip = (Chip) topCloud.getChildAt(position);\n chip.deselect();\n }\n// topCloud.setSelectedChip(position);\n }\n });\n\n topTags.changeListeners.add(new QuickCallback() {\n @Override\n public void Activate(@Nullable Object... objects) {\n // should only ever have to deal with TagList.Add()\n Tag tag = topTags.GetLast();\n topCloud.addChip(tag.phrase);\n topCloud.setSelectedChip(topCloud.getChildCount()-1);\n tag.selected = true;\n }\n });\n topCloud.setChipListener(new ChipListener() {\n @Override\n public void chipSelected(int i) {\n Tag tag = topTags.Get(i);\n tag.selected = true;\n// int position = searchTags.GetPosition(tag);\n// if ( position != -1 ) {\n// searchCloud.setSelectedChip(position);\n// }\n }\n\n @Override\n public void chipDeselected(int i) {\n Tag tag = topTags.Get(i);\n tag.selected = false;\n// int position = searchTags.GetPosition(tag);\n// if ( position != -1 ) {\n// Chip chip = (Chip) searchCloud.getChildAt(position);\n// chip.deselect();\n// }\n// topCloud.setSelectedChip(position);\n }\n });\n TagUtils.GetTagsFromLastReview(topTags,smoosher);\n\n// lastReviewTags.changeListeners.add(new QuickCallback() {\n// @Override\n// public void Activate(@Nullable Object... objects) {\n// lastReviewCloud.removeAllViews();\n// for( Tag tag : lastReviewTags.Tags()) {\n// lastReviewCloud.addChip(tag.phrase);\n// }\n// }\n// });\n\n addButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String phrase = searchBar.getText().toString();\n TagUtils.AddTag(phrase);\n TagUtils.GetTagsContaining(phrase.toLowerCase(),searchTags);\n// Log.d(TAG,\"add button pressed: \" + phrase );\n }\n });\n\n likeButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ApplyReview();\n SmoosherUtils.LikeSmoosher(smoosher);\n }\n });\n\n passButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ApplyReview();\n SmoosherUtils.PassSmoosher(smoosher);\n }\n });\n\n return rootView;\n }",
"public interface PersistedCallbackFacet extends CallbackFacet {\n\n}",
"void updateTags();",
"@Override\n public void run() {\n \t\t((ChangePlaceActivity) activity).onSearchPlaceSuccess(list);\n }",
"public interface OnNfcDataReceived {\n void processNfcData(Tag mytag);\n}",
"public interface TagService {\n\n public void tagging(String tagName, String type, Long targetId) throws Exception;\n\n public void tagging(String tagName, String type, Long[] targetIds) throws Exception;\n\n public void untagging(String tagName, String type, Long targetId) throws Exception;\n\n public void untagging(String tagName, String type, Long[] targetIds) throws Exception;\n\n public void clear(String type, Long itemId) throws Exception;\n\n public void removeTag(String name, boolean force) throws Exception;\n\n public Set<Long> queryByType(String type) throws Exception;\n\n public Set<Long> queryByTypeAndTag(String tagName, String type) throws Exception;\n\n public Set<Long> unionQuery(List<String> tagNames, String type) throws Exception;\n\n public Set<Long> joinQuery(List<String> tagNames, String type) throws Exception;\n\n public Set<String> getTags(Long targetId) throws Exception;\n\n public Set<String> getTags(Long[] targetIds) throws Exception;\n\n public Set<String> getTags(String type, Long itemId) throws Exception;\n\n public Map<Long, List<String>> getTags(String type, Long[] itemIds) throws Exception;\n}",
"public void serviceSearchCompleted(int transID, int respCode) {\n }",
"QuoteTerm createQuoteTerm();",
"public interface SearchArticlesCallback {\n\n void onSuccess(SearchArticlesResponse response);\n\n void onError(Error error);\n\n}",
"@Override\n\t\tpublic void onGetSuggestionResult(MKSuggestionResult arg0, int arg1) {\n\n\t\t}",
"@Override\n\tpublic void OnRequest() {\n\t\t\n\t}",
"public String getSuggestSelection() {\n/* 113 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"void addTag(String tag){tags.add(tag);}",
"private String tagText(String s)throws IOException{\n//\tMaxentTagger tagger = new MaxentTagger(\"english-left3words-distsim.tagger\");\n\tString s1=null;\n\tSystem.out.println(\"here starts the process\");\n\ts1 = tagger.tagString(s);\n\treturn s1;\n}",
"java.util.concurrent.Future<TagResourceResult> tagResourceAsync(TagResourceRequest tagResourceRequest);",
"java.util.concurrent.Future<TagResourceResult> tagResourceAsync(TagResourceRequest tagResourceRequest);",
"java.util.concurrent.Future<TagResourceResult> tagResourceAsync(TagResourceRequest tagResourceRequest);",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n final AutocompletePrediction item = mAdapter.getItem(position);\n final String placeId = item.getPlaceId();\n final CharSequence primaryText = item.getPrimaryText(null);\n\n Log.i(TAG, \"Autocomplete item selected: \" + primaryText);\n\n /*\n Issue a request to the Places Geo Data API to retrieve a Place object with additional\n details about the place.\n */\n PendingResult<PlaceBuffer> placeResult = Places.GeoDataApi\n .getPlaceById(mGoogleApiClient, placeId);\n placeResult.setResultCallback(mUpdatePlaceDetailsCallback);\n\n //Toast.makeText(getApplicationContext(), \"Clicked: \" + primaryText,\n // Toast.LENGTH_SHORT).show();\n Log.i(TAG, \"Called getPlaceById to get Place details for \" + placeId);\n }",
"void applyTags(ReaderContext context, Operation operation, Method method);",
"public interface YTranslatorCallBack {\n void getYTranslateCallBack(String responcse, String progressingName);\n /*void getYTranslateCallBackFromText(String response);\n void getYTranslateCallBackFromQTrans(String response);*/\n}",
"void makeMarketBuyOrder(AuthInfo authInfo, String pair, String money,HibtcApiCallback<Object> callback);",
"@Override\n public void onPlaceSelected(Place place) {\n initiateSearch(place.getLatLng());\n }",
"public interface ReaderOperations {\n\n /**\n * Allows you to do an arbitrary request against the Google Reader API, hiding the complexity of keeping an\n * authentication token allive.\n *\n * @param callback The object that is expected to do something useful against the Google Reader API.\n * @param <T> The result type.\n * @return The result of the callback.\n */\n <T> T doWithCallback(ReaderCallback<T> callback);\n\n /**\n * Retrieves a token to be included in editing type of calls.\n */\n String getToken();\n\n /**\n * Adds a subscription for the given feed.\n *\n * @param feed The URL of the feed to subscribe to.\n * @param token The token. (See {@link #getToken()}.\n * @return A boolean indicating if the request succeeded.\n */\n boolean subscribe(String feed, String token);\n\n /**\n * Tags a subscription with the given tag.\n *\n * @param feed The URL of the feed to subscribe to.\n * @param tag The tag to be set.\n * @param token The token. (See {@link #getToken()}.\n * @return A boolean indicating if the request succeeded.\n */\n boolean tag(String feed, String tag, String token);\n\n}",
"String getTag() {\n return tag;\n }",
"com.google.openrtb.OpenRtb.BidRequest getRequest();"
]
| [
"0.60294473",
"0.58807915",
"0.570991",
"0.57029855",
"0.5690102",
"0.5476841",
"0.54711664",
"0.54181665",
"0.5365547",
"0.5319577",
"0.5278309",
"0.52745503",
"0.5262053",
"0.5235925",
"0.5229591",
"0.52233326",
"0.52102625",
"0.5197877",
"0.5180221",
"0.5170599",
"0.51557827",
"0.5148554",
"0.51357526",
"0.51328474",
"0.5112752",
"0.5112124",
"0.5111677",
"0.51112276",
"0.510503",
"0.5096627",
"0.5083792",
"0.50770074",
"0.50732785",
"0.5051616",
"0.5041033",
"0.5037658",
"0.502818",
"0.5021208",
"0.5015721",
"0.5007092",
"0.5005562",
"0.4991065",
"0.49837363",
"0.49747306",
"0.49593386",
"0.49568734",
"0.49522373",
"0.4950189",
"0.4945015",
"0.49347606",
"0.4927029",
"0.49260202",
"0.49242148",
"0.4910189",
"0.48974207",
"0.488638",
"0.4883757",
"0.48815426",
"0.48602912",
"0.48473617",
"0.48401746",
"0.4839888",
"0.4838832",
"0.48285064",
"0.4817501",
"0.48123765",
"0.48036122",
"0.4799653",
"0.47994503",
"0.47985837",
"0.4796851",
"0.47947574",
"0.4789475",
"0.47873077",
"0.4787183",
"0.47789082",
"0.4778908",
"0.47697368",
"0.47689515",
"0.47673464",
"0.47637907",
"0.47616804",
"0.47486803",
"0.47474945",
"0.47377685",
"0.4735775",
"0.47217712",
"0.47216508",
"0.47192684",
"0.4710494",
"0.4710494",
"0.4710494",
"0.47090057",
"0.47052345",
"0.4699255",
"0.46991426",
"0.46985683",
"0.46980047",
"0.4696266",
"0.46956596"
]
| 0.4850309 | 59 |
IQuoteService.Util.getInstance().getQuote(req, new TagSuggestCallback(req, callback)); TagSuggestCallback tagSuggestCallback = new TagSuggestCallback(req, callback); | public void requestSuggestions(SuggestOracle.Request req, SuggestOracle.Callback callback) {
fetchTags(req, callback);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void mo20159a(SuggestBuyItem suggestBuyItem);",
"private void onPreRequestData(int tag) {\n }",
"public void getTagCommand() {\n\n }",
"amdocs.iam.pd.pdwebservices.GetQuoteDocument.GetQuote addNewGetQuote();",
"protected void initTag()\n {\n }",
"amdocs.iam.pd.pdwebservices.GetQuoteDocument.GetQuote getGetQuote();",
"public interface TagService {\n\n boolean retagIdea(ArrayList<Tag> newTag, Idea idea, User user);\n\n /**\n * Saves the tags provided as a comma separate string.\n * It Parses the tag string and checks for de-dupe and finally save them\n * into data store.\n * \n * @param tags The String object representing the comma separated tag\n * strings.\n * @return list of saved tag objects.\n */\n List<Tag> saveTags(String tags);\n\n /**\n * Retrieves a list of Tags by keys.\n * \n * @param keys the collection of keys of Tag objects.\n * @return Returns the list of Tag objects corresponding to keys.\n */\n List<Tag> getTagsByKeys(Collection<String> keys);\n\n /**\n * Retrieves the tags staring with a specific string.\n * \n * @param startString the start string to be matched with the title of\n * the tags\n * @param retrievalInfo the {@link RetrievalInfo} object containing the\n * request parameters\n * \n * @return list of fetched tags\n */\n List<Tag> getTagsWithSpecificStartString(String startString, RetrievalInfo retrievalInfo);\n\n /**\n * Get the data for auto suggestion of tags.\n * \n * @param startString the start string for which the suggestions are to\n * be fetched.\n * @param retrievalInfo the {@link RetrievalInfo} object containing the\n * request parameters\n * @return the list of fetched tags\n */\n List<Tag> getTagsForAutoSuggestion(String startString, RetrievalInfo retrievalInfo);\n\n /**\n * Get the data for Tag Cloud.The tags returned are sorted alphabetically.\n * \n * @param retrievalInfo the {@link RetrievalInfo} object containing the\n * request parameters\n * @return the list of tags for tag cloud\n */\n List<Tag> getTagsForTagCloud(RetrievalInfo retrievalInfo);\n\n /**\n * Get the tag with title equal to the tagName param.\n * \n * @param tagName the title of the tag to be fetched\n * @return the {@link Tag} object\n */\n Tag getTagByName(String tagName);\n\n /**\n * Get the tags associated with ideas owned by a user.\n * \n * @param user the user whose tags are to be fetched\n * @return list of tags associated with ideas of the user\n */\n List<Tag> getMyTagCloud(User user);\n\n /**\n * Iterates through the list of objects and increment the weight if each Tag\n * {@link Tag} object.\n * \n * @param tags comma separated tags string.\n * @return list of tags for which, weight successfully incremented.\n */\n\n List<Tag> incrementWeights(String tags);\n\n /**\n * Save a tag\n * \n * @param tag the {@link Tag} object to be saved\n * @return the saved {@link Tag} object\n */\n Tag saveTag(Tag tag);\n\n /**\n * Iterates through the list of objects and decrement the weight of each Tag\n * {@link Tag} object.\n * \n * @param tags comma separated tags string.\n * @return list of tags for which, weight successfully decremented.\n */\n\n List<Tag> decrementWeights(String tags);\n\n /**\n * Remove tags with zero weight from the list\n * \n * @param tagList the list of {@link Tag} objects from which to remove\n * objects with zero weight\n * @return the filtered list\n */\n List<Tag> removeTagWithZeroWeight(List<Tag> tagList);\n}",
"public interface TickerCallBack {\n void search();\n}",
"public interface SinglePlaceCallbacks {\n void setReviewsTxt(String reviewsTxt);\n}",
"private final class <init> extends com.ebay.nautilus.kernel.util.t>\n{\n\n final _cls1 this$1;\n\n public com.ebay.nautilus.kernel.util.t> get(String s, String s1, String s2, Attributes attributes)\n throws SAXException\n {\n if (\"http://www.ebay.com/marketplace/mobile/v1/services\".equals(s) && \"roiFactoryResponse\".equals(s1))\n {\n return new com.ebay.nautilus.kernel.util.SaxHandler.TextElement() {\n\n final RoiTrackEventResponse.RootElement.RoiTrackEventResponses this$2;\n\n public void text(String s3)\n throws SAXException\n {\n if (urls == null)\n {\n urls = new ArrayList();\n }\n urls.add(s3);\n }\n\n \n {\n this$2 = RoiTrackEventResponse.RootElement.RoiTrackEventResponses.this;\n super();\n }\n };\n } else\n {\n return super.t>(s, s1, s2, attributes);\n }\n }",
"public void onCoachMark() {\n\n }",
"public interface ISimpleSuggestionPluginProvider extends ISuggestionPluginProvider {\n\n Collection<String> getSuggestions(String input, SuggestionRequestContext context);\n\n}",
"public String getSuggestIntentData() {\n/* 143 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public QuoteFilter(){\n this.sentenceTagger = new SentenceTagger();\n }",
"public interface ITagService {\n\n\t/**\n\t * 1.创建标签\n\t *\n\t * @param accessToken\n\t * @param name\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic Tag create(String accessToken, String name) throws Exception;\n\n\t/**\n\t * 2.获取公众号已创建的标签\n\t *\n\t * @param accessToken\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic Tags get(String accessToken) throws Exception;\n\n\t/**\n\t * 3.编辑标签\n\t *\n\t * @param accessToken\n\t * @param id\n\t * @param name\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic JSONObject updateTag(String accessToken, String id, String name) throws Exception;\n\n\t/**\n\t * 4.删除标签\n\t *\n\t * @param accessToken\n\t * @param grouid\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic JSONObject delete(String accessToken, int grouid) throws Exception;\n\n\t/**\n\t * 5. 获取标签下粉丝列表\n\t *\n\t * @param tagid\n\t * @param next_openid\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic JSONObject tagGetOpenids(String accessToken,int tagid, String next_openid) throws Exception;\n\n\t/**\n\t * 6. 批量为用户打标签\n\t *\n\t * @param openid_list\n\t * @param tagid\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic JSONObject batchTagging(String accessToken,List<String> openid_list, int tagid) throws Exception;\n\n\t/**\n\t * 7.批量为用户取消标签\n\t *\n\t * @param openid_list\n\t * @param tagid\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic JSONObject batchuntagging(String accessToken,List<String> openid_list, int tagid) throws Exception;\n\n\t/**\n\t * 8.获取用户身上的标签列表\n\t *\n\t * @param accessToken\n\t * @param openid\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic JSONObject getIdList(String accessToken, String openid) throws Exception;\n\n\n\n}",
"@Override\n public void getTags(@NonNull final ILoadTagsCallback callback) {\n Log.d(TAG, \"Processing request to get tags from the remote API\");\n final long startTime = System.nanoTime();\n\n Call<List<Tag>> call = mApi.getTags();\n call.enqueue(new Callback<List<Tag>>() {\n @Override\n public void onResponse(@NonNull Call<List<Tag>> call, @NonNull Response<List<Tag>> response) {\n if (response.isSuccessful()) {\n List<Tag> tags = response.body();\n callback.onTagsLoaded(tags);\n } else {\n Log.e(TAG, \"Error getting tags from remote API: \" + response.errorBody());\n try {\n @SuppressWarnings(\"ConstantConditions\")\n final String msg = response.errorBody().string();\n callback.onDataNotAvailable(msg);\n } catch (IOException io) {\n callback.onDataNotAvailable(\n TaggerApplication.getInstance().getString(R.string.error_remote_api));\n }\n long elapsedTime = System.nanoTime() - startTime;\n Log.d(TAG, \"Total time to pull tags from remote API [\"\n + TimeUnit.NANOSECONDS.toSeconds(elapsedTime) + \"] seconds\");\n }\n }\n\n @Override\n public void onFailure(@NonNull Call<List<Tag>> call, @NonNull Throwable t) {\n Log.e(TAG, \"Error getting tags from remote API: \" + t.getMessage());\n callback.onDataNotAvailable(t.getLocalizedMessage());\n }\n });\n }",
"@Override\n\t\tpublic void onGetSuggestionResult(MKSuggestionResult arg0, int arg1) {\n\t\t\t\n\t\t}",
"Quote createQuote();",
"public /* synthetic */ void m93352a(DbEditorHashTagSuggestHolder dbEditorHashTagSuggestHolder) {\n dbEditorHashTagSuggestHolder.mo88793a((DbEditorHashTagSuggestHolder.AbstractC18274a) new DbEditorHashTagSuggestHolder.AbstractC18274a() {\n /* class com.zhihu.android.p1480db.fragment.customview.DbEditorSuggestTagCustomView.C182531 */\n\n @Override // com.zhihu.android.p1480db.holder.DbEditorHashTagSuggestHolder.AbstractC18274a\n /* renamed from: a */\n public void mo88643a(String str) {\n if (DbEditorSuggestTagCustomView.this.f64772f != null) {\n DbEditorSuggestTagCustomView.this.f64772f.mo88522a(str);\n }\n }\n });\n }",
"void getTicker(String pair,HibtcApiCallback<Object> callback);",
"void kiemTraThangHopLi() {\n }",
"@Override\r\n\tpublic void onTrade(Trade trade) throws Exception {\n\t\t\r\n\t}",
"@Override\n\tpublic void suggestExchange() {\n\t\t\n\t}",
"private void test2() {\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(baseUrl)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n IQuote iQuote = retrofit.create(IQuote.class);\n //set request params\n Call<List<QuoteBean>> call = iQuote.getQuote(\"rand\", \"1\");\n call.enqueue(new Callback<List<QuoteBean>>() {\n @Override\n public void onResponse(Call<List<QuoteBean>> call, Response<List<QuoteBean>> response) {\n List<QuoteBean> quotes = response.body();\n Log.d(TAG + \"onresponse\", quotes.get(0).toString());\n }\n\n @Override\n public void onFailure(Call<List<QuoteBean>> call, Throwable t) {\n Log.d(TAG + \"onFailure\", \"\");\n }\n });\n }",
"boolean accept(StockQuote pQuote);",
"@Override\n public void onGetGeoCodeResult(GeoCodeResult arg0) {\n\n }",
"public interface PostTagRefService extends IService<PostTagRef> {\n\n}",
"@Override\n\t\t\tpublic void onGetSuggestionResult(MKSuggestionResult arg0, int arg1) {\n\t\t\t\t\n\t\t\t}",
"public List<Suggestion> searchByTag(String tag) {\n List<Suggestion> sugs = libraryDao.getSuggestionsByTag(tag);\n if (sugs == null) {\n return new ArrayList<Suggestion>();\n }\n return sugs;\n }",
"protected GeneTAG() {/* intentionally empty block */}",
"public interface AutoCompleterCallback {\n /** Notification that an item is suggested. */\n void itemSuggested(String autoCompleteString, boolean keepPopupVisible, boolean triggerAction);\n }",
"private void fetchTag() {\n String url = URL_TO_TAG;\n // Volley's json array request object\n JsonArrayRequest req = new JsonArrayRequest(url,\n new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n //Log.d(TAG, response.toString());\n tagList.clear();\n if (response.length() > 0 && response != null) {\n // looping through json and adding to event list\n for (int i = 0; i < response.length(); i++) {\n try {\n JSONObject json_data = response.getJSONObject(i);\n tagList.add(json_data.getString(\"tag_name\"));\n\n } catch (JSONException e) {\n Log.e(\"Error\", \"JSON Parsing error: \" + e.getMessage());\n }\n }\n\n tagadapter.notifyDataSetChanged();\n }\n\n // stopping swipe refresh\n //swipeRefreshLayout.setRefreshing(false);\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Error\", \"Server Error: \" + error.getCause());\n if (error.getClass().getName().equals(\"com.android.volley.ParseError\")){\n Toast.makeText(AdQuestionActivity.this, \"No tag yet\", Toast.LENGTH_SHORT).show();\n }else\n Toast.makeText(AdQuestionActivity.this, \"No Internet Connection or Service Unavailable Right Now\"\n + error.getMessage(), Toast.LENGTH_SHORT).show();\n\n // stopping swipe refresh\n //swipeRefreshLayout.setRefreshing(false);\n }\n });\n\n // Adding request to request queue\n MyApplication.getInstance().addToRequestQueue(req);\n }",
"private void initAutoCompleteAdapter(){\n adapterAcGeneric = new GenericAcAdapter(getActivity(),\n android.R.layout.simple_dropdown_item_1line);\n ac_generics.setThreshold(0);\n ac_generics.setAdapter(adapterAcGeneric);\n ac_generics.setOnItemClickListener(\n new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n //selectedText.setText(autoSuggestAdapter.getObject(position));\n genericName = adapterAcGeneric.getObject(position);\n makeApiCallForSearch();\n CommonMethods.hideKeybaord(getActivity());\n }\n });\n ac_generics.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int\n count, int after) {\n }\n @Override\n public void onTextChanged(CharSequence s, int start, int before,\n int count) {\n genericName = \"\";\n handlerGeneric.removeMessages(TRIGGER_AUTO_COMPLETE);\n handlerGeneric.sendEmptyMessageDelayed(TRIGGER_AUTO_COMPLETE,\n AUTO_COMPLETE_DELAY);\n }\n @Override\n public void afterTextChanged(Editable s) {\n }\n });\n handlerGeneric = new Handler(new Handler.Callback() {\n @Override\n public boolean handleMessage(Message msg) {\n if (msg.what == TRIGGER_AUTO_COMPLETE) {\n if (!TextUtils.isEmpty(ac_generics.getText())) {\n // Log.d(\"DEBUG\", \"in generic\");\n makeApiCall(ac_generics.getText().toString(), 1);\n }\n }\n return false;\n }\n });\n\n\n adapterAcCompany = new CompanyAcAdapter(getActivity(),\n android.R.layout.simple_dropdown_item_1line);\n ac_companies.setThreshold(0);\n ac_companies.setAdapter(adapterAcCompany);\n ac_companies.setOnItemClickListener(\n new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n //selectedText.setText(autoSuggestAdapter.getObject(position));\n companyName = adapterAcCompany.getObject(position);\n makeApiCallForSearch();\n CommonMethods.hideKeybaord(getActivity());\n }\n });\n ac_companies.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int\n count, int after) {\n }\n @Override\n public void onTextChanged(CharSequence s, int start, int before,\n int count) {\n companyName = \"\";\n handlerCompany.removeMessages(TRIGGER_AUTO_COMPLETE);\n handlerCompany.sendEmptyMessageDelayed(TRIGGER_AUTO_COMPLETE,\n AUTO_COMPLETE_DELAY);\n }\n @Override\n public void afterTextChanged(Editable s) {\n }\n });\n handlerCompany = new Handler(new Handler.Callback() {\n @Override\n public boolean handleMessage(Message msg) {\n if (msg.what == TRIGGER_AUTO_COMPLETE) {\n if (!TextUtils.isEmpty(ac_companies.getText())) {\n //Log.d(\"DEBUG\", \"in company\");\n makeApiCall(ac_companies.getText().toString(), 2);\n }\n }\n return false;\n }\n });\n\n\n ac_companies.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View view, boolean hasFocus) {\n if (hasFocus) {\n Log.d(\"DEBUG\", \"1\");\n makeApiCall(\"\", 2);\n\n // Toast.makeText(getActivity(), \"Got the focus\", Toast.LENGTH_SHORT).show();\n } else {\n // Toast.makeText(getActivity(), \"Lost the focus\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n ac_generics.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View view, boolean hasFocus) {\n if (hasFocus) {\n Log.d(\"DEBUG\", \"2\");\n makeApiCall(\"\", 1);\n // Toast.makeText(getActivity(), \"Got the focus\", Toast.LENGTH_SHORT).show();\n } else {\n // Toast.makeText(getActivity(), \"Lost the focus\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n\n }",
"@Override\n public void onGetSuggestionResult(MKSuggestionResult mkSuggestionResult, int i) {\n if (getActivity() != null && mkSuggestionResult != null\n && mkSuggestionResult.getAllSuggestions() != null) {\n mSuggestAdapter.clear();\n List<MKSuggestionInfo> sugList = mkSuggestionResult.getAllSuggestions();\n for (MKSuggestionInfo info : sugList) {\n if (info.key != null) {\n mSuggestAdapter.add(info.key);\n }\n }\n mSuggestAdapter.notifyDataSetChanged();\n }\n }",
"public interface UHFCallbackLiatener {\n void refreshSettingCallBack(ReaderSetting readerSetting);\n void onInventoryTagCallBack(RXInventoryTag tag);\n void onInventoryTagEndCallBack(RXInventoryTag.RXInventoryTagEnd tagEnd);\n void onOperationTagCallBack(RXOperationTag tag);\n}",
"@Override\r\n\tpublic String getTagName() {\n\t\treturn \"PlaceSearchResponse\";\r\n\t}",
"public abstract String getTag();",
"@Override\n public void onUtteranceCompleted(String utteranceId) {\n }",
"public TagInfo[] getTags() {\n/* 164 */ return this.tags;\n/* */ }",
"String getTag();",
"public int tag () { return MyTag; }",
"public interface SearchCallback {\n\n void success(ArrayList<Tweet> result, boolean isNewQuery);\n\n void failure(String e);\n\n}",
"void tag1() { }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n final AutocompletePrediction item = mAdapter.getItem(position);\n final String placeId = item.getPlaceId();\n final CharSequence primaryText = item.getPrimaryText(null);\n// mAutocompleteViewDest.setText(parent.toString());\n// Log.i(TAG, \"Autocomplete item selected: \" + primaryText);\n\n /*\n Issue a request to the Places Geo Data API to retrieve a Place object with additional\n details about the place.\n */\n PendingResult<PlaceBuffer> placeResult = Places.GeoDataApi\n .getPlaceById(mGoogleApiClient, placeId);\n placeResult.setResultCallback(mUpdatePlaceDetailsCallback);\n\n\n// Toast.makeText(getApplicationContext(), \"Clicked: \" + primaryText,\n// Toast.LENGTH_SHORT).show();\n\n\n }",
"void setGetQuote(amdocs.iam.pd.pdwebservices.GetQuoteDocument.GetQuote getQuote);",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View rootView = inflater.inflate(R.layout.fragment_search, container, false);\n //keyword = rootView.findViewById(R.id.keyword);\n category = rootView.findViewById(R.id.category);\n distance = rootView.findViewById(R.id.distance);\n distanceUnit = rootView.findViewById(R.id.distanceUnit);\n radioGroup = rootView.findViewById(R.id.radio_locations);\n radioButtonHere= (RadioButton) rootView.findViewById(R.id.radio_here);\n radioButtonOther = (RadioButton) rootView.findViewById(R.id.radio_other);\n locationText = rootView.findViewById(R.id.locationText);\n search = (Button) rootView.findViewById(R.id.search);\n clear = rootView.findViewById(R.id.clear);\n locationText.setEnabled(false);\n keyword = rootView.findViewById(R.id.keyword);\n autoSuggestAdapter = new AutoCompleteAdapter(getContext(),\n android.R.layout.simple_dropdown_item_1line);\n keyword.setOnItemClickListener(\n new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n\n itemPositon = autoSuggestAdapter.getObject(position);\n }\n });\n keyword.setThreshold(2);\n keyword.setAdapter(autoSuggestAdapter);\n keyword.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int\n count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before,\n int count) {\n handler.removeMessages(TRIGGER_AUTO_COMPLETE);\n handler.sendEmptyMessageDelayed(TRIGGER_AUTO_COMPLETE,\n AUTO_COMPLETE_DELAY);\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n\n handler = new Handler(new Handler.Callback() {\n @Override\n public boolean handleMessage(Message msg) {\n if (msg.what == TRIGGER_AUTO_COMPLETE) {\n if (!TextUtils.isEmpty(keyword.getText())) {\n Log.d(\"From autocomplete call\",keyword.getText().toString());\n makeApiCall(keyword.getText().toString());\n }\n }\n return false;\n }\n });\n\n radioButtonHere.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n locationText.setText(\"\");\n locationText.setEnabled(false);\n }\n });\n\n radioButtonOther.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n locationText.setEnabled(true);\n\n }\n });\n\n //Does Validation and if validation passes, then send data to TM.\n search.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n // Code here executes on main thread after user presses button\n //Keyword field is empty\n if(keyword.getText().toString().trim().length() == 0){\n rootView.findViewById(R.id.errorKeyword).setVisibility(View.VISIBLE);\n Toast toast = Toast.makeText(getActivity().getApplicationContext(),\n \"Please fix all fields with errors\", Toast.LENGTH_SHORT);\n toast.show();\n keywordFlag = false;\n }\n else {\n rootView.findViewById((R.id.errorKeyword)).setVisibility(View.GONE);\n keywordFlag = true;\n }\n if(radioButtonHere.isChecked()){\n //Take current location\n rootView.findViewById(R.id.errorLocation).setVisibility(View.GONE);\n locationFlag = true;\n }\n if(radioButtonOther.isChecked()){\n if(locationText.getText().toString().trim().length()==0) {\n rootView.findViewById(R.id.errorLocation).setVisibility(View.VISIBLE);\n Toast toast = Toast.makeText(getActivity().getApplicationContext(),\n \"Please fix all fields with errors\", Toast.LENGTH_SHORT);\n toast.show();\n locationFlag = false;\n }\n else{\n rootView.findViewById(R.id.errorLocation).setVisibility(View.GONE);\n locationFlag = true;\n }\n }\n if(keywordFlag && locationFlag){\n //Valid data, make the URL for first TM Event search.\n //If User selects here\n if(radioButtonHere.isChecked()){\n //Use current lat and long values\n params = \"current_location?latitude=\"+latitude+\"&longitude=\"+longitude;\n String current_url = URL + params;\n Log.d(\"current_URL\",current_url);\n getCurrentResponse(current_url);\n }\n //If User has typed in custom location\n if(radioButtonOther.isChecked()) {\n params = \"geocoding?location=\" + Uri.encode(locationText.getText().toString()) + \"&api_key=\" + api_key;\n geocoding_url = URL + params;\n Log.d(\"Before Geocoding sent\", geocoding_url);\n getGeocodeResponse(geocoding_url);\n }\n }\n }\n });\n\n clear.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n keyword.setText(\"\");\n distance.setText(\"\");\n locationText.setText(\"\");\n radioButtonHere.setChecked(true);\n locationText.setEnabled(false);\n rootView.findViewById(R.id.errorKeyword).setVisibility(View.GONE);\n rootView.findViewById(R.id.errorLocation).setVisibility(View.GONE);\n }\n });\n return rootView;\n }",
"public interface GekozenWoordCallback {\n /**\n * Wordt uitgevoerd om te wachten op het resultaat van de query\n * @param gekozenWoord string van het gekozen woord\n */\n void onCallback(String gekozenWoord);\n\n}",
"public interface DialogCallBack {\n public void onTweetPost();\n}",
"public List<ITag> getTags ();",
"@Override\n\t\tpublic void onGetGeoCodeResult(GeoCodeResult arg0) {\n\t\t\t\n\t\t}",
"public void onTagsReceived(Map<String, Object> tags);",
"public interface TaggedService {\n @GET(\"/v2/tagged\")\n Call<BaseBean<List<PostsItem>>> getTaggedPosts(@Query(\"tag\") String tag,\n @Query(\"filter\") String filter,\n @Query(\"before\") long timestamp,\n @Query(\"limit\") int limit);\n\n}",
"List<Tag> getMyTagCloud(User user);",
"public interface SDKCallback {\n void onSDKSuccess(String tag, Object message);\n\n void onSDKFail(String tag, String message);\n\n}",
"public String getFromTag();",
"@Override\n\tpublic void onCallback() {\n\t\t\n\t}",
"public String getTag();",
"void itemSuggested(String autoCompleteString, boolean keepPopupVisible, boolean triggerAction);",
"public void requestSuggestions(SuggestOracle.Request req, SuggestOracle.Callback callback) {\n fetchPostalCodes(req, callback);\n }",
"void setAutoCompleterCallback(AutoCompleterCallback callback);",
"public void transcribe (String utterance, float confidence) \n{\n //println(utterance);\n if (!utterance.equals(\"\"))\n {\n result = utterance;\n ListenForKeywords(result);\n println(result);\n inputResult = result;\n result = \"\";\n \n //CheckCommandValidity(result);\n \n }\n}",
"QuoteItem createQuoteItem();",
"private void makeTag(String query, String tag) {\n\t\t\n\t\tString Originalquery = savedSearches.getString(tag, null);\n\t\t\n\t\t// Getting Sharedprefernces.editor to store new tag/query pair\n\t\tSharedPreferences.Editor preferncesEditor = savedSearches.edit();\n\t\tpreferncesEditor.putString(tag, query);\n\t\tpreferncesEditor.apply(); // Stores the updated prefernces\n\t\t\n\t\tif (Originalquery==null) {\n\t\t\trefreshButtons(tag); // Adds new button for this tag\n\t\t}\n\t\t\n\t\t\n\t}",
"@Override\n\t\t\tpublic void onGetGeoCodeResult(GeoCodeResult arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tpublic void onListTags(Context context, int errorCode,\n\t\t\tList<String> tags, String requestId) {\n\t\t\n\t}",
"@GET(\"w/api.php?action=opensearch&format=json&suggest&redirects=resolve\")\n Call<JsonElement> getSuggestionsFromSearch(@Query(\"search\") String search);",
"public String getSuggestAuthority() {\n/* 56 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Test\n public void testGetVerifiedAssociatedTags() {\n String insertedTagList = \" #awesome, #dry, #newTag \";\n List<Tag> verifiedTags = tagServ.getVerifiedAssociatedTags(insertedTagList);\n List<Tag> allTags = tagServ.getAllTags();\n Assert.assertEquals(5, allTags.size());\n Assert.assertEquals(3, verifiedTags.size());\n }",
"private SearchAutoCompleteAPI(Context context,String nameOrCode){\n this.context=context;\n this.nameOrCode=nameOrCode;\n }",
"public interface WordSearchInterface {\n\n public void OnProcessFinished(String Description, String MobileUrl, String title, ArrayList list, ArrayList<String> links, boolean redirect);\n\n\n}",
"@Override\n public void onThirdVote(String arg0) {\n\n }",
"private TagHome( )\r\n {\r\n }",
"public interface OtherYqCallback {\n public void onValue(String data);\n}",
"public void onQuote(Quote event) {\n quoteCount++;\n }",
"@Override\r\n\t\t\tpublic void onRequest() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n layoutResource = R.layout.fragment_review_user;\n View rootView = super.onCreateView(inflater,container,savedInstanceState);\n\n searchTags.changeListeners.add(new QuickCallback() {\n @Override\n public void Activate(@Nullable Object... objects) {\n searchCloud.removeAllViews();\n for( Tag tag : searchTags.Tags()) {\n searchCloud.addChip(tag.phrase);\n }\n }\n });\n TagUtils.GetMostUsedTags(searchTags);\n searchBar.addTextChangedListener(searchBarWatcher);\n searchCloud.setChipListener(new ChipListener() {\n @Override\n public void chipSelected(int i) {\n Tag tag = searchTags.Get(i);\n int position = topTags.GetPosition(tag);\n if ( position == -1 )\n topTags.Add( tag );\n else {\n topCloud.setSelectedChip(position);\n }\n searchTags.Remove( tag );\n }\n\n @Override\n public void chipDeselected(int i) {\n Tag tag = searchTags.Get(i);\n int position = topTags.GetPosition(tag);\n if ( position != -1 ) {\n Chip chip = (Chip) topCloud.getChildAt(position);\n chip.deselect();\n }\n// topCloud.setSelectedChip(position);\n }\n });\n\n topTags.changeListeners.add(new QuickCallback() {\n @Override\n public void Activate(@Nullable Object... objects) {\n // should only ever have to deal with TagList.Add()\n Tag tag = topTags.GetLast();\n topCloud.addChip(tag.phrase);\n topCloud.setSelectedChip(topCloud.getChildCount()-1);\n tag.selected = true;\n }\n });\n topCloud.setChipListener(new ChipListener() {\n @Override\n public void chipSelected(int i) {\n Tag tag = topTags.Get(i);\n tag.selected = true;\n// int position = searchTags.GetPosition(tag);\n// if ( position != -1 ) {\n// searchCloud.setSelectedChip(position);\n// }\n }\n\n @Override\n public void chipDeselected(int i) {\n Tag tag = topTags.Get(i);\n tag.selected = false;\n// int position = searchTags.GetPosition(tag);\n// if ( position != -1 ) {\n// Chip chip = (Chip) searchCloud.getChildAt(position);\n// chip.deselect();\n// }\n// topCloud.setSelectedChip(position);\n }\n });\n TagUtils.GetTagsFromLastReview(topTags,smoosher);\n\n// lastReviewTags.changeListeners.add(new QuickCallback() {\n// @Override\n// public void Activate(@Nullable Object... objects) {\n// lastReviewCloud.removeAllViews();\n// for( Tag tag : lastReviewTags.Tags()) {\n// lastReviewCloud.addChip(tag.phrase);\n// }\n// }\n// });\n\n addButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String phrase = searchBar.getText().toString();\n TagUtils.AddTag(phrase);\n TagUtils.GetTagsContaining(phrase.toLowerCase(),searchTags);\n// Log.d(TAG,\"add button pressed: \" + phrase );\n }\n });\n\n likeButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ApplyReview();\n SmoosherUtils.LikeSmoosher(smoosher);\n }\n });\n\n passButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ApplyReview();\n SmoosherUtils.PassSmoosher(smoosher);\n }\n });\n\n return rootView;\n }",
"public interface PersistedCallbackFacet extends CallbackFacet {\n\n}",
"@Override\n public void run() {\n \t\t((ChangePlaceActivity) activity).onSearchPlaceSuccess(list);\n }",
"void updateTags();",
"public interface OnNfcDataReceived {\n void processNfcData(Tag mytag);\n}",
"public interface TagService {\n\n public void tagging(String tagName, String type, Long targetId) throws Exception;\n\n public void tagging(String tagName, String type, Long[] targetIds) throws Exception;\n\n public void untagging(String tagName, String type, Long targetId) throws Exception;\n\n public void untagging(String tagName, String type, Long[] targetIds) throws Exception;\n\n public void clear(String type, Long itemId) throws Exception;\n\n public void removeTag(String name, boolean force) throws Exception;\n\n public Set<Long> queryByType(String type) throws Exception;\n\n public Set<Long> queryByTypeAndTag(String tagName, String type) throws Exception;\n\n public Set<Long> unionQuery(List<String> tagNames, String type) throws Exception;\n\n public Set<Long> joinQuery(List<String> tagNames, String type) throws Exception;\n\n public Set<String> getTags(Long targetId) throws Exception;\n\n public Set<String> getTags(Long[] targetIds) throws Exception;\n\n public Set<String> getTags(String type, Long itemId) throws Exception;\n\n public Map<Long, List<String>> getTags(String type, Long[] itemIds) throws Exception;\n}",
"public void serviceSearchCompleted(int transID, int respCode) {\n }",
"QuoteTerm createQuoteTerm();",
"public interface SearchArticlesCallback {\n\n void onSuccess(SearchArticlesResponse response);\n\n void onError(Error error);\n\n}",
"@Override\n\t\tpublic void onGetSuggestionResult(MKSuggestionResult arg0, int arg1) {\n\n\t\t}",
"@Override\n\tpublic void OnRequest() {\n\t\t\n\t}",
"public String getSuggestSelection() {\n/* 113 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"void addTag(String tag){tags.add(tag);}",
"private String tagText(String s)throws IOException{\n//\tMaxentTagger tagger = new MaxentTagger(\"english-left3words-distsim.tagger\");\n\tString s1=null;\n\tSystem.out.println(\"here starts the process\");\n\ts1 = tagger.tagString(s);\n\treturn s1;\n}",
"java.util.concurrent.Future<TagResourceResult> tagResourceAsync(TagResourceRequest tagResourceRequest);",
"java.util.concurrent.Future<TagResourceResult> tagResourceAsync(TagResourceRequest tagResourceRequest);",
"java.util.concurrent.Future<TagResourceResult> tagResourceAsync(TagResourceRequest tagResourceRequest);",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n final AutocompletePrediction item = mAdapter.getItem(position);\n final String placeId = item.getPlaceId();\n final CharSequence primaryText = item.getPrimaryText(null);\n\n Log.i(TAG, \"Autocomplete item selected: \" + primaryText);\n\n /*\n Issue a request to the Places Geo Data API to retrieve a Place object with additional\n details about the place.\n */\n PendingResult<PlaceBuffer> placeResult = Places.GeoDataApi\n .getPlaceById(mGoogleApiClient, placeId);\n placeResult.setResultCallback(mUpdatePlaceDetailsCallback);\n\n //Toast.makeText(getApplicationContext(), \"Clicked: \" + primaryText,\n // Toast.LENGTH_SHORT).show();\n Log.i(TAG, \"Called getPlaceById to get Place details for \" + placeId);\n }",
"void applyTags(ReaderContext context, Operation operation, Method method);",
"@Override\n public void onPlaceSelected(Place place) {\n initiateSearch(place.getLatLng());\n }",
"void makeMarketBuyOrder(AuthInfo authInfo, String pair, String money,HibtcApiCallback<Object> callback);",
"public interface ReaderOperations {\n\n /**\n * Allows you to do an arbitrary request against the Google Reader API, hiding the complexity of keeping an\n * authentication token allive.\n *\n * @param callback The object that is expected to do something useful against the Google Reader API.\n * @param <T> The result type.\n * @return The result of the callback.\n */\n <T> T doWithCallback(ReaderCallback<T> callback);\n\n /**\n * Retrieves a token to be included in editing type of calls.\n */\n String getToken();\n\n /**\n * Adds a subscription for the given feed.\n *\n * @param feed The URL of the feed to subscribe to.\n * @param token The token. (See {@link #getToken()}.\n * @return A boolean indicating if the request succeeded.\n */\n boolean subscribe(String feed, String token);\n\n /**\n * Tags a subscription with the given tag.\n *\n * @param feed The URL of the feed to subscribe to.\n * @param tag The tag to be set.\n * @param token The token. (See {@link #getToken()}.\n * @return A boolean indicating if the request succeeded.\n */\n boolean tag(String feed, String tag, String token);\n\n}",
"public interface YTranslatorCallBack {\n void getYTranslateCallBack(String responcse, String progressingName);\n /*void getYTranslateCallBackFromText(String response);\n void getYTranslateCallBackFromQTrans(String response);*/\n}",
"String getTag() {\n return tag;\n }",
"com.google.openrtb.OpenRtb.BidRequest getRequest();"
]
| [
"0.6027868",
"0.5879736",
"0.5709303",
"0.56902665",
"0.547621",
"0.54716814",
"0.54173046",
"0.53643954",
"0.5318044",
"0.5277303",
"0.5273087",
"0.52612954",
"0.5235573",
"0.52298653",
"0.52222174",
"0.521113",
"0.5197364",
"0.51805776",
"0.51695937",
"0.51563144",
"0.51470613",
"0.513514",
"0.5132082",
"0.51125485",
"0.51125234",
"0.51104224",
"0.51100713",
"0.51045907",
"0.5097152",
"0.50830096",
"0.50755155",
"0.50734717",
"0.5051142",
"0.50409615",
"0.50357336",
"0.50281435",
"0.50209224",
"0.50147176",
"0.50066376",
"0.5004848",
"0.49899572",
"0.49831894",
"0.49729598",
"0.4959307",
"0.49580082",
"0.49527106",
"0.49488193",
"0.49442577",
"0.49344218",
"0.49264985",
"0.49259406",
"0.49240136",
"0.4910395",
"0.48953432",
"0.48862845",
"0.48823306",
"0.4880779",
"0.48586574",
"0.48502848",
"0.4846638",
"0.48402742",
"0.4839547",
"0.48385423",
"0.4828039",
"0.48171663",
"0.48129144",
"0.48033372",
"0.4799053",
"0.47983244",
"0.47964904",
"0.47962385",
"0.4793832",
"0.4787976",
"0.47877765",
"0.4786553",
"0.47792253",
"0.47772852",
"0.47692844",
"0.47692376",
"0.4766134",
"0.4763167",
"0.47605228",
"0.47495058",
"0.47459745",
"0.47374946",
"0.4734795",
"0.4721324",
"0.47204196",
"0.47185594",
"0.47106642",
"0.47106642",
"0.47106642",
"0.47091404",
"0.47053662",
"0.46985698",
"0.4698564",
"0.469815",
"0.46973452",
"0.46953648",
"0.46949577"
]
| 0.5703479 | 3 |
this.manufacturersListBox = new ListBox(); | protected void initManufacturersListBox(ManufacturerHolder mh) {
manufacturersListBox.addItem("Please choose...", "-1");
int index = 1;
for (ManufacturerHolder manuHolder : mywebapp.getManufacturerHolders()) {
manufacturersListBox.addItem(manuHolder.getName(), manuHolder.getId().toString());
if ((mh != null) && (mh.getId() != null)) {
if (mh.getId().equals(manuHolder.getId())) {
manufacturersListBox.setSelectedIndex(index);
}
}
index++;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public RTwoPanelListBox() {\n }",
"public QS001OtherItemListBox() {\r\n super();\r\n }",
"public WListbox()\n\t{\n\t\tsuper();\n\t\tWListItemRenderer rowRenderer = new WListItemRenderer();\n\t rowRenderer.addTableValueChangeListener(this);\n\n\t\tsetItemRenderer(rowRenderer);\n\t\tsetModel(new ListModelTable());\n\t}",
"private void initList() {\r\n\t\tthis.panelList = new JPanel();\r\n\t\tthis.panelList.setLayout(new BoxLayout(this.panelList,\r\n\t\t\t\tBoxLayout.PAGE_AXIS));\r\n\r\n\t\tJLabel labelList = new JLabel(\"Weapons list\");\r\n\t\tlabelList.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\tthis.dlm = new DefaultListModel<String>();\r\n\t\tthis.list = new JList<String>(dlm);\r\n\t\tthis.scrollPane = new JScrollPane(this.list,\r\n\t\t\t\tJScrollPane.VERTICAL_SCROLLBAR_ALWAYS,\r\n\t\t\t\tJScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);\r\n\t\tthis.scrollPane.setBounds(new Rectangle(10, 10, 450, 80));\r\n\t\tthis.list.addMouseListener(this.editWeaponControl);\r\n\t\tthis.updateList();\r\n\t\tthis.panelList.add(labelList);\r\n\t\tthis.panelList.add(this.scrollPane);\r\n\t}",
"public L5MyList() {\n \n window.setLayout(new BorderLayout());\n window.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\n panel = new JPanel();\n\n cBox = new JComboBox(colorNames);\n cBox.setMaximumRowCount(5);\n cBox.addItemListener(this);\n\n panel.add(cBox);\n window.add(panel, BorderLayout.CENTER);\n\n window.setSize(500, 300);\n window.setVisible(true);\n }",
"ListBoxMVP getOrganizationListBox();",
"public librarian() {\n initComponents();\n }",
"private void refreshListbox(){\n this.jListStageplaatsen.setListData(this.stageplaatsen.toArray());\n this.jComboBoxGekendeBedrijven.setModel(new DefaultComboBoxModel(this.bedrijven.toArray()));\n \n }",
"private void updateListBox() {\n String program = Utils.getListBoxItemText(listBox_Program);\n ArrayList<String> typeList = Classification.getTypeList(program);\n listBox_Type.clear();\n for (String item : typeList) {\n listBox_Type.addItem(item);\n }\n listBox_Type.setItemSelected(0, true);\n listBox_Type.setEnabled(typeList.size() > 1);\n listBox_Type.onBrowserEvent(Event.getCurrentEvent());\n }",
"public Seller1() {\n initComponents();\n }",
"public FrmMartialArts() {\n initComponents();\n }",
"public RentGUI() {\n initComponents();\n aList = new ArrayList<>();\n Student = new String();\n BookName = new String();\n BookCategory = new String();\n count = 0;\n }",
"@Override\r\n public void onModuleLoad() {\r\n final ListBox select = new ListBox();\r\n\r\n// Beispielcode:\r\n// \r\n final Label airportLabel = new Label();\r\n// Airport ap = new Airport();\r\n// ap.setCountry(\"Germany\");\r\n// ap.setId(\"FRA\");\r\n// \r\n// airportService.save(ap, new SuccessCallback<Airport>() {\r\n//\r\n// @Override\r\n// public void onSuccess(Airport result) {\r\n// airportLabel.setText(result.toString());\r\n// }\r\n// });\r\n//\r\n// airportService.load(\"FRA\", new SuccessCallback<Airport>() {\r\n//\r\n// @Override\r\n// public void onSuccess(Airport result) {\r\n// airportLabel.setText(result.toString());\r\n// }\r\n// });\r\n\r\n select.setVisibleItemCount(1);\r\n\r\n class CategoryJsoSelectChangeHandler implements ChangeHandler {\r\n\r\n @Override\r\n public void onChange(ChangeEvent event) {\r\n refreshSelection(select);\r\n }\r\n }\r\n\r\n final CategoryJsoSelectChangeHandler csHandler = new CategoryJsoSelectChangeHandler();\r\n select.addChangeHandler(csHandler);\r\n\r\n database.getCategory(new AsyncCallback<List<Category>>() {\r\n\r\n @Override\r\n public void onFailure(Throwable caught) {\r\n showErrorPanel(RPC_ERROR_TITLE, SERVER_ERROR);\r\n }\r\n\r\n @Override\r\n public void onSuccess(List<Category> result) {\r\n CategoryJsos = result;\r\n\r\n for (Category r : result) {\r\n select.addItem(r.toString());\r\n select.setItemSelected(0, true);\r\n refreshSelection(select);\r\n }\r\n }\r\n });\r\n\r\n // We can add style names to widgets\r\n //sendButton.addStyleName(\"sendButton\");\r\n\r\n // Add the Control Elements to the RootPanel\r\n // Use RootPanel.get() to get the entire body element\r\n RootPanel.get(\"errorLabelContainer\").add(airportLabel);\r\n RootPanel.get(\"selectContainer\").add(select);\r\n }",
"public StaffMenu() {\n initComponents();\n \n //Init with blank text \n ageLabel.setText(\"\");\n staffNumber.setText(\"\");\n genderLabel.setText(\"\");\n \n //Reading staff list \n ListOfStaff model_staff_list = new ListOfStaff(ListOfStaff.getStaff());\n staffList.setModel(model_staff_list); \n }",
"private void choiceBoxInitializer() {\n searchChoiceBox.getItems().addAll(\"Learning Applications\", \"Learning Categories\",\n \"Learning Units\");\n searchChoiceBox.setValue(\"Learning Applications\");\n }",
"public LibrarianMenu() {\n initComponents();\n }",
"@Override\n public void valueChanged(ListSelectionEvent arg0) {\n\n }",
"private void initComponents() {\n\t\tlistPanel = new JPanel();\r\n\r\n\t\t//======== this ========\r\n\t\tsetLayout(new BorderLayout());\r\n\r\n\t\t//======== listPanel ========\r\n\t\t{\r\n\t\t\tlistPanel.setAutoscrolls(true);\r\n\t\t\tlistPanel.setLayout(new BoxLayout(listPanel, BoxLayout.Y_AXIS));\r\n\t\t}\r\n\t\tadd(listPanel, BorderLayout.CENTER);\r\n\t\t// JFormDesigner - End of component initialization //GEN-END:initComponents\r\n\t}",
"public QS001OtherItemListBox(Component view) {\r\n super(view);\r\n }",
"@FXML\r\n private void initialize() {\n this.departureBox.setItems(TRAIN.cityNamesLIST()); //setting the arraylist: departureList as a parameter for the departureBox\r\n departureBox.setValue(\"la\");\r\n arrivalsBox.setItems(TRAIN.cityNamesLIST()); //setting the arraylist: arrivalsList as a parameter for the departureBox\r\n arrivalsBox.setValue(\"ar\");\r\n }",
"public GuestListFrame() {\n initComponents();\n setTitle(\"Gästeliste\");\n guestProvider = new GuestProvider();\n reservationProvider = new ReservationProvider();\n loadGuests();\n setLocationRelativeTo(null);\n reservationBtn.setEnabled(false);\n searchText.getDocument().addDocumentListener(new DocumentListener() {\n public void insertUpdate(DocumentEvent e) {\n searchTextChanged();\n }\n public void removeUpdate(DocumentEvent e) {\n searchTextChanged();\n }\n public void changedUpdate(DocumentEvent e) {\n searchTextChanged();\n }\n });\n }",
"private void initForm() {\n\t\tfor (int i = 0; i < userRoles.size(); i++) {\n\t\t\tlb.addItem(userRoles.get(i).value);\n\t\t}\n\t}",
"public ProductListJPanel() {\n initComponents();\n }",
"public Librarian() {\n initComponents();\n }",
"public shopbybrands() {\n initComponents();\n }",
"public OffertoryGUI() {\n initComponents();\n setTypes();\n }",
"public AssemblingMessageListPanel()\n {\n //initComponents();\n }",
"public manageLecturersNewUI() {\n initComponents();\n loadLecturerData();\n loadSubjectsToComboBox();\n PanelMain.setBackground(Loading.getColorCode());\n PanelSub.setBackground(Loading.getColorCode());\n }",
"public QS001OtherItemListBox(ListModel dataModel) {\r\n super(dataModel);\r\n }",
"private void initialize() {\n\t\tfrmEjemploUsoListas = new JFrame();\n\t\tfrmEjemploUsoListas.setTitle(\"Ejemplo uso listas\");\n\t\tfrmEjemploUsoListas.setBounds(100, 100, 447, 260);\n\t\tfrmEjemploUsoListas.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfrmEjemploUsoListas.getContentPane().setLayout(null);\n\t\t\n\t\tJScrollPane scrollPane = new JScrollPane();\n\t\tscrollPane.setBounds(12, 42, 138, 130);\n\t\tfrmEjemploUsoListas.getContentPane().add(scrollPane);\n\t\tJList list = new JList();\n\t\tscrollPane.setViewportView(list);\n\t\t\n\t\tJLabel lblAficiones = new JLabel(\"Aficiones\");\n\t\tlblAficiones.setBounds(12, 13, 138, 16);\n\t\tfrmEjemploUsoListas.getContentPane().add(lblAficiones);\n\t\t\n\t\tJTextPane textPaneAficiones = new JTextPane();\n\t\ttextPaneAficiones.setFont(new Font(\"Consolas\", Font.BOLD, 14));\n\t\ttextPaneAficiones.setBackground(SystemColor.menu);\n\t\ttextPaneAficiones.setEditable(false);\n\t\ttextPaneAficiones.setBounds(162, 62, 255, 113);\n\t\tfrmEjemploUsoListas.getContentPane().add(textPaneAficiones);\n\t\t\n\t\tlist.addListSelectionListener(new ListSelectionListener() {\n\t\t\tpublic void valueChanged(ListSelectionEvent e) {\n\t\t\t\tList values = list.getSelectedValuesList();\n\t\t\t\tString str = \"Elementos seleccionados: \" + values.size() + \". \";\n\t\t\t\tfor (int i = 0; i < values.size(); i++) {\n\t\t\t\t\tstr += values.get(i).toString();\n\t\t\t\t\tif (i != values.size()-1) str += \", \";\n\t\t\t\t\telse str += \".\";\n\t\t\t\t}\n\t\t\t\ttextPaneAficiones.setText(str);\n\t\t\t}\n\t\t});\n\t\tlist.setModel(new AbstractListModel() {\n\t\t\tString[] values = new String[] {\"Cine\", \"Series\", \"Videojuegos\", \"Cosplay\", \"Deportes\", \"M\\u00FAsica\", \"Viajes\", \"Cocina\"};\n\t\t\tpublic int getSize() {\n\t\t\t\treturn values.length;\n\t\t\t}\n\t\t\tpublic Object getElementAt(int index) {\n\t\t\t\treturn values[index];\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t}",
"public addInventory() {\n initComponents();\n centerFrame(); //Set frame in the center of the screen\n conn = ConnectToDatabase.getConnection(); //Get connection to the database\n setComboBoxValues(); //Set the combo box values\n listLoaded = true; //List has been loaded completely\n }",
"public ManageSupplier() {\n initComponents();\n }",
"public ComboBox1() {\n initComponents();\n agregarItems();\n\n }",
"private void initList() {\r\n\t\tlist = new JList<>();\r\n\t\tFile rootFile = new File(System.getProperty(\"user.dir\"));\r\n\t\tloadFilesInFolder(rootFile);\r\n\t\tlist.addListSelectionListener(new FileListSelectionListener());\r\n\t}",
"public Magasin() {\n initComponents();\n }",
"public AddItems() {\n initComponents();\n \n }",
"public FormListRemarking() {\n initComponents();\n }",
"public Lentejas() {\n initComponents();\n }",
"public QS001OtherItemListBox(Vector listData) {\r\n super(listData);\r\n }",
"public ListFrameRobots(ArrayList<Team> teamRobotInfo)\r\n {\r\n super( \"List Test\" );\r\n setLayout( new FlowLayout() ); // set frame layout\r\n \r\n for(int i = 0; i < 12; i ++)\r\n {\r\n teamNames[i] = teamRobotInfo.get(i).getTeamName();\r\n }\r\n\r\n \r\n \r\n teamNamesJList = new JList(teamNames);\r\n teamNamesJList.setVisibleRowCount(12);\r\n \r\n \r\n \r\n teamNamesJList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r\n\r\n /*\r\n add( new JScrollPane(teamNamesJList));\r\n\r\n colorJList.addListSelectionListener(\r\n new ListSelectionListener() // anonymous inner class\r\n { \r\n // handle list selection events\r\n public void valueChanged( ListSelectionEvent event )\r\n {\r\n getContentPane().setBackground( \r\n colors[ colorJList.getSelectedIndex() ] );\r\n label.setName(\"Dogs\");\r\n } // end method valueChanged\r\n } // end anonymous inner class\r\n \r\n ); // end call to addListSelectionListener\r\n \r\n \r\n /* \r\n teamNamesJList.addListSelectionListener(\r\n new ListSelectionListener() // anonymous inner class\r\n { \r\n // handle list selection events\r\n public void valueChanged( ListSelectionEvent event )\r\n {\r\n getContentPane().setBackground( \r\n colors[ colorJList.getSelectedIndex() ] );\r\n } // end method valueChanged\r\n } // end anonymous inner class\r\n \r\n );\r\n \r\n */\r\n }",
"public void initComponents() {\n//metoda gatherBrandSet z klasy CarManager przyjmuje polaczenie do bazy\n carManager.gatherBrandSet(connectionManager.getStatement());\n//petla iterujaca po elementach zbioru marek i dodajaca elementy do listy\n carBrandList.removeAll(carBrandList);\n for(String o: carManager.getBrandSet()){\n\n carBrandList.add(o);\n }\n\n//ustawianie listy jako ChoiceBox w GUI\n brandCBox.setItems(carBrandList);\n\n//Marka Box wrazliwa na zmiany\n brandCBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n//przesylanie wyboru Marki do CarManager\n carManager.setBrandChoice((String) brandCBox.getValue());\n carManager.gatherModelSet(connectionManager.getStatement());\n//Czyszczenie listy i dodawanie nowych obiektow z ModelSet do ModelList\n carModelList.removeAll(carModelList);\n for (String p : carManager.getModelSet())\n carModelList.add(p);\n\n modelCBox.setItems(carModelList);\n// Listener do zmiany Modelu\n modelCBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n//Ustawianie wartosci wybranej z przycisku\n carManager.setMarkaChoice((String) modelCBox.getValue());\n// Mechaniz wyboru silnika\n carManager.gatherEngineSet(connectionManager.getStatement());\n\n\n carEngineList.removeAll(carEngineList);\n for(String p: carManager.getEngineSet())\n carEngineList.add(p);\n\n engineCBox.setItems(carEngineList);\n engineCBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n carManager.setEngineChoice(String.valueOf(engineCBox.getValue()));\n }\n });\n\n\n }\n });\n\n }\n });\n//Pobieranie Elementow z bazy\n elementManager.gatherElementSet(connectionManager.getStatement());\n\n servActivities.setItems(carActivityList);\n servActivities.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n\n\n }\n });\n\n carElementList.removeAll(carModelList);\n for(String p: elementManager.getElementSet())\n carElementList.add(p);\n\n elementActivities.setItems(carElementList);\n elementActivities.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n elementManager.setElementChoice(String.valueOf(elementActivities.getValue()));\n\n }\n });\n//Ustawianie lat\n yearList.removeAll(yearList);\n for(int i = 2017; i> 1970; i--){\n yearList.add(i);\n }\n yearCBox.setItems(yearList);\n //Przypisywanie do zmiennej\n yearCBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n carManager.setYearChoice(0);\n carManager.setYearChoice(Integer.valueOf(String.valueOf(yearCBox.getValue())));\n }\n });\n\n}",
"public Catalogs() {\n initComponents();\n this.setLocationRelativeTo(null);\n\n }",
"public InventoryGUI() {\n initComponents();\n }",
"public ClientGUI() {\n initComponents();\n PopulateList();\n }",
"public issuedBookList() {\n initComponents();\n }",
"public OptionsMenu() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n confirm = new ConfirmSave(this, true);\n lstObras = new JList<Obra>(); \n scrObras.setViewportView(lstObras);\n lstObras.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n lstObrasMouseClicked(evt);\n }\n });\n }",
"DepartureBox()\n {\n layoutControls();\n addEventHandlers();\n }",
"public SpeciesForm() {\n initComponents();\n setTitle(Application.TITLE_APP + \" Species\");\n processor = new SpeciesProcessor();\n loadData(); \n \n \n }",
"public Items()\r\n\t{\r\n\t\t//create the window/panel\r\n\t\tsuper( \"Swing Window\" );\r\n\t\tsetSize( 500,200 );\r\n\t\tsetDefaultCloseOperation( EXIT_ON_CLOSE );\r\n\t\tadd(pnl);\r\n\t\t\r\n\r\n\t\t//add the different checkboxes to the panel\r\n\t\tpnl.add( chk1 ) ;\r\n\t\tpnl.add( chk2 ) ;\r\n\t\tpnl.add( chk3 ) ;\r\n\t\tpnl.add( chk4 ) ;\r\n\t\t\r\n\t\t//pnl.add( chk5 ) ;\r\n\t\t//pnl.add( chk6 ) ;\r\n\t\t//pnl.add( chk7 ) ;\r\n\t\t//add the combobox\r\n\t\tbox1.setSelectedIndex(0);\r\n\t\tpnl.add( box1 ) ;\r\n\t\t\r\n\t\tbox2.setSelectedIndex(0);\r\n\t\tpnl.add( box2 ) ;\r\n\t\t\r\n\t\tpnl.add( lst1 ) ; \r\n\t\tpnl.add( lst2 ) ; \r\n\t\tsetVisible( true );\r\n\t}",
"public AddBooks() {\r\n initComponents();\r\n }",
"public Petitioner_Details() {\n initComponents();\n }",
"public ViewBotonesListas() {\n initComponents();\n }",
"public addcar() {\n initComponents();\n }",
"CreateNewCustomerJPanel(JPanel userProcessContainer, Business business, SalesPerson salesPerson) {\n initComponents();\n this.userProcessContainer=userProcessContainer;\n this.business=business;\n this.salesPerson=salesPerson;//To change body of generated methods, choose Tools | Templates.\n \n comboMarket.removeAllItems();\n for(Market market: business.getBusiness_MarketList().getMarketList()){\n comboMarket.addItem(market);\n }\n }",
"private void initChildren() {\n vbox = new Vbox();\n chkUseRawName = new Checkbox(\"Use the scientific names supplied with the records\");\n chkUseRawName.setChecked(false);\n\n chkUseRawName.addEventListener(\"onCheck\", new EventListener() {\n\n @Override\n public void onEvent(Event event) throws Exception {\n onCheck$chkUseRawName(event);\n }\n });\n autoComplete = new SpeciesAutoComplete();\n autoComplete.setAutodrop(true);\n autoComplete.setWidth(\"330px\");\n autoComplete.addEventListener(\"onChange\", new EventListener() {\n\n @Override\n public void onEvent(Event event) throws Exception {\n autoCompleteSelectionChanged(event);\n }\n\n });\n\n vbox.appendChild(chkUseRawName);\n vbox.appendChild(autoComplete);\n\n }",
"public FrmCatalogo() {\n initComponents();\n rdCd.setSelected(true);\n this.setLocationRelativeTo(null);\n volumes = new ArrayList<>();\n }",
"public sinavlar2() {\n initComponents();\n }",
"@Override\r\n public void init() {\r\n setSize(370, 380);\r\n l1 = new List();\r\n l1.add(\"White\");\r\n l1.add(\"Gray\");\r\n l1.add(\"Dark Gray\");\r\n l1.add(\"Cyan\");\r\n l1.add(\"Black\");\r\n l1.add(\"Red\");\r\n l1.addItemListener(this);\r\n add(l1);\r\n // TODO start asynchronous download of heavy resources\r\n }",
"public void manageComponent() {\n menu = new JMenuBar();\n mainbox = new JScrollPane();\n toolbox = new JPanel();\n paintBox = new JPanel();\n optionbox = new JPanel();\n statusbar = new JPanel();\n paintModule = new PaintModule();\n\n // component setting\n createToolBox(toolbox);\n createMenu(menu);\n createOptionBox(optionbox);\n createStatusBar(statusbar);\n this.setLayout(new BorderLayout());\n\n // add component to container\n paintBox.add(paintModule);\n mainbox.setViewportView(paintBox);\n\n\n this.add(menu, BorderLayout.NORTH);\n this.add(mainbox, BorderLayout.CENTER);\n this.add(toolbox, BorderLayout.WEST);\n this.add(optionbox, BorderLayout.EAST);\n this.add(statusbar, BorderLayout.SOUTH);\n\n }",
"public TelaListaOS() {\n initComponents();\n ConfigTelas ct = new ConfigTelas(this);\n ct.carregarConfig(this);\n \n this.jComboBoxOS.setVisible(false);\n }",
"public QS001OtherItemListBox(Object[] listData) {\r\n super(listData);\r\n }",
"public OrganizeItemsPanel() {\n initComponents();\n// lastIndeks = catalogProducts.size();\n }",
"public busdet() {\n initComponents();\n }",
"public BrandsPanel()\n {\n initComponents();\n\n listBrands.setCellRenderer(new BrandsListCellRenderer());\n listBrands.getSelectionModel().addListSelectionListener(new ListSelectionListener()\n {\n @Override\n public void valueChanged(ListSelectionEvent e)\n {\n loadSelectedValue();\n }\n });\n\n panelBrandEdit.setVisible(false);\n }",
"public Menu_Train() {\n initComponents();\n }",
"public ListIDE() {\n initComponents();\n loadAsset();\n directory = new Directory();\n }",
"public pfcGuiLlistaPacients() { \n \n this.llistaPacientsModel = new javax.swing.DefaultListModel();\n initComponents(); \n centraFormulari(); \n \n }",
"public NewCustomerGUI() {\n initComponents();\n }",
"public VistaListadeproductos() {\n // You can initialise any data required for the connected UI components here.\n }",
"public DirectoryListingScreen(){\r\n DIRECTORYLISTING_INSTANCE = this;\r\n }",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"Sales List\");\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.BOLD, 20));\n\t\tlblNewLabel.setBounds(168, 10, 105, 25);\n\t\tframe.getContentPane().add(lblNewLabel);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"Item:\");\n\t\tlblNewLabel_1.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblNewLabel_1.setBounds(10, 48, 85, 13);\n\t\tframe.getContentPane().add(lblNewLabel_1);\n\t\t\n\t\tJLabel lblNewLabel_2 = new JLabel(\"Cost: $\");\n\t\tlblNewLabel_2.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblNewLabel_2.setBounds(10, 82, 116, 13);\n\t\tframe.getContentPane().add(lblNewLabel_2);\n\t\t\n\t\tJLabel lblNewLabel_3 = new JLabel(\"Quantity:\");\n\t\tlblNewLabel_3.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblNewLabel_3.setBounds(10, 111, 85, 13);\n\t\tframe.getContentPane().add(lblNewLabel_3);\n\t\t\n\t\titemField = new JTextField();\n\t\titemField.setBounds(107, 47, 256, 19);\n\t\tframe.getContentPane().add(itemField);\n\t\titemField.setColumns(10);\n\t\t\n\t\tcostField = new JTextField();\n\t\tcostField.setBounds(107, 76, 134, 19);\n\t\tframe.getContentPane().add(costField);\n\t\tcostField.setColumns(10);\n\t\t\n\t\tquantityField = new JTextField();\n\t\tquantityField.setBounds(105, 105, 136, 19);\n\t\tframe.getContentPane().add(quantityField);\n\t\tquantityField.setColumns(10);\n\t\t\n\t\taddBtn = new JButton(\"Add Item to List\");\n\t\taddBtn.setBounds(107, 134, 182, 21);\n\t\tframe.getContentPane().add(addBtn);\n\t\t\n\t\tJScrollPane scrollPane = new JScrollPane();\n\t\tscrollPane.setBounds(37, 178, 361, 56);\n\t\tframe.getContentPane().add(scrollPane);\n\t\t\n\t\ttextArea = new JTextArea();\n\t\tscrollPane.setViewportView(textArea);\n\t\t\n\t\tJLabel lblNewLabel_4 = new JLabel(\"Total Sales:\");\n\t\tlblNewLabel_4.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblNewLabel_4.setBounds(10, 244, 85, 13);\n\t\tframe.getContentPane().add(lblNewLabel_4);\n\t\t\n\t\ttotalArea = new JTextArea();\n\t\ttotalArea.setBounds(90, 244, 199, 19);\n\t\tframe.getContentPane().add(totalArea);\n\t\t\n\t}",
"public TypeManager()\n {\n\tlistModel = new DefaultListModel();\n\tallTypes = new Vector();\n setupPrimitiveTypes();\n }",
"public Menus() {\n initComponents();\n }",
"public product() {\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 jLabel2 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n lstSpecies = new javax.swing.JList<>();\n btnAdd = new javax.swing.JButton();\n btnUpdate = new javax.swing.JButton();\n btnDelete = new javax.swing.JButton();\n jPanel3 = new javax.swing.JPanel();\n jLabel3 = new javax.swing.JLabel();\n txtName = new javax.swing.JTextField();\n jButton2 = new javax.swing.JButton();\n txtCondition = new javax.swing.JTextField();\n btnSearch = new javax.swing.JButton();\n lblMessage = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(137, 196, 244));\n\n jLabel2.setFont(new java.awt.Font(\"Nimbus Roman No9 L\", 3, 18)); // NOI18N\n jLabel2.setText(\"Name\");\n\n lstSpecies.setBackground(new java.awt.Color(228, 241, 254));\n lstSpecies.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n lstSpecies.setFont(new java.awt.Font(\"Nimbus Mono L\", 0, 14)); // NOI18N\n lstSpecies.addListSelectionListener(new javax.swing.event.ListSelectionListener() {\n public void valueChanged(javax.swing.event.ListSelectionEvent evt) {\n lstSpeciesValueChanged(evt);\n }\n });\n jScrollPane1.setViewportView(lstSpecies);\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 .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 321, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)\n );\n\n btnAdd.setBackground(new java.awt.Color(228, 241, 254));\n btnAdd.setFont(new java.awt.Font(\"Nimbus Mono L\", 3, 14)); // NOI18N\n btnAdd.setIcon(new javax.swing.ImageIcon(\"/home/mbralic/IDEA Projekt/DogsShelter/src/main/resources/iconadd.png\")); // NOI18N\n btnAdd.setText(\" Add\");\n btnAdd.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n btnAdd.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAddActionPerformed(evt);\n }\n });\n\n btnUpdate.setBackground(new java.awt.Color(228, 241, 254));\n btnUpdate.setFont(new java.awt.Font(\"Nimbus Mono L\", 3, 14)); // NOI18N\n btnUpdate.setIcon(new javax.swing.ImageIcon(\"/home/mbralic/IDEA Projekt/DogsShelter/src/main/resources/iconeupdate.png\")); // NOI18N\n btnUpdate.setText(\"Update\");\n btnUpdate.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n btnUpdate.setMaximumSize(new java.awt.Dimension(55, 27));\n btnUpdate.setMinimumSize(new java.awt.Dimension(55, 27));\n btnUpdate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnUpdateActionPerformed(evt);\n }\n });\n\n btnDelete.setBackground(new java.awt.Color(228, 241, 254));\n btnDelete.setFont(new java.awt.Font(\"Nimbus Mono L\", 3, 14)); // NOI18N\n btnDelete.setIcon(new javax.swing.ImageIcon(\"/home/mbralic/IDEA Projekt/DogsShelter/src/main/resources/icondelete.png\")); // NOI18N\n btnDelete.setText(\"Delete\");\n btnDelete.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n btnDelete.setMaximumSize(new java.awt.Dimension(55, 27));\n btnDelete.setMinimumSize(new java.awt.Dimension(55, 27));\n btnDelete.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnDeleteActionPerformed(evt);\n }\n });\n\n jPanel3.setBackground(new java.awt.Color(52, 152, 219));\n jPanel3.setPreferredSize(new java.awt.Dimension(1110, 78));\n\n jLabel3.setFont(new java.awt.Font(\"Purisa\", 3, 24)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setIcon(new javax.swing.ImageIcon(\"/home/mbralic/IDEA Projekt/DogsShelter/src/main/resources/icon.png\")); // NOI18N\n jLabel3.setText(\"Species management \");\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGap(30, 30, 30)\n .addComponent(jLabel3)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 54, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n txtName.setBackground(new java.awt.Color(228, 241, 254));\n txtName.setFont(new java.awt.Font(\"Nimbus Mono L\", 0, 14)); // NOI18N\n txtName.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n\n jButton2.setFont(new java.awt.Font(\"Nimbus Mono L\", 3, 14)); // NOI18N\n jButton2.setIcon(new javax.swing.ImageIcon(\"/home/mbralic/IDEA Projekt/DogsShelter/src/main/resources/iconclean.png\")); // NOI18N\n jButton2.setText(\"Clean\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n txtCondition.setBackground(new java.awt.Color(228, 241, 254));\n txtCondition.setFont(new java.awt.Font(\"Nimbus Mono L\", 0, 14)); // NOI18N\n txtCondition.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n\n btnSearch.setBackground(new java.awt.Color(228, 241, 254));\n btnSearch.setFont(new java.awt.Font(\"Nimbus Mono L\", 3, 14)); // NOI18N\n btnSearch.setIcon(new javax.swing.ImageIcon(\"/home/mbralic/IDEA Projekt/DogsShelter/src/main/resources/iconsearch.png\")); // NOI18N\n btnSearch.setText(\"Search\");\n btnSearch.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSearchActionPerformed(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(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, 1652, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(68, 68, 68)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, 258, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnAdd, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(121, 121, 121)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(txtCondition, javax.swing.GroupLayout.PREFERRED_SIZE, 204, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnSearch))\n .addComponent(jButton2)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(458, 458, 458)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnDelete, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnUpdate, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(119, 119, 119))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(lblMessage, javax.swing.GroupLayout.PREFERRED_SIZE, 282, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(37, 37, 37)))\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(658, 658, 658))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 30, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtCondition, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addComponent(btnAdd, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnUpdate, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(36, 36, 36)\n .addComponent(btnDelete, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(64, 64, 64)\n .addComponent(lblMessage, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(38, 38, 38)))\n .addGap(24, 24, 24)\n .addComponent(jButton2)\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 .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 1088, 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 .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n setLocationRelativeTo(null);\n }",
"void load_animalList(String str) {\r\n this.model = new DefaultListModel<String>();\r\n if (str.equals(\"Mamiferos\")) {\r\n for (Mamifero s : Setores.setorM) {\r\n model.addElement(s.getNome());\r\n }\r\n }\r\n if (str.equals(\"Aves\")) {\r\n for (Ave s : Setores.setorAv) {\r\n model.addElement(s.getNome());\r\n }\r\n }\r\n if (str.equals(\"Repteis\")) {\r\n for (Reptil s : Setores.setorR) {\r\n model.addElement(s.getNome());\r\n }\r\n }\r\n if (str.equals(\"Anfibios\")) {\r\n for (Anfibio s : Setores.setorAn) {\r\n model.addElement(s.getNome());\r\n }\r\n }\r\n if (str.equals(\"Invertebrados\")) {\r\n for (Invertebrado s : Setores.setorI) {\r\n model.addElement(s.getNome());\r\n }\r\n }\r\n animal_ListBox.setModel(model);\r\n animal_ListBox.setSelectedIndex(0);\r\n }",
"public void LlenarC(){\n for(int i=0;i< new GestionCategorias().getListCategoria().size();i++){\n catBox.addItem(new GestionCategorias().getListCategoria().get(i).getCat_nombre());\n \n }\n }",
"MenuList()\r\n\t{\r\n\t\t\r\n\t\tsetLayout(new GridLayout(2,1));\r\n\t\t\r\n\t\t\r\n\t\treadTax();\r\n\t\t\r\n\t\treceiptList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r\n\t\t\r\n\t\treceiptList.setFont(new Font(Font.SERIF,Font.PLAIN,16));\r\n\r\n\t\tadd(new JScrollPane(receiptList, \r\n\t\t\t\tScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER));\r\n\t\tadd(description);\r\n\t\tdescription.setText(\"jTextArea1\");\r\n\t\t\r\n\t}",
"public OrderForm() {\n initComponents();\n mWaffleList = new ArrayList<Product>();\n mCoffeeList = new ArrayList<Product>();\n mbdb = new BelgianDatabaseHandler(dbpath+menuDbName);\n resetQuantityBox();\n generateMenu();\n //if done generating menu\n //update orderhandler BelgianWaffle class for the items\n mbw = new BelgianWaffle(mWaffleList,mCoffeeList,mbdb);\n model = new DefaultListModel();\n \n }",
"public PizzaSelectPage() {\n initComponents();\n }",
"public ElevatorUI() {\n initComponents();\n }",
"public bookDetails() {\n initComponents();\n }",
"public GUICarsApp() {\n initComponents();\n \n aList = new ArrayList<Object>();\n }",
"public void setStudentsBox(List<Student> students) {\n for (Student student : students)\n studentsBox.addItem(student.getName());\n }",
"public meseros() {\n initComponents();\n }",
"public personal() {\n initComponents();\n }",
"private void fillChoicebox(String item, ChoiceBox cBox) {\n List<Component> test = cRegister.searchRegisterByName(item);\n ObservableList<String> temp = FXCollections.observableArrayList();\n temp.add(\"Ikke valgt\");\n for (Component i : test) {\n temp.add(i.getNavn());\n }\n\n cBox.setItems(temp);\n cBox.setValue(\"Ikke valgt\");\n }",
"public employeeTardinessGUI() {\n initComponents();\n\n }",
"private void createNewListTextField() {\n\t\tjpIntroduceNameList = new JPanel();\n\t\tjpIntroduceNameList.setOpaque(false);\n\t\tjertfTextList = new JERoundTextField(15,15,200);\n\t\tjertfTextList.setVisible(true);\n\t\tjpIntroduceNameList.setVisible(false);\n\t\tjpIntroduceNameList.add(jertfTextList);\n\t}",
"public Altas() {\n initComponents();\n }",
"private void initialize() {\n\t\t\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 912, 418);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setResizable(true);\n\t\t\n\t\t plf=new PlistFiles(false,true,false,true);\n\t\t list = new JList<String>(plf.vfiles);\n\t\t\n\t\t JMenuBar menuBar = new JMenuBar();\n\t\t frame.setJMenuBar(menuBar);\n\t\t \n\t\t JMenu mnSelection = new JMenu(\"Selection\");\n\t\t\n\t\t menuBar.add(mnSelection);\n\t\t \n\t\t chckbxmntmSystem = new JCheckBoxMenuItem(\"System\",plf.iscSystem());\n\t\t chckbxmntmSystem.addChangeListener(new ChangeListener() {\n\t\t \tpublic void stateChanged(ChangeEvent e) {\n\t\t \t\tplf.setcSystem(chckbxmntmSystem.isSelected());\n\t\t \t\t\n\t\t \t\t//list = new JList<String>(plf.vfiles);\n\t\t \t\tlist.removeAll();\n\t\t \t\tlist.setListData(plf.vfiles);\n\n\t\t \t\t\n\t\t \t\t\n\t\t \t}\n\t\t });\n\t\t mnSelection.add(chckbxmntmSystem);\n\t\t \n\t\t chckbxmntmUser = new JCheckBoxMenuItem(\"User\",plf.iscUser());\n\t\t chckbxmntmUser.addChangeListener(new ChangeListener() {\n\t\t \tpublic void stateChanged(ChangeEvent e) {\n\t\t \t\tplf.setcUser(chckbxmntmUser.isSelected());\n\t\t \t\tplf.GetList();\n\t\t \t\t//list = new JList<String>(plf.vfiles);\n\t\t \t\tlist.removeAll();\n\t\t \t\tlist.setListData(plf.vfiles);\n\t\t \t}\n\t\t });\n\t\t mnSelection.add(chckbxmntmUser);\n\t\t \n\t\t JSeparator separator = new JSeparator();\n\t\t mnSelection.add(separator);\n\t\t \n\t\t chckbxmntmLaunchagents = new JCheckBoxMenuItem(\"LaunchAgents\",plf.iscAgent());\n\t\t chckbxmntmLaunchagents.addChangeListener(new ChangeListener() {\n\t\t \tpublic void stateChanged(ChangeEvent e) {\n\t\t \t\tplf.setcAgent(chckbxmntmLaunchagents.isSelected());\n\t\t \t\tplf.GetList();\n\t\t \t\t//list = new JList<String>(plf.vfiles);\n\t\t \t\tlist.removeAll();\n\t\t \t\tlist.setListData(plf.vfiles);\n\t\t \t}\n\t\t });\n\t\t \n\t\t \n\t\t mnSelection.add(chckbxmntmLaunchagents);\n\t\t \n\t\t chckbxmntmLaunchdaemons = new JCheckBoxMenuItem(\"LaunchDaemons\",plf.iscSystem());\n\t\t chckbxmntmLaunchdaemons.addChangeListener(new ChangeListener() {\n\t\t \tpublic void stateChanged(ChangeEvent e) {\n\t\t \t\tplf.setcDaemon(chckbxmntmLaunchdaemons.isSelected());\n\t\t \t\tplf.GetList();\n\t\t \t\t//list = new JList<String>(plf.vfiles);\n\t\t \t\tlist.removeAll();\n\t\t \t\tlist.setListData(plf.vfiles);\n\t\t \t}\n\t\t });\n\t\t \n\t\t mnSelection.add(chckbxmntmLaunchdaemons);\n\t\t \n\t\t mnView = new JMenu(\"View\");\n\t\t menuBar.add(mnView);\n\t\t \n\t\t chckbxmntmDisplayTreeView = new JCheckBoxMenuItem(\"Display Tree view\");\n\t\t chckbxmntmDisplayTreeView.addChangeListener(new ChangeListener() {\n\t\t \tpublic void stateChanged(ChangeEvent e) {\n\t\t \t\t\n\t\t \t\tmyTree.setVisible(chckbxmntmDisplayTreeView.isSelected());\n\t\t \t\tscrollPane.setVisible(chckbxmntmDisplayTreeView.isSelected());\n\t\t \t\t//frame.getContentPane().remove(scrollPane);\n\t\t \t\n\t\t \t\t\n\t\t \t}\n\t\t });\n\t\t mnView.add(chckbxmntmDisplayTreeView);\n\t\t \n\t\t \n\t\t \n\t GridBagLayout gridBagLayout = new GridBagLayout();\n\t gridBagLayout.columnWidths = new int[]{264, 251, 266, 0};\n\t gridBagLayout.rowHeights = new int[]{0, 315, 0};\n\t gridBagLayout.columnWeights = new double[]{8.0, 1.0, 1.0, Double.MIN_VALUE};\n\t gridBagLayout.rowWeights = new double[]{0.0, 1.0, Double.MIN_VALUE};\n\t frame.getContentPane().setLayout(gridBagLayout);\n\n\t canvas = new Canvas();\n\t GridBagConstraints gbc_canvas = new GridBagConstraints();\n\t gbc_canvas.fill = GridBagConstraints.HORIZONTAL;\n\t gbc_canvas.insets = new Insets(0, 0, 5, 0);\n\t gbc_canvas.gridx = 2;\n\t gbc_canvas.gridy = 0;\n\t frame.getContentPane().add(canvas, gbc_canvas);\n\t \n\t JScrollPane scrollPane_1 = new JScrollPane();\n\t GridBagConstraints gbc_scrollPane_1 = new GridBagConstraints();\n\t gbc_scrollPane_1.fill = GridBagConstraints.BOTH;\n\t gbc_scrollPane_1.insets = new Insets(0, 0, 0, 5);\n\t gbc_scrollPane_1.gridx = 0;\n\t gbc_scrollPane_1.gridy = 1;\n\t frame.getContentPane().add(scrollPane_1, gbc_scrollPane_1);\n\t\n\t \n\t \n\t list.addMouseListener(new MouseAdapter() {\n\t \t@Override\n\t \tpublic void mouseClicked(MouseEvent e) {\n\t \t\tSystem.out.println(list.getSelectedValue());\n\t \t\tString plistfile = list.getSelectedValue();\n\t \t\t\n\t \t\tmyTree.Init(plistfile);\n\t \t\tSystem.out.println(\"Opening file .... \" + plistfile);\n\t \t\t\n\t \t\tScanner in = null;\n\t \t\tString content = null;\n\t\t\ttry {\n\t\t\t\tin = new Scanner(new File(plistfile));\n\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t \t\twhile (in.hasNext()) { // iterates each line in the file\n\t \t\t content += in.nextLine() + \"\\n\";\n\t \t\t // do something with line\n\t \t\t}\n\n\t \t\tin.close(); // don't forget to close resource leaks\n\n\t \t\tdtrpnPlistfile.setText(content);\n\t \t}\n\t \n\t });\n\n\t scrollPane_1.setViewportView(list);\n\t \n\t\n\t plf.GetList();\n\t int i=0;\n\t if (plf.files.length != 0)\n\t\t for(String afiles : plf.files)\n\t\t { \n\t\t\tSystem.out.println(i + \" - \" + afiles);\n\t\t\ti++;\n\t\t }\n\t list.setVisible(true);\n\t \n\t \n\t \n\t myTree = new XMLTree(\"/Users/rumi/helloworld.xml\");\n\t \n\t scrollPane = new JScrollPane(myTree);\n\t \n\t\n\n\t GridBagConstraints gbc_scrollPane = new GridBagConstraints();\n\t gbc_scrollPane.insets = new Insets(0, 0, 0, 5);\n\t gbc_scrollPane.fill = GridBagConstraints.BOTH;\n\t \n\t \n\t gbc_scrollPane.gridx = 1;\n\t gbc_scrollPane.gridy = 1;\n\t frame.getContentPane().add(scrollPane, gbc_scrollPane);\n\t \n\t JTabbedPane tabbedPane_1 = new JTabbedPane(JTabbedPane.TOP);\n\t GridBagConstraints gbc_tabbedPane_1 = new GridBagConstraints();\n\t gbc_tabbedPane_1.fill = GridBagConstraints.BOTH;\n\t gbc_tabbedPane_1.gridx = 2;\n\t gbc_tabbedPane_1.gridy = 1;\n\t frame.getContentPane().add(tabbedPane_1, gbc_tabbedPane_1);\n\t \n\t \n\t dtrpnPlistfile = new JEditorPane();\n\t dtrpnPlistfile.setText(\"PlistFile\");\n\t dtrpnPlistfile.setEditable(true);\n\t dtrpnPlistfile.setVisible(true);\n\t\n\t dtrpnPlistfile.setFont(new Font(\"Courier New\", Font.ITALIC, 10));\n\t \n\t tabbedPane_1.addTab(\"com.apple.<example>.plist\", null, dtrpnPlistfile, null);\n\t\n\t frame.setVisible(true);\n\t\t\n\t\t\n\t\t\n\t}",
"public DropMainMenu() {\n initComponents();\n }",
"public Libros() {\n initComponents();\n }",
"public LookUpPanel() {\n initComponents(); \n }",
"private void initialize(ArrayList<Object> data, JComboBox<String> list) {\n\t\t//initiates itself\n\t\tJDialog addingSups = new JDialog();\n\t\t\n\t\t//sets screen properties\n\t\taddingSups.setAlwaysOnTop (true);\n\t\taddingSups.setSize(400,450);\n\t\taddingSups.setLocationRelativeTo(null);\n\t\taddingSups.setVisible(true);\n\t\taddingSups.setModal(true);\n\t\taddingSups.setModalityType(ModalityType.DOCUMENT_MODAL);\n\t\taddingSups.setTitle(\"Add Supplier\");\n\t\taddingSups.getContentPane().setLayout(null);\n\n\t\t//gets database information\n\t\tsuppliers = (SupplierList) data.get(5);\n\t\tConnection connect = (Connection) data.get(0);\n\t\t\n\t\t//labels and TextFields related to Suppliers\n\t\tJLabel lblUsername = new JLabel(\"Supplier Name:*\");\n\t\tlblUsername.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tlblUsername.setBounds(11, 24, 149, 29);\n\t\taddingSups.add(lblUsername);\n\t\t\n\t\tJLabel lblPassword = new JLabel(\"Address:*\");\n\t\tlblPassword.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tlblPassword.setBounds(11, 62, 149, 29);\n\t\taddingSups.add(lblPassword);\n\t\t\n\t\tJLabel lblRetypePassword = new JLabel(\"City:*\");\n\t\tlblRetypePassword.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tlblRetypePassword.setBounds(11, 100, 149, 29);\n\t\taddingSups.add(lblRetypePassword);\n\t\t\n\t\tJLabel lblFirstName = new JLabel(\"State:*\");\n\t\tlblFirstName.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tlblFirstName.setBounds(11, 138, 149, 29);\n\t\taddingSups.add(lblFirstName);\n\t\t\n\t\tJLabel lblLastName = new JLabel(\"Zip Code:*\");\n\t\tlblLastName.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tlblLastName.setBounds(11, 176, 149, 29);\n\t\taddingSups.add(lblLastName);\n\t\t\n\t\tJLabel lblEmployeeRole = new JLabel(\"Email:\");\n\t\tlblEmployeeRole.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tlblEmployeeRole.setBounds(11, 214, 149, 29);\n\t\taddingSups.add(lblEmployeeRole);\n\t\t\n\t\tJLabel lblEmailAddress = new JLabel(\"Website:\");\n\t\tlblEmailAddress.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tlblEmailAddress.setBounds(11, 252, 149, 29);\n\t\taddingSups.add(lblEmailAddress);\n\t\t\n\t\tJLabel lblPhoneNumber = new JLabel(\"Phone number:\");\n\t\tlblPhoneNumber.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tlblPhoneNumber.setBounds(11, 290, 149, 29);\n\t\taddingSups.add(lblPhoneNumber);\n\t\t\n\t\tsupNameTextField = new JTextField();\n\t\tsupNameTextField.setBounds(158, 17, 191, 35);\n\t\taddingSups.add(supNameTextField);\n\t\tsupNameTextField.setColumns(10);\n\t\t\n\t\tsupAddressTextField = new JTextField();\n\t\tsupAddressTextField.setColumns(10);\n\t\tsupAddressTextField.setBounds(158, 55, 191, 35);\n\t\taddingSups.add(supAddressTextField);\n\t\t\n\t\tsupCityTextField = new JTextField();\n\t\tsupCityTextField.setColumns(10);\n\t\tsupCityTextField.setBounds(158, 93, 191, 35);\n\t\taddingSups.add(supCityTextField);\n\t\t\n\t\tsupStateTextField = new JTextField();\n\t\tsupStateTextField.setColumns(10);\n\t\tsupStateTextField.setBounds(158, 131, 191, 35);\n\t\taddingSups.add(supStateTextField);\n\t\t\n\t\tsupZipTextField = new JTextField();\n\t\tsupZipTextField.setColumns(10);\n\t\tsupZipTextField.setBounds(158, 169, 191, 35);\n\t\taddingSups.add(supZipTextField);\n\t\t\n\t\tsupEmailTextField = new JTextField();\n\t\tsupEmailTextField.setColumns(10);\n\t\tsupEmailTextField.setBounds(158, 207, 191, 35);\n\t\taddingSups.add(supEmailTextField);\n\t\t\n\t\tsupWebsiteTextField = new JTextField();\n\t\tsupWebsiteTextField.setColumns(10);\n\t\tsupWebsiteTextField.setBounds(158, 245, 191, 35);\n\t\taddingSups.add(supWebsiteTextField);\n\t\t\n\t\tsupPhoneTextField = new JTextField();\n\t\tsupPhoneTextField.setColumns(10);\n\t\tsupPhoneTextField.setBounds(158, 283, 191, 35);\n\t\taddingSups.add(supPhoneTextField);\n\t\t\n\t\t//add supplier button\n\t\tJButton btnAddSupplier = new JButton(\"Add Supplier\");\n\t\tbtnAddSupplier.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t//gets information from TextFields\n\t\t\t\tString supName = supNameTextField.getText().trim();\n\t\t\t\tString supAddress = supAddressTextField.getText().trim();\n\t\t\t\tString supCity = supCityTextField.getText().trim();\n\t\t\t\tString supState = supStateTextField.getText().trim();\n\t\t\t\tint supZip = Integer.parseInt(supZipTextField.getText().trim());\n\t\t\t\tString supEmail = supEmailTextField.getText().trim();\n\t\t\t\tString supWebsite = supWebsiteTextField.getText().trim();\n\t\t\t\tString supPhone = supPhoneTextField.getText().trim();\n\t\t\t\t\n\t\t\t\t//check for required information\n\t\t\t\tif(supName.equals(\"\") || supAddress.equals(\"\") || supCity.equals(\"\") || \n\t\t\t\t\t\tsupState.equals(\"\") || supZipTextField.getText().equals(\"\")){\n\t\t\t\t\tsetWarningMsg(\"Please enter information in the *required boxes.\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSupplier temp = new Supplier(supName, supAddress, supCity, supState,\n\t\t\t\t\t\tsupZip, supEmail, supWebsite, supPhone);\n\t\t\t\t\n\t\t\t\t\t//checks for administrator approval\n\t\t\t\t\tAdminVerificationScreen adminveri = new AdminVerificationScreen(data);\n\t\t\t\t\tif (adminveri.verify)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"New Supplier added\");\n\t\t\t\t\t\t//adds supplier to database\n\t\t\t\t\t\ttemp.setID(callAddSupplierProcedure(connect, temp));\n\t\t\t\t\t\t//adds supplier to program\n\t\t\t\t\t\tsuppliers.addSupplier(temp);\n\t\t\t\t\t\tadded = true;\n\t\t\t\t\t\tlist.removeAllItems();\n\t\t\t\t\t\t//adds new supplier to comboBox list and selects it \n\t\t\t\t\t\tfor(int x = 0; x< suppliers.size(); x++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlist.addItem(suppliers.getSupplier(x).getName());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlist.addItem(\"New Supplier\");\n\t\t\t\t\t\tlist.setSelectedIndex(suppliers.size()-1);\n\t\t\t\t\t\tlist.revalidate();\n\t\t\t\t\t\taddingSups.dispose();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tsetWarningMsg(\"Administrator not verified. No \"\n\t\t\t\t\t\t\t\t+ \"information was saved.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnAddSupplier.setBounds(99, 322, 155, 37);\n\t\taddingSups.add(btnAddSupplier);\n\t}",
"public ItemsControl() {\t\t\t\t\n\t\tlistListener = new SourceListChangeListener();\n\n\t\tBoxLayout boxLayout = new BoxLayout(this, BoxLayout.Y_AXIS);\n\t\tsetLayout(boxLayout);\t\t\t\t\n\t\tif (Beans.isDesignTime()) {\t\t\t\n\t\t\tJLabel designTimeCaptionLbl = new JLabel(\"<ItemsControl>\");\t\t\t\t\t\t\n\t\t\tthis.add(designTimeCaptionLbl);\n\t\t}\n\t}",
"public AddItem() {\n initComponents();\n }",
"public SKIN_SPECIALIST() {\n initComponents();\n }",
"public menuAddStasiun() {\n initComponents();\n }"
]
| [
"0.7058439",
"0.6684871",
"0.64766455",
"0.6304703",
"0.6272889",
"0.61133116",
"0.61047786",
"0.5980483",
"0.59359235",
"0.5891709",
"0.588788",
"0.5870893",
"0.5867824",
"0.585586",
"0.5850028",
"0.58214414",
"0.58180416",
"0.5815251",
"0.58123845",
"0.57844526",
"0.5783374",
"0.5782651",
"0.5778731",
"0.577648",
"0.5772707",
"0.57563484",
"0.5751606",
"0.57510185",
"0.5749045",
"0.5746334",
"0.57417804",
"0.572782",
"0.5726971",
"0.57230765",
"0.5720888",
"0.5709186",
"0.5698882",
"0.5695034",
"0.5693475",
"0.56918746",
"0.56877536",
"0.568662",
"0.5682738",
"0.56639576",
"0.56625605",
"0.5659514",
"0.56426305",
"0.5640419",
"0.56341904",
"0.5618559",
"0.56124705",
"0.55980563",
"0.5596337",
"0.5596118",
"0.55944747",
"0.5591555",
"0.55881697",
"0.5585447",
"0.5584298",
"0.5582577",
"0.55816895",
"0.55770427",
"0.55735636",
"0.55673933",
"0.55646294",
"0.5562351",
"0.5557839",
"0.55536675",
"0.5550546",
"0.55467063",
"0.5544902",
"0.55438536",
"0.55417264",
"0.55394644",
"0.5537597",
"0.55356133",
"0.5533904",
"0.5526866",
"0.5525854",
"0.5525044",
"0.5507889",
"0.55064833",
"0.550617",
"0.55036336",
"0.55031294",
"0.5502801",
"0.5502312",
"0.5500955",
"0.5500298",
"0.5497824",
"0.5493982",
"0.5491103",
"0.5485016",
"0.5484056",
"0.5481807",
"0.54816693",
"0.5479748",
"0.5465264",
"0.54580396",
"0.54579514"
]
| 0.67454743 | 1 |
We do not need to crawl this stuff, so we will use a handler | protected void addLocation(ULPanel ul, LocationResult locationResult, ClickHandler handler, boolean showCategories) {
if (MyWebApp.isDesktop()) {
ListItem li = new ListItem();
ComplexPanel vp = getLocationPanel(locationResult, handler, showCategories);
li.add(vp);
ul.add(li);
} else {
Image image = new Image(getSpotImage());
Location location = locationResult.getLocation();
//tags display
FlowPanel tagsPanel = new FlowPanel();
tagsPanel.setStyleName("tags");
//we do not want to show categories when we are showing spots that we are picking from
if (showCategories) {
if ((location.getFactualCategories() != null) && (location.getFactualCategories().length() > 0)) {
String[] cats = location.getFactualCategories().split(">");
for (String cat : cats) {
String trimCat = cat.trim();
TagHolder tagHolder = new TagHolder(trimCat);
InlineLabel inlineLabel = new InlineLabel(tagHolder.getName());
tagsPanel.add(inlineLabel);
}
}
}
LocationResultComposite locationResultComposite = new LocationResultComposite( image, tagsPanel);
locationResultComposite.addClickHandler(handler);
clickMapLocation.put(locationResultComposite, locationResult);
StringBuffer sb = new StringBuffer();
add(sb, "", location.getName());
add(sb, ", ", location.getAddress1());
add(sb, ", ", location.getCity());
add(sb, ", ", location.getState());
add(sb, " ", location.getZipcode());
locationResultComposite.setLocationDescription(sb.toString());
processDistance(locationResult,locationResultComposite);
ul.add(locationResultComposite);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract void runHandler();",
"public final void handle() {\n runHandler();\n }",
"protected Object getHandlerInternal(HttpServletRequest request) {\n String lookupPath = WebUtils.getLookupPathForRequest(request, this.alwaysUseFullPath);\n logger.debug(\"Looking up handler for: \" + lookupPath);\n return lookupHandler(lookupPath);\n }",
"public void handleMeta () {\n\tstatus = \"Handling meta page\";\n\tMetaHandlerHandler mhh = new MetaHandlerHandler ();\n\ttry {\n\t mhh.handleMeta (this, request, tlh.getProxy (), tlh.getClient ());\n\t} catch (IOException ex) {\n\t logAndClose (null);\n\t}\n }",
"protected Object lookupHandler(String urlPath, HttpServletRequest request) throws Exception\r\n\t{\n\t\tObject handler = super.lookupHandler(urlPath, request);\r\n\t\tif (handler == null)\r\n\t\t{ // 800, 如果uri直接查找不到,则匹配前面一个\r\n\t\t\tString path = urlPath.substring(0, urlPath.indexOf('/', 2));\r\n\t\t\thandler = super.lookupHandler(path, request);\r\n//\t\t\tSystem.out.println(\"path: \" + path + \":\" + handler);\r\n\t\t}\r\n\t\thandler = handler == null ? getRootHandler() : handler;\r\n//\t\tSystem.out.println(\"urlPath: \" + urlPath + \":\" + handler);\r\n\t\treturn handler;\r\n\t}",
"@Override\n\tpublic void handleResponse() {\n\t\t\n\t}",
"@Override\r\n\tpublic void crawl_data() {\n\t\t\r\n\t}",
"public CrawlHandler(){\n\t\tthis.idToItem=new HashMap<String,Item>();\n\t\tthis.parser=new ItemReviewsPageParser();\n\t}",
"@Override\n\tpublic void initiateHandling() {\n\t}",
"@Override\n\tpublic void initiateHandling() {\n\t}",
"@Override\n\tpublic void initiateHandling() {\n\t}",
"@Override\n public void handleRequest(HttpServerExchange exchange) throws Exception {\n if (exchange.isInIoThread()) {\n exchange.dispatch(this);\n return;\n }\n\n // We check if the engine was initially loaded or at least tried to be loaded\n if (currentEngine.get() == null) {\n Optional<ScriptRunner> optRunner = loadAndSetScriptRunner();\n if (Boolean.parseBoolean(refresh)) {\n optRunner.ifPresent(runner -> {\n reloadOnChange(runner.getFile());\n });\n }\n }\n\n Optional<ScriptRunner> runner = currentEngine.get();\n if (runner.isPresent()) {\n try {\n Invocable invocable = (Invocable) runner.get().getEngine();\n JSFilterData data = new JSFilterData(exchange, next, runner.get().getScriptLogger());\n invocable.invokeFunction(\"handleRequest\", data);\n } catch (ScriptException | NoSuchMethodException invocationException) {\n LOGGER.warning(\"undertow-jsfilters: failure calling method '\" + \"handleRequest\" + \"' in file => \" + this.fileName);\n LOGGER.throwing(fileName, \"handleRequest\", invocationException);\n next.handleRequest(exchange);\n return;\n }\n } else {\n next.handleRequest(exchange);\n return;\n }\n }",
"@Override\n\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tList<String> headers = readRequest(client);\n\t\t\t\t\t\t\tif (headers != null && headers.size() >= 1) {\n\t\t\t\t\t\t\t\tString requestURL = getRequestURL(headers.get(0));\n\t\t\t\t\t\t\t\tLog.d(TAG, requestURL);\n\n\t\t\t\t\t\t\t\tif (requestURL.startsWith(\"http://\")) {\n\n\t\t\t\t\t\t\t\t\t// HttpRequest request = new\n\t\t\t\t\t\t\t\t\t// BasicHttpRequest(\"GET\", requestURL);\n\n\t\t\t\t\t\t\t\t\tprocessHttpRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tprocessFileRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (IllegalStateException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"public void handler(AbstractRequest request) {\n\t\tSystem.out.println(\"===handle1\" + request.getContent());\n\t}",
"protected void handlerAdded0(ChannelHandlerContext ctx) throws Exception {}",
"public void handle() throws Exception {}",
"void handleRequest();",
"private void filterAndHandleRequest () {\n\t// Filter the request based on the header.\n\t// A response means that the request is blocked.\n\t// For ad blocking, bad header configuration (http/1.1 correctness) ... \n\tHttpHeaderFilterer filterer = proxy.getHttpHeaderFilterer ();\n\tHttpHeader badresponse = filterer.filterHttpIn (this, channel, request);\n\tif (badresponse != null) {\n\t statusCode = badresponse.getStatusCode ();\n\t sendAndClose (badresponse);\n\t} else {\n\t status = \"Handling request\";\n\t if (getMeta ())\n\t\thandleMeta ();\n\t else\n\t\thandleRequest ();\n\t}\n }",
"@Override\n\tprotected void dispatch(CometResponseHandler handler) {\n\t\t\n\t}",
"private void addHandlers()\n {\n handlers.add(new FileHTTPRequestHandler());\n }",
"public void run() {\n\t\t\tString html = \"\";\n\t\t\ttry {\n\t\t\t\thtml = HTTPFetcher.fetchHTML(this.url);\n\t\t\t} catch (UnknownHostException e) {\n\t\t\t\tSystem.out.println(\"Unknown host\");\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\tSystem.out.println(\"MalformedURL\");\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"IOException\");\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif(html != null) {\n\t\t\t\t\tthis.newLinks = LinkParser.listLinks(new URL(this.url), html);\n\t\t\t\t}\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\tSystem.out.println(\"MalformedURL\");\n\t\t\t}\n\t\t\tif(newLinks != null) {\n\t\t\t\tfor(URL theURL : newLinks) {\n\t\t\t\t\tif(!(urls.contains(theURL))) {\n\t\t\t\t\t\tsynchronized(urls) {\n\t\t\t\t\t\t\turls.add(theURL);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinnerCrawl(theURL, limit);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tInvertedIndex local = new InvertedIndex();\n\t\t\t\tString no_html = HTMLCleaner.stripHTML(html.toString());\n\t\t\t\tString[] the_words = WordParser.parseWords(no_html);\n\t\t\t\tlocal.addAll(the_words, this.url);\n\t\t\t\tindex.addAll(local);\n\t\t\t}\n\t\t}",
"IHandler next();",
"protected void additionalProcessing() {\n\t}",
"@Override\r\n\tpublic void handle(String target, HttpServletRequest request, HttpServletResponse response, boolean[] isHandled) {\n\t\t\r\n\t}",
"private void AddHandlersProcessing()\n {\n \n for(MessageHandler handler : actorData.MessageHandlers())\n {\n Location handlerProc_h = new Location(String.format(\"handlerProc_%s\", actorData.MessageHandlerName(handler)));\n handlerProc_h.AddFlow(new Flow(actorData.GetUrgentFlow()));\n handlerProc_h.AddInvarient(actorData.GetUrgentInvarient());\n comp.AddTransition(new HybridTransitionBuilder().\n SetOrigin(idleLoc).\n SetDestination(handlerProc_h).\n SetSynclabel(actorData.ExecuteLabelFor(handler)).\n // AddAssignment(actorData.SetBusyAssignment()).\n Build());\n \n CreateHandler(handler, comp, handlerProc_h);\n }\n }",
"@Override\n protected Handler createHandler(Looper looper) {\n return new CatchingWorkerHandler(looper);\n }",
"private void callHandlerAddedForAllHandlers() {\n /*\n r2 = this;\n monitor-enter(r2)\n r0 = 1\n r2.registered = r0 // Catch:{ all -> 0x0015 }\n io.netty.channel.DefaultChannelPipeline$PendingHandlerCallback r0 = r2.pendingHandlerCallbackHead // Catch:{ all -> 0x0015 }\n r1 = 0\n r2.pendingHandlerCallbackHead = r1 // Catch:{ all -> 0x0015 }\n monitor-exit(r2) // Catch:{ all -> 0x0015 }\n L_0x000a:\n if (r0 == 0) goto L_0x0012\n r0.execute()\n io.netty.channel.DefaultChannelPipeline$PendingHandlerCallback r0 = r0.next\n goto L_0x000a\n L_0x0012:\n return\n L_0x0013:\n monitor-exit(r2) // Catch:{ all -> 0x0015 }\n throw r0\n L_0x0015:\n r0 = move-exception\n goto L_0x0013\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p043io.netty.channel.DefaultChannelPipeline.callHandlerAddedForAllHandlers():void\");\n }",
"public void handleRequest () {\n\t// TODO: move this method to separate thread, \n\t// TODO: it may block in many places.\n\tRequestHandler rh = new RequestHandler ();\t\n\tCache<HttpHeader, HttpHeader> cache = proxy.getCache ();\n\tString method = request.getMethod ();\n\tif (!method.equals (\"GET\") && !method.equals (\"HEAD\"))\n\t cache.remove (request);\n\t\t\n\trh.entry = cache.getEntry (request);\n\tif (rh.entry != null)\n\t rh.dataHook = rh.entry.getDataHook (proxy.getCache ());\n\n\tcheckNoStore (rh.entry);\n\tif (!rh.cond.checkMaxStale (request, rh) && checkMaxAge (rh))\n\t setMayUseCache (false);\n\t\n\trh.conditional = rh.cond.checkConditional (this, request, rh);\n\tif (partialContent (rh)) \n\t fillupContent (rh);\n\tcheckIfRange (rh);\n\n\tboolean mc = getMayCache ();\n\tif (getMayUseCache ()) {\n\t // in cache?\n\t if (rh.entry != null) {\n\t\tCacheChecker cc = new CacheChecker ();\n\t\tif (cc.checkCachedEntry (this, request, rh)) {\n\t\t return;\n\t\t}\n\t }\n\t}\n\t\n\tif (rh.content == null) {\n\t // Ok cache did not have a usable resource, \n\t // so get the resource from the net.\n\t // reset value to one before we thought we could use cache...\n\t mayCache = mc;\n\t SWC swc = new SWC (this, proxy.getOffset (), request, requestBuffer,\n\t\t\t tlh, clientResourceHandler, rh);\n\t swc.establish ();\n\t} else {\n\t resourceEstablished (rh);\n\t}\n }",
"CreateHandler()\n {\n }",
"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 }",
"@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 }",
"@Override\n\tpublic void processResponse(Response response)\n\t{\n\t\t\n\t}",
"public abstract void handle(Request request, Response response) throws Exception;",
"private void execute(IRequestHandler handler)\n\t{\n\t\tArgs.notNull(handler, \"handler\");\n\n\t\ttry\n\t\t{\n\t\t\tlisteners.onRequestHandlerResolved(this, handler);\n\t\t\trequestHandlerExecutor.execute(handler);\n\t\t\tlisteners.onRequestHandlerExecuted(this, handler);\n\t\t}\n\t\tcatch (RuntimeException e)\n\t\t{\n\t\t\tIRequestHandler replacement = requestHandlerExecutor.resolveHandler(e);\n\t\t\tif (replacement != null)\n\t\t\t{\n\t\t\t\texecute(replacement);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t}\n\t}",
"@Override\r\n\tprotected void processRespond() {\n\r\n\t}",
"@Override\r\n\tprotected void processRespond() {\n\r\n\t}",
"EzyDecodeHandler nextHandler();",
"public Handler getHandler();",
"@Override\n\tpublic void handle(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t}",
"public void handleRequest(Request req) {\n\n }",
"public void run()\n\t\t{\n\t\t\tint num = 0;\n\t\t\ttry{\n\t\t\t\tlog.debug(\"Dealing with: \" + url.toString() + \" From : \" + urlp);\n\t\t\t\t\n\t\t\t\tSocket socket = new Socket(url.getHost(), PORT);\n\t\t\t\tPrintWriter writer = new PrintWriter(socket.getOutputStream());\n\t\t\t\tBufferedReader reader = \n\t\t\t\t\tnew BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\t\t\tString request = \"GET \" + url.getPath() + \" HTTP/1.1\\n\" +\n\t\t\t\t\t\t\t\t\"Host: \" + url.getHost() + \"\\n\" +\n\t\t\t\t\t\t\t\t\"Connection: close\\n\" + \n\t\t\t\t\t\t\t\t\"\\r\\n\";\n\t\t\t\twriter.println(request);\n\t\t\t\twriter.flush();\n\t\t\n\t\t\t\tString line = reader.readLine();\n\t\t\t\t// filter the head message of the response\n\t\t\t\twhile(line != null && line.length() != 0)\n\t\t\t\t{\n\t\t\t\t\tline = reader.readLine();\n\t\t\t\t}\n\t\t\t\t// keep the html context\n\t\t\t\twhile (line != null) \n\t\t\t\t{\n\t\t\t\t\tcontext += line + \"\\n\";\n\t\t\t\t\tline = reader.readLine();\n\t\t\t\t}\n\t\t\t\treader.close();\n\t\t\t\twriter.close();\n\t\t\t\tsocket.close();\n\t\t\t\t//log.debug(context);\n\t\t\t\tstripper = new TagStripper(context);\n\t\t\t\tlog.debug(\"Removing script and style from: \" + url.toString());\n\t\t\t\tstripper.removeComments();\n\t\t\t\tstripper.removeScript();\n\t\t\t\tstripper.removeStyle();\n\t\t\t\tlog.debug(\"Getting links from: \" + url.toString());\n\t\t\t\tArrayList<String> link = new ArrayList<String>();\n\t\t\t\tstripper.buildLinks(url.toString());\n\t\t\t\t\n\t\t\t\tlink = stripper.getLinks();\n\t\t\t\tfor(String tmp : link) {\n\t\t\t\t\tif(getCount() < pageNum ) {\n\t\t\t\t\t\t// find if the link has been already visited\n\t\t\t\t\t\tif(!urlList.contains(tmp)) {\n\t\t\t\t\t\t\tworkers.execute(new SingleHTMLFetcher(new URL(tmp), this.url.toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString title = stripper.getTitle();\n\t\t\t\tif(title == null)\n\t\t\t\t\ttitle = \"NO title\";\n\t\t\t\ttitle = title.replaceAll(\"&[^;]*;\", \"\");\n\t\t\t\tlog.debug(\"Removing tags from: \" + url.toString());\n\t\t\t\tstripper.removeTags();\n\t\t\t\tstripper.removeSymbol();\n\t\t\t\tString snippet = stripper.getSnippet(title);\n\t\t\t\tdb.savePageInfo(connection, title, snippet, url.toString());\n\t\t\t\tcontext = stripper.getContext();\n\t\t\t\tString[] words = context.toLowerCase().split(\"\\\\s\");\n\t\t\t\tArrayList<String> wordsList = new ArrayList<String>();\n\t\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\t\t// delete non-word character\n\t\t\t\t\twords[i] = words[i].replaceAll(\"\\\\W\", \"\").replace(\"_\",\n\t\t\t\t\t\t\t\"\");\n\t\t\t\t\tif(words[i].length() != 0)\n\t\t\t\t\t\twordsList.add(words[i]);\n\t\t\t\t}\n\t\t\t\tfor (String w : wordsList) {\n\t\t\t\t\tif (w.length() != 0) {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tindex.addNum(w, url.toString(), num);\n\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\tnum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlog.debug(\"URL: \" + url.toString() + \" is finished!\");\n\t\t\t\tdecrementPending();\n\t\t\t}catch(Exception ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}",
"public void run() {\n try {\n handler.process( client, map );\n }\n catch ( java.io.IOException ioe ) {\n System.err.println( ioe );\n }\n }",
"private void _createContentHandler(final String uri, final String localName, \n final String qName, final Attributes attrs) throws SAXException {\n IXTMContentHandler contentHandler = null;\n if (uri == XTM2ContentHandler.NS_XTM) {\n contentHandler = new XTM2ContentHandler();\n }\n else if (uri == XTM10ContentHandler.NS_XTM) {\n contentHandler = new XTM10ContentHandler();\n }\n else if (localName == XTM10ContentHandler.TOPIC_MAP) {\n final String version = attrs.getValue(\"\", \"version\");\n contentHandler = version != null ? new XTM2ContentHandler()\n : new XTM10ContentHandler();\n }\n else {\n contentHandler = new XTM10ContentHandler();\n }\n // Provide the missing info\n contentHandler.setMapHandler(_mapHandler);\n contentHandler.setIRIContext(_context);\n contentHandler.setDocumentIRI(_docIRI);\n contentHandler.setSubordianate(_isSubordinate);\n for (String key: _properties.keySet()) {\n contentHandler.setProperty(key, _properties.get(key));\n }\n final boolean validate = !Boolean.FALSE.equals(_properties.get(Property.VALIDATE));\n _contentHandler = validate ? RelaxNGValidatingContentHandler.create(contentHandler, contentHandler.getRelaxURL()) \n : contentHandler;\n // Provide the missing events\n _contentHandler.startDocument();\n for (String key: _prefixes.keySet()) {\n _contentHandler.startPrefixMapping(key, _prefixes.get(key));\n }\n }",
"private Element handler_servlet(Element element, boolean handler) {\n String name = getTextChild(element, \"name\").trim();\n QUERY_TYPE evalType = ZebraStatic.USER_KNOWLEDGE_EVAL_TYPE;\n String link = getTextChild(element, \"linkdescription\").trim();\n Element a = doc.createElement(\"a\");\n\n String href = \"\";\n //Added by Loc Nguyen 2009.12\n if(name.equals(\"KnowledgeConfig\") && \n \t(evalType == QUERY_TYPE.OVERLAY_BAYESIAN || evalType ==QUERY_TYPE.DYN_OVERLAY_BAYESIAN) &&\n \tWOWStatic.VM().isViewTypeExisting(\"ZebraTOCView\")) {\n \ttry {\n\t\t \thref = WOWStatic.config.Get(\"CONTEXTPATH\") + \"/Get?wndName=ZebraTOC\";\n\t\t \tString userid = profile.getAttributeValue(\"personal\", \"id\");\n\t\t \tString course = profile.getAttributeValue(\"personal\", \"course\");\n\t\t \ta.setAttribute(\"target\", userid + \"$\" + course + \"$\" + \"ZebraTOC\");\n \t}\n \tcatch(Exception e) {\n \t\te.printStackTrace();\n \t}\n }\n else {\n href = (handler?WOWStatic.config.Get(\"CONTEXTPATH\")+\"/ViewGet/\"+getCourse()+\"/?handler=\"+name:WOWStatic.config.Get(\"CONTEXTPATH\")+\"/\"+name);\n }\n \n a.setAttribute(\"href\", href);\n Text text = doc.createTextNode(link);\n a.appendChild(text);\n return (Element)replaceNode(element, a);\n }",
"@Override\r\n\tprotected void processTarget() {\n\r\n\t}",
"@Override\r\n\tprotected void processTarget() {\n\r\n\t}",
"public static void main(String[] args) \n\t{\n\t\t\t\tHandler h1 = new Handler1();\n\t\t\t\tHandler h2 = new Handler2();\n\t\t\t\tHandler h3 = new Handler3();\n\t\t\t\th1.setNextHandler(h3);\n\t\t\t\th3.setNextHandler(h2);\n\t\t\t\th2.setNextHandler(null);\n\n\t\t\t\th1.handleRequest(new Request(\"Value \", 4));\n\t\t\t\th1.handleRequest(new Request(\"Value \", -5));\n\t\t\t\th1.handleRequest(new Request(\"Value \", 45));\n\n\t}",
"private void processRequest(HttpServletRequest request, HttpServletResponse response) {\n }",
"void startCrawler() throws ParserConfigurationException, SAXException, IOException;",
"public Object run() {\n for (Handler h : logger.getHandlers()) {\n logger.removeHandler(h);\n }\n\n logger.setUseParentHandlers(false);\n for (Handler handler : handlers) {\n logger.addHandler(handler); \n }\n\n Level logLevel = getConfiguredLogLevel(logger.getName());\n if( logLevel != null ) {\n logger.setLevel( logLevel );\n }\n postInitializeLogger( logger );\n return null;\n }",
"@Override\n\tpublic void dispatchHandler(Message msg) {\n\t\t\n\t}",
"private void processRequest(String targetID, HttpServerRequest req) throws Exception {\n\t\tString result = retrieveDetails(targetID);\n\t\tif(result != null)\n\t\t\treq.response().end(result);\t\n\t\telse\n\t\t\treq.response().end(\"No resopnse received\");\n\t}",
"@Override\n protected void doGet\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n \n }",
"@Override\r\n\tpublic void run() {\n\t\tNoEmployeeHandler endHandler = new NoEmployeeHandler();\r\n\t\tDirectorHandler dirhandler = new DirectorHandler(endHandler);\r\n\t\tSupervisorHandler supHandler = new SupervisorHandler(dirhandler);\r\n\t\tOperatorHandler opHandler = new OperatorHandler(supHandler);\r\n\t\t\r\n\t\tboolean findEmployee = true;\r\n\t\tfor (EmployeeType type : EmployeeType.values()) {\r\n\t\t\ttry {\r\n\t\t\t\tfindEmployee = opHandler.handleCall(call, type);\r\n\t\t\t} catch (InterruptedException 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\tif (findEmployee) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"private void callHandler(String method, HttpServletRequest request, HttpServletResponse response) throws IOException {\n JsonElement payload = getPayload(request, response);\n RequestContext context = new RequestContext(\n request, response, urlVariables, request.getParameterMap(), payload);\n PathNode apiStructure = getApiStructure(method);\n\n if (request.getPathInfo() == null) {\n logger.warn(\"Received \" + method + \" request with empty path.\");\n return;\n }\n\n PathNode.PathNodeResult result = apiStructure.getBindingForSubPath(request.getPathInfo());\n if (result != null) {\n urlVariables.putAll(result.getArgValues());\n result.getApiSpec().apiInterface.call(context);\n }\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }",
"static String getHandler(HttpServletRequest request) {\n String requestURI = request.getRequestURI();\n return requestURI.substring(getDividingIndex(requestURI) + 1);\n }",
"@Override\n public void onPourSoupRaised() {\n }",
"public void handleGet( HttpExchange exchange ) throws IOException {\n switch( exchange.getRequestURI().toString().replace(\"%20\", \" \") ) {\n case \"/\":\n print(\"sending /MainPage.html\");\n sendResponse( exchange, FU.readFromFile( getReqDir( exchange )), 200);\n break;\n case \"/lif\":\n // send log in page ( main page )\n sendResponse ( exchange, FU.readFromFile(getReqDir(exchange)), 200);\n //\n break;\n case \"/home.html\":\n\n break;\n case \"/book.html\":\n\n break;\n default:\n //checks if user is logged in\n\n //if not send log in page\n //if user is logged in then\n print(\"Sending\");\n String directory = getReqDir( exchange ); // dont need to do the / replace as no space\n File page = new File( getReqDir( exchange) );\n\n // IMPLEMENT DIFFERENT RESPONSE CODE FOR HERE IF EXISTS IS FALSE OR CAN READ IS FALSE\n sendResponse(exchange, FU.readFromFile(directory), 200);\n break;\n }\n }",
"private Handler getHandler(Request request) {\n return resolver.get(request.getClass().getCanonicalName()).create();\n }",
"protected void handleMessage(Message msg) {}",
"@Override\r\n\tpublic void run()\r\n\t{\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\t//System.out.println(\"beginning of Parser code\");\r\n\t\t\t\r\n\t\t\t//pull a page from the page que\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tpageText = SharedPage.getNextPage();\r\n\t\t\t\t//System.out.println(\"Parser Page Pulled\");\r\n\t\t\t} \r\n\t\t\tcatch (InterruptedException e) \r\n\t\t\t{\r\n\t\t\t\t//do nothing\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//search the page for all links in anchor (<a href=\"\") elements\r\n\t\t\t\r\n\t\t\t//Regex\r\n\t\t\t//loop will execute for each link found\r\n\t\t\tPattern pattern = Pattern.compile(\"href=\\\"(http:.*?)\\\"\");\r\n\t\t\tMatcher matcher = null;\r\n\t\t\t\r\n\t\t\t//Some pages are returning null values\r\n\t\t\tif(pageText != null)\r\n\t\t\t{\r\n\t\t\t\tmatcher = pattern.matcher(pageText);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//add each link found to the link queue\r\n\t\t\t\r\n\t\t\t//sometimes matcher is returning null values\r\n\t\t\twhile(matcher != null && matcher.find())\r\n\t\t\t{\r\n\t\t\t\tString link = matcher.group(1);\r\n\t\t\t\r\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\t\tSharedLink.addLink(link);\r\n\t\t\t\t} \r\n\t\t\t\tcatch (InterruptedException e) \r\n\t\t\t\t{\r\n\t\t\t\t\t//do nothing\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//search the page for keywords specified by the user of the webcrawler\r\n\t\t\tArrayList<String> keywords = WebCrawlerConsole.getKeywords();\r\n\t\t\t\r\n\t\t\t\tfor(String word : keywords)\r\n\t\t\t\t{\r\n\t\t\t\t\t//cannot split pageText if it is null\r\n\t\t\t\t\tif(pageText != null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString[] keywordSearch = pageText.split(word);\r\n\t\t\t\t\t\tfor(int i=0; i < keywordSearch.length; i++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tWebCrawlerConsole.keywordHit();\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\t//System.out.println(\"end of Parser code\");\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void afterConcurrentHandlingStarted(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {\n\t\tsuper.afterConcurrentHandlingStarted(request, response, handler);\n\t}",
"@Override\n\tpublic void run() {\n\t\ttry{\n\t\t\tboolean redirected=false;\n\t\t\tint responseCode=0;\n\t\t\tint tries=0;\n\t\t\tString location=site.getUrl();\n\t\t\tHttpURLConnection urlConnection=null;\n\t\t\tdo{\n\t\t\t\tURL url = new URL(location);\n\t\t\t\turlConnection = (HttpURLConnection) url.openConnection();\n\t\t\t\turlConnection.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11\");\n\t\t\t\turlConnection.setConnectTimeout(Constants.CONNECTION_TIMEOUT);\n\t\t\t\turlConnection.setReadTimeout(Constants.READ_TIMEOUT);\n\t\t\t\turlConnection.setRequestMethod(\"GET\");\n\t\t\t\turlConnection.setInstanceFollowRedirects(true);\n\t\t\t\turlConnection.setUseCaches(false);\n\t\t\t\turlConnection.setAllowUserInteraction(false);\n\t\t\t\turlConnection.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\t\tresponseCode = urlConnection.getResponseCode();\n\t\t\t\t\n\t\t\t\tif(responseCode==HttpURLConnection.HTTP_MOVED_TEMP || responseCode==HttpURLConnection.HTTP_MOVED_PERM){ //handle 302 and 301 redirect. \n\t\t\t\t\tredirected=true;\n\t\t\t\t\tlocation = urlConnection.getHeaderField(\"Location\");\n\t\t\t\t\ttries++;\n\t\t\t\t}else\n\t\t\t\t\tredirected=false;\n\t\t\t}while(redirected && tries<3);\n\t\t\t\n\t\t\tif (responseCode == HttpURLConnection.HTTP_OK){\n\t\t\t\ttry (InputStream is = urlConnection.getInputStream();\n\t\t BufferedReader br = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8))) {\n\t\t String content = br.lines().collect(Collectors.joining(System.lineSeparator()));\n\t \tthis.callback.webContentCallBack(site, content);\n\t\t } \n\t\t\t}else this.callback.webContentCallBack(site, null); //any other case, null is returned as the content. \n\t\t}catch (Exception e) {\n\t\t\tLogger.getLogger(Fetcher.class.getName()).log(Level.WARNING, \"Site:\"+site.getUrl()+\" failed fetching.\", e);\n\t\t\ttry {\n\t\t\t\tthis.callback.webContentCallBack(site, null); //any exception, null is returned as the content. \n\t\t\t} catch (Exception e1) {\n\t\t\t} \n\t\t}\n\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"private static void responseHandler(StringBuilder sb)\n\t{\n\t\tString s = sb.toString();\t\t\n\t\tString[] lines = s.split(\"\\n\");\t\t\n\t\tString firstLine = \"\";\n\t\t\n\t\t// Only search through the first five lines. If it isn't \n\t\t// in the first five lines it probably isn't there.\n\t\tfor(int i = 0; i < 5; i++)\n\t\t{\n\t\t\tif(lines[i].contains(\"HTTP/1\"))\n\t\t\t{\n\t\t\t\tfirstLine = lines[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Error and quit if it is still empty.\n\t\tif(firstLine.equals(\"\"))\n\t\t{\n\t\t\terrorQuit(\"Whoops something went wrong.\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(firstLine.contains(\"200\"))\n\t\t\t{\n\t\t\t\tSystem.out.print(s);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(firstLine);\n\t\t\t}\n\t\t}\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }",
"@Override\n\tpublic void process(Page page) {\n\t\t\n\t}",
"public static void Execute ()\n\t{\n\t\tReceiveCollection (SpawnCrawler (target));\n\t\t\n\t\tList<String> initialCollection = overCollection;\n\t\t\n\t\tif ( ! initialCollection.isEmpty ())\n\t\t{\n\t\t\n\t\t\tfor (String collected : initialCollection)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif (collected.contains (\"http\"))\n\t\t\t\t\tReceiveCollection (SpawnCrawler (collected));\n\t\t\t\telse\n\t\t\t\t\tReceiveCollection (SpawnCrawler (target + collected));\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t/*\n\t\t * Several loops should commence here where the system reiteratively goes over all the newly acquired URLs\n\t\t * so it may extend itself beyond the first and second depth.\n\t\t * However this process should be halted once it reaches a certain configurable depth.\n\t\t */\n\t\tint depth = 0;\n\t\tint newFoundings = 0;\n\t\t\n\t\tdepthLoop: while (depth <= MAX_DEPTH)\n\t\t{\n\t\t\t\n\t\t\tfor (String collected : overCollection)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif (collected.contains (\"http\"))\n\t\t\t\t\tSpawnCrawler (collected);\n\t\t\t\telse\n\t\t\t\t\tSpawnCrawler (target + collected);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (newFoundings <= 0)\n\t\t\t\tbreak depthLoop;\n\t\t\t\n\t\t\tdepth++;\n\t\t\t\t\t\t\n\t\t}\n\t\t\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@Override\r\n\tpublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)\r\n\t\t\tthrows Exception {\n\t\tString aaa= request.getRequestURI();\r\n\t\tSystem.out.println(\"拦截器准备数据中----\");\r\n\t\tSystem.out.println(\"请求地址---\"+aaa+\";上下文---\"+request.getContextPath());\r\n\t\t\r\n\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"Map<String, Handler> handlers();",
"@Override\r\n\t\t\tpublic void onRequest() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\tpublic void visit(Page page) {\r\n\t\t// Some business logic I won't expose here\r\n\t\t// My boss won't be happy ;-)\r\n\t}",
"@Override\n public void run() {\n handler.post(Update);\n }",
"protected void processRequest(Message request)\n\t{\n\t\ttry\n\t\t{\n\t\t\tmessageHandlers.process(request);\n\t\t} catch (CommunicationException e)\n\t\t{\n\t\t\tSystem.out.println(\"No handler for \" + request.getClass() + \": \" + request + \" which was received from \"\n\t\t\t\t\t+ socket.getInetAddress().getHostName() + \" at \" + socket.getInetAddress().getHostAddress());\n\t\t}\n\t}",
"private void processRequest(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) {\n\r\n\t}",
"private void handleServers() throws XMLStreamException {\n printf(\"FOUND SERVERS\");\n\n while (skipToStartButNotPast(SERVER, SERVERS)) {\n handleServer();\n }\n }",
"@Override\r\n\tprotected void processRespond() throws SGSException {\n\r\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@Override\n\tpublic void OnRequest() {\n\t\t\n\t}",
"public int handle(Request req, int handlerCode) throws IOException{\n if (fileCache == null) return Interceptor.CONTINUE;\n \n if (handlerCode == Interceptor.RESPONSE_PROCEEDED && fileCache.isEnabled()){\n String docroot = SelectorThread.getWebAppRootPath();\n MessageBytes mb = req.requestURI();\n String uri = req.requestURI().toString(); \n fileCache.add(FileCache.DEFAULT_SERVLET_NAME,docroot,uri,\n req.getResponse().getMimeHeaders(),false); \n } else if (handlerCode == Interceptor.REQUEST_LINE_PARSED) {\n ByteChunk requestURI = req.requestURI().getByteChunk(); \n if (fileCache.sendCache(requestURI.getBytes(), requestURI.getStart(),\n requestURI.getLength(), channel,\n keepAlive(req))){\n return Interceptor.BREAK; \n }\n } \n return Interceptor.CONTINUE;\n }",
"protected FedoraContentModelHandler() {\r\n }",
"public void run() {\n try {\n handle();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"public void handle(HttpExchange exch) {\n\n }",
"public void handleRequest(ExtractionRequest request);",
"@Override\n protected void doGet\n (HttpServletRequest request, HttpServletResponse response\n )\n throws ServletException\n , IOException {\n processRequest(request, response);\n }",
"@Override\n\t\t\t\t\tpublic void handle(File file)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }",
"@Override\n\tpublic void handle(String target, HttpServletRequest request,\n\t\t\tHttpServletResponse response, boolean[] isHandled) {\n\t\trequest.setAttribute(\"CONTEXT_PATH\", request.getContextPath()); //添加项目根路径配置\n\n\t\tnextHandler.handle(target, request, response, isHandled);\n\t}",
"@Override\n\tpublic void postHandle(WebRequest request, ModelMap model) throws Exception {\n\n\t}",
"@Override\n public ClientResponse handle(ClientRequest cr) throws ClientHandlerException {\n\n cr.getHeaders().add(HttpHeaders.USER_AGENT, \"<<diskong-user-agent>>\");\n return getNext().handle(cr);\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tprocess(req, resp);\n\t}",
"protected void run() {\r\n\t\t//\r\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"private void addDefaultHandlers (AccTreeNode aNode, XAccessibleContext xContext)\n {\n if (false)\n {\n // Slow but complete version: try each handler type separately.\n aNode.addHandler (maContextHandler.createHandler (xContext));\n aNode.addHandler (maTextHandler.createHandler (xContext));\n aNode.addHandler (maEditableTextHandler.createHandler (xContext));\n aNode.addHandler (maComponentHandler.createHandler (xContext));\n aNode.addHandler (maExtendedComponentHandler.createHandler (xContext));\n aNode.addHandler (maActionHandler.createHandler (xContext));\n aNode.addHandler (maImageHandler.createHandler (xContext));\n aNode.addHandler (maTableHandler.createHandler (xContext));\n aNode.addHandler (maCellHandler.createHandler (xContext));\n aNode.addHandler (maHypertextHandler.createHandler (xContext));\n aNode.addHandler (maHyperlinkHandler.createHandler (xContext));\n aNode.addHandler (maSelectionHandler.createHandler (xContext));\n aNode.addHandler (maRelationHandler.createHandler (xContext));\n aNode.addHandler (maUNOHandler.createHandler (xContext));\n aNode.addHandler (maTreeHandler.createHandler (xContext));\n }\n else\n {\n // Exploit dependencies between interfaces.\n NodeHandler aHandler;\n aNode.addHandler (maContextHandler.createHandler (xContext));\n\n aHandler = maTextHandler.createHandler (xContext);\n if (aHandler != null)\n {\n aNode.addHandler (aHandler);\n aNode.addHandler (maEditableTextHandler.createHandler (xContext));\n aNode.addHandler (maHypertextHandler.createHandler (xContext));\n aNode.addHandler (maHyperlinkHandler.createHandler (xContext));\n }\n aHandler = maComponentHandler.createHandler (xContext);\n if (aHandler != null)\n {\n aNode.addHandler (aHandler);\n aNode.addHandler (maExtendedComponentHandler.createHandler (xContext));\n }\n aNode.addHandler (maActionHandler.createHandler (xContext));\n aNode.addHandler (maImageHandler.createHandler (xContext));\n aNode.addHandler (maTableHandler.createHandler (xContext));\n aNode.addHandler (maRelationHandler.createHandler (xContext));\n aNode.addHandler (maCellHandler.createHandler (xContext));\n aNode.addHandler (maSelectionHandler.createHandler (xContext));\n aNode.addHandler (maUNOHandler.createHandler (xContext));\n aNode.addHandler (maTreeHandler.createHandler (xContext));\n }\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }"
]
| [
"0.6432391",
"0.62134033",
"0.60694253",
"0.5999949",
"0.5943992",
"0.5917242",
"0.591689",
"0.59059584",
"0.58523273",
"0.58523273",
"0.58523273",
"0.583718",
"0.5821344",
"0.5795618",
"0.57829714",
"0.5762664",
"0.57523495",
"0.5741403",
"0.5737637",
"0.5727567",
"0.5618483",
"0.56099737",
"0.5599282",
"0.5596217",
"0.55879897",
"0.5579766",
"0.5568947",
"0.55659705",
"0.55634904",
"0.55630493",
"0.5554553",
"0.55516547",
"0.5550843",
"0.5548539",
"0.5524735",
"0.5524735",
"0.5520628",
"0.54987174",
"0.5493209",
"0.54855675",
"0.5479765",
"0.5471991",
"0.5468468",
"0.54601127",
"0.54595864",
"0.54595864",
"0.5458988",
"0.54514664",
"0.5439194",
"0.5428315",
"0.54280263",
"0.542629",
"0.54241115",
"0.53894734",
"0.5387386",
"0.5386899",
"0.5378109",
"0.5375335",
"0.5372094",
"0.53671557",
"0.53633",
"0.5362762",
"0.5362648",
"0.53625154",
"0.53540546",
"0.5351635",
"0.53509563",
"0.5346955",
"0.5338493",
"0.5337765",
"0.53350544",
"0.5334761",
"0.53316194",
"0.5331169",
"0.53284705",
"0.5324634",
"0.5320292",
"0.5313603",
"0.531254",
"0.5308579",
"0.5300553",
"0.5297707",
"0.52920413",
"0.5274805",
"0.52743554",
"0.5269982",
"0.5266095",
"0.52638227",
"0.5261267",
"0.5261261",
"0.5261261",
"0.52592134",
"0.52584624",
"0.52492446",
"0.52428436",
"0.52420074",
"0.52406436",
"0.5239984",
"0.52376246",
"0.52341914",
"0.52341086"
]
| 0.0 | -1 |
GWT.log("expandLocation reply=" + reply); | public MarkData expandLocation(ExpandData expandData) {
Long userId = null;
Image userImage = null;
String userPath = null;
if (mywebapp.getAuthenticatedUser() != null) {
ImageScaleHolder imageScaleHolder = getImageScaleHolder(mywebapp.getAuthenticatedUser().getContentHolder(), "57x57");
if (imageScaleHolder != null) {
userPath = imageScaleHolder.getWebServerAssetHolder().getUrl();
}
}
if (userPath == null) {
userImage = new Image(ANON_IMAGE_PATH);
} else {
String fullUrl = mywebapp.getUrl(userPath);
userImage = new Image(fullUrl);
}
userImage.setStyleName("com-ava");
if (userId != null) {
String userHistoryToken = MyWebApp.VIEW_USER_PROFILE + userId;
// String userHistoryToken2 = "#" + userHistoryToken;
}
TextArea saySomethingTextArea = new TextArea();
MarkData markData = new MarkData();
markData.expandData = expandData;
markData.saySomethingTextArea = saySomethingTextArea;
initAutoGroup(saySomethingTextArea, markData);
Button leaveMarkButton = new Button("Leave Mark");
leaveMarkButton.addClickHandler(saveHandler2);
widgetMarkDataMap.put(leaveMarkButton, markData);
Button showAdvancedButton = new Button(SHOW_ADVANCED);
showAdvancedMap.put(showAdvancedButton, markData);
showAdvancedButton.addClickHandler(showAdvancedWriteHerePanelHandler);
Button shareOnFacebookButton = getFacebookButton(markData);
ULPanel latestMarksPanel = getLatestMarksPanel(expandData);
ResultComponent resultComponent = new ResultComponent(saySomethingTextArea, leaveMarkButton, userImage, latestMarksPanel, showAdvancedButton, shareOnFacebookButton);
FormPanel myFormPanel = new FormPanel();
myFormPanel.setWidget(resultComponent);
setupRootPanelForm(myFormPanel, markData);
expandData.resultPanel.add(myFormPanel);
return markData;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public ExtensionResult doSendLocation(ExtensionRequest extensionRequest) {\n Map<String, String> output = new HashMap<>();\n QuickReplyBuilder quickReplyBuilder = new QuickReplyBuilder.Builder(\"\")\n .add(\"location\", \"location\").build();\n output.put(OUTPUT, quickReplyBuilder.string());\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n extensionResult.setValue(output);\n return extensionResult;\n }",
"private void getLocation() {\n\n }",
"@Override\n public String getLocation() {\n return location;\n }",
"public void getLocation(){\n }",
"private static native String getLocation(Element elem)\n /*-{\n return elem.getAttribute(\"location\");\n }-*/;",
"public String getLocation(){\n return this.location;\n }",
"public String getLocation(){\n return location;\n }",
"@Override\n\tpublic void showPostLocation() {\n\t\t\n\t}",
"public String getLocation() { return location; }",
"public String getLocation() { return location; }",
"java.lang.String getLocation();",
"public String getLocation(){\r\n return location;\r\n }",
"@Override\n\tpublic String getLocation() {\n\t\treturn location;\n\t}",
"public abstract String getLocation();",
"String getLocation(boolean detail);",
"public String getLocation(){\r\n return Location;\r\n }",
"String getLocation();",
"String getLocation();",
"String getLocation();",
"protected String getLocation(){\r\n return this.location;\r\n }",
"private String getFinalReturnAddress() \n\t{\n\t\treturn pageContext.getRequest().getParameter(FINISHED_ADDRESS_PARAMETER);\n\t}",
"private String requestInfo(Location location) {\n return \"location(lat \" + location.getLat() + \", lon \" + location.getLat() + \") \";\n }",
"public native final String location() /*-{\n\t\treturn this[\"location\"];\n\t}-*/;",
"public String getLocationName(){\n return myLoc;\n }",
"public static RemoteObject _process_globals() throws Exception{\nrequests3._device = RemoteObject.createNew (\"anywheresoftware.b4a.phone.Phone\");\n //BA.debugLineNum = 13;BA.debugLine=\"Private TileSource As String\";\nrequests3._tilesource = RemoteObject.createImmutable(\"\");\n //BA.debugLineNum = 14;BA.debugLine=\"Private ZoomLevel As Int\";\nrequests3._zoomlevel = RemoteObject.createImmutable(0);\n //BA.debugLineNum = 15;BA.debugLine=\"Private Markers As List\";\nrequests3._markers = RemoteObject.createNew (\"anywheresoftware.b4a.objects.collections.List\");\n //BA.debugLineNum = 16;BA.debugLine=\"Private MapFirstTime As Boolean\";\nrequests3._mapfirsttime = RemoteObject.createImmutable(false);\n //BA.debugLineNum = 18;BA.debugLine=\"Private MyPositionLat, MyPositionLon As String\";\nrequests3._mypositionlat = RemoteObject.createImmutable(\"\");\nrequests3._mypositionlon = RemoteObject.createImmutable(\"\");\n //BA.debugLineNum = 19;BA.debugLine=\"Private CurrentTabPage As Int = 0\";\nrequests3._currenttabpage = BA.numberCast(int.class, 0);\n //BA.debugLineNum = 20;BA.debugLine=\"Private InfoDataWindows As Boolean = False\";\nrequests3._infodatawindows = requests3.mostCurrent.__c.getField(true,\"False\");\n //BA.debugLineNum = 21;BA.debugLine=\"End Sub\";\nreturn RemoteObject.createImmutable(\"\");\n}",
"@SuppressLint(\"MissingPermission\")\n private void requestLocationUpdate() {\n }",
"public RTWLocation parent();",
"public abstract void locationMessage(Message m);",
"com.google.ads.googleads.v6.resources.LocationView getLocationView();",
"@Override\n\tpublic String getLocation() {\n\t\treturn this.location;\n\t}",
"@Override\n public geo_location getLocation() {\n return location;\n }",
"pb4server.QueryInfoByWorldAskReq getQueryInfoByWorldAskReq();",
"public static void requestLocationUpdate() {\n/* 37 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"@Override\n public void onResponse(String response) {\n Toast.makeText(DemoLocationActivity.this,response,Toast.LENGTH_SHORT).show();\n\n }",
"@Override\n public void onLocationResult(LocationResult locationResult) {\n super.onLocationResult(locationResult);\n Log.d(TAG, \"onLocationResult: \");\n if (locationResult != null) {\n Log.d(TAG, \"onLocationResult: loaction!==null\");\n myLocation = locationResult.getLastLocation();\n showMarker();//de show hinh len\n }\n }",
"public RTWLocation element(RTWElementRef e);",
"public Location getEnterLocation() {\r\n return location;\r\n }",
"@Override\n\tpublic void msgAtLocation(Person p, Role r, List<Action> actions) {\n\t\tlog.add(new LoggedEvent(\"Recieved at location\"));\n\t\t\n\t}",
"public int getLocation()\r\n {\n }",
"private void sendRequest() {\n double origLat = currLatLng.latitude;\n double origLong = currLatLng.longitude;\n double destLat = destLatLng.latitude;\n double destLong = destLatLng.longitude;\n String origin = origLat + \",\" + origLong;\n String destination = destLat + \",\" + destLong;\n Log.d(TAG, \"sendRequest: origin LatLong- \" + \" destination LaatLng- \" + destLatLng);\n try {\n new DirectionFinder(this, origin, destination).execute();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n }",
"@Then(\"^location fetch sucessfully\\\\.$\")\n\tpublic void location_fetch_sucessfully() {\n\t \n\t}",
"public String getLocation()\n {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"Place resolveLocation( Place place );",
"void queueLocation(IfaceLocation loc);",
"String getArrivalLocation();",
"URI getLocation();",
"private void location(String[] command) {\n\t\tSystem.out\n\t\t\t\t.println(\"Sending last known location information via Twitter.\");\n\t\tTwitterComm.sendDirectMessage(Constants.AUTH_USER,\n\t\t\t\tConstants.CH_LOCATIONTEXT + \"\\n\"\n\t\t\t\t\t\t+ Alfred.getLocation().toString());\n\t}",
"public String getLocation() {\r\n return location;\r\n }",
"public Location getLocation(){\n return location;\n }",
"Report.LocationOuterClass.Location.LocationType getLocationtype();",
"private void getLocation() {\n fields = Arrays.asList(Place.Field.ID, Place.Field.NAME, Place.Field.LAT_LNG);\n\n // Start the autocomplete intent.\n Intent intent = new Autocomplete.IntentBuilder(\n AutocompleteActivityMode.FULLSCREEN, fields)\n .build(this);\n startActivityForResult(intent, AUTOCOMPLETE_REQUEST_CODE);\n }",
"String getEmailLocation();",
"String getOnlineHelpLocation();",
"public AddressSetView addToView(ProgramLocation loc);",
"@Override\n\tpublic String getRequestString() throws UnconfiguredRequestException {\n\t\treturn \"Entry \" + entry.toString() + \"\\n\"; // NOI18N\n\t}",
"public void updateLocation();",
"Location getLocation();",
"Location getLocation();",
"Location getLocation();",
"Location getLocation();",
"@RequestMapping(\"/regLoc\")\n\tpublic String showLocReg(){\n\t\treturn \"LocationReg\";\t}",
"@Override\n\tprotected void updateTargetRequest() {\n\t}",
"@Override\n public void onSuccess(Location location) {\n }",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn getLocation();\r\n\t}",
"@Override\n public void onLocationChanged(Location location) {\n latitude=String.valueOf(location.getLatitude());\n longitude= String.valueOf(location.getLongitude());\n\n System.out.println(\"asdfgh==\"+latitude);\n\n\n /* Geocoder geocoder;\n List<Address> addresses;\n geocoder = new Geocoder(SafetyActivity.this, Locale.getDefault());\n\n try {\n addresses = geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n String address = addresses.get(0).getAddressLine(0); // If any additional address line present than only, check with max available address lines by getMaxAddressLineIndex()\n String city = addresses.get(0).getLocality();\n String state = addresses.get(0).getAdminArea();\n String country = addresses.get(0).getCountryName();\n String postalCode = addresses.get(0).getPostalCode();\n String knownName = addresses.get(0).getFeatureName();\n\n System.out.println(\"addresses==\"+address);\n // Here 1 represent max location result to returned, by documents it recommended 1 to 5\n } catch (IOException e) {\n e.printStackTrace();\n }*/\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n Toast.makeText(getContext(), \"location: \" + location, Toast.LENGTH_LONG).show();\n EventBus.getDefault().post(new LocationEvent(location));\n }\n }",
"public java.lang.String getLocation() {\n return location;\n }",
"String getLocationLabel();",
"@Override\n public void onMoveLegResponse(MoveLegResponse ind) {\n\n }",
"@RemoteServiceRelativePath(\"location\")\r\npublic interface LocationService extends RemoteService {\r\n\t/**\r\n\t * Utility class for simplifying access to the instance of async service.\r\n\t */\r\n\tpublic static class Util {\r\n\t\tprivate static LocationServiceAsync instance;\r\n\t\tpublic static LocationServiceAsync getInstance(){\r\n\t\t\tif (instance == null) {\r\n\t\t\t\tinstance = GWT.create(LocationService.class);\r\n\t\t\t}\r\n\t\t\treturn instance;\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\tpublic ResponseLocationDTO location();\r\n\t\r\n\t//Obtain location/s\r\n\tpublic List<LocationDTO> getLocations(String id);\r\n\tpublic List<LocationDTO> getLocations(LocationDTO initialLocation);\r\n\t\r\n\t//Set the the current location from geoLocalization\r\n\tpublic void setLat(String id, String lat);\r\n\tpublic void setLng(String id, String Lng);\r\n\t\r\n\t\r\n\t//Delete a location from MyPlaces\r\n\tpublic void deleteLocation(String idUser, List<LocationDTO> loc);\r\n\t\r\n\t//Add a new location\r\n\tpublic LocationDTO addLocation(String city, String userId);\r\n\t\r\n\t\r\n}",
"public String getLocation() {\r\n\t\treturn location; \r\n\t}",
"@Override\n public String toString() {\n return location.getJsonPointerFragment() + \" -> \" + wrapped;\n }",
"@Override\n public void onSuccess(Location location) {\n\n if (location != null) {\n // Logic to handle location object\n\n Geocoder gcd = new Geocoder(MainActivity.this, Locale.getDefault());\n List<Address> addresses = null;\n try {\n addresses = gcd.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (addresses.size() > 0) {\n System.out.println(addresses.get(0).getLocality());\n sp.set(SPConstants.location,addresses.get(0).getLocality()+\", \"+addresses.get(0).getCountryName());\n }\n else {\n sp.set(SPConstants.location,\"\");\n\n // do your stuff\n }\n\n }\n }",
"void requestLocClick() {\n isRequest = true;\n mHasLocationData = false;\n if (mLocationClient != null && mLocationClient.isStarted()) {\n mLocationClient.requestLocation();\n Toast.makeText(getActivity(), \"Locating...\", Toast.LENGTH_SHORT).show();\n } else {\n Log.d(TAG, \"Location Client is not started...\");\n }\n }",
"@Override\n public void onSuccess(Void aVoid) {\n Log.i(\"MainActivity\", \"requestLocationUpdatesWithCallback onSuccess\");\n }",
"String getLocation() {\n return super.getLocation()+ \", z : \" + z;\n }",
"private String getIxbrlLocationFromDocGeneratorResponse(DocumentGeneratorResponse response) {\n return Optional.of(response)\n .map(DocumentGeneratorResponse::getLinks)\n .map(Links::getLocation)\n .orElse(null);\n }",
"public String getLocation() {\r\n return location;\r\n }",
"phaseI.Hdfs.DataNodeLocation getLocation();",
"public int getLocation()\r\n {\r\n return location;\r\n }",
"private String getActionAddress() \n\t{\n\t\treturn pageContext.getRequest().getParameter(ACTION_ADDRESS_PARAMETER);\n\t}",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() {\n return this.location;\n }",
"@Override\n\tpublic String getLocation() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getLocation() {\n\t\treturn null;\n\t}",
"@Override\n public void receivedReply(final RequestTargetReply reply) {\n }",
"@Override\n\tpublic ClientResponse post(LocationCourtTerme t) {\n\t\tWebResource webResource = addQueryParam (t);\n\t\twebResource = this.webResource.path(\"/location\");\n\t\tBuilder builder = getBuilder (webResource);\n\t\t\n\t\t// Invocation de la méthode POST HTTP\n\t\tClientResponse clientResponse = builder.post(ClientResponse.class);\n\t\t\t\t\n\t\treturn clientResponse;\n\t}",
"public abstract String getDisplayLocation();"
]
| [
"0.5960349",
"0.58436096",
"0.57612103",
"0.57041794",
"0.5521611",
"0.54939044",
"0.5450836",
"0.545043",
"0.54213077",
"0.54213077",
"0.5419469",
"0.5391639",
"0.53730345",
"0.5366341",
"0.53529763",
"0.533871",
"0.53329957",
"0.53329957",
"0.53329957",
"0.5316126",
"0.5257124",
"0.52555573",
"0.52520514",
"0.5244492",
"0.52046657",
"0.5203891",
"0.5185567",
"0.5184233",
"0.5184058",
"0.517235",
"0.51653874",
"0.51643264",
"0.5159862",
"0.5141981",
"0.5141981",
"0.5141981",
"0.5141981",
"0.5141981",
"0.5141981",
"0.5141981",
"0.5141981",
"0.5137887",
"0.5127678",
"0.5120235",
"0.5105759",
"0.51037633",
"0.5102611",
"0.50910175",
"0.50886387",
"0.50875145",
"0.5084891",
"0.50825423",
"0.5078859",
"0.50771403",
"0.5072813",
"0.50664467",
"0.5055797",
"0.5040747",
"0.50207865",
"0.5020434",
"0.49945968",
"0.4978198",
"0.4977003",
"0.497613",
"0.49760848",
"0.49675038",
"0.49675038",
"0.49675038",
"0.49675038",
"0.4952594",
"0.49509454",
"0.49477044",
"0.49396974",
"0.49373537",
"0.4936571",
"0.49363238",
"0.49346688",
"0.4931434",
"0.49134865",
"0.49128854",
"0.49111354",
"0.4909937",
"0.49084756",
"0.49072513",
"0.49064046",
"0.48976994",
"0.48963356",
"0.48954034",
"0.48946348",
"0.48848015",
"0.48819873",
"0.48819873",
"0.48819873",
"0.48819873",
"0.48819873",
"0.48786592",
"0.48786592",
"0.48783487",
"0.48777944",
"0.4873234"
]
| 0.5000925 | 60 |
this needs to be overridden if you want to utilize, it will call in toggle... | public boolean isValidToToggle() {
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void Toggle() {\n\t \n }",
"public abstract void toggle();",
"void toggle();",
"public void toggle(){\r\n isDown = !isDown;\r\n }",
"public void toggleEnable();",
"@Override\r\n\tpublic int ToggleDown() {\n\t\treturn 0;\r\n\t}",
"@Override\n public void toggle(boolean active) {\n }",
"@Override\n public void onMenuToggle(boolean b) {\n }",
"public void toggle() {\n toggle(false);\n }",
"public void toggle(){\n isOn = !isOn;\n }",
"public void toggle() { this.isOpen = !this.isOpen; }",
"protected void change() {\r\n\r\n // consume?\r\n if(isLoop()) return;\r\n \r\n // prevent re-entry\r\n setLoop(true);\r\n\r\n // initialize\r\n int dx = 0;\r\n int dy = 0;\r\n\r\n // set flag\r\n boolean isSelected = getToggleButton().isSelected();\r\n\r\n // any change?\r\n if(isExpanded!=isSelected) {\r\n\r\n // set flag\r\n isExpanded = isSelected;\r\n\r\n // translate selection to view\r\n if(isExpanded) {\r\n\r\n \t// get preferred size\r\n \tint max = (preferredExpandedHeight==0 ? (isPreferredSizeSet() ? super.getPreferredSize().height : 0) : preferredExpandedHeight);\r\n\r\n // get height\r\n int h = (isTmpSet(0) ? tmpSize[0].height : max);\r\n\r\n // calculate change\r\n dy = h - minimumCollapsedHeight;\r\n\r\n // apply temporary stored sizes?\r\n if(isTmpSet(1)) super.setMinimumSize(getTmpSize(1));\r\n if(isTmpSet(2)) super.setPreferredSize(getTmpSize(2));\r\n if(isTmpSet(3)) super.setMaximumSize(getTmpSize(3));\r\n\r\n // reset temporary sets\r\n resetTmpSizes();\r\n\r\n }\r\n else {\r\n\r\n // get collapsed height\r\n int h = minimumCollapsedHeight;\r\n\r\n // update temporary sizes\r\n setTmpSize(0,isDisplayable() ? super.getSize() : getPreferredSize(),true);\r\n\r\n // update temporary insets\r\n tmpInsets = super.getInsets();\r\n\r\n // calculate change\r\n dy = h - getTmpSize(0).height;\r\n\r\n // set collapsed size\r\n minimumCollapsedHeight = h;\r\n\r\n // set new insets\r\n if(headerPlacement==SwingUtilities.BOTTOM) {\r\n \tcollapsedInsets = new Insets(0, tmpInsets.left, tmpInsets.bottom, tmpInsets.right);\r\n } else {\r\n \tcollapsedInsets = new Insets(tmpInsets.top, tmpInsets.left, 0, tmpInsets.right);\r\n }\r\n \r\n\r\n }\r\n\r\n // apply change\r\n super.setBorder(createBorder());\r\n\r\n // update tool tip text\r\n getToggleButton().setToolTipText(isExpanded() ? \"Lukk\" : \"┼pne\");\r\n\r\n // notify\r\n fireToggleEvent(dx,dy);\r\n\r\n // notify manager hierarchy\r\n super.requestResize(dx, dy, true);\r\n\r\n }\r\n\r\n // resume\r\n setLoop(false);\r\n\r\n }",
"@Override\n\tpublic void toggle() {\n\t\tsetChecked(!checked);\n\t}",
"protected abstract void switchOnCustom();",
"@Override\n public void togglePrimaryCaregiver(boolean b) {\n }",
"void updateCommonToggleStatus(boolean shown);",
"@Override\n public void toggle() {\n checkBox.toggle();\n }",
"@Override\r\n\tpublic int ToggleUp() {\n\t\treturn 0;\r\n\t}",
"void notifySpyModeToggle();",
"public void togglePlay() { }",
"protected abstract void switchOffCustom();",
"public void toggle()\n\t{\n\t\tsetVisible(!this.isShowing());\n\t}",
"@Override\n\t\tpublic void onChange(boolean selfChange) {\n\t\t\tsuper.onChange(selfChange);\n\t\t}",
"void toggled(ToggledEvent event);",
"public void toggle() {\n setChecked(!checked);\n }",
"void onSwitched(ToggleableView toggleableView, boolean isOn);",
"public void toggle() {\n if (isOn()) {\n turnOff();\n } else {\n turnOn();\n }\n }",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\ttoggle = 2;\r\n\t\t\t\ttoggle(toggle);\r\n\t\t\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\ttoggle = 1;\r\n\t\t\t\ttoggle(toggle);\r\n\t\t\t}",
"public Toggle (Boolean setting, String name, String trueName, String falseName){\r\n \t\t\tthis.setting = setting;\r\n \t\t\tthis.name = name;\r\n \t\t\tthis.trueName = trueName;\r\n \t\t\tthis.falseName = falseName;\r\n \t\t}",
"public void toggle() {\n/* 135 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void toggle()\n\t{\n\t\tbitHolder.setValue(Math.abs(bitHolder.getValue() - 1 ));\n\t\t\n\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\ttoggle = 3;\r\n\t\t\t\ttoggle(toggle);\r\n\t\t\t}",
"@Override\n\tpublic boolean requiresToggleButton() {\n\t\treturn false;\n\t}",
"public void toggle() {\n if (volume == 1f) {\n volume = 0f;\n }\n else if (volume == 0f) {\n volume = 1f;\n }\n\n }",
"public void switchOn();",
"public void toggleMod(){\r\n this.enabled = !this.enabled;\r\n this.onToggle();\r\n if(this.enabled)\r\n this.onEnable();\r\n else\r\n this.onDisable();\r\n }",
"private void toggle(int a) {\n\t\ttry {\r\n\t\t\tfor (int i = 0; i < et.size(); i++) {\r\n\t\t\t\ttoogleOne(et.get(i), el.get(i), false);\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < toggle; i++) {\r\n\t\t\t\ttoogleOne(et.get(i), el.get(i), true);\r\n\t\t\t}\r\n\t\t\tlogp(INFO, getClassName(GraphicalUserInterface.class), \"toggle\", String.join(getSpace(), \"T\".concat(Library.toString(a)), \"Activated\"));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tlogp(INFO, getClassName(GraphicalUserInterface.class), \"toggle\", String.join(getSpace(), \"Error\", \"Activated\"));\r\n\t\t}\r\n\t}",
"protected void toggleStateChanged() \r\n\t{\r\n\t\tgetSoccerMaster().setShowBallCoord( isToggledOn() );\r\n\t}",
"@Override\n\tpublic void stateChanged() {\n\t\t\n\t}",
"@Override\n\tpublic void turnOn() {\n\n\t}",
"public void toggleMusic() {\n this.musicEnabled = !this.musicEnabled;\n }",
"@Override\n public void onChange(boolean selfChange) {\n onChange(selfChange, null);\n }",
"@Override\n\tpublic void turnOff() {\n\n\t}",
"public void setToggle(int toggle) {\n\t\tToggle[SortType - 1] = toggle;\n\t}",
"public Toggle (Boolean setting, String name){\r\n \t\t\tthis.setting = setting;\r\n \t\t\tthis.name = name;\r\n \t\t\ttrueName = \"enabled\"; //Default names.\r\n \t\t\tfalseName = \"disabled\";\r\n \t\t}",
"public Dargle toggle()\n\t{ m_bBoolean = ! m_bBoolean ; return this ; }",
"public ToggleButton()\n {\n this(true);\n }",
"public void enableSelfView(boolean val);",
"void togglePlay();",
"@Override\r\n\t\t\t public void onClick(View v) {\n\t\t\t\t bFlagHehuo = !bFlagHehuo;\r\n\t\t\t\t hehuo_btn.setChecked(bFlagHehuo);\r\n\t\t\t }",
"public void setupToggleButtons(){\n\t\ttoggle_textContacts.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n\t\t public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t if (isChecked) {\n\t\t // The toggle is enabled\n\t\t\t if(prefsHandler.getSettings().getIsFirstTextContacts())\n\t\t\t {\n\t\t\t \tshowTextContactsTutorialDialog();\n\t\t\t }\n\t\t\t \n\t\t \tLinearLayout.LayoutParams layout_desc = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n\t\t textContactsSmallFrame.setLayoutParams(layout_desc);\n\t\t } else {\n\t\t \t// resize the frame to just show the top button\n\t\t \tLinearLayout.LayoutParams layout_desc = new LinearLayout.LayoutParams(0, 0);\n\t\t textContactsSmallFrame.setLayoutParams(layout_desc);\n\t\t }\n\t\t }\n\t\t});\n\t\t\n\t\ttoggle_NFRadio.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n\t\t public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t if (!isChecked) {\n\t\t // The toggle is disabled\n\t\t\t if(prefsHandler.getSettings().getIsFirstMusic())\n\t\t\t {\n\t\t\t \tshowMusicTutorialDialog();\n\t\t\t }\n\t\t \t// resize the frame to just show the top button\n\t\t \tLinearLayout.LayoutParams layout_desc = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n\t\t NFRadioSmallFrame.setLayoutParams(layout_desc);\n\t\t } else {\n\t\t \t// the toggle is enabled\n\t\t\t if(prefsHandler.getSettings().getIsFirstNewsFeed())\n\t\t\t {\n\t\t\t \tshowNewsTutorialDialog();\n\t\t\t }\n\t\t\t \n\t\t \tLinearLayout.LayoutParams layout_desc = new LinearLayout.LayoutParams(0, 0);\n\t\t NFRadioSmallFrame.setLayoutParams(layout_desc);\n\t\t }\n\t\t }\n\t\t});\n\t\t\n\t\ttoggle_ShakeToWake.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n\t\t public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t \tif(isChecked&&prefsHandler.getSettings().getIsFirstShakeToWake())\n\t\t {\n\t\t \t\tshowShakeTutorialDialog();\n\t\t }\n\t\t }\n\t\t});\n\t}",
"public void toggleActive(){\n this.active = !this.active;\n }",
"public void change() {\r\n this.mode = !this.mode;\r\n }",
"public void animateToggle() {\n/* 147 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Override\r\n public boolean isSwitchOn() {\r\n return isOn;\r\n }",
"public void switchLight(){\r\n _switchedOn = !_switchedOn;\r\n }",
"public void toggle() {\n if (isExpanded()) {\n collapse();\n } else {\n expand();\n }\n }",
"@Override\n public void setVisible (boolean f)\n { \n }",
"@Override\n public void toggleFamilyHead(boolean b) {\n }",
"public void toggleMode() {\n if (edit_rbmi.isSelected()) filter_rbmi.setSelected(true);\n // else if (filter_rbmi.isSelected()) edgelens_rbmi.setSelected(true);\n // else if (edgelens_rbmi.isSelected()) timeline_rbmi.setSelected(true);\n else edit_rbmi.setSelected(true);\n }",
"@Override\n public boolean onClick(View view) {\n updateToggle(view, !mChecked);\n// updateText(view); // automatically\n return true;\n }",
"public void act1()\r\n {\r\n super.act1();\r\n isPhasing = !isPhasing;\r\n }",
"synchronized void toggle() {\n myShouldPause = !myShouldPause;\n this.notify();\n }",
"public ToggleControl() {\n\t\tfieldName = \"Untitled Control\";\n\t\tvalue = false;\n\t}",
"@Override\r\n\t\t\t public void onClick(View v) {\n\t\t\t\t bFlagLianxiren = !bFlagLianxiren;\r\n\t\t\t\t lianxiren_btn.setChecked(bFlagLianxiren);\r\n\t\t\t }",
"public abstract void Enabled();",
"public void toggle() {\n if (!isActive)\n activate();\n else\n deactivate();\n }",
"@Override\r\n\t\t\t public void onClick(View v) {\n\t\t\t\t bFlagZhaopin = !bFlagZhaopin;\r\n\t\t\t\t zhaopin_btn.setChecked(bFlagZhaopin);\r\n\t\t\t }",
"private void preSwitchPanel()\n {\n switchPanel = true;\n configureNext = true;\n configurePrevious = true;\n }",
"@Override\n\tpublic void adjust() {\n\t\tstate = !state;\n\t}",
"public TogglePanel() {\r\n this(\"\");\r\n }",
"public void changeIsFlagged() {\r\n\t\tif (this.isFlagged) {\r\n\t\t\tthis.isFlagged = false;\r\n\t\t} else {\r\n\t\t\tthis.isFlagged = true;\r\n\t\t}\r\n\t}",
"public void turn_off () {\n this.on = false;\n }",
"void currentStateChanged();",
"protected void toggleLaser() {\n laserOn = !laserOn;\n }",
"public boolean toggle() {\r\n // forward\r\n getToggleButton().doClick();\r\n // return toggle state\r\n return isExpanded();\r\n }",
"private void initSwitchEvents(){\n s1.setOnClickListener(v ->\n eventoSuperficie()\n );\n s2.setOnClickListener(v ->\n eventoSemiSumergido()\n );\n s3.setOnClickListener(v ->\n eventoSumergido()\n );\n // Hace click en el estado actual\n switch (PosicionBarrasReactor.getPosicionActual()){\n case SUMERGIDO:\n s3.toggle();\n break;\n case SEMI_SUMERGIDO:\n s2.toggle();\n break;\n case SUPERFICIE:\n s1.toggle();\n break;\n }\n // -\n }",
"public void toggleRunning() {\r\n\t\trunning = !running;\r\n\t}",
"@Test\n public void testToggle() {\n // Toggle on test.\n boolean before = plug.getCondition();\n clickOn(\"ON\");\n assertNotEquals(before, plug.getCondition());\n\n // Toggle off test which also implies that the ON/OFF status is displayed.\n before = plug.getCondition();\n clickOn(\"OFF\");\n assertNotEquals(before, plug.getCondition());\n }",
"default void onEnable() {}",
"public abstract void onEnable();",
"public void setToggle(boolean value) {\n getElement().setToggle(value);\n }",
"@Override\n\t\tpublic void onClick(View v) {\n\t\t\tindoorFlag = !indoorFlag;\n\t\t\t//indoorFlag = true;\n\t\t}",
"@Override\n\t\t\t\t\tpublic void onToggleChange(View v, boolean isOpen) {\n\t\t\t\t\t\tSPUtils.putBoolean(getApplicationContext(),\n\t\t\t\t\t\t\t\tMyContains.SHOWSYSTEMTASK, isOpen);\n\t\t\t\t\t\tmAdapter.notifyDataSetChanged();\n\t\t\t\t\t}",
"public void toggleSignal() {\n if (green) {\n green = false;\n } else {\n green = true;\n }\n }",
"@Override // androidx.lifecycle.Observer\n public void onChanged(Boolean bool) {\n Boolean bool2 = bool;\n if (bool2 != null) {\n bool2.booleanValue();\n Views.setVisible(AdvertStatsActivity.access$getToolbarTitle$p(this.a), bool2.booleanValue());\n }\n }",
"@Override\n\t\t\t\t\tprotected void onChangeFlag(Service object, Boolean flag) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"public void toggle(int i) {\n//\t\tEditText input = (EditText) this.findViewById(R.id.input);\n\t\tToggleButton auto = (ToggleButton) findViewById(R.id.autoToggle);\n\t\tRadioGroup group = (RadioGroup) findViewById(R.id.group);\n\t\tRadioButton pre = (RadioButton) findViewById(R.id.pre);\n\t\tRadioButton post = (RadioButton) findViewById(R.id.post);\n\t\tRadioButton in = (RadioButton) findViewById(R.id.in);\n\t\t\n//\t\tinput.setText(\"CAlled\");\n\t\tif(i == 0) {\n\t\t\tauto.setChecked(true);\n\t\t\tauto.setChecked(true);\n\t\t\tpre.setChecked(false);\n\t\t\tpost.setChecked(false);\n\t\t\tin.setChecked(false);\n//\t\t\tinput.setText(\"HERE\");\n\t\t\t\tthis.auto = true;\n\t\t\t\tthis.pre = false;\n\t\t\t\tthis.post = false;\n\t\t\t\tthis.in = false;\n\t\t} else {\n//\t\t\tinput.setText(\"Radio\");\n\t\t\tauto.setChecked(false);\n\n\t\t\tif(group.getCheckedRadioButtonId() == R.id.pre) {\n\t\t\t\tthis.auto = false;\n\t\t\t\tthis.pre = true;\n\t\t\t\tthis.post = false;\n\t\t\t\tthis.in = false;\n\t\t\t} else if(group.getCheckedRadioButtonId() == R.id.post) {\n\t\t\t\tthis.auto = false;\n\t\t\t\tthis.pre = false;\n\t\t\t\tthis.post = true;\n\t\t\t\tthis.in = false;\n\t\t\t} else if(group.getCheckedRadioButtonId() == R.id.in) {\n\t\t\t\tthis.auto = false;\n\t\t\t\tthis.pre = false;\n\t\t\t\tthis.post = false;\n\t\t\t\tthis.in = true;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\t\t\tprotected void updateEnabled() {\n\t\t\t}",
"public void onToggleAnimate(View view) {\n updateEnabledState();\n }",
"public abstract void wgb_onEnable();",
"@Override\r\n public void onChange(SwitchButton sb, boolean state) {\n Log.d(\"switchButton\", state ? \"锟斤拷\":\"锟斤拷\");\r\n mImgView.setImageBitmap(null);\r\n //defreckle\r\n if(qubanSBtn.isSwitchOn())\r\n mImgView.setImageBitmap(mFaceEditor.BFDefreckleAuto());//));\r\n else\r\n mImgView.setImageBitmap(mFaceEditor.getBaseImage());\r\n }",
"@Override\n\tpublic void onModeChange() {\n\t}",
"@Override\n public void stateChanged(javax.swing.event.ChangeEvent e) {\n }",
"public void setFaceDown(){faceUp = false;}",
"@Override\n\tpublic JToggleButton getToggleButton() {\n\t\treturn null;\n\t}",
"private void eventoSuperficie(){\n s1.setChecked(true);\n s2.setChecked(false);\n s3.setChecked(false);\n esquema.setImageDrawable(getResources().getDrawable(R.drawable.np3));\n PosicionBarrasReactor.setPosicionActual(PosicionBarrasReactor.SUPERFICIE);\n }",
"@Override public void toggled(SbToggleSelection handler, Class<?> c) throws JeeslLockingException, JeeslConstraintViolationException\n\t{\n\t}",
"public MenuBar() {\r\n super();\r\n myTrue = false;\r\n }",
"@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tLog.e(TAG, \"toggle onClick enter \");\n\t\t\t\tupdateSurface();\n\t\t\t}"
]
| [
"0.83237875",
"0.75685436",
"0.7289807",
"0.6987391",
"0.6966389",
"0.6958274",
"0.6914569",
"0.6887946",
"0.6859965",
"0.68179566",
"0.65665084",
"0.6529319",
"0.6516556",
"0.6488187",
"0.6481605",
"0.6460677",
"0.6431404",
"0.6398235",
"0.63846797",
"0.6368714",
"0.6364515",
"0.6362592",
"0.6336191",
"0.630965",
"0.63053685",
"0.63050663",
"0.6289777",
"0.6284203",
"0.6283618",
"0.6283569",
"0.6268372",
"0.6245331",
"0.62270796",
"0.62132144",
"0.61885196",
"0.61758107",
"0.6174772",
"0.617168",
"0.6132668",
"0.6125025",
"0.6122297",
"0.61190736",
"0.61184686",
"0.6106125",
"0.61005825",
"0.6099576",
"0.60988384",
"0.6096763",
"0.60813046",
"0.60645455",
"0.60467756",
"0.60456073",
"0.6029735",
"0.6022857",
"0.6018622",
"0.6003638",
"0.6002089",
"0.59844464",
"0.59775794",
"0.5972293",
"0.59349483",
"0.59329283",
"0.5925288",
"0.5924649",
"0.5921165",
"0.59158677",
"0.59139574",
"0.5905571",
"0.58876526",
"0.5885716",
"0.5876848",
"0.5873797",
"0.58644545",
"0.58553916",
"0.58544767",
"0.5853339",
"0.5851493",
"0.5847261",
"0.5841291",
"0.5839018",
"0.5837465",
"0.58366436",
"0.5835178",
"0.58345217",
"0.5823609",
"0.58215344",
"0.5820808",
"0.5820396",
"0.5818083",
"0.58175373",
"0.58134794",
"0.58058697",
"0.57992184",
"0.57899714",
"0.5789588",
"0.5787125",
"0.5780812",
"0.5770293",
"0.57696843",
"0.57636994",
"0.57544416"
]
| 0.0 | -1 |
To change body of implemented methods use File | Settings | File Templates. | public void onBlur(BlurEvent blurEvent) {
TextArea textArea = (TextArea) blurEvent.getSource();
if (isEmpty(textArea)) {
textArea.setValue(WRITE_SOMETHING);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void method() {\n\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void verkaufen() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n\tpublic void doYouWantTo() {\n\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\tvoid methodabstract() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}",
"@Override\n\tpublic void leti() \n\t{\n\t}",
"@Override\n\tpublic void myMethod() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\npublic int method() {\n\treturn 0;\r\n}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tpublic void dosomething2() {\n\t\t\n\t}",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void Method1() {\n\t\t\r\n\t}",
"@Override\n\tpublic void buscar() {\n\t\t\n\t}",
"public Methods() {\n // what is this doing? -PMC\n }",
"public void myPublicMethod() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}",
"@Override\n\tpublic void function() {\n\t\t\n\t}",
"@Override\r\n\tpublic void method1() {\n\t}",
"@Override\n\tpublic void alterar() {\n\t\t\n\t}",
"public void smell() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void method() {\n\t\tSystem.out.println(\"这是第三个实现\");\n\t}",
"@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}",
"@Override\r\n\tpublic void voar() {\n\t\t\r\n\t}",
"public final void mo51373a() {\n }",
"public void mo97908d() {\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\r\n\tpublic void laught() {\n\r\n\t}",
"@Override\n\tpublic void name() {\n\t\t\n\t}",
"@Override\n\tpublic void name() {\n\t\t\n\t}",
"public void mo21825b() {\n }",
"@Override\n\tpublic void aaa() {\n\t\t\n\t}",
"@Override\n\tpublic void classroom() {\n\t\t\n\t}",
"@Override\n\tpublic void yürü() {\n\n\t}",
"public void method_202() {}",
"@Override\n\tpublic void type() {\n\t\t\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\r\n public void salir() {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"public void mo21793R() {\n }",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n public void action() {\n }",
"@Override\n public void action() {\n }",
"@Override\n public void action() {\n }",
"public void mo55254a() {\n }",
"public void foo() {\r\n\t}",
"@Override\n\tpublic void e() {\n\n\t}",
"@Override\n\tpublic void some() {\n\t\t\n\t}",
"public void method(){}",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"@Override\n public void update() {\n }",
"void berechneFlaeche() {\n\t}",
"@Override\n\tpublic void modify() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\r\n\tpublic void action() {\n\t\t\r\n\t}",
"@Override\n\tpublic void view() {\n\t\t\n\t}",
"@Override\n\tpublic void name1() {\n\t\t\n\t}",
"@Override\n public void feedingHerb() {\n\n }",
"public void mo4359a() {\n }",
"public void m23075a() {\n }",
"@Override\n public void author()\n {\n }",
"public void mo21779D() {\n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"public void mo115190b() {\n }",
"@Override\r\n\tpublic void a() {\n\t\t\r\n\t}",
"public void mo21792Q() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }"
]
| [
"0.74342245",
"0.7388708",
"0.73807424",
"0.7342543",
"0.733612",
"0.73274",
"0.73048407",
"0.73048407",
"0.7288761",
"0.7263298",
"0.72240573",
"0.72240573",
"0.7185279",
"0.7173534",
"0.71181035",
"0.71084964",
"0.70798004",
"0.7044164",
"0.7011181",
"0.6997047",
"0.6988354",
"0.6974695",
"0.6933389",
"0.69078255",
"0.68886364",
"0.6873616",
"0.6863273",
"0.6860139",
"0.6849512",
"0.6844424",
"0.6835018",
"0.6806309",
"0.680564",
"0.67972124",
"0.67971444",
"0.67901814",
"0.6783107",
"0.6742863",
"0.67092294",
"0.67045176",
"0.6691299",
"0.6672521",
"0.6667701",
"0.66439843",
"0.6641542",
"0.66354257",
"0.6634153",
"0.6631264",
"0.6629309",
"0.6623261",
"0.661811",
"0.6617406",
"0.6608999",
"0.6608808",
"0.6608808",
"0.66031474",
"0.6589945",
"0.6589945",
"0.6587139",
"0.6585568",
"0.6582855",
"0.658134",
"0.65806216",
"0.6572759",
"0.65513843",
"0.6551288",
"0.6547154",
"0.6547127",
"0.65428925",
"0.653221",
"0.6527863",
"0.65270823",
"0.65270823",
"0.65270823",
"0.65235084",
"0.6516452",
"0.6515151",
"0.65133286",
"0.65131664",
"0.6512005",
"0.6511146",
"0.65110445",
"0.6508677",
"0.65022266",
"0.6498299",
"0.6495718",
"0.6493608",
"0.64926344",
"0.6488336",
"0.64852387",
"0.6485153",
"0.64781404",
"0.64741564",
"0.647411",
"0.64622664",
"0.6460401",
"0.6455523",
"0.645338",
"0.645338",
"0.645338",
"0.645338"
]
| 0.0 | -1 |
you need to override this | protected void doSave() {
GWT.log("Please override");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n protected void getExras() {\n }",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"@Override\n public void render() { super.render(); }",
"@Override\n public void memoria() {\n \n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tpublic void erstellen() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n protected void init() {\n }",
"@Override\n\tpublic void render () {\n\n\t}",
"@Override\n\tpublic void verkaufen() {\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\n\tpublic void render () {\n super.render();\n\t}",
"@Override\r\n\tpublic void render() {\n\t\t\r\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void view() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n super.init();\n\n }",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n void init() {\n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void loeschen() {\r\n//\t\tsuper.leuchterAbmelden(this);\r\n\t\tsuper.loeschen();\r\n\t}",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\n\tpublic void pausaParaComer() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\n\tpublic void render() {\n\t\t\n\t}",
"@Override\n\tpublic void yürü() {\n\n\t}",
"@Override\n public void render() {\n super.render();\n }",
"@Override\n public void render() {\n super.render();\n }",
"@Override\n\tpublic void e() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void trabajar() {\n\n\t}",
"@Override\r\n\tpublic void exportThis()\r\n\t{\n\t\tsuper.exportThis();\r\n\t}",
"@Override\r\n\tpublic void render() {\n\r\n\t}",
"@Override\r\n public String toString() {\n return super.toString();\r\n }",
"@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}",
"@Override\n public void init() {\n }",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n\tpublic void alterar() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tpublic void recreo() {\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}",
"public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n protected void paint2d(Graphics2D g) {\n \n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}"
]
| [
"0.75091463",
"0.7267244",
"0.72530526",
"0.7189651",
"0.713771",
"0.7045123",
"0.7024726",
"0.69507223",
"0.6930258",
"0.6930258",
"0.6853779",
"0.6853779",
"0.68166506",
"0.6800503",
"0.6766533",
"0.67590743",
"0.67540914",
"0.67389876",
"0.6728183",
"0.67092395",
"0.6708178",
"0.66990405",
"0.6697432",
"0.667263",
"0.6662385",
"0.66567427",
"0.6613723",
"0.6597279",
"0.65906024",
"0.6574558",
"0.6517903",
"0.6438721",
"0.6430977",
"0.64041716",
"0.64039433",
"0.64039433",
"0.6400152",
"0.63774467",
"0.6362701",
"0.6360331",
"0.63594884",
"0.63576144",
"0.6348095",
"0.63471586",
"0.6328699",
"0.6321984",
"0.6318508",
"0.6318217",
"0.6317707",
"0.6307867",
"0.62807643",
"0.6268741",
"0.62649155",
"0.62649155",
"0.62649155",
"0.62649155",
"0.62649155",
"0.62649155",
"0.6263821",
"0.626192",
"0.6261852",
"0.6249661",
"0.62491965",
"0.62404525",
"0.62404525",
"0.6239831",
"0.622797",
"0.62271714",
"0.62246805",
"0.621649",
"0.62111276",
"0.62111276",
"0.6210863",
"0.61977124",
"0.61921895",
"0.6186238",
"0.61858946",
"0.61793196",
"0.6174332",
"0.6165198",
"0.6161511",
"0.615622",
"0.61556906",
"0.61556906",
"0.61556906",
"0.61556906",
"0.61556906",
"0.61556906",
"0.6152532",
"0.6136043",
"0.6117741",
"0.6117741",
"0.6114646",
"0.6111977",
"0.6111977",
"0.6111977",
"0.6110536",
"0.61016244",
"0.61016244",
"0.6090073",
"0.6088599"
]
| 0.0 | -1 |
here we will display a solr result that users can pick to leave a mark upon mode 1 is what we want, so removing | protected void addResult2(ULPanel ul, LocationResult locationResult) {
// vertical panel, 2 rows into each li
// one label on top row
// hp goes into 2nd row
SolrDocument solrDocument = locationResult.getSolrDocument();
VerticalPanel vp = new VerticalPanel();
HorizontalPanel hp = new HorizontalPanel();
Long spotId = spotId = solrDocument.getFirstLong("spotid_l");
//all links for this will go to mark a spot
String targetHistoryToken = MyWebApp.LEAVE_SPOT_MARK + spotId;
Long itemId = null;
itemId = solrDocument.getFirstLong("georepoitemid_l");
if (itemId == null) {
itemId = solrDocument.getFirstLong("latest_mark_georepoitemid_l");
}
vp.add(hp);
ListItem li = new ListItem();
li.add(vp);
ul.add(li);
addMarkPhoto(solrDocument, targetHistoryToken, hp);
VerticalPanel middleTable = new VerticalPanel();
hp.add(middleTable);
hp.setCellWidth(middleTable, "100%");
middleTable.setStyleName("middletable");
//this will add the first row to the middle table
//mode is is a results page, whereas 2 is marks for a spot
String spot_label_s = solrDocument.getFirstString("spot_label_s");
if (spot_label_s != null) {
String sl = spot_label_s.toString();
Hyperlink spotLabel = new Hyperlink("@" + sl, targetHistoryToken);
spotLabel.setStyleName("spotLabel");
middleTable.add(spotLabel);
}
Anchor distanceLabel = getDistanceHyperlink(locationResult, targetHistoryToken);
Hyperlink metersLabel = new Hyperlink("meters away", targetHistoryToken);
ComplexPanel distancePanel = getDistancePanel(distanceLabel, metersLabel, locationResult);
Hyperlink latest_mark_escapedjavascriptsnippet_s = addHtml2(solrDocument, middleTable, "latest_mark_escapedjavascriptsnippet_s", targetHistoryToken);
if (latest_mark_escapedjavascriptsnippet_s != null) {
latest_mark_escapedjavascriptsnippet_s.addStyleName("latestMarkEscapedJavascriptSnippet");
}
ComplexPanel categoriesPanel = addCategories(solrDocument);
middleTable.add(categoriesPanel);
if (itemId == null) {
Hyperlink label2 = new Hyperlink("Be the first to mark this spot!", targetHistoryToken);
label2.addStyleName("linky");
label2.addStyleName("befirst");
//middleTable.add(label2);
}
String snippet = solrDocument.getFirstString("spot_geoRepoItemescapedjavascriptsnippet_s");
if (snippet != null) {
Hyperlink html2 = new Hyperlink(snippet, targetHistoryToken);
html2.addStyleName("spotGeoRepoItemEscapedJavascriptSnippet");
}
Hyperlink html2 = addHtml2(solrDocument, middleTable, "spot_geoRepoItemescapedjavascriptsnippet_s", targetHistoryToken);
if (html2 != null) {
html2.addStyleName("spotGeoRepoItemEscapedJavascriptSnippet");
}
//2nd image
//spot
if (!MyWebApp.isSmallFormat()) {
// if ((alex)) {
Hyperlink userHyperLink = new Hyperlink();
userHyperLink.setTargetHistoryToken(targetHistoryToken);
Image image = addImage(solrDocument, hp, "image_thumbnail_130x130_url_s",
userHyperLink, resources.spot_image_placeholder130x130(), resources.spot_image_placeholder57x57(), "spotimage");
setColumnWidth(image, hp);
// }
}
hp.add(distancePanel);
setColumnWidth(distancePanel, hp);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void clearResultEntries() {\n sp_searchEntries.removeAll();\n }",
"@Override\n public void result(Event event, boolean success) {\n mAnnotPanel.prepare();\n mClearView.setEnabled(false);\n mAnnotPanel.startSearch(0);\n }",
"public void deselectAll()\n {\n }",
"public void filterOutSelection() {\n RenderContext myrc = (RenderContext) rc; if (myrc == null) return;\n Set<String> sel = myrc.filterEntities(getRTParent().getSelectedEntities());\n if (sel == null || sel.size() == 0) { getRTParent().pop(); repaint(); return; }\n Set<Bundle> new_bundles = new HashSet<Bundle>();\n if (sel != null && sel.size() > 0) {\n new_bundles.addAll(myrc.bs.bundleSet());\n Iterator<String> it = sel.iterator();\n\twhile (it.hasNext()) new_bundles.removeAll(myrc.entity_counter_context.getBundles(it.next()));\n getRTParent().setSelectedEntities(new HashSet<String>());\n\tgetRTParent().push(myrc.bs.subset(new_bundles));\n repaint();\n }\n }",
"private static void BooleanQueryMode(DiskIndexWriter diskWriter, DiskPositionalIndex disk_posIndex) throws ClassNotFoundException, InstantiationException, IllegalAccessException {\n if (!specialQueries(query)) {\n //newCorpus = false; \n BooleanQueryParser bParser = new BooleanQueryParser();\n QueryComponent qComponent = bParser.parseQuery(query);\n postings = qComponent.getPostings(disk_posIndex);\n\n if (postings.isEmpty()) {\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n clickList = false;\n\n String notFound = \"Your search '\" + query + \"' is not found in any documents\";\n GUI.ResultsLabel.setText(notFound);\n\n } else {\n clickList = true;\n\n //clears list and repopulates it \n String docInfo;\n\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n\n for (Posting p : postings) {\n if (queryMode) {\n corpus.getDocument(p.getDocumentId()).getContent();\n }\n docInfo = corpus.getDocument(p.getDocumentId()).getTitle();\n //docInfo = corpus.getDocument(p.getDocumentId()).getFileName().toString();\n GUI.JListModel.addElement(docInfo);\n\n }\n GUI.ResultsLabel.setText(\"Total Documents Found: \" + postings.size());\n }\n\n }\n\n //GUI.SearchBarTextField.setText(\"Enter a new search or 'q' to exit\");\n GUI.SearchBarTextField.selectAll();\n\n }",
"private void emptySearchFields() {\n view.setMinPrice(-1);\n view.setMaxPrice(-1);\n view.setMinSQM(-1);\n view.setMaxSQM(-1);\n view.setBedrooms(-1);\n view.setBathrooms(-1);\n view.setFloor(-1);\n view.setHeating(false); //Is supposed to be a checkbox so even unchecked it is false not empty\n view.setLocation(\"Athens\"); //Is supposed to get a string from a dropdown so it wil never be empty\n }",
"public void limparFiltroOfertas() {\n dataModel = null;\n }",
"void unsetScoreAnalysis();",
"public void clearMark()\n {\n mark = false;\n }",
"public void clearMode() {\n\n\t\t// Clear mode only\n\t\tif(rdBtnAddStockCenter.getSelection()) {\n\t\t\ttxtStockCenterName.setText(\"\");\n\t\t\trdBtnPreferredNo.setSelection(true);\n\t\t\trdBtnPreferredYes.setSelection(false);\n\t\t\trdBtnPreferredNo.setEnabled(false);\n\t\t\trdBtnPreferredYes.setEnabled(false);\n\t\t}\n\t\telse if(rdBtnUpdateStockCenter.getSelection()) {\n\t\t\ttxtStockCenterName.setText(\"\");\n\t\t\trdBtnPreferredNo.setSelection(true);\n\t\t\trdBtnPreferredYes.setSelection(false);\n\t\t\tbtnSearch.setEnabled(true);\n\t\t\trdBtnPreferredNo.setEnabled(false);\n\t\t\trdBtnPreferredYes.setEnabled(false);\n\t\t}\n\t\telse if(rdBtnUpdatePharmacyDetails.getSelection()) {\n\n\t\t\t// clear the text fields\n\t\t\ttxtPharmacyName.setText(\"\");\n\t\t\ttxtStreetAdd.setText(\"\");\n\t\t\ttxtCity.setText(\"\");\n\t\t\ttxtTel.setText(\"\");\n\t\t\ttxtPharmacistName1.setText(\"\");\n\t\t\ttxtPharmacyAssistant.setText(\"\");\n\t\t\tlblCanvasPharmName.setText(\"Facility Name\");\n\t\t\tlblCanvasPharmacist.setText(\"Pharmacist\");\n\t\t\tlblCanvasAddress.setText(\"Physical Address\");\n\t\t}\n\n\t\tfieldsChanged = false;\n\t\tenableFields();\n\n\t}",
"void stopIndexing();",
"public void hide_completed()\r\n {\n if(!this.filter)\r\n {\r\n if(tableView.getItems().size()>0) {\r\n for (int i = 0; i < tableView.getItems().size(); i++) {\r\n ucf.assignments.list selectedList = tableView.getItems().get(i);\r\n this.all_items.add(selectedList);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n resettable();\r\n }\r\n this.filter = true;\r\n ArrayList<ucf.assignments.list> tmplist = new ArrayList<ucf.assignments.list>();\r\n\r\n for(int i = 0; i<tableView.getItems().size();i++)\r\n {\r\n ucf.assignments.list selectedList = tableView.getItems().get(i);\r\n if(!selectedList.getstatus())\r\n tmplist.add(selectedList);\r\n }\r\n tableView.getItems().removeAll(tmplist);\r\n }",
"public void remove(int offs,int len) throws BadLocationException {\n super.remove(offs, len);\r\r\r\r\r\r\n System.out.println(\"[*********]REMOVE\");\r\r\r\r\r\r\n if(validate==false){ \r\r\r\r\r\r\n String result = m_parent.getGrp_TField_encode().getText(0,getLength()); \r\r\r\r\r\r\n System.out.println(\"je remove \"+result.length());\r\r\r\r\r\r\n if (result.length() >= m_longeur_saisie && m_longeur_saisie!=0 ) {\r\r\r\r\r\r\n System.out.println(\"+grand \"+result);\r\r\r\r\r\r\n if(m_parent.getGrp_PopMenu_popup().isVisible())\r\r\r\r\r\r\n search(result);\r\r\r\r\r\r\n }\r\r\r\r\r\r\n else\r\r\r\r\r\r\n {\r\r\r\r\r\r\n System.out.println(\"+petit \"+result); \r\r\r\r\r\r\n affichePopup(false);\r\r\r\r\r\r\n charger=false; \r\r\r\r\r\r\n m_model.setM_vector(null);\r\r\r\r\r\r\n } \r\r\r\r\r\r\n }\r\r\r\r\r\r\n else{\r\r\r\r\r\r\n affichePopup(false);\r\r\r\r\r\r\n }\r\r\r\r\r\r\n }",
"public void deselectAll()\n {\n map.deselectAll();\n mapComponent.repaint();\n mapper.resetMenus();\n }",
"@Override\n protected void updateEliminations() {\n\n }",
"@Override\n public void resetFilteredLists() {\n\n }",
"public void deleteResults(){\n }",
"protected void requestedNotOrData(JTable jt,String searchTerm1, String searchTerm2, boolean soundex) throws SQLException\r\n\t{\r\n\t\tif(!soundex)\r\n\t\t{\r\n\t\tString query2 = \"select docID from inverted_file where word = '\"+searchTerm1+\"' group by docID\";\r\n\t\tPreparedStatement pstmt2 = con.prepareStatement(query2);\r\n\t\tResultSet rs1 = pstmt2.executeQuery();//then execute the statement\r\n\t\tif (!rs1.next()) {\r\n\t\t\tString query = \"select file_name as File, docID as Document_ID from inverted_file where word='\"+searchTerm2+\"' AND visible=1 group by file_name\";\r\n\t\t\tPreparedStatement pstmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs2 = pstmt.executeQuery();//then execute the statement\r\n\t\t\t\r\n\t\t\tif (!rs2.next()) {\r\n\t\t\t\tjt.setModel(dataModel);\r\n\t\t\t\tdataModel.setRowCount(0);\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t rs2.beforeFirst();\r\n\t\t\t pstmt.close();\r\n\t\t\t return;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\trs2.beforeFirst();\r\n\t\t\tjt.setModel(DbUtils.resultSetToTableModel(rs2));\t\r\n\t\t\tpstmt.close();\r\n\t\t rs1.beforeFirst();\r\n\t\t pstmt2.close();\r\n\t\t return;\r\n\t\t} \r\n\t\t\r\n\t\tString query = \"select file_name as File, docID as Document_ID from inverted_file where (docID !=\"+rs1.getInt(1)+\" OR word='\"+searchTerm2+\"') AND visible=1 group by file_name\";\r\n\t\tPreparedStatement pstmt = con.prepareStatement(query);\r\n\t\tResultSet rs2 = pstmt.executeQuery();//then execute the statement\r\n\r\n\t\t//Checking if the term found in the database\r\n\t\tif (!rs2.next()) {\r\n\t\t\tjt.setModel(dataModel);\r\n\t\t\tdataModel.setRowCount(0);\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t rs2.beforeFirst();\r\n\t\t pstmt.close();\r\n\t\t return;\r\n\t\t} \r\n\t\t\r\n\t\trs2.beforeFirst();\r\n\t\tjt.setModel(DbUtils.resultSetToTableModel(rs2));\t\r\n\t\tpstmt.close();\r\n\t\tpstmt2.close();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tString query2 = \"select docID from soundex_table where soundex = ? group by docID\";\r\n\t\t\tPreparedStatement pstmt2 = con.prepareStatement(query2);\r\n\t\t\tpstmt2.setString(1, sndx.encode(searchTerm1));\r\n\t\t\tResultSet rs1 = pstmt2.executeQuery();//then execute the statement\r\n\t\t\tif (!rs1.next()) {\r\n\t\t\t\tString query = \"select file_name as File, docID as Document_ID from soundex_table where soundex=? AND visible=1 group by file_name\";\r\n\t\t\t\tPreparedStatement pstmt = con.prepareStatement(query);\r\n\t\t\t\tpstmt.setString(1, sndx.encode(searchTerm2));\r\n\t\t\t\tResultSet rs2 = pstmt.executeQuery();//then execute the statement\r\n\t\t\t\t\r\n\t\t\t\tif (!rs2.next()) {\r\n\t\t\t\t\tjt.setModel(dataModel);\r\n\t\t\t\t\tdataModel.setRowCount(0);\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t rs2.beforeFirst();\r\n\t\t\t\t pstmt.close();\r\n\t\t\t\t return;\r\n\t\t\t\t} \r\n\t\t\t\t\r\n\t\t\t\trs2.beforeFirst();\r\n\t\t\t\tjt.setModel(DbUtils.resultSetToTableModel(rs2));\t\r\n\t\t\t\tpstmt.close();\r\n\t\t\t rs1.beforeFirst();\r\n\t\t\t pstmt2.close();\r\n\t\t\t return;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tString query = \"select file_name as File, docID as Document_ID from soundex_table where (docID !=\"+rs1.getInt(1)+\" OR soundex=?) AND visible=1 group by file_name\";\r\n\t\t\tPreparedStatement pstmt = con.prepareStatement(query);\r\n\t\t\tpstmt.setString(1, sndx.encode(searchTerm2));\r\n\t\t\tResultSet rs2 = pstmt.executeQuery();//then execute the statement\r\n\t\t\t\r\n\t\t\t//Checking if the term found in the database\r\n\t\t\tif (!rs2.next()) {\r\n\t\t\t\tjt.setModel(dataModel);\r\n\t\t\t\tdataModel.setRowCount(0);\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t rs2.beforeFirst();\r\n\t\t\t pstmt.close();\r\n\t\t\t return;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\trs2.beforeFirst();\r\n\t\t\tjt.setModel(DbUtils.resultSetToTableModel(rs2));\t\r\n\t\t\tpstmt.close();\r\n\t\t\tpstmt2.close();\r\n\t\t}\r\n\t\t\r\n\t}",
"void unsetNumberOfResults();",
"private void findHide() {\n \tif (this.pagesView != null) this.pagesView.setFindMode(false);\n \tthis.currentFindResultNumber = null;\n \tthis.currentFindResultPage = null;\n \tthis.findButtonsLayout.setVisibility(View.GONE);\n }",
"abstract void clearSearchResults();",
"@Override\n public void removeHighlight()\n {\n }",
"@Override\n public void onActionViewCollapsed() {\n setQuery(\"\", false);\n super.onActionViewCollapsed();\n }",
"private void clearFind() {\n\t\tthis.currentFindResultPage = null;\n\t\tthis.currentFindResultNumber = null;\n \tthis.pagesView.setFindMode(false);\n\t\tthis.findButtonsLayout.setVisibility(View.GONE);\n }",
"protected void requestedTermNotTermData(JTable jt,String searchTerm1, String searchTerm2, boolean soundex) throws SQLException\r\n\t{\r\n\t\tif(!soundex)\r\n\t\t{\r\n\t\tString query2 = \"select docID from inverted_file where word = '\"+searchTerm2+\"' group by docID\";\r\n\t\tPreparedStatement pstmt2 = con.prepareStatement(query2);\r\n\t\tResultSet rs1 = pstmt2.executeQuery();//then execute the statement\r\n\t\tif (!rs1.next()) {\r\n\t\t\tString query = \"select file_name as File, docID as Document_ID from inverted_file where word='\"+searchTerm1+\"' AND visible=1 group by file_name\";\r\n\t\t\tPreparedStatement pstmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs2 = pstmt.executeQuery();//then execute the statement\r\n\t\t\t\r\n\t\t\tif (!rs2.next()) {\r\n\t\t\t\tjt.setModel(dataModel);\r\n\t\t\t\tdataModel.setRowCount(0);\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t rs2.beforeFirst();\r\n\t\t\t pstmt.close();\r\n\t\t\t return;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\trs2.beforeFirst();\r\n\t\t\tjt.setModel(DbUtils.resultSetToTableModel(rs2));\t\r\n\t\t\tpstmt.close();\r\n\t\t rs1.beforeFirst();\r\n\t\t pstmt2.close();\r\n\t\t return;\r\n\t\t} \r\n\t\t\r\n\t\tString query = \"select file_name as File, docID as Document_ID from inverted_file where (docID !=\"+rs1.getInt(1)+\" AND word='\"+searchTerm1+\"') AND visible=1 group by file_name\";\r\n\t\tPreparedStatement pstmt = con.prepareStatement(query);\r\n\t\tResultSet rs2 = pstmt.executeQuery();//then execute the statement\r\n\r\n\t\t//Checking if the term found in the database\r\n\t\tif (!rs2.next()) {\r\n\t\t\tjt.setModel(dataModel);\r\n\t\t\tdataModel.setRowCount(0);\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t rs2.beforeFirst();\r\n\t\t pstmt.close();\r\n\t\t return;\r\n\t\t} \r\n\t\t\r\n\t\trs2.beforeFirst();\r\n\t\tjt.setModel(DbUtils.resultSetToTableModel(rs2));\t\r\n\t\tpstmt.close();\r\n\t\tpstmt2.close();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tString query2 = \"select docID from soundex_table where soundex = ? group by docID\";\r\n\t\t\tPreparedStatement pstmt2 = con.prepareStatement(query2);\r\n\t\t\tpstmt2.setString(1, sndx.encode(searchTerm2));\r\n\t\t\tResultSet rs1 = pstmt2.executeQuery();//then execute the statement\r\n\t\t\tif (!rs1.next()) {\r\n\t\t\t\tString query = \"select file_name as File, docID as Document_ID from soundex_table where soundex=? AND visible=1 group by file_name\";\r\n\t\t\t\tPreparedStatement pstmt = con.prepareStatement(query);\r\n\t\t\t\tpstmt.setString(1, sndx.encode(searchTerm1));\r\n\t\t\t\tResultSet rs2 = pstmt.executeQuery();//then execute the statement\r\n\t\t\t\t\r\n\t\t\t\tif (!rs2.next()) {\r\n\t\t\t\t\tjt.setModel(dataModel);\r\n\t\t\t\t\tdataModel.setRowCount(0);\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t rs2.beforeFirst();\r\n\t\t\t\t pstmt.close();\r\n\t\t\t\t return;\r\n\t\t\t\t} \r\n\t\t\t\t\r\n\t\t\t\trs2.beforeFirst();\r\n\t\t\t\tjt.setModel(DbUtils.resultSetToTableModel(rs2));\t\r\n\t\t\t\tpstmt.close();\r\n\t\t\t rs1.beforeFirst();\r\n\t\t\t pstmt2.close();\r\n\t\t\t return;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tString query = \"select file_name as File, docID as Document_ID from soundex_table where (docID !=\"+rs1.getInt(1)+\" AND soundex=?) AND visible=1 group by file_name\";\r\n\t\t\tPreparedStatement pstmt = con.prepareStatement(query);\r\n\t\t\tpstmt.setString(1, sndx.encode(searchTerm1));\r\n\t\t\tResultSet rs2 = pstmt.executeQuery();//then execute the statement\r\n\t\t\t\r\n\t\t\t//Checking if the term found in the database\r\n\t\t\tif (!rs2.next()) {\r\n\t\t\t\tjt.setModel(dataModel);\r\n\t\t\t\tdataModel.setRowCount(0);\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t rs2.beforeFirst();\r\n\t\t\t pstmt.close();\r\n\t\t\t return;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\trs2.beforeFirst();\r\n\t\t\tjt.setModel(DbUtils.resultSetToTableModel(rs2));\t\r\n\t\t\tpstmt.close();\r\n\t\t\tpstmt2.close();\r\n\t\t}\r\n\t\t\r\n\t}",
"protected void requestedNotAndData(JTable jt,String searchTerm1, String searchTerm2, boolean soundex) throws SQLException\r\n\t{\r\n\t\tif(!soundex)\r\n\t\t{\r\n\t\tString query2 = \"select docID from inverted_file where word = '\"+searchTerm1+\"' group by docID\";\r\n\t\tPreparedStatement pstmt2 = con.prepareStatement(query2);\r\n\t\tResultSet rs1 = pstmt2.executeQuery();//then execute the statement\r\n\t\tif (!rs1.next()) {\r\n\t\t\tString query = \"select file_name as File, docID as Document_ID from inverted_file where word='\"+searchTerm2+\"' AND visible=1 group by file_name\";\r\n\t\t\tPreparedStatement pstmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs2 = pstmt.executeQuery();//then execute the statement\r\n\t\t\t\r\n\t\t\tif (!rs2.next()) {\r\n\t\t\t\tjt.setModel(dataModel);\r\n\t\t\t\tdataModel.setRowCount(0);\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t rs2.beforeFirst();\r\n\t\t\t pstmt.close();\r\n\t\t\t return;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\trs2.beforeFirst();\r\n\t\t\tjt.setModel(DbUtils.resultSetToTableModel(rs2));\t\r\n\t\t\tpstmt.close();\r\n\t\t rs1.beforeFirst();\r\n\t\t pstmt2.close();\r\n\t\t return;\r\n\t\t} \r\n\t\t\r\n\t\tString query = \"select file_name as File, docID as Document_ID from inverted_file where (docID !=\"+rs1.getInt(1)+\" AND word='\"+searchTerm2+\"') AND visible=1 group by file_name\";\r\n\t\tPreparedStatement pstmt = con.prepareStatement(query);\r\n\t\tResultSet rs2 = pstmt.executeQuery();//then execute the statement\r\n\r\n\t\t//Checking if the term found in the database\r\n\t\tif (!rs2.next()) {\r\n\t\t\tjt.setModel(dataModel);\r\n\t\t\tdataModel.setRowCount(0);\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t rs2.beforeFirst();\r\n\t\t pstmt.close();\r\n\t\t return;\r\n\t\t} \r\n\t\t\r\n\t\trs2.beforeFirst();\r\n\t\tjt.setModel(DbUtils.resultSetToTableModel(rs2));\t\r\n\t\tpstmt.close();\r\n\t\tpstmt2.close();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tString query2 = \"select docID from soundex_table where soundex = ? group by docID\";\r\n\t\t\tPreparedStatement pstmt2 = con.prepareStatement(query2);\r\n\t\t\tpstmt2.setString(1, sndx.encode(searchTerm1));\r\n\t\t\tResultSet rs1 = pstmt2.executeQuery();//then execute the statement\r\n\t\t\tif (!rs1.next()) {\r\n\t\t\t\tString query = \"select file_name as File, docID as Document_ID from soundex_table where soundex=? AND visible=1 group by file_name\";\r\n\t\t\t\tPreparedStatement pstmt = con.prepareStatement(query);\r\n\t\t\t\tpstmt.setString(1, sndx.encode(searchTerm2));\r\n\t\t\t\tResultSet rs2 = pstmt.executeQuery();//then execute the statement\r\n\t\t\t\t\r\n\t\t\t\tif (!rs2.next()) {\r\n\t\t\t\t\tjt.setModel(dataModel);\r\n\t\t\t\t\tdataModel.setRowCount(0);\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t rs2.beforeFirst();\r\n\t\t\t\t pstmt.close();\r\n\t\t\t\t return;\r\n\t\t\t\t} \r\n\t\t\t\t\r\n\t\t\t\trs2.beforeFirst();\r\n\t\t\t\tjt.setModel(DbUtils.resultSetToTableModel(rs2));\t\r\n\t\t\t\tpstmt.close();\r\n\t\t\t rs1.beforeFirst();\r\n\t\t\t pstmt2.close();\r\n\t\t\t return;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tString query = \"select file_name as File, docID as Document_ID from soundex_table where (docID !=\"+rs1.getInt(1)+\" AND soundex=?) AND visible=1 group by file_name\";\r\n\t\t\tPreparedStatement pstmt = con.prepareStatement(query);\r\n\t\t\tpstmt.setString(1, sndx.encode(searchTerm2));\r\n\t\t\tResultSet rs2 = pstmt.executeQuery();//then execute the statement\r\n\t\t\t\r\n\t\t\t//Checking if the term found in the database\r\n\t\t\tif (!rs2.next()) {\r\n\t\t\t\tjt.setModel(dataModel);\r\n\t\t\t\tdataModel.setRowCount(0);\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t rs2.beforeFirst();\r\n\t\t\t pstmt.close();\r\n\t\t\t return;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\trs2.beforeFirst();\r\n\t\t\tjt.setModel(DbUtils.resultSetToTableModel(rs2));\t\r\n\t\t\tpstmt.close();\r\n\t\t\tpstmt2.close();\r\n\t\t}\t\r\n\t}",
"public void logout() {\n\t\tsetToViewMode();\n\t\t\n\t\tif(supplierList.getModel().getSize() > 0){\n\t\t\tsupplierList.clearSelection();\n\t\t\tsupplierList.setSelectedValue(supplierList.getModel().getElementAt(0), true);\t\t\n\t\t} else {\n\t\t\tString empty = \"\";\n\t\t\tsetNameTF(empty);\n\t\t\tsetAddressTF(empty);\n\t\t\tseteMailTF(empty);\n\t\t\tsetIDTF(empty);\n\t\t\ttelTF.setText(empty);\n\t\t}\n\t}",
"public void clearFilter(){\n\t\tthis.filterApplied=false;\n\t\tindex_begin=0;\n\t\tindex_end=models.size()-1;\n\t\tnotifyDataSetChanged();\n\t\tnotifyDataSetInvalidated();\n\t\treturn;\n\t}",
"void clearModifiedFlag();",
"void cancelSelectMode();",
"public void performSuppression() {\n \n for (int row = 0; row < dataOutput.getNumRows(); row++) {\n if (privacyModelDefinesSubset == null || privacyModelDefinesSubset.contains(row)) {\n final int hash = dataOutput.hashCode(row);\n final int index = hash & (hashTableBuckets.length - 1);\n HashGroupifyEntry m = hashTableBuckets[index];\n while ((m != null) && ((m.hashcode != hash) || !dataOutput.equalsIgnoringOutliers(row, m.row))) {\n m = m.next;\n }\n if (m == null) {\n throw new RuntimeException(\"Invalid state! Group the data before suppressing records!\");\n }\n if (!m.isNotOutlier || this.isCompletelyGeneralized(m)) {\n dataOutput.or(row, Data.OUTLIER_MASK);\n m.isNotOutlier = false;\n }\n } else {\n dataOutput.or(row, Data.OUTLIER_MASK);\n }\n }\n }",
"public void resetSearchSelection() {\n this.quantSearchSelection = null;\n SelectionChanged(\"reset_quant_searching\");\n }",
"private void enableRemove(){\n addSubmit.setDisable(true);\n removeSubmit.setDisable(false);\n setSubmit.setDisable(true);\n addCS.setDisable(true);\n removeCS.setDisable(false);\n setCS.setDisable(true);\n addIT.setDisable(true);\n removeIT.setDisable(false);\n setIT.setDisable(true);\n addECE.setDisable(true);\n removeECE.setDisable(false);\n setECE.setDisable(true);\n partTime.setDisable(true);\n fullTime.setDisable(true);\n management.setDisable(true);\n dateAddText.setDisable(true);\n dateRemoveText.setDisable(false);\n dateSetText.setDisable(true);\n nameAddText.setDisable(true);\n nameRemoveText.setDisable(false);\n nameSetText.setDisable(true);\n hourlyAddText.setDisable(true);\n annualAddText.setDisable(true);\n managerRadio.setDisable(true);\n dHeadRadio.setDisable(true);\n directorRadio.setDisable(true);\n //codeAddText.setDisable(true);\n hoursSetText.setDisable(true);\n }",
"void unsetSearchWindowEnd();",
"public void clearSearch() {\n searchParam = \"\";\n lazyModel = null;\n listRemotoFake = null;\n first = 0;\n rows = 10;\n }",
"@Override\n\tpublic void onStop()\n\t{\n\t\tsuper.onStop();\n\t\tNaviWords.setSearchType(null);\t\n\t}",
"protected void requestedOrNotData(JTable jt,String searchTerm1, String searchTerm2, String searchTerm3, boolean soundex) throws SQLException\r\n\t{\r\n\t\tif(!soundex)\r\n\t\t{\r\n\t\t\tString query2 = \"select docID from inverted_file where word = '\"+searchTerm3+\"' group by docID\";\r\n\t\t\tPreparedStatement pstmt2 = con.prepareStatement(query2);\r\n\t\t\tResultSet rs1 = pstmt2.executeQuery();//then execute the statement\r\n\t\t\tif (!rs1.next()) {\r\n\t\t\t\tString query = \"select file_name as File, docID as Document_ID from inverted_file where (word='\"+searchTerm1+\"' OR word='\"+searchTerm2+\"') AND visible=1 group by file_name\";\r\n\t\t\t\tPreparedStatement pstmt = con.prepareStatement(query);\r\n\t\t\t\tResultSet rs2 = pstmt.executeQuery();//then execute the statement\r\n\t\t\t\t\r\n\t\t\t\tif (!rs2.next()) {\r\n\t\t\t\t\tjt.setModel(dataModel);\r\n\t\t\t\t\tdataModel.setRowCount(0);\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t rs2.beforeFirst();\r\n\t\t\t\t pstmt.close();\r\n\t\t\t\t return;\r\n\t\t\t\t} \r\n\t\t\t\t\r\n\t\t\t\trs2.beforeFirst();\r\n\t\t\t\tjt.setModel(DbUtils.resultSetToTableModel(rs2));\t\r\n\t\t\t\tpstmt.close();\r\n\t\t\t rs1.beforeFirst();\r\n\t\t\t pstmt2.close();\r\n\t\t\t return;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tString query = \"select file_name as File, docID as Document_ID from inverted_file where (word='\"+searchTerm1+\"' OR word='\"+searchTerm2+\"') AND docID !=\"+rs1.getInt(1)+\" AND visible=1 group by file_name\";\r\n\t\t\tPreparedStatement pstmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs2 = pstmt.executeQuery();//then execute the statement\r\n\r\n\r\n\t\t\t//Checking if the term found in the database\r\n\t\t\tif (!rs2.next()) {\r\n\t\t\t\tjt.setModel(dataModel);\r\n\t\t\t\tdataModel.setRowCount(0);\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t rs2.beforeFirst();\r\n\t\t\t pstmt.close();\r\n\t\t\t return;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\trs2.beforeFirst();\r\n\t\t\tjt.setModel(DbUtils.resultSetToTableModel(rs2));\t\r\n\t\t\tpstmt.close();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tString query2 = \"select docID from soundex_table where soundex = ? group by docID\";\r\n\t\t\tPreparedStatement pstmt2 = con.prepareStatement(query2);\r\n\t\t\tpstmt2.setString(1, sndx.encode(searchTerm3));\r\n\t\t\tResultSet rs1 = pstmt2.executeQuery();//then execute the statement\r\n\t\t\tif (!rs1.next()) {\r\n\t\t\t\tString query = \"select file_name as File, docID as Document_ID from soundex_table where (soundex= ? OR soundex= ?) AND visible=1 group by file_name\";\r\n\t\t\t\tPreparedStatement pstmt = con.prepareStatement(query);\r\n\t\t\t\tpstmt.setString(1, sndx.encode(searchTerm1));\r\n\t\t\t\tpstmt.setString(2, sndx.encode(searchTerm2));\r\n\t\t\t\tResultSet rs2 = pstmt.executeQuery();//then execute the statement\r\n\t\t\t\t\r\n\t\t\t\tif (!rs2.next()) {\r\n\t\t\t\t\tjt.setModel(dataModel);\r\n\t\t\t\t\tdataModel.setRowCount(0);\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t rs2.beforeFirst();\r\n\t\t\t\t pstmt.close();\r\n\t\t\t\t return;\r\n\t\t\t\t} \r\n\t\t\t\t\r\n\t\t\t\trs2.beforeFirst();\r\n\t\t\t\tjt.setModel(DbUtils.resultSetToTableModel(rs2));\t\r\n\t\t\t\tpstmt.close();\r\n\t\t\t rs1.beforeFirst();\r\n\t\t\t pstmt2.close();\r\n\t\t\t return;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tString query = \"select file_name as File, docID as Document_ID from soundex_table where (soundex= ? OR soundex= ?) AND docID !=\"+rs1.getInt(1)+\" AND visible=1 group by file_name\";\r\n\t\t\tPreparedStatement pstmt = con.prepareStatement(query);\r\n\t\t\tpstmt.setString(1, sndx.encode(searchTerm1));\r\n\t\t\tpstmt.setString(2, sndx.encode(searchTerm2));\r\n\t\t\tResultSet rs2 = pstmt.executeQuery();//then execute the statement\r\n\t\t\t\r\n\t\t\t//Checking if the term found in the database\r\n\t\t\tif (!rs2.next()) {\r\n\t\t\t\tjt.setModel(dataModel);\r\n\t\t\t\tdataModel.setRowCount(0);\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t rs2.beforeFirst();\r\n\t\t\t pstmt.close();\r\n\t\t\t return;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\trs2.beforeFirst();\r\n\t\t\tjt.setModel(DbUtils.resultSetToTableModel(rs2));\t\r\n\t\t\tpstmt.close();\r\n\t\t}\r\n\t}",
"@Override\n public void onSearchCleared() {\n }",
"private void removeEndQuery(){\n setMainQuery(getMainQuery().substring(0,getMainQuery().length()-1));\n setCountQuery(getCountQuery().substring(0,getCountQuery().length()-1));\n }",
"void unsetLastrunresult();",
"public void reset() {\n\n\t\trbNone.setSelected(true);\n\t\tquizIDField.clear();\n\t\tfilter();\n\t\t\n\t}",
"protected void removeSelection() {\n\t\tBEAN oldBean = getInternalValue();\n\t\tsetInternalValue(null);\n\t\ttextField.setValue(null);\n\t\tif (searchListener != null) {\n\t\t\tsearchListener.remove(oldBean);\n\t\t}\n\t}",
"public void removeEntry(ActionEvent event) {\n\t\tnewReport2.removeSample(table.getSelectionModel().getSelectedItem());\n\t\ttable.getItems().removeAll(table.getSelectionModel().getSelectedItem());\n\t\tif(conclusionNumbers1.indexOf(table.getSelectionModel().getSelectedItem().getSampleNumber())!=-1) {\n\t\t\tconclusionNumbers1.remove(conclusionNumbers1.indexOf(table.getSelectionModel().getSelectedItem().getSampleNumber()));\n\t\t}\n\t\telse {\n\t\t\tconclusionNumbers2.remove(conclusionNumbers2.indexOf(table.getSelectionModel().getSelectedItem().getSampleNumber()));\n\t\t}\n\t}",
"private void getClearButtonSemantics() {\n //TODO implement method\n searchView.getSearchValueTextField().setText(\"\");\n searchView.getFieldComboBox().setSelectedIndex(-1);\n searchView.getResultsTextArea().setText(\"\");\n searchView.getSearchValueTextField().requestFocus();\n }",
"@Override\n public boolean onQueryTextSubmit(String query) {\n topStories = false;\n filter.setQuery(query);\n gvResults.clearOnScrollListeners();\n setUpRecycler();\n findViewById(R.id.relativeLayout).setVisibility(View.GONE);\n findViewById(R.id.tvHeading).setVisibility(View.GONE);\n fetchArticles(0,true);\n searchView.clearFocus();\n return true;\n }",
"private void clearFields() {\r\n keywords = \"\";\r\n searchBy = \"\";\r\n }",
"@Override\n public void onDestroyActionMode(ActionMode mode) {\n \tmSelection.clearSelection();\n }",
"@Override\n\t\t\tpublic void removeUpdate(DocumentEvent arg0) {\n\t\t\t\tsearchUser(search.getText().toString());\n\t\t\t}",
"public void clearmarks ()\n\t// clear all marks in the current node\n\t{\n\t\tgetinformation();\n\t\tundonode();\n\t\tListElement la = Pos.node().actions(), lan;\n\t\tAction a;\n\t\twhile (la != null)\n\t\t{\n\t\t\ta = (Action)la.content();\n\t\t\tlan = la.next();\n\t\t\tif (a.type().equals(\"M\") || a.type().equals(\"L\")\n\t\t\t\t|| a.type().equals(\"MA\") || a.type().equals(\"SQ\")\n\t\t\t\t|| a.type().equals(\"SL\") || a.type().equals(\"CR\")\n\t\t\t\t|| a.type().equals(\"TR\") || a.type().equals(\"LB\"))\n\t\t\t{\n\t\t\t\tPos.node().removeaction(la);\n\t\t\t}\n\t\t\tla = lan;\n\t\t}\n\t\tsetnode();\n\t\tshowinformation();\n\t\tcopy();\n\t}",
"public void markOperationAsNoOp(DocWriteResponse response) {\n assertInvariants(ItemProcessingState.INITIAL);\n executionResult = new BulkItemResponse(getCurrentItem().id(), getCurrentItem().request().opType(), response);\n currentItemState = ItemProcessingState.EXECUTED;\n assertInvariants(ItemProcessingState.EXECUTED);\n }",
"@Override\n public void onDestroyActionMode(ActionMode mode) {\n isEnable = false;\n //set isSelectAll false\n isSelectAll = false;\n //clear selectList\n selectList.clear();\n //notify adaptor\n notifyDataSetChanged();\n }",
"public void Show_only_completed()\r\n {\n if(!this.filter)\r\n {\r\n if(tableView.getItems().size()>0) {\r\n for (int i = 0; i < tableView.getItems().size(); i++) {\r\n ucf.assignments.list selectedList = tableView.getItems().get(i);\r\n this.all_items.add(selectedList);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n resettable();\r\n }\r\n this.filter = true;\r\n ArrayList<ucf.assignments.list> tmplist = new ArrayList<ucf.assignments.list>();\r\n\r\n for(int i = 0; i<tableView.getItems().size();i++)\r\n {\r\n ucf.assignments.list selectedList = tableView.getItems().get(i);\r\n if(selectedList.getstatus())\r\n tmplist.add(selectedList);\r\n }\r\n tableView.getItems().removeAll(tmplist);\r\n }",
"public void resetFilter();",
"@Override\n\tpublic void excluir() {\n\t\t\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) //\n {\n if(!flag)\n rs.setRowFilter(RowFilter.regexFilter(FilterText.getText(), 0, selectedColumn.getModelIndex()));\n }",
"@Override\n\tpublic String delete(Set<String> filterField) {\n\t\treturn null;\n\t}",
"private static void hideFilters(List<HealthDataFilter> allFilters) {\n Set<String> userHideFilterChoices = PreferenceUtility.getUserHideFilterChoices();\n if (userHideFilterChoices==null){\n if (AppConstant.DEBUG) Log.i(\"AppUtility:\"+\">\",\"Was no saved hidden filter\");\n return;\n }\n Iterator<HealthDataFilter> iterator = allFilters.iterator();\n while (iterator.hasNext()) {\n HealthDataFilter next = iterator.next();\n // if (next.getFilterName().equals(\"QUEENS\")){\n if (userHideFilterChoices.contains(next.getFilterName())){\n iterator.remove();\n }\n }\n }",
"public void hideAnswerResult() {\n hideAnswerResult(true);\n }",
"boolean doFilter() { return false; }",
"public SearchResult clearFacetsEntries() {\n this.facets = null;\n return this;\n }",
"public void clear() {\r\n oredCriteria.clear();\r\n }",
"public void clear() {\r\n oredCriteria.clear();\r\n }",
"public void clear() {\r\n oredCriteria.clear();\r\n }",
"public void clear() {\r\n oredCriteria.clear();\r\n }",
"public void clear() {\r\n oredCriteria.clear();\r\n }",
"public void clear() {\r\n oredCriteria.clear();\r\n }",
"public void discardLeader(int bool){\n this.leaderCardsPanel.discardLeaderCard(bool);\n }",
"private void clearSearchUserRes() {\n if (rspCase_ == 8) {\n rspCase_ = 0;\n rsp_ = null;\n }\n }",
"protected void requestedAndNotData(JTable jt,String searchTerm1, String searchTerm2, String searchTerm3, boolean soundex) throws SQLException\r\n\t{\r\n\t\tif(!soundex)\r\n\t\t{\r\n\t\t\tString query2 = \"select docID from inverted_file where word = '\"+searchTerm3+\"' group by docID\";\r\n\t\t\tPreparedStatement pstmt2 = con.prepareStatement(query2);\r\n\t\t\tResultSet rs1 = pstmt2.executeQuery();//then execute the statement\r\n\t\t\tif (!rs1.next()) {\r\n\t\t\t\tString query3 = \"select docID from inverted_file where word = '\"+searchTerm1+\"' group by docID\";\r\n\t\t\t\tPreparedStatement pstmt3 = con.prepareStatement(query3);\r\n\t\t\t\tResultSet rs3 = pstmt3.executeQuery();//then execute the statement\r\n\t\t\t\tif(!rs3.next())\r\n\t\t\t\t{\r\n\t\t\t\t\tjt.setModel(dataModel);\r\n\t\t\t\t\tdataModel.setRowCount(0);\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\trs3.beforeFirst();\r\n\t\t\t\t\tpstmt3.close();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tString query = \"select file_name as File, docID as Document_ID from inverted_file where (word='\"+searchTerm2+\"' AND docID=\"+rs3.getInt(1)+\") AND visible=1 group by file_name\";\r\n\t\t\t\tPreparedStatement pstmt = con.prepareStatement(query);\r\n\t\t\t\tResultSet rs2 = pstmt.executeQuery();//then execute the statement\r\n\t\t\t\t\r\n\t\t\t\tif (!rs2.next()) {\r\n\t\t\t\t\tjt.setModel(dataModel);\r\n\t\t\t\t\tdataModel.setRowCount(0);\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t rs2.beforeFirst();\r\n\t\t\t\t pstmt.close();\r\n\t\t\t\t return;\r\n\t\t\t\t} \r\n\t\t\t\t\r\n\t\t\t\trs2.beforeFirst();\r\n\t\t\t\tjt.setModel(DbUtils.resultSetToTableModel(rs2));\t\r\n\t\t\t\tpstmt.close();\r\n\t\t\t rs1.beforeFirst();\r\n\t\t\t pstmt2.close();\r\n\t\t\t return;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tString query3 = \"select docID from inverted_file where word = '\"+searchTerm1+\"' group by docID\";\r\n\t\t\tPreparedStatement pstmt3 = con.prepareStatement(query3);\r\n\t\t\tResultSet rs3 = pstmt3.executeQuery();//then execute the statement\r\n\t\t\tif (!rs3.next()) {\r\n\t\t\t\tjt.setModel(dataModel);\r\n\t\t\t\tdataModel.setRowCount(0);\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t rs3.beforeFirst();\r\n\t\t\t pstmt3.close();\r\n\t\t\t return;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tString query = \"select file_name as File, docID as Document_ID from inverted_file where (word='\"+searchTerm2+\"' AND docID=\"+rs3.getInt(1)+\") AND docID !=\"+rs1.getInt(1)+\" AND visible=1 group by file_name\";\r\n\t\t\tPreparedStatement pstmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs2 = pstmt.executeQuery();//then execute the statement\r\n\r\n\r\n\t\t\t//Checking if the term found in the database\r\n\t\t\tif (!rs2.next()) {\r\n\t\t\t\tjt.setModel(dataModel);\r\n\t\t\t\tdataModel.setRowCount(0);\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t rs2.beforeFirst();\r\n\t\t\t pstmt.close();\r\n\t\t\t return;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\trs2.beforeFirst();\r\n\t\t\tjt.setModel(DbUtils.resultSetToTableModel(rs2));\t\r\n\t\t\tpstmt.close();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tString query2 = \"select docID from soundex_table where soundex = ? group by docID\";\r\n\t\t\tPreparedStatement pstmt2 = con.prepareStatement(query2);\r\n\t\t\tpstmt2.setString(1, sndx.encode(searchTerm3));\r\n\t\t\tResultSet rs1 = pstmt2.executeQuery();//then execute the statement\r\n\t\t\tif (!rs1.next()) {\r\n\t\t\t\tString query3 = \"select docID from soundex_table where soundex = ? group by docID\";\r\n\t\t\t\tPreparedStatement pstmt3 = con.prepareStatement(query3);\r\n\t\t\t\tpstmt3.setString(1, sndx.encode(searchTerm1));\r\n\t\t\t\tResultSet rs3 = pstmt3.executeQuery();//then execute the statement\r\n\t\t\t\tif(!rs3.next())\r\n\t\t\t\t{\r\n\t\t\t\t\tjt.setModel(dataModel);\r\n\t\t\t\t\tdataModel.setRowCount(0);\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\trs3.beforeFirst();\r\n\t\t\t\t\tpstmt3.close();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tString query = \"select file_name as File, docID as Document_ID from soundex_table where (soundex= ? AND docID=\"+rs3.getInt(1)+\") AND visible=1 group by file_name\";\r\n\t\t\t\tPreparedStatement pstmt = con.prepareStatement(query);\r\n\t\t\t\tpstmt.setString(1, sndx.encode(searchTerm2));\r\n\t\t\t\tResultSet rs2 = pstmt.executeQuery();//then execute the statement\r\n\t\t\t\t\r\n\t\t\t\tif (!rs2.next()) {\r\n\t\t\t\t\tjt.setModel(dataModel);\r\n\t\t\t\t\tdataModel.setRowCount(0);\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t rs2.beforeFirst();\r\n\t\t\t\t pstmt.close();\r\n\t\t\t\t return;\r\n\t\t\t\t} \r\n\t\t\t\t\r\n\t\t\t\trs2.beforeFirst();\r\n\t\t\t\tjt.setModel(DbUtils.resultSetToTableModel(rs2));\t\r\n\t\t\t\tpstmt.close();\r\n\t\t\t rs1.beforeFirst();\r\n\t\t\t pstmt2.close();\r\n\t\t\t return;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tString query3 = \"select docID from soundex_table where soundex = ? group by docID\";\r\n\t\t\tPreparedStatement pstmt3 = con.prepareStatement(query3);\r\n\t\t\tpstmt3.setString(1, sndx.encode(searchTerm1));\r\n\t\t\tResultSet rs3 = pstmt3.executeQuery();//then execute the statement\r\n\t\t\tif (!rs3.next()) {\r\n\t\t\t\tjt.setModel(dataModel);\r\n\t\t\t\tdataModel.setRowCount(0);\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t rs3.beforeFirst();\r\n\t\t\t pstmt3.close();\r\n\t\t\t return;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tString query = \"select file_name as File, docID as Document_ID from soundex_table where (soundex= ? AND docID=\"+rs3.getInt(1)+\") AND docID !=\"+rs1.getInt(1)+\" AND visible=1 group by file_name\";\r\n\t\t\tPreparedStatement pstmt = con.prepareStatement(query);\r\n\t\t\tpstmt.setString(1, sndx.encode(searchTerm2));\r\n\t\t\tResultSet rs2 = pstmt.executeQuery();//then execute the statement\r\n\t\t\t\r\n\t\t\t//Checking if the term found in the database\r\n\t\t\tif (!rs2.next()) {\r\n\t\t\t\tjt.setModel(dataModel);\r\n\t\t\t\tdataModel.setRowCount(0);\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Term not found!\", \"Error!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t rs2.beforeFirst();\r\n\t\t\t pstmt.close();\r\n\t\t\t return;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\trs2.beforeFirst();\r\n\t\t\tjt.setModel(DbUtils.resultSetToTableModel(rs2));\t\r\n\t\t\tpstmt.close();\r\n\t\t}\r\n\t}",
"protected void setFilterInMapChanged() {\n rowCount = null;\n }",
"public void refreshSuggestions() {\n resetSections(/* alwaysAllowEmptySections = */false);\n }",
"public void clearResults()\n\t{\n\t\tremoveAll();\n\t\tm_PrinterList.setPrinterList(ToolBox.generatePrinterList().getPrinterList());\n\t\tm_PrinterList.clearMatches(m_PrinterList.getPrinterList());\n\t\tdesignComponents();\n\t\taddComponents();\n\t}",
"public void clear() {\r\n oredCriteria.clear();\r\n }",
"public void removeFeatures(Extent ex) {\n //TODO: remove the features\n }",
"public void deactivate() {\n\t\tSystem.out.println(\"WordReader.deactivate\");\n\t}",
"public void clear() {\n oredCriteria.clear();\n }",
"public void clear() {\n oredCriteria.clear();\n }",
"public void clear() {\n oredCriteria.clear();\n }",
"public void clear() {\n oredCriteria.clear();\n }",
"public void clear() {\n oredCriteria.clear();\n }",
"public void clear() {\n oredCriteria.clear();\n }",
"@Override\n public boolean onQueryTextChange(String s) {\n\n FetchSearchData(s);\n //return false;\n if (data_list.size() == 0) {\n tv_nofound.setVisibility(View.VISIBLE);\n recyclerView.getRecycledViewPool().clear();\n } else {\n tv_nofound.setVisibility(View.GONE);\n }\n\n return true;\n }",
"private void removeSpeciesUnmatching(int optionselected) {\n for (String s : speciesLeft) {\n if (!(criteriaList.get(currentCriteria).getOptionList().get(optionselected).getEntities().contains(s)))\n speciesLeft.remove(s);\n }\n }",
"@Override\n\tpublic void clearFilter() {\n\n\t\t// super.clearFilter();\n\n\t\tSelectOneMenu selectOne = (SelectOneMenu) FacesContext\n\t\t\t\t.getCurrentInstance().getViewRoot()\n\t\t\t\t.findComponent(\"form:uniTable:cmbError\");\n\t\tif (selectOne != null) {\n\t\t\tselectOne.resetValue();\n\t\t}\n\n\t\tcleanDetailFilter();\n\n\t\tRequestContext.getCurrentInstance().execute(\n\t\t\t\t\"PF('uniTableFil').clearFilters()\");\n\n\t}",
"public void clearAllResults(View view) {\n userBMRTextView.setText(\"0\");\n userTDEETextView.setText(\"0\");\n goalCaloriesTextView.setText(\"0\");\n goalRadioGroup.clearCheck();\n goalSpeedRadioGroup.clearCheck();\n }",
"public void removeAnnotations() {\n int size = this.annotationsArray.size();\n long[] jArr = new long[size];\n this.selectedMarkers.clear();\n for (int i = 0; i < size; i++) {\n jArr[i] = this.annotationsArray.keyAt(i);\n Annotation annotation = this.annotationsArray.get(jArr[i]);\n if (annotation instanceof Marker) {\n Marker marker = (Marker) annotation;\n marker.hideInfoWindow();\n this.iconManager.iconCleanup(marker.getIcon());\n }\n }\n this.annotations.removeAll();\n }",
"void unsetSearchRecurrenceStart();",
"public void updateUnseenTermInThisQuery(int relevanceFeedbackMethod) {\n System.out.println(\"Nomor Query Lama : \" + listDocumentRetrievedForThisQuery.getQuery().getIndex());\n System.out.println(\"Isi Query Lama : \" + listDocumentRetrievedForThisQuery.getQuery().getQueryContent());\n int thisQueryIndex = listDocumentRetrievedForThisQuery.getQuery().getIndex();\n for (Map.Entry m : invertedFile.getListTermWeights().entrySet()) {\n String keyTerm = (String) m.getKey();\n if (!isTermAppearInQuery(keyTerm)) {\n double newWeight = computeNewWeightTerm(relevanceFeedbackMethod,keyTerm,0.0);\n if (newWeight > 0) {\n String filteredWord = \"\";\n if (invertedFile.isStemmingApplied()) {\n filteredWord = invertedFile.getMappingStemmedTermToNormalTerm().get(keyTerm);\n } else {\n filteredWord = keyTerm;\n }\n newQueryComposition.put(filteredWord,newWeight);\n invertedFileQuery.insertRowTable(keyTerm,thisQueryIndex,newWeight);\n normalFileQuery.insertElement(thisQueryIndex,keyTerm);\n }\n }\n }\n System.out.println(\"Nomor Query Baru : \" + convertNewQueryComposition().getIndex());\n System.out.println(\"Isi Query Baru : \" + convertNewQueryComposition().getQueryContent());\n }",
"public void clear() {\n oredCriteria.clear();\n }",
"@Override\n public String doSearchResult() {\n return null;\n }",
"private void remove() {\n \t\tfor(int i = 0; i < 5; i++) {\n \t\t\trMol[i].setText(\"\");\n \t\t\trGrams[i].setText(\"\");\n \t\t\tpMol[i].setText(\"\");\n \t\t\tpGrams[i].setText(\"\");\n \t\t}\n }",
"@Override\n protected void query(CompletionResultSet completionRS, Document doc, int caretOffset) {\n // First, we retrieve the filters defined for the hAtom microformat completion\n String strFilter = Filter.EMPRTY_STRING;\n Filter filter = Filter.getFilter();\n \n try {\n StyledDocument styledDoc = (StyledDocument) doc; \n // Get the filter's text based on actual carte position.\n strFilter = filter.getText(styledDoc, caretOffset);\n \n } catch (Exception ex) {\n ex.printStackTrace();\n // if an error occurs, an empty filter is set, so that the completion popup \n // will be filled with all the hAtom keywords.\n strFilter = Filter.EMPRTY_STRING;\n }\n\n // Lista completa dei tag/parole chiave hAtom\n List<String> hatomTags = TagCache.getCache().getTagList();\n\n // Gets the hAtom keywords that match the given filter value.\n for (String tag : hatomTags) {\n boolean startWithFilter = tag.startsWith(strFilter); \n if (!tag.equals(Filter.EMPRTY_STRING) && startWithFilter) {\n completionRS.addItem(new HatomCompletionItem(tag, filter.getFilterOffset(), caretOffset));\n }\n }\n\n // This is required by the Netbeans API docs.\n // After finish() is invoked, no further modifications to the result set are allowed.\n completionRS.finish();\n\n }",
"public void clearModifiedFlag();",
"@Override\r\n\t\t\tpublic void OnUnCheck(Object o) {\n\t\t\t\tchecAll(getProcTbl().getModel().getData(), false);\r\n\t\t\t\tgetProcTbl().updateUI();\r\n\t\t\t}",
"private void resetIdsToFind()\r\n\t{\r\n\t\t/*\r\n\t\t * Reset all lists of given search items to empty lists, indicating full\r\n\t\t * search without filtering, if no search items are added.\r\n\t\t */\r\n\t\tsetSpectrumIdsTarget(new ArrayList<String>());\r\n\t}",
"public void discardUserAction() {\n\t\tshowAnimalList();\n\t}",
"@Override\n\t\t\t\tpublic void removeUpdate(DocumentEvent e) {\n\t\t\t\t\tchange();\n\t\t\t\t}",
"protected final void undo() {\n requireAllNonNull(model, previousResidentBook, previousEventBook);\n model.resetData(previousResidentBook, previousEventBook);\n model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);\n model.updateFilteredEventList(PREDICATE_SHOW_ALL_EVENTS);\n\n }",
"private void resetSearchValues() {\n this.IDOrNameText.setText(\"\");\n this.accordIDButton.setSelected(true);\n this.accordNameButton.setSelected(false);\n type = this.accordIDButton.getText();\n }",
"void removeHasRecommendation(PM_Learning_Material oldHasRecommendation);",
"public void remove (int offs, int len) throws BadLocationException\r\n {\n super.remove (offs, len);\r\n if (offs < selectionStartIndex)\r\n {\r\n selectionStartIndex -= len;\r\n fetchSuggestion (getContent ().getString (0, selectionStartIndex), new SimpleAttributeSet (),\r\n getCaretPosition ());\r\n } else\r\n {\r\n component.getHighlighter ().removeAllHighlights ();\r\n super.remove (offs, getLength () - offs);\r\n }\r\n if (offs > selectionStartIndex)\r\n selectionStartIndex = getLength ();\r\n }"
]
| [
"0.5557217",
"0.54888654",
"0.5329141",
"0.52928054",
"0.52323943",
"0.52079105",
"0.5148626",
"0.5135302",
"0.51289964",
"0.5106162",
"0.507168",
"0.5064134",
"0.50415915",
"0.50023764",
"0.49901465",
"0.4984777",
"0.49767026",
"0.49717784",
"0.4960309",
"0.49404496",
"0.4920071",
"0.4908929",
"0.49014494",
"0.48986506",
"0.48965234",
"0.4888086",
"0.48796886",
"0.48786727",
"0.48552498",
"0.48531228",
"0.48443395",
"0.4841448",
"0.48409167",
"0.48390472",
"0.4818734",
"0.48148897",
"0.48023117",
"0.48003215",
"0.4794478",
"0.47933626",
"0.4791585",
"0.47873685",
"0.4782978",
"0.47800112",
"0.47715098",
"0.4769662",
"0.47597018",
"0.4750686",
"0.47491735",
"0.4742428",
"0.47387192",
"0.47381148",
"0.47293702",
"0.47225833",
"0.4722431",
"0.47199857",
"0.47145748",
"0.47142723",
"0.47071743",
"0.4696805",
"0.46959805",
"0.46959805",
"0.46959805",
"0.46959805",
"0.46959805",
"0.46959805",
"0.46927458",
"0.469015",
"0.4685969",
"0.46814758",
"0.4681337",
"0.46800828",
"0.46730015",
"0.46695778",
"0.4663203",
"0.4659301",
"0.4659301",
"0.4659301",
"0.4659301",
"0.4659301",
"0.4659301",
"0.46590903",
"0.46563077",
"0.4655095",
"0.46513593",
"0.46511438",
"0.46498224",
"0.4647034",
"0.46460417",
"0.46439695",
"0.4643189",
"0.463868",
"0.4633486",
"0.46333432",
"0.46260038",
"0.4625768",
"0.46189207",
"0.46172756",
"0.46134642",
"0.46122468",
"0.4602511"
]
| 0.0 | -1 |
let's only do 2 thumbnails | protected void addInstagramResultsPage(Panel middleTable, List<Data> instagrams) {
HorizontalPanel hp = new HorizontalPanel();
middleTable.add(hp);
int i = 0;
for (Data data : instagrams) {
if (i >= 2) return;
VerticalPanel vp = new VerticalPanel();
if (data.getImages() != null) {
Image image = new Image(data.getImages().getThumbnailResolution().getImageUrl());
vp.add(image);
}
if (data.getCaption() != null) {
vp.add(new Label(data.getCaption().getText()));
}
hp.add(vp);
i++;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isThumbnail();",
"private void deleteThumbnailsImage(String sourceFilePath) {\n\n String fileNailName = FileUtils.getNailName(sourceFilePath); //get the file nailname\n Log.d(TAG,\"file type is : \" + fileNailName);\n\n //throught the file nailname to distinguish the file type\n int imageOrVideoId = -1;\n if (fileNailName.equals(\"jpg\") || fileNailName.equals(\"png\")\n || fileNailName.equals(\"jpeg\") || fileNailName.equals(\"bmp\")) { //delete the image type file thumbnails image\n String columns[] = new String[] { MediaStore.Images.Media.DATA, MediaStore.Images.Media._ID};\n Cursor cursor = this.getContentResolver().query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,\n columns, null, null, null);\n\n if (cursor !=null) {\n cursor.moveToFirst();\n do {\n //get the images._id connect with source file\n if(cursor.getString(cursor.getColumnIndex(MediaStore.Images.Media.DATA)).equals(sourceFilePath)) { //check the source Image Id in MediaStore.Images.Media\n imageOrVideoId = cursor.getInt(cursor.getColumnIndex(MediaStore.Images.Media._ID)); //get the source Image Id\n Log.d(TAG,\"file path is : \" + sourceFilePath +\" and file _id is : \" + imageOrVideoId);\n break ;\n }\n } while (cursor.moveToNext());\n\n }\n\n if(imageOrVideoId > 0) {\n String[] projection = {MediaStore.Images.Thumbnails.IMAGE_ID,MediaStore.Images.Thumbnails.DATA};\n Cursor cursorThumbnails = getContentResolver().query(MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI,\n projection, null, null, null);\n if (cursorThumbnails != null) {\n cursorThumbnails.moveToFirst();\n do {\n //thumbnails.image_id and images._id related together\n if (cursorThumbnails.getInt(cursorThumbnails.getColumnIndex(MediaStore.Images.Thumbnails.IMAGE_ID))\n == imageOrVideoId) { //check the source file Id isn't same with thumbnails image_id\n String strThumbnailImagePath = cursorThumbnails.getString(\n cursorThumbnails.getColumnIndex(MediaStore.Images.Thumbnails.DATA)); //get the thumbnails image path\n Log.d(TAG,\"thumbnails Image path is :\" + strThumbnailImagePath);\n File thumbnailsImageFile = new File(strThumbnailImagePath);\n if(thumbnailsImageFile.exists()) {\n boolean deleteThumbnailsIsSucess = false;\n deleteThumbnailsIsSucess = thumbnailsImageFile.delete(); //delete thumbnails iamge\n Log.d(TAG,\"thumbnails Image delete is :\" + deleteThumbnailsIsSucess);\n }\n break;\n }\n } while (cursorThumbnails.moveToNext());\n }\n }\n } else if (fileNailName.equals(\"3gp\") || fileNailName.equals(\"mp4\")\n || fileNailName.equals(\"avi\") || fileNailName.equals(\"wmv\")) { //delete the video type file thumbnails image\n String columns[] = new String[] { MediaStore.Video.Media.DATA, MediaStore.Video.Media._ID};\n Cursor cursor = this.getContentResolver().query(MediaStore.Video.Media.EXTERNAL_CONTENT_URI,\n columns, null, null, null);\n\n if (cursor !=null) {\n cursor.moveToFirst();\n do {\n //get the images._id connect with source file\n if(cursor.getString(cursor.getColumnIndex(MediaStore.Video.Media.DATA)).equals(sourceFilePath)) { //check the source Image Id in MediaStore.Images.Media\n imageOrVideoId = cursor.getInt(cursor.getColumnIndex(MediaStore.Video.Media._ID)); //get the source Image Id\n Log.d(TAG,\"file path is : \" + sourceFilePath +\" and file _id is : \" + imageOrVideoId);\n break ;\n }\n } while (cursor.moveToNext());\n }\n\n if(imageOrVideoId > 0) {\n String[] projection = {MediaStore.Video.Thumbnails.VIDEO_ID,MediaStore.Video.Thumbnails.DATA};\n Cursor cursorThumbnails = getContentResolver().query(MediaStore.Video.Thumbnails.EXTERNAL_CONTENT_URI,\n projection, null, null, null);\n if (cursorThumbnails != null) {\n cursorThumbnails.moveToFirst();\n do {\n //thumbnails.image_id and images._id related together\n if (cursorThumbnails.getInt(cursorThumbnails.getColumnIndex(MediaStore.Video.Thumbnails.VIDEO_ID))\n == imageOrVideoId) { //check the source file Id isn't same with thumbnails image_id\n String strThumbnailImagePath = cursorThumbnails.getString(\n cursorThumbnails.getColumnIndex(MediaStore.Video.Thumbnails.DATA)); //get the thumbnails image path\n Log.d(TAG,\"video_thumbnails Image path is :\" + strThumbnailImagePath);\n File thumbnailsImageFile = new File(strThumbnailImagePath);\n if(thumbnailsImageFile.exists()) {\n boolean deleteThumbnailsIsSucess = false;\n deleteThumbnailsIsSucess = thumbnailsImageFile.delete(); //delete thumbnails iamge\n Log.d(TAG,\"video_thumbnails Image delete is :\" + deleteThumbnailsIsSucess);\n }\n break;\n }\n } while (cursorThumbnails.moveToNext());\n }\n }\n } else {\n //not the media type, it hasn't thumbnails image\n Log.d(TAG,\"file type is : \" + fileNailName + \" , not a Media type, it hasn't thumbnail image.\");\n }\n\n return;\n }",
"protected void createThumbnail(int requestCode) {\n\n Bitmap bitmap = null;\n Bitmap thumbnail;\n if(requestCode == CHOOSE_PHOTO_REQUEST || requestCode == TAKE_PHOTO_REQUEST) {\n\n try {\n bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), mMediaUri);\n } catch (Exception e) {\n //handle exception here\n Toast.makeText(SendMessage.this,R.string.error_loading_thumbnail, Toast.LENGTH_LONG).show();\n Log.d(\"Vic\",\"Error loading thumbnail\" + e.toString());\n }\n int initialWidth = bitmap.getWidth();\n int initalHeight = bitmap.getHeight();\n int newWidth = 0;\n int newHeight = 0;\n\n //izchisliavame novite proporcii\n float ratio =(float) initialWidth / initalHeight;\n newWidth = 800 ;\n newHeight = (int) (800 * ratio) ;\n\n thumbnail = ThumbnailUtils.extractThumbnail(bitmap, newWidth, newHeight);\n\n } else { //ako ne e photo triabva da e video\n\n thumbnail = ThumbnailUtils.extractThumbnail(ThumbnailUtils.createVideoThumbnail(\n mMediaUri.getPath(), MediaStore.Images.Thumbnails.MINI_KIND), 800, 500);\n }\n\n ImageView imageViewForThumbnailPreview = (ImageView) findViewById(R.id.thumbnailPreview);\n\n\n imageViewForThumbnailPreview.setImageBitmap(thumbnail);\n if(thumbnail ==null) {\n //ako thumbnail e null zadavame default kartinka\n imageViewForThumbnailPreview.setImageResource(R.drawable.ic_action_picture);\n }\n }",
"public static byte[] createThumbnail(byte[] originalImage, int width, int height) throws Exception{\n Image image = Toolkit.getDefaultToolkit().createImage(originalImage);\r\n MediaTracker mediaTracker = new MediaTracker(new Container());\r\n mediaTracker.addImage(image, 0);\r\n mediaTracker.waitForID(0);\r\n // determine thumbnail size from WIDTH and HEIGHT\r\n //ancho y largo esto se puede sacar de algun fichero de configuracion\r\n int thumbWidth =width;\r\n int thumbHeight = height;\r\n double thumbRatio = (double)thumbWidth / (double)thumbHeight;\r\n int imageWidth = image.getWidth(null);\r\n int imageHeight = image.getHeight(null);\r\n double imageRatio = (double)imageWidth / (double)imageHeight;\r\n if (thumbRatio < imageRatio) {\r\n thumbHeight = (int)(thumbWidth / imageRatio);\r\n } else {\r\n thumbWidth = (int)(thumbHeight * imageRatio);\r\n }\r\n // draw original image to thumbnail image object and\r\n // scale it to the new size on-the-fly\r\n BufferedImage thumbImage = new BufferedImage(thumbWidth, thumbHeight, BufferedImage.TYPE_INT_RGB);\r\n Graphics2D graphics2D = thumbImage.createGraphics();\r\n graphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);\r\n graphics2D.drawImage(image, 0, 0, thumbWidth, thumbHeight, null);\r\n\r\n ByteArrayOutputStream baos= new ByteArrayOutputStream();\r\n ImageIO.write(thumbImage, \"jpeg\" /* \"png\" \"jpeg\" format desired, no \"gif\" yet. */, baos );\r\n baos.flush();\r\n byte[] thumbImageAsRawBytes= baos.toByteArray();\r\n baos.close();\r\n return thumbImageAsRawBytes;\r\n\r\n}",
"void setThumbnail(boolean thumbnail);",
"public static ContentValues findOrGenerateThumbnail(ContentValues timelapse){\n\t\t\n\t\tFile timelapse_dir = new File(timelapse.getAsString(SQLiteWrapper.COLUMN_DIRECTORY_PATH));\n\t\tLog.d(\"findOrGenerateThumbnail\",timelapse_dir.getAbsolutePath());\n\t\t// if the timelapse dir does not exist or is a file,\n\t\t// fixing the application state is beyond the scope of this method\n\t\t// TODO: for performance, remove this check \n\t\tif(!timelapse_dir.exists() || timelapse_dir.isFile())\n\t\t\treturn timelapse;\n\t\t\n\t\t// Make thumbnail folder if it doesn't exist\n\t\tFile thumbnail_dir = new File(timelapse_dir, TimeLapse.thumbnail_dir);\n\t if (! thumbnail_dir.exists()){\n\t if (! thumbnail_dir.mkdirs()){\n\t Log.d(TAG, \"failed to create thumbnail directory\");\n\t return timelapse;\n\t }\n\t }\n\t // Determine last image in TimeLapse dir and generate thumbnail if it doesn't exist\n\t\tFile[] children = timelapse_dir.listFiles(new imageFilter());\n\t\ttimelapse.put(SQLiteWrapper.COLUMN_IMAGE_COUNT, timelapse_dir.listFiles(new imageFilter()).length);\n\t\t// Generate thumbnail of last image and save to storage as \"./thumbnail_dir/XXXthumbnail_suffix.jpeg\"\n\t\tFile original = new File(timelapse_dir, timelapse.getAsString(SQLiteWrapper.COLUMN_IMAGE_COUNT) + \".jpeg\");\n\t\ttimelapse.put(SQLiteWrapper.COLUMN_LAST_IMAGE_PATH, original.getAbsolutePath()); \n\t\tBitmap thumbnail_bitmap = FileUtils.decodeSampledBitmapFromResource(original.getAbsolutePath(), TimeLapse.thumbnail_width, TimeLapse.thumbnail_height);\n\t\tFile thumbnail_file = new File(thumbnail_dir, timelapse.getAsString(SQLiteWrapper.COLUMN_IMAGE_COUNT)+ TimeLapse.thumbnail_suffix +\".jpeg\");\n\t\tif(!thumbnail_file.exists()){\n\t\t\tFileOutputStream out;\n\t\t\ttry {\n\t\t\t\tout = new FileOutputStream(thumbnail_file);\n\t\t\t\tthumbnail_bitmap.compress(Bitmap.CompressFormat.JPEG, 90, out);\n\t\t\t\ttimelapse.put(SQLiteWrapper.COLUMN_THUMBNAIL_PATH, thumbnail_file.getAbsolutePath()); \n\t\t\t\t//Log.d(\"Thumbnail\",\"TL \" + String.valueOf(timelapse.id) + \" thumb set to \" + timelapse.thumbnail_path);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t// Not sure when this would happen...\n\t\t\t\t// FileOutputStream creates file if it doesn't exist (the intended case)\n\t\t\t\t// Maybe on permission denied...\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t//if thumbail exists, store it with TimeLapse\n\t\t\ttimelapse.put(SQLiteWrapper.COLUMN_THUMBNAIL_PATH, thumbnail_file.getAbsolutePath());\n\t\t}\n\t\t\n\t\treturn timelapse;\n\t}",
"@Override\n protected Bitmap doInBackground(String... urls) {\n Bitmap bitmap = null;\n Bitmap thumbnail = null;\n try {\n URL url = new URL(urls[0]);\n // Read bitmap from url\n bitmap = BitmapFactory.decodeStream(url.openConnection().getInputStream());\n // Resize bitmap to thumbnail\n thumbnail = Bitmap.createScaledBitmap(bitmap, 149, 101, true);\n } catch(IOException e) {\n System.out.println(e);\n } finally {\n if (thumbnail != null) {\n // Save bitmap and thumbnail into cache\n ImageCache.addBitmapToMemoryCache(urls[0], bitmap);\n ImageCache.addthumbnailToMemoryCache(urls[0], thumbnail);\n }\n if (this.isThumbnail) {\n return thumbnail;\n } else {\n return bitmap;\n }\n }\n }",
"public String getThumbnail();",
"@Override\n public void onClick(View v) {\n if(imageCounter<3)\n showFileChooser();\n else\n Toast.makeText(AddNewCommentActivity.this,\"最多只能添加三张照片哦!\",Toast.LENGTH_SHORT).show();\n }",
"static void switchOriginal() {\n\n for (Iterator<Media> Fullsize = DataItem.get(currentAlbum).iterator(); Fullsize.hasNext(); ) {\n final Media Image = Fullsize.next();\n\n if (Image.MediaID.equals(CurrentPictureId)) {\n\n int imageWidth = Window.getClientWidth() - 200;\n\n FULLSIZE.setUrl(base + Image.MediaFullsizePath + \"&size=\" + imageWidth);\n FULLSIZE.setVisible(true);\n showDescription(Image);\n } else {\n DOM.getElementById(Image.MediaID).removeClassName(\"active\");\n }\n\n Action.showOriginal();\n }\n }",
"private void galleryAddPic() {\n\t}",
"public void prepareThumbnail(final Bitmap bitmap) {\n Runnable r = new Runnable() {\n public void run() {\n Bitmap thumbImage;\n\n if (bitmap == null) {\n thumbImage = BitmapUtils.getBitmapFromAssets(getActivity(), MenuActivity.IMAGE_NAME, 100, 100);\n } else {\n thumbImage = Bitmap.createScaledBitmap(bitmap, 100, 100, false);\n }\n\n if (thumbImage == null)\n return;\n\n //ThumbnailsManager.clearThumbs();\n editItems.clear();\n// EditItem item = new EditItem();\n// item.editName = \"Exposure\";\n// item.image = getResources().getDrawable(R.drawable.ic_exposure, null);\n// editItems.add(item);\n\n EditItem item2 = new EditItem();\n item2.editName = \"Saturation\";\n item2.image = getResources().getDrawable(R.drawable.ic_saturation, null);\n editItems.add(item2);\n\n EditItem item3 = new EditItem();\n item3.editName = \"Brightness\";\n item3.image = getResources().getDrawable(R.drawable.ic_brightness, null);\n editItems.add(item3);\n\n EditItem item4 = new EditItem();\n item4.editName = \"Contrast\";\n item4.image = getResources().getDrawable(R.drawable.ic_contrast, null);\n editItems.add(item4);\n\n EditItem item5 = new EditItem();\n item5.editName = \"RGB\";\n item5.image = getResources().getDrawable(R.drawable.ic_rgb, null);\n editItems.add(item5);\n\n EditItem item6 = new EditItem();\n item6.editName = \"Crop\";\n item6.image = getResources().getDrawable(R.drawable.ic_crop, null);\n editItems.add(item6);\n\n EditItem item12 = new EditItem();\n item12.editName = \"Resize\";\n item12.image = getResources().getDrawable(R.drawable.ic_expand, null);\n editItems.add(item12);\n\n\n EditItem item7 = new EditItem();\n item7.editName = \"Flip Vertically\";\n item7.image = getResources().getDrawable(R.drawable.ic_flip_vertically, null);\n editItems.add(item7);\n\n EditItem item8 = new EditItem();\n item8.editName = \"Rotate\";\n item8.image = getResources().getDrawable(R.drawable.ic_rotate, null);\n editItems.add(item8);\n\n EditItem item9 = new EditItem();\n item9.editName = \"Blur\";\n item9.image = getResources().getDrawable(R.drawable.ic_blur, null);\n editItems.add(item9);\n\n EditItem item10 = new EditItem();\n item10.editName = \"Vignette\";\n item10.image = getResources().getDrawable(R.drawable.ic_vignette, null);\n editItems.add(item10);\n\n EditItem item11 = new EditItem();\n item11.editName = \"WB\";\n item11.image = getResources().getDrawable(R.drawable.ic_temperature, null);\n editItems.add(item11);\n\n EditItem item13 = new EditItem();\n item13.editName = \"Split\";\n item13.image = getResources().getDrawable(R.drawable.ic_two, null);\n editItems.add(item13);\n\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mAdapter.notifyDataSetChanged();\n }\n });\n }\n };\n\n new Thread(r).start();\n }",
"@Test\n public void thumbnailTest() {\n // TODO: test thumbnail\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (resultCode == RESULT_OK && data.getData()!=null) {\n if (requestCode == 2) {\n Uri selectedImage = data.getData();\n String[] filePath = { MediaStore.Images.Media.DATA };\n Cursor c = getContentResolver().query(selectedImage,filePath, null, null, null);\n c.moveToFirst();\n int columnIndex = c.getColumnIndex(filePath[0]);\n String picturePath = c.getString(columnIndex);\n c.close();\n Bitmap thumbnail = (BitmapFactory.decodeFile(picturePath));\n thumbnail= AppUtils.getResizedBitmap(thumbnail, 400);\n ivPic.setImageBitmap(thumbnail);\n\n //either update existing thumbnail\n if(thumbnailImage != null){\n thumbnailImage.setImage(thumbnail);\n viewModel.updateThumbnail(thumbnailImage);\n }\n //or create a new thumbnail\n else{\n contactGroup.setThumbnailId((int) viewModel.addThumbnailGetId(new ThumbnailImage(thumbnail)));\n viewModel.updateGroup(contactGroup);\n }\n }\n }\n }",
"private void setUpVideoThumbnail() {\n Pictures pictures = video.getPictures();\n if (pictures != null) {\n List<Size> sizes = pictures.getSizes();\n if (sizes != null && sizes.size() > 0) {\n Size size = sizes.get(sizes.size() - 1);\n if (size != null) {\n String link = size.getLink();\n if (!TextUtils.isEmpty(link)) {\n Glide.with(getActivity())\n .load(link)\n// .placeholder(R.drawable.ic_placeholder)\n// .error(R.drawable.ic_error)\n .into(videoThumbnailImageView);\n }\n }\n }\n }\n }",
"public View getView(int index, View view, ViewGroup viewGroup) {\n\n\n final ImageView i = new ImageView(mContext);\n\n i.setLayoutParams(new Gallery.LayoutParams(200, 200));\n i.setBackgroundColor(Color.parseColor(\"#FFe7e7e7\"));\n\n i.setScaleType(ImageView.ScaleType.FIT_XY);\n\n\n if (imagelink.get(index).getMessageType().equals(\"1\")) {\n\n//TODO tharani map\n /*Glide.with(mContext).load(imagelink.get(index).getImagePath()).asBitmap()\n\n .fitCenter().placeholder(R.mipmap.profile_image).\n into(new BitmapImageViewTarget(i) {\n @Override\n protected void setResource(Bitmap resource) {\n RoundedBitmapDrawable circularBitmapDrawable =\n RoundedBitmapDrawableFactory.create(mContext.getResources(), resource);\n circularBitmapDrawable.setCircular(false);\n i.setImageDrawable(circularBitmapDrawable);\n }\n });*/\n\n\n Glide.with(mContext)\n .asBitmap()\n .load(imagelink.get(index).getThumbnailPath())\n .fitCenter()\n .placeholder(R.mipmap.profile_image)\n .into(new CustomTarget<Bitmap>() {\n @Override\n public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) {\n RoundedBitmapDrawable circularBitmapDrawable =\n RoundedBitmapDrawableFactory.create(mContext.getResources(), resource);\n circularBitmapDrawable.setCircular(false);\n i.setImageDrawable(circularBitmapDrawable);\n }\n\n @Override\n public void onLoadCleared(@Nullable Drawable placeholder) {\n }\n });\n\n } else if (imagelink.get(index).getMessageType().equals(\"2\")) {\n\n if (imagelink.get(index).isSelf()) {\n\n\n i.setImageBitmap(ThumbnailUtils.createVideoThumbnail(imagelink.get(index).getVideoPath(),\n MediaStore.Images.Thumbnails.MINI_KIND));\n } else {\n if (imagelink.get(index).getDownloadstatus() == 0) {\n//TODO tharani map\n\n\n /*Glide.with(mContext).load(imagelink.get(index).getThumbnailPath())\n .asBitmap().fitCenter().placeholder(R.mipmap.profile_image).\n into(new BitmapImageViewTarget(i) {\n @Override\n protected void setResource(Bitmap resource) {\n RoundedBitmapDrawable circularBitmapDrawable =\n RoundedBitmapDrawableFactory.create(mContext.getResources(), resource);\n circularBitmapDrawable.setCircular(true);\n i.setImageDrawable(circularBitmapDrawable);\n }\n });\n*/\n Glide.with(mContext)\n .asBitmap()\n .load(imagelink.get(index).getThumbnailPath())\n .fitCenter()\n .placeholder(R.mipmap.profile_image)\n .into(new CustomTarget<Bitmap>() {\n @Override\n public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) {\n RoundedBitmapDrawable circularBitmapDrawable =\n RoundedBitmapDrawableFactory.create(mContext.getResources(), resource);\n circularBitmapDrawable.setCircular(true);\n i.setImageDrawable(circularBitmapDrawable);\n }\n\n @Override\n public void onLoadCleared(@Nullable Drawable placeholder) {\n }\n });\n\n } else {\n\n\n i.setImageBitmap(ThumbnailUtils.createVideoThumbnail(imagelink.get(index).getVideoPath(),\n MediaStore.Images.Thumbnails.MINI_KIND));\n\n\n }\n }\n }\n\n\n return i;\n }",
"public void doScaling() {\n try {\n int orientation = getExifOrientation(file);\n System.out.println(file.getName());\n //Dimension d = Imaging.getImageSize(file);\n ImageInputStream imageInputStream = ImageIO.createImageInputStream(file);\n // Use a subsampled image from the original, avoids read images too large to fit in memory\n BufferedImage bufferedImage = subsampleImage(imageInputStream, TARGET_WIDTH * 2, TARGET_HEIGHT * 2);\n ImageInformation ii=new ImageInformation(orientation, bufferedImage.getWidth(), bufferedImage.getHeight());\n AffineTransform transform=getExifTransformation(ii);\n bufferedImage=transformImage(bufferedImage, transform); \n Scalr.Mode mode;\n // calculate which side will be largest/smaller\n // this works with any image size\n double scaleX=(TARGET_WIDTH*1.0)/(bufferedImage.getWidth()*1.0);\n double scaleY=(TARGET_HEIGHT*1.0)/(bufferedImage.getHeight()*1.0);\n if (scaleX<scaleY) {\n mode = Scalr.Mode.FIT_TO_WIDTH;\n } else {\n mode = Scalr.Mode.FIT_TO_HEIGHT;\n } \n \n BufferedImage thumbnail = Scalr.resize(bufferedImage,\n Scalr.Method.QUALITY,\n mode, TARGET_WIDTH, TARGET_HEIGHT,\n Scalr.OP_ANTIALIAS);\n BufferedImage combined = new BufferedImage(TARGET_WIDTH, TARGET_HEIGHT, BufferedImage.TYPE_INT_ARGB);\n int x = 0, y = 0;\n if (mode == Scalr.Mode.FIT_TO_HEIGHT) {\n x = (TARGET_WIDTH - thumbnail.getWidth()) / 2;\n }\n if (mode == Scalr.Mode.FIT_TO_WIDTH) {\n y = (TARGET_HEIGHT - thumbnail.getHeight()) / 2;\n }\n Graphics g = combined.getGraphics();\n g.setColor(new java.awt.Color(0.0f, 0.0f, 0.0f, 0.0f));\n g.fillRect(0, 0, combined.getWidth(), combined.getHeight());\n g.drawImage(thumbnail, x, y, null);\n g.dispose();\n //Writes test subsampled image taken from original\n if (saveSubSampled) {\n ImageIO.write(bufferedImage, OUTPUT_EXTENSION, new File(output));\n }\n //Writes thumbnail, created from the subsampled image.\n ImageIO.write(combined, OUTPUT_EXTENSION, new File(output_thumb));\n\n } catch (IOException ex) {\n Logger.getLogger(Scaler.class.getName()).log(Level.SEVERE, null, ex);\n } catch (Exception ex) {\n Logger.getLogger(Scaler.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public boolean hasThumbnails()\n {\n return hasImages(thumbnails);\n }",
"@Test\n @MediumTest\n @EnableFeatures(ChromeFeatureList.THUMBNAIL_CACHE_REFACTOR)\n public void testThumbnailDynamicAspectRatioWhenCaptured_FixedWhenShown() {\n int tabCounts = 11;\n TabUiTestHelper.prepareTabsWithThumbnail(mActivityTestRule, tabCounts, 0, \"about:blank\");\n TabUiTestHelper.enterTabSwitcher(mActivityTestRule.getActivity());\n verifyAllThumbnailHeightWithAspectRatio(tabCounts, 0.85f);\n\n // With hard cleanup.\n TabUiTestHelper.leaveTabSwitcher(mActivityTestRule.getActivity());\n TabUiTestHelper.enterTabSwitcher(mActivityTestRule.getActivity());\n verifyAllThumbnailHeightWithAspectRatio(tabCounts, 0.85f);\n }",
"private void crossFadeThumbnail() {\n if (m_thumbnail.getVisibility() == View.VISIBLE)\n return;\n\n m_thumbnail.setAlpha(0f);\n m_thumbnail.setVisibility(View.VISIBLE);\n m_thumbnail.animate()\n .alpha(1f)\n .setDuration(getResources().getInteger(\n android.R.integer.config_shortAnimTime))\n .setListener(null);\n\n m_spinner.animate()\n .alpha(0f)\n .setDuration(getResources().getInteger(\n android.R.integer.config_shortAnimTime))\n .setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n m_spinner.setVisibility(View.GONE);\n }\n });\n }",
"protected void checkForThumbnail(PM_Picture picture, int ind) {\n\t\tif (picture.hasImageThumbnail() == false) {\n\t\t\tthumbsToRead.add(picture);\n\t\t}\n\t}",
"public List<CameraRecord> loadThumbnail();",
"public String getThumbnailUrl();",
"fotos(){}",
"public Uri getImageFromCamera() {\n String[] projection = {\n MediaStore.Images.Thumbnails._ID, // The columns we want\n MediaStore.Images.Thumbnails.IMAGE_ID,\n MediaStore.Images.Thumbnails.KIND,\n MediaStore.Images.Thumbnails.DATA};\n String selection = MediaStore.Images.Thumbnails.KIND + \"=\" + // Select only mini's\n MediaStore.Images.Thumbnails.MINI_KIND;\n\n String sort = MediaStore.Images.Thumbnails._ID + \" DESC\";\n\n//At the moment, this is a bit of a hack, as I'm returning ALL images, and just taking the latest one. There is a better way to narrow this down I think with a WHERE clause which is currently the selection variable\n Cursor myCursor = getActivity().managedQuery(MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, projection, selection, null, sort);\n\n long imageId = 0l;\n long thumbnailImageId = 0l;\n String thumbnailPath = \"\";\n\n try {\n myCursor.moveToFirst();\n imageId = myCursor.getLong(myCursor.getColumnIndexOrThrow(MediaStore.Images.Thumbnails.IMAGE_ID));\n thumbnailImageId = myCursor.getLong(myCursor.getColumnIndexOrThrow(MediaStore.Images.Thumbnails._ID));\n thumbnailPath = myCursor.getString(myCursor.getColumnIndexOrThrow(MediaStore.Images.Thumbnails.DATA));\n } finally {\n myCursor.close();\n }\n\n //Create new Cursor to obtain the file Path for the large image\n\n String[] largeFileProjection = {\n MediaStore.Images.ImageColumns._ID,\n MediaStore.Images.ImageColumns.DATA\n };\n\n String largeFileSort = MediaStore.Images.ImageColumns._ID + \" DESC\";\n myCursor = getActivity().managedQuery(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, largeFileProjection, null, null, largeFileSort);\n String largeImagePath = \"\";\n\n try {\n myCursor.moveToFirst();\n\n//This will actually give yo uthe file path location of the image.\n largeImagePath = myCursor.getString(myCursor.getColumnIndexOrThrow(MediaStore.Images.ImageColumns.DATA));\n } finally {\n myCursor.close();\n }\n // These are the two URI's you'll be interested in. They give you a handle to the actual images\n Uri uriLargeImage = Uri.withAppendedPath(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, String.valueOf(imageId));\n Uri uriThumbnailImage = Uri.withAppendedPath(MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, String.valueOf(thumbnailImageId));\n\n// I've left out the remaining code, as all I do is assign the URI's to my own objects anyways...\n return uriLargeImage;\n }",
"public void onClick(View v) {\n\t\t\t\tfinal int len = thumbnailsselection.length;\n\n\t\t\t\tint cnt = 0;\n\t\t\t\tString selectImages = \"\";\n\t\t\t\tfor (int i = 0; i < len; i++) {\n\t\t\t\t\tif (thumbnailsselection[i]) {\n\t\t\t\t\t\tcnt++;\n\n\t\t\t\t\t\tselectImages = splitUrls[i];\n\t\t\t\t\t\tfileName = new File(selectImages).getName();\n\t\t\t\t\t\tunhideimg = db.getRealpath(fileName);\n\t\t\t\t\t\tLog.i(\"path\", unhideimg);\n\t\t\t\t\t\tdb.removeImage(fileName);\n\t\t\t\t\t}\n\t\t\t\t\tFile to = new File(unhideimg + \"/\" + fileName);\n\t\t\t\t\tFile from = new File(getFilesDir() + \"/\" + fileName);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFileUtils.moveFile(from, to);\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\tsplitUrls = removeElement(splitUrls, selectImages);\n\t\t\t\t\tint sdkVersion = android.os.Build.VERSION.SDK_INT;\n\t\t\t\t\tif (sdkVersion > android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {\n\t\t\t\t\t\tsendBroadcast(new Intent(\n\t\t\t\t\t\t\t\tIntent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri\n\t\t\t\t\t\t\t\t\t\t.parse(Environment\n\t\t\t\t\t\t\t\t\t\t\t\t.getExternalStorageDirectory()\n\t\t\t\t\t\t\t\t\t\t\t\t.getAbsolutePath())));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED,\n\t\t\t\t\t\t\t\tUri.parse(\"file://\"\n\t\t\t\t\t\t\t\t\t\t+ Environment\n\t\t\t\t\t\t\t\t\t\t\t\t.getExternalStorageDirectory())));\n\t\t\t\t\t}\n\t\t\t\t\t((BaseAdapter) imagegrid.getAdapter())\n\t\t\t\t\t\t\t.notifyDataSetChanged();\n\n\t\t\t\t}\n\t\t\t\tToast.makeText(getApplicationContext(), \"Image(s) Unlock\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\tIntent i=new Intent(getApplicationContext(),MainActivity.class);\n\t\t\t\tstartActivity(i);\n\n\t\t\t}",
"private void drawThumbnail()\n\t{\n\t\t int wCurrentWidth = mBackImage.getWidth();\n\t\t int wCurrentHeight = mBackImage.getHeight();\n\t\t \n \n float scaleWidth = ((float) mThumbnailWidth) / wCurrentWidth;\n float scaleHeight = ((float) mThumbnailHeight) / wCurrentHeight;\n Matrix matrix = new Matrix();\n matrix.postScale(scaleWidth, scaleHeight);\n // create the new Bitmap object\n Bitmap resizedBitmap = Bitmap.createBitmap(mBackImage, 0, 0 , wCurrentWidth, wCurrentHeight, matrix, true);\n \n Bitmap output = Bitmap.createBitmap(resizedBitmap.getWidth()+(2*cmColorPadding+2*cmBorderPadding), resizedBitmap.getHeight()+(2*cmColorPadding+2*cmBorderPadding), Config.ARGB_8888);\n Canvas canvas = new Canvas(output);\n \n final int wRectBorderLeft = 0;\n final int wRectColorLeft = wRectBorderLeft + cmBorderPadding;\n final int wRectThumbnailLeft = wRectColorLeft + cmColorPadding;\n final int wRectBorderTop = 0;\n final int wRectColorTop = wRectBorderTop + cmBorderPadding;\n final int wRectThumbnailTop = wRectColorTop + cmColorPadding;\n\n final int wRectThumbnailRight = wRectThumbnailLeft + resizedBitmap.getWidth();\t \n final int wRectColorRight = wRectThumbnailRight + cmColorPadding;\n final int wRectBorderRight = wRectColorRight + cmBorderPadding;\n final int wRectThumbnailBottom = wRectThumbnailTop + resizedBitmap.getHeight();\t \n final int wRectColorBottom = wRectThumbnailBottom + cmColorPadding;\n final int wRectBorderBottom = wRectColorBottom + cmBorderPadding;\n \n \n final int wThumbColor = 0xff424242;\n final int wBorderColor = 0xffBBBBBB;\n final Paint paint = new Paint();\n final Rect wThumbRectangle = new Rect(wRectThumbnailLeft, wRectThumbnailTop, wRectThumbnailRight, wRectThumbnailBottom);\n final Rect wColorRectangle = new Rect(wRectColorLeft, wRectColorTop, wRectColorRight, wRectColorBottom);\n final Rect wBorderRectangle = new Rect(wRectBorderLeft, wRectBorderTop, wRectBorderRight, wRectBorderBottom);\n final RectF wThumbRoundRectangle = new RectF(wThumbRectangle);\n final RectF wColorRoundRectangle = new RectF(wColorRectangle);\n final RectF wBorderRoundRectangle = new RectF(wBorderRectangle);\n final float roundPx = 3.0f;\n\n paint.setAntiAlias(true);\n canvas.drawARGB(0, 0, 0, 0);\n paint.setColor(wBorderColor);\n canvas.drawRoundRect(wBorderRoundRectangle, roundPx, roundPx, paint);\n paint.setColor(getLevelColor());\n canvas.drawRoundRect(wColorRoundRectangle, roundPx, roundPx, paint);\n paint.setColor(wThumbColor);\n canvas.drawRoundRect(wThumbRoundRectangle, roundPx, roundPx, paint);\n\n paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN));\n canvas.drawBitmap(resizedBitmap, null, wThumbRectangle, paint);\n \n BitmapDrawable bmd = new BitmapDrawable(output);\n \n\t\t mCurrentImage.setImageDrawable(bmd);\n\t}",
"@Override\n public void onClick(View v) {\n if (current_photo < petPhotoUrlList.size()-1) {\n current_photo++;\n imageView.setImageBitmap(photoList[current_photo]);\n }\n else{\n current_photo=0;\n imageView.setImageBitmap(photoList[current_photo]);\n }\n }",
"@Override\n protected Dimension getMaximumThumbSize()\n {\n return new Dimension(size, size);\n }",
"@Override\n protected Dimension getMaximumThumbSize()\n {\n return new Dimension(size, size);\n }",
"private void prepararImagenYStorage() {\n mImageBitmap = null;\n\n //this.capturarFotoButton = (Button) findViewById(R.id.capturarFotoButton);\n// setBtnListenerOrDisable(\n// this.capturarFotoButton,\n// mTakePicSOnClickListener,\n// MediaStore.ACTION_IMAGE_CAPTURE\n// );\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO) {\n mAlbumStorageDirFactory = new FroyoAlbumDirFactory();\n } else {\n mAlbumStorageDirFactory = new BaseAlbumDirFactory();\n }\n }",
"private void saveThumbnail(String filename) throws IOException {\n BufferedImage photo = ImageIO.read(new File(String.format(\"%s/%s\", getPhotoFilePath(false), filename)));\n BufferedImage croppedImage = makeSquare(photo);\n BufferedImage thumbnail = scale(croppedImage);\n ImageIO.write(thumbnail, \"jpg\", new File(String.format(\"%s/%s\", getPhotoFilePath(true), filename)));\n }",
"public By thumbnail(){\r\n\t\t return By.xpath(\"//ol[@class='thumbnails']/li\");\r\n\t}",
"public int numberOfThumbnailPresent(){\r\n\t\t return driver.findElements(thumbnail()).size();\r\n\t}",
"@Override\r\n\tpublic int getCount() {\n\t\treturn mThumbIds.length;\r\n\t}",
"@Override\n public void onClick(View v) {\n if (imgList.size() < 9) {\n tokephote();\n } else {\n Toast.makeText(AnswerQuestionActivity.this, \"超过图片数量!\", 0)\n .show();\n }\n\n }",
"private byte[] applyEffect(DrawJPEGAttribute drawJPEGAttribute, int i, boolean z, Size size, Size size2) {\n DrawJPEGAttribute drawJPEGAttribute2 = drawJPEGAttribute;\n boolean z2 = z;\n Size size3 = size;\n Size size4 = size2;\n String access$700 = SnapshotEffectRender.TAG;\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"applyEffect: applyToThumb = \");\n stringBuilder.append(z2);\n Log.d(access$700, stringBuilder.toString());\n byte[] thumbnailBytes = z2 ? drawJPEGAttribute2.mExif.getThumbnailBytes() : drawJPEGAttribute2.mData;\n String access$7002;\n StringBuilder stringBuilder2;\n if (thumbnailBytes == null) {\n access$7002 = SnapshotEffectRender.TAG;\n stringBuilder2 = new StringBuilder();\n stringBuilder2.append(\"Null \");\n stringBuilder2.append(z2 ? \"thumb!\" : \"jpeg!\");\n Log.w(access$7002, stringBuilder2.toString());\n return null;\n }\n long currentTimeMillis = System.currentTimeMillis();\n int[] iArr = new int[1];\n GLES20.glGenTextures(1, iArr, 0);\n int[] initTexture = ShaderNativeUtil.initTexture(thumbnailBytes, iArr[0], i);\n GLES20.glFlush();\n String access$7003 = SnapshotEffectRender.TAG;\n StringBuilder stringBuilder3 = new StringBuilder();\n stringBuilder3.append(\"initTime=\");\n stringBuilder3.append(System.currentTimeMillis() - currentTimeMillis);\n Log.d(access$7003, stringBuilder3.toString());\n int i2 = z2 ? initTexture[0] : drawJPEGAttribute2.mWidth;\n int i3 = z2 ? initTexture[1] : drawJPEGAttribute2.mHeight;\n int i4 = z2 ? initTexture[0] : drawJPEGAttribute2.mPreviewWidth;\n int i5 = z2 ? initTexture[1] : drawJPEGAttribute2.mPreviewHeight;\n Render effectRender = getEffectRender(drawJPEGAttribute2.mEffectIndex);\n if (effectRender == null) {\n Log.w(SnapshotEffectRender.TAG, \"init render failed\");\n return thumbnailBytes;\n }\n int i6;\n int i7;\n long currentTimeMillis2;\n int access$2100;\n byte[] picture;\n String access$7004;\n StringBuilder stringBuilder4;\n if (effectRender instanceof PipeRender) {\n ((PipeRender) effectRender).setFrameBufferSize(i2, i3);\n }\n effectRender.setPreviewSize(i4, i5);\n effectRender.setEffectRangeAttribute(drawJPEGAttribute2.mAttribute);\n effectRender.setMirror(drawJPEGAttribute2.mMirror);\n if (z2) {\n effectRender.setSnapshotSize(i2, i3);\n } else {\n effectRender.setSnapshotSize(size4.width, size4.height);\n }\n effectRender.setOrientation(drawJPEGAttribute2.mOrientation);\n effectRender.setShootRotation(drawJPEGAttribute2.mShootRotation);\n effectRender.setJpegOrientation(drawJPEGAttribute2.mJpegOrientation);\n checkFrameBuffer(i2, i3);\n this.mGLCanvas.beginBindFrameBuffer(this.mFrameBuffer);\n long currentTimeMillis3 = System.currentTimeMillis();\n effectRender.setParentFrameBufferId(this.mFrameBuffer.getId());\n effectRender.draw(new DrawIntTexAttribute(iArr[0], 0, 0, i2, i3, true));\n effectRender.deleteBuffer();\n int i8 = i5;\n int i9 = i4;\n int i10 = i3;\n int i11 = i2;\n drawAgeGenderAndMagicMirrorWater(drawJPEGAttribute2.mWaterInfos, i2, i3, i4, i8, drawJPEGAttribute2.mJpegOrientation, drawJPEGAttribute2.mIsPortraitRawData);\n if (!ModuleManager.isSquareModule()) {\n i3 = 0;\n } else if (i11 > i10) {\n i2 = ((i11 - i10) / 2) - ((SnapshotEffectRender.this.mSquareModeExtraMargin * i10) / Util.sWindowWidth);\n i11 = i10;\n i3 = 0;\n if (z2) {\n drawJPEGAttribute2.mWidth = i11;\n drawJPEGAttribute2.mHeight = i10;\n } else if (size3 != null) {\n size3.width = i11;\n size3.height = i10;\n access$7002 = SnapshotEffectRender.TAG;\n stringBuilder2 = new StringBuilder();\n stringBuilder2.append(\"thumbSize=\");\n stringBuilder2.append(size3.width);\n stringBuilder2.append(\"*\");\n stringBuilder2.append(size3.height);\n Log.d(access$7002, stringBuilder2.toString());\n }\n if (drawJPEGAttribute2.mApplyWaterMark) {\n i6 = i3;\n i7 = i2;\n } else {\n i7 = i2;\n i6 = i3;\n drawWaterMark(drawJPEGAttribute2, i2, i3, i11, i10, i9, i8, drawJPEGAttribute2.mJpegOrientation);\n }\n access$7002 = SnapshotEffectRender.TAG;\n stringBuilder2 = new StringBuilder();\n stringBuilder2.append(\"drawTime=\");\n stringBuilder2.append(System.currentTimeMillis() - currentTimeMillis3);\n Log.d(access$7002, stringBuilder2.toString());\n GLES20.glPixelStorei(3333, 1);\n currentTimeMillis2 = System.currentTimeMillis();\n access$2100 = SnapshotEffectRender.this.mQuality;\n if (z2) {\n access$2100 = Math.min(SnapshotEffectRender.this.mQuality, JpegEncodingQualityMappings.getQualityNumber(\"normal\"));\n }\n picture = ShaderNativeUtil.getPicture(i7, i6, i11, i10, access$2100);\n access$7004 = SnapshotEffectRender.TAG;\n stringBuilder4 = new StringBuilder();\n stringBuilder4.append(\"readTime=\");\n stringBuilder4.append(System.currentTimeMillis() - currentTimeMillis2);\n Log.d(access$7004, stringBuilder4.toString());\n if (GLES20.glIsTexture(iArr[0])) {\n GLES20.glDeleteTextures(1, iArr, 0);\n }\n this.mGLCanvas.endBindFrameBuffer();\n return picture;\n } else {\n i3 = ((i10 - i11) / 2) - ((SnapshotEffectRender.this.mSquareModeExtraMargin * i11) / Util.sWindowWidth);\n i10 = i11;\n }\n i2 = 0;\n if (z2) {\n }\n if (drawJPEGAttribute2.mApplyWaterMark) {\n }\n access$7002 = SnapshotEffectRender.TAG;\n stringBuilder2 = new StringBuilder();\n stringBuilder2.append(\"drawTime=\");\n stringBuilder2.append(System.currentTimeMillis() - currentTimeMillis3);\n Log.d(access$7002, stringBuilder2.toString());\n GLES20.glPixelStorei(3333, 1);\n currentTimeMillis2 = System.currentTimeMillis();\n access$2100 = SnapshotEffectRender.this.mQuality;\n if (z2) {\n }\n picture = ShaderNativeUtil.getPicture(i7, i6, i11, i10, access$2100);\n access$7004 = SnapshotEffectRender.TAG;\n stringBuilder4 = new StringBuilder();\n stringBuilder4.append(\"readTime=\");\n stringBuilder4.append(System.currentTimeMillis() - currentTimeMillis2);\n Log.d(access$7004, stringBuilder4.toString());\n if (GLES20.glIsTexture(iArr[0])) {\n }\n this.mGLCanvas.endBindFrameBuffer();\n return picture;\n }",
"@Override\n protected void onActivityResult(int arg0, int arg1, Intent data) {\n\n switch (arg0) {\n case TAKE_PICTURE:\n if (mAdapter.mList.size() < 3) {\n if (arg1 == RESULT_OK) {\n if (null != data) {\n if (data.hasExtra(\"data\")) {\n mGrideviewUpload.setVisibility(View.VISIBLE);\n try {\n Bitmap thumbnail = data.getParcelableExtra(\"data\");\n mAdapter.mList.add(thumbnail);\n mAdapter.notifyDataSetChanged();\n } catch (Exception e) {\n e.printStackTrace();\n CustomToast.showShortToast(mContext, \"获取图片错误\");\n }\n\n }\n } else {\n mGrideviewUpload.setVisibility(View.VISIBLE);\n try {\n Bitmap bitmap;\n if (mPop != null && !TextUtils.isEmpty(mPop.getFilePath())) {\n File file = new File(mPop.getFilePath());\n mPicturePathList.add(mPop.getFilePath());\n mAdapter.mPicList.add(mPop.getFilePath());\n // bitmap = BitmapFactory.decodeFile(mPop.getFilePath(),\n // CommonUtils.getBitmapOption(4));\n bitmap = ImageLoader.getInstance().loadImageSync(\"file://\" + mPop.getFilePath());\n ImageLoader.getInstance().loadImage(\"file://\" + mPop.getFilePath(), new ImageLoadingListener() {\n\n @Override\n public void onLoadingStarted(String arg0, View arg1) {\n\n }\n\n @Override\n public void onLoadingFailed(String arg0, View arg1, FailReason arg2) {\n\n }\n\n @Override\n public void onLoadingComplete(String arg0, View arg1, Bitmap bitmap) {\n mAdapter.mList.add(bitmap);\n mAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onLoadingCancelled(String arg0, View arg1) {\n\n }\n });\n }\n else {\n File file = new File(mPhotoWillDestoryPlath);\n mPicturePathList.add(mPhotoWillDestoryPlath);\n mAdapter.mPicList.add(mPhotoWillDestoryPlath);\n bitmap = ImageLoader.getInstance().loadImageSync(\"file://\" +\n mPhotoWillDestoryPlath);\n ImageLoader.getInstance().loadImage(\"file://\" + mPhotoWillDestoryPlath, new ImageLoadingListener() {\n\n @Override\n public void onLoadingStarted(String arg0, View arg1) {\n\n }\n\n @Override\n public void onLoadingFailed(String arg0, View arg1, FailReason arg2) {\n\n }\n\n @Override\n public void onLoadingComplete(String arg0, View arg1, Bitmap bitmap) {\n mAdapter.mList.add(bitmap);\n mAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onLoadingCancelled(String arg0, View arg1) {\n\n }\n });\n // bitmap = BitmapFactory.decodeFile(,\n // CommonUtils.getBitmapOption(4));\n }\n // mAdapter.mList.add(CommonUtils.getBitmapFromFile(file,CAMERA_REQUESTz\n // 70, 70));//getImageFromLocal如果还是闪退可以试用这个方法\n // // 将图\n // mAdapter.mList.add(bitmap);\n\n } catch (Exception e) {\n e.printStackTrace();\n CustomToast.showShortToast(mContext, \"拍照失败,请确认是否开启拍照访问权限或存储卡不存在或内存已满!\");\n }\n\n }\n\n }\n }\n break;\n\n case 1015:\n if (arg1 == 1015) {\n if (data != null) {\n visitor_address_change.setTextColor(getResources().getColor(R.color.C4));\n visitor_address_change.setText(data.getStringExtra(\"adress\"));\n php_Lng = data.getStringExtra(\"Lng\");\n php_Lat = data.getStringExtra(\"Lat\");\n php_Address = data.getStringExtra(\"adress\");\n mOkTv.setText(\"完成\");\n }\n }\n break;\n }\n }",
"@Override\n public void onClick(View v) {\n thumbnail.handleClick();\n }",
"private void savePhotoFiles(Bitmap anypicImage, Uri uri) {\n\t\tMatrix matrix = new Matrix();\n\t\t// matrix.postRotate(90);\n\t\tBitmap rotatedImage = Bitmap.createBitmap(anypicImage, 0, 0,\n\t\t\t\tanypicImage.getWidth(), anypicImage.getHeight(), matrix, true);\n\n\t\t// make thumbnail with size of 86 pixels\n\t\tBitmap anypicThumbnail = Bitmap.createScaledBitmap(anypicImage, 86, 86,\n\t\t\t\tfalse);\n\n\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\n\t\trotatedImage.compress(Bitmap.CompressFormat.JPEG, 100, bos);\n\t\tbyte[] rotatedData = bos.toByteArray();\n\n\t\tbos.reset(); // reset the stream to prepare for the thumbnail\n\t\tanypicThumbnail.compress(Bitmap.CompressFormat.JPEG, 100, bos);\n\t\tbyte[] thumbnailData = bos.toByteArray();\n\n\t\ttry {\n\t\t\t// close the byte array output stream\n\t\t\tbos.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Create the ParseFiles and save them in the background\n\t\timage = new ParseFile(\"photo.jpg\", rotatedData);\n\t\tsong = new ParseFile(\"song.\"\n\t\t\t\t+ songPath.substring(songPath.length() - 3),\n\t\t\t\tconvertAudioToByte(uri));\n\t\tthumbnail = new ParseFile(\"photo_thumbnail.jpg\", thumbnailData);\n\t\timage.saveInBackground(new SaveCallback() {\n\t\t\t@Override\n\t\t\tpublic void done(ParseException e) {\n\t\t\t\tif (e != null) {\n\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\"Error saving image file: \" + e.getMessage(),\n\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t} else {\n\t\t\t\t\t// saved image to Parse\n\t\t\t\t\tgetCurrentPhoto().setImage(image);\n\t\t\t\t\tgetCurrentPhoto().setThumbnail(thumbnail);\n\t\t\t\t\tgetCurrentPhoto().setSong(song);\n\t\t\t\t\t//getCurrentPhoto().setUploadCount((songCount.intValue()+1));\n\t\t\t\t\tgData.setUploadCount(1+gData.getUploadCount());\n\t\t\t\t\tParseUser.getCurrentUser().put(\"uploadCount\",gData.getUploadCount());\n\t\t\t\t\tParseUser.getCurrentUser().saveInBackground();\n\n\t\t\t\t\tif (publicUpload) {\n\t\t\t\t\t\tgetCurrentPhoto().setVisiblity(publicUpload);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tgetCurrentPhoto().setVisiblity(privateUpload);\n\n\t\t\t\t\t}\n\t\t\t\t\tgetCurrentPhoto().setSongTitle(songTitle);\n\t\t\t\t\tgetCurrentPhoto().setArtistName(artistName);\n\t\t\t\t\tgetCurrentPhoto().setUser(ParseUser.getCurrentUser());\n\t\t\t\t\tgetCurrentPhoto().setSongSize(fileSize);\n\n\t\t\t\t\tgData.setUsedSpace(gData.getUsedSpace()+fileSize);\n\t\t\t\t\tParseUser.getCurrentUser().put(\"usedSpace\",gData.getUsedSpace());\n\t\t\t\t\tParseUser.getCurrentUser().saveInBackground();\n\t\t\t\t\t//getCurrentPhoto().setUsedSpace(\n\t\t\t\t\t\t\t//(value.intValue() + fileSize));\n\t\t\t\t\tdoe();\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tLog.i(\"dsd\", \"Finished saving the photos to ParseFiles!\");\n\n\t}",
"@Override\n public void onThumbnailError(YouTubeThumbnailView youTubeThumbnailView, YouTubeThumbnailLoader.ErrorReason errorReason) {\n Log.e(TAG, \"Youtube Thumbnail Error\");\n }",
"public void testCase1_selectGallery() throws Throwable {\n Object mLoader;\n // select one pictrue\n getInstrumentation().runOnMainSync(new Runnable() {\n @Override\n public void run() {\n mWallpaperChooserFragment.onItemSelected(null, null, FIRST_PICTURE_SELECTED, 0);\n }\n });\n getInstrumentation().waitForIdleSync();\n mLoader = mLoaderField.get(mWallpaperChooserFragment);\n long startTimeA = System.currentTimeMillis();\n while (mLoader != null) {\n if (System.currentTimeMillis() - startTimeA > TIME_OUT) {\n fail(\"Wait for Timeout\");\n }\n Thread.sleep(SLEEP_TIME);\n mLoader = mLoaderField.get(mWallpaperChooserFragment);\n }\n\n Object firstWallpaperDrawable = mWallpaperDrawableField.get(mWallpaperChooserFragment);\n Field firstBitmapField = firstWallpaperDrawable.getClass().getDeclaredField(\"mBitmap\");\n firstBitmapField.setAccessible(true);\n Bitmap firstBitmap = (Bitmap) firstBitmapField.get(firstWallpaperDrawable);\n assertNotNull(firstBitmap);\n\n // select another pictrue\n getInstrumentation().runOnMainSync(new Runnable() {\n @Override\n public void run() {\n mWallpaperChooserFragment.onItemSelected(null, null, SECOND_PICTURE_SELECTED, 0);\n }\n });\n getInstrumentation().waitForIdleSync();\n mLoader = mLoaderField.get(mWallpaperChooserFragment);\n long startTimeB = System.currentTimeMillis();\n while (mLoader != null) {\n if (System.currentTimeMillis() - startTimeB > TIME_OUT) {\n fail(\"Wait for Timeout\");\n }\n Thread.sleep(SLEEP_TIME);\n mLoader = mLoaderField.get(mWallpaperChooserFragment);\n }\n Object secondWallpaperDrawable = mWallpaperDrawableField.get(mWallpaperChooserFragment);\n Field secondBitmapField = secondWallpaperDrawable.getClass().getDeclaredField(\"mBitmap\");\n secondBitmapField.setAccessible(true);\n Bitmap secondBitmap = (Bitmap) secondBitmapField.get(secondWallpaperDrawable);\n assertNotNull(secondBitmap);\n\n // these two pictrue should not be same\n assertNotSame(firstBitmap, secondBitmap);\n }",
"@Override\n protected Bitmap doInBackground(String... params) {\n imageUrl = params[0];\n ImageView thumbnail = imageViewReference.get();\n try {\n InputStream is = (InputStream) new URL(imageUrl).getContent();\n Bitmap bitmap = ImageCommons.decodeSampledBitmapFromInputStream(is, thumbnail.getWidth(), thumbnail.getHeight());\n addBitmapToMemoryCache(imageUrl, bitmap);\n return bitmap;\n } catch (IOException e) {\n e.printStackTrace();\n }\n catch (Exception e){\n e.printStackTrace();\n }\n\n Log.d(\"myLog\", getClass().getSimpleName() + \" Erro ao fazer download de imagem\");\n return ImageCommons.decodeSampledBitmapFromResource(context.getResources(), R.drawable.ic_launcher, 70, 70);\n }",
"public void run() {\nif(i[0] ==le.size()){\n i[0]=0;}\n File file = new File(\"/var/www/html/PawsAndClaws/web/bundles/uploads/brochures/\" + le.get( i[0]).getBrochure());\n\n Image it = new Image(file.toURI().toString(), 500, 310, false, false);\n eventspicture.setImage(it);\n i[0]++;\n }",
"@Override\n public void onThumbnailLoaded(YouTubeThumbnailView youTubeThumbnailView, String s) {\n youTubeThumbnailLoader.release();\n }",
"@Override\n\t\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\t\t\tif (arg2 == allImages.size() - 1) {\n\t\t\t\t\t\tif (allImages.size() <= 6) {\n\t\t\t\t\t\t\tnew SelectPopuWindow(context, gridView, arg2);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tToast.makeText(context, \"照片不能超过6张\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\tIntent intent=new Intent();\n\t\t\t\t\t\tintent.setClass(context, BrowseImageViewActivity.class);\n\t\t\t\t\t\tintent.putStringArrayListExtra(\"imageUrl\", (ArrayList<String>) imageUrl);\n\t\t\t\t\t\tintent.putExtra(\"position\", arg2);\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\t//Toast.makeText(WriteMoodActivity.this, arg2+\"\"+\"集合的长度:\"+allImages.size(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t}",
"long getThumbSizeX();",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n \tsuper.onActivityResult(requestCode, resultCode, data);\n \t\n \tif(requestCode == RESPONSE_TAKE_PHOTO && resultCode == Activity.RESULT_OK){\n \t\tBitmapFactory.Options options = new BitmapFactory.Options();\n \t options.inSampleSize = 4;\n\n \t Bitmap thumbnail = (Bitmap) data.getExtras().get(\"data\"); \n \t mImage.setImageBitmap(thumbnail);\n\n \t}\n }",
"public List<ImageThumbnail> getImageThumbnails(String searchConstraints){\n //Places markers on treeItems.\n getFileMenu().getRoot().getChildren()\n .stream()\n .peek(treeItem -> treeItem.setGraphic(null))\n .flatMap(treeItem -> {\n if(treeItem.getValue().contains(searchConstraints) && !searchConstraints.isEmpty()) {\n ImageView fileHourGlass = new ImageView(\"/views/img/search.png\");\n fileHourGlass.setPreserveRatio(true);\n fileHourGlass.setFitWidth(17);\n fileHourGlass.setFitHeight(17);\n treeItem.setGraphic(fileHourGlass);\n }\n return treeItem.getChildren().stream();\n }).peek(treeItem -> treeItem.setGraphic(null))\n .forEach(treeItem -> {\n if(treeItem.getValue().contains(searchConstraints) && !searchConstraints.isEmpty()){\n ImageView fileHourGlass = new ImageView(\"/views/img/search.png\");\n fileHourGlass.setPreserveRatio(true);\n fileHourGlass.setFitWidth(17);\n fileHourGlass.setFitHeight(17);\n treeItem.setGraphic(fileHourGlass);\n if(treeItem.getParent().getGraphic() == null) {\n ImageView folderHourGlass = new ImageView(\"/views/img/search.png\");\n folderHourGlass.setPreserveRatio(true);\n folderHourGlass.setFitWidth(17);\n folderHourGlass.setFitHeight(17);\n treeItem.getParent().setGraphic(folderHourGlass);\n }\n }\n });\n //Places markers on treeItems.\n getTagsMenu().getRoot().getChildren()\n .stream()\n .peek(treeItem -> treeItem.setGraphic(null))\n .flatMap(treeItem -> {\n if(treeItem.getValue().contains(searchConstraints) && !searchConstraints.isEmpty()) {\n ImageView fileHourGlass = new ImageView(\"/views/img/search.png\");\n fileHourGlass.setPreserveRatio(true);\n fileHourGlass.setFitWidth(17);\n fileHourGlass.setFitHeight(17);\n treeItem.setGraphic(fileHourGlass);\n }\n return treeItem.getChildren().stream();\n }).peek(treeItem -> treeItem.setGraphic(null))\n .forEach(treeItem -> {\n if(treeItem.getValue().contains(searchConstraints) && !searchConstraints.isEmpty()){\n ImageView fileHourGlass = new ImageView(\"/views/img/search.png\");\n fileHourGlass.setPreserveRatio(true);\n fileHourGlass.setFitWidth(17);\n fileHourGlass.setFitHeight(17);\n treeItem.setGraphic(fileHourGlass);\n if(treeItem.getParent().getGraphic() == null) {\n ImageView folderHourGlass = new ImageView(\"/views/img/search.png\");\n folderHourGlass.setPreserveRatio(true);\n folderHourGlass.setFitWidth(17);\n folderHourGlass.setFitHeight(17);\n treeItem.getParent().setGraphic(folderHourGlass);\n }\n }\n });\n\n //Filters images based on search constraint\n return getFiles()\n .stream()\n .map(this::procureImageThumbnail)\n .filter(imageThumbnail -> imageThumbnail.getImageView().getId().contains(searchConstraints) ||\n IMAGE_DATA.get(IMAGES.inverse().get(imageThumbnail)).getTags().toString().contains(searchConstraints)\n || IMAGE_DATA.get(IMAGES.inverse().get(imageThumbnail)).getMetadata().toString().contains(searchConstraints))\n .collect(Collectors.toList());\n }",
"public boolean addThumbNailInfo(Bitmap thumbnail, int type, String name) {\n\t\tif (thumbnail != null && (type == 0 || type == 1) && name != null) {\n\t\t\tmThumbnail = thumbnail;\n\t\t\tmType = type;\n\t\t\tmName = name;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"List<Bitmap> getRecipeImgSmall();",
"public static void testPosterize(){\n\t Picture beach = new Picture(\"beach.jpg\");\n\t beach.explore();\n\t beach.posterize(8);\n\t beach.explore();\n }",
"public MyBmpInfo getThumbnail(Uri uri) {\n int w = 1280;\n int h = 960;\n double TARGETTED_WIDTH = 1920.0;\n\n try {\n InputStream input = this.getContentResolver().openInputStream(uri);\n\n BitmapFactory.Options onlyBoundsOptions = new BitmapFactory.Options();\n onlyBoundsOptions.inJustDecodeBounds = true;\n onlyBoundsOptions.inDither = true;//optional\n onlyBoundsOptions.inPreferredConfig = Bitmap.Config.ARGB_8888;//optional\n BitmapFactory.decodeStream(input, null, onlyBoundsOptions);\n input.close();\n\n if ((onlyBoundsOptions.outWidth == -1) || (onlyBoundsOptions.outHeight == -1)) {\n return null;\n }\n\n int originalWidth = onlyBoundsOptions.outWidth;\n\n double ratio = 1.0;\n if (originalWidth > TARGETTED_WIDTH){\n\n /*\n * Ratio Sample Size:\n * if 1 , means bitmap is exactly stay as orginal.\n * if 2 or above, means 1/2 or smaller from the ori image.*/\n ratio = originalWidth / TARGETTED_WIDTH;\n }\n\n BitmapFactory.Options bitmapOptions = new BitmapFactory.Options();\n bitmapOptions.inSampleSize = (int)Math.round(ratio);\n\n Log.d(\"bitmap scaled info\", \"ratio = \"+ratio+\" , poweredRatio = \"+bitmapOptions.inSampleSize+\", originalWidth = \"+originalWidth+\" , TARGETTED_WIDTH = \"+TARGETTED_WIDTH);\n\n bitmapOptions.inPreferredConfig = Bitmap.Config.ARGB_8888;//\n input = this.getContentResolver().openInputStream(uri);\n Bitmap bitmap = BitmapFactory.decodeStream(input, null, bitmapOptions);\n// bitmap.compress(Bitmap.CompressFormat.JPEG, 100, )\n input.close();\n Log.d(\"elliot\", \"bitmap before resize: SIZE = \" + bitmap.getWidth() + \" x \" + bitmap.getHeight());\n if (bitmap.getWidth() < w || bitmap.getHeight() < h) {\n return new MyBmpInfo(bitmap, \"Image is too small\", true);\n } else {\n return new MyBmpInfo(Bitmap.createScaledBitmap(bitmap, w, h, true), \"\", false);\n }\n\n } catch (Exception e) {\n return null;\n }\n }",
"@Override\n\t\t\tpublic void onListAdapterCreated(ListAdapter adapter, View v, int position,\n ViewGroup viewGroup, ListEntry listEntry)\n\t\t\t{\n\t\t\t\tif(listEntry.imageList != null && listEntry.imageList.size() > 0)\n\t\t\t\t{\n\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\tint randomIndex = rand.nextInt(listEntry.imageList.size());\n\t\t\t\t\t\n\t\t\t\t\tImageEntry imgEntry = listEntry.imageList.get(randomIndex);\n\t\t\t\t\tImageLoader loader = new ImageLoader(Tab3Fragment.this.getActivity(), Config.THUMB_PLACE_HOLDER);\n\t\t\t\t\t\n\t\t\t\t\tfinal ImageView imgThumb = (ImageView) v.findViewById(R.id.imgThumb1);\n\t\t\t\t\t// check if the bitmap is from server \n\t\t\t\t\t// or not using the flag IS_DATA_FROM_SERVER\n\t\t\t\t\tBoolean isHttp = imgEntry.photoImageThumbUrl.toLowerCase(Locale.getDefault()).contains(\"http://\");\n\t\t\t\t\tif(isHttp)\n\t\t\t\t\t{\n\t\t\t\t\t\tloader.DisplayImageWithTag(imgEntry.photoImageThumbUrl, imgThumb, 1);\n\t\t\t\t\t\tloader.setOnCacheListener(new OnCacheListener() \n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onImageLoaded(ImageLoader loader, Bitmap bitmap, int tag)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\tBitmap framedBitmap = ImageHelper.\n\t\t\t\t\t\t\t\t\t\tconvertBitmapWithFrame(Tab3Fragment.this.getActivity(), \n\t\t\t\t\t\t\t\t\t\t\t\tbitmap, Config.BORDER_THICKNESS_THUMB);\n\n\t\t\t\t\t\t\t imgThumb.setImageBitmap(framedBitmap);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tBitmap bitmap = ImageHelper.getBitmapFromAsset(\n\t\t\t\t\t\t\t\tTab3Fragment.this.getActivity(), imgEntry.photoImageThumbUrl);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(bitmap != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tBitmap framedBitmap = ImageHelper.\n\t\t\t\t\t\t\t\t\tconvertBitmapWithFrame(Tab3Fragment.this.getActivity(), bitmap, Config.BORDER_THICKNESS_THUMB);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\timgThumb.setImageBitmap(framedBitmap);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tTextView tvTitle = (TextView) v.findViewById(R.id.tvTitle);\n\t\t\t\ttvTitle.setText(listEntry.title);\n\t\t\t\t\n\t\t\t\tTextTint.tintTextView(Tab3Fragment.this.getActivity(), tvTitle, color);\n\t\t\t\t\n\t\t\t\tTextView tvAddress = (TextView) v.findViewById(R.id.tvAddress);\n\t\t\t\ttvAddress.setText(listEntry.address);\n\t\t\t\t\n\t\t\t}",
"boolean canTakeNewPhoto();",
"boolean hasImageByHandler();",
"private void showImage(String thumbnailURL) {\n if ( ! TextUtils.isEmpty(thumbnailURL)) {\n Picasso.with(getContext())\n .load(thumbnailURL)\n .placeholder(R.drawable.ic_image)\n .error(R.drawable.ic_broken_image)\n .into(mStepThumbnailImageView);\n }\n }",
"private void prepareAlbums() {\n// int[] covers = new int[]{\n// R.drawable.album1,\n// R.drawable.album2,\n// R.drawable.album3,\n// R.drawable.album4,\n// R.drawable.album5,\n// R.drawable.album6,\n// R.drawable.album7,\n// R.drawable.album8,\n// R.drawable.album9,\n// R.drawable.album10,\n// R.drawable.album11,\n// R.drawable.album12,\n// R.drawable.album13};\n int [] covers = new int [ALBUM_SIZE];\n for (int i = 0; i < ALBUM_SIZE; i++){\n int temp = i + 1;\n covers[i] = getResources().getIdentifier(\"album\" + temp, \"drawable\", getPackageName() );\n }\n\n Album a = new Album(\"True Romance\", 13, covers[0]);\n albumList.add(a);\n\n a = new Album(\"Xscpae\", 8, covers[1]);\n albumList.add(a);\n\n a = new Album(\"Maroon 5\", 11, covers[2]);\n albumList.add(a);\n\n a = new Album(\"Born to Die\", 12, covers[3]);\n albumList.add(a);\n\n a = new Album(\"Honeymoon\", 14, covers[4]);\n albumList.add(a);\n\n a = new Album(\"I Need a Doctor\", 1, covers[5]);\n albumList.add(a);\n\n // Special image (album19, album20 )has w x h smaller than normal image\n a = new Album(\"Honeymoon\", 14, covers[18]);\n albumList.add(a);\n\n a = new Album(\"Honeymoon\", 14, covers[19]);\n albumList.add(a);\n\n a = new Album(\"Loud\", 11, covers[6]);\n albumList.add(a);\n\n a = new Album(\"Legend\", 14, covers[7]);\n albumList.add(a);\n\n a = new Album(\"Hello\", 11, covers[8]);\n albumList.add(a);\n\n a = new Album(\"Greatest Hits\", 17, covers[9]);\n albumList.add(a);\n\n a = new Album(\"Top Hits\", 17, covers[10]);\n albumList.add(a);\n\n a = new Album(\"King Hits\", 17, covers[11]);\n albumList.add(a);\n\n a = new Album(\"VIP Hits\", 17, covers[12]);\n albumList.add(a);\n\n a = new Album(\"True Romance\", 13, covers[13]);\n albumList.add(a);\n\n a = new Album(\"Xscpae\", 8, covers[14]);\n albumList.add(a);\n\n a = new Album(\"Maroon 5\", 11, covers[15]);\n albumList.add(a);\n\n a = new Album(\"Born to Die\", 12, covers[16]);\n albumList.add(a);\n\n a = new Album(\"Honeymoon\", 14, covers[17]);\n albumList.add(a);\n\n // Special image (album19, album20 )has w x h smaller than normal image\n a = new Album(\"Honeymoon\", 14, covers[18]);\n albumList.add(a);\n\n a = new Album(\"Honeymoon\", 14, covers[19]);\n albumList.add(a);\n\n adapter.notifyDataSetChanged();\n }",
"public void addNewPicture() {\n ImageView imgView = (ImageView)findViewById(R.id.poll_object_btn_image);\n Resources res = getContext().getResources();\n if(this.type == \"generic\") {\n //add the new pciture for the generic type\n Bitmap bitmap = BitmapFactory.decodeResource(res, R.drawable.generic_new);\n imgView.setImageBitmap(bitmap);\n }else if(this.type == \"location\") {\n //add the new picture for the location type\n Bitmap bitmap = BitmapFactory.decodeResource(res, R.drawable.generic_new);\n imgView.setImageBitmap(bitmap);\n }else if(this.type == \"picture\") {\n //add the new picture for the picture type\n Bitmap bitmap = BitmapFactory.decodeResource(res, R.drawable.generic_new);\n imgView.setImageBitmap(bitmap);\n }\n }",
"public void setThumbnail(String thumbnail) {\r\n\t\tthis.thumbnail = thumbnail;\r\n\t}",
"private void showImageDetail() {\n }",
"@Override\n protected Dimension getMinimumThumbSize()\n {\n return new Dimension(size, size);\n }",
"@Override\n protected Dimension getMinimumThumbSize()\n {\n return new Dimension(size, size);\n }",
"void setThumbnail(Bitmap thumbnail) {\n\t\tthis.mThumbnail = thumbnail;\n\t}",
"protected void changePic() {\nif(framesforUser.isEmpty())\n{\nToast.makeText(getApplicationContext(), \"Finished!\", Toast.LENGTH_LONG);\nmodeTextView.setText(\"Finished\");\nnewImgButton.setEnabled(false);\n\n}\nelse{\n\tCollections.shuffle(framesforUser);\n\n\tcurrentPicIndex=framesforUser.get(0);\n\n\t\t Log.e(\"SY\", \"Current PicIndex= \"+currentPicIndex+\" \"+framesforUser.get(0));\n\t\t currentOverlay = getResources().getDrawable(resourcefromframeorder[framesforUser.get(0)]);\n\t\t \n\t\t overlayview.setImageDrawable(currentOverlay);\n\t\t cameraframe.removeView(overlayview);\n\t\t cameraframe.addView(overlayview,1);\n\n\t\t framenumTextView.setText(currentPicIndex+\"\");\n\t\t\tcountdownView.setText(framesforUser.size()+\"\");\n\n\t}\n }",
"private void loadImages() {\n\t\t\n\t\tImageView playerImage1;\n\t\tImageView playerImage2;\n Bitmap selectedPicture;\n \n\t\tplayerImage1 = (ImageView)findViewById(R.id.player_image_1);\n\t\tplayerImage2 = (ImageView)findViewById(R.id.player_image_2);\n\t\t\n\t\tif (playerUri1 != null) {\n\t \n\t try {\n\t selectedPicture = MediaStore.Images.Media.getBitmap(\n\tthis.getContentResolver(),playerUri1);\n\t playerImage1.setImageBitmap(selectedPicture);\n\t } catch (Exception e) {\n\t \tLog.e(DISPLAY_SERVICE, \"Pic not displaying\");\n\t \tfinish();\n\t }\n\t\t} else {\n\t\t\tplayerImage1.setImageResource(R.drawable.red);\n\t\t}\n \n\t\tif (playerUri2 != null) {\t \n\t try {\n\t selectedPicture = MediaStore.Images.Media.getBitmap(\n\tthis.getContentResolver(),playerUri2);\n\t playerImage2.setImageBitmap(selectedPicture);\n\t } catch (Exception e) {\n\t \tLog.e(DISPLAY_SERVICE, \"Pic not displaying\");\n\t \tfinish(); \n\t }\n\t\t} else {\n\t\t\tplayerImage2.setImageResource(R.drawable.green);\n\t\t}\n\t}",
"@Override\n protected Bitmap doInBackground(PlaylistItem... params) {\n item=params[0];\n Log.d(TAG,mActivity.ld.toString());\n return downloadBitmap(mActivity.ld, mActivity.thumbnail_width, item.id);\n }",
"public void initImage() {\n if (isInited())\n return;\n //获取大图的游标\n Cursor cursor = context.getContentResolver().query(\n MediaStore.Images.Media.EXTERNAL_CONTENT_URI, // 大图URI\n STORE_IMAGES, // 字段\n null, // No where clause\n null, // No where clause\n MediaStore.Images.Media.DATE_TAKEN + \" DESC\"); //根据时间升序\n Log.e(\"eeeeeeeeeeeeeeeeeee\", \"------cursor:\" + cursor);\n if (cursor == null)\n return;\n while (cursor.moveToNext()) {\n int id = cursor.getInt(0);//大图ID\n String path = cursor.getString(1);//大图路径\n LogTool.setLog(\"大图路径1\", path);\n File file = new File(path);\n //判断大图是否存在\n if (file.exists()) {\n //小图URI\n String thumbUri = getThumbnail(id, path);\n //获取大图URI\n String uri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI.buildUpon().\n appendPath(Integer.toString(id)).build().toString();\n LogTool.setLog(\"大图路径2\", uri);\n if (Tools.isEmpty(uri))\n continue;\n if (Tools.isEmpty(thumbUri))\n thumbUri = uri;\n //获取目录名\n String folder = file.getParentFile().getName();\n String appFile = context.getResources().getString(R.string.app_name);\n if (!folder.equals(appFile)) {\n LocalFile localFile = new LocalFile();\n localFile.setPath(path);\n localFile.setOriginalUri(uri);\n localFile.setThumbnailUri(thumbUri);\n int degree = cursor.getInt(2);\n if (degree != 0) {\n degree = degree + 180;\n }\n localFile.setOrientation(360 - degree);\n\n\n paths.add(localFile);\n\n\n //判断文件夹是否已经存在\n if (folders.containsKey(folder)) {\n folders.get(folder).add(localFile);\n } else {\n List<LocalFile> files = new ArrayList<>();\n files.add(localFile);\n folders.put(folder, files);\n }\n }\n }\n }\n folders.put(\"所有图片\", paths);\n cursor.close();\n isRunning = false;\n }",
"private Boolean equalWebItemImages(WebItemImage webItemImageOne, WebItemImage webItemImageTwo) {\n\t\tif (webItemImageOne==null && webItemImageTwo==null) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\tif (webItemImageOne==null || webItemImageTwo==null) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (webItemImageOne.getSourceURL() == webItemImageTwo.getSourceURL()) {\r\n\t\t\treturn true;\r\n\t\t } else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public static Bitmap generateThumb(Bitmap bitmap){\r\n double ratioSquare;\r\n int bitmapHeight, bitmapWidth;\r\n //Acquire Data.\r\n bitmapHeight = bitmap.getHeight();\r\n bitmapWidth = bitmap.getWidth();\r\n ratioSquare = (bitmapHeight * bitmapWidth)/THUMB_SIZE;\r\n if(ratioSquare <=1) return bitmap;\r\n double ratio = Math.sqrt(ratioSquare);\r\n\r\n int requiredHeight = (int) Math.round(bitmapHeight/ratio);\r\n int requiredWidth = (int) Math.round(bitmapWidth /ratio);\r\n return Bitmap.createScaledBitmap(bitmap,requiredWidth,requiredHeight,true);\r\n }",
"void setThumbSizeX(long thumbSizeX);",
"private void fetchAndDisplayThumbnail(DisplayableContribution contribution) {\n String keyForLRUCache = contribution.getFilename();\n String cacheUrl = thumbnailCache.get(keyForLRUCache);\n if (!StringUtils.isBlank(cacheUrl)) {\n imageView.setImageURI(cacheUrl);\n return;\n }\n\n imageView.setBackground(null);\n if ((contribution.getState() != Contribution.STATE_COMPLETED) && FileUtils.fileExists(\n contribution.getLocalUri())) {\n imageView.setImageURI(contribution.getLocalUri());\n } else {\n Timber.d(\"Fetching thumbnail for %s\", contribution.getFilename());\n Disposable disposable = mediaDataExtractor\n .getMediaFromFileName(contribution.getFilename())\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(media -> {\n thumbnailCache.put(keyForLRUCache, media.getThumbUrl());\n imageView.setImageURI(media.getThumbUrl());\n });\n compositeDisposable.add(disposable);\n }\n\n }",
"@Override\n public void onItemClick(View view, int position) {\n ImageLoader.cleanDiskCache(getApplicationContext());\n ImagePreview.getInstance()\n .setContext(ChooseBestPictureActivity.this)\n .setEnableDragClose(true)\n .setShowDownButton(false)\n .setIndex(position)\n .setImageList(imageList)\n .start();\n }",
"private void dispatchTakePictureIntent() {\n switch (REQUEST_TAKE_PHOTO_NUM){\n case REQUEST_TAKE_PHOTO_1:\n Toast toast=Toast.makeText(getApplicationContext(),\"ថតពីមុខ\",Toast.LENGTH_SHORT);\n //toast.setMargin(50,50);\n toast.setGravity(Gravity.TOP, 100,80);\n //toast.show();\n ViewGroup group = (ViewGroup) toast.getView();\n TextView messageTextView = (TextView) group.getChildAt(0);\n messageTextView.setTextSize(25);\n toast.show();\n break;\n case REQUEST_TAKE_PHOTO_2:\n Toast toast1=Toast.makeText(getApplicationContext(),\"ថតផ្នែកខាងស្ដាំ\",Toast.LENGTH_SHORT);\n toast1.setGravity(Gravity.TOP, 100,80);\n //toast.show();\n ViewGroup group1 = (ViewGroup) toast1.getView();\n TextView messageTextView1 = (TextView) group1.getChildAt(0);\n messageTextView1.setTextSize(25);\n toast1.show();\n break;\n case REQUEST_TAKE_PHOTO_3:\n Toast toast2=Toast.makeText(getApplicationContext(),\"ថតផ្នែកខាងឆ្វេង\",Toast.LENGTH_SHORT);\n toast2.setGravity(Gravity.TOP, 100,80);\n //toast.show();\n ViewGroup group2 = (ViewGroup) toast2.getView();\n TextView messageTextView2 = (TextView) group2.getChildAt(0);\n messageTextView2.setTextSize(25);\n toast2.show();\n break;\n case REQUEST_TAKE_PHOTO_4:\n Toast toast3= Toast.makeText(getApplicationContext(),\"ថតពីក្រោយ\",Toast.LENGTH_SHORT);\n toast3.setGravity(Gravity.TOP, 100,80);\n //toast.show();\n ViewGroup group3 = (ViewGroup) toast3.getView();\n TextView messageTextView3 = (TextView) group3.getChildAt(0);\n messageTextView3.setTextSize(25);\n toast3.show();\n break;\n// add 2 image by samang 26/08\n case REQUEST_TAKE_PHOTO_5:\n Toast toast4= Toast.makeText(getApplicationContext(),\"ផ្នែកផ្សេងទៀត\",Toast.LENGTH_SHORT);\n toast4.setGravity(Gravity.TOP, 100,80);\n //toast.show();\n ViewGroup group4 = (ViewGroup) toast4.getView();\n TextView messageTextView4 = (TextView) group4.getChildAt(0);\n messageTextView4.setTextSize(25);\n toast4.show();\n break;\n\n case REQUEST_TAKE_PHOTO_6:\n Toast toast5= Toast.makeText(getApplicationContext(),\"ផ្នែកផ្សេងទៀត\",Toast.LENGTH_SHORT);\n toast5.setGravity(Gravity.TOP, 100,80);\n //toast.show();\n ViewGroup group5 = (ViewGroup) toast5.getView();\n TextView messageTextView5 = (TextView) group5.getChildAt(0);\n messageTextView5.setTextSize(25);\n toast5.show();\n break;\n // end\n }\n\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\n // Create the File where the photo should go\n File photoFile = null;\n try {\n photoFile = createImageFile();\n } catch (IOException ex) {\n ex.printStackTrace();\n // Error occurred while creating the File\n }\n if (photoFile != null) {\n Uri photoURI = FileProvider.getUriForFile(this,\n this.getPackageName() + \".provider\",\n photoFile);\n //BuildConfig.APPLICATION_ID\n mPhotoFile = photoFile;\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n //startActivityForResult(takePictureIntent, REQUEST_TAKE_PHOTO);\n startActivityForResult(takePictureIntent, REQUEST_TAKE_PHOTO_NUM);\n }\n }\n }",
"public static String getThumbnailPlayerResource(Player player) {\r\n\r\n final int teamA = 1;\r\n final int teamB = 2;\r\n\r\n String imageResource = \"\";\r\n\r\n if (player != null) {\r\n switch (player.getTeamID()) {\r\n case teamA:\r\n switch (player.getType()) {\r\n case BLACKORC:\r\n imageResource = \"/bloodbowl/resources/TeamA/blackorc.gif\";\r\n break;\r\n case BLITZER:\r\n imageResource = \"/bloodbowl/resources/TeamA/blitzer.gif\";\r\n break;\r\n case CATCHER:\r\n imageResource = \"/bloodbowl/resources/TeamA/catcher.gif\";\r\n break;\r\n case GOBLIN:\r\n imageResource = \"/bloodbowl/resources/TeamA/goblin.gif\";\r\n break;\r\n case LINEMAN:\r\n imageResource = \"/bloodbowl/resources/TeamA/lineman.gif\";\r\n break;\r\n case OGRE:\r\n imageResource = \"/bloodbowl/resources/TeamA/ogre.gif\";\r\n break;\r\n case THROWER:\r\n imageResource = \"/bloodbowl/resources/TeamA/thrower.gif\";\r\n break;\r\n case TROLL:\r\n imageResource = \"/bloodbowl/resources/TeamA/troll.gif\";\r\n break;\r\n }\r\n break;\r\n case teamB:\r\n switch (player.getType()) {\r\n case BLACKORC:\r\n imageResource = \"/bloodbowl/resources/TeamB/blackorc.gif\";\r\n break;\r\n case BLITZER:\r\n imageResource = \"/bloodbowl/resources/TeamB/blitzer.gif\";\r\n break;\r\n case CATCHER:\r\n imageResource = \"/bloodbowl/resources/TeamB/catcher.gif\";\r\n break;\r\n case GOBLIN:\r\n imageResource = \"/bloodbowl/resources/TeamB/goblin.gif\";\r\n break;\r\n case LINEMAN:\r\n imageResource = \"/bloodbowl/resources/TeamB/lineman.gif\";\r\n break;\r\n case OGRE:\r\n imageResource = \"/bloodbowl/resources/TeamB/ogre.gif\";\r\n break;\r\n case THROWER:\r\n imageResource = \"/bloodbowl/resources/TeamB/thrower.gif\";\r\n break;\r\n case TROLL:\r\n imageResource = \"/bloodbowl/resources/TeamB/troll.gif\";\r\n break;\r\n }\r\n break;\r\n\r\n }\r\n }\r\n\r\n return imageResource;\r\n }",
"public void imageRight(){\n if(index == (imageArray.size() - 1)){\n index = 0;\n }else{\n index++;\n }\n String url = imageArray.get(index);\n Picasso.with(this).load(url).into(imageView);\n }",
"Builder addThumbnailUrl(URL value);",
"@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tgetWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.activity_lockimagelist);\n\n\t\tdb = new AppDBHelper(getApplicationContext());\n\t\tif (!imageLoader.isInited()) {\n\t\t\timageLoader.init(ImageLoaderConfiguration\n\t\t\t\t\t.createDefault(getApplicationContext()));\n\t\t}\n\n\t\toptions = new DisplayImageOptions.Builder()\n\t\t\t\t.showImageOnLoading(R.drawable.ic_stub)\n\t\t\t\t.showImageForEmptyUri(R.drawable.ic_empty)\n\t\t\t\t.showImageOnFail(R.drawable.ic_error).cacheInMemory(true)\n\t\t\t\t.bitmapConfig(Bitmap.Config.RGB_565).build();\n\n\t\tBundle bundle = getIntent().getExtras();\n\n\t\tFile mydir = getFilesDir();\n\t\tLog.d(\"main\", \"size: \" + mydir.list().length);\n\n\t\tint size = mydir.list().length;\n\t\tthis.thumbnailsselection = new boolean[size];\n\n\t\tfor (String path : mydir.list()) {\n\n\t\t\tfileName = fileName + path + \",\";\n//Toast.makeText(getApplicationContext(), fileName, 5000).show();\n\t\t}\n\t\tLog.d(\"main\", \"FilePath: \" + fileName);\n\n\t\tsplitUrls = fileName.split(\",\");\n\t\tsplitUrls = removeElement(splitUrls, \"null\");\n\n\t\tfinal GridView imagegrid = (GridView) findViewById(R.id.gridView1);\n\t\timagegrid.setAdapter(new ImageAdapter(this, splitUrls));\n\n\t\tfinal Button selectBtn = (Button) findViewById(R.id.btn_apply);\n\t\tselectBtn.setOnClickListener(new OnClickListener() {\n\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfinal int len = thumbnailsselection.length;\n\n\t\t\t\tint cnt = 0;\n\t\t\t\tString selectImages = \"\";\n\t\t\t\tfor (int i = 0; i < len; i++) {\n\t\t\t\t\tif (thumbnailsselection[i]) {\n\t\t\t\t\t\tcnt++;\n\n\t\t\t\t\t\tselectImages = splitUrls[i];\n\t\t\t\t\t\tfileName = new File(selectImages).getName();\n\t\t\t\t\t\tunhideimg = db.getRealpath(fileName);\n\t\t\t\t\t\tLog.i(\"path\", unhideimg);\n\t\t\t\t\t\tdb.removeImage(fileName);\n\t\t\t\t\t}\n\t\t\t\t\tFile to = new File(unhideimg + \"/\" + fileName);\n\t\t\t\t\tFile from = new File(getFilesDir() + \"/\" + fileName);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFileUtils.moveFile(from, to);\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\tsplitUrls = removeElement(splitUrls, selectImages);\n\t\t\t\t\tint sdkVersion = android.os.Build.VERSION.SDK_INT;\n\t\t\t\t\tif (sdkVersion > android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {\n\t\t\t\t\t\tsendBroadcast(new Intent(\n\t\t\t\t\t\t\t\tIntent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri\n\t\t\t\t\t\t\t\t\t\t.parse(Environment\n\t\t\t\t\t\t\t\t\t\t\t\t.getExternalStorageDirectory()\n\t\t\t\t\t\t\t\t\t\t\t\t.getAbsolutePath())));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED,\n\t\t\t\t\t\t\t\tUri.parse(\"file://\"\n\t\t\t\t\t\t\t\t\t\t+ Environment\n\t\t\t\t\t\t\t\t\t\t\t\t.getExternalStorageDirectory())));\n\t\t\t\t\t}\n\t\t\t\t\t((BaseAdapter) imagegrid.getAdapter())\n\t\t\t\t\t\t\t.notifyDataSetChanged();\n\n\t\t\t\t}\n\t\t\t\tToast.makeText(getApplicationContext(), \"Image(s) Unlock\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\tIntent i=new Intent(getApplicationContext(),MainActivity.class);\n\t\t\t\tstartActivity(i);\n\n\t\t\t}\n\n\t\t});\n\t}",
"@Override\n public boolean onLongClick(final View view) {\n VideoThumbnailView.this.performLongClick();\n return true;\n }",
"@Test\n public void largePicTest() {\n // TODO: test largePic\n }",
"void seTubeDownImage(String image);",
"public ImageThumbnail procureImageThumbnail(File file){\n return procureImageThumbnail(file,800,600);\n }",
"private void onClickPhotoThumbnail(View view) {\r\n int photoId = (int) view.getTag(R.integer.tag_event_photo);\r\n EventPhoto photo = DatabaseManager.getInstance().getDatabase().eventPhotoDao().findById(photoId);\r\n\r\n if (!isEditingPhotos) {\r\n Intent intent = new Intent(this, ViewPhotoActivity.class);\r\n intent.putExtra(ViewPhotoActivity.EXTRA_PHOTO, photo.uri);\r\n startActivity(intent);\r\n return;\r\n }\r\n\r\n new ActionConfirmationFragment(this, this)\r\n .setTitle(getString(R.string.event_confirmation_delete_photo))\r\n .setMessage(getString(R.string.action_confirmation_cannot_be_undone))\r\n .setRequestID(REQUEST_CONFIRMATION_DELETE_PHOTO)\r\n .show(getSupportFragmentManager(), null);\r\n\r\n lastPressedPhoto = view;\r\n }",
"private static Bitmap storeThumbnail(ContentResolver cr, Bitmap source, long id,\n float width, float height, int kind) {\n\n // create the matrix to scale it\n Matrix matrix = new Matrix();\n\n float scaleX = width / source.getWidth();\n float scaleY = height / source.getHeight();\n\n matrix.setScale(scaleX, scaleY);\n\n Bitmap thumb = Bitmap.createBitmap(source, 0, 0,\n source.getWidth(),\n source.getHeight(), matrix,\n true\n );\n\n ContentValues values = new ContentValues(4);\n values.put(Images.Thumbnails.KIND,kind);\n values.put(Images.Thumbnails.IMAGE_ID,(int)id);\n values.put(Images.Thumbnails.HEIGHT,thumb.getHeight());\n values.put(Images.Thumbnails.WIDTH,thumb.getWidth());\n\n Uri url = cr.insert(Images.Thumbnails.EXTERNAL_CONTENT_URI, values);\n\n try {\n OutputStream thumbOut = cr.openOutputStream(url);\n thumb.compress(Bitmap.CompressFormat.JPEG, 100, thumbOut);\n thumbOut.close();\n return thumb;\n } catch (FileNotFoundException ex) {\n return null;\n } catch (IOException ex) {\n return null;\n }\n\n }",
"@Test\n public void testJFIFRawRGBThumbnail() throws IOException {\n JPEGImageReader reader = createReader();\n reader.setInput(ImageIO.createImageInputStream(getClassLoaderResource(\"/jpeg/jfif-jfif-and-exif-thumbnail-sharpshot-iphone.jpg\")));\n\n assertTrue(reader.hasThumbnails(0));\n assertEquals(2, reader.getNumThumbnails(0));\n\n // RAW JFIF\n assertEquals(131, reader.getThumbnailWidth(0, 0));\n assertEquals(122, reader.getThumbnailHeight(0, 0));\n\n BufferedImage rawJFIFThumb = reader.readThumbnail(0, 0);\n assertNotNull(rawJFIFThumb);\n assertEquals(131, rawJFIFThumb.getWidth());\n assertEquals(122, rawJFIFThumb.getHeight());\n\n // Exif (old thumbnail, from original image, should probably been removed by the software...)\n assertEquals(160, reader.getThumbnailWidth(0, 1));\n assertEquals(120, reader.getThumbnailHeight(0, 1));\n\n BufferedImage exifThumb = reader.readThumbnail(0, 1);\n assertNotNull(exifThumb);\n assertEquals(160, exifThumb.getWidth());\n assertEquals(120, exifThumb.getHeight());\n }",
"public void changePicture() {\n ImageView imgView = (ImageView)findViewById(R.id.poll_object_btn_image);\n Resources res = getContext().getResources();\n if(type == \"generic\") {\n //add the new picture for the generic type\n Bitmap bitmap = BitmapFactory.decodeResource(res,R.drawable.generic_view);\n imgView.setImageBitmap(bitmap);\n }\n else if(type == \"location\") {\n //add the new picture for the location type\n Bitmap bitmap = BitmapFactory.decodeResource(res,R.drawable.generic_view);\n imgView.setImageBitmap(bitmap);\n }\n else if(type == \"picture\"){\n //add the new picture for the picture type\n Bitmap bitmap = BitmapFactory.decodeResource(res,R.drawable.generic_view);\n imgView.setImageBitmap(bitmap);\n }\n }",
"public String setImageLoader(ArrayList<String> link, int rando) {\n\t\tArrayList<String> newLink = link;\n\t\timgs = newLink.get(rando);\n\t\timg = new Image(imgs);\n\t\timgView.setImage(img);\n\t\treturn imgs;\n\t\t//imgView.setPreserveRatio(true);\n\t\t//imgView.setFitHeight(100);\n\t\t//imgView.setFitWidth(100);\n\t\t//this.getChildren().addAll(picBox,imgView);\t\n\t}",
"private static Bitmap getThumbnailImage(Bitmap bm) {\n\n int width = bm.getWidth();\n int height = bm.getHeight();\n\n Bitmap resizedBitmap;\n Bitmap decoded;\n\n if (width > 250 || height > 250) {\n\n float aspectRatio;\n\n //image is too big, resize and compress to 80% quality\n if (width > height) {\n\n aspectRatio = (float) width / (float) height;\n width = 150;\n height = (int) (width / aspectRatio);\n\n } else {\n\n aspectRatio = (float) height / (float) width;\n height = 150;\n width = (int) (height / aspectRatio);\n\n }\n\n resizedBitmap = Bitmap.createScaledBitmap(bm, width, height, false);\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n resizedBitmap.compress(Bitmap.CompressFormat.JPEG, 80, bytes);\n decoded = BitmapFactory.decodeStream(new ByteArrayInputStream(bytes.toByteArray()));\n bm.recycle();\n resizedBitmap.recycle();\n\n } else {\n\n //image is small, just compress to 90% quality\n resizedBitmap = bm;\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n resizedBitmap.compress(Bitmap.CompressFormat.JPEG, 80, bytes);\n decoded = BitmapFactory.decodeStream(new ByteArrayInputStream(bytes.toByteArray()));\n bm.recycle();\n resizedBitmap.recycle();\n\n }\n\n return decoded;\n\n }",
"@SuppressWarnings(\"uncommentedmain\")\n public static void main(final String[] args) {\n final Thumbnail thumbnail = SingleCommand.singleCommand(Thumbnail.class).parse(args);\n\n if (thumbnail.myHelpOption.showHelpIfRequested()) {\n return;\n }\n\n thumbnail.run();\n }",
"@Override\n\t\t\tpublic boolean onActionItemClicked(ActionMode arg0, MenuItem arg1) {\n\t\t\t\t\n\t\t\t switch (arg1.getItemId()) {\n\t\t\t case R.id.hide:\n\t\t\t \n\t\t\t \t for(String msg:fake){\n\t\t\t \t\t File source = new File(msg);\n\t\t\t \t\t Uri imageUri = Uri.fromFile(source);\n\t\t\t \t\t String filenames=imageUri.getLastPathSegment();\n\t\t\t \t\t File destination = new File(ImageFolder, filenames);\n\t\t\t destination.list();\n\t\t\t addImageGallery(destination);\n\t\t\t try {\n\t\t\t\t\t \t\t \tmove(source, destination);\t\t\t\t\t\n\t\t\t\t\t\t\t\t source.delete();\n\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"Exception1\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}\n\t\t\t \t \t }\n\t\t\t \t \n\t\t\t \t Toast.makeText(getApplicationContext(),count+ \" Image Unhide Successfully\", Toast.LENGTH_LONG).show();\n\t\t\t \t count=0;\n\t\t\t \t arg0.finish();\n\t\t\t return true;\n\t\t\t \t\t\t default:\n\t\t\t \t \t\t return false;\n\t\t\t }\n\t\t\t\t\t\t\t}",
"@Override\n public void onClick(View v) {\n\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), 1);\n\n }",
"public Image getTwo();",
"@Override\n public void onSuccess(Uri uri) {\n if (!ImageListUrl.contains(uri.toString())) {\n ImageListUrl.add(uri.toString());\n\n /// add property if imageurl arraylist same with imagelist arraylist\n if (ImageListUrl.size() == ImageList.size()) {\n Toast.makeText(NewRecipe.this, ImageListUrl.toString(), Toast.LENGTH_SHORT).show();\n\n saveRecipe();\n\n }\n }\n }",
"int getImagesByHandlerCount();",
"public void setThumb( final int value ) {\n \tcheckWidget();\n \tif( value >= 1 ) {\n thumb = value;\n }\n \tif( value >= maximum - minimum ) {\n \t thumb = maximum - minimum;\n \t selection = minimum;\n \t}\n }",
"@Override\n public void run(String... args) throws Exception {\n File imagesPath = new File(\"src/main/resources/images/\");\n File thumbnails = new File(\"src/main/resources/thumbnails/\");\n\n imageStoragePath = imagesPath.toURI().getPath();\n thumbnailStoragePath = thumbnails.toURI().getPath();\n\n imageStoragePath = imageStoragePath.substring(1);\n thumbnailStoragePath = thumbnailStoragePath.substring(1);\n\n System.out.println(\"***************************************************\");\n System.out.println(\"Images are stored at: \" + imageStoragePath);\n System.out.println(\"Thumbnails are stored at: \"+ thumbnailStoragePath);\n }",
"@Override\n protected void onActivityResult(int arg0, int arg1, Intent arg2) {\n super.onActivityResult(arg0, arg1, arg2);\n if (arg0 == 1) {\n // 相册返回\n if (arg1 == RESULT_OK) {\n if (arg2.getExtras() == null) {\n return;\n }\n photoList = (ArrayList<Map<String, Object>>) arg2\n .getSerializableExtra(\"selectedList\");\n if (photoList != null && photoList.size() > 0) {\n String outFile = getParse().isNull(\n photoList.get(0).get(\"imagePath\")).replace(\n \".\",\n MyUtils.getInstance().MD5(\n String.valueOf(System.currentTimeMillis()))\n + \".\");\n startPhotoZoom(\n Uri.fromFile(new File(getParse().isNull(\n photoList.get(0).get(\"imagePath\")))),\n Uri.fromFile(new File(outFile)));\n }\n }\n } else if (arg0 == 2) {\n // 裁剪图片返回\n if (arg1 == RESULT_OK) {\n File file = null;\n if (Environment.getExternalStorageState().equals(\n Environment.MEDIA_MOUNTED)) {\n file = new File(getExternalCacheDir().getPath()\n + \"/images_data\");\n } else {\n file = new File(getCacheDir().getPath() + \"/images_data\");\n }\n if (!file.exists()) {\n file.mkdirs();\n }\n file = new File(file.getPath()\n + \"/\"\n + MyUtils.getInstance().MD5(\n String.valueOf(System.currentTimeMillis()))\n + \".jpeg\");\n Bundle bundle = arg2.getExtras();\n Bitmap bitmap = null;\n if (bundle != null) {\n bitmap = bundle.getParcelable(\"data\");\n }\n\n if (bitmap != null) {// 保存图片\n FileOutputStream fos = null;\n try {\n fos = new FileOutputStream(file.getPath());\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fos);\n imageFile = file.getPath();\n bitmap.recycle();\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n // e.printStackTrace();\n utils.showToast(getApplicationContext(), \"保存图片失败\");\n imageFile = null;\n }\n submitImage();\n }\n\n }\n } else if (arg0 == 3) {\n // 系统相机返回\n if (MyApplication.fileUri != null) {\n BitmapFactory.Options op = new BitmapFactory.Options();\n op.inSampleSize = 16;\n Bitmap bm = BitmapFactory.decodeFile(\n MyApplication.fileUri.getPath(), op);\n if (bm == null) {\n return;\n }\n Map<String, Object> map = new HashMap<String, Object>();\n map.put(\"isCheck\", true);\n map.put(\"imagePath\", MyApplication.fileUri);\n photoList.add(0, map);\n if (photoList != null && photoList.size() > 0) {\n String outFile = getParse().isNull(\n photoList.get(0).get(\"imagePath\"))\n .replace(\n \".\",\n utils.MD5(String.valueOf(System\n .currentTimeMillis())) + \".\");\n startPhotoZoom(\n Uri.fromFile(new File(getParse().isNull(\n photoList.get(0).get(\"imagePath\")))),\n Uri.fromFile(new File(outFile)));\n }\n }\n } else if (arg0 == 10) {// 修改其它资料成功返回\n if (arg1 == RESULT_OK) {\n\n }\n }\n }",
"@Override\n\tprotected void calculateThumbSize() {\n\t\tsuper.calculateThumbSize();\n\t\trec_upp.setSize(thumbRect.width, thumbRect.height );\n\t}",
"public void startImageSwitch() {\n Intent intent = new Intent(this, AlbumCompatActivity.class);\r\n intent.putExtra(AlbumCompatActivity.CHOOSE_MODE, AlbumCompatActivity.CHOOSE_MODE_SECTION); // ImageUtil.getPathForUpload(mImageKey).getAbsolutePath()\r\n intent.putExtra(AlbumCompatActivity.K_ALBUM_RST_COUNT, 5);\r\n startActivityForResult(intent, SELECT_IMAGE_COMPLETE);\r\n }",
"@Override\n public void generateThumbnail(File input, File output, String mimeType) throws RuntimeException { \n try {\n BufferedImage img = ImageIO.read(input);\n /* create transformation matrix */\n from.setRect(0, 0, img.getWidth(), img.getHeight());\n /* only copy if smaller */\n if (from.getWidth() < DEFAULT_WIDTH && from.getHeight() < DEFAULT_HEIGHT) {\n ImageIO.write(img, ImageUtil.hasAlpha(img) ? \"png\" : \"jpg\", output);\n } else {\n AffineUtils.createScaleTransfrom(from, to, true, imageTransform);\n /* transform source bounds and save only the real image part, save space */\n size.setLocation(from.getMaxX(), from.getMaxY());\n imageTransform.transform(size, size);\n /* create image subbuffer */\n BufferedImage subBuffer = new BufferedImage(\n (int) size.getX(), (int) size.getY(), BufferedImage.TYPE_3BYTE_BGR);\n /* transform into thumbnail buffer */\n Graphics2D g2d = subBuffer.createGraphics();\n try {\n /* smooth interpolation, scale more then 50% = bad quality */\n g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,\n RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n g2d.drawImage(img, imageTransform, null);\n } finally {\n g2d.dispose();\n }\n /* save thumbnail, if we have an alpha channel then save as png */\n ImageIO.write(subBuffer, ImageUtil.hasAlpha(subBuffer) ? \"png\" : \"jpg\", output);\n }\n } catch (Exception e) { \n throw new RuntimeException(\"can not generate thumbnail!\", e);\n }\n }",
"public static void sliceTo4x4(final Context context, final onSuccessLoadBitmap onSuccessLoadBitmap, String imageUrl) {\n\n new ConvertUrlToBitmap().execute(imageUrl);\n\n final Handler handler = new Handler();\n Runnable runnable = new Runnable() {\n\n @Override\n public void run() {\n try{\n //do your code here\n System.out.println(bitmapList.size());\n if(bitmapList.size()==16)onSuccessLoadBitmap.onSliceSuccess(bitmapList);\n }\n catch (Exception e) {\n\n }\n finally{\n //also call the same runnable to call it at regular interval\n if(!downloadselesai)handler.postDelayed(this, 1000);\n }\n }\n };\n handler.post(runnable);\n\n /*\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample11));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample12));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample13));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample14));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample21));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample22));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample23));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample24));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample31));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample32));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample33));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample34));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample41));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample42));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample43));*/\n\n\n\n\n }"
]
| [
"0.68785477",
"0.6161982",
"0.60578823",
"0.60389906",
"0.59832716",
"0.59288734",
"0.5915009",
"0.5890214",
"0.5847362",
"0.5845612",
"0.5812896",
"0.5812879",
"0.57987595",
"0.5778382",
"0.5739072",
"0.57232195",
"0.57046586",
"0.5666305",
"0.5659537",
"0.5654741",
"0.5641135",
"0.5637018",
"0.56109875",
"0.5578331",
"0.55225027",
"0.5521912",
"0.55144155",
"0.5487751",
"0.5469562",
"0.5469562",
"0.5465303",
"0.54549366",
"0.5448802",
"0.54487264",
"0.5441128",
"0.5433467",
"0.54274696",
"0.5426632",
"0.5405793",
"0.5400117",
"0.53848606",
"0.53838515",
"0.5370728",
"0.5364768",
"0.5364302",
"0.5360209",
"0.53512067",
"0.5347785",
"0.533694",
"0.5334849",
"0.53251654",
"0.53244066",
"0.5309018",
"0.52947736",
"0.52905387",
"0.5286514",
"0.52842313",
"0.52720326",
"0.5266141",
"0.5264864",
"0.52567905",
"0.5253854",
"0.5253854",
"0.5253323",
"0.525239",
"0.52433574",
"0.5237787",
"0.52345705",
"0.52318084",
"0.5220228",
"0.52084917",
"0.52053386",
"0.5204642",
"0.52000254",
"0.51938397",
"0.5193112",
"0.51930165",
"0.51864666",
"0.5185804",
"0.5166346",
"0.5159421",
"0.51570684",
"0.51557887",
"0.5151355",
"0.5141273",
"0.51388186",
"0.51367503",
"0.5115631",
"0.51140547",
"0.51080227",
"0.5106989",
"0.5105931",
"0.50963616",
"0.5094424",
"0.50924975",
"0.5077446",
"0.50728714",
"0.5072295",
"0.5071949",
"0.5059538",
"0.5058146"
]
| 0.0 | -1 |
int k = i%j; | protected void addInstagramDetailPage(Panel middleTable, List<Data> instagrams) {
int i = 0;
HorizontalPanel hp = new HorizontalPanel();
for (Data data : instagrams) {
//thumbnails
VerticalPanel vp = new VerticalPanel();
if (i % 3 == 0) {
hp = new HorizontalPanel();
}
if (data.getCaption() != null) {
vp.add(new Label(data.getCaption().getText()));
}
if (data.getImages() != null) {
Image image = new Image(data.getImages().getThumbnailResolution().getImageUrl());
vp.add(image);
}
hp.add(vp);
middleTable.add(hp);
i++;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int p(K k, int i) {\r\n return i/2 + (i*i)/2 + (i%2);\r\n }",
"static int modulo(int x, int y) {\n return (x%y);\n }",
"private int getIndex(int val){\n return val%bucket;\n }",
"static int lcm(int j, int k) {\n\t\tint start;\n\t\tif (j<k)\n\t\t\tstart= j;\n\t\telse start = k; // Breaks ties with k\n\t\treturn lcmhelp(j,k,start);\n\t}",
"public static void main(String[] args) \n\t{\n\t\t int i=20, j=40;\n\t\t int k=0;\n\t\t ArrayList<Integer> l1=new ArrayList<Integer>();\n\t\t ArrayList<Integer> l2=new ArrayList<Integer>();\n\t\t for(int a=i;a<=j;a++){\n\t\t int count=0;\n\t\t for(int b=2;b<a;b++)\n\t\t if(a%b==0)\n\t\t count++;\n\t\t if(count==0)\n\t\t l1.add(a); }\n\t\t for(int e=i;e<=j;e++)\n\t\t l2.add(e);\n\t\t l2.removeAll(l1);\n\t\t for(int d=0;d<l2.size();d++)\n\t\t k=k+l2.get(d);\n\t\t \n\t\tSystem.out.println(k);\n\t}",
"public static int mod(int x, int y) {\n return x % y;\n }",
"public int mo4308c(int i, int i2) {\n return i % i2;\n }",
"private static int lpf(int i) {\n\t\tint j = i-1;\n\t\twhile(j>=2) {\n\t\t\tif (i%j == 0 && checkifprime(j)) {\n\t\t\t\treturn j;\n\t\t\t}\n\t\t\tj--;\n\t\t}\n\t\treturn 2;\n\t}",
"public static boolean isDivisibleBy(int j, int i) {\n\t\tif (j%i==0) { //use mod to achieve no remainder--meaning completely divisible\r\n\t\treturn true;\t//return true\r\n\t\t} else {\r\n\t\treturn false;\t//return false\r\n\t\t}\r\n\t}",
"public int modulo(int a, int b) {\n return a % b;\n }",
"static int beautifulDays(int i, int j, int k) {\n return (int) IntStream.range(i, j + 1).filter(day -> Math.abs(day - reverseInt(day)) % k == 0).count();\n }",
"static int lcmhelp(int j,int k, int n) {\n\t\tif ((n % j == 0) && (n % k == 0)) {\t\t\n\t\t\treturn n; // n is the lowest number\n\t\t}\n\t\telse \n\t\t\treturn lcmhelp(j,k,n+1); // try again with the next-largest number\n\t}",
"void milestone3(){\n for(int i = 2; i <= 100; i++){\n int count = 0;\n for(int j = 1; j <= i; j++)\n if(i % j == 0) count += 1;\n if(count > 2) continue;\n else System.out.print(i + \" \");\n }\n System.out.println();\n }",
"public static void main(String[] args) {\n long number = 6857;\n long i = 2;\n while ((number / i != 1) || (number % i != 0)) {\n if (number % i == 0) {\n number = number / i;\n } else {\n i++;\n }\n }\n System.out.println(i);\n\n }",
"public int calculateNthPrime(int k) {\n\t\t// TODO Write an implementation for this method declaration \n\t\tint i =1;\n\t\tint testnum = 2;\n\t\tboolean isPrime = true; \n\t\tif(k == 0) {\n\t\t\tthrow new IllegalArgumentException(\"number cannot be 0 or 1\");\n\t\t}\n\t\twhile(i < k+1) {\n\t\t\tfor(int j = 2; j < testnum; j++) {\n\t\t\t\t\n\t\t\t\tif(testnum % j == 0) {\n\t\t\t\t\tisPrime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isPrime == true) {\n\t\t\t\t//System.out.println(\"test num\" + \" \" + testnum);\n\t\t\t\ttestnum++;\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse if(isPrime == false) {\n\t\t\t\t//System.out.println(\"composite\" + \" \" + testnum);\n\t\t\t\ttestnum++;\n\t\t\t\tisPrime = true;\n\t\t\t}\n\t\t}\n\t\ti--;\n\t\ttestnum--;\n\t\t//System.out.println(i + \" \" + testnum);\n\n\t\treturn testnum;\n\t}",
"private int getIndex2(int val){\n return val/bucket;\n }",
"private int mad(K k, int m) {\n Random rand = new Random();\n /* Select the next prime number greater than m */\n int p = nextPrime(m);\n /* Choose two numbers between 1 and m - 1 */\n int a = rand.nextInt(m) + 1;\n int b = rand.nextInt(m) + 1;\n int index = ((a * k.hashCode() + b) % p) % m;\n return index;\n }",
"static int workbook(int n, int k, int[] arr) {\n int specialProblems = 0;\n int page = 1;\n for (int i = 0; i < n; i++) {\n for (int j = 1; j <= arr[i]; j++) {\n if (j == page)\n specialProblems++;\n if (j % k == 0)\n page++;\n }\n if (arr[i] % k != 0) page++;\n }\n return specialProblems;\n }",
"private long m10270d(long j) {\r\n return (j >>> 1) ^ (-(1 & j));\r\n }",
"public static int fetch(ArrayList<Integer> a, int i, int j){\n\t\treturn a.get(i)/(int)Math.pow(10,j) & 1;\n\t}",
"private static boolean m26009a(long j, long j2, long j3) {\n if (j2 >= 0 && j3 > 0) {\n if ((j >= 0 ? j % j3 : (((Long.MAX_VALUE % j3) + 1) + ((j & Long.MAX_VALUE) % j3)) % j3) >= j2) {\n return false;\n }\n }\n return true;\n }",
"private static int get_number(int i, int j) { n n!\n// C = _____________\n// r (n-r)! * r!\n//\n return factorial(i)/(factorial(i-j)* factorial(j));\n }",
"public static int singleNumber(int[] nums, int k) {\n int len = nums.length, result = 0;\n int[] countBits = new int[32];\n\n for (int i = 0; i < 32; i++) {\n for (int j = 0; j < len; j++) {\n // if the bit position at i is set, we increment countBits[i] by 1.\n if (((nums[j] >> i) & 1) == 1)\n countBits[i]++;\n }\n\n result |= ((countBits[i] % k) << i);\n }\n return result;\n }",
"private int d(@Nullable K ☃) {\r\n/* 127 */ return (xq.f(System.identityHashCode(☃)) & Integer.MAX_VALUE) % this.b.length;\r\n/* */ }\r\n/* */ private int b(@Nullable K ☃, int i) {\r\n/* */ int j;\r\n/* 131 */ for (j = i; j < this.b.length; j++) {\r\n/* 132 */ if (this.b[j] == ☃) {\r\n/* 133 */ return j;\r\n/* */ }\r\n/* 135 */ if (this.b[j] == a) {\r\n/* 136 */ return -1;\r\n/* */ }\r\n/* */ }",
"private static int cprModFunction(int a, int b) {\n\t\tint res = a % b;\n\t\tif (res < 0)\n\t\t\tres += b;\n\t\treturn res;\n\t}",
"public void smallestMultiple(){\n outerLoop: for( int i = 2; i < Integer.MAX_VALUE; i++ ){\n for( int j = 3; j <= 20; j++ )\n if( i % j != 0 )\n continue outerLoop;\n System.out.println( i );\n break;\n }\n }",
"private static void helloHelloModulo() {\n int a = 1;\n int b = 10;\n int c = 1 / 10;\n\n int d = 1 % 10;\n\n\n System.out.println(\" Result deleniya \" + c);\n System.out.println(\" Result deleniya \" + d);\n\n\n int делимое = 75;\n int делитель = 13;\n int f = делимое % делитель;\n\n int остаток = делимое - (делимое / делитель) * делитель;\n int j = 7 % 2;\n\n System.out.println(f);\n System.out.println(остаток);\n\n\n }",
"private static int wrap(int a, int b)\n {\n return (a < 0) ? (a % b + b) : (a % b);\n }",
"int CalcKey(int g, int x, int n)\r\n {\r\n int rtn = 1;\r\n for(int i = 0; i < x; i++)\r\n rtn = (rtn * g) % n;\r\n return rtn;\r\n }",
"public int solution(int A, int B, int K) {\n int dk = 0;\n for(int i = A; i <= B; i++){\n if(i % K == 0){\n dk += 1;\n }\n }\n return dk;\n }",
"static int mult(int j,int k) {\n\t\tint index;\n\t\tif (k==0)\n\t\t\treturn 0;\n\t\telse\n\t\t\tindex= (int) k/Math.abs(k); // This allows us to work with negative numbers\n\t\treturn index*j +mult(j,k-index); // The multiply statement works towards zero\n\n\t}",
"private static int multiply(int i, int j) {\n\t\tint k=1;\n\t\tint sum=0;\n\t\twhile(k<=j)\n\t\t{\n\t\t\tsum = sum +i;\n\t\t\tk++;\n\t\t\t\n\t\t}\n\t\treturn sum;\n\t}",
"@Test\n\tpublic void intersection() {\n\n\t\tlong n = 105;\n\t\tlong m = 100;\n\t\tfor(long i = n - 1; i > 1; i--){\n\t\t\tn = n * i;\n\t\t\tfor(long j = getZero(n); j > 0; j--){\n\t\t\t\tm = m * 10;\n\t\t\t}\n\t\t\tn = n % m;\n\t\t\tm = 100;\n\n\t\t\tSystem.out.println(n+\" \"+i);\n\n\t\t}\n\n\n\n\n\n\t}",
"static long mpow(long x, int k) {\n\t long result = 1;\n\t for(; k > 0; k >>= 1) {\n\t if(k % 2 == 1) {\n\t result = mod(result * x ,511);\n\t }\n\t x = mod(x * x , 511);\n\t }\n\t return result;\n\t}",
"private static int[] oddNumbers(int i, int j) {\n\t\tint size = (j - i + 1) / 2 ;\n int[] a = new int[size];\n \n\t\tint l = 0;\n\t\twhile (i <= j) {\n\t\t\t//if (i % 2 != 0) {\n\t\t\tif ((1 & i) == 1) {\n\t\t\t\t//System.out.println(i);\n\t\t\t\ta[l] = i;\n\t\t\t\tl++;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\t\n\t\treturn a;\n\n\t}",
"public static void calcIntegersDivBy()\r\n\t{\r\n\t\tint x = 5;\r\n\t\tint y = 20;\r\n\t\tint p = 3;\r\n\t\tint result = 0;\r\n\t\tif (x % p == 0)\r\n\t\t\tresult = (y / p - x / p + 1);\r\n\t\telse\r\n\t\t\tresult = (y / p - x / p);\r\n\t\tSystem.out.println(result);\r\n\t}",
"public int getIndex(int i, int j) {\n return (i * (i + 1))/2 + j;\n }",
"private static long m22586i(long j) {\n return (j >> 63) ^ (j << 1);\n }",
"private static long f(long m) {\n\t\tlong k = 1;\r\n\t\tfor (long i=1; i<=m; i++){\r\n\t\t\tk *= i;\r\n\t\t}\r\n\t\treturn k;\r\n\t}",
"public static void main(String args[])\n {\n int a=8%3; //Finding the reminder of 8 when divided by 3 using the modulus operator '%'\n\n System.out.println(\"a=\"+a);\n\n }",
"private long m685d(long j) {\n return (-(j & 1)) ^ (j >>> 1);\n }",
"public static int getIndex(int i,int j){\r\n\t\t return i+(Variables.N+2)*j;\r\n\t }",
"public static int p(int i)\n {\n return (i - 1) / 2;\n }",
"public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int k = in.nextInt();\n ArrayList<Integer> list = new ArrayList<>();\n for(int arr_i=0; arr_i < n; arr_i++){\n int integer = in.nextInt();\n list.add(new Integer(integer));\n }\n in.close();\n\n\n\n if(k == 1){\n System.out.println(k);\n return;\n }\n\n for(int i = 0;i < list.size();i ++){\n int x = list.get(i) % k;\n list.set(i, x);\n }\n\n int[] kx = new int[k];\n for(int i = 0;i < k;i ++){\n kx[i] = 0;\n }\n for(int i = 0;i < list.size();i ++){\n int x = list.get(i);\n kx[x] ++;\n }\n\n\n int num = 0;\n int A = 0;\n if(k % 2 == 0){\n A = k / 2 - 1;\n }else{\n A = k / 2;\n }\n if(kx[0] != 0){\n num += 2;\n }\n for(int i = 1; i <= A;i ++){\n if(kx[i] >= kx[k - i]){\n num += kx[i];\n }else {\n\n num += kx[k - i];\n }\n\n }\n System.out.println(num);\n }",
"static int mult(int j, int k){\n\t\tif ((j==0)||(k==0))\n\t\t\treturn 0;\n\t\t\n\t\t//case where k positive, j greater or negative\n\t\tif (((0<k)&&(k<j))||((j<0) && (0<k)))\n\t\t\treturn j + mult(j, k-1);\n\t\t\n\t\t//case where j positive, k greater or negative\n\t\tif (((0<j)&&((j<k)))||((k<0) && (0<j)))\n\t\t\treturn k + mult (j-1, k);\n\t\t\n\t\t//case where j<k<0 (both negative)\n\t\tif ((j<k)&&(k<0))\n\t\t\treturn -j + mult (j, k+1);\n\t\t\n\t\t//case where k<j<0 (both negative)\n\t\tif ((k<j)&&(j<0))\n\t\t\treturn -k + mult (j+1, k);\n\t\telse return 0;\n\t\t\t\t\n\t}",
"long perm(int n, int m, long mod) {\n long result = 1;\n for (int i = n - m + 1; i <= n; ++i) {\n result = result * i % mod;\n }\n return result;\n }",
"private int hashFunc2(String word) {\n int hashVal = word.hashCode();\n hashVal = hashVal % arraySize;\n\n if (hashVal < 0) {\n hashVal += arraySize;\n }\n\n // Research shows that you can use a Prime number Less than the array size to calculate the step value.\n // Prime Number 3 arbitrarily chosen.\n return 3 - hashVal % 3;\n }",
"public int subarraysDivByK(int[] nums, int k) {\n\t \n int n = nums.length;\n\t\tint [] cumulativeMods = new int[n]; //store cumulative modulus\n int count =0; //count subarrays\n\t\tHashMap <Integer,Integer> repeatedMonitor = new HashMap<>();\n\t\t\n repeatedMonitor.put(0,1); \n\t\t//magic hidden zero :P, next appearing of 0 in cumulative will be the second to the monitor, \n\t\t//if you love to know why, do search xD\n\t\t\n cumulativeMods[0]= nums[0]%k<0? (nums[0]%k)+k : nums[0]%k;\n \n\t\t//Fill cumulativeMods array\n for(int i=1; i<n; i++){\n cumulativeMods[i] = cumulativeMods[i-1]+nums[i];\n cumulativeMods[i] = cumulativeMods[i]%k <0? (cumulativeMods[i]%k)+k: cumulativeMods[i]%k;\n } \n \n\t\t//count contiguous subarrays by monitoring the repeated items in cumulativeMods\n int toAdd=0;\n for(int i=0; i<n; i++){\n toAdd = repeatedMonitor.getOrDefault(cumulativeMods[i],0); \n count+= toAdd;\n repeatedMonitor.put(cumulativeMods[i], toAdd+1);\n }\n return count; \n }",
"long select(int n, int m, long mod) {\n long[][] dp = new long[n + 1][m + 1];\n for (int i = 1; i <= n; ++i) {\n dp[i][0] = 1;\n if (i <= m) {\n dp[i][i] = 1;\n }\n for (int j = 1; j < i && j <= m; ++j) {\n dp[i][j] = (dp[i - 1][j] + dp[i - 1][j - 1]) % mod;\n }\n }\n return dp[n][m];\n }",
"private int getCondensedIndex(int n, int i, int j) {\n if (i < j) {\n return n * i - (i * (i + 1) / 2) + (j - i - 1);\n }\n else if (i > j) {\n return n * j - (j * (j + 1) / 2) + (i - j - 1);\n }\n else{\n return 0;\n }\n }",
"public static void main(String[] args) {\n\n\t\tfor(int i=1; i<100; i++){\n\t\t\tint count=0, remainder=0; //variables initialized to zero.\n\n\t\t\tfor (int j=1; j<i+1; j++){\n\t\t\t\tremainder = i%j; // finding the remainder \n\t\t\t\tif(remainder==0) // if the remainder is equal to zero increment the count\n\t\t\t\t\tcount++;\n\t\t\t}\n\t\t\tif(count==2) // if the loop count is equal to two then print the number as prime.\n\t\t\t\tSystem.out.print(i+\" \");\n\t\t}\n\n\t}",
"public int compare(Integer a,Integer b)\n\t{\n\t\treturn a%2-b%2;\n\t}",
"static\nint\nfindPivot(\nint\narr[], \nint\nn) \n{ \n\nint\ni; \n\nfor\n(i = \n0\n; i < n; i++) \n\n{ \n\nif\n(arr[i] > arr[(i + \n1\n) % n]) \n\nreturn\ni; \n\n} \n\nreturn\n0\n; \n}",
"public static long m8444a(long j) {\n return (-(j & 1)) ^ (j >>> 1);\n }",
"void mo54409a(int i, int i2, int i3, long j);",
"private double k(double[] i, double[] j) {\n int sum = 0;\n for (int m = 0; m < i.length; m++)\n sum += i[m] * j[m];\n return sum;\n\n }",
"public void DiskRandCompute(int i, int j) {\n\n\t}",
"public boolean estImpaire() {\n\t\treturn (((i+j)%2) == 1); \n }",
"public static int f(int j,int rt)\n {\n int n = (j/3)-2;\n System.out.println(\" \" + n + \":\" + rt);\n if (n<0) return rt;\n else return f(n,(n+rt));\n }",
"static int hcf(int num1, int num2){\n int i = 1;\n int hcf = 0;\n\n while(i<=num1 || i<=num2){\n if (num1%i == 0 && num2%i==0){\n hcf = i;\n }\n i++;\n }\n return hcf;\n }",
"private static int partition(int a[], int left, int right) {\r\n\t\t int i = left, j = right;\r\n\t\t int tmp;\r\n\t\t int pivot = a[(left + right) / 2];\r\n\r\n\t\t while (i <= j) {\r\n\t\t while (a[i] < pivot) // scan from left\r\n\t\t i++;\r\n\t\t count = count + 1;\r\n\t\t while (a[j] > pivot) // scan from right\r\n\t\t j--;\r\n\t\t count = count + 1;\r\n\t\t if (i <= j) { // swap\r\n\t\t tmp = a[i];\r\n\t\t a[i] = a[j];\r\n\t\t a[j] = tmp;\r\n\t\t i++;\r\n\t\t j--;\r\n\t\t }\r\n\t\t };\r\n\t\t return i; // this will be the dividing point between the two halves\r\n\t\t}",
"static int valDiv2 (){\n return val/2;\n }",
"public int kth1(int k) {\n\t int[] dp = new int[k];\n\t int indexTwo = 0;\n\t int indexThree = 0; \n\t int numberOfTwo = 2;\n\t int numberOfThree = 3;\n\t int nextNumber = 1;\n\t dp[0] = 1;\n\t for (int i = 1 ; i < k ; i++) {\n\t nextNumber = Math.min(numberOfTwo, numberOfThree);\n\t dp[i] = nextNumber;\n\t if (nextNumber == numberOfTwo) {\n\t indexTwo += 1;\n\t numberOfTwo = dp[indexTwo] * 2;\n\t }\n\t if (nextNumber == numberOfThree) {\n\t indexThree +=1;\n\t numberOfThree = dp[indexThree] * 3;\n\t }\n\t }\n\t return nextNumber;\n\t }",
"@Test\n public void test(){\n int a = 3;\n int b = 6;\n System.out.println(a % b);\n System.out.println(Long.MAX_VALUE);\n }",
"static int nonDivisibleSubset(int k, int[] S) {\n\t\tint result = 0;\n\n\t\tArrayList < ArrayList < Integer >> solutions = new ArrayList < ArrayList < Integer >>();\n\t\tArrayList < HashSet < Integer >> minSets = new ArrayList < HashSet < Integer >>();\n\n\t\tsolutions.add(new ArrayList <Integer > ( Arrays.asList ( S [ 0 ])));\n\t\tminSets.add (new HashSet <Integer > ( ));\n\t\tminSets.get(0).add ( S [ 0 ] % k);\n\n\n\t\t// Go over all the numbers\n\t\tfor ( int i = 1; i < S.length; i++ ){\n\t\t\tint n = S [ i ]; \n\t\t\tint m = S [ i ] % k; // Number we will add to all the elements of all the minSets.\n\n\t\t\t// Go over all the minSets.\n\t\t\t// For each one, check that each element plus m is not divisible by k.\n\n\t\t\tboolean workedForASet = false;\n\t\t\tfor ( int j = 0; j < minSets.size(); j++){\n\t\t\t\t// For each set, check all the elements of the set.\n\n\t\t\t\tHashSet < Integer > minSet = minSets.get(j);\n\t\t\t\tIterator < Integer > iter = minSet.iterator();\n\n\t\t\t\tboolean works = true;\n\t\t\t\twhile ( iter.hasNext() && works ){\n\t\t\t\t\tint num = iter.next();\n\t\t\t\t\tif ( (num + m) % k == 0 ){\n\t\t\t\t\t\tworks = false;\n\t\t\t\t\t\tworkedForASet = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( works ){\n\t\t\t\t\tsolutions.get(j).add(n);\n\t\t\t\t\tminSet.add(m);\n\t\t\t\t}\n\t\t\t} \n\n\t\t\tif ( !workedForASet ){\n\t\t\t\tsolutions.add(new ArrayList <Integer > ( Arrays.asList ( n )));\n\t\t\t\tminSets.add (new HashSet <Integer > ( ));\n\t\t\t\tminSets.get (minSets.size() - 1).add ( m ); \n\t\t\t} \n\t\t}\n\n\t\t// Find the solution with the most elements.\n\n\t\tfor ( ArrayList <Integer > solution : solutions ){\n\t\t\tresult = Math.max ( result, solution.size() );\n\t\t\tSystem.out.println ( solution );\n\t\t}\n\n\t\tif ( result == 1 ) result = 0;\n\t\treturn result;\n\t}",
"public static int m150331d(long j) {\n return (int) (j ^ (j >>> 32));\n }",
"private static int pair_GCF(int a, int b) {\n int t;\n while (b != 0) {\n t = a;\n a = b;\n b = t % b;\n }\n return a;\n }",
"static void pregenFact() \n\t{ \n\t\tfact[0] = fact[1] = 1; \n\t\tfor (int i = 1; i <= 1000000; ++i) \n\t\t{ \n\t\t\tfact[i] = (int) ((long) fact[i - 1] * i % mod); \n\t\t} \n\t}",
"public static int hashOp( int i )\n\t{\n\t\t// Do NOT change this method!\n\t\tint doubled = 2 * i;\n\t\tif ( doubled >= 10 ) {\n\t\t\tdoubled = doubled - 9;\n\t\t}\n\t\treturn doubled;\n\t}",
"int main()\n{\n int n,i,c=0,a;\n cin>>n;\n for(i=1;c<n;c++,i++)\n {\n a=i*i;\n if(a%2==0)\n {\n cout<<a-2<<\" \";\n }\n else\n {\n cout<<a-1<<\" \";\n }\n }\n}",
"public static void main(String[] args) {\n\n\t\t\n\t\tint a, i, j;\n\t\t\n\t\tfor(i=2;i<101;i++){\n\t\t\tif(i==2)\n\t\t\t\tSystem.out.println(i);\n\t\t\telse\n\t\t\t\t\n\t\t\t\n\t\t\tfor(j=2;j<i;j++)\n\t\t\t\t\n\t\t\t\tif(i%j != 0)\n\t\t\t\t\tif(i-1 == j)\n\t\t\t\t\t\tSystem.out.println(i);\n\t\t\t\t\telse\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\telse\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\n\t\t\t\t\t\n\t\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public boolean divisorGame(int N) {\n\n boolean[] res = new boolean[N+1];\n\n for (int i = 2; i < N+1; i++) {\n\n for (int j = 1; j*j < i; j++) {\n if (i % j == 0 && !res[i-j] ) {\n res[i] = true;\n break;\n }\n }\n\n\n }\n return res[N];\n }",
"protected static int left(int i){\n return 2*i+1;\n }",
"void mo54410a(int i, int i2, long j);",
"void mo13371a(int i, long j);",
"private long m10267c(long j) {\r\n return (j << 1) ^ (j >> 63);\r\n }",
"public static int solution(int A, int B, int K) {\n int remA = A%K;\n int start = remA == 0? A : A + (K - remA);\n\n int remB = B%K;\n int end = remB == 0? B : B-remB;\n\n int diff = BigInteger.valueOf(end).subtract(BigInteger.valueOf(start)).intValue();\n int result = diff/K;\n return result + 1;\n }",
"public int j() {\n \treturn j; \n }",
"abstract int degree(int i);",
"public static int Main()\n\t{\n\t\tint n; //????\n\t\tint k;\n\t\tint i;\n\t\tint i2;\n\t\tint j;\n\t\tn = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tk = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tfor (i2 = 1;;i2++)\n\t\t{ //????\n\t\t\ti = i2;\n\t\t\tfor (j = 0;j < n;j++)\n\t\t\t{ //????\n\t\t\t\tif (i % (n - 1) != 0)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ti = i * n / (n - 1) + k;\n\t\t\t}\n\t\t\tif (j == n)\n\t\t\t{\n\t\t\t\tSystem.out.print(i);\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}",
"public static void main(String[] args) {\n\t\tint i,j,z,sumA,sumB,sumPairs;\r\n\r\n\t\tsumPairs = 0;\r\n\r\n\t\tfor (i=1;i<10000;i++){\r\n\t\t sumA = 0;\r\n\t\t for (j=1;j<i;j++){\r\n\t\t if (i%j==0) \r\n\t\t sumA += j;\r\n\t\t }\r\n\r\n\t\t sumB = 0;\r\n\t\t for (z=1;z<sumA;z++){\r\n\t\t if (sumA%z==0)\r\n\t\t sumB += z;\r\n\t\t }\r\n\r\n\t\t if (sumB == i && sumB != sumA)\r\n\t\t sumPairs += i; \r\n\t\t}\r\nSystem.out.println(sumPairs);\r\n\t\t\r\n\t}",
"public int count(int n, int k)\n {\n\n long MOD = 1000000007;\n long res;\n\n res = (long)Math.pow(k, n);\n Map<Integer, Integer> divisor = new HashMap<>();\n\n long count = 0;\n for(int i = 2; i <= k; i++) {\n if(!(i % 2 == 0 && divisor.containsKey(i / 2))) {\n int div = divisorCount(i);\n divisor.put(i, div);\n count += div - 1;\n }\n else{\n int log2 = 31 - Integer.numberOfLeadingZeros(i);\n int div;\n if(Math.pow(2, log2) == i){\n div = divisor.get(i / 2) + 1;\n\n }\n else\n div = divisor.get(i / 2) * 2;\n\n divisor.put(i, div);\n count += div - 1;\n\n }\n\n }\n\n res -= (n - 1) * Math.pow(k, n - 2) * count;\n return (int)(res % MOD);\n }",
"static void hashTestCase(int givArr[]) {\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tint mod = givArr[i] % m;\n\t\t\tarray[mod] = givArr[i];\n\t\t}\n\t}",
"protected int left(int i ) { return 2 * i + 1; }",
"private int houseRobberWithMaxAmountHousesFromItoJInConstantSpace(int[] a, int i, int j) {\n\t\tif (null == a || i > j)\n\t\t\treturn 0;\n\n\t\tif (j - i == 0)\n\t\t\treturn a[i];\n\n\t\tint incl = a[i];\n\t\tint excl = 0, temp;\n\n\t\tfor (int k = i + 1; k <= j; k++) {\n\t\t\ttemp = incl;\n\t\t\tincl = Math.max(excl + a[k], incl);\n\t\t\texcl = temp;\n\t\t}\n\t\treturn incl;\n\t}",
"private int indexFor(K key) {\n int hash = hash(key.hashCode());\n return hash % this.container.length;\n }",
"public int getPartition(Integer item) {\n return ((item % x) / y);\n }",
"static String kangaroo(int x1, int v1, int x2, int v2) {\n int x=x1-x2;\n int v=v2-v1;\n if(v!=0){\n if(x%v==0 && x/v>0){\n return \"YES\";\n }else {return \"NO\";}\n\n }else {return \"NO\";}\n\n }",
"private void swim(int k) {\r\n while (k > 1 && greater(k/2, k)) {\r\n swap(k, k / 2);\r\n k = k/2;\r\n }\r\n }",
"public static long m8659e(long j) {\n return (j >> 63) ^ (j << 1);\n }",
"void mo30275a(long j);",
"void mo25957a(long j, long j2);",
"int main() {\n int a,i,j,c=0;\ncin>>a;\n for(i=1;i<a+1;i++)\n {\n if(i%2!=0)\n {\nc++;\n for(j=1;j<a;j++)\n {\ncout<<c;\n }\nc++;\ncout<<c<<\"\\n\";\n }\n else\n {\nc++;\ncout<<c--;\n for(j=1;j<a;j++)\n {\ncout<<c;\n }\ncout<<\"\\n\";\n }\n }\n return 0;\n}",
"public static void main(String[] args) {\n\n int N = Integer.MAX_VALUE;\n\n\n for (int n = 2; n < N ; n++) {\n boolean prost = true;\n for (int i = 2; i < n; i++) {\n\n if (n % i == 0) {\n prost = false;\n\n }\n }\n if (prost) {\n System.out.println(n);\n }\n }\n\n\n }",
"public static int contarDivisores(int n){\n int contDivisores=0;\n for(int i=1;i<=n;i++){\n if(n%i==0){contDivisores++;}\n }\n return contDivisores;\n }",
"private static int[] generateArray(int i, int j) {\n int[] col = new int[j+1];\n for(int k = 0; k <= j; k++)\n {\n col[k] = (i+k)%Algo.x.length;\n } \n return col;\n }",
"@Test\n public void testModulo() {\n System.out.println(\"modulo\");\n int x = 0;\n int y = 0;\n int expResult = 0;\n int result = utilsHill.modulo(x, y);\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 }",
"public static void rotate1 (int [] nums, int k ) {\n\t\tint n = nums.length;\n\t\tk = k % n ;\n\t\tif(k == 0) return ;\n\t\tint prev = 0, currIndex = 0, temp = 0, count = 0;\n\t\tfor(int start = 0 ; count < nums.length ; start++) {\n\t\t\tprev = nums[start];\n\t\t\tcurrIndex = start;\n\t\t\t// keep rotating till reach the initial point\n\t\t\tdo {\n\t\t\t\tint nextIndex = (currIndex + k) % n;\n\t\t\t\ttemp = nums[nextIndex];\n\t\t\t\tnums[nextIndex] = prev;\n\t\t\t\tprev = temp;\n\t\t\t\tcurrIndex = nextIndex;\n\t\t\t\tcount++;\n\t\t\t\t\n\t\t\t} while(start != currIndex);\n\t\t}\n\t}",
"private static <Key extends Comparable<Key> > void swim(Key []a, int k){\n while(k>1 &&less(a, k/2, k)){\n exch(a, k/2, k);\n k=k/2;\n }\n }",
"public static int HCF(int a, int b){\r\n int x, i, hcf = 0;\r\n \r\n for(i = 1; i<=a || i<=b; i++){\r\n if(a%i == 0 && b%i == 0){\r\n hcf = i;\r\n }} \r\n //System.out.print(hcf);\r\n return hcf;\r\n }",
"public int hash2(int x)\n {\n return ((a2*(x)+b2)%n);\n }"
]
| [
"0.68343955",
"0.6440002",
"0.6392842",
"0.6383061",
"0.6376125",
"0.6350644",
"0.6317233",
"0.6254165",
"0.6172408",
"0.6162259",
"0.601087",
"0.5982967",
"0.59789705",
"0.5924493",
"0.5881536",
"0.58660406",
"0.5845344",
"0.58359873",
"0.5833174",
"0.5825415",
"0.5818467",
"0.5766579",
"0.5752397",
"0.5737418",
"0.5728595",
"0.57278574",
"0.5715475",
"0.5715465",
"0.5706147",
"0.56881166",
"0.5659513",
"0.56537074",
"0.5644188",
"0.5616321",
"0.56099874",
"0.55914253",
"0.5578513",
"0.5536323",
"0.5513025",
"0.55072975",
"0.5489855",
"0.54825294",
"0.5478931",
"0.5424498",
"0.5416483",
"0.5396857",
"0.53967017",
"0.53916335",
"0.5367108",
"0.53542244",
"0.5337252",
"0.5336932",
"0.53322995",
"0.5325143",
"0.53239167",
"0.5297725",
"0.52923423",
"0.52917236",
"0.5288052",
"0.5280422",
"0.52782524",
"0.5276625",
"0.526905",
"0.52662635",
"0.5262886",
"0.5262876",
"0.5260911",
"0.52570987",
"0.5252656",
"0.5252027",
"0.52491933",
"0.52468574",
"0.5231659",
"0.52308536",
"0.52292645",
"0.5227019",
"0.5226633",
"0.52176374",
"0.52141994",
"0.52017874",
"0.5200973",
"0.51998836",
"0.51967895",
"0.518739",
"0.51809716",
"0.5175144",
"0.5171892",
"0.51705015",
"0.51598084",
"0.5159409",
"0.51568913",
"0.51519215",
"0.514982",
"0.51489043",
"0.5146673",
"0.5145592",
"0.5138968",
"0.5133946",
"0.5133585",
"0.51284003",
"0.51269794"
]
| 0.0 | -1 |
vertical panel, 2 rows into each li one label on top row hp goes into 2nd row | protected ComplexPanel getLocationResultPanelSolrMark(LocationResult locationResult) {
SolrDocument solrDocument = locationResult.getSolrDocument();
Long itemId = solrDocument.getFirstLong("georepoitemid_l");
if (itemId == null) {
itemId = solrDocument.getFirstLong("latest_mark_georepoitemid_l");
}
String targetHistoryToken = MyWebApp.ITEM_DETAIL + itemId;
String targetHistoryToken2 = "#" + targetHistoryToken;
FlowPanel result = new FlowPanel();
result.setStyleName("result");
addMarkPhoto2(solrDocument, targetHistoryToken2, result);
FlowPanel centerBlock = new FlowPanel();
centerBlock.setStyleName("center-block");
result.add(centerBlock);
String spot_label_s = solrDocument.getFirstString("location_label_s");
if (spot_label_s != null) {
String sl = "@" + spot_label_s.toString();
Anchor resultHeader = getResultHeader(sl);
resultHeader.setHref(targetHistoryToken2);
centerBlock.add(resultHeader);
}
ComplexPanel categoriesPanel = addCategories(solrDocument);
centerBlock.add(categoriesPanel);
Anchor distanceAnchor = getDistanceAnchor(locationResult);
result.add(distanceAnchor);
//addOurBuddies(centerBlock, locationResult);
addExpand(result, locationResult, centerBlock);
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void $$$setupUI$$$() {\n createUIComponents();\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 2, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(11, 3, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Tags\");\n panel1.add(label1, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(10, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n listTags = new JList();\n panel1.add(listTags, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(7, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n addTagButton = new JButton();\n addTagButton.setText(\"Add Tag\");\n panel2.add(addTagButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer2 = new Spacer();\n panel2.add(spacer2, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n deleteTagButton = new JButton();\n deleteTagButton.setText(\"Delete Tag\");\n panel2.add(deleteTagButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"State\");\n panel1.add(label2, new GridConstraints(8, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label3 = new JLabel();\n label3.setText(\"Media Type\");\n panel1.add(label3, new GridConstraints(9, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label4 = new JLabel();\n label4.setText(\"New Contributor\");\n panel1.add(label4, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 1, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel3, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label5 = new JLabel();\n label5.setText(\"Type\");\n panel3.add(label5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n comboContributorType = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();\n defaultComboBoxModel1.addElement(\"select\");\n defaultComboBoxModel1.addElement(\"USER\");\n defaultComboBoxModel1.addElement(\"MACHINE\");\n comboContributorType.setModel(defaultComboBoxModel1);\n panel3.add(comboContributorType, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label6 = new JLabel();\n label6.setText(\"Username\");\n panel3.add(label6, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n textUsername = new JTextField();\n panel3.add(textUsername, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label7 = new JLabel();\n label7.setText(\"Created\");\n panel1.add(label7, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n textCreatedDate = new JTextField();\n panel1.add(textCreatedDate, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label8 = new JLabel();\n label8.setText(\"Field Sets\");\n panel1.add(label8, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n listFieldSets = new JList();\n panel1.add(listFieldSets, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false));\n final JLabel label9 = new JLabel();\n label9.setText(\"Contributors\");\n panel1.add(label9, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n listContributors = new JList();\n panel1.add(listContributors, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false));\n final JLabel label10 = new JLabel();\n label10.setText(\"Workgroups\");\n panel1.add(label10, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n listWorkgroups = new JList();\n panel1.add(listWorkgroups, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false));\n final JLabel label11 = new JLabel();\n label11.setText(\"Last Updated\");\n panel1.add(label11, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n textLastUpdated = new JTextField();\n panel1.add(textLastUpdated, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n comboMediaType = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel2 = new DefaultComboBoxModel();\n defaultComboBoxModel2.addElement(\"select\");\n defaultComboBoxModel2.addElement(\"CHAT\");\n defaultComboBoxModel2.addElement(\"EMAIL\");\n defaultComboBoxModel2.addElement(\"EVENT\");\n defaultComboBoxModel2.addElement(\"MOBILE\");\n defaultComboBoxModel2.addElement(\"SOCIAL\");\n defaultComboBoxModel2.addElement(\"VIDEO\");\n defaultComboBoxModel2.addElement(\"VOICE\");\n defaultComboBoxModel2.addElement(\"WEB\");\n comboMediaType.setModel(defaultComboBoxModel2);\n panel1.add(comboMediaType, new GridConstraints(9, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n comboState = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel3 = new DefaultComboBoxModel();\n defaultComboBoxModel3.addElement(\"select\");\n defaultComboBoxModel3.addElement(\"ACTIVE\");\n defaultComboBoxModel3.addElement(\"CLOSED\");\n comboState.setModel(defaultComboBoxModel3);\n panel1.add(comboState, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label12 = new JLabel();\n label12.setText(\"Pod ID\");\n panel1.add(label12, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n textFieldId = new JTextField();\n panel1.add(textFieldId, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JPanel panel4 = new JPanel();\n panel4.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel4, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final Spacer spacer3 = new Spacer();\n panel4.add(spacer3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel5 = new JPanel();\n panel5.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));\n panel4.add(panel5, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonSave = new JButton();\n buttonSave.setText(\"Save\");\n panel5.add(buttonSave, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 1, false));\n buttonClose = new JButton();\n buttonClose.setText(\"Close\");\n panel5.add(buttonClose, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 1, false));\n final JPanel panel6 = new JPanel();\n panel6.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel6, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(300, -1), null, 0, false));\n panel6.add(panelDataElements, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 1, false));\n final Spacer spacer4 = new Spacer();\n panel6.add(spacer4, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n }",
"private JPanel label() {\r\n\t\tJPanel position = new JPanel();\r\n\t\tJPanel positionLabelLigue = new JPanel();\r\n\t\tJPanel positionLabelnomadmin = new JPanel();\r\n\t\tJPanel positionLabelprenomadmin = new JPanel();\r\n\t\tJPanel positionLabeladresse = new JPanel();\r\n\r\n\t\t// On définit le layout en lui indiquant qu'il travaillera en ligne\r\n\t\tpositionLabelLigue.setLayout(new BoxLayout(positionLabelLigue,\r\n\t\t\t\tBoxLayout.X_AXIS));\r\n\t\tpositionLabelLigue.add(nomLigue);\r\n\t\tpositionLabeladresse.setLayout(new BoxLayout(positionLabeladresse,\r\n\t\t\t\tBoxLayout.X_AXIS));\r\n\t\tpositionLabeladresse.add(adresse);\r\n\t\tpositionLabelnomadmin.setLayout(new BoxLayout(positionLabelnomadmin,\r\n\t\t\t\tBoxLayout.X_AXIS));\r\n\t\tpositionLabelnomadmin.add(nomAdmin);\r\n\t\tpositionLabelprenomadmin.setLayout(new BoxLayout(\r\n\t\t\t\tpositionLabelprenomadmin, BoxLayout.X_AXIS));\r\n\t\tpositionLabelprenomadmin.add(prenomAdmin);\r\n\r\n\t\t/*\r\n\t\t * positionnement en colonne des lignes précédemment crées grace a\r\n\t\t * position.setLayout(new BoxLayout(position, BoxLayout.Y_AXIS))\r\n\t\t */\r\n\t\tposition.setLayout(new BoxLayout(position, BoxLayout.Y_AXIS));\r\n\t\tposition.add(nomLigue);\r\n\t\t/*\r\n\t\t * la ligne suivante position.add(Box.createRigidArea(new\r\n\t\t * Dimension(10,5))) permet de créer un espace entre les composants du\r\n\t\t * panel adresse et nom administrateur et le nom de la ligue\r\n\t\t */\r\n\t\tposition.add(Box.createRigidArea(new Dimension(10, 5)));\r\n\t\tposition.add(adresse);\r\n\t\tposition.add(Box.createRigidArea(new Dimension(10, 5)));\r\n\t\tposition.add(nomAdmin);\r\n\t\tposition.add(Box.createRigidArea(new Dimension(10, 5)));\r\n\t\tposition.add(prenomAdmin);\r\n\r\n\t\treturn position;\r\n\t}",
"public ParticleDisplayer(int width, int height, VisualizerMain vm){\n\t\tthis.setPreferredSize(new Dimension(width, height));\n\t\tthis.setBackground(Color.magenta);\n\t\tthis.vm = vm;\n\t\t\n\t\tFlowLayout flowLayout = new FlowLayout();\n\t\tflowLayout.setVgap(0);\n\t\tflowLayout.setHgap(0);\n\t\tthis.setLayout(flowLayout);\n\t\t\n\t\t\n\t\tdisplayPred = new JList();\n\t\tdisplayPred.setLayout(flowLayout);\n\t\tdisplayPred.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t\tdisplayPred.setLayoutOrientation(JList.VERTICAL);\n\t\tdisplayPred.addListSelectionListener(this);\n\t\tdisplayPred.setName(\"pred\");\n\t\tJScrollPane listScroller = new JScrollPane(displayPred);\n\t\tlistScroller.setPreferredSize(new Dimension(width, height-100));\n\t\t\n\t\tdisplayPrey = new JList();\n\t\tdisplayPrey.setLayout(flowLayout);\n\t\tdisplayPrey.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t\tdisplayPrey.setLayoutOrientation(JList.VERTICAL);\n\t\tdisplayPrey.addListSelectionListener(this);\n\t\tdisplayPrey.setName(\"prey\");\n\t\tJScrollPane listScroller2 = new JScrollPane(displayPrey);\n\t\tlistScroller2.setPreferredSize(new Dimension(width, height-100));\n\n\t\t\n\t\tJTabbedPane tp = new JTabbedPane();\n\t\ttp.add(\"Predator\", listScroller);\n\t\ttp.add(\"Prey\", listScroller2);\n\t\ttp.setTabPlacement(JTabbedPane.BOTTOM);\n\t\tthis.add(tp);\n\t\t\n\t\t\n\t\tthis.add(new JLabel(\"Epoch:\"));\n\t\tSpinnerNumberModel model1 = new SpinnerNumberModel(minEpoch, minEpoch, maxEpoch, 1); \n\t\tepochSelector = new JSpinner(model1);\n\t\tepochSelector.setValue(0);\n\t\tepochSelector.setPreferredSize(new Dimension(width-50, 50));\n\t\tepochSelector.addChangeListener(this);\n\t\tthis.add(epochSelector);\n\t}",
"private void setUpLastPanel() {\n // add one more panel to display the game details.\n final JPanel toAddLabels = new JPanel();\n toAddLabels.setLayout(new GridLayout(NUM_ROWS_PANEL_BOTTOM, 1));\n // Add a JLabel which will show number of lines get cleared.\n myLineCleared = new JLabel();\n myLineCleared.setText(\"CLEARED LINES : \" + Integer.toString(this.myClearedLines));\n myLineCleared.setForeground(Color.GRAY);\n myLineCleared.setFont(new Font(FONT_TIMES, Font.BOLD, SCORE_FONT_SIZE));\n myLineCleared.setBackground(null);\n myLineCleared.setHorizontalAlignment(JLabel.CENTER);\n toAddLabels.add(this.myLineCleared);\n // Add JLabel which will show game score and.\n myScoreLabel = new JLabel();\n myScoreLabel.setText(\"CURRENT SCORE : \" + Integer.toString(this.myCurrentScoreInt));\n myScoreLabel.setForeground(Color.MAGENTA);\n myScoreLabel.setFont(new Font(FONT_TIMES, Font.BOLD, SCORE_FONT_SIZE));\n myScoreLabel.setBackground(null);\n myScoreLabel.setHorizontalAlignment(JLabel.CENTER);\n toAddLabels.add(this.myScoreLabel);\n myHighScoreLabel = new JLabel();\n myHighScoreLabel.setText(\"HIGH SCORE : \" + Integer.toString(this.myHighScoreInt));\n myHighScoreLabel.setForeground(Color.MAGENTA);\n myHighScoreLabel.setFont(new Font(FONT_TIMES, Font.BOLD, SCORE_FONT_SIZE));\n myHighScoreLabel.setBackground(null);\n myHighScoreLabel.setHorizontalAlignment(JLabel.CENTER);\n toAddLabels.add(this.myHighScoreLabel);\n // Add a JLabel which will show the current level.\n myCurrentLevel = new JLabel();\n myCurrentLevel.setText(\"\");\n myLevelBalance = 0;\n myCurrentLevel.setForeground(Color.MAGENTA);\n myCurrentLevel.setFont(new Font(FONT_TIMES, Font.BOLD, SCORE_FONT_SIZE));\n myCurrentLevel.setBackground(null);\n myCurrentLevel.setHorizontalAlignment(JLabel.CENTER);\n toAddLabels.add(this.myCurrentLevel);\n // Add a JLabel which shows when next level would be reached.\n myNextLevelDistance = new JLabel();\n myNextLevelDistance.setText(Integer.toString(this.myLinesToGo));\n myNextLevelDistance.setForeground(Color.MAGENTA);\n myNextLevelDistance.setFont(new Font(FONT_TIMES, Font.BOLD, SCORE_FONT_SIZE));\n myNextLevelDistance.setBackground(null);\n myNextLevelDistance.setHorizontalAlignment(JLabel.CENTER);\n toAddLabels.add(this.myNextLevelDistance);\n // Add a JLabel which will show some status.\n this.myStatusString = new JLabel(\"PLAY\");\n this.myStatusString.setForeground(Color.GREEN);\n this.myStatusString.setFont(new Font(FONT_TIMES, Font.BOLD, NUM_FONT_SIZE));\n this.myStatusString.setBackground(null);\n this.myStatusString.setHorizontalAlignment(JLabel.CENTER);\n toAddLabels.add(this.myStatusString); \n this.add(toAddLabels);\n }",
"private void init() {\r\n\t\tthis.panel.setLayout(new BoxLayout(this.panel, BoxLayout.PAGE_AXIS));\r\n\t\tthis.labelTitle = new JLabel(\"Edit your weapons\");\r\n\t\tthis.labelTitle.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\tthis.initFilter();\r\n\t\tthis.initList();\r\n\t\tthis.list.setSelectedIndex(0);\r\n\t\tthis.initInfo();\r\n\t\tthis.initButton();\r\n\r\n\t\tJPanel panelWest = new JPanel();\r\n\t\tpanelWest.setLayout(new BoxLayout(panelWest, BoxLayout.PAGE_AXIS));\r\n\t\tJPanel panelCenter = new JPanel();\r\n\t\tpanelCenter.setLayout(new BoxLayout(panelCenter, BoxLayout.LINE_AXIS));\r\n\r\n\t\tpanelWest.add(this.panelFilter);\r\n\t\tpanelWest.add(Box.createRigidArea(new Dimension(0, 5)));\r\n\t\tpanelWest.add(this.panelInfo);\r\n\t\tpanelCenter.add(panelWest);\r\n\t\tpanelCenter.add(Box.createRigidArea(new Dimension(10, 0)));\r\n\t\tthis.panelList.setPreferredSize(new Dimension(300, 150));\r\n\t\tpanelCenter.add(this.panelList);\r\n\r\n\t\tthis.panel.add(this.labelTitle);\r\n\t\tthis.panel.add(Box.createRigidArea(new Dimension(0, 10)));\r\n\t\tthis.panel.add(panelCenter);\r\n\t\tthis.panel.add(Box.createRigidArea(new Dimension(0, 10)));\r\n\t\tthis.panel.add(this.panelButton);\r\n\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane2 = new javax.swing.JScrollPane();\n scrollPanePanel = new javax.swing.JPanel();\n original = new javax.swing.JLabel();\n complement = new javax.swing.JLabel();\n basePairs = new javax.swing.JLabel();\n labels = new javax.swing.JLabel();\n\n original.setText(\"jLabel1\");\n\n complement.setText(\"jLabel2\");\n\n basePairs.setText(\"jLabel3\");\n\n labels.setText(\"line\");\n\n org.jdesktop.layout.GroupLayout scrollPanePanelLayout = new org.jdesktop.layout.GroupLayout(scrollPanePanel);\n scrollPanePanel.setLayout(scrollPanePanelLayout);\n scrollPanePanelLayout.setHorizontalGroup(\n scrollPanePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(original, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 348, Short.MAX_VALUE)\n .add(complement, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(basePairs, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 348, Short.MAX_VALUE)\n .add(scrollPanePanelLayout.createSequentialGroup()\n .add(labels)\n .add(0, 0, Short.MAX_VALUE))\n );\n scrollPanePanelLayout.setVerticalGroup(\n scrollPanePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(scrollPanePanelLayout.createSequentialGroup()\n .add(original, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 16, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(complement, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 16, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(9, 9, 9)\n .add(labels, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(basePairs)\n .addContainerGap(36, Short.MAX_VALUE))\n );\n\n jScrollPane2.setViewportView(scrollPanePanel);\n\n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 367, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 76, Short.MAX_VALUE)\n );\n }",
"private void createpanel2() {\r\n\t\tpanels[1].setLayout(new GridLayout(1, 2));\r\n\r\n\t\tdescription[0] = new JLabel(\"Accountname: \");\r\n\t\tdescription[0].setFont(smallfont);\r\n\t\tdescription[0].setHorizontalAlignment(JLabel.CENTER);\r\n\t\tuserinfo = new JTextField() {\r\n\t\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void paint(Graphics g) {\r\n\t\t\t\tg.drawImage(ImageLoader.getImage(\"black_0.4\"), 0, 0, null);\r\n\t\t\t\tsuper.paint(g);\r\n\t\t\t}\r\n\t\t};\r\n\t\tif (System.getProperty(\"os.name\").startsWith(\"Windows\")) {\r\n\t\t\tuserinfo.setForeground(Color.WHITE);\r\n\t\t} else {\r\n\t\t\tuserinfo.setForeground(Color.BLACK);\r\n\t\t}\r\n\t\tuserinfo.setOpaque(false);\r\n\t\tuserinfo.setFont(smallfont);\r\n\t\tpanels[1].add(description[0]);\r\n\t\tpanels[1].add(userinfo);\r\n\t\tpanels[1].setOpaque(false);\r\n\t\tallComponents.add(panels[1]);\r\n\t\tpanels[0].revalidate();\r\n\t}",
"private void buildScrollPanel() {\r\n\t\tJPanel panel_for_scrollpane = new JPanel(new GridLayout(7, COLUMN_NAMES.length));\r\n\t\tpanel_for_scrollpane.setBorder(new BevelBorder(BevelBorder.LOWERED,\r\n\t\t\t\tnull, null, null, null));\r\n\t\tfor (int i = 0; i < COLUMN_NAMES.length; i++) {\r\n\t\t\tJLabel jl = new JLabel(COLUMN_NAMES[i], JLabel.CENTER);\r\n\t\t\tjl.setBorder(BorderFactory.createLineBorder(Color.BLACK));\r\n\t\t\tjl.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\t\tFont font = jl.getFont();\r\n\t\t\tMap attributes = font.getAttributes();\r\n\t\t\tattributes.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON);\r\n\t\t\tjl.setFont(font.deriveFont(attributes));\r\n\t\t\tpanel_for_scrollpane.add(jl);\r\n\t\t}\r\n\t\tfor (int i = COLUMN_NAMES.length+1; i <= 42; i++) {\r\n\r\n\t\t\tif ((i - 1) % COLUMN_NAMES.length == 0) {\r\n\t\t\t\tfinal JLabel jl = new JLabel(\"Box \" + i, JLabel.CENTER);\r\n\t\t\t\tjl.setBorder(BorderFactory.createLineBorder(Color.BLACK));\r\n\t\t\t\tjl.setForeground(Color.BLUE);\r\n\t\t\t\tjl.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\r\n\t\t\t\tfinal String box_clicked = \"clicked box \" + i;\r\n\t\t\t\tfinal Font entered = new Font(\"Tahoma\", Font.BOLD, 17);\r\n\t\t\t\tfinal Font exited = new Font(\"Tahoma\", Font.BOLD, 12);\r\n\t\t\t\tjl.addMouseListener(new MouseListener() {\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\r\n\t\t\t\t\t\tjl.setFont(entered);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\r\n\t\t\t\t\t\tjl.setFont(exited);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tpublic void mousePressed(MouseEvent arg0) {\r\n\t\t\t\t\t\tSystem.out.println(box_clicked);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tpublic void mouseReleased(MouseEvent arg0) {\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tpanel_for_scrollpane.add(jl);\r\n\t\t\t} else {\r\n\t\t\t\tJLabel jl = new JLabel(\"Box\" + i, JLabel.CENTER);\r\n\t\t\t\tjl.setBorder(BorderFactory.createLineBorder(Color.BLACK));\r\n\t\t\t\tpanel_for_scrollpane.add(jl);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tpanel_for_scrollpane.setBackground(INNER_BACKGROUND_COLOR);\r\n\t\tpanel_for_scrollpane.setSize(10000, 10000);\r\n\t\tJScrollPane scrollPane = new JScrollPane(panel_for_scrollpane, 22, 32);\r\n\t\tscrollPane.setBounds(10, 350, 1235, 300);\r\n\t\tmain_panel.add(scrollPane);\r\n\r\n\t}",
"public void constructClientsPanel(int numClients) {\n cnames = new Vector();\n cstatus = new Vector();\n ctrans = new Vector();\n \n int numRows = numClients;\n if (numRows < 7)\n numRows = 7;\n \n JPanel listPanel = new JPanel();\n listPanel.setLayout(new GridLayout(numRows + 1, 3));\n \n clientScroller = new JScrollPane(listPanel);\n clientScroller.setPreferredSize(relativeSize(0.4f, 0.35f));\n clientScroller.setBorder(BorderFactory.createTitledBorder(\"Client Monitor\"));\n \n JPanel nameTitlePanel = new JPanel();\n JLabel nameTitleLabel = new JLabel();\n nameTitleLabel.setText(\"Client\");\n nameTitleLabel.setFont(new Font(\"Arial Black\", 0, 16));\n nameTitleLabel.setForeground(Color.black);\n nameTitlePanel.add(nameTitleLabel);\n \n listPanel.add(nameTitlePanel);\n \n JPanel statusTitlePanel = new JPanel();\n JLabel statusTitleLabel = new JLabel();\n statusTitleLabel.setText(\"Status\");\n statusTitleLabel.setFont(new Font(\"Arial Black\", 0, 16));\n statusTitleLabel.setForeground(Color.black);\n statusTitlePanel.add(statusTitleLabel);\n \n listPanel.add(statusTitlePanel);\n \n JPanel numTransPanel = new JPanel();\n JLabel numTransLabel = new JLabel();\n numTransLabel.setText(\"Num Offers\");\n numTransLabel.setFont(new Font(\"Arial Black\", 0, 16));\n numTransLabel.setForeground(Color.black);\n numTransPanel.add(numTransLabel);\n \n listPanel.add(numTransPanel);\n \n for (int i=0; i<numRows; i++) {\n JPanel namePanel = new JPanel();\n JLabel nameLabel = new JLabel(\"<html><font color=#003366>Client \" + i + \"</font></html>\");\n nameLabel.setFont(new Font(\"Verdana\", Font.BOLD, 16));\n if (i < numClients) {\n namePanel.add(nameLabel);\n cnames.add(nameLabel);\n }\n \n else\n namePanel.add(new JLabel());\n \n listPanel.add(namePanel);\n \n JPanel statusPanel = new JPanel();\n JLabel statusLabel = new JLabel(\"Disconnected\");\n statusLabel.setFont(new Font(\"Verdana\", Font.BOLD, 16));\n statusLabel.setForeground(new Color(90, 25, 25));\n if (i < numClients) {\n statusPanel.add(statusLabel);\n cstatus.add(statusLabel);\n }\n \n else\n statusPanel.add(new JLabel());\n \n listPanel.add(statusPanel);\n \n JPanel transPanel = new JPanel();\n JLabel transLabel = new JLabel(\"N/A\");\n transLabel.setFont(new Font(\"Verdana\", Font.BOLD, 16));\n transLabel.setForeground(Color.black);\n if (i < numClients) {\n transPanel.add(transLabel);\n ctrans.add(transLabel);\n } else\n transPanel.add(new JLabel());\n \n listPanel.add(transPanel);\n }\n \n if (topPanel.getComponentCount() != 0)\n topPanel.remove(0);\n \n topPanel.add(clientScroller, 0);\n topPanel.setPreferredSize(relativeSize(0.85f, 0.42f));\n \n pack();\n centerOnScreen();\n }",
"private void initList() {\r\n\t\tthis.panelList = new JPanel();\r\n\t\tthis.panelList.setLayout(new BoxLayout(this.panelList,\r\n\t\t\t\tBoxLayout.PAGE_AXIS));\r\n\r\n\t\tJLabel labelList = new JLabel(\"Weapons list\");\r\n\t\tlabelList.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\tthis.dlm = new DefaultListModel<String>();\r\n\t\tthis.list = new JList<String>(dlm);\r\n\t\tthis.scrollPane = new JScrollPane(this.list,\r\n\t\t\t\tJScrollPane.VERTICAL_SCROLLBAR_ALWAYS,\r\n\t\t\t\tJScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);\r\n\t\tthis.scrollPane.setBounds(new Rectangle(10, 10, 450, 80));\r\n\t\tthis.list.addMouseListener(this.editWeaponControl);\r\n\t\tthis.updateList();\r\n\t\tthis.panelList.add(labelList);\r\n\t\tthis.panelList.add(this.scrollPane);\r\n\t}",
"public VixHedgePanel() {\n initComponents();\n \n JPanel p1 = new VerticalPanel();\n p1.add(\"Strike Pirce\", m_strikePrice);\n \n this.add(p1, BorderLayout.NORTH);\n \n }",
"private void setUpList(JPanel panel){\n panel.setLayout(new BorderLayout());\n JPanel holder = new JPanel();\n holder.setLayout(new BoxLayout(holder,BoxLayout.Y_AXIS));\n for(Object t: agenda.getConnector().getTasks(currentList)) {\n Tasks task = (Tasks)t;\n add = false;\n this.addTask(holder,task);\n add = true;\n }\n JScrollPane scrollPane = new JScrollPane(holder,ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n JButton showCompleted = new JButton(\"Show completed\");\n showCompleted.addActionListener(e -> {\n JPanel completedPanels = new JPanel();\n this.setUpSize(completedPanels,400,400,AgendaConstants.ALL);\n completedPanels.setLayout(new BoxLayout(completedPanels,BoxLayout.Y_AXIS));\n for(Object o: agenda.getConnector().getCTasks(currentList)){\n CompletedTodo t = (CompletedTodo) o;\n Task task = new Task(t);\n this.setUpSize(task,390,50,AgendaConstants.MAXIMUM);\n completedPanels.add(task);\n }\n JOptionPane.showMessageDialog(null,completedPanels);\n });\n panel.add(showCompleted,BorderLayout.NORTH);\n panel.add(scrollPane,BorderLayout.CENTER);\n this.updateComponent(panel);\n }",
"public void setupSidePanels() {\n\t\tURL url = getClass().getResource(\".coredata/background/LeftTeam.png\");\n\t\tleftTeamIcon = new ImageIcon(Toolkit.getDefaultToolkit().getImage(url));\n\t\tleftTeam = new JLabel(leftTeamIcon);\n\t\turl = getClass().getResource(\".coredata/background/RightTeam.png\");\n\t\trightTeamIcon = new ImageIcon(Toolkit.getDefaultToolkit().getImage(url));\n\t\trightTeam = new JLabel(rightTeamIcon);\n\t\tleftTeam.setPreferredSize(new Dimension(273, 501));\n\t\trightTeam.setPreferredSize(new Dimension(273, 501));\n\t\tscroll.setPreferredSize(new Dimension(724, 484));\n\t\tleftPanel = new JLayeredPane();\n\t\tleftPanel.setPreferredSize(new Dimension(273, 501));\n\t\tleftTeam.setBounds(0, 0, 273, 501);\n\t\tleftPanel.add(leftTeam, new Integer(0));\n\t\tadd(leftPanel, BorderLayout.LINE_START);\n\t\trightPanel = new JLayeredPane();\n\t\trightPanel.setPreferredSize(new Dimension(273, 501));\n\t\trightTeam.setBounds(0, 0, 273, 501);\n\t\trightPanel.add(rightTeam, new Integer(0));\n\t\tadd(rightPanel, BorderLayout.LINE_END);\n\t}",
"private void placeContentsInPanel() {\n\t\tGridBagConstraints constraints = new GridBagConstraints();\n\t\tconstraints.gridx = 0; \n\t\tconstraints.gridy = 0; \n\t\tconstraints.gridwidth = 1; \n\t\tconstraints.gridheight = 1; \n\t\tconstraints.insets = new Insets(10,0,0,0);\n\t\tconstraints.weighty = 0.0;\n\t\tconstraints.weightx = 1.0;\n\t\tthis.add(jpYourMusic,constraints);\n\n\t\tconstraints.gridx = 0; \n\t\tconstraints.gridy = 2; \n\t\tconstraints.gridwidth = 1; \n\t\tconstraints.gridheight = 1; \n\t\tconstraints.weighty = 0.0;\n\t\tthis.add(jpPreLists,constraints);\n\t\t\n\t\tconstraints.gridx = 0; \n\t\tconstraints.gridy = 3; \n\t\tconstraints.gridwidth = 1; \n\t\tconstraints.gridheight = 1; \n\t\tconstraints.weighty = 0.0;\n\t\tthis.add(jlYourLists,constraints);\n\t\t\n\t\tconstraints.gridx = 0; \n\t\tconstraints.gridy = 4; \n\t\tconstraints.gridwidth = 1; \n\t\tconstraints.gridheight = 1; \n\t\tconstraints.weighty = 0.0;\n\t\tthis.add(jbCreateLists,constraints);\n\t\t\n\t\t\n\t\tconstraints.gridx = 0; \n\t\tconstraints.gridy = 5; \n\t\tconstraints.gridwidth = 1; \n\t\tconstraints.gridheight = 1; \n\t\tconstraints.weighty = 0.0;\n\t\tthis.add(jpIntroduceNameList,constraints);\n\t\t\n\t\tconstraints.anchor = GridBagConstraints.NORTH;\n\t\tconstraints.gridx = 0; \n\t\tconstraints.gridy = 6; \n\t\tconstraints.gridwidth = 1; \n\t\tconstraints.gridheight = 1; \n\t\tconstraints.weighty = 1.0;\n\t\tthis.add(myTable,constraints);\n\t}",
"public JPanel createPanel(List<AbstractFieldEditor> editorList,int cols) {\n\r\n JPanel panel=new JPanel();\r\n\r\n panel.setLayout(new GridBagLayout());\r\n \r\n int row = 0;\r\n\r\n int col = 0;\r\n\r\n for (int i = 0; i < editorList.size(); i++) {\r\n\r\n AbstractFieldEditor comp = editorList.get(i);\r\n\r\n if (comp.isVisible()) {\r\n\r\n if (comp instanceof NewLineFieldEditor) {\r\n row++;\r\n col = 0;\r\n continue;\r\n } else if (comp instanceof TextAreaFieldEditor) {\r\n // 转到新的一行\r\n row++;\r\n col = 0;\r\n JLabel label = new JLabel(getLabelText(comp));\r\n if (comp.getMaxContentSize() != 9999) {\r\n label.setText(comp.getName() + \"(\"+ comp.getMaxContentSize() + \"字内)\" + \"*\");\r\n }\r\n comp.setPreferredSize(new Dimension(150, comp.getOccRow() * 26));\r\n \r\n panel.add(label, new GridBagConstraints(col,row, 1, 1, 1.0, 1.0, GridBagConstraints.EAST,GridBagConstraints.NONE, new Insets(4, 0, 4, 4), 0,0));\r\n\r\n panel.add(comp, new GridBagConstraints(col + 1,row, comp.getOccCol(), comp.getOccRow(), 1.0, 1.0,GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL, new Insets(4, 0, 4,4), 0, 0));\r\n\r\n // 将当前所占的行空间偏移量计算上\r\n row += comp.getOccRow();\r\n col = 0;\r\n\r\n continue;\r\n }\r\n\r\n JLabel label = new JLabel(comp.getName());\r\n\r\n comp.setPreferredSize(new Dimension(200, 23));\r\n\r\n panel.add(label, new GridBagConstraints(col, row, 1,1, 1.0, 1.0, GridBagConstraints.EAST,GridBagConstraints.NONE, new Insets(5, 0, 5, 5), 0, 0));\r\n\r\n panel.add(comp, new GridBagConstraints(col + 1, row,1, 1, 1.0, 1.0, GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL, new Insets(5, 0, 5, 5),0, 0));\r\n\r\n if (col == cols * 2 - 2) {\r\n row++;\r\n col = 0;\r\n } else {\r\n col += 2;\r\n }\r\n }\r\n\r\n }\r\n return panel;\r\n }",
"private void showPanelLabel(String title, TableLayout tl)\n {\n LayoutParams lpSpan = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);\n lpSpan.span = 2; \n \n TableRow tableRow = new TableRow(getContext());\n tableRow.setLayoutParams(lpSpan);\n \n TextView label = new TextView(getContext());\n label.setText(title);\n label.setTextAppearance(getContext(), android.R.style.TextAppearance_Medium);\n label.setPadding(0, 0, 0, 10);\n label.setLayoutParams(lpSpan);\n \n tableRow.addView(label);\n \n tl.addView(tableRow);\n }",
"private void addGUIComponents() {\n\t\t\n\t\t/*length panel*/\n\t\tJPanel lengthPanel = new JPanel();\n\t\tlengthPanel.setBackground(new Color(109,109,109));\n\t\tGridLayout layout = new GridLayout(1,2);\n\t\tlayout.setHgap(20);\n\t\tlengthPanel.setLayout(layout);\n\n\t\tJPanel lengthLeftPan = new JPanel();\n\t\tlengthLeftPan.setBackground(new Color(109,109,109));\n\t\tlengthLeftPan.setLayout(new GridLayout(9,2));\n\t\tlengthLeftPan.add(_X_A0_lb);\n\t\tlengthLeftPan.add(_X_A0);\n\t\tlengthLeftPan.add(_Y_A0_lb);\n\t\tlengthLeftPan.add(_Y_A0);\n\t\tlengthLeftPan.add(_X_d_lb);\n\t\tlengthLeftPan.add(_X_d);\n\t\tlengthLeftPan.add(_Y_d_lb);\n\t\tlengthLeftPan.add(_Y_d);\n\t\tlengthLeftPan.add(_X_s_lb);\n\t\tlengthLeftPan.add(_X_s);\n\t\tlengthLeftPan.add(_Y_s_lb);\n\t\tlengthLeftPan.add(_Y_s);\n\t\tlengthLeftPan.add(_ro_min_lb);\n\t\tlengthLeftPan.add(_ro_min);\n\t\tlengthLeftPan.add(new JLabel(\"\"));\n\t\tlengthLeftPan.add(new JLabel(\"\"));\n\t\tlengthLeftPan.add(new JLabel(\"\"));\n\t\tlengthLeftPan.add(new JLabel(\"\"));\n\n\t\tJPanel lengthRightPan = new JPanel(new GridLayout(10,2));\n\t\tlengthRightPan.setBackground(new Color(109,109,109));\n\t\tlengthRightPan.add(_L3_lb);\n\t\tlengthRightPan.add(_L3);\n\t\tlengthRightPan.add(_L31_lb);\n\t\tlengthRightPan.add(_L31);\n\t\tlengthRightPan.add(_L3p_lb);\n\t\tlengthRightPan.add(_L3p);\n\t\tlengthRightPan.add(_L4_lb);\n\t\tlengthRightPan.add(_L4);\n\t\tlengthRightPan.add(_L5_lb);\n\t\tlengthRightPan.add(_L5);\n\t\tlengthRightPan.add(_L1_lb);\n\t\tlengthRightPan.add(_L1);\n\t\tlengthRightPan.add(_rR_lb);\n\t\tlengthRightPan.add(_rR);\n\t\tlengthRightPan.add(_rG_lb);\n\t\tlengthRightPan.add(_rG);\n\t\tlengthRightPan.add(_ep_lb);\n\t\tlengthRightPan.add(_ep);\n\t\tlengthRightPan.add(_y_lb);\n\t\tlengthRightPan.add(_y);\n\t\t\n\t\tlengthPanel.add(lengthLeftPan);\n\t\tlengthPanel.add(lengthRightPan);\n\t\t\n\t\t/*angle panel*/\n\t\tJPanel anglePanel = new JPanel(new GridLayout(5,2));\n\t\tanglePanel.setBackground(new Color(109,109,109));\n\t\tanglePanel.add(_delta_lb);\n\t\tanglePanel.add(_delta);\n\t\tanglePanel.add(_gama_lb);\n\t\tanglePanel.add(_gama);\n\t\tanglePanel.add(_miu_an_min_lb);\n\t\tanglePanel.add(_miu_an_min);\n\t\tanglePanel.add(_miu_ab_min_lb);\n\t\tanglePanel.add(_miu_ab_min);\n\t\tanglePanel.add(_n_lb);\n\t\tanglePanel.add(_n);\n\t\t\n\t\t\n\t\t/*Title label for the length panel*/\n\t\tJLabel lengthPanelTitle = new JLabel(LanguageFactory.getInstance().getExpresion(LENGTH_TITLE_NAME));\n\t\t/*Title label for the angle panel*/\n\t\tJLabel anglePanelTitle = new JLabel(LanguageFactory.getInstance().getExpresion(ANGLE_TITLE_NAME));\n\t\t\n\t\t/*Wave radius textbox label*/\n\t\tJLabel waveRadius = new JLabel(LanguageFactory.getInstance().getExpresion(WAVE_RADIUS_LABEL_NAME));\n\t\t/*Seiben (???) radius textbox label*/\n\t\tJLabel seibenRadius = new JLabel(LanguageFactory.getInstance().getExpresion(SEIBEN_RADIUS_LABEL_NAME));\n\t\t\n\t\t\n\t\tJPanel radiusPan = new JPanel(new GridLayout(2,2));\n\t\tradiusPan.setBackground(new Color(109,109,109));\n\t\tradiusPan.add(waveRadius);\n\t\tradiusPan.add(_waveRad);\n\t\tradiusPan.add(seibenRadius);\n\t\tradiusPan.add(_siebenRad);\n\t\t\n\t\t\n\t\tJPanel leftPan = new JPanel(new GridBagLayout());\n\t\tleftPan.setBorder(BorderFactory.createRaisedBevelBorder());\n\t\tleftPan.setBackground(new Color(109,109,109));\n\t\tleftPan.add(lengthPanelTitle, new GBC(0,0).setFill(GBC.NONE).setAnchor(GBC.NORTH).setInsets(0,10,50,10));\n\t\tleftPan.add(lengthPanel, new GBC(0,1).setFill(GBC.NONE).setAnchor(GBC.NORTH).setInsets(0, 10, 0, 10));\n\t\tleftPan.add(radiusPan, new GBC(0,2).setFill(GBC.NONE).setAnchor(GBC.NORTHWEST).setInsets(20, 10, 0, 10));\n\t\t\n\t\tJPanel rightPan = new JPanel(new GridBagLayout());\n\t\trightPan.setBorder(BorderFactory.createRaisedBevelBorder());\n\t\trightPan.setBackground(new Color(109,109,109));\n\t\trightPan.add(anglePanelTitle, new GBC(1,0).setFill(GBC.NONE).setAnchor(GBC.NORTH).setInsets(0,10,50,10));\n\t\trightPan.add(anglePanel, new GBC(1,1).setFill(GBC.NONE).setAnchor(GBC.NORTH).setInsets(0, 10, 0, 10));\n\t\t\n\t\t/*adding the two panels to the layout*/\n\t\tJPanel mainPan = new JPanel(new GridBagLayout());\n\t\tmainPan.add(leftPan, new GBC(0, 0).setFill(GBC.VERTICAL).setAnchor(GBC.NORTH).setInsets(0, 0, 0, 20).setWeight(100, 100));\n\t\tmainPan.add(rightPan, new GBC(1, 0).setFill(GBC.VERTICAL).setAnchor(GBC.NORTH).setInsets(0, 20, 0, 0).setWeight(100, 100));\n\t\tmainPan.add(_drawing_btn, new GBC(2, 0, 1, 2).setFill(GBC.NONE).setAnchor(GBC.NORTH));\n\t\t\n\t\tsetLayout(new BorderLayout());\n\t\tadd(mainPan, BorderLayout.CENTER);\n\t\tsetPreferredSize(new Dimension(800, 400));\n\t\tsetSize(getPreferredSize());\n\n\t}",
"private void inicialitzarComponents() {\n\t\tsetLayout(new BorderLayout(0, 0));\n\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setOpaque(false);\n\t\tadd(panel, BorderLayout.NORTH);\n\n\t\tBox verticalBox = Box.createVerticalBox();\n\t\tverticalBox.setOpaque(false);\n\t\tpanel.add(verticalBox);\n\n\t\tJPanel panel_2 = new JPanel();\n\t\tpanel_2.setOpaque(false);\n\t\tverticalBox.add(panel_2);\n\n\t\tJPanel panel_3 = new JPanel();\n\t\tpanel_3.setOpaque(false);\n\t\tverticalBox.add(panel_3);\n\n\t\tJLabel lblNewLabel = new JLabel(nomUsuari);\n\t\tlblNewLabel.setFont(lblNewLabel.getFont().deriveFont(30f));\n\t\tpanel_3.add(lblNewLabel);\n\n\t\tJPanel panel_1 = new JPanel();\n\t\tpanel_1.setOpaque(false);\n\t\tadd(panel_1, BorderLayout.CENTER);\n\n\t\tBox verticalBox_1 = Box.createVerticalBox();\n\t\tverticalBox_1.setOpaque(false);\n\t\tpanel_1.add(verticalBox_1);\n\n\t\tJPanel panel_4 = new JPanel();\n\t\tpanel_4.setOpaque(false);\n\t\tverticalBox_1.add(panel_4);\n\n\t\tJLabel lblNewLabel_1 = new JLabel(\"Peces girades:\");\n\t\tpanel_4.add(lblNewLabel_1);\n\n\t\tJLabel lblNewLabel_2 = new JLabel(String.valueOf(records.get(\"pecesGirades\")));\n\t\tpanel_4.add(lblNewLabel_2);\n\n\t\tJPanel panel_5 = new JPanel();\n\t\tpanel_5.setOpaque(false);\n\t\tverticalBox_1.add(panel_5);\n\n\t\tJLabel lblNewLabel_3 = new JLabel(\"Partides blanques guanyades:\");\n\t\tpanel_5.add(lblNewLabel_3);\n\n\t\tJLabel lblNewLabel_4 = new JLabel(String.valueOf(records.get(\"partidesBlanquesGuanyades\")));\n\t\tpanel_5.add(lblNewLabel_4);\n\n\t\tJPanel panel_6 = new JPanel();\n\t\tpanel_6.setOpaque(false);\n\t\tverticalBox_1.add(panel_6);\n\n\t\tJLabel lblNewLabel_5 = new JLabel(\"Partides negres guanyades:\");\n\t\tpanel_6.add(lblNewLabel_5);\n\n\t\tJLabel lblNewLabel_6 = new JLabel(String.valueOf(records.get(\"partidesNegresGuanyades\")));\n\t\tpanel_6.add(lblNewLabel_6);\n\n\t\tpanellRanking.setLayout(new BorderLayout());\n\t\tpanellRanking.add(menu, BorderLayout.NORTH);\n\t\tpanellRanking.add(taulaHoritzontal, BorderLayout.CENTER);\n\t\tpanellRanking.setBorder(BorderFactory.createLineBorder(Color.white, 4));\n\t\tJPanel panel_7 = new JPanel();\n\t\tpanel_7.setOpaque(false);\n\t\tpanel_7.setSize(20, 20);\n\t\tpanel_7.add(panellRanking);\n\t\tverticalBox_1.add(panel_7);\n\t}",
"public void initPanel(){\r\n\t \r\n\t\t//Titre\r\n\t\tlabel.setFont(new Font(\"Verdana\",1,40));\r\n\t label.setForeground(Color.black);\r\n\t label.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label.setBounds(110,0,575,50);\r\n\t\tthis.panel.setLayout(null);\t \r\n\t this.panel.add(label);\r\n\t \r\n\t //dc\r\n\t this.panel.add(label1, BorderLayout.CENTER);\r\n\t label1.setFont(new Font(\"Verdana\",1,40));\r\n\t label1.setForeground(Color.black);\r\n\t label1.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label1.setBounds(150,500,100,50);\r\n\t //ab\r\n\t this.panel.add(label2);\r\n\t label2.setFont(new Font(\"Verdana\",1,40));\r\n\t label2.setForeground(Color.black);\r\n\t label2.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label2.setBounds(550,500,100,50);\r\n\t //Button dc\r\n\t\tdc.setBounds(50,200,300,250);\r\n\t\tthis.panel.add(dc);\r\n\t\tdc.addActionListener(this);\r\n\t\t//Button ab\r\n\t\tab.setBounds(450,200,300,250);\r\n\t\tthis.panel.add(ab);\r\n\t\tab.addActionListener(this);\r\n\t\t\r\n\t\tthis.panel.add(label3);\r\n\t label3.setFont(new Font(\"Verdana\",1,20));\r\n\t label3.setForeground(Color.black);\r\n\t label3.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label3.setBounds(90,575,220,30);\r\n\t \r\n\t this.panel.add(label4);\r\n\t label4.setFont(new Font(\"Verdana\",1,20));\r\n\t label4.setForeground(Color.black);\r\n\t label4.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label4.setBounds(490,575,220,30);\r\n\t}",
"@Override\n\tvoid modifyUserContentPanel() {\n\t\t panel = new JPanel();\n\t\tpanel.setLayout(new BoxLayout(panel,BoxLayout.PAGE_AXIS));\n\t\ticon1 = new BarGraphIcon(graphModel1,200,200);\n\t\ticon2= new BarGraphIcon(graphModel2,200,200);\n\t\tcourseLabel = new JLabel(\"Course: \");\n\t\tpanel.add(courseLabel);\n\t\tpanel.add(new JLabel(\" \"));\n\t\tpanel.add(new JLabel(\"Semester Offerings:\"));\n\t\tpanel.add( new JLabel(icon1));\n\t\tpanel.add(new JLabel(\" \"));\n\t\tpanel.add(new JLabel(\"Campus Offerings:\"));\n\t\tpanel.add(new JLabel(icon2));\n\t\t\n\t\tmakeUserContentPanel(panel);\n\t}",
"void iniciaPanel() {\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tinfo[i][j] = new JLabel(\"\");\n\t\t\t\tinfo[i][j].setBorder(new LineBorder(new Color(0, 0, 0), 1, true));\n\t\t\t\tinfo[i][j].setOpaque(true);\n\t\t\t\tif(i==0) {\n\t\t\t\t\tinfo[i][j].setBackground(UIManager.getColor(\"List.selectionBackground\"));\n\t\t\t\t}\n\t\t\t\tif(i==1) {\n\t\t\t\t\tinfo[i][j].setBackground(Color.yellow);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(i==2) {\n\t\t\t\t\tinfo[i][j].setBackground(Color.blue);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(i==3) {\n\t\t\t\t\tinfo[i][j].setBackground(Color.red);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(i==4) {\n\t\t\t\t\tinfo[i][j].setBackground(Color.gray);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tpanel.add(info[i][j]);\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tinfo[0][0].setText(\"PROCESOS\");\n\t\tinfo[1][0].setText(\"P1\");\n\t\tinfo[2][0].setText(\"P2\");\n\t\tinfo[3][0].setText(\"P3\");\n\t\tinfo[4][0].setText(\"P4\");\n\t\tinfo[0][1].setText(\"TIEMPO DE ARRIBO/LLEGADA\");\n\t\tinfo[0][2].setText(\"RAFAGAS DE USO DEL CPU\");\n\t\t\n\t\t//llenado donde estara la simulacion\t\t\n\t\tfor (int i = 0; i < ns; i++) {\n\t\t\tfor (int j = 0; j < ms; j++) {\n\t\t\t\tsimulacion[i][j] = new JLabel(\"\");\n\t\t\t\tsimulacion[i][j].setBorder(new LineBorder(new Color(0, 0, 0), 1, true));\n\t\t\t\tsimulacion[i][j].setOpaque(true);\n\t\t\t\tsimulacion[i][j].setBackground(Color.WHITE);\n\t\t\t\tsimulacion[i][j].setVisible(false);\n\t\t\t\tsimulacion[i][j].setFont(fuente2);\n\t\t\t\tpanel_2.add(simulacion[i][j]);\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tllenainfo();\n\t\t\n\t}",
"@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 Panel1 = new javax.swing.JPanel();\n label1 = new javax.swing.JLabel();\n imagen1 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jList1 = new javax.swing.JList<>();\n labelTitulo = new javax.swing.JLabel();\n botonSalir = new javax.swing.JButton();\n Panel2 = new javax.swing.JPanel();\n label2 = new javax.swing.JLabel();\n imagen2 = new javax.swing.JLabel();\n jScrollPane2 = new javax.swing.JScrollPane();\n jList2 = new javax.swing.JList<>();\n Panel3 = new javax.swing.JPanel();\n label3 = new javax.swing.JLabel();\n imagen3 = new javax.swing.JLabel();\n jScrollPane3 = new javax.swing.JScrollPane();\n jList3 = new javax.swing.JList<>();\n Panel4 = new javax.swing.JPanel();\n label4 = new javax.swing.JLabel();\n imagen4 = new javax.swing.JLabel();\n jScrollPane4 = new javax.swing.JScrollPane();\n jList4 = new javax.swing.JList<>();\n Panel5 = new javax.swing.JPanel();\n label5 = new javax.swing.JLabel();\n imagen5 = new javax.swing.JLabel();\n jScrollPane5 = new javax.swing.JScrollPane();\n jList5 = new javax.swing.JList<>();\n Panel6 = new javax.swing.JPanel();\n label6 = new javax.swing.JLabel();\n imagen6 = new javax.swing.JLabel();\n jScrollPane6 = new javax.swing.JScrollPane();\n jList6 = new javax.swing.JList<>();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(204, 255, 204));\n setForeground(new java.awt.Color(204, 255, 204));\n\n jPanel1.setBackground(new java.awt.Color(204, 255, 204));\n jPanel1.setForeground(new java.awt.Color(204, 255, 204));\n\n Panel1.setBackground(new java.awt.Color(255, 255, 255));\n Panel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n Panel1.setForeground(new java.awt.Color(255, 255, 255));\n\n label1.setBackground(new java.awt.Color(0, 0, 0));\n label1.setFont(new java.awt.Font(\"Lucida Bright\", 0, 14)); // NOI18N\n label1.setText(\"Ejemplar1\");\n\n imagen1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/botella_de_plastico.jpg\"))); // NOI18N\n\n jList1.setFont(new java.awt.Font(\"Lucida Bright\", 0, 12)); // NOI18N\n jList1.setForeground(new java.awt.Color(255, 255, 255));\n jList1.setModel(new javax.swing.AbstractListModel<String>() {\n String[] strings = { \"Tiempo de Descomposición:\", \"Tratamiento:\", \" \" };\n public int getSize() { return strings.length; }\n public String getElementAt(int i) { return strings[i]; }\n });\n jList1.setEnabled(false);\n jScrollPane1.setViewportView(jList1);\n\n javax.swing.GroupLayout Panel1Layout = new javax.swing.GroupLayout(Panel1);\n Panel1.setLayout(Panel1Layout);\n Panel1Layout.setHorizontalGroup(\n Panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(Panel1Layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addComponent(label1)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, Panel1Layout.createSequentialGroup()\n .addGap(0, 43, Short.MAX_VALUE)\n .addComponent(imagen1)\n .addGap(42, 42, 42))\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING)\n );\n Panel1Layout.setVerticalGroup(\n Panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(Panel1Layout.createSequentialGroup()\n .addContainerGap(14, Short.MAX_VALUE)\n .addComponent(label1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(imagen1)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n labelTitulo.setFont(new java.awt.Font(\"Lucida Bright\", 0, 18)); // NOI18N\n labelTitulo.setText(\"Sección Informativa\");\n\n botonSalir.setBackground(new java.awt.Color(255, 255, 255));\n botonSalir.setText(\"Volver\");\n botonSalir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n botonSalirActionPerformed(evt);\n }\n });\n\n Panel2.setBackground(new java.awt.Color(255, 255, 255));\n Panel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n Panel2.setForeground(new java.awt.Color(255, 255, 255));\n\n label2.setBackground(new java.awt.Color(0, 0, 0));\n label2.setFont(new java.awt.Font(\"Lucida Bright\", 0, 14)); // NOI18N\n label2.setText(\"Ejemplar2\");\n\n imagen2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/botella_de_plastico.jpg\"))); // NOI18N\n\n jList2.setFont(new java.awt.Font(\"Lucida Bright\", 0, 12)); // NOI18N\n jList2.setForeground(new java.awt.Color(255, 255, 255));\n jList2.setModel(new javax.swing.AbstractListModel<String>() {\n String[] strings = { \"Tiempo de Descomposición:\", \"Tratamiento:\", \" \" };\n public int getSize() { return strings.length; }\n public String getElementAt(int i) { return strings[i]; }\n });\n jList2.setEnabled(false);\n jScrollPane2.setViewportView(jList2);\n\n javax.swing.GroupLayout Panel2Layout = new javax.swing.GroupLayout(Panel2);\n Panel2.setLayout(Panel2Layout);\n Panel2Layout.setHorizontalGroup(\n Panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(Panel2Layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addComponent(label2)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, Panel2Layout.createSequentialGroup()\n .addGap(0, 43, Short.MAX_VALUE)\n .addComponent(imagen2)\n .addGap(42, 42, 42))\n .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING)\n );\n Panel2Layout.setVerticalGroup(\n Panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(Panel2Layout.createSequentialGroup()\n .addContainerGap(14, Short.MAX_VALUE)\n .addComponent(label2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(imagen2)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n Panel3.setBackground(new java.awt.Color(255, 255, 255));\n Panel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n Panel3.setForeground(new java.awt.Color(255, 255, 255));\n\n label3.setBackground(new java.awt.Color(0, 0, 0));\n label3.setFont(new java.awt.Font(\"Lucida Bright\", 0, 14)); // NOI18N\n label3.setText(\"Ejemplar4\");\n\n imagen3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/botella_de_plastico.jpg\"))); // NOI18N\n\n jList3.setFont(new java.awt.Font(\"Lucida Bright\", 0, 12)); // NOI18N\n jList3.setForeground(new java.awt.Color(255, 255, 255));\n jList3.setModel(new javax.swing.AbstractListModel<String>() {\n String[] strings = { \"Tiempo de Descomposición:\", \"Tratamiento:\" };\n public int getSize() { return strings.length; }\n public String getElementAt(int i) { return strings[i]; }\n });\n jList3.setEnabled(false);\n jScrollPane3.setViewportView(jList3);\n\n javax.swing.GroupLayout Panel3Layout = new javax.swing.GroupLayout(Panel3);\n Panel3.setLayout(Panel3Layout);\n Panel3Layout.setHorizontalGroup(\n Panel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(Panel3Layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addComponent(label3)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, Panel3Layout.createSequentialGroup()\n .addGap(0, 43, Short.MAX_VALUE)\n .addComponent(imagen3)\n .addGap(42, 42, 42))\n .addComponent(jScrollPane3, javax.swing.GroupLayout.Alignment.TRAILING)\n );\n Panel3Layout.setVerticalGroup(\n Panel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(Panel3Layout.createSequentialGroup()\n .addContainerGap(14, Short.MAX_VALUE)\n .addComponent(label3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(imagen3)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n Panel4.setBackground(new java.awt.Color(255, 255, 255));\n Panel4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n Panel4.setForeground(new java.awt.Color(255, 255, 255));\n\n label4.setBackground(new java.awt.Color(0, 0, 0));\n label4.setFont(new java.awt.Font(\"Lucida Bright\", 0, 14)); // NOI18N\n label4.setText(\"Ejemplar5\");\n\n imagen4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/botella_de_plastico.jpg\"))); // NOI18N\n\n jList4.setFont(new java.awt.Font(\"Lucida Bright\", 0, 12)); // NOI18N\n jList4.setForeground(new java.awt.Color(255, 255, 255));\n jList4.setModel(new javax.swing.AbstractListModel<String>() {\n String[] strings = { \"Tiempo de Descomposición:\", \"Tratamiento:\" };\n public int getSize() { return strings.length; }\n public String getElementAt(int i) { return strings[i]; }\n });\n jList4.setEnabled(false);\n jScrollPane4.setViewportView(jList4);\n\n javax.swing.GroupLayout Panel4Layout = new javax.swing.GroupLayout(Panel4);\n Panel4.setLayout(Panel4Layout);\n Panel4Layout.setHorizontalGroup(\n Panel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(Panel4Layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addComponent(label4)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, Panel4Layout.createSequentialGroup()\n .addGap(0, 43, Short.MAX_VALUE)\n .addComponent(imagen4)\n .addGap(42, 42, 42))\n .addComponent(jScrollPane4, javax.swing.GroupLayout.Alignment.TRAILING)\n );\n Panel4Layout.setVerticalGroup(\n Panel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(Panel4Layout.createSequentialGroup()\n .addContainerGap(14, Short.MAX_VALUE)\n .addComponent(label4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(imagen4)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n Panel5.setBackground(new java.awt.Color(255, 255, 255));\n Panel5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n Panel5.setForeground(new java.awt.Color(255, 255, 255));\n\n label5.setBackground(new java.awt.Color(0, 0, 0));\n label5.setFont(new java.awt.Font(\"Lucida Bright\", 0, 14)); // NOI18N\n label5.setText(\"Ejemplar3\");\n\n imagen5.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/botella_de_plastico.jpg\"))); // NOI18N\n\n jList5.setFont(new java.awt.Font(\"Lucida Bright\", 0, 12)); // NOI18N\n jList5.setForeground(new java.awt.Color(255, 255, 255));\n jList5.setModel(new javax.swing.AbstractListModel<String>() {\n String[] strings = { \"Tiempo de Descomposición:\", \"Tratamiento:\" };\n public int getSize() { return strings.length; }\n public String getElementAt(int i) { return strings[i]; }\n });\n jList5.setEnabled(false);\n jScrollPane5.setViewportView(jList5);\n\n javax.swing.GroupLayout Panel5Layout = new javax.swing.GroupLayout(Panel5);\n Panel5.setLayout(Panel5Layout);\n Panel5Layout.setHorizontalGroup(\n Panel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(Panel5Layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addComponent(label5)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, Panel5Layout.createSequentialGroup()\n .addGap(0, 43, Short.MAX_VALUE)\n .addComponent(imagen5)\n .addGap(42, 42, 42))\n .addComponent(jScrollPane5, javax.swing.GroupLayout.Alignment.TRAILING)\n );\n Panel5Layout.setVerticalGroup(\n Panel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(Panel5Layout.createSequentialGroup()\n .addContainerGap(14, Short.MAX_VALUE)\n .addComponent(label5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(imagen5)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n Panel6.setBackground(new java.awt.Color(255, 255, 255));\n Panel6.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n Panel6.setForeground(new java.awt.Color(255, 255, 255));\n\n label6.setBackground(new java.awt.Color(0, 0, 0));\n label6.setFont(new java.awt.Font(\"Lucida Bright\", 0, 14)); // NOI18N\n label6.setText(\"Ejemplar6\");\n\n imagen6.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/botella_de_plastico.jpg\"))); // NOI18N\n\n jList6.setFont(new java.awt.Font(\"Lucida Bright\", 0, 12)); // NOI18N\n jList6.setForeground(new java.awt.Color(255, 255, 255));\n jList6.setModel(new javax.swing.AbstractListModel<String>() {\n String[] strings = { \"Tiempo de Descomposición:\", \"Tratamiento:\" };\n public int getSize() { return strings.length; }\n public String getElementAt(int i) { return strings[i]; }\n });\n jList6.setEnabled(false);\n jScrollPane6.setViewportView(jList6);\n\n javax.swing.GroupLayout Panel6Layout = new javax.swing.GroupLayout(Panel6);\n Panel6.setLayout(Panel6Layout);\n Panel6Layout.setHorizontalGroup(\n Panel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(Panel6Layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addComponent(label6)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, Panel6Layout.createSequentialGroup()\n .addGap(0, 43, Short.MAX_VALUE)\n .addComponent(imagen6)\n .addGap(42, 42, 42))\n .addComponent(jScrollPane6, javax.swing.GroupLayout.Alignment.TRAILING)\n );\n Panel6Layout.setVerticalGroup(\n Panel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(Panel6Layout.createSequentialGroup()\n .addContainerGap(14, Short.MAX_VALUE)\n .addComponent(label6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(imagen6)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE))\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 .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(Panel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(Panel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(Panel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(Panel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(Panel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(Panel6, 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 .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(15, 15, 15)\n .addComponent(labelTitulo)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(botonSalir)\n .addGap(20, 20, 20))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(21, 21, 21)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(labelTitulo)\n .addComponent(botonSalir))\n .addGap(25, 25, 25)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Panel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Panel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Panel5, 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(Panel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Panel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Panel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(17, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .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.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n pack();\n }",
"public void createPage2()\n {\n panel2 = new JPanel();\n PositionMassageList = new DefaultListModel<>();\n list2 = new JList(PositionMassageList);\n panel2.add(list2);\n\n }",
"private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));\n materialFirstWordLabel = new JLabel();\n materialFirstWordLabel.setText(\"нет данных\");\n contentPane.add(materialFirstWordLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(10, -1), null, 0, false));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n materialMarkLabel = new JLabel();\n materialMarkLabel.setText(\" \");\n materialMarkLabel.setVerticalTextPosition(1);\n panel1.add(materialMarkLabel, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n materialProfileLabel = new JLabel();\n materialProfileLabel.setText(\" \");\n materialProfileLabel.setVerticalTextPosition(3);\n panel1.add(materialProfileLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n materialSeparator = new JSeparator();\n panel1.add(materialSeparator, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n contentPane.add(spacer1, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n }",
"private void createpanel1() {\r\n\t\theader = new JLabel();\r\n\t\theader.setText(\"Type in Userinformation\");\r\n\t\theader.setFont(customFont.deriveFont(25f));\r\n\t\theader.setForeground(Color.WHITE);\r\n\r\n\t\tpanels[0].add(header);\r\n\t\tpanels[0].setOpaque(false);\r\n\t\tallComponents.add(panels[0]);\r\n\r\n\t}",
"protected JPanel getPoolAsPanel() {\n\n String job = this.getSkill().substring(0, 1).toUpperCase() + this.getSkill().substring(1);\n\n // Definitions\n this.rowPanel = new JPanel(new GridLayout(1, 3));\n this.skillLabel = new JLabel(job, JLabel.CENTER);\n this.portLabel = new JLabel(this.getParentPort(), JLabel.CENTER);\n this.countLabel = new JLabel(\"Available: \"\n + String.valueOf(this.getAvailablePersons()), JLabel.CENTER);\n this.totalLabel = new JLabel(\"Total: \"\n + String.valueOf(this.getTotalPersons()), JLabel.CENTER);\n\n // Allow for colorization of JLabel backgrounds\n this.skillLabel.setOpaque(true);\n this.portLabel.setOpaque(true);\n this.countLabel.setOpaque(true);\n this.totalLabel.setOpaque(true);\n\n // Add background colorization\n this.skillLabel.setBackground(Color.WHITE);\n this.portLabel.setBackground(Color.WHITE);\n this.countLabel.setBackground(Color.WHITE);\n this.totalLabel.setBackground(Color.WHITE);\n\n // Add JTable-esque borders\n this.skillLabel.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1));\n this.portLabel.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1));\n this.countLabel.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1));\n this.totalLabel.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1));\n\n // Add elements to the pseudo-row\n this.rowPanel.add(this.skillLabel);\n this.rowPanel.add(this.portLabel);\n this.rowPanel.add(this.countLabel);\n this.rowPanel.add(this.totalLabel);\n\n return this.rowPanel;\n }",
"private void makeLists()\n\t\t{\n\t\t\tString [] arr1 = {\"The Master Thrasher ($60)\", \"The Dictator ($45)\", \"The Street King ($50)\"};\n\t\t\tString [] arr2 = {\"7.75 Inch axle ($35)\", \"8-inch Axle ($40)\", \"8.5 inch axle ($45)\"};\n\t\t\tString [] arr3 = {\"51 mm ($20)\", \"55 mm ($22)\", \"58mm ($24)\", \"61mm ($28)\"};\n\t\t\tString [] arr4 = {\"Grip tape ($10)\", \"Bearings ($30)\", \"Riser pads ($2)\", \"Nuts and bolts kit ($3)\"};\n\n\t\t\t//give each panel a layout\n\t\t\t Panel_1 = new JPanel(new BorderLayout());\n\t\t\t Panel_2 = new JPanel(new BorderLayout());\n\t\t\t Panel_3 = new JPanel(new BorderLayout());\n\t\t\t Panel_4 = new JPanel(new BorderLayout());\n\n\t\t\t//constructor JLabel objects with appropriate text\n\t\t\t label1 = new JLabel(\"Choose your Deck!\");\n\t\t\t label2 = new JLabel(\"Choose your Truck!\");\n\t\t\t label3 = new JLabel(\"Choose your Wheels!\");\n\t\t label4 = new JLabel(\"Miscellaneous\");\n\n\t\t //Give Labels borders\n\t\t label1.setBorder(BorderFactory.createLineBorder(Color.CYAN,2));\n\t\t label2.setBorder(BorderFactory.createLineBorder(Color.RED,2));\n\t\t label3.setBorder(BorderFactory.createLineBorder(Color.GREEN,2));\n\t\t label4.setBorder(BorderFactory.createLineBorder(Color.BLUE,2));\n\n\t\t //center the labels\n\t\t label1.setHorizontalAlignment(JLabel.CENTER);\n\t\t label2.setHorizontalAlignment(JLabel.CENTER);\n\t\t label3.setHorizontalAlignment(JLabel.CENTER);\n\t\t label4.setHorizontalAlignment(JLabel.CENTER);\n\n\t\t //add the Labels to north section of JPanel object\n\t\t Panel_1.add(label1,BorderLayout.NORTH);\n\t\t Panel_2.add(label2,BorderLayout.NORTH);\n\t\t\t Panel_3.add(label3,BorderLayout.NORTH);\n\t\t Panel_4.add(label4,BorderLayout.NORTH);\n\n\t\t //intialize JList objects with arrays listed above\n\t\t\t Decks_Menu = new JList(arr1);\n\t\t\t Truck_Assemblies_Menu = new JList(arr2);\n\t\t\t Wheels_Menu = new JList(arr3);\n\t\t\t Miscellaneous_Menu = new JList(arr4);\n\n\t\t\t //Connect event handlers to each list\n\t\t\t Decks_Menu.addListSelectionListener(new ButtonListener());\n\t\t\t Truck_Assemblies_Menu.addListSelectionListener(new ButtonListener());\n\t\t\t Wheels_Menu .addListSelectionListener(new ButtonListener());\n\t\t\t Miscellaneous_Menu.addListSelectionListener(new ButtonListener());\n\n\t\t\t //give each menu a border\n\t\t\t Decks_Menu.setBorder(BorderFactory.createLineBorder(Color.CYAN,2));\n\t\t\t Truck_Assemblies_Menu.setBorder(BorderFactory.createLineBorder(Color.RED,2));\n\t\t\t Wheels_Menu.setBorder(BorderFactory.createLineBorder(Color.GREEN,2));\n\t\t\t Miscellaneous_Menu.setBorder(BorderFactory.createLineBorder(Color.BLUE,2));\n\n\t\t\t //choose selectionMode for each Menu\n\t\t\t Decks_Menu.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t\t\t Truck_Assemblies_Menu.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t\t\t Wheels_Menu.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t\t\t Miscellaneous_Menu .setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);\n\n\t\t\t //add Menu to Southern part of JLabel\n\t\t\tPanel_1.add(Decks_Menu,BorderLayout.SOUTH);\n\t\t\tPanel_2.add(Truck_Assemblies_Menu, BorderLayout.SOUTH);\n\t\t\tPanel_3.add(Wheels_Menu, BorderLayout.SOUTH);\n\t\t Panel_4.add(Miscellaneous_Menu, BorderLayout.SOUTH);\n\n\n\n\t\t}",
"private void initTopPanel()\r\n {\r\n GridBagConstraints TopPanelConstraints = new GridBagConstraints();\r\n GridBagLayout TopPanelLayout = new GridBagLayout();\r\n JPanel TopPanel = new JPanel();\r\n TopPanel.setLayout(TopPanelLayout);\r\n\r\n TopPanelConstraints.insets = new Insets(4, 4, 4, 4);\r\n TopPanelConstraints.anchor = GridBagConstraints.WEST;\r\n TopPanelConstraints.gridwidth = 1;\r\n TopPanelConstraints.gridheight = 1;\r\n TopPanelConstraints.fill = GridBagConstraints.HORIZONTAL;\r\n TopPanelConstraints.weighty = 0.0;\r\n\r\n // The first line.\r\n TopPanelConstraints.gridy = 0;\r\n TopPanelConstraints.gridx = 0;\r\n TopPanelConstraints.weightx = 1.0;\r\n Container FirstLineContainer = buildFirstLine();\r\n TopPanel.add(FirstLineContainer, TopPanelConstraints);\r\n\r\n TopPanelConstraints.gridx = 1;\r\n TopPanelConstraints.weightx = 0.0;\r\n // TopPanel.add(AboutButton, TopPanelConstraints);\r\n\r\n TopPanelConstraints.gridx = 2;\r\n TopPanelConstraints.weightx = 0.0;\r\n // TopPanel.add(ExitButton, TopPanelConstraints);\r\n\r\n // The second line.\r\n TopPanelConstraints.gridy = 1;\r\n TopPanelConstraints.gridx = 0;\r\n TopPanelConstraints.weightx = 1.0;\r\n Container SecondLineContainer = buildSecondLine();\r\n TopPanel.add(SecondLineContainer, TopPanelConstraints);\r\n\r\n TopPanelConstraints.gridx = 1;\r\n TopPanelConstraints.weightx = 0.0;\r\n TopPanelConstraints.gridwidth = 2;\r\n TopPanel.add(SaveResultsButton, TopPanelConstraints);\r\n\r\n \tBrowseButton.addActionListener(new BrowseButtonListener() );\r\n \tSearchButton.addActionListener(new SearchButtonListener() );\r\n \t//ExitButton.addActionListener(new ExitButtonListener() );\r\n \t//AboutButton.addActionListener(new AboutButtonListener() );\r\n \tSaveResultsButton.addActionListener(new SaveButtonListener() );\r\n\r\n\t getContentPane().add(\"North\", TopPanel);\r\n }",
"private void addLabelsInventory() {\r\n \tjcomp1 = new JLabel (\"Inventory Management\");\r\n \tjcomp2 = new JLabel (\"Search Tools By:\");\r\n \tjcomp3 = new JLabel (\"Tool Id\");\r\n jcomp4 = new JLabel (\"Name\");\r\n jcomp5 = new JLabel (\"Tool Type\");\r\n jcomp6 = new JLabel (\"Stock\");\r\n jcomp7 = new JLabel (\"Price\");\r\n jcomp8 = new JLabel (\"Supplier Id\");\r\n jcomp9 = new JLabel (\"Tool Information\");\r\n jcomp10 = new JLabel (\"Power Type\");\r\n \r\n add(jcomp1);\r\n add(jcomp2);\r\n add(jcomp3);\r\n add(jcomp4);\r\n add(jcomp5);\r\n add(jcomp6);\r\n add(jcomp7);\r\n add(jcomp8);\r\n add(jcomp9);\r\n add(jcomp10);\r\n \r\n jcomp1.setBounds (375, 50, 155, 45);\r\n jcomp2.setBounds (100, 130, 100, 25);\r\n jcomp3.setBounds (610, 290, 80, 25);\r\n jcomp4.setBounds (610, 330, 80, 25);\r\n jcomp5.setBounds (610, 370, 80, 25);\r\n jcomp6.setBounds (610, 410, 80, 25);\r\n jcomp7.setBounds (610, 450, 80, 25);\r\n jcomp8.setBounds (610, 490, 80, 25);\r\n jcomp9.setBounds (640, 250, 100, 25);\r\n jcomp10.setBounds (610, 530, 80, 25);\r\n }",
"protected void addResult2(ULPanel ul, LocationResult locationResult) {\n // vertical panel, 2 rows into each li\n // one label on top row\n // hp goes into 2nd row\n SolrDocument solrDocument = locationResult.getSolrDocument();\n VerticalPanel vp = new VerticalPanel();\n HorizontalPanel hp = new HorizontalPanel();\n Long spotId = spotId = solrDocument.getFirstLong(\"spotid_l\");\n //all links for this will go to mark a spot\n String targetHistoryToken = MyWebApp.LEAVE_SPOT_MARK + spotId;\n Long itemId = null;\n itemId = solrDocument.getFirstLong(\"georepoitemid_l\");\n if (itemId == null) {\n itemId = solrDocument.getFirstLong(\"latest_mark_georepoitemid_l\");\n }\n vp.add(hp);\n ListItem li = new ListItem();\n li.add(vp);\n ul.add(li);\n addMarkPhoto(solrDocument, targetHistoryToken, hp);\n VerticalPanel middleTable = new VerticalPanel();\n hp.add(middleTable);\n hp.setCellWidth(middleTable, \"100%\");\n middleTable.setStyleName(\"middletable\");\n //this will add the first row to the middle table\n //mode is is a results page, whereas 2 is marks for a spot\n String spot_label_s = solrDocument.getFirstString(\"spot_label_s\");\n if (spot_label_s != null) {\n String sl = spot_label_s.toString();\n Hyperlink spotLabel = new Hyperlink(\"@\" + sl, targetHistoryToken);\n spotLabel.setStyleName(\"spotLabel\");\n middleTable.add(spotLabel);\n }\n Anchor distanceLabel = getDistanceHyperlink(locationResult, targetHistoryToken);\n Hyperlink metersLabel = new Hyperlink(\"meters away\", targetHistoryToken);\n ComplexPanel distancePanel = getDistancePanel(distanceLabel, metersLabel, locationResult);\n Hyperlink latest_mark_escapedjavascriptsnippet_s = addHtml2(solrDocument, middleTable, \"latest_mark_escapedjavascriptsnippet_s\", targetHistoryToken);\n if (latest_mark_escapedjavascriptsnippet_s != null) {\n latest_mark_escapedjavascriptsnippet_s.addStyleName(\"latestMarkEscapedJavascriptSnippet\");\n }\n ComplexPanel categoriesPanel = addCategories(solrDocument);\n middleTable.add(categoriesPanel);\n if (itemId == null) {\n Hyperlink label2 = new Hyperlink(\"Be the first to mark this spot!\", targetHistoryToken);\n label2.addStyleName(\"linky\");\n label2.addStyleName(\"befirst\");\n //middleTable.add(label2);\n }\n String snippet = solrDocument.getFirstString(\"spot_geoRepoItemescapedjavascriptsnippet_s\");\n if (snippet != null) {\n Hyperlink html2 = new Hyperlink(snippet, targetHistoryToken);\n html2.addStyleName(\"spotGeoRepoItemEscapedJavascriptSnippet\");\n }\n Hyperlink html2 = addHtml2(solrDocument, middleTable, \"spot_geoRepoItemescapedjavascriptsnippet_s\", targetHistoryToken);\n if (html2 != null) {\n html2.addStyleName(\"spotGeoRepoItemEscapedJavascriptSnippet\");\n }\n //2nd image\n //spot\n if (!MyWebApp.isSmallFormat()) {\n // if ((alex)) {\n Hyperlink userHyperLink = new Hyperlink();\n userHyperLink.setTargetHistoryToken(targetHistoryToken);\n Image image = addImage(solrDocument, hp, \"image_thumbnail_130x130_url_s\",\n userHyperLink, resources.spot_image_placeholder130x130(), resources.spot_image_placeholder57x57(), \"spotimage\");\n setColumnWidth(image, hp);\n // }\n }\n hp.add(distancePanel);\n setColumnWidth(distancePanel, hp);\n }",
"public UITeam(Object[] data, Account account){\n\n super(account);\n\n list = data;\n\n // Team Location Team Name\n // Manager: \"manager name\"\n // Win/Loss Ratio: xx/xx (xx wins)\n // Players\n // ....\n\n this.account=account;\n\n int rows = 12 + data.length;\n setLayout(new GridLayout(rows,1));\n\n setTitle(\"NHL Analyzer\");\n setSize(400,40*rows);\n\n Panel pnlText = new Panel();\n pnlText.setLayout(new FlowLayout());\n infoBar = new Label(data[1]+\" \"+data[0]);\n pnlText.add(infoBar);\n\n add(pnlText);\n\n Panel pnlText1 = new Panel();\n pnlText1.setLayout(new FlowLayout());\n infoBar1 = new Label(\"Manager: \"+data[2]);\n pnlText1.add(infoBar1);\n\n add(pnlText1);\n\n\n Panel pnlText3 = new Panel();\n pnlText3.setLayout(new FlowLayout());\n infoBar3 = new Label(\"Win/Loss Ratio: \"+data[4]+\" (\"+data[3]+\" wins)\");\n pnlText3.add(infoBar3);\n\n add(pnlText3);\n\n\n Panel pnlText4 = new Panel();\n pnlText4.setLayout(new FlowLayout());\n infoBar4 = new Label(\"Players\");\n pnlText4.add(infoBar4);\n\n add(pnlText4);\n\n buttonList1= new ArrayList<Button>();\n for(int i = 5; i < data.length; i++){\n Object[] player = (Object[])data[i];\n\n Panel pnlPlayer = new Panel();\n pnlPlayer.setLayout(new FlowLayout());\n Label infoBarP = new Label(player[0].toString());\n pnlPlayer.add(infoBarP);\n\n Button btnPlayer = new Button(\"View\");\n\n buttonList1.add(btnPlayer);\n btnPlayer.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent evt) {\n int i = buttonList1.indexOf(evt.getSource());\n playerPress(false,i);\n }\n });\n pnlPlayer.add(btnPlayer);\n\n\n add(pnlPlayer);\n\n }\n\n btnBack = new Button(\"Back\");\n btnBack.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent evt) {\n backPress();\n }\n });\n add(btnBack);\n\n\n addWindowListener(this);\n\n setVisible(true);\n }",
"private void generateLabelPanel() {\n speedLabel = new JLabel(\"\");\n loopbackLabel = new JLabel(\"\");\n playingLabel = new JLabel(\"\");\n\n JPanel labelPanel = new JPanel();\n labelPanel.setLayout(new FlowLayout());\n labelPanel.add(playingLabel);\n labelPanel.add(Box.createHorizontalStrut(50));\n labelPanel.add(speedLabel);\n labelPanel.add(Box.createHorizontalStrut(50));\n labelPanel.add(loopbackLabel);\n mainPanel.add(labelPanel);\n }",
"private void $$$setupUI$$$() {\n rootPanel = new JPanel();\n rootPanel.setLayout(new BorderLayout(0, 0));\n centerPanel = new JPanel();\n centerPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n rootPanel.add(centerPanel, BorderLayout.CENTER);\n final JSplitPane splitPane1 = new JSplitPane();\n splitPane1.setDividerLocation(240);\n splitPane1.setResizeWeight(0.5);\n centerPanel.add(splitPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, 200), null, 0, false));\n leftPanel = new JPanel();\n leftPanel.setLayout(new BorderLayout(0, 0));\n splitPane1.setLeftComponent(leftPanel);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n leftPanel.add(panel1, BorderLayout.NORTH);\n userListTitle = new JLabel();\n userListTitle.setText(\"在线用户\");\n panel1.add(userListTitle, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n leftPanel.add(panel2, BorderLayout.CENTER);\n JSP_list = new JScrollPane();\n panel2.add(JSP_list, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n rightPanel = new JPanel();\n rightPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n splitPane1.setRightComponent(rightPanel);\n southPanel = new JPanel();\n southPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n rootPanel.add(southPanel, BorderLayout.SOUTH);\n northPanel = new JPanel();\n northPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n rootPanel.add(northPanel, BorderLayout.NORTH);\n }",
"private void initComponents() {\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetBounds(100, 100, 987, 717);\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\tJPanel panel = new JPanel();\n\t\tpanel.setBounds(0, 0, 189, 678);\n\t\tcontentPane.add(panel);\n\n\t\tJLabel label = new JLabel();\n\t\tlabel.setText(\"货 物\");\n\t\tlabel.setFont(new Font(\"微软雅黑\", Font.PLAIN, 14));\n\n\t\tJScrollPane scrollPane = new JScrollPane();\n\t\tGroupLayout gl_panel = new GroupLayout(panel);\n\t\tgl_panel.setHorizontalGroup(gl_panel\n\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(\n\t\t\t\t\t\tgl_panel.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tgl_panel.createParallelGroup(\n\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.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tgl_panel.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(71)\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\tlabel))\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\tgl_panel.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addContainerGap()\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\tscrollPane,\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\t160,\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\tgl_panel.setVerticalGroup(gl_panel.createParallelGroup(\n\t\t\t\tAlignment.LEADING).addGroup(\n\t\t\t\tgl_panel.createSequentialGroup()\n\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t.addComponent(label)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(scrollPane, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t613, Short.MAX_VALUE).addContainerGap()));\n\n\t\tsaleGoodjList = new JList();\n\t\tscrollPane.setViewportView(saleGoodjList);\n\t\tpanel.setLayout(gl_panel);\n\n\t\tscrollPane_1 = new JScrollPane();\n\t\tscrollPane_1.setBounds(199, 498, 764, 180);\n\t\tcontentPane.add(scrollPane_1);\n\n\t\tsaleTable = new JTable();\n\t\t// saleTable.setModel();\n\t\tsaleTable.setToolTipText(\"窗帘\");\n\t\tscrollPane_1.setViewportView(saleTable);\n\n\t\tJLabel saleTotal = new JLabel(\"总价:\");\n\t\tsaleTotal.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\t\tsaleTotal.setBounds(209, 199, 45, 25);\n\t\tcontentPane.add(saleTotal);\n\n\t\tJLabel label_8 = new JLabel(\"\");\n\t\tlabel_8.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\t\tlabel_8.setBounds(253, 643, 54, 20);\n\t\tcontentPane.add(label_8);\n\n\t\tJPanel panel_1 = new JPanel();\n\t\tpanel_1.setBorder(new TitledBorder(null, \"\\u5BA2\\u6237\\u4FE1\\u606F\",\n\t\t\t\tTitledBorder.LEADING, TitledBorder.TOP, null, null));\n\t\tpanel_1.setBounds(199, 10, 480, 115);\n\t\tcontentPane.add(panel_1);\n\t\tpanel_1.setLayout(null);\n\n\t\tJLabel label_1 = new JLabel(\"姓名:\");\n\t\tlabel_1.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\t\tlabel_1.setBounds(14, 26, 45, 15);\n\t\tpanel_1.add(label_1);\n\n\t\tcustomerName = new JTextField();\n\t\tcustomerName.setColumns(10);\n\t\tcustomerName.setBounds(73, 23, 103, 21);\n\t\tpanel_1.add(customerName);\n\n\t\tJLabel label_3 = new JLabel(\"电话:\");\n\t\tlabel_3.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\t\tlabel_3.setBounds(190, 26, 45, 15);\n\t\tpanel_1.add(label_3);\n\n\t\tcustomerTel1 = new JTextField();\n\t\tcustomerTel1.setColumns(10);\n\t\tcustomerTel1.setBounds(249, 23, 100, 21);\n\t\tpanel_1.add(customerTel1);\n\n\t\tcustomerTel2 = new JTextField();\n\t\tcustomerTel2.setColumns(10);\n\t\tcustomerTel2.setBounds(363, 23, 100, 21);\n\t\tpanel_1.add(customerTel2);\n\n\t\tJLabel label_6 = new JLabel(\"地址:\");\n\t\tlabel_6.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\t\tlabel_6.setBounds(16, 52, 45, 16);\n\t\tpanel_1.add(label_6);\n\n\t\tcustomerAdr = new JTextField();\n\t\tcustomerAdr.setColumns(10);\n\t\tcustomerAdr.setBounds(77, 51, 383, 21);\n\t\tpanel_1.add(customerAdr);\n\n\t\tcustomerDeposit = new JTextField();\n\t\tcustomerDeposit.setColumns(10);\n\t\tcustomerDeposit.setBounds(63, 78, 66, 21);\n\t\tpanel_1.add(customerDeposit);\n\n\t\tJLabel label_7 = new JLabel(\"定金:\");\n\t\tlabel_7.setFont(new Font(\"新宋体\", Font.PLAIN, 14));\n\t\tlabel_7.setBounds(9, 78, 45, 21);\n\t\tpanel_1.add(label_7);\n\n\t\taddCustomerAl = new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\taddCustomerActionPerformed(e);\n\t\t\t}\n\t\t};\n\t\taddCustomerBtn = new JButton(\"添加客户\");\n\t\taddCustomerBtn.addActionListener(addCustomerAl);\n\t\taddCustomerBtn.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\t\taddCustomerBtn.setBounds(366, 76, 103, 23);\n\t\tpanel_1.add(addCustomerBtn);\n\n\t\tJButton customerModifyBtn = new JButton(\"修改\");\n\t\tcustomerModifyBtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}\n\t\t});\n\t\tcustomerModifyBtn.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\t\tcustomerModifyBtn.setBounds(290, 76, 67, 23);\n\t\tpanel_1.add(customerModifyBtn);\n\n\t\tJButton customerDelBtn = new JButton(\"删除\");\n\t\tcustomerDelBtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}\n\t\t});\n\t\tcustomerDelBtn.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\t\tcustomerDelBtn.setBounds(214, 76, 67, 23);\n\t\tpanel_1.add(customerDelBtn);\n\n\t\tJButton newButton = new JButton(\"新建\");\n\t\tnewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tclearAll();\n\t\t\t\tif (addCustomerBtn.getActionListeners().length == 0) {\n\t\t\t\t\taddCustomerBtn.addActionListener(addCustomerAl);\n\t\t\t\t}\n\t\t\t\taddCustomerBtn.setEnabled(true);\n\t\t\t\tnameLab.setText(\"\");\n\t\t\t\tadrLab.setText(\"\");\n\t\t\t}\n\t\t});\n\t\tnewButton.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\t\tnewButton.setBounds(138, 76, 67, 23);\n\t\tpanel_1.add(newButton);\n\n\t\tJPanel panel_2 = new JPanel();\n\t\tpanel_2.setBounds(689, 10, 274, 340);\n\t\tcontentPane.add(panel_2);\n\n\t\tJLabel label_9 = new JLabel();\n\t\tlabel_9.setText(\"历史订单\");\n\t\tlabel_9.setFont(new Font(\"微软雅黑\", Font.PLAIN, 14));\n\n\t\tJScrollPane scrollPane_2 = new JScrollPane();\n\t\tGroupLayout gl_panel_2 = new GroupLayout(panel_2);\n\t\tgl_panel_2\n\t\t\t\t.setHorizontalGroup(gl_panel_2\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgl_panel_2\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_panel_2\n\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\tAlignment.LEADING)\n\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\tgl_panel_2\n\t\t\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\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tscrollPane_2,\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\t169,\n\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.addContainerGap())\n\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\tAlignment.TRAILING,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgl_panel_2\n\t\t\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\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel_9)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(100)))));\n\t\tgl_panel_2.setVerticalGroup(gl_panel_2.createParallelGroup(\n\t\t\t\tAlignment.LEADING).addGroup(\n\t\t\t\tgl_panel_2\n\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t.addComponent(label_9)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(scrollPane_2, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t339, Short.MAX_VALUE).addContainerGap()));\n\n\t\tsaleLatelyjList = new JList();\n\t\tscrollPane_2.setViewportView(saleLatelyjList);\n\t\tpanel_2.setLayout(gl_panel_2);\n\n\t\tJLabel label_22 = new JLabel(\"宽度:\");\n\t\tlabel_22.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\t\tlabel_22.setBounds(924, 181, 56, 15);\n\t\tcontentPane.add(label_22);\n\n\t\tJPanel panel_3 = new JPanel();\n\t\tpanel_3.setBorder(new TitledBorder(null, \"\\u8D27\\u7269\\u4FE1\\u606F\",\n\t\t\t\tTitledBorder.LEADING, TitledBorder.TOP, null, null));\n\t\tpanel_3.setBounds(199, 228, 480, 260);\n\t\tcontentPane.add(panel_3);\n\t\tpanel_3.setLayout(null);\n\n\t\tJLabel label_2 = new JLabel(\"窗帘布:\");\n\t\tlabel_2.setBounds(5, 88, 56, 15);\n\t\tpanel_3.add(label_2);\n\t\tlabel_2.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\n\t\tJLabel lblNewLabel = new JLabel(\"布带:\");\n\t\tlblNewLabel.setBounds(5, 119, 56, 15);\n\t\tpanel_3.add(lblNewLabel);\n\t\tlblNewLabel.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\n\t\tJLabel label_16 = new JLabel(\"花边:\");\n\t\tlabel_16.setBounds(5, 147, 56, 15);\n\t\tpanel_3.add(label_16);\n\t\tlabel_16.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\n\t\tJLabel label_19 = new JLabel(\"窗帘圈:\");\n\t\tlabel_19.setBounds(5, 175, 56, 15);\n\t\tpanel_3.add(label_19);\n\t\tlabel_19.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\n\t\tJLabel label_13 = new JLabel(\"窗帘杆:\");\n\t\tlabel_13.setBounds(5, 205, 56, 15);\n\t\tpanel_3.add(label_13);\n\t\tlabel_13.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\n\t\tcurtainRodName = new JTextField();\n\t\tcurtainRodName.setBounds(66, 199, 130, 21);\n\t\tpanel_3.add(curtainRodName);\n\t\tcurtainRodName.setEditable(false);\n\t\tcurtainRodMA = new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\treBuildGoodLst(\"C-杆\");\n\t\t\t}\n\t\t};\n\t\tcurtainRodName.addMouseListener(curtainRodMA);\n\t\tcurtainRodName.setColumns(10);\n\n\t\tcurtainRingName = new JTextField();\n\t\tcurtainRingName.setBounds(66, 169, 130, 21);\n\t\tpanel_3.add(curtainRingName);\n\t\tcurtainRingName.setEditable(false);\n\t\tcurtainRingMA = new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\treBuildGoodLst(\"C-孔\");\n\t\t\t}\n\t\t};\n\t\tcurtainRingName.addMouseListener(curtainRingMA);\n\t\tcurtainRingName.setColumns(10);\n\n\t\tcurtainLaceName = new JTextField();\n\t\tcurtainLaceName.setBounds(66, 141, 130, 21);\n\t\tpanel_3.add(curtainLaceName);\n\t\tcurtainLaceName.setEditable(false);\n\t\tcurtainLaceMA = new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\treBuildGoodLst(\"C-花边\");\n\t\t\t}\n\t\t};\n\t\tcurtainLaceName.addMouseListener(curtainLaceMA);\n\t\tcurtainLaceName.setColumns(10);\n\n\t\tcurtainTapeName = new JTextField();\n\t\tcurtainTapeName.setBounds(66, 113, 130, 21);\n\t\tpanel_3.add(curtainTapeName);\n\t\tcurtainTapeName.setEditable(false);\n\t\tcurtainTapeMA = new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\treBuildGoodLst(\"C-布带\");\n\t\t\t}\n\t\t};\n\t\tcurtainTapeName.addMouseListener(curtainTapeMA);\n\t\tcurtainTapeName.setColumns(10);\n\n\t\tcurtainClothName = new JTextField();\n\t\tcurtainClothName.setBounds(66, 82, 130, 21);\n\t\tpanel_3.add(curtainClothName);\n\t\tcurtainClothName.setEditable(false);\n\t\tcurtainClothMA = new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\treBuildGoodLst(\"A-\");\n\t\t\t}\n\t\t};\n\t\tcurtainClothName.addMouseListener(curtainClothMA);\n\t\tcurtainClothName.setColumns(10);\n\n\t\tJLabel label_4 = new JLabel(\"价格:\");\n\t\tlabel_4.setBounds(201, 88, 45, 15);\n\t\tpanel_3.add(label_4);\n\t\tlabel_4.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\n\t\tJLabel label_10 = new JLabel(\"价格:\");\n\t\tlabel_10.setBounds(201, 119, 45, 15);\n\t\tpanel_3.add(label_10);\n\t\tlabel_10.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\n\t\tJLabel label_17 = new JLabel(\"价格:\");\n\t\tlabel_17.setBounds(201, 147, 45, 15);\n\t\tpanel_3.add(label_17);\n\t\tlabel_17.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\n\t\tJLabel label_20 = new JLabel(\"价格:\");\n\t\tlabel_20.setBounds(201, 175, 45, 15);\n\t\tpanel_3.add(label_20);\n\t\tlabel_20.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\n\t\tJLabel label_14 = new JLabel(\"价格:\");\n\t\tlabel_14.setBounds(201, 205, 45, 15);\n\t\tpanel_3.add(label_14);\n\t\tlabel_14.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\n\t\tcurtainRodPrice = new JTextField();\n\t\tcurtainRodPrice.setBounds(251, 199, 38, 21);\n\t\tpanel_3.add(curtainRodPrice);\n\t\tcurtainRodPrice.setColumns(10);\n\n\t\tcurtainRingPrice = new JTextField();\n\t\tcurtainRingPrice.setBounds(251, 169, 38, 21);\n\t\tpanel_3.add(curtainRingPrice);\n\t\tcurtainRingPrice.setColumns(10);\n\n\t\tcurtainLacePrice = new JTextField();\n\t\tcurtainLacePrice.setBounds(251, 141, 38, 21);\n\t\tpanel_3.add(curtainLacePrice);\n\t\tcurtainLacePrice.setColumns(10);\n\n\t\tcurtainTapePrice = new JTextField();\n\t\tcurtainTapePrice.setBounds(251, 113, 38, 21);\n\t\tpanel_3.add(curtainTapePrice);\n\t\tcurtainTapePrice.setColumns(10);\n\n\t\tcurtainClothPrice = new JTextField();\n\t\tcurtainClothPrice.setBounds(251, 82, 38, 21);\n\t\tpanel_3.add(curtainClothPrice);\n\t\tcurtainClothPrice.setColumns(10);\n\n\t\tJLabel label_15 = new JLabel(\"备注:\");\n\t\tlabel_15.setBounds(294, 205, 45, 15);\n\t\tpanel_3.add(label_15);\n\t\tlabel_15.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\n\t\tJLabel label_21 = new JLabel(\"备注:\");\n\t\tlabel_21.setBounds(294, 175, 45, 15);\n\t\tpanel_3.add(label_21);\n\t\tlabel_21.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\n\t\tJLabel label_18 = new JLabel(\"备注:\");\n\t\tlabel_18.setBounds(294, 147, 45, 15);\n\t\tpanel_3.add(label_18);\n\t\tlabel_18.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\n\t\tJLabel label_12 = new JLabel(\"备注:\");\n\t\tlabel_12.setBounds(294, 119, 45, 15);\n\t\tpanel_3.add(label_12);\n\t\tlabel_12.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\n\t\tJLabel label_11 = new JLabel(\"备注:\");\n\t\tlabel_11.setBounds(294, 88, 45, 15);\n\t\tpanel_3.add(label_11);\n\t\tlabel_11.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\n\t\tcurtainClothRemark = new JTextField();\n\t\tcurtainClothRemark.setBounds(344, 82, 120, 21);\n\t\tpanel_3.add(curtainClothRemark);\n\t\tcurtainClothRemark.setColumns(10);\n\n\t\tcurtainTapeRemark = new JTextField();\n\t\tcurtainTapeRemark.setBounds(344, 113, 120, 21);\n\t\tpanel_3.add(curtainTapeRemark);\n\t\tcurtainTapeRemark.setColumns(10);\n\n\t\tcurtainLaceRemark = new JTextField();\n\t\tcurtainLaceRemark.setBounds(344, 141, 120, 21);\n\t\tpanel_3.add(curtainLaceRemark);\n\t\tcurtainLaceRemark.setColumns(10);\n\n\t\tcurtainRingRemark = new JTextField();\n\t\tcurtainRingRemark.setBounds(344, 169, 120, 21);\n\t\tpanel_3.add(curtainRingRemark);\n\t\tcurtainRingRemark.setColumns(10);\n\n\t\tcurtainRodRemark = new JTextField();\n\t\tcurtainRodRemark.setBounds(344, 199, 120, 21);\n\t\tpanel_3.add(curtainRodRemark);\n\t\tcurtainRodRemark.setColumns(10);\n\n\t\tJButton curtainDelBtn = new JButton(\"删除\");\n\t\tcurtainDelBtn.setBounds(71, 230, 67, 23);\n\t\tpanel_3.add(curtainDelBtn);\n\t\tcurtainDelBtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}\n\t\t});\n\t\tcurtainDelBtn.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\n\t\tJButton curtainModifyBtn = new JButton(\"修改\");\n\t\tcurtainModifyBtn.setBounds(148, 230, 67, 23);\n\t\tpanel_3.add(curtainModifyBtn);\n\t\tcurtainModifyBtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcurtainModifyAction(e);\n\t\t\t}\n\t\t});\n\t\tcurtainModifyBtn.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\n\t\taddCurtainGood = new JButton(\"添加货物\");\n\t\taddCurtainGood.setBounds(239, 230, 100, 23);\n\t\tpanel_3.add(addCurtainGood);\n\t\taddCurtainGood.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif (currentSol.getCustomer() != null) {\n\t\t\t\t\taddCurtainGoodActionPerformed(e);\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"请先输入用户信息\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\taddCurtainGood.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\n\t\tcurtainStyleCB = new JComboBox();\n\t\tcurtainStyleCB.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tcurtainStyleAction(e);\n\t\t\t}\n\t\t});\n\t\tcurtainStyleCB.setBounds(21, 22, 98, 21);\n\t\tpanel_3.add(curtainStyleCB);\n\t\tcurtainStyleCB.setModel(new DefaultComboBoxModel(new String[] {\n\t\t\t\t\"打孔*1.7\", \"挂钩*1.5\", \"挂钩+0.5\", \"卷帘\" }));\n\n\t\tcurtainWidth = new JTextField();\n\t\tcurtainWidth.setBounds(69, 57, 70, 21);\n\t\tpanel_3.add(curtainWidth);\n\t\tcurtainWidth.setColumns(10);\n\n\t\tJLabel label_5 = new JLabel(\"安装位置:\");\n\t\tlabel_5.setBounds(140, 25, 75, 15);\n\t\tpanel_3.add(label_5);\n\t\tlabel_5.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\n\t\thightLocationCB = new JComboBox();\n\t\thightLocationCB.setBounds(305, 57, 79, 21);\n\t\tpanel_3.add(hightLocationCB);\n\t\thightLocationCB.setModel(new DefaultComboBoxModel(new String[] {\n\t\t\t\t\"高度位置\", \"顶高\", \"总高\", \"杆到地\", \"顶装\" }));\n\t\thightLocationCB.setToolTipText(\"\");\n\n\t\tcurtainLocationCB = new JComboBox();\n\t\tcurtainLocationCB.setModel(new DefaultComboBoxModel(new String[] {\n\t\t\t\t\"请选择\", \"客厅\", \"阳台\", \"主卧\", \"次卧\", \"后卧\", \"餐厅\", \"厨房\", \"卫生间\" }));\n\t\tcurtainLocationCB.setBounds(236, 22, 70, 21);\n\t\tpanel_3.add(curtainLocationCB);\n\t\tcurtainLocationCB.setToolTipText(\"\");\n\n\t\tcurtainLocation = new JTextField();\n\t\tcurtainLocation.setBounds(327, 22, 130, 21);\n\t\tpanel_3.add(curtainLocation);\n\t\tcurtainLocation.setColumns(10);\n\n\t\tcurtainHight = new JTextField();\n\t\tcurtainHight.setBounds(396, 57, 70, 21);\n\t\tpanel_3.add(curtainHight);\n\t\tcurtainHight.setColumns(10);\n\n\t\tJLabel label_23 = new JLabel(\"宽度:\");\n\t\tlabel_23.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\t\tlabel_23.setBounds(12, 59, 45, 15);\n\t\tpanel_3.add(label_23);\n\n\t\trodWidth = new JTextField();\n\t\trodWidth.setColumns(10);\n\t\trodWidth.setBounds(223, 57, 70, 21);\n\t\tpanel_3.add(rodWidth);\n\n\t\tJLabel label_24 = new JLabel(\"杆增加:\");\n\t\tlabel_24.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\t\tlabel_24.setBounds(151, 59, 60, 15);\n\t\tpanel_3.add(label_24);\n\n\t\tJButton submitBtn = new JButton(\"提交订单\");\n\t\tsubmitBtn.setBounds(364, 227, 100, 23);\n\t\tpanel_3.add(submitBtn);\n\t\tsubmitBtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tsubmitAction(e);\n\t\t\t}\n\t\t});\n\t\tsubmitBtn.setFont(new Font(\"宋体\", Font.PLAIN, 14));\n\n\t\tnameLab = new JLabel(\"\");\n\t\tnameLab.setFont(new Font(\"宋体\", Font.PLAIN, 13));\n\t\tnameLab.setBounds(209, 135, 470, 20);\n\t\tcontentPane.add(nameLab);\n\n\t\tadrLab = new JLabel(\"\");\n\t\tadrLab.setFont(new Font(\"宋体\", Font.PLAIN, 13));\n\t\tadrLab.setBounds(209, 165, 470, 20);\n\t\tcontentPane.add(adrLab);\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\r\n private void initComponents() {\r\n\r\n center_panel = new javax.swing.JPanel();\r\n jScrollPane2 = new javax.swing.JScrollPane();\r\n txt_area = new javax.swing.JTextArea();\r\n west_panel = new javax.swing.JPanel();\r\n jScrollPane1 = new javax.swing.JScrollPane();\r\n jList1 = new javax.swing.JList<>();\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\r\n\r\n txt_area.setColumns(20);\r\n txt_area.setRows(5);\r\n jScrollPane2.setViewportView(txt_area);\r\n\r\n javax.swing.GroupLayout center_panelLayout = new javax.swing.GroupLayout(center_panel);\r\n center_panel.setLayout(center_panelLayout);\r\n center_panelLayout.setHorizontalGroup(\r\n center_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(center_panelLayout.createSequentialGroup()\r\n .addContainerGap()\r\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 631, Short.MAX_VALUE)\r\n .addContainerGap())\r\n );\r\n center_panelLayout.setVerticalGroup(\r\n center_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(center_panelLayout.createSequentialGroup()\r\n .addContainerGap()\r\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 408, Short.MAX_VALUE)\r\n .addContainerGap())\r\n );\r\n\r\n jList1.setModel(new javax.swing.AbstractListModel<String>() {\r\n String[] strings = { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\", \"Item 5\" };\r\n public int getSize() { return strings.length; }\r\n public String getElementAt(int i) { return strings[i]; }\r\n });\r\n jScrollPane1.setViewportView(jList1);\r\n\r\n javax.swing.GroupLayout west_panelLayout = new javax.swing.GroupLayout(west_panel);\r\n west_panel.setLayout(west_panelLayout);\r\n west_panelLayout.setHorizontalGroup(\r\n west_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(west_panelLayout.createSequentialGroup()\r\n .addGap(10, 10, 10)\r\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 99, Short.MAX_VALUE)\r\n .addContainerGap())\r\n );\r\n west_panelLayout.setVerticalGroup(\r\n west_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, west_panelLayout.createSequentialGroup()\r\n .addContainerGap()\r\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 408, Short.MAX_VALUE)\r\n .addContainerGap())\r\n );\r\n\r\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\r\n getContentPane().setLayout(layout);\r\n layout.setHorizontalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGap(0, 770, Short.MAX_VALUE)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addGap(0, 0, Short.MAX_VALUE)\r\n .addComponent(west_panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(0, 0, 0)\r\n .addComponent(center_panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(0, 0, Short.MAX_VALUE)))\r\n );\r\n layout.setVerticalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGap(0, 430, Short.MAX_VALUE)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addGap(0, 0, Short.MAX_VALUE)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(west_panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(center_panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(0, 0, Short.MAX_VALUE)))\r\n );\r\n\r\n pack();\r\n }",
"private void initComponents() {\n panel1 = new JPanel();\n panel2 = new JPanel();\n answerList = new ArrayList();\n\n //======== this ========\n setTitle(\"Result\");\n setMinimumSize(new Dimension(600, 400));\n setResizable(false);\n addWindowListener(new WindowAdapter() {\n @Override\n public void windowOpened(WindowEvent e) {\n thisWindowOpened(e);\n }\n });\n Container contentPane = getContentPane();\n\n //======== panel1 ========\n {\n panel1.setBorder ( new javax . swing. border .CompoundBorder ( new javax . swing. border .TitledBorder ( new javax . swing.\n border .EmptyBorder ( 0, 0 ,0 , 0) , \"JF\\u006frmD\\u0065sig\\u006eer \\u0045val\\u0075ati\\u006fn\" , javax. swing .border . TitledBorder. CENTER\n ,javax . swing. border .TitledBorder . BOTTOM, new java. awt .Font ( \"Dia\\u006cog\", java .awt . Font\n . BOLD ,12 ) ,java . awt. Color .red ) ,panel1. getBorder () ) ); panel1. addPropertyChangeListener(\n new java. beans .PropertyChangeListener ( ){ @Override public void propertyChange (java . beans. PropertyChangeEvent e) { if( \"\\u0062ord\\u0065r\"\n .equals ( e. getPropertyName () ) )throw new RuntimeException( ) ;} } );\n\n GroupLayout panel1Layout = new GroupLayout(panel1);\n panel1.setLayout(panel1Layout);\n panel1Layout.setHorizontalGroup(\n panel1Layout.createParallelGroup()\n .addGap(0, 375, Short.MAX_VALUE)\n );\n panel1Layout.setVerticalGroup(\n panel1Layout.createParallelGroup()\n .addGap(0, 228, Short.MAX_VALUE)\n );\n }\n\n //======== panel2 ========\n {\n\n GroupLayout panel2Layout = new GroupLayout(panel2);\n panel2.setLayout(panel2Layout);\n panel2Layout.setHorizontalGroup(\n panel2Layout.createParallelGroup()\n .addGap(0, 577, Short.MAX_VALUE)\n );\n panel2Layout.setVerticalGroup(\n panel2Layout.createParallelGroup()\n .addGap(0, 244, Short.MAX_VALUE)\n );\n }\n\n GroupLayout contentPaneLayout = new GroupLayout(contentPane);\n contentPane.setLayout(contentPaneLayout);\n contentPaneLayout.setHorizontalGroup(\n contentPaneLayout.createParallelGroup()\n .addGroup(GroupLayout.Alignment.TRAILING, contentPaneLayout.createSequentialGroup()\n .addContainerGap(144, Short.MAX_VALUE)\n .addComponent(panel1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n .addGap(161, 161, 161))\n .addGroup(contentPaneLayout.createSequentialGroup()\n .addGap(42, 42, 42)\n .addComponent(panel2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n .addContainerGap(61, Short.MAX_VALUE))\n );\n contentPaneLayout.setVerticalGroup(\n contentPaneLayout.createParallelGroup()\n .addGroup(contentPaneLayout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addComponent(panel1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n .addGap(29, 29, 29)\n .addComponent(panel2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n .addContainerGap(34, Short.MAX_VALUE))\n );\n setSize(700, 600);\n setLocationRelativeTo(null);\n // JFormDesigner - End of component initialization //GEN-END:initComponents\n }",
"private void $$$setupUI$$$() {\n createUIComponents();\n panel1 = new JPanel();\n panel1.setLayout(new BorderLayout(0, 0));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridBagLayout());\n panel1.add(panel2, BorderLayout.CENTER);\n titelPanel = new JPanel();\n titelPanel.setLayout(new GridBagLayout());\n GridBagConstraints gbc;\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.anchor = GridBagConstraints.NORTH;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.insets = new Insets(10, 10, 20, 10);\n panel2.add(titelPanel, gbc);\n lblNachnameVorname = new JLabel();\n Font lblNachnameVornameFont = this.$$$getFont$$$(null, -1, 36, lblNachnameVorname.getFont());\n if (lblNachnameVornameFont != null) lblNachnameVorname.setFont(lblNachnameVornameFont);\n lblNachnameVorname.setText(\"Nachname Vorname\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.anchor = GridBagConstraints.WEST;\n titelPanel.add(lblNachnameVorname, gbc);\n final JPanel spacer1 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n titelPanel.add(spacer1, gbc);\n datenPanel = new JPanel();\n datenPanel.setLayout(new GridBagLayout());\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 1;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.fill = GridBagConstraints.BOTH;\n panel2.add(datenPanel, gbc);\n final JScrollPane scrollPane1 = new JScrollPane();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.fill = GridBagConstraints.BOTH;\n datenPanel.add(scrollPane1, gbc);\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridBagLayout());\n scrollPane1.setViewportView(panel3);\n rechnungsempfaengerPanel = new JPanel();\n rechnungsempfaengerPanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.anchor = GridBagConstraints.NORTH;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.insets = new Insets(10, 10, 10, 10);\n panel3.add(rechnungsempfaengerPanel, gbc);\n rechnungsempfaengerPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), \"Rechungsempfänger\", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, this.$$$getFont$$$(null, Font.BOLD, -1, rechnungsempfaengerPanel.getFont()), null));\n final JPanel panel4 = new JPanel();\n panel4.setLayout(new GridBagLayout());\n rechnungsempfaengerPanel.add(panel4, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Name:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n panel4.add(label1, gbc);\n final JPanel spacer2 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel4.add(spacer2, gbc);\n final JPanel spacer3 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 2;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel4.add(spacer3, gbc);\n final JPanel spacer4 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel4.add(spacer4, gbc);\n final JPanel spacer5 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel4.add(spacer5, gbc);\n final JPanel spacer6 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 150;\n panel4.add(spacer6, gbc);\n final JPanel spacer7 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel4.add(spacer7, gbc);\n lblName = new JLabel();\n lblName.setText(\"lblName\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n panel4.add(lblName, gbc);\n final JLabel label2 = new JLabel();\n label2.setText(\"Strasse / Nr.:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 3;\n gbc.anchor = GridBagConstraints.WEST;\n panel4.add(label2, gbc);\n lblStrasseNr = new JLabel();\n lblStrasseNr.setText(\"lblStrasseNr\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 3;\n gbc.anchor = GridBagConstraints.WEST;\n panel4.add(lblStrasseNr, gbc);\n final JPanel spacer8 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 4;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel4.add(spacer8, gbc);\n final JLabel label3 = new JLabel();\n label3.setText(\"PLZ / Ort:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 5;\n gbc.anchor = GridBagConstraints.WEST;\n panel4.add(label3, gbc);\n lblPlzOrt = new JLabel();\n lblPlzOrt.setText(\"lblPlzOrt\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 5;\n gbc.anchor = GridBagConstraints.WEST;\n panel4.add(lblPlzOrt, gbc);\n final JPanel spacer9 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 6;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel4.add(spacer9, gbc);\n final JPanel panel5 = new JPanel();\n panel5.setLayout(new GridBagLayout());\n rechnungsempfaengerPanel.add(panel5, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label4 = new JLabel();\n label4.setText(\"Festnetz:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n panel5.add(label4, gbc);\n final JPanel spacer10 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 4;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel5.add(spacer10, gbc);\n final JPanel spacer11 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 2;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel5.add(spacer11, gbc);\n final JPanel spacer12 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel5.add(spacer12, gbc);\n lblFestnetz = new JLabel();\n lblFestnetz.setText(\"lblFestnetz\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n panel5.add(lblFestnetz, gbc);\n final JPanel spacer13 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 150;\n panel5.add(spacer13, gbc);\n final JPanel spacer14 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel5.add(spacer14, gbc);\n final JPanel spacer15 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel5.add(spacer15, gbc);\n final JLabel label5 = new JLabel();\n label5.setText(\"Natel:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 3;\n gbc.anchor = GridBagConstraints.WEST;\n panel5.add(label5, gbc);\n lblNatel = new JLabel();\n lblNatel.setText(\"lblNatel\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 3;\n gbc.anchor = GridBagConstraints.WEST;\n panel5.add(lblNatel, gbc);\n final JPanel spacer16 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 4;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel5.add(spacer16, gbc);\n final JLabel label6 = new JLabel();\n label6.setText(\"E-Mail:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 5;\n gbc.anchor = GridBagConstraints.WEST;\n panel5.add(label6, gbc);\n final JPanel spacer17 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 6;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel5.add(spacer17, gbc);\n final JPanel panel6 = new JPanel();\n panel6.setLayout(new GridBagLayout());\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 6;\n gbc.fill = GridBagConstraints.BOTH;\n panel5.add(panel6, gbc);\n final JPanel spacer18 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel6.add(spacer18, gbc);\n lblEmail = new JLabel();\n lblEmail.setText(\"lblEmail\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 5;\n gbc.anchor = GridBagConstraints.WEST;\n panel5.add(lblEmail, gbc);\n final JPanel panel7 = new JPanel();\n panel7.setLayout(new GridBagLayout());\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 0;\n gbc.gridheight = 7;\n gbc.fill = GridBagConstraints.BOTH;\n panel5.add(panel7, gbc);\n btnEmail = new JButton();\n btnEmail.setText(\"E-Mail\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel7.add(btnEmail, gbc);\n final JPanel spacer19 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 2;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel7.add(spacer19, gbc);\n final JPanel spacer20 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.weighty = 1.0;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel7.add(spacer20, gbc);\n schuelerKurseVorrechnungPanel = new JPanel();\n schuelerKurseVorrechnungPanel.setLayout(new GridBagLayout());\n schuelerKurseVorrechnungPanel.setForeground(new Color(-16776961));\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 1;\n gbc.weightx = 1.0;\n gbc.anchor = GridBagConstraints.NORTH;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.insets = new Insets(0, 10, 10, 10);\n panel3.add(schuelerKurseVorrechnungPanel, gbc);\n schuelerKurseVorrechnungPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), \"Schüler / Kurse vorhergehendes Semester (ohne Abmeldungen)\", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, this.$$$getFont$$$(null, Font.BOLD, -1, schuelerKurseVorrechnungPanel.getFont()), null));\n lblSchuelersVorrechnung = new JLabel();\n lblSchuelersVorrechnung.setText(\"lblSchuelersVorrechnung\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n schuelerKurseVorrechnungPanel.add(lblSchuelersVorrechnung, gbc);\n final JPanel spacer21 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n schuelerKurseVorrechnungPanel.add(spacer21, gbc);\n final JPanel spacer22 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 2;\n gbc.fill = GridBagConstraints.VERTICAL;\n schuelerKurseVorrechnungPanel.add(spacer22, gbc);\n final JPanel spacer23 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n schuelerKurseVorrechnungPanel.add(spacer23, gbc);\n final JPanel spacer24 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 350;\n schuelerKurseVorrechnungPanel.add(spacer24, gbc);\n final JPanel spacer25 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.VERTICAL;\n schuelerKurseVorrechnungPanel.add(spacer25, gbc);\n lblKurseVorrechnung = new JLabel();\n lblKurseVorrechnung.setText(\"lblKurseVorrechnung\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n schuelerKurseVorrechnungPanel.add(lblKurseVorrechnung, gbc);\n final JPanel spacer26 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n schuelerKurseVorrechnungPanel.add(spacer26, gbc);\n vorrechnungPanel = new JPanel();\n vorrechnungPanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 2;\n gbc.fill = GridBagConstraints.BOTH;\n gbc.insets = new Insets(0, 10, 10, 10);\n panel3.add(vorrechnungPanel, gbc);\n vorrechnungPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), \"Vorrechnung\", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, this.$$$getFont$$$(null, Font.BOLD, -1, vorrechnungPanel.getFont()), null));\n final JPanel panel8 = new JPanel();\n panel8.setLayout(new GridBagLayout());\n vorrechnungPanel.add(panel8, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JPanel spacer27 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 150;\n panel8.add(spacer27, gbc);\n final JPanel spacer28 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 60;\n panel8.add(spacer28, gbc);\n final JLabel label7 = new JLabel();\n label7.setText(\"Ermässigung:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 4;\n gbc.anchor = GridBagConstraints.WEST;\n panel8.add(label7, gbc);\n txtErmaessigungVorrechnung = new JTextField();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 4;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel8.add(txtErmaessigungVorrechnung, gbc);\n final JPanel spacer29 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 5;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel8.add(spacer29, gbc);\n final JPanel spacer30 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 4;\n gbc.gridy = 0;\n gbc.gridwidth = 4;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel8.add(spacer30, gbc);\n final JPanel spacer31 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 8;\n gbc.gridy = 4;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel8.add(spacer31, gbc);\n final JPanel spacer32 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 4;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel8.add(spacer32, gbc);\n errLblErmaessigungVorrechnung = new JLabel();\n errLblErmaessigungVorrechnung.setText(\"errErmaessV\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 3;\n gbc.gridwidth = 6;\n gbc.anchor = GridBagConstraints.WEST;\n panel8.add(errLblErmaessigungVorrechnung, gbc);\n final JLabel label8 = new JLabel();\n label8.setText(\"Zuschlag:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 6;\n gbc.anchor = GridBagConstraints.WEST;\n panel8.add(label8, gbc);\n txtZuschlagVorrechnung = new JTextField();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 6;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel8.add(txtZuschlagVorrechnung, gbc);\n errLblZuschlagVorrechnung = new JLabel();\n errLblZuschlagVorrechnung.setText(\"errZuschlV\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 5;\n gbc.gridwidth = 6;\n gbc.anchor = GridBagConstraints.WEST;\n panel8.add(errLblZuschlagVorrechnung, gbc);\n final JPanel spacer33 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel8.add(spacer33, gbc);\n final JPanel panel9 = new JPanel();\n panel9.setLayout(new GridBagLayout());\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 7;\n gbc.gridwidth = 7;\n gbc.gridheight = 2;\n gbc.fill = GridBagConstraints.BOTH;\n panel8.add(panel9, gbc);\n final JPanel spacer34 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 3;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 30;\n panel9.add(spacer34, gbc);\n txtAnzahlWochenVorrechnung = new JTextField();\n txtAnzahlWochenVorrechnung.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel9.add(txtAnzahlWochenVorrechnung, gbc);\n final JLabel label9 = new JLabel();\n label9.setText(\"x\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 10, 0, 10);\n panel9.add(label9, gbc);\n final JPanel spacer35 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 3;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 60;\n panel9.add(spacer35, gbc);\n txtWochenbetragVorrechnung = new JTextField();\n txtWochenbetragVorrechnung.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel9.add(txtWochenbetragVorrechnung, gbc);\n lblMalRabattFaktorVorrechnung = new JLabel();\n lblMalRabattFaktorVorrechnung.setText(\"x\");\n gbc = new GridBagConstraints();\n gbc.gridx = 4;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 10, 0, 10);\n panel9.add(lblMalRabattFaktorVorrechnung, gbc);\n lblRabattFaktorVorrechnung = new JLabel();\n lblRabattFaktorVorrechnung.setText(\"Rabatt\");\n gbc = new GridBagConstraints();\n gbc.gridx = 5;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n panel9.add(lblRabattFaktorVorrechnung, gbc);\n final JLabel label10 = new JLabel();\n label10.setText(\"=\");\n gbc = new GridBagConstraints();\n gbc.gridx = 10;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 10, 0, 10);\n panel9.add(label10, gbc);\n lblRechnungsbetragVorrechnung = new JLabel();\n Font lblRechnungsbetragVorrechnungFont = this.$$$getFont$$$(null, Font.BOLD, -1, lblRechnungsbetragVorrechnung.getFont());\n if (lblRechnungsbetragVorrechnungFont != null)\n lblRechnungsbetragVorrechnung.setFont(lblRechnungsbetragVorrechnungFont);\n lblRechnungsbetragVorrechnung.setForeground(new Color(-16776961));\n lblRechnungsbetragVorrechnung.setText(\"Rechnungsbetrag\");\n gbc = new GridBagConstraints();\n gbc.gridx = 11;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n panel9.add(lblRechnungsbetragVorrechnung, gbc);\n final JPanel spacer36 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 12;\n gbc.gridy = 1;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel9.add(spacer36, gbc);\n final JPanel spacer37 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 3;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel9.add(spacer37, gbc);\n errLblAnzahlWochenVorrechnung = new JLabel();\n errLblAnzahlWochenVorrechnung.setText(\"errAnz\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.gridwidth = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel9.add(errLblAnzahlWochenVorrechnung, gbc);\n final JLabel label11 = new JLabel();\n Font label11Font = this.$$$getFont$$$(null, Font.BOLD, -1, label11.getFont());\n if (label11Font != null) label11.setFont(label11Font);\n label11.setForeground(new Color(-16776961));\n label11.setText(\"Rechnungsbetrag:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n panel9.add(label11, gbc);\n final JPanel spacer38 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 3;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 150;\n panel9.add(spacer38, gbc);\n final JPanel spacer39 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel9.add(spacer39, gbc);\n errLblWochenbetragVorrechnung = new JLabel();\n errLblWochenbetragVorrechnung.setText(\"errWochenb\");\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 0;\n gbc.gridwidth = 10;\n gbc.anchor = GridBagConstraints.WEST;\n panel9.add(errLblWochenbetragVorrechnung, gbc);\n final JLabel label12 = new JLabel();\n label12.setText(\"Anz.\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel9.add(label12, gbc);\n final JLabel label13 = new JLabel();\n label13.setText(\"Wochenb.\");\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel9.add(label13, gbc);\n final JLabel label14 = new JLabel();\n label14.setText(\"-\");\n gbc = new GridBagConstraints();\n gbc.gridx = 6;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 10, 0, 10);\n panel9.add(label14, gbc);\n lblErmaessigungVorrechnung = new JLabel();\n lblErmaessigungVorrechnung.setText(\"Erm\");\n gbc = new GridBagConstraints();\n gbc.gridx = 7;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n panel9.add(lblErmaessigungVorrechnung, gbc);\n final JLabel label15 = new JLabel();\n label15.setText(\"+\");\n gbc = new GridBagConstraints();\n gbc.gridx = 8;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 10, 0, 10);\n panel9.add(label15, gbc);\n lblZuschlagVorrechnung = new JLabel();\n lblZuschlagVorrechnung.setText(\"Zus\");\n gbc = new GridBagConstraints();\n gbc.gridx = 9;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n panel9.add(lblZuschlagVorrechnung, gbc);\n final JLabel label16 = new JLabel();\n label16.setText(\"Zuschl.\");\n gbc = new GridBagConstraints();\n gbc.gridx = 9;\n gbc.gridy = 2;\n gbc.gridwidth = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel9.add(label16, gbc);\n final JLabel label17 = new JLabel();\n label17.setText(\"Ermäss.\");\n gbc = new GridBagConstraints();\n gbc.gridx = 7;\n gbc.gridy = 2;\n gbc.gridwidth = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel9.add(label17, gbc);\n final JPanel spacer40 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 7;\n gbc.gridy = 3;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 40;\n panel9.add(spacer40, gbc);\n final JPanel spacer41 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 9;\n gbc.gridy = 3;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 40;\n panel9.add(spacer41, gbc);\n final JLabel label18 = new JLabel();\n label18.setText(\"Rechnungsdatum:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel8.add(label18, gbc);\n txtRechnungsdatumVorrechnung = new JTextField();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 2;\n gbc.gridwidth = 2;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel8.add(txtRechnungsdatumVorrechnung, gbc);\n errLblRechnungsdatumVorrechnung = new JLabel();\n errLblRechnungsdatumVorrechnung.setText(\"errDatumV\\n\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 1;\n gbc.gridwidth = 6;\n gbc.anchor = GridBagConstraints.WEST;\n panel8.add(errLblRechnungsdatumVorrechnung, gbc);\n final JPanel spacer42 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 3;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel8.add(spacer42, gbc);\n final JPanel spacer43 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 30;\n panel8.add(spacer43, gbc);\n final JPanel panel10 = new JPanel();\n panel10.setLayout(new GridBagLayout());\n vorrechnungPanel.add(panel10, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JPanel spacer44 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 8;\n gbc.gridy = 6;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel10.add(spacer44, gbc);\n final JPanel spacer45 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 150;\n panel10.add(spacer45, gbc);\n final JPanel spacer46 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel10.add(spacer46, gbc);\n final JPanel spacer47 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 4;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel10.add(spacer47, gbc);\n final JPanel spacer48 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 6;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel10.add(spacer48, gbc);\n final JPanel panel11 = new JPanel();\n panel11.setLayout(new GridBagLayout());\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 7;\n gbc.gridwidth = 7;\n gbc.fill = GridBagConstraints.BOTH;\n panel10.add(panel11, gbc);\n btnWochenbetragVorrechnung = new JButton();\n btnWochenbetragVorrechnung.setMaximumSize(new Dimension(222, 29));\n btnWochenbetragVorrechnung.setMinimumSize(new Dimension(222, 29));\n btnWochenbetragVorrechnung.setPreferredSize(new Dimension(222, 29));\n btnWochenbetragVorrechnung.setText(\"Wochenbetrag berechnen\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel11.add(btnWochenbetragVorrechnung, gbc);\n final JPanel spacer49 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel11.add(spacer49, gbc);\n final JPanel spacer50 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel11.add(spacer50, gbc);\n final JLabel label19 = new JLabel();\n label19.setText(\"Grund:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 3;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 0, 15);\n panel10.add(label19, gbc);\n txtErmaessigungsgrundVorrechnung = new JTextField();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 3;\n gbc.gridwidth = 6;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel10.add(txtErmaessigungsgrundVorrechnung, gbc);\n final JLabel label20 = new JLabel();\n label20.setText(\"Grund:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 5;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 0, 15);\n panel10.add(label20, gbc);\n errLblErmaessigungsgrundVorrechnung = new JLabel();\n errLblErmaessigungsgrundVorrechnung.setText(\"errLblErmaessigungsgrundVorrechnung\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 2;\n gbc.gridwidth = 6;\n gbc.anchor = GridBagConstraints.WEST;\n panel10.add(errLblErmaessigungsgrundVorrechnung, gbc);\n final JLabel label21 = new JLabel();\n label21.setText(\"6-Jahres-Rabatt:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n panel10.add(label21, gbc);\n final JPanel spacer51 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 2;\n gbc.fill = GridBagConstraints.VERTICAL;\n gbc.ipady = 6;\n panel10.add(spacer51, gbc);\n lblSechsJahresRabattVorrechnung = new JLabel();\n lblSechsJahresRabattVorrechnung.setText(\"lblSechsJahresRabattVorrechnung\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 1;\n gbc.gridwidth = 6;\n gbc.anchor = GridBagConstraints.WEST;\n panel10.add(lblSechsJahresRabattVorrechnung, gbc);\n final JPanel spacer52 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 6;\n gbc.weighty = 1.0;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel10.add(spacer52, gbc);\n txtZuschlagsgrundVorrechnung = new JTextField();\n txtZuschlagsgrundVorrechnung.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 5;\n gbc.gridwidth = 6;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel10.add(txtZuschlagsgrundVorrechnung, gbc);\n errLblZuschlagsgrundVorrechnung = new JLabel();\n errLblZuschlagsgrundVorrechnung.setText(\"errLblZuschlagsgrundVorrechnung\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 4;\n gbc.gridwidth = 6;\n gbc.anchor = GridBagConstraints.WEST;\n panel10.add(errLblZuschlagsgrundVorrechnung, gbc);\n final JPanel spacer53 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 0;\n gbc.gridwidth = 6;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel10.add(spacer53, gbc);\n schuelerKurseNachrechnungPanel = new JPanel();\n schuelerKurseNachrechnungPanel.setLayout(new GridBagLayout());\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 4;\n gbc.fill = GridBagConstraints.BOTH;\n gbc.insets = new Insets(0, 10, 10, 10);\n panel3.add(schuelerKurseNachrechnungPanel, gbc);\n schuelerKurseNachrechnungPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), \"Schüler / Kurse aktuelles Semester\", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, this.$$$getFont$$$(null, Font.BOLD, -1, schuelerKurseNachrechnungPanel.getFont()), null));\n lblSchuelersNachrechnung = new JLabel();\n lblSchuelersNachrechnung.setText(\"lblSchuelersNachrechnung\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n schuelerKurseNachrechnungPanel.add(lblSchuelersNachrechnung, gbc);\n final JPanel spacer54 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 2;\n gbc.fill = GridBagConstraints.VERTICAL;\n schuelerKurseNachrechnungPanel.add(spacer54, gbc);\n final JPanel spacer55 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n schuelerKurseNachrechnungPanel.add(spacer55, gbc);\n final JPanel spacer56 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.VERTICAL;\n schuelerKurseNachrechnungPanel.add(spacer56, gbc);\n final JPanel spacer57 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 350;\n schuelerKurseNachrechnungPanel.add(spacer57, gbc);\n final JPanel spacer58 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n schuelerKurseNachrechnungPanel.add(spacer58, gbc);\n final JPanel spacer59 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n schuelerKurseNachrechnungPanel.add(spacer59, gbc);\n lblKurseNachrechnung = new JLabel();\n lblKurseNachrechnung.setText(\"lblKurseNachrechnung\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n schuelerKurseNachrechnungPanel.add(lblKurseNachrechnung, gbc);\n nachrechnungPanel = new JPanel();\n nachrechnungPanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 5;\n gbc.fill = GridBagConstraints.BOTH;\n gbc.insets = new Insets(0, 10, 10, 10);\n panel3.add(nachrechnungPanel, gbc);\n nachrechnungPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), \"Nachrechnung\", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, this.$$$getFont$$$(null, Font.BOLD, -1, nachrechnungPanel.getFont()), null));\n final JPanel panel12 = new JPanel();\n panel12.setLayout(new GridBagLayout());\n nachrechnungPanel.add(panel12, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label22 = new JLabel();\n label22.setText(\"Rechnungsdatum:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel12.add(label22, gbc);\n final JPanel spacer60 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 5;\n gbc.gridy = 2;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel12.add(spacer60, gbc);\n final JPanel spacer61 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 3;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel12.add(spacer61, gbc);\n final JPanel spacer62 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 2;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel12.add(spacer62, gbc);\n final JPanel spacer63 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel12.add(spacer63, gbc);\n final JPanel spacer64 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 150;\n panel12.add(spacer64, gbc);\n final JPanel spacer65 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 60;\n panel12.add(spacer65, gbc);\n final JPanel spacer66 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 4;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel12.add(spacer66, gbc);\n txtRechnungsdatumNachrechnung = new JTextField();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 2;\n gbc.gridwidth = 2;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel12.add(txtRechnungsdatumNachrechnung, gbc);\n errLblRechnungsdatumNachrechnung = new JLabel();\n errLblRechnungsdatumNachrechnung.setText(\"errDatumN\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 1;\n gbc.gridwidth = 3;\n gbc.anchor = GridBagConstraints.WEST;\n panel12.add(errLblRechnungsdatumNachrechnung, gbc);\n final JLabel label23 = new JLabel();\n label23.setText(\"Ermässigung:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 4;\n gbc.anchor = GridBagConstraints.WEST;\n panel12.add(label23, gbc);\n txtErmaessigungNachrechnung = new JTextField();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 4;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel12.add(txtErmaessigungNachrechnung, gbc);\n errLblErmaessigungNachrechnung = new JLabel();\n errLblErmaessigungNachrechnung.setText(\"errErmaessN\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 3;\n gbc.gridwidth = 3;\n gbc.anchor = GridBagConstraints.WEST;\n panel12.add(errLblErmaessigungNachrechnung, gbc);\n final JPanel spacer67 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 5;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel12.add(spacer67, gbc);\n final JLabel label24 = new JLabel();\n label24.setText(\"Zuschlag:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 6;\n gbc.anchor = GridBagConstraints.WEST;\n panel12.add(label24, gbc);\n txtZuschlagNachrechnung = new JTextField();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 6;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel12.add(txtZuschlagNachrechnung, gbc);\n errLblZuschlagNachrechnung = new JLabel();\n errLblZuschlagNachrechnung.setText(\"errZuschlagN\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 5;\n gbc.gridwidth = 3;\n gbc.anchor = GridBagConstraints.WEST;\n panel12.add(errLblZuschlagNachrechnung, gbc);\n final JPanel panel13 = new JPanel();\n panel13.setLayout(new GridBagLayout());\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 7;\n gbc.gridwidth = 4;\n gbc.fill = GridBagConstraints.BOTH;\n panel12.add(panel13, gbc);\n final JLabel label25 = new JLabel();\n Font label25Font = this.$$$getFont$$$(null, Font.BOLD, -1, label25.getFont());\n if (label25Font != null) label25.setFont(label25Font);\n label25.setForeground(new Color(-65536));\n label25.setText(\"Rechnungsbetrag:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n panel13.add(label25, gbc);\n final JPanel spacer68 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 12;\n gbc.gridy = 1;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel13.add(spacer68, gbc);\n final JPanel spacer69 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 3;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 150;\n panel13.add(spacer69, gbc);\n final JPanel spacer70 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 3;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 30;\n panel13.add(spacer70, gbc);\n txtAnzahlWochenNachrechnung = new JTextField();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel13.add(txtAnzahlWochenNachrechnung, gbc);\n final JLabel label26 = new JLabel();\n label26.setText(\"Anz.\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel13.add(label26, gbc);\n errLblAnzahlWochenNachrechnung = new JLabel();\n errLblAnzahlWochenNachrechnung.setText(\"errAnz\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.gridwidth = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel13.add(errLblAnzahlWochenNachrechnung, gbc);\n final JLabel label27 = new JLabel();\n label27.setText(\"x\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 10, 0, 10);\n panel13.add(label27, gbc);\n txtWochenbetragNachrechnung = new JTextField();\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel13.add(txtWochenbetragNachrechnung, gbc);\n errLblWochenbetragNachrechnung = new JLabel();\n errLblWochenbetragNachrechnung.setText(\"errWochenb\");\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 0;\n gbc.gridwidth = 10;\n gbc.anchor = GridBagConstraints.WEST;\n panel13.add(errLblWochenbetragNachrechnung, gbc);\n lblMalRabattFaktorNachrechnung = new JLabel();\n lblMalRabattFaktorNachrechnung.setText(\"x\");\n gbc = new GridBagConstraints();\n gbc.gridx = 4;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 10, 0, 10);\n panel13.add(lblMalRabattFaktorNachrechnung, gbc);\n lblRabattFaktorNachrechnung = new JLabel();\n lblRabattFaktorNachrechnung.setText(\"Rabatt\");\n gbc = new GridBagConstraints();\n gbc.gridx = 5;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n panel13.add(lblRabattFaktorNachrechnung, gbc);\n final JPanel spacer71 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 3;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 60;\n panel13.add(spacer71, gbc);\n final JLabel label28 = new JLabel();\n label28.setText(\"Wochenb.\");\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel13.add(label28, gbc);\n final JLabel label29 = new JLabel();\n label29.setText(\"=\");\n gbc = new GridBagConstraints();\n gbc.gridx = 10;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 10, 0, 10);\n panel13.add(label29, gbc);\n lblRechnungsbetragNachrechnung = new JLabel();\n Font lblRechnungsbetragNachrechnungFont = this.$$$getFont$$$(null, Font.BOLD, -1, lblRechnungsbetragNachrechnung.getFont());\n if (lblRechnungsbetragNachrechnungFont != null)\n lblRechnungsbetragNachrechnung.setFont(lblRechnungsbetragNachrechnungFont);\n lblRechnungsbetragNachrechnung.setForeground(new Color(-65536));\n lblRechnungsbetragNachrechnung.setText(\"Rechnungsbetrag\");\n gbc = new GridBagConstraints();\n gbc.gridx = 11;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n panel13.add(lblRechnungsbetragNachrechnung, gbc);\n final JPanel spacer72 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 3;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel13.add(spacer72, gbc);\n final JPanel spacer73 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel13.add(spacer73, gbc);\n final JLabel label30 = new JLabel();\n label30.setText(\"-\");\n gbc = new GridBagConstraints();\n gbc.gridx = 6;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 10, 0, 10);\n panel13.add(label30, gbc);\n lblErmaessigungNachrechnung = new JLabel();\n lblErmaessigungNachrechnung.setText(\"Erm\");\n gbc = new GridBagConstraints();\n gbc.gridx = 7;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n panel13.add(lblErmaessigungNachrechnung, gbc);\n final JLabel label31 = new JLabel();\n label31.setText(\"+\");\n gbc = new GridBagConstraints();\n gbc.gridx = 8;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 10, 0, 10);\n panel13.add(label31, gbc);\n lblZuschlagNachrechnung = new JLabel();\n lblZuschlagNachrechnung.setText(\"Zus\");\n gbc = new GridBagConstraints();\n gbc.gridx = 9;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n panel13.add(lblZuschlagNachrechnung, gbc);\n final JLabel label32 = new JLabel();\n label32.setText(\"Ermäss.\");\n gbc = new GridBagConstraints();\n gbc.gridx = 7;\n gbc.gridy = 2;\n gbc.gridwidth = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel13.add(label32, gbc);\n final JLabel label33 = new JLabel();\n label33.setText(\"Zuschl.\");\n gbc = new GridBagConstraints();\n gbc.gridx = 9;\n gbc.gridy = 2;\n gbc.gridwidth = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel13.add(label33, gbc);\n final JPanel spacer74 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 7;\n gbc.gridy = 3;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 40;\n panel13.add(spacer74, gbc);\n final JPanel spacer75 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 9;\n gbc.gridy = 3;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 40;\n panel13.add(spacer75, gbc);\n final JPanel spacer76 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 30;\n panel12.add(spacer76, gbc);\n final JPanel panel14 = new JPanel();\n panel14.setLayout(new GridBagLayout());\n nachrechnungPanel.add(panel14, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label34 = new JLabel();\n label34.setText(\"6-Jahres-Rabatt:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n panel14.add(label34, gbc);\n final JPanel spacer77 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel14.add(spacer77, gbc);\n final JPanel spacer78 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 2;\n gbc.fill = GridBagConstraints.VERTICAL;\n gbc.ipady = 6;\n panel14.add(spacer78, gbc);\n final JPanel spacer79 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel14.add(spacer79, gbc);\n final JPanel spacer80 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel14.add(spacer80, gbc);\n final JPanel spacer81 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 150;\n panel14.add(spacer81, gbc);\n final JPanel spacer82 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel14.add(spacer82, gbc);\n lblSechsJahresRabattNachrechnung = new JLabel();\n lblSechsJahresRabattNachrechnung.setText(\"lblSechsJahresRabattNachrechnung\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n panel14.add(lblSechsJahresRabattNachrechnung, gbc);\n final JLabel label35 = new JLabel();\n label35.setText(\"Grund:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 3;\n gbc.anchor = GridBagConstraints.WEST;\n panel14.add(label35, gbc);\n txtErmaessigungsgrundNachrechnung = new JTextField();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 3;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel14.add(txtErmaessigungsgrundNachrechnung, gbc);\n errLblErmaessigungsgrundNachrechnung = new JLabel();\n errLblErmaessigungsgrundNachrechnung.setText(\"errLblErmaessigungsgrundNachrechnung\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel14.add(errLblErmaessigungsgrundNachrechnung, gbc);\n final JPanel spacer83 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 4;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel14.add(spacer83, gbc);\n final JLabel label36 = new JLabel();\n label36.setText(\"Grund:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 5;\n gbc.anchor = GridBagConstraints.WEST;\n panel14.add(label36, gbc);\n txtZuschlagsgrundNachrechnung = new JTextField();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 5;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel14.add(txtZuschlagsgrundNachrechnung, gbc);\n errLblZuschlagsgrundNachrechnung = new JLabel();\n errLblZuschlagsgrundNachrechnung.setText(\"errLblZuschlagsgrundNachrechnung\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 4;\n gbc.anchor = GridBagConstraints.WEST;\n panel14.add(errLblZuschlagsgrundNachrechnung, gbc);\n final JPanel panel15 = new JPanel();\n panel15.setLayout(new GridBagLayout());\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 7;\n gbc.gridwidth = 2;\n gbc.fill = GridBagConstraints.BOTH;\n panel14.add(panel15, gbc);\n btnWochenbetragNachrechnung = new JButton();\n btnWochenbetragNachrechnung.setMaximumSize(new Dimension(222, 29));\n btnWochenbetragNachrechnung.setMinimumSize(new Dimension(222, 29));\n btnWochenbetragNachrechnung.setPreferredSize(new Dimension(222, 29));\n btnWochenbetragNachrechnung.setText(\"Wochenbetrag berechnen\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel15.add(btnWochenbetragNachrechnung, gbc);\n final JPanel spacer84 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel15.add(spacer84, gbc);\n final JPanel spacer85 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel15.add(spacer85, gbc);\n final JPanel spacer86 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 6;\n gbc.weighty = 1.0;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel14.add(spacer86, gbc);\n zahlungenNachrechnungPanel = new JPanel();\n zahlungenNachrechnungPanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 6;\n gbc.fill = GridBagConstraints.BOTH;\n gbc.insets = new Insets(0, 10, 10, 10);\n panel3.add(zahlungenNachrechnungPanel, gbc);\n zahlungenNachrechnungPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), \"Zahlungen Nachrechnung\", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, this.$$$getFont$$$(null, Font.BOLD, -1, zahlungenNachrechnungPanel.getFont()), null));\n final JPanel panel16 = new JPanel();\n panel16.setLayout(new GridBagLayout());\n zahlungenNachrechnungPanel.add(panel16, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label37 = new JLabel();\n label37.setText(\"1. Zahlung:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel16.add(label37, gbc);\n final JPanel spacer87 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 7;\n gbc.gridy = 2;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel16.add(spacer87, gbc);\n final JPanel spacer88 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 3;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel16.add(spacer88, gbc);\n final JPanel spacer89 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 2;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel16.add(spacer89, gbc);\n final JPanel spacer90 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel16.add(spacer90, gbc);\n final JPanel spacer91 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 150;\n panel16.add(spacer91, gbc);\n final JPanel spacer92 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 60;\n panel16.add(spacer92, gbc);\n txtBetragZahlung1Nachrechnung = new JTextField();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel16.add(txtBetragZahlung1Nachrechnung, gbc);\n final JLabel label38 = new JLabel();\n label38.setText(\"Datum:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 4;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel16.add(label38, gbc);\n final JPanel spacer93 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 5;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 90;\n panel16.add(spacer93, gbc);\n final JPanel spacer94 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 6;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel16.add(spacer94, gbc);\n final JPanel spacer95 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 40;\n panel16.add(spacer95, gbc);\n final JPanel spacer96 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 4;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 70;\n panel16.add(spacer96, gbc);\n txtDatumZahlung1Nachrechnung = new JTextField();\n gbc = new GridBagConstraints();\n gbc.gridx = 5;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel16.add(txtDatumZahlung1Nachrechnung, gbc);\n errLblBetragZahlung1Nachrechnung = new JLabel();\n errLblBetragZahlung1Nachrechnung.setText(\"errLblBetragZahlung1N\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 1;\n gbc.gridwidth = 3;\n gbc.anchor = GridBagConstraints.WEST;\n panel16.add(errLblBetragZahlung1Nachrechnung, gbc);\n errLblDatumZahlung1Nachrechnung = new JLabel();\n errLblDatumZahlung1Nachrechnung.setText(\"errLblDatumZahlung1N\");\n gbc = new GridBagConstraints();\n gbc.gridx = 5;\n gbc.gridy = 1;\n gbc.gridwidth = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel16.add(errLblDatumZahlung1Nachrechnung, gbc);\n final JLabel label39 = new JLabel();\n label39.setText(\"2. Zahlung:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 4;\n gbc.anchor = GridBagConstraints.WEST;\n panel16.add(label39, gbc);\n final JPanel spacer97 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 5;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel16.add(spacer97, gbc);\n txtBetragZahlung2Nachrechnung = new JTextField();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 4;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel16.add(txtBetragZahlung2Nachrechnung, gbc);\n errLblBetragZahlung2Nachrechnung = new JLabel();\n errLblBetragZahlung2Nachrechnung.setText(\"errLblBetragZahlung2N\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 3;\n gbc.gridwidth = 3;\n gbc.anchor = GridBagConstraints.WEST;\n panel16.add(errLblBetragZahlung2Nachrechnung, gbc);\n final JLabel label40 = new JLabel();\n label40.setText(\"Datum:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 4;\n gbc.gridy = 4;\n gbc.anchor = GridBagConstraints.WEST;\n panel16.add(label40, gbc);\n txtDatumZahlung2Nachrechnung = new JTextField();\n gbc = new GridBagConstraints();\n gbc.gridx = 5;\n gbc.gridy = 4;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel16.add(txtDatumZahlung2Nachrechnung, gbc);\n errLblDatumZahlung2Nachrechnung = new JLabel();\n errLblDatumZahlung2Nachrechnung.setText(\"errLblDatumZahlung2N\");\n gbc = new GridBagConstraints();\n gbc.gridx = 5;\n gbc.gridy = 3;\n gbc.gridwidth = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel16.add(errLblDatumZahlung2Nachrechnung, gbc);\n final JPanel panel17 = new JPanel();\n panel17.setLayout(new GridBagLayout());\n zahlungenNachrechnungPanel.add(panel17, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label41 = new JLabel();\n label41.setText(\"3. Zahlung:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel17.add(label41, gbc);\n final JPanel spacer98 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 7;\n gbc.gridy = 2;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel17.add(spacer98, gbc);\n final JPanel spacer99 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 3;\n gbc.fill = GridBagConstraints.VERTICAL;\n gbc.ipady = 6;\n panel17.add(spacer99, gbc);\n final JPanel spacer100 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 2;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel17.add(spacer100, gbc);\n final JPanel spacer101 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel17.add(spacer101, gbc);\n final JPanel spacer102 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 150;\n panel17.add(spacer102, gbc);\n final JPanel spacer103 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 60;\n panel17.add(spacer103, gbc);\n final JPanel spacer104 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 40;\n panel17.add(spacer104, gbc);\n final JPanel spacer105 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 5;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 90;\n panel17.add(spacer105, gbc);\n txtBetragZahlung3Nachrechnung = new JTextField();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel17.add(txtBetragZahlung3Nachrechnung, gbc);\n errLblBetragZahlung3Nachrechnung = new JLabel();\n errLblBetragZahlung3Nachrechnung.setText(\"errLblBetragZahlung3N\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 1;\n gbc.gridwidth = 3;\n gbc.anchor = GridBagConstraints.WEST;\n panel17.add(errLblBetragZahlung3Nachrechnung, gbc);\n final JPanel spacer106 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 4;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 70;\n panel17.add(spacer106, gbc);\n final JLabel label42 = new JLabel();\n label42.setText(\"Datum:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 4;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel17.add(label42, gbc);\n txtDatumZahlung3Nachrechnung = new JTextField();\n gbc = new GridBagConstraints();\n gbc.gridx = 5;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel17.add(txtDatumZahlung3Nachrechnung, gbc);\n errLblDatumZahlung3Nachrechnung = new JLabel();\n errLblDatumZahlung3Nachrechnung.setText(\"errLblDatumZahlung3N\");\n gbc = new GridBagConstraints();\n gbc.gridx = 5;\n gbc.gridy = 1;\n gbc.gridwidth = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel17.add(errLblDatumZahlung3Nachrechnung, gbc);\n final JPanel spacer107 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 6;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel17.add(spacer107, gbc);\n final JLabel label43 = new JLabel();\n Font label43Font = this.$$$getFont$$$(null, Font.BOLD, -1, label43.getFont());\n if (label43Font != null) label43.setFont(label43Font);\n label43.setForeground(new Color(-65536));\n label43.setText(\"Restbetrag:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 4;\n gbc.anchor = GridBagConstraints.WEST;\n panel17.add(label43, gbc);\n lblRestbetragNachrechnung = new JLabel();\n Font lblRestbetragNachrechnungFont = this.$$$getFont$$$(null, Font.BOLD, -1, lblRestbetragNachrechnung.getFont());\n if (lblRestbetragNachrechnungFont != null) lblRestbetragNachrechnung.setFont(lblRestbetragNachrechnungFont);\n lblRestbetragNachrechnung.setForeground(new Color(-65536));\n lblRestbetragNachrechnung.setText(\"Restbetrag\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 4;\n gbc.gridwidth = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel17.add(lblRestbetragNachrechnung, gbc);\n final JPanel spacer108 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 5;\n gbc.weighty = 1.0;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel17.add(spacer108, gbc);\n stipendiumGratiskindPanel = new JPanel();\n stipendiumGratiskindPanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 7;\n gbc.fill = GridBagConstraints.BOTH;\n gbc.insets = new Insets(0, 10, 10, 10);\n panel3.add(stipendiumGratiskindPanel, gbc);\n stipendiumGratiskindPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), \"Code / Bemerkungen / Stipendium / Gratiskinder\", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, this.$$$getFont$$$(null, Font.BOLD, -1, stipendiumGratiskindPanel.getFont()), null));\n final JPanel panel18 = new JPanel();\n panel18.setLayout(new GridBagLayout());\n stipendiumGratiskindPanel.add(panel18, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JPanel spacer109 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel18.add(spacer109, gbc);\n final JPanel spacer110 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel18.add(spacer110, gbc);\n final JPanel spacer111 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 150;\n panel18.add(spacer111, gbc);\n final JPanel spacer112 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel18.add(spacer112, gbc);\n final JPanel spacer113 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 2;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel18.add(spacer113, gbc);\n final JPanel spacer114 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 4;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel18.add(spacer114, gbc);\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 1;\n gbc.weightx = 1.0;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel18.add(comboBoxSemesterrechnungCode, gbc);\n final JLabel label44 = new JLabel();\n label44.setText(\"Code:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n panel18.add(label44, gbc);\n final JLabel label45 = new JLabel();\n label45.setText(\"Bemerkungen:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 3;\n gbc.anchor = GridBagConstraints.WEST;\n panel18.add(label45, gbc);\n errLblBemerkungen = new JLabel();\n errLblBemerkungen.setText(\"errLblBemerkungen\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel18.add(errLblBemerkungen, gbc);\n final JScrollPane scrollPane2 = new JScrollPane();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 3;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipady = 20;\n panel18.add(scrollPane2, gbc);\n textAreaBemerkungen = new JTextArea();\n textAreaBemerkungen.setLineWrap(true);\n textAreaBemerkungen.setWrapStyleWord(true);\n scrollPane2.setViewportView(textAreaBemerkungen);\n final JPanel panel19 = new JPanel();\n panel19.setLayout(new GridBagLayout());\n stipendiumGratiskindPanel.add(panel19, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 1;\n gbc.weightx = 1.0;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel19.add(comboBoxStipendium, gbc);\n final JPanel spacer115 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel19.add(spacer115, gbc);\n final JLabel label46 = new JLabel();\n label46.setText(\"Stipendium:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n panel19.add(label46, gbc);\n final JPanel spacer116 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel19.add(spacer116, gbc);\n final JPanel spacer117 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel19.add(spacer117, gbc);\n final JPanel spacer118 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 150;\n panel19.add(spacer118, gbc);\n final JLabel label47 = new JLabel();\n label47.setText(\"Gratiskinder:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 3;\n gbc.anchor = GridBagConstraints.WEST;\n panel19.add(label47, gbc);\n checkBoxGratiskinder = new JCheckBox();\n checkBoxGratiskinder.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 3;\n gbc.anchor = GridBagConstraints.WEST;\n panel19.add(checkBoxGratiskinder, gbc);\n final JPanel spacer119 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 2;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel19.add(spacer119, gbc);\n final JPanel spacer120 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 4;\n gbc.weighty = 1.0;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel19.add(spacer120, gbc);\n errLblStipendium = new JLabel();\n errLblStipendium.setText(\"errLblStipendium\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 0;\n gbc.anchor = GridBagConstraints.WEST;\n panel19.add(errLblStipendium, gbc);\n final JPanel spacer121 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 8;\n gbc.weighty = 1.0;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel3.add(spacer121, gbc);\n zahlungenVorrechnungPanel = new JPanel();\n zahlungenVorrechnungPanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 3;\n gbc.fill = GridBagConstraints.BOTH;\n gbc.insets = new Insets(0, 10, 10, 10);\n panel3.add(zahlungenVorrechnungPanel, gbc);\n zahlungenVorrechnungPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), \"Zahlungen Vorrechnung\", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, this.$$$getFont$$$(null, Font.BOLD, -1, zahlungenVorrechnungPanel.getFont()), null));\n final JPanel panel20 = new JPanel();\n panel20.setLayout(new GridBagLayout());\n zahlungenVorrechnungPanel.add(panel20, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label48 = new JLabel();\n label48.setText(\"1. Zahlung:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel20.add(label48, gbc);\n final JPanel spacer122 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 3;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel20.add(spacer122, gbc);\n final JPanel spacer123 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 2;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel20.add(spacer123, gbc);\n txtBetragZahlung1Vorrechnung = new JTextField();\n txtBetragZahlung1Vorrechnung.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel20.add(txtBetragZahlung1Vorrechnung, gbc);\n final JPanel spacer124 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 150;\n panel20.add(spacer124, gbc);\n final JPanel spacer125 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel20.add(spacer125, gbc);\n final JPanel spacer126 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 60;\n panel20.add(spacer126, gbc);\n final JPanel spacer127 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 40;\n panel20.add(spacer127, gbc);\n final JLabel label49 = new JLabel();\n label49.setText(\"Datum:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 4;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel20.add(label49, gbc);\n txtDatumZahlung1Vorrechnung = new JTextField();\n gbc = new GridBagConstraints();\n gbc.gridx = 5;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel20.add(txtDatumZahlung1Vorrechnung, gbc);\n final JPanel spacer128 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 4;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 70;\n panel20.add(spacer128, gbc);\n final JPanel spacer129 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 5;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 90;\n panel20.add(spacer129, gbc);\n final JPanel spacer130 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 6;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel20.add(spacer130, gbc);\n errLblBetragZahlung1Vorrechnung = new JLabel();\n errLblBetragZahlung1Vorrechnung.setText(\"errLblBetragZahlung1V\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 1;\n gbc.gridwidth = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel20.add(errLblBetragZahlung1Vorrechnung, gbc);\n errLblDatumZahlung1Vorrechnung = new JLabel();\n errLblDatumZahlung1Vorrechnung.setText(\"errLblDatumZahlung1V\");\n gbc = new GridBagConstraints();\n gbc.gridx = 5;\n gbc.gridy = 1;\n gbc.gridwidth = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel20.add(errLblDatumZahlung1Vorrechnung, gbc);\n final JLabel label50 = new JLabel();\n label50.setText(\"2. Zahlung:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 4;\n gbc.anchor = GridBagConstraints.WEST;\n panel20.add(label50, gbc);\n final JPanel spacer131 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 5;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel20.add(spacer131, gbc);\n txtBetragZahlung2Vorrechnung = new JTextField();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 4;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel20.add(txtBetragZahlung2Vorrechnung, gbc);\n errLblBetragZahlung2Vorrechnung = new JLabel();\n errLblBetragZahlung2Vorrechnung.setText(\"errLblBetragZahlung2V\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 3;\n gbc.gridwidth = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel20.add(errLblBetragZahlung2Vorrechnung, gbc);\n final JLabel label51 = new JLabel();\n label51.setText(\"Datum:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 4;\n gbc.gridy = 4;\n gbc.anchor = GridBagConstraints.WEST;\n panel20.add(label51, gbc);\n txtDatumZahlung2Vorrechnung = new JTextField();\n gbc = new GridBagConstraints();\n gbc.gridx = 5;\n gbc.gridy = 4;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel20.add(txtDatumZahlung2Vorrechnung, gbc);\n errLblDatumZahlung2Vorrechnung = new JLabel();\n errLblDatumZahlung2Vorrechnung.setText(\"errLblDatumZahlung2V\");\n gbc = new GridBagConstraints();\n gbc.gridx = 5;\n gbc.gridy = 3;\n gbc.gridwidth = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel20.add(errLblDatumZahlung2Vorrechnung, gbc);\n final JPanel panel21 = new JPanel();\n panel21.setLayout(new GridBagLayout());\n zahlungenVorrechnungPanel.add(panel21, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label52 = new JLabel();\n label52.setText(\"3. Zahlung:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel21.add(label52, gbc);\n final JPanel spacer132 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 3;\n gbc.fill = GridBagConstraints.VERTICAL;\n gbc.ipady = 6;\n panel21.add(spacer132, gbc);\n txtBetragZahlung3Vorrechnung = new JTextField();\n txtBetragZahlung3Vorrechnung.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel21.add(txtBetragZahlung3Vorrechnung, gbc);\n final JPanel spacer133 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 2;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel21.add(spacer133, gbc);\n final JPanel spacer134 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel21.add(spacer134, gbc);\n final JPanel spacer135 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 150;\n panel21.add(spacer135, gbc);\n final JPanel spacer136 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 60;\n panel21.add(spacer136, gbc);\n final JPanel spacer137 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 40;\n panel21.add(spacer137, gbc);\n errLblBetragZahlung3Vorrechnung = new JLabel();\n errLblBetragZahlung3Vorrechnung.setText(\"errLblBetragZahlung3V\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 1;\n gbc.gridwidth = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel21.add(errLblBetragZahlung3Vorrechnung, gbc);\n final JPanel spacer138 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 4;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 70;\n panel21.add(spacer138, gbc);\n final JPanel spacer139 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 5;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.ipadx = 90;\n panel21.add(spacer139, gbc);\n final JPanel spacer140 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 6;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel21.add(spacer140, gbc);\n final JLabel label53 = new JLabel();\n label53.setText(\"Datum:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 4;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel21.add(label53, gbc);\n txtDatumZahlung3Vorrechnung = new JTextField();\n gbc = new GridBagConstraints();\n gbc.gridx = 5;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel21.add(txtDatumZahlung3Vorrechnung, gbc);\n errLblDatumZahlung3Vorrechnung = new JLabel();\n errLblDatumZahlung3Vorrechnung.setText(\"errLblDatumZahlung3V\");\n gbc = new GridBagConstraints();\n gbc.gridx = 5;\n gbc.gridy = 1;\n gbc.gridwidth = 2;\n gbc.anchor = GridBagConstraints.WEST;\n panel21.add(errLblDatumZahlung3Vorrechnung, gbc);\n final JLabel label54 = new JLabel();\n Font label54Font = this.$$$getFont$$$(null, Font.BOLD, -1, label54.getFont());\n if (label54Font != null) label54.setFont(label54Font);\n label54.setForeground(new Color(-16776961));\n label54.setText(\"Restbetrag:\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 4;\n gbc.anchor = GridBagConstraints.WEST;\n panel21.add(label54, gbc);\n lblRestbetragVorrechnung = new JLabel();\n Font lblRestbetragVorrechnungFont = this.$$$getFont$$$(null, Font.BOLD, -1, lblRestbetragVorrechnung.getFont());\n if (lblRestbetragVorrechnungFont != null) lblRestbetragVorrechnung.setFont(lblRestbetragVorrechnungFont);\n lblRestbetragVorrechnung.setForeground(new Color(-16776961));\n lblRestbetragVorrechnung.setText(\"Restbetrag\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 4;\n gbc.anchor = GridBagConstraints.WEST;\n panel21.add(lblRestbetragVorrechnung, gbc);\n final JPanel spacer141 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 5;\n gbc.weighty = 1.0;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel21.add(spacer141, gbc);\n final JPanel spacer142 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 7;\n gbc.gridy = 2;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel21.add(spacer142, gbc);\n buttonPanel = new JPanel();\n buttonPanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 2;\n gbc.fill = GridBagConstraints.BOTH;\n panel2.add(buttonPanel, gbc);\n final JPanel panel22 = new JPanel();\n panel22.setLayout(new GridBagLayout());\n buttonPanel.add(panel22, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n lblScrollPosition = new JLabel();\n lblScrollPosition.setText(\"Scroll-Position\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n panel22.add(lblScrollPosition, gbc);\n final JPanel spacer143 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel22.add(spacer143, gbc);\n final JPanel spacer144 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel22.add(spacer144, gbc);\n final JPanel spacer145 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 6;\n gbc.gridy = 1;\n gbc.gridwidth = 2;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel22.add(spacer145, gbc);\n btnErster = new JButton();\n btnErster.setMaximumSize(new Dimension(143, 29));\n btnErster.setMinimumSize(new Dimension(143, 29));\n btnErster.setPreferredSize(new Dimension(143, 29));\n btnErster.setText(\"Erster\");\n btnErster.setMnemonic('E');\n btnErster.setDisplayedMnemonicIndex(0);\n gbc = new GridBagConstraints();\n gbc.gridx = 8;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel22.add(btnErster, gbc);\n final JPanel spacer146 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 9;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel22.add(spacer146, gbc);\n btnVorheriger = new JButton();\n btnVorheriger.setMaximumSize(new Dimension(143, 29));\n btnVorheriger.setMinimumSize(new Dimension(143, 29));\n btnVorheriger.setPreferredSize(new Dimension(143, 29));\n btnVorheriger.setText(\"Vorheriger\");\n btnVorheriger.setMnemonic('V');\n btnVorheriger.setDisplayedMnemonicIndex(0);\n gbc = new GridBagConstraints();\n gbc.gridx = 10;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel22.add(btnVorheriger, gbc);\n btnSpeichern = new JButton();\n btnSpeichern.setMaximumSize(new Dimension(114, 29));\n btnSpeichern.setMinimumSize(new Dimension(114, 29));\n btnSpeichern.setPreferredSize(new Dimension(114, 29));\n btnSpeichern.setText(\"Speichern\");\n btnSpeichern.setMnemonic('S');\n btnSpeichern.setDisplayedMnemonicIndex(0);\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel22.add(btnSpeichern, gbc);\n btnVerwerfen = new JButton();\n btnVerwerfen.setMaximumSize(new Dimension(114, 29));\n btnVerwerfen.setMinimumSize(new Dimension(114, 29));\n btnVerwerfen.setPreferredSize(new Dimension(114, 29));\n btnVerwerfen.setText(\"Verwerfen\");\n btnVerwerfen.setMnemonic('W');\n btnVerwerfen.setDisplayedMnemonicIndex(3);\n gbc = new GridBagConstraints();\n gbc.gridx = 5;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel22.add(btnVerwerfen, gbc);\n final JPanel spacer147 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel22.add(spacer147, gbc);\n final JPanel spacer148 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 2;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel22.add(spacer148, gbc);\n final JPanel spacer149 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 4;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel22.add(spacer149, gbc);\n final JPanel panel23 = new JPanel();\n panel23.setLayout(new GridBagLayout());\n buttonPanel.add(panel23, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n btnNachfolgender = new JButton();\n btnNachfolgender.setMaximumSize(new Dimension(143, 29));\n btnNachfolgender.setMinimumSize(new Dimension(143, 29));\n btnNachfolgender.setPreferredSize(new Dimension(143, 29));\n btnNachfolgender.setText(\"Nachfolgender\");\n btnNachfolgender.setMnemonic('N');\n btnNachfolgender.setDisplayedMnemonicIndex(0);\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel23.add(btnNachfolgender, gbc);\n final JPanel spacer150 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel23.add(spacer150, gbc);\n final JPanel spacer151 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 2;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel23.add(spacer151, gbc);\n final JPanel spacer152 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel23.add(spacer152, gbc);\n btnLetzter = new JButton();\n btnLetzter.setMaximumSize(new Dimension(143, 29));\n btnLetzter.setMinimumSize(new Dimension(143, 29));\n btnLetzter.setPreferredSize(new Dimension(143, 29));\n btnLetzter.setText(\"Letzter\");\n btnLetzter.setMnemonic('L');\n btnLetzter.setDisplayedMnemonicIndex(0);\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel23.add(btnLetzter, gbc);\n final JPanel spacer153 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 1;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel23.add(spacer153, gbc);\n final JPanel spacer154 = new JPanel();\n gbc = new GridBagConstraints();\n gbc.gridx = 5;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel23.add(spacer154, gbc);\n btnZurueck = new JButton();\n btnZurueck.setMaximumSize(new Dimension(114, 29));\n btnZurueck.setMinimumSize(new Dimension(114, 29));\n btnZurueck.setPreferredSize(new Dimension(114, 29));\n btnZurueck.setText(\"Zurück\");\n btnZurueck.setMnemonic('Z');\n btnZurueck.setDisplayedMnemonicIndex(0);\n gbc = new GridBagConstraints();\n gbc.gridx = 4;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n panel23.add(btnZurueck, gbc);\n label7.setLabelFor(txtErmaessigungVorrechnung);\n label8.setLabelFor(txtZuschlagVorrechnung);\n errLblWochenbetragVorrechnung.setLabelFor(txtWochenbetragVorrechnung);\n label18.setLabelFor(txtRechnungsdatumVorrechnung);\n label19.setLabelFor(txtErmaessigungsgrundVorrechnung);\n label22.setLabelFor(txtRechnungsdatumNachrechnung);\n label23.setLabelFor(txtErmaessigungNachrechnung);\n label24.setLabelFor(txtZuschlagNachrechnung);\n label25.setLabelFor(txtAnzahlWochenNachrechnung);\n label35.setLabelFor(txtErmaessigungsgrundNachrechnung);\n label36.setLabelFor(txtZuschlagsgrundNachrechnung);\n label37.setLabelFor(txtBetragZahlung1Nachrechnung);\n label38.setLabelFor(txtDatumZahlung1Nachrechnung);\n label39.setLabelFor(txtBetragZahlung2Nachrechnung);\n label40.setLabelFor(txtDatumZahlung2Nachrechnung);\n label41.setLabelFor(txtBetragZahlung3Nachrechnung);\n label42.setLabelFor(txtDatumZahlung3Nachrechnung);\n label46.setLabelFor(comboBoxStipendium);\n label48.setLabelFor(txtBetragZahlung1Vorrechnung);\n label49.setLabelFor(txtDatumZahlung1Vorrechnung);\n label50.setLabelFor(txtBetragZahlung2Vorrechnung);\n label51.setLabelFor(txtDatumZahlung2Vorrechnung);\n label52.setLabelFor(txtBetragZahlung3Vorrechnung);\n label53.setLabelFor(txtDatumZahlung3Vorrechnung);\n }",
"public void afficherLru() {\n\t\tint nbrCols = listEtape.size();\n\t\tint nbrRows = 0;\n\t\tfor(ArrayList<Processus> list: listEtape) {\n\t\t\tif(list.size() > nbrRows) nbrRows = list.size(); \n\t\t}\n\t\t\n\t\taddColsRows(resultPane, nbrCols+1, nbrRows);\n\t\taddPanelForResult(resultPane);\n\t\n\n\t\tresultPane.setStyle(\"-fx-background-color: #23CFDC\");\n\n\t\t// Affichage du résultat\n\t\tfor(int i=0; i< listEtape.size();i++) {\n\t\t\tArrayList<Processus> list = listEtape.get(i); \n\t\t\tfor(int j=0; j<list.size(); j++) {\n\t\t\t\tProcessus p = list.get(j); \n\t\t\t\tLabel label = new Label(\"\" + p.getValue());\n\n\t\t\t\tresultPane.add(label, i+1, j);\n\t\t\t\tGridPane.setHalignment(label, HPos.CENTER);\n\n\t\t\t}\n\t\t}\n\t\tresultPane.setVisible(true);\n\t\tgenere = true;\n\t}",
"public SelectPanel(Vector projectList)\r\n {\r\n this.projectList = projectList;\r\n selectedList=new Vector();//initialize selectedList vector\r\n totalSelected=0;\r\n setLayout(new GridLayout(3,1));//set layout\r\n projects= new JList(projectList);//initialize JLists\r\n selection=new JList(selectedList);\r\n JScrollPane sp1=new JScrollPane(projects);//initialize Scrollpanes\r\n JScrollPane sp2=new JScrollPane(selection);\r\n\r\n proj=new JLabel(\"Available project(s)\");//initialize JLabels\r\n selectedProj=new JLabel(\"Selected project(s)\");\r\n numSelected=new JLabel(\"Total number of selected projects: \"+totalSelected);\r\n\r\n JPanel top=new JPanel(new GridLayout(2,1));//initialize the subpanels and set layouts\r\n JPanel middle=new JPanel(new GridLayout(1,2));\r\n JPanel bottom=new JPanel(new GridLayout(3,1));\r\n\r\n addProj=new JButton(\"Add\");//intialize buttons\r\n removeProj=new JButton(\"Remove\");\r\n addProj.addActionListener(new ButtonListener());//add listener\r\n removeProj.addActionListener(new ButtonListener());\r\n projects.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);//set selection mode to single\r\n\r\n top.add(proj);//add the components to the different subpanels\r\n top.add(sp1);\r\n middle.add(addProj);\r\n middle.add(removeProj);\r\n bottom.add(selectedProj);\r\n bottom.add(sp2);\r\n bottom.add(numSelected);\r\n add(top);\r\n add(middle);\r\n add(bottom);\r\n\r\n\r\n\r\n\r\n // organize components for the select panel\r\n }",
"private JPanel createLabelsPanel(Set<String> entity_tag_types) {\n JPanel panel = new JPanel(new BorderLayout());\n JPanel labels_panel = new JPanel(new GridLayout(1,3,4,4));\n labels_panel.add(new JLabel(\"Labels\"));\n labels_panel.add(node_labels_cb = new JCheckBox(\"Node\", false)); defaultListener(node_labels_cb);\n labels_panel.add(link_labels_cb = new JCheckBox(\"Link\", false)); defaultListener(link_labels_cb);\n panel.add(\"North\", labels_panel);\n JPanel center = new JPanel(new GridLayout(3,1)); JScrollPane scroll;\n // Node Labels\n center.add(scroll = new JScrollPane(entity_label_list = new JList())); defaultListener(entity_label_list);\n scroll.setBorder(BorderFactory.createTitledBorder(\"Node Label\"));\n // Node Color\n center.add(scroll = new JScrollPane(entity_color_list = new JList())); defaultListener(entity_color_list);\n scroll.setBorder(BorderFactory.createTitledBorder(\"Node Color\"));\n entity_color_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n // Link Labels\n center.add(scroll = new JScrollPane(bundle_label_list = new JList())); defaultListener(bundle_label_list);\n scroll.setBorder(BorderFactory.createTitledBorder(\"Link Label\"));\n panel.add(\"Center\", center);\n updateLabelLists(entity_tag_types);\n return panel;\n }",
"private void $$$setupUI$$$() {\r\n final JPanel panel1 = new JPanel();\r\n panel1.setLayout(new GridLayoutManager(1, 4, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel = new JPanel();\r\n mMainPanel.setLayout(new GridLayoutManager(15, 3, new Insets(0, 0, 0, 0), -1, -1));\r\n panel1.add(mMainPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n label = new JLabel();\r\n Font labelFont = this.$$$getFont$$$(null, -1, 28, label.getFont());\r\n if (labelFont != null) label.setFont(labelFont);\r\n label.setText(\"CodeRecommender\");\r\n mMainPanel.add(label, new GridConstraints(0, 0, 2, 1, GridConstraints.ANCHOR_NORTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final Spacer spacer1 = new Spacer();\r\n mMainPanel.add(spacer1, new GridConstraints(5, 2, 1, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_NONE, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final JPanel panel2 = new JPanel();\r\n panel2.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel.add(panel2, new GridConstraints(4, 0, 6, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel3 = new JPanel();\r\n panel3.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel2.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n statement = new JTextArea();\r\n statement.setBackground(new Color(-12434103));\r\n statement.setColumns(0);\r\n statement.setEditable(false);\r\n statement.setEnabled(true);\r\n Font statementFont = this.$$$getFont$$$(\"Arial\", Font.PLAIN, 15, statement.getFont());\r\n if (statementFont != null) statement.setFont(statementFont);\r\n statement.setText(\" In the current ai craze, we want to use neural network-related technology to grab a large amount of source code from the open source community to achieve the recommendation of the N+1 line of code from the known N lines of code, and package this function into a practical plug-in on the IDE.\");\r\n panel3.add(statement, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, 70), null, 1, false));\r\n final JPanel panel4 = new JPanel();\r\n panel4.setLayout(new GridLayoutManager(12, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.setBackground(new Color(-12828863));\r\n panel3.add(panel4, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n Download = new JButton();\r\n Font DownloadFont = this.$$$getFont$$$(null, -1, 12, Download.getFont());\r\n if (DownloadFont != null) Download.setFont(DownloadFont);\r\n Download.setText(\"Find\");\r\n panel4.add(Download, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JPanel panel5 = new JPanel();\r\n panel5.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel5, new GridConstraints(11, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JLabel label1 = new JLabel();\r\n label1.setText(\"See the guide on the https://github.com/huangjihui511/java-code-recommand-IDEA-plugin \");\r\n panel5.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final Spacer spacer2 = new Spacer();\r\n panel5.add(spacer2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\r\n pathTextField = new JTextField();\r\n pathTextField.setEditable(false);\r\n Font pathTextFieldFont = this.$$$getFont$$$(\"Arial\", Font.PLAIN, 12, pathTextField.getFont());\r\n if (pathTextFieldFont != null) pathTextField.setFont(pathTextFieldFont);\r\n pathTextField.setText(\"/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 \");\r\n panel4.add(pathTextField, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\r\n SetPath = new JButton();\r\n Font SetPathFont = this.$$$getFont$$$(null, -1, 12, SetPath.getFont());\r\n if (SetPathFont != null) SetPath.setFont(SetPathFont);\r\n SetPath.setText(\"Set\");\r\n panel4.add(SetPath, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n Help = new JButton();\r\n Help.setText(\"Help\");\r\n panel4.add(Help, new GridConstraints(11, 1, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JPanel panel6 = new JPanel();\r\n panel6.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel6.setFocusTraversalPolicyProvider(false);\r\n panel6.setFocusable(false);\r\n panel4.add(panel6, new GridConstraints(10, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel7 = new JPanel();\r\n panel7.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel7, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JLabel label2 = new JLabel();\r\n label2.setIcon(new ImageIcon(getClass().getResource(\"/timg (1) - 副本.jpg\")));\r\n label2.setText(\"\");\r\n panel7.add(label2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JLabel label3 = new JLabel();\r\n label3.setIcon(new ImageIcon(getClass().getResource(\"/微信图片_20190328224952 (2) - 副本.jpg\")));\r\n label3.setText(\"\");\r\n panel7.add(label3, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JPanel panel8 = new JPanel();\r\n panel8.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel7.add(panel8, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel9 = new JPanel();\r\n panel9.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel9, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n webaddressTextField = new JTextField();\r\n webaddressTextField.setEditable(false);\r\n Font webaddressTextFieldFont = this.$$$getFont$$$(\"Arial\", Font.PLAIN, 12, webaddressTextField.getFont());\r\n if (webaddressTextFieldFont != null) webaddressTextField.setFont(webaddressTextFieldFont);\r\n webaddressTextField.setText(\"/Volumes/PythonSupporting\");\r\n panel4.add(webaddressTextField, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\r\n final JPanel panel10 = new JPanel();\r\n panel10.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel10, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JLabel label4 = new JLabel();\r\n Font label4Font = this.$$$getFont$$$(\"Consolas\", Font.BOLD, 14, label4.getFont());\r\n if (label4Font != null) label4.setFont(label4Font);\r\n label4.setText(\"Find the package\");\r\n panel10.add(label4, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final Spacer spacer3 = new Spacer();\r\n panel10.add(spacer3, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\r\n final JPanel panel11 = new JPanel();\r\n panel11.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel11.setToolTipText(\"\");\r\n panel4.add(panel11, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JLabel label5 = new JLabel();\r\n Font label5Font = this.$$$getFont$$$(\"Consolas\", Font.BOLD, 14, label5.getFont());\r\n if (label5Font != null) label5.setFont(label5Font);\r\n label5.setText(\"Set the path\");\r\n panel11.add(label5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final Spacer spacer4 = new Spacer();\r\n panel11.add(spacer4, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\r\n final JPanel panel12 = new JPanel();\r\n panel12.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel12, new GridConstraints(9, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel13 = new JPanel();\r\n panel13.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel13, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel14 = new JPanel();\r\n panel14.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel14, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel15 = new JPanel();\r\n panel15.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel15, new GridConstraints(8, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n pic = new JPanel();\r\n pic.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n pic.putClientProperty(\"html.disable\", Boolean.FALSE);\r\n panel3.add(pic, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n a = new JLabel();\r\n a.setText(\"\");\r\n pic.add(a, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JPanel panel16 = new JPanel();\r\n panel16.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n pic.add(panel16, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel17 = new JPanel();\r\n panel17.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n pic.add(panel17, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel18 = new JPanel();\r\n panel18.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel2.add(panel18, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final Spacer spacer5 = new Spacer();\r\n mMainPanel.add(spacer5, new GridConstraints(5, 1, 10, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_NONE, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final JPanel panel19 = new JPanel();\r\n panel19.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel.add(panel19, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final JPanel panel20 = new JPanel();\r\n panel20.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel.add(panel20, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\r\n final Spacer spacer6 = new Spacer();\r\n panel1.add(spacer6, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final Spacer spacer7 = new Spacer();\r\n panel1.add(spacer7, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final Spacer spacer8 = new Spacer();\r\n panel1.add(spacer8, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n }",
"private void $$$setupUI$$$() {\n mainPanel = new JPanel();\n mainPanel.setLayout(new GridLayoutManager(6, 2, new Insets(0, 0, 0, 0), -1, -1));\n final JScrollPane scrollPane1 = new JScrollPane();\n scrollPane1.setVerticalScrollBarPolicy(22);\n scrollPane1.setVisible(true);\n mainPanel.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n mapTable = new MapTable();\n mapTable.setVisible(false);\n scrollPane1.setViewportView(mapTable);\n final JScrollPane scrollPane2 = new JScrollPane();\n scrollPane2.setVerticalScrollBarPolicy(22);\n mainPanel.add(scrollPane2, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(200, -1), null, 0, false));\n samplesList = new JList<>();\n samplesList.setSelectionMode(0);\n scrollPane2.setViewportView(samplesList);\n final JSeparator separator1 = new JSeparator();\n mainPanel.add(separator1, new GridConstraints(4, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n statusBox = new JComboBox<>();\n mainPanel.add(statusBox, new GridConstraints(5, 0, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(2, 5, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(panel1, new GridConstraints(2, 0, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n currentSampleLabel = new JLabel();\n currentSampleLabel.setText(\"<текущий образец>\");\n panel1.add(currentSampleLabel, new GridConstraints(0, 1, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"от:\");\n panel1.add(label1, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"до:\");\n panel1.add(label2, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n fromPosLabel = new JLabel();\n fromPosLabel.setText(\"<from>\");\n panel1.add(fromPosLabel, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n toPosLabel = new JLabel();\n toPosLabel.setText(\"<to>\");\n panel1.add(toPosLabel, new GridConstraints(1, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final Spacer spacer2 = new Spacer();\n panel1.add(spacer2, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 6, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(panel2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_SOUTH, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(372, 14), null, 0, false));\n boxesCountLabel = new JLabel();\n boxesCountLabel.setText(\"Кол-во коробок:\");\n panel2.add(boxesCountLabel, new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n currentPosLabel = new JLabel();\n currentPosLabel.setText(\"Позиция:\");\n panel2.add(currentPosLabel, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer3 = new Spacer();\n panel2.add(spacer3, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JLabel label3 = new JLabel();\n label3.setText(\"Номер отправки:\");\n panel2.add(label3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n shipmentNumberField = new JTextField();\n panel2.add(shipmentNumberField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_SOUTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(60, -1), null, 0, false));\n final Spacer spacer4 = new Spacer();\n panel2.add(spacer4, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridBagLayout());\n mainPanel.add(panel3, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(-1, 28), null, 0, false));\n sampleDeleteButton = new JButton();\n sampleDeleteButton.setIcon(new ImageIcon(getClass().getResource(\"/delSample16.png\")));\n sampleDeleteButton.setMinimumSize(new Dimension(-1, -1));\n sampleDeleteButton.setPreferredSize(new Dimension(32, -1));\n sampleDeleteButton.setText(\"\");\n GridBagConstraints gbc;\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.gridheight = 2;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.EAST;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel3.add(sampleDeleteButton, gbc);\n sampleEditButton = new JButton();\n sampleEditButton.setIcon(new ImageIcon(getClass().getResource(\"/change16.png\")));\n sampleEditButton.setMinimumSize(new Dimension(-1, -1));\n sampleEditButton.setPreferredSize(new Dimension(32, -1));\n sampleEditButton.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 0;\n gbc.gridheight = 2;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.EAST;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel3.add(sampleEditButton, gbc);\n sampleMoveUpButton = new JButton();\n sampleMoveUpButton.setIcon(new ImageIcon(getClass().getResource(\"/upSample10.png\")));\n sampleMoveUpButton.setMinimumSize(new Dimension(-1, -1));\n sampleMoveUpButton.setPreferredSize(new Dimension(32, -1));\n sampleMoveUpButton.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.EAST;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel3.add(sampleMoveUpButton, gbc);\n sampleMoveDownButton = new JButton();\n sampleMoveDownButton.setIcon(new ImageIcon(getClass().getResource(\"/downSample10.png\")));\n sampleMoveDownButton.setMinimumSize(new Dimension(-1, -1));\n sampleMoveDownButton.setPreferredSize(new Dimension(32, -1));\n sampleMoveDownButton.setText(\"\");\n sampleMoveDownButton.setVerticalAlignment(0);\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 1;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.EAST;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel3.add(sampleMoveDownButton, gbc);\n sampleAddButton = new JButton();\n sampleAddButton.setIcon(new ImageIcon(getClass().getResource(\"/addSample16.png\")));\n sampleAddButton.setMinimumSize(new Dimension(-1, -1));\n sampleAddButton.setPreferredSize(new Dimension(32, -1));\n sampleAddButton.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.gridheight = 2;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.EAST;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel3.add(sampleAddButton, gbc);\n final JPanel panel4 = new JPanel();\n panel4.setLayout(new GridLayoutManager(2, 3, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(panel4, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(180, -1), null, 0, false));\n loadListButton = new JButton();\n loadListButton.setIcon(new ImageIcon(getClass().getResource(\"/import16.png\")));\n loadListButton.setText(\"\");\n panel4.add(loadListButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(48, -1), null, 0, false));\n startButton = new JButton();\n startButton.setText(\"Начать работу\");\n panel4.add(startButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n debugButton = new JButton();\n debugButton.setText(\"debug\");\n panel4.add(debugButton, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n saveMapButton = new JButton();\n saveMapButton.setIcon(new ImageIcon(getClass().getResource(\"/save16.png\")));\n saveMapButton.setText(\"\");\n panel4.add(saveMapButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel2 = new javax.swing.JPanel();\n parent = new javax.swing.JPanel();\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jPlaylist = new javax.swing.JList();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n btnAdd = new javax.swing.JButton();\n btnOpen = new javax.swing.JButton();\n btnUp = new javax.swing.JButton();\n btnDown = new javax.swing.JButton();\n btnSave = new javax.swing.JButton();\n btnRemove = new javax.swing.JButton();\n btnClearAll = new javax.swing.JButton();\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 .addGap(0, 100, Short.MAX_VALUE)\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 100, Short.MAX_VALUE)\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(java.awt.Color.orange);\n\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Gambar/FB_IMG_1583291276227.jpg\"))); // NOI18N\n\n jLabel2.setForeground(new java.awt.Color(255, 255, 153));\n jLabel2.setText(\"2020@ChocoCalonPresidenRI\");\n\n jScrollPane1.setViewportView(jPlaylist);\n\n jLabel4.setFont(new java.awt.Font(\"Microsoft JhengHei\", 1, 18)); // NOI18N\n jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel4.setText(\"CHOCO PLANET MUSIC\");\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel5.setText(\"x\");\n jLabel5.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel5MouseClicked(evt);\n }\n });\n\n jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Gambar/back copy.PNG\"))); // NOI18N\n jLabel6.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel6MouseClicked(evt);\n }\n });\n\n jLabel7.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Gambar/play-2 copy.png\"))); // NOI18N\n jLabel7.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel7MouseClicked(evt);\n }\n });\n\n jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Gambar/stop.png\"))); // NOI18N\n jLabel8.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel8MouseClicked(evt);\n }\n });\n\n jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Gambar/next.PNG\"))); // NOI18N\n jLabel9.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel9MouseClicked(evt);\n }\n });\n\n btnAdd.setBackground(new java.awt.Color(255, 255, 204));\n btnAdd.setFont(new java.awt.Font(\"Tahoma\", 1, 9)); // NOI18N\n btnAdd.setText(\"ADD\");\n btnAdd.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAddActionPerformed(evt);\n }\n });\n\n btnOpen.setBackground(new java.awt.Color(255, 255, 204));\n btnOpen.setFont(new java.awt.Font(\"Tahoma\", 1, 9)); // NOI18N\n btnOpen.setText(\"OPEN\");\n btnOpen.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnOpenActionPerformed(evt);\n }\n });\n\n btnUp.setBackground(new java.awt.Color(255, 255, 204));\n btnUp.setFont(new java.awt.Font(\"Tahoma\", 1, 9)); // NOI18N\n btnUp.setText(\"UP\");\n btnUp.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnUpActionPerformed(evt);\n }\n });\n\n btnDown.setBackground(new java.awt.Color(255, 255, 204));\n btnDown.setFont(new java.awt.Font(\"Tahoma\", 1, 9)); // NOI18N\n btnDown.setText(\"DOWN\");\n btnDown.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnDownActionPerformed(evt);\n }\n });\n\n btnSave.setBackground(new java.awt.Color(255, 255, 204));\n btnSave.setFont(new java.awt.Font(\"Tahoma\", 1, 9)); // NOI18N\n btnSave.setText(\"SAVE\");\n btnSave.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSaveActionPerformed(evt);\n }\n });\n\n btnRemove.setBackground(new java.awt.Color(255, 255, 204));\n btnRemove.setFont(new java.awt.Font(\"Tahoma\", 1, 9)); // NOI18N\n btnRemove.setText(\"REMOVE\");\n btnRemove.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnRemoveActionPerformed(evt);\n }\n });\n\n btnClearAll.setBackground(new java.awt.Color(255, 255, 204));\n btnClearAll.setFont(new java.awt.Font(\"Tahoma\", 1, 9)); // NOI18N\n btnClearAll.setText(\"CLEAR ALL\");\n btnClearAll.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnClearAllActionPerformed(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(316, 316, 316)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 427, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabel5))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(94, 94, 94)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(46, 46, 46)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(52, 52, 52)\n .addComponent(jLabel8)\n .addGap(64, 64, 64)\n .addComponent(jLabel9))\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 535, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(32, 32, 32)\n .addComponent(btnAdd)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnOpen)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnUp)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnDown)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnSave)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnRemove)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnClearAll)))))\n .addGap(52, 52, 52))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addGap(13, 13, 13)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(8, 8, 8))))\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(43, 43, 43)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnUp)\n .addComponent(btnOpen)\n .addComponent(btnDown)\n .addComponent(btnSave)\n .addComponent(btnRemove)\n .addComponent(btnClearAll)\n .addComponent(btnAdd)))\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout parentLayout = new javax.swing.GroupLayout(parent);\n parent.setLayout(parentLayout);\n parentLayout.setHorizontalGroup(\n parentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(parentLayout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 809, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n parentLayout.setVerticalGroup(\n parentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(parentLayout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n 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(parent, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(parent, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }",
"private JPanel getTitlePanel(String title)\n {\n JLabel label = new JLabel(title);\n label.setBorder(new EmptyBorder(0, 0, 0, 10));\n label.setFont(UIManager.getFont(\"TitledBorder.font\"));\n label.setForeground(UIManager\n .getColor(\"TitledBorder.titleColor\"));\n\n JPanel pnlSectionName = new TransparentPanel();\n pnlSectionName.setLayout(new GridBagLayout());\n GridBagConstraints c = new GridBagConstraints();\n c.gridx = c.gridy = 0;\n c.anchor = GridBagConstraints.LINE_START;\n c.gridwidth = 2;\n pnlSectionName.add(label, c);\n c.gridx = 2;\n c.weightx = 1;\n c.fill = GridBagConstraints.HORIZONTAL;\n pnlSectionName.add(new JSeparator(), c);\n\n JPanel pnlSection = new TransparentPanel()\n {\n @Override\n public Component add(Component comp)\n {\n if(comp instanceof JComponent)\n ((JComponent)comp).setAlignmentX(LEFT_ALIGNMENT);\n return super.add(comp);\n }\n };\n pnlSection.setLayout(new BoxLayout(pnlSection, BoxLayout.Y_AXIS));\n pnlSection.add(pnlSectionName);\n\n return pnlSection;\n }",
"private void buildPanelSouth() {\n \tJThumbnailsRoll thumbsRoll = new JThumbnailsRoll(model);\r\n this.add(thumbsRoll, BorderLayout.SOUTH);\r\n \r\n }",
"public Bottom()\r\n {\r\n /*\r\n * num++; System.out.println(num); if(num>1) { num=1; dispose(); return;\r\n * }\r\n */\r\n // System.out.println(\"num<=1\");\r\n // this.setBounds(0, 765, 1280, 35);\r\n // this.setLayout(new GridLayout(1,11));\r\n setLayout(new FlowLayout());\r\n {\r\n jLabel1 = new JLabel();\r\n getContentPane().add(jLabel1);\r\n jLabel1.setText(\"\\u5f53\\u524d\\u64ad\\u653e\\u5217\\u8868\\uff1a\");\r\n }\r\n {\r\n {\r\n jSongList = new JList();\r\n // jSongList.setVisibleRowCount(7);\r\n jSongList.setAutoscrolls(true);\r\n // jScrollPane1.setViewportView(jSongList);\r\n refreshSongList();\r\n // jSongList.setPreferredSize(new java.awt.Dimension(187, 132));\r\n }\r\n jScrollPane1 = new JScrollPane(jSongList);\r\n // getContentPane().add(jScrollPane1);\r\n jScrollPane1.setPreferredSize(new java.awt.Dimension(187, 132));\r\n }\r\n accompany = new JButton(\"°é³ª\");\r\n suspend = new JButton(\"ÔÝÍ£\");\r\n final BorderLayout suspendLayout = new BorderLayout();\r\n suspend.setLayout(suspendLayout);\r\n // ImageIcon img = new ImageIcon(\"img/volumePlus.jpg\");\r\n volumePlus = new JButton(\"ÒôÁ¿+\");\r\n\r\n // volumePlus.setIcon(getImage(\"img\\\\volumePlus\"));\r\n volumeMinus = new JButton(\"ÒôÁ¿-\");\r\n changeSong = new JButton(\"Çиè\");\r\n playAgain = new JButton(\"ÖØ²¥\");\r\n stop = new JButton(\"Í£Ö¹\");\r\n quit = new JButton(\"Í˳ö\");\r\n // returnHome = new JButton(\"·µ»Ø\");\r\n // indexPage = new JButton(\"Ö÷Ò³\");\r\n\r\n volume = 100;\r\n this.add(jScrollPane1);\r\n this.add(accompany);\r\n this.add(suspend);\r\n this.add(volumePlus);\r\n this.add(volumeMinus);\r\n this.add(changeSong);\r\n this.add(playAgain);\r\n this.add(stop);\r\n this.add(quit);\r\n // this.add(returnHome);\r\n // this.add(indexPage);\r\n\r\n accompany.addActionListener(this);\r\n suspend.addActionListener(this);\r\n quit.addActionListener(this);\r\n playAgain.addActionListener(this);\r\n volumePlus.addActionListener(this);\r\n volumeMinus.addActionListener(this);\r\n changeSong.addActionListener(this);\r\n stop.addActionListener(this);\r\n quit.addActionListener(this);\r\n\r\n setUndecorated(true);\r\n final int screenWidth = java.awt.Toolkit.getDefaultToolkit()\r\n .getScreenSize().width;\r\n this.setLocation(screenWidth - 310, 480);\r\n this.setSize(240, 240);\r\n setVisible(true);\r\n setAlwaysOnTop(true);\r\n }",
"private Pane initHumanPlayerPane()\n {\n lbMyMoney = new Label();\n lbMyMoney.setText(\"1000\");\n\n // step 2. create a ListView object referred by the reference variable \"listViewHospital\" declared earlier.\n // (i.e. listViewHospital = new ListView<String>();)\n // This ListView object will be showing all the strings in the listViewHospitalItems list\n // one by one on the UI. listViewHospitalItems holds strings describing each of the departments in the hospital\n listViewHospital = new ListView<String>();\n listViewHospital.setItems(listViewHospitalItems);\n listViewHospital.setPrefSize(200, 200);\n\n // step 3. create a Label object to show the string \"My Hospital\" above the ListView\n // This label is for displaying the string \"My Hospital\" on the top of the human player department information\n // table\n Label lb = new Label(\"My Hospital\");\n lb.setPadding(new Insets(10,10,10,10));\n\n // step 4. create a Label object to show the string \"Department Waiting Cured Capacity Fee Upgrade-cost per bed\"\n // This label is for displaying the string \"\"Department Waiting Cured Capacity Fee Upgrade-cost per bed\"\"\n // on the top of the human player department information table\n Label lbMyHospitalTitle = new Label(\"Department Waiting Cured Capacity Fee Upgrade-cost per bed\");\n lbMyHospitalTitle.setPadding(new Insets(0,0,10,0));\n\n // step 5. create a Vbox()\n VBox paneMyHospital = new VBox();\n\n // step 6. put the label holding the string \"Department Waiting ...\" created above together with the ListView\n // listViewHospital into the empty vbox created above (i.e. vboxName.getChildren().addALL(lbMyHospitalTitle,listViewHospital),\n // where vboxName is the name of the Vbox() object you created above.\n paneMyHospital.getChildren().addAll(lbMyHospitalTitle, listViewHospital);\n\n // step 7. create another Vbox()\n // put the label holding the string \"My Hospital\" and the above Vbox object into this new Vbox object\n // setpadding, and setAlignment to the label(s) and the vbox as needed so that they are displayed\n // like the UI in the executable jar program\n VBox container = new VBox();\n container.getChildren().addAll(lb, paneMyHospital);\n container.setAlignment(Pos.CENTER);\n\n // step 8. The above steps shows you how to create the UI display for the \"My Hospital\" part at the upper left of the UI\n // use a similar approach to create the UI display for the \"My Doctors\" part at the right of the UI\n // the ListView for displaying the doctors is \"listViewDoctor\", the list holding all the doctor information in the form\n // of a string array is \"listViewDoctorItems\".\n listViewDoctor = new ListView<String>();\n listViewDoctor.setItems(listViewDoctorItems);\n listViewDoctor.setPrefSize(350, 200);\n\n Label lb2 = new Label(\"My Doctors\");\n lb2.setPadding(new Insets(10,10,10,10));\n\n Label lbMyDoctorTitle = new Label(\"Name Speciality Skill Level Salary Affiliation occupied\");\n lbMyDoctorTitle.setPadding(new Insets(0,0,10,0));\n\n VBox paneMyDoctor = new VBox();\n paneMyDoctor.getChildren().addAll(lbMyDoctorTitle, listViewDoctor);\n\n VBox container2 = new VBox();\n container2.getChildren().addAll(lb2, paneMyDoctor);\n container2.setAlignment(Pos.CENTER);\n\n // set up the handler to handle the click action on the restart button ( bt_restart)\n // given code\n bt_restart.setOnAction(e -> {\n try {\n handleRestart();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n });\n\n // set up the handler to handle click action on the \"Recruit Doctor\" button (bt_recruit_doctor)\n // given code\n bt_recruit_doctor.setOnAction(e -> handleRecruitDoctor());\n\n // step 9. set up the handlers for\n // a. bt_get_training button, (handled by handleGetTraining() )\n // b. bt_raise_fund button (handled by handleRaiseFund() )\n // c. bt_transfer_department button (handled by handleTransferDepartment())\n // d. bt_upgrade button (handled by handleUpgrade())\n bt_get_training.setOnAction(e -> handleGetTraining());\n bt_raise_fund.setOnAction(e -> handleRaiseFund());\n bt_transfer_department.setOnAction(e -> handleTransferDepartment());\n bt_upgrade.setOnAction(e -> handleUpgrade());\n\n // step 10. create a new TextField object referenced by the tfRecruit variable declared earlier\n // this is the text field for holding the name of the new recruited doctor by the human player\n tfRecruit = new TextField();\n\n // step 11. setPadding to all the buttons created above, so that they look like that of the executable jar\n bt_restart.setPadding(new Insets(5,0,5,0));\n bt_recruit_doctor.setPadding(new Insets(5,0,5,0));\n bt_get_training.setPadding(new Insets(5,0,5,0));\n bt_raise_fund.setPadding(new Insets(5,0,5,0));\n bt_transfer_department.setPadding(new Insets(5,0,5,0));\n bt_upgrade.setPadding(new Insets(5,0,5,0));\n\n // step 12. set the widths of all the buttons above to be 150 pixels\n // you can call the setPrefWidth() method. For example if you wish to set\n // the width of bt_restart button to be 150 pixels, you can do\n // bt_restart.setPrefWidth(150)\n bt_restart.setPrefWidth(150);\n bt_recruit_doctor.setPrefWidth(150);\n bt_get_training.setPrefWidth(150);\n bt_raise_fund.setPrefWidth(150);\n bt_transfer_department.setPrefWidth(150);\n bt_upgrade.setPrefWidth(150);\n\n // step 13. set the heights of all the buttons above to be 20 pixels\n // you can call the setPrefHeight() method. For example if you wish to set\n // the height of bt_restart button to be 20 pixels, you can do\n // bt_restart.setPrefHeight(20)\n bt_restart.setPrefHeight(20);\n bt_recruit_doctor.setPrefHeight(20);\n bt_get_training.setPrefHeight(20);\n bt_raise_fund.setPrefHeight(20);\n bt_transfer_department.setPrefHeight(20);\n bt_upgrade.setPrefHeight(20);\n\n // step 14. create a Hbox object\n // add tfRecruit, bt_recruit_doctor to this Hbox object, so that the name of the recruit doctor and the\n // recruit button are in the same horizon row\n // then create a Vbox object to hold all the above buttons together with the Hbox object you just created\n // vertically\n HBox hb_recruit = new HBox();\n hb_recruit.getChildren().addAll(tfRecruit, bt_recruit_doctor);\n\n VBox vb_button = new VBox();\n vb_button.getChildren().addAll(bt_restart, hb_recruit, bt_get_training, bt_raise_fund, bt_transfer_department, bt_upgrade);\n vb_button.setAlignment(Pos.CENTER_RIGHT);\n vb_button.setSpacing(10);\n\n // step 15. create a Hbox object\n // add the hospital image (imageHumanPlayer), the Vbox in step 7, and a similar Vbox in step 8, together with\n // the Vbox in step 14 for holding all the buttons to this new Hbox object\n HBox hb_player = new HBox();\n hb_player.getChildren().addAll(imageHumanPlayer, container, container2, vb_button);\n hb_player.setSpacing(20);\n hb_player.setAlignment(Pos.CENTER);\n\n // step 16. create a Vbox object\n // add the lbMyMoney label and the Hbox created in step 15 to this Vbox\n // setAlignment and setPadding to this Hbox as deemed needed\n // return this Vbox object as the return value of this method.\n // mind that a Vbox is also a Pane, so it is consistent with the return value declaration in the method header\n // if it works correctly, then congratulations! You have created the UI for the human player using JavaFX code\n // if it does not work, please patiently spend the time to carefully go through all the 16 steps. In particular for step 8,\n // that single step is in fact a big step consists similar code to steps 2-7.\n VBox pane = new VBox();\n lbMyMoney.setPadding(new Insets(0,100,5,250));\n pane.getChildren().addAll(lbMyMoney, hb_player);\n pane.setAlignment(Pos.CENTER_LEFT);\n\n return pane;\n }",
"public void displayPositionUI(){\n\t\tfor (Player p: gameLogic.getArrayOfPlayers().getArrayOfPlayers()) {\n\n\t\t\tif (p.getPlayerId() == 0) {\n\t\t\t\tif (!(positionList.isEmpty())) {\n\t\t\t\t\tfor (JLabel item : positionList) {\n\t\t\t\t\t\testimationGame.getContentPane().remove(item);\n\t\t\t\t\t}\n\t\t\t\t\tpositionList.clear();\n\t\t\t\t}\n\n\t\t\t\tJLabel lblPosition = new JLabel(\"Position: \" + (p.getPosition()+1));\n\n\t\t\t\tspringLayout.putConstraint(SpringLayout.WEST, lblPosition, 295, SpringLayout.WEST,\n\t\t\t\t\t\testimationGame.getContentPane());\n\t\t\t\tlblPosition.setForeground(Color.WHITE);\n\t\t\t\tspringLayout.putConstraint(SpringLayout.NORTH, lblPosition, 555, SpringLayout.NORTH,\n\t\t\t\t\t\testimationGame.getContentPane());\n\t\t\t\tlblPosition.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\n\t\t\t\tpositionList.add(lblPosition);\n\t\t\t\testimationGame.getContentPane().add(lblPosition);\n\t\t\t}\n\n\t\t\tif (p.getPlayerId() == 1) {\n\t\t\t\tif (!(positionList1.isEmpty())) {\n\t\t\t\t\tfor (JLabel item : positionList1) {\n\t\t\t\t\t\testimationGame.getContentPane().remove(item);\n\t\t\t\t\t}\n\t\t\t\t\tpositionList1.clear();\n\t\t\t\t}\n\n\t\t\t\tJLabel lblPosition1 = new JLabel(\"Position: \" + (p.getPosition()+1));\n\n\t\t\t\tspringLayout.putConstraint(SpringLayout.WEST, lblPosition1, 190, SpringLayout.WEST,\n\t\t\t\t\t\testimationGame.getContentPane());\n\t\t\t\tlblPosition1.setForeground(Color.WHITE);\n\t\t\t\tspringLayout.putConstraint(SpringLayout.NORTH, lblPosition1, 440, SpringLayout.NORTH,\n\t\t\t\t\t\testimationGame.getContentPane());\n\t\t\t\tlblPosition1.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\n\t\t\t\tpositionList1.add(lblPosition1);\n\t\t\t\testimationGame.getContentPane().add(lblPosition1);\n\t\t\t}\n\n\t\t\tif (p.getPlayerId() == 2) {\n\t\t\t\tif (!(positionList2.isEmpty())) {\n\t\t\t\t\tfor (JLabel item : positionList2) {\n\t\t\t\t\t\testimationGame.getContentPane().remove(item);\n\t\t\t\t\t}\n\t\t\t\t\tpositionList2.clear();\n\t\t\t\t}\n\n\t\t\t\tJLabel lblPosition2 = new JLabel(\"Position: \" + (p.getPosition()+1));\n\n\t\t\t\tspringLayout.putConstraint(SpringLayout.WEST, lblPosition2, 275, SpringLayout.WEST,\n\t\t\t\t\t\testimationGame.getContentPane());\n\t\t\t\tlblPosition2.setForeground(Color.WHITE);\n\t\t\t\tspringLayout.putConstraint(SpringLayout.NORTH, lblPosition2, 150, SpringLayout.NORTH,\n\t\t\t\t\t\testimationGame.getContentPane());\n\t\t\t\tlblPosition2.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\n\t\t\t\tpositionList2.add(lblPosition2);\n\t\t\t\testimationGame.getContentPane().add(lblPosition2);\n\t\t\t}\n\n\t\t\tif (p.getPlayerId() == 3) {\n\t\t\t\tif (!(positionList3.isEmpty())) {\n\t\t\t\t\tfor (JLabel item : positionList3) {\n\t\t\t\t\t\testimationGame.getContentPane().remove(item);\n\t\t\t\t\t}\n\t\t\t\t\tpositionList3.clear();\n\t\t\t\t}\n\n\t\t\t\tJLabel lblPosition3 = new JLabel(\"Position: \" + (p.getPosition()+1));\n\n\t\t\t\tspringLayout.putConstraint(SpringLayout.WEST, lblPosition3, 620, SpringLayout.WEST,\n\t\t\t\t\t\testimationGame.getContentPane());\n\t\t\t\tlblPosition3.setForeground(Color.WHITE);\n\t\t\t\tspringLayout.putConstraint(SpringLayout.NORTH, lblPosition3, 440, SpringLayout.NORTH,\n\t\t\t\t\t\testimationGame.getContentPane());\n\t\t\t\tlblPosition3.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\n\t\t\t\tpositionList3.add(lblPosition3);\n\t\t\t\testimationGame.getContentPane().add(lblPosition3);\n\t\t\t}\n\t\t}\n\n\t\testimationGame.validate();\n\t\testimationGame.repaint();\n\t}",
"private JLabel createSection2() {\r\n\t\t\r\n\t\tJLabel section2 = new JLabel(\"How To Join A Table\");\r\n\t\t//section1.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\t//section1.setVerticalAlignment(SwingConstants.TOP);\r\n\t\tsection2.setFont(new Font(\"DejaVu Sans\", Font.PLAIN, 15));\r\n\t\tsection2.setForeground(Color.WHITE);\r\n\t\t\r\n\t\t// open subsections when clicked\r\n\t\tsection2.addMouseListener(new ClickListener());\r\n\t\t\r\n\t\treturn section2;\r\n\t\t\r\n\t}",
"public ItemsControl() {\t\t\t\t\n\t\tlistListener = new SourceListChangeListener();\n\n\t\tBoxLayout boxLayout = new BoxLayout(this, BoxLayout.Y_AXIS);\n\t\tsetLayout(boxLayout);\t\t\t\t\n\t\tif (Beans.isDesignTime()) {\t\t\t\n\t\t\tJLabel designTimeCaptionLbl = new JLabel(\"<ItemsControl>\");\t\t\t\t\t\t\n\t\t\tthis.add(designTimeCaptionLbl);\n\t\t}\n\t}",
"private void $$$setupUI$$$() {\n createUIComponents();\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel.setMinimumSize(new Dimension(-1, -1));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n nodeList.setSelectionMode(1);\n scrollPane1.setViewportView(nodeList);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel.add(panel1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n addNodeButton = new JButton();\n this.$$$loadButtonText$$$(addNodeButton, ResourceBundle.getBundle(\"language\").getString(\"button_addNode\"));\n panel1.add(addNodeButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n removeNodeButton = new JButton();\n this.$$$loadButtonText$$$(removeNodeButton, ResourceBundle.getBundle(\"language\").getString(\"button_removeNode\"));\n panel1.add(removeNodeButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n Font label1Font = this.$$$getFont$$$(\"Droid Sans Mono\", Font.BOLD, 16, label1.getFont());\n if (label1Font != null) label1.setFont(label1Font);\n this.$$$loadLabelText$$$(label1, ResourceBundle.getBundle(\"language\").getString(\"title_nodes\"));\n panel.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }",
"protected void createMainPanel() {\n\t\tthis.mainPanel = new VerticalPanel(); \n\t\tthis.mainPanel.setSpacing(5);\n\t\tthis.mainPanel.setScrollMode(getScrollMode());\n\t}",
"public RowsPriorityLabel(int rows) {\n\t\t\n\t\t// init. and setup label array\n\t\tthis.setLayout(new GridLayout(rows, 1));\n\t\t\n\t\trowPriority = new int[rows];\t\n\t\trowPriorityLabel = new PriorityLabel[rows];\t\n\t\t\n\t\tfor (int i=0; i < rows; i++) {\n\t\t\t//create, initialize, and add to the array\n\t\t\trowPriorityLabel[i] = new PriorityLabel(\" P \");\n\t\t\tthis.add(rowPriorityLabel[i]);\n\t\t}\t\n\t}",
"private void buildUserDataPanel() {\r\n\t\tJPanel user_info_panel = new JPanel();\r\n\t\tuser_info_panel.setBorder(new BevelBorder(BevelBorder.LOWERED, null,\r\n\t\t\t\tnull, null, null));\r\n\t\tuser_info_panel.setBackground(INNER_BACKGROUND_COLOR);\r\n\t\tuser_info_panel.setBounds(201, 234, 213, 100);\r\n\t\tuser_info_panel.setLayout(new GridLayout(3, 2));\r\n\t\tJLabel label_2 = new JLabel(\" User:\");\r\n\t\tlabel_2.setFont(new Font(\"Tahoma\", Font.BOLD, 11));\r\n\t\tuser_info_panel.add(label_2);\r\n\t\tJLabel label = new JLabel(\"Biff McMann\");\r\n\t\tlabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 11));\r\n\t\tuser_info_panel.add(label);\r\n\t\tJLabel label_3 = new JLabel(\" Position:\");\r\n\t\tlabel_3.setFont(new Font(\"Tahoma\", Font.BOLD, 11));\r\n\t\tuser_info_panel.add(label_3);\r\n\t\tJLabel label_1 = new JLabel(\"Program Chair\");\r\n\t\tlabel_1.setFont(new Font(\"Tahoma\", Font.PLAIN, 11));\r\n\t\tuser_info_panel.add(label_1);\r\n\t\tJLabel label_4 = new JLabel(\" Date:\");\r\n\t\tlabel_4.setFont(new Font(\"Tahoma\", Font.BOLD, 11));\r\n\t\tuser_info_panel.add(label_4);\r\n\t\tJLabel label_5 = new JLabel(\"9/23/2013\");\r\n\t\tlabel_5.setFont(new Font(\"Tahoma\", Font.PLAIN, 11));\r\n\t\tuser_info_panel.add(label_5);\r\n\t\tmain_panel.add(user_info_panel);\r\n\r\n\t}",
"private JPanel createScrollPaneProducts() {\n\n JPanel panelScroll = new JPanel(new GridLayout());\n panelScroll.setBorder(BorderFactory.createTitledBorder(PADDING_BORDER,\n \"Products List: \", TitledBorder.LEFT, TitledBorder.TOP));\n\n this.productsList = this.demonstrationApplicationController.getProductsList();\n this.jListProduct = new JList(new ModelListSelectable(this.productsList));\n JScrollPane scrollPane = new JScrollPane(jListProduct);\n scrollPane.setBorder(PADDING_BORDER);\n\n panelScroll.add(scrollPane);\n\n return panelScroll;\n }",
"public JComponent createTopPanel() {\n\n\t//\tcontent();\n\t\tfields = new JTextField[NBR_FIELDS];\n\t\tmyTable = new PalletTable(db);\n\t\ttable = new JTable(myTable);\n\t\ttable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);\n\t\ttable.setPreferredScrollableViewportSize(new Dimension(750, 100));\n table.setFillsViewportHeight(true);\n\t\tscroll = new JScrollPane(table);\n\t//\tcontent();\n\t\tmainPanel= new JPanel();\n\t\tmainPanel.setLayout(new GridBagLayout());\n\t\tGridBagConstraints c = new GridBagConstraints();\n\t\tc.gridy=0;\n\t\tmainPanel.add(scroll,c);\n\t\tc.gridy=1;\n\t\tmainPanel.add(content(),c);\n\t\t//scroll.setPreferredSize(new Dimension(300,250));\n\t\treturn mainPanel;\n\t}",
"private void $$$setupUI$$$() {\n createUIComponents();\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.add(scrollPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n scrollPane1.setViewportView(table);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));\n panel.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonRegister = new JButton();\n buttonRegister.setText(\"Track\");\n panel1.add(buttonRegister, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonMenu = new JButton();\n buttonMenu.setText(\"Menu\");\n panel1.add(buttonMenu, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n }",
"void LienaDivisoria(){\r\n \t\r\n VerticalLayout LayoutLineaDivisoria = new VerticalLayout();\r\n LayoutLineaDivisoria.setWidth(\"1024px\");\r\n LayoutLineaDivisoria.setHeight(\"5px\");\r\n LayoutLineaDivisoria.setStyleName(EstiloCSS + \"LayoutLineaDicisoria\");\r\n layout.addComponent(LayoutLineaDivisoria, \"left: 0px; top: 450px;\"); \r\n\r\n }",
"public void actPanel(VentanaMedico vm,Medico m, int leido, int diag,Vector<ECG> auxec,Vector<Paciente> auxpac) {\n\trey4.setVisible(false);\n\trey4.removeAll();\n\t\n\trey4.setOpaque(false);\n\trey4.setLayout(new BoxLayout(rey4,BoxLayout.Y_AXIS));\n\n\tint cont=0;\n\tfor(int i= 0;i<auxec.size();i++){\n\t\tif(leido==0 && diag==0) {\n\t\t\tPanelPaciente pan = new PanelPaciente(auxpac.get(i),auxec.get(i));\n\t\t\tpan.setBorder(new LineBorder(Color.gray, 2));\n\t\t\tpan.addMouseListener(new ControladorPanelM(vm,auxpac.get(i), m,auxec.get(i),0));\n\t\t\tJPanel invi = new JPanel();\n\t\t\tinvi.setOpaque(false);\n\t\t\trey4.add(pan);\t\n\t\t\trey4.add(invi);\n\t\t\tcont++;\n\t\t} else {\n\t\t\tif(leido==-1) {\n\t\t\t\tif(diag==-1) {\n\t\t\t\t\tif(auxec.get(i).isLeido()==false && auxec.get(i).getDiagnostico().isEmpty()) {\n\t\t\t\t\t\tPanelPaciente pan = new PanelPaciente(auxpac.get(i),auxec.get(i));\n\t\t\t\t\t\tpan.setBorder(new LineBorder(Color.gray, 2));\n\t\t\t\t\t\tpan.addMouseListener(new ControladorPanelM(vm,auxpac.get(i), m,auxec.get(i),0));\n\t\t\t\t\t\tJPanel invi = new JPanel();\n\t\t\t\t\t\tinvi.setOpaque(false);\n\t\t\t\t\t\trey4.add(pan);\t\n\t\t\t\t\t\trey4.add(invi);\n\t\t\t\t\t\tcont++;\n\t\t\t\t\t}\n\t\t\t\t} else if(diag==1){\n\t\t\t\t\tif(auxec.get(i).isLeido()==false && !auxec.get(i).getDiagnostico().isEmpty()) {\n\t\t\t\t\t\tPanelPaciente pan = new PanelPaciente(auxpac.get(i),auxec.get(i));\n\t\t\t\t\t\tpan.setBorder(new LineBorder(Color.gray, 2));\n\t\t\t\t\t\tpan.addMouseListener(new ControladorPanelM(vm,auxpac.get(i), m,auxec.get(i),0));\n\t\t\t\t\t\tJPanel invi = new JPanel();\n\t\t\t\t\t\tinvi.setOpaque(false);\n\t\t\t\t\t\trey4.add(pan);\t\n\t\t\t\t\t\trey4.add(invi);\n\t\t\t\t\t\tcont++;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif(auxec.get(i).isLeido()==false) {\n\t\t\t\t\t\tPanelPaciente pan = new PanelPaciente(auxpac.get(i),auxec.get(i));\n\t\t\t\t\t\tpan.setBorder(new LineBorder(Color.gray, 2));\n\t\t\t\t\t\tpan.addMouseListener(new ControladorPanelM(vm,auxpac.get(i), m,auxec.get(i),0));\n\t\t\t\t\t\tJPanel invi = new JPanel();\n\t\t\t\t\t\tinvi.setOpaque(false);\n\t\t\t\t\t\trey4.add(pan);\t\n\t\t\t\t\t\trey4.add(invi);\n\t\t\t\t\t\tcont++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if(leido==1){\n\t\t\t\tif(diag==-1) {\n\t\t\t\t\tif(auxec.get(i).isLeido()==true && auxec.get(i).getDiagnostico().isEmpty()) {\n\t\t\t\t\t\tPanelPaciente pan = new PanelPaciente(auxpac.get(i),auxec.get(i));\n\t\t\t\t\t\tpan.setBorder(new LineBorder(Color.gray, 2));\n\t\t\t\t\t\tpan.addMouseListener(new ControladorPanelM(vm,auxpac.get(i), m,auxec.get(i),0));\n\t\t\t\t\t\tJPanel invi = new JPanel();\n\t\t\t\t\t\tinvi.setOpaque(false);\n\t\t\t\t\t\trey4.add(pan);\t\n\t\t\t\t\t\trey4.add(invi);\n\t\t\t\t\t\tcont++;\n\t\t\t\t\t}\n\t\t\t\t} else if(diag==1){\n\t\t\t\t\tif(auxec.get(i).isLeido()==true && !auxec.get(i).getDiagnostico().isEmpty()) {\n\t\t\t\t\t\tPanelPaciente pan = new PanelPaciente(auxpac.get(i),auxec.get(i));\n\t\t\t\t\t\tpan.setBorder(new LineBorder(Color.gray, 2));\n\t\t\t\t\t\tpan.addMouseListener(new ControladorPanelM(vm,auxpac.get(i), m,auxec.get(i),0));\n\t\t\t\t\t\tJPanel invi = new JPanel();\n\t\t\t\t\t\tinvi.setOpaque(false);\n\t\t\t\t\t\trey4.add(pan);\t\n\t\t\t\t\t\trey4.add(invi);\n\t\t\t\t\t\tcont++;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif(auxec.get(i).isLeido()==true) {\n\t\t\t\t\t\tPanelPaciente pan = new PanelPaciente(auxpac.get(i),auxec.get(i));\n\t\t\t\t\t\tpan.setBorder(new LineBorder(Color.gray, 2));\n\t\t\t\t\t\tpan.addMouseListener(new ControladorPanelM(vm,auxpac.get(i), m,auxec.get(i),0));\n\t\t\t\t\t\tJPanel invi = new JPanel();\n\t\t\t\t\t\tinvi.setOpaque(false);\n\t\t\t\t\t\trey4.add(pan);\t\n\t\t\t\t\t\trey4.add(invi);\n\t\t\t\t\t\tcont++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if(leido==0) {\n\t\t\t\tif(diag==-1) {\n\t\t\t\t\tif(auxec.get(i).getDiagnostico().isEmpty()) {\n\t\t\t\t\t\tPanelPaciente pan = new PanelPaciente(auxpac.get(i),auxec.get(i));\n\t\t\t\t\t\tpan.setBorder(new LineBorder(Color.gray, 2));\n\t\t\t\t\t\tpan.addMouseListener(new ControladorPanelM(vm,auxpac.get(i), m,auxec.get(i),0));\n\t\t\t\t\t\tJPanel invi = new JPanel();\n\t\t\t\t\t\tinvi.setOpaque(false);\n\t\t\t\t\t\trey4.add(pan);\t\n\t\t\t\t\t\trey4.add(invi);\n\t\t\t\t\t\tcont++;\n\t\t\t\t\t}\n\t\t\t\t} else if(diag==1){\n\t\t\t\t\tif(!auxec.get(i).getDiagnostico().isEmpty()) {\n\t\t\t\t\t\tPanelPaciente pan = new PanelPaciente(auxpac.get(i),auxec.get(i));\n\t\t\t\t\t\tpan.setBorder(new LineBorder(Color.gray, 2));\n\t\t\t\t\t\tpan.addMouseListener(new ControladorPanelM(vm,auxpac.get(i), m,auxec.get(i),0));\n\t\t\t\t\t\tJPanel invi = new JPanel();\n\t\t\t\t\t\tinvi.setOpaque(false);\n\t\t\t\t\t\trey4.add(pan);\t\n\t\t\t\t\t\trey4.add(invi);\n\t\t\t\t\t\tcont++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\tif(cont<10) {\n\t\tfor(int i= cont;i<10;i++){\n\t\t\tJPanel relle=new JPanel();\n\t\t\trelle.setLayout(new BorderLayout());\n\t\t\tJButton b=new JButton();\n\t\t\tb.setContentAreaFilled(false);\n\t\t\tb.setOpaque(false);\n\t\t\tb.setBorderPainted(false);\n\t\t\trelle.add(b,BorderLayout.CENTER);\n\t\t\trelle.setOpaque(false);\n\t\t\trey4.add(relle);\n\t\t}\n\t}\n\trey4.setVisible(true);\n}",
"@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 }",
"private void $$$setupUI$$$() {\n statusPanel = new JPanel();\n statusPanel.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));\n statusLabel = new JLabel();\n statusLabel.setText(\"Status Label\");\n statusPanel.add(statusLabel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JSeparator separator1 = new JSeparator();\n statusPanel.add(separator1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n }",
"void addPanel() {\n \tPanel panel = new Panel();\r\n\r\n panel.setLayout(new GridLayout(4, 1));\r\n jSliderBrightness = makeTitledSilder(\"Helligkeit\", 0, 256, 128); // werte veraendert\r\n jSliderContrast = makeTitledSilder(\"Kontrast\", 0, 10, 5);\r\n jSliderSaturation = makeTitledSilder(\"Sättigung\", 0, 9, 4);\r\n jSliderHue = makeTitledSilder(\"Hue\", 0, 360, 0);\r\n //jSliderContrast = makeTitledSilder(\"Slider2-Wert\", 0, 100, 50);\r\n panel.add(jSliderBrightness);\r\n panel.add(jSliderContrast);\r\n panel.add(jSliderSaturation);\r\n panel.add(jSliderHue);\r\n \r\n add(panel);\r\n \r\n pack();\r\n }",
"private void initInfo() {\r\n\t\tthis.panelInfo = new JPanel();\r\n\t\tthis.panelInfo.setLayout(new BoxLayout(this.panelInfo,\r\n\t\t\t\tBoxLayout.PAGE_AXIS));\r\n\t\tJPanel filterInfoPanel = new JPanel();\r\n\t\tfilterInfoPanel.setLayout(new GridLayout(4, 2, 10, 10));\r\n\t\tJLabel labelInformation = new JLabel(\"Information\");\r\n\t\tif (dlm.getSize() > 0) {\r\n\t\t\tWeapon weapon = this.tableWeapon.getWeapon((String) this.list\r\n\t\t\t\t\t.getSelectedValue());\r\n\r\n\t\t\tlabelInformation.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\t\tJLabel labelName = new JLabel(\"Name\");\r\n\t\t\tJLabel labelNameInfo = new JLabel(weapon.getName());\r\n\t\t\tJLabel labelDamage = new JLabel(\"Damages\");\r\n\t\t\tJLabel labelDamageInfo = new JLabel(String.valueOf(weapon\r\n\t\t\t\t\t.getDamagesMinimum())\r\n\t\t\t\t\t+ \" - \"\r\n\t\t\t\t\t+ String.valueOf(weapon.getDamagesMaximum()));\r\n\t\t\tJLabel labelPrice = new JLabel(\"Price\");\r\n\t\t\tJLabel labelPriceInfo = new JLabel(\r\n\t\t\t\t\tString.valueOf(weapon.getPrice()));\r\n\t\t\tJLabel labelType = new JLabel(\"Types\");\r\n\t\t\tJLabel labelTypeInfo = new JLabel(\r\n\t\t\t\t\t(String) this.comboBoxType.getSelectedItem());\r\n\t\t\tfilterInfoPanel.add(labelName);\r\n\t\t\tfilterInfoPanel.add(labelNameInfo);\r\n\t\t\tfilterInfoPanel.add(labelDamage);\r\n\t\t\tfilterInfoPanel.add(labelDamageInfo);\r\n\t\t\tfilterInfoPanel.add(labelPrice);\r\n\t\t\tfilterInfoPanel.add(labelPriceInfo);\r\n\t\t\tfilterInfoPanel.add(labelType);\r\n\t\t\tfilterInfoPanel.add(labelTypeInfo);\r\n\r\n\t\t} else {\r\n\r\n\t\t\tlabelInformation.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\t\tJLabel labelName = new JLabel(\"Name\");\r\n\t\t\tJLabel labelNameInfo = new JLabel();\r\n\t\t\tJLabel labelDamage = new JLabel(\"Damages\");\r\n\t\t\tJLabel labelDamageInfo = new JLabel();\r\n\t\t\tJLabel labelPrice = new JLabel(\"Price\");\r\n\t\t\tJLabel labelPriceInfo = new JLabel();\r\n\t\t\tJLabel labelType = new JLabel(\"Types\");\r\n\t\t\tJLabel labelTypeInfo = new JLabel();\r\n\t\t\tfilterInfoPanel.add(labelName);\r\n\t\t\tfilterInfoPanel.add(labelNameInfo);\r\n\t\t\tfilterInfoPanel.add(labelDamage);\r\n\t\t\tfilterInfoPanel.add(labelDamageInfo);\r\n\t\t\tfilterInfoPanel.add(labelPrice);\r\n\t\t\tfilterInfoPanel.add(labelPriceInfo);\r\n\t\t\tfilterInfoPanel.add(labelType);\r\n\t\t\tfilterInfoPanel.add(labelTypeInfo);\r\n\t\t}\r\n\r\n\t\tthis.panelInfo.add(labelInformation);\r\n\t\tthis.panelInfo.add(Box.createRigidArea(new Dimension(0, 10)));\r\n\t\tthis.panelInfo.add(filterInfoPanel);\r\n\t\tthis.panelInfo.add(Box.createRigidArea(new Dimension(0, 3)));\r\n\t\tthis.panelInfo.setBorder(BorderFactory.createLineBorder(Color.black));\r\n\t}",
"public void addPanelForResult(GridPane gridPane) {\n\t\tint nbrCols = gridPane.getColumnCount(); \n\t\tint nbrRows = gridPane.getRowCount();\n\t\tfor(int i =0; i<nbrRows; i++) {\n\t\t\tPane pane = new Pane(); \n\t\t\tpane.setStyle(\"-fx-background-color: #FFFFFF;\"); \n\n\t\t\tLabel label = new Label(\"C\"+(i+1)); \n\t\t\tgridPane.add(pane,0, i);\n\t\t\tgridPane.add(label, 0,i);\n\t\t\tGridPane.setHalignment(label, HPos.CENTER);\n\n\t\t}\n\n\t\t// Ajout d'un panel aux autres cellules \n\t\tfor(int i=1; i<=nbrCols; i++) {\n\t\t\tfor(int j=0; j<=nbrRows; j++) {\n\t\t\t\tPane pane = new Pane(); \n\t\t\t\tpane.setStyle(\"-fx-border-color: black; -fx-border-width: 1 1 0 0;\");\n\n\t\t\t\tgridPane.add(pane, i, j);\n\t\t\t}\n\t\t}\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n menuBar1 = new java.awt.MenuBar();\n menu1 = new java.awt.Menu();\n menu2 = new java.awt.Menu();\n jPanel2 = new javax.swing.JPanel();\n lblTienda5 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jList1 = new javax.swing.JList<>();\n jPanel3 = new javax.swing.JPanel();\n jScrollPane2 = new javax.swing.JScrollPane();\n jPanel5 = new javax.swing.JPanel();\n jPanel6 = new javax.swing.JPanel();\n jLabel7 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n jPanel14 = new javax.swing.JPanel();\n jLabel39 = new javax.swing.JLabel();\n jLabel40 = new javax.swing.JLabel();\n jLabel41 = new javax.swing.JLabel();\n jLabel42 = new javax.swing.JLabel();\n jPanel15 = new javax.swing.JPanel();\n jLabel43 = new javax.swing.JLabel();\n jLabel44 = new javax.swing.JLabel();\n jLabel45 = new javax.swing.JLabel();\n jLabel46 = new javax.swing.JLabel();\n jPanel17 = new javax.swing.JPanel();\n jLabel37 = new javax.swing.JLabel();\n jLabel47 = new javax.swing.JLabel();\n jLabel48 = new javax.swing.JLabel();\n jPanel18 = new javax.swing.JPanel();\n jLabel49 = new javax.swing.JLabel();\n jLabel50 = new javax.swing.JLabel();\n jLabel51 = new javax.swing.JLabel();\n jPanel10 = new javax.swing.JPanel();\n jLabel23 = new javax.swing.JLabel();\n jLabel24 = new javax.swing.JLabel();\n jLabel26 = new javax.swing.JLabel();\n jPanel11 = new javax.swing.JPanel();\n jLabel27 = new javax.swing.JLabel();\n jLabel28 = new javax.swing.JLabel();\n jLabel30 = new javax.swing.JLabel();\n jPanel12 = new javax.swing.JPanel();\n jLabel31 = new javax.swing.JLabel();\n jLabel32 = new javax.swing.JLabel();\n jLabel34 = new javax.swing.JLabel();\n jPanel19 = new javax.swing.JPanel();\n jLabel52 = new javax.swing.JLabel();\n jLabel53 = new javax.swing.JLabel();\n jLabel54 = new javax.swing.JLabel();\n jPanel13 = new javax.swing.JPanel();\n jLabel35 = new javax.swing.JLabel();\n jLabel36 = new javax.swing.JLabel();\n jLabel38 = new javax.swing.JLabel();\n jPanel16 = new javax.swing.JPanel();\n jLabel25 = new javax.swing.JLabel();\n jLabel29 = new javax.swing.JLabel();\n jLabel33 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n lblTienda4 = new javax.swing.JLabel();\n lblTienda2 = new javax.swing.JLabel();\n lblTienda1 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n\n menu1.setLabel(\"File\");\n menuBar1.add(menu1);\n\n menu2.setLabel(\"Edit\");\n menuBar1.add(menu2);\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setSize(new java.awt.Dimension(1440, 1080));\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jPanel2.setBackground(new java.awt.Color(0, 0, 0, 50));\n jPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jPanel2.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n lblTienda5.setFont(new java.awt.Font(\"Lucida Bright\", 0, 28)); // NOI18N\n lblTienda5.setForeground(new java.awt.Color(255, 255, 255));\n lblTienda5.setText(\"Mis juegos\");\n lblTienda5.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n lblTienda5MouseEntered(evt);\n }\n });\n jPanel2.add(lblTienda5, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 50, 190, 50));\n\n jList1.setBackground(new java.awt.Color(6, 11, 25));\n jList1.setFont(new java.awt.Font(\"Microsoft YaHei UI Light\", 1, 18)); // NOI18N\n jList1.setForeground(new java.awt.Color(204, 204, 204));\n jList1.setModel(new javax.swing.AbstractListModel<String>() {\n String[] strings = { \"Assasins Creed: Valhala\", \"Call of Duty Cold War\" };\n public int getSize() { return strings.length; }\n public String getElementAt(int i) { return strings[i]; }\n });\n jList1.setSelectionBackground(new java.awt.Color(102, 153, 255));\n jScrollPane1.setViewportView(jList1);\n\n jPanel2.add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 110, 250, 380));\n\n getContentPane().add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 80, 310, 960));\n\n jPanel3.setBackground(new java.awt.Color(0, 0, 0, 100));\n jPanel3.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jScrollPane2.setToolTipText(\"\");\n jScrollPane2.setHorizontalScrollBar(null);\n\n jPanel5.setBackground(new java.awt.Color(6, 11, 25));\n jPanel5.setForeground(new java.awt.Color(27, 21, 21));\n jPanel5.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jPanel6.setBackground(new java.awt.Color(6, 11, 25));\n jPanel6.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255)));\n jPanel6.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel7.setBackground(new java.awt.Color(255, 255, 255));\n jLabel7.setFont(new java.awt.Font(\"Candara Light\", 1, 24)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(204, 204, 204));\n jLabel7.setText(\"Call of Duty®: Black Ops II\");\n jPanel6.add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 10, 370, 110));\n\n jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Img/blackops2_miniatura.jpg\"))); // NOI18N\n jPanel6.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 380, 210));\n\n jLabel14.setFont(new java.awt.Font(\"Candara Light\", 1, 24)); // NOI18N\n jLabel14.setForeground(new java.awt.Color(255, 255, 255));\n jLabel14.setText(\"V: 4.9/5\");\n jPanel6.add(jLabel14, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 120, 180, 100));\n\n jPanel14.setBackground(new java.awt.Color(6, 11, 25));\n jPanel14.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255)));\n jPanel14.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel39.setBackground(new java.awt.Color(255, 255, 255));\n jLabel39.setFont(new java.awt.Font(\"Candara Light\", 1, 48)); // NOI18N\n jLabel39.setForeground(new java.awt.Color(204, 204, 204));\n jLabel39.setText(\"Call of Duty®: Black Ops Cold War\");\n jPanel14.add(jLabel39, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 50, -1, 110));\n\n jLabel40.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Img/cold war 2_miniatura.jpg\"))); // NOI18N\n jPanel14.add(jLabel40, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 380, 210));\n\n jLabel41.setText(\"jLabel4\");\n jPanel14.add(jLabel41, new org.netbeans.lib.awtextra.AbsoluteConstraints(1370, 110, 180, 100));\n\n jLabel42.setText(\"jLabel4\");\n jPanel14.add(jLabel42, new org.netbeans.lib.awtextra.AbsoluteConstraints(1370, 0, 180, 100));\n\n jPanel15.setBackground(new java.awt.Color(6, 11, 25));\n jPanel15.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255)));\n jPanel15.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel43.setBackground(new java.awt.Color(255, 255, 255));\n jLabel43.setFont(new java.awt.Font(\"Candara Light\", 1, 48)); // NOI18N\n jLabel43.setForeground(new java.awt.Color(204, 204, 204));\n jLabel43.setText(\"Call of Duty®: Black Ops Cold War\");\n jPanel15.add(jLabel43, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 50, -1, 110));\n\n jLabel44.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Img/cold war 2_miniatura.jpg\"))); // NOI18N\n jPanel15.add(jLabel44, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 380, 210));\n\n jLabel45.setText(\"jLabel4\");\n jPanel15.add(jLabel45, new org.netbeans.lib.awtextra.AbsoluteConstraints(1370, 110, 180, 100));\n\n jLabel46.setText(\"jLabel4\");\n jPanel15.add(jLabel46, new org.netbeans.lib.awtextra.AbsoluteConstraints(1370, 0, 180, 100));\n\n jPanel14.add(jPanel15, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 530, 1550, 230));\n\n jPanel6.add(jPanel14, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 780, 1550, 230));\n\n jPanel5.add(jPanel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(800, 10, 780, 230));\n\n jPanel17.setBackground(new java.awt.Color(6, 11, 25));\n jPanel17.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255)));\n jPanel17.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel37.setBackground(new java.awt.Color(255, 255, 255));\n jLabel37.setFont(new java.awt.Font(\"Candara Light\", 1, 24)); // NOI18N\n jLabel37.setForeground(new java.awt.Color(204, 204, 204));\n jLabel37.setText(\"Call of Duty®: Black Ops IV\");\n jPanel17.add(jLabel37, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 10, 380, 110));\n\n jLabel47.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel47.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Img/blackops4_miniatura.jpg\"))); // NOI18N\n jPanel17.add(jLabel47, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 380, 210));\n\n jLabel48.setFont(new java.awt.Font(\"Candara Light\", 1, 24)); // NOI18N\n jLabel48.setForeground(new java.awt.Color(255, 255, 255));\n jLabel48.setText(\"V: 4.0/5\");\n jPanel17.add(jLabel48, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 120, 180, 100));\n\n jPanel5.add(jPanel17, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 970, 780, 230));\n\n jPanel18.setBackground(new java.awt.Color(6, 11, 25));\n jPanel18.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255)));\n jPanel18.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel49.setBackground(new java.awt.Color(255, 255, 255));\n jLabel49.setFont(new java.awt.Font(\"Candara Light\", 1, 24)); // NOI18N\n jLabel49.setForeground(new java.awt.Color(204, 204, 204));\n jLabel49.setText(\"Ark: Survival Evolved\");\n jPanel18.add(jLabel49, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 10, 340, 110));\n\n jLabel50.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel50.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Img/arksurvival-miniatura.jpg\"))); // NOI18N\n jPanel18.add(jLabel50, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 380, 210));\n\n jLabel51.setFont(new java.awt.Font(\"Candara Light\", 1, 24)); // NOI18N\n jLabel51.setForeground(new java.awt.Color(255, 255, 255));\n jLabel51.setText(\"V: 4.5/5\");\n jPanel18.add(jLabel51, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 120, 180, 100));\n\n jPanel5.add(jPanel18, new org.netbeans.lib.awtextra.AbsoluteConstraints(800, 730, 780, 230));\n\n jPanel10.setBackground(new java.awt.Color(6, 11, 25));\n jPanel10.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255)));\n jPanel10.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel23.setBackground(new java.awt.Color(255, 255, 255));\n jLabel23.setFont(new java.awt.Font(\"Candara Light\", 1, 24)); // NOI18N\n jLabel23.setForeground(new java.awt.Color(204, 204, 204));\n jLabel23.setText(\"Halo: The Master Chief Collection \");\n jPanel10.add(jLabel23, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 10, 340, 110));\n\n jLabel24.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel24.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Img/holaTMCC_miniatura.jpg\"))); // NOI18N\n jPanel10.add(jLabel24, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 380, 210));\n\n jLabel26.setFont(new java.awt.Font(\"Candara Light\", 1, 24)); // NOI18N\n jLabel26.setForeground(new java.awt.Color(255, 255, 255));\n jLabel26.setText(\"V: 4.7/5\");\n jPanel10.add(jLabel26, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 120, 180, 100));\n\n jPanel5.add(jPanel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 490, 780, 230));\n\n jPanel11.setBackground(new java.awt.Color(6, 11, 25));\n jPanel11.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255)));\n jPanel11.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel27.setBackground(new java.awt.Color(255, 255, 255));\n jLabel27.setFont(new java.awt.Font(\"Candara Light\", 1, 24)); // NOI18N\n jLabel27.setForeground(new java.awt.Color(204, 204, 204));\n jLabel27.setText(\"Call of Duty®: Black Ops Cold War\");\n jPanel11.add(jLabel27, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 10, -1, 110));\n\n jLabel28.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel28.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Img/cold war 2_miniatura.jpg\"))); // NOI18N\n jPanel11.add(jLabel28, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 380, 210));\n\n jLabel30.setFont(new java.awt.Font(\"Candara Light\", 1, 24)); // NOI18N\n jLabel30.setForeground(new java.awt.Color(255, 255, 255));\n jLabel30.setText(\"V: 4.8/5\");\n jPanel11.add(jLabel30, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 120, 180, 100));\n\n jPanel5.add(jPanel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(800, 250, 780, 230));\n\n jPanel12.setBackground(new java.awt.Color(6, 11, 25));\n jPanel12.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255)));\n jPanel12.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel31.setBackground(new java.awt.Color(255, 255, 255));\n jLabel31.setFont(new java.awt.Font(\"Candara Light\", 1, 24)); // NOI18N\n jLabel31.setForeground(new java.awt.Color(204, 204, 204));\n jLabel31.setText(\"Call of Duty®: Black Ops III\");\n jPanel12.add(jLabel31, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 10, 390, 110));\n\n jLabel32.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel32.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Img/blackops3_miniatura.jpg\"))); // NOI18N\n jPanel12.add(jLabel32, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 380, 210));\n\n jLabel34.setFont(new java.awt.Font(\"Candara Light\", 1, 24)); // NOI18N\n jLabel34.setForeground(new java.awt.Color(255, 255, 255));\n jLabel34.setText(\"V: 4.9/5\");\n jPanel12.add(jLabel34, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 120, 180, 100));\n\n jPanel5.add(jPanel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 780, 230));\n\n jPanel19.setBackground(new java.awt.Color(6, 11, 25));\n jPanel19.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255)));\n jPanel19.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel52.setBackground(new java.awt.Color(255, 255, 255));\n jLabel52.setFont(new java.awt.Font(\"Candara Light\", 1, 24)); // NOI18N\n jLabel52.setForeground(new java.awt.Color(204, 204, 204));\n jLabel52.setText(\"Phasmophobia\");\n jPanel19.add(jLabel52, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 10, 340, 110));\n\n jLabel53.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel53.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Img/Phasmofobia_miniatura.jpg\"))); // NOI18N\n jPanel19.add(jLabel53, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 380, 210));\n\n jLabel54.setFont(new java.awt.Font(\"Candara Light\", 1, 24)); // NOI18N\n jLabel54.setForeground(new java.awt.Color(255, 255, 255));\n jLabel54.setText(\"V: 4.6/5\");\n jPanel19.add(jLabel54, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 120, 180, 100));\n\n jPanel5.add(jPanel19, new org.netbeans.lib.awtextra.AbsoluteConstraints(800, 490, 780, 230));\n\n jPanel13.setBackground(new java.awt.Color(6, 11, 25));\n jPanel13.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255)));\n jPanel13.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel35.setBackground(new java.awt.Color(255, 255, 255));\n jLabel35.setFont(new java.awt.Font(\"Candara Light\", 1, 24)); // NOI18N\n jLabel35.setForeground(new java.awt.Color(204, 204, 204));\n jLabel35.setText(\"Call of Duty®: Black Ops I\");\n jPanel13.add(jLabel35, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 10, 340, 110));\n\n jLabel36.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel36.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Img/blackops1_miniatura.jpg\"))); // NOI18N\n jPanel13.add(jLabel36, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 380, 210));\n\n jLabel38.setFont(new java.awt.Font(\"Candara Light\", 1, 24)); // NOI18N\n jLabel38.setForeground(new java.awt.Color(255, 255, 255));\n jLabel38.setText(\"V: 4.8/5\");\n jPanel13.add(jLabel38, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 120, 180, 100));\n\n jPanel5.add(jPanel13, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 250, 780, 230));\n\n jPanel16.setBackground(new java.awt.Color(6, 11, 25));\n jPanel16.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255)));\n jPanel16.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel25.setBackground(new java.awt.Color(255, 255, 255));\n jLabel25.setFont(new java.awt.Font(\"Candara Light\", 1, 24)); // NOI18N\n jLabel25.setForeground(new java.awt.Color(204, 204, 204));\n jLabel25.setText(\"FarCry 5\");\n jPanel16.add(jLabel25, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 10, 340, 110));\n\n jLabel29.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel29.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Img/Farcry5_miniatura.jpg\"))); // NOI18N\n jPanel16.add(jLabel29, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 380, 210));\n\n jLabel33.setFont(new java.awt.Font(\"Candara Light\", 1, 24)); // NOI18N\n jLabel33.setForeground(new java.awt.Color(255, 255, 255));\n jLabel33.setText(\"V: 4.6/5\");\n jPanel16.add(jLabel33, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 120, 180, 100));\n\n jPanel5.add(jPanel16, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 730, 780, 230));\n\n jScrollPane2.setViewportView(jPanel5);\n\n jPanel3.add(jScrollPane2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1610, 860));\n\n getContentPane().add(jPanel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 80, 1610, 960));\n\n jPanel1.setBackground(new java.awt.Color(0, 0, 0, 50));\n jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n lblTienda4.setFont(new java.awt.Font(\"Lucida Bright\", 0, 18)); // NOI18N\n lblTienda4.setForeground(new java.awt.Color(204, 204, 204));\n lblTienda4.setText(\"eLJhandRy\");\n lblTienda4.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n lblTienda4MouseEntered(evt);\n }\n });\n jPanel1.add(lblTienda4, new org.netbeans.lib.awtextra.AbsoluteConstraints(1800, 20, 110, 40));\n\n lblTienda2.setFont(new java.awt.Font(\"Lucida Bright\", 0, 28)); // NOI18N\n lblTienda2.setForeground(new java.awt.Color(102, 153, 255));\n lblTienda2.setText(\"Tendencias\");\n lblTienda2.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n lblTienda2MouseEntered(evt);\n }\n });\n jPanel1.add(lblTienda2, new org.netbeans.lib.awtextra.AbsoluteConstraints(690, 30, 170, 40));\n\n lblTienda1.setFont(new java.awt.Font(\"Lucida Bright\", 0, 28)); // NOI18N\n lblTienda1.setForeground(new java.awt.Color(255, 255, 255));\n lblTienda1.setText(\"Tienda\");\n lblTienda1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n lblTienda1MouseClicked(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n lblTienda1MouseEntered(evt);\n }\n });\n jPanel1.add(lblTienda1, new org.netbeans.lib.awtextra.AbsoluteConstraints(410, 30, 170, 40));\n\n getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1920, 80));\n\n jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Img/FONDOA1.jpg\"))); // NOI18N\n getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(2, 0, 1920, -1));\n\n pack();\n }",
"private void constructMainPanel() {\n // initialize the main panel\n mainPanel = new JPanel();\n mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));\n mainPanel.setPreferredSize(new Dimension(model.getWidth() + 50,\n model.getHeight() + 240));\n JScrollPane mainPane = new JScrollPane(mainPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,\n ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);\n this.add(mainPane);\n\n }",
"private JScrollPane createInferenceHistoryOptionsPanel() {\n\n\t\tJPanel filterpanel = new JPanel();\n\t\t// filterpanel.setBackground(Color.BLUE);\n\t\tfilterpanel.setLayout(new BoxLayout(filterpanel, BoxLayout.Y_AXIS));\n\t\tfilterpanel.setBorder(new EmptyBorder(3, 10, 3, 10));\n\n\t\tJPanel panel_axiomtypecheckboxes_plus_label = createLabelledGridLayoutPanel(\"Filter Axiomtypes\",\n\t\t\t\ttypecheckboxpanel);\n\t\t// JPanel panel_group_plus_label =\n\t\t// getLabelledGridLayoutPanel(\"Grouping\", combo_group);\n\t\t// JPanel panel_renderer_plus_label =\n\t\t// getLabelledGridLayoutPanel(\"Renderer\", combo_renderer);\n\n\t\taxiomtypelist.addListSelectionListener(e -> {\n //updateConsequenceTables();\n //updateView();\n EventLogging.saveEvent(System.currentTimeMillis(), getOWLWorkspace().getSelectedTab().getId(),\n \"list_axiomtypes_selection\", \"NA\", \"wii\");\n });\n\n\t\tJPanel panel_axiomprio_plus_label = createLabelledGridLayoutPanel(\"Priority Table\",\n\t\t\t\ttable_axiom_pattern_priority);\n\n\t\ttable_axiom_pattern_priority.addMouseListener(new LoggingMouseListener(table_axiom_pattern_priority,\n\t\t\t\t\"table_axiom_pattern_priority_click\", getOWLWorkspace()));\n\n\t\tJPanel gl = new JPanel(new GridLayout(1, 2));\n\t\tgl.add(bt_entity_filter);\n\t\tgl.add(bt_entity_filter_reset);\n\t\tgl.setPreferredSize(new Dimension(0, 25));\n\t\tJPanel panel_entityfilter_plus_label = createLabelledGridLayoutPanel(\"Entity Filter\", gl);\n\n\t\t// JPanel panel_tautology_select_plus_label =\n\t\t// createTautologyCheckboxPanel(cl);\n\n\t\t// panel_axiomtypecheckboxes_plus_label.setMaximumSize(new\n\t\t// Dimension(0,10));\n\t\t// filterpanel.add(getMainLabel(\"Options\"));\n\t\t// filterpanel.add(Box.createRigidArea(new Dimension(10, 20)));\n\t\t// filterpanel.add(fontsize_panel);\n\t\t// filterpanel.add(Box.createRigidArea(new Dimension(10, 10)));\n\t\t// filterpanel.add(new JSeparator(SwingConstants.HORIZONTAL));\n\n\t\tJPanel tautologypanel = createTautologyCheckboxPanel();\n\n\t\tfilterpanel.add(panel_axiomtypecheckboxes_plus_label);\n\t\tfilterpanel.add(Box.createRigidArea(new Dimension(10, 5)));\n\t\tfilterpanel.add(bt_axtypes_advanced);\n\t\tfilterpanel.add(Box.createRigidArea(new Dimension(10, 10)));\n\t\tfilterpanel.add(new JSeparator(SwingConstants.HORIZONTAL));\n\t\tfilterpanel.add(Box.createRigidArea(new Dimension(10, 5)));\n\t\tfilterpanel.add(tautologypanel);\n\t\tfilterpanel.add(Box.createRigidArea(new Dimension(10, 10)));\n\t\t// filterpanel.add(new JSeparator(SwingConstants.HORIZONTAL));\n\t\t// filterpanel.add(Box.createRigidArea(new Dimension(10, 5)));\n\t\t// filterpanel.add(panel_at_advanced_plus_label);\n\t\t// filterpanel.add(Box.createRigidArea(new Dimension(10, 10)));\n\t\t// filterpanel.add(new JSeparator(SwingConstants.HORIZONTAL));\n\t\t// filterpanel.add(Box.createRigidArea(new Dimension(10, 5)));\n\t\t// filterpanel.add(panel_renderer_plus_label);\n\t\t// filterpanel.add(Box.createRigidArea(new Dimension(10, 10)));\n\t\tfilterpanel.add(new JSeparator(SwingConstants.HORIZONTAL));\n\t\tfilterpanel.add(Box.createRigidArea(new Dimension(10, 5)));\n\t\tfilterpanel.add(panel_entityfilter_plus_label);\n\t\tfilterpanel.add(Box.createRigidArea(new Dimension(10, 5)));\n\t\tfilterpanel.add(entity_select_label);\n\t\tfilterpanel.add(Box.createRigidArea(new Dimension(10, 10)));\n\t\tfilterpanel.add(new JSeparator(SwingConstants.HORIZONTAL));\n\t\tfilterpanel.add(Box.createRigidArea(new Dimension(10, 5)));\n\t\tfilterpanel.add(panel_axiomprio_plus_label);\n\t\t// filterpanel.add(panel_tautology_select_plus_label);\n\n\t\treturn new JScrollPane(filterpanel);\n\t}",
"public void runServerGUI(){\n /* This panel is for positioning the objects inside the frame */\n panel = new JPanel();\n panel.setPreferredSize(new Dimension(600, 400));\n panel.setBackground(Color.lightGray);\n\n /* These two panels are for positioning the lists created and a scrollable view will be added */\n panel1 = new JPanel();\n panel2 = new JPanel();\n\n /* assigning the background color for panels */\n panel1.setBackground(Color.getHSBColor(110,170,60));\n panel2.setBackground(Color.getHSBColor(110,170,60));\n\n /* this is the position of the label that will be printed on the GUI */\n panel3 = new JPanel();\n printinglabel = new JLabel(\"Waiting for traders to join the market server...\");\n panel3.add(printinglabel);\n panel3.setBackground(Color.lightGray);\n\n /* Heading created for the first column*/\n heading1 = new JLabel(\"TRADERS-AVAILABLE\");\n panel1.add(heading1);\n /* Heading created for the second column*/\n heading2 = new JLabel(\"TRADER HOLDING STOCK IN MARKET \");\n panel2.add(heading2);\n\n /* This is creating two Lists */\n strings = new JLabel[1];\n l1 = new JList(strings);\n l2 = new JList(strings);\n\n /* Scrollable view created for the first column */\n scroll_view1 = new JScrollPane(l1);\n scroll_view1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\n scroll_view1.setPreferredSize(new Dimension(200, 250));\n panel1.setLayout(new BoxLayout(panel1,BoxLayout.Y_AXIS));\n\n /* Scrollable view created for the second column */\n scroll_view2 = new JScrollPane(l2);\n scroll_view2.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\n scroll_view2.setPreferredSize(new Dimension(200, 250));\n scroll_view1.getHorizontalScrollBar().setMaximum(100);\n\n /* adding scrollable view in panel*/\n panel1.add(scroll_view1);\n panel2.setLayout(new BoxLayout(panel2,BoxLayout.Y_AXIS));\n\n /* displaying a heading for the column 2 -- list 2*/\n scroll_view2.getHorizontalScrollBar().setMinimum(0);\n panel2.add(scroll_view2);\n\n /* This is creating fame size and adding some specifications to it */\n frame = new JFrame(\"Market Server\");\n frame.setLocation(new Point(500,250));\n frame.setPreferredSize(new Dimension(650, 400));\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setVisible(true);\n frame.setResizable(false);\n\n /* Adding all the sub panels inside the main panel*/\n panel.add(panel1); panel.add(panel2); panel.add(panel3);\n frame.add(panel);\n frame.pack();\n }",
"private JPanel getTopRow()\r\n\t{\r\n\t\tint width = 0;\r\n\t\tint height = 50;\r\n\t\t\r\n\t\tJPanel pane = new JPanel();\r\n\t\tpane.setPreferredSize(new Dimension(width,height));\r\n\t\t\r\n\t\t//fix fuer einen BUG bezueglich der Breite/Hoehe in einem GribagLayout\r\n\t\tpane.setMinimumSize(pane.getPreferredSize());\r\n\t\t\r\n\t\treturn pane;\r\n\t}",
"private JPanel buildMainPanel() {\n FormLayout layout = new FormLayout(\"pref:grow\",\n \"pref, 3dlu, pref, 3dlu, pref, 12dlu, pref, 3dlu, pref, pref, \"\n + \"pref, pref, 9dlu, pref, 3dlu, pref, \"\n + \"pref, pref, pref, 0:grow, pref\");\n\n PanelBuilder builder = new PanelBuilder(layout);\n // Bottom border\n builder.setBorder(Borders.createEmptyBorder(\"1dlu, 3dlu, 2dlu, 3dlu\"));\n CellConstraints cc = new CellConstraints();\n\n int row = 1;\n\n builder.addSeparator(Translation.getTranslation(\"status_tab.status\"),\n cc.xy(1, row));\n row += 2;\n builder.add(synchronizationStatusLabel, cc.xy(1, row));\n row += 2;\n builder.add(synchronizationDateLabel, cc.xy(1, row));\n row += 2;\n\n builder.addSeparator(Translation.getTranslation(\"status_tab.you_have\"),\n cc.xy(1, row));\n row += 2;\n builder.add(newNoticesLine.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(filesAvailableLine.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(downloadsLine.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(uploadsLine.getUIComponent(), cc.xy(1, row));\n row += 2;\n\n builder.addSeparator(\n Translation.getTranslation(\"status_tab.online_storage.title\"),\n cc.xy(1, row));\n row += 2;\n builder.add(onlineStorageAccountLabel.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(onlineStorageSection.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(licenseInfoSection.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(buyNowLabel.getUIComponent(), cc.xy(1, row));\n if (PreferencesEntry.SHOW_TELL_A_FRIEND\n .getValueBoolean(getController()))\n {\n row += 2;\n builder.add(tellFriendLabel.getUIComponent(), cc.xy(1, row));\n }\n\n return builder.getPanel();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n jLabel1 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n jScrollPane2 = new javax.swing.JScrollPane();\n jList1 = new javax.swing.JList<>();\n jPanel3 = new javax.swing.JPanel();\n jLabel3 = new javax.swing.JLabel();\n jScrollPane3 = new javax.swing.JScrollPane();\n jTextArea2 = new javax.swing.JTextArea();\n jLabel2 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n jTextArea1.setEditable(false);\n jTextArea1.setColumns(20);\n jTextArea1.setRows(5);\n jScrollPane1.setViewportView(jTextArea1);\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(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE)\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1)\n );\n\n jLabel1.setText(\"Sechilen\");\n\n jPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n jList1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n jList1MouseReleased(evt);\n }\n });\n jList1.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jList1KeyReleased(evt);\n }\n });\n jScrollPane2.setViewportView(jList1);\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(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 450, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n jPanel3.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel3.setText(\"Yemek adi\");\n\n jTextArea2.setEditable(false);\n jTextArea2.setColumns(20);\n jTextArea2.setLineWrap(true);\n jTextArea2.setRows(5);\n jScrollPane3.setViewportView(jTextArea2);\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGap(192, 192, 192)\n .addComponent(jLabel3)\n .addContainerGap(270, Short.MAX_VALUE))\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane3)\n .addContainerGap())\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane3)\n .addContainerGap())\n );\n\n jLabel2.setText(\"0\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(44, 44, 44)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel2)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\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)\n .addComponent(jPanel3, 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(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addContainerGap())\n );\n\n pack();\n }",
"private void layoutControls() {\n\t\t// cleanup all elements of lane (old regions for task)\n\t\tgetChildren().clear();\n\t\tgetRowConstraints().clear();\n\t\tgetColumnConstraints().clear();\n\t\trow = 1;\n\n\t\tallTasks = createRegionsForTasks(model.getRepo().readByStatus(status), color);\n\n\t\t// Nur eine Spalte für diese Lane.\n\t\tConstraintHelper.setColumnPercentConstraint(this, 100);\n\t\t\n\t\t// Für das Label.\n\t\tadd(label, 0, 0);\n\t\tConstraintHelper.setRowPercentConstraint(this, 5);\n\t\tGridPane.setMargin(label, new Insets(0, 0, 0, 3));\n\t\t\n\t\t// Padding für die Lane.\n\t\tsetPadding(new Insets(5));\n\n\t\tallTasks.stream()\n\t\t\t.forEach(task -> {\n\t\t\t\tConstraintHelper.setRowPercentConstraint(this, 95.0 / MAX_TASKS_PER_LANE);\n\t\t\t\tadd(task, 0, row++);\n\t\t\t\tGridPane.setMargin(task, new Insets(3));\n\t\t\t});\n\t}",
"public void setupUI() {\r\n\t\t\r\n\t\tvPanel = new VerticalPanel();\r\n\t\thPanel = new HorizontalPanel();\r\n\t\t\r\n\t\titemName = new Label();\r\n\t\titemName.addStyleName(Styles.page_title);\r\n\t\titemDesc = new Label();\r\n\t\titemDesc.addStyleName(Styles.quest_desc);\r\n\t\titemType = new Label();\r\n\t\titemType.addStyleName(Styles.quest_lvl);\r\n\t\t\r\n\t\tVerticalPanel img = new VerticalPanel();\r\n\t\timg.add(new Image(imgDir));\r\n\t\t\r\n\t\tvPanel.add(itemName);\r\n\t\tvPanel.add(itemDesc);\r\n\t\tvPanel.add(img);\r\n\t\tvPanel.add(hPanel);\r\n\t\t\r\n\t\tVerticalPanel mainPanel = new VerticalPanel();\r\n\t\tmainPanel.setWidth(\"100%\");\r\n\t\tvPanel.addStyleName(NAME);\r\n\t\t\r\n\t\tmainPanel.add(vPanel);\r\n \tinitWidget(mainPanel);\r\n }",
"private void $$$setupUI$$$() {\n createUIComponents();\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel.setForeground(new Color(-1));\n sectionTitle = new JLabel();\n Font sectionTitleFont = this.$$$getFont$$$(\"Droid Sans\", Font.BOLD, 18, sectionTitle.getFont());\n if (sectionTitleFont != null) sectionTitle.setFont(sectionTitleFont);\n this.$$$loadLabelText$$$(sectionTitle, ResourceBundle.getBundle(\"language\").getString(\"title_resources\"));\n panel.add(sectionTitle, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final DefaultListModel defaultListModel1 = new DefaultListModel();\n resourceList.setModel(defaultListModel1);\n resourceList.setSelectionMode(1);\n scrollPane1.setViewportView(resourceList);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel.add(panel1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n publishButton = new JButton();\n publishButton.setEnabled(false);\n this.$$$loadButtonText$$$(publishButton, ResourceBundle.getBundle(\"language\").getString(\"button_publishResource\"));\n panel1.add(publishButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n pullButton = new JButton();\n pullButton.setEnabled(false);\n this.$$$loadButtonText$$$(pullButton, ResourceBundle.getBundle(\"language\").getString(\"button_pullResource\"));\n panel1.add(pullButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }",
"private void llenarPanel() {\r\n\r\n\t\tposicion[0] = new JTextField();\r\n\t\tposicion[0].setHorizontalAlignment(JLabel.CENTER); // Alinear\r\n\t\tposicion[0].setFont(new java.awt.Font(\"Tahoma\", 1, 90)); // Cambia\r\n\t\tadd(posicion[0]);\r\n\r\n\t\tposicion[1] = new JTextField();\r\n\t\tposicion[1].setHorizontalAlignment(JLabel.CENTER); // Alinear\r\n\t\tposicion[1].setFont(new java.awt.Font(\"Tahoma\", 1, 90)); // Cambia\r\n\t\tadd(posicion[1]);\r\n\r\n\t\tposicion[2] = new JTextField();\r\n\t\tposicion[2].setHorizontalAlignment(JLabel.CENTER); // Alinear\r\n\t\tposicion[2].setFont(new java.awt.Font(\"Tahoma\", 1, 90)); // Cambia\r\n\t\tadd(posicion[2]);\r\n\r\n\t\tposicion[3] = new JTextField();\r\n\t\tposicion[3].setHorizontalAlignment(JLabel.CENTER); // Alinear\r\n\t\tposicion[3].setFont(new java.awt.Font(\"Tahoma\", 1, 90)); // Cambia\r\n\t\tadd(posicion[3]);\r\n\r\n\t\tposicion[4] = new JTextField();\r\n\t\tposicion[4].setHorizontalAlignment(JLabel.CENTER); // Alinear\r\n\t\tposicion[4].setFont(new java.awt.Font(\"Tahoma\", 1, 90)); // Cambia\r\n\t\tadd(posicion[4]);\r\n\r\n\t\tposicion[5] = new JTextField();\r\n\t\tposicion[5].setHorizontalAlignment(JLabel.CENTER); // Alinear\r\n\t\tposicion[5].setFont(new java.awt.Font(\"Tahoma\", 1, 90)); // Cambia\r\n\t\tadd(posicion[5]);\r\n\r\n\t\tposicion[6] = new JTextField();\r\n\t\tposicion[6].setHorizontalAlignment(JLabel.CENTER); // Alinear\r\n\t\tposicion[6].setFont(new java.awt.Font(\"Tahoma\", 1, 90)); // Cambia\r\n\t\tadd(posicion[6]);\r\n\r\n\t\tposicion[7] = new JTextField();\r\n\t\tposicion[7].setHorizontalAlignment(JLabel.CENTER); // Alinear\r\n\t\tposicion[7].setFont(new java.awt.Font(\"Tahoma\", 1, 90)); // Cambia\r\n\t\tadd(posicion[7]);\r\n\r\n\t\tposicion[8] = new JTextField();\r\n\t\tposicion[8].setHorizontalAlignment(JLabel.CENTER); // Alinear\r\n\t\tposicion[8].setFont(new java.awt.Font(\"Tahoma\", 1, 90)); // Cambia\r\n\t\tadd(posicion[8]);\r\n\t}",
"public IEFFrame(IEFProtein i) {\n labels = new Vector();\n\n //set the font for the information being displayed\n theFont = new Font(\"Arial\", Font.PLAIN, 12);\n\n //set ief to the value passed as a parameter to this method\n ief = i;\n\n //set the max and min pI values stored in ief\n maxRange = Double.toString(ief.getMaxPI());\n minRange = Double.toString(ief.getMinPI());\n\n //set the title to display the maxRange and minRange\n setTitle(minRange + \" - \" + maxRange);\n\n IEFPanel = new JPanel(); //init panel\n IEFPanel.setLayout(null); //abs. positioning\n IEFPanel.setBackground(new Color(202, 225, 255));\n this.addWindowListener(new WindowAdapter() { //allow user to close win.\n public void windowClosing(WindowEvent e) {\n dispose();\n }\n });\n\n\n this.setBounds(xlocation, ylocation, 415, 500); //set frame position\n dimensions = this.getBounds(); //store frame size\n\n //set the size of IEFPanel and let it know how far to scroll\n IEFPanel.setBounds(0, 0, dimensions.width, dimensions.height);\n IEFPanel.scrollRectToVisible(dimensions);\n\n //get the names of the proteins stored in ief\n Vector v = i.getNames();\n\n int location = 30;\n for (int j = 0; j < v.size(); j++) {\n //create a label for each protein in ief and store it in labels\n labels.add(new Label((String) v.elementAt(j)));\n\n //set the sizes of each label\n ((Label) labels.elementAt(j)).setBounds(5, location, 390, 20);\n ((Label) labels.elementAt(j)).setFont(theFont);\n location = location + 15;\n IEFPanel.add((Label) labels.elementAt(j));\n }\n\n //adjusts the size of the panel to reflect the number of labels\n // that it holds\n if (dimensions.height < location) {\n IEFPanel.setPreferredSize(new Dimension(dimensions.width, location));\n dimensions = IEFPanel.getBounds();\n IEFPanel.scrollRectToVisible(dimensions);\n } else {\n IEFPanel.setBounds(0, 0, dimensions.width, dimensions.height);\n }\n\n //stores the panel in a scrollable panel\n scroll = new JScrollPane(IEFPanel);\n scroll.setPreferredSize(new Dimension(415, 500));\n scroll.setWheelScrollingEnabled(true);\n\n\n this.add(scroll); //add components\n\n // increment the locations for the next Frame created\n xlocation = xlocation + 10;\n ylocation = ylocation + 20;\n\n // once the location reaches a certain point, start layering\n // frames on top of old frames\n if (ylocation > 500) {\n ylocation = 0;\n }\n if (xlocation > 500) {\n xlocation = 5;\n }\n }",
"@AutoGenerated\r\n\tprivate VerticalLayout buildVerticalLayout_1() {\n\t\tverticalLayout_1 = new VerticalLayout();\r\n\t\tverticalLayout_1.setImmediate(false);\r\n\t\tverticalLayout_1.setWidth(\"-1px\");\r\n\t\tverticalLayout_1.setHeight(\"-1px\");\r\n\t\tverticalLayout_1.setMargin(false);\r\n\t\tverticalLayout_1.setSpacing(true);\r\n\t\t\r\n\t\t// pnlFondos\r\n\t\tpnlFondos = buildPnlFondos();\r\n\t\tverticalLayout_1.addComponent(pnlFondos);\r\n\t\t\r\n\t\treturn verticalLayout_1;\r\n\t}",
"private void setupPlayerScoresPanel(){\n\n // adds Player numbers and scores to String variable text\n sortPlayerScores();\n \n paragraph = new JLabel(text);\n paragraph.setFont(new Font(Font.SANS_SERIF, Font.PLAIN, 18));\n\n playerScoresPanel.add(paragraph);\n fullPanel.add(playerScoresPanel,BorderLayout.CENTER);\n }",
"private JPanel getTitlePanel() {\n JPanel main = ProgramPresets.createPanel();\n main.setLayout(new FlowLayout());\n JLabel tron1 = new JLabel(ProgramPresets.TRON);\n JLabel tron2 = new JLabel(ProgramPresets.TRON);\n mainTitle = ProgramPresets.createCenteredTitle(TITLE);\n subTitle = ProgramPresets.createCenteredTitle(SUB_TITLE);\n JPanel mainSub = ProgramPresets.createPanel();\n mainSub.setLayout(new GridLayout(2, 1));\n mainSub.add(mainTitle);\n mainSub.add(subTitle);\n main.add(tron1);\n main.add(Box.createRigidArea(new Dimension(50, 0)));\n main.add(mainSub);\n main.add(Box.createRigidArea(new Dimension(50, 0)));\n main.add(tron2);\n return main;\n }",
"private void initComponents() {\n m_jCategories = new javax.swing.JPanel();\n m_jRootCategories = new javax.swing.JPanel();\n m_jscrollsubgr = new javax.swing.JScrollPane();\n m_jListSubgroups = new javax.swing.JList();\n jPanel2 = new javax.swing.JPanel();\n jPanel3 = new javax.swing.JPanel();\n m_jCancel = new javax.swing.JButton();\n m_jSubCategories = new javax.swing.JPanel();\n jPanel4 = new javax.swing.JPanel();\n m_lblIndicator = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n jPanel5 = new javax.swing.JPanel();\n m_btnBack = new javax.swing.JButton();\n m_jProducts = new javax.swing.JPanel();\n\n setLayout(new java.awt.BorderLayout());\n\n setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));\n m_jCategories.setLayout(new java.awt.CardLayout());\n\n m_jRootCategories.setLayout(new java.awt.BorderLayout());\n\n m_jscrollsubgr.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n m_jscrollsubgr.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\n m_jscrollsubgr.setPreferredSize(new java.awt.Dimension(210, 0));\n m_jListSubgroups.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n m_jListSubgroups.setFocusable(false);\n m_jListSubgroups.addListSelectionListener(new javax.swing.event.ListSelectionListener() {\n public void valueChanged(javax.swing.event.ListSelectionEvent evt) {\n m_jListSubgroupsValueChanged(evt);\n }\n });\n\n m_jscrollsubgr.setViewportView(m_jListSubgroups);\n\n m_jRootCategories.add(m_jscrollsubgr, java.awt.BorderLayout.WEST);\n\n jPanel2.setLayout(new java.awt.BorderLayout());\n\n jPanel3.setLayout(new java.awt.GridLayout(0, 1, 0, 5));\n\n jPanel3.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 5, 0, 5));\n m_jCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/com/openbravo/images/button_cancel.png\")));\n m_jCancel.setFocusPainted(false);\n m_jCancel.setFocusable(false);\n m_jCancel.setMargin(new java.awt.Insets(8, 14, 8, 14));\n m_jCancel.setRequestFocusEnabled(false);\n m_jCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n m_jCancelActionPerformed(evt);\n }\n });\n\n jPanel3.add(m_jCancel);\n\n jPanel2.add(jPanel3, java.awt.BorderLayout.NORTH);\n\n m_jRootCategories.add(jPanel2, java.awt.BorderLayout.CENTER);\n\n m_jCategories.add(m_jRootCategories, \"rootcategories\");\n\n m_jSubCategories.setLayout(new java.awt.BorderLayout());\n\n jPanel4.setLayout(new java.awt.BorderLayout());\n\n m_lblIndicator.setText(\"jLabel1\");\n jPanel4.add(m_lblIndicator, java.awt.BorderLayout.NORTH);\n\n m_jSubCategories.add(jPanel4, java.awt.BorderLayout.CENTER);\n\n jPanel1.setLayout(new java.awt.BorderLayout());\n\n jPanel5.setLayout(new java.awt.GridLayout(0, 1, 0, 5));\n\n jPanel5.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 5, 0, 5));\n m_btnBack.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/com/openbravo/images/3uparrow.png\")));\n m_btnBack.setFocusPainted(false);\n m_btnBack.setFocusable(false);\n m_btnBack.setMargin(new java.awt.Insets(8, 14, 8, 14));\n m_btnBack.setRequestFocusEnabled(false);\n m_btnBack.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n m_btnBackActionPerformed(evt);\n }\n });\n\n jPanel5.add(m_btnBack);\n\n jPanel1.add(jPanel5, java.awt.BorderLayout.NORTH);\n\n m_jSubCategories.add(jPanel1, java.awt.BorderLayout.EAST);\n\n m_jCategories.add(m_jSubCategories, \"subcategories\");\n\n add(m_jCategories, java.awt.BorderLayout.WEST);\n\n m_jProducts.setLayout(new java.awt.CardLayout());\n\n m_jProducts.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 5, 0, 0));\n add(m_jProducts, java.awt.BorderLayout.CENTER);\n\n }",
"public void update(ArrayList<Media> media) {\n\n JPanel centerJPanel = new JPanel();\n centerJPanel.setBorder(BorderFactory.createEmptyBorder());\n centerJPanel.setOpaque(false);\n JScrollPane centerJScrollPane = new JScrollPane(centerJPanel,\n JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,\n JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\n centerJScrollPane.setOpaque(false);\n centerJScrollPane.getViewport().setOpaque(false);\n centerJScrollPane.setBorder(BorderFactory.createEmptyBorder());\n\n //Her bruges WrapLayout klassen, som er en klasse vi har inkluderet i projektet, og som er fundet på nettet. Den extender FlowLayout,\n //og \"wrapper\" teksten således at medierne tilpasser sig, når man resizer frame. Constructoren tager en \"alignment\" man tager direkte fra flowlayout\n // som i det her tilfælde er FlowLayout.LEADING, sådan at medierne placeres venstre-mod-højre og ikke centreres, hvis der en sidste række med\n // færre medier end de forrige rækker.\n centerJPanel.setLayout(new WrapLayout(FlowLayout.LEADING));\n\n\n\n /*Hele den her for-løkke gennemløber medierne i søgemaskinens library. Den opretter medierne, tilføjer billederne til medierne, tilføjer \"knapper\" så man kan trykke på medierne,\n * og desuden tilføjer en label der viser filmens titel under billedet. Knapperne, som vises som mediernes respektive billeder, får funktionen at åbne et nyt frame,\n * med information om filmen, en play-knap, en tilføj-til-min-liste-knap, og en fjern-fra-min-liste-knap.\n */\n for (Media m : media) {\n JPanel gridPanel = new JPanel();\n gridPanel.setOpaque(false);\n\n //Jeg sætter billedet sammen med en textLabel i et vertikalt BoxLayout, sådan så jeg sørger for, at der aldrig kommer luft mellem billede og tekst.\n BoxLayout boxLayout = new BoxLayout(gridPanel, BoxLayout.Y_AXIS);\n\n gridPanel.setLayout(boxLayout);\n\n //Billedet hentes direkte fra medie-objektet og bliver sat som ikon til en JButton, så man kan trykke på den.\n JButton picButton = new JButton(new ImageIcon(m.getPictureFile()));\n picButton.setOpaque(false);\n //Billedet åbner et nyt frame, henter information om mediet direkte fra objektet, og opretter en playknap :)\n\n picButton.addActionListener(e -> {\n JFrame mediaFrame = new JFrame(m.getName());\n\n //Skalerer framet, så det ser pænere ud\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n\n int frameHeight = screenSize.height * 1 / 2;\n int frameWidth = screenSize.width * 1 / 2;\n\n mediaFrame.setPreferredSize(new Dimension(frameWidth, frameHeight));\n\n Container mediaContentPane = mediaFrame.getContentPane();\n\n mediaContentPane.setLayout(new BorderLayout());\n\n //Skalering af billede, så det passer med sit frame\n int picWidth = m.getPictureFile().getWidth();\n int picHeight = m.getPictureFile().getHeight();\n double picAspectRatio = (picWidth + 0.0) / (picHeight + 0.0);\n picHeight = frameHeight;\n double newPicWidth = picAspectRatio * picHeight;\n\n\n JLabel picture = new JLabel(new ImageIcon(new ImageIcon(m.getPictureFile()).getImage().getScaledInstance((int) newPicWidth, picHeight, Image.SCALE_SMOOTH)));\n\n mediaContentPane.add(picture, BorderLayout.WEST);\n\n JPanel aboutPanel = new JPanel();\n aboutPanel.setLayout(new BoxLayout(aboutPanel, BoxLayout.Y_AXIS));\n\n JLabel aboutLabel = new JLabel(\"About: \");\n aboutLabel.setFont(new Font(\"Verdana\", Font.PLAIN, 12));\n\n aboutPanel.add(aboutLabel);\n\n aboutPanel.add(new JLabel(\" \"));\n\n JLabel titleLabel = new JLabel(\"Title: \" + m.getName());\n titleLabel.setFont(new Font(\"Verdana\", Font.PLAIN, 12));\n\n aboutPanel.add(titleLabel);\n\n JLabel yearLabel = new JLabel(\"Year: \" + m.getYear());\n yearLabel.setFont(new Font(\"Verdana\", Font.PLAIN, 12));\n\n aboutPanel.add(yearLabel);\n\n String genresAbout = \"Genres: \";\n for (int i = 0; i < m.getGenres().length - 1; i++) {\n genresAbout = genresAbout + m.getGenres()[i] + \", \";\n }\n genresAbout = genresAbout + m.getGenres()[m.getGenres().length - 1];\n\n JLabel genresAboutLabel = new JLabel(genresAbout);\n genresAboutLabel.setFont(new Font(\"Verdana\", Font.PLAIN, 12));\n\n aboutPanel.add(genresAboutLabel);\n\n JLabel ratingLabel = new JLabel(\"Rating: \" + m.getRating());\n ratingLabel.setFont(new Font(\"Verdana\", Font.PLAIN, 12));\n\n aboutPanel.add(ratingLabel);\n\n mediaContentPane.add(aboutPanel, BorderLayout.CENTER);\n\n //nogle knapper. en playknap, og to knapper, som kan tilføje eller fjerne film fra mylist. smider det hele ind i et boxlayout\n\n JButton playButton = new JButton(\"Play\");\n playButton.addActionListener(ex -> {\n if (playButton.getBackground() == Color.GREEN) {\n playButton.setBackground(Color.RED);\n } else {\n playButton.setBackground(Color.GREEN);\n }\n });\n playButton.setBorderPainted(false);\n playButton.setFocusPainted(false);\n\n\n JButton addToMyListButton = new JButton(\"Add to MyList\");\n addToMyListButton.setBorderPainted(false);\n addToMyListButton.setFocusPainted(false);\n addToMyListButton.addActionListener(e5 -> {\n controller.addToMyList(m);\n });\n\n\n JButton removeFromMyListButton = new JButton(\"Remove from MyList\");\n removeFromMyListButton.setBorderPainted(false);\n removeFromMyListButton.setFocusPainted(false);\n removeFromMyListButton.addActionListener(e4 -> {\n controller.removeFromMyList(m);\n });\n\n JPanel buttonPanel = new JPanel();\n buttonPanel.setLayout(new GridLayout(0, 1));\n buttonPanel.add(playButton);\n buttonPanel.add(addToMyListButton);\n buttonPanel.add(removeFromMyListButton);\n\n mediaContentPane.add(buttonPanel, BorderLayout.EAST);\n\n mediaFrame.pack();\n mediaFrame.setLocationRelativeTo(null);\n mediaFrame.setVisible(true);\n\n }\n );\n //Gør knappen lidt pænere, og sådan at den kun fylder billedet.\n picButton.setBorderPainted(false);\n picButton.setFocusPainted(false);\n picButton.setContentAreaFilled(false);\n\n gridPanel.add(picButton);\n\n //Opretter tekst-lablen under billedet. Jeg tjekker efter et (abritært) antal tegn, og forkorter med \"...\" til sidst hvis titlen er for lang (ellers kommer der mellemrum mellem filmene).\n JLabel textLabel;\n\n if (m.getName().trim().length() <= 17) {\n textLabel = new JLabel(m.getName(), JLabel.CENTER);\n } else {\n String shortenedText = \"\";\n for (int i = 0; i < 17; i++) {\n shortenedText = shortenedText + m.getName().charAt(i);\n }\n textLabel = new JLabel(shortenedText + \"...\", JLabel.CENTER);\n\n }\n textLabel.setFont(new Font(\"Verdana\", Font.BOLD, 11));\n textLabel.setForeground(Color.white);\n textLabel.setOpaque(false);\n gridPanel.add(textLabel);\n\n\n textLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\n picButton.setAlignmentX(Component.CENTER_ALIGNMENT);\n\n\n centerJPanel.add(gridPanel);\n\n }\n\n\n BorderLayout tempLayout = (BorderLayout) frame.getContentPane().getLayout();\n if (tempLayout.getLayoutComponent(BorderLayout.CENTER) != null) {\n frame.getContentPane().remove(tempLayout.getLayoutComponent(BorderLayout.CENTER));\n }\n\n\n frame.getContentPane().add(centerJScrollPane);\n frame.setVisible(true);\n }",
"private void $$$setupUI$$$() {\n mainPanel = new JPanel();\n mainPanel.setLayout(new BorderLayout(0, 0));\n mainPanel.setBackground(new Color(-3100784));\n mainPanel.setPreferredSize(new Dimension(500, 600));\n contentTablePanel = new JPanel();\n contentTablePanel.setLayout(new GridBagLayout());\n contentTablePanel.setBackground(new Color(-3100784));\n mainPanel.add(contentTablePanel, BorderLayout.NORTH);\n contentTablePanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.black), null, TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));\n final JLabel label1 = new JLabel();\n Font label1Font = this.$$$getFont$$$(\"Arial Rounded MT Bold\", Font.BOLD, 14, label1.getFont());\n if (label1Font != null) label1.setFont(label1Font);\n label1.setForeground(new Color(-14342875));\n label1.setHorizontalAlignment(0);\n label1.setHorizontalTextPosition(0);\n label1.setIconTextGap(0);\n label1.setPreferredSize(new Dimension(150, 25));\n label1.setText(\"Poste\");\n GridBagConstraints gbc;\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n contentTablePanel.add(label1, gbc);\n final JLabel label2 = new JLabel();\n Font label2Font = this.$$$getFont$$$(\"Arial Rounded MT Bold\", Font.BOLD, 14, label2.getFont());\n if (label2Font != null) label2.setFont(label2Font);\n label2.setForeground(new Color(-14342875));\n label2.setHorizontalAlignment(0);\n label2.setHorizontalTextPosition(0);\n label2.setIconTextGap(0);\n label2.setPreferredSize(new Dimension(150, 25));\n label2.setText(\"Mode de Paiement\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n contentTablePanel.add(label2, gbc);\n final JLabel label3 = new JLabel();\n Font label3Font = this.$$$getFont$$$(\"Arial Rounded MT Bold\", Font.BOLD, 14, label3.getFont());\n if (label3Font != null) label3.setFont(label3Font);\n label3.setForeground(new Color(-14342875));\n label3.setHorizontalAlignment(0);\n label3.setHorizontalTextPosition(0);\n label3.setIconTextGap(0);\n label3.setPreferredSize(new Dimension(150, 25));\n label3.setText(\"Valeur\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 0;\n contentTablePanel.add(label3, gbc);\n final JLabel label4 = new JLabel();\n label4.setForeground(new Color(-14342875));\n label4.setHorizontalAlignment(0);\n label4.setPreferredSize(new Dimension(150, 18));\n label4.setText(\"{{typeTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label4, gbc);\n final JLabel label5 = new JLabel();\n label5.setForeground(new Color(-14342875));\n label5.setHorizontalAlignment(0);\n label5.setPreferredSize(new Dimension(150, 18));\n label5.setText(\"{{valueTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label5, gbc);\n final JLabel label6 = new JLabel();\n label6.setForeground(new Color(-14342875));\n label6.setHorizontalAlignment(0);\n label6.setPreferredSize(new Dimension(150, 18));\n label6.setText(\"{{typeTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 3;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label6, gbc);\n final JLabel label7 = new JLabel();\n label7.setForeground(new Color(-14342875));\n label7.setHorizontalAlignment(0);\n label7.setPreferredSize(new Dimension(150, 18));\n label7.setText(\"{{themeTransaction4}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 4;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label7, gbc);\n final JLabel label8 = new JLabel();\n label8.setForeground(new Color(-14342875));\n label8.setHorizontalAlignment(0);\n label8.setPreferredSize(new Dimension(150, 18));\n label8.setText(\"{{themeTransaction5}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 5;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label8, gbc);\n final JLabel label9 = new JLabel();\n label9.setForeground(new Color(-14342875));\n label9.setHorizontalAlignment(0);\n label9.setPreferredSize(new Dimension(150, 18));\n label9.setText(\"{{valueTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 6;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label9, gbc);\n final JLabel label10 = new JLabel();\n label10.setForeground(new Color(-14342875));\n label10.setHorizontalAlignment(0);\n label10.setPreferredSize(new Dimension(150, 18));\n label10.setText(\"{{valueTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 5;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label10, gbc);\n final JLabel label11 = new JLabel();\n label11.setForeground(new Color(-14342875));\n label11.setHorizontalAlignment(0);\n label11.setPreferredSize(new Dimension(150, 18));\n label11.setText(\"{{valueTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 4;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label11, gbc);\n final JLabel label12 = new JLabel();\n label12.setForeground(new Color(-14342875));\n label12.setHorizontalAlignment(0);\n label12.setPreferredSize(new Dimension(150, 18));\n label12.setText(\"{{valueTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 3;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label12, gbc);\n final JLabel label13 = new JLabel();\n label13.setForeground(new Color(-14342875));\n label13.setHorizontalAlignment(0);\n label13.setPreferredSize(new Dimension(150, 18));\n label13.setText(\"{{typeTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 4;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label13, gbc);\n final JLabel label14 = new JLabel();\n label14.setForeground(new Color(-14342875));\n label14.setHorizontalAlignment(0);\n label14.setPreferredSize(new Dimension(150, 18));\n label14.setText(\"{{typeTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 5;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label14, gbc);\n final JLabel label15 = new JLabel();\n label15.setForeground(new Color(-14342875));\n label15.setHorizontalAlignment(0);\n label15.setPreferredSize(new Dimension(150, 18));\n label15.setText(\"{{typeTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 6;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label15, gbc);\n final JLabel label16 = new JLabel();\n label16.setForeground(new Color(-14342875));\n label16.setHorizontalAlignment(0);\n label16.setPreferredSize(new Dimension(150, 18));\n label16.setText(\"{{themeTransaction1}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label16, gbc);\n final JLabel label17 = new JLabel();\n label17.setForeground(new Color(-14342875));\n label17.setHorizontalAlignment(0);\n label17.setPreferredSize(new Dimension(150, 18));\n label17.setText(\"{{themeTransaction2}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label17, gbc);\n final JLabel label18 = new JLabel();\n label18.setForeground(new Color(-14342875));\n label18.setHorizontalAlignment(0);\n label18.setPreferredSize(new Dimension(150, 18));\n label18.setText(\"{{themeTransaction3}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 3;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label18, gbc);\n final JLabel label19 = new JLabel();\n label19.setForeground(new Color(-14342875));\n label19.setHorizontalAlignment(0);\n label19.setPreferredSize(new Dimension(150, 18));\n label19.setText(\"{{themeTransaction6}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 6;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label19, gbc);\n final JLabel label20 = new JLabel();\n label20.setForeground(new Color(-14342875));\n label20.setHorizontalAlignment(0);\n label20.setPreferredSize(new Dimension(150, 18));\n label20.setText(\"{{typeTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label20, gbc);\n final JLabel label21 = new JLabel();\n label21.setForeground(new Color(-14342875));\n label21.setHorizontalAlignment(0);\n label21.setPreferredSize(new Dimension(150, 18));\n label21.setText(\"{{valueTransaction}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 0, 15, 0);\n contentTablePanel.add(label21, gbc);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridBagLayout());\n panel1.setBackground(new Color(-3100784));\n mainPanel.add(panel1, BorderLayout.EAST);\n final JLabel label22 = new JLabel();\n label22.setEnabled(true);\n label22.setForeground(new Color(-14342875));\n label22.setText(\"Valeur :\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.anchor = GridBagConstraints.WEST;\n panel1.add(label22, gbc);\n final JLabel label23 = new JLabel();\n label23.setForeground(new Color(-14342875));\n label23.setText(\"{{currentValue}}\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.insets = new Insets(0, 30, 0, 30);\n panel1.add(label23, gbc);\n final JLabel label24 = new JLabel();\n label24.setForeground(new Color(-14342875));\n label24.setText(\"Euros\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 0;\n gbc.anchor = GridBagConstraints.WEST;\n panel1.add(label24, gbc);\n validateBtn = new JButton();\n validateBtn.setBackground(new Color(-5468041));\n validateBtn.setForeground(new Color(-14342875));\n validateBtn.setPreferredSize(new Dimension(100, 30));\n validateBtn.setText(\"OK\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 1;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.insets = new Insets(20, 0, 0, 50);\n panel1.add(validateBtn, gbc);\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel2.setBackground(new Color(-3100784));\n mainPanel.add(panel2, BorderLayout.SOUTH);\n backgroundImageLabel = new JLabel();\n backgroundImageLabel.setBackground(new Color(-3100784));\n backgroundImageLabel.setIcon(new ImageIcon(getClass().getResource(\"/img/accountingRecordPrint.png\")));\n backgroundImageLabel.setText(\"\");\n panel2.add(backgroundImageLabel, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }",
"private VerticalLayout createVerticalLayout(int hCount,int vCount)\r\n {\n\r\n VerticalLayout verticalLayout = new VerticalLayout();\r\n verticalLayout.setSizeFull();\r\n\r\n // verticalLayout.add(button);\r\n verticalLayout.getStyle().set(\"border\",\"3px dashed gray\");\r\n verticalLayout.getStyle().set(\"border-radius\",\"5px\");\r\n //verticalLayout.setDefaultHorizontalComponentAlignment(Alignment.CENTER);\r\n //verticalLayout.setAlignItems(Alignment.CENTER);\r\n verticalLayout.setAlignItems(Alignment.STRETCH);\r\n\r\n SalonDetay salonDetay = new SalonDetay();\r\n\r\n salonDetay.setX(vCount);\r\n salonDetay.setY(hCount);\r\n\r\n Button btnDefine = new Button(\"Buranın ne olduğunu belirle\");\r\n\r\n btnDefine.addClickListener(e->{\r\n Dialog dialog = new Dialog();\r\n\r\n Button btnMasa = new Button(\"Masa\");\r\n btnMasa.addClickListener(ez-> {\r\n Dialog dialog2 = new Dialog();\r\n dialog2.add(new Label(\"Hoşgeldiniz\"));\r\n\r\n List<Integer> integerList = new ArrayList<>();\r\n for (int i = 1; i < 12; i++)\r\n integerList.add(i);\r\n\r\n ComboBox<Integer> comboBox = new ComboBox<>(\"Katılacak Kişi Sayısını Seçiniz\");\r\n comboBox.setItems(integerList);\r\n\r\n dialog2.add(comboBox);\r\n\r\n Button ekleButton = new Button(\"Tamamla\");\r\n\r\n ekleButton.addClickListener(ex -> {\r\n if (comboBox.getValue() == null) {\r\n Notification.show(\"Lütfen kişi sayısını seçiniz\", 1000, Notification.Position.TOP_STRETCH);\r\n return;\r\n }\r\n List<Component> componentList = beSmart(comboBox.getValue());\r\n componentList.forEach(ele -> verticalLayout.add(ele));\r\n dialog2.close();\r\n dialog.close();\r\n verticalLayout.remove(btnDefine);\r\n });\r\n dialog2.add(ekleButton);\r\n dialog2.open();\r\n });\r\n\r\n Button btnKoridor = new Button(\"Koridor\");\r\n btnKoridor.addClickListener(ex->{\r\n verticalLayout.add(placeHolder(\"Koridor\",dialog));\r\n verticalLayout.remove(btnDefine);\r\n });\r\n\r\n Button btnDugun = new Button(\"Düğün Masası\");\r\n btnDugun.addClickListener(ex->{\r\n verticalLayout.add(placeHolder(\"Düğün Masası\",dialog));\r\n verticalLayout.remove(btnDefine);\r\n });\r\n\r\n Button btnSahne = new Button(\"Sahne\");\r\n btnSahne.addClickListener(ex->{\r\n verticalLayout.add(placeHolder(\"Sahne\",dialog));\r\n verticalLayout.remove(btnDefine);\r\n });\r\n\r\n dialog.add(btnMasa,btnKoridor,btnSahne,btnDugun);\r\n dialog.open();\r\n });\r\n\r\n verticalLayout.add(btnDefine);\r\n /*\r\n button.addClickListener(e->{\r\n\r\n verticalLayout.remove(button);\r\n\r\n Dialog dialog = new Dialog();\r\n dialog.add(new Label(\"Hoşgeldiniz\"));\r\n\r\n List<Integer> integerList = new ArrayList<>();\r\n for (int i=1 ;i<12 ; i++)\r\n integerList.add(i);\r\n\r\n ComboBox<Integer> comboBox = new ComboBox<>(\"Katılacak Kişi Sayısını Seçiniz\");\r\n comboBox.setItems(integerList);\r\n\r\n dialog.add(comboBox);\r\n\r\n Button ekleButton = new Button(\"Tamamla\");\r\n\r\n ekleButton.addClickListener(ex->{\r\n if (comboBox.getValue() == null)\r\n {\r\n Notification.show(\"Lütfen kişi sayısını seçiniz\",1000, Notification.Position.TOP_STRETCH);\r\n return;\r\n }\r\n\r\n List<Component> componentList = beSmart(comboBox.getValue());\r\n\r\n componentList.forEach(ele-> verticalLayout.add(ele));\r\n\r\n dialog.close();\r\n });\r\n\r\n\r\n dialog.add(ekleButton);\r\n\r\n dialog.open();\r\n //verticalLayout.setAlignItems(Alignment.STRETCH);\r\n //verticalLayout.add(createPersonButton(\"1\"),createPersonButton(\"2\"),createPersonButton(\"3\"));\r\n\r\n }); */\r\n\r\n return verticalLayout;\r\n }",
"private void constructMetricsPanel() {\n int FONT_SIZE = 12;\n \n metricsPanel = new JPanel();\n metricsPanel.setLayout(new GridLayout(6, 3));\n metricsPanel.setBorder(BorderFactory.createTitledBorder(\"Metrics\"));\n \n JLabel nameHeader = new JLabel(\"Type\");\n nameHeader.setFont(new Font(\"Times New Roman\", Font.BOLD, FONT_SIZE));\n nameHeader.setHorizontalAlignment(SwingConstants.CENTER);\n nameHeader.setForeground(Color.black);\n \n metricsPanel.add(nameHeader);\n \n JLabel numHeader = new JLabel(\"Number\");\n numHeader.setFont(new Font(\"Times New Roman\", Font.BOLD, FONT_SIZE));\n numHeader.setHorizontalAlignment(SwingConstants.CENTER);\n numHeader.setForeground(Color.black);\n \n metricsPanel.add(numHeader);\n \n JLabel timeHeader = new JLabel(\"Avg Time\");\n timeHeader.setFont(new Font(\"Times New Roman\", Font.BOLD, FONT_SIZE));\n timeHeader.setHorizontalAlignment(SwingConstants.CENTER);\n timeHeader.setForeground(Color.black);\n \n metricsPanel.add(timeHeader);\n \n metricsNumLabels = new JLabel[5];\n metricsTimeLabels = new JLabel[5];\n \n for (int i=0; i<5; i++) {\n JLabel name = new JLabel(\"Market Orders\");\n if (i == 1)\n name.setText(\"Two Order Trades\");\n if (i == 2)\n name.setText(\"Three Order Trades\");\n if (i == 3)\n name.setText(\"Four Order Trades\");\n if (i == 4)\n name.setText(\"Five Order Trades\");\n \n name.setFont(new Font(\"Times New Roman\", Font.PLAIN, FONT_SIZE));\n name.setHorizontalAlignment(SwingConstants.CENTER);\n name.setForeground(Color.black);\n \n metricsPanel.add(name);\n \n metricsNumLabels[i] = new JLabel(\"0\");\n metricsNumLabels[i].setFont(new Font(\"Times New Roman\", Font.PLAIN, FONT_SIZE));\n metricsNumLabels[i].setHorizontalAlignment(SwingConstants.CENTER);\n metricsNumLabels[i].setForeground(Color.black);\n \n metricsPanel.add(metricsNumLabels[i]);\n \n metricsTimeLabels[i] = new JLabel(\"N/A\");\n metricsTimeLabels[i].setFont(new Font(\"Times New Roman\", Font.PLAIN, FONT_SIZE));\n metricsTimeLabels[i].setHorizontalAlignment(SwingConstants.CENTER);\n metricsTimeLabels[i].setForeground(Color.black);\n \n metricsPanel.add(metricsTimeLabels[i]);\n }\n \n metricsPanel.setPreferredSize(relativeSize(0.25f, 0.25f));\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n ListaAlumnos = new javax.swing.JList<>();\n jLabel2 = new javax.swing.JLabel();\n jScrollPane2 = new javax.swing.JScrollPane();\n ListaAsignaturas = new javax.swing.JList<>();\n jLabel3 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setText(\"Las Notas\");\n\n ListaAlumnos.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n ListaAlumnosMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(ListaAlumnos);\n\n jLabel2.setText(\"Alumnos\");\n\n jScrollPane2.setViewportView(ListaAsignaturas);\n\n jLabel3.setText(\"Asignaturas\");\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(27, 27, 27)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 84, Short.MAX_VALUE)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(72, 72, 72))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel3)\n .addGap(161, 161, 161))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jLabel3))\n .addGap(9, 9, 9)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE)\n .addComponent(jScrollPane1))\n .addContainerGap(42, Short.MAX_VALUE))\n );\n\n pack();\n }",
"public JScrollPane vytvorList() {\n listModel = new DefaultListModel();\n //listModel.addElement(\"Hra: 0 DUMMY\");\n\n listHer = new JList(listModel);\n listHer.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n listHer.setSelectedIndex(0);\n listHer.addListSelectionListener(this);\n listHer.setVisibleRowCount(7);\n listHer.setVisible(true);\n\n JScrollPane listScrollPane = new JScrollPane(listHer);\n listScrollPane.setPreferredSize(new Dimension(250, 300));\n listScrollPane.setVisible(true);\n listScrollPane.setName(\"hry\");\n\n return listScrollPane;\n }",
"public void createPage3()\n {\n panel3 = new JPanel();\n VelocityMessageList = new DefaultListModel<>();\n list3 = new JList(VelocityMessageList);\n panel3.add(list3);\n }",
"private void $$$setupUI$$$() {\n createUIComponents();\n panel1 = new JPanel();\n panel1.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel1.setOpaque(true);\n panel1.setPreferredSize(new Dimension(980, 660));\n LeftPane = new JPanel();\n LeftPane.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1, true, false));\n panel1.add(LeftPane, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n LeftPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLineBorder(new Color(-4473925)), null));\n Stats = new JPanel();\n Stats.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(5, 2, new Insets(0, 0, 0, 0), -1, -1));\n LeftPane.add(Stats, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n Font label1Font = this.$$$getFont$$$(\"Stencil\", -1, 12, label1.getFont());\n if (label1Font != null) label1.setFont(label1Font);\n label1.setText(\"Player:\");\n Stats.add(label1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n Font label2Font = this.$$$getFont$$$(\"Stencil\", -1, 12, label2.getFont());\n if (label2Font != null) label2.setFont(label2Font);\n label2.setText(\"Highscore:\");\n Stats.add(label2, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n highScore = new JTextField();\n highScore.setEditable(false);\n highScore.setHorizontalAlignment(0);\n Stats.add(highScore, new com.intellij.uiDesigner.core.GridConstraints(1, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n playerName = new JTextField();\n playerName.setEditable(false);\n playerName.setHorizontalAlignment(0);\n playerName.setText(\"\");\n Stats.add(playerName, new com.intellij.uiDesigner.core.GridConstraints(0, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label3 = new JLabel();\n Font label3Font = this.$$$getFont$$$(\"Stencil\", -1, 12, label3.getFont());\n if (label3Font != null) label3.setFont(label3Font);\n label3.setText(\"Level:\");\n Stats.add(label3, new com.intellij.uiDesigner.core.GridConstraints(2, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n levelId = new JTextField();\n levelId.setEditable(false);\n levelId.setHorizontalAlignment(0);\n Stats.add(levelId, new com.intellij.uiDesigner.core.GridConstraints(2, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label4 = new JLabel();\n Font label4Font = this.$$$getFont$$$(\"Stencil\", -1, 12, label4.getFont());\n if (label4Font != null) label4.setFont(label4Font);\n label4.setText(\"Time:\");\n Stats.add(label4, new com.intellij.uiDesigner.core.GridConstraints(4, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n timeLeft = new JTextField();\n timeLeft.setEditable(false);\n timeLeft.setEnabled(true);\n timeLeft.setFocusable(true);\n timeLeft.setHorizontalAlignment(0);\n timeLeft.setOpaque(true);\n Stats.add(timeLeft, new com.intellij.uiDesigner.core.GridConstraints(4, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label5 = new JLabel();\n Font label5Font = this.$$$getFont$$$(\"Stencil\", -1, 12, label5.getFont());\n if (label5Font != null) label5.setFont(label5Font);\n label5.setHorizontalAlignment(10);\n label5.setText(\"Score:\");\n Stats.add(label5, new com.intellij.uiDesigner.core.GridConstraints(3, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n scoreField = new JTextField();\n scoreField.setEditable(false);\n scoreField.setHorizontalAlignment(0);\n Stats.add(scoreField, new com.intellij.uiDesigner.core.GridConstraints(3, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label6 = new JLabel();\n Font label6Font = this.$$$getFont$$$(\"Stencil\", -1, 18, label6.getFont());\n if (label6Font != null) label6.setFont(label6Font);\n label6.setText(\"Molecule:\");\n LeftPane.add(label6, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n moleculeName = new JTextField();\n moleculeName.setEditable(false);\n moleculeName.setFocusable(true);\n Font moleculeNameFont = this.$$$getFont$$$(\"Stencil\", -1, 18, moleculeName.getFont());\n if (moleculeNameFont != null) moleculeName.setFont(moleculeNameFont);\n moleculeName.setHorizontalAlignment(0);\n moleculeName.setOpaque(true);\n moleculeName.setRequestFocusEnabled(true);\n moleculeName.setText(\"\");\n moleculeName.setVisible(true);\n moleculeName.putClientProperty(\"caretWidth\", new Integer(0));\n LeftPane.add(moleculeName, new com.intellij.uiDesigner.core.GridConstraints(2, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n molPane = new JPanel();\n molPane.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n LeftPane.add(molPane, new com.intellij.uiDesigner.core.GridConstraints(3, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n molPane.add(moleculePanel1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, new Dimension(160, 96), null, null, 0, false));\n RightPane = new JPanel();\n RightPane.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(RightPane, new com.intellij.uiDesigner.core.GridConstraints(0, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer1 = new com.intellij.uiDesigner.core.Spacer();\n RightPane.add(spacer1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer2 = new com.intellij.uiDesigner.core.Spacer();\n RightPane.add(spacer2, new com.intellij.uiDesigner.core.GridConstraints(2, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n gamePane = new JPanel();\n gamePane.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n RightPane.add(gamePane, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, new Dimension(640, 600), null, new Dimension(800, 640), 0, false));\n gamePane.add(gamePanel1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, new Dimension(640, 609), null, new Dimension(980, 680), 0, false));\n }",
"public PreviewPanel() {\r\n\t\t\tsuper(new FlowLayout(FlowLayout.LEFT, 0, 0));\r\n\t\t\t\r\n\t\t\tJPanel p = new JPanel(new GridBagLayout());\t\t\t\r\n\t\t\tthis.add(p);\r\n\t\t\tp.setBorder(new EmptyBorder(10, 0, 0, 0));\r\n\t\t\tcolPanel.setPreferredSize(new Dimension(50, 10));\r\n\t\t\tcolPanel.setBorder(new EtchedBorder());\r\n\t\t\thexLabel.setBorder(new EmptyBorder(8, 0, 0, 0));\r\n\r\n\t\t\tGridBagConstraints gc = new GridBagConstraints();\r\n\t\t\tgc.insets = new Insets(0, 0, 0, 10);\r\n\t\t\tgc.fill = GridBagConstraints.BOTH;\r\n\t\t\tgc.anchor = GridBagConstraints.WEST;\r\n\t\t\tgc.gridx = 0;\r\n\t\t\tgc.gridy = 0;\r\n\r\n\t\t\tgc.gridheight = 2;\r\n\t\t\tp.add(colPanel, gc);\r\n\t\t\tgc.gridx++;\r\n\t\t\tgc.gridheight = 1;\r\n\t\t\tp.add(decLabel, gc);\r\n\t\t\tgc.gridx = 1;\r\n\t\t\tgc.gridy++;\r\n\t\t\tp.add(hexLabel, gc);\r\n\t\t\tgc.gridx++;\r\n\t\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 staffList = new javax.swing.JList<>();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n ageLabel = new javax.swing.JLabel();\n staffNumber = new javax.swing.JLabel();\n jScrollPane2 = new javax.swing.JScrollPane();\n trList = new javax.swing.JList<>();\n jLabel5 = new javax.swing.JLabel();\n genderLabel = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Staff\");\n setResizable(false);\n\n staffList.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n staffListMouseClicked(evt);\n }\n });\n staffList.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n staffListKeyPressed(evt);\n }\n public void keyReleased(java.awt.event.KeyEvent evt) {\n staffListKeyReleased(evt);\n }\n });\n jScrollPane1.setViewportView(staffList);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel1.setText(\"Staff Members\");\n\n jLabel2.setText(\"Employee Number:\");\n\n jLabel3.setText(\"Skills:\");\n\n jLabel4.setText(\"Age:\");\n\n ageLabel.setText(\"jLabel5\");\n\n staffNumber.setText(\"jLabel6\");\n\n jScrollPane2.setViewportView(trList);\n\n jLabel5.setText(\"Gender:\");\n\n genderLabel.setText(\"jLabel6\");\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, false)\n .addComponent(jScrollPane1)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 102, Short.MAX_VALUE))\n .addGap(35, 35, 35)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane2)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addGap(18, 18, 18)\n .addComponent(staffNumber, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(ageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(genderLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 241, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(staffNumber))\n .addGap(31, 31, 31)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(genderLabel))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(ageLabel))\n .addGap(18, 18, 18)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(29, 29, 29))\n );\n\n pack();\n }",
"private JPanel texte() {\r\n\t\tJPanel position = new JPanel();\r\n\t\tJPanel menu1 = new JPanel();\r\n\t\tJPanel menu2 = new JPanel();\r\n\t\tJPanel menu3 = new JPanel();\r\n\t\tJPanel menu4 = new JPanel();\r\n\r\n\t\tmenu1.setLayout(new BoxLayout(menu1, BoxLayout.X_AXIS));\r\n\t\tmenu1.add(textnomligue);\r\n\t\tmenu2.setLayout(new BoxLayout(menu2, BoxLayout.X_AXIS));\r\n\t\tmenu2.add(textadresse);\r\n\t\tmenu3.setLayout(new BoxLayout(menu3, BoxLayout.X_AXIS));\r\n\t\tmenu3.add(textnomAdmin);\r\n\t\tmenu4.setLayout(new BoxLayout(menu4, BoxLayout.X_AXIS));\r\n\t\tmenu4.add(tprenomAdmin);\r\n\r\n\t\tposition.setLayout(new BoxLayout(position, BoxLayout.Y_AXIS));\r\n\t\tposition.add(menu1);\r\n\t\tposition.add(menu2);\r\n\t\tposition.add(menu3);\r\n\t\tposition.add(menu4);\r\n\r\n\t\treturn position;\r\n\t}",
"private VerticalPanel renderSummaryFlexTable()\r\n\t{\r\n\t\tVerticalPanel summaryPanel= new VerticalPanel();\r\n\t\tsummaryPanel.setWidth(\"60%\");\r\n\t\t\r\n\t\tFlexTable summaryTable = new FlexTable();\r\n\t\tsummaryTable.setWidth(\"100%\");\r\n\t\tsummaryTable.setStyleName(\"square-flex\");\r\n\t\tsummaryTable.setCellSpacing(0);\r\n\r\n\t\tFlexCellFormatter summaryTableFormatter = summaryTable.getFlexCellFormatter();\r\n\t\t\r\n\t\tLabel businessDescription = new Label(businessGoal.getDescription());\r\n\t\tbusinessDescription.setStyleName(\"square-title\");\r\n\t\tsummaryTable.setWidget(0, 0, businessDescription);\r\n\t\tsummaryTableFormatter.setWidth(0, 0, \"100%\");\r\n\t\tsummaryTableFormatter.setColSpan(0, 0, 3);\r\n\t\t\r\n\t\tLabel subgoalHeader = new Label(messages.subgoal());\r\n\t\tLabel assetsHeader = new Label(messages.assets());\r\n\t\tLabel priorityHeader = new Label(messages.priority());\r\n\t\t\r\n\t\tsummaryTable.setWidget(1, 0, priorityHeader);\r\n\t\tsummaryTable.setWidget(1, 1, subgoalHeader);\r\n\t\tsummaryTable.setWidget(1, 2, assetsHeader);\r\n\t\tsummaryTableFormatter.setStyleName(1, 0, \"square-TableHeader\");\r\n\t\tsummaryTableFormatter.setStyleName(1, 1, \"square-TableHeader\");\r\n\t\tsummaryTableFormatter.setStyleName(1, 2, \"square-TableHeader\");\r\n\t\t\r\n\t\tList<GwtSubGoal> subgoals = businessGoal.getSubGoals();\r\n\t\tCollections.sort(subgoals);\r\n\t\t\r\n\t\tint nextRow = 2; //Start populating the table from row 1\r\n\t\tfor (int i = 0; i < subgoals.size(); i++)\r\n\t\t{\t\r\n\t\t\tLabel subGoalLabel = new Label(subgoals.get(i).getDescription());\r\n\t\t\t\r\n\t\t\tVerticalPanel assetGrid = new VerticalPanel();\r\n\t\t\tassetGrid.setWidth(\"100%\");\r\n\t\t\tassetGrid.setStyleName(\"inner-table\");\r\n\t\t\t\r\n\t\t\tCollections.sort(subgoals.get(i).getAssets());\r\n\t\t\tfor(int j = 0; j < subgoals.get(i).getAssets().size(); j++)\r\n\t\t\t{\r\n\t\t\t\tLabel assetsLabel = new Label(subgoals.get(i).getAssets().get(j).getDescription());\t\r\n\t\t\t\tassetGrid.add(assetsLabel);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tsummaryTable.setWidget(nextRow, 0, new Label(subgoals.get(i).getPriority().toString()));\r\n\t\t\tsummaryTableFormatter.setAlignment(nextRow, 0, HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_TOP);\r\n\t\t\tsummaryTable.setWidget(nextRow, 1, subGoalLabel);\r\n\t\t\tsummaryTableFormatter.setAlignment(nextRow, 1, HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_TOP);\r\n\t\t\tsummaryTable.setWidget(nextRow, 2, assetGrid);\r\n\t\t\t\r\n\t\t\tnextRow += 1;\r\n\t\t}\r\n\t\tsummaryPanel.add(summaryTable);\r\n\t\t\r\n\t\tif (subgoals.size() == 0)\r\n\t\t{\r\n\r\n\t\t\tDisclosurePanel diclosure = new DisclosurePanel();\r\n\r\n\t\t\tLabel noRequirement = new Label(messages.noelementsFound());\r\n\t\t\tnoRequirement.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);\r\n\t\t\tdiclosure.add(noRequirement);\r\n\t\t\tsummaryPanel.add(diclosure);\r\n\t\t\tdiclosure.setAnimationEnabled(true);\r\n\t\t\tdiclosure.setOpen(true);\r\n\t\t}\r\n\t\t\r\n\t\treturn summaryPanel;\r\n\t}",
"private void createPanel() {\n JPanel panel = new JPanel();\n \n for(int i = 0; i < button.size(); i++){\n panel.add(button.get(i));\n }\n panel.add(label);\n \n add(panel);\n }",
"private void codigoInicial() {\r\n itemPanels = new itemPanel[5];\r\n itemPanels[0] = new itemPanel(null, null, false);\r\n itemPanels[1] = new itemPanel(null, null, false);\r\n itemPanels[2] = new itemPanel(null, null, false);\r\n itemPanels[3] = new itemPanel(null, null, false);\r\n itemPanels[4] = new itemPanel(null, null, false);\r\n\r\n setSize(1082, 662);\r\n jpaneMenu.setBackground(AtributosGUI.color_principal);\r\n setLocationRelativeTo(null);\r\n\r\n\r\n java.awt.Color color_primario = AtributosGUI.color_principal;\r\n\r\n jpanePerfil.setBackground(color_primario);\r\n jpaneHorario.setBackground(color_primario);\r\n jpaneCursos.setBackground(color_primario);\r\n jpaneTramites.setBackground(color_primario);\r\n jpaneSalud.setBackground(color_primario);\r\n jpaneMenuItems.setBackground(color_primario);\r\n\r\n jlblCursos.setFont(AtributosGUI.item_label_font);\r\n jlblHorario.setFont(AtributosGUI.item_label_font);\r\n jlblPerfil.setFont(AtributosGUI.item_label_font);\r\n jlblSalud.setFont(AtributosGUI.item_label_font);\r\n jlblTramites.setFont(AtributosGUI.item_label_font);\r\n\r\n jlblCursos.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblHorario.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblPerfil.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblSalud.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblTramites.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n\r\n jpaneActiveCursos.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActiveHorario.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActivePerfil.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActiveSalud.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActiveTramites.setBackground(AtributosGUI.item_Off_panel_active);\r\n\r\n \r\n\r\n }",
"private static void drawTableCompenents() {\n\t\ttopColumn = new JLabel(\"location\");\r\n\t\ttopColumn.setLocation(200, 0);\r\n\t\tExtension.instance.add(topColumn);\r\n\t}",
"public WindowAutoLineaging()\n\t\t{\n\t\tsetLayout(new GridLayout(1,1));\n\t\t/*\n\t\tJPanel top=new JPanel(new GridBagLayout());\n\t\tGridBagConstraints c=new GridBagConstraints();\n\t\tc.gridy=0; top.add(new JLabel(\"Lineage \"),c);\n\t\t//c.gridy=1; top.add(new JLabel(\"Channel \"),c);\n\t\tc.gridy=1; top.add(new JLabel(\"Algorithm \"),c);\n\t\t\n\t\tc.fill=GridBagConstraints.HORIZONTAL;\n\t\tc.gridx=1;\n\t\tc.weightx=1;\n\t\t\n\t\tc.gridy=0; top.add(comboLin,c);\n//\t\tc.gridy=1; top.add(comboChan,c);\n\t\tc.gridy=1; top.add(comboAlgo,c);\n\t\t*/\n\t\tJComponent top=EvSwingUtil.layoutTableCompactWide(\n\t\t\t\tnew JLabel(\"Lineage \"),comboLin,\n\t\t\t\tnew JLabel(\"Algorithm \"),comboAlgo\n\t\t\t\t);\n\t\t\n\t\tpanelOptions.setBorder(BorderFactory.createTitledBorder(\"Options\"));\n\n\t\t\n\t\tadd(EvSwingUtil.layoutCompactVertical(\n\t\t\t\ttop,\n\t\t\t\tpanelOptions,\n\t\t\t\tpanelStatus,\n\t\t\t\tEvSwingUtil.withLabel(\"Frame\", frameStart),\n\t\t\t\tEvSwingUtil.layoutEvenHorizontal(bStartStop,bStep,bFlatten)));\n\t\t\n\t\tcomboAlgo.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e){updateCurrentAlgo();}});\n\t\t\n\t\tbStartStop.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e){startStop();}});\n\n\t\tbStep.addActionListener(new ActionListener(){\n\t\tpublic void actionPerformed(ActionEvent e){step();}});\n\n\n\t\tbFlatten.addActionListener(new ActionListener(){\n\t\tpublic void actionPerformed(ActionEvent e){flatten();}});\n\n\t\tsetTitleEvWindow(\"Auto-lineage\");\n\t\tupdateCurrentAlgo();\n\t\tpackEvWindow();\n\t\tsetVisibleEvWindow(true);\n\t\t}",
"@AutoGenerated\n\tprivate VerticalLayout buildVerticalLayout_1() {\n\t\tverticalLayout_1 = new VerticalLayout();\n\t\tverticalLayout_1.setImmediate(false);\n\t\tverticalLayout_1.setWidth(\"-1px\");\n\t\tverticalLayout_1.setHeight(\"-1px\");\n\t\tverticalLayout_1.setMargin(false);\n verticalLayout_1.setStyleName(\"votes-stat\");\n\n //label_accepted\n label_accepted = new Label();\n label_accepted.setStyleName(\"accepted\");\n label_accepted.setValue(\"Accepted\");\n label_accepted.setVisible(false);\n verticalLayout_1.addComponent(label_accepted);\n\t\t\n\t\t// label_1\n\t\tlabel_1 = new Label();\n\t\tlabel_1.setImmediate(false);\n\t\tlabel_1.setWidth(\"-1px\");\n\t\tlabel_1.setHeight(\"-1px\");\n\t\tlabel_1.setValue(\"Votes\");\n label_1.setStyleName(\"votes-label\");\n\t\tverticalLayout_1.addComponent(label_1);\n\t\tverticalLayout_1.setComponentAlignment(label_1, new Alignment(20));\n\t\t\n\t\t// label_upVotes\n\t\tlabel_upVotes = new Label();\n\t\tlabel_upVotes.setImmediate(false);\n\t\tlabel_upVotes.setWidth(\"-1px\");\n\t\tlabel_upVotes.setHeight(\"-1px\");\n\t\tlabel_upVotes.setValue(\"+21\");\n label_upVotes.setStyleName(\"votes-count\");\n\t\tverticalLayout_1.addComponent(label_upVotes);\n\t\tverticalLayout_1\n\t\t\t\t.setComponentAlignment(label_upVotes, new Alignment(20));\n\t\t\n\t\t// label_downVotes\n\t\tlabel_downVotes = new Label();\n\t\tlabel_downVotes.setImmediate(false);\n\t\tlabel_downVotes.setWidth(\"-1px\");\n\t\tlabel_downVotes.setHeight(\"-1px\");\n\t\tlabel_downVotes.setValue(\"-12\");\n label_downVotes.setStyleName(\"votes-count\");\n\t\tverticalLayout_1.addComponent(label_downVotes);\n\t\tverticalLayout_1.setComponentAlignment(label_downVotes, new Alignment(\n\t\t\t\t20));\n\t\t\n\t\treturn verticalLayout_1;\n\t}",
"private void setPanel()\r\n\t{\r\n\t\tpanel = new JPanel();\r\n\t\tpanel.setLayout(new GridLayout(5, 2));\r\n\t\t\r\n\t\tpanel.add(bubbleL);\r\n\t\tpanel.add(bubblePB);\r\n\t\t\r\n\t\tpanel.add(insertionL);\r\n\t\tpanel.add(insertionPB);\r\n\t\t\r\n\t\tpanel.add(mergeL);\r\n\t\tpanel.add(mergePB);\r\n\t\t\r\n\t\tpanel.add(quickL);\r\n\t\tpanel.add(quickPB);\r\n\t\t\r\n\t\tpanel.add(radixL);\r\n\t\tpanel.add(radixPB);\r\n\t}",
"public void Matriz()\n {\n int dim;\n dim = Principal.dimension;\n \n matrix = new JLabel [dim][dim];\n\n for(int i=0; i< dim; i++){\n\n\t\t\t\tfor(int j=0; j< dim; j++){\n\n\t\t\t\t\t\n\n matrix[i][j] = new JLabel();\n\n matrix[i][j].setVisible(true);\n\n matrix[i][j].setBorder(javax.swing.BorderFactory.createLineBorder(Color.black, 1));\n\n matrix[i][j].setBounds(5 +(i*43), 5 +(j*43), 40, 40);\n\n matrix[i][j].setBackground(Color.green);\n\n matrix[i][j].setText(\"\");\n Pan_Tablero.add(matrix[i][j]);\n\n //this.getContentPane().add(matrix[i][j]);\n\n } \n\n} \n }",
"private void initComponents() {\n panel1 = new JPanel();\r\n label1 = new JLabel();\r\n scrollPane1 = new JScrollPane();\r\n table1 = new JTable();\r\n\r\n //======== this ========\r\n setBackground(Color.white);\r\n setTitle(\"Swasthya\");\r\n setIconImage(new ImageIcon(\"F:\\\\1P\\\\pathology\\\\img\\\\hl.png\").getImage());\r\n setFont(new Font(Font.DIALOG, Font.PLAIN, 20));\r\n Container contentPane = getContentPane();\r\n\r\n //======== panel1 ========\r\n {\r\n panel1.setBackground(Color.white);\r\n panel1.setBorder (new javax. swing. border. CompoundBorder( new javax .swing .border .TitledBorder (new javax. swing. border. EmptyBorder( 0\r\n , 0, 0, 0) , \"JF\\u006frmD\\u0065sig\\u006eer \\u0045val\\u0075ati\\u006fn\", javax. swing. border. TitledBorder. CENTER, javax. swing. border. TitledBorder. BOTTOM\r\n , new java .awt .Font (\"Dia\\u006cog\" ,java .awt .Font .BOLD ,12 ), java. awt. Color. red) ,\r\n panel1. getBorder( )) ); panel1. addPropertyChangeListener (new java. beans. PropertyChangeListener( ){ @Override public void propertyChange (java .beans .PropertyChangeEvent e\r\n ) {if (\"\\u0062ord\\u0065r\" .equals (e .getPropertyName () )) throw new RuntimeException( ); }} );\r\n\r\n //---- label1 ----\r\n label1.setIcon(new ImageIcon(\"F:\\\\1P\\\\pathology\\\\img\\\\logo.png\"));\r\n\r\n //======== scrollPane1 ========\r\n {\r\n\r\n //---- table1 ----\r\n table1.setFont(new Font(\"Calibri\", Font.PLAIN, 24));\r\n table1.setRowHeight(45);\r\n table1.setRowMargin(3);\r\n table1.setFillsViewportHeight(true);\r\n table1.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);\r\n scrollPane1.setViewportView(table1);\r\n }\r\n\r\n GroupLayout panel1Layout = new GroupLayout(panel1);\r\n panel1.setLayout(panel1Layout);\r\n panel1Layout.setHorizontalGroup(\r\n panel1Layout.createParallelGroup()\r\n .addGroup(panel1Layout.createSequentialGroup()\r\n .addGap(304, 304, 304)\r\n .addComponent(label1, GroupLayout.PREFERRED_SIZE, 508, GroupLayout.PREFERRED_SIZE)\r\n .addGap(251, 251, 251))\r\n .addGroup(GroupLayout.Alignment.TRAILING, panel1Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addComponent(scrollPane1, GroupLayout.PREFERRED_SIZE, 1024, GroupLayout.PREFERRED_SIZE)\r\n .addContainerGap())\r\n );\r\n panel1Layout.setVerticalGroup(\r\n panel1Layout.createParallelGroup()\r\n .addGroup(panel1Layout.createSequentialGroup()\r\n .addGap(12, 12, 12)\r\n .addComponent(label1, GroupLayout.PREFERRED_SIZE, 83, GroupLayout.PREFERRED_SIZE)\r\n .addGap(34, 34, 34)\r\n .addComponent(scrollPane1, GroupLayout.PREFERRED_SIZE, 872, GroupLayout.PREFERRED_SIZE)\r\n .addContainerGap(172, Short.MAX_VALUE))\r\n );\r\n }\r\n\r\n GroupLayout contentPaneLayout = new GroupLayout(contentPane);\r\n contentPane.setLayout(contentPaneLayout);\r\n contentPaneLayout.setHorizontalGroup(\r\n contentPaneLayout.createParallelGroup()\r\n .addComponent(panel1, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n );\r\n contentPaneLayout.setVerticalGroup(\r\n contentPaneLayout.createParallelGroup()\r\n .addComponent(panel1, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n );\r\n pack();\r\n setLocationRelativeTo(getOwner());\r\n // JFormDesigner - End of component initialization //GEN-END:initComponents\r\n }",
"private JPanel agregarPanelPuertos(JPanel contenedor) {\n\t\tJPanel panelPort = new JPanel(new GridBagLayout()) {\n\t\t\t/**\n\t\t\t * \n\t\t\t */\n\t\t\tprivate static final long serialVersionUID = -4409720857557537617L;\n\n\t\t\t@Override\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tg.setColor(Color.WHITE);\n\t\t\t\tg.fillRect(0, 0, getWidth(), getHeight());\n\t\t\t}\n\t\t};\n\t\tpanelPort.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));\n\n\t\tGridBagConstraints c = new GridBagConstraints();\n\t\tc.gridx = 0;\n\t\tc.gridy = 1;\n\t\tc.weighty = 0.0;\n\t\tc.weightx = 1.0;\n\t\tc.anchor = GridBagConstraints.WEST;\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\n\t\tcontenedor.add(panelPort, c);\n\n\t\t//Crea los registros\n\t\trow = new ArrayList<JPanel>();\n\t\tlabelPort = new ArrayList<JLabel>();\n\t\tarrowPort = new ArrayList<JLabel>();\n\t\tvalorPort = new ArrayList<JLabel>();\n\t\tarrowFlag = new ArrayList<JLabel>();\n\t\tvalorFlag = new ArrayList<JLabel>();\n\t\t\n\t\tGridBagConstraints c1 = new GridBagConstraints();\n\t\tc1.gridx = 0;\n\t\tc1.weighty = 0.0;\n\t\tc1.weightx = 1.0;\n\t\tc1.anchor = GridBagConstraints.WEST;\n\t\tc1.fill = GridBagConstraints.HORIZONTAL;\n\n\t\t//ENTRADA\n\t\tJPanel panelRow = new JPanel(new GridBagLayout());\n\t\tpanelRow.setBackground(this.getColorRow(0));\n\t\trow.add(panelRow);\n\t\t\n\t\tc1.gridy = 0;\n\t\tpanelPort.add(panelRow, c1);\n\t\tlabelPort.add(agregarLabelPuerto(panelRow, \"ENTRADA\", 0));\n\t\tarrowPort.add(agregarArrowPuerto(panelRow, 0));\n\t\tvalorPort.add(agregarValorPuerto(panelRow, \"\", 0));\n\t\tarrowFlag.add(agregarArrowFlag(panelRow, 0));\n\t\tvalorFlag.add(agregarValorFlag(panelRow, \"\", 0));\n\t\t\n\t\t//SALIDA\n\t\tpanelRow = new JPanel(new GridBagLayout());\n\t\tpanelRow.setBackground(this.getColorRow(0));\n\t\trow.add(panelRow);\n\t\t\n\t\tc1.gridy = 1;\n\t\tpanelPort.add(panelRow, c1);\n\t\tlabelPort.add(agregarLabelPuerto(panelRow, \"SALIDA\", 1));\n\t\tarrowPort.add(agregarArrowPuerto(panelRow, 1));\n\t\tvalorPort.add(agregarValorPuerto(panelRow, \"\", 1));\n\t\tarrowFlag.add(agregarArrowFlag(panelRow, 1));\n\t\tvalorFlag.add(agregarValorFlag(panelRow, \"\", 1));\t\t\n\n\n\t\treturn panelPort;\n\t}"
]
| [
"0.6113981",
"0.59646547",
"0.58613265",
"0.58371115",
"0.5814115",
"0.58132255",
"0.5802066",
"0.5782611",
"0.5781465",
"0.57626045",
"0.5706761",
"0.57038844",
"0.5690948",
"0.5690839",
"0.56753236",
"0.56538725",
"0.5648945",
"0.56109726",
"0.5608494",
"0.56010777",
"0.55979097",
"0.5581498",
"0.5566993",
"0.55656564",
"0.5565336",
"0.5559721",
"0.5544757",
"0.5544564",
"0.55432284",
"0.55399436",
"0.5538465",
"0.5538217",
"0.552212",
"0.5507601",
"0.5492812",
"0.546525",
"0.5456182",
"0.5418787",
"0.54054993",
"0.5399056",
"0.53877395",
"0.53866315",
"0.5385944",
"0.53854996",
"0.53776383",
"0.5372248",
"0.5368007",
"0.53619194",
"0.53598833",
"0.5355748",
"0.53532887",
"0.5346567",
"0.5339093",
"0.53386456",
"0.53343636",
"0.5333837",
"0.5332074",
"0.5316088",
"0.5304003",
"0.5301248",
"0.52950853",
"0.5294513",
"0.5286849",
"0.5286275",
"0.5284625",
"0.5284177",
"0.52833897",
"0.5282342",
"0.52777284",
"0.52710426",
"0.52649975",
"0.52645546",
"0.526281",
"0.5262638",
"0.52579874",
"0.52546847",
"0.5252925",
"0.5245454",
"0.52392405",
"0.5237091",
"0.5233765",
"0.52286226",
"0.5228242",
"0.52229524",
"0.5220426",
"0.52157015",
"0.5211251",
"0.52032465",
"0.5198141",
"0.51942044",
"0.5192518",
"0.5190935",
"0.5188637",
"0.5187322",
"0.51863235",
"0.5185175",
"0.51831436",
"0.51805836",
"0.51794255",
"0.51734924",
"0.517343"
]
| 0.0 | -1 |
0.000621371 mile in 1 meter int distance = ddistance.intValue(); conversion to show km or miles | protected Anchor getDistanceHyperlink(LocationResult locationResult, String target) {
String val = getDistanceDisplay(locationResult);
Anchor distanceLabel = new Anchor(val, target);
distanceLabel.setStyleName("distance");
return distanceLabel;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double getDistanceInMiles();",
"public double getDistance() {\n\t\t// miles = miles/hr * s / (s/hr)\n\t\treturn (double)speed/10.0 * duration / 3600.0;\n\t}",
"public String getDistance(ExerciseEntry exerciseEntry){\n\n //get exerciseEntry distance\n double miles= exerciseEntry.getmDistance();\n\n //if its miles return Distance in Miles\n if(unitType.length()==5){\n return Integer.toString((int) miles )+\" Miles\";\n }\n //if unitType is Kilometers convert distance to kilometers and get String\n else{\n Double kilometers= miles*1.60934;\n return Integer.toString(kilometers.intValue())+\" Kilometers\";\n }\n }",
"public float getTheDistance(){\n\t\t\n\t\tdistance = sonic.getDistance();\n\t\tSystem.out.println(\"value:\"+ distance);\n\t\t//considering the test results we see after 23 cm we see the +1cm precision and below 23cm we see + 5cm range \n\t\tif (distance<=25){\n\t\treturn (distance-7);\n\t\t}\n\t\telse{return (distance-3);}\n\t}",
"public Double getDistanceByUnit(final DistanceUnit distanceUnit, final double distanceInKm);",
"private String getDistanceUnit(int distance) {\n switch (distance) {\n case DISTANCE_KM:\n return getResourceString(R.string.val_km);\n case DISTANCE_MILES:\n return getResourceString(R.string.val_m);\n }\n\n return \"\";\n }",
"public double convert(double distance, LengthUnit units)\r\n {\r\n return this.toMetersConversionFactor * distance /\r\n units.toMetersConversionFactor;\r\n }",
"protected float getDistance(float distance) {\r\n\t\treturn distance * parent.pixelsPerUnit;\r\n\t}",
"public double convertDistance(double lat, double value){\n double earthRadius = 6378.137;\n double pi = Math.PI;\n double oneKMeter = (1/((2*pi/360)*earthRadius));\n\n return value * oneKMeter;\n }",
"public double getDistance(){\n\t\treturn this.distance;\n\t}",
"public static int convertDistance(double distance) {\n // Using arc length formula to calculate the distance + scaling\n return (int) ((180 * distance) / (Math.PI * WHEEL_RAD) * 100) / 100;\n }",
"public int getDistance() {\r\n\t\treturn distance;\r\n\t}",
"public int getDistance() {\r\n\t\treturn distance;\r\n\t}",
"public static void main(String[] args) {\n\n System.out.println(\"Enter a distance in kilometers: \");\n Scanner scanner = new Scanner(System.in);\n int distance = scanner.nextInt();\n double distanceInMiles = distance*0.621371192;\n System.out.println(\"In miles this is about: \" + Math.round(distanceInMiles));\n }",
"double getDistance();",
"public float getDistance() {\n return distance;\n }",
"public int getDistance() {\n\t\treturn distance;\n\t}",
"void setDistanceInKm(float distanceInKm);",
"public float getDistanceData() {\n\t\tultrasonicSample.fetchSample(distanceData, 0);\n\t\tfloat distance = distanceData[0]*100; //change the unit from m to cm\n\t\tfloat distanceToReturn;\n\t\tif (distance >= WALL_DIS + WIDTH && filterControl < FILTER_OUT) {\n\t\t\t// bad value, do not set the distance var, however do increment the\n\t\t\t// filter value\n\t\t\tfilterControl++;\n\t\t\tdistanceToReturn = lastDistance;\n\t\t} else if (distance >= WALL_DIS + WIDTH) {\n\t\t\t// We have repeated large values, so there must actually be nothing\n\t\t\t// there: leave the distance alone\n\t\t\tdistanceToReturn = distance;\n\t\t\tlastDistance = distance;\n\t\t}else {\n\t\t\t// distance too low: reset filter and leave\n\t\t\t// distance alone.\n\t\t\tfilterControl = 0;\n\t\t\tdistanceToReturn = distance;\n\t\t\tlastDistance = distance;\n\t\t}\n\t LCD.drawString(\"D: \" +distanceToReturn, 0, 3);\n\t\treturn distanceToReturn;\n\t}",
"public float getDistance();",
"public double getDistance () {\n return distance;\n }",
"public double getDistance() {\n\t\treturn distance;\n\t}",
"public double getDistance() {\n\t\treturn distance;\n\t}",
"public float getDistance() {\r\n return distance;\r\n }",
"public void setDistance(int d) {\r\n\t\tdistance = d;\r\n\t}",
"public int getDistance() {\n return distance;\n }",
"public int getDistance() {\n return distance;\n }",
"public double getDistance() {\r\n return this.distance;\r\n }",
"public double getDistance() {\n return distance;\n }",
"public double\ntValue(double distance)\n{\n\treturn (distance/this.length());\n}",
"public double getDistanceMoyenne() {\n\t\treturn getDistanceTotale () / 12;\n\t}",
"public float getDistance() {\n return distance;\n }",
"public double getDistance() {\n return this.distance;\n }",
"public static float kmToMiles(long steps){\n float miles;\n float distance = (float) (steps * 78) / (float) 100000;\n miles = (float) (distance / 1.609344);\n return miles;\n }",
"public int distance() {\n return distance;\n }",
"public static int convertDistance(double distance) {\n return (int) ((180.0 * distance) / (Math.PI * WHEEL_RAD));\n }",
"public static double convertmiTOkm (double mi) {\n\tdouble km=mi*1.60934;\n\treturn km;\n}",
"private int getDistanceAsRange(double distance) {\n int div = (int) (distance * 1000 / slotDistanceRange);\n return (div * slotDistanceRange);\n }",
"public final float getDistance() {\n return distance;\n }",
"public static double convertDistance(double distance) {\n // Compute and return the correct value (in degrees)\n return (360.0 * distance / (WHEEL_CIRC));\n }",
"public String formatM(double distanceInM) {\n DecimalFormat df = new DecimalFormat(\"0.00\");\n return df.format(distanceInM);\n }",
"public double distance() {\n return distance;\n }",
"public double distance() {\n return distance;\n }",
"public static double distanceInMeter(double lat1, double long1, double lat2, double long2) {\n\t\t// Compute difference of latitude, longitude and convert to radians\n\t\tdouble diffLat = Math.toRadians(lat2 - lat1);\n\t\tdouble diffLong = Math.toRadians(long2 - long1);\n\t\t\n\t\t// Convert single latitude values to radiant\n\t\tlat1 = Math.toRadians(lat1);\n\t\tlat2 = Math.toRadians(lat2);\n\t\t\n\t\tdouble diffLatSin = Math.sin(diffLat/2);\n\t\tdouble diffLongSin = Math.sin(diffLong/2);\n\t\t\n\t\tdouble a = \tdiffLatSin * diffLatSin +\n\t\t\t\t\tdiffLongSin * diffLongSin *\n\t\t\t\t\tMath.cos(lat1) * Math.cos(lat2);\n\t\t\n\t\tdouble greatCircleDistanceRad = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\t\t\n\t\treturn EARTH_RADIUS * greatCircleDistanceRad;\n\t}",
"public static void f_miles_to_kilometers(){\n Scanner keyboard = new Scanner(System.in);\r\n\r\n System.out.println(\"Input the value in miles: \");\r\n double miles = keyboard.nextDouble();\r\n\r\n while (miles < 1){\r\n System.err.println(\"Error: invalid value\");\r\n\r\n System.out.println(\"Input the value in miles: \");\r\n miles = keyboard.nextDouble();\r\n }\r\n\r\n double km = miles * 1.60934;\r\n\r\n System.out.println(\"The conversion is: \"+ km+ \" km\");\r\n\r\n }",
"public Distance getDistance() {\n return distance;\n }",
"public static void f_kilometers_to_miles(){\n Scanner keyboard = new Scanner(System.in);\r\n\r\n System.out.println(\"Input the value in km: \");\r\n double km = keyboard.nextDouble();\r\n\r\n while (km < 1){\r\n System.err.println(\"Error: invalid value\");\r\n\r\n System.out.println(\"Input the value in km: \");\r\n km = keyboard.nextDouble();\r\n }\r\n\r\n double miles = km * 0.621371;\r\n\r\n System.out.println(\"The conversion is: \"+ miles+ \" miles\");\r\n\r\n\r\n }",
"public int getTotDistance(){\r\n\t \treturn this.totDistance;\r\n\t }",
"public void setDistance(float distance) {\n this.distance = distance;\n }",
"public void setDistance(int value) {\n this.distance = value;\n }",
"void setDistanceInM(int distanceInM);",
"public void setDistance(double distance) {\r\n this.distance = distance;\r\n }",
"public double getDistance(){\n return sensor.getVoltage()*100/2.54 - 12;\n }",
"private static double distance(double lat1, double lon1, double lat2, double lon2, String unit) {\n double theta = lon1 - lon2;\n double dist = Math.sin(deg2rad(lat1)) * Math.sin(deg2rad(lat2)) + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * Math.cos(deg2rad(theta));\n dist = Math.acos(dist);\n dist = rad2deg(dist);\n dist = dist * 60 * 1.1515;\n if (unit.equals(\"K\")) {\n dist = dist * 1.609344;\n } else if (unit.equals(\"N\")) {\n dist = dist * 0.8684;\n }\n //default miles\n return (dist);\n }",
"public static double mileToMeter(final double mile) {\n return mile * METERS_PER_MILE;\n }",
"public void setDistance(double distance) {\n this.distance = distance;\n }",
"public void setDistance(double distance) {\n this.distance = distance;\n }",
"public static String formatDistance(float value, String unit)\n\t{\n\n\t\tif (unit.equals(\"km\"))\n\t\t{\n\t\t\tif (value > 100000)\n\t\t\t{\n\t\t\t\treturn Utils.formatNumber(value / 1000, 1);\n\t\t\t}\n\n\t\t\t// convert to km\n\t\t\tif (value > 1000)\n\t\t\t{\n\t\t\t\treturn Utils.formatNumber(value / 1000, 2, 1);\n\t\t\t}\n\n\t\t\t// leave value in kilometers with 6 precision\n\t\t\treturn Utils.formatNumber(value / 1000, 6);\n\n\t\t}\n\n\t\tif (unit.equals(\"mi\"))\n\t\t{\n\n\t\t\tif (value > 100 * MI_TO_M)\n\t\t\t{\n\t\t\t\treturn Utils.formatNumber(value / 1000, 1);\n\t\t\t}\n\n\t\t\t// convert to miles\n\t\t\tif (value > MI_TO_M)\n\t\t\t{\n\t\t\t\treturn Utils.formatNumber(value / MI_TO_M, 2, 1);\n\t\t\t}\n\n\t\t\t// value is in feet\n\t\t\treturn Utils.formatNumber(value / 1000 * M_TO_FT, 6);\n\t\t}\n\n\t\treturn \"\";\n\n\t}",
"public double getDistance() {\n\n final int R = 6371; // Radius of the earth\n double lat1 = latitude;\n double lon1 = longitude;\n double lat2 = 41.917715; //lat2, lon2 is location of St.Charles, IL\n double lon2 = -88.266027;\n double el1=0,el2 = 0;\n double latDistance = Math.toRadians(lat2 - lat1);\n double lonDistance = Math.toRadians(lon2 - lon1);\n double a = Math.sin(latDistance / 2) * Math.sin(latDistance / 2)\n + Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2))\n * Math.sin(lonDistance / 2) * Math.sin(lonDistance / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double distance = R * c * 1000; // convert to meters\n\n double height = el1 - el2;\n\n distance = Math.pow(distance, 2) + Math.pow(height, 2);\n\n return Math.sqrt(distance);\n }",
"public void setDistance(double distance) {\r\n\t\tthis.distance = distance;\r\n\t}",
"public float getDistance()\n {\n return distance_slider.getValue() / DISTANCE_SCALE_FACTOR;\n }",
"public static double centiToMeter(double num) { return (num/Math.pow(10,2)); }",
"public double threatCircle() {\t\r\n\t\tdouble miles = 20.0f * Math.pow(1.8, 2*getMagnitude()-5);\r\n\t\tdouble km = (miles * kmPerMile);\r\n\t\treturn km;\r\n\t}",
"private static int convertDistance(double radius, double distance) {\n \t\treturn (int) ((180.0 * distance) / (Math.PI * radius));\n \t}",
"public static final float inchesToMillimeters(float value) {\n\t return value * 25.4f;\n\t}",
"public final Double getMile() {\n return mile;\n }",
"public double getDistance() { \n\t\treturn Math.pow(input.getAverageVoltage(), exp) * mul; \n\t}",
"public double getDist() {\n return distance;\n }",
"public void setDistance(double distance) {\n\t\tthis.distance = distance;\n\t}",
"private static int convertDistance(double radius, double distance) {\n return (int) ((180.0 * distance) / (Math.PI * radius));\n }",
"public Dimension2D getDistance() {\n\t\treturn distance;\n\t}",
"@DBField\n public void setDistance(float distance){\n this.distance = distance;\n }",
"public int getMinDistance(){\n return totalDistance;\n }",
"public double getDistanceTotale() {\n\t\treturn distanceTotale;\n\t}",
"public double ComputeDistance(){ \n\t\tdouble lat1 = this.depAirportCity.getLatDegs() + (double)(this.depAirportCity.getLatMins())/60; \n\t\tdouble lon1 = this.depAirportCity.getLongDegs() + (double)(this.depAirportCity.getLongMins())/60;\n\t\tdouble lat2 = this.arrAirportCity.getLatDegs() + (double)(this.arrAirportCity.getLatMins())/60; \n\t\tdouble lon2 = this.arrAirportCity.getLongDegs() + (double)(this.arrAirportCity.getLongMins())/60;\n\t\t\n\t\tdouble distance = Haversine.getMiles(lat1, lon1, lat2, lon2);\n\t\treturn distance;\n\t}",
"private static Double convertToMeters(Double Ins) {\n double meters;\n meters = Ins / 39.37;\n return meters;\n }",
"int cellFromDistance(int d) {\n int d2 = d - GUTTER_SIZE;\n if (d2 < 0) {\n return -1;\n } else {\n d2 /= (CELL_SIZE + GUTTER_SIZE);\n int next = cellDistance(d2 + 1);\n if (next - d <= GUTTER_SIZE)\n return -1;\n else\n return d2;\n }\n }",
"public int getTotalDistance() {\n return totalDistance;\n }",
"public void calcDistance() {\n if (DataManager.INSTANCE.getLocation() != null && location.getLength() == 2) {\n Log.e(\"asdf\", DataManager.INSTANCE.getLocation().getLength() + \"\");\n Log.e(\"asdf\", DataManager.INSTANCE.getLocation().getLength() + \"\");\n double dLat = Math.toRadians(location.getLatitude() - DataManager.INSTANCE.getLocation().getLatitude()); // deg2rad below\n double dLon = Math.toRadians(location.getLongitude() - DataManager.INSTANCE.getLocation().getLongitude());\n double a =\n Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(Math.toRadians(location.getLatitude()))\n * Math.cos(Math.toRadians(location.getLatitude()))\n * Math.sin(dLon / 2)\n * Math.sin(dLon / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double d = KM_IN_RADIUS * c; // Distance in km\n distance = (float) d;\n } else distance = null;\n }",
"public int getCostPerMile() {\n return costPerMile;\n }",
"@Override\n protected float duration(final float distance) {\n if (distance < 100) {\n return 0.15f;\n } else if (distance < 200) {\n return 0.3f;\n } else if (distance < 300) {\n return 0.45f;\n } else if (distance < 400) {\n return 0.6f;\n } else if (distance < 500) {\n return 0.75f;\n } else if (distance < 600) {\n return 0.9f;\n }\n return 1.1f;\n }",
"public Vector3D getDistance()\n\t{\n\t\treturn distance;\n\t}",
"public void recordFlightDistanceInKilometers(int distance) {\n\t\tthis.balance = this.balance + distance;\n\t\tif(this.balance < 10000) this.status = \"Bronze\";\n\t\telse if(this.balance >= 10000) this.status = \"Silver\";\n\t\t\n\t}",
"private static int convertDistance(double radius, double distance) {\n\t\treturn (int) ((180.0 * distance) / (Math.PI * radius));\n\t}",
"public static long toMilesPerHour(double kilometersPerHour) {\n\t\t\tdouble milesPerHour = 0;\n\t\t\tlong output = 0;\n\t\t\tlong iPart;\n\t\t\tdouble fPart;\n\t\t\tif(kilometersPerHour < 0){\n\t\t\t\toutput = -1;\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(kilometersPerHour > 0){\n\t\t\t\tmilesPerHour = kilometersPerHour * 0.62137;\n\t\t\t\tiPart = (long) milesPerHour;\n\t\t\t\tfPart = milesPerHour - iPart;\n\t\t\t\tif(fPart > 0 && fPart < 0.5) {\n\t\t\t\t\toutput = iPart;\n\t\t\t\t}\n\t\t\t\telse if(fPart > 0.5 && fPart <= 0.99d){\n\t\t\t\t\toutput = iPart+1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t//System.out.println(kilometersPerHour + \" \" + output);\n\n\t\t\t\n\t\t\treturn output;\n\t\t}",
"protected static float toMillimeters(int unit, float value) {\n \t\tswitch (unit) {\n \t\tcase CSSPrimitiveValue.CSS_CM:\n \t\t\treturn (value * 10);\n \t\tcase CSSPrimitiveValue.CSS_MM:\n \t\t\treturn value;\n \t\tcase CSSPrimitiveValue.CSS_IN:\n \t\t\treturn (value * 25.4f);\n \t\tcase CSSPrimitiveValue.CSS_PT:\n \t\t\treturn (value * 25.4f / 72);\n \t\tcase CSSPrimitiveValue.CSS_PC:\n \t\t\treturn (value * 25.4f / 6);\n \t\tdefault:\n \t\t\tthrow new DOMException(DOMException.INVALID_ACCESS_ERR, \"\");\n \t\t}\n \t}",
"private String calculateDistancePerAmount() {\n double distance = parser(getTextFromEditText(R.id.distanceEdit));\n double fuel = parser(getTextFromEditText(R.id.fuelEdit));\n double value = distance / fuel;\n return rounder(value);\n }",
"public int rawDistance() {\r\n\t\tus.fetchSample(usData, 0); // acquire data\r\n\t\tdistance=(int) (usData[0] * 100.0);// extract from buffer, cast to int and add to total\r\n\t\t\t\r\n\t\treturn distance; \r\n\t}",
"double fuelneeded(int miles) {\n\t\treturn (double) miles / mpg;\n\t}",
"public float getMetric(){\n float distance = 0.0f;\n MeasurementService.DataPoint prv = center;\n\n for(MeasurementService.DataPoint d : list){\n distance += Math.sqrt(\n Math.pow(prv.getX() - d.getX(),2) +\n Math.pow(prv.getY() - d.getY(),2)\n );\n prv = d;\n }\n\n return distance;\n }",
"@ApiModelProperty(example = \"2\", value = \"Provides the unit of measure in which distance is provided in this message. Refer to OpenTravel Code List Unit of Measure (UOM).\")\n\n\n public Integer getDistanceUnitOfMeasureCode() {\n return distanceUnitOfMeasureCode;\n }",
"public static double milesPerHourToCentiMetresPerSecond(double num) { return (num*44.704); }",
"public static double squareMetersToSquareMilliMeters(double num){ return (num*Math.pow(10,6)); }",
"public double distance(){\n return DistanceTraveled;\n }",
"public static int calculateOptimumZoomLevel(Context context, float distanceInKM) {\n WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);\n Display display = wm.getDefaultDisplay();\n Point size = new Point();\n display.getSize(size);\n return calculateZoomLevel(size.x, distanceInKM);\n }",
"public static Double getFeet(Double distanceInFeet) {\n\t\treturn distanceInFeet/5280/ MILE_PER_DEGREE;\n\t}",
"public static double feetToMeters(double foot){\r\n\t\t\r\n\t\tdouble meter = 0.305 * foot;\r\n\t\t\r\n\t\treturn meter;\r\n\t}",
"public final void setDistance(float distance) {\n this.distance = distance;\n }",
"public double toMetersPerSecond(){\n\t\tdouble mps = mph * 1609.34/3600;\n\t\treturn mps;\n\t}",
"public static int calculateDistanceInKilometer(double srcLat, double srcLng,double dstLat, double dstLng) {\n double latDistance = Math.toRadians(srcLat - dstLat);\n double lngDistance = Math.toRadians(srcLng - dstLng);\n\n double a = Math.sin(latDistance / 2) * Math.sin(latDistance / 2)\n + Math.cos(Math.toRadians(srcLat)) * Math.cos(Math.toRadians(dstLat))\n * Math.sin(lngDistance / 2) * Math.sin(lngDistance / 2);\n\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\n return (int) (Math.round(AVERAGE_RADIUS_OF_EARTH_KM * c));\n\t }",
"@Test\n public void getAmountDescription_total_distanceGoal_meterDistance() {\n Goal goal = new Goal(2, 49.572, GoalType.Walk, \"2018-09-28\", \"2017-01-12\",\n 0.77777);\n // Create the real and expected total amount descriptions\n description = goal.getAmountDescription(\"total\");\n expectedDescription = \"778 m\";\n\n // Check the 2 Strings are the same\n assertEquals(expectedDescription, description);\n }"
]
| [
"0.760902",
"0.7009594",
"0.69445163",
"0.6834281",
"0.67341495",
"0.6618928",
"0.6611577",
"0.65922606",
"0.6565114",
"0.65026534",
"0.6463671",
"0.645944",
"0.645944",
"0.6438945",
"0.64257807",
"0.63857955",
"0.6381705",
"0.6375815",
"0.6371774",
"0.6350905",
"0.6347661",
"0.6342542",
"0.6342542",
"0.634181",
"0.63284624",
"0.63281673",
"0.63281673",
"0.63209385",
"0.6304936",
"0.6293635",
"0.62892497",
"0.62847227",
"0.6268158",
"0.6250773",
"0.62488866",
"0.62399787",
"0.6218745",
"0.6217431",
"0.6211849",
"0.61930376",
"0.61774665",
"0.61769795",
"0.61769795",
"0.61499345",
"0.6126707",
"0.6119834",
"0.6088629",
"0.60838723",
"0.60634893",
"0.6034162",
"0.6028918",
"0.6026982",
"0.6010493",
"0.59989464",
"0.5996807",
"0.59962106",
"0.59962106",
"0.5989074",
"0.5974116",
"0.59636563",
"0.59616834",
"0.5947845",
"0.59430075",
"0.5940419",
"0.59358543",
"0.5932383",
"0.5918351",
"0.5917667",
"0.59106284",
"0.59001195",
"0.58991176",
"0.58826786",
"0.5881583",
"0.58677715",
"0.5857179",
"0.58482707",
"0.5847412",
"0.58430994",
"0.5837207",
"0.58346254",
"0.5815254",
"0.58064127",
"0.58044755",
"0.57964134",
"0.57910717",
"0.57895",
"0.5783953",
"0.5781916",
"0.5774412",
"0.5745458",
"0.57270503",
"0.57157046",
"0.57154554",
"0.5710846",
"0.5709957",
"0.57076776",
"0.5699575",
"0.5685193",
"0.56846344",
"0.56800544",
"0.5674107"
]
| 0.0 | -1 |
protected HandlerRegistration formHandlerRegistration = null; | public AsyncCallback getSaveLocationAsSpotCallback(final MarkData markData) {
AsyncCallback saveLocationAsSpotCallback = new AsyncCallback() {
public void onFailure(Throwable throwable) {
getMessagePanel().displayError(throwable.getMessage());
}
public void onSuccess(Object response) {
MobileResponse mobileResponse = (MobileResponse) response;
if (mobileResponse.getStatus() == 1) {
leavemark(mobileResponse.getSpotHolder().getId(), markData);
} else {
mywebapp.verifyDisplay();
getMessagePanel().clear();
getMessagePanel().displayErrors(mobileResponse.getErrorMessages());
}
}
};
return saveLocationAsSpotCallback;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n protected void onForm(ClientForm form) {\n \r\n }",
"public interface HandlerRegistration {\n\n void removeHandler();\n\n}",
"public CompareSkusFormHandler() {\n }",
"UserRegistrationResponse registrationPost(RegistrationForm registrationForm);",
"public Handler getHandler() {\n return null;\n }",
"public EvaluationFormController()\n\t{\n\t\tDispatcher.addHandler(AddCheckAssignmentRequest.class.getCanonicalName(), this);\n\t}",
"public Handler getHandler();",
"protected GwtCreateHandler getGwtCreateHandler() {\n\t\treturn null;\n\t}",
"CreateHandler()\n {\n }",
"@Override\n\tpublic void onFormCreate(AbstractForm arg0, DataMsgBus arg1) {\n\t}",
"public Registration() {\r\n initComponents();\r\n handler = new ClientSocketHandler();\r\n }",
"public interface IFormHandler1 extends IFormHandler \r\n{\r\n /**\r\n * return an Enumeration of loop handler objects\r\n */\r\n public Enumeration getControlHandlerNames();\r\n}",
"public Handler getHandler() {\r\n return handler;\r\n }",
"public Handler getHandler() {\r\n return handler;\r\n }",
"@Override\n protected void processBeforeBody() throws JellyTagException,\n FormBuilderException\n {\n super.processBeforeBody();\n\n iconHandlerImplementation =\n (getIconHandler() != null) ? resolveIconHandler(getIconHandler())\n : createDefaultIconHandler();\n }",
"public HandlerRegistry getHandlerRegistry() {\n\t\treturn null;\n\t}",
"public void registerHandler(Object handler)\n {\n\n }",
"HandlerHelper getHandlerHelper() {\n return handlerHelper;\n }",
"public RequestUrlHandler() {\n // requestService = SpringContextHolder.getBean(ScfRequestService.class);\n }",
"@Override\r\n public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n ModelAndView modelAndView) throws Exception {\n\r\n }",
"public HandlerRegistration addIronFormElementRegisterHandler(IronFormElementRegisterEventHandler handler) {\n return addDomHandler(handler, IronFormElementRegisterEvent.TYPE);\n }",
"@Override\r\n\tpublic void configHandler(Handlers me) {\n\r\n\t}",
"@Override\n\tpublic FormContainer getFormContainer() {\n\t\treturn null;\n\t}",
"@Override\n\t\tpublic FormTestFacade getForm() {\n\t\t\treturn null;\n\t\t}",
"@Override\n\t\tpublic FormTestFacade getForm() {\n\t\t\treturn null;\n\t\t}",
"public static synchronized INSURLHandler getINSURLHandler() {\n/* 50 */ if (insURLHandler == null) {\n/* 51 */ insURLHandler = new INSURLHandler();\n/* */ }\n/* 53 */ return insURLHandler;\n/* */ }",
"@Override\r\n\tpublic void attachHandlers() {\n\r\n\t}",
"@Override\n\tpublic Handler getHandler() {\n\t\t// TODO Auto-generated method stub\n\t\treturn mHandler;\n\t}",
"public void setForm(Form form)\n {\n this.form = form;\n }",
"public Form getForm() {\n return form;\n }",
"@Override\n\tpublic void registrarEntrada() {\n\n\t}",
"public GenericHandler() {\n\n }",
"public String getHandler() {\n return handler;\n }",
"public void processRegistration() {\n try {\n System.out.println(\"Processing Registration\");\n FacesContext c = FacesContext.getCurrentInstance();\n c.getApplication().getNavigationHandler().handleNavigation(c, null, \"register.xhtml\");\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n }\n }",
"public Handler getHandler() {\n return mHandler;\n }",
"@Override\r\npublic void requestInitialized(ServletRequestEvent arg0) {\n\t\r\n}",
"@Override\n\tpublic Handler getHandler() {\n\t\treturn mHandler;\n\t}",
"public abstract FullResponse onServeFormParams(Map<String, List<String>> formParams);",
"protected IManagedForm getForm(){\r\n\t\treturn _mForm;\r\n\t}",
"@Override\n public List<MHandler> getHandlers()\n {\n return null;\n }",
"@Override\r\n\tprotected void customizeRegistration(ServletRegistration.Dynamic registration) {\r\n\t\tregistration.setInitParameter(\"dispatchOptionsRequest\", \"true\");\r\n\t\tregistration.setAsyncSupported(true);\r\n\t}",
"public ErrorHandler getErrorHandler()\n {\n return (errorHandler == base) ? null : errorHandler;\n }",
"private void init()\n {\n \t// Make page stateless.\n setStatelessHint(true);\n\n // Add registration form.\n RegistrationForm registrationForm = new RegistrationForm(REGISTRATION_FORM);\n add(registrationForm);\n // AjaxFormValidatingBehavior.addToAllFormComponents(registrationForm, \"onblur\");\n }",
"public Class<?> getHandler();",
"@Override\r\n\tprotected void customizeRegistration(javax.servlet.ServletRegistration.Dynamic registration) {\r\n\t\tSystem.out.println(\"customizeRegistration\");\r\n\t\tregistration.setInitParameter(\"dispatchOptionsRequest\", \"true\");\r\n\t\tregistration.setAsyncSupported(true);\r\n\t}",
"private void readForm() {\n }",
"public int getHandler() {\n\t\treturn 1;\n\t}",
"public Form(){ \n\t\tsuper(tag(Form.class)); \n\t}",
"RegistrationModule createRegistrationModule();",
"public EventHandlerRegistry() {\n }",
"@Override\n\tpublic void postRun(FormCheckerForm form) {\n\t}",
"public void handleRegister() {\n\t\tmainApp.showRegistrationPage();\n\t}",
"@Override\n\tprotected BaseProcesoForm devuelveFormProceso() throws Exception {\n\t\tProcesoBASLoggerForm objForm = new ProcesoBASLoggerForm();\n\t\treturn objForm;\n\t}",
"public void setHandler(Handler handler) {\r\n this.handler = handler;\r\n }",
"public void setHandler(Handler handler) {\r\n this.handler = handler;\r\n }",
"@Override\n\tpublic void registrarLlegada() {\n\t}",
"void registerEventbusHandlers();",
"@Override\n\tpublic void registrarLlegada() {\n\t\t\n\t}",
"public void formProcessingComplete(){}",
"public handleFileUpload() {\r\n\t\tsuper();\r\n\t}",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"@Override\n public HandlerList getHandlers() {\n return handlers;\n }",
"@Override\n public HandlerList getHandlers() {\n return handlers;\n }",
"public void setHandler(ContentHandler handler) { }",
"public Object register(HttpServletRequest req);",
"public ConfigurationForm getConfigForm()\n {\n return configForm;\n }",
"public abstract ModelAndView handleValidForm(HttpServletRequest req, HttpServletResponse res, Object inputCommand, BindException be) throws Throwable;",
"public Handler getHandler() {\n return this.mHandler;\n }",
"protected final Form getForm() {\n\t\treturn itsForm;\n\t}",
"public FormDataManagement() {\n initComponents();\n }",
"@Override\n public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {\n }",
"private Handler getConnectorHandler() {\n return connectorHandler;\n }",
"private FormMediator() {\n queryViews = new LinkedList<QueryView>();\n searchAction = Actions.SEARCH_ACTION;\n }",
"public Handler getHandler() {\n\t\treturn this.serverHandler;\n\t}",
"PaymentHandler createPaymentHandler();",
"protected ActionForm processActionForm(HttpServletRequest request,\n HttpServletResponse response,\n ActionMapping mapping)\n {\n String scope = mapping.getScope();\n if(scope != null)\n {\n try\n {\n if(scope.equals(\"session\"))\n {\n OperationContext opCon = OperationContext.getOperationContext(request);\n if(opCon != null)\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Looking for ActionForm in OperationContext[id=\" + opCon.getOperationContextId() + \"]\"); //20030124AH\n }\n ActionForm form = opCon.getActionForm();\n if(form != null)\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Found ActionForm in OperationContext\"); //20030124AH\n }\n return form;\n }\n else\n {\n if(_log.isWarnEnabled())\n {\n _log.warn(\"No ActionForm found in OperationContext\"); //20030124AH\n }\n return null; //20030124AH\n }\n }\n }\n }\n catch(OperationException e)\n {\n // OperationExceptions here are normal when we forward from a completed operation\n // to the next action, so we ignore them.\n }\n catch(Throwable t)\n {\n if(_log.isErrorEnabled())\n {\n _log.error(\"Error caught in processActionForm() performing customised ActionForm handling\", t); //20030124AH\n }\n }\n }\n\n if(mapping instanceof GTActionMapping)\n { //20030124AH - Check the mapping to see if we should defer form creation or do it as normal\n if( ((GTActionMapping)mapping).isDeferFormCreation() )\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Deferring ActionForm creation\");\n }\n return null;\n }\n }\n //...\n if(_log.isInfoEnabled())\n {\n _log.info(\"Delegating to superclass to obtain ActionForm\"); //20030124AH\n }\n ActionForm form = super.processActionForm(request, response, mapping);\n return form;\n }",
"public LoginController(LoginForm form) {this.loginForm = form;}",
"private HandlerBuilder() {\n }",
"@Override\r\n\tpublic void refrescarFormulario() {\n\t\t\r\n\t}",
"@Override\n public void onSubmit()\n {\n Page page = ((DccdSession)Session.get()).getRedirectPage(RegistrationPage.class);\n if (page != null)\n {\n \tlogger.debug(\"Back to Page class: \" + page.getClass().getSimpleName());\n \tsetResponsePage(page);\n }\n else\n {\n \t// Homepage seems a good fallback\n \tsetResponsePage(HomePage.class);\n }\n }",
"public InputHandler getInputHandler() {\n return inputHandler;\n }",
"public AJAXEmployeeEditHandler() {\n super();\n // TODO Auto-generated constructor stub\n }",
"@Override\n\t\t\tpublic void onSubmitComplete(FormSubmitCompleteEvent event) {\n\n\t\t\t}",
"public FormaServer() {\n initComponents();\n srediFormu();\n \n }",
"@Override\n public final HandlerList getHandlers(){\n return handlers;\n }",
"@DefaultHandler\n public Resolution form() {\n return new ForwardResolution(MAIN_VIEW);\n }",
"public formPrincipal() {\n initComponents();\n }",
"@Override\n public void addHandlerListener(IHandlerListener handlerListener) {\n\n }",
"private Handler getHandler(Request request) {\n return resolver.get(request.getClass().getCanonicalName()).create();\n }",
"public HandlerRegistration addIronFormElementUnregisterHandler(IronFormElementUnregisterEventHandler handler) {\n return addDomHandler(handler, IronFormElementUnregisterEvent.TYPE);\n }",
"public UploadForm() {\n initComponents();\n }",
"public void register() {\r\n\t\tHandlerSet hs = HandlerSet.getHandlerSet();\r\n\t\ths.addHandler(this);\r\n\t}",
"@Override\n public String getHandlerName() {\n return \"UpdateHandler\";\n }",
"public CMSFormClientServices() {\n // Set up the configuration manager.\n config = new ConfigMgr(\"form.cfg\");\n }",
"public DefaultValidationAnnotationHandlerRegistry() {\n\n // class annotation handlers\n registerClassHandler(new ExpressionClassValidationAnnotationHandler());\n registerClassHandler(new ExpressionsClassValidationAnnotationHandler());\n registerClassHandler(new ValidatorClassValidationAnnotationHandler());\n registerClassHandler(new ValidatorsClassValidationAnnotationHandler());\n registerClassHandler(new ValidatorReferenceClassValidationAnnotationHandler());\n\n // method annotation handlers\n registerMethodHandler(new ValidationMethodAnnotationHandler());\n\n // property annotation handlers\n registerPropertyHandler(new CascadeValidationAnnotationHandler());\n registerPropertyHandler(new EmailValidationAnnotationHandler());\n registerPropertyHandler(new DateInTheFutureValidationAnnotationHandler());\n registerPropertyHandler(new DateInThePastValidationAnnotationHandler());\n registerPropertyHandler(new LengthValidationAnnotationHandler());\n registerPropertyHandler(new NotBlankValidationAnnotationHandler());\n registerPropertyHandler(new NotEmptyValidationAnnotationHandler());\n registerPropertyHandler(new NotNullValidationAnnotationHandler());\n registerPropertyHandler(new RangeValidationAnnotationHandler());\n registerPropertyHandler(new RegExpValidationAnnotationHandler());\n registerPropertyHandler(new SizeValidationAnnotationHandler());\n registerPropertyHandler(new ExpressionPropertyValidationAnnotationHandler());\n registerPropertyHandler(new ExpressionsPropertyValidationAnnotationHandler());\n registerPropertyHandler(new ConditionReferenceValidationAnnotationHandler());\n\n if (LibraryUtils.JODA_TIME_IN_CLASSPATH) {\n registerPropertyHandler(new InstantInTheFutureValidationAnnotationHandler());\n registerPropertyHandler(new InstantInThePastValidationAnnotationHandler());\n }\n\n }",
"@GetMapping(\"/register\")\n\tpublic String provideRegistrationForm(Model map)\n\t{\n\t\tSystem.out.println(\"inside vendor reg form\" + getClass().getName());\n\t\tmap.addAttribute(\"vendor_details\", new Vendor());\n\t\tmap.addAttribute(\"payment_modes\", PaymentMode.values());\n\t\tSystem.out.println(map);\n\t\treturn \"/admin/register\";\n\t}",
"public ContentHandler getContentHandler()\n {\n return (contentHandler == base) ? null : contentHandler;\n }",
"public viewForm() {\n this.addGLEventListener(this);\n }",
"@Override\n public ServletRegistration getServletRegistration(String servletName) {\n return null;\n }",
"@Override\n\tprotected ManageEventHandler createEventHandler() {\n\t\tif (m_handler == null)\n\t\t\tm_handler = new BankKeepEventHandler(this, createController());\n\t\treturn m_handler;\n\t}",
"@Override\n public Map<String, ? extends ServletRegistration> getServletRegistrations() {\n return null;\n }"
]
| [
"0.6565936",
"0.624964",
"0.61036634",
"0.6029387",
"0.6023961",
"0.5998013",
"0.59683824",
"0.5948604",
"0.593193",
"0.5921949",
"0.59189874",
"0.5908481",
"0.5905806",
"0.5905806",
"0.58869267",
"0.5863735",
"0.5852988",
"0.5839889",
"0.5777946",
"0.5762161",
"0.57474273",
"0.57370126",
"0.56906855",
"0.567426",
"0.567426",
"0.56189626",
"0.56055695",
"0.5601619",
"0.55862194",
"0.5585224",
"0.55847275",
"0.5573442",
"0.55469245",
"0.5527907",
"0.5526081",
"0.55164665",
"0.5515854",
"0.5491531",
"0.5489086",
"0.5486383",
"0.54833794",
"0.5480424",
"0.5468654",
"0.54666346",
"0.5465915",
"0.5451141",
"0.5441962",
"0.5439321",
"0.54298735",
"0.5423304",
"0.54130507",
"0.5400836",
"0.5399805",
"0.5391442",
"0.5391442",
"0.53873193",
"0.5386957",
"0.53844863",
"0.5383096",
"0.5379769",
"0.5364344",
"0.5363125",
"0.5363125",
"0.53438616",
"0.5339293",
"0.533591",
"0.5333143",
"0.53295237",
"0.53153104",
"0.53130645",
"0.529661",
"0.5287046",
"0.5283424",
"0.5281785",
"0.5280146",
"0.52784437",
"0.52784044",
"0.5277667",
"0.5276727",
"0.5272819",
"0.5271425",
"0.5252819",
"0.52496314",
"0.524746",
"0.5241039",
"0.5241019",
"0.52392167",
"0.52391726",
"0.52388626",
"0.52346826",
"0.52334225",
"0.5221868",
"0.52125806",
"0.5208616",
"0.5207749",
"0.5202663",
"0.52003264",
"0.5200062",
"0.5194921",
"0.51948315",
"0.51938707"
]
| 0.0 | -1 |
/ this will take markdata form and and add to locationresult | private void addMarkData(MarkData markData, MobileResponse mobileResponse) {
//markData.saySomethingTextArea.getValue()
ItemHolder itemHolder = mobileResponse.getItemHolder();
GWT.log("adding itemholder " + itemHolder.getId());
if (markData.replyItemHolder != null) {
markData.replyItemHolder.getChildrenItemHolders().add(itemHolder);
} else {
if (markData.expandData.locationResult.getItemHolders() == null) {
markData.expandData.locationResult.setItemHolders(new ArrayList<ItemHolder>());
}
markData.expandData.locationResult.getItemHolders().add(itemHolder);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected ComplexPanel getLocationResultPanelSolrMark(LocationResult locationResult) {\n SolrDocument solrDocument = locationResult.getSolrDocument();\n Long itemId = solrDocument.getFirstLong(\"georepoitemid_l\");\n if (itemId == null) {\n itemId = solrDocument.getFirstLong(\"latest_mark_georepoitemid_l\");\n }\n String targetHistoryToken = MyWebApp.ITEM_DETAIL + itemId;\n String targetHistoryToken2 = \"#\" + targetHistoryToken;\n FlowPanel result = new FlowPanel();\n result.setStyleName(\"result\");\n addMarkPhoto2(solrDocument, targetHistoryToken2, result);\n FlowPanel centerBlock = new FlowPanel();\n centerBlock.setStyleName(\"center-block\");\n result.add(centerBlock);\n String spot_label_s = solrDocument.getFirstString(\"location_label_s\");\n if (spot_label_s != null) {\n String sl = \"@\" + spot_label_s.toString();\n Anchor resultHeader = getResultHeader(sl);\n resultHeader.setHref(targetHistoryToken2);\n centerBlock.add(resultHeader);\n }\n ComplexPanel categoriesPanel = addCategories(solrDocument);\n centerBlock.add(categoriesPanel);\n Anchor distanceAnchor = getDistanceAnchor(locationResult);\n result.add(distanceAnchor);\n //addOurBuddies(centerBlock, locationResult);\n addExpand(result, locationResult, centerBlock);\n return result;\n }",
"@Override\n public void onLocationResult(LocationResult locationResult) {\n super.onLocationResult(locationResult);\n Log.d(TAG, \"onLocationResult: \");\n if (locationResult != null) {\n Log.d(TAG, \"onLocationResult: loaction!==null\");\n myLocation = locationResult.getLastLocation();\n showMarker();//de show hinh len\n }\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n\n MyLat = location.getLatitude();\n MyLong = location.getLongitude();\n\n Log.e(TAG, \"MyLat = \" + MyLat);\n Log.e(TAG, \"MyLong = \" + MyLong);\n\n\n LatLng latLng = (new LatLng(location.getLatitude(), location.getLongitude()));\n mMap.clear();\n\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 17.0f));\n\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n markerOptions.draggable(true);\n\n BitmapDescriptor markerIcon = vectorToBitmap(R.drawable.ic__fill_placeholder,\n ContextCompat.getColor(getApplicationContext(),\n R.color.rv_hader));\n\n markerOptions.icon(markerIcon);\n markerOptions.title(\"My Location\");\n if (session.getMobileNumber() != null) {\n markerOptions.snippet(session.getMobileNumber());\n }\n mMap.addMarker(markerOptions);\n\n String add = getAddress(location.getLatitude(), location.getLongitude());\n Log.e(getClass().getSimpleName(), \"getAddress : \" + add);\n currentAddress = add;\n if (add != null)\n tv_current_locName.setText(add);\n else\n tv_current_locName.setText(\"Not Find\");\n } else {\n Log.d(TAG, \"onComplete: current location is null\");\n TastyToast.makeText(getApplicationContext(), getString(R.string.unable_toget_current_location), TastyToast.LENGTH_LONG, TastyToast.ERROR);\n Intent mIntent = new Intent(getApplicationContext(), MetaDataList.class); // the activity that holds the fragment\n Bundle mBundle = new Bundle();\n\n mBundle.putSerializable(\"metaDataItem\", metaDataItem);\n mIntent.setAction(\"UpdateLatLong\");\n mIntent.putExtra(\"SelectedNameDetail\", mBundle);\n startActivity(mIntent);\n finish();\n }\n }",
"public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 1) {\n if(resultCode == RESULT_OK) {\n location = data.getStringExtra(\"EXTRA_PLACE_NAME\");\n place_id = data.getStringExtra(\"EXTRA_PLACE_ID\");\n //lat = data.getDoubleExtra(\"EXTRA_PLACE_LAT\", 0);\n //lng = data.getDoubleExtra(\"EXTRA_PLACE_LNG\", 0);\n\n ViewLocation.setText(location);\n\n }\n }\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == LocationPickerActivity.LOCATION_RESULT) {\n // Make sure the request was successful\n if (resultCode == RESULT_OK) {\n double lat = data.getDoubleExtra(\"lat\", 0.0);\n double lng = data.getDoubleExtra(\"lng\", 0.0);\n location = new LatLng(lat, lng);\n locationButton.setText(\"(\" + lat + \", \" + lng + \")\");\n }\n } else if (requestCode == REQUEST_TAKE_PHOTO && resultCode == RESULT_OK) {\n // Bundle extras = data.getExtras();\n // Bitmap imageBitmap = (Bitmap) extras.get(\"data\");\n // imageView.setImageBitmap(imageBitmap);\n galleryAddPic(); // add the current photo to the media gallery\n setPic(); // set the image view to show a scaled version of the image\n }\n }",
"private void recordLocationData() \r\n\t{\r\n\t\tif(loadedImage!=null)\r\n\t\t{\r\n\t\t\tString image = BitMapToString(loadedImage);\r\n\t\t\tStringBuffer stringBuffer = new StringBuffer();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < image.length(); i++) \r\n\t\t\t{\r\n\t\t\t\tif (image.charAt(i) != '\\n' && image.charAt(i) != '\\r') \r\n\t\t\t\t{\r\n\t\t\t\t\tstringBuffer.append(image.charAt(i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfinalimage = stringBuffer.toString();\r\n\t\t\tfinaloutput=xLocation+\"\\n\"+yLocation+\"\\n\"+locationTitle+\"\\n\"+description+\"\\n\"+finalimage+\"\\n\";\r\n\t\t\t\t\r\n\t\t\tcreateLocationObject();\r\n\t\t\twritetoFile(finaloutput);\r\n\t\t\t\r\n\t\t\tdatasource.addLocation(getxLocation(), getyLocation(), locationTitle, description, finalimage); \r\n\t\t\tLog.v(\"CHECK again: \", getxLocation()+\"\\n\"+getyLocation());\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfinalimage = \"dummystring\";\r\n\t\t\tfinaloutput=xLocation+\"\\n\"+yLocation+\"\\n\"+locationTitle+\"\\n\"+description+\"\\n\"+finalimage+\"\\n\";\r\n\t\t\t\r\n\t\t\tcreateLocationObject();\r\n\t\t\twritetoFile(finaloutput);\r\n\t\t\t\r\n\t\t\tdatasource.addLocation(getxLocation(), getyLocation(), locationTitle, description, finalimage); \r\n\t\t\tLog.v(\"CHECK again: \", getxLocation()+\"\\n\"+getyLocation());\r\n\t\t}\r\n\t\t\r\n\t\tLog.v(\"ADD finaloutput: \", finaloutput);\r\n\t}",
"public AsyncCallback getSaveLocationAsSpotCallback(final MarkData markData) {\n AsyncCallback saveLocationAsSpotCallback = new AsyncCallback() {\n public void onFailure(Throwable throwable) {\n getMessagePanel().displayError(throwable.getMessage());\n }\n\n public void onSuccess(Object response) {\n MobileResponse mobileResponse = (MobileResponse) response;\n if (mobileResponse.getStatus() == 1) {\n leavemark(mobileResponse.getSpotHolder().getId(), markData);\n } else {\n mywebapp.verifyDisplay();\n getMessagePanel().clear();\n getMessagePanel().displayErrors(mobileResponse.getErrorMessages());\n }\n }\n };\n return saveLocationAsSpotCallback;\n }",
"@SuppressLint(\"ShowToast\")\n @Override\n public void handleOnSubmitButtonClick() {\n if(locationSelectorPresenter.getSelectedLocation().getLatLng() != null){\n Intent output = new Intent();\n output.putExtra(StringConstants.INTENT_LOCATION_SELECTOR_LAT, locationSelectorPresenter.getSelectedLocation().getLatLng().latitude);\n output.putExtra(StringConstants.INTENT_LOCATION_SELECTOR_LNG, locationSelectorPresenter.getSelectedLocation().getLatLng().longitude);\n setResult(RESULT_OK, output);\n finish();\n }else{\n Log.d(\"print\", \"No location\");\n Toast.makeText(getApplicationContext(), \"No location selected.\", Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n Toast.makeText(PassengerLocationActivity.this,\"An Ambulance request had been made ! \",Toast.LENGTH_SHORT).show();\n requestAmbulance.put(\"username\", ParseUser.getCurrentUser().getUsername());\n ParseGeoPoint userLocation = new ParseGeoPoint(location.getLatitude(),location.getLongitude());\n requestAmbulance.put(\"passengerLocation\",userLocation);\n requestAmbulance.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n if (e == null){\n Toast.makeText(PassengerLocationActivity.this,\"An Ambulance is on the way ! \",Toast.LENGTH_SHORT).show();\n }\n else\n Toast.makeText(PassengerLocationActivity.this,\"Error occurred - could not save!\",Toast.LENGTH_SHORT).show();\n }\n });\n }\n else\n Toast.makeText(PassengerLocationActivity.this,\"Error occurred!Please try again\",Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n lastLatitude = Double.toString(location.getLatitude());\n lastLongitude = Double.toString(location.getLongitude());\n //lastLocation = Double.toString(location.getLatitude()) + \",\" + Double.toString(location.getLongitude()) ;\n //String b = lastLocation;\n // Get into right format\n // Logic to handle location object\n }\n }",
"public void setLocation(String location) {\n inputParameters.Location = location;\n\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\r\n\t\t\t \r\n\t\t \r\n\t\t String postcode=request.getParameter(\"loc\");\r\n\t\t String latLongs[];\r\n\t\ttry {\r\n\t\t\tlatLongs = getLatLongPositions(postcode);\r\n\t\t\r\n\t\t System.out.println(\"Latitude: \"+latLongs[0]+\" and Longitude: \"+latLongs[1]);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t }",
"public static LocationExtractResult extractLocation(String returnKey, String input, NluInput nluInput, User user) {\n\t\tString place;\n\t\tHashMap<String, String> locations = null;\n\t\n\t\t//check storage first\n\t\tParameterResult pr = nluInput.getStoredParameterResult(PARAMETERS.PLACE);\t\t//locations always use PLACE for the general HashMap\n\t\tif (pr != null){\n\t\t\tlocations = pr.getExtractedMap();\n\t\t}\n\t\tif (locations == null){\n\t\t\t//search all locations\n\t\t\tlocations = RegexParameterSearch.get_locations(input, nluInput.language);\n\t\t\t//System.out.println(\"Locations:\");\t//DEBUG\n\t\t\t//Debugger.printMap(locations);\t\t//DEBUG\n\t\t\t\n\t\t\t//store it\n\t\t\tpr = new ParameterResult(PARAMETERS.PLACE, locations, \"\");\n\t\t\tnluInput.addToParameterResultStorage(pr);\t\t\n\t\t}\n\t\tplace = locations.get(returnKey).trim();\n\t\tString found = place;\n\t\t\n\t\t//return value\n\t\tString returnValue = \"\";\n\t\tString locationAddInfo = \"\";\n\t\tif (Is.notNullOrEmpty(found)){\n\t\t\t//to reconstruct original phrase\n\t\t\tNormalizer normalizer = Config.inputNormalizers.get(nluInput.language);\n\t\t\t\n\t\t\t//is lone tag or added info?\n\t\t\tString specialTag = NluTools.stringFindFirst(place, \"<\\\\w+>\");\n\t\t\tif (!specialTag.isEmpty() && !found.equalsIgnoreCase(specialTag)){\n\t\t\t\t//store as additional info and remove - assumes 'close to' currently\n\t\t\t\tlocationAddInfo = specialTag;\n\t\t\t\tif (nluInput.language.equals(LANGUAGES.DE)){\n\t\t\t\t\tplace = place.replaceFirst(\"(in |)\" + Pattern.quote(specialTag) + \".*\", \"\").trim();\n\t\t\t\t\t\n\t\t\t\t}else if (nluInput.language.equals(LANGUAGES.EN)){\n\t\t\t\t\tplace = place.replaceFirst(\"(in |)\" + Pattern.quote(specialTag) + \".*\", \"\").trim();\n\t\t\t\t}\n\t\t\t\t//TODO: \"found\" is rather useless in this case :-/\n\t\t\t\tfound = place;\n\t\t\t}\n\t\t\t\n\t\t\t//optimize location additional info\n\t\t\t/*\n\t\t\tboolean containsPoi = Boolean.parseBoolean(locations.get(\"contains_poi\"));\n\t\t\tif (containsPoi){\n\t\t\t\tString poi = locations.getOrDefault(\"poi\", locations.get(\"location\"));\n\t\t\t\tif (place.contains(poi)){...}\n\t\t\t}\n\t\t\t*/\n\t\t\t\n\t\t\t//reconstruct original phrase to get proper item names\n\t\t\tplace = normalizer.reconstructPhrase(nluInput.textRaw, place);\n\t\t\t\n\t\t\tif (locationAddInfo.isEmpty()){\n\t\t\t\treturnValue = found + \";;\" + place;\n\t\t\t}else{\n\t\t\t\treturnValue = found + \";;\" + place + \";;\" + locationAddInfo;\n\t\t\t}\n\t\t}\n\n\t\treturn new LocationExtractResult(returnKey, returnValue, found);\n\t}",
"private boolean setLocationInformation() {\n try {\n this.mPostModel.setLocationPost(mAutoCompleteTextView.getText().toString());\n\n if (StringEmptyUtil.isEmptyString(this.mPostModel.getLocationPost())) {\n Toast.makeText(getApplicationContext(), \"Please Select Location\", Toast.LENGTH_LONG).show();\n return false;\n }\n\n this.drop_location.setVisibility(View.VISIBLE);\n this.location_view.setVisibility(View.VISIBLE);\n this.current_location.setVisibility(View.VISIBLE);\n this.current_location.setText(this.mPostModel.getLocationPost());\n return true;\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n Toast.makeText(getApplicationContext(), \"Please Select Location\", Toast.LENGTH_LONG).show();\n\n return false;\n }",
"public void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == PLACE_PICKER_REQUEST) {\n if (resultCode == RESULT_OK) {\n place = PlacePicker.getPlace(this, data);\n locationEditText.setText(place.getLatLng().toString());\n\n //Toast shown to user to let them know the location has been set.\n Toast.makeText(PictureActivity.this, R.string.location_toast,\n Toast.LENGTH_SHORT).show();\n\n }\n }\n }",
"@Override\n\t\t\t\t\tpublic void done(ParseException e) {\n\t\t\t\t\t\tif (e == null) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"Code Snippet Saved Successfully!\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t// Recording users last location to be used in local connections feature!\n\t\t\t\t\t\t\tlm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n\t\t\t\t\t\t\tLocationListener ll = new myLocationListener();\n\t\t\t\t\t\t\tlm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, ll);\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"An error has occured: \" + e + \"\\n\" + \"Please try posting again shortly.\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n // Provide results based on location picked in placepicker.\n if (requestCode == PLACE_PICKER_REQUEST) {\n if (resultCode == RESULT_OK) {\n Place place = PlacePicker.getPlace(data, this);\n String toastPlaceNameMsg = String.format(\"Place selected: %s\", place.getName());\n Toast.makeText(this, toastPlaceNameMsg, Toast.LENGTH_LONG).show();\n\n /*String toastCoordinateNameMsg = String.format(\"Coordinates selected: %s\", place.getLatLng());\n Toast.makeText(this, toastCoordinateNameMsg, Toast.LENGTH_LONG).show();*/\n\n // Store information based on place picked.\n mPlaceSelected = (String) place.getName();\n mSelectedLat = place.getLatLng().latitude;\n mSelectedLng = place.getLatLng().longitude;\n mCoordinates = place.getLatLng();\n\n // Update TextView showing location\n locationChosen.setText(mPlaceSelected);\n\n // Store Coordinates in a bundle so other fragments can use if necessary.\n coordinatesBundle = new Bundle();\n coordinatesBundle.putParcelable(CoordinatesKey, mCoordinates);\n rad = 50000;\n }\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n if(requestCode == LOCATION_REQUEST && resultCode == RESULT_OK){\n PlaceOfInterest fromAdd = (PlaceOfInterest) data.getSerializableExtra(\"Place\");\n LatLng newLatLong = new LatLng(fromAdd.getLatitude(), fromAdd.getLongitude());\n MarkerOptions placeMarker = new MarkerOptions().position(newLatLong).title(fromAdd.getName())\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_YELLOW));\n if(fromAdd.getPicture() != null){\n Log.d(TAG, \"getPicture was not null\");\n int height = 100;\n int width = 100;\n Bitmap picture = ByteConvertor.convertToBitmap(fromAdd.getPicture());\n BitmapDrawable d = new BitmapDrawable(getResources(), picture);\n Bitmap smallMarker = Bitmap.createScaledBitmap(d.getBitmap(), width, height, false);\n\n placeMarker.icon(BitmapDescriptorFactory.fromBitmap(smallMarker));\n }\n places.add(fromAdd);\n mMap.addMarker(placeMarker);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(newLatLong));\n }\n }",
"@Override\n\tpublic ClientResponse post(LocationCourtTerme t) {\n\t\tWebResource webResource = addQueryParam (t);\n\t\twebResource = this.webResource.path(\"/location\");\n\t\tBuilder builder = getBuilder (webResource);\n\t\t\n\t\t// Invocation de la méthode POST HTTP\n\t\tClientResponse clientResponse = builder.post(ClientResponse.class);\n\t\t\t\t\n\t\treturn clientResponse;\n\t}",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n // Logic to handle location object\n Map<String, Double> latlng = new HashMap<String, Double>();\n latlng.put(\"longitude\", location.getLongitude());\n latlng.put(\"latitude\", location.getLatitude());\n Log.d(\"Location\", \"Location retreived \" + latlng.toString());\n result.success(latlng);\n } else {\n Log.d(\"Location\", \"unable to retreive location\");\n result.success(null);\n }\n }",
"private List<TravelData> searchLocations(String keywords,\n String[] fieldsToSearch,\n String[] fieldsToGet,\n int resultSize) throws Exception {\n SearchResult result = searchingExecutor.search(\n fieldsToGet,\n fieldsToSearch,\n keywords,\n resultSize\n );\n\n // 2. build travel-data list ...\n List<TravelData> travelDataList = new ArrayList<>();\n for(Map<String, String> docMap : result.getDocMapList()) {\n String tmpLocationId = docMap.get(TravelDataIndexField.CONTENT_ID.label());\n if(tmpLocationId == null) continue;\n\n // 2-1. increment impress count !!\n locationStorage.impress(tmpLocationId);\n travelDataList.add(new TravelData(locationStorage.getSnapshot(tmpLocationId), docMap));\n }\n\n // 3. sort by score\n Collections.sort(travelDataList);\n return travelDataList;\n }",
"@Override\n public void onSuccess(Location location) {\n process_dialog.dismiss();\n if (location != null) {\n\n // save the location inlocal and move to main activity\n SharedPreferences.Editor editor=sharedPreferences.edit();\n editor.putString(Variables.current_Lat,\"\"+location.getLatitude());\n editor.putString(Variables.current_Lon,\"\"+location.getLongitude());\n editor.commit();\n\n }else {\n\n if(sharedPreferences.getString(Variables.current_Lat,\"\").equals(\"\") || sharedPreferences.getString(Variables.current_Lon,\"\").equals(\"\") ){\n SharedPreferences.Editor editor=sharedPreferences.edit();\n editor.putString(Variables.current_Lat,\"33.738045\");\n editor.putString(Variables.current_Lon,\"73.084488\");\n editor.commit();\n }\n\n }\n Intent intent = new Intent(getApplicationContext(), IntroActivity.class);\n startActivity(intent);\n\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n // Check that the result was from the autocomplete widget.\n if (requestCode == REQUEST_CODE_AUTOCOMPLETE) {\n if (resultCode == RESULT_OK) {\n // Get the user's selected place from the Intent.\n Place place = PlaceAutocomplete.getPlace(this, data);\n Log.i(LOG_TAG, \"Place Selected: \" + place.getName());\n\n if(place!=null) {\n setMarkerPosition(place.getLatLng());\n if (tvLokasiUsaha != null) {\n tvLokasiUsaha.setText(place.getAddress());\n } else {\n tvLokasiUsaha.setText(\"\");\n }\n }\n\n } else if (resultCode == PlaceAutocomplete.RESULT_ERROR) {\n Status status = PlaceAutocomplete.getStatus(this, data);\n Log.e(LOG_TAG, \"Error: Status = \" + status.toString());\n } else if (resultCode == RESULT_CANCELED) {\n // Indicates that the activity closed before a selection was made. For example if\n // the user pressed the back button.\n }\n }\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n\n\n\n // Logic to handle location object\n MarkerOptions markerOptions = new MarkerOptions().position(new LatLng(location.getLatitude(), location.getLongitude())).title(\"You are Here\").alpha(3);\n Marker currentLocationMarker = mMap.addMarker(markerOptions);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(new LatLng(location.getLatitude(), location.getLongitude())));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(location.getLatitude(), location.getLongitude()) , 17.0f));//9\n\n }\n }",
"private String requestInfo(Location location) {\n return \"location(lat \" + location.getLat() + \", lon \" + location.getLat() + \") \";\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null)\n {\n // Logic to handle location object\n SetMarkerOnMap(location.getLatitude(),location.getLongitude(), BitmapDescriptorFactory.HUE_MAGENTA);\n }\n }",
"NameValue getLocation(T data);",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == 1) {\n // Make sure the request was successful\n if (resultCode == Activity.RESULT_OK) {\n setConditionLocation();\n }\n }\n }",
"public MarkData expandLocation(ExpandData expandData) {\n Long userId = null;\n Image userImage = null;\n String userPath = null;\n if (mywebapp.getAuthenticatedUser() != null) {\n ImageScaleHolder imageScaleHolder = getImageScaleHolder(mywebapp.getAuthenticatedUser().getContentHolder(), \"57x57\");\n if (imageScaleHolder != null) {\n userPath = imageScaleHolder.getWebServerAssetHolder().getUrl();\n }\n }\n if (userPath == null) {\n userImage = new Image(ANON_IMAGE_PATH);\n } else {\n String fullUrl = mywebapp.getUrl(userPath);\n userImage = new Image(fullUrl);\n }\n userImage.setStyleName(\"com-ava\");\n if (userId != null) {\n String userHistoryToken = MyWebApp.VIEW_USER_PROFILE + userId;\n // String userHistoryToken2 = \"#\" + userHistoryToken;\n }\n TextArea saySomethingTextArea = new TextArea();\n MarkData markData = new MarkData();\n markData.expandData = expandData;\n markData.saySomethingTextArea = saySomethingTextArea;\n initAutoGroup(saySomethingTextArea, markData);\n Button leaveMarkButton = new Button(\"Leave Mark\");\n leaveMarkButton.addClickHandler(saveHandler2);\n widgetMarkDataMap.put(leaveMarkButton, markData);\n Button showAdvancedButton = new Button(SHOW_ADVANCED);\n showAdvancedMap.put(showAdvancedButton, markData);\n showAdvancedButton.addClickHandler(showAdvancedWriteHerePanelHandler);\n Button shareOnFacebookButton = getFacebookButton(markData);\n ULPanel latestMarksPanel = getLatestMarksPanel(expandData);\n ResultComponent resultComponent = new ResultComponent(saySomethingTextArea, leaveMarkButton, userImage, latestMarksPanel, showAdvancedButton, shareOnFacebookButton);\n FormPanel myFormPanel = new FormPanel();\n myFormPanel.setWidget(resultComponent);\n setupRootPanelForm(myFormPanel, markData);\n expandData.resultPanel.add(myFormPanel);\n return markData;\n }",
"Map<String, String> journeyRequestLocationsToParameters(Trip trip){\n Map<String, String> parameters = new HashMap<>();\n parameters.put(\"pickup\", trip.getPickupLat() + \",\" + trip.getPickupLong());\n parameters.put(\"dropoff\", trip.getDropoffLat() + \",\" + trip.getDropoffLong());\n return parameters;\n }",
"public static String placePostData()\r\n\t{\t\r\n\t\tString res=\"/maps/api/place/add/json\";\r\n\t\treturn res;\r\n\t}",
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == PLACE_PICKER_REQUEST) {\n if (resultCode == RESULT_OK) {\n Place place = PlacePicker.getPlace(this, data);\n\n String toastName = String.format(\"Place: %s\", place.getName());//get place name\n String toastAddress = String.format(\"Address: %s\", place.getAddress());//get place address\n LatLng location = place.getLatLng();//get place LatLng\n double lat = location.latitude;\n double lng = location.longitude;\n //PICTURE YET TO COME\n //DESTINATION YET TO COME\n }\n }\n }",
"@Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> params = new HashMap<>();\n params.put(\"location\", value_cord);\n\n return params;\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n loc = location;\n getAddressFromLocation(loc.getLatitude(), loc.getLongitude());\n\n }\n }",
"private void showLocationDetail(Location selectedLocation) {\n Log.d(\"debugMode\", \"LocationMananager showLocationDetail Launched\");\n final Intent formIntent = new Intent(this, LocationManagerForm.class);\n formIntent.putExtra(LOCATION, selectedLocation);\n startActivityForResult(formIntent, KEY);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == RINGTONE_PICKER_REQUEST_CODE && resultCode == Activity.RESULT_OK ){\n mAlarmRingtone = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);\n setRingtoneName();\n }\n if (requestCode == MAP_REQUEST_CODE) {\n if (data != null && data.hasExtra(Constants.EXTRA_ALARM_DESTINATION)) {\n // get coordinates (from intent)\n mMapDestination = data.getParcelableExtra(Constants.EXTRA_ALARM_DESTINATION);\n }\n }\n updateMapImage(false);\n }",
"private void onSearchClick(Location loc) {\n\r\n\r\n Log.d(TAG, \"IN ONSEARCHCLICK\");\r\n\r\n String url;\r\n\r\n\r\n url = \"https://geocode-maps.yandex.ru/a1.x/?format=json&geocode=\" + loc.getLongitude() + \",\" + loc.getLatitude();\r\n\r\n Log.d(TAG, url);\r\n RequestQueue queue = Volley.newRequestQueue(this);\r\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\r\n @Override\r\n public void onResponse(JSONObject response) {\r\n Log.d(TAG, response.toString());\r\n //JSONArray jsonArray = response.getJSONObject(\"results\").getString(\"formattedString\");\r\n //String formattedAdress = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderResponseMetaData\").getString(\"request\");\r\n JSONObject country = null;\r\n JSONObject area = null;\r\n JSONObject city = null;\r\n JSONObject street = null;\r\n JSONObject houseNumber = null;\r\n try {\r\n country = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONArray(\"featureMember\").getJSONObject(0).getJSONObject(\"GeoObject\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderMetaData\").getJSONObject(\"AddressDetails\").getJSONObject(\"Country\");\r\n } catch (JSONException e) {\r\n country = null;\r\n }\r\n try {\r\n area = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONArray(\"featureMember\").getJSONObject(0).getJSONObject(\"GeoObject\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderMetaData\").getJSONObject(\"AddressDetails\").getJSONObject(\"Country\").getJSONObject(\"AdministrativeArea\");\r\n } catch (JSONException e) {\r\n area = null;\r\n }\r\n try {\r\n city = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONArray(\"featureMember\").getJSONObject(0).getJSONObject(\"GeoObject\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderMetaData\").getJSONObject(\"AddressDetails\").getJSONObject(\"Country\").getJSONObject(\"AdministrativeArea\").getJSONObject(\"Locality\");\r\n } catch (JSONException e) {\r\n city = null;\r\n }\r\n try {\r\n street = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONArray(\"featureMember\").getJSONObject(0).getJSONObject(\"GeoObject\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderMetaData\").getJSONObject(\"AddressDetails\").getJSONObject(\"Country\").getJSONObject(\"AdministrativeArea\").getJSONObject(\"Locality\").getJSONObject(\"Thoroughfare\");\r\n } catch (JSONException e) {\r\n street = null;\r\n }\r\n try {\r\n houseNumber = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONArray(\"featureMember\").getJSONObject(0).getJSONObject(\"GeoObject\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderMetaData\").getJSONObject(\"AddressDetails\").getJSONObject(\"Country\").getJSONObject(\"AdministrativeArea\").getJSONObject(\"Locality\").getJSONObject(\"Thoroughfare\").getJSONObject(\"Premise\");\r\n } catch (JSONException e) {\r\n houseNumber = null;\r\n }\r\n String text = \"\";\r\n if (country != null) {\r\n// try {\r\n// text += \"Country: \" + country.getString(\"CountryName\") + \"\\n\";\r\n// } catch (JSONException e) {\r\n// }\r\n\r\n// if (area != null) {\r\n// try {\r\n// text += \"Administrative Area: \" + area.getString(\"AdministrativeAreaName\") + \"\\n\";\r\n// } catch (JSONException e) {\r\n// }\r\n\r\n if (city != null) {\r\n try {\r\n text +=city.getString(\"LocalityName\") + \" \";\r\n } catch (JSONException e) {\r\n }\r\n\r\n if (street != null) {\r\n try {\r\n text +=street.getString(\"ThoroughfareName\") + \" \";\r\n } catch (JSONException e) {\r\n }\r\n\r\n if (houseNumber != null) {\r\n try {\r\n text +=houseNumber.getString(\"PremiseNumber\");\r\n } catch (JSONException e) {\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Log.d(TAG, country);\r\n\r\n addressEditText.setText(text);\r\n getPostCode();\r\n\r\n }\r\n }, new Response.ErrorListener() {\r\n @Override\r\n public void onErrorResponse(VolleyError error) {\r\n Log.d(TAG, error.getMessage() + \" ERROR!\");\r\n }\r\n });\r\n\r\n queue.add(request);\r\n\r\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n\n Geocoder gcd = new Geocoder(context, Locale.getDefault());\n List<Address> addresses = null;\n try {\n addresses = gcd.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n if (addresses.size() > 0) {\n\n city = addresses.get(0).getLocality();\n local.setText(city);\n local.setSelection(local.getText().length());\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n }",
"@Override\n public void onInfoWindowLongClick(Marker marker) {\n if (marker.getTitle().equals(\"New Maintenance Form\")){\n newOld = false; //don't have to do anything.....\n }else{\n //newOld = true;\n load_id=marker.getSnippet();\n }\n //pull up the maintenance form\n Intent intent = new Intent(MaintenanceMapActivity.this, MaintenanceActivity.class);\n intent.putExtra(\"latitude\", latitude );\n intent.putExtra(\"longitude\",longitude);\n startActivity(intent);\n }",
"private void UploadtoServerSavedLocaiton() {\n\t\tCursor c = database.rawQuery(\"SELECT * from locations \", null);\r\n\t\tString mName = null, mPolygon = null;\r\n\t\tbyte[] blob;\r\n\r\n\t\tif (c != null) {\r\n\t\t\tif (c.moveToFirst()) {\r\n\t\t\t\tdo {\r\n\t\t\t\t\tmName = c.getString(c.getColumnIndex(\"name\"));\r\n\t\t\t\t\tblob = c.getBlob(c.getColumnIndex(\"polygon\"));\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tmPolygon = new String(blob, \"UTF-8\");\r\n\t\t\t\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tUploadSavedLocationtoServer(mName, mPolygon);\r\n\t\t\t\t} while (c.moveToNext());\r\n\t\t\t}\r\n\t\t\tif (mResponse.contains(\"Success\")) {\r\n\t\t\t\t// Success alert\r\n\t\t\t\tmaTitle = \"Success\";\r\n\t\t\t\tmaMessage = \"Field added successfully\";\r\n\t\t\t\tShowAlert(maTitle, maMessage);\r\n\t\t\t\tuploadarraylist = new ArrayList<String>();\r\n\t\t\t\tmyList = new ArrayList<LatLng>();\r\n\t\t\t\tdatabase.execSQL(\"delete from locations\");\r\n\t\t\t\tSystem.err.println(\"database empty\");\r\n\r\n\t\t\t} else {\r\n\t\t\t\t// Failure Alert\r\n\t\t\t\tmaTitle = \"Failure\";\r\n\t\t\t\tmaMessage = \"Error in adding field\\nTry again\";\r\n\t\t\t\tShowAlert(maTitle, maMessage);\r\n\t\t\t}\r\n\t\t}\r\n\t\tc.close();\r\n\r\n\t}",
"@Override\n public void onLocationResult(LocationResult locationResult) {\n Log.d(TAG, \"onSuccess: Location : \" + locationResult);\n if (locationResult == null) {\n return;\n }\n for (Location location : locationResult.getLocations()) {\n // Update UI with location data\n Toast.makeText(MainActivity.this, \"Location : \" + location, Toast.LENGTH_SHORT).show();\n }\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode,resultCode,data);\n\n // menangkap hasil balikan dari Place Picker, dan menampilkannya pada TextView\n if (requestCode == 5 && resultCode == RESULT_OK) {\n\n place_Picker = PlacePicker.getPlace(TambahWarkopActivity.this,data);\n\n stxtaddresplace = String.format(\"%s\", place_Picker.getAddress().toString());\n latLng = place_Picker.getLatLng();\n latitude = (float) latLng.latitude;\n longitude = (float) latLng.longitude;\n alamat_warkopText.setText(\"\"+ stxtaddresplace);\n\n }\n }",
"private void initiateSearch(LatLng latLng) {\n mMap.clear();\n mLatLng = latLng;\n mLocation.setLatitude(latLng.latitude);\n mLocation.setLongitude(latLng.longitude);\n\n searchMarker = mMap.addMarker(new MarkerOptions()\n .position(latLng));\n\n int zoomNumber = (int) (15-(0.0003)*Parameters.radius);\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(latLng).zoom(zoomNumber).build();\n\n mMap.animateCamera(CameraUpdateFactory\n .newCameraPosition(cameraPosition));\n\n try {\n new JsonParser().execute(mLocation);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"private void AddLocation () {\n Location mLocation = new Location();\n mLocation.SetId(1);\n mLocation.SetName(\"Corner Bar\");\n mLocation.SetEmail(\"contact.email.com\");\n mLocation.SetAddress1(\"1234 1st Street\");\n mLocation.SetAddress2(\"\");\n mLocation.SetCity(\"Minneapolis\");\n mLocation.SetState(\"MN\");\n mLocation.SetZip(\"55441\");\n mLocation.SetPhone(\"612-123-4567\");\n mLocation.SetUrl(\"www.cornerbar.com\");\n\n ParseACL acl = new ParseACL();\n\n // Give public read access\n acl.setPublicReadAccess(true);\n mLocation.setACL(acl);\n\n // Save the post\n mLocation.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n\n }\n });\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n // Logic to handle location object\n double lat = location.getLatitude();\n double lng = location.getLongitude();\n mMap.addMarker(new MarkerOptions().position(new LatLng(lat, lng)).title(\"Marker at current Location\"));\n // mMap.addMarker(new MarkerOptions().position(new LatLng(lat, lng)).title(\"Marker in NYC\").icon(BitmapDescriptorFactory.fromResource(R.mipmap.ic_launcher_round)));\n }\n }",
"@POST\n \t@Path(\"/form\")\n \t@Consumes(MediaType.APPLICATION_FORM_URLENCODED)\n \t@Produces(MediaType.TEXT_PLAIN)\n \tpublic String formMethod(@QueryParam(\"token\") String token,\n \t\t\t@FormParam(\"name\") String name,\n \t\t\t@FormParam(\"location\") String location) {\n \t\t// map json to json object \n \t\treturn token + \"::\" + name + \"::\" + location + \"\\n\";\n \t}",
"private void setPickupLocation(){\n \t\t// Defines the AutoCompleteTextView pickupText\n \t\tacPickup = (AutoCompleteTextView)findViewById(R.id.pickupText);\n \t\t// Controls if the user has entered an address\n \t\tif(!acPickup.getText().toString().equals(\"\")){\n \t\t\t// Gets the GeoPoint of the written address\n \t\t\tGeoPoint pickupGeo = GeoHelper.getGeoPoint(acPickup.getText().toString());\n \t\t\t// Gets the MapLocation of the GeoPoint\n \t\t\tMapLocation mapLocation = (MapLocation) GeoHelper.getLocation(pickupGeo);\n \t\t\t// Finds the pickup location on the route closest to the given address\n \t\t\tLocation temp = findClosestLocationOnRoute(mapLocation);\n \t\t\n \t\t\t//Controls if the user has entered a NEW address\n \t\t\tif(pickupPoint != temp){\n \t\t\t\t// Removes old pickup point (thumb)\n \t\t\t\tif(overlayPickupThumb != null){\n \t\t\t\t\tmapView.getOverlays().remove(overlayPickupThumb);\n \t\t\t\t\toverlayPickupThumb = null;\n \t\t\t\t}\n \t\t\t\tmapView.invalidate();\n \t\t\t\t\n \t\t\t\t// If no dropoff point is specified, we add the pickup point to the map.\n \t\t\t\tif(dropoffPoint == null){\n \t\t\t\t\tpickupPoint = temp;\n \t\t\t\t\toverlayPickupThumb = drawThumb(pickupPoint, true);\n \t\t\t\t}else{ // If a dropoff point is specified:\n \t\t\t\t\tList<Location> l = getApp().getSelectedJourney().getRoute().getRouteData();\n \t\t\t\t\t// Checks to make sure the pickup point is before the dropoff point.\n \t\t\t\t\tif(l.indexOf(temp) < l.indexOf(dropoffPoint)){\n \t\t\t\t\t\t//makeToast(\"The pickup point has to be before the dropoff point\");\n \t\t\t\t\t\tAlertDialog.Builder ad = new AlertDialog.Builder(MapActivityAddPickupAndDropoff.this); \n \t\t\t\t\t\tad.setMessage(\"The pickup point has to be before the dropoff point\");\n \t\t\t\t\t\tad.setTitle(\"Unable to send request\");\n \t\t\t\t\t\tad.setPositiveButton(\"Ok\",new DialogInterface.OnClickListener() {\n \t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,int id) {\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\tad.show();\n \t\t\t\t\t}else{\n \t\t\t\t\t\t// Adds the pickup point to the map by drawing a cross\n \t\t\t\t\t\tpickupPoint = temp;\n \t\t\t\t\t\toverlayPickupThumb = drawThumb(pickupPoint, true);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}else{\n \t\t\t//makeToast(\"Please add a pickup address\");\n \t\t\tAlertDialog.Builder ad = new AlertDialog.Builder(MapActivityAddPickupAndDropoff.this); \n \t\t\tad.setMessage(\"Please add a pickup address\");\n \t\t\tad.setTitle(\"Unable to send request\");\n \t\t\tad.setPositiveButton(\"Ok\",new DialogInterface.OnClickListener() {\n \t\t\t\tpublic void onClick(DialogInterface dialog,int id) {\n \t\t\t\t\t\n \t\t\t\t}\n \t\t\t });\n \t\t\tad.show();\n \t\t}\n \t}",
"private void setLocationData(Location location){\r\n currentLat = location.getLatitude();\r\n currentLng = location.getLongitude();\r\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n //Toast.makeText(getApplicationContext(), String.valueOf(location.getLatitude()+\",\"+location.getLongitude()), Toast.LENGTH_SHORT).show();\n retrofitPegarOnibus(location.getLatitude() + \",\" + location.getLongitude());\n coord = location.getLatitude() + \",\" + location.getLongitude();\n } else {\n //Toast.makeText(getApplicationContext(), \"Location = null\", Toast.LENGTH_SHORT).show();\n }\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n wayLatitude = location.getLatitude();\n wayLongitude = location.getLongitude();\n SharedStore.getInstance().save(Double.toString(wayLatitude),\"CurrentLat\");\n SharedStore.getInstance().save(Double.toString(wayLongitude),\"CurrentLong\");\n Log.e(\"getLocation\", String.valueOf(wayLatitude));\n }\n }",
"@Override\n public void onSuccess(Location location) {\n\n if (location != null) {\n // Logic to handle location object\n\n Geocoder gcd = new Geocoder(MainActivity.this, Locale.getDefault());\n List<Address> addresses = null;\n try {\n addresses = gcd.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (addresses.size() > 0) {\n System.out.println(addresses.get(0).getLocality());\n sp.set(SPConstants.location,addresses.get(0).getLocality()+\", \"+addresses.get(0).getCountryName());\n }\n else {\n sp.set(SPConstants.location,\"\");\n\n // do your stuff\n }\n\n }\n }",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"latitude\", latitude_file);\n params.put(\"longitude\", longitude_file);\n params.put(\"link\", link);\n\n return params;\n }",
"protected void addLocation(ULPanel ul, LocationResult locationResult, ClickHandler handler, boolean showCategories) {\n if (MyWebApp.isDesktop()) {\n ListItem li = new ListItem();\n ComplexPanel vp = getLocationPanel(locationResult, handler, showCategories);\n li.add(vp);\n ul.add(li);\n } else {\n Image image = new Image(getSpotImage());\n Location location = locationResult.getLocation();\n //tags display\n FlowPanel tagsPanel = new FlowPanel();\n tagsPanel.setStyleName(\"tags\");\n //we do not want to show categories when we are showing spots that we are picking from\n if (showCategories) {\n if ((location.getFactualCategories() != null) && (location.getFactualCategories().length() > 0)) {\n String[] cats = location.getFactualCategories().split(\">\");\n for (String cat : cats) {\n String trimCat = cat.trim();\n TagHolder tagHolder = new TagHolder(trimCat);\n InlineLabel inlineLabel = new InlineLabel(tagHolder.getName());\n tagsPanel.add(inlineLabel);\n }\n }\n }\n LocationResultComposite locationResultComposite = new LocationResultComposite( image, tagsPanel);\n locationResultComposite.addClickHandler(handler);\n clickMapLocation.put(locationResultComposite, locationResult);\n StringBuffer sb = new StringBuffer();\n add(sb, \"\", location.getName());\n add(sb, \", \", location.getAddress1());\n add(sb, \", \", location.getCity());\n add(sb, \", \", location.getState());\n add(sb, \" \", location.getZipcode());\n locationResultComposite.setLocationDescription(sb.toString());\n\n processDistance(locationResult,locationResultComposite);\n ul.add(locationResultComposite);\n }\n }",
"private void inputLocation() {\n// boolean googleMapExist= (ConnectionResult.SUCCESS==GooglePlayServicesUtil.isGooglePlayServicesAvailable(mContext));\n//\n// if(googleMapExist) {\n// org.wowtalk.Log.w(\"google map exist\");\n// Intent mapIntent = new Intent(mContext, PickLocActivity.class);\n// mapIntent.putExtra(\"auto_loc\", true);\n// mContext.startActivityForResult(mapIntent, REQ_INPUT_LOC);\n// } else {\n //org.wowtalk.Log.w(\"google map not exist\");\n Intent mapIntent = new Intent(mContext, PickLocActivityWithAMap.class);\n mapIntent.putExtra(\"auto_loc\", true);\n mContext.startActivityForResult(mapIntent, REQ_INPUT_LOC);\n //}\n }",
"private void writeActualLocation(Location location)\n {\n //textLat.setText( \"Lat: \" + location.getLatitude() );\n //textLong.setText( \"Long: \" + location.getLongitude() );\n //T.t(MapsActivity.this, \"\" + \"Lat: \" + location.getLatitude() + \"\" + \"Long: \" + location.getLongitude());\n markerLocation(new LatLng(location.getLatitude(), location.getLongitude()));\n }",
"private void addMarker(MapboxMap mapboxMap) {\n MarkerOptions markerOptions = new MarkerOptions();\n\n IconFactory iconFactory = IconFactory.getInstance(LocateDoctorActivity.this);\n Icon icon = iconFactory.fromResource(R.drawable.mapquest_icon);\n\n markerOptions.position(new com.mapbox.mapboxsdk.geometry.LatLng(Double.parseDouble(selectedLat), Double.parseDouble(selectedLong)));\n markerOptions.snippet(\"Selected Location\");\n markerOptions.setIcon(icon);\n mapboxMap.addMarker(markerOptions);\n }",
"@Override\n public void onLocationChanged(Location location) {\n latitude=String.valueOf(location.getLatitude());\n longitude= String.valueOf(location.getLongitude());\n\n System.out.println(\"asdfgh==\"+latitude);\n\n\n /* Geocoder geocoder;\n List<Address> addresses;\n geocoder = new Geocoder(SafetyActivity.this, Locale.getDefault());\n\n try {\n addresses = geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n String address = addresses.get(0).getAddressLine(0); // If any additional address line present than only, check with max available address lines by getMaxAddressLineIndex()\n String city = addresses.get(0).getLocality();\n String state = addresses.get(0).getAdminArea();\n String country = addresses.get(0).getCountryName();\n String postalCode = addresses.get(0).getPostalCode();\n String knownName = addresses.get(0).getFeatureName();\n\n System.out.println(\"addresses==\"+address);\n // Here 1 represent max location result to returned, by documents it recommended 1 to 5\n } catch (IOException e) {\n e.printStackTrace();\n }*/\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n int latitude = (int) location.getLatitude();\n int longitude = (int) location.getLongitude();\n slat = latitude + \"\";\n slong = longitude + \"\";\n }\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n int latitude = (int) location.getLatitude();\n int longitude = (int) location.getLongitude();\n slat = latitude + \"\";\n slong = longitude + \"\";\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n // Check that the result was from the autocomplete widget.\n if (requestCode == REQUEST_CODE_AUTOCOMPLETE) {\n if (resultCode == RESULT_OK) {\n // Get the user's selected place from the Intent.\n Place place = PlaceAutocomplete.getPlace(this, data);\n Log.i(TAG, \"Place Selected: \" + place.getName());\n\n // Format the place's details and display them in the TextView.\n eventEditVenue.setText(place.getName().toString().trim());\n eventEditAddres.setText(place.getAddress().toString().trim());\n\n // Display attributions if required.\n CharSequence attributions = place.getAttributions();\n// if (!TextUtils.isEmpty(attributions)) {\n// mPlaceAttribution.setText(Html.fromHtml(attributions.toString()));\n// } else {\n// mPlaceAttribution.setText(\"\");\n// }\n } else if (resultCode == PlaceAutocomplete.RESULT_ERROR) {\n Status status = PlaceAutocomplete.getStatus(this, data);\n Log.e(TAG, \"Error: Status = \" + status.toString());\n } else if (resultCode == RESULT_CANCELED) {\n // Indicates that the activity closed before a selection was made. For example if\n // the user pressed the back button.\n }\n }\n }",
"private String parsePostRequest(StringTokenizer parse) {\n\t\tString fileRequested = parse.nextToken();\r\n\r\n\t\treturn null;\r\n\t}",
"public void passAddress( ){\n\n Intent intent = new Intent(MapsActivity.this,ShoppingActivity.class);\n String address2=address;\n double latitude = mLastKnownLocation.getLatitude();\n double longitude = mLastKnownLocation.getLongitude();\n\n intent.putExtra(\"Address\", address2);\n intent.putExtra(\"Latitude\", latitude);\n intent.putExtra(\"Longitude\", longitude);\n startActivity(intent);\n }",
"public void onSearch(View view){\n List<Address> addressList = null;\n EditText location_tf = (EditText) findViewById(R.id.TFaddress);\n String location = location_tf.getText().toString();\n if(location!=null || location.equals(\"\")){\n Geocoder geocoder = new Geocoder(this);\n try {\n addressList = geocoder.getFromLocationName(location, 1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n Address address = addressList.get(0);\n LatLng latLng = new LatLng(address.getLatitude(), address.getLongitude());\n marker = mMap.addMarker(new MarkerOptions().position(latLng).title(\"Marker\"));\n mMap.addMarker(new MarkerOptions().position(latLng).title(\"Marker\"));\n mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng,17));\n\n }\n\n }",
"protected void addResult2(ULPanel ul, LocationResult locationResult) {\n // vertical panel, 2 rows into each li\n // one label on top row\n // hp goes into 2nd row\n SolrDocument solrDocument = locationResult.getSolrDocument();\n VerticalPanel vp = new VerticalPanel();\n HorizontalPanel hp = new HorizontalPanel();\n Long spotId = spotId = solrDocument.getFirstLong(\"spotid_l\");\n //all links for this will go to mark a spot\n String targetHistoryToken = MyWebApp.LEAVE_SPOT_MARK + spotId;\n Long itemId = null;\n itemId = solrDocument.getFirstLong(\"georepoitemid_l\");\n if (itemId == null) {\n itemId = solrDocument.getFirstLong(\"latest_mark_georepoitemid_l\");\n }\n vp.add(hp);\n ListItem li = new ListItem();\n li.add(vp);\n ul.add(li);\n addMarkPhoto(solrDocument, targetHistoryToken, hp);\n VerticalPanel middleTable = new VerticalPanel();\n hp.add(middleTable);\n hp.setCellWidth(middleTable, \"100%\");\n middleTable.setStyleName(\"middletable\");\n //this will add the first row to the middle table\n //mode is is a results page, whereas 2 is marks for a spot\n String spot_label_s = solrDocument.getFirstString(\"spot_label_s\");\n if (spot_label_s != null) {\n String sl = spot_label_s.toString();\n Hyperlink spotLabel = new Hyperlink(\"@\" + sl, targetHistoryToken);\n spotLabel.setStyleName(\"spotLabel\");\n middleTable.add(spotLabel);\n }\n Anchor distanceLabel = getDistanceHyperlink(locationResult, targetHistoryToken);\n Hyperlink metersLabel = new Hyperlink(\"meters away\", targetHistoryToken);\n ComplexPanel distancePanel = getDistancePanel(distanceLabel, metersLabel, locationResult);\n Hyperlink latest_mark_escapedjavascriptsnippet_s = addHtml2(solrDocument, middleTable, \"latest_mark_escapedjavascriptsnippet_s\", targetHistoryToken);\n if (latest_mark_escapedjavascriptsnippet_s != null) {\n latest_mark_escapedjavascriptsnippet_s.addStyleName(\"latestMarkEscapedJavascriptSnippet\");\n }\n ComplexPanel categoriesPanel = addCategories(solrDocument);\n middleTable.add(categoriesPanel);\n if (itemId == null) {\n Hyperlink label2 = new Hyperlink(\"Be the first to mark this spot!\", targetHistoryToken);\n label2.addStyleName(\"linky\");\n label2.addStyleName(\"befirst\");\n //middleTable.add(label2);\n }\n String snippet = solrDocument.getFirstString(\"spot_geoRepoItemescapedjavascriptsnippet_s\");\n if (snippet != null) {\n Hyperlink html2 = new Hyperlink(snippet, targetHistoryToken);\n html2.addStyleName(\"spotGeoRepoItemEscapedJavascriptSnippet\");\n }\n Hyperlink html2 = addHtml2(solrDocument, middleTable, \"spot_geoRepoItemescapedjavascriptsnippet_s\", targetHistoryToken);\n if (html2 != null) {\n html2.addStyleName(\"spotGeoRepoItemEscapedJavascriptSnippet\");\n }\n //2nd image\n //spot\n if (!MyWebApp.isSmallFormat()) {\n // if ((alex)) {\n Hyperlink userHyperLink = new Hyperlink();\n userHyperLink.setTargetHistoryToken(targetHistoryToken);\n Image image = addImage(solrDocument, hp, \"image_thumbnail_130x130_url_s\",\n userHyperLink, resources.spot_image_placeholder130x130(), resources.spot_image_placeholder57x57(), \"spotimage\");\n setColumnWidth(image, hp);\n // }\n }\n hp.add(distancePanel);\n setColumnWidth(distancePanel, hp);\n }",
"public void search(String location){\n List<Address> addressList = null;\n if(location != null || !location.equals(\"\")){\n Geocoder geocoder = new Geocoder(this);\n try{\n addressList = geocoder.getFromLocationName(location,1);\n }\n catch (IOException e){}\n Address address =addressList.get(0);\n LatLng latlng = new LatLng(address.getLatitude(), address.getLongitude());\n mMap.addMarker(new MarkerOptions().position(latlng).title(location));\n mMap.animateCamera(CameraUpdateFactory.newLatLng(latlng));\n Toast.makeText(getApplication(), location, Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data){\n \t\n \t//If the result is capturing Image\n \tif(requestCode == CAMERA_CAPTURE_IMAGE_REQUEST_CODE){\n \t\tif(resultCode == RESULT_OK){\n \t\t\t//Successfully captured the Image\n \t\t\t//Display it in the Image View\n \t\t\tpreviewCapturedImage();\n \t\t\tpicGeoTag.writeGeoTagImage(fileUri.getPath(),latitude,longitude);\n \t\t\t//geoTag(fileUri.getPath(),latitude,longitude);\n \t\t}else if(resultCode == RESULT_CANCELED){\n \t\t\t//User cancelled the Image capture\n \t\t\tToast.makeText(getApplicationContext(), \"User cancelled Image capture\", Toast.LENGTH_SHORT).show();\n \t\t}else{\n \t\t\t//Failed to capture Image\n \t\t\tToast.makeText(getApplicationContext(), \"Failed to capture image\", Toast.LENGTH_SHORT).show();\n \t\t}\n \t}\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n sourceLatLng = new LatLng(location.getLatitude(),\n location.getLongitude());\n\n CameraPosition position = CameraPosition.builder()\n .target(sourceLatLng)\n .zoom(16)\n //.tilt(30)\n .build();\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(position));\n\n } else {\n Snackbar snackbar = Snackbar\n .make(findViewById(R.id.drawer_layout), \"Location not available.\", Snackbar.LENGTH_LONG);\n snackbar.show();\n }\n }",
"public void makeLatLong(String address){\n try {\n JSONObject jsonObject = new JSONObject(address);\n JSONObject result = jsonObject.getJSONObject(\"result\");\n JSONArray addressMatches = result.getJSONArray(\"addressMatches\");\n JSONObject firstResult = addressMatches.getJSONObject(0);\n JSONObject coordinates = firstResult.getJSONObject(\"coordinates\");\n latitude = coordinates.getDouble(\"y\");\n longitude = coordinates.getDouble(\"x\");\n\n Log.i(\"CoY \", Double.toString(latitude));\n Log.i(\"CoX\", Double.toString(longitude));\n } catch (JSONException e) {\n Log.i(\"Error\", e.getMessage());\n e.printStackTrace();\n latitude = 39.7392;\n longitude = -104.9903;\n mainActivity.apiFailed(alarmName);\n }\n }",
"private void manageMarkerSubstitutionAction(Intent data) {\n\n @SuppressWarnings(\"unchecked\")\n ArrayList<Attribute> arrayList = (ArrayList<Attribute>) data.getExtras().getSerializable(\n GetFeatureInfoLayerListActivity.RESULT_FEATURE_EXTRA);\n Feature f = new Feature(arrayList);\n String layer = data.getExtras().getString(GetFeatureInfoLayerListActivity.LAYER_FEATURE_EXTRA);\n\n Attribute a = f.getAttribute(featureIdField);\n\n String attributeValue = null;\n if (a != null) {\n attributeValue = a.getValue();\n }\n replaceMarker(layer, featureIdField, attributeValue, f);\n\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_CANCELED)\n return;\n\n super.onActivityResult(requestCode, resultCode, data);\n switch (requestCode) {\n case SELECT_LOCATION_REQUEST:\n String coordResult = (String) data.getExtras().get(\"selectedCoord\");\n geo_key.setText(coordResult);\n break;\n case PICK_IMAGE_REQUEST:\n Uri uri = data.getData();\n try {\n Bitmap imageBitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), uri);\n Log.v(\"StegoCrypto-Image\", String.valueOf(imageBitmap));\n\n selectedImageIV.setImageBitmap(ImageUtility.getResizedBitmap(imageBitmap, ImageUtility.MAX_IMAGE_SIZE));\n } catch (IOException e) {e.printStackTrace();}\n break;\n case CAMERA_REQUEST:\n if (cameraFileUri != null) {\n try {\n Bitmap cameraBitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), cameraFileUri);\n selectedImageIV.setImageBitmap(ImageUtility.getResizedBitmap(cameraBitmap, ImageUtility.MAX_IMAGE_SIZE));\n } catch (IOException e) {e.printStackTrace();}\n }\n break;\n case DRAW_REQUEST:\n Bitmap drawBitmap = data.getParcelableExtra(\"drawingBitmap\");\n selectedImageIV.setImageBitmap(ImageUtility.getResizedBitmap(drawBitmap, ImageUtility.MAX_IMAGE_SIZE));\n break;\n }\n }",
"@Override\n public void onClick(View view) {\n if (markerPlaced) {\n //Firestore handler method that adds geopoint as a field in database\n setPickupLocation(bookId, lat, lon);\n Toast toast = Toast.makeText(SetLocationActivity.this,\n \"Pickup location has been updated\", Toast.LENGTH_SHORT);\n toast.show();\n } else {\n Toast toast = Toast.makeText(SetLocationActivity.this,\n \"Place a marker first\", Toast.LENGTH_SHORT);\n toast.show();\n }\n }",
"@Override\n protected MarkerItem doInBackground(MarkerItem... locationName) {\n Geocoder geocoder = new Geocoder(getBaseContext());\n List<Address> addresses = null;\n MarkerItem name = locationName[0];\n try {\n // Getting a maximum of 1 Address that matches the input text\n addresses = geocoder.getFromLocationName(name.getAddress(), 1);\n if (addresses != null && addresses.size() >= 1) {\n name.setPlaceItem(addresses.get(0));\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n return name;\n }",
"public MarkFormBean readMarkFormForMarker(Project project, int marker) throws SQLException, ParseException, JimFatalException {\r\n\r\n MarkFormBean markform = new MarkFormBean();\r\n\r\n markform = updateMarker(markform, project.getProjectID(), marker);\r\n\r\n String select = \"SELECT F.FORM_ID, M.FORMNAME \" +\r\n \"FROM UNIT_MARK_FORMS F, MARK_FORMS M \" +\r\n \"WHERE F.UNIT_ID = ? \" +\r\n \"AND ((? > F.UMFBEGIN AND F.UMFEND IS NULL) OR (? > F.UMFBEGIN AND ? < F.UMFEND)) \" +\r\n \"AND F.FORM_ID = M.FORMID \" +\r\n \"AND ((? > M.FORMBEGIN AND M.FORMEND IS NULL) OR (? > M.FORMBEGIN AND ? < M.FORMEND))\";\r\n\r\n Map form = sql.selectOne(select, new Object[]{\r\n project.getUnitID(),\r\n sql.dateParam(project.getDatesubmitted()),\r\n sql.dateParam(project.getDatesubmitted()),\r\n sql.dateParam(project.getDatesubmitted()),\r\n sql.dateParam(project.getDatesubmitted()),\r\n sql.dateParam(project.getDatesubmitted()),\r\n sql.dateParam(project.getDatesubmitted())\r\n });\r\n\r\n if (form == null) {\r\n throw new JimFatalException(\"Cannot find a mark form for unit '\" + project.getUnitTxt() + \"'\");\r\n }\r\n markform.setFormID(sql.num2int(form.get(\"FORM_ID\")));\r\n markform.setFormName((String) form.get(\"FORMNAME\"));\r\n\r\n select = \"SELECT C.CATID, C.CATNAME, C.CATLONGNAME, C.CATDESCRIPTION, M.OPTIONAL, C.OPTION_TYPE, C.COG_ID, M.CATWEIGHT, M.CRITICAL \" +\r\n \"FROM MARK_FORM_CATEGORIES M, MARK_CATEGORIES C \" +\r\n \"WHERE M.FORMID = ? \" +\r\n \"AND ((? > M.MFCBEGIN AND M.MFCEND IS NULL) OR (? > M.MFCBEGIN AND ? < M.MFCEND)) \" +\r\n \"AND M.CATID = C.CATID AND ((? > C.CATBEGIN AND C.CATEND IS NULL) OR (? > C.CATBEGIN AND ? < C.CATEND)) ORDER BY M.CATINDEX\";\r\n\r\n ResultSet cats = sql.selectRS(select, new Object[]{\r\n markform.getFormID(),\r\n project.getDatesubmitted(),\r\n project.getDatesubmitted(),\r\n project.getDatesubmitted(),\r\n project.getDatesubmitted(),\r\n project.getDatesubmitted(),\r\n project.getDatesubmitted()\r\n });\r\n\r\n while (cats.next()) {\r\n Category cat = new Category(cats.getInt(1), cats.getString(2), cats.getString(3), cats.getString(4), cats.getString(5), cats.getString(6), cats.getInt(7), cats.getInt(8), cats.getString(9));\r\n select = \"SELECT O.OPT_ID, O.OPT_LABEL, O.OPT_SELECTED_VALUE, C.POSITIVE_CRITERIA, C.NEGATIVE_CRITERIA \" +\r\n \"FROM CATEGORY_OPTIONS O, CATEGORY_OPTION_CRITERIA C \" +\r\n \"WHERE O.OPT_GROUP = ? \" +\r\n \"AND O.OPT_ID = C.CAT_OPTION \" +\r\n \"AND C.MARK_CATEGORY = ? \" +\r\n \"ORDER BY O.OPT_INDEX\";\r\n\r\n ResultSet opts = sql.selectRS(select, new Object[]{\r\n cat.getOptionGroup(),\r\n cat.getCategoryID()\r\n });\r\n\r\n while (opts.next()) {\r\n Option opt = new Option(opts.getInt(1), opts.getString(2), opts.getFloat(3), opts.getString(4), opts.getString(5));\r\n cat.addCategoryOption(opt);\r\n }\r\n markform.addFormCategory(cat);\r\n }\r\n cats.close();\r\n markform = readMarkForm(project.getProjectID(), markform);\r\n return markform;\r\n }",
"@Override\n public boolean onQueryTextSubmit(String query) {\n // If the list contains the search query\n // than filter the adapter\n // using the filter method\n // with the query as its argument\n //placesAdaptor.getFilter( ).filter(query);\n //TODO: set to intent if needed\n /*Intent intent = new Intent(getApplicationContext(),LandmarkDetailsActivity.class);\n\n intent.putExtra(\"placeName\", \"Geisel Library\");\n //hard code to geisel details page\n startActivity(intent);*/\n\n return false;\n }",
"public void startLocationUpdate() {\n if (locationCallback != null) {\n try {\n locationCallback = new LocationCallback() {//khoi tao dinh nghia (extent)\n\n @Override\n public void onLocationResult(LocationResult locationResult) {\n super.onLocationResult(locationResult);\n Log.d(TAG, \"onLocationResult: \");\n if (locationResult != null) {\n Log.d(TAG, \"onLocationResult: loaction!==null\");\n myLocation = locationResult.getLastLocation();\n showMarker();//de show hinh len\n }\n }\n };\n fusedLocationProviderClient.requestLocationUpdates(locationRequest, locationCallback, null);//dang ky voi he thong app lang nghe su thay doi cua location\n\n } catch (SecurityException e) {\n e.getMessage();\n\n }\n }\n }",
"private void startAddLocation(double longitude, double latitude){\n Intent AddLocation = new Intent(this, Add_Location.class);\n AddLocation.putExtra(\"latitude\", latitude);\n AddLocation.putExtra(\"longitude\", longitude);\n startActivityForResult(AddLocation, LOCATION_REQUEST);\n }",
"public static LocationBuildResult buildLocation(String input, NluInput nluInput, User user) {\n\t\t//TODO: fuse all 3 types (specific location, personal location and contacts) into one?!?\n\t\t\n\t\t//check if we have more info ... - TODO: should we call extract again if \";;\" is not given?\n\t\tString inputReconstructed = \"\";\n\t\tString locationAddInfo = \"\";\n\t\tString[] inputArray = input.split(\";;\");\n\t\tif (inputArray.length == 3){\n\t\t\tinput = inputArray[0];\n\t\t\tinputReconstructed = inputArray[1];\n\t\t\tlocationAddInfo = inputArray[2];\n\t\t}else if (inputArray.length == 2){\n\t\t\tinput = inputArray[0];\n\t\t\tinputReconstructed = inputArray[1];\n\t\t}else{\n\t\t\tinputReconstructed = input;\t\t//at least anything\n\t\t}\n\t\t\n\t\tboolean buildSuccess = false;\n\t\t//System.out.println(\"buildLocation input: \" + input + \" - reconst.: \" + inputReconstructed); \t\t\t//DEBUG\n\t\t\n\t\t//-check for user specific location (\"<user_home>\" etc.)\n\t\tString specificLocation_tag;\n\t\tboolean hasAddedSpecLocation = false;\n\t\tJSONObject specificLocationJSON = null;\n\t\tif (!locationAddInfo.isEmpty()){\n\t\t\tspecificLocation_tag = User.containsUserSpecificLocation(locationAddInfo, user);\n\t\t\thasAddedSpecLocation = true;\n\t\t}else{\n\t\t\tspecificLocation_tag = User.containsUserSpecificLocation(input, user);\n\t\t}\n\t\tif (!specificLocation_tag.isEmpty()){\n\t\t\tspecificLocationJSON = LOCATION.getFullAddressJSON(user, specificLocation_tag);\n\t\t\t//System.out.println(\"SPEC. LOCATION: \" + specificLocation_tag); \t\t//DEBUG\n\t\t\t//System.out.println(\"SPEC. LOCATION JSON: \" + specificLocationJSON); \t//DEBUG\n\t\t\tif (specificLocationJSON != null && !specificLocationJSON.isEmpty()){\n\t\t\t\tString testLAT = (String) specificLocationJSON.get(LOCATION.LAT);\n\t\t\t\tString testLNG = (String) specificLocationJSON.get(LOCATION.LNG);\n\t\t\t\tif (testLAT == null || testLAT.isEmpty() || testLNG == null || testLNG.isEmpty()){\n\t\t\t\t\treturn new LocationBuildResult(buildSuccess, null, Interview.ERROR_API_FAIL + \";;\" + Interview.TYPE_GEOCODING + \";;\" + specificLocation_tag);\n\t\t\t\t}else{\n\t\t\t\t\tJSON.add(specificLocationJSON, InterviewData.INPUT, inputReconstructed); \t//add input always - TODO: probably useless here\n\t\t\t\t\tif (specificLocation_tag.equals(\"<user_location>\")){\n\t\t\t\t\t\tJSON.add(specificLocationJSON, LOCATION.NAME, AnswerStatics.get(AnswerStatics.HERE, nluInput.language));\n\t\t\t\t\t}else if (specificLocation_tag.equals(\"<user_home>\")){\n\t\t\t\t\t\tJSON.add(specificLocationJSON, LOCATION.NAME, AnswerStatics.get(AnswerStatics.HOME, nluInput.language));\n\t\t\t\t\t}else if (specificLocation_tag.equals(\"<user_work>\")){\n\t\t\t\t\t\tJSON.add(specificLocationJSON, LOCATION.NAME, AnswerStatics.get(AnswerStatics.WORK, nluInput.language));\n\t\t\t\t\t}\n\t\t\t\t\t//return if primary info (not added)\n\t\t\t\t\tif (!hasAddedSpecLocation){\n\t\t\t\t\t\tbuildSuccess = true;\n\t\t\t\t\t\treturn new LocationBuildResult(buildSuccess, specificLocationJSON, null);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif (specificLocation_tag.equals(\"<user_location>\")){\n\t\t\t\t\treturn new LocationBuildResult(buildSuccess, null, Interview.ERROR_MISSING + \";;\" + Interview.TYPE_SPECIFIC_LOCATION + \";;\" + specificLocation_tag);\n\t\t\t\t}else{\n\t\t\t\t\treturn new LocationBuildResult(buildSuccess, null, Interview.ACTION_ADD + \";;\" + Interview.TYPE_SPECIFIC_LOCATION + \";;\" + specificLocation_tag);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//-check for personal location (\"my favorite restaurant\")\n\t\t//TODO: needs rework!\n\t\t/*\n\t\tString[] personalInfo_data = User.containsPersonalUserInfo(input, user);\n\t\tString personalInfo_item = personalInfo_data[3];\n\t\tString personalInfo_str = personalInfo_data[0];\n\t\tif (!personalInfo_item.isEmpty()){\n\t\t\tJSONObject personalInfoJSON = JSON.parseStringOrFail(personalInfo_item);\n\t\t\tJSONObject personalLocationJSON = (JSONObject) personalInfoJSON.get(Address.FIELD); \n\t\t\tif (personalLocationJSON != null && !personalLocationJSON.isEmpty()){\n\t\t\t\tJSON.add(personalLocationJSON, InterviewData.INPUT, input); \t//add input always\n\t\t\t\tJSON.add(personalLocationJSON, LOCATION.NAME, personalInfo_str);\n\t\t\t\tbuildSuccess = true;\n\t\t\t\t//return personalLocationJSON.toJSONString();\n\t\t\t\treturn new Object[]{ buildSuccess, personalLocationJSON.toJSONString()};\n\t\t\t}else{\n\t\t\t\t//return Interview.ACTION_ADD + \";;\" + Interview.TYPE_PERSONAL_LOCATION + \";;\" + personalInfo_str;\n\t\t\t\treturn new Object[]{ buildSuccess, Interview.ACTION_ADD + \";;\" + Interview.TYPE_PERSONAL_LOCATION + \";;\" + personalInfo_str};\n\t\t\t}\n\t\t}\n\t\t*/\n\t\t//-check for contact location\n\t\t//TODO: needs rework!\n\t\t/*\n\t\tObject[] contactsSearch = User.containsContact(input, user);\n\t\tString contactMatch = User.getContact(contactsSearch);\n\t\t//TODO: choose when multiple hits\n\t\t//TODO: rework that completely?\n\t\tif (!contactMatch.isEmpty()){\n\t\t\t//multiple matches (name but no meta, should only happen in this case)\n\t\t\tif (contactMatch.contains(\"<meta>\")){\n\t\t\t\t//get contact address from meta\n\t\t\t\tpersonalInfo_item = User.getAttribute(contactMatch, \"meta\");\n\t\t\t\tif (!personalInfo_item.isEmpty()){\n\t\t\t\t\tJSONObject personalInfoJSON = JSON.parseStringOrFail(personalInfo_item);\n\t\t\t\t\tJSONObject personalLocationJSON = (JSONObject) personalInfoJSON.get(Address.FIELD); \n\t\t\t\t\tif (personalLocationJSON != null && !personalLocationJSON.isEmpty()){\n\t\t\t\t\t\tJSON.add(personalLocationJSON, InterviewData.INPUT, input); \t//add input always\n\t\t\t\t\t\tJSON.add(personalLocationJSON, LOCATION.NAME, contactMatch);\n\t\t\t\t\t\tbuildSuccess = true;\n\t\t\t\t\t\t//return personalLocationJSON.toJSONString();\n\t\t\t\t\t\treturn new Object[]{ buildSuccess, personalLocationJSON.toJSONString()};\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\t//return Interview.ACTION_ADD + \";;\" + Interview.TYPE_PERSONAL_CONTACT + \";;\" + User.getAttribute(contactMatch, \"name\");\n\t\t\treturn new Object[]{ buildSuccess, Interview.ACTION_ADD + \";;\" + Interview.TYPE_PERSONAL_CONTACT + \";;\" + User.getAttribute(contactMatch, \"name\")};\n\t\t}\n\t\t*/\n\t\t//-check for point of interest (NOTE: we could use extracted POI but it could be a different location (end, start, waypoint, etc.))\n\t\t//System.out.println(\"Place build: \" + input); \t//DEBUG\n\t\tJSONObject poiJSON = getPOI(input, nluInput.language);\n\t\t//System.out.println(\"poiJSON: \" + poiJSON); \t\t//DEBUG\n\t\tString poi = (String) poiJSON.get(\"poi\");\n\t\tif (!poi.isEmpty()){\n\t\t\t//System.out.println(\"inputPOI: \" + input); \t\t//debug\n\t\t\tString inputNorm = input;\n\t\t\tString searchPOI = \"\";\n\t\t\tString searchPOI_coarse = \"\";\n\t\t\t//System.out.println(\"POI to discuss: \" + input); \t//debug\n\t\t\t//try to add a \"close to\" search if POI is the input or ends on the POI so chance is high that it is a local POI\n\t\t\tif (input.equals(poi) || input.matches(\".* \" + Pattern.quote(poi) + \"$\")){\n\t\t\t\t//build a string that is optimized for places APIs\n\t\t\t\tString poiLocation = (String) poiJSON.get(\"poiLocation\");\n\t\t\t\tif (hasAddedSpecLocation && specificLocationJSON != null){\n\t\t\t\t\t//additional info is assumed to be 'close to' currently\n\t\t\t\t\tsearchPOI_coarse = inputReconstructed;\n\t\t\t\t\tsearchPOI = buildCloseToSearch(inputReconstructed, specificLocationJSON, nluInput.language);\t//TODO: use GPS coords?\n\t\t\t\t\t\n\t\t\t\t}else if (poiLocation.isEmpty()){\n\t\t\t\t\tJSONObject userLocationJSON = LOCATION.getFullAddressJSON(user, \"<user_location>\");\n\t\t\t\t\tif (userLocationJSON == null || userLocationJSON.isEmpty()){\n\t\t\t\t\t\treturn new LocationBuildResult(buildSuccess, null, Interview.ERROR_MISSING + \";;\" + Interview.TYPE_SPECIFIC_LOCATION + \";;\" + \"<user_location>\");\n\t\t\t\t\t}\n\t\t\t\t\t//build close to here search\n\t\t\t\t\tsearchPOI_coarse = inputReconstructed;\n\t\t\t\t\tsearchPOI = buildCloseToSearch(inputReconstructed, userLocationJSON, nluInput.language);\t\t//TODO: use GPS coords?\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t//build close to location search\n\t\t\t\t\tString distanceTag = (String) poiJSON.get(\"distanceTag\");\n\t\t\t\t\tif (distanceTag.equals(\"<in>\")){\n\t\t\t\t\t\tsearchPOI = buildCloseToSearch(inputReconstructed, poiJSON, nluInput.language);\n\t\t\t\t\t}else if (distanceTag.equals(\"<close>\")){\n\t\t\t\t\t\tsearchPOI = buildCloseToSearch(inputReconstructed, poiJSON, nluInput.language);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//searchPOI = poi;\n\t\t\t\t\t\tsearchPOI = inputReconstructed;\n\t\t\t\t\t}\n\t\t\t\t\tsearchPOI_coarse = inputReconstructed;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t//take what is given\n\t\t\t}else{\n\t\t\t\tsearchPOI = inputReconstructed;\n\t\t\t}\n\t\t\t//call the places API with new searchPOI\n\t\t\t//System.out.println(\"searchPOI: \" + searchPOI); \t\t//debug\n\t\t\tString[] poiTypes = getPoiType(inputNorm, nluInput.language);\n\t\t\tPoiFinderInterface poiFinder = GeoFactory.createPoiFinder();\n\t\t\tJSONArray places;\n\t\t\tif (!poiFinder.isSupported()){\n\t\t\t\tDebugger.println(\"LocationParameter POI - skipped because PoiFinderInterface was 'not supported'.\", 1);\n\t\t\t\tplaces = new JSONArray();\n\t\t\t}else{\n\t\t\t\tplaces = poiFinder.getPOI(searchPOI, poiTypes, null, null, nluInput.language);\n\t\t\t\tif (places.isEmpty() && !searchPOI_coarse.isEmpty()){\n\t\t\t\t\tplaces = poiFinder.getPOI(searchPOI_coarse, poiTypes, null, null, nluInput.language);\n\t\t\t\t\tDebugger.println(\"LocationParameter POI - performed 2nd try (types: \" + String.join(\",\", poiTypes) + \") to find: \" + searchPOI, 3);\n\t\t\t\t\tif (places.isEmpty()){\n\t\t\t\t\t\tplaces = poiFinder.getPOI(searchPOI_coarse, null, null, null, nluInput.language);\n\t\t\t\t\t\tDebugger.println(\"LocationParameter POI - performed 3rd try (without type) to find: \" + searchPOI, 3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!places.isEmpty()){\n\t\t\t\tJSONObject locationJSON = (JSONObject) places.get(0);\n\t\t\t\t//System.out.println(\"places: \" + places); \t\t\t//debug\n\t\t\t\tif (places.size() > 1){\n\t\t\t\t\tint maxOptions = 8;\n\t\t\t\t\tJSONArray options = new JSONArray();\n\t\t\t\t\tfor (int i = 1; i<Math.min(maxOptions, places.size()); i++){\n\t\t\t\t\t\tJSON.add(options, (JSONObject) places.get(i));\n\t\t\t\t\t}\n\t\t\t\t\tJSON.add(locationJSON, InterviewData.OPTIONS, options);\n\t\t\t\t}\n\t\t\t\t//add input too\n\t\t\t\tJSON.add(locationJSON, InterviewData.INPUT, inputReconstructed);\n\t\t\t\tJSON.add(locationJSON, InterviewData.LOCATION_NAME, locationJSON.get(LOCATION.NAME));\n\t\t\t\tbuildSuccess = true;\n\t\t\t\t//return locationJSON.toJSONString();\n\t\t\t\treturn new LocationBuildResult(buildSuccess, locationJSON, null);\n\t\t\t}\n\t\t\t//no results\n\t\t\telse{\n\t\t\t\treturn new LocationBuildResult(buildSuccess, null, Interview.ERROR_API_FAIL + \";;\" + Interview.TYPE_GEOCODING + \";;\" + \"places_poi\");\n\t\t\t}\n\t\t}\n\t\t//-the input was not empty and none of the personals gave a result. Now we have to work with what we have ^^\n\t\t//TODO: double-check the geocoder result for sanity\n\t\t//TODO: add a flag that this data is a guess\n\t\tGeoCoderResult locationData = LOCATION.getInfoBySearch(inputReconstructed, nluInput);\n\t\tJSONObject locationJSON;\n\t\tif (locationData == null){\n\t\t\tif (GeoFactory.createGeoCoder().isSupported()){\n\t\t\t\treturn new LocationBuildResult(buildSuccess, null, Interview.ERROR_API_FAIL + \";;\" + Interview.TYPE_GEOCODING + \";;\" + \"get_coordinates\");\n\t\t\t}else{\n\t\t\t\tlocationJSON = JSON.make(\"search\", inputReconstructed, \"error\", \"missing GeoCoding support\");\n\t\t\t\tDebugger.println(\"LOCATION.getInfoBySearch - FAILED due to missing Geo-Coder support (no API keys?).\", 3);\n\t\t\t}\n\t\t}else{\n\t\t\tlocationJSON = locationData.exportJson();\n\t\t}\n\t\t//System.out.println(\"normal loc.: \" + locationJSON.toJSONString()); \t\t//debug\n\t\t//add input too\n\t\tJSON.put(locationJSON, InterviewData.INPUT, inputReconstructed);\n\t\tbuildSuccess = true;\n\t\treturn new LocationBuildResult(buildSuccess, locationJSON, null); \n\t}",
"@Override\n public void onMapLongClick(@NonNull LatLng point) {\n latitude = String.valueOf(point.getLatitude());\n longitude = String.valueOf(point.getLongitude());\n mapboxMap.addMarker(new MarkerOptions()\n .position(point)\n .title(\"New Maintenance Form\")\n .snippet(\"Click to add site\")\n );\n\n\n }",
"protected void streetLoc(LatLng latLng) {\n if (latLng == null) {\n return;\n }\n TencentSearch tencentSearch = new TencentSearch(this);\n //还可以传入其他坐标系的坐标,不过需要用coord_type()指明所用类型\n //这里设置返回周边poi列表,可以在一定程度上满足用户获取指定坐标周边poi的需求\n Geo2AddressParam geo2AddressParam = new Geo2AddressParam(latLng).getPoi(true)\n .setPoiOptions(new Geo2AddressParam.PoiOptions()\n// .setRadius(1000).setCategorys(\"面包\")\n .setPolicy(Geo2AddressParam.PoiOptions.POLICY_O2O));\n tencentSearch.geo2address(geo2AddressParam, new HttpResponseListener<BaseObject>() {\n\n @Override\n public void onSuccess(int arg0, BaseObject arg1) {\n if (arg1 == null) {\n return;\n }\n Geo2AddressResultObject obj = (Geo2AddressResultObject)arg1;\n StringBuilder sb = new StringBuilder();\n sb.append(\"逆地址解析\");\n sb.append(\"\\n地址:\" + obj.result.address);\n sb.append(\"\\npois:\"+obj.result.address_component.province+obj.result.address_component.city+obj.result.address_component.district);\n// provinceMap.put()\n province1 = provinceMap.get(obj.result.address_component.province+obj.result.address_component.city+obj.result.address_component.district);\n if(province1 == null) {\n provinceMap.put(obj.result.address_component.province+obj.result.address_component.city+obj.result.address_component.district,obj.result.address_component.province+obj.result.address_component.city+obj.result.address_component.district);\n getStreet(obj.result.address_component.province, obj.result.address_component.city, obj.result.address_component.district);\n }\n\n// for (Poi poi : obj.result.pois) {\n// sb.append(\"\\n\\t\" + poi.title);\n// tencentMap.addMarker(new MarkerOptions()\n// .position(poi.latLng) //标注的位置\n// .title(poi.title) //标注的InfoWindow的标题\n// .snippet(poi.address) //标注的InfoWindow的内容\n// );\n// }\n// Log.e(\"test\", sb.toString());\n }\n\n @Override\n public void onFailure(int arg0, String arg1, Throwable arg2) {\n Log.e(\"test\", \"error code:\" + arg0 + \", msg:\" + arg1);\n }\n });\n }",
"public boolean requestSPS(double lat, double lon, double alt, double zoom) {\r\n\r\n\t\ttry {\r\n\r\n\t\t\tURL templateUrl = SPSSubmitTmp.class.getResource(\"SPS_SubmitLLATemplate.xml\");\r\n\t\t\t//\t\t\tURL procURL = TestVast1camSubmit.class.getResource(\"SPS_ExcludePositionElt.xml\");\r\n\t\t\tDOMHelper dom = new DOMHelper(templateUrl.toString(), false);\r\n\t\t\tElement rootElt = dom.getRootElement();\r\n\t\t\tNodeList inputNodes = dom.getAllElements(\"InputParameter\"); //rootElt.getElementsByTagName(\"sensorParam\");\r\n\t\t\tint numNodes = inputNodes.getLength();\r\n\t\t\tfor(int i=0; i<numNodes; i++){\r\n\t\t\t\tElement eltTmp = (Element)inputNodes.item(i);\r\n\t\t\t\tString paramId = eltTmp.getAttribute(\"parameterID\");\r\n\t\t\t\tif(paramId.equalsIgnoreCase(\"AOV\")){\r\n\t\t\t\t\tElement aovValElt = dom.getElement(eltTmp, \"value/Quantity/value\");\r\n\t\t\t\t\taovValElt.setTextContent(zoom + \"\");\r\n//\t\t\t\t\tSystem.err.println(aovValElt);\r\n\t\t\t\t} else if (paramId.equalsIgnoreCase(\"PositionToPointAt\")){\r\n\t\t\t\t\tElement vectorElt = dom.getElement(eltTmp, \"value/Position/location/Vector\");\r\n\t\t\t\t\tNodeList coords = dom.getChildElements(vectorElt);\r\n\t\t\t\t\tElement coordElt, coordValElt;\r\n\t\t\t\t\tfor(int j=0; j<coords.getLength(); j++){\r\n\t\t\t\t\t\tcoordElt = (Element)coords.item(j);\r\n\t\t\t\t\t\tcoordValElt = dom.getElement(coordElt, \"Quantity/value\");\r\n\t\t\t\t\t\tswitch(j){\r\n\t\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\t\tcoordValElt.setTextContent(lat + \"\");\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\t\tcoordValElt.setTextContent(lon + \"\");\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\t\tcoordValElt.setTextContent(alt + \"\");\r\n\t\t\t\t\t\t\tbreak;\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\t//dom.serialize(rootElt, System.out, true);\r\n\t\t\tboolean llaOk = sendPOSTRequest(dom);\r\n\t\t\tLLAZ llaz = new LLAZ();\r\n\t\t\tllaz.lat = lat;\r\n\t\t\tllaz.lon = lon; \r\n\t\t\tllaz.alt = alt;\r\n\t\t\tllaz.zoom = zoom;\r\n\t\t\tif(llaOk) {\r\n\t\t\t\t//goodPoints.add(llaz);\r\n\t\t\t\t//System.err.println(\"GOOD: \" + llaz);\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\t//MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),\r\n\t\t\t\t//\t\t\"STT Error\", \"SPS Submission error. Requested point out of range for Camera vastcam1.\");\r\n\t\t\t\t//badPoints.add(llaz);\r\n\t\t\t\tSystem.err.println(\"BAD: \" + llaz);\r\n\t\t\t\treturn false;\r\n\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\treturn false;\r\n\t}",
"public boolean createMarker(ArrayList<LocationsData>datas) {\n\n boolean isNotEmpty= true;\n if (isNotEmpty) {\n placesMarker= placesMap.addMarker(new MarkerOptions()\n .position(new LatLng(datas.get(0).locationLatitude,datas.get(0).locationLongitude))\n .title(datas.get(0).locationName));\n placesMarker.showInfoWindow();\n placesMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n Log.i(\"Places Marker\",marker.getTitle()+\"\\n\"+places.toString());\n\n LocationsData data= new LocationsData();\n data.set_id(places.get(0).get_id());\n data.setImage_path(places.get(0).getImage_path());\n data.setLocationName(places.get(0).getLocationName());\n data.setLocationLatitude(places.get(0).getLocationLatitude());\n data.setLocationLongitude(places.get(0).getLocationLongitude());\n data.setLocationProducts(places.get(0).getLocationProducts());\n\n Intent i= new Intent(MainActivity.this,PlaceDetailsActivity.class);\n i.putExtra(\"places\",data);\n startActivity(i);\n\n Log.i(\"Intent\",i.toString());\n Log.i(\"onMarkerClick\",\"Successfull, Title: \"+marker.getTitle());\n Log.i(\"Getting Item Id\",String.valueOf(places.get(0).get_id()));\n return false;\n }\n });\n }else {\n isNotEmpty=false;\n }\n return isNotEmpty;\n }",
"public void onClick(View v) {\n if(keyword.getText().toString().trim().length() == 0){\n rootView.findViewById(R.id.errorKeyword).setVisibility(View.VISIBLE);\n Toast toast = Toast.makeText(getActivity().getApplicationContext(),\n \"Please fix all fields with errors\", Toast.LENGTH_SHORT);\n toast.show();\n keywordFlag = false;\n }\n else {\n rootView.findViewById((R.id.errorKeyword)).setVisibility(View.GONE);\n keywordFlag = true;\n }\n if(radioButtonHere.isChecked()){\n //Take current location\n rootView.findViewById(R.id.errorLocation).setVisibility(View.GONE);\n locationFlag = true;\n }\n if(radioButtonOther.isChecked()){\n if(locationText.getText().toString().trim().length()==0) {\n rootView.findViewById(R.id.errorLocation).setVisibility(View.VISIBLE);\n Toast toast = Toast.makeText(getActivity().getApplicationContext(),\n \"Please fix all fields with errors\", Toast.LENGTH_SHORT);\n toast.show();\n locationFlag = false;\n }\n else{\n rootView.findViewById(R.id.errorLocation).setVisibility(View.GONE);\n locationFlag = true;\n }\n }\n if(keywordFlag && locationFlag){\n //Valid data, make the URL for first TM Event search.\n //If User selects here\n if(radioButtonHere.isChecked()){\n //Use current lat and long values\n params = \"current_location?latitude=\"+latitude+\"&longitude=\"+longitude;\n String current_url = URL + params;\n Log.d(\"current_URL\",current_url);\n getCurrentResponse(current_url);\n }\n //If User has typed in custom location\n if(radioButtonOther.isChecked()) {\n params = \"geocoding?location=\" + Uri.encode(locationText.getText().toString()) + \"&api_key=\" + api_key;\n geocoding_url = URL + params;\n Log.d(\"Before Geocoding sent\", geocoding_url);\n getGeocodeResponse(geocoding_url);\n }\n }\n }",
"private void geolocate() throws IOException {\n\n\n List<Address> addresses = geocoder.getFromLocationName(bundle.getString(\"starting\"), 1);\n List<Address> addresses1 = geocoder.getFromLocationName(bundle.getString(\"destiny\"), 1);\n\n if (addresses!=null||addresses.size()>0||addresses1!=null||addresses1.size()>0)\n {\n try {\n\n\n Address address=addresses.get(0);\n Address address1=addresses1.get(0);\n\n Double orglat = address.getLatitude();\n Double orglng = address.getLongitude();\n Double dstlat = address1.getLatitude();\n Double dstlng = address1.getLongitude();\n\n origin = new LatLng(orglat, orglng);\n destiny = new LatLng(dstlat, dstlng);\n\n /* Constants.AddrouteOrigin=new LatLng(orglat,orglng);\n Constants.AddrouteDestiny=new LatLng(dstlat,dstlng);*/\n\n\n Log.d(\"origindest\",Constants.AddrouteOrigin+\" \"+Constants.AddrouteDestiny+\"\");\n\n Log.d(\"origindest\",origin+\" \"+destiny+\"\");\n\n }catch (IndexOutOfBoundsException e){\n Toast.makeText(getContext(),e.getMessage(),Toast.LENGTH_LONG).show();\n }\n\n }\n else {\n Toast.makeText(getContext(),\"no address found\",Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n if (locationMangaer.isProviderEnabled(LocationManager.GPS_PROVIDER))\n {\n Intent IntEmergencia = new Intent(MainActivity.this, MapActivity_Pedido.class);\n startActivity(IntEmergencia);\n MainActivity.this.finish();\n }\n\n }",
"@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {\n PreparedQuery results = getQuery();\n\n // Add tracked locations as MapImage objects to a List.\n List<MapImage> formLocationOptions = convertMetdataToMapImages(results);\n\n Gson gson = new Gson();\n String jsonLocations = gson.toJson(formLocationOptions);\n response.setContentType(\"application/json\");\n response.getWriter().println(jsonLocations);\n }",
"private void returnDriverLocationstoMaps() {\n }",
"private void putLocationData(ApiResponseLocation response) {\n locAdapter = new LocationAdapter(response, this);\n recyclerView.setAdapter(locAdapter);\n }",
"public void getSample(T landmark){\n\t\t\n\t}",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n Intent intent = getIntent();\n double lat = intent.getDoubleExtra(\"Lat\",10);\n double lon = intent.getDoubleExtra(\"Long\",10);\n\n Log.i(\"lat\", String.valueOf(lat));\n LatLng userLocation = new LatLng(lat ,lon);\n\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n mMap.addMarker(new MarkerOptions().position(userLocation).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(userLocation));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(userLocation,15));\n\n LatLngBounds boundary = new LatLngBounds(new LatLng(lat, lon), new LatLng(lat , lon));\n builder1.setLatLngBounds(boundary);\n try {\n startActivityForResult(builder1.build(this),PLACE_PICKER_REQUEST);\n }catch (Exception e ){\n return ;\n }\n\n\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n // Logic to handle location object\n mLastLocation = location;\n Log.wtf(\"-GPS\", \"getLocation 169 : \" + mLastLocation.getLatitude() + \",\" + mLastLocation.getLongitude());\n\n } else {\n Log.wtf(\"-GPS\", \"getLocation 171 : \" + mLastLocation);\n\n }\n }",
"@Override\n public void onSuccess(Location location) {\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n mLocation = location;\n try {\n\n if (commingFrom.equalsIgnoreCase(\"DIRECTION\")) {\n if (mObituaries != null && mLocation != null) {\n if (mLocation != null) {\n String uri = String.format(Locale.ENGLISH,\n \"http://maps.google.com/maps?saddr=%f,%f(%s)&daddr=%f,%f (%s)\",\n Double.valueOf(mObituaries.getObituaryLat()),\n Double.valueOf(mObituaries.getObituaryLng()),\n \"Your Location\",\n mLocation.getLatitude(), mLocation.getLongitude(),\n mObituaries.getObituaryName());\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));\n intent.setPackage(\"com.google.android.apps.maps\");\n startActivity(intent);\n } else {\n Toast.makeText(ObitiuariesDetailsActivity.this,\n \"Current location not available\",\n Toast.LENGTH_SHORT).show();\n }\n } else {\n Toast.makeText(ObitiuariesDetailsActivity.this,\n \"No contact number found\",\n Toast.LENGTH_SHORT).show();\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }",
"@Override\n public void onNext(Result result) {\n\n int dbSize = getDBSize(contactsDB); //retrieve dbsize\n //2. parse through results\n\n MyLocation mLocation = new MyLocation(result.getGeometry().getLocation().getLat(),\n result.getGeometry().getLocation().getLng());\n String name = result.getName();\n String photo_ref = result.getPhotos()==null?\"\":result.getPhotos().get(0).getPhotoReference();\n double rating = result.getRating()==null?0: result.getRating();\n String vicinity = result.getVicinity();\n String place_id = result.getPlaceId();\n //Add a new Target to the DB\n Target target = new Target(1 + dbSize, name, rating, subject, vicinity, photo_ref, place_id, mLocation);\n\n //insert a contact to the DB\n fillTargetRecordInDB(target, contactsDB);\n\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n Toast.makeText(ATSLocationActivity.this, \"Last location is null\", Toast.LENGTH_SHORT).show();\n }else{\n Toast.makeText(ATSLocationActivity.this, \"\"+location.getLatitude(), Toast.LENGTH_SHORT).show();\n }\n }",
"protected void createLocationRequest() {\n System.out.println(\"In CREATE LOCATION REQUEST\");\n mLocationRequest = new LocationRequest();\n mLocationRequest.setInterval(60 * 1000);\n mLocationRequest.setFastestInterval(5 * 1000);\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n //mLocationRequest.setSmallestDisplacement(Utils.DISPLACEMENT);\n }",
"@Override\n\t\t\tpublic void onLocationChanged(Location location) {\n\t\t\t\t\n\t\t\t\tmLatitude = location.getLatitude();\n\t\t\t\tmLongitude = location.getLongitude();\n\t\t\t\t\n\t\t\t\t LatLng point = new LatLng(mLatitude, mLongitude);\n\t\t\t\t\n\t\t\t\t try {\n\t\t\t\t \taddresses = geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n\t\t\t\t } catch (IOException e) {\n\t\t\t\t \t// TODO Auto-generated catch block\n\t\t\t\t \te.printStackTrace();\n\t\t\t\t }\n\t\t\t\t MarkerOptions maker= new MarkerOptions().position(point);\n\n\t\t\t\t address = addresses.get(0).getAddressLine(0);\n\t\t\t\t if(address==null)\n\t\t\t\t {\n\t\t\t\t\t maker.title(\"My Location\");\n\t\t\t\t\t\tgoogleMap.addMarker(maker);\n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\tmaker.title(\"\"+address);\n\t\t\t\t\tgoogleMap.addMarker(maker);\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t String type = mPlaceType;\n\t\t\t StringBuilder sb = new StringBuilder(\"https://maps.googleapis.com/maps/api/place/nearbysearch/json?\");\n\t\t\t sb.append(\"location=\"+mLatitude+\",\"+mLongitude);\n\t\t\t sb.append(\"&radius=1500\");\n\t\t\t sb.append(\"&types=\"+type);\n\t\t\t sb.append(\"&sensor=true\");\n\t\t\t sb.append(\"&key=AIzaSyAwZSGS1kZG7_UuqxqHH3MdO1hbwB2cjag\"); \n\t\t\t PlacesTask placesTask = new PlacesTask(); \n\t\t\t placesTask.execute(sb.toString());\n\t\t\t \n\t\t\t \n\t\t\t if(zoomm)\n\t\t\t {\n\t\t\t \t googleMap.animateCamera(CameraUpdateFactory.newCameraPosition(new CameraPosition(point, 15, 30, 0)));\n\t\t\t \t zoomm=false;\n\t\t\t }\n\t\t\t\t\n\t\t\t}",
"@Override\n protected void onReceiveResult(int resultCode, Bundle resultData) {\n String mLocality = resultData.getString(Constants.RESULT_DATA_KEY);\n\n // Show a toast message if an address was found.\n if (resultCode == Constants.SUCCESS_RESULT) {\n\n Uri queryUri = LocationsContract.LocationsEntry.CONTENT_URI;\n String[] projection = new String[]{LocationsContract.LocationsEntry.COLUMN_PLACEID};\n String selection = LocationsContract.LocationsEntry.COLUMN_PLACEID + \"=?\";\n String[] selectionArgs = new String[]{UNIQUE_GEOLOCATION_ID};\n\n Cursor locationCursor = getContentResolver().query(queryUri, projection, selection, selectionArgs, null);\n\n if(locationCursor!=null) {\n int isGeolocalityPresent = locationCursor.getCount();\n if (isGeolocalityPresent == 0) {\n SunshineLocationUtils.insertLocation(MainActivity.this, mLocality, mCurrentLocation.getLatitude(),\n mCurrentLocation.getLongitude(), UNIQUE_GEOLOCATION_ID);\n } else {\n SunshineLocationUtils.updateLocation(MainActivity.this, mLocality, mCurrentLocation.getLatitude(),\n mCurrentLocation.getLongitude());\n }\n\n locationCursor.close();\n } else {\n Toast noAddress = Toast.makeText(MainActivity.this, \"\" + getString(R.string.no_address_found), Toast.LENGTH_LONG);\n noAddress.show();\n }\n }\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n LatLng currentLocation = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLng(currentLocation));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(currentLocation, 15));\n }\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n LatLng marker = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.addMarker(new MarkerOptions().position(marker).title(\"You\").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(location.getLatitude(), location.getLongitude()), 15.0f));\n }\n }",
"private void updateTargetProductGeocoding() {\n }"
]
| [
"0.5779624",
"0.5443433",
"0.5378654",
"0.5351623",
"0.53301156",
"0.5305149",
"0.5290121",
"0.52557224",
"0.5249281",
"0.52385956",
"0.51886094",
"0.51812345",
"0.5174705",
"0.5166734",
"0.51411766",
"0.51343924",
"0.5083606",
"0.50485784",
"0.5046811",
"0.5039494",
"0.5034382",
"0.5030799",
"0.5028992",
"0.50266945",
"0.50227076",
"0.502084",
"0.5012126",
"0.5006293",
"0.49944732",
"0.4986611",
"0.49827027",
"0.4964607",
"0.49635398",
"0.49518266",
"0.49486995",
"0.4947906",
"0.49421695",
"0.49370262",
"0.49330562",
"0.49314377",
"0.49312755",
"0.49185687",
"0.49136",
"0.49121985",
"0.4897797",
"0.48928598",
"0.48759094",
"0.4869402",
"0.48653877",
"0.48642552",
"0.48623857",
"0.48586723",
"0.48500577",
"0.4839475",
"0.48220858",
"0.4820576",
"0.4809846",
"0.48063403",
"0.48063403",
"0.48021924",
"0.4796125",
"0.47932592",
"0.47929892",
"0.47849542",
"0.47831714",
"0.47822076",
"0.47773212",
"0.4776508",
"0.47672626",
"0.47616798",
"0.47567865",
"0.47532788",
"0.4751321",
"0.47427824",
"0.47295982",
"0.47239125",
"0.47238046",
"0.4723389",
"0.472102",
"0.47135478",
"0.47131437",
"0.47050768",
"0.46995816",
"0.4695796",
"0.46952906",
"0.46919072",
"0.46915102",
"0.4689197",
"0.4686817",
"0.468452",
"0.4680786",
"0.46705925",
"0.4667645",
"0.4665014",
"0.46648017",
"0.46610442",
"0.46594155",
"0.46566632",
"0.46562424",
"0.4653302"
]
| 0.5311402 | 5 |
need to remove formHandlerRegistration.removeHandler(); | public void onSubmitComplete(FormPanel.SubmitCompleteEvent event) {
GWT.log(event.getResults());
mywebapp.log("saveMediaFile complete non-markdata style");
if (event.getResults().equals("SUCCESS")) {
doSave();
} else {
postDialog.hide();
mywebapp.getMessagePanel().displayError(event.getResults());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void removeForm(ERForm form) {\n\t\t\n\t}",
"public interface HandlerRegistration {\n\n void removeHandler();\n\n}",
"@Override\n public void formClearRegistry() {\n throw new UnsupportedOperationException(\"Not supported yet.\");\n }",
"@Override\n public void formClearRegistry() {\n throw new UnsupportedOperationException(\"Not supported yet.\");\n }",
"public void unregisterHandler(Object handler)\n {\n\n }",
"Form removeValidator(FormValidator validator);",
"@Override\n\tpublic void ClearHandler() {\n\t\teventHandlers.clear();\n\t\t\n\t}",
"public HandlerRegistration addIronFormElementUnregisterHandler(IronFormElementUnregisterEventHandler handler) {\n return addDomHandler(handler, IronFormElementUnregisterEvent.TYPE);\n }",
"@Override\n public void remove( )\n {\n FormPortletHome.getInstance( ).remove( this );\n }",
"@Override\n\tpublic void clearForm() {\n\t\t\n\t}",
"@Override\r\n\tpublic void clearEventHandlers() {\n\t\t\r\n\t}",
"@Override\n public void removeHandlerListener(IHandlerListener handlerListener) {\n\n }",
"@Override\r\n\tpublic void clearStepHandlers() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void removeHandlerListener(IHandlerListener handlerListener) {\n\r\n\t}",
"void clearHandlers();",
"@Override\r\n\tpublic void refrescarFormulario() {\n\t\t\r\n\t}",
"@Override\r\n protected void onForm(ClientForm form) {\n \r\n }",
"Form clearValidators();",
"public void removeFormWrapListener(FormWrapListener listener);",
"protected synchronized void clearScriptHandler() {\r\n currentScriptHandler = null;\r\n handlerLock.unlock();\r\n }",
"public void destroyHandler() {\n CallAppAbilityConnnectionHandler callAppAbilityConnnectionHandler = this.mHandler;\n if (callAppAbilityConnnectionHandler != null) {\n callAppAbilityConnnectionHandler.removeAllEvent();\n this.mHandler = null;\n }\n }",
"public void removeHandler(String tag) {\n handlers.remove(tag);\n }",
"private void clearHandler() {\n fileNames = null;\n fileName = null;\n image = null;\n displaySaveSupplier = false;\n displayUpdateSupplier = false;\n OcrHandler.getInstance().setInvoice(new Invoice());\n }",
"Promise<Void> unregisterHandler(String address, Handler<? extends Message> handler);",
"@Override\n\tprotected void deInitUIandEvent()\n\t{\n\t}",
"@Override\r\n public void removeValidListener(ValidListener l) {\n\r\n }",
"private static void Remove_handlers() {\n if (PlayerAcreenActivity.seekHandler != null) {\n PlayerAcreenActivity.seekHandler.removeCallbacks(PlayerAcreenActivity.run);\n\n }\n }",
"protected void removeFormBean(ActionMapping mapping,\r\n\t\t\tHttpServletRequest request) {\r\n\t\t// Remove the obsolete form bean\r\n\t\tif (mapping.getAttribute() != null) {\r\n\t\t\tif (\"request\".equals(mapping.getScope())) {\r\n\t\t\t\trequest.removeAttribute(mapping.getAttribute());\r\n\t\t\t} else {\r\n\t\t\t\tHttpSession session = request.getSession();\r\n\r\n\t\t\t\tsession.removeAttribute(mapping.getAttribute());\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"Form removeDecorator(String id);",
"@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tEventManager.getInstance().removeHandlerListenner(mHandler);\n\t}",
"public void removeNotificationHandler(String serviceName, NotificationHandler handler) ;",
"@Override\n public void handlerRemoved(final ChannelHandlerContext ctx) {\n ctx.pipeline().remove(HttpObjectAggregator.class);\n }",
"@Override\r\n public void removeUpdate(DocumentEvent e) {\n HayCambio();\r\n }",
"public void mo81218a() {\n HandlerC16593b bVar = this.f57893b;\n if (bVar != null) {\n bVar.removeCallbacksAndMessages(null);\n this.f57893b = null;\n }\n }",
"public void unregisterHandler(ReceivedDataHandler handler)\n {\n if (handler == this.handler)\n this.handler = null;\n }",
"@Override\n\tpublic void remove(MainFrameUpdater mfu) {\n\t\t\n\t}",
"Form clearValidation();",
"public void removeFormField(FormField formField) {\n\t\tif (formFields != null) {\n\t\t\tthis.formFields.remove(formField);\n\t\t}\n\t}",
"void deleteHandler(final String handlerName);",
"protected GwtCreateHandler getGwtCreateHandler() {\n\t\treturn null;\n\t}",
"@Override\r\n public void handleEvent(Event evt) {\n System.out.println(\"Focused out, removing click and change listeners\");\r\n documentElement.removeEventListener(\"change\", changeEventListener, false);\r\n documentElement.removeEventListener(\"click\", clickEventListener, false);\r\n \r\n }",
"public void removeTimerUpdateHandler(TimerUpdateHandler handler) {\r\n handlers.remove(handler);\r\n }",
"private void m76756h() {\n if (this.f61634d != null) {\n this.f61634d.removeAllListeners();\n this.f61634d.cancel();\n this.f61634d = null;\n }\n }",
"void unregisterAttributeOnChangeHandler(String attribute);",
"protected void handlerRemoved0(ChannelHandlerContext ctx) throws Exception {}",
"@Override\n public void Destroy() {\n mLoginHandler = null;\n }",
"public void stopHandler() {\n handler.removeCallbacks(runnable);\n Log.d(\"HandlerRun\", \"stopHandlerMain\");\n }",
"Form removeElement(String id);",
"private void m7230f() {\n this.f5601w.removeCallbacks(this.f5579D);\n }",
"@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tUiUpdater.unregisterClient(handler);\r\n\t}",
"public LoginConfigType<T> removeFormLoginConfig()\n {\n childNode.remove(\"form-login-config\");\n return this;\n }",
"void removeResponseFormSubmitAssociation( int nIdResponse, Plugin plugin );",
"void unsetRequired();",
"@Override\r\n protected void delete_object( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response ) throws KANException\r\n {\n\r\n }",
"Form removeElement(Element element);",
"void removeFramework(FrameworkContext fw) {\n bundleHandler.removeFramework(fw);\n synchronized (wrapMap) {\n for (Iterator<Map.Entry<String, URLStreamHandlerWrapper>> i = wrapMap.entrySet().iterator(); i.hasNext(); ) {\n Map.Entry<String, URLStreamHandlerWrapper> e = i.next();\n if ((e.getValue()).removeFramework(fw)) {\n i.remove();\n }\n }\n framework.remove(fw);\n if (debug == fw.debug) {\n if (framework.isEmpty()) {\n debug = null;\n } else {\n debug = framework.get(0).debug;\n }\n }\n }\n }",
"public synchronized void removePermanentHandler(Listener listener) {\n permanentEventMethodCache.remove(listener);\n }",
"private void m17251h() {\n this.f13994d.unregisterReceiver(this.f13995e);\n }",
"@Override\n\tpublic void onDelete() {\n\t\tif (testSessionChangedHandler != null) {\n\t\t\ttestSessionChangedHandler.removeHandler();\n\t\t\ttestSessionChangedHandler = null;\n\t\t}\n\t\t// Release the acmi\n\t\tif (acmiSaveButton !=null) {\n\t\t\tif (PasswordManagement.adminMenuItemList.contains(acmiSaveButton))\n\t\t\t\tPasswordManagement.adminMenuItemList.remove(acmiSaveButton);\n\t\t}\n\t\tif (acmiPromoteSite!=null) {\n\t\t\tif (PasswordManagement.adminMenuItemList.contains(acmiPromoteSite))\n\t\t\t\tPasswordManagement.adminMenuItemList.remove(acmiPromoteSite);\n\t\t}\n\t\tif (acmiDeleteSite!=null) {\n\t\t\tif (PasswordManagement.adminMenuItemList.contains(acmiDeleteSite))\n\t\t\t\tPasswordManagement.adminMenuItemList.remove(acmiDeleteSite);\n\t\t}\n\t\tif (acmiCreateSite!=null) {\n\t\t\tif (PasswordManagement.adminMenuItemList.contains(acmiCreateSite))\n\t\t\t\tPasswordManagement.adminMenuItemList.remove(acmiCreateSite);\n\t\t}\n\t}",
"private void goToRegistrationPage() {\n mAppModel.getErrorBus().removePropertyChangeListener(this);\n mAppModel.removePropertyChangeListener(this);\n mNavigationHandler.goToRegistrationPage();\n }",
"@Override\n protected void processBeforeBody() throws JellyTagException,\n FormBuilderException\n {\n super.processBeforeBody();\n\n iconHandlerImplementation =\n (getIconHandler() != null) ? resolveIconHandler(getIconHandler())\n : createDefaultIconHandler();\n }",
"@Override\n public List<MHandler> getHandlers()\n {\n return null;\n }",
"private void removeRcmButtonHandler() {\n\t\tTitledBorder border = new TitledBorder(\" REMOVE RCM\");\n\t\tborder.setTitleFont(new Font(\"TimesNewRoman\", Font.BOLD, 12));\n\t\tdisplayPanel.setBorder(border);\n\t\t\n\t\tdisplayPanel.removeAll();\n\t\tdisplayPanel.add(new RemoveRcmPanel(rmos, rmosManager, statusManager));\n\t\tdisplayPanel.revalidate();\n\t\tdisplayPanel.repaint();\n\t}",
"@Override\n\tpublic void removeUpdate(DocumentEvent e) {\n\t\t\n\t}",
"@Override\n public void onConsentFormDismissed(@Nullable FormError formError) {\n loadForm(context, activity);\n }",
"public void removeServer(AbstractServer server) {\n server.getHandler().getHandledTypes()\n .forEach(x -> {\n handlerMap.remove(x, server);\n log.trace(\"Un-Registered {} to handle messages of type {}\", server, x);\n });\n }",
"void removeFieldBinding( FieldBinding binding );",
"public static void releaseAllHandlers(){\n throw new RuntimeException(\"Not implemented yet\");\n }",
"public void handlerRemoved(CEventListener aoHandler) {\n\t}",
"@Override\n\tpublic FormContainer getFormContainer() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Object handlerAfter(SessionManager sessionManager) {\n\t\treturn null;\n\t}",
"@Override\r\npublic void attributeRemoved(ServletRequestAttributeEvent arg0) {\n\t\r\n}",
"private void m16569e() {\n this.f14723f.removeMessages(this.f14724g);\n }",
"@Override\n\tpublic void removeFromPanel(FABlock dfaBlock) {\n\n\t}",
"public void removeMessageHandler(MessageHandler handler) {\r\n\t\tif (handler == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\thandlers.remove(handler);\r\n\t}",
"@Override\n\tpublic void postRun(FormCheckerForm form) {\n\t}",
"public void formProcessingComplete()\r\n {\r\n return;\r\n }",
"@Bean(name=\"jaasLogoutHandler-ui-krb\")\n public LogoutHandler jassLogoutHandler() {\n return new SessionDestroyEventLogoutHandler(authenticationProvider);\n }",
"@Test(timeout = 4000)\n public void test216() throws Throwable {\n Form form0 = new Form((String) null);\n form0._clear();\n assertEquals(\"wheel_components_Form\", form0.getComponentId());\n }",
"public final void clearForm() {\n\t\tlb.addItem(\"\");\n\t\tlb.clear();\n\t}",
"@Override\npublic void removeFromParentUIContainer() {\n\t\n}",
"public interface HandlerInterface {\n\tvoid destory();\n}",
"@Override\n protected void onDestroy() {\n handler.removeCallbacks(run);\n super.onDestroy();\n }",
"public String[] unregisterHandler(IPacketHandler handler)\n {\n ArrayList<String> tmp = handlerToChannels.get(handler);\n if (tmp != null)\n {\n String[] channels = tmp.toArray(new String[0]);\n tmp = new ArrayList<String>();\n \n for (String channel : channels)\n {\n if (unregisterChannel(handler, channel))\n {\n tmp.add(channel);\n }\n }\n return tmp.toArray(new String[0]);\n }\n return new String[0];\n }",
"public void invalidateHandler() {\n mWeakActivity.clear();\n }",
"protected void updateFormBean(ActionMapping mapping,\r\n\t\t\tHttpServletRequest request, ActionForm form) {\r\n\t\t// Remove the obsolete form bean\r\n\t\tif (mapping.getAttribute() != null) {\r\n\t\t\tif (\"request\".equals(mapping.getScope())) {\r\n\t\t\t\trequest.setAttribute(mapping.getAttribute(), form);\r\n\t\t\t} else {\r\n\t\t\t\tHttpSession session = request.getSession();\r\n\r\n\t\t\t\tsession.setAttribute(mapping.getAttribute(), form);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void mo8963a() {\n if ((this instanceof OnMessageListener) && this.f14276h != null) {\n this.f14276h.removeMessageListener((OnMessageListener) this);\n }\n this.f14275g = null;\n super.mo8963a();\n }",
"public void o() {\n this.f760a.p().removeCallbacks(this.g);\n }",
"public Handler getHandler() {\n return null;\n }",
"public void desactivateFileMode() {\n logger.removeHandler(mFileHandler);\n }",
"void destroy(HandlerContext context);",
"protected static void removeJULConsoleHandler(ServletContext servletContext) {\n Logger rootLogger = LogManager.getLogManager().getLogger(\"\");\n Handler[] handlers = rootLogger.getHandlers();\n if (handlers != null) {\n for (Handler handler : handlers) {\n if (handler instanceof ConsoleHandler) {\n servletContext.log(\"Removing java.util.logging.ConsoleHandler to avoid System.err output\");\n rootLogger.removeHandler(handler);\n }\n }\n }\n }",
"@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tmHandler.removeMessages(0);\n\t\tmHandler.removeMessages(1);\n\t\tmHandler = null;\n\t}",
"@Override\n public void removeUpdate(DocumentEvent e) {\n verifierSaisie();\n }",
"Form endDecorator();",
"@Override\r\n public void removeUpdate(DocumentEvent e) {\n ActivoTimer();\r\n }",
"public HandlerRegistry getHandlerRegistry() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic void detalhar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void removeField() {\n\t\tusernameField.setText(\"\");\r\n\t\tpassField.setText(\"\");\r\n\t}",
"public RemoveUserForm(JFrame parent) {\n initComponents();\n \n Toolkit toolkit = getToolkit();\n setResizable(false);\n Dimension size = toolkit.getScreenSize();\n setLocation(size.width / 2 - getWidth() / 2, size.height / 2 - getHeight() / 2);\n this.parent = parent;\n \n }",
"@Override\r\npublic void requestDestroyed(ServletRequestEvent arg0) {\n\t\r\n}"
]
| [
"0.7120009",
"0.6690273",
"0.66871077",
"0.66871077",
"0.650961",
"0.64767635",
"0.6442928",
"0.6428764",
"0.6417793",
"0.6326353",
"0.62043065",
"0.6172414",
"0.6159729",
"0.6159419",
"0.60238266",
"0.5999579",
"0.59611595",
"0.59308696",
"0.58772767",
"0.5813104",
"0.5794546",
"0.5792374",
"0.5775378",
"0.571738",
"0.5716749",
"0.5700754",
"0.56976604",
"0.5696688",
"0.56865174",
"0.5617861",
"0.5614418",
"0.559013",
"0.5583591",
"0.55803275",
"0.5576766",
"0.557332",
"0.55664545",
"0.5566279",
"0.5564987",
"0.5563753",
"0.55540085",
"0.553799",
"0.5534941",
"0.5524918",
"0.5502668",
"0.5498165",
"0.54640526",
"0.5462076",
"0.5454979",
"0.54503584",
"0.54431164",
"0.54239166",
"0.5417711",
"0.5413233",
"0.541103",
"0.54060066",
"0.5389383",
"0.53856397",
"0.53767985",
"0.5371429",
"0.5367898",
"0.5366174",
"0.5347268",
"0.53428483",
"0.5321358",
"0.5320108",
"0.5315749",
"0.5304022",
"0.5296389",
"0.52959716",
"0.5284869",
"0.5262163",
"0.5260977",
"0.5260741",
"0.5254209",
"0.52343196",
"0.5229585",
"0.5227375",
"0.52215326",
"0.52156013",
"0.5204854",
"0.52038413",
"0.5197155",
"0.5196",
"0.5192087",
"0.51914793",
"0.5176219",
"0.51630086",
"0.515884",
"0.5158394",
"0.5156092",
"0.5140913",
"0.51408625",
"0.5140769",
"0.51398456",
"0.51376164",
"0.51373327",
"0.51344454",
"0.51161367",
"0.5111514",
"0.5110927"
]
| 0.0 | -1 |
Fired when the user clicks on the sendButton. | public void onClick(ClickEvent event) {
Camera c = Camera.getCamera();
if (!Camera.isSupported()) {
GWT.log("Camera not supported!");
return;
}
c.getPictureFromLibrary(new CameraCallback() {
public void onSuccess(String picture) {
GWT.log("picture=" + picture);
pictureDataHidden.setValue(picture);
image.setUrl("data:image/jpeg;base64," + picture);
}
public void onFailure(String error) {
GWT.log("getPictureFromCamera" + error);
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void handleSendButton(ActionEvent event) {\n\n messageController.setMessageSystem(this.message.getText(), this.toUsername.getText(),this.sender);\n if (messageController.sendMessage()){\n sentValid.setVisible(true);\n sentInvalid.setVisible(false);\n\n }\n else{\n sentInvalid.setVisible(true);\n sentValid.setVisible(false);\n\n }\n\n\n }",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\tSystem.out.println(\"Sent\");\n\t\t\t\t\t}",
"@Override\n public void onClick(View view) {\n send();\n }",
"private void sendButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sendButtonActionPerformed\n String str = requestCommand.getText();\n sC.sendCommand(str); \n requestCommand.requestFocus();\n }",
"public void updateSendButtonText() {\r\n sendButton.setText(topModel.getSendButtonText());\r\n }",
"private void b_sendActionPerformed(java.awt.event.ActionEvent evt) { \r\n\t\tString nothing = \"\";\r\n\t\tif ((b_sendText.getText()).equals(nothing)) {\r\n\t\t\tb_sendText.setText(\"\");\r\n\t\t\tb_sendText.requestFocus();\r\n\t\t}\r\n\t\telse {\r\n\t\t\ttry {\r\n\t\t\t\ttellEveryone(\"Server\" + \":\" + b_sendText.getText() + \":\" + \"Chat\");\r\n\t\t\t\tPrint_Writer.flush(); // flushes the buffer\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t}\r\n\t\t\tb_sendText.setText(\"\");\r\n\t\t\tb_sendText.requestFocus();\r\n\t\t}\r\n\r\n\t\tb_sendText.setText(\"\");\r\n\t\tb_sendText.requestFocus();\r\n\r\n\t}",
"@Override\n\tpublic void onMessagePlayCompleted() {\n\t\tbtnSend.setEnabled(true);\n\t}",
"public void sendClick(View view) {\n String message = input.getText().toString();\n uart.send(message);\n }",
"public void handleSendBtn(ActionEvent actionEvent) throws IOException {\n Socket socket = ConnSocket.getInstance();\n InputStream inputStream = socket.getInputStream();\n OutputStream outputStream = socket.getOutputStream();\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream, true);\n //String [] userInfo = {textField.getText(), nameLabel.getText()};\n out.println(textField.getText());\n\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}",
"@Then(\"^Click On Send Button$\")\r\n\tpublic void click_On_Send_Button() {\n\t\tnop.click(\"//*[@id=\\\"submitMessage\\\"]/span\"); \r\n\t \r\n\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\tString message= txtMessage.getText();\n\t\t\t\tsend(message);\n\t\t\t}",
"private void customSendBlueButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_customSendBlueButtonActionPerformed\n String custom = customMessageField.getText();\n Msg.send(\"Clicked - message: \" + custom);\n sendCustomMessage(custom, \"B\");\n }",
"public JButton getSend() {\n\t\treturn send;\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (btn1==e.getSource()) { //만약 버튼(btn1)클릭 시 동작\n\t\t\tto = tfphone.getText(); //텍스트필드(전화번호) 값가져와서 String to로 변형\n\t\t\ttext = tftext.getText(); //텍스트 필드(텍스트) 값자겨와서 String text로 변형 \n\t\t\t\t\t\t\t\t\t\t\t\t//문자전송(인자)가 String 이기때문에 String으로 변형해줘야함\n\t\t\tExampleSend ex = new ExampleSend(); //ExampleSend클래스 객체 생성\n\t\t\tex.문자전송(to, text);\n\t\t}\n\t\tif (btn2 == e.getSource()) {\n\t\t\ttfphone.setText(\"\");\n\t\t\ttftext.setText(\"\");\n\t\t}\n\t}",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tmConnectedThread.write(\"send\");\n\t\t\t\t\tmConnectedThread.writeFile();\n\t\t\t\t}",
"public void clickOnSendNotification() {\r\n\r\n\t\treportStep(\"About to click on Send Notification button \", \"INFO\");\r\n\r\n\t\tif(clickAfterWait(sendNotificationButton)) {\r\n\r\n\t\t\treportStep(\"Successfully clicked on the Send notification Button \", \"PASS\");\r\n\r\n\t\t}else {\r\n\r\n\t\t\treportStep(\"Failed to click onn the Send Notificationn Buttonn \", \"FAIL\");\r\n\t\t}\r\n\t}",
"public void sendMessage()\r\n {\r\n MessageScreen messageScreen = new MessageScreen(_lastMessageSent);\r\n pushScreen(messageScreen);\r\n }",
"public void actionPerformed( ActionEvent ae )\n {\n if( ae.getSource() == sendButton )\n \tprocessMail(message);\n }",
"public void handleSend() {\n model.sendMail();\n view.getChildren().clear();//it \"hides the display\" of the previous view\n }",
"private void customSendRedButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_customSendRedButtonActionPerformed\n String custom = customMessageField.getText();\n Msg.send(\"Clicked - message: \" + custom);\n sendCustomMessage(custom, \"R\");\n }",
"public void onClickSend(View view) {\n //String string = editText.getText().toString();\n //serialPort.write(string.getBytes());\n //tvAppend(txtResponse, \"\\nData Sent : \" + string + \"\\n\");\n }",
"private void send() {\n Toast.makeText(this, getString(R.string.message_sent, mBody, Contact.byId(mContactId).getName()),\n Toast.LENGTH_LONG).show();\n finish(); // back to DirectShareActivity\n }",
"@OnClick(R.id.enter_chat1)\n public void sendMessage() {\n if (getView() == null) {\n return;\n }\n EditText editText = getView().findViewById(R.id.chat_edit_text1);\n sendMessageBackend(editText.getText().toString(), utils.getChatUser());\n updateListAdapter();\n editText.setText(\"\");\n }",
"@Override\r\n public void onClick(View v)\r\n {\n if (\"\" != mSendOnBoardEdit.getText().toString()){\r\n DJIDrone.getDjiMainController().sendDataToExternalDevice(mSendOnBoardEdit.getText().toString().getBytes(),new DJIExecuteResultCallback(){\r\n\r\n @Override\r\n public void onResult(DJIError result)\r\n {\r\n // TODO Auto-generated method stub\r\n \r\n }\r\n \r\n });\r\n }\r\n }",
"@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tSendToServer(ph);\n\t\t\t\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString text = getCurUser() + \" : \" + textField.getText();\n\t\t\t\ttextField.setText(\"\");\n\t\t\t\tfinal ChatMessage msg = new ChatMessage();\n\t\t\t\tmsg.setMessage(text);\n\t\t\t\tmainFrame.sendMessage(msg);\n\t\t\t\t\n\t\t\t}",
"public boolean send() {\n\t\tif (!isValid())\n\t\t\treturn false;\n\t\tif (ActionBar.sendKey(getSlot()))\n\t\t\treturn true;\n\t\tWidgetChild main = SlotData.getMainChild(getSlot());\n\t\treturn WidgetUtil.visible(main) && EntityUtil.interact(false, main);\n\t}",
"@Step\n public void clickSendSMSButton(){\n actionWithWebElements.clickOnElement(sendSMSButton);\n }",
"public void onClickSend(View view) {\n String string = editText.getText().toString();\n serialPort.write(string.getBytes());\n tvAppend(textView, \"\\nData Sent : \" + string + \"\\n\");\n\n }",
"public void handleSend(ActionEvent actionEvent) {\r\n String to=textFieldTo.getText();\r\n try{\r\n Long idto = Long.parseLong(to);\r\n\r\n FriendshipRequest request = new FriendshipRequest();\r\n Tuple<Long,Long> f = new Tuple<>(user.getId(), idto);\r\n request.setId(f);\r\n\r\n service.addRequest(request);\r\n showMessage(Alert.AlertType.CONFIRMATION,\"Request sent!\",\"Request is now pending!\");\r\n\r\n textFieldTo.clear();\r\n\r\n\r\n }catch(NumberFormatException exception){\r\n showMessage(Alert.AlertType.ERROR,\"Error\",exception.toString());\r\n }catch (ServiceException exception){\r\n showMessage(Alert.AlertType.ERROR,\"Error\",exception.toString());\r\n }\r\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSendEmailFrame f = new SendEmailFrame();\r\n\t\t\t\tf.setVisible(true);\r\n\t\t\t}",
"private void setSendDataButton() {\n\t\tsetDataInDB();\n\t\tif (!alreadyPushed)\n\t\t\tsendDataToServer();\n\t\treturnOnWorkoutList();\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource()==sendButton){\n\t\t\tif(!inputField.getText().trim().isEmpty()){\n\t\t\t\ttry{\n\t\t\t\t\tclient.sendRequest(inputField.getText().trim());\n\t\t\t\t}catch(Exception ee){\n\t\t\t\t\tee.printStackTrace();\n\t\t\t\t}\n\t\t\t\toutputArea.append(client.getResponse()+\"\\n\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tJOptionPane.showConfirmDialog(this, \"输入不能为空!\");\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tinputField.setText(\"\");\n\t\t\toutputArea.setText(\"\");\n\t\t}\n\t}",
"private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed\r\n sendMessage(jTextField1.getText());\r\n }",
"public void onSendMessage(View view) {\n // get the EditText view of the layout with the id: message\n EditText messageView = (EditText) findViewById(R.id.message);\n // get the text added by the user in the EditText\n String messageText = messageView.getText().toString();\n // Create a new Intent with an action of SEND\n Intent intent = new Intent(Intent.ACTION_SEND);\n // set the MIME type for the Intent\n intent.setType(\"text/plain\");\n // Add to the Intent the text from the EditText view\n intent.putExtra(Intent.EXTRA_TEXT, messageText);\n // get the text form a string resource\n String chooserTitle = getString(R.string.chooser);\n // wrap the Intent in a chooser so Android always ask for with app to choose\n Intent chosenIntent = Intent.createChooser(intent, chooserTitle);\n // Start the activity of whatever app is available\n startActivity(chosenIntent);\n }",
"private JButton initializeSendButton() {\r\n\t\tJButton sendButton = new JButton(\"Send\");\r\n\t\tsendButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// send message which taken from text field.\r\n\t\t\t\ttry {\r\n\t\t\t\t\tnotifyMessageFromUI();\r\n\t\t\t\t\tchatArea.append(messageField.getText() + \"\\n\");\r\n\t\t\t\t\tmessageField.setText(\"\");\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn sendButton;\r\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsendSmsNew(phoneNum);\r\n\t\t\t\tsetTextSend();\r\n\t\t\t}",
"@Override\n\tpublic void sendMessage() {\n\t\t\n\t}",
"@Override\n public void onClick(View view) {\n\n runOnUiThread(\n new Runnable() {\n @Override\n public void run() {\n MainActivity\n .this\n .connectionManager.getTo().println(\n MainActivity\n .this\n .send_text.getText().toString()\n );\n }\n }\n );\n\n }",
"@Override\n public void onClick(View view) {\n intent.putExtra(SEND_KEY,sendText.getText().toString());\n\n //Start next Activity/No data is passed back to this activity\n startActivity(intent);\n\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsendEmail();\n\t\t\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n chat.receiveMessage();\n }",
"@Override\n public void onClick(View view) {\n String msg = mSendView.getText().toString();\n currMessage = msg;\n mSendView.setText(\"\");\n sendMessage(msg);\n refresh();\n\n }",
"@FXML\n private void sendMessage(ActionEvent actionEvent) {\n String playerName = RiskMain.getInstance().getDomain().getPlayerName();\n System.out.println(messageInput.getText());\n String text = playerName + \": \" + messageInput.getText();\n if (RiskMain.getInstance().getDomain().isServer()) {\n this.serverInterface = RiskMain.getInstance().getDomain().getServer();\n this.serverInterface\n .sendMessageChat(RiskMain.getInstance().getDomain().getPlayerName(),\n messageInput.getText(), recipientList.getValue());\n } else {\n this.clientPlayerInterface = RiskMain.getInstance().getDomain().getClient();\n this.clientPlayerInterface.sendMessageChat(RiskMain.getInstance().getDomain().getPlayerName(),\n messageInput.getText(), recipientList.getValue());\n }\n }",
"public void sendMessage(View view) {\n\t\t// Do something in response to button\n\t\tIntent intent = new Intent(this, DisplayMessageActivity.class);\n\t\tstartActivity(intent);\n\n\t}",
"public void sendMessage(View view) {\n Intent intent = new Intent(this, DisplayMessageActivity.class);\n String message = \"You pressed the button!\";\n intent.putExtra(EXTRA_MESSAGE, message);\n startActivity(intent);\n\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n fenetre.getClient().envoyerMessage(getMessage(), optionEnvoi); // Envoie du message\n saisieMessage.setText(\"\"); // On supprime le texte de la saisie message\n }",
"public void sendMsg(){\r\n\t\tsuper.getPPMsg(send);\r\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tif (!Window.Linksign) {\n\t\t\tif (BeganSign == 0) {\n\t\t\t\tBeganSign = 1;\n\t\t\t\taccept.append(\"已准备\\n\");\n\t\t\t\tWindow.f3listener.F3();\n\t\t\t\tbattleSend.Mistake = 0;\n\t\t\t} else {\n\t\t\t\tBeganSign = 0;\n\t\t\t\taccept.append(\"取消准备\\n\");\n\t\t\t\tsendText.setText(\"\");\n\t\t\t\tsendText.setEditable(false);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tout = new DataOutputStream(client.socket.getOutputStream());\n\t\t\t\tString message = \"%\" + BeganSign + \"%\" + sendText.getText()\n\t\t\t\t\t\t+ \"%\" + RegexText.duan1 + \"#\" + Window.wenben.getText()\n\t\t\t\t\t\t+ \"%0\" + \"%\" + Login.zhanghao.getText();\n\t\t\t\tQQZaiwenListener.wenbenstr = Window.wenben.getText();\n\t\t\t\tout.writeUTF(message);// 向服务器发送信息\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} else {\n\t\t\taccept.append(\"请先加入一个房间\\n\");\n\t\t}\n\t}",
"public void ClickSendApplicationButton()\n {\n\n new WebDriverWait(driver, 30).until(ExpectedConditions.visibilityOf(SendApplicationButton)).click();\n\n }",
"void sendMessage() {\n\n\t}",
"@Override\n\t public void onClick(View v) {\n\t \t SendReqToPebble();\n\t }",
"public void sendButtonClick(View v){\n String title = getText(R.string.mail_title).toString();\n String mailto = \"mailto:\" + emailAdress;\n Intent openEmailApp = new Intent(Intent.ACTION_SENDTO);\n openEmailApp.setType(\"plain/text\");\n openEmailApp.setData(Uri.parse(mailto));\n openEmailApp.putExtra(Intent.EXTRA_SUBJECT, userName + title);\n openEmailApp.putExtra(Intent.EXTRA_TEXT, evaluationMessage);\n startActivity(openEmailApp);\n }",
"@Override\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tsendmes(e.getActionCommand());\r\n\t\t\t\t\t\tusertext.setText(\"\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\r\n\t\t\t\t\tnotifyMessageFromUI();\r\n\t\t\t\t\tchatArea.append(messageField.getText() + \"\\n\");\r\n\t\t\t\t\tmessageField.setText(\"\");\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}",
"@Override\n public void send() {\n System.out.println(\"send message by SMS\");\n }",
"@Override\n public void actionPerformed(ActionEvent e){\n JButton button;\n int message;\n \n disconnectListeners();\n\n if(gameOver == true)\n return;\n\n button = (JButton)e.getSource();\n message = Integer.parseInt(button.getName());\n myClient.sendMessage(message);\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\ttry {\n\t\t\t\t\tString body = etBody.getText().toString();\n\t\t\t\t\tTApplicatioin.multiUserChat.sendMessage(body);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t}\n\t\t\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n client.sendMessage(new QuestionAnsweredMessage(answerField.getText()));\n //mainGUI.showMainPanel();\n }",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == jb)// 发送消息\r\n\t\t{\r\n\t\t\tMessage m = new Message();\r\n\t\t\tm.setMesType(\"20\");// MessageType.message_comm_mes\r\n\t\t\tm.setSender(this.ownerId);\r\n\t\t\tm.setGetter(\"\");\r\n\t\t\tm.setCon(jtf.getText());\r\n\t\t\tthis.jta.append(\"我说:\" + jtf.getText() + \"\\r\\n\");\r\n\t\t\ttry {\r\n\t\t\t\tObjectOutputStream oos = new ObjectOutputStream(\r\n\t\t\t\t\t\tManageClientConServerThread\r\n\t\t\t\t\t\t\t\t.getClientConServerThread(ownerId).getS()\r\n\t\t\t\t\t\t\t\t.getOutputStream());\r\n\t\t\t\toos.writeObject(m);\r\n\t\t\t} catch (Exception e1) {\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\ttry {\n\t\t\t\ttextfield.setEditable(false);\n\t\t\t\tconnectButton.setEnabled(false); // username can be sent only once\n\t\t\t\tclient.sendUsername(textfield.getText()); //sends the username to the server\n\t\t\t}catch(Exception a){\n\t\t\t\ta.printStackTrace();\n\t\t\t}\n\t\t}",
"@FXML\n public void sendAmessage(ActionEvent event) throws SQLException{\n DBConnect db = DBConnect.getInstance();\n db.sendMessage(message.getText(), selectedCustomer.getChat_id());\n message.setText(\"\");\n updateChat();\n }",
"private void sendCustomBothActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sendCustomBothActionPerformed\n // TODO add your handling code here:\n String custom = customMessageField.getText();\n Msg.send(\"Clicked custom both - message: \" + custom);\n sendCustomMessage(custom, \"A\");\n }",
"public void sendLog() {\n\t\tcommon.waitFor(5000);\n\t\tcommon.isElementDiplayed(sendButton);\n\t\tsendButton.click();\n\t\tcommon.isElementDiplayed(sucessMessage);\n\t\tsendButton.click();\n\n\t}",
"private void sendMessage(JTextField text){\n \t\tString message = text.getText();\n \t\tfor(int i = 0; i < listeners.size(); i++)\n \t\t{\n \t\t\tboolean b = listeners.get(i).sendMessage(userName, message);\n \t\t\tif(b == false)\n \t\t\t\tSystem.out.println(\"Error, could not send\");\n \t\t}\n \t\t\n \t\ttext.setText(\"\");\n \t}",
"public void clickButton(View v) {\n\n // Get the text we want to send.\n EditText et = (EditText) findViewById(R.id.editText);\n String msg = et.getText().toString();\n\n // Then, we start the call.\n PostMessageSpec myCallSpec = new PostMessageSpec();\n\n\n myCallSpec.url = SERVER_URL_PREFIX + \"post_msg.json\";\n myCallSpec.context = ChatActivity.this;\n // Let's add the parameters.\n HashMap<String,String> m = new HashMap<String,String>();\n m.put(\"app_id\", MY_APP_ID);\n m.put(\"msg\", msg);\n myCallSpec.setParams(m);\n\n startSpinner();\n\n // Actual server call.\n if (uploader != null) {\n // There was already an upload in progress.\n uploader.cancel(true);\n }\n uploader = new ServerCall();\n //startSpinner();\n uploader.execute(myCallSpec);\n }",
"@Override\r\n public void onClick(View v) {\n String msg = ed_msg.getText().toString();\r\n try {\r\n\t\t\t\t\tsend(HOST, PORT, msg.getBytes());\r\n\t\t\t\t\t\r\n\t \tmHandler.sendMessage(mHandler.obtainMessage()); \r\n\t \tcontent =HOST +\":\"+ msg +\"\\n\";\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n }",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\tclient.sendMessage(txtUserInput.getText().trim());\r\n\t\t\t\ttxtUserInput.setText(\"\");\r\n\t\t\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(EmailSender.fr.getText().equals(\"\"))\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(EmailSender.ES,\"Please Enter A Valid Email Address To Send From!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(EmailSender.t.getText().equals(\"\"))\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(EmailSender.ES, \"Please Enter A Valid Email Address To Send To!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(EmailSender.subj.getText().contentEquals(\"\"))\r\n\t\t{\r\n\t\t\tint b = JOptionPane.showConfirmDialog(EmailSender.ES, \"Are you sure you want to send this without a subject?\");\r\n\t\t\t\r\n\t\t\tif(b==0)\r\n\t\t\t\tJOptionPane.showMessageDialog(EmailSender.ES, \"Email Sent\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tint a = JOptionPane.showConfirmDialog(EmailSender.ES, \"Are you sure you want to send?\");\r\n\t\tif(a==0)// If yes button is pressed a is 0\r\n\t\tJOptionPane.showMessageDialog(EmailSender.ES, \"Email Sent\");\r\n\t\t\r\n\t\t\r\n\t}",
"private void sendTextInBox() {\n\t\tmodelAdapter.send(textFieldMessage.getText());\n\t textFieldMessage.setText(\"\");\n\t }",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\tclient.sendMessage(txtUserInput.getText().trim()+\".\");\r\n\t\t\t\ttxtUserInput.setText(\"\");\r\n\t\t\t}",
"@Override\n\tpublic void send() {\n\t\tSystem.out.println(\"this is send\");\n\t}",
"@Override\n\tpublic void onClick(View v) {\n\t\tif(v.getId() == R.id.bSend){\n\t\t\tif(text.getText().toString()!=null){\n\t\t\t\tmsg = text.getText().toString();\n\t\t\t\tchat.append(user+\": \"+msg+\"\\n\");\n\t\t\t\tmyGame.sendPrivateChat(challenged, msg);\n\t\t\t\ttext.setText(\"\");\n\t\t\t}else{\n\t\t\t\tToast.makeText(ChatActivity.this, \"Pls Enter Text\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t//\t}else if(v.getId()==R.id){\n\t\t\t\n\t\t}\n\t}",
"private void sendSignal(){\n\t\tSystem.out.println(inputLine + \"test\");\n\t\tMessageContent messageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_RANDOM);\n\t\tif(inputLine.equals(Constants.BUTTON_1_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_BEDROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_1_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_BEDROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_2_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_KITCHEN, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_2_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_KITCHEN, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_3_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_LIVINGROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_3_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_LIVINGROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_4_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_RANDOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_4_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_RANDOM, \"0\");\n\t\t\tSystem.out.println(\"oh yeah\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_5_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.SHUTTER, Constants.PLACE_LIVINGROOM);\n\t\t}else if(inputLine.equals(Constants.BUTTON_5_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.SHUTTER, Constants.PLACE_LIVINGROOM);\n\t\t}\n\t\t\t\t\n\t\tString json = messageContent.toJSON();\n\t\tDFAgentDescription template = new DFAgentDescription();\n ServiceDescription sd = new ServiceDescription();\n if (inputLine.equals(Constants.BUTTON_5_ON) || inputLine.equals(Constants.BUTTON_5_OFF)) {\n\t\tsd.setType(Constants.SHUTTER);\n\t\tsd.setName(Constants.PLACE_LIVINGROOM);\n } else {\n\t\tsd.setType(Constants.AUTO_SWITCH);\n\t\tsd.setName(Constants.AUTO_SWITCH_AGENT);\n }\n template.addServices(sd);\n try {\n DFAgentDescription[] result = DFService.search(myAgent, template);\n if (result.length > 0) {\n ACLMessage request = new ACLMessage(ACLMessage.REQUEST);\n if (inputLine.equals(Constants.BUTTON_5_ON) || inputLine.equals(Constants.BUTTON_5_OFF)) {\n\t\t\t\trequest.setPerformative(ACLMessage.INFORM);\n }\n for (DFAgentDescription receiver : result) {\n if (!receiver.getName().equals(myAgent.getAID())) {\n request.addReceiver(receiver.getName());\n \n }\n }\n request.setContent(json);\n myAgent.send(request);\n }\n } catch(FIPAException fe) {\n fe.printStackTrace();\n }\n\n\n\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tEnviarMailVisMed mail = new EnviarMailVisMed();\r\n\t\t\t\tmail.setVisible(true);\r\n\t\t\t}",
"void messageSent();",
"protected javax.swing.JButton getJButtonSend() {\n\t\tif(jButton == null) {\n\t\t\tjButton = new javax.swing.JButton();\n\t\t\tjButton.setPreferredSize(new java.awt.Dimension(85,25));\n\t\t\tjButton.setText(\"Send\");\n\t\t\tjButton.setName(\"Send\");\n\t\t\tjButton.setMnemonic(java.awt.event.KeyEvent.VK_S);\n\t\t\t\n\t\t\tjButton.setToolTipText(\"Send the play list file and save it locally\");\n\n\t\t\tjButton.addActionListener(new java.awt.event.ActionListener() { \n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\t\n\t\t\t\t\tString msg = getInvalidMsg();\n\t\t\t\t\tif( msg != null ) {\t\t\t\t\t\t\t\n\t\t\t\t\t\tJOptionPane.showMessageDialog(PlayListDialog.this,\n\t\t\t\t\t\t\tmsg,\n\t\t\t\t\t\t\t\"Invalid Input\", JOptionPane.OK_OPTION);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\twriteToPropFile( LMMUtils.PLAYER_FILE );\n\t\n\t\t\t\t\t\t\tsendFileMsg();\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch( IOException ioe ) {\n\t\t\t\t\t\t\tLMMLogger.error( \"Unable to write & send play list file\", ioe );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tdispose();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn jButton;\n\t}",
"@Override\n public void onClick(View v) {\n \n switch (v.getId()) {\n case R.id.sendBtn:\n //Log.d(\"XXX\", \"SEND BTN\");\n if (validateFields() == false) {\n // mostro avviso errore\n CharSequence text = \"Per favore completa i campi richiesti correttamente\";\n Toast toast = Toast.makeText(getActivity(), text, Toast.LENGTH_SHORT);\n toast.show();\n }\n else {\n sendRequestToServer();\n }\n break;\n case R.id.surname:\n // Log.d(\"XXX\", \"COGNOME EDIT TEXT\");\n break;\n case R.id.email:\n break;\n case R.id.tel:\n break;\n default:\n break;\n }\n \n }",
"private void predefinedSendBlueActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_predefinedSendBlueActionPerformed\n // TODO add your handling code here:\n String commandString = \"\";\n String selectedMessage = (String) messages.getSelectedItem();\n String[] titleKey = selectedMessage.split(\"\\\\. \");\n System.out.println(selectedMessage);\n String lineTitle = titleKey[1].trim();\n System.out.println(\"Clicked - blue predef message: \" + lineTitle);\n for (int i = 0; i < lines.size(); i++) {\n String line = (String) lines.get(i);\n if (line.contains(lineTitle)) {\n String current = (String) lines.get(i);\n String[] parts = current.split(\";\");\n commandString = parts[2];\n }\n }\n String sendString = \"VB\" + commandString;\n \n sendRawMessage(sendString);\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n Message msg = new Message();\n msg.what = 1;\n add_address_handler.sendMessage(msg);\n }",
"public void sendMessage (View view)\r\n\t{\r\n\t\t// Respond to the button click\r\n\t\tIntent intent = new Intent(this, DisplayMessageActivity.class);\r\n\t\tEditText editText = (EditText) findViewById(R.id.edit_message);\r\n\t\tString message = editText.getText().toString();\r\n\t\tintent.putExtra(EXTRA_MESSAGE, message);\r\n\t\tstartActivity(intent);\r\n\t}",
"@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tIntent i = new Intent(Intent.ACTION_SEND);\r\n\r\n\t\t\t\t\t\ti.setType(\"message/rfc822\");\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * i.setClassName(\"com.google.android.gm\",\r\n\t\t\t\t\t\t * \"com.google.android.gm.ComposeActivityGmail\");\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\ti.putExtra(Intent.EXTRA_EMAIL,\r\n\t\t\t\t\t\t\t\tnew String[] { \"[email protected]\" });\r\n\r\n\t\t\t\t\t\tstartActivity(i);\r\n\r\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tIntent i = new Intent(Intent.ACTION_SEND);\r\n\r\n\t\t\t\t\t\ti.setType(\"message/rfc822\");\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * i.setClassName(\"com.google.android.gm\",\r\n\t\t\t\t\t\t * \"com.google.android.gm.ComposeActivityGmail\");\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\ti.putExtra(Intent.EXTRA_EMAIL,\r\n\t\t\t\t\t\t\t\tnew String[] { \"[email protected]\" });\r\n\r\n\t\t\t\t\t\tstartActivity(i);\r\n\r\n\t\t\t\t\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == bt1) {\n\t\t\ttry {\n\t\t\t\tString s = tfnhap.getText();\n\t\t\t\tsenddata = new byte[s.length()];\n\t\t\t\treceivedata = new byte[1024];\n\t\t\t\tsenddata = s.getBytes();\n\t\t\t\tDatagramPacket send = new DatagramPacket(senddata, senddata.length, inet, 8892);\n\t\t\t\tmoi.send(send);\n\t\t\t\tDatagramPacket receive = new DatagramPacket(receivedata, receivedata.length);\n\t\t\t\tmoi.receive(receive);\n\t\t\t\tString kq = new String(receive.getData());\n\t\t\t\ttfkq.setText(kq);\n\n\t\t\t} catch (UnknownHostException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t} catch (IOException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t}\n\t\tif (e.getSource() == bt2)\n\t\t\tSystem.exit(0);\n\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSendEmailManager mng = new SendEmailManager(course, section);\r\n\t\t\t\ttry {\r\n\t\t\t\tfor (Student student : StudentArray) {\r\n\t\t\t\t\tif(mng.sendFromGMail(student.getEmail(), student.getName(), student.getCode(), student.getGrade())) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tthrow new SendFailedException(\"send failed\");\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}\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Send Successed\");\r\n\t\t\t\t}catch(SendFailedException ex) {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Error\");\r\n\t\t\t\t}\r\n\t\t\t}",
"public void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tif (e.getActionCommand().equals(\"Envoyer un mail au support\")) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tHistorique.ecrire(\"Ouverture de : \"+e);\r\n\t\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tnew FEN_SendMail();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}",
"public void send() {\n\t}",
"public void addSendButtonListener(ActionListener actionListener) {\r\n sendButton.addActionListener(actionListener);\r\n }",
"public void handleSendPane(MouseEvent event){\n sentValid.setVisible(false);\n sentInvalid.setVisible(false);\n }",
"public void sendMessage(View buttonView)\n {\n state = 0;\n Intent intent = new Intent(this, DisplayMessageActivity.class);\n EditText editText = (EditText) findViewById(R.id.Message);\n EditText editTextPhoneNumber = (EditText) findViewById(R.id.Phone);\n String message = editText.getText().toString();\n String phoneNumberMessage = editTextPhoneNumber.getText().toString();\n intent.putExtra(EXTRA_MESSAGE, message);\n intent.putExtra(EXTRA_PHONEMESSAGE, phoneNumberMessage);\n startActivity(intent);\n }",
"@Override\n public void onClick(View v) {\n sendMessage(phone_from_intent);\n }",
"@Override\r\n\tpublic void onClick() {\n\t\tif(bSendStatus)\r\n\t\t\tnativeadstatus(E_ONCLICK);\r\n\t}",
"@Override\r\n\t\t\tpublic void onClick(DialogInterface dialog, int which)\r\n\t\t\t{\n\t\t\t\tif (!internetConnection)\r\n\t\t\t\t{\r\n\t\t\t\t\tshowNoConnectionDialog();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\t\r\n\t\t\t\t\r\n\t\t\t\t// Get phoneId to attend in message\r\n\t\t\t TelephonyManager telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);\r\n\t\t\t\tString phoneId = telephonyManager.getDeviceId(); \r\n\t\t\t \r\n\t\t\t\t// Send mail without blocking the GUI\r\n\t\t\t\tif (dataModel == null)\r\n\t\t\t\t{\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tSendEmail sendEmail = new SendEmail(\"[email protected]\", \r\n\t\t\t \t\t\t\t\t\t\t\t\t\"AskMeAgain\", \r\n\t\t\t \t\t\t\t\t\t\t\t\tdataModel.getRecipientMail(),\r\n\t\t\t \t\t\t\t\t\t\t\t\tgetResources().getString(R.string.fogot_id_mail_subject),\r\n\t\t\t \t\t\t\t\t\t\t\t\tgetResources().getString(R.string.fogot_id_mail_text) + \" \" + phoneId + \".\");\r\n\t\t\t sendEmail.execute();\r\n\t\t\t}",
"public void actionPerformed(ActionEvent event)\n {\n if (player == 1)\n {\n record.append(\"Red: \" + dialog.getText() + \"\\n\");// Update the input to\n // the text area\n }\n else\n {\n record.append(\"Yellow: \" + dialog.getText() + \"\\n\");// Update the input\n // to the text area\n }\n theClientChat.sendString(dialog.getText());// Send the message\n dialog.setText(\"\");// Clear the text field\n }",
"private void predefiniedSendBothActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_predefiniedSendBothActionPerformed\n // TODO add your handling code here:\n String commandString = \"\";\n String selectedMessage = (String) messages.getSelectedItem();\n System.out.println(\"Message Key: \" + selectedMessage);\n String[] titleKey = selectedMessage.split(\"\\\\. \");\n// for (int i = 0; i < titleKey.length; i++) {\n// System.out.println(\"TK \" + i + \": \" + titleKey[i]);\n// }\n String lineTitle = titleKey[1].trim();\n Msg.send(\"Clicked - send both predef message: \" + lineTitle);\n for (int i = 0; i < lines.size(); i++) {\n String line = (String) lines.get(i);\n if (line.contains(lineTitle)) {\n String current = (String) lines.get(i);\n String[] parts = current.split(\";\");\n commandString = parts[2];\n }\n }\n String sendString = \"VA\" + commandString;\n \n sendRawMessage(sendString);\n }",
"public void enableDisableSendButton() {\r\n sendButton.setEnabled(topModel.isSendButtonEnabled());\r\n }",
"private void jTextFieldTelefoneActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"@Override // com.zhihu.android.app.p1311ui.fragment.BaseFragment, com.zhihu.android.app.p1311ui.fragment.webview.WebViewFragment2\n public String onSendView() {\n return C6969H.m41409d(\"G6F82DE1FAA22A773A9419158E2F3CAD27ECCC313AF7FBC20E209955CE1\");\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent event) {\n\t\t\t\tsendData(event.getActionCommand());//调用sendData方法,响应操作。\t将信息发送给客户\r\n\t\t\t\tenterField.setText(\"\"); //将输入区域置空\r\n\t\t\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n client.sendMessage(new BuzzInMessage(teamIndex));\n }"
]
| [
"0.7488463",
"0.7416849",
"0.7141074",
"0.7078817",
"0.70701325",
"0.7015546",
"0.7006025",
"0.6993535",
"0.6948314",
"0.69355965",
"0.6912939",
"0.6866673",
"0.6845752",
"0.6832665",
"0.6830186",
"0.68095857",
"0.6754457",
"0.6753401",
"0.6706521",
"0.6658458",
"0.6624695",
"0.6619471",
"0.66099215",
"0.6608636",
"0.65588963",
"0.6556688",
"0.6546282",
"0.6507188",
"0.65067875",
"0.64818287",
"0.64713275",
"0.64689475",
"0.6468658",
"0.64652324",
"0.6464441",
"0.64455956",
"0.64370304",
"0.6436177",
"0.64263695",
"0.6419663",
"0.64168715",
"0.6414386",
"0.63983136",
"0.63952416",
"0.63814455",
"0.63681847",
"0.6366148",
"0.6360659",
"0.6354958",
"0.6322092",
"0.63022566",
"0.62976986",
"0.629094",
"0.6280392",
"0.62553394",
"0.62553024",
"0.6254272",
"0.625259",
"0.6249477",
"0.6247775",
"0.62476474",
"0.62461525",
"0.62432325",
"0.6240138",
"0.6231157",
"0.6223573",
"0.62193197",
"0.621773",
"0.6209123",
"0.6205453",
"0.6200584",
"0.6200166",
"0.6197224",
"0.618411",
"0.61720383",
"0.61714596",
"0.61674345",
"0.6159957",
"0.6159812",
"0.61585665",
"0.6154751",
"0.61458915",
"0.61454624",
"0.61454624",
"0.61417717",
"0.6140878",
"0.6138594",
"0.6132356",
"0.61257833",
"0.6124937",
"0.6120627",
"0.6120601",
"0.6114438",
"0.61086285",
"0.61085624",
"0.6095437",
"0.6093549",
"0.6090052",
"0.608978",
"0.60882497",
"0.6084879"
]
| 0.0 | -1 |
Fired when the user clicks on the sendButton. | public void onClick(ClickEvent event) {
// sendNameToServer();
Camera c = Camera.getCamera();
if (!Camera.isSupported()) {
GWT.log("Camera not supported!");
return;
}
c.getPictureFromCamera(new CameraCallback() {
public void onSuccess(String picture) {
GWT.log("picture=" + picture);
pictureDataHidden.setValue(picture);
image.setUrl("data:image/jpeg;base64," + picture);
}
public void onFailure(String error) {
GWT.log("getPictureFromCamera" + error);
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void handleSendButton(ActionEvent event) {\n\n messageController.setMessageSystem(this.message.getText(), this.toUsername.getText(),this.sender);\n if (messageController.sendMessage()){\n sentValid.setVisible(true);\n sentInvalid.setVisible(false);\n\n }\n else{\n sentInvalid.setVisible(true);\n sentValid.setVisible(false);\n\n }\n\n\n }",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\tSystem.out.println(\"Sent\");\n\t\t\t\t\t}",
"@Override\n public void onClick(View view) {\n send();\n }",
"private void sendButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sendButtonActionPerformed\n String str = requestCommand.getText();\n sC.sendCommand(str); \n requestCommand.requestFocus();\n }",
"public void updateSendButtonText() {\r\n sendButton.setText(topModel.getSendButtonText());\r\n }",
"private void b_sendActionPerformed(java.awt.event.ActionEvent evt) { \r\n\t\tString nothing = \"\";\r\n\t\tif ((b_sendText.getText()).equals(nothing)) {\r\n\t\t\tb_sendText.setText(\"\");\r\n\t\t\tb_sendText.requestFocus();\r\n\t\t}\r\n\t\telse {\r\n\t\t\ttry {\r\n\t\t\t\ttellEveryone(\"Server\" + \":\" + b_sendText.getText() + \":\" + \"Chat\");\r\n\t\t\t\tPrint_Writer.flush(); // flushes the buffer\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t}\r\n\t\t\tb_sendText.setText(\"\");\r\n\t\t\tb_sendText.requestFocus();\r\n\t\t}\r\n\r\n\t\tb_sendText.setText(\"\");\r\n\t\tb_sendText.requestFocus();\r\n\r\n\t}",
"@Override\n\tpublic void onMessagePlayCompleted() {\n\t\tbtnSend.setEnabled(true);\n\t}",
"public void sendClick(View view) {\n String message = input.getText().toString();\n uart.send(message);\n }",
"public void handleSendBtn(ActionEvent actionEvent) throws IOException {\n Socket socket = ConnSocket.getInstance();\n InputStream inputStream = socket.getInputStream();\n OutputStream outputStream = socket.getOutputStream();\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream, true);\n //String [] userInfo = {textField.getText(), nameLabel.getText()};\n out.println(textField.getText());\n\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}",
"@Then(\"^Click On Send Button$\")\r\n\tpublic void click_On_Send_Button() {\n\t\tnop.click(\"//*[@id=\\\"submitMessage\\\"]/span\"); \r\n\t \r\n\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\tString message= txtMessage.getText();\n\t\t\t\tsend(message);\n\t\t\t}",
"private void customSendBlueButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_customSendBlueButtonActionPerformed\n String custom = customMessageField.getText();\n Msg.send(\"Clicked - message: \" + custom);\n sendCustomMessage(custom, \"B\");\n }",
"public JButton getSend() {\n\t\treturn send;\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (btn1==e.getSource()) { //만약 버튼(btn1)클릭 시 동작\n\t\t\tto = tfphone.getText(); //텍스트필드(전화번호) 값가져와서 String to로 변형\n\t\t\ttext = tftext.getText(); //텍스트 필드(텍스트) 값자겨와서 String text로 변형 \n\t\t\t\t\t\t\t\t\t\t\t\t//문자전송(인자)가 String 이기때문에 String으로 변형해줘야함\n\t\t\tExampleSend ex = new ExampleSend(); //ExampleSend클래스 객체 생성\n\t\t\tex.문자전송(to, text);\n\t\t}\n\t\tif (btn2 == e.getSource()) {\n\t\t\ttfphone.setText(\"\");\n\t\t\ttftext.setText(\"\");\n\t\t}\n\t}",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tmConnectedThread.write(\"send\");\n\t\t\t\t\tmConnectedThread.writeFile();\n\t\t\t\t}",
"public void clickOnSendNotification() {\r\n\r\n\t\treportStep(\"About to click on Send Notification button \", \"INFO\");\r\n\r\n\t\tif(clickAfterWait(sendNotificationButton)) {\r\n\r\n\t\t\treportStep(\"Successfully clicked on the Send notification Button \", \"PASS\");\r\n\r\n\t\t}else {\r\n\r\n\t\t\treportStep(\"Failed to click onn the Send Notificationn Buttonn \", \"FAIL\");\r\n\t\t}\r\n\t}",
"public void sendMessage()\r\n {\r\n MessageScreen messageScreen = new MessageScreen(_lastMessageSent);\r\n pushScreen(messageScreen);\r\n }",
"public void actionPerformed( ActionEvent ae )\n {\n if( ae.getSource() == sendButton )\n \tprocessMail(message);\n }",
"public void handleSend() {\n model.sendMail();\n view.getChildren().clear();//it \"hides the display\" of the previous view\n }",
"private void customSendRedButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_customSendRedButtonActionPerformed\n String custom = customMessageField.getText();\n Msg.send(\"Clicked - message: \" + custom);\n sendCustomMessage(custom, \"R\");\n }",
"public void onClickSend(View view) {\n //String string = editText.getText().toString();\n //serialPort.write(string.getBytes());\n //tvAppend(txtResponse, \"\\nData Sent : \" + string + \"\\n\");\n }",
"private void send() {\n Toast.makeText(this, getString(R.string.message_sent, mBody, Contact.byId(mContactId).getName()),\n Toast.LENGTH_LONG).show();\n finish(); // back to DirectShareActivity\n }",
"@OnClick(R.id.enter_chat1)\n public void sendMessage() {\n if (getView() == null) {\n return;\n }\n EditText editText = getView().findViewById(R.id.chat_edit_text1);\n sendMessageBackend(editText.getText().toString(), utils.getChatUser());\n updateListAdapter();\n editText.setText(\"\");\n }",
"@Override\r\n public void onClick(View v)\r\n {\n if (\"\" != mSendOnBoardEdit.getText().toString()){\r\n DJIDrone.getDjiMainController().sendDataToExternalDevice(mSendOnBoardEdit.getText().toString().getBytes(),new DJIExecuteResultCallback(){\r\n\r\n @Override\r\n public void onResult(DJIError result)\r\n {\r\n // TODO Auto-generated method stub\r\n \r\n }\r\n \r\n });\r\n }\r\n }",
"@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tSendToServer(ph);\n\t\t\t\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString text = getCurUser() + \" : \" + textField.getText();\n\t\t\t\ttextField.setText(\"\");\n\t\t\t\tfinal ChatMessage msg = new ChatMessage();\n\t\t\t\tmsg.setMessage(text);\n\t\t\t\tmainFrame.sendMessage(msg);\n\t\t\t\t\n\t\t\t}",
"public boolean send() {\n\t\tif (!isValid())\n\t\t\treturn false;\n\t\tif (ActionBar.sendKey(getSlot()))\n\t\t\treturn true;\n\t\tWidgetChild main = SlotData.getMainChild(getSlot());\n\t\treturn WidgetUtil.visible(main) && EntityUtil.interact(false, main);\n\t}",
"@Step\n public void clickSendSMSButton(){\n actionWithWebElements.clickOnElement(sendSMSButton);\n }",
"public void onClickSend(View view) {\n String string = editText.getText().toString();\n serialPort.write(string.getBytes());\n tvAppend(textView, \"\\nData Sent : \" + string + \"\\n\");\n\n }",
"public void handleSend(ActionEvent actionEvent) {\r\n String to=textFieldTo.getText();\r\n try{\r\n Long idto = Long.parseLong(to);\r\n\r\n FriendshipRequest request = new FriendshipRequest();\r\n Tuple<Long,Long> f = new Tuple<>(user.getId(), idto);\r\n request.setId(f);\r\n\r\n service.addRequest(request);\r\n showMessage(Alert.AlertType.CONFIRMATION,\"Request sent!\",\"Request is now pending!\");\r\n\r\n textFieldTo.clear();\r\n\r\n\r\n }catch(NumberFormatException exception){\r\n showMessage(Alert.AlertType.ERROR,\"Error\",exception.toString());\r\n }catch (ServiceException exception){\r\n showMessage(Alert.AlertType.ERROR,\"Error\",exception.toString());\r\n }\r\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSendEmailFrame f = new SendEmailFrame();\r\n\t\t\t\tf.setVisible(true);\r\n\t\t\t}",
"private void setSendDataButton() {\n\t\tsetDataInDB();\n\t\tif (!alreadyPushed)\n\t\t\tsendDataToServer();\n\t\treturnOnWorkoutList();\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource()==sendButton){\n\t\t\tif(!inputField.getText().trim().isEmpty()){\n\t\t\t\ttry{\n\t\t\t\t\tclient.sendRequest(inputField.getText().trim());\n\t\t\t\t}catch(Exception ee){\n\t\t\t\t\tee.printStackTrace();\n\t\t\t\t}\n\t\t\t\toutputArea.append(client.getResponse()+\"\\n\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tJOptionPane.showConfirmDialog(this, \"输入不能为空!\");\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tinputField.setText(\"\");\n\t\t\toutputArea.setText(\"\");\n\t\t}\n\t}",
"private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed\r\n sendMessage(jTextField1.getText());\r\n }",
"public void onSendMessage(View view) {\n // get the EditText view of the layout with the id: message\n EditText messageView = (EditText) findViewById(R.id.message);\n // get the text added by the user in the EditText\n String messageText = messageView.getText().toString();\n // Create a new Intent with an action of SEND\n Intent intent = new Intent(Intent.ACTION_SEND);\n // set the MIME type for the Intent\n intent.setType(\"text/plain\");\n // Add to the Intent the text from the EditText view\n intent.putExtra(Intent.EXTRA_TEXT, messageText);\n // get the text form a string resource\n String chooserTitle = getString(R.string.chooser);\n // wrap the Intent in a chooser so Android always ask for with app to choose\n Intent chosenIntent = Intent.createChooser(intent, chooserTitle);\n // Start the activity of whatever app is available\n startActivity(chosenIntent);\n }",
"private JButton initializeSendButton() {\r\n\t\tJButton sendButton = new JButton(\"Send\");\r\n\t\tsendButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// send message which taken from text field.\r\n\t\t\t\ttry {\r\n\t\t\t\t\tnotifyMessageFromUI();\r\n\t\t\t\t\tchatArea.append(messageField.getText() + \"\\n\");\r\n\t\t\t\t\tmessageField.setText(\"\");\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn sendButton;\r\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsendSmsNew(phoneNum);\r\n\t\t\t\tsetTextSend();\r\n\t\t\t}",
"@Override\n\tpublic void sendMessage() {\n\t\t\n\t}",
"@Override\n public void onClick(View view) {\n\n runOnUiThread(\n new Runnable() {\n @Override\n public void run() {\n MainActivity\n .this\n .connectionManager.getTo().println(\n MainActivity\n .this\n .send_text.getText().toString()\n );\n }\n }\n );\n\n }",
"@Override\n public void onClick(View view) {\n intent.putExtra(SEND_KEY,sendText.getText().toString());\n\n //Start next Activity/No data is passed back to this activity\n startActivity(intent);\n\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsendEmail();\n\t\t\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n chat.receiveMessage();\n }",
"@Override\n public void onClick(View view) {\n String msg = mSendView.getText().toString();\n currMessage = msg;\n mSendView.setText(\"\");\n sendMessage(msg);\n refresh();\n\n }",
"@FXML\n private void sendMessage(ActionEvent actionEvent) {\n String playerName = RiskMain.getInstance().getDomain().getPlayerName();\n System.out.println(messageInput.getText());\n String text = playerName + \": \" + messageInput.getText();\n if (RiskMain.getInstance().getDomain().isServer()) {\n this.serverInterface = RiskMain.getInstance().getDomain().getServer();\n this.serverInterface\n .sendMessageChat(RiskMain.getInstance().getDomain().getPlayerName(),\n messageInput.getText(), recipientList.getValue());\n } else {\n this.clientPlayerInterface = RiskMain.getInstance().getDomain().getClient();\n this.clientPlayerInterface.sendMessageChat(RiskMain.getInstance().getDomain().getPlayerName(),\n messageInput.getText(), recipientList.getValue());\n }\n }",
"public void sendMessage(View view) {\n\t\t// Do something in response to button\n\t\tIntent intent = new Intent(this, DisplayMessageActivity.class);\n\t\tstartActivity(intent);\n\n\t}",
"public void sendMessage(View view) {\n Intent intent = new Intent(this, DisplayMessageActivity.class);\n String message = \"You pressed the button!\";\n intent.putExtra(EXTRA_MESSAGE, message);\n startActivity(intent);\n\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n fenetre.getClient().envoyerMessage(getMessage(), optionEnvoi); // Envoie du message\n saisieMessage.setText(\"\"); // On supprime le texte de la saisie message\n }",
"public void sendMsg(){\r\n\t\tsuper.getPPMsg(send);\r\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tif (!Window.Linksign) {\n\t\t\tif (BeganSign == 0) {\n\t\t\t\tBeganSign = 1;\n\t\t\t\taccept.append(\"已准备\\n\");\n\t\t\t\tWindow.f3listener.F3();\n\t\t\t\tbattleSend.Mistake = 0;\n\t\t\t} else {\n\t\t\t\tBeganSign = 0;\n\t\t\t\taccept.append(\"取消准备\\n\");\n\t\t\t\tsendText.setText(\"\");\n\t\t\t\tsendText.setEditable(false);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tout = new DataOutputStream(client.socket.getOutputStream());\n\t\t\t\tString message = \"%\" + BeganSign + \"%\" + sendText.getText()\n\t\t\t\t\t\t+ \"%\" + RegexText.duan1 + \"#\" + Window.wenben.getText()\n\t\t\t\t\t\t+ \"%0\" + \"%\" + Login.zhanghao.getText();\n\t\t\t\tQQZaiwenListener.wenbenstr = Window.wenben.getText();\n\t\t\t\tout.writeUTF(message);// 向服务器发送信息\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} else {\n\t\t\taccept.append(\"请先加入一个房间\\n\");\n\t\t}\n\t}",
"public void ClickSendApplicationButton()\n {\n\n new WebDriverWait(driver, 30).until(ExpectedConditions.visibilityOf(SendApplicationButton)).click();\n\n }",
"void sendMessage() {\n\n\t}",
"@Override\n\t public void onClick(View v) {\n\t \t SendReqToPebble();\n\t }",
"public void sendButtonClick(View v){\n String title = getText(R.string.mail_title).toString();\n String mailto = \"mailto:\" + emailAdress;\n Intent openEmailApp = new Intent(Intent.ACTION_SENDTO);\n openEmailApp.setType(\"plain/text\");\n openEmailApp.setData(Uri.parse(mailto));\n openEmailApp.putExtra(Intent.EXTRA_SUBJECT, userName + title);\n openEmailApp.putExtra(Intent.EXTRA_TEXT, evaluationMessage);\n startActivity(openEmailApp);\n }",
"@Override\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tsendmes(e.getActionCommand());\r\n\t\t\t\t\t\tusertext.setText(\"\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\r\n\t\t\t\t\tnotifyMessageFromUI();\r\n\t\t\t\t\tchatArea.append(messageField.getText() + \"\\n\");\r\n\t\t\t\t\tmessageField.setText(\"\");\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}",
"@Override\n public void send() {\n System.out.println(\"send message by SMS\");\n }",
"@Override\n public void actionPerformed(ActionEvent e){\n JButton button;\n int message;\n \n disconnectListeners();\n\n if(gameOver == true)\n return;\n\n button = (JButton)e.getSource();\n message = Integer.parseInt(button.getName());\n myClient.sendMessage(message);\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\ttry {\n\t\t\t\t\tString body = etBody.getText().toString();\n\t\t\t\t\tTApplicatioin.multiUserChat.sendMessage(body);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t}\n\t\t\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n client.sendMessage(new QuestionAnsweredMessage(answerField.getText()));\n //mainGUI.showMainPanel();\n }",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == jb)// 发送消息\r\n\t\t{\r\n\t\t\tMessage m = new Message();\r\n\t\t\tm.setMesType(\"20\");// MessageType.message_comm_mes\r\n\t\t\tm.setSender(this.ownerId);\r\n\t\t\tm.setGetter(\"\");\r\n\t\t\tm.setCon(jtf.getText());\r\n\t\t\tthis.jta.append(\"我说:\" + jtf.getText() + \"\\r\\n\");\r\n\t\t\ttry {\r\n\t\t\t\tObjectOutputStream oos = new ObjectOutputStream(\r\n\t\t\t\t\t\tManageClientConServerThread\r\n\t\t\t\t\t\t\t\t.getClientConServerThread(ownerId).getS()\r\n\t\t\t\t\t\t\t\t.getOutputStream());\r\n\t\t\t\toos.writeObject(m);\r\n\t\t\t} catch (Exception e1) {\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\ttry {\n\t\t\t\ttextfield.setEditable(false);\n\t\t\t\tconnectButton.setEnabled(false); // username can be sent only once\n\t\t\t\tclient.sendUsername(textfield.getText()); //sends the username to the server\n\t\t\t}catch(Exception a){\n\t\t\t\ta.printStackTrace();\n\t\t\t}\n\t\t}",
"@FXML\n public void sendAmessage(ActionEvent event) throws SQLException{\n DBConnect db = DBConnect.getInstance();\n db.sendMessage(message.getText(), selectedCustomer.getChat_id());\n message.setText(\"\");\n updateChat();\n }",
"private void sendCustomBothActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sendCustomBothActionPerformed\n // TODO add your handling code here:\n String custom = customMessageField.getText();\n Msg.send(\"Clicked custom both - message: \" + custom);\n sendCustomMessage(custom, \"A\");\n }",
"public void sendLog() {\n\t\tcommon.waitFor(5000);\n\t\tcommon.isElementDiplayed(sendButton);\n\t\tsendButton.click();\n\t\tcommon.isElementDiplayed(sucessMessage);\n\t\tsendButton.click();\n\n\t}",
"private void sendMessage(JTextField text){\n \t\tString message = text.getText();\n \t\tfor(int i = 0; i < listeners.size(); i++)\n \t\t{\n \t\t\tboolean b = listeners.get(i).sendMessage(userName, message);\n \t\t\tif(b == false)\n \t\t\t\tSystem.out.println(\"Error, could not send\");\n \t\t}\n \t\t\n \t\ttext.setText(\"\");\n \t}",
"public void clickButton(View v) {\n\n // Get the text we want to send.\n EditText et = (EditText) findViewById(R.id.editText);\n String msg = et.getText().toString();\n\n // Then, we start the call.\n PostMessageSpec myCallSpec = new PostMessageSpec();\n\n\n myCallSpec.url = SERVER_URL_PREFIX + \"post_msg.json\";\n myCallSpec.context = ChatActivity.this;\n // Let's add the parameters.\n HashMap<String,String> m = new HashMap<String,String>();\n m.put(\"app_id\", MY_APP_ID);\n m.put(\"msg\", msg);\n myCallSpec.setParams(m);\n\n startSpinner();\n\n // Actual server call.\n if (uploader != null) {\n // There was already an upload in progress.\n uploader.cancel(true);\n }\n uploader = new ServerCall();\n //startSpinner();\n uploader.execute(myCallSpec);\n }",
"@Override\r\n public void onClick(View v) {\n String msg = ed_msg.getText().toString();\r\n try {\r\n\t\t\t\t\tsend(HOST, PORT, msg.getBytes());\r\n\t\t\t\t\t\r\n\t \tmHandler.sendMessage(mHandler.obtainMessage()); \r\n\t \tcontent =HOST +\":\"+ msg +\"\\n\";\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n }",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\tclient.sendMessage(txtUserInput.getText().trim());\r\n\t\t\t\ttxtUserInput.setText(\"\");\r\n\t\t\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(EmailSender.fr.getText().equals(\"\"))\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(EmailSender.ES,\"Please Enter A Valid Email Address To Send From!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(EmailSender.t.getText().equals(\"\"))\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(EmailSender.ES, \"Please Enter A Valid Email Address To Send To!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(EmailSender.subj.getText().contentEquals(\"\"))\r\n\t\t{\r\n\t\t\tint b = JOptionPane.showConfirmDialog(EmailSender.ES, \"Are you sure you want to send this without a subject?\");\r\n\t\t\t\r\n\t\t\tif(b==0)\r\n\t\t\t\tJOptionPane.showMessageDialog(EmailSender.ES, \"Email Sent\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tint a = JOptionPane.showConfirmDialog(EmailSender.ES, \"Are you sure you want to send?\");\r\n\t\tif(a==0)// If yes button is pressed a is 0\r\n\t\tJOptionPane.showMessageDialog(EmailSender.ES, \"Email Sent\");\r\n\t\t\r\n\t\t\r\n\t}",
"private void sendTextInBox() {\n\t\tmodelAdapter.send(textFieldMessage.getText());\n\t textFieldMessage.setText(\"\");\n\t }",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\tclient.sendMessage(txtUserInput.getText().trim()+\".\");\r\n\t\t\t\ttxtUserInput.setText(\"\");\r\n\t\t\t}",
"@Override\n\tpublic void send() {\n\t\tSystem.out.println(\"this is send\");\n\t}",
"@Override\n\tpublic void onClick(View v) {\n\t\tif(v.getId() == R.id.bSend){\n\t\t\tif(text.getText().toString()!=null){\n\t\t\t\tmsg = text.getText().toString();\n\t\t\t\tchat.append(user+\": \"+msg+\"\\n\");\n\t\t\t\tmyGame.sendPrivateChat(challenged, msg);\n\t\t\t\ttext.setText(\"\");\n\t\t\t}else{\n\t\t\t\tToast.makeText(ChatActivity.this, \"Pls Enter Text\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t//\t}else if(v.getId()==R.id){\n\t\t\t\n\t\t}\n\t}",
"private void sendSignal(){\n\t\tSystem.out.println(inputLine + \"test\");\n\t\tMessageContent messageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_RANDOM);\n\t\tif(inputLine.equals(Constants.BUTTON_1_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_BEDROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_1_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_BEDROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_2_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_KITCHEN, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_2_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_KITCHEN, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_3_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_LIVINGROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_3_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_LIVINGROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_4_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_RANDOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_4_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_RANDOM, \"0\");\n\t\t\tSystem.out.println(\"oh yeah\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_5_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.SHUTTER, Constants.PLACE_LIVINGROOM);\n\t\t}else if(inputLine.equals(Constants.BUTTON_5_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.SHUTTER, Constants.PLACE_LIVINGROOM);\n\t\t}\n\t\t\t\t\n\t\tString json = messageContent.toJSON();\n\t\tDFAgentDescription template = new DFAgentDescription();\n ServiceDescription sd = new ServiceDescription();\n if (inputLine.equals(Constants.BUTTON_5_ON) || inputLine.equals(Constants.BUTTON_5_OFF)) {\n\t\tsd.setType(Constants.SHUTTER);\n\t\tsd.setName(Constants.PLACE_LIVINGROOM);\n } else {\n\t\tsd.setType(Constants.AUTO_SWITCH);\n\t\tsd.setName(Constants.AUTO_SWITCH_AGENT);\n }\n template.addServices(sd);\n try {\n DFAgentDescription[] result = DFService.search(myAgent, template);\n if (result.length > 0) {\n ACLMessage request = new ACLMessage(ACLMessage.REQUEST);\n if (inputLine.equals(Constants.BUTTON_5_ON) || inputLine.equals(Constants.BUTTON_5_OFF)) {\n\t\t\t\trequest.setPerformative(ACLMessage.INFORM);\n }\n for (DFAgentDescription receiver : result) {\n if (!receiver.getName().equals(myAgent.getAID())) {\n request.addReceiver(receiver.getName());\n \n }\n }\n request.setContent(json);\n myAgent.send(request);\n }\n } catch(FIPAException fe) {\n fe.printStackTrace();\n }\n\n\n\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tEnviarMailVisMed mail = new EnviarMailVisMed();\r\n\t\t\t\tmail.setVisible(true);\r\n\t\t\t}",
"void messageSent();",
"protected javax.swing.JButton getJButtonSend() {\n\t\tif(jButton == null) {\n\t\t\tjButton = new javax.swing.JButton();\n\t\t\tjButton.setPreferredSize(new java.awt.Dimension(85,25));\n\t\t\tjButton.setText(\"Send\");\n\t\t\tjButton.setName(\"Send\");\n\t\t\tjButton.setMnemonic(java.awt.event.KeyEvent.VK_S);\n\t\t\t\n\t\t\tjButton.setToolTipText(\"Send the play list file and save it locally\");\n\n\t\t\tjButton.addActionListener(new java.awt.event.ActionListener() { \n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\t\n\t\t\t\t\tString msg = getInvalidMsg();\n\t\t\t\t\tif( msg != null ) {\t\t\t\t\t\t\t\n\t\t\t\t\t\tJOptionPane.showMessageDialog(PlayListDialog.this,\n\t\t\t\t\t\t\tmsg,\n\t\t\t\t\t\t\t\"Invalid Input\", JOptionPane.OK_OPTION);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\twriteToPropFile( LMMUtils.PLAYER_FILE );\n\t\n\t\t\t\t\t\t\tsendFileMsg();\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch( IOException ioe ) {\n\t\t\t\t\t\t\tLMMLogger.error( \"Unable to write & send play list file\", ioe );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tdispose();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn jButton;\n\t}",
"@Override\n public void onClick(View v) {\n \n switch (v.getId()) {\n case R.id.sendBtn:\n //Log.d(\"XXX\", \"SEND BTN\");\n if (validateFields() == false) {\n // mostro avviso errore\n CharSequence text = \"Per favore completa i campi richiesti correttamente\";\n Toast toast = Toast.makeText(getActivity(), text, Toast.LENGTH_SHORT);\n toast.show();\n }\n else {\n sendRequestToServer();\n }\n break;\n case R.id.surname:\n // Log.d(\"XXX\", \"COGNOME EDIT TEXT\");\n break;\n case R.id.email:\n break;\n case R.id.tel:\n break;\n default:\n break;\n }\n \n }",
"private void predefinedSendBlueActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_predefinedSendBlueActionPerformed\n // TODO add your handling code here:\n String commandString = \"\";\n String selectedMessage = (String) messages.getSelectedItem();\n String[] titleKey = selectedMessage.split(\"\\\\. \");\n System.out.println(selectedMessage);\n String lineTitle = titleKey[1].trim();\n System.out.println(\"Clicked - blue predef message: \" + lineTitle);\n for (int i = 0; i < lines.size(); i++) {\n String line = (String) lines.get(i);\n if (line.contains(lineTitle)) {\n String current = (String) lines.get(i);\n String[] parts = current.split(\";\");\n commandString = parts[2];\n }\n }\n String sendString = \"VB\" + commandString;\n \n sendRawMessage(sendString);\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n Message msg = new Message();\n msg.what = 1;\n add_address_handler.sendMessage(msg);\n }",
"public void sendMessage (View view)\r\n\t{\r\n\t\t// Respond to the button click\r\n\t\tIntent intent = new Intent(this, DisplayMessageActivity.class);\r\n\t\tEditText editText = (EditText) findViewById(R.id.edit_message);\r\n\t\tString message = editText.getText().toString();\r\n\t\tintent.putExtra(EXTRA_MESSAGE, message);\r\n\t\tstartActivity(intent);\r\n\t}",
"@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tIntent i = new Intent(Intent.ACTION_SEND);\r\n\r\n\t\t\t\t\t\ti.setType(\"message/rfc822\");\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * i.setClassName(\"com.google.android.gm\",\r\n\t\t\t\t\t\t * \"com.google.android.gm.ComposeActivityGmail\");\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\ti.putExtra(Intent.EXTRA_EMAIL,\r\n\t\t\t\t\t\t\t\tnew String[] { \"[email protected]\" });\r\n\r\n\t\t\t\t\t\tstartActivity(i);\r\n\r\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tIntent i = new Intent(Intent.ACTION_SEND);\r\n\r\n\t\t\t\t\t\ti.setType(\"message/rfc822\");\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * i.setClassName(\"com.google.android.gm\",\r\n\t\t\t\t\t\t * \"com.google.android.gm.ComposeActivityGmail\");\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\ti.putExtra(Intent.EXTRA_EMAIL,\r\n\t\t\t\t\t\t\t\tnew String[] { \"[email protected]\" });\r\n\r\n\t\t\t\t\t\tstartActivity(i);\r\n\r\n\t\t\t\t\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == bt1) {\n\t\t\ttry {\n\t\t\t\tString s = tfnhap.getText();\n\t\t\t\tsenddata = new byte[s.length()];\n\t\t\t\treceivedata = new byte[1024];\n\t\t\t\tsenddata = s.getBytes();\n\t\t\t\tDatagramPacket send = new DatagramPacket(senddata, senddata.length, inet, 8892);\n\t\t\t\tmoi.send(send);\n\t\t\t\tDatagramPacket receive = new DatagramPacket(receivedata, receivedata.length);\n\t\t\t\tmoi.receive(receive);\n\t\t\t\tString kq = new String(receive.getData());\n\t\t\t\ttfkq.setText(kq);\n\n\t\t\t} catch (UnknownHostException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t} catch (IOException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t}\n\t\tif (e.getSource() == bt2)\n\t\t\tSystem.exit(0);\n\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSendEmailManager mng = new SendEmailManager(course, section);\r\n\t\t\t\ttry {\r\n\t\t\t\tfor (Student student : StudentArray) {\r\n\t\t\t\t\tif(mng.sendFromGMail(student.getEmail(), student.getName(), student.getCode(), student.getGrade())) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tthrow new SendFailedException(\"send failed\");\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}\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Send Successed\");\r\n\t\t\t\t}catch(SendFailedException ex) {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Error\");\r\n\t\t\t\t}\r\n\t\t\t}",
"public void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tif (e.getActionCommand().equals(\"Envoyer un mail au support\")) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tHistorique.ecrire(\"Ouverture de : \"+e);\r\n\t\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tnew FEN_SendMail();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}",
"public void send() {\n\t}",
"public void addSendButtonListener(ActionListener actionListener) {\r\n sendButton.addActionListener(actionListener);\r\n }",
"public void handleSendPane(MouseEvent event){\n sentValid.setVisible(false);\n sentInvalid.setVisible(false);\n }",
"public void sendMessage(View buttonView)\n {\n state = 0;\n Intent intent = new Intent(this, DisplayMessageActivity.class);\n EditText editText = (EditText) findViewById(R.id.Message);\n EditText editTextPhoneNumber = (EditText) findViewById(R.id.Phone);\n String message = editText.getText().toString();\n String phoneNumberMessage = editTextPhoneNumber.getText().toString();\n intent.putExtra(EXTRA_MESSAGE, message);\n intent.putExtra(EXTRA_PHONEMESSAGE, phoneNumberMessage);\n startActivity(intent);\n }",
"@Override\n public void onClick(View v) {\n sendMessage(phone_from_intent);\n }",
"@Override\r\n\tpublic void onClick() {\n\t\tif(bSendStatus)\r\n\t\t\tnativeadstatus(E_ONCLICK);\r\n\t}",
"@Override\r\n\t\t\tpublic void onClick(DialogInterface dialog, int which)\r\n\t\t\t{\n\t\t\t\tif (!internetConnection)\r\n\t\t\t\t{\r\n\t\t\t\t\tshowNoConnectionDialog();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\t\r\n\t\t\t\t\r\n\t\t\t\t// Get phoneId to attend in message\r\n\t\t\t TelephonyManager telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);\r\n\t\t\t\tString phoneId = telephonyManager.getDeviceId(); \r\n\t\t\t \r\n\t\t\t\t// Send mail without blocking the GUI\r\n\t\t\t\tif (dataModel == null)\r\n\t\t\t\t{\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tSendEmail sendEmail = new SendEmail(\"[email protected]\", \r\n\t\t\t \t\t\t\t\t\t\t\t\t\"AskMeAgain\", \r\n\t\t\t \t\t\t\t\t\t\t\t\tdataModel.getRecipientMail(),\r\n\t\t\t \t\t\t\t\t\t\t\t\tgetResources().getString(R.string.fogot_id_mail_subject),\r\n\t\t\t \t\t\t\t\t\t\t\t\tgetResources().getString(R.string.fogot_id_mail_text) + \" \" + phoneId + \".\");\r\n\t\t\t sendEmail.execute();\r\n\t\t\t}",
"public void actionPerformed(ActionEvent event)\n {\n if (player == 1)\n {\n record.append(\"Red: \" + dialog.getText() + \"\\n\");// Update the input to\n // the text area\n }\n else\n {\n record.append(\"Yellow: \" + dialog.getText() + \"\\n\");// Update the input\n // to the text area\n }\n theClientChat.sendString(dialog.getText());// Send the message\n dialog.setText(\"\");// Clear the text field\n }",
"private void predefiniedSendBothActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_predefiniedSendBothActionPerformed\n // TODO add your handling code here:\n String commandString = \"\";\n String selectedMessage = (String) messages.getSelectedItem();\n System.out.println(\"Message Key: \" + selectedMessage);\n String[] titleKey = selectedMessage.split(\"\\\\. \");\n// for (int i = 0; i < titleKey.length; i++) {\n// System.out.println(\"TK \" + i + \": \" + titleKey[i]);\n// }\n String lineTitle = titleKey[1].trim();\n Msg.send(\"Clicked - send both predef message: \" + lineTitle);\n for (int i = 0; i < lines.size(); i++) {\n String line = (String) lines.get(i);\n if (line.contains(lineTitle)) {\n String current = (String) lines.get(i);\n String[] parts = current.split(\";\");\n commandString = parts[2];\n }\n }\n String sendString = \"VA\" + commandString;\n \n sendRawMessage(sendString);\n }",
"public void enableDisableSendButton() {\r\n sendButton.setEnabled(topModel.isSendButtonEnabled());\r\n }",
"private void jTextFieldTelefoneActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"@Override // com.zhihu.android.app.p1311ui.fragment.BaseFragment, com.zhihu.android.app.p1311ui.fragment.webview.WebViewFragment2\n public String onSendView() {\n return C6969H.m41409d(\"G6F82DE1FAA22A773A9419158E2F3CAD27ECCC313AF7FBC20E209955CE1\");\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent event) {\n\t\t\t\tsendData(event.getActionCommand());//调用sendData方法,响应操作。\t将信息发送给客户\r\n\t\t\t\tenterField.setText(\"\"); //将输入区域置空\r\n\t\t\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n client.sendMessage(new BuzzInMessage(teamIndex));\n }"
]
| [
"0.7488463",
"0.7416849",
"0.7141074",
"0.7078817",
"0.70701325",
"0.7015546",
"0.7006025",
"0.6993535",
"0.6948314",
"0.69355965",
"0.6912939",
"0.6866673",
"0.6845752",
"0.6832665",
"0.6830186",
"0.68095857",
"0.6754457",
"0.6753401",
"0.6706521",
"0.6658458",
"0.6624695",
"0.6619471",
"0.66099215",
"0.6608636",
"0.65588963",
"0.6556688",
"0.6546282",
"0.6507188",
"0.65067875",
"0.64818287",
"0.64713275",
"0.64689475",
"0.6468658",
"0.64652324",
"0.6464441",
"0.64455956",
"0.64370304",
"0.6436177",
"0.64263695",
"0.6419663",
"0.64168715",
"0.6414386",
"0.63983136",
"0.63952416",
"0.63814455",
"0.63681847",
"0.6366148",
"0.6360659",
"0.6354958",
"0.6322092",
"0.63022566",
"0.62976986",
"0.629094",
"0.6280392",
"0.62553394",
"0.62553024",
"0.6254272",
"0.625259",
"0.6249477",
"0.6247775",
"0.62476474",
"0.62461525",
"0.62432325",
"0.6240138",
"0.6231157",
"0.6223573",
"0.62193197",
"0.621773",
"0.6209123",
"0.6205453",
"0.6200584",
"0.6200166",
"0.6197224",
"0.618411",
"0.61720383",
"0.61714596",
"0.61674345",
"0.6159957",
"0.6159812",
"0.61585665",
"0.6154751",
"0.61458915",
"0.61454624",
"0.61454624",
"0.61417717",
"0.6140878",
"0.6138594",
"0.6132356",
"0.61257833",
"0.6124937",
"0.6120627",
"0.6120601",
"0.6114438",
"0.61086285",
"0.61085624",
"0.6095437",
"0.6093549",
"0.6090052",
"0.608978",
"0.60882497",
"0.6084879"
]
| 0.0 | -1 |
need to have button that will add another file upload | private void addFileUploadField() {
FileUpload upload = new FileUpload();
upload.setName("fileUpload" + i);
fileUploadPanel.add(upload);
i++;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void addPressed() {\n\n\t\tJFileChooser fc = new JFileChooser();\n\t\tfc.setFileFilter(SwingFileFilterFactory.newMediaFileFilter());\n\t\tint returnVal = fc.showOpenDialog(Library.this);\n\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tString newFile = fc.getSelectedFile().getAbsolutePath();\n\t\t\t// Check that file is a video or audio file.\n\t\t\tInvalidCheck i = new InvalidCheck();\n\t\t\tboolean isValidMedia = i.invalidCheck(newFile);\n\n\t\t\tif (!isValidMedia) {\n\t\t\t\tJOptionPane.showMessageDialog(Library.this, \"You have specified an invalid file.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\treturn;\n\t\t\t}else{\n\t\t\t\tselectedFile = fc.getSelectedFile();\n\t\t\t\tl.addElement(selectedFile.getName());\n\t\t\t\tpaths.put(selectedFile.getName(), selectedFile.getAbsolutePath());\n\t\t\t\tsizes.put(selectedFile.getName(),selectedFile.length());\n\t\t\t}\n\t\t}\n\t}",
"public void clickAddButton() {\n\t\tfilePicker.fileManButton(locAddButton);\n\t}",
"private void actionAddFile ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tJFileChooser fileChooserDriver = new JFileChooser();\r\n\r\n\t\t\tint isFileSelected = fileChooserDriver.showOpenDialog(fileChooserDriver);\r\n\r\n\t\t\tif (isFileSelected == JFileChooser.APPROVE_OPTION)\r\n\t\t\t{\r\n\t\t\t\tString filePath = fileChooserDriver.getSelectedFile().getPath();\r\n\t\t\t\tDataController.scenarioAddFile(filePath);\r\n\r\n\t\t\t\thelperDisplayProjectFiles();\r\n\t\t\t\thelperDisplayInputImage();\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\r\n\t}",
"public void pressOnUploadBtn() throws IOException {\n FileChooser fileChooser = new FileChooser();\n fileChooser.setTitle(\"Open File\");\n File file = fileChooser.showOpenDialog(this);\n uploadFile(file);\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlog.info(\"画上传界面\");\n\t\t\t\t\n\t\t\t\tinfomation.drawUpload();\n\t\t\t\t//frmIpfs.add(infomation);\n\t\t\t\tlog.info(\"画完了\");\n\t\t\t}",
"@Override\n public void onClick(View view) {\n if (view == buttonChoose) {\n showFileChooser();\n }\n //if the clicked button is upload\n else if (view == buttonUpload)\n {\n\n\n\n uploadFile();\n\n\n }\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jTextField1 = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jFileChooser1 = new javax.swing.JFileChooser();\n jButton3 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jButton1.setText(\"Upload\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Cancel\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jFileChooser1.setPreferredSize(new java.awt.Dimension(1, 1));\n\n jButton3.setText(\"Browse\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout 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(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton3))\n .addComponent(jFileChooser1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton1)\n .addGap(20, 20, 20)\n .addComponent(jButton2)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(33, 33, 33)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jFileChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 23, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addContainerGap())\n );\n\n pack();\n }",
"public void upload(UploadedFile file) {\n FacesContext faces = FacesContext.getCurrentInstance();\n\n getSelected().setUrlImage(file.getFileName());\n String fileExtension = file.getFileName().split(\"\\\\.\")[file.getFileName().split(\"\\\\.\").length - 1];\n\n //String generatedFileName = \"file\" + System.currentTimeMillis();\n File directory = new File(faces.getExternalContext().getRealPath(UPLOAD_DIRECTORY_IMAGE_RELATIVE));\n\n if (!directory.exists()) {\n directory.mkdir();\n }\n\n File newFile = new File(faces.getExternalContext().getRealPath(UPLOAD_DIRECTORY_IMAGE_RELATIVE) + File.separator + file.getFileName());\n try {\n if (!newFile.createNewFile()) {\n String nameGenerated = \"file_generated\" + System.currentTimeMillis();\n newFile = new File(faces.getExternalContext().getRealPath(UPLOAD_DIRECTORY_IMAGE_RELATIVE) + File.separator + nameGenerated + \".\" + fileExtension);\n getSelected().setUrlImage(nameGenerated);\n }\n\n FileOutputStream output = new FileOutputStream(newFile);\n\n byte[] buffer = new byte[BUFFER];\n\n int bulk;\n\n InputStream input = file.getInputstream();\n\n while (true) {\n bulk = input.read(buffer);\n\n if (bulk < 0) {\n break;\n }\n\n output.write(buffer, 0, bulk);\n output.flush();\n }\n\n output.close();\n input.close();\n\n } catch (Exception ex) {\n ex.printStackTrace();\n FacesContext.getCurrentInstance().addMessage(\"\", new FacesMessage(bundle.getString(\"Error_file_created\")));\n }\n\n }",
"@FXML\n\tvoid uploadBtnClicked(ActionEvent event) throws FileNotFoundException {\n\t\tArrayList<String> errorLog = new ArrayList<String>();\n\t\tFileChooser filechooser = new FileChooser();\n\t\tfilechooser.setTitle(\"upload finished exam\");\n\t\tFile selectedfile = filechooser.showOpenDialog(null);\n\t\tif (selectedfile != null && selectedfile.getName().endsWith(\".docx\")) {\n\t\t\t// here we need to implements upload file to sql DB\n\t\t\tMyFile fileToUpload = new MyFile(ClientUI.clientHandler.myDetails.getId(), examID, \"manual\");\n\t\t\tfileToUpload.setUserType(\"student\");\n\t\t\tbyte[] myByteArray = new byte[(int) selectedfile.length()];\n\t\t\tFileInputStream fileIn = new FileInputStream(selectedfile);\n\t\t\tBufferedInputStream bufferIn = new BufferedInputStream(fileIn);\n\t\t\tfileToUpload.initArray(myByteArray.length);\n\t\t\tfileToUpload.setSize(myByteArray.length);\n\t\t\ttry {\n\t\t\t\tbufferIn.read(fileToUpload.getMybytearray(), 0, myByteArray.length);\n\t\t\t\tClientUI.clientHandler.handleMessageFromClientUI(fileToUpload);\n\t\t\t\tString serverRespond = (String) ClientHandler.returnMessage;\n\t\t\t\tif (serverRespond.equals(\"success\")) {\n\t\t\t\t\tbufferIn.close();\n\t\t\t\t\tapproveImage.setVisible(true);\n\t\t\t\t\tSpecialCalls.callSuccessFrame(\"Exam uploaded successfuly\");\n\t\t\t\t\tflag2 = false;\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\terrorLog.add(\"Uploaded file is not valid\");\n\t\t\tSpecialCalls.callErrorFrame(errorLog);\n\t\t}\n\n\t}",
"@FXML\r\n void ClickUploadBtn(ActionEvent event) throws IOException {\r\n FileChooser fileExplorer = new FileChooser();\r\n File file = fileExplorer.showOpenDialog(null);\r\n //Open a file explorer and ask user to select a file\r\n if(file != null && file.exists())\r\n {\r\n UploadScriptField.setText(file.getCanonicalPath());\r\n //Set the upload field text\r\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\r\n \"dd/MM/yyyy\");\r\n TextInputDialog dialog = new TextInputDialog(\"Command to\"\r\n + \" run script\");\r\n dialog.setTitle(\"Found script from File Explorer\");\r\n dialog.setHeaderText(\"Enter Command to run\");\r\n Optional<String> result = dialog.showAndWait();\r\n //Wait for response\r\n if(result.isPresent())\r\n {\r\n TextInputDialog dialogDescription = new \r\n TextInputDialog(\"Script Description\");\r\n dialogDescription.setTitle(\"Found script in explorer\");\r\n dialogDescription.setHeaderText(\"Enter script description\");\r\n Optional<String>resultDesc =dialogDescription.showAndWait();\r\n if(resultDesc.isPresent())\r\n {\r\n //Set the date format for the string\r\n //set the image view as the delete button\r\n user.getListOfScripts().add(new Script(file.getName(),\r\n formatter.format(LocalDate.now()), \r\n dialogDescription.getResult(), \r\n dialog.getResult()));\r\n //Add script to list and set details\r\n scriptTable.setItems(user.getListOfScripts());\r\n //Reload table\r\n user.setListOfScripts(user.getListOfScripts());\r\n }\r\n }\r\n }\r\n }",
"public void upload() {\r\n if (file != null) {\r\n try {\r\n String filepath = super.getUploadFolder() + \"/\" + file.getFileName();\r\n filepath = FileUtil.alternativeFilepathIfExists(filepath);\r\n FileUtil.createFile(filepath);\r\n\r\n file.write(filepath);\r\n super.info(\"Succesful\", file.getFileName() + \" is uploaded.\");\r\n\r\n Upload upload = new Upload();\r\n upload.setDescription(description);\r\n upload.setFilepath(filepath);\r\n upload.setTag(Md5Util.getMd5Sum(filepath));\r\n this.description = null;\r\n uploads.add(upload);\r\n // update ui and ready for save in db\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n }\r\n }",
"@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\tupload(arg0);\n\t\t\t\t}",
"public void showUpload(){\n\n }",
"public void addPhoto(ActionEvent event) throws IOException {\n\t\t//System.out.println(\"ITEM ADDED______________________________________________\");\n\t\tFileChooser fileChooser = new FileChooser();\n\t\tfileChooser.setTitle(\"Open Photo\"); \n\t\tAccessibleUsersList.masterUserList.userLoggedIn.fileList = fileChooser.showOpenMultipleDialog(this.myNewStage);\n\t\t\n\t\tboolean checkIfImages = true;\n\t\t\n\t\tif(AccessibleUsersList.masterUserList.userLoggedIn.fileList != null){\n\t\t\t\n\t\t\tfor(File file : AccessibleUsersList.masterUserList.userLoggedIn.fileList){\n\t\t\t\t\n\t\t\t\tMimetypesFileTypeMap mimetype= new MimetypesFileTypeMap();\n\t\t\t\tmimetype.addMimeTypes(\"image png jpg jpeg JPG PNG\");\t\n\t\t\t\t\n\t\t\t\tString mimetype1 = mimetype.getContentType(file);\n\t\t\t\tString type = mimetype1.split(\"/\")[0];\n\t\t\t\t\n\t\t\t\tif(type.contains(\"image\")){\n\t\t\t //System.out.println(\"It's an image\");\n\t\t\t\t} else { \n\t\t\t \t //System.out.println(\"It's NOT an image\");\n\t\t\t \t Alert majorBagAlert = new Alert(AlertType.ERROR);\n\t\t\t\t majorBagAlert.setTitle(\"Error\");\n\t\t\t\t majorBagAlert.setHeaderText(\"One or more images is not an image file type.\");\n\t\t\t\t majorBagAlert.setContentText(\"Please enter photo(s) again\");\n\t\t\t\t majorBagAlert.showAndWait();\n\t\t\t \t \n\t\t\t\t //adding comment\n\t\t\t checkIfImages = false; \n\t\t\t }\n\t\t\t}\n }\n\t\t\n\n\t\t//iterate through the logged in user's albums \n\t\t//this is the album we have to add our photos to \n\t\tthis.selectedAlbum = AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getName(); \n\t\tAlbum foundAlbum = null; \n\t\tlong lastModifiedDate = 0; \n\t\tString path; \n\t\t\n\t\t//if we are certain we only collected files of type jpg, png or jpeg \n\t\tif(checkIfImages){\n\t\t\t\n\t\t\tif(AccessibleUsersList.masterUserList.userLoggedIn.fileList != null) {\n\t\t\t\t\n\t\t\t\tfor(File file : AccessibleUsersList.masterUserList.userLoggedIn.fileList){\n\t\t\t\t\t\n\t\t\t\t\tpath = file.getAbsolutePath();\n\t\t\t\t\tFileInputStream inputstream = new FileInputStream(path); \n\t\t\t\t\tImage image1 = new Image(inputstream); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t//iterate through the logged in user's albums \n\t\t\t\t\tint x=0; \n\t\t\t\t\tfor(Album album: AccessibleUsersList.masterUserList.userLoggedIn.albums_list){\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//looking for the current album to add our photos into \n\t\t\t\t\t\tif(album.getName().equals(this.selectedAlbum)){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfoundAlbum = AccessibleUsersList.masterUserList.userLoggedIn.albums_list.get(x);\n\t\t\t\t\t\t\tlastModifiedDate = file.lastModified();\n\t\t\t\n\t\t\t\t\t\t\tPhoto albumPhoto = new Photo(path, lastModifiedDate); \n\t\t\t\t\t\t\tfoundAlbum.getAlbum().add(albumPhoto);\t \n\t\t\t\t\t\t\t//System.out.println(foundAlbum.getAlbum());\n\t\t\t\t\t\t\t//foundAlbum.photos.add(new model.Photo(image1, lastModifiedDate));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tImageView pic = new ImageView();\n\t\t\t\t\t\t\tpic.setFitWidth(340);\n\t\t\t\t\t\t\tpic.setFitHeight(180);\n\t\t\t\t\t\t\tpic.setImage(image1);\n\t\t\t\t\t\t\tlistOfPhotos.add(pic);\n\t\t\t\t\t\t\talbumPhoto.setImage(pic);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"photo added\");\n\t\t\t\t\t\t\t//System.out.println(albumPhoto.getPathToPhoto());\n\t\t\t\t\t\t\t//System.out.println(AccessibleUsersList.masterUserList.userLoggedIn);\n\t\t\t\t\t\t\t//System.out.println(AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.addPhoto(albumPhoto); <-----cause of bug, added photo TWICE, X\n\t\t\t\t\t\t\tbreak; \n\t\t\t\t\t\t} \n\t\t\t\t\t\tx++; \n\t\t\t\t\t}\n \t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tserializeUsers(AccessibleUsersList.masterUserList);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\t\n\t}",
"public void uploadFile() {\n \n InputStream input = null;\n try {\n input = file.getInputStream();\n System.out.println(\"chay qua inpustream\");\n String itemName = file.getSubmittedFileName();\n String filename = itemName.substring(\n itemName.lastIndexOf(\"\\\\\") + 1);\n String dirPath = FacesContext.getCurrentInstance().getExternalContext().getRealPath(\"/upload/images\");\n fileNamed = \"/upload/images/\"+filename;\n File f = new File(dirPath + \"\\\\\" + filename);\n if (!f.exists()) {\n f.createNewFile();\n }\n FileOutputStream output = new FileOutputStream(f);\n byte[] buffer = new byte[1024];\n int length;\n while ((length = input.read(buffer)) > 0) {\n output.write(buffer, 0, length);\n }\n // resize(dirPath + \"\\\\\" + filename, dirPath + \"\\\\\" + filename, 200, 200);\n input.close();\n output.close();\n } catch (IOException ex) {\n System.out.println(\"loi io\");\n Logger.getLogger(ArtistsManagedBean.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }",
"private void addButtonActionPerformed() {//GEN-FIRST:event_addButtonActionPerformed\r\n this.controller.OnAddPhoto();\r\n }",
"private void addFinanceUpload() {\n\t\tFileUploadField fileUploadField = new FileUploadField(\"financeInput\");\n\t\tfinal Form<Void> progressUploadForm = new Form<Void>(\"financeForm\") {\n\t\t\t@Override\n\t\t\tprotected void onSubmit() {\n\t\t\t\tfinal List<FileUpload> uploads = fileUploadField.getFileUploads();\n\t\t\t\tif (uploads != null) {\n\t\t\t\t\tfor (FileUpload upload : uploads) {\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// Paarse and insert into db\n\t\t\t\t\t\t\tbankDataService.importFinanceCsv(upload.getBytes());\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tthrow new IllegalStateException(\"Unable to read data.\", e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t};\n\t\t// set this form to multipart mode (allways needed for uploads!)\n\t\tprogressUploadForm.setMultiPart(true);\n\t\tprogressUploadForm.add(fileUploadField);\n\t\tprogressUploadForm.add(new UploadProgressBar(\"financeProgress\", progressUploadForm, fileUploadField));\n\t\tadd(progressUploadForm);\n\t}",
"public void actionPerformed(ActionEvent actionEvent) {\r\n Object source = actionEvent.getSource();\r\n /*if Upload , then set 'fileSelected' as true, get the filename from file chooser and set it to the txtFilename,\r\n set the BLOB data and enable the view button*/\r\n if(source.equals(awardAddDocumentForm.btnUpload)){\r\n CoeusFileChooser fileChooser = new CoeusFileChooser(dlgAwardUploadDoc);\r\n fileChooser.setAcceptAllFileFilterUsed(true);\r\n fileChooser.showFileChooser();\r\n if(fileChooser.isFileSelected()){\r\n String fileName = fileChooser.getSelectedFile();\r\n if(fileName != null && !fileName.trim().equals(EMPTY_STRING)){\r\n int index = fileName.lastIndexOf('.');\r\n if(index != -1 && index != fileName.length()){\r\n setFileSelected(true);\r\n awardAddDocumentForm.txtFileName.setText(fileChooser.getFileName().getName());\r\n setBlobData(fileChooser.getFile());\r\n //Added with case 4007: Icon based on mime type\r\n CoeusDocumentUtils docTypeUtils = CoeusDocumentUtils.getInstance();\r\n CoeusAttachmentBean attachmentBean = new CoeusAttachmentBean(fileName,getBlobData());\r\n setMimeType(docTypeUtils.getDocumentMimeType(attachmentBean));\r\n //4007 End\r\n awardAddDocumentForm.btnView.setEnabled(true);\r\n }else{\r\n CoeusOptionPane.showErrorDialog(coeusMessageResources.parseMessageKey(\r\n \"correspType_exceptionCode.1012\"));\r\n setFileSelected(false);\r\n setBlobData(null);\r\n setMimeType(null);//4007\r\n return;\r\n }\r\n }\r\n }\r\n } else if(source.equals(awardAddDocumentForm.btnOk)){\r\n try{\r\n /*Check the function type and awardDocumentBean is null or not*/\r\n if(awardDocumentBean != null){\r\n if(functionType == MODIFY_DOCUMENT){\r\n awardDocumentBean.setAcType(TypeConstants.UPDATE_RECORD);\r\n newVersion = false;\r\n newDocumentId = false;\r\n ComboBoxBean cmbTypeCode =(ComboBoxBean)awardAddDocumentForm.cmbDocumentType.getSelectedItem();\r\n if(!cmbTypeCode.getCode().equals(\"\") && !cmbTypeCode.getDescription().equals(\"\")){\r\n if(awardAddDocumentForm.cmbDocumentType.getSelectedItem() != null\r\n && !awardAddDocumentForm.cmbDocumentType.getSelectedItem().equals(EMPTY_STRING)){\r\n cmbTypeCode =(ComboBoxBean)awardAddDocumentForm.cmbDocumentType.getSelectedItem();\r\n awardDocumentBean.setDocumentTypeCode(Integer.parseInt(cmbTypeCode.getCode()));\r\n awardDocumentBean.setDocumentTypeDescription((awardAddDocumentForm.cmbDocumentType.getSelectedItem().toString()));\r\n docTypeEmpty = false;\r\n }\r\n }\r\n \r\n if(awardAddDocumentForm.txtDescription.getText() != null &&\r\n !awardAddDocumentForm.txtDescription.getText().equals(EMPTY_STRING)){\r\n if(awardAddDocumentForm.txtDescription.getText().length() > 200){\r\n String description = awardAddDocumentForm.txtDescription.getText().substring(0,201);\r\n awardDocumentBean.setDescription(description);\r\n docTypeEmpty = false;\r\n }else{\r\n awardDocumentBean.setDescription(awardAddDocumentForm.txtDescription.getText());\r\n }\r\n }else {\r\n CoeusOptionPane.showInfoDialog(coeusMessageResources.parseMessageKey(\"awardDocuments_DescDoc_exceptionCode.1115\"));\r\n docTypeEmpty = true;\r\n awardAddDocumentForm.txtDescription.requestFocusInWindow();\r\n return;\r\n }\r\n if(awardAddDocumentForm.txtFileName.getText() != null\r\n && !awardAddDocumentForm.txtFileName.getText().equals(EMPTY_STRING)){\r\n awardDocumentBean.setFileName(awardAddDocumentForm.txtFileName.getText());\r\n docTypeEmpty = false;\r\n }else{\r\n CoeusOptionPane.showInfoDialog(coeusMessageResources.parseMessageKey(\"awardDocuments_AttachDoc_exceptionCode.1113\"));\r\n docTypeEmpty = true;\r\n awardAddDocumentForm.btnUpload.requestFocusInWindow();\r\n return;\r\n }\r\n if(fileSelected && getBlobData() != null){\r\n awardDocumentBean.setDocument(getBlobData());\r\n awardDocumentBean.setMimeType(getMimeType());\r\n }\r\n modifyFormData(awardDocumentBean);\r\n }\r\n } else {\r\n saveFormData();\r\n }\r\n// if(okClicked){\r\n if(isOkClicked() || !docTypeEmpty){\r\n dlgAwardUploadDoc.dispose();\r\n }\r\n }catch(Exception e){\r\n e.printStackTrace();\r\n }\r\n }\r\n /* if View, check value for fileSelected,\r\n if true the display the blob data else throw an error msg*/\r\n else if(source.equals(awardAddDocumentForm.btnView)){\r\n if(fileSelected){\r\n try{\r\n viewDocument();\r\n }catch (Exception exception){\r\n exception.printStackTrace();\r\n if(!( exception.getMessage().equals(\r\n coeusMessageResources.parseMessageKey(\r\n \"protoDetFrm_exceptionCode.1130\")) )){\r\n CoeusOptionPane.showInfoDialog(exception.getMessage());\r\n return;\r\n }\r\n }\r\n }\r\n } else if(source.equals(awardAddDocumentForm.btnCancel)){\r\n dataValuesChanged();\r\n if(dataChanged){\r\n int option = CoeusOptionPane.showQuestionDialog(\r\n coeusMessageResources.parseMessageKey(\"saveConfirmCode.1002\"),\r\n CoeusOptionPane.OPTION_YES_NO_CANCEL,\r\n JOptionPane.YES_OPTION);\r\n switch(option){\r\n case JOptionPane.YES_OPTION:\r\n try{\r\n if(this.functionType != 'M'){\r\n saveFormData();\r\n } else{\r\n dlgAwardUploadDoc.dispose();\r\n }\r\n if(isOkClicked()){\r\n dlgAwardUploadDoc.dispose();\r\n }\r\n }catch(Exception e){\r\n e.printStackTrace();\r\n }\r\n break;\r\n case JOptionPane.NO_OPTION :\r\n dlgAwardUploadDoc.dispose();\r\n break;\r\n default:\r\n \r\n try {\r\n requestDefaultFocusToComp();\r\n } catch (CoeusException ex) {\r\n ex.printStackTrace();\r\n }\r\n break;\r\n }\r\n }else{\r\n dlgAwardUploadDoc.dispose();\r\n }\r\n }\r\n }",
"@Override\r\n public void actionPerformed(ActionEvent e) {\r\n JFileChooser fileChooser = new JFileChooser();\r\n fileChooser.setDialogTitle(\"Upload Files\");\r\n int result = fileChooser.showOpenDialog(null);\r\n if (result == JFileChooser.APPROVE_OPTION) { \r\n selectedFile = fileChooser.getSelectedFile();\r\n review.setText(selectedFile.getAbsolutePath());\r\n } \r\n }",
"@RequestMapping(value = \"/ressources/add\", method = RequestMethod.GET)\n public String uploadOneFileHandler(Model model) {\n\n MyUploadForm myUploadForm = new MyUploadForm();\n model.addAttribute(\"myUploadForm\", myUploadForm);\n\n return \"ressources/add\";\n }",
"public void addNewFiles(java.lang.String param){\r\n if (localNewFiles == null){\r\n localNewFiles = new java.lang.String[]{};\r\n }\r\n\r\n \r\n //update the setting tracker\r\n localNewFilesTracker = true;\r\n \r\n\r\n java.util.List list =\r\n org.apache.axis2.databinding.utils.ConverterUtil.toList(localNewFiles);\r\n list.add(param);\r\n this.localNewFiles =\r\n (java.lang.String[])list.toArray(\r\n new java.lang.String[list.size()]);\r\n\r\n }",
"public void handleAddFile() {\n // make sure the user didn't hide the sketch folder\n ensureExistence();\n\n // if read-only, give an error\n if (isReadOnly()) {\n // if the files are read-only, need to first do a \"save as\".\n Base.showMessage(_(\"Sketch is Read-Only\"),\n _(\"Some files are marked \\\"read-only\\\", so you'll\\n\" +\n \"need to re-save the sketch in another location,\\n\" +\n \"and try again.\"));\n return;\n }\n\n // get a dialog, select a file to add to the sketch\n String prompt =\n _(\"Select an image or other data file to copy to your sketch\");\n //FileDialog fd = new FileDialog(new Frame(), prompt, FileDialog.LOAD);\n FileDialog fd = new FileDialog(editor, prompt, FileDialog.LOAD);\n fd.setVisible(true);\n\n String directory = fd.getDirectory();\n String filename = fd.getFile();\n if (filename == null) return;\n\n // copy the file into the folder. if people would rather\n // it move instead of copy, they can do it by hand\n File sourceFile = new File(directory, filename);\n\n // now do the work of adding the file\n boolean result = addFile(sourceFile);\n\n if (result) {\n editor.statusNotice(_(\"One file added to the sketch.\"));\n }\n }",
"private void addFinalBtn() {\n if(audioList.isSelectionEmpty()) {\n JOptionPane.showMessageDialog(null, \"Please select an audio from audio list\");\n }\n else {\n String filename = (String)audioList.getSelectedValue();\n if (finalListModel.size() < order.getItemCount())\n if(finalListModel.size() < order.getSelectedIndex())\n JOptionPane.showMessageDialog(null, \"Sorry, try to pick the previous buttons first\");\n else {\n if (finalListModel.contains(filename))\n JOptionPane.showMessageDialog(null, \"Sorry the item already exists\");\n else\n finalListModel.add(order.getSelectedIndex(), filename);\n }\n else\n JOptionPane.showMessageDialog(null, \"Sorry you have exceeded the \" +\n \"number of available buttons, please add a new button, then try.\");\n }\n }",
"private void uploadLocalDocument(){\t\t\n\t\tif(getFileChooser(JFileChooser.FILES_ONLY).showOpenDialog(this)==JFileChooser.APPROVE_OPTION){\n\t\t\tNode node = null;\n\t\t\ttry {\n\t\t\t\tnode = alfrescoDocumentClient.addFileFromParent(getTreeSelectedAlfrescoKey(), getFileChooser().getSelectedFile());\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\t\n\t\t\t//Node node = alfrescoManager.addFileFromParent(getTreeSelectedAlfrescoKey(), getFileChooser().getSelectedFile());\t\t\n\t\t\tif(node!=null){\n\t\t\t\tgetDynamicTreePanel().getChildFiles(getTreeSelectedDefaultMutableNode());\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"El documento se ha subido correctamente.\");\n\t\t\t}\n\t\t\telse\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Error al subir el documento.\");\n\t\t}\n\t\t//el boton solo esta activo si un directorio esta seleccionado en el arbol directorios\n\t\t//se abre un filechooser y se elije un documento\n\t\t//solo se sube a alfresco, no se asocia automaticamente\n\t\t//se enviara la instancia de File() con el fichero seleccionado\n\t\t//se crea el fichero en alfresco, se recupera el nodo y se añade a la tabla actual (se hace de nuevo la peticion a getChildFiles())\n\t}",
"private void uploadLblMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_uploadLblMouseClicked\n if (HF != null) {\n int n = JOptionPane.showConfirmDialog(this,\n \"Would you like to save your changes first\",\n \"Warning\", JOptionPane.YES_NO_CANCEL_OPTION);\n if (n == JOptionPane.YES_OPTION) {\n FileHandling.saveToFile(this, HF);\n }\n }\n HF = (HELPFit) FileHandling.readFromFile(this);\n HF.updateSequences();\n }",
"@FXML\n void newFilePressed(ActionEvent event) {\n\t\tFileChooser fileChooser = new FileChooser();\n\t\tfileChooser.setTitle(\"Open New File\");\n\t\tFile f = fileChooser.showSaveDialog(stage);\n\t\tif (f != null) {\n\t\t\tsetFile(f);\n\t\t\tviewState.set(ViewState.NEW);\n\t\t}\n\n }",
"public void upload_file(FileUploadEvent event) throws IOException {\n \t\n \tUploadedFile uploaded_file=event.getFile();\n \tFacesContext context = FacesContext.getCurrentInstance();\n \t\n\t\tHttpSession session = (HttpSession) FacesContext.getCurrentInstance()\n \t\t\t\t.getExternalContext().getSession(true);\n \t\tString pictures_folder=session.getAttribute(\"pictures_folder\").toString();\n \t\t\n \t\tPath folder = Paths.get(pictures_folder);\n\t\t\n\t\tString filename = FilenameUtils.getBaseName(uploaded_file.getFileName()); \n\t\tString extension = FilenameUtils.getExtension(uploaded_file.getFileName());\n\t\t//tou dinei rando onoma\n\t\tPath file = Files.createTempFile( folder,filename+\"-\" , \".\" + extension);\n\t\tSystem.out.println(\"folder: \"+folder.toString()+\"\\n\"+\"filename: \"+filename+\"\\n\"\n\t\t \t+ \"file: \"+file.toString());\n\t\t\n\t\tString profile_url;\n\t\ttry (InputStream input =uploaded_file.getInputstream()) {\n\t\t Files.copy(input, file, StandardCopyOption.REPLACE_EXISTING);\n\t\t profile_url=file.toString().split(\"/\")[file.toString().split(\"/\").length-1];\n\t\t}\n\n\t\tSystem.out.println(\"Uploaded picture successfully saved in \" + profile_url);\n\t\tString message=\"Pictures were uploaded Successfully\";\n\t\tFacesMessage facesMessage_11 = new FacesMessage(message);\n context.addMessage(files_upload_UI.getClientId(context), facesMessage_11);\n\t\t\n\t\t\n\t\t\n }",
"@Override\n public void onClick(View view) {\n storageReference= FirebaseStorage.getInstance().getReference(\"uploadsKarwa\");//files will be uploaded to uploads folder\n databaseReference= FirebaseDatabase.getInstance().getReference(\"uploadsKarwa\");\n openfilechooser();\n\n }",
"private void addTransactionUpload() {\n\t\tFileUploadField fileUploadField = new FileUploadField(\"transactionInput\");\n\t\tfinal Form<Void> progressUploadForm = new Form<Void>(\"transactionForm\") {\n\t\t\t@Override\n\t\t\tprotected void onSubmit() {\n\t\t\t\tfinal List<FileUpload> uploads = fileUploadField.getFileUploads();\n\t\t\t\tif (uploads != null) {\n\t\t\t\t\tfor (FileUpload upload : uploads) {\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// Paarse and insert into db\n\t\t\t\t\t\t\tbankDataService.importTransactionCsv(upload.getBytes());\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tthrow new IllegalStateException(\"Unable to read data.\", e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t};\n\t\t// set this form to multipart mode (allways needed for uploads!)\n\t\tprogressUploadForm.setMultiPart(true);\n\t\tprogressUploadForm.add(fileUploadField);\n\t\tprogressUploadForm.add(new UploadProgressBar(\"transactionProgress\", progressUploadForm, fileUploadField));\n\t\tadd(progressUploadForm);\n\t}",
"@Override\n public void onClick(View view) {\n storageReference= FirebaseStorage.getInstance().getReference(\"uploadsDashara\");//files will be uploaded to uploads folder\n databaseReference= FirebaseDatabase.getInstance().getReference(\"uploadsDashara\");\n openfilechooser();\n\n }",
"void fileUploaded(String path);",
"public void on_append(ActionEvent actionEvent) {\r\n\t\tFile[] files = CommonTool.get_imagefiles( _open_directory_key, _parent);\r\n\t\tif ( null == files)\r\n\t\t\treturn;\r\n\r\n\t\tappend( files);\r\n\t}",
"public void uploadButtonPressed(View view)\n {\n Intent intent = new Intent(this, UploadActivity.class);\n startActivity(intent);\n }",
"public void handleFileUpload(FileUploadEvent event) {\r\n FacesMessage msg = new FacesMessage(\"Succesful\", event.getFile().getFileName() + \" is uploaded.\");\r\n UploadedFile file = event.getFile();\r\n try {\r\n file.write(super.getUploadFolder() + \"/\" + file.getFileName());\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n// RequestContext.getCurrentInstance().execute(\"PF('uploadJs').start()\");\r\n System.out.println(event.getFile().getFileName());\r\n FacesContext.getCurrentInstance().addMessage(null, msg);\r\n }",
"private void addInitialBtn(String[] audioFiles) {\n int index = audioListModel.indexOf(initialListModel.lastElement());\n if(orderModel.getSize() < audioFiles.length) {\n orderModel.addElement(order.getItemCount() + 1);\n if(++index == audioListModel.size()) {\n index = 0;\n initialListModel.addElement(audioFiles[index++]);\n }\n else\n initialListModel.addElement(audioFiles[index++]);\n }\n else\n JOptionPane.showMessageDialog(null, \"Sorry you can't add more buttons\");\n }",
"@FXML\n\tprivate String attachButtonPressed(MouseEvent event) throws InterruptedException, IOException {\n\t\tFileChooser fileChooser = new FileChooser();\n\t\tfileChooser.setTitle(\"Open Attachment\");\n\t\tFile file = fileChooser.showOpenDialog(stage);\n\t\tif (file != null) {\n\t\t\tString path = file.toString().substring(file.toString().lastIndexOf(\"/\") + 1);\n\t\t\tthis.append(client.username + \" would like to share '\" + path + \"' with you!\", client.username);\n\t\t\tSystem.out.println(file);\n\t\t\tclient.uploadFile(file);\n\t\t}\n\t\treturn null;\n\t}",
"public void actionPerformed(ActionEvent e ) {\n boolean status = false;\n\n String command = e.getActionCommand();\n if (command.equals(\"Add\")) {\n // Add an image file\n status = addFile();\n if (!status)\n JOptionPane.showMessageDialog (\n null,\n \"Error adding file!\",\n \"File Open Error\",\n JOptionPane.ERROR_MESSAGE\n );\n\n } else if (command.equals(\"Apply\")) {\n generateMosaic();\n } else if (command.equals(\"Quit\")) {\n dispose();\n }\n }",
"void uploadingFile(String path);",
"@Override\n public void addSingleFile(FileInfo file) {\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tuploadButton.setLabel(\"Uploading...\");\n\t\t\t\tsubmitConfiguration();\n\t\t\t\tuploadButton.setLabel(\"Upload\");\n\t\t\t}",
"private void intUloadPanel(){\n \n m_UploadPanel = new JPanel();\n m_UploadPanel.setLayout(new FlowLayout());\n m_uploadLabel = new JLabel(\"Upload File\");\n m_upload = new JButton(\"Upload\");\n m_upload.addActionListener(new ActionListener(){\n public void actionPerformed(ActionEvent e){\n System.err.println(file.getAbsoluteFile());\n if (!file.exists()) {\n try {\n file.createNewFile();\n \n SaveDialog s = new SaveDialog(m_db,m_TP);\n if(s.SaveFile(file)){\n\n if(CLOUD.upload(m_sid, file)!=null){\n JOptionPane.showMessageDialog(null,\n \"Uplaod Succsesful\",\n \"Upload Status\",\n JOptionPane.INFORMATION_MESSAGE);\n }else{\n JOptionPane.showMessageDialog(null,\n \"Failed to upload the file\",\n \"Uplpad Failed\",\n JOptionPane.ERROR_MESSAGE);\n }\n }else{\n JOptionPane.showMessageDialog(null,\n \"error making file\",\n \"Uplpad Failed\",\n JOptionPane.ERROR_MESSAGE);\n }\n } catch (IOException ex) {\n Logger.getLogger(\n SaveDialog.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }\n });\n m_UploadPanel.add(m_uploadLabel);\n\n m_UploadPanel.add(m_upload);\n \n m_UploadPanel.validate();\n m_UploadPanel.setOpaque(true);\n this.getContentPane().add(m_UploadPanel);\n }",
"@Override\n public void onClick(View v) {\n new UploadFileToServer().execute();\n }",
"public void getFile(JPanel panel) {\n listOfFile= new ArrayList();\n for(int x=0; x<listOfFiles.length;x++) {\n listOfFile.add(listOfFiles[x]);\n }\n if(FileManaging.isMac()) {\n if(listOfFile.contains(Mac_DS_Store))\n listOfFile.remove(Mac_DS_Store);\n if(listOfFile.contains(Mac_Option))\n listOfFile.remove(Mac_Option);\n //if(listOfFile.contains(Mac_Log))\n // listOfFile.remove(Mac_Log);\n }\n if(panel!=null)\n for(int x=0; x<listOfFile.size();x++) {\n buttons.put(x, new JButton(listOfFile.get(x).getName()));\n buttons.get(x).setVisible(true);\n buttons.get(x).setActionCommand(x+\"\");\n buttons.get(x).addActionListener(this);\n buttons.get(x).setBackground(Color.green);\n panel.add(buttons.get(x));\n }\n }",
"public void addAddFile( String addfile ) {\n if ( addfile == null ) {\n return ;\n }\n addfiles .addElement( addfile );\n }",
"public void btn_action_abrirArchivo() {\n FileChooser fileChooser = new FileChooser();\n\n //Set extension filter\n FileChooser.ExtensionFilter extFilter = new FileChooser.ExtensionFilter(\"TXT files (*.txt)\", \"*.txt\");\n fileChooser.getExtensionFilters().add(extFilter);\n\n //Show save file dialog\n File file = fileChooser.showOpenDialog(miPrimaryStage);\n //File file = new File(\"fichero.txt\");\n if(file != null){\n // ta_insertar_texto_id.setText(readFile(file));\n ca_insertar_texto_id.replaceText(readFile(file));\n }\n }",
"Path fileToUpload();",
"boolean addFile() {\n String currentDir;\n //Start in last accessed directory\n if (photoList.isEmpty())\n currentDir = \".\";\n else\n currentDir = photoList.get(photoList.size()-1);\n\n JFileChooser fc = fileChooserDialog(\"Add File\", currentDir);\n\n // Now open chooser\n int result = fc.showOpenDialog(this);\n\n if (result == JFileChooser.CANCEL_OPTION) {\n return true;\n } else if (result == JFileChooser.APPROVE_OPTION) {\n checkBoxArea.setVisible(false);\n fFile = fc.getSelectedFile();\n photoList.add(fFile.getPath());\n checkBoxArea.addCheckBox(fFile);\n int height = (int)checkBoxArea.getPreferredSize().getHeight();\n checkScroll.getVerticalScrollBar().setValue(height);\n\n checkBoxArea.setVisible(true);\n } else {\n return false;\n }\n return true;\n }",
"public void newFile() {\n\t\tString filename = \"untitled\";\n\t\tfilename = JOptionPane.showInputDialog(null,\n\t\t\t\t\"Enter the new file name\");\n\t\taddTab(filename+\".minl\");\n\t}",
"public void addRow(MyFile myFile) {\n\t\tint row = flexTable.getRowCount();\r\n\t\tButton filebtn = new Button(myFile.getName());\r\n\t\tfilebtn.addClickHandler(new MyfileClickHandler());\r\n\t\tif (myFile.getType() == FileType.DIR) {\r\n\t\t\tfilebtn.setStyleName(\"fileButton\");\r\n\t\t}\r\n\r\n\t\tButton modiftbtn = new Button(\"Modify\");\r\n\t\tmodiftbtn.addClickHandler(new ModifyButtonClickHandler());\r\n\t\tmodiftbtn.setTitle(myFile.getName());\r\n\t\tButton removrbtn = new Button(\"Remove\");\r\n\t\tremovrbtn.setTitle(myFile.getName());\r\n\t\tremovrbtn.addClickHandler(new RemoveButtonClickHandler());\r\n\t\tflexTable.setWidget(row, 0, filebtn);\r\n\t\tflexTable.setWidget(row, 1, new Label(myFile.getTypeName()));\r\n\t\tflexTable.setWidget(row, 2, modiftbtn);\r\n\t\tflexTable.setWidget(row, 3, removrbtn);\r\n\t}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n int geekid = Integer.parseInt(request.getParameter(\"geekid\"));\n if (ServletFileUpload.isMultipartContent(request)) {\n try {\n\n List<FileItem> multiparts = new ServletFileUpload(new DiskFileItemFactory()).parseRequest(request);\n\n for (FileItem item : multiparts) {\n\n if (!item.isFormField()) {\n item.write(new File(UPLOAD_DIRECTORY + File.separator + \"image\" + geekid + \".jpg\"));\n\n }\n \n String fileName = UPLOAD_DIRECTORY + File.separator + \"image\" + geekid + \".jpg\";\n\n }\n\n //File uploaded successfully\n request.setAttribute(\"message\", \"File Uploaded Successfully\");\n\n } catch (Exception ex) {\n\n request.setAttribute(\"message\", \"File Upload Failed due to \" + ex);\n\n }\n\n } else {\n\n request.setAttribute(\"message\",\n \"Sorry this Servlet only handles file upload request\");\n\n }\n\n request.getRequestDispatcher(\"/result.jsp\").forward(request, response);\n\n }",
"public void newFileButtonListener() {\r\n workSpace.setText(null);\r\n fileName = null;\r\n sansSerifButton.setSelected(true);\r\n italicFormatCheckBox.setSelected(false);\r\n boldFormatCheckBox.setSelected(false);\r\n }",
"public void fileUploadListener(FileUploadEvent e) {\n \r\n this.file = e.getFile();\r\n System.out.println(\"Uploaded File Name Is: \" + file.getFileName());\r\n this.anexo.setEndereco(this.uploadFile(file));\r\n Calendar c = Calendar.getInstance();\r\n Date data = c.getTime();\r\n SimpleDateFormat f = new SimpleDateFormat(\"ddMMyyyyHHss\"); \r\n this.anexo.setNome(f.format(data) + file.getFileName() );\r\n this.anexo.setTipo(file.getContentType());\r\n this.anexos.add(anexo);\r\n anexo = new Anexo();\r\n\r\n file = new DefaultUploadedFile();\r\n\r\n // Print out the information of the file\r\n //System.out.println(\"Uploaded File Name Is :: \" + file.getFileName() + \" :: Uploaded File Size :: \" + file.getSize());\r\n }",
"@Override\n public void onClick(View view) {\n if (view == imageView) {\n showFileChooser();\n }\n //if the clicked button is upload\n else if (view == btnPost) {\n uploadFile();\n\n }\n }",
"@Override\n public void onFileUploaded(FolderNode folderNode, FileNode fileNode) {\n choices.selectValue(fileNode.getName());\n closeAdditionalChoiceDialog(true);\n }",
"private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {\n JFileChooser fc = new JFileChooser();\n int result = fc.showDialog(this, \"Attach\");\n if (result == JFileChooser.APPROVE_OPTION) \n {\n selectedFile = fc.getSelectedFile();\n \tjTextField1.setText(selectedFile.getAbsolutePath());\n \n }\n \n }",
"@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t\t{\n\t\t\t\t\tpath = getLinkOfFoto();\n\t\t\t\t\tif(path.equals(\"\"))\n\t\t\t\t\t\treturn;\n\t\t\t\t\tactualCat.addFoto(path,actualCat.pathToImage(path));\n\t\t\t\t\tredraw(actualCat, panel);\n\t\t\t\t\t\n\t\t\t\t}",
"private void dropIn(String name, byte[] str, Long id) {\n VMFile uploadFile = new VMFile();\n // javascript からの戻りが0~255の範囲なので-128~127の範囲に補完する\n byte[] datas = new byte[str.length];\n for (int i = 0; i < str.length; i++) {\n datas[i] = (byte) (str[i] & 0xFF);\n }\n int index = name.lastIndexOf(\".\") == 0 ? name.length() : name.lastIndexOf(\".\") + 1;\n uploadFile.setName(name.substring(0, index - 1));\n uploadFile.setExtensionStr(name.substring(index));\n editResourceService.uploadFile(id, uploadFile, datas, new AsyncCallback<Long>() {\n\n @Override\n public void onFailure(Throwable caught) {\n GWT.log(caught.getMessage());\n }\n\n @Override\n public void onSuccess(Long result) {\n if (result.equals(-1L)) {\n isAlreadyExist = true;\n showUploadFinishMessage();\n return;\n }\n uploadFile.setId(result);\n showUploadFinishMessage();\n\n fileTreeNodeFactory.getFileTreeNode(tree, id, uploadFile);\n if (treeGrid.anySelected())\n treeGrid.deselectAllRecords();\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n treeGrid.deselectAllRecords();\n treeGrid.selectRecord(fileTreeNodeFactory.findTreeNode(tree, uploadFile.getId()));\n }\n });\n }",
"public void addTagButton(ActionEvent event) {\n\t\tObservableList<ImageView> pho;\n\t\tpho = PhotoListDisplay.getSelectionModel().getSelectedItems();\n\t\t\n\t\tif(pho.isEmpty() == true) {\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\talert.setTitle(\"Error!\");\n\t\t\talert.setHeaderText(\"No Photo Selected\");\n\t\t\talert.setContentText(\"No photo selected. Delete Failed!\");\n\t\t\talert.showAndWait();\n\t\t\t\n\t\t\tnewTagName.setText(\"\");\n\t\t\tnewTagValue.setText(\"\");\n\t\t\t\n\t\t\ttagNameLabel.setVisible(false);\n\t \ttagValueLabel.setVisible(false);\n\t \tsubmitNewTagButton.setVisible(false);\n\t \tcancelNewTagButton.setVisible(false);\n\t \tnewTagName.setVisible(false);\n\t \tnewTagValue.setVisible(false);\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\ttagNameLabel.setVisible(true);\n \ttagValueLabel.setVisible(true);\n \tsubmitNewTagButton.setVisible(true);\n \tcancelNewTagButton.setVisible(true);\n \tnewTagName.setVisible(true);\n \tnewTagValue.setVisible(true);\n\t}",
"stockFilePT102.StockFileDocument.StockFile addNewStockFile();",
"public void uploadMultipart() {\n //getting the actual path of the image\n String path = getPath(filePath);\n\n //Uploading code\n try {\n String uploadId = UUID.randomUUID().toString();\n\n //Creating a multi part request\n new MultipartUploadRequest(this, uploadId, \"todo\")\n .addFileToUpload(path, \"image\") //Adding file\n .setNotificationConfig(new UploadNotificationConfig())\n .setMaxRetries(2)\n .startUpload(); //Starting the upload\n\n } catch (Exception exc) {\n Toast.makeText(this, exc.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(\n\t\t\t\t\t\tIntent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n\t\t\t\tif(isAdded())\n\t\t\t\t\tstartActivityForResult(i, RESULT_LOAD_POST_IMAGE);\n\t\t\t\telse{\n\t\t\t\t\tstatusAlert.dismiss();\n\t\t\t\t\tToast.makeText(getActivity(), \"Something went wrong.Try sharing your updates again.\", 1000).show();\n\t\t\t\t}\n\t\t\t}",
"void addButton_actionPerformed(ActionEvent e) {\n addButton();\n }",
"@Override\n\t\t\tpublic void uploading(String path, String key) {\n\t\t\t\tsynchronized(this){\n //更新界面\n int row = fileKeys.indexOf(key);\n resultTable.setValueAt(\"uploading\", row, 2);\n\t\t\t\t}\n\t\t\t}",
"public void openFileDialog() {\n\tswitch(buttonAction) {\n\t case SELECT_FILES:\n openFileDialog(fileUpload, true);\n break;\n\t case SELECT_FILE:\n default:\n openFileDialog(fileUpload, false);\n break;\n\t}\n }",
"public void uploadPhotoProfile(FileEntryEvent ev){\n\tArrayList<Photo> listePhotos=new ArrayList<Photo>();\r\n\tlistePhotos=mbb.getMembre().getListePhotos();\r\n\tint idPhotoProfile=0;\r\n\t\r\n\tfor(Photo photo : listePhotos)\r\n\t{\r\n\t\tif(photo.getIsProfil())\r\n\t\t\tidPhotoProfile=photo.getId();\r\n\t}\r\n\t\r\n\tint photoProfileSupprime=PhotoManager.deletePhoto(idPhotoProfile);\r\n\tSystem.out.println(photoProfileSupprime);\r\n\tif(photoProfileSupprime>0)\r\n\t{\r\n\t\t\r\n\t//mettre la main sur le fileEntry\r\n\tFileEntry fiE = (FileEntry)ev.getSource();\r\n\t//récupérer ses results\r\n\tFileEntryResults fr = fiE.getResults();\r\n\t\r\n\t// Create an instance of SimpleDateFormat used for formatting \r\n\t\t\t// the string representation of date (month/day/year)\r\n\t\t\tDateFormat df = new SimpleDateFormat(\"ddMMyyyyHHmmss\");\r\n\r\n\t\t\t// Get the date today using Calendar object.\r\n\t\t\tDate today = Calendar.getInstance().getTime(); \r\n\t\t\t// Using DateFormat format method we can create a string \r\n\t\t\t// representation of a date with the defined format.\r\n\t\t\tString reportDate = df.format(today);\r\n\t\t\t\r\n\t\r\n\t//boucler sur les FileInfo\r\n\tfor(FileEntryResults.FileInfo fi: fr.getFiles()){\r\n\t\t//s'assurer que le fichier est enregistrer\r\n\t\tif(fi.isSaved()){\r\n\t\t\tSystem.out.println(\"le nom ========= \"+reportDate+fi.getFileName());\r\n\t\t\t//recu le fichier\r\n\t\t\tFile f = fi.getFile();\r\n\t\t\t\r\n\t\t\t//TODO verifier que c'est le bon type de fichier\r\n\t\t\t//renommer\r\n\t\t\ttry {\r\n\t\t\t\tString cheminApp=FacesContext.getCurrentInstance().getExternalContext().getRealPath(\"/\");\r\n\t\t\t\tString newch=cheminApp;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tboolean ren=f.renameTo(new File(newch+\"photos/\"+reportDate+fi.getFileName()));\r\n\t\t\t\t\r\n\t\t\t\tif (ren) {\r\n\t\t\t\t\tthis.chemin=\"photos/\"+reportDate+fi.getFileName();\r\n\t\t\t\t\tSystem.out.println(newch);\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"pas possible. \"+newch);\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//ajouter un message \r\n\t\t\tFacesContext.getCurrentInstance().addMessage(fiE.getClientId(),new FacesMessage(\"le fichier a été uploadé\"));\r\n\t\t\r\n\t\t\tPhoto photo= new Photo();\r\n\t\t\tphoto.setMemberID(mbb.getMembre().getMembreId());\r\n\t\t\tphoto.setChemin(chemin);\r\n\t\t\tphoto.setIsProfil(true);\r\n\r\n\t\t\tint ajoute=PhotoManager.addPhoto(photo);\r\n\t\t\tSystem.out.println(\"photo profile ajoute\");\r\n\t\t\tif(ajoute>0){\r\n\t\t\t\tmbb.getMembre().setListePhotos(PhotoManager.getPhotosByMemberId(mbb.getMembre().getMembreId()));//maj liste photos\r\n\t\t\t\tArrayList<Photo> photos=new ArrayList<Photo>();\r\n\t\t\t\tphotos=PhotoManager.getProfilPhotosByMemberId(mbb.getMembre().getMembreId());\r\n\t\t\t\tmbb.getMembre().setProfilImagePath(photos.get(0).getChemin()); //maj chemin photo profil\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}\t\r\n\t}",
"void btnValidateFile(File file);",
"@Override\n\tpublic FileModel add(FileModel c) {\n\t\treturn fm.save(c);\n\t}",
"public void addFile (File f) {\n Arquivo arquivo = new Arquivo(this, f);\n arquivo.setVisible(true);\n\n panFiles.add(arquivo);\n }",
"void setNewFile(File file);",
"public void fileChooser() {\n\t\tWindow stage = mediaView.getScene().getWindow();\n// configureFileChooser(fileChooser);\n\t\tfileChooser.setTitle(\"Open Resource File\");\n\t\tfileChooser.getExtensionFilters().addAll(new ExtensionFilter(\"Video Files\", \"*.mp4\", \"*.mpeg\"),\n\t\t\t\tnew ExtensionFilter(\"Audio Files\", \"*.mp3\"),\n\t\t\t\tnew ExtensionFilter(\"All Files\", \"*.*\"));\n\t\tFile selectedFile = fileChooser.showOpenDialog(stage);\n\t\tif (selectedFile != null) {\n\t\t\ttry {\n\t\t\t\tif(arrayList.size() != 0) {\n\t\t\t\t\tmp.stop();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdesktop.open(selectedFile);\n\t\t\t\tdirectory = selectedFile.getAbsolutePath();\n\t\t\t\t\n\t\t\t\tplayMedia(directory);\n\t\t\t\t\n\t\t\t\tarrayList.add(new File(directory));\n//\t\t\t\tSystem.out.println(arrayList.get(i).getName());\n\t\t\t\ti++;\n\t\t\t\t\n\n\t\t\t} catch (IOException ex) {\n\t\t\t\tLogger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);\n\t\t\t}\n\t\t}\n\t}",
"public edu.umich.icpsr.ddi.FileTypeType addNewFileType()\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.FileTypeType target = null;\n target = (edu.umich.icpsr.ddi.FileTypeType)get_store().add_element_user(FILETYPE$8);\n return target;\n }\n }",
"public void uploadTemp(FileUploadEvent event) {\n setFileImage(event.getFile());\n getSelected().setUrlImage(event.getFile().getFileName());\n RequestContext.getCurrentInstance().update(\"image\");\n\n }",
"public void addFileType( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), FILETYPE, value);\r\n\t}",
"private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n pctcollection.add(filename);\n jLabel3.setText(MAX-approved+\"\");\n JOptionPane.showMessageDialog(this,\"PICTURE SAVED\");\n approved++;\n \n if(approved>=MAX)\n {\n JOptionPane.showMessageDialog(this,\"IMAGE INDEX COMPLETED NOW YOU CAN REGISTER\");\n jButton1.setEnabled(false);\n jButton2.setEnabled(false);\n return;\n }\n updateCuePoints();\n\n }",
"@FXML\r\n private void handleBrowseBtn(ActionEvent event) {\r\n openFile();\r\n }",
"private void btnAgregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarActionPerformed\n \n camino=null;\n \n int status = fileChooser.showOpenDialog (null);\n if (status == JFileChooser.APPROVE_OPTION){\n File selectedFile = fileChooser.getSelectedFile();\n camino = selectedFile.getAbsolutePath();\n }\n else{ \n if (status == JFileChooser.CANCEL_OPTION){\n System.out.println(\"CANCELAR\");\n }\n \n }\n try {\n cancion.agregarCancion(camino);\n } catch (IOException ex) {\n Logger.getLogger(biblioteca.class.getName()).log(Level.SEVERE, null, ex);\n } catch (UnsupportedTagException ex) {\n Logger.getLogger(biblioteca.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InvalidDataException ex) {\n Logger.getLogger(biblioteca.class.getName()).log(Level.SEVERE, null, ex);\n }\n String[] test = cancion.mostrarCancion(i);\n lista.addElement(\" \"+test[0]);\n libCancion.setModel(lista);\n i++;\n }",
"@And(\"Select Attach File Button\")\n\tpublic void AttachFile() throws IOException, InterruptedException {\n\t\tdriver.findElement(By.xpath(\"//div[@class='bAK' ]//child::div[@aria-label='Attach files']\")).click();\n\t\tRuntime.getRuntime().exec( System.getProperty(\"user.dir\")+ \"\\\\src\\\\test\\\\resources\\\\FileUpload.exe\");\n\t\tThread.sleep(10000); \n\t\t}",
"UploadInfo advancedUpload(AdvanceFile file);",
"public void btnImgAddClick(View view) {\n\t\tIntent photoPickerIntent = new Intent(Intent.ACTION_GET_CONTENT);\n\t\tphotoPickerIntent.setType(\"image/*\");\n\t\tstartActivityForResult(photoPickerIntent, 1);\n\t}",
"@Override\n\tpublic ToolStripButton getFileButton() {\n\t\treturn fileButton;\n\t}",
"@Subscribe\n public void onOk(OkClickedEvent event) {\n switch (resourceType) {\n case LOCAL:\n default:\n final FileUpload uploadedFile = fileUpload.getFileUpload();\n if (uploadedFile != null) {\n eventBusModel.getObject().post(\n new ResourceAddReadyEvent(event.getTarget(), uploadedFile, resourceClass));\n event.getTarget().appendJavaScript(\"$('#upload-resource-modal').modal('hide')\");\n }\n break;\n case REMOTE:\n eventBusModel.getObject()\n .post(new ResourceAddReadyEvent(event.getTarget(), resourceURI, resourceClass));\n event.getTarget().appendJavaScript(\"$('#upload-resource-modal').modal('hide')\");\n break;\n }\n event.getTarget().add(feedbackPanel);\n }",
"void addButton_actionPerformed(ActionEvent e) {\n doAdd();\n }",
"public void addFile(FileDiffFile file) {\n \t\tfiles.add(file);\n \t}",
"@Override\r\n public void actionPerformed( ItemActionEvent<File> event )\r\n {\n }",
"private void uploadPathPhotoButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_uploadPathPhotoButtonActionPerformed\n\n clearInformation();\n JFileChooser dialogue = new JFileChooser();\n // Show the dialog to choose the image file\n int Retour = dialogue.showDialog(dialogue, OPEN);\n File photoToUpload = null;\n\n // Choose the image file\n if (Retour == JFileChooser.APPROVE_OPTION) {\n photoToUpload = dialogue.getSelectedFile();\n String pathUploadPhoto = photoToUpload.getAbsolutePath();\n String extension = pathUploadPhoto.substring(pathUploadPhoto.lastIndexOf(POINT));\n // verify the extension of the input file\n if (!extension.equals(JPEG_EXTENSION) && !extension.equals(BITMAP_EXTENSION) && !extension.equals(PNG_EXTENSION)) {\n displayInformation(ERROR_EXTENSION);\n } else {\n pathPhotoUploadTextField.setText(photoToUpload.getAbsolutePath());\n }\n }\n }",
"private void jButtonBrowseInputFilesActionPerformed(ActionEvent e) {\n\t\tJFileChooser fileChooser = new JFileChooser();\n\t\tfileChooser.addChoosableFileFilter(new RootFileFilter());\n\t\tfileChooser.setAcceptAllFileFilterUsed(false);\n\t\tint result = fileChooser.showOpenDialog(this);\n\t\tif (result == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile file = fileChooser.getSelectedFile();\n\t\t\tjTextFieldInputFiles.setText(file.getAbsolutePath());\n\t\t}\n\t}",
"public void addFile(MultipartFile multipartFile, String username) throws IOException {\n InputStream fis = multipartFile.getInputStream();\n // create an output buffer\n ByteArrayOutputStream buffer = new ByteArrayOutputStream();\n // write data to the output buffer\n int nRead;\n byte[] data = new byte[1024];\n while ((nRead = fis.read(data, 0, data.length)) != -1) {\n buffer.write(data, 0, nRead);\n }\n buffer.flush();\n\n Integer userID = usersMapper.getUser(username).getUserID();\n String fileName = multipartFile.getOriginalFilename();\n Integer fileID = 0;\n String contentType = multipartFile.getContentType();\n String fileSize = String.valueOf(multipartFile.getSize());\n byte[] fileData = buffer.toByteArray();\n\n Files file = new Files(fileID, fileName, contentType,\n fileSize, userID, fileData);\n filesMapper.insertFile(file);\n }",
"public void subir_file()\n {\n FileChooser fc = new FileChooser();\n\n fc.getExtensionFilters().addAll(new FileChooser.ExtensionFilter(\"PDF Files\",\"*.pdf\")\n , new FileChooser.ExtensionFilter(\"Jpg Images\",\"*.jpg\",\"*.JPEG\",\"*.JPG\",\"*.jpeg\",\"*.PNG\",\"*.png\"));\n\n File fileSelected = fc.showOpenDialog(null);\n\n if (fileSelected!= null){\n txt_ruta.setText(fileSelected.getPath());\n\n if(txt_ruta.getText().contains(\".pdf\"))\n {\n System.out.println(\"si es pdf\");\n Image image = new Image(\"/sample/Clases/pdf.png\");\n image_esquema.setImage(image);\n\n }\n else\n {\n File file = new File(txt_ruta.getText());\n javafx.scene.image.Image image = new Image(file.toURI().toString());\n image_esquema.setImage(image);\n }\n\n }\n else{\n System.out.println(\"no se seleccinoó\");\n }\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n uploadFile(request, response);\n\n }",
"private void addAttachment() {\n Intent intentFromGallery = new Intent();\n if (Build.VERSION.SDK_INT < 19) {\n intentFromGallery = new Intent(Intent.ACTION_GET_CONTENT);\n intentFromGallery.setType(\"image/*\");\n } else {\n intentFromGallery = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n }\n\n try {\n startActivityForResult(Intent.createChooser(intentFromGallery, \"请选择要上传的图片\"), ADD_ATTACHMENT);\n// 这个是进行裁剪\n// startActivityForResult(intentFromGallery, IMAGE_REQUEST_CODE);\n } catch (android.content.ActivityNotFoundException ex) {\n Toast.makeText(this, \"无法选择文件,请先安装文件管理器\", Toast.LENGTH_SHORT).show();\n }\n }",
"private void txttenfileActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"public void submit() {\n fileUploadContainer.upload.submit();\n }",
"private void btnBrowseActionPerformed(java.awt.event.ActionEvent evt) {\n String []imageTypes = new String[]{\".jpg\", \".png\", \".gif\"};\n\n if (imageFileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {\n getFileLocation = imageFileChooser.getSelectedFile();\n\n String getImageType = getFileLocation.getName();\n getImageType = getImageType.substring(getImageType.indexOf(\".\"));\n\n if (checkImageType(getImageType, imageTypes)) {\n\n lblImage.setIcon( new ImageIcon(new ImageIcon(getFileLocation.getAbsolutePath()).getImage().getScaledInstance(lblImage.getWidth(), lblImage.getHeight(), Image.SCALE_DEFAULT)));\n txtfImageLocation2.setText(getFileLocation.getName());\n\n } else {\n JOptionPane.showMessageDialog(this, \"invalid file type\", \"upload\", JOptionPane.ERROR_MESSAGE);\n }\n } else {\n JOptionPane.showMessageDialog(this, \"upload an image\", \"upload \", JOptionPane.ERROR_MESSAGE);\n }\n }",
"public void actionPerformed(ActionEvent arg0) {\n \tlblWarning.setVisible(false);\r\n \t\r\n \t\r\n \t//初始化文件选择框\r\n \tJFileChooser fDialog = new JFileChooser();\r\n \t//设置文件选择框的标题 \r\n \tfDialog.setDialogTitle(\"请选择要上传的图片\");\r\n \t//弹出选择框\r\n \tint returnVal = fDialog.showOpenDialog(null);\r\n \t// 如果是选择了文件\r\n \tif(JFileChooser.APPROVE_OPTION == returnVal){ \r\n \t\t//把路径值 写到 textField 中\t\r\n \t\ttxtPicPath.setText(fDialog.getSelectedFile().toString());\r\n \t}\r\n \tString path = txtPicPath.getText().toString();\r\n \t//Limit this field to jpg and png and \r\n \t//Force this field must be filled \r\n \tif (!path.isEmpty() && !path.equals(\"\") && !path.equals(null) \r\n \t\t\t&& (path.endsWith(\"jpg\") || path.endsWith(\"png\"))) {\r\n \t\t\r\n \tFile upload = new File(path);\r\n \t\r\n\t \ttry{ \r\n\t\t \tFileOutputStream fos1 = new FileOutputStream(fileUploadedProduct1); \r\n\t\t \tFileInputStream fis=new FileInputStream(upload); \r\n\t\t \tbyte[] buffer=new byte[1024]; \r\n\t\t \tint len=0; \r\n\t\t \twhile((len=fis.read(buffer))>0){ \r\n\t\t \t\tfos1.write(buffer,0,len); \r\n\t\t \t\t\r\n\t\t \t} \r\n\t\t \tfos1.close(); \r\n\t\t \tfis.close();\r\n\t } catch (Exception e) { \r\n\t \te.printStackTrace(); \r\n\t \tJOptionPane.showMessageDialog(null, e.getMessage(), \"错误\", JOptionPane.ERROR_MESSAGE);\r\n\t } \r\n } \r\n else {\r\n \t//For warning msg\r\n \t//lblWarning = new JLabel(\"上传图片的格式或者路径不对\");\r\n \tfr.add(lblWarning);\r\n \t\t//Font font = new Font(\"Dialog\",1,16);\r\n \t\t//lblWarning.setFont(font);\r\n \t\tlblWarning.setVisible(true);\r\n \t\t//lblWarning.setBounds(150,400,400,50);\r\n }\r\n }",
"public void addFile(final String file);",
"public void newDataFile(Stage primaryStage) {\n String title = \"Upload Data File\";\n\n VBox vbox = vboxFormat();\n\n Label title1 = new Label(\"Input CSV File Name\");\n title1.setFont(new Font(\"Arial\", 15));\n Label direction2 = new Label(\"enter file name, hit enter, then done\");\n direction2.setFont(new Font(\"Arial\", 10));\n TextField userInput = new TextField(\"file name with .csv extension\");\n // TODO program text field event, this is where the file name will be collected,\n // send to another class to handle!\n // Input file class called to check syntax of file name and read.\n userInput.setOnAction(e -> {\n new InputFile(userInput.getText(), report);\n updateTable();\n }); // working\n\n // Add done button\n Button done = buttonFormat(\"Done\", 3);\n\n vbox.getChildren().addAll(title1, userInput, direction2, done);\n showDialogWindow(primaryStage, vbox, title, done);\n updateTable();\n }",
"public void addPicture() {\n FileChooser chooser = new FileChooser();\n chooser.setTitle(\"Upload your pic for this post\");\n file = chooser.showOpenDialog(null);\n if (file != null) {\n\n Image profilePicImage = new Image(file.toURI().toString());\n try {\n this.postPic = new FileInputStream(file).readAllBytes();\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n postImage.setImage(profilePicImage);\n }\n }",
"public void addFileType(java.lang.String value) {\r\n\t\tBase.add(this.model, this.getResource(), FILETYPE, value);\r\n\t}",
"public void addBody(Body body) throws SAXException, WingException,\n UIException, SQLException, IOException, AuthorizeException\n {\n \tif(this.editFile!=null)\n {\n editFile.addBody(body);\n return;\n }\n else if(editBitstreamPolicies!=null && isAdvancedFormEnabled){\n editBitstreamPolicies.addBody(body);\n return;\n }\n else if(editPolicy!=null && isAdvancedFormEnabled){\n editPolicy.addBody(body);\n return;\n }\n \n // Get a list of all files in the original bundle\n\t\tItem item = submission.getItem();\n\t\tCollection collection = submission.getCollection();\n\t\tString actionURL = contextPath + \"/handle/\"+collection.getHandle() + \"/submit/\" + knot.getId() + \".continue\";\n\t\tboolean disableFileEditing = (submissionInfo.isInWorkflow()) && !ConfigurationManager.getBooleanProperty(\"workflow\", \"reviewer.file-edit\");\n\t\tBundle[] bundles = item.getBundles(\"ORIGINAL\");\n\t\tBitstream[] bitstreams = new Bitstream[0];\n\t\tif (bundles.length > 0)\n\t\t{\n\t\t\tbitstreams = bundles[0].getBitstreams();\n\t\t}\n\t\t\n\t\t// Part A: \n\t\t// First ask the user if they would like to upload a new file (may be the first one)\n \tDivision div = body.addInteractiveDivision(\"submit-upload\", actionURL, Division.METHOD_MULTIPART, \"primary submission\");\n \tdiv.setHead(T_submission_head);\n \taddSubmissionProgressList(div);\n \t\n \t\n \tList upload = null;\n \tif (!disableFileEditing)\n \t{\n \t\t// Only add the upload capabilities for new item submissions\n\t \tupload = div.addList(\"submit-upload-new\", List.TYPE_FORM);\n\t upload.setHead(T_head); \n\t \n\t File file = upload.addItem().addFile(\"file\");\n\t file.setLabel(T_file);\n\t file.setHelp(T_file_help);\n\t file.setRequired();\n\t \n\t // if no files found error was thrown by processing class, display it!\n\t if (this.errorFlag==org.dspace.submit.step.UploadWithEmbargoStep.STATUS_NO_FILES_ERROR)\n\t {\n file.addError(T_file_error);\n }\n\n // if an upload error was thrown by processing class, display it!\n if (this.errorFlag == org.dspace.submit.step.UploadWithEmbargoStep.STATUS_UPLOAD_ERROR)\n {\n file.addError(T_upload_error);\n }\n\n // if virus checking was attempted and failed in error then let the user know\n if (this.errorFlag == org.dspace.submit.step.UploadWithEmbargoStep.STATUS_VIRUS_CHECKER_UNAVAILABLE)\n {\n file.addError(T_virus_checker_error);\n }\n\n // if virus checking was attempted and a virus found then let the user know\n if (this.errorFlag == org.dspace.submit.step.UploadWithEmbargoStep.STATUS_CONTAINS_VIRUS)\n {\n file.addError(T_virus_error);\n }\n\t \t\n\t Text description = upload.addItem().addText(\"description\");\n\t description.setLabel(T_description);\n\t description.setHelp(T_description_help);\n\n\n // if AdvancedAccessPolicy=false: add simpleForm in UploadWithEmbargoStep\n if(!isAdvancedFormEnabled){\n AccessStepUtil asu = new AccessStepUtil(context);\n // if the item is embargoed default value will be displayed.\n asu.addEmbargoDateSimpleForm(item, upload, errorFlag);\n asu.addReason(null, upload, errorFlag);\n }\n\n\t Button uploadSubmit = upload.addItem().addButton(\"submit_upload\");\n\t uploadSubmit.setValue(T_submit_upload);\n\n \t}\n\n make_sherpaRomeo_submission(item, div);\n \n // Part B:\n // If the user has already uploaded files provide a list for the user.\n if (bitstreams.length > 0 || disableFileEditing)\n\t\t{\n\t Table summary = div.addTable(\"submit-upload-summary\",(bitstreams.length * 2) + 2,7);\n\t summary.setHead(T_head2);\n\t \n\t Row header = summary.addRow(Row.ROLE_HEADER);\n\t header.addCellContent(T_column0); // primary bitstream\n\t header.addCellContent(T_column1); // select checkbox\n\t header.addCellContent(T_column2); // file name\n\t header.addCellContent(T_column3); // size\n\t header.addCellContent(T_column4); // description\n\t header.addCellContent(T_column5); // format\n\t header.addCellContent(T_column6); // edit button\n\t \n\t for (Bitstream bitstream : bitstreams)\n\t {\n\t \tint id = bitstream.getID();\n\t \tString name = bitstream.getName();\n\t \tString url = makeBitstreamLink(item, bitstream);\n\t \tlong bytes = bitstream.getSize();\n\t \tString desc = bitstream.getDescription();\n\t \tString algorithm = bitstream.getChecksumAlgorithm();\n\t \tString checksum = bitstream.getChecksum();\n\n\t \t\n\t \tRow row = summary.addRow();\n\n\t // Add radio-button to select this as the primary bitstream\n Radio primary = row.addCell().addRadio(\"primary_bitstream_id\");\n primary.addOption(String.valueOf(id));\n \n // If this bitstream is already marked as the primary bitstream\n // mark it as such.\n if(bundles[0].getPrimaryBitstreamID() == id) {\n primary.setOptionSelected(String.valueOf(id));\n }\n\t \t\n\t \tif (!disableFileEditing)\n\t \t{\n\t \t\t// Workflow users can not remove files.\n\t\t CheckBox remove = row.addCell().addCheckBox(\"remove\");\n\t\t remove.setLabel(\"remove\");\n\t\t remove.addOption(id);\n\t \t}\n\t \telse\n\t \t{\n\t \t\trow.addCell();\n\t \t}\n\t \t\n\t row.addCell().addXref(url,name);\n\t row.addCellContent(bytes + \" bytes\");\n\t if (desc == null || desc.length() == 0)\n {\n row.addCellContent(T_unknown_name);\n }\n\t else\n {\n row.addCellContent(desc);\n }\n\t \n BitstreamFormat format = bitstream.getFormat();\n\t if (format == null)\n\t {\n\t \trow.addCellContent(T_unknown_format);\n\t }\n\t else\n\t {\n int support = format.getSupportLevel();\n\t \tCell cell = row.addCell();\n\t \tcell.addContent(format.getMIMEType());\n\t \tcell.addContent(\" \");\n\t \tswitch (support)\n\t \t{\n\t \tcase 1:\n\t \t\tcell.addContent(T_supported);\n\t \t\tbreak;\n\t \tcase 2:\n\t \t\tcell.addContent(T_known);\n\t \t\tbreak;\n\t \tcase 3:\n\t \t\tcell.addContent(T_unsupported);\n\t \t\tbreak;\n\t \t}\n\t }\n\t \n\t Button edit = row.addCell().addButton(\"submit_edit_\"+id);\n\t edit.setValue(T_submit_edit);\n\n if(isAdvancedFormEnabled){\n Button policy = row.addCell().addButton(\"submit_editPolicy_\"+id);\n policy.setValue(T_submit_policy);\n }\n\n Row checksumRow = summary.addRow();\n\t checksumRow.addCell();\n\t Cell checksumCell = checksumRow.addCell(null, null, 0, 6, null);\n\t checksumCell.addHighlight(\"bold\").addContent(T_checksum);\n\t checksumCell.addContent(\" \");\n\t checksumCell.addContent(algorithm + \":\" + checksum);\n\t }\n\t \n\t if (!disableFileEditing)\n\t {\n\t \t// Workflow users can not remove files.\n\t\t Row actionRow = summary.addRow();\n\t\t actionRow.addCell();\n\t\t Button removeSeleceted = actionRow.addCell(null, null, 0, 6, null).addButton(\"submit_remove_selected\");\n\t\t removeSeleceted.setValue(T_submit_remove);\n\t }\n\t \n\t upload = div.addList(\"submit-upload-new-part2\", List.TYPE_FORM);\n\n\t\t}\n\n // Part C:\n // add standard control/paging buttons\n addControlButtons(upload);\n }",
"void addFile(RebaseJavaFile jf)\n{\n if (file_nodes.contains(jf)) return;\n\n file_nodes.add(jf);\n jf.setRoot(this);\n}"
]
| [
"0.7087335",
"0.7084301",
"0.7010182",
"0.67819166",
"0.66678995",
"0.653589",
"0.63756675",
"0.63696676",
"0.63674957",
"0.6280958",
"0.62578464",
"0.6244138",
"0.62266296",
"0.62029946",
"0.6201972",
"0.61929893",
"0.6181139",
"0.61528736",
"0.6148532",
"0.61423194",
"0.6136258",
"0.61112344",
"0.6101938",
"0.60667",
"0.604106",
"0.6027106",
"0.6019699",
"0.6005065",
"0.5995265",
"0.5993667",
"0.59872884",
"0.59750503",
"0.5964907",
"0.5964477",
"0.5947698",
"0.5946543",
"0.59233093",
"0.59183395",
"0.5918061",
"0.59170437",
"0.59037787",
"0.5893182",
"0.58904016",
"0.5875071",
"0.58638453",
"0.5858063",
"0.5854626",
"0.58480465",
"0.5843934",
"0.5841189",
"0.58410424",
"0.58404285",
"0.5835665",
"0.5835647",
"0.5813931",
"0.5809472",
"0.5806427",
"0.5802364",
"0.5797733",
"0.57952005",
"0.5793451",
"0.577899",
"0.5777379",
"0.5775836",
"0.5768586",
"0.57683027",
"0.5762632",
"0.57594156",
"0.5755589",
"0.5751121",
"0.5742295",
"0.57392323",
"0.57329255",
"0.5721648",
"0.57196033",
"0.57179385",
"0.57054204",
"0.57036704",
"0.5698762",
"0.5696494",
"0.569372",
"0.56932425",
"0.5692295",
"0.56892335",
"0.5682661",
"0.5676995",
"0.56768614",
"0.5675931",
"0.5675648",
"0.5674174",
"0.5670895",
"0.56708676",
"0.5668083",
"0.566535",
"0.5661781",
"0.56514084",
"0.5646795",
"0.5646394",
"0.5643415",
"0.5637738"
]
| 0.7237083 | 0 |
GWT.log("MGWT.getOsDetection().isTablet()=" + MGWT.getOsDetection().isTablet()); GWT.log("MyWebApp.isMobileDevice()=" + MyWebApp.isMobileDevice()); | protected boolean isUploadSupported() {
if (MyWebApp.isDesktop()) {
return true;
} else {
return false;
}
//
//
// if (MyWebApp.isMobileDevice()) {
// return false;
// }
//
// return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isTablet();",
"public static boolean isTablet() {\r\n\t\treturn isTablet;\r\n\t}",
"public static boolean isTablet() {\n return TeamUp.getAppContext().getResources().getBoolean(R.bool.is_tablet);\n }",
"public boolean isTablet() { \n\t \tTelephonyManager telephony = (TelephonyManager) activity.getSystemService(Context.TELEPHONY_SERVICE); \n\t \tint type = telephony.getPhoneType();\n\t \tif (type == TelephonyManager.PHONE_TYPE_NONE) { return true;} \n\t \t return false; \n\t }",
"public boolean isTablet() {\n return mState.isTablet;\n }",
"boolean hasMobileDeviceConstant();",
"public static native boolean isMobile() /*-{\r\n\t\treturn $wnd.floatz.browser.isMobile();\r\n\t}-*/;",
"public boolean isMobile() {\n return SecurityUtil.isMobile();\n }",
"public static boolean isTablet(Context context) {\n return (context.getResources().getConfiguration().screenLayout\n & Configuration.SCREENLAYOUT_SIZE_MASK)\n >= Configuration.SCREENLAYOUT_SIZE_LARGE;\n }",
"public String deviceType(){\n String deviceType;\n size = driver.manage().window().getSize();\n if((size.getHeight()>800)&&(size.getWidth()>500)){\n return deviceType = \"iPad\";\n } else {\n return deviceType = \"iPhone\";\n }\n }",
"public static native boolean isMobileWebkit() /*-{\r\n\t\treturn $wnd.floatz.browser.isMobileWebkit();\r\n\t}-*/;",
"private boolean isSmallTablet(DisplayMetrics metrics) {\n float dpWidth = metrics.widthPixels / metrics.density;\n return (dpWidth >= 600 && dpWidth < 720);\n }",
"private static native boolean isDevelopmentMode()/*-{\n return typeof $wnd.__gwt_sdm !== 'undefined';\n }-*/;",
"public static boolean isEmulator(){\n String brand = Build.BRAND;\n if (brand.equalsIgnoreCase(\"generic\")) {\n return true;\n } else {\n return false;\n }\n }",
"@Test\n public void testMobileAndroid() {\n try {\n\n System.out.println(\"Running test on Android mobile browser\");\n DeviceDescription description = new DeviceDescription();\n description.setOsType(\"Android\");\n description.setOsVersion(\">=6.0\");\n\n Device device = MobileLab.lockDevice(description);\n Browser browser2 = BrowserFactory.launch(BrowserType.CHROME, device);\n navigateBrowser(browser2);\n Reporter.reportEvent(\"Image of Mobile\", \"Using Chrome on Android\", Status.Passed, browser2.getSnapshot());\n windowsSync(1500);\n\n }\n catch (GeneralLeanFtException glftex) {System.out.println(\"GeneralLeanFtException: \" + glftex.getMessage());}\n catch (InterruptedException iex) {System.out.println(\"InterruptedException: \" + iex.getMessage());}\n catch (ReportException rex){System.out.println(\"ReportException: \" + rex.getMessage());}\n catch (StringIndexOutOfBoundsException soobEx) {System.out.println(\"StringIndexOutOfBoundsException: \" + soobEx.getMessage());}\n }",
"boolean onPhone() {\n\t\treturn ((getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK)\n\t\t\t\t< Configuration.SCREENLAYOUT_SIZE_LARGE);\n\t}",
"public void setTablet(boolean tablet) {\n isTablet = tablet;\n }",
"public boolean isAbovePlatform() { return isAbovePlatform; }",
"private static boolean supportedPlatform() {\n return System.getProperty(\"os.name\").startsWith(\"iPhone\");\n }",
"boolean hasMobileAppCategoryConstant();",
"private boolean m21865i() {\n TelephonyManager telephonyManager = (TelephonyManager) this.f16409k.getSystemService(\"phone\");\n if (telephonyManager != null) {\n return telephonyManager.getNetworkOperatorName().equalsIgnoreCase(\"android\");\n }\n return false;\n }",
"boolean isDesktopGL();",
"private static boolean m4017c() {\n String property = System.getProperty(\"java.runtime.name\");\n if (property == null) {\n return false;\n }\n return property.toLowerCase(Locale.US).contains(AlibcMiniTradeCommon.PF_ANDROID);\n }",
"private boolean isXLargeTablet() {\n if (((WindowManager) this.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getRotation() % 180 != 0)\n return true;\n return false;\n }",
"public boolean getIsInPlatform(){\n return isInPlatform();\n }",
"@Test\n\tpublic void testDesktopNonIphone()\n\t{\n\n\t\tfor (final String ua : desktop_ua)\n\t\t{\n\t\t\tLOG.info(\"Testing :\" + ua);\n\t\t\tassertTrue(\"Api fails to identify as a desktop device: (\" + ua + \")\", detectionService.isDesktop(ua));\n\t\t\tassertFalse(\"Api wrongly identify as a iphone: (\" + ua + \")\", detectionService.isiPhoneCapable(ua,\n\t\t\t\t\tnew ArrayList<String>()));\n\t\t\tassertFalse(\"Api wrongly identify as a mobile device: (\" + ua + \")\", detectionService.isMobileDevice(ua));\n\t\t}\n\n\t}",
"private static boolean isXLargeTablet(Context context)\n {\n return (context.getResources().getConfiguration().screenLayout\n & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;\n }",
"Object getPlatform();",
"private static boolean isXLargeTablet(Context context) {\n return (context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;\n }",
"private boolean isMobileconnected(){\n\t\tConnectivityManager connMgr\n\t\t= (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\tNetworkInfo networkInfo\n\t\t= connMgr.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); \n\t\tboolean isMobileConn = networkInfo.isConnected();\n\t\treturn isMobileConn;\n\t}",
"public static boolean useInternalBrowser() {\n\t\treturn (isWindows() || isLinux() || isMac());\n\t}",
"public boolean isSetDeviceType() {\n return this.DeviceType != null;\n }",
"public boolean isSetApplierMobile() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __APPLIERMOBILE_ISSET_ID);\n }",
"private static boolean isXLargeTablet(Context context) {\n return (context.getResources().getConfiguration().screenLayout\n & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;\n }",
"private static boolean isXLargeTablet(Context context) {\n return (context.getResources().getConfiguration().screenLayout\n & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;\n }",
"private static boolean isXLargeTablet(Context context) {\n return (context.getResources().getConfiguration().screenLayout\n & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;\n }",
"private static boolean isXLargeTablet(Context context) {\n return (context.getResources().getConfiguration().screenLayout\n & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;\n }",
"private static boolean isXLargeTablet(Context context) {\n return (context.getResources().getConfiguration().screenLayout\n & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;\n }",
"public boolean isWebShowing();",
"@ApiModelProperty(value = \"Statistics of the campaign on the basis of tablet devices\")\n public Map<String, GetDeviceBrowserStats> getTablet() {\n return tablet;\n }",
"boolean hasMobile(String name);",
"@Override\n\tpublic boolean isHardware(){\n\t\treturn false;\n\t}",
"boolean hasDevice();",
"public static boolean hasTouchScreen(Context context) {\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.touchscreen\")) {\n Log.d(\"HardwareFeatureTest\", \"Device has a touch screen.\");\n return true;\n }\n return false;\n }",
"public static boolean isMultiSimDevice(Context context) {\n return false;\n }",
"public boolean getIsImmobile() {\n\t\treturn isImmobile;\n\t}",
"@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkPlatform() {\n\t\tboolean flag = oTest.checkPlatform();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}",
"private static boolean isPhoneTypeLTE() {\n return true;\n }",
"public boolean isIsPhysicalDevice() {\n return isPhysicalDevice;\n }",
"@Override\n public boolean isCompatible(ServerSideSession session) {\n return session.isSafariRealDevice();\n }",
"public String getHeadless() {\n\t\tif (headless) {\n\t\t\treturn \"true\";\n\t\t} else {\n\t\t\treturn \"false\";\n\t\t}\n\t}",
"public final boolean isOn3G(Context ctx)\n {\n NetworkInfo info = ((ConnectivityManager) ctx.getSystemService(Context.CONNECTIVITY_SERVICE))\n .getActiveNetworkInfo();\n return info != null && info.getTypeName().toLowerCase().equals(\"mobile\");\n }",
"public boolean isSmallScreen() {\n \t\treturn m_smallScreenMode;\n \t}",
"private boolean m21857b() {\n return Build.FINGERPRINT.startsWith(\"generic\") || Build.MODEL.contains(\"google_sdk\") || Build.MODEL.toLowerCase().contains(\"droid4x\") || Build.MODEL.contains(\"Emulator\") || Build.MODEL.contains(\"Android SDK built for\") || Build.MANUFACTURER.contains(\"Genymotion\") || Build.HARDWARE.equals(\"goldfish\") || Build.HARDWARE.equals(\"vbox86\") || Build.PRODUCT.equals(\"sdk\") || Build.PRODUCT.equals(\"google_sdk\") || Build.PRODUCT.equals(\"sdk_x86\") || Build.PRODUCT.equals(\"vbox86p\") || Build.BOARD.toLowerCase().contains(\"nox\") || Build.BOOTLOADER.toLowerCase().contains(\"nox\") || Build.HARDWARE.toLowerCase().contains(\"nox\") || Build.PRODUCT.toLowerCase().contains(\"nox\") || Build.SERIAL.toLowerCase().contains(\"nox\") || Build.FINGERPRINT.startsWith(\"unknown\") || Build.FINGERPRINT.contains(\"Andy\") || Build.FINGERPRINT.contains(\"ttVM_Hdragon\") || Build.FINGERPRINT.contains(\"vbox86p\") || Build.HARDWARE.contains(\"ttVM_x86\") || Build.MODEL.equals(\"sdk\") || Build.MODEL.contains(\"Droid4X\") || Build.MODEL.contains(\"TiantianVM\") || Build.MODEL.contains(\"Andy\") || (Build.BRAND.startsWith(\"generic\") && Build.DEVICE.startsWith(\"generic\"));\n }",
"public boolean isMobHead() {\n return this.type == Type.MOBHEAD;\n }",
"public static boolean isConnectedMobile(Context context){\n NetworkInfo info = Connectivity.getNetworkInfo(context);\n return (info != null && info.isConnected() && info.getType() == ConnectivityManager.TYPE_MOBILE);\n }",
"public static boolean isConnectedMobile(Context context){\n NetworkInfo info = Connectivity.getNetworkInfo(context);\n return (info != null && info.isConnected() && info.getType() == ConnectivityManager.TYPE_MOBILE);\n }",
"@CalledByNative\n @Override\n protected boolean isInstalledWebappDelegateGeolocation() {\n return mDelegate.isInstalledWebappDelegateGeolocation();\n }",
"@Test\n\tpublic void testMobileDetectionEmptyUserAgent()\n\t{\n\t\tfinal String[] uas =\n\t\t{ \"-\", \"\", \" \", \"\\n\", \"\\t\", \"\\0\" };\n\n\t\tfor (int index = 0; index < uas.length; index++)\n\t\t{\n\t\t\tfinal String userAgent = uas[index];\n\t\t\tLOG.info(\"Testing :\" + userAgent);\n\n\t\t\tassertFalse(\"No markup method should render a false positive\", detectionService.isWmlCapable(userAgent, null)\n\t\t\t\t\t|| detectionService.isXhtmlCapable(userAgent, null) || detectionService.isiPhoneCapable(userAgent, null));\n\n\t\t\tassertFalse(\"Api should fail to identify as a mobile device: (\" + userAgent + \")\",\n\t\t\t\t\tdetectionService.isMobileDevice(userAgent));\n\t\t\tassertFalse(\"Api wrongly identify as a desktop device: (\" + userAgent + \")\", detectionService.isDesktop(userAgent));\n\t\t}\n\n\t}",
"@Test\n public void testMobileIOS() throws GeneralLeanFtException, InterruptedException, ReportException {\n Browser browser;\n try {\n System.out.println(\"Running test on iOS mobile browser\");\n DeviceDescription description = new DeviceDescription();\n description.setOsType(\"IOS\");\n description.setOsVersion(\">=9.0\");\n\n Device device = MobileLab.lockDevice(description);\n browser = BrowserFactory.launch(BrowserType.SAFARI, device);\n navigateBrowser(browser);\n Reporter.reportEvent(\"Image of Mobile\", \"Using Safari on iOS\", Status.Passed, browser.getSnapshot());\n }\n catch (GeneralLeanFtException glftex) {System.out.println(\"GeneralLeanFtException: \" + glftex.getMessage());}\n catch (InterruptedException iex) {System.out.println(\"InterruptedException: \" + iex.getMessage());}\n catch (ReportException rex){System.out.println(\"ReportException: \" + rex.getMessage());}\n }",
"@CalledByNative\n public abstract boolean isScreenCast();",
"public void spec() {\n\n\t\tSystem.out.println(\"You are in Android\");\n\n\t}",
"@Override\r\npublic void setOnScreen(boolean os) {\n}",
"private void determinePlatform() {\n \t\tString os = System.getProperty(\"os.name\");\n \t\t\n \t\tif (os == null)\n \t\t\tthrow new RuntimeException();\n \t\t\n \t\tif (os.startsWith(WINDOWS_ID))\n \t\t\tisWindows = true;\n \t\telse\n \t\t\tisUnixLike = true;\n \t}",
"boolean hasShoppingPerformanceView();",
"public boolean isHeadless() {\n return m_Headless;\n }",
"private boolean m21863g() {\n TelephonyManager telephonyManager = (TelephonyManager) this.f16409k.getSystemService(\"phone\");\n if (telephonyManager != null) {\n String deviceId = telephonyManager.getDeviceId();\n for (String equalsIgnoreCase : f16398b) {\n if (equalsIgnoreCase.equalsIgnoreCase(deviceId)) {\n return true;\n }\n }\n }\n return false;\n }",
"public static boolean isLoadForHome() {\n boolean isSupport = 1 == SystemProperties.getInt(\n \"ro.mtk_c2k_om_nw_sel_type\", 0) ? false : true;\n Log.d(TAG, \"isLoadForHome(): \" + isSupport);\n return isSupport;\n }",
"private boolean isWindowsOs() {\n String osName = System.getProperty(\"os.name\");\n if (osName == null) {\n return false;\n }\n osName = osName.toLowerCase(Locale.ENGLISH);\n return osName.contains(\"windows\");\n }",
"public static boolean isEmulator() {\n return Build.FINGERPRINT.startsWith(\"generic\")\n || Build.FINGERPRINT.startsWith(\"unknown\")\n || Build.MODEL.contains(\"google_sdk\")\n || Build.MODEL.contains(\"Emulator\")\n || Build.MODEL.contains(\"Android SDK built for x86\")\n || Build.MANUFACTURER.contains(\"Genymotion\")\n || (Build.BRAND.startsWith(\"generic\") && Build.DEVICE.startsWith(\"generic\"))\n || \"google_sdk\".equals(Build.PRODUCT);\n }",
"boolean hasMachineType();",
"public static boolean isConnectedMobile(Context context) {\n NetworkInfo info = getNetworkInfo(context);\n return (info != null && info.isConnected() && info.getType() == ConnectivityManager.TYPE_MOBILE);\n }",
"private void setOsType() {\n addToMobileContext(Parameters.OS_TYPE, \"android\");\n }",
"@Override\r\npublic boolean isOnScreen() {\nreturn false;\r\n}",
"private boolean getStandalone( HttpServletRequest request )\r\n {\r\n String strStandalone = request.getParameter( PARAMETER_STANDALONE );\r\n if ( strStandalone != null && ( strStandalone.equalsIgnoreCase( \"true\" ) || strStandalone.equalsIgnoreCase( \"on\" ) ) )\r\n {\r\n return true;\r\n }\r\n strStandalone = AppPropertiesService.getProperty( PROPERTY_STANDALONE );\r\n if ( strStandalone != null && ( strStandalone.equalsIgnoreCase( \"true\" ) || strStandalone.equalsIgnoreCase( \"on\" ) ) )\r\n {\r\n return true;\r\n }\r\n return false;\r\n }",
"public static boolean isHeadless() {\n return false;\n }",
"public PlatformType getPlatformType();",
"boolean hasHotelPerformanceView();",
"String getBrowser();",
"@Test\n\tpublic void iPodTouch() {\n\t\trequest.addHeader(USER_AGENT, UserAgent.iPodTouch_iOS1_1_3);\n\t\tDevice device = resolver.resolveDevice(request);\n\t\tassertMobile(device);\n\t}",
"public static AppiumDriver getDriver(String platformtype, AppiumDriverLocalService service) throws IOException, TimeoutException, URISyntaxException {\n AppiumDriver driver;\n /* List<InterceptedMessage> messages = new ArrayList<InterceptedMessage>();\n\n\n MitmproxyJava proxy = new MitmproxyJava(\"/usr/local/bin/mitmdump\", (InterceptedMessage m) -> {\n System.out.println(\"intercepted request for \" + m.requestURL.toString());\n messages.add(m);\n return m;\n });\n //System.out.println(\"Hello World\");\n proxy.start();*/\n if (platformtype== \"Android\") {\n DesiredCapabilities options = new DesiredCapabilities();\n options.setCapability(\"deviceName\", propertyManager.getInstance().getdevicename()); //Pixel_XL_API_29\n options.setCapability(\"udid\",propertyManager.getInstance().getdeviceUDID());\n //options.setCapability(\"avd\",\"Pixel_XL_API_29\");\n options.setCapability(\"platformName\", propertyManager.getInstance().getplatformName());\n options.setCapability(\"platformVersion\", propertyManager.getInstance().getplatformVersion()); //emulator: 10.0.0\n options.setCapability(\"automationName\", \"UiAutomator2\");\n options.setCapability(\"autoGrantPermissions\",\"true\");\n options.setCapability(\"noReset\",\"true\");\n options.setCapability(\"autoAcceptAlerts\",\"true\");\n options.setCapability(\"app\",propertyManager.getInstance().getAndroidapp());\n options.setCapability(\"uiautomator2ServerInstallTimeout\", \"60000\");\n options.setCapability(\"abdExecTimeout\", \"60000\");\n options.setCapability(\"ACCEPT_SSL_CERTS\",true);\n options.setCapability(\"clearDeviceLogsOnStart\",\"true\");\n //options.setCapability(\"--set ssl_version_client\",\"all\");\n //options.setCapability(\"--proxy-server\",\"localhost:8080\");\n //options.setCapability(\"appWaitPackage\", \"com.clearchannel.iheartradio.controller.debug\");\n //options.setCapability(\"appWaitActivity\", \"com.clearchannel.iheartradio.controller.activities.NavDrawerActivity\");\n //options.setCapability(\"appPackage\", \"com.clearchannel.iheartradio.controller.debug\");\n //options.setCapability(\"appActivity\", \"com.clearchannel.iheartradio.controller.activities.NavDrawerActivity\");\n\n\n driver = new AndroidDriver<MobileElement>(service, options);\n return driver;\n }\n else if(platformtype== \"iOS\"){\n DesiredCapabilities options = new DesiredCapabilities();\n\n options.setCapability(\"platformName\", \"iOS\");\n options.setCapability(\"platformVersion\", propertyManager.getInstance().getiOSplatformVersion());\n options.setCapability(\"deviceName\", propertyManager.getInstance().getiOSdevicename());\n options.setCapability(\"udid\",propertyManager.getInstance().getiOSUDID());\n //options.setCapability(CapabilityType.BROWSER_NAME,\"safari\");\n //options.setCapability(\"automationName\", \"XCUITest\");\n options.setCapability(\"bundleId\",\"com.clearchannel.iheartradio.enterprise\");\n options.setCapability(\"startIWDP\",\"true\");\n options.setCapability(\"noReset\",\"true\");\n options.setCapability(\"useNewWDA\",\"false\");\n //options.setCapability(\"showIOSLog\",\"true\");\n //options.setCapability(\"app\",\"/Users/Shruti/Desktop/untitled folder/iHRiOSAppCenter/iHeartRadio.ipa\"); // /Users/Shruti/Downloads/iHeartRadio.ipa\n options.setCapability(\"xcodeOrgId\",\"BCN32U332R\");\n options.setCapability(\"xcodeSigningId\",\"iPhone Developer\");\n options.setCapability(\"autoAcceptAlerts\",\"true\");\n options.setCapability(\"SHOW_XCODE_LOG\",\"true\");\n //options.setCapability(\"updatedWDABundleId\",\"com.Shruti7505.WebDriverAgentRunner\");\n driver = new IOSDriver<MobileElement>(service,options);\n return driver;\n }\n return driver=null;\n\n }",
"@Generated\n @Selector(\"isCellular\")\n public native boolean isCellular();",
"public static boolean isWindows() {\n\t\treturn (SWT.getPlatform().equalsIgnoreCase(\"win32\"));\n\t}",
"public static void getScreenSize(Context context)\n\t{\n\t\tDisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();\n\t\tfloat screenWidthDp = displayMetrics.widthPixels / displayMetrics.density; \n\t\tfloat screenHeightDp = displayMetrics.heightPixels / displayMetrics.density;\n\t\tLog.w(Utils.class.getName(), \"getScreenSize() gets the screen size in DP width=\" + screenWidthDp\n\t\t\t\t\t+ \" height=\" + screenHeightDp);\n\t\t\n\t\t// use width and height as in vertical mode, so width < height\n\t\tif(screenWidthDp > screenHeightDp)\n\t\t{\n\t\t\tfloat mid = screenWidthDp;\n\t\t\tscreenWidthDp = screenHeightDp;\n\t\t\tscreenHeightDp = mid; \n\t\t}\n\t\t\n\t\tint screenWidthInt = (int) screenWidthDp;\n\t\tint screenHeightInt = (int) screenHeightDp;\n\t\t\n\t\tif((screenWidthInt%2) != 0)\n\t\t{\n\t\t\tscreenWidthInt--;\n\t\t}\n\t\tif((screenHeightInt%2) != 0)\n\t\t{\n\t\t\tscreenHeightInt--;\n\t\t}\n\t\t\n\t\tUtils.ConstantVars.screenWidth = screenWidthInt;\n\t\tUtils.ConstantVars.screenHeight = screenHeightInt;\n\t\t\n\t\tLog.w(Utils.class.getName(), \"getScreenSize() optimized the screen size in integer width=\" \n\t\t\t\t+ Utils.ConstantVars.screenWidth + \" height=\" + Utils.ConstantVars.screenHeight);\n\t\t\t\t\n\t}",
"String platform();",
"public Platform getPlatform();",
"@RequestMapping(value = \"show_tablettable/\", method = RequestMethod.POST)\r\n\tpublic ModelAndView show_tablet(HttpSession session, @RequestParam(\"device\") String device) {\n\t\tSystem.out.println(\"device: \"+ device);\r\n\t\t\r\n\t\tif ( session.getAttribute(\"login\") == null) {\r\n\r\n\t\t\tModelAndView mav = new ModelAndView();\r\n\t\t\tmav.setViewName(\"redirectPage\"); //jsp page\r\n\t\t\tmav.addObject(\"titre\", \"Error\");\r\n\t\t\tmav.addObject(\"redirect\", \"connection.html\");\r\n\t\t\tmav.addObject(\"message\", \"You need to be logged to access this page, sorry <br> <a href='/Blue_Weasel_Server/connection.html'> connection</a>\");\r\n\t\t\treturn mav;\r\n\t\t}\r\n\t\telse if (session.getAttribute(\"gameid\") == null) {\r\n\t\t\tModelAndView mav = new ModelAndView();\r\n\t\t\tmav.setViewName(\"redirectPage\"); //jsp page\r\n\t\t\tmav.addObject(\"titre\", \"Error\");\r\n\t\t\tmav.addObject(\"redirect\", \"\");\r\n\t\t\tmav.addObject(\"message\", \"ERROR, stop cheating, or spying, you don't belong to this game dude <br> <a href='/Blue_Weasel_Server/connection.html'> connection</a>\");\r\n\t\t\treturn mav;\r\n\t\t}\r\n\t\t\r\n\t\tString player = (String) session.getAttribute(\"login\"); \r\n\t\t//Simulation\r\n\t\t// all codes must be created in interafces and implementation, and it will be called from the controller\r\n\t\tlong id = (long) session.getAttribute(\"gameid\");\r\n\t\t\r\n\t\tGame game = new Game();\r\n\t\tgame = belotInterface.gameById(id);\r\n\t\t\r\n\t\tModelAndView mav = new ModelAndView();\r\n\t\t// the following conditions shows the cards accordingly to the fact that the current player always has his cards in the bottom position\r\n\t\tif( player.equals(game.getPlayer1())) {\r\n\r\n\t\t\tmav.addObject(\"player_bottom\", game.getPlayer1());\r\n\t\t\tmav.addObject(\"player_right\", game.getPlayer2());\r\n\t\t\tmav.addObject(\"player_top\", game.getPlayer3());\r\n\t\t\tmav.addObject(\"player_left\", game.getPlayer4());\r\n\t\t\t\r\n\t\t\tmav.addObject(\"played_card_bottom\",game.tabletConvert(game.getCurrent_card_1()));\r\n\t\t\tmav.addObject(\"played_card_right\",game.tabletConvert(game.getCurrent_card_2()));\r\n\t\t\tmav.addObject(\"played_card_top\",game.tabletConvert(game.getCurrent_card_3()));\r\n\t\t\tmav.addObject(\"played_card_left\",game.tabletConvert(game.getCurrent_card_4()));\r\n\t\t\t\r\n\r\n\t\t\tmav.addObject(\"player_bottom_cards\",game.tabletConvert(game.player1_getHand()));\r\n\t\t\tmav.addObject(\"player_right_cards\",game.hidelist(game.player2_getHand()));\r\n\t\t\tmav.addObject(\"player_top_cards\",game.hidelist(game.player3_getHand()));\r\n\t\t\tmav.addObject(\"player_left_cards\",game.hidelist(game.player4_getHand()));\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse if( player.equals(game.getPlayer2())) {\r\n\r\n\t\t\tmav.addObject(\"player_left\", game.getPlayer1());\r\n\t\t\tmav.addObject(\"player_bottom\", game.getPlayer2());\r\n\t\t\tmav.addObject(\"player_right\", game.getPlayer3());\r\n\t\t\tmav.addObject(\"player_top\", game.getPlayer4());\r\n\t\t\t\r\n\t\t\tmav.addObject(\"played_card_left\",game.tabletConvert(game.getCurrent_card_1()));\r\n\t\t\tmav.addObject(\"played_card_bottom\",game.tabletConvert(game.getCurrent_card_2()));\r\n\t\t\tmav.addObject(\"played_card_right\",game.getCurrent_card_3());\r\n\t\t\tmav.addObject(\"played_card_top\",game.tabletConvert(game.getCurrent_card_4()));\r\n\t\t\t\r\n\t\t\tmav.addObject(\"player_left_cards\",game.hidelist(game.player1_getHand()));\r\n\t\t\tmav.addObject(\"player_bottom_cards\",game.tabletConvert(game.player2_getHand()));\r\n\t\t\tmav.addObject(\"player_right_cards\",game.hidelist(game.player3_getHand()));\r\n\t\t\tmav.addObject(\"player_top_cards\",game.hidelist(game.player4_getHand()));\r\n\t\t\t\r\n\t\t}\r\n\t\telse if( player.equals(game.getPlayer3())) {\r\n\r\n\t\t\tmav.addObject(\"player_top\", game.getPlayer1());\r\n\t\t\tmav.addObject(\"player_left\", game.getPlayer2());\r\n\t\t\tmav.addObject(\"player_bottom\", game.getPlayer3());\r\n\t\t\tmav.addObject(\"player_right\", game.getPlayer4());\r\n\t\t\tmav.addObject(\"played_card_top\",game.tabletConvert(game.getCurrent_card_1()));\r\n\t\t\tmav.addObject(\"played_card_left\",game.tabletConvert(game.getCurrent_card_2()));\r\n\t\t\tmav.addObject(\"played_card_bottom\",game.tabletConvert(game.getCurrent_card_3()));\r\n\t\t\tmav.addObject(\"played_card_right\",game.tabletConvert(game.getCurrent_card_4()));\r\n\r\n\t\t\tmav.addObject(\"player_top_cards\",game.hidelist(game.player1_getHand()));\r\n\t\t\tmav.addObject(\"player_left_cards\",game.hidelist(game.player2_getHand()));\r\n\t\t\tmav.addObject(\"player_bottom_cards\",game.tabletConvert(game.player3_getHand()));\r\n\t\t\tmav.addObject(\"player_right_cards\",game.hidelist(game.player4_getHand()));\r\n\t\t\t\r\n\t\t}\r\n\t\telse if( player.equals(game.getPlayer4())) {\r\n\r\n\t\t\tmav.addObject(\"player_right\", game.getPlayer1());\r\n\t\t\tmav.addObject(\"player_top\", game.getPlayer2());\r\n\t\t\tmav.addObject(\"player_left\", game.getPlayer3());\r\n\t\t\tmav.addObject(\"player_bottom\", game.getPlayer4());\r\n\t\t\tmav.addObject(\"played_card_right\",game.tabletConvert(game.getCurrent_card_1()));\r\n\t\t\tmav.addObject(\"played_card_top\",game.tabletConvert(game.getCurrent_card_2()));\r\n\t\t\tmav.addObject(\"played_card_left\",game.tabletConvert(game.getCurrent_card_3()));\r\n\t\t\tmav.addObject(\"played_card_bottom\",game.tabletConvert(game.getCurrent_card_4()));\r\n\t\t\t\r\n\t\t\tmav.addObject(\"player_right_cards\",game.hidelist(game.player1_getHand()));\r\n\t\t\tmav.addObject(\"player_top_cards\",game.hidelist(game.player2_getHand()));\r\n\t\t\tmav.addObject(\"player_left_cards\",game.hidelist(game.player3_getHand()));\r\n\t\t\tmav.addObject(\"player_bottom_cards\",game.tabletConvert(game.player4_getHand()));\r\n\t\t}\r\n\t\telse {\r\n\t\t\t\r\n\t\t\tmav.setViewName(\"redirectPage\"); //jsp page\r\n\t\t\tmav.addObject(\"titre\", \"Error\");\r\n\t\t\tmav.addObject(\"redirect\", \"\");\r\n\t\t\tmav.addObject(\"message\", \"ERROR 1542, stop cheating, or spying, you don't belong to this game dude <br> <a href='/Blue_Weasel_Server/connection.html'> connection</a>\");\r\n\t\t\treturn mav;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tmav.addObject(\"game_status\",game.getGameStatus());\r\n\t\tmav.addObject(\"current_trump\",game.getCurrentTrump());\r\n\t\tmav.addObject(\"team1_score\",\"\"+game.getTeam1_score());\r\n\t\tmav.addObject(\"team2_score\",\"\"+game.getTeam2_score());\r\n\t\tmav.addObject(\"game_info\",game.getGame_info());\r\n\r\n\t\tmav.setViewName(\"showTablet\");\r\n\t\treturn mav;\r\n\t\t\r\n\t}",
"boolean hasDeviceId();",
"boolean hasDeviceId();",
"public int getMobile() {return mobile;}",
"public boolean isSetBrowser() {\n return this.browser != null;\n }",
"private static boolean isLightMode(Context context)\n {\n return ((BladeSampleApplication)context.getApplicationContext()).isLightMode();\n }",
"public static boolean isMac() {\n String os=System.getProperty(\"os.name\").toLowerCase();\n if(\"mac\".equals(os.substring(0,3)))\n {\n return true;\n }\n return false;\n \n }",
"public boolean isSetPlatform() {\n return this.platform != null;\n }",
"private Boolean getUseMicrophone() {\n return true;\n }",
"public final String getDeviceType(){\n return TYPE;\n }",
"public boolean isInPlatform() {\n return isInPlatform;\n }",
"public static boolean hasTelephonyHardware(Context context) {\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.telephony\")) {\n Log.d(\"HardwareFeatureTest\", \"Device can make phone calls\");\n return true;\n }\n return false;\n }",
"static boolean m61447d(Context context) {\n try {\n if (System.getInt(context.getContentResolver(), \"airplane_mode_on\", 0) != 0) {\n return true;\n }\n return false;\n } catch (NullPointerException unused) {\n return false;\n }\n }",
"public static boolean isWindowsPlatform() {\n\t\tString os = System.getProperty(\"os.name\");\n\t\tif (os != null && os.startsWith(WIN_ID))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\n\t}"
]
| [
"0.76215726",
"0.7208521",
"0.71120197",
"0.70821375",
"0.695174",
"0.68898094",
"0.676617",
"0.63367397",
"0.6304197",
"0.62623835",
"0.62089837",
"0.613053",
"0.61236274",
"0.6121809",
"0.6017076",
"0.5929105",
"0.5877619",
"0.58195984",
"0.57638127",
"0.57620466",
"0.57096386",
"0.56507623",
"0.5647909",
"0.5639541",
"0.563623",
"0.5625221",
"0.5618308",
"0.5612021",
"0.561197",
"0.55837476",
"0.5570003",
"0.55621344",
"0.5560643",
"0.55287164",
"0.55287164",
"0.55287164",
"0.55287164",
"0.55287164",
"0.54984254",
"0.5494279",
"0.54850817",
"0.5484517",
"0.54788905",
"0.5405696",
"0.5403817",
"0.5398962",
"0.537728",
"0.5366818",
"0.5359166",
"0.53553224",
"0.5349461",
"0.5334297",
"0.53146714",
"0.52952117",
"0.5289812",
"0.5275796",
"0.5275796",
"0.5239758",
"0.52247345",
"0.52201796",
"0.51886684",
"0.5149409",
"0.51389277",
"0.5138777",
"0.51347506",
"0.51226497",
"0.50812167",
"0.5077161",
"0.50727844",
"0.50660354",
"0.5065812",
"0.5065459",
"0.5064366",
"0.50603557",
"0.50466204",
"0.503678",
"0.50361234",
"0.50276923",
"0.5009265",
"0.5008453",
"0.5007765",
"0.4993076",
"0.499231",
"0.4987865",
"0.49860385",
"0.49777374",
"0.49632856",
"0.4961396",
"0.4961396",
"0.49495983",
"0.49392483",
"0.49388838",
"0.492893",
"0.49215645",
"0.49173653",
"0.49149585",
"0.49049845",
"0.49029368",
"0.4890474",
"0.48826715"
]
| 0.5185921 | 61 |
Load the image in the document and in the case of success attach it to the viewer | protected IUploader.OnFinishUploaderHandler getOnFinishUploaderHandlerDetails(final FlowPanel panelImages) {
IUploader.OnFinishUploaderHandler onFinishUploaderHandler = new IUploader.OnFinishUploaderHandler() {
public void onFinish(IUploader uploader) {
if (uploader.getStatus() == Status.SUCCESS) {
PreloadedImage preloadedImage = new PreloadedImage(uploader.fileUrl(), showImageOnDetails);
// The server sends useful information to the client by default
preloadedImagePanelMap.put(preloadedImage, panelImages);
UploadedInfo info = uploader.getServerInfo();
}
}
};
return onFinishUploaderHandler;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void imageLoadSuccess(String path) {\n Intent mainIntent = new Intent(MainActivity.this, PresenterActivity.class);\n mainIntent.putExtra(\"path\", path);\n startActivity(mainIntent);\n }",
"public void processAddImageOverlay() {\n PropertiesManager props = PropertiesManager.getPropertiesManager();\n\n // AND NOW ASK THE USER FOR THE FILE TO OPEN\n FileChooser fc = new FileChooser();\n fc.setInitialDirectory(new File(PATH_WORK));\n fc.setTitle(props.getProperty(LOAD_WORK_TITLE));\n File imageOverlayFile = fc.showOpenDialog(app.getGUI().getWindow());\n \n // SEND THE IMAGE FILE TO DATA MANAGER\n dataManager.setImageOverlayFile(imageOverlayFile);\n \n // CHANGE THE CURSOR\n Scene scene = app.getGUI().getPrimaryScene();\n scene.setCursor(Cursor.CROSSHAIR);\n \n // CHANGE THE STATE\n dataManager.setState(mmmState.ADD_IMAGE_MODE);\n }",
"public void drawImage() {\n ImageView imageView = (ImageView) findViewById(R.id.photo);\n imageView.setVisibility(View.VISIBLE);\n Glide.with(MainActivity.this).load(iURI).fitCenter().into(imageView);\n }",
"private void downloadPoster() {\n\n try {\n // Downloading the image from URL\n URL url = new URL(Constants.MOVIE_MEDIA_URL + cbPosterQuality.getSelectionModel().getSelectedItem().getKey() + movie.getPosterURL());\n Image image = new Image(url.toExternalForm(), true);\n\n // Adding the image to the ImageView\n imgPoster.setImage(image);\n\n // Adding the ImageView to the custom made ImageViewPane\n imageViewPane.setImageView(imgPoster);\n\n // Binding the image download progress to the progress indicator\n imageProgressIndicator.visibleProperty().bind(image.progressProperty().lessThan(1));\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n }",
"public void openDialog() {\r\n\t\tString filename = this.getFileName();\r\n\t\tif (filename.equals(null) || filename.equals(\"\") ) {\r\n\t\t\ttext.append(\"\\nPlease select valid image\");\r\n\t\t\topenDialog();\r\n\t\t}\r\n\t\tdisplay_img = this.loadImage(filename);\r\n\r\n\t}",
"private void processAndSetImage() {\n\n // Resample the saved image to fit the ImageView\n mResultsBitmap = resamplePic(this, mTempPhotoPath);\n\n// tv.setText(base64conversion(photoFile));\n//\n// Intent intent = new Intent(Intent.ACTION_SEND);\n// intent.setType(\"text/plain\");\n// intent.putExtra(Intent.EXTRA_TEXT, base64conversion(photoFile));\n// startActivity(intent);\n\n /**\n * UPLOAD IMAGE USING RETROFIT\n */\n\n retroFitHelper(base64conversion(photoFile));\n\n // Set the new bitmap to the ImageView\n imageView.setImageBitmap(mResultsBitmap);\n }",
"@Override\n public void onDocumentFinish() {\n if (mImageLoader != null) {\n mImageLoader.clearResources();\n }\n }",
"protected abstract Image loadImage();",
"@FXML\r\n public void imageButtonClicked() {\r\n File file = fileChooser.showOpenDialog(viewHandler.getPrimaryStage());\r\n if (file != null) {\r\n try {\r\n viewModel.setImageurl(ImageConverter.ImageToByte(file));\r\n Image img = new Image(new ByteArrayInputStream(viewModel.getImageurl()));\r\n dogPicture.setFill(new ImagePattern(img));\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }",
"private void showView() {\n\t\tfinal ImageView image = (ImageView) findViewById(R.id.image); \n\t\t//screen.addView(image);\n\t\t//image.setImageResource(images[0]);\n\n\t\tString fileName = getFilesDir().getPath() + \"/\" + FILE_NAME;\n\t\t//System.out.println(fileName);\n\t\tBitmap bm = BitmapFactory.decodeFile(fileName); \n\t\t\n\t\timage.setImageBitmap(bm); \n\t\t\n\t\t//System.out.println(\"show done!\\n\");\t\t\n\t\t\n\t}",
"public void loadInputImage()\n{\n selectInput(\"Select a file to process:\", \"imageLoader\"); // select image window -> imageLoader()\n}",
"public void saveAsImage(){\n\t\tif(currentView == null){\r\n\t\t\tJOptionPane.showMessageDialog(this, \"A tab must be open before an image can be saved\", \"Information\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcurrentView.saveAsImage();\r\n\t}",
"private void displayImage() {\n if (currentPhotoPath != null) {\n // checkPicture = true; depreciated, try catch to catch if photo exists\n Bitmap temp = fixOrientation(BitmapFactory.decodeFile(currentPhotoPath));\n bitmapForAnalysis = temp;\n imageView.setImageBitmap(temp);\n } else {\n Toast.makeText(this, \"Image Path is null\", Toast.LENGTH_LONG).show();\n }\n }",
"public void openImage(String name) throws ViewerException {\n\n\t}",
"@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\twebView.loadUrl(Uri.fromFile(new File(fileImg)).toString());\n\n\t\t\t\t\t\t\t\t\t\t\t}",
"public void saveImage(){\n new Thread() {\n public void run() {\n String image_url = stuffRoomInfo.getStuffLink();\n Log.i(\"OGT\", \"image_url:in showImage \" + image_url);\n getOGTag(image_url);\n // Display a png image from the specified file\n ImageUrlSendServer();\n }\n }.start();\n }",
"public void displayImage() {\n RealImage real = new RealImage(url);\n real.displayImage();\n }",
"private void getNewImage() {\n try {\n URL imageUrl = new URL(path);\n URLConnection uc = imageUrl.openConnection();\n\n InputStream is = uc.getInputStream();\n BufferedInputStream bis = new BufferedInputStream(is);\n\n ByteArrayOutputStream buffer = new ByteArrayOutputStream();\n int current;\n while ((current = bis.read()) != -1) {\n buffer.write((byte) current);\n }\n final byte[] data = buffer.toByteArray();\n // enqueue UI update as a priority\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n public void run() {\n view.setImageBitmap(BitmapFactory.decodeByteArray(\n data, 0, data.length));\n }\n });\n // update database while that is queueing\n ContentValues values = new ContentValues();\n values.put(MovieEntry.COLUMN_POSTER, data);\n context.getContentResolver().update(MovieEntry.buildMovieUriWithId(movieId),\n values, null, null);\n } catch (Exception E) {\n Log.i(TAG, E.toString());\n E.printStackTrace();\n }\n }",
"private void onLoad(Vampire vampire) {\n ImageView view = new ImageView(vampireImage);\n addEntity(vampire, view);\n squares.getChildren().add(view);\n }",
"public void uploadImg(View view){\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.setType(\"image/*\");\n intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), SELECT_PICTURE);\n }",
"private void loadData() {\r\n titleProperty.set(TITLE);\r\n imageView.setImage(null);\r\n scrollPane.setContent(null);\r\n final Task<Void> finisher = new Task<Void>() {\r\n @Override\r\n protected Void call() throws Exception {\r\n Platform.runLater(new Runnable() {\r\n @Override\r\n public void run() {\r\n buffer = replay.politicalBuffer;\r\n output = new WritableImage(replay.bufferWidth, replay.bufferHeight);\r\n output.getPixelWriter().setPixels(0, 0, replay.bufferWidth, replay.bufferHeight, PixelFormat.getIntArgbPreInstance(), buffer, 0, replay.bufferWidth);\r\n progressBar.progressProperty().unbind();\r\n progressBar.setProgress(0);\r\n statusLabel.textProperty().unbind();\r\n statusLabel.setText(l10n(\"replay.map.loaded\"));\r\n scrollPane.setContent(null);\r\n imageView.setImage(output);\r\n scrollPane.setContent(imageView);\r\n int fitWidth = Integer.parseInt(settings.getProperty(\"map.fit.width\", \"0\"));\r\n int fitHeight = Integer.parseInt(settings.getProperty(\"map.fit.height\", \"0\"));\r\n imageView.setFitHeight(fitHeight);\r\n imageView.setFitWidth(fitWidth);\r\n lock.release();\r\n }\r\n });\r\n return null;\r\n }\r\n };\r\n progressBar.progressProperty().bind(finisher.progressProperty());\r\n statusLabel.textProperty().bind(finisher.titleProperty());\r\n replay.loadData(finisher);\r\n }",
"@Override\n public void loadImage(@Nullable String url) {\n if (view != null) {\n if (url == null) {\n view.exit();\n return;\n }\n view.showImage(url);\n }\n }",
"private void viewImage(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tint id= Integer.parseInt(request.getParameter(\"fileId\"));\n\t\tFiles file= new FilesDAO().view(id);\n\t\trequest.setAttribute(\"files\", file);\n\t\trequest.setAttribute(\"path\", path);\n\t\trequest.getRequestDispatcher(\"viewImage.jsp\").forward(request, response);\n\t\tSystem.out.println(file);\n\t}",
"private void showImageDetail() {\n }",
"public void getImage(View view){\n if(Build.VERSION.SDK_INT > 19) {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.setType(\"image/*\");\n intent.setFlags(Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION);\n intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivityForResult(intent, 100);\n } else {\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n intent.setType(\"image/*\");\n intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivityForResult(intent, 100);\n }\n }",
"public synchronized void showPage() {\n final ShowPageImage viewer = new ShowPageImage();\n\n if (SwingUtilities.isEventDispatchThread()) {\n viewer.run();\n } else {\n SwingUtilities.invokeLater(viewer);\n }\n }",
"public void openCustomPictureCreator() {\n\n\t\tFXMLLoader fxmlL = new FXMLLoader(getClass().getResource(\"AvatarDrawingTool.fxml\"));\n\t\ttry {\n\t\t\tBorderPane login = (BorderPane) fxmlL.load();\n\n\t\t\tScene scene = new Scene(login, 600, 400);\n\n\t\t\tStage stage = new Stage();\n\t\t\tstage.setScene(scene);\n\t\t\tstage.initModality(Modality.APPLICATION_MODAL);\n\n\t\t\tstage.showAndWait();\n\t\t\t\n\t\t\tif(custom) {\n\t\t\t\tsetImg();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tBitmap bitmap = getImageFromLocal(imgPath);\n\t\t\t\tif (bitmap == null) {\n\t\t\t\t\tloadImgByNet(handler, imgUrl, imgPath);\n\t\t\t\t} else {\n\t\t\t\t\tMessage msg = handler.obtainMessage();\n\t\t\t\t\tmsg.obj = bitmap;\n\t\t\t\t\tmsg.what = IMG_FROM_LOCAL;\n\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t}\n\t\t\t}",
"@Override\n public void loadImage(String path, ImageView imageView) {\n mInteractor.loadImage(path, imageView);\n }",
"public void loadAndPopulateViewer(final ActionLink viewerLink) throws Exception {\n final WindowViewer w = Platform.getWindowViewer();\n final FunctionCallbackWaiter waiter = new FunctionCallbackWaiter();\n\n w.createViewer(viewerLink, waiter.createCallback(VIEWER_CALLBACK_ID));\n load(waiter.createCallback(DOCUMENT_CALLBACK_ID));\n\n iFunctionCallback cb = new iFunctionCallback() {\n @Override\n public void finished(boolean canceled, Object returnValue) {\n try {\n ObjectHolder h = (ObjectHolder) returnValue;\n HashMap<Object, CallbackResult> resultsMap = (HashMap<Object, CallbackResult>) h.value;\n CallbackResult vr = resultsMap.get(VIEWER_CALLBACK_ID);\n CallbackResult dr = resultsMap.get(DOCUMENT_CALLBACK_ID);\n\n if (vr.resultIsError()) {\n Utils.handleError((Throwable) vr.getReturnValue());\n\n return;\n }\n\n if (dr.resultIsError()) {\n Utils.handleError((Throwable) dr.getReturnValue());\n\n return;\n }\n\n iContainer v = (iContainer) vr.getContent();\n\n populateViewer(v);\n\n String target = viewerLink.getTargetName();\n\n if (target == null) {\n target = iTarget.TARGET_WORKSPACE;\n }\n\n if (iTarget.TARGET_WORKSPACE.equals(target)) {\n Utils.pushWorkspaceViewer(v);\n } else {\n w.activateViewer(v, target);\n }\n } finally {\n w.hideWaitCursor();\n }\n }\n };\n\n w.showWaitCursor();\n waiter.startWaiting(cb);\n }",
"private void ErreurImage() \n {\n JOptionPane.showMessageDialog(rootPane, \"Cette image n'est plus disponible\");\n }",
"@Override\r\n public void onResponse(String response) {\n loadImageInGUI(response);\r\n Utility.writeOnPreferences(activity, \"image\", response);\r\n Utility.reloadActivity(activity);\r\n\r\n }",
"private void showAddImageDialog() {\n new AddImageDialog()\n .show(this, new AddImageDialog.OnCompleteListener() {\n @Override\n public void onImageAdded(Item item) {\n inflateViewForItem(item);\n }\n\n @Override\n public void onError(String error) {\n new MaterialAlertDialogBuilder(MainActivity.this)\n .setTitle(\"Error\")\n .setMessage(error)\n .show();\n }\n });\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if(resultCode == RESULT_OK && requestCode ==200){\n Uri uri_img=data.getData();\n try{\n assert uri_img != null;\n InputStream input_img = updateView.getContext().getContentResolver().openInputStream(uri_img);\n DecodeImage_stream = BitmapFactory.decodeStream(input_img);\n chooseImage.setImageBitmap(DecodeImage_stream);\n }catch (FileNotFoundException f){\n Log.d(\"add new file not found:\",f.getMessage());\n }\n }\n }",
"private void infalteImageOnCoverPhoto(String fileName) {\n\t\tif(fileName!=null){\n\t\t\tDisplayImageOptions options = new DisplayImageOptions.Builder()\n\t\t\t.showImageOnLoading(R.drawable.ic_stub)\n\t\t\t.showImageForEmptyUri(R.drawable.ic_empty)\n\t\t\t.showImageOnFail(R.drawable.ic_error)\n\t\t\t.cacheInMemory(true)\n\t\t\t.cacheOnDisk(true)\n\t\t\t.considerExifParams(true)\n\t\t\t.displayer(new com.nostra13.universalimageloader.core.display.RoundedVignetteBitmapDisplayer(2, 2))\n\t\t\t.build();\n\t\t\tcoverPhotoName=fileName;\n\t\t\tString url=\"http://www1.kitchengardens.in/sites/default/files/\"+fileName;\n\t\t\tImageLoader.getInstance().displayImage(url, coverPhoto, options, animateFirstListener);\n\t\t}\n\t}",
"public void attachImage(String visitID) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Complete action using\"), 1);\n }",
"private void viewDocument() throws Exception{ \r\n CoeusVector cvDataObject = new CoeusVector();\r\n HashMap hmDocumentDetails = new HashMap();\r\n hmDocumentDetails.put(\"awardNumber\", awardBaseBean.getMitAwardNumber());\r\n hmDocumentDetails.put(\"sequenceNumber\", EMPTY_STRING+awardBaseBean.getSequenceNumber());\r\n hmDocumentDetails.put(\"fileName\", awardAddDocumentForm.txtFileName.getText());\r\n hmDocumentDetails.put(\"document\", getBlobData()); \r\n cvDataObject.add(hmDocumentDetails);\r\n RequesterBean requesterBean = new RequesterBean();\r\n DocumentBean documentBean = new DocumentBean();\r\n Map map = new HashMap();\r\n map.put(\"DATA\", cvDataObject);\r\n map.put(DocumentConstants.READER_CLASS, \"edu.mit.coeus.award.AwardDocumentReader\");\r\n map.put(\"USER\", CoeusGuiConstants.getMDIForm().getUserId());\r\n map.put(\"MODULE_NAME\", \"VIEW_DOCUMENT\");\r\n documentBean.setParameterMap(map);\r\n requesterBean.setDataObject(documentBean);\r\n requesterBean.setFunctionType(DocumentConstants.GENERATE_STREAM_URL); \r\n AppletServletCommunicator appletServletCommunicator = new\r\n AppletServletCommunicator(STREAMING_SERVLET, requesterBean);\r\n appletServletCommunicator.send();\r\n ResponderBean responder = appletServletCommunicator.getResponse(); \r\n if(!responder.isSuccessfulResponse()){\r\n throw new CoeusException(responder.getMessage(),0);\r\n }\r\n map = (Map)responder.getDataObject();\r\n String url = (String)map.get(DocumentConstants.DOCUMENT_URL);\r\n if(url == null || url.trim().length() == 0 ) {\r\n CoeusOptionPane.showErrorDialog(\r\n coeusMessageResources.parseMessageKey(\"protocolUpload_exceptionCode.1009\"));\r\n return;\r\n }\r\n url = url.replace('\\\\', '/') ;\r\n try{\r\n URL urlObj = new URL(url);\r\n URLOpener.openUrl(urlObj);\r\n }catch (MalformedURLException malformedURLException) {\r\n malformedURLException.printStackTrace();\r\n }catch( Exception ue) {\r\n ue.printStackTrace() ;\r\n }\r\n }",
"private void setImage() throws FileNotFoundException {\n\t\timage = new Image(new FileInputStream(path));\n\t}",
"@Override\n public void run() {\n ZoomSDK.preload(PanAadharResultActivity.this);\n }",
"private void uploadImage() {\n FileChooser fileChooser = new FileChooser();\n\n //Extension de l'image\n FileChooser.ExtensionFilter extFilter = new FileChooser.ExtensionFilter(\"Fichier image\", \"*.*\");\n fileChooser.getExtensionFilters().addAll(extFilter);\n\n File file = fileChooser.showOpenDialog(null);\n\n try {\n BufferedImage bufferedImage = ImageIO.read(file);\n Image image = SwingFXUtils.toFXImage(bufferedImage, null);\n imageViewAvatar.setImage(image);\n getUser().setAvatar(image);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void oncapture(CaptureEvent captureEvent) {\n\t\tFacesMessage msg = new FacesMessage();\n\n\t\t// recharger les parametres de la photo\n\t\ttry {\n\t\t\tloadParamPhoto();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tbyte[] data = captureEvent.getData();\n\n\t\tFile targetFolder = new File(folder_temp);\n\n\t\t// generer un nom de fichier unique\n\t\tString fileUrl = FileUtility.getUidFileName(\"photo-cam.png\");\n\n\t\t// ServletContext servletContext = (ServletContext)\n\t\t// FacesContext.getCurrentInstance().getExternalContext().getContext();\n\t\t// String arquivoFoto = servletContext.getRealPath(File.separator +\n\t\t// \"temp\" +File.separator + fileUrl);\n\n\t\t// System.err.println(\"handle: url----------\" + arquivoFoto);\n\n\t\tFileImageOutputStream imageOutput;\n\t\ttry {\n\t\t\timageOutput = new FileImageOutputStream(new File(targetFolder, fileUrl));\n\n\t\t\t// imageOutput = new FileImageOutputStream(new File(arquivoFoto));\n\n\t\t\timageOutput.write(data, 0, data.length);\n\t\t\timageOutput.close();\n\n\t\t\t//\n\t\t\tsetUrl(fileUrl);\n\t\t\tdossierEtudiantDto.setPhoto(fileUrl);\n\t\t\tthis.photo_attache_capture = true;\n\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_INFO);\n\t\t\tmsg.setSummary(bundleDocument.getString(\"document_success_upload_file\"));\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t} catch (IOException e) {\n\t\t\tthis.photo_attache_capture = false;\n\n\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_ERROR);\n\t\t\tmsg.setSummary(bundleDocument.getString(\"document_error_in_writing_captured_image\"));\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n public void onSuccess(Uri uri) {\n Picasso.with(getActivity()).load(uri).into(image);\n }",
"public void populateViewer(iContainer fv) {\n fv.setLinkedData(this);\n populateViewer(fv, mainDocument);\n\n WindowViewer w = Platform.getWindowViewer();\n CollapsiblePaneViewer cpv = (CollapsiblePaneViewer) fv.getWidget(\"attachments\");\n\n if (cpv != null) {\n TableViewer table = (TableViewer) cpv.getWidget();\n\n table.clear();\n if(table.getActionListener()==null) {\n iActionListener al = new AttachmentActionListener();\n table.setActionListener(al);\n }\n\n int len = getAttachmentCount();\n\n cpv.getTarget().setVisible(len > 0);\n\n if (len > 0) {\n cpv.setTitleText(w.getString(\"bv.format.attachments_spec\", StringCache.valueOf(len)));\n // we can change this because we have already populated the form\n mainDocument.rowData.get(1).setValue(w.getString(\"bv.text.master_document\"));\n\n boolean hasDate = false;\n\n for (int i = 0; i < len; i++) {\n DocumentItem item = docAttachments.get(i);\n\n if (item.rowData != null) {\n table.addEx(item.rowData);\n\n if (item.hasDate()) {\n hasDate = true;\n }\n }\n }\n\n if (UIScreen.isMediumDensity()) {\n table.addEx(mainDocument.rowData);\n }\n\n table.setColumnVisible(2, hasDate);\n table.refreshItems();\n if(hasDate) {\n table.sort(2, true);\n }\n }\n }\n }",
"@Override\n public void onSuccess(Uri uri) {\n Log.i(\"upload diary\", \"photo in storage\");\n uploadDiary.setPhotoUri(uri.toString());\n db.collection(\"Diary\").document(diary.getTime() + \":\" + diary.getUsername()).set(uploadDiary).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.i(\"upload diary\", \"photo succ\");\n }\n });\n }",
"protected void onReloadImage() {\n String url = DataProvider.SCREEN + DataProvider.SCREEN_INDEX + mScreenId + \"&time=\" + System.currentTimeMillis();\n image.setUrl(url); //just to avoid caching\n loadTree();\n }",
"public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (resultCode == RESULT_OK) {\n\n // compare the resultCode with the\n // SELECT_PICTURE constant\n if (requestCode == SELECT_PICTURE) {\n Uri selectedImageURI = data.getData();\n// File imageFile = new File(getRealPathFromURI(selectedImageURI));\n Uri selectedImageUri = data.getData( );\n String picturePath = getPath( getApplicationContext( ), selectedImageUri );\n Log.d(\"Picture Path\", picturePath);\n\n // Get the url of the image from data\n selectedImageUri = data.getData();\n if (null != selectedImageUri) {\n bitmap = null;\n // update the preview image in the layout\n try {\n bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), selectedImageUri);\n } catch (IOException e) {\n e.printStackTrace();\n }\n// IVPreviewImage.setImageURI(selectedImageUri);\n// runTextRecognition(bitmap);\n IVPreviewImage.setImageBitmap(bitmap);\n\n }\n }\n\n if (requestCode == 123) {\n\n\n Bitmap photo = (Bitmap) data.getExtras()\n .get(\"data\");\n\n // Set the image in imageview for display\n IVPreviewImage.setImageBitmap(photo);\n runTextRecognition(photo);\n\n }\n\n }\n }",
"public void ImageCreate(){\n Picasso.get().load(url).into(imageView);\n }",
"public void onClick(View v) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_OPEN_DOCUMENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE);\n\n\n\n\n /*String stringFilePath = Environment.getExternalStorageDirectory().getPath()+\"/Download/\"+editText.getText().toString()+\".jpeg\";\n Bitmap bitmap = BitmapFactory.decodeFile(stringFilePath);\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.PNG, 0, byteArrayOutputStream);\n byte[] bytesImage = byteArrayOutputStream.toByteArray();\n db.addTicket(stringFilePath, bytesImage);*/\n\n }",
"@FXML\n void changeToDetailsView(PhotoUnit photoUnit) throws IOException {\n\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(\"/Views/photoView.fxml\"));\n Parent root = loader.load();\n\n Scene scene = new Scene(root);\n\n scene.getStylesheets().add(\"Views/styles.css\");\n Stage primaryStage = (Stage) listView.getScene().getWindow();\n primaryStage.setScene(scene);\n\n //access the controller\n PhotoViewController controller = loader.getController();\n controller.initData(photoUnit);\n\n Image icon = new Image(\"/img/mars.png\");\n primaryStage.getIcons().add(icon);\n primaryStage.setTitle(\" MARS \");\n primaryStage.show();\n\n\n }",
"public void prepareImage(String imagePath)\r\n {\r\n \t\r\n initialize();\r\n try{\r\n //track the image loading\r\n trackImageLoading = new MediaTracker(this); \r\n original = Toolkit.getDefaultToolkit().getImage(imagePath); \r\n trackImageLoading.addImage(original,0);\r\n trackImageLoading.waitForID(0); \r\n //get the image width and height \r\n int width = original.getWidth(null);\r\n int height = original.getHeight(null);\r\n //create buffered image from the image so any change to the image can be made\r\n bufferedImage = createBufferedImageFromImage(original,width,height,false); \r\n edited = new BufferedImage(width,height,BufferedImage.TYPE_INT_RGB); \r\n isImageLoaded = true; //now the image is loaded\r\n }\r\n catch(Exception e)\r\n {\r\n System.exit(-1);\r\n }\r\n }",
"@Override\n\tpublic final IRenderable load() {\n\t\tImage img = loadImage();\n\t\tassertImageIsValid(img);\n\t\treturn new ImageRenderable(img);\n\t}",
"@Override\r\n\tpublic void pictureUpdated() {\r\n\t\tif(mDialog != null)\r\n\t\t\tmDialog.loadPicture();\r\n\t\t\r\n\t}",
"private void galleryAddPic() {\n\t}",
"private void initAreaImageFilm() {\n\n }",
"@Override\n public void run() {\n imageView.setImageBitmap(photo);\n }",
"private void loadLocalImageConfirm()\n {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())\n .setCancelable(true).setTitle(\"Load\").setMessage(\"Load image?\");\n\n builder.setPositiveButton(R.string.open_local, new DialogInterface.OnClickListener()\n {\n @Override\n public void onClick(DialogInterface dialog, int which)\n {\n ((MainActivity) getActivity()).loadLocalImage();\n }\n });\n\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener()\n {\n @Override\n public void onClick(DialogInterface dialog, int which)\n {\n dialog.cancel();\n }\n });\n\n AlertDialog dialog = builder.create();\n dialog.show();\n }",
"public ImageView loadTheMan()\n {\n try \n {\n Image theMan = new Image(new FileInputStream(\"theMan.jpg\"), 800, 800, true, true);\n ImageView theManView = new ImageView(theMan);\n theManView.setTranslateX(0);\n theManView.setTranslateY(-210);\n theManView.setScaleX(0.3);\n theManView.setScaleY(0.3);\n return theManView;\n } \n catch (FileNotFoundException ex) \n {\n Logger.getLogger(TycoonGUI.class.getName()).log(Level.SEVERE, null, ex);\n return null;\n }\n }",
"@Override\r\n public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n \tLog.v(\"catch\",view+\"\");\r\n \ttry{\r\n if (loadedImage != null && view!=null) { \r\n ImageView imageView = (ImageView) view; \r\n // imageView.setImageBitmap(loadedImage);\r\n // 是否第一次显示 \r\n boolean firstDisplay = !displayedImages.contains(imageUri); \r\n if (firstDisplay) { \r\n // 图片淡入效果 \r\n FadeInBitmapDisplayer.animate(imageView, 800); \r\n displayedImages.add(imageUri); \r\n \r\n/* \t ViewGroup.LayoutParams params = imageView.getLayoutParams(); \r\n \t params.height =loadedImage.getHeight(); \r\n \t ((MarginLayoutParams)params).setMargins(10, 10, 10, 10);\r\n \t imageView.setLayoutParams(params);*/ \r\n } \r\n } \r\n \t}catch(Exception e){\r\n \t\tLog.v(\"catch1\",e.getMessage());\r\n \t}\r\n }",
"public void displayNewImage() {\n\t\tthis.canvas.display();\n\t}",
"public void addPhoto(ActionEvent event) throws IOException {\n\t\t//System.out.println(\"ITEM ADDED______________________________________________\");\n\t\tFileChooser fileChooser = new FileChooser();\n\t\tfileChooser.setTitle(\"Open Photo\"); \n\t\tAccessibleUsersList.masterUserList.userLoggedIn.fileList = fileChooser.showOpenMultipleDialog(this.myNewStage);\n\t\t\n\t\tboolean checkIfImages = true;\n\t\t\n\t\tif(AccessibleUsersList.masterUserList.userLoggedIn.fileList != null){\n\t\t\t\n\t\t\tfor(File file : AccessibleUsersList.masterUserList.userLoggedIn.fileList){\n\t\t\t\t\n\t\t\t\tMimetypesFileTypeMap mimetype= new MimetypesFileTypeMap();\n\t\t\t\tmimetype.addMimeTypes(\"image png jpg jpeg JPG PNG\");\t\n\t\t\t\t\n\t\t\t\tString mimetype1 = mimetype.getContentType(file);\n\t\t\t\tString type = mimetype1.split(\"/\")[0];\n\t\t\t\t\n\t\t\t\tif(type.contains(\"image\")){\n\t\t\t //System.out.println(\"It's an image\");\n\t\t\t\t} else { \n\t\t\t \t //System.out.println(\"It's NOT an image\");\n\t\t\t \t Alert majorBagAlert = new Alert(AlertType.ERROR);\n\t\t\t\t majorBagAlert.setTitle(\"Error\");\n\t\t\t\t majorBagAlert.setHeaderText(\"One or more images is not an image file type.\");\n\t\t\t\t majorBagAlert.setContentText(\"Please enter photo(s) again\");\n\t\t\t\t majorBagAlert.showAndWait();\n\t\t\t \t \n\t\t\t\t //adding comment\n\t\t\t checkIfImages = false; \n\t\t\t }\n\t\t\t}\n }\n\t\t\n\n\t\t//iterate through the logged in user's albums \n\t\t//this is the album we have to add our photos to \n\t\tthis.selectedAlbum = AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getName(); \n\t\tAlbum foundAlbum = null; \n\t\tlong lastModifiedDate = 0; \n\t\tString path; \n\t\t\n\t\t//if we are certain we only collected files of type jpg, png or jpeg \n\t\tif(checkIfImages){\n\t\t\t\n\t\t\tif(AccessibleUsersList.masterUserList.userLoggedIn.fileList != null) {\n\t\t\t\t\n\t\t\t\tfor(File file : AccessibleUsersList.masterUserList.userLoggedIn.fileList){\n\t\t\t\t\t\n\t\t\t\t\tpath = file.getAbsolutePath();\n\t\t\t\t\tFileInputStream inputstream = new FileInputStream(path); \n\t\t\t\t\tImage image1 = new Image(inputstream); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t//iterate through the logged in user's albums \n\t\t\t\t\tint x=0; \n\t\t\t\t\tfor(Album album: AccessibleUsersList.masterUserList.userLoggedIn.albums_list){\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//looking for the current album to add our photos into \n\t\t\t\t\t\tif(album.getName().equals(this.selectedAlbum)){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfoundAlbum = AccessibleUsersList.masterUserList.userLoggedIn.albums_list.get(x);\n\t\t\t\t\t\t\tlastModifiedDate = file.lastModified();\n\t\t\t\n\t\t\t\t\t\t\tPhoto albumPhoto = new Photo(path, lastModifiedDate); \n\t\t\t\t\t\t\tfoundAlbum.getAlbum().add(albumPhoto);\t \n\t\t\t\t\t\t\t//System.out.println(foundAlbum.getAlbum());\n\t\t\t\t\t\t\t//foundAlbum.photos.add(new model.Photo(image1, lastModifiedDate));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tImageView pic = new ImageView();\n\t\t\t\t\t\t\tpic.setFitWidth(340);\n\t\t\t\t\t\t\tpic.setFitHeight(180);\n\t\t\t\t\t\t\tpic.setImage(image1);\n\t\t\t\t\t\t\tlistOfPhotos.add(pic);\n\t\t\t\t\t\t\talbumPhoto.setImage(pic);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"photo added\");\n\t\t\t\t\t\t\t//System.out.println(albumPhoto.getPathToPhoto());\n\t\t\t\t\t\t\t//System.out.println(AccessibleUsersList.masterUserList.userLoggedIn);\n\t\t\t\t\t\t\t//System.out.println(AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.addPhoto(albumPhoto); <-----cause of bug, added photo TWICE, X\n\t\t\t\t\t\t\tbreak; \n\t\t\t\t\t\t} \n\t\t\t\t\t\tx++; \n\t\t\t\t\t}\n \t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tserializeUsers(AccessibleUsersList.masterUserList);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\t\n\t}",
"public void getImageFromAlbum() {\n\t\tIntent intent = new Intent();\n\t\tintent.addCategory(Intent.CATEGORY_OPENABLE);\n\t\tintent.setType(\"image/*\");\n\t\t// 根据版本号不同使用不同的Action\n\t\tif (Build.VERSION.SDK_INT < 19) {\n\t\t\tintent.setAction(Intent.ACTION_GET_CONTENT);\n\t\t} else {\n\t\t\tintent.setAction(Intent.ACTION_OPEN_DOCUMENT);\n\t\t}\n\t\tstartActivityForResult(intent, WriteOpinionActivity.RESULT_LOAD_IMAGE);\n\n\t}",
"public void openImage() {\t\n\t\ttry {\n\t\t\timg.openImage(list);\n\t\t} \t\n\n\t\tcatch (BrokenImageException ex) {\n\t\t\ttry{\n\t\t\t\tif(!validImageContent())\n\t\t\t\t\tthrow new BadImageContentException(\"The image is broken \"\n\t\t\t\t\t\t\t+ \"due to corrupt content\");\n\t\t\t\tif(!validImageHeader())\n\t\t\t\t\tthrow new BadImageHeaderException(\"The image is broken\"\n\t\t\t\t\t\t\t+ \" due to a damaged header\");\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\"Please catch the proper Image-related Exception.\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n homeScreen = HomeScreenController.getInstance();\n User u = homeScreen.getCurrentUser();\n CRUDUser cr = new CRUDUser();\n this.username.setText(u.getUserInfoIdId().getUserFirstName());\nBufferedImage image = null;\n\n if(u.getUserInfoIdId().getUserImage()!=null){\n try {\n image = ImageIO.read(new URL(\"http://127.0.0.1:8000/Files/podcastFiles/\" + u.getUserInfoIdId().getUserImage()));\n } catch (MalformedURLException ex) {\n Logger.getLogger(GestionUsersController.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(GestionUsersController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }else{\n try {\n image = ImageIO.read(new URL(\"http://127.0.0.1:8000/Files/podcastFiles/avatar.jpg\"));\n } catch (MalformedURLException ex) {\n Logger.getLogger(GestionUsersController.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(GestionUsersController.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }\n WritableImage img = SwingFXUtils.toFXImage(image, null);\n this.imageUser.setFill(new ImagePattern(img));\n \n this.showUsers();\n }",
"public void openImage() {\n InputStream f = Controller.class.getResourceAsStream(\"route.png\");\n img = new Image(f, mapImage.getFitWidth(), mapImage.getFitHeight(), false, true);\n h = (int) img.getHeight();\n w = (int) img.getWidth();\n pathNodes = new GraphNodeAL[h * w];\n mapImage.setImage(img);\n //makeGrayscale();\n }",
"private void updateImage(PDFFile file, int pageNumber) {\n final Task<ImageView> updateImageTask = new Task<ImageView>() {\n @Override\n protected ImageView call() {\n PDFPage page = file.getPage(pageNumber + 1);\n Rectangle2D bbox = page.getBBox();\n\n // Get dimensions\n int width = (int) bbox.getWidth();\n int height = (int) bbox.getHeight();\n\n // Get image\n java.awt.Image awtImage = page.getImage(width, height, bbox, null, true, true);\n\n // Draw image to buffered image\n BufferedImage buffImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n buffImage.createGraphics().drawImage(awtImage, 0, 0, null);\n\n // Convert to JavaFX image\n Image image = SwingFXUtils.toFXImage(buffImage, null);\n\n // Wrap in image view\n ImageView imageView = new ImageView(image);\n imageView.setPreserveRatio(true);\n\n return imageView ;\n }\n };\n\n updateImageTask.setOnSucceeded(event -> currentImage.set(updateImageTask.getValue()));\n updateImageTask.setOnFailed(event -> updateImageTask.getException().printStackTrace());\n\n getThreadExecutor().submit(updateImageTask);\n }",
"public void loadPdfFile() {\n PDFView.Configurator configurator;\n RelativeLayout relativeLayout = (RelativeLayout)this.pdfView.getParent();\n this.errorTextView = (TextView)relativeLayout.findViewById(2131296408);\n this.progressBar = (ProgressBar)relativeLayout.findViewById(2131296534);\n this.sharedPreferences = Factory.getInstance().getMainNavigationActivity().getSharedPreferences(\"AppsgeyserPrefs\", 0);\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"pdf_saved_page_\");\n stringBuilder.append(this.initialTabId);\n savedPageKey = stringBuilder.toString();\n if (this.pathFile.startsWith(\"file:///\")) {\n String string2 = this.pathFile.replace((CharSequence)\"file:///android_asset/\", (CharSequence)\"\");\n configurator = this.pdfView.fromAsset(string2);\n } else {\n boolean bl = this.pathFile.startsWith(\"http\");\n configurator = null;\n if (bl) {\n String string3 = this.pathFile;\n new LoaderPdf().execute((Object[])new String[]{string3});\n }\n }\n this.pdfView.useBestQuality(true);\n if (configurator == null) return;\n try {\n this.loadConfigurator(configurator);\n return;\n }\n catch (Exception exception) {\n exception.printStackTrace();\n this.progressBar.setVisibility(8);\n }\n }",
"public void displayGivenImage() {\n\t\tthis.image.display();\n\t}",
"public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n CropImage.ActivityResult result = CropImage.getActivityResult(data);\n if (resultCode == -1) {\n if (requestCode != 11) {\n String valueOf = String.valueOf(result.getUri());\n this.imageUri = valueOf;\n if (valueOf != null) {\n if (this.isattach.booleanValue()) {\n this.tv_attachfile.setText(this.imageUri);\n fileType = \"png\";\n Log.i(\"datafile\",result.toString() + \"\\n\" + result.getOriginalUri() + \"\\n\" + result.getUri());\n this.isattach = false;\n this.attach_file = this.imageUri;\n } else {\n this.eventphoto.setImageURI(Uri.parse(this.imageUri));\n this.upload_photo = this.imageUri;\n this.ismageEdited = true;\n }\n }\n } else if (requestCode == 11){\n this.tv_attachfilepdf.setText(data.getDataString());\n fileType = \"pdf\";\n\n String filePath = data.getData().getPath();\n String fileName = data.getData().getLastPathSegment();\n this.attach_file = data.getData().getPath();\n Log.i(\"file\", filePath + \"\\n\" + fileName + \"\\n\" + attach_file);\n\n /*uri = data.getData();\n this.attach_file = data.getData().toString();\n Log.i(\"uriii\", uri.toString());\n File file2 = new File(this.attach_file);\n Log.i(\"uriiName\", file2.getName());\n Log.i(\"uriiPath\", file2.getPath());\n Log.i(\"uriiParent\", file2.getParent());*/\n }\n }\n }",
"public void populateViewer(iContainer fv, DocumentItem doc) {\n try {\n RenderableDataItem row = doc.rowData;\n iWidget field;\n\n field = fv.getWidget(\"documentDate\");\n\n String s;\n\n if (field != null) {\n s = (row == null)\n ? \"\"\n : Functions.convertDateTime(row.get(2).getValue());\n field.setValue(s);\n }\n\n field = fv.getWidget(\"documentTitle\");\n\n if (field != null) {\n s = doc.itemTitle;\n\n if ((s == null) && (row != null)) {\n s = row.get(1).toString();\n }\n\n field.setValue((s == null)\n ? \"\"\n : s);\n }\n\n field = fv.getWidget(\"extraHeaderDetail\");\n\n if (field != null) {\n s = \"\";\n\n if ((row != null) && (row.size() > 4)) {\n s = field.getValueAsString();\n\n if ((s != null) && (s.length() != 0)) {\n String title = (String) row.get(4).getValue();\n\n s = String.format(s, title);\n } else {\n s = (String) row.get(4).getValue();\n }\n }\n\n field.setValue(s);\n }\n\n iViewer v = (iViewer) fv.getWidget(\"documentDetail\");\n\n if (v != null) {\n boolean html = false;\n\n if ((doc.mimeType != null) && doc.mimeType.startsWith(iConstants.HTML_MIME_TYPE)) {\n html = true;\n }\n\n if (v instanceof DocumentPaneViewer) {\n ((DocumentPaneViewer) v).setText(doc.itemBody, html);\n } else if (v instanceof WebBrowser) {\n s = doc.itemBody;\n\n if (!html) {\n s = \"<html><body><pre style=\\\"white-space: pre-wrap; margin:0; padding:0\\\">\" + s + \"</pre></body></html>\";\n }\n //do not pass in the base href because if it is not http/https it will break some browsers (notable iOS)\n String href = null; //JavaURLConnection.baseToExternalForm(documentLink.getURL(contextWidget));\n \n final WebBrowser browser = (WebBrowser) v;\n\n if (v.getWidth() < 50) {\n\n /**\n * We need to wait until the browser has been sized before we load\n * the content so the the content will be appropriately zoomed for\n * iOS\n *\n * Setting the 'autoInsertMetaContent' to true in the custom\n * properties in the RML file Causes a 'viewport' meta tag to be\n * inserted and set to the size of the browser.\n */\n final String data = s;\n final String url = href;\n browser.getContainerComponent().addViewListener(new aViewListenerAdapter() {\n @Override\n public void viewResized(ChangeEvent e) {\n if (!browser.isDisposed() && (browser.getWidth() > 50)) {\n browser.getContainerComponent().removeViewListener(this);\n browser.setHTML(url, data);\n }\n }\n @Override\n public boolean wantsResizeEvent() {\n return true;\n }\n });\n } else {\n browser.setHTML(href, s);\n }\n }\n else {\n v.setValue(doc.itemBody);\n }\n }\n } catch(Exception e) {\n Utils.handleError(e);\n }\n }",
"@Override\n public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {\n\n Log.d(TAG, \"onSuccess: Downloaded File\");\n pdfView.fromFile(localFile).load();\n\n }",
"private void postImage(String fid, final String fileName) {\n\t\tJSONObject jsObject = new JSONObject();\n\t\tSharedPreferences myPrefs = getActivity().getSharedPreferences(\"myPrefs\",getActivity().MODE_PRIVATE);\n\t\ttry {\n\n\t\t\tjsObject.put(\"field_image\", new JSONObject().put(\"und\", new JSONArray().put(0, new JSONObject().put(\"fid\", fid))));\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcd = new ConnectionDetector(getActivity());\n\n\t\t// Check if Internet present\n\t\tif (!cd.isConnectingToInternet()) {\n\t\t\t// Internet Connection is not present\n\t\t\talert.showAlertDialog(getActivity(),\n\t\t\t\t\t\"Internet Connection Error\",\n\t\t\t\t\t\"Please connect to working Internet connection\", false);\n\t\t\t// stop executing code by return\n\t\t\treturn;\n\t\t}else{\n\t\t\tnew UpdateLike(jsObject,myPrefs){\n\t\t\t\tprotected void onPreExecute() {\n\t\t\t\t\tAppUtil.initializeProgressDialog(getActivity(), \"Finalizing post...\", progressDialog);\n\t\t\t\t};\n\t\t\t\tprotected void onPostExecute(String result) {\n\t\t\t\t\tAppUtil.cancelProgressDialog();\n\t\t\t\t\tinfalteImageOnCoverPhoto(fileName);\n\t\t\t\t};\n\t\t\t}.execute(\"http://www1.kitchengardens.in/svc/node/\"+garden_node_id);\n\t\t}\n\t}",
"public void loadTo(String url, ImageView imageView) {\n relationsMap.put(imageView, url);\n\n // If image already cached just show it\n Bitmap bitmap = memoryCache.getData(url);\n if (bitmap != null) {\n Log.d(\"HIHO\", \"bitmap from memory\");\n imageView.setImageBitmap(bitmap);\n } else {\n loadAndDisplay(url, imageView);\n }\n }",
"public PhotoBean() {\n\t\tsuper();\n\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\n\t\tbundleDocument = facesContext.getApplication().getResourceBundle(facesContext,\n\t\t\t\tDocUtilConstants.DOCUMENT_BUNDLE_MSG_NAME);\n\n\t}",
"private void onLoad() {\n\n Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n startActivityForResult(intent, RESULT_LOAD_ARTIST_IMAGE);\n }",
"@Override\n public void onSuccess(FileDownloadTask.TaskSnapshot state) {\n useGlide(Uri.fromFile(animal_file1));\n\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 234 && data != null && data.getData() != null) {\n filePath = data.getData();\n Uri uri = data.getData();\n try {\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), uri);\n ImageView imageView = findViewById(R.id.displayPicture);\n imageView.setImageBitmap(bitmap);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n }",
"private void saveImageInstantly() {\n\n if (movie != null) {\n\n // Get movie's title and set an initial file name\n String movieTitle = movie.getMovieTitle();\n\n // Replace any invalid characters\n movieTitle = movieTitle.replaceAll(\"[\\\"/?\\\"*><|]\", \"\").replace(\":\", \"-\");\n\n // If preferences file is empty\n if (userDirectoryString.equals(\"empty\")) {\n\n userDirectoryString = System.getProperty(\"user.home\");\n }\n\n File userDirectory = new File(userDirectoryString + \"/\" + movieTitle + \".jpg\");\n\n // If it can't access User Home, default to C drive\n if (!userDirectory.getParentFile().canRead()) {\n userDirectory = new File(\"D:\\\\\" + movieTitle + \".jpg\");\n }\n\n // Check file isn't null, so it the image view\n if (imgPoster.getImage() != null) {\n\n try {\n\n ImageIO.write(SwingFXUtils.fromFXImage(imgPoster.getImage(), null), \"jpg\", userDirectory);\n setLblStatus(\"Poster saved successfully.\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }",
"public void catchImage(String data) {\n\t\tsetPicturePreview(data);\n\n\t}",
"private void setGalleryDisplay() {\n // ArrayList<model.Photo> photos = model.DirectoryManager.getTree().getDir().getPhotos();\n ArrayList<Photo> photos = User.getGalleryPhotos();\n if (photos != null) {\n for (model.Photo photo : photos) {\n Image imageOrigin = new Image(\"File:\" + photo.getPath());\n ImageView displayImage = new ImageView(imageOrigin);\n displayImage.setId(photo.getPath());\n\n double imageHeight = imageOrigin.getHeight();\n double imageWidth = imageOrigin.getWidth();\n displayImage.setPreserveRatio(true);\n if (imageHeight <= imageWidth) {\n displayImage.setFitWidth(190);\n } else if (imageHeight > imageWidth) {\n displayImage.setFitHeight(120);\n }\n\n displayImage.setFitWidth(190);\n displayImage.getStyleClass().add(\"photoElement\");\n displayImage.setOnMouseClicked(\n (MouseEvent e) -> {\n model.User.setPhoto(model.PhotoManager.getPhoto(displayImage.getId()));\n try {\n loadNextScene(rootPane, \"/views/focusPhotoPane.fxml\");\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n });\n galleryDisplay.getChildren().add(displayImage);\n }\n }\n }",
"@Override\n\tpublic Image loadEntity() {\n\t\ttry {\n\t\t\tImage entityImage = new Image(new FileInputStream(IMAGE_LOCATION));\n\t\t\treturn entityImage;\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Image file not found\");\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\n public void loadImage(String url, ImageView imageView) {\n ImageLoader.getInstance().displayImage(url, imageView);\n }",
"@Override\n public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {\n Log.d(\"TAG\", \"onSuccess: \" + localFile + \" :This is the tasksnap: \" + taskSnapshot);\n bitmap = BitmapFactory.decodeFile(localFile.getAbsolutePath());\n imageView.setImageBitmap(bitmap);\n navImage.setImageBitmap(bitmap);\n\n }",
"private void onSuccessImageTransfer()\n {\n Log.d(TAG, \"onSuccessImageTransfer: finished.\");\n this.fragmentActivity.runOnUiThread(() -> Toast.makeText(this.fragmentActivity,\n \"Image transfer succeeded\", Toast.LENGTH_SHORT).show());\n\n switchToPickLayout();\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n\n if (requestCode == CAPTURE_IMAGE_REQUEST && resultCode == RESULT_OK) {\n Bitmap myBitmap = BitmapFactory.decodeFile(photoFile.getAbsolutePath());\n imgDisplay.setImageBitmap(myBitmap);\n textPath.setText(photoFile.getName());\n } else {\n displayMessage(getBaseContext(), \"Request cancelled or something went wrong.\");\n }\n\n }",
"private void runSlideshow(ActionEvent actionEvent) {\n Picture pictureToDisplay = getNextPicture();\n try {\n InputStream inputStream = new FileInputStream(pictureToDisplay.getAbsolutePath());\n BufferedImage bufferedImage = ImageIO.read(inputStream);\n Image image = SwingFXUtils.toFXImage(bufferedImage, null);\n\n this.imageView.setImage(image);\n inputStream.close();\n } catch (IOException ignored) {\n }\n }",
"@Override\n\t protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t if(requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) {\n\t \tprofile_photo.setVisibility(View.VISIBLE);\n\t \tUri selectedImage = data.getData();\n\t String[] filePathColumn = { MediaStore.Images.Media.DATA };\n\n\t Cursor cursor = getContentResolver().query(selectedImage,\n\t filePathColumn, null, null, null);\n\t cursor.moveToFirst();\n\n\t int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n\t String picturePath = cursor.getString(columnIndex);\n\t cursor.close();\n\t \n\t ImageView imageView = (ImageView) findViewById(R.id.profile_photo);\n\t imageView.setImageBitmap(BitmapFactory.decodeFile(picturePath));\n\t }\n\t }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == PICK_IMAGE_REQUEST && resultCode == RESULT_OK && data != null && data.getData() != null) {\n filePath = data.getData();\n\n Picasso.get().load(filePath).into(imageView);\n\n }\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n switch (requestCode) {\n case SELECT_PHOTO:\n if (resultCode == RESULT_OK) {\n // imABoolean=true;\n try {\n filePath = data.getData();\n bitmap = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), filePath);\n\n logo.setImageBitmap(bitmap);\n\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n break;\n }\n }\n\n\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n JFileChooser fc = new JFileChooser(); \n int returnVal = fc.showOpenDialog(null);\n if (returnVal == JFileChooser.APPROVE_OPTION) {\n File file = fc.getSelectedFile();\n System.out.println(file.getAbsolutePath()); \n image = loadImage( file);\n }\n }",
"public void onStartPage(PdfWriter writer, Document document) {\r\n\t\tpagenumber++;\r\n\r\n\t\tImage image;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\timage = Image.getInstance(ResourceUtils.getFile(\"classpath:images\"+File.separator+\"cpmis-submission-pdf-hrader.png\").getAbsolutePath());\r\n\t\t\tint indentation = 0;\r\n\t\t\tfloat scaler = ((document.getPageSize().getWidth() - indentation) / image.getWidth()) * 100;\r\n\t\t\timage.scalePercent(scaler);\r\n\t\t\timage.setAbsolutePosition(0, document.getPageSize().getHeight() + document.topMargin() - image.getHeight());\r\n\t\t\tdocument.add(image);\r\n\t\t\tdocument.add(Chunk.NEWLINE);\r\n\t\t\tdocument.add(Chunk.NEWLINE);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void loadImage(final String path, final ImageView imageView){\r\n imageView.setTag(path);\r\n if (mUIHandler==null){\r\n mUIHandler=new Handler(){\r\n @Override\r\n public void handleMessage(Message msg) {\r\n //Get the image and set its imageView.\r\n ImgBeanHolder holder= (ImgBeanHolder) msg.obj;\r\n Bitmap bitmap = holder.bitmap;\r\n ImageView imageview= holder.imageView;\r\n String path = holder.path;\r\n if (imageview.getTag().toString().equals( path)){\r\n imageview.setImageBitmap(bitmap);\r\n }\r\n }\r\n };\r\n }\r\n //Get the bitmap through the path in the cache.\r\n Bitmap bm=getBitmapFromLruCache(path);\r\n if (bm!=null){\r\n refreshBitmap(bm, path, imageView);\r\n }else{\r\n addTask(() -> {\r\n //Get the size of the image which wants to be displayed.\r\n ImageSize imageSize= getImageViewSize(imageView);\r\n //Compress the image.\r\n Bitmap bm1 =decodeSampledBitmapFromPath(imageSize.width,imageSize.height,path);\r\n //Put the image into the cache.\r\n addBitmapToLruCache(path, bm1);\r\n //Refresh the display of the image.\r\n refreshBitmap(bm1, path, imageView);\r\n mSemaphoreThreadPool.release();\r\n });\r\n }\r\n\r\n }",
"private void setPhotoAttcher() {\n\n }",
"public void onActivityResult(int i, int i2, Intent intent2) {\n super.onActivityResult(i, i2, intent2);\n if (i == PICK_IMAGE_REQUEST && i2 == -1 && intent2 != null && intent2.getData() != null) {\n this.filePath = intent2.getData();\n if (this.type.equals(ContentTypes.EXTENSION_JPG_1)) {\n this.recyclerView.setVisibility(View.GONE);\n this.img_view.setVisibility(View.VISIBLE);\n try {\n this.img_view.setImageBitmap(MediaStore.Images.Media.getBitmap(getContentResolver(), this.filePath));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (this.type.equals(\"pdf\")) {\n this.recyclerView.setVisibility(View.GONE);\n this.img_view.setVisibility(View.VISIBLE);\n this.img_view.setImageResource(R.drawable.preview);\n }\n }\n }",
"private void helperDisplayInputImage()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//---- Get currently selected file index in the combo box\r\n\t\t\tint index = mainFormLink.getComponentPanelLeft().getComponentComboboxFileName().getSelectedIndex();\r\n\r\n\t\t\t//---- Check the index if the action is invoked by image deletion then causes error\r\n\t\t\tint imageCount = DataController.getTable().getTableSize();\r\n\r\n\t\t\tif (index >= 0 && index < imageCount)\r\n\t\t\t{\r\n\t\t\t\t//---- Get file path of the table\r\n\r\n\t\t\t\tString filePath = DataController.getTable().getElement(index).getDataFile().getFilePath();\r\n\r\n\t\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().displayPolygonStop();\r\n\t\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().loadImage(filePath);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}",
"public void loadImage() {\n\t\ttry {\n\t\t\tcurrImage = ImageIO.read(new File(INPUT_DIR,fileNames.get(fileCounter)));\n\t\t\tcurrImageOrigDim = new Dimension(currImage.getWidth(), currImage.getHeight());\n\t\t\tlabel4.setText(\"Processing: \" + fileNames.get(fileCounter));\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// Resize to Frame\n\t\tdouble imgHt = currImage.getHeight();\n\t\tdouble imgWt = currImage.getWidth();\n\t\tdouble wRatio = FRAME_SIZE/imgWt;\n\t\tdouble hRatio = FRAME_SIZE/imgHt;\n\t\taspectR = Math.min(wRatio,hRatio);\n\t\tcurrImage = getScaledInstance(currImage, (int)(aspectR*imgWt), (int)(aspectR*imgHt));\n\t\tcurrImageBounds = new Rectangle(0, 0, currImage.getWidth(), currImage.getHeight());\n\t\trepaint();\n\t}",
"public static void showImage(Stage primaryStage) {\n Pane pane = new HBox(10);\n pane.setPadding(new Insets(5, 5, 5, 5));\n Image image = new Image(\"image/us.gif\"); //load image from file\n pane.getChildren().add(new ImageView(image));\n\n ImageView imageView2 = new ImageView(image);\n imageView2.setFitHeight(100);\n imageView2.setFitWidth(100);\n pane.getChildren().add(imageView2);\n\n ImageView imageView3 = new ImageView(image);\n imageView3.setRotate(90);\n pane.getChildren().add(imageView3);\n\n // Create a scene and place it in the stage\n Scene scene = new Scene(pane);\n primaryStage.setTitle(\"ShowImage\"); // Set the stage title\n primaryStage.setScene(scene); // Place the scene in the stage\n primaryStage.show(); // Display the stage\n }",
"@Override\n public void run() {\n if (imageViewReused(loadDataHolder))\n return;\n // Download image from web url\n Bitmap bitmap = getBitmap(loadDataHolder.getUrl());\n\n // Save to cache\n if (bitmap != null) {\n memoryCache.put(loadDataHolder.getUrl(), bitmap);\n }\n\n if (imageViewReused(loadDataHolder))\n return;\n\n // Get bitmap to display\n BitmapDisplayRunnable displayRunnable =\n new BitmapDisplayRunnable(bitmap, loadDataHolder);\n\n // Post message to handler associated with UI thread\n handler.post(displayRunnable);\n }",
"@Override\n public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {\n String filePath = localFile.getPath();\n Bitmap bitmap = BitmapFactory.decodeFile(filePath);\n viewHolder.itemImage.setImageBitmap(bitmap);\n }",
"private void loadImage(final String path) {\n ivContent.setImageURI(Uri.fromFile(new File(path)));\n\n /*Glide.with(getActivity())\n .load(path)\n .apply(RequestOptions.diskCacheStrategyOf(DiskCacheStrategy.AUTOMATIC))\n .into(ivContent);*/\n\n\n }",
"public void embedImage(File imageFile, Element canvas, Rectangle2D bbox, boolean center) {\n final String METHOD_NAME = \"addFluffImage(File,Rectangle2D)\";\n if (null == imageFile) {\n return;\n }\n try {\n InputStream is = new BufferedInputStream(new FileInputStream(imageFile));\n String mimeType = URLConnection.guessContentTypeFromStream(is);\n String format = mimeType.substring(mimeType.indexOf(\"/\") + 1);\n\n RenderedImage fluffImage = ImageIO.read(imageFile);\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n ImageIO.write(fluffImage, format, bytes);\n \n double width = fluffImage.getWidth();\n double height = fluffImage.getHeight();\n double scale = Math.min(bbox.getWidth() / width, bbox.getHeight() / height);\n width *= scale;\n height *= scale;\n double x = bbox.getX();\n double y = bbox.getY();\n if (center) {\n x += (bbox.getWidth() - width) / 2;\n y += (bbox.getHeight() - height) / 2;\n }\n Element img = svgDocument.createElementNS(svgNS, SVGConstants.SVG_IMAGE_TAG);\n img.setAttributeNS(null, SVGConstants.SVG_X_ATTRIBUTE, Double.toString(x));\n img.setAttributeNS(null, SVGConstants.SVG_Y_ATTRIBUTE, Double.toString(y));\n img.setAttributeNS(null, SVGConstants.SVG_WIDTH_ATTRIBUTE, Double.toString(width));\n img.setAttributeNS(null, SVGConstants.SVG_HEIGHT_ATTRIBUTE, Double.toString(height));\n img.setAttributeNS(SVGConstants.XLINK_NAMESPACE_URI, SVGConstants.XLINK_HREF_QNAME,\n \"data:\" + mimeType + \";base64,\" + Base64.getEncoder().encodeToString(bytes.toByteArray()));\n canvas.appendChild(img);\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n MegaMekLab.getLogger().log(PrintRecordSheet.class, METHOD_NAME, LogLevel.ERROR,\n \"Fluff image file not found: \" + imageFile.getPath());\n } catch (IOException e) {\n // TODO Auto-generated catch block\n MegaMekLab.getLogger().log(PrintRecordSheet.class, METHOD_NAME, LogLevel.ERROR,\n \"Error reading fluff image file: \" + imageFile.getPath());\n }\n \n }",
"@Override\n public void run() {\n try {\n Drawable drawable = Drawable.createFromStream(new URL(image_path).openStream(), \"\");\n\n Message message = Message.obtain();\n message.obj = drawable;\n handler.sendMessage(message);\n } catch (MalformedURLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }"
]
| [
"0.61574256",
"0.5973803",
"0.59221315",
"0.58343333",
"0.57990956",
"0.5790731",
"0.5742541",
"0.572924",
"0.5723719",
"0.5707221",
"0.57071733",
"0.56970763",
"0.56962293",
"0.5663757",
"0.5642553",
"0.5639774",
"0.56163883",
"0.56066716",
"0.55832213",
"0.558243",
"0.55772305",
"0.5548444",
"0.5536849",
"0.5496369",
"0.54888326",
"0.5448656",
"0.5441562",
"0.5436122",
"0.543412",
"0.54327214",
"0.54229486",
"0.54072326",
"0.5400237",
"0.5393142",
"0.5383212",
"0.53792083",
"0.5376395",
"0.53705704",
"0.5361655",
"0.5351293",
"0.5342775",
"0.5336443",
"0.5330196",
"0.53275806",
"0.53275114",
"0.5327233",
"0.53234446",
"0.53225756",
"0.53193665",
"0.5317107",
"0.53149456",
"0.5311791",
"0.5311003",
"0.5309344",
"0.5307602",
"0.5306871",
"0.5304703",
"0.5303905",
"0.5299999",
"0.5297328",
"0.5288108",
"0.52858573",
"0.528271",
"0.5280022",
"0.52797365",
"0.52796113",
"0.5271953",
"0.5269812",
"0.52669954",
"0.5264875",
"0.5257852",
"0.5256704",
"0.52564514",
"0.5248618",
"0.52467215",
"0.5245454",
"0.5241119",
"0.5240644",
"0.5235198",
"0.5228814",
"0.522812",
"0.5226264",
"0.52215266",
"0.52194977",
"0.52161354",
"0.5215065",
"0.52130723",
"0.52114385",
"0.5209546",
"0.52081555",
"0.52023643",
"0.5202348",
"0.5201809",
"0.51968306",
"0.51968133",
"0.5193859",
"0.51931864",
"0.5191074",
"0.51897424",
"0.51895803",
"0.51888597"
]
| 0.0 | -1 |
Load the image in the document and in the case of success attach it to the viewer | protected IUploader.OnFinishUploaderHandler getOnFinishUploaderHandler(final FlowPanel panelImages) {
IUploader.OnFinishUploaderHandler onFinishUploaderHandler = new IUploader.OnFinishUploaderHandler() {
public void onFinish(IUploader uploader) {
if (uploader.getStatus() == Status.SUCCESS) {
PreloadedImage preloadedImage = new PreloadedImage(uploader.fileUrl(), showImage);
// The server sends useful information to the client by default
preloadedImagePanelMap.put(preloadedImage, panelImages);
UploadedInfo info = uploader.getServerInfo();
}
}
};
return onFinishUploaderHandler;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void imageLoadSuccess(String path) {\n Intent mainIntent = new Intent(MainActivity.this, PresenterActivity.class);\n mainIntent.putExtra(\"path\", path);\n startActivity(mainIntent);\n }",
"public void processAddImageOverlay() {\n PropertiesManager props = PropertiesManager.getPropertiesManager();\n\n // AND NOW ASK THE USER FOR THE FILE TO OPEN\n FileChooser fc = new FileChooser();\n fc.setInitialDirectory(new File(PATH_WORK));\n fc.setTitle(props.getProperty(LOAD_WORK_TITLE));\n File imageOverlayFile = fc.showOpenDialog(app.getGUI().getWindow());\n \n // SEND THE IMAGE FILE TO DATA MANAGER\n dataManager.setImageOverlayFile(imageOverlayFile);\n \n // CHANGE THE CURSOR\n Scene scene = app.getGUI().getPrimaryScene();\n scene.setCursor(Cursor.CROSSHAIR);\n \n // CHANGE THE STATE\n dataManager.setState(mmmState.ADD_IMAGE_MODE);\n }",
"public void drawImage() {\n ImageView imageView = (ImageView) findViewById(R.id.photo);\n imageView.setVisibility(View.VISIBLE);\n Glide.with(MainActivity.this).load(iURI).fitCenter().into(imageView);\n }",
"private void downloadPoster() {\n\n try {\n // Downloading the image from URL\n URL url = new URL(Constants.MOVIE_MEDIA_URL + cbPosterQuality.getSelectionModel().getSelectedItem().getKey() + movie.getPosterURL());\n Image image = new Image(url.toExternalForm(), true);\n\n // Adding the image to the ImageView\n imgPoster.setImage(image);\n\n // Adding the ImageView to the custom made ImageViewPane\n imageViewPane.setImageView(imgPoster);\n\n // Binding the image download progress to the progress indicator\n imageProgressIndicator.visibleProperty().bind(image.progressProperty().lessThan(1));\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n }",
"public void openDialog() {\r\n\t\tString filename = this.getFileName();\r\n\t\tif (filename.equals(null) || filename.equals(\"\") ) {\r\n\t\t\ttext.append(\"\\nPlease select valid image\");\r\n\t\t\topenDialog();\r\n\t\t}\r\n\t\tdisplay_img = this.loadImage(filename);\r\n\r\n\t}",
"private void processAndSetImage() {\n\n // Resample the saved image to fit the ImageView\n mResultsBitmap = resamplePic(this, mTempPhotoPath);\n\n// tv.setText(base64conversion(photoFile));\n//\n// Intent intent = new Intent(Intent.ACTION_SEND);\n// intent.setType(\"text/plain\");\n// intent.putExtra(Intent.EXTRA_TEXT, base64conversion(photoFile));\n// startActivity(intent);\n\n /**\n * UPLOAD IMAGE USING RETROFIT\n */\n\n retroFitHelper(base64conversion(photoFile));\n\n // Set the new bitmap to the ImageView\n imageView.setImageBitmap(mResultsBitmap);\n }",
"@Override\n public void onDocumentFinish() {\n if (mImageLoader != null) {\n mImageLoader.clearResources();\n }\n }",
"protected abstract Image loadImage();",
"@FXML\r\n public void imageButtonClicked() {\r\n File file = fileChooser.showOpenDialog(viewHandler.getPrimaryStage());\r\n if (file != null) {\r\n try {\r\n viewModel.setImageurl(ImageConverter.ImageToByte(file));\r\n Image img = new Image(new ByteArrayInputStream(viewModel.getImageurl()));\r\n dogPicture.setFill(new ImagePattern(img));\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }",
"private void showView() {\n\t\tfinal ImageView image = (ImageView) findViewById(R.id.image); \n\t\t//screen.addView(image);\n\t\t//image.setImageResource(images[0]);\n\n\t\tString fileName = getFilesDir().getPath() + \"/\" + FILE_NAME;\n\t\t//System.out.println(fileName);\n\t\tBitmap bm = BitmapFactory.decodeFile(fileName); \n\t\t\n\t\timage.setImageBitmap(bm); \n\t\t\n\t\t//System.out.println(\"show done!\\n\");\t\t\n\t\t\n\t}",
"public void loadInputImage()\n{\n selectInput(\"Select a file to process:\", \"imageLoader\"); // select image window -> imageLoader()\n}",
"public void saveAsImage(){\n\t\tif(currentView == null){\r\n\t\t\tJOptionPane.showMessageDialog(this, \"A tab must be open before an image can be saved\", \"Information\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcurrentView.saveAsImage();\r\n\t}",
"private void displayImage() {\n if (currentPhotoPath != null) {\n // checkPicture = true; depreciated, try catch to catch if photo exists\n Bitmap temp = fixOrientation(BitmapFactory.decodeFile(currentPhotoPath));\n bitmapForAnalysis = temp;\n imageView.setImageBitmap(temp);\n } else {\n Toast.makeText(this, \"Image Path is null\", Toast.LENGTH_LONG).show();\n }\n }",
"public void openImage(String name) throws ViewerException {\n\n\t}",
"@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\twebView.loadUrl(Uri.fromFile(new File(fileImg)).toString());\n\n\t\t\t\t\t\t\t\t\t\t\t}",
"public void saveImage(){\n new Thread() {\n public void run() {\n String image_url = stuffRoomInfo.getStuffLink();\n Log.i(\"OGT\", \"image_url:in showImage \" + image_url);\n getOGTag(image_url);\n // Display a png image from the specified file\n ImageUrlSendServer();\n }\n }.start();\n }",
"public void displayImage() {\n RealImage real = new RealImage(url);\n real.displayImage();\n }",
"private void getNewImage() {\n try {\n URL imageUrl = new URL(path);\n URLConnection uc = imageUrl.openConnection();\n\n InputStream is = uc.getInputStream();\n BufferedInputStream bis = new BufferedInputStream(is);\n\n ByteArrayOutputStream buffer = new ByteArrayOutputStream();\n int current;\n while ((current = bis.read()) != -1) {\n buffer.write((byte) current);\n }\n final byte[] data = buffer.toByteArray();\n // enqueue UI update as a priority\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n public void run() {\n view.setImageBitmap(BitmapFactory.decodeByteArray(\n data, 0, data.length));\n }\n });\n // update database while that is queueing\n ContentValues values = new ContentValues();\n values.put(MovieEntry.COLUMN_POSTER, data);\n context.getContentResolver().update(MovieEntry.buildMovieUriWithId(movieId),\n values, null, null);\n } catch (Exception E) {\n Log.i(TAG, E.toString());\n E.printStackTrace();\n }\n }",
"private void onLoad(Vampire vampire) {\n ImageView view = new ImageView(vampireImage);\n addEntity(vampire, view);\n squares.getChildren().add(view);\n }",
"public void uploadImg(View view){\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.setType(\"image/*\");\n intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), SELECT_PICTURE);\n }",
"private void loadData() {\r\n titleProperty.set(TITLE);\r\n imageView.setImage(null);\r\n scrollPane.setContent(null);\r\n final Task<Void> finisher = new Task<Void>() {\r\n @Override\r\n protected Void call() throws Exception {\r\n Platform.runLater(new Runnable() {\r\n @Override\r\n public void run() {\r\n buffer = replay.politicalBuffer;\r\n output = new WritableImage(replay.bufferWidth, replay.bufferHeight);\r\n output.getPixelWriter().setPixels(0, 0, replay.bufferWidth, replay.bufferHeight, PixelFormat.getIntArgbPreInstance(), buffer, 0, replay.bufferWidth);\r\n progressBar.progressProperty().unbind();\r\n progressBar.setProgress(0);\r\n statusLabel.textProperty().unbind();\r\n statusLabel.setText(l10n(\"replay.map.loaded\"));\r\n scrollPane.setContent(null);\r\n imageView.setImage(output);\r\n scrollPane.setContent(imageView);\r\n int fitWidth = Integer.parseInt(settings.getProperty(\"map.fit.width\", \"0\"));\r\n int fitHeight = Integer.parseInt(settings.getProperty(\"map.fit.height\", \"0\"));\r\n imageView.setFitHeight(fitHeight);\r\n imageView.setFitWidth(fitWidth);\r\n lock.release();\r\n }\r\n });\r\n return null;\r\n }\r\n };\r\n progressBar.progressProperty().bind(finisher.progressProperty());\r\n statusLabel.textProperty().bind(finisher.titleProperty());\r\n replay.loadData(finisher);\r\n }",
"@Override\n public void loadImage(@Nullable String url) {\n if (view != null) {\n if (url == null) {\n view.exit();\n return;\n }\n view.showImage(url);\n }\n }",
"private void viewImage(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tint id= Integer.parseInt(request.getParameter(\"fileId\"));\n\t\tFiles file= new FilesDAO().view(id);\n\t\trequest.setAttribute(\"files\", file);\n\t\trequest.setAttribute(\"path\", path);\n\t\trequest.getRequestDispatcher(\"viewImage.jsp\").forward(request, response);\n\t\tSystem.out.println(file);\n\t}",
"private void showImageDetail() {\n }",
"public void getImage(View view){\n if(Build.VERSION.SDK_INT > 19) {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.setType(\"image/*\");\n intent.setFlags(Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION);\n intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivityForResult(intent, 100);\n } else {\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n intent.setType(\"image/*\");\n intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivityForResult(intent, 100);\n }\n }",
"public synchronized void showPage() {\n final ShowPageImage viewer = new ShowPageImage();\n\n if (SwingUtilities.isEventDispatchThread()) {\n viewer.run();\n } else {\n SwingUtilities.invokeLater(viewer);\n }\n }",
"public void openCustomPictureCreator() {\n\n\t\tFXMLLoader fxmlL = new FXMLLoader(getClass().getResource(\"AvatarDrawingTool.fxml\"));\n\t\ttry {\n\t\t\tBorderPane login = (BorderPane) fxmlL.load();\n\n\t\t\tScene scene = new Scene(login, 600, 400);\n\n\t\t\tStage stage = new Stage();\n\t\t\tstage.setScene(scene);\n\t\t\tstage.initModality(Modality.APPLICATION_MODAL);\n\n\t\t\tstage.showAndWait();\n\t\t\t\n\t\t\tif(custom) {\n\t\t\t\tsetImg();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tBitmap bitmap = getImageFromLocal(imgPath);\n\t\t\t\tif (bitmap == null) {\n\t\t\t\t\tloadImgByNet(handler, imgUrl, imgPath);\n\t\t\t\t} else {\n\t\t\t\t\tMessage msg = handler.obtainMessage();\n\t\t\t\t\tmsg.obj = bitmap;\n\t\t\t\t\tmsg.what = IMG_FROM_LOCAL;\n\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t}\n\t\t\t}",
"@Override\n public void loadImage(String path, ImageView imageView) {\n mInteractor.loadImage(path, imageView);\n }",
"public void loadAndPopulateViewer(final ActionLink viewerLink) throws Exception {\n final WindowViewer w = Platform.getWindowViewer();\n final FunctionCallbackWaiter waiter = new FunctionCallbackWaiter();\n\n w.createViewer(viewerLink, waiter.createCallback(VIEWER_CALLBACK_ID));\n load(waiter.createCallback(DOCUMENT_CALLBACK_ID));\n\n iFunctionCallback cb = new iFunctionCallback() {\n @Override\n public void finished(boolean canceled, Object returnValue) {\n try {\n ObjectHolder h = (ObjectHolder) returnValue;\n HashMap<Object, CallbackResult> resultsMap = (HashMap<Object, CallbackResult>) h.value;\n CallbackResult vr = resultsMap.get(VIEWER_CALLBACK_ID);\n CallbackResult dr = resultsMap.get(DOCUMENT_CALLBACK_ID);\n\n if (vr.resultIsError()) {\n Utils.handleError((Throwable) vr.getReturnValue());\n\n return;\n }\n\n if (dr.resultIsError()) {\n Utils.handleError((Throwable) dr.getReturnValue());\n\n return;\n }\n\n iContainer v = (iContainer) vr.getContent();\n\n populateViewer(v);\n\n String target = viewerLink.getTargetName();\n\n if (target == null) {\n target = iTarget.TARGET_WORKSPACE;\n }\n\n if (iTarget.TARGET_WORKSPACE.equals(target)) {\n Utils.pushWorkspaceViewer(v);\n } else {\n w.activateViewer(v, target);\n }\n } finally {\n w.hideWaitCursor();\n }\n }\n };\n\n w.showWaitCursor();\n waiter.startWaiting(cb);\n }",
"private void ErreurImage() \n {\n JOptionPane.showMessageDialog(rootPane, \"Cette image n'est plus disponible\");\n }",
"@Override\r\n public void onResponse(String response) {\n loadImageInGUI(response);\r\n Utility.writeOnPreferences(activity, \"image\", response);\r\n Utility.reloadActivity(activity);\r\n\r\n }",
"private void showAddImageDialog() {\n new AddImageDialog()\n .show(this, new AddImageDialog.OnCompleteListener() {\n @Override\n public void onImageAdded(Item item) {\n inflateViewForItem(item);\n }\n\n @Override\n public void onError(String error) {\n new MaterialAlertDialogBuilder(MainActivity.this)\n .setTitle(\"Error\")\n .setMessage(error)\n .show();\n }\n });\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if(resultCode == RESULT_OK && requestCode ==200){\n Uri uri_img=data.getData();\n try{\n assert uri_img != null;\n InputStream input_img = updateView.getContext().getContentResolver().openInputStream(uri_img);\n DecodeImage_stream = BitmapFactory.decodeStream(input_img);\n chooseImage.setImageBitmap(DecodeImage_stream);\n }catch (FileNotFoundException f){\n Log.d(\"add new file not found:\",f.getMessage());\n }\n }\n }",
"private void infalteImageOnCoverPhoto(String fileName) {\n\t\tif(fileName!=null){\n\t\t\tDisplayImageOptions options = new DisplayImageOptions.Builder()\n\t\t\t.showImageOnLoading(R.drawable.ic_stub)\n\t\t\t.showImageForEmptyUri(R.drawable.ic_empty)\n\t\t\t.showImageOnFail(R.drawable.ic_error)\n\t\t\t.cacheInMemory(true)\n\t\t\t.cacheOnDisk(true)\n\t\t\t.considerExifParams(true)\n\t\t\t.displayer(new com.nostra13.universalimageloader.core.display.RoundedVignetteBitmapDisplayer(2, 2))\n\t\t\t.build();\n\t\t\tcoverPhotoName=fileName;\n\t\t\tString url=\"http://www1.kitchengardens.in/sites/default/files/\"+fileName;\n\t\t\tImageLoader.getInstance().displayImage(url, coverPhoto, options, animateFirstListener);\n\t\t}\n\t}",
"public void attachImage(String visitID) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Complete action using\"), 1);\n }",
"private void viewDocument() throws Exception{ \r\n CoeusVector cvDataObject = new CoeusVector();\r\n HashMap hmDocumentDetails = new HashMap();\r\n hmDocumentDetails.put(\"awardNumber\", awardBaseBean.getMitAwardNumber());\r\n hmDocumentDetails.put(\"sequenceNumber\", EMPTY_STRING+awardBaseBean.getSequenceNumber());\r\n hmDocumentDetails.put(\"fileName\", awardAddDocumentForm.txtFileName.getText());\r\n hmDocumentDetails.put(\"document\", getBlobData()); \r\n cvDataObject.add(hmDocumentDetails);\r\n RequesterBean requesterBean = new RequesterBean();\r\n DocumentBean documentBean = new DocumentBean();\r\n Map map = new HashMap();\r\n map.put(\"DATA\", cvDataObject);\r\n map.put(DocumentConstants.READER_CLASS, \"edu.mit.coeus.award.AwardDocumentReader\");\r\n map.put(\"USER\", CoeusGuiConstants.getMDIForm().getUserId());\r\n map.put(\"MODULE_NAME\", \"VIEW_DOCUMENT\");\r\n documentBean.setParameterMap(map);\r\n requesterBean.setDataObject(documentBean);\r\n requesterBean.setFunctionType(DocumentConstants.GENERATE_STREAM_URL); \r\n AppletServletCommunicator appletServletCommunicator = new\r\n AppletServletCommunicator(STREAMING_SERVLET, requesterBean);\r\n appletServletCommunicator.send();\r\n ResponderBean responder = appletServletCommunicator.getResponse(); \r\n if(!responder.isSuccessfulResponse()){\r\n throw new CoeusException(responder.getMessage(),0);\r\n }\r\n map = (Map)responder.getDataObject();\r\n String url = (String)map.get(DocumentConstants.DOCUMENT_URL);\r\n if(url == null || url.trim().length() == 0 ) {\r\n CoeusOptionPane.showErrorDialog(\r\n coeusMessageResources.parseMessageKey(\"protocolUpload_exceptionCode.1009\"));\r\n return;\r\n }\r\n url = url.replace('\\\\', '/') ;\r\n try{\r\n URL urlObj = new URL(url);\r\n URLOpener.openUrl(urlObj);\r\n }catch (MalformedURLException malformedURLException) {\r\n malformedURLException.printStackTrace();\r\n }catch( Exception ue) {\r\n ue.printStackTrace() ;\r\n }\r\n }",
"private void setImage() throws FileNotFoundException {\n\t\timage = new Image(new FileInputStream(path));\n\t}",
"@Override\n public void run() {\n ZoomSDK.preload(PanAadharResultActivity.this);\n }",
"private void uploadImage() {\n FileChooser fileChooser = new FileChooser();\n\n //Extension de l'image\n FileChooser.ExtensionFilter extFilter = new FileChooser.ExtensionFilter(\"Fichier image\", \"*.*\");\n fileChooser.getExtensionFilters().addAll(extFilter);\n\n File file = fileChooser.showOpenDialog(null);\n\n try {\n BufferedImage bufferedImage = ImageIO.read(file);\n Image image = SwingFXUtils.toFXImage(bufferedImage, null);\n imageViewAvatar.setImage(image);\n getUser().setAvatar(image);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void oncapture(CaptureEvent captureEvent) {\n\t\tFacesMessage msg = new FacesMessage();\n\n\t\t// recharger les parametres de la photo\n\t\ttry {\n\t\t\tloadParamPhoto();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tbyte[] data = captureEvent.getData();\n\n\t\tFile targetFolder = new File(folder_temp);\n\n\t\t// generer un nom de fichier unique\n\t\tString fileUrl = FileUtility.getUidFileName(\"photo-cam.png\");\n\n\t\t// ServletContext servletContext = (ServletContext)\n\t\t// FacesContext.getCurrentInstance().getExternalContext().getContext();\n\t\t// String arquivoFoto = servletContext.getRealPath(File.separator +\n\t\t// \"temp\" +File.separator + fileUrl);\n\n\t\t// System.err.println(\"handle: url----------\" + arquivoFoto);\n\n\t\tFileImageOutputStream imageOutput;\n\t\ttry {\n\t\t\timageOutput = new FileImageOutputStream(new File(targetFolder, fileUrl));\n\n\t\t\t// imageOutput = new FileImageOutputStream(new File(arquivoFoto));\n\n\t\t\timageOutput.write(data, 0, data.length);\n\t\t\timageOutput.close();\n\n\t\t\t//\n\t\t\tsetUrl(fileUrl);\n\t\t\tdossierEtudiantDto.setPhoto(fileUrl);\n\t\t\tthis.photo_attache_capture = true;\n\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_INFO);\n\t\t\tmsg.setSummary(bundleDocument.getString(\"document_success_upload_file\"));\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t} catch (IOException e) {\n\t\t\tthis.photo_attache_capture = false;\n\n\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_ERROR);\n\t\t\tmsg.setSummary(bundleDocument.getString(\"document_error_in_writing_captured_image\"));\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n public void onSuccess(Uri uri) {\n Picasso.with(getActivity()).load(uri).into(image);\n }",
"public void populateViewer(iContainer fv) {\n fv.setLinkedData(this);\n populateViewer(fv, mainDocument);\n\n WindowViewer w = Platform.getWindowViewer();\n CollapsiblePaneViewer cpv = (CollapsiblePaneViewer) fv.getWidget(\"attachments\");\n\n if (cpv != null) {\n TableViewer table = (TableViewer) cpv.getWidget();\n\n table.clear();\n if(table.getActionListener()==null) {\n iActionListener al = new AttachmentActionListener();\n table.setActionListener(al);\n }\n\n int len = getAttachmentCount();\n\n cpv.getTarget().setVisible(len > 0);\n\n if (len > 0) {\n cpv.setTitleText(w.getString(\"bv.format.attachments_spec\", StringCache.valueOf(len)));\n // we can change this because we have already populated the form\n mainDocument.rowData.get(1).setValue(w.getString(\"bv.text.master_document\"));\n\n boolean hasDate = false;\n\n for (int i = 0; i < len; i++) {\n DocumentItem item = docAttachments.get(i);\n\n if (item.rowData != null) {\n table.addEx(item.rowData);\n\n if (item.hasDate()) {\n hasDate = true;\n }\n }\n }\n\n if (UIScreen.isMediumDensity()) {\n table.addEx(mainDocument.rowData);\n }\n\n table.setColumnVisible(2, hasDate);\n table.refreshItems();\n if(hasDate) {\n table.sort(2, true);\n }\n }\n }\n }",
"@Override\n public void onSuccess(Uri uri) {\n Log.i(\"upload diary\", \"photo in storage\");\n uploadDiary.setPhotoUri(uri.toString());\n db.collection(\"Diary\").document(diary.getTime() + \":\" + diary.getUsername()).set(uploadDiary).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.i(\"upload diary\", \"photo succ\");\n }\n });\n }",
"protected void onReloadImage() {\n String url = DataProvider.SCREEN + DataProvider.SCREEN_INDEX + mScreenId + \"&time=\" + System.currentTimeMillis();\n image.setUrl(url); //just to avoid caching\n loadTree();\n }",
"public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (resultCode == RESULT_OK) {\n\n // compare the resultCode with the\n // SELECT_PICTURE constant\n if (requestCode == SELECT_PICTURE) {\n Uri selectedImageURI = data.getData();\n// File imageFile = new File(getRealPathFromURI(selectedImageURI));\n Uri selectedImageUri = data.getData( );\n String picturePath = getPath( getApplicationContext( ), selectedImageUri );\n Log.d(\"Picture Path\", picturePath);\n\n // Get the url of the image from data\n selectedImageUri = data.getData();\n if (null != selectedImageUri) {\n bitmap = null;\n // update the preview image in the layout\n try {\n bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), selectedImageUri);\n } catch (IOException e) {\n e.printStackTrace();\n }\n// IVPreviewImage.setImageURI(selectedImageUri);\n// runTextRecognition(bitmap);\n IVPreviewImage.setImageBitmap(bitmap);\n\n }\n }\n\n if (requestCode == 123) {\n\n\n Bitmap photo = (Bitmap) data.getExtras()\n .get(\"data\");\n\n // Set the image in imageview for display\n IVPreviewImage.setImageBitmap(photo);\n runTextRecognition(photo);\n\n }\n\n }\n }",
"public void ImageCreate(){\n Picasso.get().load(url).into(imageView);\n }",
"public void onClick(View v) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_OPEN_DOCUMENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE);\n\n\n\n\n /*String stringFilePath = Environment.getExternalStorageDirectory().getPath()+\"/Download/\"+editText.getText().toString()+\".jpeg\";\n Bitmap bitmap = BitmapFactory.decodeFile(stringFilePath);\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.PNG, 0, byteArrayOutputStream);\n byte[] bytesImage = byteArrayOutputStream.toByteArray();\n db.addTicket(stringFilePath, bytesImage);*/\n\n }",
"@FXML\n void changeToDetailsView(PhotoUnit photoUnit) throws IOException {\n\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(\"/Views/photoView.fxml\"));\n Parent root = loader.load();\n\n Scene scene = new Scene(root);\n\n scene.getStylesheets().add(\"Views/styles.css\");\n Stage primaryStage = (Stage) listView.getScene().getWindow();\n primaryStage.setScene(scene);\n\n //access the controller\n PhotoViewController controller = loader.getController();\n controller.initData(photoUnit);\n\n Image icon = new Image(\"/img/mars.png\");\n primaryStage.getIcons().add(icon);\n primaryStage.setTitle(\" MARS \");\n primaryStage.show();\n\n\n }",
"public void prepareImage(String imagePath)\r\n {\r\n \t\r\n initialize();\r\n try{\r\n //track the image loading\r\n trackImageLoading = new MediaTracker(this); \r\n original = Toolkit.getDefaultToolkit().getImage(imagePath); \r\n trackImageLoading.addImage(original,0);\r\n trackImageLoading.waitForID(0); \r\n //get the image width and height \r\n int width = original.getWidth(null);\r\n int height = original.getHeight(null);\r\n //create buffered image from the image so any change to the image can be made\r\n bufferedImage = createBufferedImageFromImage(original,width,height,false); \r\n edited = new BufferedImage(width,height,BufferedImage.TYPE_INT_RGB); \r\n isImageLoaded = true; //now the image is loaded\r\n }\r\n catch(Exception e)\r\n {\r\n System.exit(-1);\r\n }\r\n }",
"@Override\n\tpublic final IRenderable load() {\n\t\tImage img = loadImage();\n\t\tassertImageIsValid(img);\n\t\treturn new ImageRenderable(img);\n\t}",
"@Override\r\n\tpublic void pictureUpdated() {\r\n\t\tif(mDialog != null)\r\n\t\t\tmDialog.loadPicture();\r\n\t\t\r\n\t}",
"private void galleryAddPic() {\n\t}",
"private void initAreaImageFilm() {\n\n }",
"@Override\n public void run() {\n imageView.setImageBitmap(photo);\n }",
"private void loadLocalImageConfirm()\n {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())\n .setCancelable(true).setTitle(\"Load\").setMessage(\"Load image?\");\n\n builder.setPositiveButton(R.string.open_local, new DialogInterface.OnClickListener()\n {\n @Override\n public void onClick(DialogInterface dialog, int which)\n {\n ((MainActivity) getActivity()).loadLocalImage();\n }\n });\n\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener()\n {\n @Override\n public void onClick(DialogInterface dialog, int which)\n {\n dialog.cancel();\n }\n });\n\n AlertDialog dialog = builder.create();\n dialog.show();\n }",
"public ImageView loadTheMan()\n {\n try \n {\n Image theMan = new Image(new FileInputStream(\"theMan.jpg\"), 800, 800, true, true);\n ImageView theManView = new ImageView(theMan);\n theManView.setTranslateX(0);\n theManView.setTranslateY(-210);\n theManView.setScaleX(0.3);\n theManView.setScaleY(0.3);\n return theManView;\n } \n catch (FileNotFoundException ex) \n {\n Logger.getLogger(TycoonGUI.class.getName()).log(Level.SEVERE, null, ex);\n return null;\n }\n }",
"@Override\r\n public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n \tLog.v(\"catch\",view+\"\");\r\n \ttry{\r\n if (loadedImage != null && view!=null) { \r\n ImageView imageView = (ImageView) view; \r\n // imageView.setImageBitmap(loadedImage);\r\n // 是否第一次显示 \r\n boolean firstDisplay = !displayedImages.contains(imageUri); \r\n if (firstDisplay) { \r\n // 图片淡入效果 \r\n FadeInBitmapDisplayer.animate(imageView, 800); \r\n displayedImages.add(imageUri); \r\n \r\n/* \t ViewGroup.LayoutParams params = imageView.getLayoutParams(); \r\n \t params.height =loadedImage.getHeight(); \r\n \t ((MarginLayoutParams)params).setMargins(10, 10, 10, 10);\r\n \t imageView.setLayoutParams(params);*/ \r\n } \r\n } \r\n \t}catch(Exception e){\r\n \t\tLog.v(\"catch1\",e.getMessage());\r\n \t}\r\n }",
"public void displayNewImage() {\n\t\tthis.canvas.display();\n\t}",
"public void addPhoto(ActionEvent event) throws IOException {\n\t\t//System.out.println(\"ITEM ADDED______________________________________________\");\n\t\tFileChooser fileChooser = new FileChooser();\n\t\tfileChooser.setTitle(\"Open Photo\"); \n\t\tAccessibleUsersList.masterUserList.userLoggedIn.fileList = fileChooser.showOpenMultipleDialog(this.myNewStage);\n\t\t\n\t\tboolean checkIfImages = true;\n\t\t\n\t\tif(AccessibleUsersList.masterUserList.userLoggedIn.fileList != null){\n\t\t\t\n\t\t\tfor(File file : AccessibleUsersList.masterUserList.userLoggedIn.fileList){\n\t\t\t\t\n\t\t\t\tMimetypesFileTypeMap mimetype= new MimetypesFileTypeMap();\n\t\t\t\tmimetype.addMimeTypes(\"image png jpg jpeg JPG PNG\");\t\n\t\t\t\t\n\t\t\t\tString mimetype1 = mimetype.getContentType(file);\n\t\t\t\tString type = mimetype1.split(\"/\")[0];\n\t\t\t\t\n\t\t\t\tif(type.contains(\"image\")){\n\t\t\t //System.out.println(\"It's an image\");\n\t\t\t\t} else { \n\t\t\t \t //System.out.println(\"It's NOT an image\");\n\t\t\t \t Alert majorBagAlert = new Alert(AlertType.ERROR);\n\t\t\t\t majorBagAlert.setTitle(\"Error\");\n\t\t\t\t majorBagAlert.setHeaderText(\"One or more images is not an image file type.\");\n\t\t\t\t majorBagAlert.setContentText(\"Please enter photo(s) again\");\n\t\t\t\t majorBagAlert.showAndWait();\n\t\t\t \t \n\t\t\t\t //adding comment\n\t\t\t checkIfImages = false; \n\t\t\t }\n\t\t\t}\n }\n\t\t\n\n\t\t//iterate through the logged in user's albums \n\t\t//this is the album we have to add our photos to \n\t\tthis.selectedAlbum = AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getName(); \n\t\tAlbum foundAlbum = null; \n\t\tlong lastModifiedDate = 0; \n\t\tString path; \n\t\t\n\t\t//if we are certain we only collected files of type jpg, png or jpeg \n\t\tif(checkIfImages){\n\t\t\t\n\t\t\tif(AccessibleUsersList.masterUserList.userLoggedIn.fileList != null) {\n\t\t\t\t\n\t\t\t\tfor(File file : AccessibleUsersList.masterUserList.userLoggedIn.fileList){\n\t\t\t\t\t\n\t\t\t\t\tpath = file.getAbsolutePath();\n\t\t\t\t\tFileInputStream inputstream = new FileInputStream(path); \n\t\t\t\t\tImage image1 = new Image(inputstream); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t//iterate through the logged in user's albums \n\t\t\t\t\tint x=0; \n\t\t\t\t\tfor(Album album: AccessibleUsersList.masterUserList.userLoggedIn.albums_list){\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//looking for the current album to add our photos into \n\t\t\t\t\t\tif(album.getName().equals(this.selectedAlbum)){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfoundAlbum = AccessibleUsersList.masterUserList.userLoggedIn.albums_list.get(x);\n\t\t\t\t\t\t\tlastModifiedDate = file.lastModified();\n\t\t\t\n\t\t\t\t\t\t\tPhoto albumPhoto = new Photo(path, lastModifiedDate); \n\t\t\t\t\t\t\tfoundAlbum.getAlbum().add(albumPhoto);\t \n\t\t\t\t\t\t\t//System.out.println(foundAlbum.getAlbum());\n\t\t\t\t\t\t\t//foundAlbum.photos.add(new model.Photo(image1, lastModifiedDate));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tImageView pic = new ImageView();\n\t\t\t\t\t\t\tpic.setFitWidth(340);\n\t\t\t\t\t\t\tpic.setFitHeight(180);\n\t\t\t\t\t\t\tpic.setImage(image1);\n\t\t\t\t\t\t\tlistOfPhotos.add(pic);\n\t\t\t\t\t\t\talbumPhoto.setImage(pic);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"photo added\");\n\t\t\t\t\t\t\t//System.out.println(albumPhoto.getPathToPhoto());\n\t\t\t\t\t\t\t//System.out.println(AccessibleUsersList.masterUserList.userLoggedIn);\n\t\t\t\t\t\t\t//System.out.println(AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.addPhoto(albumPhoto); <-----cause of bug, added photo TWICE, X\n\t\t\t\t\t\t\tbreak; \n\t\t\t\t\t\t} \n\t\t\t\t\t\tx++; \n\t\t\t\t\t}\n \t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tserializeUsers(AccessibleUsersList.masterUserList);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\t\n\t}",
"public void getImageFromAlbum() {\n\t\tIntent intent = new Intent();\n\t\tintent.addCategory(Intent.CATEGORY_OPENABLE);\n\t\tintent.setType(\"image/*\");\n\t\t// 根据版本号不同使用不同的Action\n\t\tif (Build.VERSION.SDK_INT < 19) {\n\t\t\tintent.setAction(Intent.ACTION_GET_CONTENT);\n\t\t} else {\n\t\t\tintent.setAction(Intent.ACTION_OPEN_DOCUMENT);\n\t\t}\n\t\tstartActivityForResult(intent, WriteOpinionActivity.RESULT_LOAD_IMAGE);\n\n\t}",
"public void openImage() {\t\n\t\ttry {\n\t\t\timg.openImage(list);\n\t\t} \t\n\n\t\tcatch (BrokenImageException ex) {\n\t\t\ttry{\n\t\t\t\tif(!validImageContent())\n\t\t\t\t\tthrow new BadImageContentException(\"The image is broken \"\n\t\t\t\t\t\t\t+ \"due to corrupt content\");\n\t\t\t\tif(!validImageHeader())\n\t\t\t\t\tthrow new BadImageHeaderException(\"The image is broken\"\n\t\t\t\t\t\t\t+ \" due to a damaged header\");\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\"Please catch the proper Image-related Exception.\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n homeScreen = HomeScreenController.getInstance();\n User u = homeScreen.getCurrentUser();\n CRUDUser cr = new CRUDUser();\n this.username.setText(u.getUserInfoIdId().getUserFirstName());\nBufferedImage image = null;\n\n if(u.getUserInfoIdId().getUserImage()!=null){\n try {\n image = ImageIO.read(new URL(\"http://127.0.0.1:8000/Files/podcastFiles/\" + u.getUserInfoIdId().getUserImage()));\n } catch (MalformedURLException ex) {\n Logger.getLogger(GestionUsersController.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(GestionUsersController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }else{\n try {\n image = ImageIO.read(new URL(\"http://127.0.0.1:8000/Files/podcastFiles/avatar.jpg\"));\n } catch (MalformedURLException ex) {\n Logger.getLogger(GestionUsersController.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(GestionUsersController.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }\n WritableImage img = SwingFXUtils.toFXImage(image, null);\n this.imageUser.setFill(new ImagePattern(img));\n \n this.showUsers();\n }",
"public void openImage() {\n InputStream f = Controller.class.getResourceAsStream(\"route.png\");\n img = new Image(f, mapImage.getFitWidth(), mapImage.getFitHeight(), false, true);\n h = (int) img.getHeight();\n w = (int) img.getWidth();\n pathNodes = new GraphNodeAL[h * w];\n mapImage.setImage(img);\n //makeGrayscale();\n }",
"private void updateImage(PDFFile file, int pageNumber) {\n final Task<ImageView> updateImageTask = new Task<ImageView>() {\n @Override\n protected ImageView call() {\n PDFPage page = file.getPage(pageNumber + 1);\n Rectangle2D bbox = page.getBBox();\n\n // Get dimensions\n int width = (int) bbox.getWidth();\n int height = (int) bbox.getHeight();\n\n // Get image\n java.awt.Image awtImage = page.getImage(width, height, bbox, null, true, true);\n\n // Draw image to buffered image\n BufferedImage buffImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n buffImage.createGraphics().drawImage(awtImage, 0, 0, null);\n\n // Convert to JavaFX image\n Image image = SwingFXUtils.toFXImage(buffImage, null);\n\n // Wrap in image view\n ImageView imageView = new ImageView(image);\n imageView.setPreserveRatio(true);\n\n return imageView ;\n }\n };\n\n updateImageTask.setOnSucceeded(event -> currentImage.set(updateImageTask.getValue()));\n updateImageTask.setOnFailed(event -> updateImageTask.getException().printStackTrace());\n\n getThreadExecutor().submit(updateImageTask);\n }",
"public void loadPdfFile() {\n PDFView.Configurator configurator;\n RelativeLayout relativeLayout = (RelativeLayout)this.pdfView.getParent();\n this.errorTextView = (TextView)relativeLayout.findViewById(2131296408);\n this.progressBar = (ProgressBar)relativeLayout.findViewById(2131296534);\n this.sharedPreferences = Factory.getInstance().getMainNavigationActivity().getSharedPreferences(\"AppsgeyserPrefs\", 0);\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"pdf_saved_page_\");\n stringBuilder.append(this.initialTabId);\n savedPageKey = stringBuilder.toString();\n if (this.pathFile.startsWith(\"file:///\")) {\n String string2 = this.pathFile.replace((CharSequence)\"file:///android_asset/\", (CharSequence)\"\");\n configurator = this.pdfView.fromAsset(string2);\n } else {\n boolean bl = this.pathFile.startsWith(\"http\");\n configurator = null;\n if (bl) {\n String string3 = this.pathFile;\n new LoaderPdf().execute((Object[])new String[]{string3});\n }\n }\n this.pdfView.useBestQuality(true);\n if (configurator == null) return;\n try {\n this.loadConfigurator(configurator);\n return;\n }\n catch (Exception exception) {\n exception.printStackTrace();\n this.progressBar.setVisibility(8);\n }\n }",
"public void displayGivenImage() {\n\t\tthis.image.display();\n\t}",
"public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n CropImage.ActivityResult result = CropImage.getActivityResult(data);\n if (resultCode == -1) {\n if (requestCode != 11) {\n String valueOf = String.valueOf(result.getUri());\n this.imageUri = valueOf;\n if (valueOf != null) {\n if (this.isattach.booleanValue()) {\n this.tv_attachfile.setText(this.imageUri);\n fileType = \"png\";\n Log.i(\"datafile\",result.toString() + \"\\n\" + result.getOriginalUri() + \"\\n\" + result.getUri());\n this.isattach = false;\n this.attach_file = this.imageUri;\n } else {\n this.eventphoto.setImageURI(Uri.parse(this.imageUri));\n this.upload_photo = this.imageUri;\n this.ismageEdited = true;\n }\n }\n } else if (requestCode == 11){\n this.tv_attachfilepdf.setText(data.getDataString());\n fileType = \"pdf\";\n\n String filePath = data.getData().getPath();\n String fileName = data.getData().getLastPathSegment();\n this.attach_file = data.getData().getPath();\n Log.i(\"file\", filePath + \"\\n\" + fileName + \"\\n\" + attach_file);\n\n /*uri = data.getData();\n this.attach_file = data.getData().toString();\n Log.i(\"uriii\", uri.toString());\n File file2 = new File(this.attach_file);\n Log.i(\"uriiName\", file2.getName());\n Log.i(\"uriiPath\", file2.getPath());\n Log.i(\"uriiParent\", file2.getParent());*/\n }\n }\n }",
"public void populateViewer(iContainer fv, DocumentItem doc) {\n try {\n RenderableDataItem row = doc.rowData;\n iWidget field;\n\n field = fv.getWidget(\"documentDate\");\n\n String s;\n\n if (field != null) {\n s = (row == null)\n ? \"\"\n : Functions.convertDateTime(row.get(2).getValue());\n field.setValue(s);\n }\n\n field = fv.getWidget(\"documentTitle\");\n\n if (field != null) {\n s = doc.itemTitle;\n\n if ((s == null) && (row != null)) {\n s = row.get(1).toString();\n }\n\n field.setValue((s == null)\n ? \"\"\n : s);\n }\n\n field = fv.getWidget(\"extraHeaderDetail\");\n\n if (field != null) {\n s = \"\";\n\n if ((row != null) && (row.size() > 4)) {\n s = field.getValueAsString();\n\n if ((s != null) && (s.length() != 0)) {\n String title = (String) row.get(4).getValue();\n\n s = String.format(s, title);\n } else {\n s = (String) row.get(4).getValue();\n }\n }\n\n field.setValue(s);\n }\n\n iViewer v = (iViewer) fv.getWidget(\"documentDetail\");\n\n if (v != null) {\n boolean html = false;\n\n if ((doc.mimeType != null) && doc.mimeType.startsWith(iConstants.HTML_MIME_TYPE)) {\n html = true;\n }\n\n if (v instanceof DocumentPaneViewer) {\n ((DocumentPaneViewer) v).setText(doc.itemBody, html);\n } else if (v instanceof WebBrowser) {\n s = doc.itemBody;\n\n if (!html) {\n s = \"<html><body><pre style=\\\"white-space: pre-wrap; margin:0; padding:0\\\">\" + s + \"</pre></body></html>\";\n }\n //do not pass in the base href because if it is not http/https it will break some browsers (notable iOS)\n String href = null; //JavaURLConnection.baseToExternalForm(documentLink.getURL(contextWidget));\n \n final WebBrowser browser = (WebBrowser) v;\n\n if (v.getWidth() < 50) {\n\n /**\n * We need to wait until the browser has been sized before we load\n * the content so the the content will be appropriately zoomed for\n * iOS\n *\n * Setting the 'autoInsertMetaContent' to true in the custom\n * properties in the RML file Causes a 'viewport' meta tag to be\n * inserted and set to the size of the browser.\n */\n final String data = s;\n final String url = href;\n browser.getContainerComponent().addViewListener(new aViewListenerAdapter() {\n @Override\n public void viewResized(ChangeEvent e) {\n if (!browser.isDisposed() && (browser.getWidth() > 50)) {\n browser.getContainerComponent().removeViewListener(this);\n browser.setHTML(url, data);\n }\n }\n @Override\n public boolean wantsResizeEvent() {\n return true;\n }\n });\n } else {\n browser.setHTML(href, s);\n }\n }\n else {\n v.setValue(doc.itemBody);\n }\n }\n } catch(Exception e) {\n Utils.handleError(e);\n }\n }",
"@Override\n public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {\n\n Log.d(TAG, \"onSuccess: Downloaded File\");\n pdfView.fromFile(localFile).load();\n\n }",
"private void postImage(String fid, final String fileName) {\n\t\tJSONObject jsObject = new JSONObject();\n\t\tSharedPreferences myPrefs = getActivity().getSharedPreferences(\"myPrefs\",getActivity().MODE_PRIVATE);\n\t\ttry {\n\n\t\t\tjsObject.put(\"field_image\", new JSONObject().put(\"und\", new JSONArray().put(0, new JSONObject().put(\"fid\", fid))));\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcd = new ConnectionDetector(getActivity());\n\n\t\t// Check if Internet present\n\t\tif (!cd.isConnectingToInternet()) {\n\t\t\t// Internet Connection is not present\n\t\t\talert.showAlertDialog(getActivity(),\n\t\t\t\t\t\"Internet Connection Error\",\n\t\t\t\t\t\"Please connect to working Internet connection\", false);\n\t\t\t// stop executing code by return\n\t\t\treturn;\n\t\t}else{\n\t\t\tnew UpdateLike(jsObject,myPrefs){\n\t\t\t\tprotected void onPreExecute() {\n\t\t\t\t\tAppUtil.initializeProgressDialog(getActivity(), \"Finalizing post...\", progressDialog);\n\t\t\t\t};\n\t\t\t\tprotected void onPostExecute(String result) {\n\t\t\t\t\tAppUtil.cancelProgressDialog();\n\t\t\t\t\tinfalteImageOnCoverPhoto(fileName);\n\t\t\t\t};\n\t\t\t}.execute(\"http://www1.kitchengardens.in/svc/node/\"+garden_node_id);\n\t\t}\n\t}",
"public void loadTo(String url, ImageView imageView) {\n relationsMap.put(imageView, url);\n\n // If image already cached just show it\n Bitmap bitmap = memoryCache.getData(url);\n if (bitmap != null) {\n Log.d(\"HIHO\", \"bitmap from memory\");\n imageView.setImageBitmap(bitmap);\n } else {\n loadAndDisplay(url, imageView);\n }\n }",
"public PhotoBean() {\n\t\tsuper();\n\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\n\t\tbundleDocument = facesContext.getApplication().getResourceBundle(facesContext,\n\t\t\t\tDocUtilConstants.DOCUMENT_BUNDLE_MSG_NAME);\n\n\t}",
"private void onLoad() {\n\n Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n startActivityForResult(intent, RESULT_LOAD_ARTIST_IMAGE);\n }",
"@Override\n public void onSuccess(FileDownloadTask.TaskSnapshot state) {\n useGlide(Uri.fromFile(animal_file1));\n\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 234 && data != null && data.getData() != null) {\n filePath = data.getData();\n Uri uri = data.getData();\n try {\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), uri);\n ImageView imageView = findViewById(R.id.displayPicture);\n imageView.setImageBitmap(bitmap);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n }",
"private void saveImageInstantly() {\n\n if (movie != null) {\n\n // Get movie's title and set an initial file name\n String movieTitle = movie.getMovieTitle();\n\n // Replace any invalid characters\n movieTitle = movieTitle.replaceAll(\"[\\\"/?\\\"*><|]\", \"\").replace(\":\", \"-\");\n\n // If preferences file is empty\n if (userDirectoryString.equals(\"empty\")) {\n\n userDirectoryString = System.getProperty(\"user.home\");\n }\n\n File userDirectory = new File(userDirectoryString + \"/\" + movieTitle + \".jpg\");\n\n // If it can't access User Home, default to C drive\n if (!userDirectory.getParentFile().canRead()) {\n userDirectory = new File(\"D:\\\\\" + movieTitle + \".jpg\");\n }\n\n // Check file isn't null, so it the image view\n if (imgPoster.getImage() != null) {\n\n try {\n\n ImageIO.write(SwingFXUtils.fromFXImage(imgPoster.getImage(), null), \"jpg\", userDirectory);\n setLblStatus(\"Poster saved successfully.\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }",
"public void catchImage(String data) {\n\t\tsetPicturePreview(data);\n\n\t}",
"private void setGalleryDisplay() {\n // ArrayList<model.Photo> photos = model.DirectoryManager.getTree().getDir().getPhotos();\n ArrayList<Photo> photos = User.getGalleryPhotos();\n if (photos != null) {\n for (model.Photo photo : photos) {\n Image imageOrigin = new Image(\"File:\" + photo.getPath());\n ImageView displayImage = new ImageView(imageOrigin);\n displayImage.setId(photo.getPath());\n\n double imageHeight = imageOrigin.getHeight();\n double imageWidth = imageOrigin.getWidth();\n displayImage.setPreserveRatio(true);\n if (imageHeight <= imageWidth) {\n displayImage.setFitWidth(190);\n } else if (imageHeight > imageWidth) {\n displayImage.setFitHeight(120);\n }\n\n displayImage.setFitWidth(190);\n displayImage.getStyleClass().add(\"photoElement\");\n displayImage.setOnMouseClicked(\n (MouseEvent e) -> {\n model.User.setPhoto(model.PhotoManager.getPhoto(displayImage.getId()));\n try {\n loadNextScene(rootPane, \"/views/focusPhotoPane.fxml\");\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n });\n galleryDisplay.getChildren().add(displayImage);\n }\n }\n }",
"@Override\n\tpublic Image loadEntity() {\n\t\ttry {\n\t\t\tImage entityImage = new Image(new FileInputStream(IMAGE_LOCATION));\n\t\t\treturn entityImage;\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Image file not found\");\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\n public void loadImage(String url, ImageView imageView) {\n ImageLoader.getInstance().displayImage(url, imageView);\n }",
"@Override\n public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {\n Log.d(\"TAG\", \"onSuccess: \" + localFile + \" :This is the tasksnap: \" + taskSnapshot);\n bitmap = BitmapFactory.decodeFile(localFile.getAbsolutePath());\n imageView.setImageBitmap(bitmap);\n navImage.setImageBitmap(bitmap);\n\n }",
"private void onSuccessImageTransfer()\n {\n Log.d(TAG, \"onSuccessImageTransfer: finished.\");\n this.fragmentActivity.runOnUiThread(() -> Toast.makeText(this.fragmentActivity,\n \"Image transfer succeeded\", Toast.LENGTH_SHORT).show());\n\n switchToPickLayout();\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n\n if (requestCode == CAPTURE_IMAGE_REQUEST && resultCode == RESULT_OK) {\n Bitmap myBitmap = BitmapFactory.decodeFile(photoFile.getAbsolutePath());\n imgDisplay.setImageBitmap(myBitmap);\n textPath.setText(photoFile.getName());\n } else {\n displayMessage(getBaseContext(), \"Request cancelled or something went wrong.\");\n }\n\n }",
"private void runSlideshow(ActionEvent actionEvent) {\n Picture pictureToDisplay = getNextPicture();\n try {\n InputStream inputStream = new FileInputStream(pictureToDisplay.getAbsolutePath());\n BufferedImage bufferedImage = ImageIO.read(inputStream);\n Image image = SwingFXUtils.toFXImage(bufferedImage, null);\n\n this.imageView.setImage(image);\n inputStream.close();\n } catch (IOException ignored) {\n }\n }",
"@Override\n\t protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t if(requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) {\n\t \tprofile_photo.setVisibility(View.VISIBLE);\n\t \tUri selectedImage = data.getData();\n\t String[] filePathColumn = { MediaStore.Images.Media.DATA };\n\n\t Cursor cursor = getContentResolver().query(selectedImage,\n\t filePathColumn, null, null, null);\n\t cursor.moveToFirst();\n\n\t int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n\t String picturePath = cursor.getString(columnIndex);\n\t cursor.close();\n\t \n\t ImageView imageView = (ImageView) findViewById(R.id.profile_photo);\n\t imageView.setImageBitmap(BitmapFactory.decodeFile(picturePath));\n\t }\n\t }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == PICK_IMAGE_REQUEST && resultCode == RESULT_OK && data != null && data.getData() != null) {\n filePath = data.getData();\n\n Picasso.get().load(filePath).into(imageView);\n\n }\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n switch (requestCode) {\n case SELECT_PHOTO:\n if (resultCode == RESULT_OK) {\n // imABoolean=true;\n try {\n filePath = data.getData();\n bitmap = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), filePath);\n\n logo.setImageBitmap(bitmap);\n\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n break;\n }\n }\n\n\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n JFileChooser fc = new JFileChooser(); \n int returnVal = fc.showOpenDialog(null);\n if (returnVal == JFileChooser.APPROVE_OPTION) {\n File file = fc.getSelectedFile();\n System.out.println(file.getAbsolutePath()); \n image = loadImage( file);\n }\n }",
"public void onStartPage(PdfWriter writer, Document document) {\r\n\t\tpagenumber++;\r\n\r\n\t\tImage image;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\timage = Image.getInstance(ResourceUtils.getFile(\"classpath:images\"+File.separator+\"cpmis-submission-pdf-hrader.png\").getAbsolutePath());\r\n\t\t\tint indentation = 0;\r\n\t\t\tfloat scaler = ((document.getPageSize().getWidth() - indentation) / image.getWidth()) * 100;\r\n\t\t\timage.scalePercent(scaler);\r\n\t\t\timage.setAbsolutePosition(0, document.getPageSize().getHeight() + document.topMargin() - image.getHeight());\r\n\t\t\tdocument.add(image);\r\n\t\t\tdocument.add(Chunk.NEWLINE);\r\n\t\t\tdocument.add(Chunk.NEWLINE);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void loadImage(final String path, final ImageView imageView){\r\n imageView.setTag(path);\r\n if (mUIHandler==null){\r\n mUIHandler=new Handler(){\r\n @Override\r\n public void handleMessage(Message msg) {\r\n //Get the image and set its imageView.\r\n ImgBeanHolder holder= (ImgBeanHolder) msg.obj;\r\n Bitmap bitmap = holder.bitmap;\r\n ImageView imageview= holder.imageView;\r\n String path = holder.path;\r\n if (imageview.getTag().toString().equals( path)){\r\n imageview.setImageBitmap(bitmap);\r\n }\r\n }\r\n };\r\n }\r\n //Get the bitmap through the path in the cache.\r\n Bitmap bm=getBitmapFromLruCache(path);\r\n if (bm!=null){\r\n refreshBitmap(bm, path, imageView);\r\n }else{\r\n addTask(() -> {\r\n //Get the size of the image which wants to be displayed.\r\n ImageSize imageSize= getImageViewSize(imageView);\r\n //Compress the image.\r\n Bitmap bm1 =decodeSampledBitmapFromPath(imageSize.width,imageSize.height,path);\r\n //Put the image into the cache.\r\n addBitmapToLruCache(path, bm1);\r\n //Refresh the display of the image.\r\n refreshBitmap(bm1, path, imageView);\r\n mSemaphoreThreadPool.release();\r\n });\r\n }\r\n\r\n }",
"private void setPhotoAttcher() {\n\n }",
"public void onActivityResult(int i, int i2, Intent intent2) {\n super.onActivityResult(i, i2, intent2);\n if (i == PICK_IMAGE_REQUEST && i2 == -1 && intent2 != null && intent2.getData() != null) {\n this.filePath = intent2.getData();\n if (this.type.equals(ContentTypes.EXTENSION_JPG_1)) {\n this.recyclerView.setVisibility(View.GONE);\n this.img_view.setVisibility(View.VISIBLE);\n try {\n this.img_view.setImageBitmap(MediaStore.Images.Media.getBitmap(getContentResolver(), this.filePath));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (this.type.equals(\"pdf\")) {\n this.recyclerView.setVisibility(View.GONE);\n this.img_view.setVisibility(View.VISIBLE);\n this.img_view.setImageResource(R.drawable.preview);\n }\n }\n }",
"private void helperDisplayInputImage()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//---- Get currently selected file index in the combo box\r\n\t\t\tint index = mainFormLink.getComponentPanelLeft().getComponentComboboxFileName().getSelectedIndex();\r\n\r\n\t\t\t//---- Check the index if the action is invoked by image deletion then causes error\r\n\t\t\tint imageCount = DataController.getTable().getTableSize();\r\n\r\n\t\t\tif (index >= 0 && index < imageCount)\r\n\t\t\t{\r\n\t\t\t\t//---- Get file path of the table\r\n\r\n\t\t\t\tString filePath = DataController.getTable().getElement(index).getDataFile().getFilePath();\r\n\r\n\t\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().displayPolygonStop();\r\n\t\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().loadImage(filePath);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}",
"public void loadImage() {\n\t\ttry {\n\t\t\tcurrImage = ImageIO.read(new File(INPUT_DIR,fileNames.get(fileCounter)));\n\t\t\tcurrImageOrigDim = new Dimension(currImage.getWidth(), currImage.getHeight());\n\t\t\tlabel4.setText(\"Processing: \" + fileNames.get(fileCounter));\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// Resize to Frame\n\t\tdouble imgHt = currImage.getHeight();\n\t\tdouble imgWt = currImage.getWidth();\n\t\tdouble wRatio = FRAME_SIZE/imgWt;\n\t\tdouble hRatio = FRAME_SIZE/imgHt;\n\t\taspectR = Math.min(wRatio,hRatio);\n\t\tcurrImage = getScaledInstance(currImage, (int)(aspectR*imgWt), (int)(aspectR*imgHt));\n\t\tcurrImageBounds = new Rectangle(0, 0, currImage.getWidth(), currImage.getHeight());\n\t\trepaint();\n\t}",
"public static void showImage(Stage primaryStage) {\n Pane pane = new HBox(10);\n pane.setPadding(new Insets(5, 5, 5, 5));\n Image image = new Image(\"image/us.gif\"); //load image from file\n pane.getChildren().add(new ImageView(image));\n\n ImageView imageView2 = new ImageView(image);\n imageView2.setFitHeight(100);\n imageView2.setFitWidth(100);\n pane.getChildren().add(imageView2);\n\n ImageView imageView3 = new ImageView(image);\n imageView3.setRotate(90);\n pane.getChildren().add(imageView3);\n\n // Create a scene and place it in the stage\n Scene scene = new Scene(pane);\n primaryStage.setTitle(\"ShowImage\"); // Set the stage title\n primaryStage.setScene(scene); // Place the scene in the stage\n primaryStage.show(); // Display the stage\n }",
"@Override\n public void run() {\n if (imageViewReused(loadDataHolder))\n return;\n // Download image from web url\n Bitmap bitmap = getBitmap(loadDataHolder.getUrl());\n\n // Save to cache\n if (bitmap != null) {\n memoryCache.put(loadDataHolder.getUrl(), bitmap);\n }\n\n if (imageViewReused(loadDataHolder))\n return;\n\n // Get bitmap to display\n BitmapDisplayRunnable displayRunnable =\n new BitmapDisplayRunnable(bitmap, loadDataHolder);\n\n // Post message to handler associated with UI thread\n handler.post(displayRunnable);\n }",
"@Override\n public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {\n String filePath = localFile.getPath();\n Bitmap bitmap = BitmapFactory.decodeFile(filePath);\n viewHolder.itemImage.setImageBitmap(bitmap);\n }",
"private void loadImage(final String path) {\n ivContent.setImageURI(Uri.fromFile(new File(path)));\n\n /*Glide.with(getActivity())\n .load(path)\n .apply(RequestOptions.diskCacheStrategyOf(DiskCacheStrategy.AUTOMATIC))\n .into(ivContent);*/\n\n\n }",
"public void embedImage(File imageFile, Element canvas, Rectangle2D bbox, boolean center) {\n final String METHOD_NAME = \"addFluffImage(File,Rectangle2D)\";\n if (null == imageFile) {\n return;\n }\n try {\n InputStream is = new BufferedInputStream(new FileInputStream(imageFile));\n String mimeType = URLConnection.guessContentTypeFromStream(is);\n String format = mimeType.substring(mimeType.indexOf(\"/\") + 1);\n\n RenderedImage fluffImage = ImageIO.read(imageFile);\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n ImageIO.write(fluffImage, format, bytes);\n \n double width = fluffImage.getWidth();\n double height = fluffImage.getHeight();\n double scale = Math.min(bbox.getWidth() / width, bbox.getHeight() / height);\n width *= scale;\n height *= scale;\n double x = bbox.getX();\n double y = bbox.getY();\n if (center) {\n x += (bbox.getWidth() - width) / 2;\n y += (bbox.getHeight() - height) / 2;\n }\n Element img = svgDocument.createElementNS(svgNS, SVGConstants.SVG_IMAGE_TAG);\n img.setAttributeNS(null, SVGConstants.SVG_X_ATTRIBUTE, Double.toString(x));\n img.setAttributeNS(null, SVGConstants.SVG_Y_ATTRIBUTE, Double.toString(y));\n img.setAttributeNS(null, SVGConstants.SVG_WIDTH_ATTRIBUTE, Double.toString(width));\n img.setAttributeNS(null, SVGConstants.SVG_HEIGHT_ATTRIBUTE, Double.toString(height));\n img.setAttributeNS(SVGConstants.XLINK_NAMESPACE_URI, SVGConstants.XLINK_HREF_QNAME,\n \"data:\" + mimeType + \";base64,\" + Base64.getEncoder().encodeToString(bytes.toByteArray()));\n canvas.appendChild(img);\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n MegaMekLab.getLogger().log(PrintRecordSheet.class, METHOD_NAME, LogLevel.ERROR,\n \"Fluff image file not found: \" + imageFile.getPath());\n } catch (IOException e) {\n // TODO Auto-generated catch block\n MegaMekLab.getLogger().log(PrintRecordSheet.class, METHOD_NAME, LogLevel.ERROR,\n \"Error reading fluff image file: \" + imageFile.getPath());\n }\n \n }",
"@Override\n public void run() {\n try {\n Drawable drawable = Drawable.createFromStream(new URL(image_path).openStream(), \"\");\n\n Message message = Message.obtain();\n message.obj = drawable;\n handler.sendMessage(message);\n } catch (MalformedURLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }"
]
| [
"0.61574256",
"0.5973803",
"0.59221315",
"0.58343333",
"0.57990956",
"0.5790731",
"0.5742541",
"0.572924",
"0.5723719",
"0.5707221",
"0.57071733",
"0.56970763",
"0.56962293",
"0.5663757",
"0.5642553",
"0.5639774",
"0.56163883",
"0.56066716",
"0.55832213",
"0.558243",
"0.55772305",
"0.5548444",
"0.5536849",
"0.5496369",
"0.54888326",
"0.5448656",
"0.5441562",
"0.5436122",
"0.543412",
"0.54327214",
"0.54229486",
"0.54072326",
"0.5400237",
"0.5393142",
"0.5383212",
"0.53792083",
"0.5376395",
"0.53705704",
"0.5361655",
"0.5351293",
"0.5342775",
"0.5336443",
"0.5330196",
"0.53275806",
"0.53275114",
"0.5327233",
"0.53234446",
"0.53225756",
"0.53193665",
"0.5317107",
"0.53149456",
"0.5311791",
"0.5311003",
"0.5309344",
"0.5307602",
"0.5306871",
"0.5304703",
"0.5303905",
"0.5299999",
"0.5297328",
"0.5288108",
"0.52858573",
"0.528271",
"0.5280022",
"0.52797365",
"0.52796113",
"0.5271953",
"0.5269812",
"0.52669954",
"0.5264875",
"0.5257852",
"0.5256704",
"0.52564514",
"0.5248618",
"0.52467215",
"0.5245454",
"0.5241119",
"0.5240644",
"0.5235198",
"0.5228814",
"0.522812",
"0.5226264",
"0.52215266",
"0.52194977",
"0.52161354",
"0.5215065",
"0.52130723",
"0.52114385",
"0.5209546",
"0.52081555",
"0.52023643",
"0.5202348",
"0.5201809",
"0.51968306",
"0.51968133",
"0.5193859",
"0.51931864",
"0.5191074",
"0.51897424",
"0.51895803",
"0.51888597"
]
| 0.0 | -1 |
final Label startDateLabel = new Label("Start Date"); add(startDateLabel); add(startDatePicker); | protected void addDateRange() {
addFieldset(startDatePicker, "Start Date", "startDate");
addFieldset(endDatePicker, "End Date", "endDate");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setDateUI() {\n datePanel = new JPanel();\n date = new JLabel();\n\n date.setText(\"Date : \");\n date.setFont(new Font(\"Nunito\", Font.PLAIN, 14));\n\n\n dateField = new JTextFieldHintUI(\"yyyy-mm-dd\");\n setTextFieldUI(dateField);\n\n datePanel.add(Box.createHorizontalStrut(15));\n datePanel.add(date);\n datePanel.add(dateField);\n datePanel.setAlignmentX(Component.CENTER_ALIGNMENT);\n datePanel.setBackground(null);\n\n }",
"public JFrameCode() {\n initComponents();\n obj=new Object[]{text1,text2,date1,date2,date3};\n dateChooser=new JDateChooser();\n System.out.println(text1);\n panel.add(dateChooser,new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 290, -1, -1));\n \n System.out.println(\"date:\"+dateChooser.getDate());\n }",
"private void setDateLabel() {\n dateFormat = new SimpleDateFormat(\"MMMMM dd, yyyy\");\n dateLabel = new JLabel();\n dateLabel.setFont(new Font(\"Times New Roman\", Font.PLAIN, 30));\n dateLabel.setBackground(Color.black);\n dateLabel.setForeground(new Color(0xAB00FF));\n dateLabel.setOpaque(true);\n add(dateLabel);\n }",
"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 initComponents() {//GEN-BEGIN:initComponents\n\n\n aDate1 = new srcastra.astra.gui.components.date.aDate.ADate();\n\n\n aTextField1 = new srcastra.astra.gui.components.textFields.ATextField();\n\n\n aDate21 = new srcastra.astra.gui.components.date.aDate.ADate2();\n\n\n getContentPane().setLayout(new java.awt.FlowLayout());\n\n\n addWindowListener(new java.awt.event.WindowAdapter() {\n\n\n public void windowClosing(java.awt.event.WindowEvent evt) {\n\n\n exitForm(evt);\n\n\n }\n\n\n });\n\n\n aDate1.setGrp_Comp_nextComponent(aTextField1);\n\n\n getContentPane().add(aDate1);\n\n\n getContentPane().add(aTextField1);\n\n\n getContentPane().add(aDate21);\n\n\n pack();\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 }",
"public ADateDemo() {\n\n\n initComponents();\n\n\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jXDatePicker1 = new org.jdesktop.swingx.JXDatePicker();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jXDatePicker2 = new org.jdesktop.swingx.JXDatePicker();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox<>();\n jComboBox2 = new javax.swing.JComboBox<>();\n jLabel8 = new javax.swing.JLabel();\n jSeparator2 = new javax.swing.JSeparator();\n jSpinner1 = new javax.swing.JSpinner();\n jLabel10 = new javax.swing.JLabel();\n jLabel11 = new javax.swing.JLabel();\n jComboBox3 = new javax.swing.JComboBox<>();\n jLabel9 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel1.setBackground(new java.awt.Color(255, 255, 255));\n jLabel1.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 24)); // NOI18N\n jLabel1.setOpaque(true);\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(880, 20, 151, 32));\n\n jButton1.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 24)); // NOI18N\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/back.jpg\"))); // NOI18N\n jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(970, 610, 100, -1));\n\n jXDatePicker1.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 24)); // NOI18N\n getContentPane().add(jXDatePicker1, new org.netbeans.lib.awtextra.AbsoluteConstraints(790, 260, 210, 37));\n\n jLabel2.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 24)); // NOI18N\n jLabel2.setText(\"From\");\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(650, 260, 83, 28));\n\n jLabel3.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 24)); // NOI18N\n jLabel3.setText(\"To\");\n getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(650, 310, -1, -1));\n\n jXDatePicker2.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 24)); // NOI18N\n jXDatePicker2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jXDatePicker2ActionPerformed(evt);\n }\n });\n getContentPane().add(jXDatePicker2, new org.netbeans.lib.awtextra.AbsoluteConstraints(790, 310, 210, 34));\n\n jLabel4.setFont(new java.awt.Font(\"Comic Sans MS\", 3, 30)); // NOI18N\n jLabel4.setText(\"Graphical Representation of Data\");\n getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 100, 501, 55));\n\n jLabel5.setBackground(new java.awt.Color(255, 255, 255));\n jLabel5.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 24)); // NOI18N\n jLabel5.setText(\"Welcome\");\n jLabel5.setOpaque(true);\n getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(760, 20, 120, 32));\n\n jLabel6.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 24)); // NOI18N\n jLabel6.setText(\"Current Inventory Visualization\");\n getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 200, -1, 53));\n\n jLabel7.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 24)); // NOI18N\n jLabel7.setText(\"Transaction Visualization\");\n getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(640, 200, 288, -1));\n\n jComboBox1.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 24)); // NOI18N\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"-Select Any-\", \"Items per category\", \"Items per brand\" }));\n jComboBox1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jComboBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox1ActionPerformed(evt);\n }\n });\n getContentPane().add(jComboBox1, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 320, 330, -1));\n\n jComboBox2.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 24)); // NOI18N\n jComboBox2.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"-Select Any-\", \"Compare purchase of items\", \"Compare sale of items\", \" \" }));\n jComboBox2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jComboBox2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox2ActionPerformed(evt);\n }\n });\n getContentPane().add(jComboBox2, new org.netbeans.lib.awtextra.AbsoluteConstraints(650, 370, 360, -1));\n getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(1009, 566, 169, -1));\n\n jSeparator2.setForeground(new java.awt.Color(0, 0, 0));\n jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL);\n jSeparator2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n getContentPane().add(jSeparator2, new org.netbeans.lib.awtextra.AbsoluteConstraints(578, 210, 2, 390));\n\n jSpinner1.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 24)); // NOI18N\n jSpinner1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n getContentPane().add(jSpinner1, new org.netbeans.lib.awtextra.AbsoluteConstraints(880, 480, 110, -1));\n\n jLabel10.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/logo.png\"))); // NOI18N\n getContentPane().add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 20, 270, 120));\n\n jLabel11.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 24)); // NOI18N\n jLabel11.setText(\"Select Year\");\n getContentPane().add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(740, 480, -1, -1));\n\n jComboBox3.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 24)); // NOI18N\n jComboBox3.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"-Select Any-\", \"Month-wise purchase\", \"Month-wise Sale\" }));\n jComboBox3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jComboBox3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox3ActionPerformed(evt);\n }\n });\n getContentPane().add(jComboBox3, new org.netbeans.lib.awtextra.AbsoluteConstraints(650, 530, 350, -1));\n\n jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/background.jpg\"))); // NOI18N\n getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1180, 700));\n\n pack();\n }",
"public void createCalender(LocalDate localDate) {\n this.datePicker = new DatePicker(localDate);\n datePicker.setShowWeekNumbers(false);\n datePicker.setDayCellFactory(new Callback<>() {\n @Override\n public DateCell call(DatePicker param) {\n return new DateCell() {\n @Override\n public void updateItem(LocalDate item, boolean empty) {\n super.updateItem(item, empty);\n if (empty || item == null) {\n setText(null);\n setGraphic(null);\n\n } else {\n\n StackPane dayCellPane = new StackPane();\n Circle circle = new Circle(15);\n\n Label label = new Label();\n label.setText(getText());\n label.setTextFill(Color.WHITE);\n label.setLabelFor(circle);\n label.setStyle(\"-fx-font-weight: bold; -fx-border-color: transparent\");\n label.setFont(Font.font(\"Helvetica\", 15));\n\n if (markedDates.containsKey(item)) {\n switch (markedDates.get(item)) {\n case 3:\n label.setStyle(\"-fx-font-weight: bold; -fx-text-fill: black\");\n circle.setFill(Color.web(\"#FF0000\"));\n break;\n\n case 2:\n label.setStyle(\"-fx-font-weight: bold; -fx-text-fill: black\");\n circle.setFill(Color.web(\"#FF9A00\"));\n break;\n\n case 1:\n label.setStyle(\"-fx-font-weight: bold; -fx-text-fill: black\");\n circle.setFill(Color.web(\"#FFE600\"));\n break;\n\n default:\n circle.setFill(Color.GREEN);\n }\n } else {\n circle.setFill(Color.TRANSPARENT);\n }\n if (item.getDayOfWeek().getValue() == 7 || item.getDayOfWeek().getValue() == 6) {\n label.setTextFill(Color.web(\"#29F6E8\"));\n }\n dayCellPane.getChildren().addAll(circle, label);\n dayCellPane.setPrefSize(50, 50);\n setGraphic(dayCellPane);\n setText(\"\");\n }\n }\n };\n }\n });\n DatePickerSkin datepopup = new DatePickerSkin(datePicker);\n Node out = datepopup.getPopupContent();\n for (Node node : out.lookupAll(\".day-name-cell\")) {\n if (node.toString().contains(\"Sun\") || node.toString().contains(\"Sat\")) {\n node.setStyle(\"-fx-text-fill: #29F6E8\");\n }\n }\n for (Node node : out.lookupAll(\".button\")) {\n node.setFocusTraversable(false);\n }\n for (Node node : out.lookupAll(\".day-cell\")) {\n node.setOnMouseClicked(event -> {\n try {\n DateCell dateCell = (DateCell) node;\n dateClicked = true;\n executeCommand(\"taskcal \" + dateCell.getItem().format(format));\n dateClicked = false;\n } catch (CommandException | ParseException e) {\n logger.info(\"Invalid date\");\n }\n });\n }\n this.calendarPanel.getChildren().addAll(out);\n }",
"private void updateLabel() {\n String myFormat = \"dd-MM-YYYY\"; //In which you need put here\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);\n dateInput.setText(sdf.format(myCalendar.getTime()));\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}",
"@Override\n public void onClick(View view) {\n new DatePickerDialog(AddEventActivity.this, start_Journey_Date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }",
"@Override\n public void onDateSet(DatePicker arg0,\n int arg1, int arg2, int arg3) {\n startshowDate(arg1, arg2+1, arg3);\n //endshowDate(arg1, arg2+1, arg3);\n }",
"public DateTimePanel(String title, boolean now) {\n super();\n setLayout(new BorderLayout());\n setBorder(BorderFactory.createTitledBorder(title));\n\n m_dateChooser = new JDateChooser(new Date(), \"yyyy-MM-dd\");\n if (now) {\n m_nowNoEndBut = new JRadioButton(\"Now (unscheduled)\", true);\n } else {\n m_nowNoEndBut = new JRadioButton(\"No end\", true);\n }\n ButtonGroup b = new ButtonGroup();\n b.add(m_nowNoEndBut);\n b.add(m_dateBut);\n\n Vector<String> hours = new Vector<String>();\n for (int i = 0; i < 24; i++) {\n String num = (i < 10) ? \"0\" + i : \"\" + i;\n hours.add(num);\n }\n m_hourCombo.setModel(new DefaultComboBoxModel(hours));\n\n Vector<String> minutes = new Vector<String>();\n for (int i = 0; i < 60; i++) {\n String num = (i < 10) ? \"0\" + i : \"\" + i;\n minutes.add(num);\n }\n m_minutesCombo.setModel(new DefaultComboBoxModel(minutes));\n\n JPanel topHolder = new JPanel();\n topHolder.setLayout(new BorderLayout());\n JPanel temp1 = new JPanel();\n temp1.setLayout(new FlowLayout(FlowLayout.LEFT));\n temp1.add(m_nowNoEndBut);\n JPanel temp2 = new JPanel();\n temp2.setLayout(new FlowLayout(FlowLayout.LEFT));\n temp2.add(m_dateBut);\n temp2.add(m_dateChooser);\n topHolder.add(temp1, BorderLayout.NORTH);\n topHolder.add(temp2, BorderLayout.SOUTH);\n\n JPanel temp3 = new JPanel();\n temp3.setLayout(new FlowLayout(FlowLayout.LEFT));\n JPanel padder = new JPanel();\n padder.setMinimumSize(m_dateBut.getMinimumSize());\n temp3.add(padder);\n temp3.add(new JLabel(\"Time\"));\n temp3.add(m_hourCombo);\n temp3.add(m_minutesCombo);\n\n JPanel holder = new JPanel();\n holder.setLayout(new BorderLayout());\n holder.add(topHolder, BorderLayout.NORTH);\n holder.add(temp3, BorderLayout.SOUTH);\n\n add(holder, BorderLayout.NORTH);\n\n m_nowNoEndBut.addActionListener(new ActionListener() {\n @Override public void actionPerformed(ActionEvent e) {\n boolean enable = !m_nowNoEndBut.isSelected();\n\n m_dateChooser.setEnabled(enable);\n m_hourCombo.setEnabled(enable);\n m_minutesCombo.setEnabled(enable);\n }\n });\n\n m_dateBut.addActionListener(new ActionListener() {\n @Override public void actionPerformed(ActionEvent e) {\n boolean enable = !m_nowNoEndBut.isSelected();\n\n m_dateChooser.setEnabled(enable);\n m_hourCombo.setEnabled(enable);\n m_minutesCombo.setEnabled(enable);\n }\n });\n\n m_dateChooser.setEnabled(false);\n m_hourCombo.setEnabled(false);\n m_minutesCombo.setEnabled(false);\n }",
"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 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 }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n datePicker = new org.jdesktop.swingx.JXDatePicker();\n\n datePicker.setFormats(new java.text.DateFormat[] { java.text.DateFormat.getDateInstance(java.text.DateFormat.MEDIUM) });\n datePicker.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n datePickerActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(datePicker, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(datePicker, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n }",
"@Override\r\n\tpublic void createControl(Composite parent) {\n\t\t\r\n\t\tComposite container = new Composite(parent, SWT.NONE);\r\n\t\tGridData gd = new GridData(GridData.FILL_HORIZONTAL);\r\n\t\tcontainer.setLayout(new GridLayout(2, false));\r\n\t\t\r\n\t\tLabel nameLabel = new Label(container, SWT.NULL);\r\n\t\tnameText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\tnameLabel.setText(BundleInternationalization.getString(\"NameLabel\")+\":\");\r\n\t\tnameText.setLayoutData(gd);\r\n\t\t// Listener to validate the project name when user finishes writing\r\n\t\tnameText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tLabel descriptionLabel = new Label(container, SWT.NULL);\r\n\t\tdescriptionText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\tdescriptionLabel.setText(BundleInternationalization.getString(\"DescriptionLabel\")+\":\");\r\n\t\tdescriptionText.setLayoutData(gd);\r\n\t\t// Listener to validate the project description when user finishes writing\r\n\t\tdescriptionText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\t\t\r\n\t\t\r\n\t\tLabel startDateLabel = new Label(container, SWT.NULL);\r\n\t\tstartDateText = new DateTime(container, SWT.DATE | SWT.BORDER | SWT.SINGLE);\r\n\t\tstartDateLabel.setText(BundleInternationalization.getString(\"StartDateLabel\")+\":\");\t\r\n\t\tstartDateText.setLayoutData(gd);\r\n\t\t\r\n\r\n\t\tLabel endDateLabel = new Label(container, SWT.NULL);\r\n\t\tendDateText = new DateTime(container, SWT.DATE | SWT.BORDER | SWT.SINGLE);\r\n\t\tendDateLabel.setText(BundleInternationalization.getString(\"EndDateLabel\")+\":\");\t\r\n\t\tendDateText.setLayoutData(gd);\r\n\t\t\r\n\t\tLabel budgetLabel = new Label(container, SWT.NULL);\r\n\t\tbudgetText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\tbudgetLabel.setText(BundleInternationalization.getString(\"BudgetLabel\")+\":\");\r\n\t\tbudgetText.setLayoutData(gd);\r\n\t\tbudgetText.addListener (SWT.Verify, new Listener () {\r\n public void handleEvent (Event event) {\r\n \tvalidateDouble(event);\r\n }\r\n\t\t}); \r\n\t\tbudgetText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tLabel quantityLinesLabel = new Label(container, SWT.NULL);\r\n\t\tquantityLinesText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\tquantityLinesLabel.setText(BundleInternationalization.getString(\"NumberCodeLinesLabel\")+\":\");\r\n\t\tquantityLinesText.setLayoutData(gd);\r\n\t\tquantityLinesText.addListener (SWT.Verify, new Listener () {\r\n public void handleEvent (Event event) {\r\n \tvalidateInt(event);\r\n }\r\n\r\n\t\t});\r\n\t\tquantityLinesText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tLabel domainLabel = new Label(container, SWT.NULL);\r\n\t\tdomainText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\tdomainLabel.setText(BundleInternationalization.getString(\"DomainLabel\")+\":\");\r\n\t\tdomainText.setLayoutData(gd);\r\n\t\t// Listener to validate the domain text when user finishes writing\r\n\t\tdomainText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tLabel progLanguageLabel = new Label(container, SWT.NULL);\r\n\t\tprogLanguageCombo = new Combo(container, SWT.DROP_DOWN | SWT.READ_ONLY);\r\n\t\tprogLanguageLabel.setText(BundleInternationalization.getString(\"ProgrammingLanguageLabel\")+\":\");\r\n\t\t// progLanguageCombo.setLayoutData(gd);\t\r\n\t\tprogLanguageCombo.setItems (new String [] {\"Java\", \"Ada\", \"C++\", \"C#\", \"Cobol\", \"ASP\", \"JSP\"});\r\n\t\tprogLanguageCombo.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tLabel estimatedHoursLabel = new Label(container, SWT.NULL);\r\n\t\testimatedHoursText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\testimatedHoursLabel.setText(BundleInternationalization.getString(\"EstimatedHoursLabel\")+\":\");\r\n\t\testimatedHoursText.setLayoutData(gd);\r\n\t\testimatedHoursText.addListener (SWT.Verify, new Listener () {\r\n public void handleEvent (Event event) {\r\n \tvalidateInt(event);\r\n }\r\n\r\n\t\t});\r\n\t\testimatedHoursText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\twizardChanged();\r\n\t\tsetControl(container);\r\n\r\n\t}",
"@Override\n public void onDateSet(DatePicker arg0,\n int arg1, int arg2, int arg3) {\n ETdateFrom.setText(new StringBuilder().append(arg3).append(\"-\")\n .append(arg2+1).append(\"-\").append(arg1));\n }",
"private void createStartingLabel() {\n \tcreateLabel(myResources.getString(\"title\"), 1, 0, TITLE_FONT);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n oldDateLbl = new javax.swing.JLabel();\n oldDateDP = new org.jdesktop.swingx.JXDatePicker();\n newDateLbl = new javax.swing.JLabel();\n newDateDP = new org.jdesktop.swingx.JXDatePicker();\n Extendsbtn = new javax.swing.JButton();\n jButton1 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Extend rental\");\n setAlwaysOnTop(true);\n setMinimumSize(new java.awt.Dimension(322, 131));\n setModal(true);\n setModalExclusionType(java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE);\n setName(\"Extend rental\"); // NOI18N\n\n oldDateLbl.setText(\"Old return date\");\n oldDateLbl.setName(\"oldDateLbl\"); // NOI18N\n\n oldDateDP.setEditable(false);\n oldDateDP.setName(\"oldDateDP\"); // NOI18N\n\n newDateLbl.setText(\"New return date\");\n newDateLbl.setName(\"newDateLbl\"); // NOI18N\n\n newDateDP.setName(\"newDateDP\"); // NOI18N\n\n Extendsbtn.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/oscar/view/resources/add.png\"))); // NOI18N\n Extendsbtn.setText(\"Extend\");\n Extendsbtn.setName(\"Extendsbtn\"); // NOI18N\n\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/oscar/view/resources/return.png\"))); // NOI18N\n jButton1.setText(\"Cancel\");\n jButton1.setName(\"jButton1\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(29, 29, 29)\n .addComponent(Extendsbtn, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE)\n .addContainerGap())\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(oldDateLbl)\n .addComponent(newDateLbl))\n .addGap(23, 23, 23)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(oldDateDP, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)\n .addComponent(newDateDP, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(oldDateLbl)\n .addComponent(oldDateDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(newDateLbl)\n .addComponent(newDateDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 14, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Extendsbtn)\n .addComponent(jButton1))\n .addContainerGap())\n );\n\n pack();\n }",
"public BlackRockCityMapUI ()\n {\n initComponents ();\n cbYear.setSelectedItem (\"2023\");\n\n }",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n // TODO\r\n //DatePicker dp = new DatePicker();\r\n \r\n txtPT_Name.setDisable(true);\r\n \r\n LinkedList roles = new LinkedList();\r\n roles.add(\"7am - 9am\");\r\n roles.add(\"10am-12pm\");\r\n roles.add(\"3pm-5pm\");\r\n roles.add(\"5pm-7pm\");\r\n roles.add(\"7pm-9pm\");\r\n \r\n LinkedList duration = new LinkedList();\r\n duration.add(\"3 month\");\r\n duration.add(\"6 month\");\r\n duration.add(\"9 month\");\r\n duration.add(\"1 year\");\r\n \r\n LinkedList focus = new LinkedList();\r\n focus.add(\"weight loss\");\r\n focus.add(\"muscle gain\");\r\n focus.add(\"flexibility\");\r\n focus.add(\"cardio\");\r\n focus.add(\"upper body\");\r\n focus.add(\"lower body\");\r\n txtFocus.getItems().addAll(focus);\r\n txtTime.getItems().addAll(roles);\r\n txtDuration.getItems().addAll(duration);\r\n \r\n // MyUtils.selectComboBoxValue(txtTime, \"7am - 9am\");\r\n // MyUtils.selectComboBoxValue(txtDuration, \"3 month\");\r\n \r\n g1.addEmailValidator(txtEmail);\r\n g1.addPassValidator(txtClientPass);\r\n g1.addNameValidator(txtClientName);\r\n g1.addNameValidator(txtPT_Name);\r\n //g1.addDateValidator(txtDate);\r\n \r\n }",
"private void newAppointmentGridPane(LocalDateTime start, Duration duration) {\n // style gridPane\n GridPane gridPane = new GridPane();\n gridPane.setHgap(20);\n gridPane.setVgap(15);\n gridPane.setAlignment(Pos.CENTER);\n\n // add nodes\n gridPane.add(customerNameLbl, 0, 0);\n gridPane.add(customerNameTxt, 1, 0);\n gridPane.add(titleLbl, 0, 1);\n gridPane.add(titleTxt, 1, 1);\n gridPane.add(descriptionLbl, 0, 2);\n gridPane.add(descriptionTxt, 1, 2);\n gridPane.add(locationLbl, 0, 3);\n gridPane.add(locationTxt, 1, 3);\n gridPane.add(contactLbl, 0, 4);\n gridPane.add(contactTxt, 1, 4);\n gridPane.add(typeLbl, 0, 5);\n gridPane.add(typeTxt, 1, 5);\n gridPane.add(urlLbl, 0, 6);\n gridPane.add(urlTxt, 1, 6);\n gridPane.add(datePickerLbl, 0, 7);\n datePicker.setValue(start.toLocalDate());\n gridPane.add(datePicker, 1, 7);\n gridPane.add(startLbl, 0, 8);\n startTxt.getSelectionModel().select(LocalTime.from(start));\n gridPane.add(startTxt, 1, 8);\n gridPane.add(endLbl, 0, 9);\n endTxt.setValue((int) duration.toMinutes());\n gridPane.add(endTxt, 1, 9);\n gridPane.add(newAppointmentButtonBar(), 1, 10);\n\n\n this.stage.setScene(new Scene(gridPane));\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 alisTarihi = new org.jdesktop.swingx.JXDatePicker();\n donusTarihi = new org.jdesktop.swingx.JXDatePicker();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n alButton = new javax.swing.JButton();\n jLabel3 = new javax.swing.JLabel();\n ucretLabel = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setLocation(new java.awt.Point(500, 200));\n\n jPanel1.setBackground(new java.awt.Color(255, 204, 204));\n\n alisTarihi.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {\n public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {\n }\n public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {\n alisTarihiPopupMenuWillBecomeInvisible(evt);\n }\n public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {\n }\n });\n\n donusTarihi.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n donusTarihiFocusLost(evt);\n }\n });\n donusTarihi.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {\n public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {\n donusTarihiPopupMenuCanceled(evt);\n }\n public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {\n donusTarihiPopupMenuWillBecomeInvisible(evt);\n }\n public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {\n }\n });\n donusTarihi.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseExited(java.awt.event.MouseEvent evt) {\n donusTarihiMouseExited(evt);\n }\n });\n donusTarihi.addInputMethodListener(new java.awt.event.InputMethodListener() {\n public void caretPositionChanged(java.awt.event.InputMethodEvent evt) {\n }\n public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) {\n donusTarihiİnputMethodTextChanged(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel1.setText(\"alış tarihi\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel2.setText(\"dönüş tarihi\");\n\n jButton1.setBackground(new java.awt.Color(0, 0, 255));\n jButton1.setText(\"Ücret hesapla\");\n jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jButton1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton1MouseClicked(evt);\n }\n });\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n alButton.setBackground(new java.awt.Color(153, 0, 51));\n alButton.setText(\"Araba al\");\n alButton.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n alButton.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n alButtonMouseClicked(evt);\n }\n });\n alButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n alButtonActionPerformed(evt);\n }\n });\n\n jLabel3.setBackground(new java.awt.Color(255, 204, 0));\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel3.setText(\"Ucret\");\n\n ucretLabel.setBackground(new java.awt.Color(255, 204, 0));\n ucretLabel.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n ucretLabel.setText(\"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 .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(124, 124, 124)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(alisTarihi, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(donusTarihi, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(alButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(26, 26, 26)\n .addComponent(ucretLabel))\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 35, Short.MAX_VALUE)))\n .addGap(106, 106, 106))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(58, Short.MAX_VALUE)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(alisTarihi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(26, 26, 26)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(donusTarihi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(ucretLabel))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(alButton, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(21, 21, 21))\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 MyCalender() {\n initComponents();\n }",
"void showdate(){\n \n Date d = new Date();\n SimpleDateFormat s = new SimpleDateFormat(\"yyyy-MM-dd\");\n jLabel4.setText(s.format(d));\n}",
"@Override\n public void onClick(View view) {\n new DatePickerDialog(AddEventActivity.this, end_Journey_Date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jTextField3 = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n jTextField4 = new javax.swing.JTextField();\n jLabel12 = new javax.swing.JLabel();\n jTextField11 = new javax.swing.JTextField();\n demoDateField1 = new com.jp.samples.comp.calendarnew.DemoDateField();\n jLabel6 = new javax.swing.JLabel();\n jTextField5 = new javax.swing.JTextField();\n jLabel15 = new javax.swing.JLabel();\n jTextField12 = new javax.swing.JTextField();\n jLabel16 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jPanel2 = new javax.swing.JPanel();\n jLabel13 = new javax.swing.JLabel();\n jComboBox2 = new javax.swing.JComboBox();\n jFormattedTextField2 = new javax.swing.JFormattedTextField();\n jLabel17 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jTextField6 = new javax.swing.JTextField();\n jLabel9 = new javax.swing.JLabel();\n jTextField7 = new javax.swing.JTextField();\n jLabel10 = new javax.swing.JLabel();\n jTextField8 = new javax.swing.JTextField();\n jLabel11 = new javax.swing.JLabel();\n jTextField9 = new javax.swing.JTextField();\n dfs = new DecimalFormatSymbols();\n dfs.setDecimalSeparator('.');\n dfs.setGroupingSeparator(',');\n dFormat= new DecimalFormat(\"#0.##\", dfs);\n jFormattedTextField1 = new javax.swing.JFormattedTextField(dFormat);\n jLabel18 = new javax.swing.JLabel();\n jFormattedTextField3 = new javax.swing.JFormattedTextField();\n jFormattedTextField4 = new javax.swing.JFormattedTextField();\n jSeparator1 = new javax.swing.JSeparator();\n jLabel19 = new javax.swing.JLabel();\n jLabel20 = new javax.swing.JLabel();\n jLabel21 = new javax.swing.JLabel();\n demoDateField2 = new com.jp.samples.comp.calendarnew.DemoDateField();\n demoDateField3 = new com.jp.samples.comp.calendarnew.DemoDateField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(\"\"));\n\n jLabel1.setText(\"Raison Sociale\");\n\n DocumentFilter filter = new UppercaseDocumentFilter();\n ((AbstractDocument) jTextField1.getDocument()).setDocumentFilter(filter);\n jTextField1.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n jTextField1FocusLost(evt);\n }\n });\n\n jLabel2.setText(\"Date de création\");\n\n jLabel3.setText(\"Activité principale\");\n\n jTextField2.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n jTextField2FocusLost(evt);\n }\n });\n\n jLabel4.setText(\"Adresse\");\n\n jTextField3.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n jTextField3FocusLost(evt);\n }\n });\n\n jLabel5.setText(\"Num COE\");\n\n jTextField4.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n jTextField4FocusLost(evt);\n }\n });\n\n jLabel12.setText(\"Lieu de création\");\n\n jTextField11.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n jTextField11FocusLost(evt);\n }\n });\n\n demoDateField1.setYearDigitsAmount(4);\n\n jLabel6.setText(\"Personne de référence\");\n\n ((AbstractDocument) jTextField5.getDocument()).setDocumentFilter(filter);\n jTextField5.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n jTextField5FocusLost(evt);\n }\n });\n\n jLabel15.setText(\"Nom\");\n\n jTextField12.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n jTextField12FocusLost(evt);\n }\n });\n jTextField12.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n jTextField12KeyTyped(evt);\n }\n });\n\n jLabel16.setText(\"Prénoms\");\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 .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(demoDateField1, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 82, Short.MAX_VALUE)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel12)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel6)\n .addGap(44, 44, 44)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel16)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel15)\n .addComponent(jTextField5, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE)\n .addComponent(jTextField12)))))\n .addContainerGap(165, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(23, 23, 23)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(29, 29, 29)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(demoDateField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(25, 25, 25)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel12)\n .addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(28, 28, 28)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(28, 28, 28)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel4)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(28, 28, 28)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(2, 2, 2)\n .addComponent(jTextField12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(68, Short.MAX_VALUE))\n );\n\n jButton1.setText(\"Enregistrer\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(\"\"));\n\n jLabel13.setText(\"Téléphone\");\n\n jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"National \", \"International\" }));\n jComboBox2.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jComboBox2ItemStateChanged(evt);\n }\n });\n\n try {\n jFormattedTextField2.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter(\"##-##-##-##\")));\n } catch (java.text.ParseException ex) {\n ex.printStackTrace();\n }\n jFormattedTextField2.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n jFormattedTextField2FocusGained(evt);\n }\n public void focusLost(java.awt.event.FocusEvent evt) {\n jFormattedTextField2FocusLost(evt);\n }\n });\n\n jLabel17.setText(\"\");\n\n jLabel14.setText(\"Type adhésion\");\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Epargne \", \"Tontine\", \"Epargne & Tontine\" }));\n jComboBox1.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jComboBox1ItemStateChanged(evt);\n }\n });\n jComboBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox1ActionPerformed(evt);\n }\n });\n\n jLabel7.setText(\"Versements initiaux\");\n\n jLabel8.setText(\"Droit d'adhésion\");\n\n DocumentListener documentListener = new DocumentListener() {\n\n @Override\n public void removeUpdate(DocumentEvent e) {\n performSummation(null);\n }\n\n @Override\n public void insertUpdate(DocumentEvent e) {\n performSummation(null);\n }\n\n @Override\n public void changedUpdate(DocumentEvent e) {\n }\n };\n\n DocumentFilter numericFilter = new DocumentFilter(){\n\n // @Override\n // public void insertString(FilterBypass fb, int offset,\n // String string, AttributeSet attr)\n // throws BadLocationException {\n // fb.insertString(offset, string.replaceAll(\"[^\\\\d]\", \"\"), attr);\n // }\n\n // @Override\n // public void replace(FilterBypass fb, int offset, int length,\n // String text, AttributeSet attrs)\n // throws BadLocationException {\n\n // fb.replace(offset, length, text.replaceAll(\"[^\\\\d]\", \"\"), attrs);\n // }\n @Override\n public void insertString(FilterBypass fb, int offset, String text,\n AttributeSet attr) throws BadLocationException {\n super.insertString(fb, offset, revise(text), attr);\n }\n\n @Override\n public void replace(FilterBypass fb, int offset, int length, String text,\n AttributeSet attrs) throws BadLocationException {\n super.replace(fb, offset, length, revise(text), attrs);\n }\n\n private String revise(String text) {\n StringBuilder builder = new StringBuilder(text);\n int index = 0;\n while (index < builder.length()) {\n if (accept(builder.charAt(index))) {\n index++;\n } else {\n // Don't increment index here, or you'll skip the next character!\n builder.deleteCharAt(index);\n }\n }\n return builder.toString();\n }\n\n /**\n * Determine if the character should remain in the String. You may\n * override this to get any matching criteria you want.\n * @param c The character in question\n * @return true if it's valid, false if it should be removed.\n */\n public boolean accept(final char c) {\n return Character.isDigit(c) || c == ' ';\n }\n };\n ((AbstractDocument) jTextField6.getDocument()).setDocumentFilter(numericFilter);\n ((AbstractDocument) jTextField7.getDocument()).setDocumentFilter(numericFilter);\n ((AbstractDocument) jTextField8.getDocument()).setDocumentFilter(numericFilter);\n\n jTextField6.getDocument().addDocumentListener(documentListener);\n jTextField7.getDocument().addDocumentListener(documentListener);\n jTextField8.getDocument().addDocumentListener(documentListener);\n jTextField6.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n jTextField6FocusLost(evt);\n }\n });\n\n jLabel9.setText(\"Part Sociale\");\n\n jFormattedTextField4.setEnabled(false);\n\n jLabel10.setText(\"Dépôt\");\n\n jLabel11.setText(\"TOTAL\");\n\n jFormattedTextField1.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter()));\n jFormattedTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jFormattedTextField1ActionPerformed(evt);\n }\n });\n jFormattedTextField1.setVisible(false);\n\n jLabel18.setText(\"N° Carnet\");\n\n try {\n jFormattedTextField3.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter(\"####\")));\n } catch (java.text.ParseException ex) {\n ex.printStackTrace();\n }\n //jFormattedTextField3.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new RegexFormatter(\"\\\\(\\\\d{3}\\\\)\\\\d{3}-\\\\d{4}\")));\n\n try {\n jFormattedTextField4.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter(\"####\")));\n } catch (java.text.ParseException ex) {\n ex.printStackTrace();\n }\n\n jLabel19.setText(\"Date d'adhésion:\");\n\n jLabel20.setText(\"Epargne\");\n\n jLabel21.setText(\"Tontine\");\n\n demoDateField3.setEnabled(false);\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 .addComponent(jSeparator1)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel13)\n .addComponent(jLabel14)\n .addComponent(jLabel18)\n .addComponent(jLabel7)\n .addComponent(jLabel8)\n .addComponent(jLabel9)\n .addComponent(jLabel10)\n .addComponent(jLabel11))\n .addGap(44, 44, 44)\n .addGroup(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 .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jFormattedTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 145, Short.MAX_VALUE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(27, 27, 27)\n .addComponent(jLabel17))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jFormattedTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jFormattedTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jFormattedTextField4)))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addGap(18, 18, 18))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 0, Short.MAX_VALUE))))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel19)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel21)\n .addGap(18, 18, 18)\n .addComponent(demoDateField3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel20)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(demoDateField2, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(0, 0, Short.MAX_VALUE))))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(8, 8, 8)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel13)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jFormattedTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel14)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel18)\n .addComponent(jFormattedTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jFormattedTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel7)\n .addGap(16, 16, 16)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jFormattedTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel9)\n .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel10)\n .addGap(29, 29, 29)\n .addComponent(jLabel11))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(18, 18, 18)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel19)\n .addComponent(jLabel20)))\n .addComponent(demoDateField2, 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(jLabel21))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(demoDateField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(62, 62, 62))\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 .addGap(25, 25, 25)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel2, 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 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(529, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(468, 468, 468))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\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 .addGap(27, 27, 27)\n .addComponent(jButton1)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }",
"public void onDateSet(DatePicker datepicker, int selectedyear, int selectedmonth, int selectedday) {\n selectedmonth = selectedmonth + 1;\n Search_start_date.setText(String.format(\"%04d\", selectedyear)+\"-\"+String.format(\"%02d\", selectedmonth)+\"-\"+ String.format(\"%02d\", selectedday)+\"\" );\n }",
"@Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n txtdate.setText(dayOfMonth + \"/\"\n + (monthOfYear + 1) + \"/\" + year);\n\n }",
"private void setEntryDateField1() {\n // Create a DatePickerDialog and manage it\n mEntryDatePickerDialog1 = new DatePickerDialog(this, new DatePickerDialog.OnDateSetListener() {\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n Calendar newDateEntryOfTheMarket = Calendar.getInstance();\n newDateEntryOfTheMarket.set(year, monthOfYear, dayOfMonth);\n\n // Update entryDate in ViewModel\n mSearchEstateViewModel.getDateEntryOfTheMarket1().setValue(newDateEntryOfTheMarket);\n }\n\n },newCalendar.get(Calendar.YEAR), newCalendar.get(Calendar.MONTH),\n newCalendar.get(Calendar.DAY_OF_MONTH));\n }",
"@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel();\n\n\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jTextFieldDate = new javax.swing.JTextField();\n jButtonAccept = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jLabel1.setText(\"Date (YYYY - MM - DD)\");\n\n jButtonAccept.setText(\"Accept\");\n jButtonAccept.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonAcceptActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextFieldDate, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButtonAccept)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jTextFieldDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButtonAccept)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }",
"public void showDatepicker(){\n Calendar cal = Calendar.getInstance();\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH)+1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n new DatePickerDialog(SearchFlightActivity.this, new DatePickerDialog.OnDateSetListener(){\n /**\n * @param datePicker\n * @param i year\n * @param i1 month of year\n * @param i2 day of month\n */\n @Override\n public void onDateSet(DatePicker datePicker, int i, int i1, int i2) {\n et_date.setText(i+\"-\"+i1+\"-\"+i2);\n }\n },year,month,day).show();\n }",
"private void initUI()\r\n\t{\r\n\t\tthis.label = new Label();\r\n\t\t\r\n\t\tthis.label.setText(\"This view is also saveable\");\r\n\t\t\r\n\t\tthis.label.setSizeUndefined();\r\n\t\tthis.add(this.label);\r\n\t\tthis.setSizeFull();\r\n\t}",
"@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n if(year<calendar.get(Calendar.YEAR)){\n\n showMessage(\"Invalid Start Date\");\n Log.i(\"Calendar\",year+\" \"+calendar.get(Calendar.YEAR));\n return;\n }\n int monthofYear=monthOfYear+1;\n startDateStrg = year + \"-\" + monthofYear + \"-\" + dayOfMonth;\n mStartDateA2.setText(startDateStrg);\n datePickerDialog1.dismiss();\n }",
"@FXML\n public void plannerShoppingListBtnClicked(){\n //display the correct panes\n subMenuDisplay(PlannerSubMenuPane);\n PlannerShoppingListPane.toFront();\n MenuPane.toFront();\n //Visibility of this label is dependent on if the shopping list is out of sync with the meal planner\n labelWarningShoppingList.setVisible(settings.isShoppingListOutOfSync());\n\n //Display the date and time that the shopping list was generated\n if (shoppingListIngredients.size() == 0) {\n labelGeneratedDateTime.setText(\"\");\n } else {\n if (settings.getGeneratedShoppingListDate() != null){\n labelGeneratedDateTime.setText(settings.getGeneratedShoppingListDateAsString());\n } else {\n labelGeneratedDateTime.setText(\"\");\n }\n }\n }",
"private void initComponents_label(){\n label_today_date.setText(\"Today Date : \" + Main.DATE_FORMAT.format(Main.getToday_date()));\n this.neon.setIcon(new ImageIcon(Interface_Payment.getScaledImage(new ImageIcon(\"resource/neon.png\").getImage(), 524, 160)));\n this.menu_lable_1.setIcon(new ImageIcon(new ImageIcon(\"resource/menu_button/pos_main_menu.png\").getImage().getScaledInstance(485, 60, Image.SCALE_DEFAULT)));\n this.menu_lable_2.setIcon(new ImageIcon(new ImageIcon(\"resource/menu_button/customer_manager.png\").getImage().getScaledInstance(485, 60, Image.SCALE_DEFAULT)));\n this.menu_lable_3.setIcon(new ImageIcon(new ImageIcon(\"resource/menu_button/order_manager.png\").getImage().getScaledInstance(485, 60, Image.SCALE_DEFAULT)));\n this.menu_lable_4.setIcon(new ImageIcon(new ImageIcon(\"resource/menu_button/exit.png\").getImage().getScaledInstance(485, 60, Image.SCALE_DEFAULT)));\n this.menu_lable_1.setCursor(new Cursor(Cursor.HAND_CURSOR));\n this.menu_lable_2.setCursor(new Cursor(Cursor.HAND_CURSOR));\n this.menu_lable_3.setCursor(new Cursor(Cursor.HAND_CURSOR));\n this.menu_lable_4.setCursor(new Cursor(Cursor.HAND_CURSOR)); \n }",
"@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel(btnStartDate, myCalendar);\n\n //set hasCheckDate to true\n hasCheckDate = true;\n }",
"@Override\n public void onDateSet(DatePicker datePicker, int year, int month, int day) {\n mDateField.setText(year + \"/\" + (month + 1) + \"/\" + day);\n }",
"private void createGrpDateInfo() {\n\n\t\tgrpDateInfo = new Group(getShell(), SWT.NONE);\n\t\tgrpDateInfo.setBounds(new org.eclipse.swt.graphics.Rectangle(160, 180,\n\t\t\t\t280, 100));\n\n\t\tlblInstructions = new Label(grpDateInfo, SWT.NONE);\n\t\tlblInstructions.setBounds(new org.eclipse.swt.graphics.Rectangle(60,\n\t\t\t\t20, 160, 20));\n\t\tlblInstructions.setText(\"Select a Month and Year:\");\n\t\tlblInstructions.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\n\t\tcmbMonth = new CCombo(grpDateInfo, SWT.BORDER);\n\t\tcmbMonth.setBounds(new org.eclipse.swt.graphics.Rectangle(40, 50, 100,\n\t\t\t\t20));\n\t\tcmbMonth.setEditable(false);\n\t\tcmbMonth.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tString qs[] = { \"Quarter 1\", \"Quarter 2\", \"Quarter 3\", \"Quarter 4\" };\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tthis.cmbMonth.add(qs[i]);\n\t\t}\n\n\t\tint intMonth = 1;\n\t\tcmbMonth.setText(\"Quarter \" + intMonth);\n\t\tcmbMonth.setEditable(false);\n\t\tcmbMonth.setBackground(ResourceUtils.getColor(iDartColor.WHITE));\n\t\tcmbMonth.setVisibleItemCount(4);\n\n\t\t// cmdYear\n\t\tcmbYear = new CCombo(grpDateInfo, SWT.BORDER);\n\t\tcmbYear.setBounds(new org.eclipse.swt.graphics.Rectangle(160, 50, 80,\n\t\t\t\t20));\n\t\tcmbYear.setEditable(false);\n\t\tcmbYear.setBackground(ResourceUtils.getColor(iDartColor.WHITE));\n\t\tcmbYear.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\n\t\t// get the current date12\n\t\tCalendar rightNow = Calendar.getInstance();\n\t\tint currentYear = rightNow.get(Calendar.YEAR);\n\t\tfor (int i = currentYear - 2; i <= currentYear + 1; i++) {\n\t\t\tthis.cmbYear.add(Integer.toString(i));\n\t\t}\n\t\tcmbYear.setText(String.valueOf(Calendar.getInstance()\n\t\t\t\t.get(Calendar.YEAR)));\n\n\t}",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODO\n single_count.setItems(options);\n single_count.setValue(options.get(0));\n double_count.setItems(options);\n double_count.setValue(options.get(0));\n from_date.getChronology().dateNow();\n from_date.setValue(Trip_plan.city_start);\n //System.out.println(LocalDate.now());\n final Callback<DatePicker, DateCell> dayCellFactory\n = new Callback<DatePicker, DateCell>() {\n @Override\n public DateCell call(final DatePicker datePicker) {\n return new DateCell() {\n @Override\n public void updateItem(LocalDate item, boolean empty) {\n super.updateItem(item, empty);\n if (item.isBefore(\n Trip_plan.city_start)) {\n // System.out.println(\"hey\");\n setDisable(true);\n setStyle(\"-fx-background-color: #ffc0cb;\");\n }\n }\n };\n }\n };\n from_date.setDayCellFactory(dayCellFactory);\n final Callback<DatePicker, DateCell> dayCelFactory\n = new Callback<DatePicker, DateCell>() {\n @Override\n public DateCell call(final DatePicker datePicker) {\n return new DateCell() {\n @Override\n public void updateItem(LocalDate item, boolean empty) {\n super.updateItem(item, empty);\n if (item.isAfter(\n Trip_plan.city_end)||(item.isBefore(from_date.getValue()))) {\n // System.out.println(\"hey\");\n setDisable(true);\n setStyle(\"-fx-background-color: #ffc0cb;\");\n }\n }\n };\n }\n };\n to_date.setDayCellFactory(dayCelFactory);\n }",
"@Override\n public void onClick(View v) {\n new DatePickerDialog(getActivity(), enddatepicker, trigger.getEndtime().get(Calendar.YEAR), trigger.getEndtime().get(Calendar.MONTH), trigger.getEndtime().get(Calendar.DAY_OF_MONTH)).show();\n }",
"private void setDayLabel() {\n dayFormat = new SimpleDateFormat(\"EEEE\");\n dayLabel = new JLabel();\n dayLabel.setFont(new Font(\"JetBrains Mono\", Font.BOLD, 40));\n dayLabel.setForeground(new Color(0x00FFFF));\n dayLabel.setBackground(Color.black);\n dayLabel.setOpaque(true);\n add(dayLabel);\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 }",
"@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 }",
"@Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n try{\n int month = monthOfYear + 1;\n String formattedMonth = \"\" + month;\n String formattedDayOfMonth = \"\" + dayOfMonth;\n\n if(month < 10){\n\n formattedMonth = \"0\" + month;\n }\n if(dayOfMonth < 10){\n\n formattedDayOfMonth = \"0\" + dayOfMonth;\n }\n stnkDate.setText(year + \"-\" + formattedMonth + \"-\" + formattedDayOfMonth);\n }catch (ParseException e1){\n e1.printStackTrace();\n }\n\n }",
"@Override\r\n public void onDateSet(DatePicker view, int year, int monthOfYear,\r\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\r\n myCalendar.set(Calendar.MONTH, monthOfYear);\r\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\r\n\r\n int s=monthOfYear+1;\r\n txt_date.setText(dayOfMonth+\"-\"+s+\"-\"+year);\r\n\r\n\r\n\r\n\r\n }",
"public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n txtDate.setText(dayOfMonth + \"-\" + (monthOfYear + 1) + \"-\" + year);}",
"public KomisiBPUI() {\n initComponents();\n setLocationRelativeTo(null);\n tglPesanan.setDate(new GregorianCalendar().getTime());\n }",
"@Override\n public void onDateSet(DatePicker arg0,\n int arg1, int arg2, int arg3) {\n ETdateTo.setText(new StringBuilder().append(arg3).append(\"-\")\n .append(arg2+1).append(\"-\").append(arg1));\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lblWelcome = new javax.swing.JLabel();\n lblStepTitle = new javax.swing.JLabel();\n chkAutoStart = new javax.swing.JCheckBox();\n spnDay = new javax.swing.JSpinner();\n lblDtDelim1 = new javax.swing.JLabel();\n spnMon = new javax.swing.JSpinner();\n lblDtDelim = new javax.swing.JLabel();\n spnYear = new javax.swing.JSpinner();\n spnHou = new javax.swing.JSpinner();\n lblTmDelim = new javax.swing.JLabel();\n spnMin = new javax.swing.JSpinner();\n btnSave = new javax.swing.JButton();\n btnCancel = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Планировщик этапа\");\n setMaximumSize(new java.awt.Dimension(450, 240));\n setMinimumSize(new java.awt.Dimension(450, 240));\n setModalExclusionType(java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE);\n setResizable(false);\n getContentPane().setLayout(null);\n\n lblWelcome.setText(\"Время автозапуска для этапа\");\n getContentPane().add(lblWelcome);\n lblWelcome.setBounds(10, 10, 430, 20);\n\n lblStepTitle.setFont(new java.awt.Font(\"Cantarell\", 2, 15)); // NOI18N\n lblStepTitle.setText(\"1.1 Заполнение рабочей камеры азотом\");\n lblStepTitle.setToolTipText(\"\");\n getContentPane().add(lblStepTitle);\n lblStepTitle.setBounds(50, 40, 400, 20);\n\n chkAutoStart.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n chkAutoStartActionPerformed(evt);\n }\n });\n getContentPane().add(chkAutoStart);\n chkAutoStart.setBounds(10, 100, 20, 22);\n\n spnDay.setFont(new java.awt.Font(\"Cantarell\", 0, 24)); // NOI18N\n spnDay.setModel(new javax.swing.SpinnerNumberModel(1, 1, 31, 1));\n spnDay.setEnabled(false);\n getContentPane().add(spnDay);\n spnDay.setBounds(40, 80, 60, 60);\n\n lblDtDelim1.setFont(new java.awt.Font(\"Cantarell\", 1, 15)); // NOI18N\n lblDtDelim1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblDtDelim1.setText(\".\");\n getContentPane().add(lblDtDelim1);\n lblDtDelim1.setBounds(100, 100, 10, 40);\n\n spnMon.setFont(new java.awt.Font(\"Cantarell\", 0, 24)); // NOI18N\n spnMon.setModel(new javax.swing.SpinnerNumberModel(1, 1, 12, 1));\n spnMon.setToolTipText(\"\");\n spnMon.setEnabled(false);\n getContentPane().add(spnMon);\n spnMon.setBounds(110, 80, 60, 60);\n\n lblDtDelim.setFont(new java.awt.Font(\"Cantarell\", 1, 15)); // NOI18N\n lblDtDelim.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblDtDelim.setText(\".\");\n getContentPane().add(lblDtDelim);\n lblDtDelim.setBounds(170, 100, 10, 40);\n\n spnYear.setFont(new java.awt.Font(\"Cantarell\", 0, 24)); // NOI18N\n spnYear.setModel(new javax.swing.SpinnerNumberModel(Integer.valueOf(2017), Integer.valueOf(2017), null, Integer.valueOf(1)));\n spnYear.setEnabled(false);\n getContentPane().add(spnYear);\n spnYear.setBounds(180, 80, 100, 60);\n\n spnHou.setFont(new java.awt.Font(\"Cantarell\", 0, 24)); // NOI18N\n spnHou.setModel(new javax.swing.SpinnerNumberModel(0, 0, 23, 1));\n spnHou.setEnabled(false);\n getContentPane().add(spnHou);\n spnHou.setBounds(310, 80, 60, 60);\n\n lblTmDelim.setFont(new java.awt.Font(\"Cantarell\", 1, 15)); // NOI18N\n lblTmDelim.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblTmDelim.setText(\":\");\n getContentPane().add(lblTmDelim);\n lblTmDelim.setBounds(370, 80, 10, 60);\n\n spnMin.setFont(new java.awt.Font(\"Cantarell\", 0, 24)); // NOI18N\n spnMin.setModel(new javax.swing.SpinnerNumberModel(0, 0, 59, 1));\n spnMin.setEnabled(false);\n getContentPane().add(spnMin);\n spnMin.setBounds(380, 80, 60, 60);\n\n btnSave.setText(\"Сохранить\");\n btnSave.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSaveActionPerformed(evt);\n }\n });\n getContentPane().add(btnSave);\n btnSave.setBounds(190, 150, 120, 40);\n\n btnCancel.setText(\"Отмена\");\n btnCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCancelActionPerformed(evt);\n }\n });\n getContentPane().add(btnCancel);\n btnCancel.setBounds(320, 150, 120, 40);\n\n pack();\n }",
"public void setDate(View view) {\n new DatePickerDialog(\n AddEvent.this, dateSet,\n myCalendar.get(Calendar.YEAR),\n myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)\n ).show();\n }",
"public DatePopup(JComboBox comboBox) {\r\n\t this.comboBox = comboBox;\r\n\t dateFormat = new SimpleDateFormat(\"EEE , dd MMM\");\r\n\t Calendar now = Calendar.getInstance();\r\n\t selectedDate = new DateTime(now.get(Calendar.DAY_OF_MONTH), now.get(Calendar.MONTH) + 1, now.get(Calendar.YEAR), now.get(Calendar.HOUR_OF_DAY), now.get(Calendar.MINUTE), 0);\r\n\t setSelectedItem(dateFormat.format(now.getTime()));\r\n\t panel = new UnityDatePanel();\r\n\t panel.addActionListener(this);\r\n\t initializePopup();\r\n\r\n\t}",
"public void showStartPicker(View v)\n { toggleVisibility(_pickerInitTime); }",
"public StatTablePanel() {\n\t\tinitComponents();\n\t\tdateLabel.setText(\"—— \"+Today.getDate());\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel7 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n eventCapJTxtField = new javax.swing.JTextField();\n eventNameJTxtField = new javax.swing.JTextField();\n eventDesJTxtField = new javax.swing.JTextField();\n locJTxtField = new javax.swing.JTextField();\n backJBtn = new javax.swing.JButton();\n createEventJBtn = new javax.swing.JButton();\n eventDate = new com.toedter.calendar.JDateChooser();\n\n jLabel7.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Pics/party-51.jpg\"))); // NOI18N\n jLabel7.setText(\"jLabel7\");\n\n setBackground(new java.awt.Color(0, 0, 0));\n setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 153, 153));\n jLabel1.setText(\"Create New Event\");\n add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 11, -1, -1));\n\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"Event Name: \");\n add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 61, 120, -1));\n\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setText(\"Event Description: \");\n add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 99, 120, -1));\n\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setText(\"Date: \");\n add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 134, 120, -1));\n\n jLabel5.setForeground(new java.awt.Color(255, 255, 255));\n jLabel5.setText(\"No of People:\");\n add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 175, 120, -1));\n\n jLabel6.setForeground(new java.awt.Color(255, 255, 255));\n jLabel6.setText(\"Location: \");\n add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 213, 120, -1));\n add(eventCapJTxtField, new org.netbeans.lib.awtextra.AbsoluteConstraints(158, 172, 200, -1));\n add(eventNameJTxtField, new org.netbeans.lib.awtextra.AbsoluteConstraints(158, 58, 200, -1));\n add(eventDesJTxtField, new org.netbeans.lib.awtextra.AbsoluteConstraints(158, 96, 200, -1));\n add(locJTxtField, new org.netbeans.lib.awtextra.AbsoluteConstraints(158, 210, 200, -1));\n\n backJBtn.setText(\"Back\");\n backJBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backJBtnActionPerformed(evt);\n }\n });\n add(backJBtn, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 248, -1, -1));\n\n createEventJBtn.setText(\"Create Event\");\n createEventJBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n createEventJBtnActionPerformed(evt);\n }\n });\n add(createEventJBtn, new org.netbeans.lib.awtextra.AbsoluteConstraints(158, 248, -1, -1));\n add(eventDate, new org.netbeans.lib.awtextra.AbsoluteConstraints(158, 134, 200, -1));\n }",
"private void setSaleDateField1() {\n // Create a DatePickerDialog and manage it\n mSaleDatePickerDialog1 = new DatePickerDialog(this, new DatePickerDialog.OnDateSetListener() {\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n Calendar newDateEntryOfTheMarket = Calendar.getInstance();\n newDateEntryOfTheMarket.set(year, monthOfYear, dayOfMonth);\n\n // Update entryDate in ViewModel\n mSearchEstateViewModel.getDateSale1().setValue(newDateEntryOfTheMarket);\n }\n\n },newCalendar.get(Calendar.YEAR), newCalendar.get(Calendar.MONTH),\n newCalendar.get(Calendar.DAY_OF_MONTH));\n }",
"@Override\n public void onDateSet(DatePicker arg0,\n int arg1, int arg2, int arg3) {\n showDate(arg1, arg2 + 1, arg3);\n }",
"private void displayBirthdayFields() {\n FieldRelatedLabel passwordLabel = new FieldRelatedLabel(\"Birthday\", 350, 470);\n\n invalidBirthdayLabel = new InvalidFormEntryLabel(\"Birthday must not be\\na day in the future\", 540, 490, true);\n\n birthdayDP = new DatePicker();\n birthdayDP.relocate(350, 500);\n birthdayDP.setOnAction(e->FormValidatorPokeMongo.handleBirthday(birthdayDP, invalidBirthdayLabel));\n\n sceneNodes.getChildren().addAll(passwordLabel, invalidBirthdayLabel, birthdayDP);\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 }",
"@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 }",
"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\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 }",
"@Override\r\n public void onDateSet(DatePicker view, int year,\r\n int monthOfYear, int dayOfMonth) {\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 }",
"void setStartDate(Date startDate);",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jDateChooser1 = new com.toedter.calendar.JDateChooser();\n search = new javax.swing.JButton();\n label = new javax.swing.JLabel();\n show_detail = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n list = new javax.swing.JList<>();\n nextButton = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n jDateChooser1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jDateChooser1MouseClicked(evt);\n }\n });\n getContentPane().add(jDateChooser1);\n jDateChooser1.setBounds(126, 68, 255, 40);\n\n search.setBackground(new java.awt.Color(0, 51, 204));\n search.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n search.setForeground(new java.awt.Color(255, 255, 255));\n search.setText(\"Search\");\n search.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n searchActionPerformed(evt);\n }\n });\n getContentPane().add(search);\n search.setBounds(444, 68, 130, 50);\n getContentPane().add(label);\n label.setBounds(840, 80, 210, 249);\n\n show_detail.setBackground(new java.awt.Color(0, 51, 204));\n show_detail.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n show_detail.setForeground(new java.awt.Color(255, 255, 255));\n show_detail.setText(\"Show Details\");\n show_detail.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n show_detailActionPerformed(evt);\n }\n });\n getContentPane().add(show_detail);\n show_detail.setBounds(848, 365, 179, 69);\n\n jScrollPane1.setViewportView(list);\n\n getContentPane().add(jScrollPane1);\n jScrollPane1.setBounds(817, 474, 246, 219);\n\n nextButton.setBackground(new java.awt.Color(0, 51, 204));\n nextButton.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n nextButton.setForeground(new java.awt.Color(255, 255, 255));\n nextButton.setText(\"Next\");\n nextButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n nextButtonActionPerformed(evt);\n }\n });\n getContentPane().add(nextButton);\n nextButton.setBounds(890, 741, 100, 45);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel1.setIcon(new javax.swing.ImageIcon(\"C:\\\\Users\\\\DELL\\\\Desktop\\\\movie.jpg\")); // NOI18N\n jLabel1.setText(\"jLabel1\");\n getContentPane().add(jLabel1);\n jLabel1.setBounds(0, 0, 2100, 1290);\n\n pack();\n }",
"private void initComponents(){\n\t\terrorMessage = new JLabel();\n\t\terrorMessage.setForeground(Color.RED);\n\t\t//elements for registration\n\t\t/*\n\t\tparticipantList =new JComboBox<String>(new String[0]);\n\t\tparticipantList.addActionListener(new java.awt.event.ActionListener(){\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n\t\t\t\tJComboBox<String> cb =(JComboBox<String>) evt.getSource();\n\t\t\t\tselectedParticipant=cb.getSelectedIndex();\n\t\t\t}\n\t\t});\n\t\tparticipantLabel = new JLabel();\n\t\t*/\n\t\t\n\t\talbumList =new JComboBox<String>(new String[0]);\n\t\talbumList.addActionListener(new java.awt.event.ActionListener(){\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n\t\t\t\tJComboBox<String> cb =(JComboBox<String>) evt.getSource();\n\t\t\t\tselectedAlbum=cb.getSelectedIndex();\n\t\t\t}\n\t\t});\n\t\talbumLabel = new JLabel();\n\t\t\n\t\t/*\n\t\tregisterButton =new JButton();\n\t\t\n\t\t\n\t\t//element for participant\n\t\tparticipantNameTextField = new JTextField();\n\t\tparticipantNameLabel = new JLabel();\n\t\taddParticipantButton = new JButton();\n\t\t*/\n\t\t\n\t\t// elements for album\n\t\talbumNameTextField = new JTextField();\n\t\talbumNameLabel = new JLabel();\n\t\t\n\t\tSqlDateModel model = new SqlDateModel();\n\t\tProperties p = new Properties();\n\t\tp.put(\"text.today\", \"Today\");\n\t\tp.put(\"text.month\", \"Month\");\n\t\tp.put(\"text.year\", \"Year\");\n\t\tJDatePanelImpl datePanel = new JDatePanelImpl(model, p);\n\t\treleaseDatePicker = new JDatePickerImpl(datePanel, new DateLabelFormatter());\t\n\t\t\n\t\treleaseDateLabel = new JLabel();\n\t\t/*\n\t\tstartTimeSpinner = new JSpinner (new SpinnerDateModel());\n\t\tJSpinner.DateEditor startTimeEditor = new JSpinner.DateEditor(startTimeSpinner, \"HH:mm\");\n\t\tstartTimeSpinner.setEditor(startTimeEditor);\n\t\tstartTimeLabel = new JLabel();\n\t\tendTimeSpinner = new JSpinner (new SpinnerDateModel());\n\t\tJSpinner.DateEditor endTimeEditor = new JSpinner.DateEditor(endTimeSpinner, \"HH:mm\");\n\t\tendTimeSpinner.setEditor(endTimeEditor);\n\t\tendTimeLabel= new JLabel();\n\t\t*/\n\t\taddAlbumButton = new JButton();\n\t\t\n\t\t//global setting and listeners\n\t\tsetDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n\t\tsetTitle(\"Home Audio System\");\n\t\t\n\t\t//participantLabel.setText(\"Select Participant:\");\n\t\talbumLabel.setText(\"Select Album\");\n\t\t//registerButton.setText(\"Register\");\n//\t\tregisterButton.addActionListener(new java.awt.event.ActionListener() {\n//\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n//\t\t\t\tregisterButtonActionPerformed(evt);\n//\t\t\t}\n//\t\t}\n//\t\t);\n\t\t\n\t\t\n//\t\tparticipantNameLabel.setText(\"Name:\");\n//\t\taddParticipantButton.setText(\"Add Participant\");\n//\t\taddParticipantButton.addActionListener(new java.awt.event.ActionListener() {\n//\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n//\t\t\t\taddParticipantButtonActionPerformed(evt);\n//\t\t\t}\n//\t\t});\n\t\t\n\t\talbumNameLabel.setText(\"Album Name:\");\n\t\treleaseDateLabel.setText(\"Release Date:\");\n\t\tartistNameLabel.setText(\"Artist Name:\");\n\t\tgenreNameLabel.setText(\"Genre:\");\n\t\taddAlbumButton.setText(\"Add Album\");\n\t\taddAlbumButton.addActionListener(new java.awt.event.ActionListener(){\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n\t\t\t\taddEventButtonActionPerformed(evt);\n\t\t\t}\n\t\t});\n\t\t\n\t\t//layout\n\t\tGroupLayout layout = new GroupLayout(getContentPane());\n\t\tgetContentPane().setLayout(layout);\n\t\tlayout.setAutoCreateGaps(true);\n\t\tlayout.setAutoCreateContainerGaps(true);\n\t\tlayout.setHorizontalGroup(\n\t\t\t\tlayout.createParallelGroup()\n\t\t\t\t.addComponent(errorMessage)\n\t\t\t\t.addGroup(layout.createSequentialGroup()\n//\t\t\t\t\t\t.addGroup(layout.createParallelGroup()\n//\t\t\t\t\t\t .addComponent(participantLabel)\n//\t\t\t\t\t\t .addComponent(registerButton)\n//\t\t\t\t .addComponent(participantNameLabel))\n//\t\t\t\t .addGroup(layout.createParallelGroup()\n//\t\t\t\t \t\t.addComponent(participantList)\n//\t\t\t\t\t\t .addComponent(participantNameTextField, 200, 200, 400)\n//\t\t\t\t\t\t .addComponent(addParticipantButton))\n\t\t\t\t .addGroup(layout.createParallelGroup()\n\t\t\t\t\t\t\t\t.addComponent(albumLabel)\n\t\t\t\t\t\t\t\t.addComponent(albumNameLabel)\n\t\t\t\t\t\t .addComponent(releaseDateLabel)\n\t\t\t\t\t\t .addComponent(artistNameLabel)\n\t\t\t\t\t\t .addComponent(genreNameLabel))\n\t\t\t\t .addGroup(layout.createParallelGroup()\n\t\t\t\t \t\t.addComponent(albumList)\n\t\t\t\t \t\t.addComponent(albumNameTextField, 200, 200, 400)\n\t\t\t\t \t\t.addComponent(releaseDatePicker)\n//\t\t\t\t \t\t.addComponent(startTimeSpinner)\n//\t\t\t\t \t\t.addComponent(endTimeSpinner)\n\t\t\t\t \t\t.addComponent(addAlbumButton)))\n\t\t\t\t\t\t);\n//\t\tlayout.linkSize(SwingConstants.HORIZONTAL, new java.awt.Component[]{registerButton,participantLabel});\n//\t\tlayout.linkSize(SwingConstants.HORIZONTAL, new java.awt.Component[]{addParticipantButton,participantNameTextField});\n\t\tlayout.linkSize(SwingConstants.HORIZONTAL, new java.awt.Component[]{addAlbumButton,albumNameTextField});\n\t\t\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t.addComponent(errorMessage)\n\t\t\t\t.addGroup(layout.createParallelGroup()\n//\t\t\t\t\t\t.addComponent(participantLabel)\n//\t\t \t\t.addComponent(participantList)\n\t\t\t\t .addComponent(albumLabel)\n\t\t\t\t .addComponent(albumList))\n//\t\t\t\t.addComponent(registerButton)\n\t\t\t\t.addGroup(layout.createParallelGroup()\n//\t\t\t\t\t\t.addComponent(participantNameLabel)\n//\t\t\t\t\t\t.addComponent(participantNameTextField)\n\t\t\t\t\t\t.addComponent(albumNameLabel)\n\t\t\t\t\t\t.addComponent(albumNameTextField))\n\t\t\t\t.addGroup(layout.createParallelGroup()\n\t\t\t\t\t\t.addComponent(releaseDateLabel)\n\t\t\t\t\t\t.addComponent(releaseDatePicker))\n\t\t\t\t.addGroup(layout.createParallelGroup()\n\t\t\t\t\t\t.addComponent(artistNameLabel)\n\t\t\t\t\t\t.addComponent(artistNameTextField))\n\t\t\t\t.addGroup(layout.createParallelGroup()\n\t\t\t\t\t\t.addComponent(genreNameLabel)\n\t\t\t\t\t\t.addComponent(genreNameTextField))\n\t\t\t\t.addGroup(layout.createParallelGroup()\n//\t\t\t\t\t\t.addComponent(addParticipantButton)\n\t\t\t\t\t\t.addComponent(addAlbumButton))\n\t\t\t\t\t\t\n\t\t\t\t);\n\t\t\n\t\tpack();\n\t}",
"@Override\n public void onDateSet(DatePicker arg0,\n int arg1, int arg2, int arg3) {\n showDate(arg1, arg2+1, arg3);\n }",
"@Override\n public void onDateSet(DatePicker arg0,\n int arg1, int arg2, int arg3) {\n showDate(arg1, arg2+1, arg3);\n }",
"@Override\n public void onDateSet(DatePicker arg0,\n int arg1, int arg2, int arg3) {\n showDate(arg1, arg2+1, arg3);\n }",
"@Override\n public void onDateSet(DatePicker arg0,\n int arg1, int arg2, int arg3) {\n showDate(arg1, arg2+1, arg3);\n }",
"@Override\n public void onDateSet(DatePicker arg0,\n int arg1, int arg2, int arg3) {\n showDate(arg1, arg2+1, arg3);\n }",
"private void initDesign(){\n\t\tlabel.setLayoutX(xPos);\n\t\tlabel.setLayoutY(yPos);\n\t\tlabel.setStyle(\"-fx-border-color: green\");\n\t}",
"public void onDateSet(DatePicker datepicker, int selectedyear, int selectedmonth, int selectedday) {\n\t\t\t\t\t\t \t\t\tstart_day = selectedday;\n\t\t\t\t\t\t \t\t\tstart_month = selectedmonth;\n\t\t\t\t\t\t \t\t\tstart_year = selectedyear;\n\t\t\t\t\t\t \t\t\t//final Date date = new Date(c.getTimeInMillis());\n\t\t\t\t\t\t \t\t\t//final SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t\t\t\t \t\t\t//harvestdate1.setText(dateFormat.format(date));\n\t\t\t\t\t\t harvestdate1.setText(new StringBuilder().append(start_day).append(\"-\").append(start_month+1)\n\t\t\t\t\t .append(\"-\").append(start_year)\n\t\t\t\t\t .append(\" \")); \t\n\t\t\t\t\t\t // set selected date into Date Picker\n\t\t\t\t\t\t datepicker.init(start_year, start_month, start_day, null);\n\n\t\t\t\t\t\t }",
"public void run() {\n txtSpclDate.requestFocus();\n }",
"public CreateAccountPanel() {\n initComponents();\n initializeDateChooser();\n }",
"public registration() {\n initComponents();\n DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd\");\n Date d = new Date();\n String dt = df.format(d);\n tdate.setText(dt);\n \n }",
"@Override public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) \n\t\t\t\t\t{\n\t\t\t\t\t\tstartdate.setText(String.format(\"%02d\",dayOfMonth) + \"/\" +String.format(\"%02d\",(monthOfYear + 1)) + \"/\" + year); \n\t\t\t\t\t}",
"@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n myCalendar.set(Calendar.HOUR_OF_DAY, 23);\n myCalendar.set(Calendar.MINUTE, 59);\n mDate1 = myCalendar.getTime();\n updateLabel(date1);\n }",
"private void bindToTime() {\r\n Timeline timeline = new Timeline(\r\n new KeyFrame(Duration.seconds(0), (ActionEvent actionEvent) -> {\r\n Calendar time = Calendar.getInstance();\r\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"HH:mm:ss\");\r\n datePicker.setText(simpleDateFormat.format(time.getTime()));\r\n }),\r\n new KeyFrame(Duration.seconds(1))\r\n );\r\n timeline.setCycleCount(Animation.INDEFINITE);\r\n timeline.play();\r\n }",
"@Override\n public void onDateSet(DatePicker arg0, int arg1, int arg2, int arg3) {\n showDate(arg1, arg2 + 1, arg3);\n }",
"public DateRenderer() {\n\t\t\tsuper();\n\t\t\tthis.setHorizontalAlignment(SwingConstants.CENTER);\n\t\t\t}",
"@Override\n public void onDateSet(DatePicker arg0,\n int arg1, int arg2, int arg3) {\n\n showDate1(arg1, arg2+1, arg3);\n }",
"private void layoutControls()\n {\n getChildren().addAll(\n new Label(\"Abfahrt\"),\n departureTimeField,\n new Label(\"Bahnhof\"),\n destinationField\n );\n }",
"private void displayDatePickerAndUpdateUi(View view) {\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(mActivity, (datePicker, year1, month1, day1) -> {\n int id = view.getId();\n if (id == R.id.fragment_search_for_sale_txt) {\n mBinding.fragmentSearchForSaleTxt.setText(getString(R.string.hour_format, day1, month1 + 1, year1));\n } else if (id == R.id.fragment_search_sold_txt) {\n mBinding.fragmentSearchSoldTxt.setText(getString(R.string.hour_format, day1, month1 + 1, year1));\n }\n }, year, month, day);\n datePickerDialog.setButton(DialogInterface.BUTTON_NEUTRAL, \"Delete Date\", (dialogInterface, i) -> {\n int id = view.getId();\n if (id == R.id.fragment_search_for_sale_txt) {\n mBinding.fragmentSearchForSaleTxt.setText(null);\n } else if (id == R.id.fragment_search_sold_txt) {\n mBinding.fragmentSearchSoldTxt.setText(null);\n }\n });\n datePickerDialog.show();\n }",
"private Component createDateLayout() {\n btnToday.addClickListener(e -> {\n dtpSightingDate.setValue(LocalDate.now());\n });\n\n HorizontalLayout dateLayout = new HorizontalLayout(dtpSightingDate, btnToday);\n dateLayout.setDefaultVerticalComponentAlignment(FlexComponent.Alignment.BASELINE);\n dateLayout.expand(dtpSightingDate);\n\n return dateLayout;\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 }",
"@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel1();\n }",
"DepartureBox(Label label)\n {\n label.getStyleClass().add(\"stopover-label\");\n getStyleClass().addAll(\"bordered-pane\", \"white-background\");\n getChildren().add(label);\n layoutControls();\n addEventHandlers();\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 requestFocusToSpecialDate() {\n SwingUtilities.invokeLater(new Runnable() {\n\n /**\n * put your documentation comment here\n */\n public void run() {\n SwingUtilities.invokeLater(new Runnable() {\n\n /**\n * put your documentation comment here\n */\n public void run() {\n txtSpclDate.requestFocus();\n }\n });\n }\n });\n }",
"private void setNameUI() {\n namePanel = new JPanel();\n name = new JLabel();\n\n name.setText(\"Name : \");\n name.setFont(new Font(\"Nunito\", Font.PLAIN, 14));\n name.setForeground(new Color(247, 37, 133));\n\n nameField = new JTextFieldHintUI(\"Enter country\");\n setTextFieldUI(nameField);\n\n namePanel.add(Box.createHorizontalStrut(15));\n namePanel.add(name);\n namePanel.add(nameField);\n namePanel.setAlignmentX(Component.CENTER_ALIGNMENT);\n namePanel.setBackground(null);\n }",
"private void updateLabel() {\n String myFormat = \"yyyy-MM-dd\"; //In which you need put here\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.UK);\n\n serviceDate = sdf.format(myCalendar.getTime());\n callTimeSlotService();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lblUser = new javax.swing.JLabel();\n lblTime = new javax.swing.JLabel();\n lblDate = new javax.swing.JLabel();\n\n lblUser.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblUser.setText(\"Xin chào {user_id}!\");\n\n lblTime.setFont(new java.awt.Font(\"Tahoma\", 1, 36)); // NOI18N\n lblTime.setForeground(new java.awt.Color(102, 102, 102));\n lblTime.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblTime.setText(\"jLabel2\");\n\n lblDate.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n lblDate.setForeground(new java.awt.Color(153, 153, 153));\n lblDate.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblDate.setText(\"jLabel3\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lblUser, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(lblTime, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)\n .addComponent(lblDate, javax.swing.GroupLayout.Alignment.TRAILING, 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 .addGap(54, 54, 54)\n .addComponent(lblUser)\n .addGap(46, 46, 46)\n .addComponent(lblTime, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(18, 18, 18)\n .addComponent(lblDate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(95, 95, 95))\n );\n }",
"public void setStartDate(Date s);",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n providersScrollPane = new javax.swing.JScrollPane();\n providersPanel = new javax.swing.JPanel();\n createLabel = new javax.swing.JLabel();\n titleLabel = new javax.swing.JLabel();\n titleTextField = new javax.swing.JTextField();\n descriptionLabel = new javax.swing.JLabel();\n descriptionScrollPane = new javax.swing.JScrollPane();\n descriptionTextArea = new javax.swing.JTextArea();\n startDateLabel = new javax.swing.JLabel();\n startDateTextField = new javax.swing.JTextField();\n endDateLabel = new javax.swing.JLabel();\n endDateTextField = new javax.swing.JTextField();\n scaleLabel = new javax.swing.JLabel();\n revolutionLabel = new javax.swing.JLabel();\n providersLabel = new javax.swing.JLabel();\n addProviderButton = new javax.swing.JButton();\n createButton = new javax.swing.JButton();\n addKeywordButton = new javax.swing.JButton();\n granularitySpinner = new javax.swing.JSpinner();\n scaleSpinner = new javax.swing.JSpinner();\n cancelButton = new javax.swing.JButton();\n innerRadiusLabel = new javax.swing.JLabel();\n widthLabel = new javax.swing.JLabel();\n widthSpinner = new javax.swing.JSpinner();\n pitchLabel = new javax.swing.JLabel();\n pitchSpinner = new javax.swing.JSpinner();\n segmentsLabel = new javax.swing.JLabel();\n innerRadiusSpinner = new javax.swing.JSpinner();\n numSegmentsLabel = new javax.swing.JLabel();\n numSegmentsLabel1 = new javax.swing.JLabel();\n numSegmentsLabel2 = new javax.swing.JLabel();\n numSegmentsLabel3 = new javax.swing.JLabel();\n numSegmentsLabel4 = new javax.swing.JLabel();\n\n providersPanel.setBackground(new java.awt.Color(255, 255, 204));\n providersPanel.setLayout(new java.awt.GridLayout(0, 1));\n providersScrollPane.setViewportView(providersPanel);\n\n createLabel.setFont(createLabel.getFont().deriveFont(createLabel.getFont().getStyle() | java.awt.Font.BOLD));\n createLabel.setText(\"Create Timeline\");\n\n titleLabel.setText(\"Title:\");\n\n titleTextField.setText(\"New Timeline\");\n\n descriptionLabel.setText(\"Description:\");\n\n descriptionScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n\n descriptionTextArea.setColumns(20);\n descriptionTextArea.setRows(5);\n descriptionScrollPane.setViewportView(descriptionTextArea);\n\n startDateLabel.setText(\"Start Date:\");\n\n startDateTextField.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n startDateTextField.setText(dateFormat.format(config.getDateRange().getMinimum()));\n\n endDateLabel.setText(\"End Date:\");\n\n endDateTextField.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n endDateTextField.setText(dateFormat.format(config.getDateRange().getMaximum()));\n\n scaleLabel.setText(\"Scale:\");\n\n revolutionLabel.setText(\"make 1 revolution equal\");\n\n providersLabel.setText(\"Providers:\");\n\n addProviderButton.setText(\"Add Provider...\");\n addProviderButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addProviderButtonActionPerformed(evt);\n }\n });\n\n createButton.setText(\"Create\");\n createButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n createButtonActionPerformed(evt);\n }\n });\n\n addKeywordButton.setText(\"Add Keyword Collection...\");\n addKeywordButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addKeywordButtonActionPerformed(evt);\n }\n });\n\n granularitySpinner.setModel(new javax.swing.SpinnerListModel(new String[] {\"HOURS\", \"DAYS\", \"WEEKS\", \"MONTHS\", \"YEARS\"}));\n\n scaleSpinner.setModel(new javax.swing.SpinnerNumberModel(Float.valueOf(1.0f), null, null, Float.valueOf(0.25f)));\n scaleSpinner.setValue(config.getUnitsPerRev());\n\n cancelButton.setText(\"Cancel\");\n cancelButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cancelButtonActionPerformed(evt);\n }\n });\n\n innerRadiusLabel.setText(\"Inner Radius:\");\n\n widthLabel.setText(\"Width:\");\n\n widthSpinner.setModel(new javax.swing.SpinnerNumberModel(Float.valueOf(5.0f), null, null, Float.valueOf(0.5f)));\n widthSpinner.setValue(config.getWidth());\n\n pitchLabel.setText(\"Pitch:\");\n\n pitchSpinner.setModel(new javax.swing.SpinnerNumberModel(Float.valueOf(3.0f), null, null, Float.valueOf(0.5f)));\n pitchSpinner.setValue(config.getPitch());\n\n segmentsLabel.setText(\"Your settings result in \");\n\n innerRadiusSpinner.setModel(new javax.swing.SpinnerNumberModel(Float.valueOf(3.0f), null, null, Float.valueOf(0.5f)));\n innerRadiusSpinner.setValue(config.getInnerRadius());\n\n numSegmentsLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n numSegmentsLabel.setText(\"X\");\n\n numSegmentsLabel1.setText(\"segments of\");\n\n numSegmentsLabel2.setText(\"Y(units)\");\n\n numSegmentsLabel3.setText(\"and\");\n\n numSegmentsLabel4.setText(\"Z deg\");\n\n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(providersScrollPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 485, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(createLabel)\n .add(layout.createSequentialGroup()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)\n .add(scaleLabel)\n .add(titleLabel)\n .add(descriptionLabel)\n .add(startDateLabel)\n .add(innerRadiusLabel)\n .add(providersLabel))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(titleTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 135, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(layout.createSequentialGroup()\n .add(revolutionLabel)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(scaleSpinner, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 65, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(12, 12, 12)\n .add(granularitySpinner, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 83, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)\n .add(org.jdesktop.layout.GroupLayout.LEADING, descriptionScrollPane, 0, 0, Short.MAX_VALUE)\n .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()\n .add(startDateTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 81, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(endDateLabel)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(endDateTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))\n .add(layout.createSequentialGroup()\n .add(innerRadiusSpinner, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 65, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(widthLabel)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(widthSpinner, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 65, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(pitchLabel)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(pitchSpinner, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 65, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()\n .add(cancelButton)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(createButton))\n .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()\n .add(segmentsLabel)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(numSegmentsLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 25, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(numSegmentsLabel1)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(numSegmentsLabel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(numSegmentsLabel3)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(numSegmentsLabel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .add(layout.createSequentialGroup()\n .add(21, 21, 21)\n .add(addProviderButton)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(addKeywordButton)))\n .addContainerGap())\n );\n\n layout.linkSize(new java.awt.Component[] {endDateTextField, startDateTextField}, org.jdesktop.layout.GroupLayout.HORIZONTAL);\n\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .add(createLabel)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(titleLabel)\n .add(titleTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(descriptionLabel)\n .add(descriptionScrollPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 101, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(startDateLabel)\n .add(startDateTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(endDateLabel)\n .add(endDateTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.CENTER)\n .add(scaleSpinner, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(revolutionLabel)\n .add(scaleLabel)\n .add(granularitySpinner, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.CENTER)\n .add(innerRadiusLabel)\n .add(innerRadiusSpinner, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(widthLabel)\n .add(widthSpinner, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(pitchLabel)\n .add(pitchSpinner, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(segmentsLabel)\n .add(numSegmentsLabel)\n .add(numSegmentsLabel1)\n .add(numSegmentsLabel2)\n .add(numSegmentsLabel3)\n .add(numSegmentsLabel4))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(providersLabel)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(providersScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 83, Short.MAX_VALUE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(addKeywordButton)\n .add(addProviderButton))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(cancelButton)\n .add(createButton)))\n );\n }",
"@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel1();\n\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n dateTimePicker1 = new com.github.lgooddatepicker.components.DateTimePicker();\n jLabel1 = new javax.swing.JLabel();\n ID_txt = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n Name_txt = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n Phone = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n date1 = new com.toedter.calendar.JDateChooser();\n jButton1 = new javax.swing.JButton();\n doc = new javax.swing.JComboBox<>();\n jLabel5 = new javax.swing.JLabel();\n timePicker1 = new com.github.lgooddatepicker.components.TimePicker();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setText(\"ID\");\n jLabel1.setFont(new java.awt.Font(\"Gill Sans MT\", 0, 14)); // NOI18N\n\n jLabel2.setText(\"Name\");\n jLabel2.setFont(new java.awt.Font(\"Gill Sans MT\", 0, 14)); // NOI18N\n\n jLabel3.setText(\"Phone\");\n jLabel3.setFont(new java.awt.Font(\"Gill Sans MT\", 0, 14)); // NOI18N\n\n jLabel4.setText(\"Date\");\n jLabel4.setFont(new java.awt.Font(\"Gill Sans MT\", 0, 14)); // NOI18N\n\n jLabel6.setText(\"Doctor\");\n jLabel6.setFont(new java.awt.Font(\"Gill Sans MT\", 0, 14)); // NOI18N\n\n date1.setMinimumSize(new java.awt.Dimension(30, 20));\n\n jButton1.setText(\"Save\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n doc.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Ahmed\", \"Ola\", \"Ibrahim\", \"Talal\", \"Jason\" }));\n doc.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n docActionPerformed(evt);\n }\n });\n\n jLabel5.setText(\"Time\");\n jLabel5.setFont(new java.awt.Font(\"Gill Sans MT\", 0, 14)); // NOI18N\n\n timePicker1.setMinimumSize(new java.awt.Dimension(30, 20));\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(20, 20, 20)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel5)\n .addComponent(jLabel2)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addComponent(jLabel6))\n .addGap(31, 31, 31)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(doc, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(Name_txt)\n .addComponent(Phone)\n .addComponent(date1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(timePicker1, javax.swing.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(ID_txt))\n .addGap(25, 25, 25))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)\n .addComponent(jLabel1)\n .addComponent(ID_txt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)\n .addComponent(jLabel2)\n .addComponent(Name_txt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)\n .addComponent(jLabel3)\n .addComponent(Phone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)\n .addComponent(date1, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)\n .addComponent(jLabel5)\n .addComponent(timePicker1, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)\n .addComponent(jLabel6)\n .addComponent(doc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(21, 21, 21)\n .addComponent(jButton1)\n .addGap(18, 18, 18))\n );\n\n Phone.getAccessibleContext().setAccessibleDescription(\"\");\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n txtdate = new com.toedter.calendar.JDateChooser();\n txtproducto = new javax.swing.JTextField();\n txtcantidad = new javax.swing.JTextField();\n txtvalorU = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"Nombre producto:\");\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 50, -1, -1));\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"Cantidad:\");\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 100, -1, -1));\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setText(\"Valor Unitario:\");\n getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 150, -1, -1));\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setText(\"Fecha: \");\n getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 210, -1, -1));\n getContentPane().add(txtdate, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 210, 138, -1));\n\n txtproducto.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtproductoKeyTyped(evt);\n }\n });\n getContentPane().add(txtproducto, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 50, 138, -1));\n\n txtcantidad.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtcantidadActionPerformed(evt);\n }\n });\n txtcantidad.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtcantidadKeyTyped(evt);\n }\n });\n getContentPane().add(txtcantidad, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 100, 138, -1));\n\n txtvalorU.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtvalorUKeyTyped(evt);\n }\n });\n getContentPane().add(txtvalorU, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 150, 138, -1));\n\n jButton1.setBackground(new java.awt.Color(51, 51, 255));\n jButton1.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jButton1.setForeground(new java.awt.Color(255, 255, 255));\n jButton1.setText(\"Realizar Venta\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 260, -1, -1));\n\n jButton2.setBackground(new java.awt.Color(255, 0, 0));\n jButton2.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jButton2.setText(\"Cerrar\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(320, 10, -1, -1));\n\n jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/Fondo2.jpg\"))); // NOI18N\n jLabel5.setVerticalAlignment(javax.swing.SwingConstants.TOP);\n getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 400, 300));\n\n pack();\n }"
]
| [
"0.7469805",
"0.6652715",
"0.658292",
"0.64969695",
"0.6382831",
"0.62991303",
"0.6290511",
"0.6254122",
"0.6175409",
"0.6151388",
"0.61344963",
"0.6082784",
"0.60726535",
"0.6064971",
"0.6018821",
"0.5990078",
"0.59647804",
"0.5944946",
"0.59400594",
"0.59397787",
"0.5905688",
"0.59040016",
"0.5897711",
"0.589288",
"0.5878828",
"0.5878275",
"0.5875968",
"0.5865914",
"0.58624965",
"0.5859929",
"0.58576536",
"0.58480597",
"0.5848001",
"0.5839286",
"0.5838188",
"0.58347285",
"0.5833054",
"0.58188736",
"0.5816454",
"0.580491",
"0.5804282",
"0.5801286",
"0.5794684",
"0.5780973",
"0.57672143",
"0.5765822",
"0.5765788",
"0.5761828",
"0.5761154",
"0.576003",
"0.57549703",
"0.5754656",
"0.57515234",
"0.57477397",
"0.5743748",
"0.5742973",
"0.57417333",
"0.5735953",
"0.5732079",
"0.57186395",
"0.570733",
"0.57050616",
"0.57003915",
"0.56926847",
"0.5688438",
"0.5684632",
"0.56844217",
"0.5678534",
"0.56582856",
"0.56568867",
"0.56568867",
"0.56568867",
"0.56568867",
"0.56568867",
"0.56558025",
"0.56538534",
"0.564709",
"0.56387854",
"0.5634651",
"0.5624866",
"0.56196976",
"0.56196797",
"0.56132734",
"0.5612357",
"0.5612354",
"0.56117964",
"0.5610824",
"0.56104445",
"0.5608989",
"0.56062114",
"0.56045544",
"0.5603892",
"0.5598082",
"0.5597201",
"0.5591754",
"0.55897224",
"0.5583206",
"0.5580932",
"0.5580797",
"0.55783266",
"0.55780613"
]
| 0.0 | -1 |
GWT.log("addImage " + href); | protected Image addImage(String href, Panel hp, String stylename, Hyperlink hyperlink) {
if (href == null) {
return null;
}
if (href.equals("")) {
return null;
}
final Image image = new Image();
image.setUrl(mywebapp.getUrl(href));
addImage(image, hp, stylename, hyperlink);
return image;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void galleryAddPic() {\n\t}",
"@Override\n public String getImageLink() {\n return imageLink;\n }",
"Builder addImage(URL value);",
"abstract public String imageUrl ();",
"PreViewPopUpPage clickImageLink();",
"@UiHandler(\"addObservatoryImage\")\r\n\tvoid onAddObservatoryImageClicked(ClickEvent event) {\r\n\t\tpresenter.goToCreateObservatoryActivity();\r\n\r\n\t}",
"protected Image addImageOrig(String href, Panel hp, String stylename) {\n if (href == null) {\n return null;\n }\n if (href.equals(\"\")) {\n return null;\n }\n final Image image = new Image();\n //image.addStyleName(\"scaleme\");\n image.setUrl(mywebapp.getUrl(href));\n addImageOrig(image, hp, stylename);\n return image;\n }",
"Builder addImage(ImageObject value);",
"public void setImageName(String name) {\n imageToInsert = name;\n}",
"public void onClick(ClickEvent event) {\n // sendNameToServer();\n Camera c = Camera.getCamera();\n if (!Camera.isSupported()) {\n GWT.log(\"Camera not supported!\");\n return;\n }\n c.getPictureFromCamera(new CameraCallback() {\n public void onSuccess(String picture) {\n GWT.log(\"picture=\" + picture);\n pictureDataHidden.setValue(picture);\n image.setUrl(\"data:image/jpeg;base64,\" + picture);\n }\n\n public void onFailure(String error) {\n GWT.log(\"getPictureFromCamera\" + error);\n }\n });\n }",
"private void addImg(File url) {\n if (url != null) {\n //On charge l'image en memoire dans la variable img\n panImg.chargerIMG(url);\n lstImg.addImg(panImg.getImg(), url);\n }\n }",
"public String getImageUrl();",
"public Image getImage(URL paramURL) {\n/* 276 */ return getAppletContext().getImage(paramURL);\n/* */ }",
"public void saveImage(){\n new Thread() {\n public void run() {\n String image_url = stuffRoomInfo.getStuffLink();\n Log.i(\"OGT\", \"image_url:in showImage \" + image_url);\n getOGTag(image_url);\n // Display a png image from the specified file\n ImageUrlSendServer();\n }\n }.start();\n }",
"String uploadProfileImage(String fileNameWithOutRepository,String fileName) throws GwtException, ServerDownException;",
"public void onClick(ClickEvent event) {\n Camera c = Camera.getCamera();\n if (!Camera.isSupported()) {\n GWT.log(\"Camera not supported!\");\n return;\n }\n c.getPictureFromLibrary(new CameraCallback() {\n public void onSuccess(String picture) {\n GWT.log(\"picture=\" + picture);\n pictureDataHidden.setValue(picture);\n image.setUrl(\"data:image/jpeg;base64,\" + picture);\n }\n\n public void onFailure(String error) {\n GWT.log(\"getPictureFromCamera\" + error);\n }\n });\n }",
"private void showImageDetail() {\n }",
"private RoundImage img(String imgAddress) {\n return new RoundImage(\"frontend/src/images/books.png\",\"64px\",\"64px\");\n }",
"@Override\n\tpublic String addImage(String imageFileName) throws Exception {\n\t\treturn null;\n\t}",
"private void addButtonActionPerformed() {//GEN-FIRST:event_addButtonActionPerformed\r\n this.controller.OnAddPhoto();\r\n }",
"Person addImage(String name, String imagePath);",
"ElementImage createElementImage();",
"public homegallery(String image_url)\n {\n this.image_url=image_url;\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();",
"@Override\n public void setImageLink(String imageLink) {\n this.imageLink = imageLink;\n }",
"Builder addImage(String value);",
"Builder addImage(ImageObject.Builder value);",
"public void setImage(Image itemImg) \n {\n img = itemImg;\n }",
"public static void menu_viewimageinbrowser(ActionContext actionContext){\n Thing currentThing = actionContext.getObject(\"currentThing\");\n \n String url = XWorkerUtils.getWebUrl() + \"do?sc=xworker.ide.worldexplorer.swt.http.SwtImage\";\n url = url + \"&control=\" + currentThing.getMetadata().getPath();\n \n XWorkerUtils.ideOpenUrl(url); \n }",
"@Override\n\tpublic String getImageURL() {\n\t\treturn \"\";\n\t}",
"@Override\n public void renderNextImage() {\n }",
"String getImage();",
"public void addToImages(final GPImageLinkComponent value)\n\t{\n\t\taddToImages( getSession().getSessionContext(), value );\n\t}",
"java.lang.String getImage();",
"public native final String SRC_ADD() /*-{\n\t\treturn this.SRC_ADD;\n\t}-*/;",
"public String getURL() {\n\t\treturn RequestConstants.BASE_IMAGE_URL+_url;\n\t}",
"public String getImageURl(){\r\n\t\treturn this.lePanel.chEventImage;\r\n\t}",
"public void addImageField(int index, String uriString) {\n Context context = App.getContext();\n //inflater needed to \"inflate\" layouts\n LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n //instantiate our data object.\n ElementImageField elementImageField = new ElementImageField(uriString);\n //insert element data object in slot on page\n if (isLoading){\n currentPage.addElement(elementImageField);\n }else{\n currentPage.insertElement(index, elementImageField);\n }\n //get new view (our xml fragment -the text field) and add it to current view\n View newView = inflater.inflate(R.layout.image_field, null);\n linearLayoutBody.addView(newView, index);\n //set tag\n String tag = (\"camera \" + cameraID);\n newView.setTag(tag);\n LogManager.reportStatus(context, \"INSPECTOR\", \"cameraID = \" + newView.getTag().toString());\n cameraID = cameraID + 1; //for next camera\n //set listener\n imageButton = newView.findViewById(R.id.camera_button);\n //set image if we have one defined\n if (uriString != \"\"){\n Uri uri = Uri.parse(uriString);\n LogManager.reportStatus(context, \"INSPECTOR\", \"parsingImageUri = \" + uriString);\n try{\n InputStream inputStream = this.getContentResolver().openInputStream(uri);\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inSampleSize = 4;\n Bitmap preview_bitmap = BitmapFactory.decodeStream(inputStream,null,options);\n Drawable image = new BitmapDrawable(getResources(),preview_bitmap);\n imageButton.setBackground(image);\n LogManager.reportStatus(context, \"INSPECTOR\", \"imageSet\");\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n LogManager.reportStatus(context, \"INSPECTOR\", \"imageNotFound\");\n }\n }else{\n LogManager.reportStatus(context, \"INSPECTOR\", \"imageUriStringIsEmpty\");\n }\n LogManager.reportStatus(context, \"INSPECTOR\", \"onAddImageField\");\n }",
"public void addImage(Image img, int x, int y) {\n\n\t}",
"public String getStaticPicture();",
"void setImage(String image);",
"public void displayImage() {\n RealImage real = new RealImage(url);\n real.displayImage();\n }",
"@When(\"^user clicks on image tab$\")\n\tpublic void user_clicks_on_image_tab() throws Throwable {\n\t\thomepage.waitForPageToLoad(\"Google Images\");\n\t\thomepage.waitForElementToBeClickable(homepage.imagesButton);\n\t\thomepage.clickOnElementUsingJs(homepage.imagesButton);\n\t}",
"public void setImage(String image){\n this.image = image;\n }",
"public String getImage() { return image; }",
"@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\twebView.loadUrl(Uri.fromFile(new File(fileImg)).toString());\n\n\t\t\t\t\t\t\t\t\t\t\t}",
"public abstract Image getImage();",
"public abstract Image getImage();",
"void onAddAttachments();",
"@Override\r\n\tpublic void getUrl() {\n\r\n\t}",
"@Override\n \n \n public void initialize(URL url, ResourceBundle rb) {\n retornararImg();\n\n }",
"Builder addThumbnailUrl(URL value);",
"@Override\n public void onSuccess(Uri uri) {\n item.setImage(uri.toString());\n }",
"public void onImageRendered (RenderedImage renderedImage);",
"void seTubeUpImage(String image);",
"public void enterImageURL(String value) {\r\n\r\n\t\treportStep(\"About to enter the Image URL \" + value, \"INFO\");\r\n\r\n\t\tif(enterTextInChrome(appImageURL,value)) {\r\n\t\t\t\r\n\t\t\treportStep(\"Successfully entered the Image URL \" + value, \"PASS\");\r\n\r\n\t\t}else {\r\n\r\n\t\t\treportStep(\"Failed to enter the Image URL \" + value, \"FAIL\");\r\n\t\t}\r\n\t}",
"@Override\n public void onClick(View view) {\n\n photoStorage.addImage(currentLabel, currentVisibleImagePath);\n addImage.setEnabled(false);\n }",
"public static String _imgpupas_click() throws Exception{\nreturn \"\";\n}",
"String getItemImage();",
"private void addImage(ImageRegistry reg, String imagePath) {\n \n final Bundle bundle = Platform.getBundle(ID);\n \n final Path attachImgPath = new Path(imagePath);\n final ImageDescriptor attachImg = ImageDescriptor.createFromURL(\n FileLocator.find(bundle, attachImgPath, null));\n reg.put(imagePath, attachImg);\n \n }",
"public interface CommonClientBundle extends ClientBundle {\n public static final CommonClientBundle INSTANCE = GWT.create(CommonClientBundle.class);\n\n @Source(\"sign.png\")\n ImageResource sign();\n\n @Source(\"woodburry.png\")\n ImageResource logo();\n}",
"@Test\r\n public void testCreateImageUrl() throws MovieDbException {\r\n LOG.info(\"createImageUrl\");\r\n MovieDb movie = tmdb.getMovieInfo(ID_MOVIE_BLADE_RUNNER, \"\");\r\n String result = tmdb.createImageUrl(movie.getPosterPath(), \"original\").toString();\r\n assertTrue(\"Error compiling image URL\", !result.isEmpty());\r\n }",
"public void setImgUrl(String imgUrl) {\r\n this.imgUrl = imgUrl;\r\n }",
"@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t\t{\n\t\t\t\t\tpath = getLinkOfFoto();\n\t\t\t\t\tif(path.equals(\"\"))\n\t\t\t\t\t\treturn;\n\t\t\t\t\tactualCat.addFoto(path,actualCat.pathToImage(path));\n\t\t\t\t\tredraw(actualCat, panel);\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n protected String getRequestedImage(HttpServletRequest req) {\n\treturn null;\n }",
"static public void addImage(AppImage image) {\n boolean already_exists = false;\n for (AppImage cached_image : images) {\n String reposited_path = cached_image.file.getAbsolutePath();\n String image_path = image.file.getAbsolutePath();\n if (reposited_path.equals(image_path)) {\n already_exists = true;\n }\n }\n if (!already_exists) images.add(0, image);\n }",
"public int addPicture(byte[] arg0, int arg1) {\n\t\treturn 0;\n\t}",
"private void drawImage(Graphics g) {\n ProxyModel proxyModel = ProxyModel.instance();\n ClassLoader cl = this.getClass().getClassLoader();\n Graphics2D g2d = (Graphics2D) g;\n InputStream url = cl.getResourceAsStream(\"title.png\");\n BufferedImage img = null;\n\n try {\n img = ImageIO.read(url);\n } catch (IOException e) {\n e.printStackTrace();\n return;\n }\n\n Font font = new Font(\"Serif\", Font.PLAIN, 24);\n g2d.drawImage(img, 0, 0, 600, 600, null);\n g2d.setColor(new Color(20, 20, 20));\n g2d.setFont(font);\n g2d.drawString(\"SANTORINI BOARD GAME GUI SIMULATION\", 15, 640);\n\n /*\n g2d.drawImage(img, 0, 0, 600, 600, null);\n JTextField textField = new JTextField(\"Nickname\",20);\n textField.setFont(font);\n this.add(textField);\n\n */\n\n }",
"public synchronized void addNewImage(BufferedImage img, File file) {\r\n\t\tint image_pk = db.insertImage(file.getName(), file.getAbsolutePath(), DEFAULT_TAG_PK);\r\n\t\tSaveImageOnDisk saveImage = new SaveImageOnDisk(img, file, db.getCacheName(image_pk)); \r\n\t\tsaveImage.start();\r\n\t}",
"protected static Entry.Builder addImage(final Entry.Builder entry,\n final String url,\n final String protocol) {\n return addImage(entry, image(url, protocol));\n }",
"@Override\n\tpublic void onClick(ClickEvent event) {\n\t\tImage image=(Image)event.getSource();\n\t\tif (image.getAltText().equals(\"nonotice\")) {\n\t\t\timage.setUrl(\"images/notice.jpg\");\n\t\t\timage.setAltText(\"notice\");\n\t\t} else {\n\t\t\timage.setUrl(\"images/nonotice.jpg\");\n\t\t\timage.setAltText(\"nonotice\");\n\t\t}\n\t\treadFeed();\n\t}",
"public void setImage(String _image)\n {\n this.image = _image;\n }",
"public void Draw() {\n\t\timgIcon = new ImageIcon(imgUrl);\n\t}",
"public void addToImages(final SessionContext ctx, final GPImageLinkComponent value)\n\t{\n\t\taddLinkedItems( \n\t\t\tctx,\n\t\t\ttrue,\n\t\t\tGpcommonaddonConstants.Relations.BRANDBAR2GPIMAGELINKRELATION,\n\t\t\tnull,\n\t\t\tCollections.singletonList(value),\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tUtilities.getMarkModifiedOverride(BRANDBAR2GPIMAGELINKRELATION_MARKMODIFIED)\n\t\t);\n\t}",
"public void saveImage(Book link) {\r\n\t\tURL url;\r\n\t\ttry {\r\n\t\t\tString workingDirectory = \"C:\\\\AppServ\\\\www\\\\pictures\\\\\";\r\n\t\t\turl = new URL(link.imgLink);\r\n\t\t\tBufferedImage img = ImageIO.read(url);\r\n\t\t\tString file = url.getPath();\r\n\t\t\tfile = file.substring(file.lastIndexOf(\"/\")+1, file.length());\r\n\t\t\tFile imgFile = new File(workingDirectory + file);\r\n\t\t\tString extension = file.substring(file.lastIndexOf(\".\")+1, file.length());\r\n\t\t\t//file = link.ISBN13;\r\n\t\t\tImageIO.write(img, extension, imgFile);\r\n\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\n\tpublic final native String getURL() /*-{\n return this.URL;\n\t}-*/;",
"public void onGallery();",
"public void addPicture(String picture)\r\n {\r\n pictures.add(picture);\r\n }",
"public void mo38841a(ImagesRequest imagesRequest) {\n }",
"public String setImageLoader(ArrayList<String> link, int rando) {\n\t\tArrayList<String> newLink = link;\n\t\timgs = newLink.get(rando);\n\t\timg = new Image(imgs);\n\t\timgView.setImage(img);\n\t\treturn imgs;\n\t\t//imgView.setPreserveRatio(true);\n\t\t//imgView.setFitHeight(100);\n\t\t//imgView.setFitWidth(100);\n\t\t//this.getChildren().addAll(picBox,imgView);\t\n\t}",
"private static native void getPageImage(Bitmap bitmap);",
"@Override\r\n public Object createImage(Object data) {\r\n\t // N/A in JS\r\n\t return null;\r\n\t}",
"@OnClick(R.id.add_photo_layout)\n public void onClickAddPhoto() {\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n intent.setType(\"image/*\");\n startActivityForResult(Intent.createChooser(intent, getString(R.string.choose_image_from)), 8);\n }",
"@Override\n public void run() {\n Bitmap bmp = getURLimage(imageUrl);\n Message msg = new Message();\n msg.what = 0;\n msg.obj = bmp;\n handle.sendMessage(msg);\n }",
"@Override\n\tString getImageUrl() throws SmsException {\n\t\treturn \"http://tele2.ru/controls/ImageCode.aspx\";\n\t}",
"public downloadImageServlet() {\n\t\tsuper();\n\t}",
"public String getThumbnailUrl();",
"int insert(SysPic record);",
"public void displayImageToConsole();",
"@Override\n public void onSuccess() {\n btn_addPhoto.setText(\"Change Photo\");\n }",
"void seTubeDownImage(String image);",
"public void setImgurl(String imgurl) {\n this.imgurl = imgurl;\n }",
"private void enhanceImage(){\n }",
"public String getImgurl() {\n return imgurl;\n }",
"public void addImage(String spid, Image image) throws EVDBRuntimeException, EVDBAPIException {\n\t\t\n\t\tsuper.addImage(PERFORMERS_IMAGES_ADD, spid, image);\n\t}",
"@Override\n\tpublic void onRxImage(String name, ImageMessage image) {\n\t\t\n\t}",
"public String getImageURL() \r\n\t{\r\n\t\t\r\n\t\treturn imageURL;\r\n\t\t\r\n\t}",
"@Test\n public void testSetImageLink() {\n System.out.println(\"setImageLink\");\n user.setImageLink(\"Img_Mau\");\n assertEquals(\"Img_Mau\", user.getImageLink());\n }",
"public String getImg(){\n return img;\n }",
"String getImagePath();"
]
| [
"0.6662063",
"0.6546414",
"0.6493572",
"0.64129883",
"0.6172864",
"0.60072464",
"0.5909925",
"0.5903753",
"0.5890694",
"0.58883476",
"0.5866718",
"0.5863238",
"0.5862707",
"0.5819516",
"0.5780356",
"0.5759927",
"0.5735298",
"0.5729663",
"0.57279044",
"0.5723052",
"0.5714264",
"0.5684094",
"0.5664875",
"0.56646913",
"0.5658365",
"0.56550866",
"0.56379336",
"0.5615412",
"0.56060326",
"0.5600754",
"0.55899775",
"0.55833006",
"0.5565877",
"0.55523926",
"0.55502826",
"0.5523891",
"0.55223674",
"0.5496099",
"0.54841185",
"0.54772216",
"0.5468007",
"0.5466188",
"0.5459347",
"0.5447863",
"0.54469705",
"0.5437272",
"0.5436971",
"0.5436971",
"0.542148",
"0.54190195",
"0.5415877",
"0.54158413",
"0.54121006",
"0.540959",
"0.5398825",
"0.5395014",
"0.53897256",
"0.5387976",
"0.538612",
"0.5383556",
"0.53742725",
"0.5365446",
"0.5350577",
"0.5348675",
"0.5337295",
"0.5327297",
"0.5327165",
"0.53138727",
"0.5310583",
"0.53066003",
"0.5296511",
"0.52904344",
"0.5289319",
"0.5276091",
"0.52709675",
"0.52648515",
"0.5258284",
"0.52571756",
"0.52554333",
"0.5253238",
"0.52431893",
"0.5242754",
"0.52413625",
"0.5238528",
"0.52359205",
"0.523414",
"0.5232958",
"0.5230622",
"0.52304107",
"0.52273905",
"0.52213776",
"0.5221184",
"0.5218524",
"0.5215444",
"0.5214286",
"0.52142304",
"0.521369",
"0.5209816",
"0.52036333",
"0.52018505"
]
| 0.6620016 | 1 |
GWT.log("addImage " + href); | protected Image addImageOrig(String href, Panel hp, String stylename) {
if (href == null) {
return null;
}
if (href.equals("")) {
return null;
}
final Image image = new Image();
//image.addStyleName("scaleme");
image.setUrl(mywebapp.getUrl(href));
addImageOrig(image, hp, stylename);
return image;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void galleryAddPic() {\n\t}",
"protected Image addImage(String href, Panel hp, String stylename, Hyperlink hyperlink) {\n if (href == null) {\n return null;\n }\n if (href.equals(\"\")) {\n return null;\n }\n final Image image = new Image();\n image.setUrl(mywebapp.getUrl(href));\n addImage(image, hp, stylename, hyperlink);\n return image;\n }",
"@Override\n public String getImageLink() {\n return imageLink;\n }",
"Builder addImage(URL value);",
"abstract public String imageUrl ();",
"PreViewPopUpPage clickImageLink();",
"@UiHandler(\"addObservatoryImage\")\r\n\tvoid onAddObservatoryImageClicked(ClickEvent event) {\r\n\t\tpresenter.goToCreateObservatoryActivity();\r\n\r\n\t}",
"Builder addImage(ImageObject value);",
"public void setImageName(String name) {\n imageToInsert = name;\n}",
"public void onClick(ClickEvent event) {\n // sendNameToServer();\n Camera c = Camera.getCamera();\n if (!Camera.isSupported()) {\n GWT.log(\"Camera not supported!\");\n return;\n }\n c.getPictureFromCamera(new CameraCallback() {\n public void onSuccess(String picture) {\n GWT.log(\"picture=\" + picture);\n pictureDataHidden.setValue(picture);\n image.setUrl(\"data:image/jpeg;base64,\" + picture);\n }\n\n public void onFailure(String error) {\n GWT.log(\"getPictureFromCamera\" + error);\n }\n });\n }",
"private void addImg(File url) {\n if (url != null) {\n //On charge l'image en memoire dans la variable img\n panImg.chargerIMG(url);\n lstImg.addImg(panImg.getImg(), url);\n }\n }",
"public Image getImage(URL paramURL) {\n/* 276 */ return getAppletContext().getImage(paramURL);\n/* */ }",
"public String getImageUrl();",
"public void saveImage(){\n new Thread() {\n public void run() {\n String image_url = stuffRoomInfo.getStuffLink();\n Log.i(\"OGT\", \"image_url:in showImage \" + image_url);\n getOGTag(image_url);\n // Display a png image from the specified file\n ImageUrlSendServer();\n }\n }.start();\n }",
"String uploadProfileImage(String fileNameWithOutRepository,String fileName) throws GwtException, ServerDownException;",
"public void onClick(ClickEvent event) {\n Camera c = Camera.getCamera();\n if (!Camera.isSupported()) {\n GWT.log(\"Camera not supported!\");\n return;\n }\n c.getPictureFromLibrary(new CameraCallback() {\n public void onSuccess(String picture) {\n GWT.log(\"picture=\" + picture);\n pictureDataHidden.setValue(picture);\n image.setUrl(\"data:image/jpeg;base64,\" + picture);\n }\n\n public void onFailure(String error) {\n GWT.log(\"getPictureFromCamera\" + error);\n }\n });\n }",
"private void showImageDetail() {\n }",
"private RoundImage img(String imgAddress) {\n return new RoundImage(\"frontend/src/images/books.png\",\"64px\",\"64px\");\n }",
"@Override\n\tpublic String addImage(String imageFileName) throws Exception {\n\t\treturn null;\n\t}",
"private void addButtonActionPerformed() {//GEN-FIRST:event_addButtonActionPerformed\r\n this.controller.OnAddPhoto();\r\n }",
"Person addImage(String name, String imagePath);",
"ElementImage createElementImage();",
"public homegallery(String image_url)\n {\n this.image_url=image_url;\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();",
"@Override\n public void setImageLink(String imageLink) {\n this.imageLink = imageLink;\n }",
"Builder addImage(String value);",
"Builder addImage(ImageObject.Builder value);",
"public void setImage(Image itemImg) \n {\n img = itemImg;\n }",
"public static void menu_viewimageinbrowser(ActionContext actionContext){\n Thing currentThing = actionContext.getObject(\"currentThing\");\n \n String url = XWorkerUtils.getWebUrl() + \"do?sc=xworker.ide.worldexplorer.swt.http.SwtImage\";\n url = url + \"&control=\" + currentThing.getMetadata().getPath();\n \n XWorkerUtils.ideOpenUrl(url); \n }",
"@Override\n\tpublic String getImageURL() {\n\t\treturn \"\";\n\t}",
"@Override\n public void renderNextImage() {\n }",
"String getImage();",
"public void addToImages(final GPImageLinkComponent value)\n\t{\n\t\taddToImages( getSession().getSessionContext(), value );\n\t}",
"java.lang.String getImage();",
"public native final String SRC_ADD() /*-{\n\t\treturn this.SRC_ADD;\n\t}-*/;",
"public String getURL() {\n\t\treturn RequestConstants.BASE_IMAGE_URL+_url;\n\t}",
"public String getImageURl(){\r\n\t\treturn this.lePanel.chEventImage;\r\n\t}",
"public void addImageField(int index, String uriString) {\n Context context = App.getContext();\n //inflater needed to \"inflate\" layouts\n LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n //instantiate our data object.\n ElementImageField elementImageField = new ElementImageField(uriString);\n //insert element data object in slot on page\n if (isLoading){\n currentPage.addElement(elementImageField);\n }else{\n currentPage.insertElement(index, elementImageField);\n }\n //get new view (our xml fragment -the text field) and add it to current view\n View newView = inflater.inflate(R.layout.image_field, null);\n linearLayoutBody.addView(newView, index);\n //set tag\n String tag = (\"camera \" + cameraID);\n newView.setTag(tag);\n LogManager.reportStatus(context, \"INSPECTOR\", \"cameraID = \" + newView.getTag().toString());\n cameraID = cameraID + 1; //for next camera\n //set listener\n imageButton = newView.findViewById(R.id.camera_button);\n //set image if we have one defined\n if (uriString != \"\"){\n Uri uri = Uri.parse(uriString);\n LogManager.reportStatus(context, \"INSPECTOR\", \"parsingImageUri = \" + uriString);\n try{\n InputStream inputStream = this.getContentResolver().openInputStream(uri);\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inSampleSize = 4;\n Bitmap preview_bitmap = BitmapFactory.decodeStream(inputStream,null,options);\n Drawable image = new BitmapDrawable(getResources(),preview_bitmap);\n imageButton.setBackground(image);\n LogManager.reportStatus(context, \"INSPECTOR\", \"imageSet\");\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n LogManager.reportStatus(context, \"INSPECTOR\", \"imageNotFound\");\n }\n }else{\n LogManager.reportStatus(context, \"INSPECTOR\", \"imageUriStringIsEmpty\");\n }\n LogManager.reportStatus(context, \"INSPECTOR\", \"onAddImageField\");\n }",
"public void addImage(Image img, int x, int y) {\n\n\t}",
"public String getStaticPicture();",
"void setImage(String image);",
"public void displayImage() {\n RealImage real = new RealImage(url);\n real.displayImage();\n }",
"@When(\"^user clicks on image tab$\")\n\tpublic void user_clicks_on_image_tab() throws Throwable {\n\t\thomepage.waitForPageToLoad(\"Google Images\");\n\t\thomepage.waitForElementToBeClickable(homepage.imagesButton);\n\t\thomepage.clickOnElementUsingJs(homepage.imagesButton);\n\t}",
"public String getImage() { return image; }",
"public void setImage(String image){\n this.image = image;\n }",
"@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\twebView.loadUrl(Uri.fromFile(new File(fileImg)).toString());\n\n\t\t\t\t\t\t\t\t\t\t\t}",
"public abstract Image getImage();",
"public abstract Image getImage();",
"@Override\r\n\tpublic void getUrl() {\n\r\n\t}",
"void onAddAttachments();",
"@Override\n \n \n public void initialize(URL url, ResourceBundle rb) {\n retornararImg();\n\n }",
"Builder addThumbnailUrl(URL value);",
"@Override\n public void onSuccess(Uri uri) {\n item.setImage(uri.toString());\n }",
"public void onImageRendered (RenderedImage renderedImage);",
"void seTubeUpImage(String image);",
"public void enterImageURL(String value) {\r\n\r\n\t\treportStep(\"About to enter the Image URL \" + value, \"INFO\");\r\n\r\n\t\tif(enterTextInChrome(appImageURL,value)) {\r\n\t\t\t\r\n\t\t\treportStep(\"Successfully entered the Image URL \" + value, \"PASS\");\r\n\r\n\t\t}else {\r\n\r\n\t\t\treportStep(\"Failed to enter the Image URL \" + value, \"FAIL\");\r\n\t\t}\r\n\t}",
"@Override\n public void onClick(View view) {\n\n photoStorage.addImage(currentLabel, currentVisibleImagePath);\n addImage.setEnabled(false);\n }",
"public static String _imgpupas_click() throws Exception{\nreturn \"\";\n}",
"String getItemImage();",
"private void addImage(ImageRegistry reg, String imagePath) {\n \n final Bundle bundle = Platform.getBundle(ID);\n \n final Path attachImgPath = new Path(imagePath);\n final ImageDescriptor attachImg = ImageDescriptor.createFromURL(\n FileLocator.find(bundle, attachImgPath, null));\n reg.put(imagePath, attachImg);\n \n }",
"public interface CommonClientBundle extends ClientBundle {\n public static final CommonClientBundle INSTANCE = GWT.create(CommonClientBundle.class);\n\n @Source(\"sign.png\")\n ImageResource sign();\n\n @Source(\"woodburry.png\")\n ImageResource logo();\n}",
"@Test\r\n public void testCreateImageUrl() throws MovieDbException {\r\n LOG.info(\"createImageUrl\");\r\n MovieDb movie = tmdb.getMovieInfo(ID_MOVIE_BLADE_RUNNER, \"\");\r\n String result = tmdb.createImageUrl(movie.getPosterPath(), \"original\").toString();\r\n assertTrue(\"Error compiling image URL\", !result.isEmpty());\r\n }",
"public void setImgUrl(String imgUrl) {\r\n this.imgUrl = imgUrl;\r\n }",
"@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t\t{\n\t\t\t\t\tpath = getLinkOfFoto();\n\t\t\t\t\tif(path.equals(\"\"))\n\t\t\t\t\t\treturn;\n\t\t\t\t\tactualCat.addFoto(path,actualCat.pathToImage(path));\n\t\t\t\t\tredraw(actualCat, panel);\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n protected String getRequestedImage(HttpServletRequest req) {\n\treturn null;\n }",
"public int addPicture(byte[] arg0, int arg1) {\n\t\treturn 0;\n\t}",
"static public void addImage(AppImage image) {\n boolean already_exists = false;\n for (AppImage cached_image : images) {\n String reposited_path = cached_image.file.getAbsolutePath();\n String image_path = image.file.getAbsolutePath();\n if (reposited_path.equals(image_path)) {\n already_exists = true;\n }\n }\n if (!already_exists) images.add(0, image);\n }",
"private void drawImage(Graphics g) {\n ProxyModel proxyModel = ProxyModel.instance();\n ClassLoader cl = this.getClass().getClassLoader();\n Graphics2D g2d = (Graphics2D) g;\n InputStream url = cl.getResourceAsStream(\"title.png\");\n BufferedImage img = null;\n\n try {\n img = ImageIO.read(url);\n } catch (IOException e) {\n e.printStackTrace();\n return;\n }\n\n Font font = new Font(\"Serif\", Font.PLAIN, 24);\n g2d.drawImage(img, 0, 0, 600, 600, null);\n g2d.setColor(new Color(20, 20, 20));\n g2d.setFont(font);\n g2d.drawString(\"SANTORINI BOARD GAME GUI SIMULATION\", 15, 640);\n\n /*\n g2d.drawImage(img, 0, 0, 600, 600, null);\n JTextField textField = new JTextField(\"Nickname\",20);\n textField.setFont(font);\n this.add(textField);\n\n */\n\n }",
"public synchronized void addNewImage(BufferedImage img, File file) {\r\n\t\tint image_pk = db.insertImage(file.getName(), file.getAbsolutePath(), DEFAULT_TAG_PK);\r\n\t\tSaveImageOnDisk saveImage = new SaveImageOnDisk(img, file, db.getCacheName(image_pk)); \r\n\t\tsaveImage.start();\r\n\t}",
"protected static Entry.Builder addImage(final Entry.Builder entry,\n final String url,\n final String protocol) {\n return addImage(entry, image(url, protocol));\n }",
"@Override\n\tpublic void onClick(ClickEvent event) {\n\t\tImage image=(Image)event.getSource();\n\t\tif (image.getAltText().equals(\"nonotice\")) {\n\t\t\timage.setUrl(\"images/notice.jpg\");\n\t\t\timage.setAltText(\"notice\");\n\t\t} else {\n\t\t\timage.setUrl(\"images/nonotice.jpg\");\n\t\t\timage.setAltText(\"nonotice\");\n\t\t}\n\t\treadFeed();\n\t}",
"public void Draw() {\n\t\timgIcon = new ImageIcon(imgUrl);\n\t}",
"public void setImage(String _image)\n {\n this.image = _image;\n }",
"public void addToImages(final SessionContext ctx, final GPImageLinkComponent value)\n\t{\n\t\taddLinkedItems( \n\t\t\tctx,\n\t\t\ttrue,\n\t\t\tGpcommonaddonConstants.Relations.BRANDBAR2GPIMAGELINKRELATION,\n\t\t\tnull,\n\t\t\tCollections.singletonList(value),\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tUtilities.getMarkModifiedOverride(BRANDBAR2GPIMAGELINKRELATION_MARKMODIFIED)\n\t\t);\n\t}",
"public void saveImage(Book link) {\r\n\t\tURL url;\r\n\t\ttry {\r\n\t\t\tString workingDirectory = \"C:\\\\AppServ\\\\www\\\\pictures\\\\\";\r\n\t\t\turl = new URL(link.imgLink);\r\n\t\t\tBufferedImage img = ImageIO.read(url);\r\n\t\t\tString file = url.getPath();\r\n\t\t\tfile = file.substring(file.lastIndexOf(\"/\")+1, file.length());\r\n\t\t\tFile imgFile = new File(workingDirectory + file);\r\n\t\t\tString extension = file.substring(file.lastIndexOf(\".\")+1, file.length());\r\n\t\t\t//file = link.ISBN13;\r\n\t\t\tImageIO.write(img, extension, imgFile);\r\n\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\n\tpublic final native String getURL() /*-{\n return this.URL;\n\t}-*/;",
"public void onGallery();",
"public void addPicture(String picture)\r\n {\r\n pictures.add(picture);\r\n }",
"public void mo38841a(ImagesRequest imagesRequest) {\n }",
"public String setImageLoader(ArrayList<String> link, int rando) {\n\t\tArrayList<String> newLink = link;\n\t\timgs = newLink.get(rando);\n\t\timg = new Image(imgs);\n\t\timgView.setImage(img);\n\t\treturn imgs;\n\t\t//imgView.setPreserveRatio(true);\n\t\t//imgView.setFitHeight(100);\n\t\t//imgView.setFitWidth(100);\n\t\t//this.getChildren().addAll(picBox,imgView);\t\n\t}",
"private static native void getPageImage(Bitmap bitmap);",
"@Override\r\n public Object createImage(Object data) {\r\n\t // N/A in JS\r\n\t return null;\r\n\t}",
"@OnClick(R.id.add_photo_layout)\n public void onClickAddPhoto() {\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n intent.setType(\"image/*\");\n startActivityForResult(Intent.createChooser(intent, getString(R.string.choose_image_from)), 8);\n }",
"@Override\n public void run() {\n Bitmap bmp = getURLimage(imageUrl);\n Message msg = new Message();\n msg.what = 0;\n msg.obj = bmp;\n handle.sendMessage(msg);\n }",
"@Override\n\tString getImageUrl() throws SmsException {\n\t\treturn \"http://tele2.ru/controls/ImageCode.aspx\";\n\t}",
"public downloadImageServlet() {\n\t\tsuper();\n\t}",
"public String getThumbnailUrl();",
"int insert(SysPic record);",
"public void displayImageToConsole();",
"@Override\n public void onSuccess() {\n btn_addPhoto.setText(\"Change Photo\");\n }",
"public void setImgurl(String imgurl) {\n this.imgurl = imgurl;\n }",
"void seTubeDownImage(String image);",
"private void enhanceImage(){\n }",
"public String getImgurl() {\n return imgurl;\n }",
"public String getImageURL() \r\n\t{\r\n\t\t\r\n\t\treturn imageURL;\r\n\t\t\r\n\t}",
"@Override\n\tpublic void onRxImage(String name, ImageMessage image) {\n\t\t\n\t}",
"public void addImage(String spid, Image image) throws EVDBRuntimeException, EVDBAPIException {\n\t\t\n\t\tsuper.addImage(PERFORMERS_IMAGES_ADD, spid, image);\n\t}",
"@Test\n public void testSetImageLink() {\n System.out.println(\"setImageLink\");\n user.setImageLink(\"Img_Mau\");\n assertEquals(\"Img_Mau\", user.getImageLink());\n }",
"public String getImg(){\n return img;\n }",
"String getImagePath();"
]
| [
"0.6660569",
"0.6619277",
"0.65462184",
"0.64911443",
"0.64128417",
"0.61737394",
"0.6006426",
"0.5900794",
"0.58888596",
"0.5888132",
"0.5864657",
"0.58628076",
"0.58624375",
"0.5818146",
"0.577907",
"0.5759689",
"0.5734398",
"0.5729169",
"0.5724897",
"0.57221395",
"0.5711348",
"0.56830615",
"0.5664656",
"0.56642145",
"0.5657099",
"0.5652512",
"0.5635338",
"0.5614165",
"0.5606414",
"0.5600529",
"0.5589125",
"0.55822194",
"0.55636895",
"0.5551295",
"0.5549922",
"0.55242825",
"0.5522236",
"0.5495701",
"0.548032",
"0.54773736",
"0.5466019",
"0.54649776",
"0.5459299",
"0.5446013",
"0.54459894",
"0.543723",
"0.5435728",
"0.5435728",
"0.54206663",
"0.5420552",
"0.541682",
"0.54147923",
"0.5411352",
"0.54076725",
"0.53969324",
"0.53948534",
"0.53886986",
"0.5387866",
"0.53858846",
"0.5380806",
"0.5374544",
"0.5364177",
"0.53496015",
"0.5347958",
"0.53375846",
"0.53253317",
"0.53238857",
"0.5312986",
"0.53069067",
"0.5304751",
"0.5295991",
"0.52888316",
"0.5288572",
"0.52747244",
"0.5269951",
"0.52666855",
"0.5257973",
"0.5255206",
"0.52544886",
"0.52531546",
"0.52435553",
"0.5242554",
"0.5239886",
"0.5237713",
"0.5235472",
"0.52343434",
"0.52327764",
"0.5229794",
"0.5228804",
"0.52265614",
"0.52204764",
"0.5220355",
"0.5216555",
"0.5215364",
"0.52133965",
"0.5212408",
"0.52107584",
"0.5208876",
"0.5203038",
"0.5200939"
]
| 0.5909354 | 7 |
Created by Ocean Lin on 2018/10/11. | public interface SystemService {
/**
* 根据用户名获取User对象
*
* @param name 用户名
* @return 用户对象
*/
User findUserById(String name);
/**
* 是否存在User
*
* @param name 用户名
* @return 存在返回true
*/
boolean isUserByName(String name);
/**
* 是否存在User
*
* @param user 用户实体类
* @return 存在返回true
*/
boolean isUserByNameAndID(User user);
/**
* 添加User
*
* @param user 用户实体类
*/
void addUser(User user);
/**
* 是否存在Role
*
* @param rolename 角色名称
* @return 存在返回true
*/
boolean isRoleByName(String rolename);
/**
* 根据角色名称、角色主键判断是否存在
*
* @param roleDb 角色实体类
* @return 存在返回true
*/
boolean isRoleByNameAndRoleid(Role roleDb);
/**
* 添加Role
*
* @param role 剧社实体类
*/
void roleAdd(Role role);
/**
* 是否存在Model
*
* @param modelname 模块名称
* @return 存在返回true
*/
boolean isModelByName(String modelname);
/**
* 根据模块名称和模块主键查询
*
* @param modelDb 模块实体类
* @return 存在返回true
*/
boolean isModelByNameAndModelid(Model modelDb);
/**
* 添加Model
*
* @param model 模块实体类
*/
void modelAdd(Model model);
/**
* 通过主键查找User
*
* @param userId 用户主键
* @return User对象
*/
User findUserById(Integer userId);
/**
* 通过主键查找Role
*
* @param roleId 角色主键
* @return Role对象
*/
Role findRoleById(Integer roleId);
/**
* 通过主键查找Model
*
* @param modelId 模块主键
* @return Model对象
*/
Model findModelById(Integer modelId);
/**
* 删除用户
*
* @param userId 用户主键
*/
void userDelete(Integer userId);
/**
* 删除角色
*
* @param roleId 角色主键
*/
void roleDelete(Integer roleId);
/**
* 删除Model
*
* @param modelId 模块主键
*/
void modelDelete(Integer modelId);
/**
* 更新用户
*
* @param userDb 用户实体类
*/
void updateUser(User userDb);
/**
* 更新角色
*
* @param roleDb 角色实体类
*/
void updateRole(Role roleDb);
/**
* 更新model
*
* @param modelDb 模块实体类
*/
void updateModel(Model modelDb);
/**
* 用户列表
*
* @param user 用户实体类
* @param pageable 分页工具类
* @return 返回用户列表
*/
UserDto userList(User user, Pageable pageable);
/**
* 角色列表
*
* @param role 角色实体类
* @param pageable 分页工具类
* @return 角色列表
*/
RoleDto roleList(Role role, Pageable pageable);
/**
* model列表
*
* @param model 模块实体类
* @param pageable 分页工具类
* @return 模块列表
*/
ModelDto modelList(Model model, Pageable pageable);
/**
* 设置用户的属于角色
*
* @param userRolesDto 包含用户主键、角色主键DTO
*/
void userRoles(UserRolesDto userRolesDto);
/**
* 设置角色管理的模块信息
*
* @param roleModelsDto 包含模块主键、角色主键DTO
*/
void roleModels(RoleModelsDto roleModelsDto);
/**
* 通过userid查询用户角色绑定关系
*
* @param userid 用户主键
* @return 用户角色绑定关系
*/
List<ViewUserRole> findByUserid(Integer userid);
/**
* 通过roleid查询角色模块绑定关系
*
* @param roleid 角色主键
* @return 角色模块绑定关系
*/
List<ViewRoleModel> findByRoleid(Integer roleid);
/**
* 查询用户管理模块信息
*
* @param user 用户对象
* @return 用户模块绑定关系
*/
List<ViewUserModel> findModelList(User user);
/**
* 模块与DashBoard绑定关系
*
* @param dashboardDto 模块主键、仪表板主键DTO
*/
void modelDashboards(ModelDashboardDto dashboardDto);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\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\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n public void init() {\n\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n void init() {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n public void init() {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"private void init() {\n\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public void mo38117a() {\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n public void init() {}",
"@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 rozmnozovat() {\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n public void initialize() {\n \n }",
"@Override\r\n\tpublic void init() {}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"public void mo4359a() {\n }",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n public void initialize() { \n }",
"private MetallicityUtils() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\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}",
"public void mo6081a() {\n }",
"Petunia() {\r\n\t\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"private TMCourse() {\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\tprotected void initialize() {\r\n\t\t\r\n\t\t\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 }",
"Consumable() {\n\t}",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}"
]
| [
"0.6101191",
"0.6021195",
"0.5725213",
"0.57167506",
"0.56980014",
"0.5683123",
"0.56778216",
"0.56778216",
"0.5653748",
"0.5653748",
"0.5653748",
"0.5653748",
"0.5653748",
"0.5653748",
"0.5615057",
"0.5593334",
"0.5572665",
"0.55696416",
"0.555743",
"0.55398834",
"0.5522254",
"0.5515757",
"0.55130386",
"0.5502432",
"0.5489088",
"0.54783344",
"0.54776573",
"0.5470683",
"0.5466666",
"0.5464547",
"0.5460469",
"0.5456459",
"0.5455662",
"0.5455521",
"0.5454471",
"0.5452972",
"0.5452972",
"0.5442668",
"0.5440513",
"0.54382694",
"0.5429923",
"0.5429923",
"0.5429923",
"0.5429923",
"0.5429923",
"0.542211",
"0.542211",
"0.54195064",
"0.5417177",
"0.5417177",
"0.5417177",
"0.54131806",
"0.5412612",
"0.54114604",
"0.54080296",
"0.5404026",
"0.54008734",
"0.54000056",
"0.5398018",
"0.5395566",
"0.53893304",
"0.5384316",
"0.5379527",
"0.53791517",
"0.53791517",
"0.5366176",
"0.53595436",
"0.53595436",
"0.53595436",
"0.53594375",
"0.53547007",
"0.5351721",
"0.53465736",
"0.534027",
"0.534027",
"0.534027",
"0.5323012",
"0.531269",
"0.531269",
"0.531269",
"0.531269",
"0.531269",
"0.531269",
"0.531269",
"0.53044486",
"0.53001493",
"0.53001493",
"0.53001493",
"0.53001493",
"0.53001493",
"0.53001493",
"0.53001493",
"0.53001493",
"0.53001493",
"0.53001493",
"0.52948564",
"0.52948564",
"0.52846074",
"0.52846074",
"0.52846074",
"0.52685654"
]
| 0.0 | -1 |
create process variable and register it | @Ignore
@Test
public void destroyAndReCreateVariable() throws CAException, InterruptedException, TimeoutException, BrokenBarrierException, java.util.concurrent.TimeoutException {
MemoryProcessVariable pv = new MemoryProcessVariable("test", null, DBR_Int.TYPE, new int[]{2});
server.registerProcessVaribale(pv);
//Create a client context
Context clientContext = jca.createContext(JCALibrary.CHANNEL_ACCESS_JAVA);
//Create a channel
Channel ch = clientContext.createChannel("test", new ConnectionListener() {
@Override
public void connectionChanged(ConnectionEvent ev) {
LOG.info("State change to: " + ev.isConnected());
try {
barrier.await();
} catch (InterruptedException e) {
LOG.log(Level.SEVERE, e.getMessage(), e);
} catch (BrokenBarrierException e) {
LOG.log(Level.SEVERE, e.getMessage(), e);
}
}
});
//wait at most 5 seconds for channel to change state (hopefully to CONNECTED)
barrier.await(5, TimeUnit.SECONDS);
//check that channel is connected
assertEquals(Channel.ConnectionState.CONNECTED, ch.getConnectionState());
//check that value can be read
DBR dbr = ch.get();
clientContext.pendIO(0);
assertEquals(2, ((int[]) dbr.getValue())[0]);
//unregister process variable and destroy it
server.unregisterProcessVaribale("test");
pv.destroy();
//wait at most 5 seconds for channel to change state (hopefully to DISCONNECTED)
barrier.await(5, TimeUnit.SECONDS);
//check that channel is not connected
assertNotSame(Channel.ConnectionState.CONNECTED, ch.getConnectionState());
//create new process variable and register it with server
pv = new MemoryProcessVariable("test", null, DBR_Int.TYPE, new int[]{1});
server.registerProcessVaribale(pv);
//wait at most 5 seconds for channel to change state (hopefully to CONNECTED)
barrier.await(5, TimeUnit.SECONDS);
//check that channel is connected
assertEquals(Channel.ConnectionState.CONNECTED, ch.getConnectionState());
//check that value can be read, and it is the new value
dbr = ch.get();
clientContext.pendIO(0);
assertEquals(1, ((int[]) dbr.getValue())[0]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object registerVariable(WorkflowContext context, ProcessInstance entry, Map<String,String> args, PersistentVars persistentVars) throws WorkflowException;",
"public interface Register {\n // M E T H O D S -------------------------------------------------------------------------\n\n /**\n * Returns the object to bind to the variable map for this workflow instance.\n *\n * @param context The current workflow context\n * @param entry The workflow entry. Note that this might be null, for example in a pre function\n * before the workflow has been initialised\n * @param args Map of arguments as set in the workflow descriptor\n *\n * @param ps\n * @return the object to bind to the variable map for this workflow instance\n */\n public Object registerVariable(WorkflowContext context, ProcessInstance entry, Map<String,String> args, PersistentVars persistentVars) throws WorkflowException;\n}",
"public interface ProcessRegisterCallback {\n void call(Object process, ProcessExecutorParams params, ImmutableMap<String, String> context);\n }",
"@VisibleForTesting\n ProcessRegistry() {}",
"Subprocess createSubprocess();",
"private String createPID() {\n return \"7777\";\n }",
"Process createProcess();",
"DynamicVariable createDynamicVariable();",
"public void registerProcess(\n Object process, ProcessExecutorParams params, ImmutableMap<String, String> context) {\n for (ProcessRegisterCallback callback : processRegisterCallbacks) {\n callback.call(process, params, context);\n }\n }",
"Variable createVariable();",
"Variable createVariable();",
"public abstract void initializeProcess();",
"@Test\n void setPid() {\n assertEquals(3, new Process() {{\n setPid(3);\n }}.getPid());\n }",
"private void registerProcess(WebRequest webReq)throws Exception{\n if( WebEnviroment.isSameProcess( webReq.getTipoPedido() ) ){\n return;\n }else{\n WebEnviroment.setProcess(webReq.getTipoPedido()); \n }\n }",
"public void markProcessPidCreate() throws JNCException {\n markLeafCreate(\"processPid\");\n }",
"protected abstract Object createProcessBean(Name name);",
"private void putVariable(String memVar, int value){\n\t\tram[Integer.parseInt(\n\t\t\t\tCharacter.toString(memVar.charAt(1)))]\n\t\t\t\t= value;\n\t}",
"protected Element setProcId(){\n\t\treturn el(\"bpws:copy\", new Node[]{\n\t\t\t\tel(\"bpws:from\", attr(\"expression\", \"abx:getProcessId()\")),\n\t\t\t\tel(\t\"bpws:to\", new Node[]{\n\t\t\t\t\t\tattr(\"variable\", VARNAME),\n\t\t\t\t\t\tattr(\"part\", \"part1\"),\n\t\t\t\t\t\tattr(\"query\", \"/nswomoxsd:receive/nswomoxsd:processId\")\n\t\t\t\t\t})\n\t\t});\n\t}",
"public void buildExecutable(T processIntObject) {\n this.executableMap.put(counter++, new FutureVo(processIntObject));\n }",
"Process getProcess();",
"MaximaProcess makeProcess() {\r\n \t\treturn new MaximaProcess(processBuilder, processConfig);\r\n \t}",
"public void addProcessPid() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"process-pid\",\n null,\n childrenNames());\n }",
"public abstract void setProcessID(long pid);",
"protected PythonInterpreter registerEnv(String key) {\n\t\tPythonInterpreter p;\n\t\tif (environments.containsKey(key)) {p= environments.get(key);}\n\t\telse {\n\t\t\tp = new PythonInterpreter();\n\t\t\tenvironments.put(key, p);\n\t\t}\n\t\treturn p;\n\t}",
"Process getProcess() {\n return process;\n }",
"public VMProcess() {\n\t\tsuper();\n\t}",
"public abstract Process getProcess();",
"protected void setProcess(Process rNewProcess)\n\t{\n\t\trProcess = rNewProcess;\n\t\tfragmentParam().annotate(PROCESS, rProcess);\n\t}",
"public void setProcess(ServiceProcess process) {\n\t\tthis.process = process;\n\t}",
"public void coreProcess(Process coreProcess) {\r\n this.coreProcess = coreProcess;\r\n }",
"public SetPCProcess()\n {\n super(\"SetPC\");\n }",
"SAProcessInstanceBuilder createNewInstance(SProcessInstance processInstance);",
"private void smem_variable_create(smem_variable_key variable_id, long variable_value) throws SQLException\n {\n final PreparedStatement var_create = db.var_create;\n \n var_create.setInt(1, variable_id.ordinal());\n var_create.setLong(2, variable_value);\n \n var_create.execute();\n }",
"synchronized void addProcess(DpinProcess dp)\n{\n if (dp != null) process_set.put(dp.getId(),dp);\n notifyAll();\n}",
"public void createValue() {\n value = new GisInfoCaptureDO();\n }",
"ControlVariable createControlVariable();",
"public void startProcess() {\r\n\t\tprocess = true;\r\n\t}",
"@Override\n\t\t\tpublic void onProcess(int process) {\n\t\t\t}",
"private void createInputVar(Activity activity, Element saElement,\n\t\t\tProcess process, DataInputUI sa) {\n\t\tString inputVarName = saElement.getAttribute(\n\t\t\t\tModelPackage.eINSTANCE.\n\t\t\t\tgetDataInputUI_InputVariable().getName());\n\t\tif (inputVarName!=null && !\"\".equals(inputVarName.trim())) {\n\t\t\tVariable[] vars = ModelHelper.getVisibleVariables(activity.getContainer());\n\t\t\t//Set<Variable> myVars = getMyVars(activity);\n\t\t\t//TODO deal with Scope Variables\n\t\t\tfor (Variable variable : process.getVariables().getChildren()) {\n\t\t\t\tif (inputVarName.equals(variable.getName())) {\n\t\t\t\t\tsa.setInputVariable(variable);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void startProcess() {\r\n \t\tstartCount++;\r\n \t\tString threadName = Thread.currentThread().getName() + \"-starter-\" + startCount;\r\n \t\tThread starter = new Thread(threadName) {\r\n \t\t\t@Override\r\n \t\t\tpublic void run() {\r\n \t\t\t\tstartupThrotle.acquireUninterruptibly();\r\n \t\t\t\tlong startTime = System.currentTimeMillis();\r\n \t\t\t\tMaximaProcess mp = makeProcess();\r\n \t\t\t\tstartupTimeHistory.add(System.currentTimeMillis() - startTime);\r\n \t\t\t\tmp.deactivate();\r\n \t\t\t\tpool.add(mp);\r\n \t\t\t\tstartupThrotle.release();\r\n \t\t\t}\r\n \t\t};\r\n \t\tstarter.start();\r\n \t}",
"@Test\n void getPid() {\n assertEquals(3, new Process() {{\n setPid(3);\n }}.getPid());\n }",
"private void setProcessId(int value) {\n\t\tthis.processId = value;\n\t}",
"private native void nRegister();",
"public RafProcess persistRafProcess(RafProcess rafProcess);",
"public void addProcess(String name, int time, HashMap<Integer, Integer> listOfInOut, HashMap<Integer, Integer> listOfResource) {\n listOfProcess.add(new Processus(name, time, listOfInOut, listOfResource));\n }",
"@Override\n\tpublic void startHook() {\n\t\tMethod execmethod = RefInvoke.findMethodExact(\n \"java.lang.ProcessBuilder\", ClassLoader.getSystemClassLoader(),\n \"start\");\n\t\thookhelper.hookMethod(execmethod, new AbstractBehaviorHookCallBack() {\n\t\t\t@Override\n\t\t\tpublic void descParam(HookParam param) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tLogger.log_behavior(ProcessBuilderHook.class.getName(), \"Create New Process ->\");\n\t\t\t\tProcessBuilder pb = (ProcessBuilder) param.thisObject;\n\t\t\t\tList<String> cmds = pb.command();\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\tfor(int i=0 ;i <cmds.size(); i++){\n\t\t\t\t sb.append(\"CMD\"+i+\":\"+cmds.get(i)+\" \");\n\t\t\t\t}\n\t\t\t\tLogger.log_behavior(ProcessBuilderHook.class.getName(), \"Command\" + sb.toString());\n\t\t\t}\n\t\t});\n\t}",
"static void mov_memory_to_reg(String passed){\n\t\tint memory_address = memory_address_hl();\n\t\tregisters.put(passed.charAt(4),memory.get(memory_address));\n\t}",
"public interface TaskProcessFactory {\n\n TaskProcessor createTaskProcessor(String domain);\n}",
"VarReference createVarReference();",
"public static UserProcess newUserProcess() {\n\treturn (UserProcess)Lib.constructObject(Machine.getProcessClassName());\n }",
"@Override\n protected void postProcessEngineInitialisation() {\n }",
"ContextVariable createContextVariable();",
"@Override\n\tpublic void beforeVariableChanged(ProcessVariableChangedEvent arg0) {\n\n\t}",
"public void setRegprocess(String regprocess) {\n this.regprocess = regprocess;\n }",
"public static ProcessRegistry getInstance() {\n return INSTANCE;\n }",
"public Process() {\n PC.MakeProcess();\n\n }",
"static void mov_reg_to_memory(String passed){\n\t\tint memory_address = memory_address_hl();\n\t\tmemory.put(memory_address, registers.get(passed.charAt(6)));\n\t}",
"@Override\n\t\t\tpublic void descParam(HookParam param) {\n\t\t\t\tLogger.log_behavior(ProcessBuilderHook.class.getName(), \"Create New Process ->\");\n\t\t\t\tProcessBuilder pb = (ProcessBuilder) param.thisObject;\n\t\t\t\tList<String> cmds = pb.command();\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\tfor(int i=0 ;i <cmds.size(); i++){\n\t\t\t\t sb.append(\"CMD\"+i+\":\"+cmds.get(i)+\" \");\n\t\t\t\t}\n\t\t\t\tLogger.log_behavior(ProcessBuilderHook.class.getName(), \"Command\" + sb.toString());\n\t\t\t}",
"void register();",
"public Process getProcess()\n {\n return proc;\n }",
"public UserProcess() {\n\t fileDescriptors = new OpenFile[16];\n\n\t boolean interrupt = Machine.interrupt().disable();\n\n\t processId = processIdCounter++;\n\t if(parentProcess == null){\n\t\t\tstdin = UserKernel.console.openForReading();\n\t\t\tstdout = UserKernel.console.openForWriting();\n\t\t}else{\n\t\t\tstdin = parentProcess.stdin;\n\t\t\tstdout= parentProcess.stdout;\n\t\t}\n\n\t Machine.interrupt().restore(interrupt);\n\n\t fileDescriptors[0] = stdin;\n\t fileDescriptors[1] = stdout;\n\n\t childProcesses = new HashMap<Integer, UserProcess>();\n\t //exitStats = new HashMap<>();\n\n\t parentProcess = null;\n\t lock = new Lock();\n\n\t\tint numPhysPages = Machine.processor().getNumPhysPages();\n\t\tpageTable = new TranslationEntry[numPhysPages];\n\t\tfor (int i=0; i<numPhysPages; i++)\n\t\t\tpageTable[i] = new TranslationEntry(i,i, true,false,false,false);\n\n }",
"public VMProcess() \n\t{\n\t\tsuper();\n\t}",
"public static void main(String[] args) \n {\n \t\t\t\t int pid;\n \t\t/* I create a PID object to processed */\n Pid_manager2 pm = new Pid_manager2();\n if(pm.allocate_map() != -1)\n {\n pid = pm.allocate_pid();\n if(pid!=-1){\n System.out.println(\"Process allocated with PID :\"+ pid);\n pm.release_pid(pid);\n System.out.println(\"Process with PID :\" + pid + \" released\");\n }\n else\n {\n System.out.println(\"Process cannot be allocated\");\n }\n }\n else{\n System.out.println(\"Error in allocating PID map\");\n }\n int sleep(int z){\n \t\n }\n\n }",
"void instanceCreated(String pid, IDefinition definition);",
"public Process() {\t// constructor with empty parameter\r\n\t\tthis.priority = -1;\t// int value will be -1\r\n \tthis.type = null;\t// String object initialized to null\r\n\t}",
"public void registerVariable(String variableName, Expression variableDefinition)\n {\n\tvariablesMap.put(variableName, variableDefinition);\n }",
"VariableRef createVariableRef();",
"Variables createVariables();",
"public int allocate_pid()\n {\n int pid = 0;\n int size = MAX_PID - MIN_PID;\n //traverse untill we find a false value and pid vale is not equal to size \n while( pid!=size && pid_map[pid] != false )\n {\n pid++;\n }\n //if the value of pid is equal to the size of the map then all the pid's are occupied\n //so we return -1\n if(pid == size)\n {\n return -1;\n }\n //replace the false value with true\n pid_map[pid] = true;\n //return the pid + MIN_PID to bring the pid within range of MIN_PID and MAX_PID\n return pid+MIN_PID;\n }",
"@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}",
"public IVariable createInternalVariable(String name, IJavaType referencType) {\n IVariable var = new InterpreterVariable(name, referencType, fContext.getVM());\n fInternalVariables.put(name, var);\n return var;\n }",
"private static Process createProcessFromInput(String inputLine){\n int resA, resB, resC, neededA, neededB, neededC;\n\n inputLine = inputLine.replaceAll(\"\\\\[|\\\\]\", \"\"); //remove brackets\n String[] resourceInfo = inputLine.split(\" \");\n\n resA = Integer.parseInt(resourceInfo[0]);\n resB = Integer.parseInt(resourceInfo[1]);\n resC = Integer.parseInt(resourceInfo[2]);\n neededA = Integer.parseInt(resourceInfo[3]);\n neededB = Integer.parseInt(resourceInfo[4]);\n neededC = Integer.parseInt(resourceInfo[5]);\n\n int[] processInfo = {resA, resB,resC, neededA,neededB,neededC};\n return new Process(processInfo);\n }",
"public abstract void register();",
"public String getRegprocess() {\n return regprocess;\n }",
"private void createValue()\n\t{\n\t\ttry\n\t\t{\n\t\t\tm_usage = ((DERBitString)new ASN1InputStream(\n\t\t\t\t\t new ByteArrayInputStream(getDEROctets())).readObject()).intValue();\n\t\t} catch (Exception a_e)\n\t\t{\n\t\t\tthrow new RuntimeException(\"Could not read key usage from byte array!\");\n\t\t}\n\t}",
"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 }",
"public void createValue() {\r\n value = new qa.gov.mol.ProcessAcknowledgment();\r\n }",
"static Pool newVariablePool() {\n return new VariablePool();\n }",
"public CreateProcResponse createProc(CreateProcRequest request) throws GPUdbException {\n CreateProcResponse actualResponse_ = new CreateProcResponse();\n submitRequest(\"/create/proc\", request, actualResponse_, false);\n return actualResponse_;\n }",
"public void defineVariable(final GlobalVariable variable) {\n globalVariables.define(variable.name(), new IAccessor() {\n public IRubyObject getValue() {\n return variable.get();\n }\n \n public IRubyObject setValue(IRubyObject newValue) {\n return variable.set(newValue);\n }\n });\n }",
"public void defineVariable(final GlobalVariable variable) {\n globalVariables.define(variable.name(), new IAccessor() {\n public IRubyObject getValue() {\n return variable.get();\n }\n \n public IRubyObject setValue(IRubyObject newValue) {\n return variable.set(newValue);\n }\n });\n }",
"public LocalVariableGen addLocalVariable(String name, Type type, InstructionHandle start, InstructionHandle end) {\n/* 170 */ return this._allocatorInit ? addLocalVariable2(name, type, start) : super.addLocalVariable(name, type, start, end);\n/* */ }",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"public final com.francetelecom.admindm.model.Parameter createPID()\n\t\t\tthrows Fault {\n\t\tcom.francetelecom.admindm.model.Parameter param;\n\t\tparam = data.createOrRetrieveParameter(basePath + \"PID\");\n\t\tparam.setNotification(0);\n\t\tparam.setStorageMode(StorageMode.DM_ONLY);\n\t\tparam.setType(ParameterType.UINT);\n\t\tparam.addCheck(new CheckMinimum(0));\n\t\tparam.addCheck(new CheckMaximum(4294967295L));\n\t\tparam.setValue(new Long(0));\n\t\tparam.setWritable(false);\n\t\treturn param;\n\t}",
"public native int getProcess();",
"public ManagedProcess(final String executable, final Process process) {\n myProcess = process;\n myOutput = new StringBuilder();\n\n myLock = new ReentrantLock();\n myLogUpdated = myLock.newCondition();\n\n myReader = new BufferedReader(new InputStreamReader(\n myProcess.getInputStream()));\n\n new Thread(new OutputReader(), executable + \" Process Drain\").start();\n }",
"public void addProcess(Process4 p)\n\t{\n\t\tif(currentProcess == null)\n\t\t{\n\t\t\tcurrentProcess = p;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tProcesses.enqueue(p);\n\t\t}\n\t}",
"public interface Process extends Serializable\n{\n\tpublic static final String NAME = \"Process Name\";\n\tpublic static final String TYPE = \"Process Type\";\n\t\n\tpublic static final String previousProcess = \"previousProcess\";\n\t\n\n\t/* initialization */\n\tpublic void init(Process process,Network network);\n\tpublic void init(Process process,List inputPorts,List outputPorts,Network network);\n\tpublic Network getNetwork();\n\tpublic Map getProperties();\n\tpublic void updateProperties(Map properties);\n\tpublic String getID();\n\t\n\t\n\n\t/* activity */\n\tpublic void preFire();\n\tpublic boolean isFireable(Map data);\n\tpublic void fire(Map data);\n\tpublic Map getData();\n\tpublic void updateData(Map change);\n\n\n\t/* communication management */\n\tpublic InputPort getInputPort(int index);\n\tpublic InputPort inputPortObject(int index);\n\tpublic int getInputPortCount();\n\tpublic List getInputPortList();\n\tpublic OutputPort getOutputPort(int index);\n\tpublic OutputPort outputPortObject(int index);\n\tpublic int getOutputPortCount();\n\tpublic List getOutputPortList();\n\n\tpublic void setPreviousProcess(Process pro1);\n\tpublic void setPrevProcessObj(Process prevProcessObj);\n}",
"@Override\n public void run() {\n MemUsage memUsage = new MemUsage();\n Runtime run = Runtime.getRuntime();\n String memPath = \"/proc/\" + processId + \"/status\";\n LOG.info(\"Reading the file for memory: \" + memPath);\n String currentTime;\n File statusFile;\n float pcpu;\n int pmem;\n ProcessInfoBean processInfoBean = new ProcessInfoBean();\n processInfoBean.setLocalHostIp(ip);\n processInfoBean.setProceeName(processName);\n while (running) {\n pcpu = getCPUUsageByTopCommond(run, cmd);\n if (pcpu != -1) {\n statusFile = new File(memPath);\n if (statusFile.exists()) {\n pmem = memUsage.getMemUsage(statusFile);\n if (pmem != -1) {\n currentTime = TimeUtils.getCurrentTime();//获取系统当前时间\n processInfoBean.setUpdateTime(currentTime);\n processInfoBean.setCpuUsage(pcpu);\n processInfoBean.setMemUsage(pmem);\n processInfoBean.setPid(Integer.parseInt(processId));\n processInfoDao.insert_process_monitor(processInfoBean);\n MybatisUtils.session.commit();\n try {\n Thread.sleep(intervalTime);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }\n }\n }\n }",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t}",
"public abstract long getProcessID();",
"public void visitProcess(base.vhdl.structure.Process process) throws Exception {\n\t\twhile (true) {\n\t\t\tif (!couldProcessNextGraphVariable(null, process.getRootNode()))\n\t\t\t\tbreak;\n\t\t\telse\n\t\t\t\tprocessedGraphVars.add(graphVariable.getName());\n\n\t\t}\n\n\t}",
"public AsynchronousProcess(final Process process) {\n super();\n this.process = process;\n processWrapper = new PriTh(process, this);\n }",
"public void subscribe(ProcessRegisterCallback processRegisterCallback) {\n processRegisterCallbacks.add(processRegisterCallback);\n }",
"private static void registerToSystem() {\n Enumeration<?> enumeration = properties.propertyNames();\r\n while (enumeration.hasMoreElements()) {\r\n String name = (String) enumeration.nextElement();\r\n String value = properties.getProperty(name);\r\n if (value != null) {\r\n System.setProperty(name, value);\r\n }\r\n }\r\n\t}"
]
| [
"0.66938007",
"0.64861727",
"0.59659755",
"0.5896328",
"0.58845896",
"0.5817787",
"0.5792027",
"0.5729024",
"0.56166464",
"0.55831826",
"0.55831826",
"0.5579071",
"0.5561893",
"0.5506248",
"0.5421229",
"0.54047483",
"0.5378587",
"0.52584803",
"0.52493495",
"0.5204827",
"0.51819843",
"0.5177214",
"0.5172196",
"0.51453316",
"0.5138422",
"0.5137682",
"0.51281166",
"0.5123928",
"0.51176214",
"0.5103538",
"0.5101356",
"0.5101124",
"0.50855726",
"0.5079205",
"0.50605476",
"0.5059537",
"0.50534034",
"0.5051206",
"0.5038566",
"0.5035831",
"0.50291663",
"0.50286657",
"0.50253755",
"0.5017943",
"0.500765",
"0.50042707",
"0.49949905",
"0.49890038",
"0.4983084",
"0.4980536",
"0.4979295",
"0.49778676",
"0.49755597",
"0.49719816",
"0.49574313",
"0.49448776",
"0.49439752",
"0.4928923",
"0.49101657",
"0.48932764",
"0.48906642",
"0.48891917",
"0.48833674",
"0.4877095",
"0.4867313",
"0.48597902",
"0.485866",
"0.4857249",
"0.48547512",
"0.4846532",
"0.4846532",
"0.48378775",
"0.48352647",
"0.48244908",
"0.48173612",
"0.4815083",
"0.48096013",
"0.48069584",
"0.47940767",
"0.47932038",
"0.47927183",
"0.47927183",
"0.4792454",
"0.47924468",
"0.47924468",
"0.47924468",
"0.47924468",
"0.47924468",
"0.47880408",
"0.47804403",
"0.47789383",
"0.47780818",
"0.47730184",
"0.4760094",
"0.47596595",
"0.47590372",
"0.47515535",
"0.474624",
"0.4742832",
"0.47297683"
]
| 0.48741055 | 64 |
create process variable and register it | @Ignore
@Test
public void withDestroyAndCreateServer() throws CAException, InterruptedException, TimeoutException, BrokenBarrierException, java.util.concurrent.TimeoutException {
MemoryProcessVariable pv = new MemoryProcessVariable("test", null, DBR_Int.TYPE, new int[]{2});
server.registerProcessVaribale(pv);
//Create a client context
Context clientContext = jca.createContext(JCALibrary.CHANNEL_ACCESS_JAVA);
//Create a channel
Channel ch = clientContext.createChannel("test", new ConnectionListener() {
@Override
public void connectionChanged(ConnectionEvent ev) {
LOG.info("State change to: " + ev.isConnected());
try {
barrier.await();
} catch (InterruptedException e) {
LOG.log(Level.SEVERE, e.getMessage(), e);
} catch (BrokenBarrierException e) {
LOG.log(Level.SEVERE, e.getMessage(), e);
}
}
});
//wait at most 5 seconds for channel to change state (hopefully to CONNECTED)
barrier.await(5, TimeUnit.SECONDS);
//check that channel is connected
assertEquals(Channel.ConnectionState.CONNECTED, ch.getConnectionState());
//check that value can be read
DBR dbr = ch.get();
clientContext.pendIO(0);
assertEquals(2, ((int[]) dbr.getValue())[0]);
//unregister process variable and destroy it
server.unregisterProcessVaribale("test");
pv.destroy();
//destroy the server and start it up again
tearDownServer();
setupServer();
//wait at most 5 seconds for channel to change state (hopefully to DISCONNECTED)
barrier.await(5, TimeUnit.SECONDS);
//check that channel is not connected
assertNotSame(Channel.ConnectionState.CONNECTED, ch.getConnectionState());
//create new process variable and register it with server
pv = new MemoryProcessVariable("test", null, DBR_Int.TYPE, new int[]{1});
server.registerProcessVaribale(pv);
//wait at most 5 seconds for channel to change state (hopefully to CONNECTED)
barrier.await(5, TimeUnit.SECONDS);
//check that channel is connected
assertEquals(Channel.ConnectionState.CONNECTED, ch.getConnectionState());
//check that value can be read, and it is the new value
dbr = ch.get();
clientContext.pendIO(0);
assertEquals(1, ((int[]) dbr.getValue())[0]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object registerVariable(WorkflowContext context, ProcessInstance entry, Map<String,String> args, PersistentVars persistentVars) throws WorkflowException;",
"public interface Register {\n // M E T H O D S -------------------------------------------------------------------------\n\n /**\n * Returns the object to bind to the variable map for this workflow instance.\n *\n * @param context The current workflow context\n * @param entry The workflow entry. Note that this might be null, for example in a pre function\n * before the workflow has been initialised\n * @param args Map of arguments as set in the workflow descriptor\n *\n * @param ps\n * @return the object to bind to the variable map for this workflow instance\n */\n public Object registerVariable(WorkflowContext context, ProcessInstance entry, Map<String,String> args, PersistentVars persistentVars) throws WorkflowException;\n}",
"public interface ProcessRegisterCallback {\n void call(Object process, ProcessExecutorParams params, ImmutableMap<String, String> context);\n }",
"@VisibleForTesting\n ProcessRegistry() {}",
"Subprocess createSubprocess();",
"private String createPID() {\n return \"7777\";\n }",
"Process createProcess();",
"DynamicVariable createDynamicVariable();",
"public void registerProcess(\n Object process, ProcessExecutorParams params, ImmutableMap<String, String> context) {\n for (ProcessRegisterCallback callback : processRegisterCallbacks) {\n callback.call(process, params, context);\n }\n }",
"Variable createVariable();",
"Variable createVariable();",
"public abstract void initializeProcess();",
"@Test\n void setPid() {\n assertEquals(3, new Process() {{\n setPid(3);\n }}.getPid());\n }",
"private void registerProcess(WebRequest webReq)throws Exception{\n if( WebEnviroment.isSameProcess( webReq.getTipoPedido() ) ){\n return;\n }else{\n WebEnviroment.setProcess(webReq.getTipoPedido()); \n }\n }",
"public void markProcessPidCreate() throws JNCException {\n markLeafCreate(\"processPid\");\n }",
"protected abstract Object createProcessBean(Name name);",
"private void putVariable(String memVar, int value){\n\t\tram[Integer.parseInt(\n\t\t\t\tCharacter.toString(memVar.charAt(1)))]\n\t\t\t\t= value;\n\t}",
"protected Element setProcId(){\n\t\treturn el(\"bpws:copy\", new Node[]{\n\t\t\t\tel(\"bpws:from\", attr(\"expression\", \"abx:getProcessId()\")),\n\t\t\t\tel(\t\"bpws:to\", new Node[]{\n\t\t\t\t\t\tattr(\"variable\", VARNAME),\n\t\t\t\t\t\tattr(\"part\", \"part1\"),\n\t\t\t\t\t\tattr(\"query\", \"/nswomoxsd:receive/nswomoxsd:processId\")\n\t\t\t\t\t})\n\t\t});\n\t}",
"public void buildExecutable(T processIntObject) {\n this.executableMap.put(counter++, new FutureVo(processIntObject));\n }",
"Process getProcess();",
"MaximaProcess makeProcess() {\r\n \t\treturn new MaximaProcess(processBuilder, processConfig);\r\n \t}",
"public void addProcessPid() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"process-pid\",\n null,\n childrenNames());\n }",
"public abstract void setProcessID(long pid);",
"protected PythonInterpreter registerEnv(String key) {\n\t\tPythonInterpreter p;\n\t\tif (environments.containsKey(key)) {p= environments.get(key);}\n\t\telse {\n\t\t\tp = new PythonInterpreter();\n\t\t\tenvironments.put(key, p);\n\t\t}\n\t\treturn p;\n\t}",
"Process getProcess() {\n return process;\n }",
"public VMProcess() {\n\t\tsuper();\n\t}",
"public abstract Process getProcess();",
"protected void setProcess(Process rNewProcess)\n\t{\n\t\trProcess = rNewProcess;\n\t\tfragmentParam().annotate(PROCESS, rProcess);\n\t}",
"public void setProcess(ServiceProcess process) {\n\t\tthis.process = process;\n\t}",
"public void coreProcess(Process coreProcess) {\r\n this.coreProcess = coreProcess;\r\n }",
"public SetPCProcess()\n {\n super(\"SetPC\");\n }",
"SAProcessInstanceBuilder createNewInstance(SProcessInstance processInstance);",
"private void smem_variable_create(smem_variable_key variable_id, long variable_value) throws SQLException\n {\n final PreparedStatement var_create = db.var_create;\n \n var_create.setInt(1, variable_id.ordinal());\n var_create.setLong(2, variable_value);\n \n var_create.execute();\n }",
"synchronized void addProcess(DpinProcess dp)\n{\n if (dp != null) process_set.put(dp.getId(),dp);\n notifyAll();\n}",
"public void createValue() {\n value = new GisInfoCaptureDO();\n }",
"ControlVariable createControlVariable();",
"public void startProcess() {\r\n\t\tprocess = true;\r\n\t}",
"@Override\n\t\t\tpublic void onProcess(int process) {\n\t\t\t}",
"private void createInputVar(Activity activity, Element saElement,\n\t\t\tProcess process, DataInputUI sa) {\n\t\tString inputVarName = saElement.getAttribute(\n\t\t\t\tModelPackage.eINSTANCE.\n\t\t\t\tgetDataInputUI_InputVariable().getName());\n\t\tif (inputVarName!=null && !\"\".equals(inputVarName.trim())) {\n\t\t\tVariable[] vars = ModelHelper.getVisibleVariables(activity.getContainer());\n\t\t\t//Set<Variable> myVars = getMyVars(activity);\n\t\t\t//TODO deal with Scope Variables\n\t\t\tfor (Variable variable : process.getVariables().getChildren()) {\n\t\t\t\tif (inputVarName.equals(variable.getName())) {\n\t\t\t\t\tsa.setInputVariable(variable);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void startProcess() {\r\n \t\tstartCount++;\r\n \t\tString threadName = Thread.currentThread().getName() + \"-starter-\" + startCount;\r\n \t\tThread starter = new Thread(threadName) {\r\n \t\t\t@Override\r\n \t\t\tpublic void run() {\r\n \t\t\t\tstartupThrotle.acquireUninterruptibly();\r\n \t\t\t\tlong startTime = System.currentTimeMillis();\r\n \t\t\t\tMaximaProcess mp = makeProcess();\r\n \t\t\t\tstartupTimeHistory.add(System.currentTimeMillis() - startTime);\r\n \t\t\t\tmp.deactivate();\r\n \t\t\t\tpool.add(mp);\r\n \t\t\t\tstartupThrotle.release();\r\n \t\t\t}\r\n \t\t};\r\n \t\tstarter.start();\r\n \t}",
"@Test\n void getPid() {\n assertEquals(3, new Process() {{\n setPid(3);\n }}.getPid());\n }",
"private void setProcessId(int value) {\n\t\tthis.processId = value;\n\t}",
"private native void nRegister();",
"public RafProcess persistRafProcess(RafProcess rafProcess);",
"public void addProcess(String name, int time, HashMap<Integer, Integer> listOfInOut, HashMap<Integer, Integer> listOfResource) {\n listOfProcess.add(new Processus(name, time, listOfInOut, listOfResource));\n }",
"@Override\n\tpublic void startHook() {\n\t\tMethod execmethod = RefInvoke.findMethodExact(\n \"java.lang.ProcessBuilder\", ClassLoader.getSystemClassLoader(),\n \"start\");\n\t\thookhelper.hookMethod(execmethod, new AbstractBehaviorHookCallBack() {\n\t\t\t@Override\n\t\t\tpublic void descParam(HookParam param) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tLogger.log_behavior(ProcessBuilderHook.class.getName(), \"Create New Process ->\");\n\t\t\t\tProcessBuilder pb = (ProcessBuilder) param.thisObject;\n\t\t\t\tList<String> cmds = pb.command();\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\tfor(int i=0 ;i <cmds.size(); i++){\n\t\t\t\t sb.append(\"CMD\"+i+\":\"+cmds.get(i)+\" \");\n\t\t\t\t}\n\t\t\t\tLogger.log_behavior(ProcessBuilderHook.class.getName(), \"Command\" + sb.toString());\n\t\t\t}\n\t\t});\n\t}",
"static void mov_memory_to_reg(String passed){\n\t\tint memory_address = memory_address_hl();\n\t\tregisters.put(passed.charAt(4),memory.get(memory_address));\n\t}",
"public interface TaskProcessFactory {\n\n TaskProcessor createTaskProcessor(String domain);\n}",
"VarReference createVarReference();",
"public static UserProcess newUserProcess() {\n\treturn (UserProcess)Lib.constructObject(Machine.getProcessClassName());\n }",
"@Override\n protected void postProcessEngineInitialisation() {\n }",
"ContextVariable createContextVariable();",
"@Override\n\tpublic void beforeVariableChanged(ProcessVariableChangedEvent arg0) {\n\n\t}",
"public void setRegprocess(String regprocess) {\n this.regprocess = regprocess;\n }",
"public static ProcessRegistry getInstance() {\n return INSTANCE;\n }",
"public Process() {\n PC.MakeProcess();\n\n }",
"static void mov_reg_to_memory(String passed){\n\t\tint memory_address = memory_address_hl();\n\t\tmemory.put(memory_address, registers.get(passed.charAt(6)));\n\t}",
"@Override\n\t\t\tpublic void descParam(HookParam param) {\n\t\t\t\tLogger.log_behavior(ProcessBuilderHook.class.getName(), \"Create New Process ->\");\n\t\t\t\tProcessBuilder pb = (ProcessBuilder) param.thisObject;\n\t\t\t\tList<String> cmds = pb.command();\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\tfor(int i=0 ;i <cmds.size(); i++){\n\t\t\t\t sb.append(\"CMD\"+i+\":\"+cmds.get(i)+\" \");\n\t\t\t\t}\n\t\t\t\tLogger.log_behavior(ProcessBuilderHook.class.getName(), \"Command\" + sb.toString());\n\t\t\t}",
"void register();",
"public Process getProcess()\n {\n return proc;\n }",
"public UserProcess() {\n\t fileDescriptors = new OpenFile[16];\n\n\t boolean interrupt = Machine.interrupt().disable();\n\n\t processId = processIdCounter++;\n\t if(parentProcess == null){\n\t\t\tstdin = UserKernel.console.openForReading();\n\t\t\tstdout = UserKernel.console.openForWriting();\n\t\t}else{\n\t\t\tstdin = parentProcess.stdin;\n\t\t\tstdout= parentProcess.stdout;\n\t\t}\n\n\t Machine.interrupt().restore(interrupt);\n\n\t fileDescriptors[0] = stdin;\n\t fileDescriptors[1] = stdout;\n\n\t childProcesses = new HashMap<Integer, UserProcess>();\n\t //exitStats = new HashMap<>();\n\n\t parentProcess = null;\n\t lock = new Lock();\n\n\t\tint numPhysPages = Machine.processor().getNumPhysPages();\n\t\tpageTable = new TranslationEntry[numPhysPages];\n\t\tfor (int i=0; i<numPhysPages; i++)\n\t\t\tpageTable[i] = new TranslationEntry(i,i, true,false,false,false);\n\n }",
"public VMProcess() \n\t{\n\t\tsuper();\n\t}",
"public static void main(String[] args) \n {\n \t\t\t\t int pid;\n \t\t/* I create a PID object to processed */\n Pid_manager2 pm = new Pid_manager2();\n if(pm.allocate_map() != -1)\n {\n pid = pm.allocate_pid();\n if(pid!=-1){\n System.out.println(\"Process allocated with PID :\"+ pid);\n pm.release_pid(pid);\n System.out.println(\"Process with PID :\" + pid + \" released\");\n }\n else\n {\n System.out.println(\"Process cannot be allocated\");\n }\n }\n else{\n System.out.println(\"Error in allocating PID map\");\n }\n int sleep(int z){\n \t\n }\n\n }",
"void instanceCreated(String pid, IDefinition definition);",
"@Ignore\n @Test\n public void destroyAndReCreateVariable() throws CAException, InterruptedException, TimeoutException, BrokenBarrierException, java.util.concurrent.TimeoutException {\n MemoryProcessVariable pv = new MemoryProcessVariable(\"test\", null, DBR_Int.TYPE, new int[]{2});\n server.registerProcessVaribale(pv);\n\n //Create a client context\n Context clientContext = jca.createContext(JCALibrary.CHANNEL_ACCESS_JAVA);\n\n //Create a channel\n Channel ch = clientContext.createChannel(\"test\", new ConnectionListener() {\n @Override\n public void connectionChanged(ConnectionEvent ev) {\n LOG.info(\"State change to: \" + ev.isConnected());\n try {\n barrier.await();\n } catch (InterruptedException e) {\n LOG.log(Level.SEVERE, e.getMessage(), e);\n } catch (BrokenBarrierException e) {\n LOG.log(Level.SEVERE, e.getMessage(), e);\n }\n }\n });\n\n //wait at most 5 seconds for channel to change state (hopefully to CONNECTED)\n barrier.await(5, TimeUnit.SECONDS);\n //check that channel is connected\n assertEquals(Channel.ConnectionState.CONNECTED, ch.getConnectionState());\n //check that value can be read\n DBR dbr = ch.get();\n clientContext.pendIO(0);\n assertEquals(2, ((int[]) dbr.getValue())[0]);\n\n //unregister process variable and destroy it\n server.unregisterProcessVaribale(\"test\");\n pv.destroy();\n\n //wait at most 5 seconds for channel to change state (hopefully to DISCONNECTED)\n barrier.await(5, TimeUnit.SECONDS);\n //check that channel is not connected\n assertNotSame(Channel.ConnectionState.CONNECTED, ch.getConnectionState());\n\n //create new process variable and register it with server\n pv = new MemoryProcessVariable(\"test\", null, DBR_Int.TYPE, new int[]{1});\n server.registerProcessVaribale(pv);\n\n //wait at most 5 seconds for channel to change state (hopefully to CONNECTED)\n barrier.await(5, TimeUnit.SECONDS);\n //check that channel is connected\n assertEquals(Channel.ConnectionState.CONNECTED, ch.getConnectionState());\n //check that value can be read, and it is the new value\n dbr = ch.get();\n clientContext.pendIO(0);\n assertEquals(1, ((int[]) dbr.getValue())[0]);\n\n }",
"public Process() {\t// constructor with empty parameter\r\n\t\tthis.priority = -1;\t// int value will be -1\r\n \tthis.type = null;\t// String object initialized to null\r\n\t}",
"public void registerVariable(String variableName, Expression variableDefinition)\n {\n\tvariablesMap.put(variableName, variableDefinition);\n }",
"VariableRef createVariableRef();",
"Variables createVariables();",
"public int allocate_pid()\n {\n int pid = 0;\n int size = MAX_PID - MIN_PID;\n //traverse untill we find a false value and pid vale is not equal to size \n while( pid!=size && pid_map[pid] != false )\n {\n pid++;\n }\n //if the value of pid is equal to the size of the map then all the pid's are occupied\n //so we return -1\n if(pid == size)\n {\n return -1;\n }\n //replace the false value with true\n pid_map[pid] = true;\n //return the pid + MIN_PID to bring the pid within range of MIN_PID and MAX_PID\n return pid+MIN_PID;\n }",
"@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}",
"public IVariable createInternalVariable(String name, IJavaType referencType) {\n IVariable var = new InterpreterVariable(name, referencType, fContext.getVM());\n fInternalVariables.put(name, var);\n return var;\n }",
"private static Process createProcessFromInput(String inputLine){\n int resA, resB, resC, neededA, neededB, neededC;\n\n inputLine = inputLine.replaceAll(\"\\\\[|\\\\]\", \"\"); //remove brackets\n String[] resourceInfo = inputLine.split(\" \");\n\n resA = Integer.parseInt(resourceInfo[0]);\n resB = Integer.parseInt(resourceInfo[1]);\n resC = Integer.parseInt(resourceInfo[2]);\n neededA = Integer.parseInt(resourceInfo[3]);\n neededB = Integer.parseInt(resourceInfo[4]);\n neededC = Integer.parseInt(resourceInfo[5]);\n\n int[] processInfo = {resA, resB,resC, neededA,neededB,neededC};\n return new Process(processInfo);\n }",
"public abstract void register();",
"public String getRegprocess() {\n return regprocess;\n }",
"private void createValue()\n\t{\n\t\ttry\n\t\t{\n\t\t\tm_usage = ((DERBitString)new ASN1InputStream(\n\t\t\t\t\t new ByteArrayInputStream(getDEROctets())).readObject()).intValue();\n\t\t} catch (Exception a_e)\n\t\t{\n\t\t\tthrow new RuntimeException(\"Could not read key usage from byte array!\");\n\t\t}\n\t}",
"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 }",
"public void createValue() {\r\n value = new qa.gov.mol.ProcessAcknowledgment();\r\n }",
"static Pool newVariablePool() {\n return new VariablePool();\n }",
"public CreateProcResponse createProc(CreateProcRequest request) throws GPUdbException {\n CreateProcResponse actualResponse_ = new CreateProcResponse();\n submitRequest(\"/create/proc\", request, actualResponse_, false);\n return actualResponse_;\n }",
"public void defineVariable(final GlobalVariable variable) {\n globalVariables.define(variable.name(), new IAccessor() {\n public IRubyObject getValue() {\n return variable.get();\n }\n \n public IRubyObject setValue(IRubyObject newValue) {\n return variable.set(newValue);\n }\n });\n }",
"public void defineVariable(final GlobalVariable variable) {\n globalVariables.define(variable.name(), new IAccessor() {\n public IRubyObject getValue() {\n return variable.get();\n }\n \n public IRubyObject setValue(IRubyObject newValue) {\n return variable.set(newValue);\n }\n });\n }",
"public LocalVariableGen addLocalVariable(String name, Type type, InstructionHandle start, InstructionHandle end) {\n/* 170 */ return this._allocatorInit ? addLocalVariable2(name, type, start) : super.addLocalVariable(name, type, start, end);\n/* */ }",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"public final com.francetelecom.admindm.model.Parameter createPID()\n\t\t\tthrows Fault {\n\t\tcom.francetelecom.admindm.model.Parameter param;\n\t\tparam = data.createOrRetrieveParameter(basePath + \"PID\");\n\t\tparam.setNotification(0);\n\t\tparam.setStorageMode(StorageMode.DM_ONLY);\n\t\tparam.setType(ParameterType.UINT);\n\t\tparam.addCheck(new CheckMinimum(0));\n\t\tparam.addCheck(new CheckMaximum(4294967295L));\n\t\tparam.setValue(new Long(0));\n\t\tparam.setWritable(false);\n\t\treturn param;\n\t}",
"public native int getProcess();",
"public ManagedProcess(final String executable, final Process process) {\n myProcess = process;\n myOutput = new StringBuilder();\n\n myLock = new ReentrantLock();\n myLogUpdated = myLock.newCondition();\n\n myReader = new BufferedReader(new InputStreamReader(\n myProcess.getInputStream()));\n\n new Thread(new OutputReader(), executable + \" Process Drain\").start();\n }",
"public void addProcess(Process4 p)\n\t{\n\t\tif(currentProcess == null)\n\t\t{\n\t\t\tcurrentProcess = p;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tProcesses.enqueue(p);\n\t\t}\n\t}",
"public interface Process extends Serializable\n{\n\tpublic static final String NAME = \"Process Name\";\n\tpublic static final String TYPE = \"Process Type\";\n\t\n\tpublic static final String previousProcess = \"previousProcess\";\n\t\n\n\t/* initialization */\n\tpublic void init(Process process,Network network);\n\tpublic void init(Process process,List inputPorts,List outputPorts,Network network);\n\tpublic Network getNetwork();\n\tpublic Map getProperties();\n\tpublic void updateProperties(Map properties);\n\tpublic String getID();\n\t\n\t\n\n\t/* activity */\n\tpublic void preFire();\n\tpublic boolean isFireable(Map data);\n\tpublic void fire(Map data);\n\tpublic Map getData();\n\tpublic void updateData(Map change);\n\n\n\t/* communication management */\n\tpublic InputPort getInputPort(int index);\n\tpublic InputPort inputPortObject(int index);\n\tpublic int getInputPortCount();\n\tpublic List getInputPortList();\n\tpublic OutputPort getOutputPort(int index);\n\tpublic OutputPort outputPortObject(int index);\n\tpublic int getOutputPortCount();\n\tpublic List getOutputPortList();\n\n\tpublic void setPreviousProcess(Process pro1);\n\tpublic void setPrevProcessObj(Process prevProcessObj);\n}",
"@Override\n public void run() {\n MemUsage memUsage = new MemUsage();\n Runtime run = Runtime.getRuntime();\n String memPath = \"/proc/\" + processId + \"/status\";\n LOG.info(\"Reading the file for memory: \" + memPath);\n String currentTime;\n File statusFile;\n float pcpu;\n int pmem;\n ProcessInfoBean processInfoBean = new ProcessInfoBean();\n processInfoBean.setLocalHostIp(ip);\n processInfoBean.setProceeName(processName);\n while (running) {\n pcpu = getCPUUsageByTopCommond(run, cmd);\n if (pcpu != -1) {\n statusFile = new File(memPath);\n if (statusFile.exists()) {\n pmem = memUsage.getMemUsage(statusFile);\n if (pmem != -1) {\n currentTime = TimeUtils.getCurrentTime();//获取系统当前时间\n processInfoBean.setUpdateTime(currentTime);\n processInfoBean.setCpuUsage(pcpu);\n processInfoBean.setMemUsage(pmem);\n processInfoBean.setPid(Integer.parseInt(processId));\n processInfoDao.insert_process_monitor(processInfoBean);\n MybatisUtils.session.commit();\n try {\n Thread.sleep(intervalTime);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }\n }\n }\n }",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t}",
"public abstract long getProcessID();",
"public void visitProcess(base.vhdl.structure.Process process) throws Exception {\n\t\twhile (true) {\n\t\t\tif (!couldProcessNextGraphVariable(null, process.getRootNode()))\n\t\t\t\tbreak;\n\t\t\telse\n\t\t\t\tprocessedGraphVars.add(graphVariable.getName());\n\n\t\t}\n\n\t}",
"public AsynchronousProcess(final Process process) {\n super();\n this.process = process;\n processWrapper = new PriTh(process, this);\n }",
"public void subscribe(ProcessRegisterCallback processRegisterCallback) {\n processRegisterCallbacks.add(processRegisterCallback);\n }",
"private static void registerToSystem() {\n Enumeration<?> enumeration = properties.propertyNames();\r\n while (enumeration.hasMoreElements()) {\r\n String name = (String) enumeration.nextElement();\r\n String value = properties.getProperty(name);\r\n if (value != null) {\r\n System.setProperty(name, value);\r\n }\r\n }\r\n\t}"
]
| [
"0.66938007",
"0.64861727",
"0.59659755",
"0.5896328",
"0.58845896",
"0.5817787",
"0.5792027",
"0.5729024",
"0.56166464",
"0.55831826",
"0.55831826",
"0.5579071",
"0.5561893",
"0.5506248",
"0.5421229",
"0.54047483",
"0.5378587",
"0.52584803",
"0.52493495",
"0.5204827",
"0.51819843",
"0.5177214",
"0.5172196",
"0.51453316",
"0.5138422",
"0.5137682",
"0.51281166",
"0.5123928",
"0.51176214",
"0.5103538",
"0.5101356",
"0.5101124",
"0.50855726",
"0.5079205",
"0.50605476",
"0.5059537",
"0.50534034",
"0.5051206",
"0.5038566",
"0.5035831",
"0.50291663",
"0.50286657",
"0.50253755",
"0.5017943",
"0.500765",
"0.50042707",
"0.49949905",
"0.49890038",
"0.4983084",
"0.4980536",
"0.4979295",
"0.49778676",
"0.49755597",
"0.49719816",
"0.49574313",
"0.49448776",
"0.49439752",
"0.4928923",
"0.49101657",
"0.48932764",
"0.48906642",
"0.48891917",
"0.48833674",
"0.4877095",
"0.48741055",
"0.4867313",
"0.48597902",
"0.485866",
"0.4857249",
"0.48547512",
"0.4846532",
"0.4846532",
"0.48378775",
"0.48352647",
"0.48244908",
"0.48173612",
"0.4815083",
"0.48096013",
"0.48069584",
"0.47940767",
"0.47932038",
"0.47927183",
"0.47927183",
"0.4792454",
"0.47924468",
"0.47924468",
"0.47924468",
"0.47924468",
"0.47924468",
"0.47880408",
"0.47804403",
"0.47789383",
"0.47780818",
"0.47730184",
"0.4760094",
"0.47596595",
"0.47590372",
"0.47515535",
"0.474624",
"0.4742832",
"0.47297683"
]
| 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
new FrequencyOfCharInString().findCharFreq("Technocredit", "T");
} | {
"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 |
Considers the current vector as centre of a collision sphere with radius r and checks if the triangle abc intersects with this sphere. The Vec3D p The point on abc closest to the sphere center is returned via the supplied result vector argument. | public boolean intersectSphereTriangle(Triangle t, Vec3D result) {
// Find Vec3D P on triangle ABC closest to sphere center
result.set(t.closestPointOnSurface(this));
// Sphere and triangle intersect if the (squared) distance from sphere
// center to Vec3D p is less than the (squared) sphere radius
Vec3D v = result.sub(this);
return v.magSquared() <= radius * radius;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static boolean intersectLineTriangle(Vec3 p, Vec3 q, Vec3 a, Vec3 b, Vec3 c, Vec3 r) {\r\n\t // Bring points to their respective coordinate frame\r\n\t Vec3 pq = q.subtract( p);\r\n\t Vec3 pa =a.subtract(p);\r\n\t Vec3 pb = b.subtract(p);\r\n\t Vec3 pc = c.subtract(p);\r\n\t \r\n\t Vec3 m = pq.cross(pc);\r\n\t \r\n\t float u = pb.dot(m); \r\n\t float v = -pa.dot(m);\r\n\t \r\n\t if (Math.signum(u) != Math.signum(v)) {\r\n\t return false;\r\n\t }\r\n\t \r\n\t // scalar triple product\r\n\t float w = pq.dot( pb.cross(pa));\r\n\t \r\n\t if (Math.signum(u) != Math.signum(w)) {\r\n\t return false;\r\n\t }\r\n\t \r\n\t float denom = 1.0f / (u + v + w);\r\n\t \r\n\t // r = ((u * denom) * a) + ((v * denom) * b) + ((w * denom) * c);\r\n\t Vec3 compA = a.multiply(u * denom);\r\n\t Vec3 compB = b.multiply( v * denom);\r\n\t Vec3 compC = c.multiply( w * denom);\r\n\t \r\n\t // store result in Vector r\r\n\t r.x = compA.x + compB.x + compC.x;\r\n\t r.y = compA.y + compB.y + compC.y;\r\n\t r.z = compA.z + compB.z + compC.z;\r\n\t \r\n\t return true;\r\n\t}",
"@Override\n public void intersect( Ray ray, IntersectResult result ) {\n \t\tVector3d e = new Vector3d(ray.eyePoint);\n \t\te.sub(this.center);\n \t\tdouble a = ray.viewDirection.dot(ray.viewDirection);\n \t\tdouble b = 2 * ray.viewDirection.dot(e);\n \t\tdouble c = e.dot(e) - this.radius * this.radius;\n \t\tdouble discriminant = b*b - 4*a*c;\n \t\t\n \t\tif (discriminant == 0.0) {\n \t\t\t\n \t\t\tdouble t_pos = -0.5 * b / a;\n \t\t\t// scale ray viewDirection to be t_pos length\n\t\t\t// point of intersection is at ray.eyePoint + scaled viewDirection vector\n\t\t\tPoint3d point_of_intersection = new Point3d(ray.viewDirection);\n\t\t\tpoint_of_intersection.scale(t_pos);\n\t\t\tpoint_of_intersection.add(ray.eyePoint);\n\t\t\t\n\t\t\t// normal is point_of_intersection - sphere.center\n\t\t\tVector3d normal = new Vector3d();\n\t\t\tnormal.add(point_of_intersection);\n\t\t\tnormal.sub(this.center);\n\t\t\tnormal.normalize();\n\t\t\t\n\t\t\tresult.p.set(point_of_intersection);\n\t\t\tresult.material = this.material;\n\t\t\tresult.t = t_pos;\n\t\t\tresult.n.set(normal);\n \t\t\t\n \t\t}\n \t\telse if (discriminant > 0.0) {\n \t\t\t\n \t\t\t// solve quadratic formula\n \t\t\tdouble q = (b > 0) ? -0.5 * (b + Math.sqrt(discriminant)) : -0.5 * (b - Math.sqrt(discriminant));\n \t\t\tdouble t_pos = q / a;\n \t\t\tdouble t_neg = c / q;\n \t\t\t\n \t\t\tif (t_pos < t_neg) {\n \t\t\t\tdouble temp = t_pos;\n \t\t\t\tt_pos = t_neg;\n \t\t\t\tt_neg = temp;\n \t\t\t}\n \t\t\t\t\n \t\t\tif (t_neg > 0) {\n \t\t\t\t// scale ray viewDirection to be t_neg length\n \t\t\t\t// point of intersection is at ray.eyePoint + scaled viewDirection vector\n \t\t\tPoint3d point_of_intersection = new Point3d(ray.viewDirection);\n \t\t\tpoint_of_intersection.scale(t_neg);\n \t\t\tpoint_of_intersection.add(ray.eyePoint);\n \t\t\t\n \t\t\t// normal is point_of_intersection - sphere.center\n \t\t\tVector3d normal = new Vector3d();\n \t\t\tnormal.add(point_of_intersection);\n \t\t\tnormal.sub(this.center);\n \t\t\tnormal.normalize();\n \t\t\t\n \t\t\tresult.p.set(point_of_intersection);\n \t\t\tresult.material = this.material;\n \t\t\tresult.t = t_neg;\n \t\t\tresult.n.set(normal);\n \t\t\t}\n\t\n \t\t}\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t\n\n }",
"@Test\n public void testGetIntersect() throws Exception {\n Vector farIntersect = sphere.getIntersect(new Vector(0,0,0),new Vector(0,-6,10));\n assertTrue(farIntersect.equals(new Vector(0,-6,10)));\n }",
"public abstract Vector computeCenter();",
"public boolean intersectsTriangle(\r\n \tVector3d \tpV0\r\n , \tVector3d \tpV1\r\n , \tVector3d \tpV2\r\n ,\tVector3d \tpResult\r\n , \tboolean \tpResultsAsPoint\r\n ,\tCSGTempVars\tpVars\r\n ,\tdouble\t\tpTolerance\r\n ) {\r\n Vector3d tempVa = pVars.vectd1,\r\n tempVb = pVars.vectd2,\r\n tempVc = pVars.vectd3,\r\n \t\ttempVd = pVars.vectd4;\r\n\r\n Vector3d diff = mOrigin.subtract( pV0, tempVa );\r\n Vector3d edge1 = pV1.subtract( pV0, tempVb );\r\n Vector3d edge2 = pV2.subtract( pV0, tempVc );\r\n Vector3d norm = edge1.cross( edge2, tempVd );\r\n\r\n double dirDotNorm = mDirection.dot( norm );\r\n double sign;\r\n if ( dirDotNorm > pTolerance ) {\r\n sign = 1;\r\n } else if (dirDotNorm < -pTolerance ) {\r\n sign = -1;\r\n dirDotNorm = -dirDotNorm;\r\n } else {\r\n // Ray and triangle are parallel\r\n return false;\r\n }\r\n double dirDotEdge1xDiff, dirDotDiffxEdge2, diffDotNorm;\r\n dirDotDiffxEdge2 = sign * mDirection.dot( diff.cross( edge2, edge2 ) );\r\n if ( dirDotDiffxEdge2 >= 0.0 ) {\r\n dirDotEdge1xDiff = sign * mDirection.dot( edge1.crossLocal( diff ) );\r\n\r\n if ( dirDotEdge1xDiff >= 0.0 ) {\r\n if ( dirDotDiffxEdge2 + dirDotEdge1xDiff <= dirDotNorm ) {\r\n diffDotNorm = -sign * diff.dot( norm );\r\n if ( diffDotNorm >= 0.0 ) {\r\n // Ray intersects triangle\r\n if ( pResult != null) {\r\n\t double inv = 1 / dirDotNorm;\r\n\t double t = diffDotNorm * inv;\r\n\t if ( pResultsAsPoint ) {\r\n\t \t// Where is the intersection\r\n\t \tpResult.set( mOrigin )\r\n\t \t.addLocal( mDirection.x * t, mDirection.y * t, mDirection.z * t );\r\n\t } else {\r\n\t // These weights can be used to determine\r\n\t // interpolated values, such as texture coord.\r\n\t // eg. texcoord s,t at intersection point:\r\n\t // s = w0*s0 + w1*s1 + w2*s2;\r\n\t // t = w0*t0 + w1*t1 + w2*t2;\r\n\t double w1 = dirDotDiffxEdge2 * inv;\r\n\t double w2 = dirDotEdge1xDiff * inv;\r\n\t \r\n\t //float w0 = 1.0f - w1 - w2;\r\n\t pResult.set(t, w1, w2);\r\n\t }\r\n }\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n }",
"public double intersect(Ray3D r) {\n\t\tdouble dn = (r.d).dot(n);\n\t\tif (dn==0.0) return Double.POSITIVE_INFINITY;\n\t\tdouble t = (p.subtract(r.p)).dot(n)/dn;\n\t\tif (t > 0) return t;\n\t\telse return Double.POSITIVE_INFINITY;\n\t}",
"static boolean pointInCircumcircle2(PointDouble a, PointDouble b, PointDouble c, PointDouble p) {\n return ((a.x - p.x) * (b.y - p.y) * ((c.x - p.x) * (c.x - p.x) + (c.y - p.y) * (c.y - p.y)) +\n (a.y - p.y) * ((b.x - p.x) * (b.x - p.x) + (b.y - p.y) * (b.y - p.y)) * (c.x - p.x) +\n ((a.x - p.x) * (a.x - p.x) + (a.y - p.y) * (a.y - p.y)) * (b.x - p.x) * (c.y - p.y) -\n ((a.x - p.x) * (a.x - p.x) + (a.y - p.y) * (a.y - p.y)) * (b.y - p.y) * (c.x - p.x) -\n (a.y - p.y) * (b.x - p.x) * ((c.x - p.x) * (c.x - p.x) + (c.y - p.y) * (c.y - p.y)) -\n (a.x - p.x) * ((b.x - p.x) * (b.x - p.x) + (b.y - p.y) * (b.y - p.y)) * (c.y - p.y)) > 0.0;\n }",
"@Override\n\tpublic boolean insideObject(Vector3D p)\n\t{\n\t\treturn (inverse\n\t\t\t\t?(centre.getDifferenceWith(p).getModSquared() > MyMath.square(radius))\n\t\t\t\t:(centre.getDifferenceWith(p).getModSquared() < MyMath.square(radius))\n\t\t\t);\n\t}",
"static PointDouble incircleCenter(PointDouble p1, PointDouble p2, PointDouble p3) {\n // if points are collinear, triangle is degenerate => no incircle center\n if (collinear(p1, p2, p3)) return null;\n\n // Compute the angle bisectors in l1, l2\n double ratio = dist(p1, p2) / dist(p1, p3);\n PointDouble p = translate(p2, scale(vector(p2, p3), ratio / (1 + ratio)));\n Line l1 = pointsToLine(p1, p);\n\n ratio = dist(p2, p1) / dist(p2, p3);\n p = translate(p1, scale(vector(p1, p3), ratio / (1 + ratio)));\n Line l2 = pointsToLine(p2, p);\n\n // Return the intersection of the bisectors\n return intersection(l1, l2);\n }",
"public Point3 intersects(Plane3 p) {\n // All the constants will be the position vector, i.e., some point on the line\n if (intersect.DEBUG) System.out.println(\"Constant Terms: <\" + this.pt + \">\");\n\n // λ coefficients will be all those in the direction vector of the line\n if (intersect.DEBUG) System.out.println(\"λ coefficients: \" + this);\n\n // Plane equation is each component multiplied by the respective normal\n // vector of the plane\n if (intersect.DEBUG) System.out.printf(\"Plane equation: %.1f(%.1f + %.1fλ) + %.1f(%.1f + %.1fλ) + %.1f(%.1f + %.1fλ) = %.3f\\n\", p.v.x, pt.x, this.x, p.v.y, pt.y, this.y, p.v.z, pt.z, this.z, p.d);\n\n // Gather all constant terms from the plane equation\n double constantTerm = (p.v.x * pt.x) + (p.v.y * pt.y) + (p.v.z * pt.z);\n if (intersect.DEBUG) System.out.printf(\"K: %.2f\\t\", constantTerm);\n\n // Gather all λ terms\n double lambdaCoefficient = (p.v.x * this.x) + (p.v.y * this.y) + (p.v.z * this.z);\n if (intersect.DEBUG) System.out.printf(\"K_λ: %.1f\\n\", lambdaCoefficient);\n\n // If the coefficient for lambda is zero, we have a degenerate case\n if (lambdaCoefficient == 0) {\n // If the constant is the same as the actual magnitude of the plane's\n // normal vector, the line lies on the plane\n // Within a margin of error because rounding is a pain in the ass\n if (Math.abs(constantTerm - p.d) < 1e-6)\n intersect.overlapFlag = true;\n\n return null;\n }\n\n // Solve for the unknown, λ.\n double lambda = (p.d - constantTerm) / lambdaCoefficient;\n if (intersect.DEBUG) System.out.printf(\"λ: %.2f\\n\", lambda);\n\n // Plug in λ into the parametric equations for the line to find\n // point of intersection\n double newX = lambda * this.x + pt.x;\n double newY = lambda * this.y + pt.y;\n double newZ = lambda * this.z + pt.z;\n return new Point3(newX, newY, newZ);\n }",
"@Override\n public int octree_function(Object... obj) //public static int\n //o_sphere(\t\t\t/* compute intersection with sphere */\n //\tOBJECT.OBJREC so,\n //\tRAY r\n //)\n {\n OBJECT.OBJREC so = (OBJECT.OBJREC) obj[0];\n RAY r = (RAY) obj[1];\n double a, b, c;\t/* coefficients for quadratic equation */\n double[] root = new double[2];\t/* quadratic roots */\n int nroots;\n double t = 0;\n double[] ap;\n int i;\n\n if (so.oargs.nfargs != 4) {\n//\t\tobjerror(so, USER, \"bad # arguments\");\n }\n ap = so.oargs.farg;\n if (ap[3] < -FVECT.FTINY) {\n//\t\tobjerror(so, WARNING, \"negative radius\");\n so.otype = (short) (so.otype == OTYPES.OBJ_SPHERE\n ? OTYPES.OBJ_BUBBLE : OTYPES.OBJ_SPHERE);\n ap[3] = -ap[3];\n } else if (ap[3] <= FVECT.FTINY) {\n//\t\tobjerror(so, USER, \"zero radius\");\n }\n /*\n *\tWe compute the intersection by substituting into\n * the surface equation for the sphere. The resulting\n * quadratic equation in t is then solved for the\n * smallest positive root, which is our point of\n * intersection.\n *\tSince the ray is normalized, a should always be\n * one. We compute it here to prevent instability in the\n * intersection calculation.\n */\n /* compute quadratic coefficients */\n a = b = c = 0.0;\n for (i = 0; i < 3; i++) {\n a += r.rdir.data[i] * r.rdir.data[i];\n t = r.rorg.data[i] - ap[i];\n b += 2.0 * r.rdir.data[i] * t;\n c += t * t;\n }\n c -= ap[3] * ap[3];\n\n nroots = ZEROES.quadratic(root, a, b, c);\t/* solve quadratic */\n\n for (i = 0; i < nroots; i++) /* get smallest positive */ {\n if ((t = root[i]) > FVECT.FTINY) {\n break;\n }\n }\n if (i >= nroots) {\n return (0);\t\t\t/* no positive root */\n }\n\n if (t >= r.rot) {\n return (0);\t\t\t/* other is closer */\n }\n\n r.ro = so;\n r.rot = t;\n /* compute normal */\n a = ap[3];\n if (so.otype == OTYPES.OBJ_BUBBLE) {\n a = -a;\t\t\t/* reverse */\n }\n for (i = 0; i < 3; i++) {\n r.rop.data[i] = r.rorg.data[i] + r.rdir.data[i] * t;\n r.ron.data[i] = (r.rop.data[i] - ap[i]) / a;\n }\n r.rod = -FVECT.DOT(r.rdir, r.ron);\n r.rox = null;\n r.pert.data[0] = r.pert.data[1] = r.pert.data[2] = 0.0;\n r.uv[0] = r.uv[1] = 0.0;\n\n return (1);\t\t\t/* hit */\n }",
"public static double inCenterRadius(Vector2d v1, Vector2d v2, Vector2d v3){\n\n double area = triangleArea(v1, v2, v3);\n double perimeter = trianglePerimeter(v1, v2, v3);\n\n return 2 * (triangleArea(v1, v2, v3) / trianglePerimeter(v1, v2, v3));\n\n }",
"static S2Point correctIntersectionSign(\n S2Point a0, S2Point a1, S2Point b0, S2Point b1, S2Point intersectionResult) {\n // Make sure the intersection point is on the correct side of the sphere. Since all vertices are\n // unit length, and both edge lengths are less than 180 degrees, (a0 + a1) and (b0 + b1) both\n // have positive dot product with the intersection point. We use the sum of all vertices to\n // make sure that the result is unchanged when the edges are swapped or reversed.\n if (intersectionResult.dotProd(a0.add(a1).add(b0.add(b1))) < 0) {\n intersectionResult = intersectionResult.neg();\n }\n return intersectionResult;\n }",
"public Vector3f getSphereCenter() {\n\t\tfloat[] arr = getMinMax();\n\t\t\n\t\treturn new Vector3f((arr[0]+arr[1])/2,(arr[2]+arr[3])/2,(arr[4]+arr[5])/2);\n\t}",
"public Intersection[] intersectWith(Point3d S, Ray3d c) {\n Intersection[] result = null;\n\n double A = c.getX() * c.getX() + c.getY() * c.getY() + c.getZ() * c.getZ();\n\n double bx = (this.x - S.getX()); //Account for the Sphere's position\n double by = (this.y - S.getY());\n double bz = (this.z - S.getZ());\n\n double B = -(c.getX() * bx + c.getY() * by + c.getZ() * bz);\n\n double r = this.radius * this.radius;\n\n double C = bx * bx + by * by + bz * bz - r;\n\n double D = (B * B - A * C);\n if (D < 0) //no intersection\n {\n return null;\n }\n\n if (D == 0) //'graze' the sphere\n {\n result = new Intersection[1];\n Point3d P = S.plus(c.times(-B / A));\n result[0] = new Intersection(-B / A, this, true, 0, P, new Ray3d(P));\n /****/return null;\n }\n\n result = new Intersection[2];\n int hit = 0;\n\n double t1 = (-B - Math.sqrt(D)) / A;\n if (t1 > 0.00001) //The first hit\n {\n Point3d P = S.plus(c.times(t1));\n Ray3d N = P.minus(new Point3d(this.x, this.y, this.z));\n result[0] = new Intersection(t1, this, true, 0, P, N);\n hit++;\n }\n\n double t2 = (-B / A) + Math.sqrt(D) / A;\n if (t2 > 0.00000001) {\n Point3d P = S.plus(c.times(t2));\n Ray3d N = P.minus(new Point3d(this.x, this.y, this.z));\n result[hit] = new Intersection(t2, this, false, 0, P, N.reverse());\n }\n\n return result;\n }",
"boolean _insideCirc(PVector[] inPts, PVector center, float r) {\n \n for(int i = 0; i < inPts.length; i++){\n // direction of angular relationship to any side must match\n // direction of relationship to opposite side\n if(PVector.dist(inPts[i],center) > r) return false;\n }\n return true;\n }",
"static boolean pointInCircumcircle(PointDouble a, PointDouble b, PointDouble c, PointDouble p) {\n PointDouble circumcenter = circumCircle(a, b, c);\n return circumcenter != null &&\n dist(p, circumcenter) < radiusOfCircumcirle(a, b, c);\n }",
"public boolean isSphereInBox(final Vec3 inP, float fRadius)\n {\n float fDist;\n float fDistSq = 0;\n Vec4 p = m.getInverseSimple().multiply(inP.toPoint());\n\n // Add distance squared from sphere centerpoint to box for each axis\n for (int i = 0; i < 3; i++)\n {\n if (abs(p.get(i)) > extents.get(i))\n {\n fDist = abs(p.get(i)) - extents.get(i);\n fDistSq += fDist * fDist;\n }\n }\n\n\n return (fDistSq <= fRadius * fRadius);\n }",
"PVector _getCenter() {\n PVector cen = new PVector(_hitboxCenter.x, _hitboxCenter.y);\n cen.rotate(_rotVector.heading() - _front);\n cen.x += _x;\n cen.y += _y;\n return cen;\n }",
"public void collision(Ball b){\n float cir_center_X = b.getCenterX();\r\n float cir_center_Y = b.getCenterY();\r\n \r\n // aabb half extent\r\n float extent_X = (this.p4[0]-this.p1[0])/2; //half width\r\n float extent_Y = (this.p3[1]-this.p4[1])/2; // half height\r\n // rec center \r\n float rec_center_X = this.p1[0]+extent_X;\r\n float rec_center_Y = this.p1[1]+extent_Y;\r\n \r\n // difference between center : vector D = Vector Cir_center-Rec-center\r\n float d_X =cir_center_X-rec_center_X;\r\n float d_Y = cir_center_Y-rec_center_Y;\r\n \r\n //\r\n float p_X =Support_Lib.clamp(d_X,-extent_X,extent_X);\r\n float p_Y =Support_Lib.clamp(d_Y,-extent_Y,extent_Y);\r\n \r\n\r\n \r\n float closest_point_X = rec_center_X +p_X;\r\n float closest_point_Y = rec_center_Y +p_Y; \r\n \r\n \r\n d_X = closest_point_X -cir_center_X;\r\n d_Y = closest_point_Y -cir_center_Y;\r\n \r\n \r\n \r\n float length = (float)Math.sqrt((d_X*d_X)+(d_Y*d_Y));\r\n \r\n if(length+0.001 <=b.getRadius()){\r\n\r\n \r\n float ratio =(closest_point_X-rec_center_X)/(extent_X*2);\r\n b.accelartion(ratio);\r\n b.updateVelocity(Support_Lib.direction(d_X,d_Y));\r\n \r\n }\r\n \r\n \r\n }",
"public abstract Vector3D getPointForSurfaceCoordinates(double u, double v);",
"static boolean collinear(PointDouble p, PointDouble q, PointDouble r) {\n return Math.abs(cross(vector(p, q), vector(p, r))) < EPS;\n }",
"public Sphere(Point3D c, double r)\r\n\t{\r\n\t\tsuper(r);\r\n\t\t_center = c;\r\n\t}",
"public boolean intersects(Circle other)\n{\n if (Math.abs(center.x - other.center.x) <= (radius +other.radius) && \n Math.abs(center.y - other.center.y) <= (radius + other.radius))// true calculation needs both radius to\n return true;\n return false;\n}",
"@Override\r\n\tpublic List<GeoPoint> findIntersections(Ray ray) {\r\n\t\tList<GeoPoint> list = new ArrayList<GeoPoint>();\r\n\t\tVector rayDirection = ray.getDirection();\r\n\t\tPoint3D rayPoint = ray.getPOO();\r\n\r\n\t\t// case centerPoint same as the RayPoint\r\n\t\tif (centerPoint.equals(rayPoint)) {\r\n\t\t\tlist.add(new GeoPoint(this, rayPoint.addVector(rayDirection.scale(radius))));\r\n\t\t\treturn list;\r\n\t\t}\r\n\r\n\t\t// u = centerPoint - rayPoint\r\n\t\tVector u = centerPoint.subtract(rayPoint);\r\n\t\t// tm = u * rayDirection\r\n\t\tdouble tm = rayDirection.dotProduct(u);\r\n\t\t// distance = sqrt(|u|^2 - tm^2)\r\n\t\tdouble d = Math.sqrt(u.dotProduct(u) - tm * tm);\r\n\t\t// case the distance is bigger than radius no intersections\r\n\t\tif (d > radius)\r\n\t\t\treturn list;\r\n\r\n\t\t// th = sqrt(R^2 - d^2)\r\n\t\tdouble th = Math.sqrt(radius * radius - d * d);\r\n\r\n\t\tdouble t1 = tm - th;\r\n\t\tdouble t2 = tm + th;\r\n\r\n\t\tif (Util.isZero(t1) || Util.isZero(t2)) {\r\n\t\t\tlist.add(new GeoPoint(this, rayPoint));\r\n\t\t}\r\n\t\tif (Util.isZero(th)) {\r\n\t\t\tlist.add(new GeoPoint(this, rayPoint.addVector(rayDirection.scale(tm))));\r\n\t\t} else {\r\n\t\t\tif (t1 > 0 && !Util.isZero(t1))// one\r\n\t\t\t\tlist.add(new GeoPoint(this, rayPoint.addVector(rayDirection.scale(t1))));\r\n\t\t\tif (t2 > 0 && !Util.isZero(t2)) {// two\r\n\t\t\t\tlist.add(new GeoPoint(this, rayPoint.addVector(rayDirection.scale(t2))));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn list;\r\n\r\n\t}",
"private GPoint findOuterCorner(double r) {\n\t\trIsNegative = false;\n\t\tif (r < 0) rIsNegative = true;\n\t\t//double cornerX = (lastClick.getX() + x)/2.0 - r;\n\t\t//double cornerY = lastClick.getY() - r;\n\t\t//GPoint point = new GPoint(cornerX,cornerY);\n\t\t//return point;\n\t\t//double cornerX = \n\t\tdouble centerX = (centerCircle.getWidth() / 2.0) + centerCircle.getX();\n\t\tdouble centerY = (centerCircle.getHeight() / 2.0) + centerCircle.getY();\n\t\tdouble x;\n\t\tif (!rIsNegative) {\n\t\t\tx = centerX + (centerCircle.getWidth() / 2.0);\n\t\t} else {\n\t\t\tx = centerX + (centerCircle.getWidth() / 2.0) + r*2.0;\n\t\t}\n\t\tdouble y = centerY - Math.abs(r);\n\t\tGPoint point = new GPoint(x,y);\n\t\treturn point;\n\t}",
"static List<PT> CircleLineIntersection(PT a, PT b, PT c, double r) {\r\n\t\tList<PT> ret = new ArrayList<PT>();\r\n\t\tb = b.subtract(a);\r\n\t\ta = a.subtract(c);\r\n\r\n\t\tdouble A = dot(b, b);\r\n\t\tdouble B = dot(a, b);\r\n\t\tdouble C = dot(a, a) - r * r;\r\n\t\tdouble D = B * B - A * C;\r\n\r\n\t\tif (D < -EPS)\r\n\t\t\treturn ret;\r\n\t\tret.add(c.add(a).add(b.multiply((-B + Math.sqrt(D + EPS))).divide(A)));\r\n\t\tif (D > EPS)\r\n\t\t\tret.add(c.add(a.add(b.multiply((-B - Math.sqrt(D))).divide(A))));\r\n\t\treturn ret;\r\n\t}",
"@Override\n public boolean isInView(Vector3d point, double radius)\n {\n if (myLeftClip.isInFront(point, radius) && myRightClip.isInFront(point, radius) && myTopClip.isInFront(point, radius)\n && myBottomClip.isInFront(point, radius))\n {\n Plane earthBisector = new Plane(Vector3d.ORIGIN, myPosition.getLocation());\n if (earthBisector.isInFront(point, radius))\n {\n return true;\n }\n }\n return false;\n }",
"static List<PT> CircleCircleIntersection(PT a, PT b, double r, double R) {\r\n\t\tList<PT> ret = new ArrayList<PT>();\r\n\t\tdouble d = Math.sqrt(dist2(a, b));\r\n\t\tif (d > r + R || d + Math.min(r, R) < Math.max(r, R))\r\n\t\t\treturn ret;\r\n\t\tdouble x = (d * d - R * R + r * r) / (2 * d);\r\n\t\tdouble y = Math.sqrt(r * r - x * x);\r\n\t\tPT v = (b.subtract(a)).divide(d);\r\n\t\tret.add(a.add(v.multiply(x).add(RotateCCW90(v).multiply(y))));\r\n\t\tif (y > 0)\r\n\t\t\tret.add(a.add(v.multiply(x).subtract(RotateCCW90(v).multiply(y))));\r\n\t\treturn ret;\r\n\t}",
"static boolean ccw(PointDouble p, PointDouble q, PointDouble r) {\n return cross(vector(p, q), vector(p, r)) > 0;\n }",
"@Override\n\tpublic RaySceneObjectIntersection getClosestRayIntersection(Ray ray)\n\t{\n\t\tVector3D v=Vector3D.difference(ray.getP(), pointOnAxis);\n\t\tVector3D vP = v.getDifferenceWith(v.getProjectionOnto(normalisedAxisDirection));\t// part of v that's perpendicular to a\n\t\tVector3D dP = ray.getD().getDifferenceWith(ray.getD().getProjectionOnto(normalisedAxisDirection));\t// part of ray.d that's perpendicular to a\n\t\t\n\t\t// coefficients in the quadratic equation for t\n\t\tdouble a = dP.getModSquared();\n\t\t\n\t\tif(a==0.0) return RaySceneObjectIntersection.NO_INTERSECTION;\t// would give division by zero later\n\n\t\tdouble\n\t\t\tb2 = Vector3D.scalarProduct(vP, dP),\t// b/2\n\t\t\tc = vP.getModSquared() - radius*radius,\n\t\t\tdiscriminant4 = b2*b2 - a*c;\t// discriminant/4\n\n\t\t// first check if the discriminant is >0; if it isn't, then there is no intersection at all\n\t\tif(discriminant4 < 0.0) return RaySceneObjectIntersection.NO_INTERSECTION;\n\t\t\n\t\t// okay, the discriminant is positive; take its square root, which is what we actually need\n\t\tdouble sqrtDiscriminant2 = Math.sqrt(discriminant4);\t// sqrt(discriminant)/2\n\t\t\t\n\t\t// calculate the factor t corresponding to the\n\t\t// intersection with the greater t factor;\n\t\t// the further-away intersection is then ray.p + tBigger*ray.d\n\t\tdouble tBigger=((a>0)?(-b2+sqrtDiscriminant2)/a:(-b2-sqrtDiscriminant2)/a);\n\t\t\n\t\t//if tBigger<0, then the intersection with the lesser t factor will have to be even more negative;\n\t\t// therefore, both intersections will be \"behind\" the starting point\n\t\tif(tBigger < 0.0) return RaySceneObjectIntersection.NO_INTERSECTION;\n\n\t\t// calculate the factor tSmaller corresponding to the\n\t\t// intersection with the lesser t factor\n\t\tdouble tSmaller=((a>0)?(-b2-sqrtDiscriminant2)/a:(-b2+sqrtDiscriminant2)/a);\n\n\t\tRay rayAtIntersectionPoint;\n\t\t\n\t\t// first check if the intersection point with the lesser t factor is an option\n\t\tif(tSmaller > 0.0)\n\t\t{\n\t\t\t// the intersection with the lesser t factor lies in front of the starting point, so it might correspond to the intersection point\n\t\t\t\n\t\t\t// calculate the ray advanced to the intersection point\n\t\t\trayAtIntersectionPoint = ray.getAdvancedRay(tSmaller);\n\t\t\t\n\t\t\treturn new RaySceneObjectIntersection(rayAtIntersectionPoint.getP(), this, rayAtIntersectionPoint.getT());\n\t\t}\n\t\t\n\t\t// If the program reaches this point, the intersection with the lesser t factor was not the right intersection.\n\t\t// Now try the intersection point with the greater t factor.\n\t\t\n\t\t// calculate the ray advanced to the intersection point\n\t\trayAtIntersectionPoint = ray.getAdvancedRay(tBigger);\n\n\t\treturn new RaySceneObjectIntersection(rayAtIntersectionPoint.getP(), this, rayAtIntersectionPoint.getT());\n\t}",
"public float intersectsTriangle(Vector3f vertex1, Vector3f vertex2, Vector3f vertex3) {\n\t\tVector3f edge1 = new Vector3f(), edge2 = new Vector3f();\n\n\t\tedge1.sub(vertex2, vertex1);\n\t\tedge2.sub(vertex3, vertex1);\n\n\t\tVector3f nlook = new Vector3f(look);\n\t\tnlook.negate();\n\t\t// Compute the determinant.\n\t\tVector3f directionCrossEdge2 = new Vector3f();\n\t\tdirectionCrossEdge2.cross(nlook, edge2);\n\n\t\tfloat determinant = directionCrossEdge2.dot(edge1);\n\t\t// If the ray and triangle are parallel, there is no collision.\n\t\tif (determinant > -.0000001f && determinant < .0000001f) {\n\t\t\treturn Float.MAX_VALUE;\n\t\t}\n\n\t\tfloat inverseDeterminant = 1.0f / determinant;\n\n\t\t// Calculate the U parameter of the intersection point.\n\t\tVector3f distanceVector = new Vector3f();\n\t\tdistanceVector.sub(position, vertex1);\n\n\t\tfloat triangleU = directionCrossEdge2.dot(distanceVector);\n\t\ttriangleU *= inverseDeterminant;\n\n\t\t// Make sure the U is inside the triangle.\n\t\tif (triangleU < 0 || triangleU > 1) {\n\t\t\treturn Float.MAX_VALUE;\n\t\t}\n\n\t\t// Calculate the V parameter of the intersection point.\n\t\tVector3f distanceCrossEdge1 = new Vector3f();\n\t\tdistanceCrossEdge1.cross(distanceVector, edge1);\n\n\t\tfloat triangleV = nlook.dot(distanceCrossEdge1);\n\t\ttriangleV *= inverseDeterminant;\n\n\t\t// Make sure the V is inside the triangle.\n\t\tif (triangleV < 0 || triangleU + triangleV > 1) {\n\t\t\treturn Float.MAX_VALUE;\n\t\t}\n\n\t\t// Get the distance to the face from our ray origin\n\t\tfloat rayDistance = distanceCrossEdge1.dot(edge2);\n\t\trayDistance *= inverseDeterminant;\n\n\t\t// Is the triangle behind us?\n\t\tif (rayDistance < 0) {\n\t\t\trayDistance *= -1;\n\t\t\treturn Float.MAX_VALUE;\n\t\t}\n\t\treturn rayDistance;\n\t}",
"public boolean\n doIntersection(Ray inOutRay) {\n double t, min_t = Double.MAX_VALUE;\n double x2 = size.x/2; // OJO: Esto deberia venir precalculado\n double y2 = size.y/2; // OJO: Esto deberia venir precalculado\n double z2 = size.z/2; // OJO: Esto deberia venir precalculado\n Vector3D p = new Vector3D();\n GeometryIntersectionInformation info = \n new GeometryIntersectionInformation();\n\n inOutRay.direction.normalize();\n\n // (1) Plano superior: Z = size.z/2\n if ( Math.abs(inOutRay.direction.z) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano Z=size.z/2\n t = (z2-inOutRay.origin.z)/inOutRay.direction.z;\n if ( t > -VSDK.EPSILON ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.x >= -x2 && p.x <= x2 && \n p.y >= -y2 && p.y <= y2 ) {\n info.p = new Vector3D(p);\n min_t = t;\n lastPlane = 1;\n }\n }\n }\n\n // (2) Plano inferior: Z = -size.z/2\n if ( Math.abs(inOutRay.direction.z) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano Z=-size.z/2\n t = (-z2-inOutRay.origin.z)/inOutRay.direction.z;\n if ( t > -VSDK.EPSILON && t < min_t ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.x >= -x2 && p.x <= x2 && \n p.y >= -y2 && p.y <= y2 ) {\n info.p = p;\n min_t = t;\n lastPlane = 2;\n }\n }\n }\n\n // (3) Plano frontal: Y = size.y/2\n if ( Math.abs(inOutRay.direction.y) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano Y=size.y/2\n t = (y2-inOutRay.origin.y)/inOutRay.direction.y;\n if ( t > -VSDK.EPSILON && t < min_t ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.x >= -x2 && p.x <= x2 && \n p.z >= -z2 && p.z <= z2 ) {\n info.p = p;\n min_t = t;\n lastPlane = 3;\n }\n }\n }\n\n // (4) Plano posterior: Y = -size.y/2\n if ( Math.abs(inOutRay.direction.y) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano Y=-size.y/2\n t = (-y2-inOutRay.origin.y)/inOutRay.direction.y;\n if ( t > -VSDK.EPSILON && t < min_t ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.x >= -x2 && p.x <= x2 && \n p.z >= -z2 && p.z <= z2 ) {\n info.p = p;\n min_t = t;\n lastPlane = 4;\n }\n }\n }\n\n // (5) Plano X = size.x/2\n if ( Math.abs(inOutRay.direction.x) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano X=size.x/2\n t = (x2-inOutRay.origin.x)/inOutRay.direction.x;\n if ( t > -VSDK.EPSILON && t < min_t ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.y >= -y2 && p.y <= y2 && \n p.z >= -z2 && p.z <= z2 ) {\n info.p = p;\n min_t = t;\n lastPlane = 5;\n }\n }\n }\n\n // (6) Plano X = -size.x/2\n if ( Math.abs(inOutRay.direction.x) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano X=-size.x/2\n t = (-x2-inOutRay.origin.x)/inOutRay.direction.x;\n if ( t > -VSDK.EPSILON && t < min_t ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.y >= -y2 && p.y <= y2 && \n p.z >= -z2 && p.z <= z2 ) {\n info.p = p;\n min_t = t;\n lastPlane = 6;\n }\n }\n }\n\n if ( min_t < Double.MAX_VALUE ) {\n inOutRay.t = min_t;\n lastInfo.clone(info);\n return true;\n }\n return false;\n }",
"public Vector3d computePlaneIntersection(\r\n\t\tVector3d\t\tpPlaneNormal\r\n\t,\tdouble\t\t\tpPlaneDot\r\n\t,\tVector3d\t\tpResult\r\n\t,\tCSGTempVars\t\tpTempVars\r\n\t,\tCSGEnvironment\tpEnvironment\r\n\t) {\r\n\t\t//Ax + By + Cz + D = 0\r\n\t\t//x = x0 + t(x1 – x0)\r\n\t\t//y = y0 + t(y1 – y0)\r\n\t\t//z = z0 + t(z1 – z0)\r\n\t\t//(x1 - x0) = dx, (y1 - y0) = dy, (z1 - z0) = dz\r\n\t\t//t = -(A*x0 + B*y0 + C*z0 )/(A*dx + B*dy + C*dz)\r\n\t\t\r\n\t\tdouble tolerance = pEnvironment.mEpsilonNearZeroDbl; // TOL;\r\n\t\t\r\n\t\tdouble A = pPlaneNormal.x;\r\n\t\tdouble B = pPlaneNormal.y;\r\n\t\tdouble C = pPlaneNormal.z;\r\n\t\tdouble D = -pPlaneDot;\r\n\t\t\t\r\n\t\tdouble numerator = A*mOrigin.x + B*mOrigin.y + C*mOrigin.z + D;\r\n\t\tdouble denominator = A*mDirection.x + B*mDirection.y + C*mDirection.z;\r\n\t\t\t\t\r\n\t\tif ( Math.abs( denominator ) < tolerance ) {\r\n\t\t\t// Line is parallel to the plane\r\n\t\t\tif( Math.abs( numerator ) < tolerance ) {\r\n\t\t\t\t// Line contained within the plane\r\n\t\t\t\tif ( pResult == null ) {\r\n\t\t\t\t\treturn( mOrigin.clone() );\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn( pResult.set( mOrigin ) );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// No intersection\r\n\t\t\t\treturn( null );\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// Line intersects the plane\r\n\t\t\tdouble t = -numerator/denominator;\r\n\t\t\tpResult = mDirection.mult( t, pResult );\r\n\t\t\tpResult.addLocal( mOrigin );\r\n\t\t\t\r\n\t\t\tif ( pEnvironment.mRationalizeValues ) {\r\n\t\t\t\t// Confirm that the magnitudes of the resultant point are rational\r\n\t\t\t\tCSGEnvironment.rationalizeVector( pResult, pEnvironment.mEpsilonMagnitudeRange );\r\n\t\t\t}\r\n\t\t\treturn pResult;\r\n\t\t}\r\n\t}",
"void vectorFromWorld(double px, double py, double pz, DVector3 result);",
"public Hit hit (final Ray r) {\n\n final double a;\n final double b;\n final double cNor;\n final double t1;\n final double t2;\n final double d;\n final Point3 p;\n\n b = r.d.dot((r.o.sub(c)).mul(2));\n a = r.d.dot(r.d);\n cNor = r.o.sub(c).dot(r.o.sub(c))-(this.r*this.r);\n d = (b * b) - (4 * a * cNor);\n\n if(d > 0) {\n\n t1 = (-b + Math.sqrt(d)) / (2 * a);\n t2 = (-b - Math.sqrt(d)) / (2 * a);\n\n if (t1 >= 0 & t2 >= 0) {\n\n p = r.at(Math.min(t1, t2));\n\n return new Hit(Math.min(t1, t2), r, this,p.sub(c).normalized().asNormal(),texFor(p) );\n\n }else if (t1 >= 0){\n\n return new Hit(t1,r,this, r.at(t1).sub(c).normalized().asNormal(),texFor(r.at(t1)));\n\n }else if(t2 >= 0) {\n\n return new Hit(t2, r, this, r.at(t2).sub(c).normalized().asNormal(),texFor(r.at(t2)));\n }\n }else if (d == 0){\n\n final double t3;\n t3 = -b / (2 * a);\n\n if (t3 >= 0){\n\n return new Hit(t3, r, this, r.at(t3).sub(c).normalized().asNormal(), texFor(r.at(t3)));\n\n }\n }\n\n return null;\n }",
"public Point centeroid ()\r\n {\r\n return new Point ((v1.getX()+v2.getX()+v3.getX())/3,(v1.getY()+v2.getY()+v3.getY())/3);\r\n }",
"private GPoint findCenterCorner(double r, double x, double y) {\n\t\tdouble cornerX = (lastClick.getX() + x)/2.0 - r;\n\t\tdouble cornerY = lastClick.getY() - r;\n\t\tGPoint point = new GPoint(cornerX,cornerY);\n\t\treturn point;\n\t}",
"public double findRayIntersection(Vec3 origin, Vec3 direction, Vec3 normal)\n {\n double scale = width/obj.getScale();\n double ox = origin.x*scale+0.5*width;\n double oy = origin.y*scale+0.5*width;\n double oz = origin.z*scale+0.5*width;\n double dx = direction.x;\n double dy = direction.y;\n double dz = direction.z;\n\n // Find the intersection of the ray with the bounding box.\n\n double mint = -Double.MAX_VALUE;\n double maxt = Double.MAX_VALUE;\n if (dx == 0.0)\n {\n if (ox < minx || ox > maxx)\n return 0.0;\n }\n else\n {\n double t1 = (minx-ox)/dx;\n double t2 = (maxx-ox)/dx;\n if (t1 < t2)\n {\n if (t1 > mint)\n mint = t1;\n if (t2 < maxt)\n maxt = t2;\n }\n else\n {\n if (t2 > mint)\n mint = t2;\n if (t1 < maxt)\n maxt = t1;\n }\n if (mint > maxt || maxt < 0.0)\n return 0.0;\n }\n if (dy == 0.0)\n {\n if (oy < miny || oy > maxy)\n return 0.0;\n }\n else\n {\n double t1 = (miny-oy)/dy;\n double t2 = (maxy-oy)/dy;\n if (t1 < t2)\n {\n if (t1 > mint)\n mint = t1;\n if (t2 < maxt)\n maxt = t2;\n }\n else\n {\n if (t2 > mint)\n mint = t2;\n if (t1 < maxt)\n maxt = t1;\n }\n if (mint > maxt || maxt < 0.0)\n return 0.0;\n }\n if (dz == 0.0)\n {\n if (oz < minz || oz > maxz)\n return 0.0;\n }\n else\n {\n double t1 = (minz-oz)/dz;\n double t2 = (maxz-oz)/dz;\n if (t1 < t2)\n {\n if (t1 > mint)\n mint = t1;\n if (t2 < maxt)\n maxt = t2;\n }\n else\n {\n if (t2 > mint)\n mint = t2;\n if (t1 < maxt)\n maxt = t1;\n }\n if (mint > maxt || maxt < 0.0)\n return 0.0;\n }\n if (mint < 0.0)\n mint = 0.0;\n\n // Find the first voxel and initialize variables.\n\n double xpos = ox+mint*dx;\n double ypos = oy+mint*dy;\n double zpos = oz+mint*dz;\n int x = Math.max(Math.min((int) xpos, maxx), minx);\n int y = Math.max(Math.min((int) ypos, maxy), miny);\n int z = Math.max(Math.min((int) zpos, maxz), minz);\n int stepx, stepy, stepz;\n int finalx, finaly, finalz;\n double tdeltax, tdeltay, tdeltaz;\n double tmaxx, tmaxy, tmaxz;\n if (dx < 0.0)\n {\n stepx = -1;\n finalx = minx-1;\n tdeltax = -1.0/dx;\n tmaxx = (x-ox)/dx;\n }\n else if (dx > 0.0)\n {\n stepx = 1;\n finalx = maxx+1;\n tdeltax = 1.0/dx;\n tmaxx = (x+1-ox)/dx;\n }\n else\n {\n stepx = 0;\n finalx = 0;\n tdeltax = 0.0;\n tmaxx = Double.MAX_VALUE;\n }\n if (dy < 0.0)\n {\n stepy = -1;\n finaly = miny-1;\n tdeltay = -1.0/dy;\n tmaxy = (y-oy)/dy;\n }\n else if (dy > 0.0)\n {\n stepy = 1;\n finaly = maxy+1;\n tdeltay = 1.0/dy;\n tmaxy = (y+1-oy)/dy;\n }\n else\n {\n stepy = 0;\n finaly = 0;\n tdeltay = 0.0;\n tmaxy = Double.MAX_VALUE;\n }\n if (dz < 0.0)\n {\n stepz = -1;\n finalz = minz-1;\n tdeltaz = -1.0/dz;\n tmaxz = (z-oz)/dz;\n }\n else if (dz > 0.0)\n {\n stepz = 1;\n finalz = maxz+1;\n tdeltaz = 1.0/dz;\n tmaxz = (z+1-oz)/dz;\n }\n else\n {\n stepz = 0;\n finalz = 0;\n tdeltaz = 0.0;\n tmaxz = Double.MAX_VALUE;\n }\n\n // Step through the voxels, looking for intersections.\n\n VoxelOctree voxels = obj.getVoxels();\n byte values[] = new byte[8];\n while (true)\n {\n int index = x*width*width+y*width+z;\n if ((flags[index/32]&(1<<(index%32))) != 0)\n {\n // There is a piece of the surface in this voxel, so see if the ray intersects it.\n // First find the values of t at which the ray enters and exits it.\n \n double tenter = -Double.MAX_VALUE;\n double texit = Double.MAX_VALUE;\n if (dx != 0.0)\n {\n double t1 = (x-ox)/dx;\n double t2 = (x+1-ox)/dx;\n if (t1 < t2)\n {\n if (t1 > tenter)\n tenter = t1;\n if (t2 < texit)\n texit = t2;\n }\n else\n {\n if (t2 > tenter)\n tenter = t2;\n if (t1 < texit)\n texit = t1;\n }\n }\n if (dy != 0.0)\n {\n double t1 = (y-oy)/dy;\n double t2 = (y+1-oy)/dy;\n if (t1 < t2)\n {\n if (t1 > tenter)\n tenter = t1;\n if (t2 < texit)\n texit = t2;\n }\n else\n {\n if (t2 > tenter)\n tenter = t2;\n if (t1 < texit)\n texit = t1;\n }\n }\n if (dz != 0.0)\n {\n double t1 = (z-oz)/dz;\n double t2 = (z+1-oz)/dz;\n if (t1 < t2)\n {\n if (t1 > tenter)\n tenter = t1;\n if (t2 < texit)\n texit = t2;\n }\n else\n {\n if (t2 > tenter)\n tenter = t2;\n if (t1 < texit)\n texit = t1;\n }\n }\n if (tenter < 0.0)\n continue; // Ignore intersections in the voxel containing the origin.\n\n // Look up the values at the eight corners of the voxel.\n\n values[0] = voxels.getValue(x, y, z);\n values[1] = voxels.getValue(x, y, z+1);\n values[2] = voxels.getValue(x, y+1, z);\n values[3] = voxels.getValue(x, y+1, z+1);\n values[4] = voxels.getValue(x+1, y, z);\n values[5] = voxels.getValue(x+1, y, z+1);\n values[6] = voxels.getValue(x+1, y+1, z);\n values[7] = voxels.getValue(x+1, y+1, z+1);\n\n // Find the positions within the voxel where the ray enters and exits.\n\n double xenter = ox+dx*tenter-x;\n double yenter = oy+dy*tenter-y;\n double zenter = oz+dz*tenter-z;\n double xexit = ox+dx*texit-x;\n double yexit = oy+dy*texit-y;\n double zexit = oz+dz*texit-z;\n\n // Interpolate the find the values at those points.\n\n double enterValue = values[0]*(1.0-xenter)*(1.0-yenter)*(1.0-zenter)\n +values[1]*(1.0-xenter)*(1.0-yenter)*zenter\n +values[2]*(1.0-xenter)*yenter*(1.0-zenter)\n +values[3]*(1.0-xenter)*yenter*zenter\n +values[4]*xenter*(1.0-yenter)*(1.0-zenter)\n +values[5]*xenter*(1.0-yenter)*zenter\n +values[6]*xenter*yenter*(1.0-zenter)\n +values[7]*xenter*yenter*zenter;\n double exitValue = values[0]*(1.0-xexit)*(1.0-yexit)*(1.0-zexit)\n +values[1]*(1.0-xexit)*(1.0-yexit)*zexit\n +values[2]*(1.0-xexit)*yexit*(1.0-zexit)\n +values[3]*(1.0-xexit)*yexit*zexit\n +values[4]*xexit*(1.0-yexit)*(1.0-zexit)\n +values[5]*xexit*(1.0-yexit)*zexit\n +values[6]*xexit*yexit*(1.0-zexit)\n +values[7]*xexit*yexit*zexit;\n if ((enterValue > 0 && exitValue <= 0) || (enterValue <= 0 && exitValue > 0))\n {\n // Find the intersection point.\n\n double weight1 = Math.abs(exitValue);\n double weight2 = Math.abs(enterValue);\n double d = 1.0/(weight1+weight2);\n weight1 *= d;\n weight2 *= d;\n double tintersect = (tenter*weight1 + texit*weight2)/scale;\n if (normal != null)\n {\n normal.set(values[0]+values[1]+values[2]+values[3]-values[4]-values[5]-values[6]-values[7],\n values[0]+values[1]-values[2]-values[3]+values[4]+values[5]-values[6]-values[7],\n values[0]-values[1]+values[2]-values[3]+values[4]-values[5]+values[6]-values[7]);\n normal.normalize();\n }\n return tintersect;\n }\n }\n\n // Advance to the next voxel.\n\n if (tmaxx < tmaxy)\n {\n if (tmaxx < tmaxz)\n {\n x += stepx;\n if (x == finalx)\n return 0.0;\n tmaxx += tdeltax;\n }\n else\n {\n z += stepz;\n if (z == finalz)\n return 0.0;\n tmaxz += tdeltaz;\n }\n }\n else\n {\n if (tmaxy < tmaxz)\n {\n y += stepy;\n if (y == finaly)\n return 0.0;\n tmaxy += tdeltay;\n }\n else\n {\n z += stepz;\n if (z == finalz)\n return 0.0;\n tmaxz += tdeltaz;\n }\n }\n }\n }",
"protected SphereRayIntersection(Point3D point, double distance, boolean outer, Sphere sphere) {\n\t\t\tsuper(point, distance, outer);\n\t\t\tthis.sphere = sphere;\n\t\t}",
"public abstract Point_3 evaluate(double u, double v);",
"@JsMethod\n public native Cartographic findIntersectionWithLatitude(double intersectionLatitude, Cartographic result);",
"public Vec2 getCenter()\n {\n int numTriangles = numPoints - 2;\n\n // Calculate the average midpoint of each composite triangle\n Vec2 averageMidpoint = new Vec2(0, 0);\n float area = 0;\n for (int i=0; i<numTriangles; i++)\n {\n Triangle t = new Triangle(points[0], points[i+1], points[i+2]);\n Vec2 triangleMidpoint = t.getCenter();\n float triangleArea = t.getArea();\n\n averageMidpoint.addX(triangleMidpoint.getX() * triangleArea);\n averageMidpoint.addY(triangleMidpoint.getY() * triangleArea);\n\n area += triangleArea;\n\n// Color color;\n// if (i==0) color = Color.GREEN;\n// else color = Color.ORANGE;\n// SumoGame.ADD_DEBUG_DOT(points[0].getX(), points[0].getY(), 5, color);\n// SumoGame.ADD_DEBUG_DOT(points[i+1].getX(), points[i+1].getY(), 5, color);\n// SumoGame.ADD_DEBUG_DOT(points[i+2].getX(), points[i+2].getY(), 5, color);\n// SumoGame.ADD_DEBUG_DOT(triangleMidpoint.getX(), triangleMidpoint.getY(), triangleArea/2000, color);\n }\n\n averageMidpoint.div(area);\n\n// SumoGame.ADD_DEBUG_DOT(averageMidpoint.getX(), averageMidpoint.getY(), 20, Color.RED);\n\n return averageMidpoint;\n }",
"static PT ComputeCircleCenter(PT a, PT b, PT c) {\r\n\t\tb = (a.add(b)).divide(2);\r\n\t\tc = (a.add(c)).divide(2);\r\n\t\treturn ComputeLineIntersection(b, b.add(RotateCW90(a.subtract(b))), c, c.add(RotateCW90(a.subtract(c))));\r\n\t}",
"public boolean blocks(Point3d S, Ray3d c) {\n double A = c.getX() * c.getX() + c.getY() * c.getY() + c.getZ() * c.getZ();\n\n double bx = (this.x - S.getX()); //Account for the Sphere's position\n double by = (this.y - S.getY());\n double bz = (this.z - S.getZ());\n double B = -(c.getX() * bx + c.getY() * by + c.getZ() * bz);\n double r = this.radius * this.radius;\n double C = bx * bx + by * by + bz * bz - r;\n\n double D = (B * B - A * C);\n if (D < 0) //no intersection\n {\n return false;\n }\n\n if (D == 0) //'graze' the sphere\n {\n /****/return false;\n }\n\n double t1 = (-B - Math.sqrt(D)) / A;\n if (t1 > 0.00001 && t1 < 1.0) //The first hit\n {\n return true; //But need to check if it's less than 1, also!\n }\n\n double t2 = (-B / A) + Math.sqrt(D) / A;\n if (t2 > 0.00000001 && t2 < 1.0) {\n return true;\n }\n\n return false;\n }",
"public Vect3d getCenter (){\r\n Vect3d v = new Vect3d();\r\n v.x = (min.x + max.x) / 2;\r\n v.y = (min.y + max.y) / 2;\r\n v.z = (min.z + max.z) / 2;\r\n return v;\r\n }",
"public static E3DVector3F checkTriangleCollision(E3DTriangle colliderTriangle, E3DVector3F startPos, E3DVector3F endPos, E3DTriangle collideeTriangle)\r\n {\r\n E3DVector3F translateAmt = endPos.subtract(startPos);\r\n\r\n E3DVector3F intersectionPt[] = new E3DVector3F[3];\r\n E3DVector3F colliderPts[] = new E3DVector3F[]{colliderTriangle.getVertexPosA(), colliderTriangle.getVertexPosB(), colliderTriangle.getVertexPosC()};\r\n int i=0;\r\n \r\n //get all the intersection for the vertices of the colliderTriangle\r\n for(i=0; i<3; i++)\r\n intersectionPt[i] = collideeTriangle.checkSegmentCollision(colliderPts[i], colliderPts[i].add(translateAmt));\r\n \r\n E3DVector3F closestIntersection = null;\r\n double closestDistance = 0.0, checkDistance = 0.0;\r\n for(i=0; i<3; i++)\r\n {\r\n if(intersectionPt[i] != null)\r\n {\r\n if(closestIntersection == null) //first one\r\n {\r\n closestIntersection = intersectionPt[i];\r\n closestDistance = colliderPts[i].subtract(intersectionPt[i]).getLengthSquared();\r\n }\r\n else\r\n {\r\n checkDistance = colliderPts[i].subtract(intersectionPt[i]).getLengthSquared();\r\n if(checkDistance < closestDistance)\r\n {\r\n closestDistance = checkDistance;\r\n closestIntersection = intersectionPt[i];\r\n }\r\n \r\n }\r\n }\r\n }\r\n \r\n return closestIntersection;\r\n }",
"public static double volumeOfSphere(double r) {\n double v = 4.0 / 3.0 * Math.PI * Math.pow(r, 3);\n v = (double) Math.round(v * 100) / 100;\n return v;\n }",
"void getPosRelPoint(double px, double py, double pz, DVector3 result);",
"public static void main(String[] args){\n Mesh3D box = Mesh3D.box(10, 20, 60);\n \n Line3D lineX = box.getLineX();\n Line3D lineY = box.getLineY();\n Line3D lineZ = box.getLineZ();\n lineX.show();\n lineY.show();\n lineZ.show();\n box.translateXYZ(100, 0.0, 0.0); \n box.show();\n Line3D line = new Line3D(); \n List<Point3D> intersects = new ArrayList<Point3D>();\n \n for(int p = 0; p < 100; p++){\n double r = 600;\n double theta = Math.toRadians(90.0);//Math.toRadians(Math.random()*180.0);\n double phi = Math.toRadians(Math.random()*360.0-180.0);\n line.set(0.0,0.0,0.0, \n Math.sin(theta)*Math.cos(phi)*r,\n Math.sin(theta)*Math.sin(phi)*r,\n Math.cos(theta)*r\n );\n intersects.clear();\n box.intersectionRay(line, intersects);\n System.out.println(\"theta/phi = \" + Math.toDegrees(theta) + \" \"\n + Math.toDegrees(phi) + \" intersects = \" + intersects.size());\n \n }\n }",
"boolean _circSeg(PVector center, float r, PVector a, PVector b) {\n PVector ab = PVector.sub(b,a);\n PVector abPerp = (new PVector(-ab.y, ab.x)).normalize().mult(r);\n \n PVector[] limits = new PVector[]{\n PVector.add(a,abPerp), // move perpendicular to the segment by\n PVector.sub(a,abPerp), // distance r from each of the endpoints,\n PVector.sub(b,abPerp), // forming a bounding rectangle\n PVector.add(b,abPerp)\n };\n \n return _ptPoly(center, limits);\n }",
"private static Coord findCoordinate(Coord p0, Coord p1, Coord p2, double r0, double r1, double r2){\r\n\r\n\tdouble x0, y0, x1, y1, x2, y2;\r\n\tx0 = p0.getX(); y0 = p0.getY();\r\n\tx1 = p1.getX(); y1 = p1.getY();\r\n\tx2 = p2.getX(); y2 = p2.getY();\r\n\t//core.Debug.p(\"x0:\" + x0 + \",y0:\" + y0 + \",r0:\" + r0);\r\n\t//core.Debug.p(\"x1:\" + x1 + \",y1:\" + y1 + \",r1:\" + r1);\r\n\t//core.Debug.p(\"x2:\" + x2 + \",y2:\" + y2 + \",r2:\" + r2);\r\n\tdouble a, dx, dy, d, h, rx, ry;\r\n\tdouble point2_x, point2_y;\r\n\r\n\t/* dx and dy are the vertical and horizontal distances between\r\n\t * the circle centers.\r\n\t */\t\r\n\tdx = x1 - x0;\r\n\tdy = y1 - y0;\r\n\r\n\t/* Determine the straight-line distance between the centers. */\r\n\td = Math.sqrt((dy*dy) + (dx*dx));\r\n\r\n\t/* Check for solvability. */\r\n\tif (d > (r0 + r1)){\r\n\t\t/* no solution. circles do not intersect. */\r\n\t\t//core.Debug.p(\"no solution1\");\r\n\t\treturn null;\r\n\t}\r\n\tif (d < Math.abs(r0 - r1)){\r\n\t\t/* no solution. one circle is contained in the other */\r\n\t\t//core.Debug.p(\"no solution2\");\r\n\t\treturn null;\r\n\t}\r\n\r\n\t/* 'point 2' is the point where the line through the circle\r\n\t * intersection points crosses the line between the circle\r\n\t * centers.\r\n\t */\r\n\r\n\t/* Determine the distance from point 0 to point 2. */\r\n\ta = ((r0*r0) - (r1*r1) + (d*d)) / (2.0 * d) ;\r\n\r\n\t/* Determine the coordinates of point 2. */\r\n\tpoint2_x = x0 + (dx * a/d);\r\n\tpoint2_y = y0 + (dy * a/d);\r\n\r\n\t/* Determine the distance from point 2 to either of the\r\n\t * intersection points.\r\n\t */\t\r\n\th = Math.sqrt((r0*r0) - (a*a));\r\n\r\n\t/* Now determine the offsets of the intersection points from\r\n\t * point 2.\r\n\t */\r\n\trx = -dy * (h/d);\r\n\try = dx * (h/d);\r\n\r\n\t/* Determine the absolute intersection points. */\r\n\tdouble intersectionPoint1_x = point2_x + rx;\r\n\tdouble intersectionPoint2_x = point2_x - rx;\r\n\tdouble intersectionPoint1_y = point2_y + ry;\r\n\tdouble intersectionPoint2_y = point2_y - ry;\r\n\r\n\t/* Lets determine if circle 3 intersects at either of the above intersection points. */\r\n\tdx = intersectionPoint1_x - x2;\r\n\tdy = intersectionPoint1_y - y2;\r\n\tdouble d1 = Math.sqrt((dy*dy) + (dx*dx));\r\n\r\n\tdx = intersectionPoint2_x - x2;\r\n\tdy = intersectionPoint2_y - y2;\r\n\tdouble d2 = Math.sqrt((dy*dy) + (dx*dx));\r\n\r\n\t//core.Debug.p(\"d1: \" + d1 + \", d2: \" + d2 + \", r2: \" + r2);\r\n\t//core.Debug.p(\"diff1: \" + Math.abs(d1-r2));\r\n\t//core.Debug.p(\"point1: (\" + intersectionPoint1_x + \", \" + intersectionPoint1_y + \")\");\r\n\t//core.Debug.p(\"diff2: \" + Math.abs(d2-r2));\r\n\t//core.Debug.p(\"point2: (\" + intersectionPoint2_x + \", \" + intersectionPoint2_y + \")\");\r\n\r\n\r\n\tif(Math.abs(d1 - r2) < EPSILON) {\r\n\t\t//core.Debug.p(\"point: (\" + intersectionPoint1_x + \", \" + intersectionPoint1_y + \")\");\r\n\t\treturn new Coord(intersectionPoint1_x, intersectionPoint1_y);\r\n\t}\r\n\telse if(Math.abs(d2 - r2) < EPSILON) {\r\n\t\t//core.Debug.p(\"point: (\" + intersectionPoint2_x + \", \" + intersectionPoint2_y + \")\");\r\n\t\treturn new Coord(intersectionPoint2_x, intersectionPoint2_y);}\r\n\telse {\r\n\t\t//core.Debug.p(\"no intersection\");\r\n\t\treturn null;\r\n\t}\r\n}",
"@Override\n public List<GeoPoint> findGeoIntersections(Ray ray , double maxDistance) {\n Point3D P0 = ray.getP0();\n Vector v = ray.getDir();\n\n if (P0.equals(_center)) {\n return List.of(new GeoPoint(this,_center.add(v.scale(_radius))));\n }\n\n Vector U = _center.subtract(P0);\n\n double tm = alignZero(v.dotProduct(U));\n double d = alignZero(Math.sqrt(U.lengthSquared() - tm * tm));\n\n // no intersections : the ray direction is above the sphere\n if (d >= _radius) {\n return null;\n }\n\n double th = alignZero(Math.sqrt(_radius * _radius - d * d));\n double t1 = alignZero(tm - th);\n double t2 = alignZero(tm + th);\n boolean validT1=alignZero(t1 - maxDistance ) <=0;\n boolean validT2=alignZero( t2 - maxDistance )<=0;\n if (t1>0 && t2>0 && validT1 && validT2) {\n Point3D P1 =ray.getPoint(t1);\n Point3D P2 =ray.getPoint(t2);\n return List.of(new GeoPoint(this,P1),new GeoPoint(this, P2));\n }\n if (t1>0 && validT1){\n Point3D P1 =ray.getPoint(t1);\n return List.of(new GeoPoint(this,P1));\n }\n if (t2>0 && validT2) {\n Point3D P2 =ray.getPoint(t2);\n return List.of(new GeoPoint(this,P2));\n }\n return null;\n }",
"public boolean intersects(Vector3d center, double radius) {\r\n return intersects(this.getCurrentCollisionCenter(), this.boundingSphereRadius, center, radius);\r\n }",
"private Point findCenter(MatOfPoint2f triangle) {\n\t\t// Find moments for the triangle.\n\t\tMoments moments = Imgproc.moments(triangle);\n\t\t\n\t\t// Create point and set x, and y positions.\n\t\tPoint center = new Point();\n\t\tcenter.x = moments.get_m10() / moments.get_m00();\n\t\tcenter.y = moments.get_m01() / moments.get_m00();\n\t\t\n\t\t// Return the found center point.\n\t\treturn center;\n\t}",
"private Point findCenter(MatOfPoint2f triangle) {\n\t\t// Find moments for the triangle.\n\t\tMoments moments = Imgproc.moments(triangle);\n\t\t\n\t\t// Create point and set x, and y positions.\n\t\tPoint center = new Point();\n\t\tcenter.x = moments.get_m10() / moments.get_m00();\n\t\tcenter.y = moments.get_m01() / moments.get_m00();\n\t\t\n\t\t// Return the found center point.\n\t\treturn center;\n\t}",
"@Override\n\tpublic RaySceneObjectIntersection getClosestRayIntersection(Ray ray)\n\t{\t\t//this is calculating the \"term under the square root\"\n\t\tVector3D v=Vector3D.difference(ray.getP(), centre);\t\t\t\t\t\t//which must be greater than 0 for intersection\n\n\t\t// coefficients in the quadratic equation for t\n\t\tdouble \n\t\tquadraticA = ray.getD().getModSquared(),\n\t\tquadraticB2 = Vector3D.scalarProduct(v, ray.getD()),\t// b/2\n\t\tquadraticC = v.getModSquared() - MyMath.square(radius);\n\n\t\t// discriminant/2\n\t\tdouble discriminant2 = quadraticB2*quadraticB2-quadraticA*quadraticC;\n\n\n\t\tif(discriminant2<0.0) {\n\t\t\t//returns NaN if there is no intersection\n\t\t\treturn RaySceneObjectIntersection.NO_INTERSECTION;\n\t\t}\n\n\t\tdouble t1=(-quadraticB2+Math.sqrt(discriminant2))/quadraticA;\n\n\t\tif(t1<0.0) {\n\t\t\t//if t1<0 then t2 must be less than zero\n\t\t\treturn RaySceneObjectIntersection.NO_INTERSECTION;\n\t\t}\n\n\t\tdouble t2=(-quadraticB2-Math.sqrt(discriminant2))/quadraticA;\n\t\t\n\t\tRay rayAtIntersectionPoint = ray.getAdvancedRay((t2<0.0)?t1:t2);\n\n\t\treturn new RaySceneObjectIntersection(\n\t\t\t\trayAtIntersectionPoint.getP(),\n\t\t\t\tthis,\n\t\t\t\trayAtIntersectionPoint.getT()\n\t\t\t);\n\t}",
"boolean hasVector3Value();",
"public List<Point3D> FindIntersections(Ray ray) throws Exception\n {\n List<Point3D> ListInter = new LinkedList<Point3D>();\n\n //find P0\n Point3D P0 = new Point3D(ray.getPOO());\n\n //find the triangle's Normal\n Vector N = this.getNormal(this.getP1());\n\n //find Plane\n Plane plane = new Plane(N, this.getP3());\n\n //if the intersection between the ray and plane\n List<Point3D> ListIntersectionPlane = plane.FindIntersections(ray);\n\n if(ListIntersectionPlane.isEmpty())\n return ListInter;\n\n Point3D intersectionPlane = ListIntersectionPlane.get(0);\n\n //defin Vector P_P0\n Vector P_P0 = new Vector(P0, intersectionPlane);\n\n //checking side 1-2\n Vector V1_1 = new Vector(P0, this._p1);\n Vector V2_1 = new Vector(P0, this._p2);\n Vector N1 = new Vector(V1_1.crossProduct(V2_1));\n N1.normalize();\n double S1 = -P_P0.dotProduct(N1);\n\n //checking side 2-3\n Vector V1_2 = new Vector(P0, this._p2);\n Vector V2_2 = new Vector(P0, this._p3);\n Vector N2 = new Vector(V1_2.crossProduct(V2_2));\n N2.normalize();\n double S2 = -P_P0.dotProduct(N2);\n\n //checking side 3-1\n Vector V1_3 = new Vector(P0, this._p3);\n Vector V2_3 = new Vector(P0, this._p1);\n Vector N3 = new Vector(V1_3.crossProduct(V2_3));\n N3.normalize();\n double S3 = -P_P0.dotProduct(N3);\n\n if (((S1 > 0) && (S2 > 0) && (S3 > 0)) || ((S1 < 0) && (S2 < 0) && (S3 < 0)))\n ListInter.add(intersectionPlane);\n return ListInter;\n\n }",
"public Vector projection(Vector b){\n Vector result = new Vector();\n result.norm= (this.x*b.x+this.y*b.y) / b.getNorm();\n result.x = b.x/b.getNorm();\n result.y = b.y/b.getNorm();\n return result;\n }",
"public boolean intersectsSegment(Vector a, Vector b, double R){\r\n\t\tif(floor && !obstructed())\r\n\t\t\treturn false;\r\n\t\t\r\n\t\tVector[] p = getCardinalPoints();\r\n\t\t\r\n\t\tfor(int i = 0; i < 4; i++){\r\n\t\t\tVector c = p[i];\r\n\t\t\tVector d = p[(i+1)%4];\r\n\t\t\tif(Geometry.segmentIntersect(a, b, c, d) || Geometry.plsDist(a, b, p[i]) <= R)\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Test\n public void testCosineSimilarity() {\n SimilarityFunctions s = new SimilarityFunctions();\n\n double[] vector1 = new double[]{1, 2, 3};\n double[] vector2 = new double[]{2, 6, 3};\n double[] vector3 = new double[]{0, 1, 2};\n double[] vector4 = new double[]{2, 0, 0, 0};\n double[] vector5 = new double[]{1, 2.4, 3.9, 1};\n double[] vector6 = new double[]{1};\n double[] vector7 = new double[]{-1};\n\n assertEquals(0.8781440805693944, s.cosineSimilarity(vector1, vector2), .001);\n assertEquals(0.9561828874675149, s.cosineSimilarity(vector1, vector3), .001);\n assertEquals(0.7666518779999278, s.cosineSimilarity(vector2, vector3), .001);\n assertEquals(0.20865053489458874, s.cosineSimilarity(vector4, vector5), .001);\n assertEquals(-1.0, s.cosineSimilarity(vector6, vector7), .001);\n }",
"private Point3 _getIntersection(Point3 eye, Point3 direction) {\n int size = NORMALS.length;\n float tresult;\n Point4 norm; // normal of face hit\n Plane plane; // plane equation\n float tnear, tfar, t, vn, vd;\n int front = 0, back = 0; // front/back face # hit\n\n tnear = -1.0e+20f; // -HUGE_VAL\n tfar = +1.0e+20f; // tmax\n for (int i = 0; i < size; i++) {\n\n plane = _planes[i];\n\n vd = plane.dot(direction);\n vn = plane.distance(eye);\n if (vd == 0.0f) {\n // ray is parallel to plane -\n // check if ray origin is inside plane's\n // half-space\n if (vn < 0.0f) {\n return null;\n }\n\n } else {\n // ray not parallel - get distance to plane\n t = -vn / vd;\n if (vd > 0.0f) {\n\n if (t > tfar) {\n return null;\n }\n if (t > tnear) {\n // hit near face, update normal\n front = i;\n tnear = t;\n }\n } else {\n // back face - T is a far point\n\n if (t < tnear) {\n return null;\n }\n if (t < tfar) {\n // hit far face, update normal\n\n back = i;\n tfar = t;\n }\n }\n }\n }\n // survived all tests\n // Note: if ray originates on polyhedron,\n // may want to change 0.0 to some\n // epsilon to avoid intersecting the originating face.\n //\n if (tnear >= 0.0f) {\n // outside, hitting front face\n norm = _planes[front]._normal;\n tresult = tnear;\n return Point3.addition(eye, direction.scaled(tresult));\n } else {\n if (tfar < 1.0e+20f) {\n // inside, hitting back face\n norm = _planes[back]._normal;\n tresult = tfar;\n return Point3.addition(eye, direction.scaled(tresult));\n } else {\n // inside, but back face beyond tmax//\n return null;\n }\n }\n }",
"public Point sphereCoords(double r, double phi, double theta) {\n\t\t\n\t\tx = r*Math.sin(phi)*Math.cos(theta);\n\t\ty = r*Math.sin(phi)*Math.sin(theta);\n\t\tz = r*Math.cos(phi);\n\t\treturn this;\n\t}",
"public static void getPerpendicular(Vector3 result, Vector3 v)\n\t{\n\t\tif (Math.abs(v.x) < Math.abs(v.y)) {\n\t\t\tresult.set(0, v.z, -v.y);\n\t\t} else {\n\t\t\tresult.set(-v.z, 0, v.x);\n\t\t}\n\t}",
"public boolean contains(Vector3D point) {\n\n int x = 0;\n int y = 1;\n int z = 2;\n\n double ox = point.getX();\n double oy = point.getY();\n double oz = point.getZ();\n\n Vector3D d = Util.Math.randomDir();\n double dx = d.getX();\n double dy = d.getY();\n double dz = d.getZ();\n\n double epsilon = 1e-12;\n\n cacheVerticesAndFaces();\n int vis = this.mesh.getVertexFormat().getVertexIndexSize();\n HashSet<Double> ts = new HashSet<>();\n\n for (int i = 0; i < faces.length; i += 6) {\n // test ray \"going out\" first\n double t = Util.Math.rayTriangleIntersect(ox, oy, oz, dx, dy, dz,\n vertices[3 * faces[i] + x], vertices[3 * faces[i] + y], vertices[3 * faces[i] + z],\n vertices[3 * faces[i + 2 * vis] + x],\n vertices[3 * faces[i + 2 * vis] + y],\n vertices[3 * faces[i + 2 * vis] + z],\n vertices[3 * faces[i + vis] + x],\n vertices[3 * faces[i + vis] + y],\n vertices[3 * faces[i + vis] + z]\n );\n if (t != -1 && t > epsilon) {\n //System.out.println(\"adding outgoing \" + t);\n ts.add(t);\n\n }\n\n // test the \"going in\" direction\n t = Util.Math.rayTriangleIntersect(ox, oy, oz, dx, dy, dz,\n vertices[3 * faces[i] + x], vertices[3 * faces[i] + y], vertices[3 * faces[i] + z],\n vertices[3 * faces[i + vis] + x],\n vertices[3 * faces[i + vis] + y],\n vertices[3 * faces[i + vis] + z],\n vertices[3 * faces[i + 2 * vis] + x],\n vertices[3 * faces[i + 2 * vis] + y],\n vertices[3 * faces[i + 2 * vis] + z]\n );\n if (t != -1) {\n //System.out.println(\"adding incoming \" + t);\n if (t < epsilon) {\n t = 0.0;\n }\n ts.add(t);\n }\n\n }\n\n // catch coincident points on triangles\n if (ts.size() == 1 && ts.contains(0.0)) {\n return false;\n }\n\n if ((ts.size() % 2) == 1) {\n //System.out.println(\"unique t parameters: \" + ts.size());\n //System.out.println(\"contained: \"+point);\n return true;\n }\n //System.out.println(\"\");\n\n return false;\n }",
"public boolean isInShape(Point p) \n\t{\n\t\tPoint centre = new Point((int)posX + diam/2, (int)posY + diam/2);\n\t\t//If distance between two points if less than or equal to radius, true is\n\t\t//returned\n\t\treturn p.distance(centre) <= diam/2;\n\t}",
"public static BoundingBox calculateBoundingBox(Vector3D[] paramArrayOfVector3D)\r\n/* 13: */ {\r\n/* 14: 9 */ Vector3D localVector3D1 = new Vector3D();\r\n/* 15: 10 */ for (int i = 0; i < paramArrayOfVector3D.length; i++)\r\n/* 16: */ {\r\n/* 17: 12 */ localVector3D1.x += paramArrayOfVector3D[i].x;\r\n/* 18: 13 */ localVector3D1.y += paramArrayOfVector3D[i].y;\r\n/* 19: 14 */ localVector3D1.z += paramArrayOfVector3D[i].z;\r\n/* 20: */ }\r\n/* 21: 16 */ localVector3D1.x /= paramArrayOfVector3D.length;\r\n/* 22: 17 */ localVector3D1.y /= paramArrayOfVector3D.length;\r\n/* 23: 18 */ localVector3D1.z /= paramArrayOfVector3D.length;\r\n/* 24: 19 */ float[][] arrayOfFloat = new float[3][3];\r\n/* 25: 20 */ for (int j = 0; j < paramArrayOfVector3D.length; j++)\r\n/* 26: */ {\r\n/* 27: 22 */ float f1 = paramArrayOfVector3D[j].x - localVector3D1.x;\r\n/* 28: 23 */ float f2 = paramArrayOfVector3D[j].y - localVector3D1.y;\r\n/* 29: 24 */ float f3 = paramArrayOfVector3D[j].z - localVector3D1.z;\r\n/* 30: 25 */ arrayOfFloat[0][0] += f1 * f1;\r\n/* 31: 26 */ arrayOfFloat[1][1] += f2 * f2;\r\n/* 32: 27 */ arrayOfFloat[2][2] += f3 * f3;\r\n/* 33: 28 */ arrayOfFloat[0][1] += f1 * f2;\r\n/* 34: 29 */ arrayOfFloat[0][2] += f1 * f3;\r\n/* 35: 30 */ arrayOfFloat[1][2] += f2 * f3;\r\n/* 36: */ }\r\n/* 37: 32 */ arrayOfFloat[1][2] /= paramArrayOfVector3D.length;\r\n/* 38: 33 */ arrayOfFloat[2][1] = arrayOfFloat[1][2];\r\n/* 39: 34 */ arrayOfFloat[0][2] /= paramArrayOfVector3D.length;\r\n/* 40: 35 */ arrayOfFloat[2][0] = arrayOfFloat[0][2];\r\n/* 41: 36 */ arrayOfFloat[0][1] /= paramArrayOfVector3D.length;\r\n/* 42: 37 */ arrayOfFloat[1][0] = arrayOfFloat[0][1];\r\n/* 43: 38 */ arrayOfFloat[1][1] /= paramArrayOfVector3D.length;\r\n/* 44: 39 */ arrayOfFloat[2][2] /= paramArrayOfVector3D.length;\r\n/* 45: 40 */ arrayOfFloat[0][0] /= paramArrayOfVector3D.length;\r\n/* 46: 41 */ System.out.println(arrayOfFloat[0][0] + \"\\t\" + arrayOfFloat[0][1] + \"\\t\" + arrayOfFloat[0][2] + \"\\t\");\r\n/* 47: 42 */ System.out.println(arrayOfFloat[1][0] + \"\\t\" + arrayOfFloat[1][1] + \"\\t\" + arrayOfFloat[1][2] + \"\\t\");\r\n/* 48: 43 */ System.out.println(arrayOfFloat[2][0] + \"\\t\" + arrayOfFloat[2][1] + \"\\t\" + arrayOfFloat[2][2] + \"\\t\");\r\n/* 49: 44 */ double[][] arrayOfDouble1 = new double[3][3];\r\n/* 50: 45 */ for (int k = 0; k < 3; k++) {\r\n/* 51: 47 */ for (int m = 0; m < 3; m++) {\r\n/* 52: 49 */ arrayOfDouble1[k][m] = arrayOfFloat[k][m];\r\n/* 53: */ }\r\n/* 54: */ }\r\n/* 55: 52 */ Matrix localMatrix1 = new Matrix(arrayOfDouble1);\r\n/* 56: 53 */ EigenvalueDecomposition localEigenvalueDecomposition = localMatrix1.eig();\r\n/* 57: 54 */ Matrix localMatrix2 = localEigenvalueDecomposition.getV();\r\n/* 58: 55 */ double[][] arrayOfDouble2 = localMatrix2.getArray();\r\n/* 59: 56 */ Vector3D localVector3D2 = new Vector3D((float)arrayOfDouble2[0][0], (float)arrayOfDouble2[1][0], (float)arrayOfDouble2[2][0]);\r\n/* 60: 57 */ Vector3D localVector3D3 = new Vector3D(-(float)arrayOfDouble2[0][1], -(float)arrayOfDouble2[1][1], -(float)arrayOfDouble2[2][1]);\r\n/* 61: 58 */ Vector3D localVector3D4 = new Vector3D(-(float)arrayOfDouble2[0][2], -(float)arrayOfDouble2[1][2], -(float)arrayOfDouble2[2][2]);\r\n/* 62: 59 */ System.out.println(\"r=\" + localVector3D4);\r\n/* 63: 60 */ System.out.println(\"s=\" + localVector3D3);\r\n/* 64: 61 */ System.out.println(\"t=\" + localVector3D2);\r\n/* 65: 62 */ float f4 = 0.0F;\r\n/* 66: 63 */ float f5 = 0.0F;\r\n/* 67: 64 */ float f6 = 0.0F;\r\n/* 68: 65 */ float f7 = 0.0F;\r\n/* 69: 66 */ float f8 = 0.0F;\r\n/* 70: 67 */ float f9 = 0.0F;\r\n/* 71: 68 */ for (int n = 0; n < paramArrayOfVector3D.length; n++)\r\n/* 72: */ {\r\n/* 73: 70 */ float f10 = paramArrayOfVector3D[n].dotProduct(localVector3D4);\r\n/* 74: 71 */ float f11 = paramArrayOfVector3D[n].dotProduct(localVector3D4);\r\n/* 75: 72 */ float f12 = paramArrayOfVector3D[n].dotProduct(localVector3D4);\r\n/* 76: 73 */ f4 = Math.min(f4, f10);\r\n/* 77: 74 */ f5 = Math.min(f5, f11);\r\n/* 78: 75 */ f6 = Math.min(f6, f12);\r\n/* 79: 76 */ f7 = Math.max(f7, f10);\r\n/* 80: 77 */ f8 = Math.max(f8, f11);\r\n/* 81: 78 */ f9 = Math.max(f9, f12);\r\n/* 82: */ }\r\n/* 83: 80 */ float[] arrayOfFloat1 = { localVector3D4.x, localVector3D4.y, localVector3D4.z, -f4 };\r\n/* 84: 81 */ float[] arrayOfFloat2 = { -localVector3D4.x, -localVector3D4.y, -localVector3D4.z, f7 };\r\n/* 85: 82 */ float[] arrayOfFloat3 = { localVector3D2.x, localVector3D2.y, localVector3D2.z, -f6 };\r\n/* 86: 83 */ float[] arrayOfFloat4 = { -localVector3D2.x, -localVector3D2.y, -localVector3D2.z, f9 };\r\n/* 87: 84 */ float[] arrayOfFloat5 = { localVector3D3.x, localVector3D3.y, localVector3D3.z, -f5 };\r\n/* 88: 85 */ float[] arrayOfFloat6 = { -localVector3D3.x, -localVector3D3.y, -localVector3D3.z, f8 };\r\n/* 89: 86 */ return new BoundingBox(arrayOfFloat1, arrayOfFloat2, arrayOfFloat3, arrayOfFloat4, arrayOfFloat5, arrayOfFloat6);\r\n/* 90: */ }",
"void vectorToWorld(double px, double py, double pz, DVector3 result);",
"private boolean intersection(Point2D p1,Point2D p2, Point2D p3, Point2D p4 ){\n if(p1.equals(p3)||p1.equals(p4)||p2.equals(p3)||p2.equals(p4)){ // Point en commun cas particulier\n return true;\n }\n double pv1=produitVectoriel(p1,p2,p3,p4);\n if(pv1==0){ // droite parallele\n return false;\n }\n double pv2=produitVectoriel(p1,p2,p1,p4);\n double pv3=produitVectoriel(p1,p2,p1,p3);\n double pv4=produitVectoriel(p3,p4,p3,p2);\n double pv5=produitVectoriel(p3,p4,p3,p1);\n if(!(pv2*pv3<=0)){\n return false;\n }\n if(!(pv4*pv5<=0)){\n return false;\n }\n return true;\n }",
"private boolean hasCollided(Circle a, Polygon p) {\r\n //calculate the distance between the centers\r\n return p.getBoundsInParent().intersects(a.getBoundsInParent());\r\n\r\n }",
"public float getSphereRadius();",
"private Point3D findHitPoint(Ray3D ray) {\n // We plug paramaterization of x, y, z for ray into our general quartic equation\n // to get standard form: At^2 + Bt + C = 0, then use the quadratic equation to solve for t.\n // The coefficients A, B, and C are quite ugly, and the derivation is described in the linked\n // resource\n Point3D P = ray.getPoint(); // Ray starting point\n Point3D D = ray.getDirection(); // Ray direction\n // First coefficient of quadratic equation of t\n double A = a * sq(D.getX()) + b * sq(D.getY()) + c * sq(D.getZ())\n + d * D.getY() * D.getZ() + e * D.getX() * D.getZ() + f * D.getX() * D.getY();\n // Second coefficient of quadratic equation of t\n double B = 2 * (a * P.getX() * D.getX() + b * P.getY() * D.getY() + c * P.getZ() * D.getZ())\n + d * (P.getY() * D.getZ() + P.getZ() * D.getY())\n + e * (P.getX() * D.getZ() + P.getZ() * D.getX())\n + f * (P.getX() * D.getY() + P.getY() * D.getX())\n + g * D.getX() + h * D.getY() + i * D.getZ();\n // Third coefficient of quadratic equation of t\n double C = a * sq(P.getX()) + b * sq(P.getY()) + c * sq(P.getZ()) + d * P.getY() * P.getZ()\n + e * P.getX() * P.getZ() + f * P.getX() * P.getY() + g * P.getX() + h * P.getY() + i * P.getZ() + j;\n\n double discriminant = sq(B) - 4 * A * C;\n\n // Find intersection Point\n Point3D intersection = null;\n if (discriminant >= 0) {\n double t1 = (-B - Math.sqrt(discriminant)) / (2 * A);\n double t2 = (-B + Math.sqrt(discriminant)) / (2 * A);\n Point3D p1 = ray.atTime(t1);\n Point3D p2 = ray.atTime(t2);\n if (t1 > 0 && t2 > 0 && isWithinBounds(p1) && isWithinBounds(p2)) {\n intersection = t1 <= t2 ? p1 : p2;\n } else if (t1 > 0 && isWithinBounds(p1)) {\n intersection = p1;\n } else if (t2 > 0 && isWithinBounds(p2)) {\n intersection = p2;\n }\n }\n return intersection;\n }",
"private float computeCenter_old() {\n\t\tVector3f PA = A.subtract(P);\n\t\tVector3f PB = B.subtract(P);\n\t\tN = PA.cross(PB);\n\t\tif (N.lengthSquared() <= EPSILON*EPSILON) {\n//\t\t\tSystem.out.println(\"A=\"+A+\", B=\"+B+\" P=\"+P+\" -> it is a line\");\n\t\t\treturn 0; //Degenerated to a line\n\t\t}\n\t\t\n\t\t//define orthonormal basis I,J,K\n\t\tN.normalizeLocal();\n\t\tVector3f I = PA.normalize();\n\t\tVector3f J = N.cross(I);\n\t\tVector3f K = N;\n\t\tVector3f IxK = I.cross(K);\n\t\tVector3f JxK = J.cross(K);\n\t\t//project points in the plane PAB\n\t\tVector3f PAxN = PA.cross(N);\n\t\tVector3f PBxN = PB.cross(N);\n\t\tVector2f P2 = new Vector2f(0, 0);\n\t\tVector2f A2 = new Vector2f(PA.dot(JxK)/I.dot(JxK), PA.dot(IxK)/J.dot(IxK));\n\t\tVector2f B2 = new Vector2f(PB.dot(JxK)/I.dot(JxK), PB.dot(IxK)/J.dot(IxK));\n\t\t\n\t\t//compute time t of C=P+tPA°\n\t\tfloat t;\n\t\tif (B2.x == A2.x) {\n\t\t\tt = (B2.y - A2.y) / (A2.x - B2.x);\n\t\t} else {\n\t\t\tt = (B2.x - A2.x) / (A2.y - B2.y);\n\t\t}\n\t\t//compute C\n\t\tVector2f PArot = new Vector2f(A.y-P.y, P.x-A.x);\n\t\tVector2f C2 = P2.addLocal(PArot.multLocal(t));\n\t\t//project back\n\t\tC = new Vector3f(P);\n\t\tC.addScaledLocal(C2.x, I);\n\t\tC.addScaledLocal(C2.y, J);\n\t\t//Debug\n//\t\tSystem.out.println(\"A=\"+A+\", B=\"+B+\" P=\"+P+\" -> I=\"+I+\", J=\"+J+\", K=\"+K+\", P'=\"+P2+\", A'=\"+A2+\", B'=\"+B2+\", t=\"+t+\", C'=\"+C2+\", C=\"+C);\n\t\t//set radius\n\t\treturn C.distance(A);\n\t}",
"public float sphereRadius() {\r\n\t\treturn LeapJNI.Hand_sphereRadius(this.swigCPtr, this);\r\n\t}",
"static PointDouble circumCircle(PointDouble p1, PointDouble p2, PointDouble p3) {\n // if points are collinear, triangle is degenerate => no circumcircle center\n if (collinear(p1, p2, p3)) return null;\n\n // computation\n double a = p2.x - p1.x, b = p2.y - p1.y;\n double c = p3.x - p1.x, d = p3.y - p1.y;\n double e = a * (p1.x + p2.x) + b * (p1.y + p2.y);\n double f = c * (p1.x + p3.x) + d * (p1.y + p3.y);\n double g = 2.0 * (a * (p3.y - p2.y) - b * (p3.x - p2.x));\n\n PointDouble ctr = new PointDouble();\n ctr.x = (d*e - b*f) / g;\n ctr.y = (a*f - c*e) / g;\n return ctr;\n }",
"public static boolean containsCenter(Circle x, Circle y){\n\n if(Math.sqrt(Math.pow(y.getCenter()[0]-x.getCenter()[0], 2)+Math.pow(y.getCenter()[1]-x.getCenter()[1], 2))<=x.getRadius()){\n return true;\n }\n else{\n return false;\n }\n }",
"@Override\n\tpublic boolean intersects(Vec3D vec)\n\t\t{\n\t\tboolean isInRes = true;\n\t\tisInRes &= vec.x() >= topLeft.x();\n\t\tisInRes &= vec.x() <= topLeft.x() + edgeLength;\n\t\tisInRes &= vec.y() >= topLeft.y();\n\t\tisInRes &= vec.y() <= topLeft.y() + edgeLength;\n\t\tisInRes &= vec.z() >= topLeft.z();\n\t\tisInRes &= vec.z() <= topLeft.z() + edgeLength;\n\t\treturn isInRes;\n\t\t}",
"Point determineClosestCentre(Point p, Point centreA, Point centreB){\n\t\t\n\t\t//loop counter variable\n\t\tint l;\t\n\n\t\t//stores the distance between p and centreA\n\t\tdouble distanceA = 0.0;\n\n\t\tfor(l=0;l<p.dimension;l++){\n\t\t\t//centroid coordinate of the point\n\t\t\tdouble centroidCoordinatePoint;\n\t\t\tif(p.weight != 0.0){\n\t\t\t\tcentroidCoordinatePoint = p.coordinates[l] / p.weight;\n\t\t\t} else {\n\t\t\t\tcentroidCoordinatePoint = p.coordinates[l];\n\t\t\t}\n\t\t\t//centroid coordinate of the centre\n\t\t\tdouble centroidCoordinateCentre;\n\t\t\tif(centreA.weight != 0.0){\n\t\t\t\tcentroidCoordinateCentre = centreA.coordinates[l] / centreA.weight;\n\t\t\t} else {\n\t\t\t\tcentroidCoordinateCentre = centreA.coordinates[l];\n\t\t\t}\n\n\t\t\tdistanceA += (centroidCoordinatePoint-centroidCoordinateCentre) * \n\t\t\t\t\t(centroidCoordinatePoint-centroidCoordinateCentre) ;\n\t\t}\n\n\t\t//stores the distance between p and centreB\n\t\tdouble distanceB = 0.0;\n\n\t\tfor(l=0;l<p.dimension;l++){\n\t\t\t//centroid coordinate of the point\n\t\t\tdouble centroidCoordinatePoint;\n\t\t\tif(p.weight != 0.0){\n\t\t\t\tcentroidCoordinatePoint = p.coordinates[l] / p.weight;\n\t\t\t} else {\n\t\t\t\tcentroidCoordinatePoint = p.coordinates[l];\n\t\t\t}\n\t\t\t//centroid coordinate of the centre\n\t\t\tdouble centroidCoordinateCentre;\n\t\t\tif(centreB.weight != 0.0){\n\t\t\t\tcentroidCoordinateCentre = centreB.coordinates[l] / centreB.weight;\n\t\t\t} else {\n\t\t\t\tcentroidCoordinateCentre = centreB.coordinates[l];\n\t\t\t}\n\n\t\t\tdistanceB += (centroidCoordinatePoint-centroidCoordinateCentre) * \n\t\t\t\t\t(centroidCoordinatePoint-centroidCoordinateCentre) ;\n\t\t}\n\n\t\t//return the nearest centre\n\t\tif(distanceA < distanceB){\n\t\t\treturn centreA;\n\t\t} else {\n\t\t\treturn centreB;\n\t\t}\n\t}",
"private PointList center(PointList T, double radius){\n\t\t\n\t\tPointList centers = new PointList(Color.PINK);\n\t\tPoint[] extrema = new Point[4];\n\t\tPoint currentCenter;\n\t\t\n\t\tdouble xLength;\n\t\tdouble yLength;\n\t\tdouble xStart;\n\t\tdouble xEnd;\n\t\tdouble yStart;\n\t\tdouble yEnd;\n\t\t\n\t\textrema = T.getExtremePoints();\n\t\t\n\t\tif (extrema[0] == null) return centers; // centers is empty\n\t\t\n\t\tif (radius < T.delta()) return centers; // centers is empty\n\t\t\n\t\t// find X coordinates\n\t\tcurrentCenter = new Point(extrema[0].posX + radius, extrema[0].posY);\n\t\tif (currentCenter.posX + radius == extrema[1].posX) {\n\t\t\t// current x position is only possible x position\n\t\t\txStart = currentCenter.posX;\n\t\t\txEnd = xStart;\n\t\t\t\n\t\t} else {\n\t\t\t// we can move in x direction\n\t\t\txLength = Math.abs(currentCenter.posX + radius - extrema[1].posX);\n\t\t\txStart = currentCenter.posX - xLength;\n\t\t\txEnd = currentCenter.posX;\n\t\t}\n\n\t\t// find Y coordinates\n\t\tcurrentCenter = new Point(extrema[2].posX, extrema[2].posY + radius);\n\t\tif (currentCenter.posY + radius == extrema[3].posY) {\n\t\t\t// current y position is only possible y position\n\t\t\tyStart = currentCenter.posY;\n\t\t\tyEnd = yStart;\n\t\t} else {\n\t\t\t// we can move in y direction\n\t\t\tyLength = Math.abs(currentCenter.posY + radius - extrema[3].posY);\n\t\t\tyStart = currentCenter.posY - yLength;\n\t\t\tyEnd = currentCenter.posY;\n\t\t}\n\t\t\n\t\tcenters.addPoint(new Point(xStart, yStart));\n\t\tif (!centers.contains(new Point(xStart, yEnd))){\n\t\t\tcenters.addPoint(new Point(xStart, yEnd));\n\t\t}\n\t\tif (!centers.contains(new Point(xEnd, yStart))){\n\t\t\tcenters.addPoint(new Point(xEnd, yStart));\n\t\t}\n\t\tif (!centers.contains(new Point(xEnd, yEnd))){\n\t\t\tcenters.addPoint(new Point(xEnd, yEnd));\n\t\t}\n\t\t\n\t\treturn centers;\n\t\n\t}",
"public scala.Tuple2<java.lang.Object, java.lang.Object> findClosest (scala.collection.TraversableOnce<org.apache.spark.mllib.clustering.VectorWithNorm> centers, org.apache.spark.mllib.clustering.VectorWithNorm point) { throw new RuntimeException(); }",
"private Point moveToCenter(int r, Creature creature) {\r\n\t\tfloat xlocation = creature.getXlocation();\r\n\t\tfloat ylocation = creature.getYlocation();\r\n\t\t\r\n\t\tint tilex = (int) (xlocation / Tile.TILEWIDTH) * Tile.TILEWIDTH;\r\n\t\tint tiley = (int) (ylocation / Tile.TILEHEIGHT) * Tile.TILEHEIGHT;\r\n\t\t\r\n\t\tint tilecenterx = tilex + (Tile.TILEWIDTH / 2);\r\n\t\tint tilecentery = tiley + (Tile.TILEHEIGHT / 2);\r\n\t\t\r\n\t\tint playercenterx = (int) (xlocation);\r\n\t\tint playercentery = (int) (ylocation);\r\n\t\t\r\n\t\tif(Math.hypot(tilecenterx-playercenterx, tilecentery-playercentery) < r)\r\n\t\t\treturn new Point(0,0);\r\n\t\tPoint p = new Point();\r\n\t\tif(Math.abs(tilecenterx-playercenterx)<r)p.x = 0;\r\n\t\telse{p.x = (tilecenterx-playercenterx>0?1:-1);}\r\n\t\tif(Math.abs(tilecentery-playercentery)<r)p.y = 0;\r\n\t\telse{p.y = (tilecentery-playercentery>0?1:-1);}\r\n\t\t\t\r\n\t\treturn p;\r\n\t}",
"public double closestPointInSegment(Vector v1, Vector v2) {\n if (v1.same(v2)) return dist(v1);\n\n Vector v = this.sub(v1);\n Vector p = v2.sub(v1).norm();\n\n Vector proj = p.mul(v.dot(p)).add(v1);\n if (proj.inBoundingBox(v1, v2)) {\n return Math.abs(v2.x - v1.x) > EPS ?\n (proj.x - v1.x) / (v2.x - v1.x)\n : (proj.y - v1.y) / (v2.y - v1.y);\n } else {\n return dist(v1) < dist(v2) ? 0 : 1;\n }\n }",
"public Vector3d computeLineIntersection(\r\n\t\tCSGRay\t\t\tpOtherLine\r\n\t,\tVector3d\t\tpResult\r\n\t,\tdouble\t\t\tpTolerance\r\n\t,\tCSGTempVars\t\tpTempVars\r\n\t,\tCSGEnvironment\tpEnvironment\r\n\t) {\r\n\t\t//x = x1 + a1*t = x2 + b1*s\r\n\t\t//y = y1 + a2*t = y2 + b2*s\r\n\t\t//z = z1 + a3*t = z2 + b3*s\r\n\t\tVector3d lineOrigin = pOtherLine.getOrigin(); \r\n\t\tVector3d lineDirection = pOtherLine.getDirection();\r\n\t\t\t\t\r\n\t\tdouble t;\r\n\t\tif ( Math.abs( mDirection.y*lineDirection.x - mDirection.x*lineDirection.y ) > pTolerance ) {\r\n\t\t\tt = (-mOrigin.y*lineDirection.x\r\n\t\t\t\t\t+ lineOrigin.y*lineDirection.x\r\n\t\t\t\t\t+ lineDirection.y*mOrigin.x\r\n\t\t\t\t\t- lineDirection.y*lineOrigin.x) \r\n\t\t\t\t/ (mDirection.y*lineDirection.x - mDirection.x*lineDirection.y);\r\n\t\t\t\r\n\t\t} else if ( Math.abs( -mDirection.x*lineDirection.z + mDirection.z*lineDirection.x) > pTolerance ) {\r\n\t\t\tt = -(-lineDirection.z*mOrigin.x\r\n\t\t\t\t\t+ lineDirection.z*lineOrigin.x\r\n\t\t\t\t\t+ lineDirection.x*mOrigin.z\r\n\t\t\t\t\t- lineDirection.x*lineOrigin.z)\r\n\t\t\t\t/ (-mDirection.x*lineDirection.z + mDirection.z*lineDirection.x);\r\n\t\t\t\r\n\t\t} else if ( Math.abs( -mDirection.z*lineDirection.y + mDirection.y*lineDirection.z) > pTolerance ) {\r\n\t\t\tt = (mOrigin.z*lineDirection.y\r\n\t\t\t\t\t- lineOrigin.z*lineDirection.y\r\n\t\t\t\t\t- lineDirection.z*mOrigin.y\r\n\t\t\t\t\t+ lineDirection.z*lineOrigin.y)\r\n\t\t\t\t/ (-mDirection.z*lineDirection.y + mDirection.y*lineDirection.z);\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t// Nothing we can figure out\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Construct a new position based on what we know \r\n\t\tpResult = mDirection.mult( t, pResult );\r\n\t\tpResult.addLocal( mOrigin );\r\n\t\t\r\n\t\tif ( pEnvironment.mRationalizeValues ) {\r\n\t\t\t// Confirm that the magnitudes of the resultant point are rational\r\n\t\t\tCSGEnvironment.rationalizeVector( pResult, pEnvironment.mEpsilonMagnitudeRange );\r\n\t\t}\r\n\t\treturn( pResult );\r\n\t}",
"public Pair<Boolean, Float> intersects(Plane plane) {\r\n\t\treturn SecaMath.intersect(this, plane);\r\n\t}",
"private void generateSphere() {\n\t\tint segments = 14;\n\t\tint rings = 15; // Use an odd number of rings of faces so that halfway up the sphere is the middle of a ring and not a loop of edges\n\t\tverts = new Vector[segments * (rings - 1) + 2]; // There are rings + 1 rings of vertices, but the first and last of these are each a single vertex\n\t\tfaces = new int[2 * segments * (rings - 1)][3]; // Apart from the first and last, each ring has segments number of square faces, so 2 * segments triangular faces. The first and last each have segments triangular faces\n\t\tverts[0] = new Vector(3);\n\t\tverts[0].setElement(1, -1); // The lowest point of the sphere\n\t\tfor (int i = 0; i < segments; i++) {\n\t\t\tif (i == segments - 1) {\n\t\t\t\tfaces[i] = new int[] {0, i + 1, 1}; // The last face involves the last vertex in the second ring and loops back to the first vertex in the second ring\n\t\t\t} else {\n\t\t\t\tfaces[i] = new int[] {0, i + 1, i + 2}; // Triangles involving the lowest vertex and two consecutive vertices in the second ring of vertices\n\t\t\t}\n\t\t}\n\t\tdouble pitchIncrement = Math.PI / rings; // The increment in pitch (angle above horizontal) between rings of vertices\n\t\tdouble pitch = pitchIncrement - Math.PI / 2; // The lowest point had a pitch of -pi/2\n\t\tdouble headingIncrement = Math.PI * 2.0 / segments; // The increment in heading between segments\n\t\tdouble heading = -Math.PI;\n\t\tfor (int r = 0; r < rings - 1; r++) { // Last ring is a single point and must be treated separately\n\t\t\tdouble y = Math.sin(pitch); // The y co-ordinate for each vertex in this ring\n\t\t\tdouble modulus = Math.cos(pitch); // The radius of the circle which this ring lies on\n\t\t\tfor (int s = 0; s < segments; s++) {\n\t\t\t\tdouble x = modulus * Math.cos(heading); // x co-ordinate for the next vertex\n\t\t\t\tdouble z = modulus * Math.sin(heading); // z co-ordinate for the next vertex\n\t\t\t\tverts[segments * r + s + 1] = new Vector(3);\n\t\t\t\tverts[segments * r + s + 1].setElements(new double[] {x, y, z});\n\t\t\t\theading += headingIncrement;\n\t\t\t}\n\t\t\t// Make faces between the vertices just added and the next ring of vertices to be added\n\t\t\tif (r != rings - 2) { // The second to last ring doesn't make faces with the next ring up in the same way because the last ring is a single vertex\n\t\t\t\tfor (int i = 0; i < segments; i++) {\n\t\t\t\t\tif (i == segments - 1) { // The last two faces make use of the first vertex in the next ring by looping back to the start\n\t\t\t\t\t\t// Two faces in the same plane\n\t\t\t\t\t\tfaces[i * 2 + segments * (2 * r + 1)] = new int[] {segments * r + i + 1, (segments * r + i + 1) + segments, segments * r + 1 + segments};\n\t\t\t\t\t\tfaces[i * 2 + segments * (2 * r + 1) + 1] = new int[] {segments * r + i + 1, segments * r + 1 + segments, segments * r + 1};\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Two faces that are in the same plane and appear as a quadrilateral\n\t\t\t\t\t\tfaces[i * 2 + segments * (2 * r + 1)] = new int[] {segments * r + i + 1, (segments * r + i + 1) + segments, (segments * r + i + 1) + segments + 1};\n\t\t\t\t\t\tfaces[i * 2 + segments * (2 * r + 1) + 1] = new int[] {segments * r + i + 1, (segments * r + i + 1) + segments + 1, (segments * r + i + 1) + 1};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tpitch += pitchIncrement;\n\t\t}\n\t\tverts[verts.length - 1] = new Vector(3);\n\t\tverts[verts.length - 1].setElement(1, 1); // The last and highest vertex\n\t\tfor (int i = 0; i < segments; i++) {\n\t\t\tif (i == segments - 1) { // Last face completes the ring and includes the last vertex of the second to last ring\n\t\t\t\tfaces[2 * segments + segments * (2 * rings - 5) + i] = new int[] {segments * (rings - 2) + 1 + i, segments * (rings - 1) + 1, segments * (rings - 2) + 1};\n\t\t\t} else { // Faces involving the last vertex and two consecutive vertices in the second to last ring\n\t\t\t\tfaces[2 * segments + segments * (2 * rings - 5) + i] = new int[] {segments * (rings - 2) + 1 + i, segments * (rings - 1) + 1, segments * (rings - 2) + 1 + i + 1};\n\t\t\t}\n\t\t}\n\t}",
"private boolean containsCentroid(SparseVector vector) {\n for (int i = 0; i < K; i++) {\n if (centroids[i].equals(vector)) {\n return true;\n }\n }\n return false;\n }",
"private boolean isOnCylinder(Point3D point) {\n // the vector from bottom to the point\n Vector vec1 = new Vector(Point3D.substract(orientation.getPOO(), point));\n\n // the vector from the top to point\n Vector vec2 = new Vector(Point3D.substract(top, point));\n\n // the vectors to the edges of cylinder\n Vector vec3 = new Vector(Point3D.substract(orientation.getPOO(), point));\n\n Vector vec4 = new Vector(Point3D.substract(top, point));\n\n double Vec3dot = Vector.dotProduct(vec3, orientation.getDirection());\n\n double Vec4dot = Vector.dotProduct(vec4, orientation.getDirection());\n if (Vec3dot == 0)\n if (_radius - vec3.length() >= 0)\n return true;\n if (Vec4dot == 0)\n if (_radius - vec4.length() >= 0)\n return true;\n\n if (Vector.dotProduct(vec1, orientation.getDirection()) > 0\n && Vector.dotProduct(vec2, orientation.getDirection()) < 0)\n return true;\n return false;\n }",
"public final Vector getCenter() {\n\t\treturn (center == null) ? computeCenter() : center;\n\t}",
"private Vector3f calcPosition() {\r\n float y = (float) (distance * Math.sin(Math.toRadians(pitch)));\r\n float xzDistance = (float) (distance * Math.cos(Math.toRadians(pitch)));\r\n float x = (float) (xzDistance * Math.sin(Math.toRadians(rotation)));\r\n float z = (float) (xzDistance * Math.cos(Math.toRadians(rotation)));\r\n return new Vector3f(x + center.x, y + center.y, z + center.z);\r\n }",
"public Sphere(double radius, Point3D center) {\n super(radius);\n _center = center;\n }",
"private math_vector3d TwoPointGetCenterArcPoint(math_vector3d start, math_vector3d end)\n {\n\n\n ObjectPoint center2d = new ObjectPoint((start.X() + end.X()) / 2.0,(start.Y() + end.Y()) / 2.0);\n ObjectPoint orgin2d = new ObjectPoint(this.theOrigin.X(),this.theOrigin.Y());\n\n\n MathVector2D orginTocenter = new MathVector2D(orgin2d, center2d);\n\n orginTocenter = orginTocenter.GetUnit();\n orginTocenter = orginTocenter.multiply(this.theRadius);\n orgin2d.AddVector(orginTocenter);\n\n math_vector3d center = new math_vector3d(orgin2d.x,orgin2d.y,0);\n return center;\n }",
"boolean _circPoly(PVector center, float r, PVector[] poly) {\n // center is in polygon\n if (_ptPoly(center, poly)) return true;\n if (_insideCirc(poly, center, r)) return true;\n \n // circle encloses any corner\n for (PVector corner : poly) {\n if (dist(center.x, center.y, corner.x, corner.y) < r) return true;\n }\n \n // circle is adjacent and close enough to any side\n for (int i = 0; i < poly.length; i++) {\n if (_circSeg(center, r, poly[i], poly[(i+1)%poly.length])) return true;\n }\n \n return false;\n }",
"double[] circleCentre()\n\t{\n\t\tdouble toOriginLength = Math.sqrt(originX*originX + originY*originY);\n\t\tdouble toCentreLength = toOriginLength + radius;\n\t\t\n\t\tdouble[] centrePoint = new double[2];\n\t\t\n\t\tcentrePoint[0] = (toCentreLength * originX)/toOriginLength;\n\t\tcentrePoint[1] = (toCentreLength * originY)/toOriginLength;\n\t\t\n\t\treturn centrePoint;\n\t}",
"public FPointType calculateCenter() {\n fRectBound = getBounds2D();\n FPointType fptCenter = new FPointType();\n fptCenter.x = fRectBound.x + fRectBound.width / 2.0f;\n fptCenter.y = fRectBound.y + fRectBound.height / 2.0f;\n calculate(fptCenter);\n \n rotateRadian = 0.0f;\n \n return fptCenter;\n }",
"public boolean centroidIsInRect(Rectangular r) {\n\t\tdouble Gx = (r.getA1().getX() + r.getC1().getX()) / 2;\n\t\tdouble Gy = (r.getA1().getY() + r.getC1().getY()) / 2;\n\t\tdouble Gz = (r.getA1().getZ() + r.getC1().getZ()) / 2;\n\n\t\tPoint G = new Point(Gx, Gy, Gz);\n\n\t\treturn isInRect(G);\n\t}",
"public Sphere(Point3 c, double r, Material material) {\n\t\tsuper(material);\n\t\tthis.c = c;\n\t\tthis.r = r;\n\t}",
"protected final int getSphere(final Sector sector, final Nation receiver) {\n final char thisNationCodeLower = String.valueOf(receiver.getCode()).toLowerCase().charAt(0);\n final char thisSectorCodeLower = String.valueOf(sector.getPoliticalSphere()).toLowerCase().charAt(0);\n int sphere = 1;\n\n // x2 and x3 are used only for European units if they are within SOI or outside SOI\n if (sector.getPosition().getRegion().getId() != RegionConstants.EUROPE) {\n return 1;\n }\n\n // Check if this is not home region\n if (thisNationCodeLower != thisSectorCodeLower) {\n sphere = 2;\n\n // Check if this is outside sphere of influence\n if (receiver.getSphereOfInfluence().toLowerCase().indexOf(thisSectorCodeLower) < 0) {\n sphere = 3;\n }\n }\n\n return sphere;\n }",
"private ArrayList<Point> findS(ArrayList<Point> s, Point p1, Point p2) {\n ArrayList<Point> s1 = new ArrayList<>();\n for(int i = 1; i < s.size(); i++){\n if(p1.x*p2.y + s.get(i).x*p1.y + p2.x*s.get(i).y - s.get(i).x*p2.y - p2.x*p1.y - p1.x*s.get(i).y > 0) {\n s1.add(s.get(i));\n }\n }\n return s1;\n }",
"@Test\n\tpublic void perpVector3D() {\n\t\tVector3f v1 = new Vector3f(this.random.nextDouble(), this.random.nextDouble(), this.random.nextDouble());\n\t\tVector3f v2 = new Vector3f(this.random.nextDouble(), this.random.nextDouble(), this.random.nextDouble());\n\t\t\n\t\tdouble dotProduct = v1.dot(v2);\n\t\tdouble perpProduct = Math.abs(v1.perp(v2));\n\t\tdouble angle = v1.angle(v2);\n\t\t\n\t\tassertEpsilonEquals(Math.tan(angle),perpProduct/dotProduct);\n\t\t\n\t}"
]
| [
"0.64882594",
"0.6417317",
"0.63138294",
"0.6281289",
"0.61288476",
"0.6007334",
"0.5942064",
"0.59251416",
"0.59142584",
"0.5907372",
"0.58921117",
"0.5854458",
"0.58322555",
"0.56812686",
"0.56544757",
"0.5640487",
"0.56222224",
"0.55796736",
"0.5568115",
"0.5535615",
"0.55053616",
"0.54696864",
"0.54578537",
"0.54528385",
"0.5382395",
"0.5367512",
"0.53479165",
"0.5322335",
"0.5317871",
"0.531437",
"0.5311742",
"0.53096473",
"0.5281408",
"0.52803373",
"0.5267253",
"0.52408",
"0.5237299",
"0.52319217",
"0.5224189",
"0.52091855",
"0.5208488",
"0.51974934",
"0.5187075",
"0.51820797",
"0.51725835",
"0.5172484",
"0.51699066",
"0.5152124",
"0.5149819",
"0.5117439",
"0.51051766",
"0.50995487",
"0.50964886",
"0.5090652",
"0.5086631",
"0.5086631",
"0.50781107",
"0.50617766",
"0.5057163",
"0.50523233",
"0.5029029",
"0.5023329",
"0.50157785",
"0.500612",
"0.5005415",
"0.499516",
"0.49914423",
"0.4991441",
"0.498793",
"0.4962775",
"0.49617282",
"0.49439666",
"0.49353924",
"0.49186796",
"0.49093062",
"0.49055538",
"0.49009746",
"0.49007514",
"0.4891675",
"0.48860365",
"0.48784897",
"0.48693916",
"0.4867999",
"0.48620802",
"0.48593307",
"0.4859237",
"0.48559597",
"0.4848071",
"0.48438606",
"0.48299214",
"0.48155534",
"0.4815361",
"0.48075977",
"0.48041922",
"0.48030758",
"0.4803021",
"0.4797967",
"0.4790098",
"0.4788125",
"0.47696847"
]
| 0.7340695 | 0 |
Calculates the normal vector on the sphere in the direction of the current point. | public Vec3D tangentPlaneNormalAt(Vec3D q) {
Vec3D p = this.sub(q);
// float xr2 = eR.x * eR.x;
// float yr2 = eR.y * eR.y;
// float zr2 = eR.z * eR.z;
float r2 = 1f / (radius * radius);
return p.scaleSelf(r2).normalize();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public VectorA normal()\n {\n return new VectorA(this.x/this.mag(), this.y/this.mag());\n }",
"@Override\n\tpublic Vector getNormal(Point3D point) {\n\t\tdouble temp=axisRay.getDir().dotProduct(point.subtract(axisRay.getP0()));\n\t\tif(Util.isZero(temp/100))return (point.subtract(Point3D.ZERO)).normalize();\n\t\tPoint3D O=axisRay.getP0().add(axisRay.getDir().scale(temp));\n\t\treturn (point.subtract(O)).normalize();\n\n\t}",
"public Vector getNormal(Point3D point) {\r\n\t\treturn point.subtract(centerPoint).normalize();\r\n\t}",
"public Vector3 getNormal() {\n\t\tdouble mag = this.magnitude();\n\t\tif (mag > 0) {\n\t\t\treturn new Vector3(\n\t\t\t\t\tthis.x/mag,\n\t\t\t\t\tthis.y/mag,\n\t\t\t\t\tthis.z/mag\n\t\t\t\t\t);\n\t\t} else {\n\t\t\treturn new Vector3();\n\t\t}\n\t}",
"@Override\n public Vector getNormal(Point3D p) {\n Vector O_P= p.subtract(_center);\n return O_P.normalize();\n // return null;\n }",
"public Vector2D normal()\n\t{\n\t\treturn this.mul(1/this.length());\n\t}",
"@Override\n public Vector getNormal(Point3D P) {\n Point3D O = _center;\n Vector n = P.subtract(O);\n return n.normalized();\n }",
"private Vector3f calcNormal(int loopStart) throws IOException {\n\t\t// calculating the normal of the polygon using the first 3 vertices \n\t\t// of the planar face:\n\t\t//\t\t\tvec3 ab = b - a;\n\t\t// vec3 ac = c - a;\n\t\t// vec3 normal = normalize(cross(ab, ac));\n\t\tMLoop loop = loops[loopStart + 0];\n\t\tCArrayFacade<Float> a = vertices[loop.getV()].getCo();\n\t\tloop = loops[loopStart + 1];\n\t\tCArrayFacade<Float> b = vertices[loop.getV()].getCo();\n\t\tloop = loops[loopStart + 2];\n\t\tCArrayFacade<Float> c = vertices[loop.getV()].getCo();\n\t\t\n\t\tVector3f ab = new Vector3f(b.get(0)-a.get(0), b.get(1)-a.get(1), b.get(2)-a.get(2));\n\t\tVector3f ac = new Vector3f(c.get(0)-a.get(0), c.get(1)-a.get(1), c.get(2)-a.get(2));\n\t\t\n\t\treturn ab.cross(ac);\n\t}",
"public Vector normalize(){\n\t\tdouble mag = magnitude();\n\t\treturn new Vector(x/mag, y/mag, z/mag);\n\t}",
"public double norm() {\n\t\thomogenize();\n\t\treturn Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n\t}",
"public SbVec3f getNormal() { return worldNormal; }",
"@java.lang.Override\n public godot.wire.Wire.Vector3 getNormal() {\n return normal_ == null ? godot.wire.Wire.Vector3.getDefaultInstance() : normal_;\n }",
"public Vec2double normalise() {\n\t\tdouble len = (double) (1 / Math.sqrt(x*x + y*y));\n//\t\tx *= len;\n//\t\ty *= len;\n\t\treturn new Vec2double(x*len, y*len);\n\t}",
"public void normal(PointType n)\r\n {\r\n\t //System.out.println(\"norm: \"+n.x+\", \"+n.y+\", \"+n.z);\r\n\t\tgl.glNormal3d(n.x, n.y, n.z);\t\t\r\n\t}",
"private void computeNormal() {\n normal = getDirection();\r\n\r\n // Rotate by -90 degrees to get normal of line\r\n float oldY = normal.y;\r\n normal.y = -normal.x;\r\n normal.x = oldY;\r\n }",
"public Vector3D getNormal(Vector3D hitPos) {\n\t\tVector3D n = Vector3D.sub(pos, hitPos);\n\t\t//n.div(radius);\n\t\tn.normalize();\n\t\treturn n;\n\t}",
"public Vector getNormal(Point3D point) throws Exception {\n\n // Setting the U vector\n Vector vecU = new Vector(_p1.getX().getCoordinate()-_p2.getX().getCoordinate(),\n _p1.getY().getCoordinate()-_p2.getY().getCoordinate(),\n _p1.getZ().getCoordinate()-_p2.getZ().getCoordinate());\n // Setting the V vector\n Vector vecV = new Vector(_p1.getX().getCoordinate()-_p3.getX().getCoordinate(),\n _p1.getY().getCoordinate()-_p3.getY().getCoordinate(),\n _p1.getZ().getCoordinate()-_p3.getZ().getCoordinate());\n\n // Finding the normal vector and normalize it\n Vector _normal = new Vector(vecU.crossProduct(vecV));\n _normal.normalize();\n _normal.scale(-1);\n\n return _normal;\n }",
"public double norm() {\n\t\treturn Math.sqrt(x * x + y * y + z * z);\n\t}",
"private Vector normal(int[] face) {\n\t\tVector point0 = verts[face[0]];\n\t\tVector point1 = verts[face[1]];\n\t\tVector point2 = verts[face[2]];\n\t\treturn point1.subtract(point0).crossProduct(point2.subtract(point0)).normalise();\n\t}",
"@Override\n Vector calculate_normal_vector(Point hitPoint, int surface) {\n Point origin = new Point(0, 0, 0);\n return getInternalTransformer().substraction_to_vector(hitPoint, origin);\n }",
"private Vector3f getPlaneNormal(Vector3f directionVector) {\n\t\tVector3f up = new Vector3f(0, 0, 1);\n\t\tif (directionVector.z == 1 || directionVector.z == -1)\n\t\t\tup.set(0, 1, 0);\n\n\t\tfloat dirX = directionVector.x;\n\t\tfloat dirY = directionVector.y;\n\t\tfloat dirZ = directionVector.z;\n\t\tfloat upX = up.x;\n\t\tfloat upY = up.y;\n\t\tfloat upZ = up.z;\n\n\t\t// right = direction x up\n\t\tfloat rightX, rightY, rightZ;\n\t\trightX = dirY * upZ - dirZ * upY;\n\t\trightY = dirZ * upX - dirX * upZ;\n\t\trightZ = dirX * upY - dirY * upX;\n\t\t// normalize right\n\t\tfloat invRightLength = 1.0f / (float) Math.sqrt(rightX * rightX + rightY * rightY + rightZ * rightZ);\n\t\trightX *= invRightLength;\n\t\trightY *= invRightLength;\n\t\trightZ *= invRightLength;\n\n\t\treturn new Vector3f(rightX, rightY, rightZ);\n\t}",
"godot.wire.Wire.Vector3 getNormal();",
"public Vector3f getSphereCenter() {\n\t\tfloat[] arr = getMinMax();\n\t\t\n\t\treturn new Vector3f((arr[0]+arr[1])/2,(arr[2]+arr[3])/2,(arr[4]+arr[5])/2);\n\t}",
"final public Vector3 normalized(){\n return new Vector3(x/magnitude, y/magnitude, z/magnitude);\n }",
"private void getNormalVector(Conformer conformer, int[] atom, double[] n) {\n\t\t// calculate the three vectors leading from atom[0] to the other three atoms\n\t\tdouble[][] coords = new double[2][3];\n\t\tfor (int i=0; i<2; i++) {\n\t\t\tcoords[i][0] = conformer.getX(atom[i+1]) - conformer.getX(atom[0]);\n\t\t\tcoords[i][1] = conformer.getY(atom[i+1]) - conformer.getY(atom[0]);\n\t\t\tcoords[i][2] = conformer.getZ(atom[i+1]) - conformer.getZ(atom[0]);\n\t\t\t}\n\n\t\t// calculate the normal vector (vector product of coords[0] and coords[1])\n\t\tn[0] = coords[0][1]*coords[1][2]-coords[0][2]*coords[1][1];\n\t\tn[1] = coords[0][2]*coords[1][0]-coords[0][0]*coords[1][2];\n\t\tn[2] = coords[0][0]*coords[1][1]-coords[0][1]*coords[1][0];\n\n\t\tdouble l = Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);\n\t\tn[0] /= l;\n\t\tn[1] /= l;\n\t\tn[2] /= l;\n\t\t}",
"private Point3D findNormalAtPoint(Point3D hitPoint) {\n double x = hitPoint.getX();\n double y = hitPoint.getY();\n double z = hitPoint.getZ();\n double normalX = 2 * a * x + e * z + f * y + g;\n double normalY = 2 * b * y + d * z + f * x + h;\n double normalZ = 2 * c * z + d * y + e * x + i;\n return new Point3D(normalX, normalY, normalZ).normalize();\n }",
"@Override\n\tpublic Vector3D findNormalAt(Point3D point) {\n\t\treturn plane.findNormalAt(point);\n\t}",
"public Vector3 normalized() {\n\t\tif (isZeroVector(this)) {\n\t\t\treturn this;\n\t\t}\n\t\treturn new Vector3(x / norm(), y / norm(), z / norm());\n\t}",
"public Vector normalized(){\r\n\t\tfloat len = this.length();\r\n\t\tif( len != 0.0f && len != 1.0f ){\r\n\t\t\treturn new Vector( this.x / len, this.y / len, this.z / len );\r\n\t\t}\r\n\t\treturn this;\r\n\t}",
"public Vector3 normalized() {\n float length = length();\n return new Vector3(x / length, y / length, z / length);\n }",
"public Vector normalized() {\n double size = this.length();\n return new Vector(this.getHead().getX() / size, this.getHead().getY() / size, this.getHead().getZ() / size);\n }",
"public Point4 getNormal();",
"public Vector3D normalize()\r\n {\r\n float oneOverMagnitude = 0;\r\n float mag = magnitude();\r\n \r\n if (mag!=0) {\r\n oneOverMagnitude = 1 / mag;\r\n }\r\n\r\n return this.product(oneOverMagnitude);\r\n }",
"public Vector getNormal(Vector v) {\n\t\tif (this.getClass() == Sphere.class) { // shape is sphere\n\t\t\tSphere sph = (Sphere) this;\n\t\t\treturn sph.getNormal(v);\n\t\t}\n\t\tif (this.getClass() == Triangle.class) { // shape is triangle\n\t\t\tTriangle trn = (Triangle) this;\n\t\t\treturn trn.getNormal(v);\n\t\t}\n\t\tif (this.getClass() == Plane.class) { // shape is plane\n\t\t\tPlane pln = (Plane) this;\n\t\t\treturn pln.getNormal(v);\n\t\t}\n\t\treturn null;\n\t}",
"float norm();",
"public Vector normalize ( );",
"public godot.wire.Wire.Vector3 getNormal() {\n if (normalBuilder_ == null) {\n return normal_ == null ? godot.wire.Wire.Vector3.getDefaultInstance() : normal_;\n } else {\n return normalBuilder_.getMessage();\n }\n }",
"public Vector3 normalizeLocal () {\n return normalize(this);\n }",
"private static Vector3f getNormal(double[] a, double[] b)\n\t{\n\t\tfloat vectorX = (float)(a[FTContour.X] - b[FTContour.X]);\n\t\tfloat vectorY = (float)(a[FTContour.Y] - b[FTContour.Y]);\n\n\t\tfloat length = (float)Math.sqrt(vectorX * vectorX + vectorY * vectorY);\n\n\t\tif (length > 0.0f)\n\t\t{\n\t\t\tlength = 1 / length;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlength = 0.0f;\n\t\t}\n\n\t\treturn new Vector3f((float)vectorY * length, (float)-vectorX * length, 0.0f);\n\t}",
"public Point3D normalize() {\n\t\treturn this.divide(Math.sqrt(x*x + y*y + z*z));\n\t}",
"public SbVec3f\ngetObjectNormal() {\n\treturn getObjectNormal(null);\n}",
"public Vector2f normalizeLocal ()\n {\n return normalize(this);\n }",
"public Point3D getNormal(Point3D p){\n\t\treturn this.n;\n\t}",
"@Override\r\n\tprotected Ray normalAt(double xx, double yy, double zz) {\n\t\treturn null;\r\n\t}",
"public ThreeVector unitVector() {\r\n\t\tif (this.magnitude()==0) { \r\n\t\t\treturn new ThreeVector(0,0,0);\r\n\t\t} else {\r\n\t\t\treturn new ThreeVector(this.x/this.magnitude(), this.y/this.magnitude(), this.z/this.magnitude());\r\n\t\t}\r\n\t}",
"private double[] getNormalVector(Conformer conformer, int[] atom) {\n\t\tdouble[] n = new double[3];\n\t\tgetNormalVector(conformer, atom, n);\n\t\treturn n;\n\t\t}",
"public void normalize()\n {\n double magnitude = this.magnitude();\n this.x = x / (float)magnitude;\n this.y = y / (float)magnitude;\n this.z = z / (float)magnitude;\n this.w = w / (float)magnitude;\n }",
"public NurbsPoint getNormal(double s, double t) {\n double step2 = 0.01; // 0.1\n NurbsPoint p, p1, p2, p3;\n\n // ---this is a fix to compensate for bad models\n // ---that create deep concaves in the tail and nose\n double step3 = 0.1;\n if (s < u[0] + 2 * step3) s = u[0] + 2 * step3;\n if (s > u[nr_of_segments - 1] - 2 * step3) s = u[nr_of_segments - 1] - step3;\n if (t < v[0] + step3) t = v[0] + step3;\n if (t > v[points_per_segment - 1] - step3) t = v[points_per_segment - 1] - step3;\n // ---end fix\n\n double t1 = t - step2 / 2;\n double t2 = t + step2 / 2;\n double s1 = s - step2 / 2;\n double s2 = s + step2 / 2;\n\n Vector3f normal = new Vector3f();\n Vector3f v1 = new Vector3f();\n Vector3f v2 = new Vector3f();\n Point3f[] pts = new Point3f[3];\n\n for (int i2 = 0; i2 < 3; i2++)\n pts[i2] = new Point3f();\n\n p1 = get_point_on_surface(s1, t1);\n p2 = get_point_on_surface(s2, t1);\n p3 = get_point_on_surface(s1, t2);\n\n pts[0] = new Point3f((float) p1.x, (float) p1.y, (float) p1.z);\n pts[1] = new Point3f((float) p2.x, (float) p2.y, (float) p2.z);\n pts[2] = new Point3f((float) p3.x, (float) p3.y, (float) p3.z);\n\n v1.sub(pts[0], pts[1]);\n v2.sub(pts[0], pts[2]);\n\n v1.normalize();\n v2.normalize();\n\n normal.cross(v1, v2);\n\n normal.normalize();\n\n return new NurbsPoint(normal.x, normal.y, normal.z);\n }",
"public Vector Normalize(){\n float magnitude = Magnitude();\n for(int i = 0; i < axis.length; i++){\n axis[i] /= magnitude;\n }\n return this;\n }",
"public void normalize() { sets length to 1\n //\n double length = Math.sqrt(x * x + y * y);\n\n if (length != 0.0) {\n float s = 1.0f / (float) length;\n x = x * s;\n y = y * s;\n }\n }",
"private void randomNormal(Vector3f v)\n // Create a unit vector. The x- and y- values can be +ve or -ve.\n // The z-value is positive, so facing towards the viewer.\n {\n float z = (float) Math.random(); // between 0-1\n float x = (float) (Math.random() * 2.0 - 1.0); // -1 to 1\n float y = (float) (Math.random() * 2.0 - 1.0); // -1 to 1\n v.set(x, y, z);\n v.normalize();\n }",
"public Vector2f normalize() {\n return div(length());\n }",
"public void normalise(Vector2 normVector) {\n\t\tposition.subtract(normVector);\n\t\tsetX(getX() - normVector.getX());\n\t\tsetY(getY() - normVector.getY());\n\t}",
"public double norm() {\n if (dy == 0.0)\n return Math.abs(dx);\n return Math.hypot(dx, dy);\n }",
"public double norm() {\r\n return Math.sqrt(innerProduct(this));\r\n }",
"public Vector normalized() {\n Vector t=new Vector(normalize());\n return t;\n }",
"public Vector3f getNormalVertice(int i) {\n\t\treturn normalVertices.get(i);\n\t}",
"public void normalize() {\r\n\t\tfloat length = (float) this.lenght();\r\n\t\tif (length > 0) {\r\n\t\t\tx /= length;\r\n\t\t\ty /= length;\r\n\t\t\tz /= length;\r\n\t\t}\r\n\t}",
"public float sphereRadius() {\r\n\t\treturn LeapJNI.Hand_sphereRadius(this.swigCPtr, this);\r\n\t}",
"public float distFrom(Point3D point) {\n\n Vector3D diff = point.subtract(pos);\n\n return diff.dot(norm);\n }",
"protected void setForceNormalVector() {\n\t\tvn = forceNormalVector(v1, v2);\n\t}",
"public static double norme(double V[]){\r\n\t\tdouble norme;\r\n\t\tnorme = Math.sqrt( Math.pow(V[0], 2) + Math.pow(V[1], 2) + Math.pow(V[2], 2) );\r\n\t\treturn norme;\t\r\n\t}",
"public Point4 getNormal(int pointNr);",
"final public Vector3 reflectedOn(final Normal3 n){\n if(n == null){\n throw new IllegalArgumentException(\"n must not be null\");\n }\n\n Normal3 normal = n.mul(this.dot(n)).mul(2);\n //-l + 2(l * n)n\n return new Vector3(-x + normal.x, -y + normal.y, -z + normal.z);\n \n }",
"public void calcNormal() {\n nx = y2 - y1;\n ny = x1 - x2;\n }",
"private void calculateNormals() {\n int i;\n float[] l_vect1 = new float[3];\n float[] l_vect2 = new float[3];\n float[] l_vect3 = new float[3];\n float[] l_vect_b1;\n float[] l_vect_b2;\n float[] l_normal;\n\n normals = new float[faces.length*3];\n int normalIndex = 0;\n\n for (i=0; i<faces.length; i=i+3) {\n\n l_vect1[0] = vertices[faces[i] * 3];\n l_vect1[1] = vertices[faces[i] * 3 + 1];\n l_vect1[2] = vertices[faces[i] * 3 + 2];\n l_vect2[0] = vertices[faces[(i + 1)] * 3];\n l_vect2[1] = vertices[faces[(i + 1)] * 3 + 1];\n l_vect2[2] = vertices[faces[(i + 1)] * 3 + 2];\n l_vect3[0] = vertices[faces[(i + 2)] * 3];\n l_vect3[1] = vertices[faces[(i + 2)] * 3 + 1];\n l_vect3[2] = vertices[faces[(i + 2)] * 3 + 2];\n\n l_vect_b1 = VectorCreate(l_vect1, l_vect2);\n l_vect_b2 = VectorCreate(l_vect1, l_vect3);\n\n l_normal = VectorDotProduct(l_vect_b1, l_vect_b2);\n l_normal = VectorNormalize(l_normal);\n\n normals[normalIndex++]+=l_normal[0];\n normals[normalIndex++]+=l_normal[1];\n normals[normalIndex++]+=l_normal[2];\n normals[normalIndex++]+=l_normal[0];\n normals[normalIndex++]+=l_normal[1];\n normals[normalIndex++]+=l_normal[2];\n normals[normalIndex++]+=l_normal[0];\n normals[normalIndex++]+=l_normal[1];\n normals[normalIndex++]+=l_normal[2];\n }\n }",
"public Vector4 normalized()\n {\n double magnitude = this.magnitude();\n\n float normalizeX = x / (float)magnitude;\n float normalizeY = y / (float)magnitude;\n float normalizeZ = z / (float)magnitude;\n float normalizeW = w / (float)magnitude;\n\n return new Vector4(normalizeX, normalizeY, normalizeZ, normalizeW);\n }",
"public double normR(VectorView point) {\n return Distance.EUCLIDEAN.compute(point, CM) / scalar();\n }",
"public abstract Vector4fc normalize3();",
"public void normalize() {\n\t\tdouble norm = norm();\n\t\tif (DoubleComparison.eq(norm, 0)) {\n\t\t\tthrow new RuntimeException(\"Failed to normalize: length is zero\");\n\t\t}\n\t\tthis.x = this.x / norm;\n\t\tthis.y = this.y / norm;\n\t\tthis.z = this.z / norm;\n\t}",
"public Vector[] getNormals() {\n\t\treturn this.normals;\n\t}",
"public float magnitude() {\r\n \r\n return (float)Math.sqrt(x*x + y*y + z*z);\r\n }",
"public godot.wire.Wire.Vector3OrBuilder getNormalOrBuilder() {\n if (normalBuilder_ != null) {\n return normalBuilder_.getMessageOrBuilder();\n } else {\n return normal_ == null ?\n godot.wire.Wire.Vector3.getDefaultInstance() : normal_;\n }\n }",
"public void calculateNormals() {\n // TODO!\n }",
"public abstract Vector4fc normalize(float length);",
"@java.lang.Override\n public godot.wire.Wire.Vector3OrBuilder getNormalOrBuilder() {\n return getNormal();\n }",
"public MyDouble norm() {\r\n\t\tMyDouble aSquar = this.getReal().square();\r\n\t\tMyDouble bSquare = this.getImag().square();\r\n\t\tMyDouble sum = aSquar.add(bSquare);\r\n\t\tMyDouble result = sum.sqrt();\r\n\t\treturn result;\r\n\t}",
"public double getV() {\r\n return Math.sqrt(Math.pow(this.dx, 2) + Math.pow(this.dy, 2));\r\n }",
"public Vector2D normalize() \n {\n \tfloat length = getLength();\n if (length != 0.0f) \n {\n this.setX(this.getX() / length);\n this.setY(this.getY() / length);\n } \n else \n {\n this.setX(0.0f);\n this.setY(0.0f);\n }\n return this;\n }",
"@Override\n\tpublic Vecteur getNormal(Point impact, Rayon rayon) {\n\t\tassert impact != null && rayon != null;\n\t\tint indice = appartientCube(impact);\n\t\t\n\t\t//Assert pt d'impact appartient au cube\n\t\tif (indice == -1) {\n\t\t\tSystem.out.println(\"getNormal : Le point n'appartient pas au cube\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn this.plans.get(indice).getNormal(impact, rayon);\n\t}",
"final public Normal3 asNormal(){\n return new Normal3(x, y, z);\n }",
"public float getSphereRadius();",
"public float getDistance(){\n\t\t\treturn s1.start.supportFinal.dot(normal);\n\t\t}",
"public double distanceToPoint(final Tuple3d point) {\n // // D = abs(aX + bY + cZ + d) / sqrt(a^2 + b^2 + c^2)\n // // D = abs(aX + bY + cZ + d) / 1.0 # sqrt part is length of normal which we normalized to length = 1\n return (this.normal.x * point.x) + (this.normal.y * point.y) + (this.normal.z * point.z) + this.d;\n }",
"protected float normalize(Vector3f kV) {\r\n float fLengthSquared = kV.x * kV.x + kV.y * kV.y + kV.z * kV.z;\r\n if (0.0f < fLengthSquared) {\r\n float fLength = (float)Math.sqrt(fLengthSquared);\r\n kV.scale(1.0f / fLength);\r\n return fLength;\r\n }\r\n else {\r\n kV.set(0.0f, 0.0f, 0.0f);\r\n return 0.0f;\r\n }\r\n }",
"public double magnitude(){\n\t\treturn Math.sqrt(x*x + y*y + z*z);\n\t}",
"public Vector2f[] getNormalisedVertexPositions() {\n Vertex3D[] vertices = mesh.getModel().getVertices();\n // Get Array of X and Y offsets for all vertices\n Vector2f[] vertexPositions = new Vector2f[vertices.length];\n for (int i = 0; i < vertices.length; i++) {\n Vector3f vertexPosition = vertices[i].getPosition();\n vertexPositions[i] = new Vector2f(vertexPosition.getX(), vertexPosition.getY());\n }\n\n // Add vertex positions to position in order to get their OpenGl coordinates\n for (int i = 0; i < vertexPositions.length; i++) {\n vertexPositions[i] = Vector2f.add(position, vertexPositions[i]);\n vertexPositions[i] = Vector2f.divide(\n vertexPositions[i],\n new Vector2f(Window.getSpanX(), Window.getSpanY()));\n }\n\n return vertexPositions;\n }",
"public static Vector<Double> norm(Vector<Double> a) {\n\t\tdouble x = TransEInitializer.vec_len(a);\n\t\tif (x > 1){\n\t\t\t\n\t\t\tfor (int ii = 0; ii < a.size(); ii++)\n\t\t\t\ta.set(ii, a.get(ii) / x);\n\t\t\n\n\t\t}\n\n//\t\tif(x > 1)\n//\t\t\treturn true;\n//\t\treturn false;\n\t\treturn a;\n\t}",
"public double magnitude() {\r\n\t\treturn Math.sqrt(this.x*this.x + this.y*this.y + this.z*this.z);\r\n\t}",
"public void normalize() {\n float length = (float)Math.sqrt(nx * nx + ny * ny);\n nx/=length;\n ny/=length;\n }",
"private Point2D.Double calcNormVec(double x1, double x2, double y1, double y2)\n\t{\n\n\t\treturn new Point2D.Double(-(y2 - y1), (x2 - x1));\n\t}",
"public double[] getNormal(int index){\n Node3D node = mesh.nodes.get(index);\n return calculateMeanNormal(node, node_to_triangle.get(node));\n }",
"float norm2();",
"public Vector2D unitVector()\n {\n if (this.getR() != 0)\n return new Vector2D(this.x / this.getR(), this.y / this.getR());\n return new Vector2D(0, 0);\n }",
"public double magnitude() {\n\t\treturn Math.sqrt(x*x + y*y + z*z);\n\t}",
"public Vector2f normalize (Vector2f result)\n {\n return mult(1f / length(), result);\n }",
"public Ray(Point3D head, Vector direction, Vector normal) {\n\t\tthis(head, direction);\n\t\tdouble nv = normal.dotProduct(_dir);\n\t\tif (!Util.isZero(nv)) {\n\t\t\tVector epsVector = normal.scale(nv > 0 ? DELTA : -DELTA);\n\t\t\t_p0 = head.add(epsVector);\n\t\t}\n\t}",
"private Vector3f calculateUpVectorOfCameraPosition(Vector3f orthVector) {\n\n\t\tVector3f interimResult = new Vector3f();\n\t\tinterimResult.x = calculateVectorDirectionBetweenEyeAndCenter().y * orthVector.z\n\t\t\t\t- calculateVectorDirectionBetweenEyeAndCenter().z * orthVector.y;\n\t\tinterimResult.y = calculateVectorDirectionBetweenEyeAndCenter().z * orthVector.x\n\t\t\t\t- calculateVectorDirectionBetweenEyeAndCenter().x * orthVector.z;\n\t\tinterimResult.z = calculateVectorDirectionBetweenEyeAndCenter().x * orthVector.y\n\t\t\t\t- calculateVectorDirectionBetweenEyeAndCenter().y * orthVector.x;\n\n\t\tVector3f normalVector = new Vector3f();\n\t\tnormalVector.x = calculateVectorDirectionBetweenEyeAndCenter().z * interimResult.y\n\t\t\t\t- calculateVectorDirectionBetweenEyeAndCenter().y * interimResult.z;\n\t\tnormalVector.y = calculateVectorDirectionBetweenEyeAndCenter().x * interimResult.z\n\t\t\t\t- calculateVectorDirectionBetweenEyeAndCenter().z * interimResult.x;\n\t\tnormalVector.z = calculateVectorDirectionBetweenEyeAndCenter().y * interimResult.x\n\t\t\t\t- calculateVectorDirectionBetweenEyeAndCenter().x * interimResult.y;\n\n\t\tnormalVector = normalVector.normalize();\n\n\t\treturn normalVector;\n\t}",
"@Test\n void getNormal() {\n Plane pl = new Plane(new Point3D(-1,2,1), new Point3D(0,-3,2), new Point3D(1,1,-4)\n );\n\n assertEquals(new Vector(26,7,9).normalize(),\n pl.getNormal(),\n \"Bad normal to trinagle\");\n\n }",
"public Vector330Class normalize(){\n if(this.magnitude() <= EPS){\n return new Vector330Class(0, 0);\n }\n else{\n return new Vector330Class(this.x * (1/this.magnitude()), this.y * (1/this.magnitude()));\n }\n }"
]
| [
"0.73556167",
"0.73553646",
"0.72499275",
"0.70930934",
"0.69901586",
"0.6903979",
"0.6869015",
"0.67609394",
"0.67529726",
"0.6740173",
"0.66877335",
"0.66715795",
"0.66342735",
"0.6622385",
"0.6614597",
"0.66025466",
"0.6552182",
"0.6515193",
"0.6486703",
"0.64609486",
"0.6442784",
"0.6438521",
"0.6431418",
"0.64036936",
"0.63994914",
"0.63923764",
"0.63357425",
"0.62973315",
"0.62737536",
"0.62296385",
"0.61954445",
"0.6140118",
"0.6138176",
"0.613141",
"0.6108135",
"0.6107765",
"0.6094971",
"0.6060225",
"0.605492",
"0.6017626",
"0.6013079",
"0.59942526",
"0.5970708",
"0.5969913",
"0.5958156",
"0.5947717",
"0.594499",
"0.5920616",
"0.58894783",
"0.58574784",
"0.5856092",
"0.58290684",
"0.58217055",
"0.581819",
"0.581663",
"0.5780354",
"0.5773228",
"0.576591",
"0.5746122",
"0.574011",
"0.57334614",
"0.5732299",
"0.57285434",
"0.5722902",
"0.57179284",
"0.5716342",
"0.57150793",
"0.5713945",
"0.5710863",
"0.5704864",
"0.5656846",
"0.5650319",
"0.56490016",
"0.5648412",
"0.56471145",
"0.5637153",
"0.56280375",
"0.56230474",
"0.5604624",
"0.5602166",
"0.55922484",
"0.55620384",
"0.55562234",
"0.5556183",
"0.55237937",
"0.54963535",
"0.5490649",
"0.54898673",
"0.54889935",
"0.5488053",
"0.54788727",
"0.54745287",
"0.5464069",
"0.5462828",
"0.54475045",
"0.5443932",
"0.54372835",
"0.5433067",
"0.5427403",
"0.54247373"
]
| 0.61829066 | 31 |
Creates CacheManager supplied by Redisson instance | public PlusSpringCacheManager() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public RedisCache createRedisCache(){\n if (AppContextUtil.applicationContext != null){\n StringRedisTemplate redisTemplate = AppContextUtil.getBean(\"stringRedisTemplate\");\n return new RedisCache(redisTemplate);\n }\n throw new RuntimeException(\"获取bean失败!\");\n }",
"public Cache createCache() throws Exception {\n return createCache(maxEntries, DEFAULT_CACHE_CLASSNAME);\n }",
"public ConfigurableCacheFactory getCacheFactory();",
"private static Cache getCacheInstance() {\r\n\t\tif( cache == null ) {\r\n\t\t\ttry {\r\n\t\t\t\tCacheFactory cf = CacheManager.getInstance().getCacheFactory();\r\n\t\t\t\tcache = cf.createCache(Collections.emptyMap());\r\n\t\t\t} catch (CacheException e) {\r\n\t\t\t\tlog.log(Level.SEVERE, \"can not initialize cache\", e);\r\n\t\t\t\tcache = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn cache;\r\n\t}",
"public CacheService( CacheManager cachemanager )\n {\n this.cacheManager = cachemanager;\n }",
"public CacheManager()\n\t{\n\t}",
"public HotrodCacheFactory() {\n }",
"protected void getCacheManager()\n {\n try\n {\n if ( cacheMgr == null )\n {\n cacheMgr = CompositeCacheManager.getInstance();\n\n if ( log.isDebugEnabled() )\n {\n log.debug( \" groupcache cacheMgr = \" + cacheMgr );\n }\n }\n else\n {\n if ( log.isDebugEnabled() )\n {\n log.debug( \"already got groupcache cacheMgr = \" + cacheMgr );\n }\n }\n }\n catch ( Exception e )\n {\n log.error( e );\n }\n }",
"public ImcacheCacheManager() {\n this(CacheBuilder.heapCache());\n }",
"private CacheWrapper<AccessPointIdentifier, Integer> createCache() {\n return new CacheWrapper<AccessPointIdentifier, Integer>() {\n \n @Override\n public void put(AccessPointIdentifier key, Integer value) {\n cache.put(key, value);\n }\n \n @Override\n public Integer get(AccessPointIdentifier key) {\n if (cache.containsKey(key)) {\n hitRate++;\n }\n return cache.get(key);\n }\n \n \n };\n }",
"public static CacheManager getCacheManager()\n \t{\n \t\tCacheManager cm = CacheManager.getInstance();\n \t\tif(cm==null) {cm=CacheManager.create();}\n \t\treturn cm;\n \t}",
"private void createImageCache(){\n ImageCacheManager.getInstance().init(this,\n this.getPackageCodePath()\n , DISK_IMAGECACHE_SIZE\n , DISK_IMAGECACHE_COMPRESS_FORMAT\n , DISK_IMAGECACHE_QUALITY\n , ImageCacheManager.CacheType.MEMORY);\n }",
"public TeamCacheManager() {\r\n }",
"@Bean\r\n\tpublic CacheManager cacheManager(@SuppressWarnings(\"rawtypes\") RedisTemplate redisTemplate,\r\n\t\t\tRedisCachePrefix redisCachePrefix, @Value(\"${redis.cluster.cache.expiration:3600}\") Long expiration) {\n\t\tRedisCacheManager cacheManager = new RedisCacheManager(redisTemplate);\r\n\t\tcacheManager.setUsePrefix(true);\r\n\t\tcacheManager.setCachePrefix(redisCachePrefix);\r\n\t\tcacheManager.setDefaultExpiration(expiration);\r\n\t\treturn cacheManager;\r\n\t}",
"private EmbeddedCacheManager getLocalCacheManager() {\n\t\tGlobalConfiguration glob = new GlobalConfigurationBuilder()\n\t\t\t.globalJmxStatistics().allowDuplicateDomains(true).enable().build();\n\t\n\t\torg.infinispan.configuration.cache.Configuration loc = new org.infinispan.configuration.cache.ConfigurationBuilder()\n\t\t\t.expiration().lifespan(1,TimeUnit.DAYS)\n\t\t\t.build();\n\t\t\n\t\treturn new DefaultCacheManager(glob, loc, true);\n\t}",
"public Cache createCache(int cacacity, String className) \n throws Exception {\n\n // use the context class loader to load class so that any\n // user-defined classes in WEB-INF can also be loaded.\n ClassLoader cl = Thread.currentThread().getContextClassLoader();\n Class cacheClass = cl.loadClass(className);\n\n Cache cacheImpl = (Cache)cacheClass.newInstance();\n cacheImpl.init(maxEntries, cacheProps);\n\n return cacheImpl;\n }",
"public CacheManager getCacheManager() {\n return _cache.getCacheManager();\n }",
"public interface CacheManager {\n\n void init();\n\n void destroy();\n\n void del(String key);\n\n void set(String key, Object value);\n\n void set(String key, Object value, int expireTime);\n\n <T> T get(String key, Class<T> clazz);\n\n void hset(String key, String subKey, Object value);\n\n <T> T hget(String key, String subKey, Class<T> clazz);\n\n <T> Map<String, T> hget(String key, Class<T> clazz);\n\n void hrem(String key, String subKey);\n\n long hincr(String key, String subKey);\n\n void sadd(String key, Object val);\n\n boolean sisMember(String key, Object val);\n\n void srem(String key, Object val);\n\n Set<String> sget(String key);\n\n <T> Set<T> sget(String key, Class<T> clazz);\n\n void zadd(String key, Object val, double score);\n\n boolean zisMember(String key, Object val);\n\n void zrem(String key, Object val);\n\n void zrem(String key, double min, double max);\n\n void zreplace(String key, Object val, double score);\n\n double zincr(String key, Object val, double score);\n\n <T> Set<T> zget(String key, double min, double max, Class<T> clazz);\n\n Set<String> zget(String key, double min, double max);\n}",
"@Bean\n public CacheManager cacheManager() {\n\n SimpleCacheManager simpleCacheManager = new SimpleCacheManager();\n GuavaCache addressesCache = new GuavaCache(\"addresses\", \n \t\tCacheBuilder\n \t\t.newBuilder()\n \t\t.build());\n GuavaCache customersCache = new GuavaCache(\"customers\", \n \t\tCacheBuilder\n \t\t.newBuilder()\n .expireAfterAccess(10, TimeUnit.MINUTES)\n .build());\n simpleCacheManager.setCaches(Arrays.asList(addressesCache, customersCache));\n return simpleCacheManager;\n }",
"public interface ICacheManager {\n\tpublic Boolean init();\n public IBoardAgent getBoard(String stGameId);\n public void loadBoardFromFile(String stGameId, String stBoardName);\n public SortedMap<String, Pair<String, Integer>> getPossiblePlayerInEachBoard();\n}",
"public interface CacheManagerAware {\n\n void setCacheManager(CacheManager cacheManager);\n}",
"protected void createLookupCache() {\n }",
"void createCache(String cacheName, Set<CloudCacheStrategy> strategies);",
"@Bean\n CacheManager cacheManager() {\n return new CaffeineCacheManager();\n }",
"public static void createCacheServer2() throws Exception {\n ds = (new ClearGlobalDUnitTest()).getSystem(props);\n CacheObserverImpl observer = new CacheObserverImpl();\n origObserver = CacheObserverHolder.setInstance(observer);\n LocalRegion.ISSUE_CALLBACKS_TO_CACHE_OBSERVER = true;\n\n cache = CacheFactory.create(ds);\n AttributesFactory factory = new AttributesFactory();\n factory.setScope(Scope.GLOBAL);\n RegionAttributes attr = factory.create();\n region = cache.createRegion(REGION_NAME, attr);\n cache.setLockTimeout(3);\n\n }",
"public void init() {\n\t\tif (cache != null) {\n\t\t\tcache.dispose();\n\t\t\tcache = null;\n\t\t}\n\t\tcache = cacheFactory.create(CacheFactoryDirective.NoDCE, \"test\");\n\t}",
"public interface CacheManager extends AutoCloseable {\n /**\n * @param conf the Alluxio configuration\n * @return an instance of {@link CacheManager}\n */\n static CacheManager create(AlluxioConfiguration conf) throws IOException {\n // TODO(feng): make cache manager type configurable when we introduce more implementations.\n return new NoExceptionCacheManager(LocalCacheManager.create(conf));\n }\n\n /**\n * Puts a page into the cache manager. This method is best effort. It is possible that this put\n * operation returns without page written.\n *\n * @param pageId page identifier\n * @param page page data\n * @return true if the put was successful, false otherwise\n */\n boolean put(PageId pageId, byte[] page);\n\n /**\n * Wraps the page in a channel or null if the queried page is not found in the cache or otherwise\n * unable to be read from the cache.\n *\n * @param pageId page identifier\n * @return a channel to read the page\n */\n @Nullable\n ReadableByteChannel get(PageId pageId);\n\n /**\n * Wraps a part of the page in a channel or null if the queried page is not found in the cache or\n * otherwise unable to be read from the cache.\n *\n * @param pageId page identifier\n * @param pageOffset offset into the page\n * @return a channel to read the page\n */\n @Nullable\n ReadableByteChannel get(PageId pageId, int pageOffset);\n\n /**\n * Deletes a page from the cache.\n *\n * @param pageId page identifier\n * @return true if the page is successfully deleted, false otherwise\n */\n boolean delete(PageId pageId);\n}",
"public static CacheManagerExecutorServiceFactory getInstance() {\n return SINGLETON;\n }",
"public static void createCacheServer1() throws Exception {\n ds = (new ClearGlobalDUnitTest()).getSystem(props);\n cache = CacheFactory.create(ds);\n AttributesFactory factory = new AttributesFactory();\n factory.setScope(Scope.GLOBAL);\n RegionAttributes attr = factory.create();\n region = cache.createRegion(REGION_NAME, attr);\n\n }",
"ImplementationManager createManager();",
"public void start() throws LifecycleException {\n\n if (!enabled)\n return;\n\n // create the default cache\n try {\n defaultCache = createCache(maxEntries, cacheClassName);\n } catch (Exception e) {\n _logger.log(Level.WARNING, \"cache.manager.excep_createCache\", e);\n\n String msg = _rb.getString(\"cache.manager.excep_createCache\");\n throw new LifecycleException(msg, e);\n }\n\n // initialize the \"default\" helper\n defaultHelper = new DefaultCacheHelper();\n defaultHelper.setCacheManager(this);\n defaultHelper.init(context, defaultHelperProps);\n\n // initialize the custom cache-helpers\n Iterator helperNames = helperDefs.keySet().iterator();\n while(helperNames.hasNext()) {\n String name = (String) helperNames.next();\n HashMap map = (HashMap)helperDefs.get(name);\n\n try {\n String className = (String)map.get(\"class-name\");\n CacheHelper helper = loadCacheHelper(className);\n helper.init(context, map);\n cacheHelpers.put(name, helper);\n\n } catch (Exception e) {\n String msg = _rb.getString(\"cache.manager.excep_initCacheHelper\");\n Object[] params = { name };\n msg = MessageFormat.format(msg, params);\n\n throw new LifecycleException(msg, e);\n }\n }\n\n // cache-mappings are ordered by the associated filter name\n Iterator filterNames = cacheMappings.keySet().iterator();\n while(filterNames.hasNext()) {\n String name = (String) filterNames.next();\n CacheMapping mapping = (CacheMapping)cacheMappings.get(name);\n\n String helperNameRef = mapping.getHelperNameRef();\n CacheHelper helper;\n if (helperNameRef == null || helperNameRef.equals(\"default\")) {\n helper = defaultHelper;\n } else {\n helper = (CacheHelper) cacheHelpers.get(helperNameRef);\n }\n cacheHelpersByFilterName.put(name, helper);\n }\n }",
"public CacheService()\n {\n }",
"public CacheService()\n {\n }",
"@Override\n public CacheEventListener createCacheEventListener(Properties properties)\n {\n return new YhxiaCacheEventListener();\n }",
"protected void createLookupCache()\n/* */ {\n/* 1260 */ this.lookup = new SimpleCache(1, Math.max(getSize() * 2, 64));\n/* */ }",
"public LettuceCacheManager(CachingProvider cachingProvider, URI uri, ClassLoader classLoader,\n Properties properties) {\n super(cachingProvider, uri, classLoader, properties);\n RedisURI redisURI = RedisURI.create(uri);\n RedisClient redisClient = RedisClient.create(redisURI);\n this.redisClient = redisClient;\n // this.connection = redisClient.connect(new ByteArrayCodec());\n }",
"public static MemoryCache getInstance(MemoryCacheParams params) {\n if (instance == null) {\n instance = new MemoryCache(params);\n }\n\n return instance;\n }",
"public <K, V> Cache<K, V> getCache( String name, Class<K> keyClazz, Class<V> valueClazz )\n {\n if ( cacheManager == null )\n {\n LOG.error( \"Cannot fetch the cache named {}, the CacheServcie is not initialized\", name );\n throw new IllegalStateException( \"CacheService was not initialized\" );\n }\n\n LOG.info( \"fetching the cache named {}\", name );\n\n Cache<K, V> cache = cacheManager.getCache( name, keyClazz, valueClazz );\n\n return cache;\n }",
"public MRUCache(CacheDataFactory<K, V> fact) {\r\n this(DEFAULTSIZE, fact, null);\r\n }",
"public ImcacheCacheManager(BaseCacheBuilder cacheBuilder) {\n this.cacheBuilder = cacheBuilder;\n }",
"public static <K extends Serializable, V extends Serializable> RemoteHttpCacheService<K, V> createRemoteHttpCacheService( ICompositeCacheManager cacheManager )\n {\n Properties props = cacheManager.getConfigurationProperties();\n ICacheEventLogger cacheEventLogger = configureCacheEventLogger( props );\n RemoteHttpCacheServerAttributes attributes = configureRemoteHttpCacheServerAttributes( props );\n\n RemoteHttpCacheService<K, V> service = new RemoteHttpCacheService<K, V>( cacheManager, attributes, cacheEventLogger );\n if ( log.isInfoEnabled() )\n {\n log.info( \"Created new RemoteHttpCacheService \" + service );\n }\n return service;\n }",
"@Override\n\tpublic Cache getCacheInstance(CacheType cacheType) {\n\t\tCache cache = null;\n\t\tif (cacheType.equals(CacheType.ConcurrentCache)) {\n\t\t\tcache = cacheManager.getCache(\"concurrentBatchScheduleCache\");\n\t\t}\n\t\tif (cacheType.equals(CacheType.HistroicalCache)) {\n\t\t\tcache = cacheManager.getCache(\"concurrentBatchScheduleCache\");\n\t\t}\n\t\treturn cache;\n\t}",
"@Bean\n\tpublic CacheManager cacheManager() {\n \tCaffeineCacheManager cacheManager = new CaffeineCacheManager();\n \tcacheManager.setCacheSpecification(\"maximumSize=500,expireAfterWrite=60m\");\n \treturn cacheManager;\n\t}",
"public AbstractCache() {\n }",
"private Cache configureCache(MemoryStoreEvictionPolicy evictionPolicy) {\n\t\tCacheConfiguration cacheConfiguration = new CacheConfiguration(\n\t\t\t\t\"evictionCache\", 2);\n\t\t// set FIFO eviction policy\n\t\tcacheConfiguration\n\t\t\t\t.setMemoryStoreEvictionPolicyFromObject(evictionPolicy);\n\t\t// set time to idle time\n\t\tcacheConfiguration.setTimeToIdleSeconds(300);\n\t\t// set time to live time\n\t\tcacheConfiguration.setTimeToLiveSeconds(600);\n\n\t\tCacheManager cacheManager = CacheManager.create();\n\t\t// create a new cache\n\t\tCache memoryCache = new Cache(cacheConfiguration);\n\t\tcacheManager.addCache(memoryCache);\n\t\tCache evictionCache = cacheManager.getCache(\"evictionCache\");\n\t\tevictionCache.removeAll();\n\t\treturn evictionCache;\n\t}",
"@Override\n default ManagerPrx ice_connectionCached(boolean newCache)\n {\n return (ManagerPrx)_ice_connectionCached(newCache);\n }",
"public CacheStrategy getCacheStrategy();",
"private static ProtobufMetadataManagerImpl getProtobufMetadataManager(EmbeddedCacheManager cacheManager) {\n if (cacheManager == null) {\n throw new IllegalArgumentException(\"cacheManager cannot be null\");\n }\n ProtobufMetadataManagerImpl metadataManager = (ProtobufMetadataManagerImpl) cacheManager.getGlobalComponentRegistry().getComponent(ProtobufMetadataManager.class);\n if (metadataManager == null) {\n throw new IllegalStateException(\"ProtobufMetadataManager not initialised yet!\");\n }\n return metadataManager;\n }",
"public synchronized static MetaDataCache getInstance() {\r\n if (instance == null) {\r\n instance = new MetaDataCache();\r\n }\r\n return instance;\r\n }",
"@Override\n public void cacheStarting(ComponentRegistry cr, Configuration cfg, String cacheName) {\n BasicComponentRegistry gcr = cr.getGlobalComponentRegistry().getComponent(BasicComponentRegistry.class);\n\n if (PROTOBUF_METADATA_CACHE_NAME.equals(cacheName)) {\n BasicComponentRegistry bcr = cr.getComponent(BasicComponentRegistry.class);\n ProtobufMetadataManagerInterceptor protobufInterceptor = new ProtobufMetadataManagerInterceptor();\n bcr.registerComponent(ProtobufMetadataManagerInterceptor.class, protobufInterceptor, true);\n bcr.addDynamicDependency(AsyncInterceptorChain.class.getName(), ProtobufMetadataManagerInterceptor.class.getName());\n bcr.getComponent(AsyncInterceptorChain.class).wired()\n .addInterceptorAfter(protobufInterceptor, EntryWrappingInterceptor.class);\n }\n\n InternalCacheRegistry icr = gcr.getComponent(InternalCacheRegistry.class).running();\n if (!icr.isInternalCache(cacheName)) {\n ProtobufMetadataManagerImpl protobufMetadataManager =\n (ProtobufMetadataManagerImpl) gcr.getComponent(ProtobufMetadataManager.class).running();\n protobufMetadataManager.addCacheDependency(cacheName);\n\n SerializationContext serCtx = protobufMetadataManager.getSerializationContext();\n RemoteQueryManager remoteQueryManager = buildQueryManager(cfg, serCtx, cr);\n cr.registerComponent(remoteQueryManager, RemoteQueryManager.class);\n }\n }",
"CloudCache getCache(String cacheName);",
"public static FilterCacheFactory getInstance() {\n return instance;\n }",
"private void init() {\n mMemoryCache = new LruCache<String, Bitmap>(DEFAULT_MEM_CACHE_SIZE) {\n /**\n * Measure item size in kilobytes rather than units which is more\n * practical for a bitmap cache\n */\n @Override\n protected int sizeOf(String key, Bitmap bitmap) {\n final int bitmapSize = getBitmapSize(bitmap) / 1024;\n return bitmapSize == 0 ? 1 : bitmapSize;\n }\n };\n }",
"public static RequestCountForCartBundleCache getCache()\n\t{\n\t\treturn instance;\n\t}",
"public interface CacheConfigService {\n Cache init();\n\n void close();\n}",
"public interface CacheContext {\n CacheService getCacheService();\n CacheObjectService getCacheObjectService();\n LockService getLockService();\n}",
"public static CacheTracabilityFactory init() {\n\t\ttry {\n\t\t\tCacheTracabilityFactory theCacheTracabilityFactory = (CacheTracabilityFactory)EPackage.Registry.INSTANCE.getEFactory(\"http://www.eclipse.org/tracability/1.0\"); \n\t\t\tif (theCacheTracabilityFactory != null) {\n\t\t\t\treturn theCacheTracabilityFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new CacheTracabilityFactoryImpl();\n\t}",
"public void init() throws CacheException {\r\n\t try {\r\n\t \tmanager = new CacheManager();\r\n ehcache = manager.getCache(E3_RESOURCE_GROUP);\r\n if (ehcache == null) {\r\n \tlogger.warn(\"Could not find configuration [\" + E3_RESOURCE_GROUP + \"]; using defaults.\");\r\n manager.addCache(E3_RESOURCE_GROUP);\r\n ehcache = manager.getCache(E3_RESOURCE_GROUP);\r\n logger.debug(\"started EHCache region: \" + E3_RESOURCE_GROUP);\r\n }\r\n\t }\r\n catch (net.sf.ehcache.CacheException e) {\r\n throw new CacheException(e);\r\n }\r\n \r\n\t\t\r\n\t}",
"protected Cache cache(RequestContext ctx) {\n String serviceId = serviceId(ctx);\n if (serviceId != null) {\n return cacheManager.getCache(serviceId);\n }\n return null;\n }",
"public CacheClientFactory getCacheClientFactory() {\r\n\t\treturn cacheClientFactory;\r\n\t}",
"@NonNull\n private static CacheStorage newInstance(Context context, int type, String name) {\n switch (type) {\n case ORM_LITE:\n return OrmLiteCacheStorage.newInstance(context, name);\n case ROOM:\n return RoomCacheStorage.newInstance(context, name);\n default:\n throw new IllegalArgumentException(String.format(\"Unknown persistent \" +\n \"cache storage with name = %s, type = %d\", name, type));\n }\n }",
"public static ByteArrayCache instance() {\n if (_instance == null) try {\n _instance = (ByteArrayCache) ImmortalMemory.instance().newInstance( ByteArrayCache.class);\n ZenProperties.logger.log(Logger.INFO, ByteArrayCache.class, \"instance\", \"ByteArrayCache created\");\n } catch (Exception e) {\n ZenProperties.logger.log(Logger.FATAL, ByteArrayCache.class, \"instance\", e);\n System.exit(-1);\n }\n return _instance;\n }",
"private void init() {\n\t\tJedisPoolConfig config = new JedisPoolConfig();\r\n\t\tconfig.setMaxTotal(1024);\r\n\t\tconfig.setMaxIdle(200);\r\n\t\tconfig.setMaxWaitMillis(1000);\r\n\t\tconfig.setTestOnBorrow(false);\r\n\t\tconfig.setTestOnReturn(true);\r\n\t\tString ip = \"sg-redis-new.jo1mjq.0001.apse1.cache.amazonaws.com\";\r\n\t\tint port = 6379;\r\n\t\tjedisPool = new JedisPool(config, ip, port);\r\n\t\tlog.info(\"init redis pool[ip:\" + ip + \",port:\" + port + \"]\");\r\n\t}",
"public static MyRecyclerView newInstance(LruCache<String,Bitmap> mImgMemoryCache) {\r\n\r\n MyRecyclerView fragment = new MyRecyclerView();\r\n// fragment.setImgMemoryCache(mImgMemoryCache);\r\n Bundle args = new Bundle();\r\n fragment.setArguments(args);\r\n return fragment;\r\n }",
"public interface MRConnectionManagerContainer {\n\n\n String MR_GROUP_PATH = \"/zk/mr/\";\n\n void start() throws Exception;\n\n void start(Map<String, MRMessageListener> messageListenerMap) throws Exception;\n\n void register();\n\n void add(Map.Entry<String, String> entry) throws Exception;\n\n void update(Map.Entry<String, String> entry);\n\n void addListener(String topic, MRMessageListener mrMessageListener);\n\n void remove(Map.Entry<String, String> entry);\n\n void refresh();\n\n void shutdown();\n\n void shutdownAndWait() throws InterruptedException;\n\n Map<String, MRConnectionManager> getMrConnectionManagerCache();\n\n static String groupPath(String group) {\n return String.format(\"%s%s\", MR_GROUP_PATH, group);\n }\n\n void setPerfetchSize(int perfetchSize);\n\n\n}",
"@Override\n public void init(String PipelineName, String ModuleName)\n throws InitializationException\n {\n String CacheObjectName;\n\n // Do the inherited work, e.g. setting the symbolic name etc\n super.init(PipelineName,ModuleName);\n\n // Get the cache object reference\n CacheObjectName = PropertyUtils.getPropertyUtils().getPluginPropertyValue(PipelineName,\n ModuleName,\"DataCache\");\n\n CMRR = CacheFactory.getGlobalManager(CacheObjectName);\n\n if (CMRR == null)\n {\n message = \"Could not find cache for <\" + CacheObjectName + \">\";\n throw new InitializationException(message,getSymbolicName());\n }\n\n MFC = (MinFeeCache)CMRR.get(CacheObjectName);\n if (MFC == null)\n {\n message = \"Could not find cache entry for <\" + CacheObjectName + \">\";\n throw new InitializationException(message,getSymbolicName());\n }\n }",
"@Bean\n public EhCacheManagerFactoryBean ehCacheManagerFactoryBean() {\n EhCacheManagerFactoryBean ehCacheManagerFactoryBean = new EhCacheManagerFactoryBean();\n ehCacheManagerFactoryBean.setConfigLocation(new ClassPathResource(\"ehcache.xml\"));\n return ehCacheManagerFactoryBean;\n }",
"public void init() throws CacheException {\n // no-op\n }",
"public LibraryCache() {\n\t }",
"public interface NodeManagerFactory {\n\n MemcachedNode parseKeyToNode(String key);\n\n MemcachedNode getNodeByKey(String key);\n\n void addNode(String key);\n\n void addNodeList(String... keys);\n\n void deleteNode(String key);\n\n void deleteNodeList(String... keys);\n\n void replaceNode(String oldKey, String newKey);\n}",
"@Override\n protected DownloadManager getDownloadManager() {\n databaseProvider = new ExoDatabaseProvider(this);\n\n // A download cache should not evict media, so should use a NoopCacheEvictor.\n checkFolder();\n downloadCache = new SimpleCache(\n mDir,\n new NoOpCacheEvictor(),\n databaseProvider);\n // Create a factory for reading the data from the network.\n dataSourceFactory = new DefaultHttpDataSourceFactory();\n\n // Choose an executor for downloading data. Using Runnable::run will cause each download task to\n // download data on its own thread. Passing an executor that uses multiple threads will speed up\n // download tasks that can be split into smaller parts for parallel execution. Applications that\n // already have an executor for background downloads may wish to reuse their existing executor.\n Executor downloadExecutor = Runnable::run;\n\n // Create the download manager.\n downloadManager = new DownloadManager(\n this,\n databaseProvider,\n downloadCache,\n dataSourceFactory,\n downloadExecutor);\n\n // Optionally, setters can be called to configure the download manager.\n// downloadManager.setRequirements(requirements);\n// downloadManager.setMaxParallelDownloads(3);\n return downloadManager;\n }",
"public interface PermissionService {\n\n @Caching()\n public SysPermission findByUrl(String url);\n\n}",
"public interface GlobalCacheManager {\n void ensureGlobalCacheExistAndWritable();\n\n Path getGlobalPackageCachePath(String packagePath);\n\n Path getGlobalGoBinCache(String relativePath);\n\n Optional<GlobalCacheMetadata> getMetadata(Path packagePath);\n\n /**\n * Locks global cache directory of {@code dependency}, and call the {@code callable}\n *\n * @param dependency dependency to be locked\n * @param callable code to be executed under lock\n * @param <T> return value type of callable\n * @return the return value of callable\n * @throws Exception exception thrown by callable\n */\n <T> T runWithGlobalCacheLock(GolangDependency dependency, Callable<T> callable) throws Exception;\n\n void updateCurrentDependencyLock(GolangDependency dependency);\n\n boolean currentRepositoryIsUpToDate(NotationDependency dependency);\n}",
"public interface Caching {\n\t\n\t/**\n\t * ititialize resources for a cache\n\t *\n\t */\n\tvoid init();\n\t\n\t/**\n\t * clear cache\n\t *\n\t */\n\tvoid clear();\n\n}",
"@BeforeAll\n static void cacheManager() {\n }",
"public static FcRenewalManager getInstance() {\n try {\n logger.methodStart();\n if (instance == null) {\n instance = new FcRenewalManager();\n }\n return (FcRenewalManager) instance;\n } finally {\n logger.methodEnd();\n }\n }",
"protected IAnalysisCache createAnalysisCache() throws IOException {\n IAnalysisCache analysisCache = ClassFactory.instance().createAnalysisCache(classPath, bugReporter);\n\n // Register the \"built-in\" analysis engines\n registerBuiltInAnalysisEngines(analysisCache);\n\n // Register analysis engines in plugins\n registerPluginAnalysisEngines(detectorFactoryCollection, analysisCache);\n\n // Install the DetectorFactoryCollection as a database\n analysisCache.eagerlyPutDatabase(DetectorFactoryCollection.class, detectorFactoryCollection);\n\n Global.setAnalysisCacheForCurrentThread(analysisCache);\n return analysisCache;\n }",
"public static FileCache getInstance() {\n\t\tif (instance == null){\r\n\t\t\ttry {\r\n\t\t\t\tinstance = new FileCache();\r\n\t\t\t} catch (IOException 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\treturn instance;\r\n\t}",
"public static Configurable configure() {\n return new RedisManager.ConfigurableImpl();\n }",
"public Cache() {\n this(null);\n }",
"Ressource createRessource();",
"@Override\n public void initSessionFactories() {\n super.initSessionFactories();\n\n sessionFactories.put(EntityCache.class, new SessionFactory() {\n\n @Override\n public Class<?> getSessionType() {\n return EntityCache.class;\n }\n @Override\n public Session openSession(CommandContext commandContext) {\n return new EntityCacheImpl();\n }\n });\n }",
"public interface ICache {\n\t\n\t/**\n\t * <p>\n\t * get the Cached Object from cache pool by the cache String key\n\t * @param key\n\t * @return\n\t */\n\tpublic Object get(String key);\n\t\n\t\n\t\n\t/**\n\t * <p>\n\t * \n\t * @param key\n\t * @return old cache object \n\t */\n\tpublic Object put(String key,Object value);\n\t\n\t/**\n\t * <p>\n\t * get the Cached Object from cache pool by the cache String key quietly,\n\t * without update the statistic data\n\t * @param key\n\t * @return\n\t */\n\tpublic Object getQuiet(String key);\n\t\n\t\n\t/**\n\t * <p>\n\t * remove the cached object from cache pool by the cache String key\n\t * @param key\n\t * @return\n\t */\n\tpublic Object remove(String key);\n\t\n\t/**\n\t * <p>\n\t * free specied size mem\n\t * @param size unit in Byte\n\t * @return\n\t */\n\tpublic long free(long size);\n\t\n\t\n\t/**\n\t * <p>\n\t * flush to the underly resource\n\t */\n\tpublic void flush();\n\t\n}",
"public static ILateralCacheListener getInstance( ILateralCacheAttributes ilca )\n {\n //throws IOException, NotBoundException\n ILateralCacheListener ins = ( ILateralCacheListener ) instances.get( ilca.getUdpMulticastAddr() + \":\" + ilca.getUdpMulticastPort() );\n if ( ins == null )\n {\n synchronized ( LateralGroupCacheUDPListener.class )\n {\n if ( ins == null )\n {\n ins = new LateralGroupCacheUDPListener( ilca );\n }\n if ( log.isDebugEnabled() )\n {\n log.debug( \"created new listener \" + ilca.getUdpMulticastAddr() + \":\" + ilca.getUdpMulticastPort() );\n }\n instances.put( ilca.getUdpMulticastAddr() + \":\" + ilca.getUdpMulticastPort(), ins );\n }\n }\n return ins;\n }",
"public CacheTracabilityFactoryImpl() {\n\t\tsuper();\n\t}",
"public MainAPI (com.intersys.objects.Database db) throws com.intersys.objects.CacheException {\n super (((com.intersys.cache.SysDatabase)db).newCacheObject (CACHE_CLASS_NAME));\n }",
"public interface RedisCacheService {\n void put(Object key , Object value);\n Object get(Object key);\n}",
"public DescriptorCacheImpl() {\n super();\n \n LOG2.debug(\"New instance!\");\n \n _typeMap = new HashMap();\n _xmlNameMap = new HashMap();\n _missingTypes = new ArrayList();\n }",
"protected net.sf.ehcache.Ehcache getCache() {\n return cache;\n }",
"public Cache getCache(String name)\r\n/* 39: */ {\r\n/* 40:64 */ return (Cache)this.cacheMap.get(name);\r\n/* 41: */ }",
"private void initializeCache(int cacheSize){\n \t\tlruCache = new LRUCache(cacheSize);\n \t}",
"public interface DnaCacheManagerService {\n\n\tpublic void save(Dna dna);\n\t\n\tpublic void persistAllDnas();\n\t\n\tpublic boolean isEmpty();\n}",
"@PostConstruct\n public void initCache() {\n cache = Collections.synchronizedMap(new HashMap<>(cacheCapacity, 1));\n }",
"public static BazaarManager newInstance() throws BazaarException {\r\n\t\tfinal BazaarManager bazaarManager;\r\n\t\t// final MutableConfiguration<Long, BazaarManager> configuration = new\r\n\t\t// MutableConfiguration<Long, BazaarManager>();\r\n\t\t// configuration.setStoreByValue(false);\r\n\t\t// configuration.setTypes(Long.class, BazaarManager.class);\r\n\t\t// configuration.setExpiryPolicyFactory(AccessedExpiryPolicy.factoryOf(Duration.ONE_MINUTE));\r\n\t\t// final Cache<Long, BazaarManager> cache =\r\n\t\t// Cache.newInstance(configuration, BazaarManager.class.getName(),\r\n\t\t// Long.class, BazaarManager.class);\r\n\t\t// if (cache.containsKey(Thread.currentThread().getId())) {\r\n\t\t// bazaarManager = cache.get(Thread.currentThread().getId());\r\n\t\t// }\r\n\t\t// else {\r\n\t\ttry {\r\n\t\t\tfinal Class<?> bazaarManagerClass = Class.forName(\"org.apache.bazaar.BazaarManagerImpl\");\r\n\t\t\tfinal Method method = bazaarManagerClass.getDeclaredMethod(\"newInstance\", new Class[] {});\r\n\t\t\tmethod.setAccessible(true);\r\n\t\t\tbazaarManager = (BazaarManager)method.invoke(new Object[] {});\r\n\t\t\t// cache.put(Thread.currentThread().getId(), bazaarManager);\r\n\t\t}\r\n\t\tcatch (final NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException\r\n\t\t\t\t| InvocationTargetException | ClassNotFoundException exception) {\r\n\t\t\tthrow new BazaarException(exception);\r\n\t\t}\r\n\t\t// }\r\n\t\treturn bazaarManager;\r\n\t}",
"public CacheTest() {\n }",
"public DependencyManager(@Nonnull ServerCubeCache cubeProvider) {\n\t\tthis.cubeProvider = cubeProvider;\n\t\tthis.requiredMap = new HashMap<>();\n\t}",
"public ResManager()\n {\n }",
"public CoreRestClientImpl(final File cacheDirectory) {\n CoreLog.d(\"Initialising the Rest Client\");\n\n final OkHttpClient client = new OkHttpClient();\n\n // initialise the cache directory if the parameter is not null\n if (cacheDirectory != null) {\n final Cache cache = new Cache(cacheDirectory, 10 * 1024 * 1024);\n client.setCache(cache);\n CoreLog.d(\"Client initialised with cache\");\n } else {\n CoreLog.d(\"Client initialised without cache\");\n }\n }",
"@Before\n\tpublic void init()\n\t{\n\t\tEntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory(\"persistenceUnit\");\n\t\tEntityManager entityManager = entityManagerFactory.createEntityManager();\n\t\tcacheManager = new CacheManagerDefaultImpl();\n\t\t((CacheManagerDefaultImpl) cacheManager).setEntityManager(entityManager);\n\t}",
"public static synchronized SalesOrderCache getInstance() {\n\t\tif(instance == null) {\n\t\t\tinstance = new SalesOrderCache();\n\t\t}\n\t\treturn instance;\n\t}"
]
| [
"0.6679711",
"0.6642056",
"0.6465023",
"0.6463885",
"0.6454556",
"0.6375479",
"0.635114",
"0.6314085",
"0.6234646",
"0.6169041",
"0.61649424",
"0.6136637",
"0.61252725",
"0.6108854",
"0.60911864",
"0.6037208",
"0.60110646",
"0.5996221",
"0.5923909",
"0.5867346",
"0.5852381",
"0.5777275",
"0.57621634",
"0.5723551",
"0.5693414",
"0.5685289",
"0.56663656",
"0.5649826",
"0.55700856",
"0.55522335",
"0.55441755",
"0.5532222",
"0.5532222",
"0.55303663",
"0.5495729",
"0.5494907",
"0.54913384",
"0.5484079",
"0.54799545",
"0.54622036",
"0.54578406",
"0.54570574",
"0.5454741",
"0.542288",
"0.5399341",
"0.53963506",
"0.5385317",
"0.53815657",
"0.537162",
"0.5329401",
"0.5316161",
"0.5314159",
"0.5312525",
"0.5274817",
"0.5258364",
"0.5244078",
"0.5236525",
"0.5192747",
"0.5169339",
"0.51580775",
"0.51564986",
"0.51447904",
"0.51363367",
"0.5127881",
"0.5110189",
"0.5109192",
"0.5090395",
"0.5077268",
"0.50765496",
"0.50753474",
"0.5069761",
"0.5064175",
"0.50585854",
"0.50532377",
"0.5045688",
"0.50434464",
"0.5036942",
"0.50364125",
"0.5020474",
"0.5012595",
"0.5003302",
"0.4998384",
"0.49910292",
"0.49797124",
"0.4978663",
"0.4963723",
"0.49602184",
"0.49583942",
"0.49519113",
"0.4943517",
"0.49422225",
"0.4939572",
"0.49383238",
"0.49310136",
"0.4927456",
"0.49259505",
"0.49179685",
"0.49131525",
"0.49069807",
"0.49057978"
]
| 0.5839371 | 21 |
Defines 'fixed' cache names. A new cache instance will not be created in dynamic for nondefined names. `null` parameter setups dynamic mode | public void setCacheNames(Collection<String> names) {
if (names != null) {
for (String name : names) {
getCache(name);
}
dynamic = false;
} else {
dynamic = true;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void createLookupCache()\n/* */ {\n/* 1260 */ this.lookup = new SimpleCache(1, Math.max(getSize() * 2, 64));\n/* */ }",
"public final String zzfo(String str) {\n String valueOf = String.valueOf(super.zzfo(str));\n return valueOf.length() != 0 ? \"cache:\".concat(valueOf) : new String(\"cache:\");\n }",
"@Override\n\tprotected String getCacheName() {\n\t\treturn null;\n\t}",
"public TypeLikeUtilityVariableCache(String name) {\n this.name = name;\n }",
"public interface LocalCachConfigKey {\n String localCacheMaxSize = \"localCacheMaxSize\";\n String localCacheExpireTime = \"localCacheExpireTime\";\n String localCacheEnableStat = \"localCacheEnableStat\";\n String localCacheStatInterval = \"localCacheStatInterval\";\n}",
"void createCache(String cacheName, Set<CloudCacheStrategy> strategies);",
"public static String getCacheName0()\n {\n return s_sCacheName0;\n }",
"protected void createLookupCache() {\n }",
"protected String freshLocalName(String hint) {\n if (hint == null || hint.equals(\"\")) {\n hint = \"$local\";\n }\n String fresh;\n if (!takenLocalNames.contains(hint)) {\n fresh = hint;\n } else {\n for (int i = 1; ; i++) {\n fresh = hint + Integer.toString(i);\n if (!takenLocalNames.contains(fresh)) {\n break;\n }\n }\n }\n takenLocalNames.add(fresh);\n return fresh;\n }",
"public interface CacheKey {\n\n String CK_TOPICS = \"ck.mqtt.service\";\n String CK_TOPICS_FRESH = \"ck.mqtt.topics.is.refresh\";\n String CK_TOPIC_IS_SUBSCRIBE = \"ck.mqtt.topic.is.subscribe.%s\";\n}",
"public MLNKVMemoryCache(String name) {\n this.name = name;\n LRUCountLimit = 10000;\n FIFOCountLimit = 1000;\n memorySizeLimit = 100 << 20;\n releaseOnMainThread = false;\n\n useFIFO = true;\n useLRU = true;\n\n weakMap = new HashMap<>();\n LRUCache = new MLNKVCache();\n FIFOCache = new MLNKVCache();\n\n LRUCache.releaseOnMainThread = releaseOnMainThread;\n FIFOCache.releaseOnMainThread = releaseOnMainThread;\n }",
"void onUpdateCachedEngineName(FirstRunActivity caller);",
"public static String getCacheName1()\n {\n return s_sCacheName1;\n }",
"@Override\n\tprotected String getQueryCacheName() {\n\t\treturn null;\n\t}",
"TableCache(String paramterName, String tableName) {\n\n cache = new HashMap<>(1);\n cache.put(paramterName, tableName);\n\n }",
"@Override\n\tpublic void setCaching(boolean caching) {\n\t\t\n\t}",
"public String getName() {\n return cache.getName();\n }",
"public void setName(String arg[]) throws ReadWriteException\n\t{\n\t\tsetValue(_Prefix + HardZone.NAME.toString(), arg);\n\t}",
"private HashMap<String, Element> construireCacheDefElement() {\n cacheDefElement = new HashMap<String, Element>();\n cacheNomsElements = new HashMap<Element, String>();\n final NodeList lelements = racine_schema.getElementsByTagName(\"ELEMENT\");\n for (int i=0; i<lelements.getLength(); i++) {\n final Element el = (Element)lelements.item(i);\n final String nom = el.getAttribute(\"nom\");\n cacheDefElement.put(nom, el);\n cacheNomsElements.put(el, nom);\n }\n return(cacheDefElement);\n }",
"public void setName(String arg) throws ReadWriteException\n\t{\n\t\tsetValue(_Prefix + HardZone.NAME.toString(), arg);\n\t}",
"@Override\r\n public void setCaching(int parseInt) {\n\r\n }",
"@Override\n public void put( final K name, final V obj )\n {\n // Call put with a copy of the contained caches default attributes.\n // the attributes are copied by the cacheControl\n put( name, obj, this.getCacheControl().getElementAttributes() );\n }",
"public void setName( java.lang.String newValue ) {\n __setCache(\"name\", newValue);\n }",
"FixedTextureCache()\n {\n textureMap = new HashMap();\n componentMap = new HashMap();\n }",
"public HeapCacheBuilder name(final String name) {\n checkNotEmpty(name, \"name can't be empty\");\n this.name = name;\n return this;\n }",
"public void setCached() {\n }",
"public String mo10089a(String str, List<String> list, C1084f fVar) {\n if (!C1277l.m3042b(str)) {\n return str;\n }\n if (!((Boolean) this.f2745b.mo10202a(C1096c.f2348bJ)).booleanValue()) {\n mo10068a(\"Resource caching is disabled, skipping cache...\");\n return str;\n }\n StringBuilder sb = new StringBuilder(str);\n boolean shouldCancelHtmlCachingIfShown = fVar.shouldCancelHtmlCachingIfShown();\n for (String str2 : list) {\n int i = 0;\n int i2 = 0;\n while (i < sb.length()) {\n if (mo10093c()) {\n return str;\n }\n i = sb.indexOf(str2, i2);\n if (i == -1) {\n continue;\n break;\n }\n int length = sb.length();\n int i3 = i;\n while (!this.f2762e.contains(Character.valueOf(sb.charAt(i3))) && i3 < length) {\n i3++;\n }\n if (i3 <= i || i3 == length) {\n mo10072d(\"Unable to cache resource; ad HTML is invalid.\");\n return str;\n }\n String substring = sb.substring(str2.length() + i, i3);\n if (!C1277l.m3042b(substring)) {\n StringBuilder sb2 = new StringBuilder();\n sb2.append(\"Skip caching of non-resource \");\n sb2.append(substring);\n mo10068a(sb2.toString());\n } else if (!shouldCancelHtmlCachingIfShown || !fVar.hasShown()) {\n String a = m2343a(str2, substring);\n if (a != null) {\n sb.replace(i, i3, a);\n this.f2763f.mo10025e();\n } else {\n this.f2763f.mo10026f();\n }\n } else {\n mo10068a(\"Cancelling HTML caching due to ad being shown already\");\n this.f2763f.mo10019a();\n return str;\n }\n i2 = i3;\n }\n }\n return sb.toString();\n }",
"public OldOldCache()\n {\n this(DEFAULT_UNITS);\n }",
"public void resetCache() {\n\t\tlogicClassNames = new HashMap<String, String>();\n\t}",
"@Override\n\tprotected CacheKey createCacheKey(String key) {\n\t\treturn new ConfigCacheKey(key);\n\t}",
"public final String getName(@NonNull UUID player, boolean expensiveLookups) {\n // If the player is online, give them their UUID.\n // Remember, local data > remote data.\n if (ProxyServer.getInstance().getPlayer(player) != null)\n return ProxyServer.getInstance().getPlayer(player).getName();\n\n // Check if it exists in the map\n CachedUUIDEntry cachedUUIDEntry = uuidToNameMap.get(player);\n if (cachedUUIDEntry != null) {\n if (!cachedUUIDEntry.expired())\n return cachedUUIDEntry.getName();\n else\n uuidToNameMap.remove(player);\n }\n\n // Okay, it wasn't locally cached. Let's try Redis.\n try (Jedis jedis = coreAPI.getRedisManager().getResource()) {\n String stored = jedis.hget(\"uuid-cache\", player.toString());\n if (stored != null) {\n // Found an entry value. Deserialize it.\n CachedUUIDEntry entry = coreAPI.getGson().fromJson(stored, CachedUUIDEntry.class);\n\n // Check for expiry:\n if (entry.expired()) {\n jedis.hdel(\"uuid-cache\", player.toString());\n // Doesn't hurt to also remove the named entry as well.\n // TODO: Since UUIDs are fixed, we could look up the name and see if the UUID matches.\n jedis.hdel(\"uuid-cache\", entry.getName());\n } else {\n nameToUuidMap.put(entry.getName().toLowerCase(), entry);\n uuidToNameMap.put(player, entry);\n return entry.getName();\n }\n }\n\n if (!expensiveLookups || !ProxyServer.getInstance().getConfig().isOnlineMode())\n return null;\n\n // That didn't work. Let's ask Mojang. This call may fail, because Mojang is insane.\n String name;\n try {\n List<String> nameHist = NameFetcher.nameHistoryFromUuid(player);\n name = Iterables.getLast(nameHist, null);\n } catch (Exception e) {\n coreAPI.getLogger().log(Level.SEVERE, \"Unable to fetch name from Mojang for \" + player, e);\n return null;\n }\n\n if (name != null) {\n persistInfo(name, player, jedis);\n return name;\n }\n\n return null;\n } catch (JedisException e) {\n coreAPI.getLogger().log(Level.SEVERE, \"Unable to fetch name for \" + player, e);\n return null;\n }\n }",
"public void init() {\n\t\tif (cache != null) {\n\t\t\tcache.dispose();\n\t\t\tcache = null;\n\t\t}\n\t\tcache = cacheFactory.create(CacheFactoryDirective.NoDCE, \"test\");\n\t}",
"void define(String name) {\n assertNotDefined(name);\n values.put(name, null);\n }",
"private void ini_CacheDB()\r\n\t{\r\n\t\tLogger.DEBUG(\"ini_CacheDB\");\r\n\t\t// chk if exist filter preset splitter \"#\" and Replace\r\n\r\n\t}",
"private void resizeCache() {\n\t\tString[] newCache = new String[stringCache.length * 2];\n\t\tfor (int i = 0; i < stringCache.length; i++) {\n\t\t\tnewCache[i] = stringCache[i];\n\t\t}\n\t\tstringCache = newCache;\n\t}",
"public MultiCache () {\n super();\n this.locals = new ArrayList<Coordinates>();\n this.stage = 0;\n }",
"@Override\n public boolean isCaching() {\n return false;\n }",
"public void setName(String arg, String compcode) throws ReadWriteException\n\t{\n\t\tsetValue(_Prefix + HardZone.NAME.toString(), arg, compcode);\n\t}",
"public void netsCompiled(ShadowLookup oldLookup) {\n }",
"public static void main(String[] args) {\nfinal String str=\"Hello\";//constant variables CANT BE change;\n// name=\"School\";\n\n\t}",
"public MRUCache(CacheDataFactory<K, V> fact) {\r\n this(DEFAULTSIZE, fact, null);\r\n }",
"public CachingConnectionFactory() {\n\t\tthis((String) null);\n\t}",
"public interface ICacheType extends IType {\n\n String TYPE_LOG_SERVICE = \"log_service\";\n}",
"synchronized String getFixedName(String originalName) {\r\n return originalNamesToFixedNames.get(originalName);\r\n }",
"public void testBadCustomCacheSetting() {\n Map props = new HashMap(System.getProperties());\n props.put(\"openjpa.MetaDataFactory\", \"jpa(Types=\" + Person.class.getName() + \")\");\n props.put(\"openjpa.jdbc.QuerySQLCache\",\n \"org.apache.openjpa.persistence.compatible.TestQuerySQLCache.BadCacheMap\");\n\n OpenJPAEntityManagerFactorySPI emf1 = null;\n try {\n emf1 = (OpenJPAEntityManagerFactorySPI)OpenJPAPersistence.\n cast(Persistence.createEntityManagerFactory(\"test\", props));\n //\n // EMF creation must throw an exception because the cache implementation class will not be found\n //\n fail(\"EMF creation must throw an exception because the cache implementation class will not be found\");\n }\n catch (Exception e) {\n assertTrue(true);\n } finally {\n closeEMF(emf1);\n }\n }",
"public Cache getCache(String name)\r\n/* 39: */ {\r\n/* 40:64 */ return (Cache)this.cacheMap.get(name);\r\n/* 41: */ }",
"@Override\n\tpublic Object getBeanCache(String name) {\n\t\treturn null;\n\t}",
"public static void setNewStatic(String value) {\n }",
"public static String getCacheClassName( ) {\n return CACHE_CLASS_NAME;\n }",
"private CacheWrapper<AccessPointIdentifier, Integer> createCache() {\n return new CacheWrapper<AccessPointIdentifier, Integer>() {\n \n @Override\n public void put(AccessPointIdentifier key, Integer value) {\n cache.put(key, value);\n }\n \n @Override\n public Integer get(AccessPointIdentifier key) {\n if (cache.containsKey(key)) {\n hitRate++;\n }\n return cache.get(key);\n }\n \n \n };\n }",
"protected abstract void initCache(List<RECIPE> recipes);",
"@Override\n public Expression fixArguments(Expression... arguments) {\n if (arguments[1] instanceof StringLiteral && arguments[2] instanceof StringLiteral) {\n staticMap = buildMap(((StringLiteral) arguments[1]).getValue(), ((StringLiteral) arguments[2]).getValue());\n }\n return null;\n }",
"public String getName()\r\n/* 91: */ {\r\n/* 92:112 */ return k_() ? aL() : \"container.minecart\";\r\n/* 93: */ }",
"@Test\n public void simpleAPINoGenericsAndNoTypeEnforcementStoreByReference() {\n\n MutableConfiguration config = new MutableConfiguration().setStoreByValue(false);\n Cache cache = cacheManager.createCache(cacheName, config);\n Identifier2 one = new Identifier2(\"1\");\n\n //can put different things in\n cache.put(one, \"something\");\n cache.put(pistachio.getName(), pistachio);\n cache.put(tonto.getName(), tonto);\n cache.put(bonzo.getName(), bonzo);\n cache.put(juno.getName(), juno);\n cache.put(talker.getName(), talker);\n\n try {\n cache.put(skinny.getName(), skinny);\n } catch(Exception e) {\n //not serializable expected\n }\n //can get them out\n Identifier2 one_ = new Identifier2(\"1\");\n Assert.assertEquals(one, one_);\n Assert.assertEquals(one.hashCode(), one_.hashCode());\n assertNotNull(cache.get(one_));\n assertNotNull(cache.get(one));\n assertNotNull(cache.get(pistachio.getName()));\n\n //can remove them\n assertTrue(cache.remove(one));\n assertTrue(cache.remove(pistachio.getName()));\n }",
"public void setObjectName(java.lang.String param){\n localObjectNameTracker = true;\n \n this.localObjectName=param;\n \n\n }",
"public void init_lookup(){\n for(int i =0 ; i< MAX ; i++){\n lookup[i] =0;\n }\n }",
"public static String buildChildCacheName(String name, String childName) {\n return name + \"-\" + childName;\n }",
"public void EstaticCache(){\n LinkedHashMap<String, String> ParticionAux = new LinkedHashMap <String,String>();\n Cache.add(ParticionAux);\n for (int i = 0; i < Estatico.length; i++) {\n \n Cache.get(0).put(Estatico[i], ResEstatico[i]);\n // System.out.println(\"===== Particion de Cache N°\"+ParticionAux.values()+\" =====\");\n \n }\n //this.Cache.add(ParticionAux); // carga el hashMap en una particion del cache\n //System.out.println(\"===== Particion de Cache AQUIAQUI\"+Cache.get(0).values()+\" =====\");\n // ParticionAux.clear(); // limpia el Hashmap aux\n }",
"private static String getCcacheName(KOptions klOptions) {\n String ccacheName;\n String ccacheNameEnv = System.getenv(\"KRB5CCNAME\");\n String ccacheNameConf = null;\n\n File confDir = new File(\"/etc\");\n if (klOptions.contains(KlistOption.CONF_DIR)) {\n confDir = klOptions.getDirOption(KlistOption.CONF_DIR);\n }\n\n try {\n KrbClient krbClient = new KrbClient(confDir);\n ccacheNameConf = krbClient.getSetting().getKrbConfig().getString(\"default_ccache_name\");\n } catch (KrbException e) {\n System.err.println(\"Create krbClient failed: \" + e.getMessage());\n System.exit(1);\n }\n if (ccacheNameEnv != null) {\n ccacheName = ccacheNameEnv;\n } else if (ccacheNameConf != null) {\n ccacheName = ccacheNameConf;\n } else {\n StringBuilder uid = new StringBuilder();\n try {\n //Get UID through \"id -u\" command\n String command = \"id -u\";\n Process child = Runtime.getRuntime().exec(command);\n InputStream in = child.getInputStream();\n int c;\n while ((c = in.read()) != -1) {\n uid.append((char) c);\n }\n in.close();\n } catch (IOException e) {\n System.err.println(\"Failed to get UID.\");\n System.exit(1);\n }\n ccacheName = \"krb5cc_\" + uid.toString().trim();\n ccacheName = SysUtil.getTempDir().toString() + \"/\" + ccacheName;\n }\n\n return ccacheName;\n }",
"public static Object createNameforNewEnsemble(Map extendedData) {\n \t\treturn \"A dynamic name\";\r\n \t}",
"static Pattern m36427k(String str) {\n Pattern pattern;\n if (f24496af == null) {\n f24496af = new HashMap<>();\n pattern = null;\n } else {\n pattern = (Pattern) f24496af.get(str);\n }\n if (pattern != null) {\n return pattern;\n }\n if (f24496af.size() == 10) {\n f24496af.clear();\n }\n Pattern compile = Pattern.compile(str, 40);\n f24496af.put(str, compile);\n return compile;\n }",
"public interface DBName {\n final static String DB = \"menu.db\";\n final static String Coffee = \"Menu\";\n final static String Ade = \"Ade\";\n final static String Basket = \"Basket\";\n final static String OrderList = \"OrderList\";\n}",
"public final String mo38130a() {\n return \"com.google.android.gms.ads.service.CACHE\";\n }",
"public CCache (String name, int initialCapacity)\n\t{\n\t\tthis (name, initialCapacity, 120);\n\t}",
"@Override\n\tpublic boolean isCaching() {\n\t\treturn false;\n\t}",
"public Name createTemporaryName() {\n return Name.makeFresh(\"t\");\n }",
"public static void setName(String n){\n\t\tname = n;\n\t}",
"public void makeName(String str) {\n this.name = str + iL++;\n }",
"@Transient\n public void setCacheKey(String key) {\n String keyVals[];\n if(key.contains(\".\")) {\n keyVals = key.split(\".\");\n } else {\n keyVals = new String[] {key};\n }\n this.setTableName(keyVals[0]);\n }",
"protected void reinitializeName()\n {\n\t\tname = StsLoader.reinitializeName(name);\n }",
"private static void initFileNames() {\n if (fileNames == null) {\n fileNames = new HashMap<>();\n }\n fileNames.put(\"Linked List (simple)\", \"MySimpleLinkedList\");\n fileNames.put(\"Linked List\", \"MyLinkedList\");\n fileNames.put(\"Stack\", \"MyStack\");\n fileNames.put(\"Queue\", \"MyArrayDeque\");\n fileNames.put(\"Graph\", \"MyGraph\");\n fileNames.put(\"HashTable\", \"MyHashTable\");\n fileNames.put(\"Linear Search\", \"Algorithms\");\n fileNames.put(\"Binary Search\", \"Algorithms\");\n fileNames.put(\"Bubble Sort\", \"Algorithms\");\n fileNames.put(\"Insertion Sort\", \"Algorithms\");\n fileNames.put(\"Selection Sort\", \"Algorithms\");\n fileNames.put(\"Shell Sort\", \"Algorithms\");\n fileNames.put(\"Merge Sort\", \"Algorithms\");\n fileNames.put(\"Merge Sort (in-place)\", \"Algorithms\");\n fileNames.put(\"Quick Sort\", \"Algorithms\");\n }",
"public String getName()\n {\n return m_sCacheName;\n }",
"private void initMapNameMapping() {\n mMapNameMapping.clear();\n\n // Load the name mapping from the config\n ConfigurationSection mappingSection = getConfig().getConfigurationSection(MappingSectionName);\n if (mappingSection != null) {\n // Load and check the mapping found in the config\n Map<String, Object> configMap = mappingSection.getValues(false);\n for (Map.Entry<String, Object> entry : configMap.entrySet()) {\n mMapNameMapping.put(entry.getKey(), (String) entry.getValue());\n }\n } else {\n getLogger().warning(String.format(\"[%s] found no configured mapping, creating a default one.\", mPdfFile.getName()));\n }\n\n // If there are new worlds in the server add them to the mapping\n List<World> serverWorlds = getServer().getWorlds();\n for (World w : serverWorlds) {\n if (!mMapNameMapping.containsKey(w.getName())) {\n mMapNameMapping.put(w.getName(), w.getName());\n }\n }\n\n // Set the new mapping in the config\n getConfig().createSection(MappingSectionName, mMapNameMapping);\n }",
"@Override\n\tprotected String _id(String id) {\n\t\tif (id != null) {\n\t\t\tid = id.replaceAll(\"([^a-zA-Z0-9_]{1,1})\", \"_\");\n\n\t\t\tString cacheIdPrefix = (String)_options.get(\"cache_id_prefix\");\n\t\t\tif (cacheIdPrefix != null) {\n\t\t\t\tid = cacheIdPrefix + id;\n\t\t\t}\n\t\t}\n\n\t\treturn id;\n\t}",
"@Override\n public void setCaching(boolean caching) {\n this.cache.isCaching = false;\n this.cache.cachingSet = true;\n }",
"public synchronized static void store(Context context, String name, Object o) {\n for(Map.Entry<Object, String> e : cached.entrySet()) {\r\n if(e.getValue().contentEquals(name)) {\r\n // Found cached\r\n cached.remove(e.getKey());\r\n break;\r\n }\r\n }\r\n // Put new entry\r\n if(o != null)\r\n cached.put(o, name);\r\n // Post async update\r\n pending.put(name, o);\r\n apply(context);\r\n }",
"public JwkProviderBuilder cached(boolean cached) {\n this.cached = cached;\n return this;\n }",
"public HotrodCacheFactory() {\n }",
"@Override\n\tprotected String getCacheKeyPrefix() {\n\t\treturn super.getCacheKeyPrefix();\n\t}",
"private void renameMapNames () {\n if (mappingNum == 0) {\n mapNames = null;\n return;\n }\n this.mapNames = new String[mappingNum];\n for (int i = 0; i < mappingNum; i++) {\n mapNames[i] = GBSHDF5Constants.MAPBASE + this.getThreeFigureString(i);\n }\n }",
"DynamicVariable createDynamicVariable();",
"Variable(Object names[]) {\n _vname = makeName(names).intern();\n _names = names;\n \n }",
"private static void mapDbNames()\r\n { \r\n if (dbMap == null) {\r\n dbMap = new HashMap<String, String>();\r\n dbMap.put(\"tuition\", \"tuition\");\r\n dbMap.put(\"utilities\", \"utilities\");\r\n dbMap.put(\"fuel\", \"gas\");\r\n dbMap.put(\"registration\", \"Vehicle Registration\");\r\n dbMap.put(\"repair\", \"car repair\");\r\n dbMap.put(\"clothing\", \"clothing\");\r\n // maps asst types to the way they're currently in the database\r\n // used in the where clause for where tcf_assistance.description = ?\r\n }\r\n }",
"public interface JobMemcachedKeys {\n String JOB_DETAIL = \"JOB_DETAIL_\";\n String JOB_STATUS = \"JOB_STATUS_\";\n}",
"@Test\n public void simpleAPIWithGenericsAndNoTypeEnforcement() {\n\n MutableConfiguration config = new MutableConfiguration<String, Integer>();\n Cache<Identifier, Dog> cache = cacheManager.createCache(cacheName, config);\n\n\n //Types are restricted\n //Cannot put in wrong types\n //cache.put(1, \"something\");\n\n //can put in\n cache.put(pistachio.getName(), pistachio);\n cache.put(tonto.getName(), tonto);\n\n //cannot get out wrong key types\n //assertNotNull(cache.get(1));\n assertNotNull(cache.get(pistachio.getName()));\n assertNotNull(cache.get(tonto.getName()));\n\n //cannot remove wrong key types\n //assertTrue(cache.remove(1));\n assertTrue(cache.remove(pistachio.getName()));\n assertTrue(cache.remove(tonto.getName()));\n\n }",
"@Override\n\tprotected Object getCacheKey(String viewName, Locale locale) {\n\t\treturn viewName;\n\t}",
"public void setName(String sName)\n {\n ensureLoaded();\n m_clzName = new ClassConstant(sName);\n setModified(true);\n }",
"public void setClassCaching( boolean cc )\r\n {\r\n useClassCaching = cc;\r\n }",
"@Test\n public void genericsEnforcementAndStricterTypeEnforcementFromCaching() {\n\n //configure the cache\n MutableConfiguration config = new MutableConfiguration<>();\n config.setTypes(Identifier.class, Hound.class);\n Cache<Identifier, Dog> cache = cacheManager.createCache(cacheName, config);\n\n //Types are restricted and types are enforced\n //Cannot put in wrong types\n //cache.put(1, \"something\");\n\n //can put in\n cache.put(pistachio.getName(), pistachio);\n //can put in with generics but possibly not with configuration as not a hound\n try {\n cache.put(tonto.getName(), tonto);\n } catch (ClassCastException e) {\n //expected but not mandatory. The RI throws these.\n }\n\n //cannot get out wrong key types\n //assertNotNull(cache.get(1));\n assertNotNull(cache.get(pistachio.getName()));\n //not necessarily\n //assertNotNull(cache.get(tonto.getName()));\n\n //cannot remove wrong key types\n //assertTrue(cache.remove(1));\n assertTrue(cache.remove(pistachio.getName()));\n //not necessarily\n //assertTrue(cache.remove(tonto.getName()));\n }",
"@Override\n public void addCache(String cacheName) {\n scanList.add(cacheName);\n }",
"public RedisCache(JedisPool pool, String name) {\n\t\tsuper(name);\n\t\tthis.redisPool = pool;\n\t}",
"void setNilPoolName();",
"@Override\n\tpublic Object regiterBeanCache(String name, Object obj) {\n\t\treturn null;\n\t}",
"public void setName(String name)\n/* */ {\n/* 368 */ this.name = name;\n/* 369 */ this.fullName = name;\n/* 370 */ this.namespace = null;\n/* */ }",
"@Test\n public void simpleAPITypeEnforcementObject() {\n\n\n //configure the cache\n MutableConfiguration<Object, Object> config = new MutableConfiguration<>();\n config.setTypes(Object.class, Object.class);\n\n //create the cache\n Cache<Object, Object> cache = cacheManager.createCache(\"simpleCache4\", config);\n\n //can put different things in\n cache.put(1, \"something\");\n cache.put(pistachio.getName(), pistachio);\n cache.put(tonto.getName(), tonto);\n cache.put(bonzo.getName(), bonzo);\n cache.put(juno.getName(), juno);\n cache.put(talker.getName(), talker);\n try {\n cache.put(skinny.getName(), skinny);\n } catch(Exception e) {\n //not serializable expected\n }\n //can get them out\n assertNotNull(cache.get(1));\n assertNotNull(cache.get(pistachio.getName()));\n\n //can remove them\n assertTrue(cache.remove(1));\n assertTrue(cache.remove(pistachio.getName()));\n }",
"public void setSupregname( java.lang.String newValue ) {\n __setCache(\"supregname\", newValue);\n }",
"public interface CacheManager {\n\n void init();\n\n void destroy();\n\n void del(String key);\n\n void set(String key, Object value);\n\n void set(String key, Object value, int expireTime);\n\n <T> T get(String key, Class<T> clazz);\n\n void hset(String key, String subKey, Object value);\n\n <T> T hget(String key, String subKey, Class<T> clazz);\n\n <T> Map<String, T> hget(String key, Class<T> clazz);\n\n void hrem(String key, String subKey);\n\n long hincr(String key, String subKey);\n\n void sadd(String key, Object val);\n\n boolean sisMember(String key, Object val);\n\n void srem(String key, Object val);\n\n Set<String> sget(String key);\n\n <T> Set<T> sget(String key, Class<T> clazz);\n\n void zadd(String key, Object val, double score);\n\n boolean zisMember(String key, Object val);\n\n void zrem(String key, Object val);\n\n void zrem(String key, double min, double max);\n\n void zreplace(String key, Object val, double score);\n\n double zincr(String key, Object val, double score);\n\n <T> Set<T> zget(String key, double min, double max, Class<T> clazz);\n\n Set<String> zget(String key, double min, double max);\n}",
"public void setName(String newName) { throw new NotImplementedException(\"Variable names are final!\"); }",
"public static Constant construct(String name){\n Constant retVal = cache.get(name);\n if (retVal == null) {\n retVal = new Constant(name);\n cache.put(name, retVal);\n }\n return retVal;\n }",
"@Override\n\tpublic void setUseCaches(boolean usecaches) {\n\t\tthis.usecaches.add(usecaches);\n\t}"
]
| [
"0.55498356",
"0.5499507",
"0.54028004",
"0.5391804",
"0.5217422",
"0.51080126",
"0.50738245",
"0.504509",
"0.49481374",
"0.48857892",
"0.48849073",
"0.479093",
"0.47682852",
"0.476487",
"0.47465208",
"0.46473426",
"0.46096712",
"0.45969144",
"0.45957235",
"0.45916858",
"0.45702302",
"0.4569073",
"0.45597163",
"0.4549883",
"0.45484167",
"0.45186275",
"0.45181003",
"0.45016992",
"0.44740057",
"0.44678733",
"0.44645616",
"0.44581398",
"0.4427328",
"0.44178104",
"0.4410796",
"0.4408495",
"0.43806902",
"0.4374956",
"0.43653798",
"0.43633032",
"0.43627167",
"0.4351784",
"0.43323418",
"0.4331446",
"0.43303144",
"0.43251944",
"0.4323774",
"0.43215933",
"0.42916003",
"0.42886677",
"0.42877895",
"0.42866448",
"0.42777315",
"0.4270927",
"0.4270053",
"0.42650944",
"0.4259727",
"0.42538607",
"0.4251913",
"0.42398256",
"0.42360255",
"0.42289197",
"0.4220788",
"0.4211037",
"0.42068696",
"0.41925716",
"0.41875154",
"0.41854367",
"0.4184517",
"0.41837573",
"0.4178168",
"0.41738498",
"0.41724476",
"0.41724178",
"0.41657338",
"0.41651845",
"0.4164621",
"0.4162928",
"0.41615355",
"0.41608328",
"0.41594884",
"0.41561994",
"0.41455737",
"0.41414565",
"0.4136839",
"0.413539",
"0.41274205",
"0.41274098",
"0.41201803",
"0.4118902",
"0.4118592",
"0.4117256",
"0.4111245",
"0.410335",
"0.4095381",
"0.40945914",
"0.4090132",
"0.40886953",
"0.4085456",
"0.4085281"
]
| 0.657692 | 0 |
Set cache config mapped by cache name | public void setConfig(Map<String, ? extends CacheConfig> config) {
this.configMap = (Map<String, CacheConfig>) config;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void configure(CacheFactorySPI caching, String name, String config)\n {\n //TODO config/name -> name/config\n this.factory = caching.getValueFactory(config, name);\n }",
"public void cache() {\n cache.clear();\n for (String s : getConfig().getKeys(true)) {\n if (getConfig().get(s) instanceof String)\n cache.put(s, getConfig().getString(s));\n }\n }",
"public void setCacheNames(Collection<String> names) {\n if (names != null) {\n for (String name : names) {\n getCache(name);\n }\n dynamic = false;\n } else {\n dynamic = true;\n }\n }",
"public void setSettingsByCache(Map<String, PublicKeyValuePersistenceSettings> settingsByCache) {\n this.settingsByCache = settingsByCache;\n }",
"public void setCache(Cache cache) {\n this.cache = cache;\n }",
"public void configure(Element config) throws ConfigurationException {\r\n\t\ttry {\r\n\t\t\tlock.writeLock().lockInterruptibly();\r\n\t\t\t// configuring pool name\r\n\t\t\tlog.debug(\"Configuring cache instance for \" + this.getClass().getSimpleName() + \" instances.\");\r\n\t\t\tElement dbElement = DOMUtils.getElement(config, DB_ELEMENT, true);\r\n\t\t\tpoolName = DOMUtils.getAttribute(dbElement, POOL_NAME_ATTR, true);\r\n\t\t\tif ((poolName == null) || (poolName.trim().length() == 0)) {\r\n\t\t\t\tthrow new ConfigurationException(\"pool-name was not informed.\");\r\n\t\t\t}\r\n\r\n\t\t\t//sets default pool-name(it is important keeping that on a separated variable, because it can be used later)\r\n\t\t\tdefaultPoolName = poolName;\r\n\r\n\t\t\t//creating the alternate pools map\r\n\t\t\tthis.alternatePoolNames = new HashMap<String,String>();\r\n\t\t\tNodeList altPoolNodeList = DOMUtils.getElements(dbElement, ALTERNATE_POOL_NAME_ELEMENT);\r\n\t\t\tElement altPoolElement;\r\n\t\t\tString key;\r\n\t\t\tString value;\r\n\t\t\tfor (int i = 0; i < altPoolNodeList.getLength(); i++) {\r\n\t\t\t\taltPoolElement = (Element) altPoolNodeList.item(i);\r\n\t\t\t\tkey = DOMUtils.getAttribute(altPoolElement, ALTERNATE_POOL_NAME_ATTR, true);\r\n\t\t\t\tvalue = DOMUtils.getAttribute(altPoolElement, ALTERNATE_POOL_VALUE_ATTR, true);\r\n\t\t\t\tthis.alternatePoolNames.put(key, value);\r\n\t\t\t}\r\n\r\n\t\t\t// initializing cache\r\n\t\t\tint cacheSize = DOMUtils.getIntAttribute(config, CACHE_SIZE_ATTR, false);\r\n\t\t\tif (cacheSize < 1) {\r\n\t\t\t\tcacheSize = DEFAULT_CACHE_SIZE;\r\n\t\t\t}\r\n\t\t\t// if cache already init.ed, then skip loading\r\n\t\t\tif (cache.size() > 0) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tfoundKeys = new LRUMap(cacheSize);\r\n\t\t\tloadCache();\r\n\t\t} catch (InterruptedException ie) {\r\n\t\t\tlog.error(ie);\r\n\t\t\tthrow new ConfigurationException(ie);\r\n\t\t} catch (SQLException sqle) {\r\n\t\t\tlog.error(sqle);\r\n\t\t\tthrow new ConfigurationException(sqle);\r\n\t\t} catch (NamingException ne) {\r\n\t\t\tlog.error(ne);\r\n\t\t\tthrow new ConfigurationException(ne);\r\n\t\t} finally {\r\n\t\t\tlock.writeLock().unlock();\r\n\t\t}\r\n\t}",
"public static void setCache(CatalogStructure cache) {\n CACHE.set(cache);\n }",
"public void setCached() {\n }",
"private void setCacheManagerProperty(CacheManager value) {\n setProperty(new TestElementProperty(CACHE_MANAGER, value));\n }",
"private void setCacheManagerProperty(CacheManager value) {\n setProperty(new TestElementProperty(CACHE_MANAGER, value));\n }",
"void createCache(String cacheName, Set<CloudCacheStrategy> strategies);",
"@Override\n public void put( final K name, final V obj )\n {\n // Call put with a copy of the contained caches default attributes.\n // the attributes are copied by the cacheControl\n put( name, obj, this.getCacheControl().getElementAttributes() );\n }",
"@Override\n public void addCache(String cacheName) {\n scanList.add(cacheName);\n }",
"@Override\n\tpublic void setBeanCacheContext(String beanCacheContextName) {\n\n\t}",
"public static void setPathCache(String pathCache)\r\n/* 50: */ throws IOException\r\n/* 51: */ {\r\n/* 52: 49 */ log.finest(\"OSHandler.setPathCache\");\r\n/* 53: 50 */ setProperty(\"path\", pathCache);\r\n/* 54: */ }",
"CloudCache getCache(String cacheName);",
"@Override\n\t\t\t\tprotected void setCache(List<E> cache) {\n\t\t\t\t}",
"public final void setCachePath(String cachePath) {\n\t\tthis.cachePath = cachePath;\n\t}",
"public interface LocalCachConfigKey {\n String localCacheMaxSize = \"localCacheMaxSize\";\n String localCacheExpireTime = \"localCacheExpireTime\";\n String localCacheEnableStat = \"localCacheEnableStat\";\n String localCacheStatInterval = \"localCacheStatInterval\";\n}",
"private static void configureCaches(ImagePipelineConfig.Builder configBuilder, Context context) {\r\n final MemoryCacheParams bitmapCacheParams = new MemoryCacheParams(\r\n MAX_MEMORY_CACHE_SIZE, // Max total size of elements in the cache\r\n Integer.MAX_VALUE, // Max entries in the cache\r\n MAX_MEMORY_CACHE_SIZE, // Max total size of elements in eviction queue\r\n Integer.MAX_VALUE, // Max length of eviction queue\r\n Integer.MAX_VALUE); // Max cache entry size\r\n configBuilder\r\n .setBitmapMemoryCacheParamsSupplier(\r\n new Supplier<MemoryCacheParams>() {\r\n public MemoryCacheParams get() {\r\n return bitmapCacheParams;\r\n }\r\n })\r\n .setMainDiskCacheConfig(DiskCacheConfig.newBuilder(context)\r\n .setBaseDirectoryPath(createFile(AppFilePath.APP_SD_CARD_File_PATH))\r\n .setBaseDirectoryName(\"ImageCache\")\r\n .setMaxCacheSize(MAX_DISK_CACHE_SIZE)\r\n .build());\r\n }",
"public void setCache(final ICache < ICacheKey < String >, Object > theCache) {\r\n this.cache = theCache;\r\n }",
"public void setCacheUrl(String cacheUrl) {\n this.cacheUrl = cacheUrl;\n }",
"void update(String pathString, CacheEntry cacheEntry);",
"public ConfigurableCacheStore(String cacheName) {\n loader = (CacheLoader) CONTEXT.getBean(cacheName);\n store = loader instanceof CacheStore\n ? (CacheStore) loader\n : new UnsupportedCacheStore();\n }",
"public void setConfig(IndividualCacheLoaderConfig base)\n {\n if (base instanceof TcpDelegatingCacheLoaderConfig)\n {\n this.config = (TcpDelegatingCacheLoaderConfig) base;\n }\n else\n {\n config = new TcpDelegatingCacheLoaderConfig(base);\n }\n }",
"void setMessageCache(javax.management.ObjectName objectName);",
"void cache(String key, T value) throws IOException;",
"@Override\n\tpublic void setCaching(boolean caching) {\n\t\t\n\t}",
"public UserVolume cacheSettings(VolumeCache cacheSettings) {\n this.cacheSettings = cacheSettings;\n return this;\n }",
"protected final void addCache(Cache cache)\r\n/* 33: */ {\r\n/* 34:59 */ this.cacheMap.put(cache.getName(), cache);\r\n/* 35:60 */ this.cacheNames.add(cache.getName());\r\n/* 36: */ }",
"public Cache getCache(String name)\r\n/* 39: */ {\r\n/* 40:64 */ return (Cache)this.cacheMap.get(name);\r\n/* 41: */ }",
"public void apply(String cacheKey) {\n }",
"@Override\n public void cacheStarting(ComponentRegistry cr, Configuration cfg, String cacheName) {\n BasicComponentRegistry gcr = cr.getGlobalComponentRegistry().getComponent(BasicComponentRegistry.class);\n\n if (PROTOBUF_METADATA_CACHE_NAME.equals(cacheName)) {\n BasicComponentRegistry bcr = cr.getComponent(BasicComponentRegistry.class);\n ProtobufMetadataManagerInterceptor protobufInterceptor = new ProtobufMetadataManagerInterceptor();\n bcr.registerComponent(ProtobufMetadataManagerInterceptor.class, protobufInterceptor, true);\n bcr.addDynamicDependency(AsyncInterceptorChain.class.getName(), ProtobufMetadataManagerInterceptor.class.getName());\n bcr.getComponent(AsyncInterceptorChain.class).wired()\n .addInterceptorAfter(protobufInterceptor, EntryWrappingInterceptor.class);\n }\n\n InternalCacheRegistry icr = gcr.getComponent(InternalCacheRegistry.class).running();\n if (!icr.isInternalCache(cacheName)) {\n ProtobufMetadataManagerImpl protobufMetadataManager =\n (ProtobufMetadataManagerImpl) gcr.getComponent(ProtobufMetadataManager.class).running();\n protobufMetadataManager.addCacheDependency(cacheName);\n\n SerializationContext serCtx = protobufMetadataManager.getSerializationContext();\n RemoteQueryManager remoteQueryManager = buildQueryManager(cfg, serCtx, cr);\n cr.registerComponent(remoteQueryManager, RemoteQueryManager.class);\n }\n }",
"public void setCacheDirectory(String directory) {\n this.localRepository = directory;\n this.customized = true;\n }",
"public LogicTreeProcessor(Cache cache, String key) {\n Properties properties =\n new Gson().fromJson((String) cache.get(key), Properties.class);\n\n config = ConfigurationConverter.getConfiguration(properties);\n }",
"Config set(String path, Object value);",
"public void setUseCache(final boolean argUseCache) {\n mUseCache = argUseCache;\n }",
"TableCache(String paramterName, String tableName) {\n\n cache = new HashMap<>(1);\n cache.put(paramterName, tableName);\n\n }",
"public Object setCachedObject(String key, Object obj) {\n return cache.put(key, obj);\n }",
"@Bean\n public DownloadCache cache() {\n DownloadCache result = new DownloadCache(TEST_CACHE_DIR);\n result.clear();\n return result;\n }",
"public void setResourceCache(int value)\r\n {\r\n getSemanticObject().setIntProperty(swb_resourceCache, value);\r\n }",
"@Bean\n public CacheManager cacheManager() {\n\n SimpleCacheManager simpleCacheManager = new SimpleCacheManager();\n GuavaCache addressesCache = new GuavaCache(\"addresses\", \n \t\tCacheBuilder\n \t\t.newBuilder()\n \t\t.build());\n GuavaCache customersCache = new GuavaCache(\"customers\", \n \t\tCacheBuilder\n \t\t.newBuilder()\n .expireAfterAccess(10, TimeUnit.MINUTES)\n .build());\n simpleCacheManager.setCaches(Arrays.asList(addressesCache, customersCache));\n return simpleCacheManager;\n }",
"public void setStateCache( ClusterFileStateCache stateCache) {\n\t\tsuper.setStateCache( stateCache);\n\t\t\n\t\t// Set the state cache for the remote oplock, if available\n\t\t// Needs to be set after deserialization of the file state/remote oplock\n\t\t\n\t\tif ( hasOpLock() && getOpLock() instanceof RemoteOpLockDetails) {\n\t\t\tRemoteOpLockDetails remoteOplock = (RemoteOpLockDetails) getOpLock();\n\t\t\tremoteOplock.setStateCache( stateCache);\n\t\t}\n\t}",
"protected void setPluginCache(OwPluginStatusCachingUtility newCache)\r\n {\r\n this.pluginCache = newCache;\r\n }",
"public void putCache(NamedCache cache, ClassLoader loader)\n {\n if (cache.isReleased())\n {\n throw new IllegalArgumentException(\"Storing a released cache is not allowed: \" + cache.getCacheName());\n }\n\n ConcurrentMap mapByName = m_mapByName;\n String sCacheName = cache.getCacheName();\n Map mapByLoader = (Map) mapByName.get(sCacheName);\n\n if (mapByLoader == null)\n {\n mapByLoader = new WeakHashMap();\n mapByName.put(sCacheName, mapByLoader);\n }\n\n if (ScopedServiceReferenceStore.isRemoteServiceType(cache.getCacheService().getInfo().getServiceType())\n && Security.SUBJECT_SCOPED)\n {\n SubjectScopedReference scopedRef = (SubjectScopedReference) mapByLoader.get(loader);\n\n if (scopedRef == null)\n {\n scopedRef = new SubjectScopedReference();\n mapByLoader.put(loader, scopedRef);\n }\n\n scopedRef.set(cache);\n }\n else\n {\n mapByLoader.put(loader, cache);\n }\n }",
"public interface CacheConfigService {\n Cache init();\n\n void close();\n}",
"@Bean\n\tpublic CacheManager cacheManager() {\n \tCaffeineCacheManager cacheManager = new CaffeineCacheManager();\n \tcacheManager.setCacheSpecification(\"maximumSize=500,expireAfterWrite=60m\");\n \treturn cacheManager;\n\t}",
"StoreResponse set(CACHE_ELEMENT e);",
"public interface CacheManagerAware {\n\n void setCacheManager(CacheManager cacheManager);\n}",
"public void put(String param1, Cache.Entry param2) {\n }",
"private Cache configureCache(MemoryStoreEvictionPolicy evictionPolicy) {\n\t\tCacheConfiguration cacheConfiguration = new CacheConfiguration(\n\t\t\t\t\"evictionCache\", 2);\n\t\t// set FIFO eviction policy\n\t\tcacheConfiguration\n\t\t\t\t.setMemoryStoreEvictionPolicyFromObject(evictionPolicy);\n\t\t// set time to idle time\n\t\tcacheConfiguration.setTimeToIdleSeconds(300);\n\t\t// set time to live time\n\t\tcacheConfiguration.setTimeToLiveSeconds(600);\n\n\t\tCacheManager cacheManager = CacheManager.create();\n\t\t// create a new cache\n\t\tCache memoryCache = new Cache(cacheConfiguration);\n\t\tcacheManager.addCache(memoryCache);\n\t\tCache evictionCache = cacheManager.getCache(\"evictionCache\");\n\t\tevictionCache.removeAll();\n\t\treturn evictionCache;\n\t}",
"Builder withCacheConcurrency(int concurrency);",
"public void setSamlMD(byte[] cachedata);",
"public ConfigurableCacheFactory getCacheFactory();",
"public final void setCacheKey(final CharSequence cacheKey)\n\t{\n\t\tthis.cacheKey = cacheKey;\n\t}",
"public void setProductCache(MProductCache cache)\n {\n \tm_prodCache = cache;\n }",
"public void assignCache(String databaseName, String collectionName, FeatureExtractionPipeline pipeline, boolean allowUpdates, boolean overwriteCollidingHashes){\n DB db = client.getDB(databaseName);\n DBCollection cache = db.collectionExists(collectionName)? db.getCollection(collectionName): setupCollection(db, collectionName);\n pipeline.setCache(cache, allowUpdates);\n addToHashingIndex(pipeline.getCacheConfiguration(), pipeline.getCacheConfigurationString(), overwriteCollidingHashes);\n }",
"public void setHostCaching(final String hostCachingValue) {\n this.hostCaching = hostCachingValue;\n }",
"public void setHostCaching(final String hostCachingValue) {\n this.hostCaching = hostCachingValue;\n }",
"@Override\r\n public void setCaching(int parseInt) {\n\r\n }",
"public void setCacheSize(int size) {\n\t\t_cacheSize = size;\n\t}",
"public TrendrrCache(DynMap config) {\n \t\tthis.config = config;\n \t\t\n \t}",
"public void setCacheControl(String cacheControl)\r\n/* 152: */ {\r\n/* 153:228 */ set(\"Cache-Control\", cacheControl);\r\n/* 154: */ }",
"@Override\n @Path(\"{name}\")\n public CacheResource getCacheResource(@PathParam(\"name\") String sName)\n {\n ResourceConfig configResource = m_config.getResources().get(sName);\n if (configResource == null)\n {\n // register pass-through resource for the specified cache name\n configResource = new ResourceConfig();\n configResource.setCacheName(sName);\n configResource.setKeyClass(String.class);\n configResource.setValueClass(StaticContent.class);\n configResource.setQueryConfig(new QueryConfig().setDirectQuery(new DirectQuery(Integer.MAX_VALUE)));\n configResource.setMaxResults(Integer.MAX_VALUE);\n\n m_config.getResources().put(sName, configResource);\n Logger.info(\"Configured pass-through resource for cache: \" + sName);\n }\n\n return instantiateCacheResourceInternal(configResource);\n }",
"@Override\n\tpublic void setUseCaches(boolean usecaches) {\n\t\tthis.usecaches.add(usecaches);\n\t}",
"public Volume cache(VolumeCache cache) {\n this.cache = cache;\n return this;\n }",
"public interface CacheConfigurationParser {\n\n\tMap<String, CacheConfigurationEntry> parseEntries(String[] entries);\n\n\tCacheConfigurationEntry parseEntry(String entry);\n}",
"public <K, V> Cache<K, V> getCache( String name, Class<K> keyClazz, Class<V> valueClazz )\n {\n if ( cacheManager == null )\n {\n LOG.error( \"Cannot fetch the cache named {}, the CacheServcie is not initialized\", name );\n throw new IllegalStateException( \"CacheService was not initialized\" );\n }\n\n LOG.info( \"fetching the cache named {}\", name );\n\n Cache<K, V> cache = cacheManager.getCache( name, keyClazz, valueClazz );\n\n return cache;\n }",
"public interface CacheManager {\n\n void init();\n\n void destroy();\n\n void del(String key);\n\n void set(String key, Object value);\n\n void set(String key, Object value, int expireTime);\n\n <T> T get(String key, Class<T> clazz);\n\n void hset(String key, String subKey, Object value);\n\n <T> T hget(String key, String subKey, Class<T> clazz);\n\n <T> Map<String, T> hget(String key, Class<T> clazz);\n\n void hrem(String key, String subKey);\n\n long hincr(String key, String subKey);\n\n void sadd(String key, Object val);\n\n boolean sisMember(String key, Object val);\n\n void srem(String key, Object val);\n\n Set<String> sget(String key);\n\n <T> Set<T> sget(String key, Class<T> clazz);\n\n void zadd(String key, Object val, double score);\n\n boolean zisMember(String key, Object val);\n\n void zrem(String key, Object val);\n\n void zrem(String key, double min, double max);\n\n void zreplace(String key, Object val, double score);\n\n double zincr(String key, Object val, double score);\n\n <T> Set<T> zget(String key, double min, double max, Class<T> clazz);\n\n Set<String> zget(String key, double min, double max);\n}",
"public RedisCache(JedisPool pool, String name) {\n\t\tsuper(name);\n\t\tthis.redisPool = pool;\n\t}",
"public void cacheBusRouteData()\n\t{\t\n\t\tdataMap = BusRouteDataFileReader.readAndCacheBusRouteData(this.pathname);\n\t}",
"public CachedSource(Cache<V> cache, Source<V> source) {\n mCache = cache;\n mSource = source;\n }",
"HandlebarsKnotOptions setCacheSize(Long cacheSize) {\n this.cacheSize = cacheSize;\n return this;\n }",
"public void setLoadCache(final boolean argLoadCache) {\n mLoadCache = argLoadCache;\n }",
"private void testAllFile(String ehCacheFile) throws Exception {\n ClassLoader existingCl = currentThread().getContextClassLoader();\n DefaultCacheManager dcm = null;\n Cache<Object, Object> sampleDistributedCache2 = null;\n try {\n ClassLoader delegatingCl = new Jbc2InfinispanTransformerTest.TestClassLoader(existingCl);\n currentThread().setContextClassLoader(delegatingCl);\n String fileName = getFileName(ehCacheFile);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n convertor.parse(fileName, baos, ConfigFilesConvertor.TRANSFORMATIONS.get(ConfigFilesConvertor.EHCACHE_CACHE1X), Thread.currentThread().getContextClassLoader());\n\n dcm = (DefaultCacheManager) TestCacheManagerFactory.fromStream(new ByteArrayInputStream(baos.toByteArray()));\n Cache<Object,Object> defaultCache = dcm.getCache();\n defaultCache.put(\"key\", \"value\");\n Configuration configuration = defaultCache.getCacheConfiguration();\n\n assertEquals(configuration.eviction().maxEntries(),10000);\n assertEquals(configuration.expiration().maxIdle(), 121);\n assertEquals(configuration.expiration().lifespan(), 122);\n LoadersConfiguration loaders = configuration.loaders();\n assert loaders.cacheLoaders().get(0) instanceof FileCacheStoreConfiguration;\n\n assertEquals(configuration.expiration().wakeUpInterval(), 119000);\n assertEquals(configuration.eviction().strategy(), EvictionStrategy.LRU);\n\n String definedCacheNames = dcm.getDefinedCacheNames();\n assert definedCacheNames.contains(\"sampleCache1\");\n assert definedCacheNames.contains(\"sampleCache2\");\n assert definedCacheNames.contains(\"sampleCache3\");\n assert definedCacheNames.contains(\"sampleDistributedCache1\");\n assert definedCacheNames.contains(\"sampleDistributedCache2\");\n assert definedCacheNames.contains(\"sampleDistributedCache3\");\n\n sampleDistributedCache2 = dcm.getCache(\"sampleDistributedCache2\");\n Configuration configuration2 = sampleDistributedCache2.getCacheConfiguration();\n assert configuration2.loaders().cacheLoaders().size() == 1;\n assert configuration2.expiration().lifespan() == 101;\n assert configuration2.expiration().maxIdle() == 102;\n assertEquals(configuration2.clustering().cacheMode(), CacheMode.INVALIDATION_SYNC);\n\n } finally {\n currentThread().setContextClassLoader(existingCl);\n TestingUtil.killCaches(sampleDistributedCache2);\n TestingUtil.killCacheManagers(dcm);\n }\n }",
"public static void putParameterNameId(String tenantDatastoreCacheName, String parameterName, Integer parameterId) {\n\n ConcurrentHashMap<String,Integer> currentDsMap;\n Integer tempValue;\n \n if (enabled) {\n currentDsMap = parameterNameIdMaps.putIfAbsent(tenantDatastoreCacheName, new ConcurrentHashMap<String,Integer>());\n if (currentDsMap == null) {\n log.fine(\"putParameterNameId() - Added new cache map for tennantDatastore=\" + tenantDatastoreCacheName);\n }\n currentDsMap = parameterNameIdMaps.get(tenantDatastoreCacheName);\n tempValue = currentDsMap.putIfAbsent(parameterName, parameterId);\n if (tempValue == null) {\n log.fine(\"putParameterNameId() - Added new cache entry, key=\" + parameterName + \" value=\" + parameterId + \" tenantDatstoreCacheName=\" + tenantDatastoreCacheName);\n }\n }\n }",
"public void setClassCaching( boolean cc )\r\n {\r\n useClassCaching = cc;\r\n }",
"public ShareFileHttpHeaders setCacheControl(String cacheControl) {\n this.cacheControl = cacheControl;\n return this;\n }",
"public void setCacheClientFactory(CacheClientFactory cacheClientFactory) {\r\n\t\tthis.cacheClientFactory = cacheClientFactory;\r\n\t}",
"@Override\n public ICacheElement<K, V> getCacheElement( final K name )\n {\n return this.getCacheControl().get( name );\n }",
"@Autowired\n public CacheConfiguration(@Value(\"${lineserver.cache.lines.size}\") int cacheMaxSize) {\n this.cacheMaxSize = cacheMaxSize;\n }",
"public void setLocalCacheDirectory(String dir) {\n\t\tlocalCacheDirectory = dir;\n\t\tif(dir == null) {\n\t\t\tcache.clear();\n\t\t\tSystem.out.println(\"INFO: Local cache directory is disabled\");\n\t\t}\n\t\telse {\n\t\t\tString indexFileName = localCacheDirectory + File.separator + \"service.idx\"; \n\t\t\ttry {\n\t\t\t\tFile indexFile = new File(indexFileName);\n\t\n\t\t\t\tcache = new Properties();\t\t\t\t\n\t\t\t\n\t\t\t\tcache.load(new FileInputStream(indexFile));\n\t\n\t\t\t\tSystem.out.println(\"INFO: Cache has been initialized with \" + cache.size() + \" entries\");\n\t\t\t} catch(FileNotFoundException e) {\n\t\t\t\tSystem.err.println(\"ERROR: Cache index file \" + indexFileName + \" cannot be found\");\n\t\t\t\tlocalCacheDirectory = null;\n\t\t\t} catch(IOException e) {\n\t\t\t\tSystem.err.println(\"ERROR: Cache index file \" + indexFileName + \" has an invalid format\");\n\t\t\t\tlocalCacheDirectory = null;\n\t\t\t}\t\n\t\t}\n\t}",
"protected abstract void put(CacheKey cacheKey);",
"@PostConstruct\n public void initCache() {\n cache = Collections.synchronizedMap(new HashMap<>(cacheCapacity, 1));\n }",
"@Override\n\tpublic void setCacheSize(long bps) {\n\t\t\n\t}",
"@Test\n public void testPutGet() {\n cache.put(\"A\", \"first\");\n cache.put(\"C\", \"second\");\n cache.put(\"C\", \"third\");\n \n assertEquals(\"first\", cache.get(\"A\"));\n assertEquals(\"third\", cache.get(\"C\"));\n }",
"@Override\n\tprotected CacheKey createCacheKey(String key) {\n\t\treturn new ConfigCacheKey(key);\n\t}",
"public void setDrawcache(CPointer<Object> drawcache) throws IOException\n\t{\n\t\tlong __address = ((drawcache == null) ? 0 : drawcache.getAddress());\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeLong(__io__address + 64, __address);\n\t\t} else {\n\t\t\t__io__block.writeLong(__io__address + 64, __address);\n\t\t}\n\t}",
"@Override\n public void setCaching(boolean caching) {\n this.cache.isCaching = false;\n this.cache.cachingSet = true;\n }",
"public void setCacheShared(boolean isSharedCache) {\n cacheHandler.setSharedCache(isSharedCache);\n }",
"@Before\n public void setUp() {\n baseConfig.setString(\"cache\", \"changes\", \"memoryLimit\", \"0\");\n baseConfig.setString(\"cache\", \"projects\", \"memoryLimit\", \"0\");\n }",
"public void setCacheHome(boolean cacheHome)\r\n/* 29: */ {\r\n/* 30: 83 */ this.cacheHome = cacheHome;\r\n/* 31: */ }",
"void configure(String name, Map<String, Object> configuration);",
"public CacheStrategy getCacheStrategy();",
"@Override\n\tprotected String getCacheName() {\n\t\treturn null;\n\t}",
"public CacheService( CacheManager cachemanager )\n {\n this.cacheManager = cachemanager;\n }",
"public static void setAdvertisersInCache(Map<String,String> advertiserMap){ \t\n\t\tlog.info(\"setAdvertisersInCache : memcache key:\"+MEDIA_PLAN_ADVERTISERS_KEY);\t\t\t\n\t\tif(memcache !=null && memcache.contains(MEDIA_PLAN_ADVERTISERS_KEY)){\n \t\tmemcache.delete(MEDIA_PLAN_ADVERTISERS_KEY);\n \t}\n \tmemcache.put(MEDIA_PLAN_ADVERTISERS_KEY, advertiserMap);\n\t}",
"public final void setUseCache(boolean useCache) {\n\t\tthis.useCache = useCache;\n\t}",
"@Override\n public void addCacheList(ArrayList<String> cacheList) {\n scanList = cacheList;\n }",
"public ChangeCache(File dir) {\n cacheDir = dir;\n cacheFile = new File(dir, \"changeLog\");\n }"
]
| [
"0.6472127",
"0.63981074",
"0.6284718",
"0.6252338",
"0.5983968",
"0.594707",
"0.58363724",
"0.5823042",
"0.5804602",
"0.5804602",
"0.5776651",
"0.57597566",
"0.5627436",
"0.5592197",
"0.55856293",
"0.5545639",
"0.5544573",
"0.5529592",
"0.55076844",
"0.5458565",
"0.54426354",
"0.53991246",
"0.5390622",
"0.53775865",
"0.53393",
"0.5336099",
"0.5329298",
"0.5318292",
"0.5312495",
"0.5294464",
"0.52871984",
"0.5271944",
"0.52619475",
"0.52428114",
"0.52201074",
"0.5209441",
"0.5205482",
"0.5204693",
"0.5202944",
"0.51940763",
"0.51842755",
"0.5173822",
"0.51598793",
"0.51571816",
"0.51431066",
"0.513868",
"0.51327837",
"0.51303387",
"0.5120886",
"0.5117276",
"0.51079047",
"0.51041716",
"0.5094144",
"0.5091434",
"0.5085667",
"0.5080434",
"0.5079393",
"0.50764924",
"0.50764924",
"0.50660455",
"0.5063426",
"0.5052678",
"0.5043252",
"0.5042003",
"0.5031865",
"0.50282234",
"0.50192094",
"0.5002019",
"0.49993765",
"0.49862728",
"0.49784565",
"0.49636215",
"0.4924804",
"0.4922867",
"0.49187636",
"0.4914542",
"0.4908937",
"0.49084997",
"0.4907893",
"0.48997903",
"0.48963037",
"0.48922858",
"0.48870894",
"0.4884947",
"0.48783854",
"0.48759687",
"0.48610044",
"0.4855753",
"0.4849954",
"0.48499325",
"0.4845002",
"0.48445064",
"0.4843075",
"0.48365444",
"0.4836501",
"0.48332712",
"0.4825462",
"0.48208833",
"0.48148063",
"0.48098648"
]
| 0.63906425 | 2 |
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. | public ImageToObjectRequest(ImageToObjectRequest source) {
if (source.ImageInfoList != null) {
this.ImageInfoList = new ImageInfo[source.ImageInfoList.length];
for (int i = 0; i < source.ImageInfoList.length; i++) {
this.ImageInfoList[i] = new ImageInfo(source.ImageInfoList[i]);
}
}
if (source.HandleParam != null) {
this.HandleParam = new HandleParam(source.HandleParam);
}
if (source.Type != null) {
this.Type = new Long(source.Type);
}
if (source.IsUsedClassify != null) {
this.IsUsedClassify = new Boolean(source.IsUsedClassify);
}
if (source.UserType != null) {
this.UserType = new Long(source.UserType);
}
if (source.ReportTypeVersion != null) {
this.ReportTypeVersion = new ReportTypeVersion[source.ReportTypeVersion.length];
for (int i = 0; i < source.ReportTypeVersion.length; i++) {
this.ReportTypeVersion[i] = new ReportTypeVersion(source.ReportTypeVersion[i]);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void set(String key, Object value);",
"void set(K key, V value);",
"public setKeyValue_args(setKeyValue_args other) {\n if (other.isSetKey()) {\n this.key = other.key;\n }\n if (other.isSetValue()) {\n this.value = other.value;\n }\n }",
"public abstract void set(String key, T data);",
"Object put(Object key, Object value);",
"public native Map<K, V> set(K key, V value);",
"@Test\n public void testSet() {\n Assert.assertTrue(map.set(\"key-1\", \"value-1\", 10));\n Assert.assertTrue(map.set(\"key-1\", \"value-2\", 10));\n Assert.assertTrue(map.set(\"key-2\", \"value-1\", 10));\n }",
"private void setKeySet(OwnSet<K> st){\n this.keySet = st; \n }",
"void set(K k, V v) throws OverflowException;",
"public Value put(Key key, Value thing) ;",
"@Test\n\tpublic void testPutAccessReodersElement() {\n\t\tmap.put(\"key1\", \"value1\");\n\n\t\tSet<String> keySet = map.keySet();\n\t\tassertEquals(\"Calling get on an element did not move it to the front\", \"key1\",\n\t\t\tkeySet.iterator().next());\n\n\t\t// move 2 to the top/front\n\t\tmap.put(\"key2\", \"value2\");\n\t\tassertEquals(\"Calling get on an element did not move it to the front\", \"key2\",\n\t\t\tkeySet.iterator().next());\n\t}",
"public void set(String key, Object value) {\n set(key, value, 0);\n }",
"final <T> void set(String key, T value) {\n set(key, value, false);\n }",
"public void setObject(final String key, final Object value)\r\n {\r\n if (key == null)\r\n {\r\n throw new NullPointerException();\r\n }\r\n if (value == null)\r\n {\r\n helperObjects.remove(key);\r\n }\r\n else\r\n {\r\n helperObjects.put(key, value);\r\n }\r\n }",
"@Override\n public void put(K key, V value) {\n // Note that the putHelper method considers the case when key is already\n // contained in the set which will effectively do nothing.\n root = putHelper(root, key, value);\n size += 1;\n }",
"@Test\n public void keySetTest()\n {\n map.putAll(getAMap());\n assertNotNull(map.keySet());\n }",
"@Override\n public V put(K key, V value) {\n if (!containsKey(key)) {\n keys.add(key);\n }\n\n return super.put(key, value);\n }",
"public void set(String newKey)\n\t{\n\t\tthis.Key = newKey;\n\t}",
"public void setValue(K key, V value);",
"public Value set(Value key, Value value) {\n\t\tif (get(key) != null)\n\t\t\tput(key, value);\n\t\telse if (parent != null)\n\t\t\tparent.put(key, value);\n\t\telse\n\t\t\tput(key, value);\n\t\treturn value;\n\t}",
"final void set(String key, String value) {\n set(key, value, false);\n }",
"void put(String key, Object obj);",
"public void set(Object key, Object value) {\n if(attributes == null)\n attributes = new HashMap<>();\n attributes.put(key, value);\n }",
"private void put(K key, V value) {\n\t\t\tif (key == null || value == null)\n\t\t\t\treturn;\n\t\t\telse if (keySet.contains(key)) {\n\t\t\t\tvalueSet.set(keySet.indexOf(key), value);\n\t\t\t} else {\n\t\t\t\tkeySet.add(key);\n\t\t\t\tvalueSet.add(keySet.indexOf(key), value);\n\t\t\t\tsize++;\n\t\t\t}\n\t\t}",
"void put(String key, Object value);",
"Object put(Object key, Object value) throws NullPointerException;",
"public void testNormalKeySet()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkKeySet(pmf,\r\n HashMap1.class,\r\n ContainerItem.class,\r\n String.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap1.class);\r\n clean(ContainerItem.class);\r\n }\r\n }",
"@Override\n public synchronized Object put(Object key, Object value) {\n if (value instanceof String) {\n value = ((String) value).trim();\n }\n String strkey = key.toString();\n if (this.ignoreCase) {\n this.keyMap.put(strkey.toLowerCase(), strkey);\n }\n return super.put(strkey, value);\n }",
"@Override\n public V put(K key, V value) {\n reverseMap.put(value, key);\n return super.put(key, value);\n }",
"public void testSet(){\n stringRedisTemplate.opsForSet().add(\"set-key\",\"a\",\"b\",\"c\");\n //srem set-key c d\n stringRedisTemplate.opsForSet().remove(\"set-key\",\"c\",\"d\");\n stringRedisTemplate.opsForSet().remove(\"set-key\",\"c\",\"d\");\n //scard set-key\n stringRedisTemplate.opsForSet().size(\"set-key\");\n //smembers set-key\n stringRedisTemplate.opsForSet().members(\"set-key\");\n //smove set-key set-key2 a\n stringRedisTemplate.opsForSet().move(\"set-key\",\"a\",\"set-key2\");\n stringRedisTemplate.opsForSet().move(\"set-key\",\"c\",\"set-key2\");\n\n //sadd skey1 a b c d\n stringRedisTemplate.opsForSet().add(\"skey1\",\"a\",\"b\",\"c\",\"d\");\n //sadd skey2 c d e f\n stringRedisTemplate.opsForSet().add(\"skey2\",\"c\",\"d\",\"e\",\"f\");\n //sdiff skey1 skey2 //存在与skey1中不存在与skey2中, a b\n stringRedisTemplate.opsForSet().difference(\"skey1\",\"skey2\");\n //sinter skey1 skey2 // c d\n stringRedisTemplate.opsForSet().intersect(\"skey1\",\"skey2\");\n //sunion skey1 skey2 // a b c d e f\n stringRedisTemplate.opsForSet().union(\"skey1\",\"skey2\");\n }",
"protected abstract void put(K key, V value);",
"protected abstract void _set(String key, Object obj, Date expires);",
"Set getLocalKeySet();",
"void setObjectKey(String objectKey);",
"String set(K key, V value, SetOption setOption, long expirationTime, TimeUnit timeUnit);",
"public Object putTransient(Object key, Object value);",
"public JbootVoModel set(String key, Object value) {\n super.put(key, value);\n return this;\n }",
"public abstract void Put(WriteOptions options, Slice key, Slice value) throws IOException, BadFormatException, DecodeFailedException;",
"public void set(String key, Object value) {\r\n\t\tthis.context.setValue(key, value);\r\n\t}",
"@Override\r\n\tpublic void putObject(Object key, Object value) {\n\t\t\r\n\t}",
"public void setKey(K newKey) {\r\n\t\tkey = newKey;\r\n\t}",
"public MapVS(SetVS<T> keys, Map<K, V> entries) {\n this.keys = keys;\n this.entries = entries;\n this.concreteHash = computeConcreteHash();\n }",
"void put(Object indexedKey, Object key);",
"public abstract V put(K key, V value);",
"void setKey(K key);",
"@Override\n\tpublic void put(S key, T val) {\n\t\t\n\t}",
"public void set(String key, Object value)\n {\n if (value == null) remove(key);\n else if (value instanceof Map)\n {\n DataSection section = createSection(key);\n Map map = (Map) value;\n for (Object k : map.keySet())\n {\n section.set(k.toString(), map.get(k));\n }\n }\n else\n {\n data.put(key, value);\n if (!keys.contains(key)) keys.add(key);\n }\n }",
"@Override\n public void put(K key, V value) {\n root = put(root, key, value);\n }",
"public void attach(Object key, Object value);",
"public static interface SetFilter extends KeyValueFilter {\r\n\t\tObject put(String name, Object value);\r\n\t}",
"void put(K key, V value);",
"void put(K key, V value);",
"public void testCache() {\n MethodKey m = new MethodKey(\"aclass\", \"amethod\", new Object[]{1, \"fads\", new Object()});\n String mValue = \"my fancy value\";\n MethodKey m1 = new MethodKey(\"aclass\", \"amethod1\", new Object[]{1, \"fads\", new Object()});\n String mValue1 = \"my fancy value1\";\n MethodKey m2 = new MethodKey(\"aclass\", \"amethod2\", new Object[]{1, \"fads\", new Object()});\n String mValue2 = \"my fancy value2\";\n\n GenericCache.setValue(m, mValue);\n GenericCache.setValue(m1, mValue1);\n GenericCache.setValue(m2, mValue2);\n\n assertEquals(GenericCache.getValue(m), mValue);\n assertEquals(GenericCache.getValue(m1), mValue1);\n assertEquals(GenericCache.getValue(m2), mValue2);\n }",
"@Override\n public void put(K key, V value) {\n root = putHelper(key,value,root);\n }",
"public void set(K key, V value)\n {\n // If there are too many entries, expand the table.\n if (this.size > (this.buckets.length * LOAD_FACTOR))\n {\n expand();\n } // if there are too many entries\n // Find out where the key belongs.\n int index = this.find(key);\n // Create a new association list, if necessary.\n if (buckets[index] == null)\n {\n this.buckets[index] = new AssociationList<K, V>();\n } // if (buckets[index] == null)\n // Add the entry.\n AssociationList<K, V> bucket = this.get(index);\n int oldsize = bucket.size;\n bucket.set(key, value);\n // Update the size\n this.size += bucket.size - oldsize;\n }",
"public void setKey(K newKey) {\n this.key = newKey;\n }",
"@Override\n\tpublic void set(K key, List<V> value) {\n\t\t\n\t}",
"public OwnMap() {\n super();\n keySet = new OwnSet();\n }",
"public void setKey (K k) {\n key = k;\n }",
"public void setItemCollection(HashMap<String, Item> copy ){\n \titemCollection.putAll(copy);\r\n }",
"public void put(Key key, Value val);",
"public void setValue(String key, Object value)\n {\n if (value != null)\n {\n if (otherDetails == null)\n {\n otherDetails = new Hashtable();\n }\n\n otherDetails.put(key, value);\n }\n }",
"ISObject put(String key, ISObject stuff) throws UnexpectedIOException;",
"public void put(Comparable key, Stroke stroke) {\n/* 120 */ ParamChecks.nullNotPermitted(key, \"key\");\n/* 121 */ this.store.put(key, stroke);\n/* */ }",
"public void set(R key, List<S> value){\n map.remove(key);\n map.put(key, value);\n }",
"public V put(K key, V value) throws InvalidKeyException;",
"@SuppressWarnings(\"resource\")\n @Test\n public void testClone() {\n try {\n ApiKey apikey1 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127625049L), 88,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"18fa817e-9d24-4344-a79a-ab19db23016c\", -15,\n \"7b9ca8ca-2f09-4496-b67e-f3a146e5c741\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127627362L));\n ApiKey apikey2 = apikey1.clone();\n assertNotNull(apikey1);\n assertNotNull(apikey2);\n assertNotSame(apikey2, apikey1);\n assertEquals(apikey2, apikey1);\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }",
"public final void set(final String key, final Object value) {\n try {\n synchronized (jo) {\n if (value == null) {\n jo.remove(key);\n } else {\n jo.put(key, value);\n }\n }\n } catch (JSONException e) {\n }\n }",
"@Test\n public void testPutAll_Existing() {\n Map<String, String> toAdd = fillMap(1, 10, \"\", \"Old \");\n\n map.putAll(toAdd);\n\n Map<String, String> toUpdate = fillMap(1, 10, \"\", \"New \");\n\n configureAnswer();\n testObject.putAll(toUpdate);\n\n for (String k : toAdd.keySet()) {\n String old = toAdd.get(k);\n String upd = toUpdate.get(k);\n\n verify(helper).fireReplace(entry(k, old), entry(k, upd));\n }\n verifyNoMoreInteractions(helper);\n }",
"public T set(T obj);",
"V put(K key, V value);",
"public boolean put(String key, String value);",
"void put(String key, String value) throws StorageException, ValidationException, KeyValueStoreException;",
"public void set(R key, Collection<S> value){\n map.remove(key);\n map.put(key, Collections.synchronizedList(Sugar.listFromCollections(value)));\n }",
"@Before\r\n public void test_change(){\r\n HashTable<String,String> table = new HashTable<>(1);\r\n MySet<String> s = (MySet<String>) table.keySet();\r\n table.put(\"AA\",\"BB\");\r\n table.put(\"AA\",\"CC\");\r\n assertTrue(s.contains(\"AA\"));\r\n table.remove(\"AA\");\r\n assertFalse(s.contains(\"AA\"));\r\n }",
"public void put(String key, Object value)\n\t{\n\t\tverifyParseState();\n\t\tvalues.put(key, ValueUtil.createValue(value));\n\t}",
"public boolean put( KEY key, OBJECT object );",
"boolean setValue(String type, String key, String value);",
"public Set<V> put(K key, Collection<V> set) {\n // Remove any possibly existing prior association with the key\n Set<V> result = remove(key);\n\n // Note: The second argument is effectless, as we cannot encounter item type errors here\n NavigableSet<V> navSet = createNavigableSet(set, true);\n Iterator<V> it = navSet.iterator();\n\n SetTrieNode currentNode = superRootNode;\n while(it.hasNext()) {\n V v = it.next();\n\n SetTrieNode nextNode = currentNode.nextValueToChild == null ? null : currentNode.nextValueToChild.get(v);\n if(nextNode == null) {\n nextNode = new SetTrieNode(nextId++, currentNode, v);\n if(currentNode.nextValueToChild == null) {\n currentNode.nextValueToChild = new TreeMap<>(comparator);\n }\n currentNode.nextValueToChild.put(v, nextNode);\n }\n currentNode = nextNode;\n }\n\n if(currentNode.keyToSet == null) {\n currentNode.keyToSet = new HashMap<>();\n }\n\n currentNode.keyToSet.put(key, navSet);\n\n keyToNode.put(key, currentNode);\n\n return result;\n }",
"public K setKey(K key);",
"Set keySet(final TCServerMap map) throws AbortedOperationException;",
"@SuppressWarnings(\"unchecked\")\n\tpublic Object clone() {\n\t\tLongOpenHashSet c;\n\t\ttry {\n\t\t\tc = (LongOpenHashSet) super.clone();\n\t\t} catch (CloneNotSupportedException cantHappen) {\n\t\t\tthrow new InternalError();\n\t\t}\n\t\tc.key = key.clone();\n\t\tc.state = state.clone();\n\t\treturn c;\n\t}",
"boolean canSet(String key);",
"@Test\n public void testBackdoorModificationSameKey()\n {\n testBackdoorModificationSameKey(this);\n }",
"public IDataKey clone() {\n return new IDataKey(this);\n }",
"@Override\n public V put(K key, V value) {\n if ((key == null) || (value == null)) {\n logger.warn(\"NULL key or value key = \" + key + \". value = \" + value);\n System.out.println(StringUtils.join(Thread.currentThread().getStackTrace(), \"\\n\"));\n return null;\n }\n\n // If this map is supposed to be case insensitive, uppercase the key before putting it\n // in the map\n if (caseInsensitive && key instanceof String) {\n return super.put(((K) key.toString().toUpperCase()), value);\n } else {\n return super.put(key, value);\n }\n }",
"public abstract void copyFrom(KeyedString src);",
"public void set(String key, String value){\n\t\tif(first == null){\n\t\t\tfirst = new ListMapEntry(key, value);\n\t\t}\n\t\tListMapEntry temp = first;\n\t\tListMapEntry prev = null;\n\t\twhile(temp!=null && !temp.getKey().equals(key)){\n\t\t\tprev = temp;\n\t\t\ttemp = temp.getNext();\n\t\t}\n\t\tif(temp==null){\n\t\t\tprev.setNext(new ListMapEntry(key, value));\n\t\t}\n\t\telse{\n\t\t\ttemp.setValue(value);\n\t\t}\n\t}",
"V put(final K key, final V value);",
"public void set(String key, Object obj) {\n options.put(key, obj);\n }",
"boolean put(K key, V value);",
"@Override\n\tpublic void put(Object key, Object val) {\n\t\tif(st[hash(key)].size()>=k)\n\t\t\tst[hash(key)].clear();\n\t\tst[hash(key)].put(key, st[hash(key)].size());\n\t}",
"protected abstract boolean _setIfAbsent(String key, Object value, Date expires);",
"@Override\n public void putValue(String key, Object value) {\n\n }",
"public DelegateAbstractHashMap(AbstractHashSet set) {\n\t\t\tsuper();\n\t\t\tthis.set = set;\n\t\t}",
"public void changeKey(String key, Object newValue){\n try {\n myJSON.put(key, newValue);\n writeToFile();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void put(String key, T value);",
"@Override\r\n public V put(K key, V value){\r\n \r\n // Declare a temporay node and instantiate it with the key and\r\n // previous value of that key\r\n TreeNode<K, V> tempNode = new TreeNode<>(key, get(key));\r\n \r\n // Call overloaded put function to either place a new node\r\n // in the tree or update the exisiting value for the key\r\n root = put(root, key, value);\r\n \r\n // Return the previous value of the key through the temporary node\r\n return tempNode.getValue();\r\n }",
"String setKey(String newKey);",
"public void set(String key, String value) {\n if (key.indexOf('=') != -1 || key.indexOf(';') != -1) {\n Log.e(TAG, \"Key \\\"\" + key + \"\\\" contains invalid character (= or ;)\");\n return;\n }\n if (value.indexOf('=') != -1 || value.indexOf(';') != -1) {\n Log.e(TAG, \"Value \\\"\" + value + \"\\\" contains invalid character (= or ;)\");\n return;\n }\n\n mMap.put(key, value);\n }",
"@Test\n public void testPutAll_ExistingNoChange() {\n Map<String, String> toAdd = fillMap(1, 10);\n\n map.putAll(toAdd);\n\n Map<String, String> toUpdate = fillMap(1, 10);\n\n configureAnswer();\n testObject.putAll(toUpdate);\n\n verifyZeroInteractions(helper);\n }"
]
| [
"0.6439533",
"0.6414664",
"0.6145133",
"0.6116169",
"0.6093837",
"0.6080848",
"0.6041259",
"0.59903467",
"0.59729224",
"0.5955252",
"0.58389026",
"0.58273375",
"0.5790539",
"0.57044613",
"0.57028556",
"0.56883043",
"0.56870764",
"0.5677066",
"0.56080335",
"0.5589262",
"0.558195",
"0.5570247",
"0.5560235",
"0.55529344",
"0.5549087",
"0.55326337",
"0.552936",
"0.5512239",
"0.54971284",
"0.5490053",
"0.5482838",
"0.5467464",
"0.5431614",
"0.54265076",
"0.54210687",
"0.54133534",
"0.54098344",
"0.53786135",
"0.5377046",
"0.5374655",
"0.5374442",
"0.5357094",
"0.5349922",
"0.53402376",
"0.5329624",
"0.53211576",
"0.5293229",
"0.52857983",
"0.52832335",
"0.5264284",
"0.52578396",
"0.52578396",
"0.52573586",
"0.5256507",
"0.5256373",
"0.5242116",
"0.5237011",
"0.5235121",
"0.5229279",
"0.5226596",
"0.5225468",
"0.52175635",
"0.5216123",
"0.5200798",
"0.5194299",
"0.51885253",
"0.5182475",
"0.51818836",
"0.51767784",
"0.5175985",
"0.517552",
"0.5175342",
"0.5173584",
"0.5169901",
"0.5135176",
"0.51323587",
"0.5129403",
"0.5128311",
"0.51240873",
"0.51217914",
"0.51207405",
"0.5120393",
"0.51033324",
"0.5103035",
"0.5101947",
"0.5099566",
"0.50985724",
"0.50907123",
"0.50744706",
"0.50701207",
"0.5065413",
"0.506367",
"0.50511956",
"0.5028013",
"0.50240403",
"0.50225365",
"0.50198495",
"0.5019144",
"0.50150335",
"0.5014828",
"0.50146437"
]
| 0.0 | -1 |
Internal implementation, normal users should not use it. | public void toMap(HashMap<String, String> map, String prefix) {
this.setParamArrayObj(map, prefix + "ImageInfoList.", this.ImageInfoList);
this.setParamObj(map, prefix + "HandleParam.", this.HandleParam);
this.setParamSimple(map, prefix + "Type", this.Type);
this.setParamSimple(map, prefix + "IsUsedClassify", this.IsUsedClassify);
this.setParamSimple(map, prefix + "UserType", this.UserType);
this.setParamArrayObj(map, prefix + "ReportTypeVersion.", this.ReportTypeVersion);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"public final void mo51373a() {\n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n protected void prot() {\n }",
"private stendhal() {\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void init() {\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public void smell() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"private void m50366E() {\n }",
"protected boolean func_70814_o() { return true; }",
"protected Problem() {/* intentionally empty block */}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n public int retroceder() {\n return 0;\n }",
"protected Doodler() {\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n public Object preProcess() {\n return null;\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@SuppressWarnings(\"unused\")\n private void _read() {\n }",
"@Override\r\n\tpublic void init() {}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n public void init() {\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n public void apply() {\n }",
"private TestsResultQueueEntry() {\n\t\t}",
"@Override\n void init() {\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"protected void initialize() {}",
"protected void initialize() {}",
"private final void i() {\n }",
"protected void h() {}",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"private Unescaper() {\n\n\t}",
"@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}",
"private ArraySetHelper() {\n\t\t// nothing\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"private Util() { }",
"@Override\n public void init() {}",
"@Override public int describeContents() { return 0; }",
"public void method_4270() {}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"protected abstract Set method_1559();",
"@Override\n public void init() {\n\n }",
"private void someUtilityMethod() {\n }",
"private void someUtilityMethod() {\n }",
"protected void init() {\n // to override and use this method\n }",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tprotected void intializeSpecific() {\n\r\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"private TedCorrigendumHandler() {\n throw new AssertionError();\n }",
"private MetallicityUtils() {\n\t\t\n\t}",
"@Override\n\tprotected void prepare() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"protected boolean func_70041_e_() { return false; }",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n public void preprocess() {\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"protected void additionalProcessing() {\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"protected OpinionFinding() {/* intentionally empty block */}",
"@Override\r\n\tpublic void just() {\n\t\t\r\n\t}",
"@Override\n\tpublic void selfValidate() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"private void assignment() {\n\n\t\t\t}"
]
| [
"0.62574834",
"0.6217662",
"0.6024768",
"0.5982239",
"0.5965723",
"0.59330684",
"0.5920059",
"0.58351564",
"0.5781645",
"0.57749504",
"0.57749504",
"0.57749504",
"0.57749504",
"0.57749504",
"0.57749504",
"0.57737285",
"0.57054734",
"0.5701363",
"0.56510806",
"0.56491816",
"0.56491816",
"0.5641364",
"0.5636646",
"0.5636101",
"0.5617263",
"0.56129867",
"0.56071395",
"0.56071395",
"0.5604147",
"0.5597464",
"0.5557192",
"0.5547823",
"0.5538959",
"0.5529547",
"0.5527831",
"0.55252886",
"0.5524415",
"0.55170584",
"0.55161196",
"0.55161196",
"0.5508306",
"0.55039597",
"0.5501735",
"0.5498203",
"0.5492665",
"0.54857016",
"0.54857016",
"0.5484164",
"0.5484164",
"0.54709655",
"0.54671437",
"0.5466405",
"0.54586643",
"0.54480445",
"0.5444829",
"0.544423",
"0.5431154",
"0.54291874",
"0.5428321",
"0.5426861",
"0.5424348",
"0.54216623",
"0.54197234",
"0.54126096",
"0.54122156",
"0.5410503",
"0.5408548",
"0.54017633",
"0.5393527",
"0.5393527",
"0.5393108",
"0.53811836",
"0.53811836",
"0.53765255",
"0.53727305",
"0.5371025",
"0.5368476",
"0.53672004",
"0.5362031",
"0.535984",
"0.53585947",
"0.535824",
"0.53558195",
"0.53554994",
"0.53553045",
"0.53553045",
"0.53553045",
"0.5353958",
"0.53527707",
"0.53524756",
"0.5351759",
"0.535174",
"0.53509206",
"0.53348345",
"0.5334606",
"0.533233",
"0.5331985",
"0.5331269",
"0.5331116",
"0.53306353",
"0.5328405"
]
| 0.0 | -1 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
final View v = inflater.inflate(R.layout.fregmant_profile, container, false);
Firstname = (EditText)v.findViewById(R.id.EditFirstName);
Secondname = (EditText)v.findViewById(R.id.EditSecondName);
Email = (EditText)v.findViewById(R.id.EditEmail);
final FirebaseFirestore db = FirebaseFirestore.getInstance();
mobile = User_singleton.getInstance().getNumber();
radioSexGroup = (RadioGroup) v.findViewById(R.id.gender);
DocumentReference docRef = db.collection("Users").document(mobile);
docRef.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {
@Override
public void onComplete(@NonNull Task<DocumentSnapshot> task) {
if (task.isSuccessful()) {
DocumentSnapshot document = task.getResult();
if (document.exists()) {
fn =(String)document.get("firstName");
ln =(String) document.get("lastName");
setmail =(String) document.get("email");
gend = (String) document.get("gender");
Firstname.setText(fn);
Secondname.setText(ln);
Email.setText(setmail);
if (gend.equals("ذكر")){radioSexGroup.check(R.id.Male);}
if (gend.equals("انثى")){radioSexGroup.check(R.id.Female);}
} else {
Toast.makeText(getContext(), "حدث خطأ ونأسف على ذلك", Toast.LENGTH_SHORT).show();
}
} else {
task.getException();
}
}
});
saveprofileedit = v.findViewById(R.id.saveiditprofile);
saveprofileedit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
final FirebaseFirestore db = FirebaseFirestore.getInstance();
Client_firebase newaccount = new Client_firebase();
String fr_n = Firstname.getText().toString();
String se_n = Secondname.getText().toString();
String mail = Email.getText().toString();
newaccount.setFirstName(fr_n);
newaccount.setLastName(se_n);
newaccount.setEmail(mail);
newaccount.setPhoneNumber(mobile);
newaccount.setCountry("Assuit");
newaccount.setName(fr_n+" "+se_n);
// get selected radio button from radioGroup
int selectedId = radioSexGroup.getCheckedRadioButtonId();
if (selectedId == R.id.Male)
{
newaccount.setGender("ذكر");
}
else if (selectedId == R.id.Female)
{
newaccount.setGender("انثى");
}
db.collection("Users").document(mobile).set(newaccount).addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
if (task.isSuccessful()){
Toast.makeText(getContext(), "تم تعديل البيانات بنجاح.", Toast.LENGTH_SHORT).show();
}else {
Toast.makeText(getContext(), "حدث خطأ اثناء العملية 🙁 ", Toast.LENGTH_SHORT).show();
}
}
});
Intent intent = new Intent(getContext(), MainActivity.class);
startActivity(intent);
}
});
return v;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}",
"@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }",
"@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }",
"protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}",
"@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }",
"@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }"
]
| [
"0.6739604",
"0.67235583",
"0.6721706",
"0.6698254",
"0.6691869",
"0.6687986",
"0.66869223",
"0.6684548",
"0.66766286",
"0.6674615",
"0.66654444",
"0.66654384",
"0.6664403",
"0.66596216",
"0.6653321",
"0.6647136",
"0.66423255",
"0.66388357",
"0.6637491",
"0.6634193",
"0.6625158",
"0.66195583",
"0.66164845",
"0.6608733",
"0.6596594",
"0.65928894",
"0.6585293",
"0.65842897",
"0.65730995",
"0.6571248",
"0.6569152",
"0.65689117",
"0.656853",
"0.6566686",
"0.65652984",
"0.6553419",
"0.65525705",
"0.65432084",
"0.6542382",
"0.65411425",
"0.6538022",
"0.65366334",
"0.65355957",
"0.6535043",
"0.65329415",
"0.65311074",
"0.65310687",
"0.6528645",
"0.65277404",
"0.6525902",
"0.6524516",
"0.6524048",
"0.65232015",
"0.65224624",
"0.65185034",
"0.65130377",
"0.6512968",
"0.65122765",
"0.65116245",
"0.65106046",
"0.65103024",
"0.6509013",
"0.65088093",
"0.6508651",
"0.6508225",
"0.6504662",
"0.650149",
"0.65011525",
"0.6500686",
"0.64974767",
"0.64935696",
"0.6492234",
"0.6490034",
"0.6487609",
"0.6487216",
"0.64872116",
"0.6486594",
"0.64861935",
"0.6486018",
"0.6484269",
"0.648366",
"0.6481476",
"0.6481086",
"0.6480985",
"0.6480396",
"0.64797544",
"0.647696",
"0.64758915",
"0.6475649",
"0.6474114",
"0.6474004",
"0.6470706",
"0.6470275",
"0.64702207",
"0.6470039",
"0.6467449",
"0.646602",
"0.6462256",
"0.64617974",
"0.6461681",
"0.6461214"
]
| 0.0 | -1 |
TODO Autogenerated method stub / Scanner in = new Scanner(System.in); while (in.hasNext()) System.out.println(in.next()); in.close(); | public static void main(String[] args) {
String a = "Programming";
String b = new String("Programming");
String c = "Program" + "ming";
System.out.println(a == b);
System.out.println(a == c);
System.out.println(a.equals(b));
System.out.println(a.equals(c));
System.out.println(a.intern() == b.intern());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String args[])\n {\n Scanner in=new Scanner(System.in);\n String str=in.nextLine();\n System.out.println(str);\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(sc.hasNext()) {\n\t\t\tString input = sc.nextLine();\n\t\t\tSystem.out.println(input);\n\t\t\tif(input == null || input==\"\") {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public static void main(String[] args) {\r\n Scanner sc = new Scanner(System.in);\r\n int count=1;\r\n String op;\r\n while(sc.hasNext()){\r\n\r\n for(int i=1;i<=count;i++){\r\n count++;\r\n op= sc.nextLine();\r\n StdOut.println(i+\" \"+op);\r\n }\r\n }\r\n }",
"public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\n\n\n\n }",
"public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n String str = sc.nextLine();\n System.out.println(str);\n }",
"public static void main(String[] args) {\n\t\tScanner in=new Scanner(System.in);\n\t\twhile(in.hasNext()){\n\t\t\tString strIn=in.nextLine();\n\t\t\tString strOut=processing(strIn);\n\t\t\tSystem.out.println(strOut);\n\t\t}\n\t\tin.close();\n\t}",
"public static void main(String[] args) {\nScanner sc= new Scanner(System.in);\nString name=sc.nextLine();\n\t\tSystem.out.println(\"hello\\n\"+name);\n\t\t\n\t}",
"public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tdo{\n\t\t\tSystem.out.println(\"out:\" + scan.nextLine());\n\t\t}while(true);\n\t}",
"public static void echoContents(Scanner in) {\n }",
"public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n System.out.print(SimpleSymbols(s.nextLine())); \n }",
"public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n System.out.print(SimpleSymbols(s.nextLine())); \n }",
"public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNextLine()){\n\t\t\tString str=sc.nextLine();\n\t\t\t\n\t\t\t\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tInputStream input = System.in;\n\t\tScanner scanner = new Scanner(input);\n\t\t// nextLine()을 실행하기 전에 \n\t\t// 무엇을 해야할지 알려주는 메시지를 먼저 출력 하라.\n\t\t// 이를 'prompt(프롬프트)' 라고 한다\n\t\tSystem.out.println(\"문자열을 입력후 Enter....\");\n\t\tString strInput = scanner.nextLine();\n\t\tSystem.out.println(strInput);\n\n\t}",
"public static void main(String[] args) \n {\n Scanner sc = new Scanner(System.in); \n \n // String input\n System.out.print(\"What's your name? \"); \n String name = sc.nextLine(); \n \n // Print the values to check if input was correctly obtained. \n System.out.println(\"Name: \" + name); \n\n // Close the Scanner\n sc.close();\n }",
"public static void main(String[] args)\n {\n Scanner scan = new Scanner(System.in);\n while ((quit.equals(question)!=true)){\n question = scan.nextLine();\n System.out.println (question);\n\n }\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString inputString;\n\t\t\n\t\tdo {\n\t\t\tSystem.out.print(\">\");\n\t\t\tinputString = sc.nextLine();\n\t\t\tSystem.out.println(inputString);\n\t\t}while(!inputString.equals(\"q\"));\n\t\t\n\t\tSystem.out.println(\"end\");\n\t}",
"public void inputScanner(){\n\t\t Scanner sc=new Scanner(System.in); \n\t \n\t\t System.out.println(\"Enter your rollno\"); \n\t\t int rollno=sc.nextInt(); \n\t\t System.out.println(\"Enter your name\"); \n\t\t String name=sc.next(); \n\t\t System.out.println(\"Enter your fee\"); \n\t\t double fee=sc.nextDouble(); \n\t\t System.out.println(\"Rollno:\"+rollno+\" name:\"+name+\" fee:\"+fee); \n\t\t sc.close(); \n\t}",
"public static void main (String[] args) throws java.lang.Exception\r\n\t{\n\t\tScanner sc=new Scanner(System.in);int f=0;\r\n\t\twhile(sc.hasNext()){\r\n\t\tint t=sc.nextInt();\r\n\t\t\r\n\t\tif(t==42) f=1;\r\n\t\tif(f==0) System.out.println(t);\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\n\t\tScanner console = new Scanner(System.in);\n\t\tint numEntries = console.nextInt();\n\t\tfor(int ii = 0; ii < numEntries; ii++){\n\t\t\tconsole.nextLine();\n\t\t\tString lineScan = console.nextLine();\n\t\t}\n\t}",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n // String input\n String first = sc.nextLine();\n System.out.println(first);\n\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tScanner in=new Scanner(System.in);\n\t\twhile(in.hasNext()){\n\t\t\tint n=in.nextInt();\n\t\t\tint pNumber=processing(n);\n\t\t\tSystem.out.println(pNumber);\n\t\t\t\n\t\t}\n\t\tin.close();\n\t}",
"public static void main(String[] args) {\n\t\tString s = \"We're learning about Scanner\";\n\t\tSystem.out.println(s);\n\t\tScanner sc = new Scanner(System.in);\n//\t\tint m = sc.nextInt();\n//\t\tint n = sc.nextInt();\n//\t\tSystem.out.println(\"The Value of m is: \"+m);\n//\t\tSystem.out.println(\"The Value of n is: \"+n);\n//\t\tdouble d = sc.nextDouble();\n//\t\tString name = sc.next();//Gives us one Word\n//\t\tSystem.out.println(\"Name is: \" + name);\n\t\t\n//\t\tString fullName = sc.nextLine();\n//\t\tSystem.out.println(\"Full Name is: \" + fullName);\n\t\t\n\t\tString intInput = sc.nextLine();\n\t\tint n = Integer.parseInt(intInput);\n\t\tSystem.out.println(n);\n\t}",
"public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tString s=sc.nextLine();\r\n\t\tStringTokenizer st=new StringTokenizer(s,\":\");\r\n\t\twhile(st.hasMoreTokens())\r\n\t\t{\r\n\t\t\tSystem.out.println(st.nextToken());\r\n\t\t}\r\n\r\n\t}",
"public static void main(String[] args) {\n\t\tScanner ler = new Scanner(System.in);\n\n\t\tString sentence = ler.nextLine();// ate o \\n (enter)\n\t\tString x, y, z;\n\t\tx = ler.next();\n\t\ty = ler.next();\n\t\tz = ler.next();\n\n\t\tSystem.out.println(sentence);\n\t\tSystem.out.println(x);\n\t\tSystem.out.println(y);\n\t\tSystem.out.println(z);\n\n\t\tx = ler.next();\n\t\ty = ler.next();\n\t\tz = ler.next();\n\t\tSystem.out.println(x);\n\t\tSystem.out.println(y);\n\t\tSystem.out.println(z);\n\t\tler.close();\n\t}",
"public static void main(String[] args) {\nString name;\nScanner s=new Scanner(System.in);\n\tSystem.out.println(\"Please enter your first name: \");\n\tname=s.next();\n\tSystem.out.println(name+\", Welcome\");}",
"public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n String str=sc.next();\n String str1=sc.next();\n String str2=sc.next();\n String str3=sc.next();\n System.out.println(str);\n System.out.println(str1);\n System.out.println(str2);\n System.out.println(str3);\n\n\n }",
"public static void main(String[] args) {\n\t\t Scanner inp = new Scanner(System.in);\n\t\t System.out.print(\"In:\");\n\t\t String s = inp.nextLine();\n\t\t \n\t\t \n\t\t String[] sp=s.split(\"\");\n\t\t for(int x=sp.length-1; x>=0; x--) {\n\t\t \tSystem.out.print(sp[x]);\n\t\t }\n\t\t \n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tString hello = sc.nextLine();\n\t\tSystem.out.println(hello);\n\n\n\t}",
"private static String getUserInput(String prompt){ \r\n Scanner in = new Scanner(System.in);\r\n System.out.print(prompt);\r\n return in.nextLine();\r\n }",
"public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n System.out.print(AlphabetSoup(s.nextLine())); \n }",
"public static void main(String[] args) {\n\t\tScanner inpt = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Hello Word!!!\");\r\n\t\t\r\n\r\n\t}",
"public static void main(String[] args) {\n try{\n Scanner input = new Scanner(System.in);\n String inputString;\n //read all the line in for loop only, dont take input outside otherwise the \n //first line won't be printed\n //nextLine method only works for scanner object\n //increment i inside loop but assign value to i outside loop\n int i = 1;\n while(( inputString = input.nextLine()) != null){\n System.out.println(i + \" \" + inputString );\n i= i +1;\n }\n }\n catch(NoSuchElementException e){\n\n }\n \n }",
"public static void main(String[] args) {\n\t \n\t Scanner scanner = new Scanner(System.in);\n\n\t String name = \"\";\n\n\t while (name.isBlank()) {\n\t System.out.println(\"Enter your name: \");\n\t name = scanner.nextLine();\n\n\t }\n\n\t System.out.println(\"Hello \" + name);\n\n\t scanner.close();\n\n\t}",
"public static void main(String[] args) {\n Scanner console = new Scanner(System.in);\n String input = console.nextLine();\n Pattern wordPattern = Pattern.compile(\n \"[A-Za-z]+\");\n Matcher matcher = wordPattern.matcher(input);\n while (matcher.find()) {\n System.out.print(matcher.group()+\" \");\n }\n\n }",
"public static void main(String...args){\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tString s = scan.nextLine();\r\n//\t\tString str = s.replaceAll(\"\\\\s\", \"\"); // removing white space from string\r\n//\t\tSystem.out.println(str);\r\n\t\tchar[] ch = s.toCharArray();\r\n\t\tSet<Character> charSet = new HashSet<>();\r\n\t\tfor(char c: ch){\r\n\t\t\t\r\n\t\t\tcharSet.add(c);\t\r\n\t\t}\r\n\t\t\r\n//\t\tStringBuffer sb = new StringBuffer();\r\n\t\tfor(Character character : charSet){\r\n//\t\t\tsb.append(character);\r\n\t\t\tSystem.out.print(character);\r\n\t\t}\r\n//\t\tSystem.out.println(sb.toString());\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n Scanner scn = new Scanner(System.in);\r\n System.out.println(\"Introduzca un entero: \");\r\n int a = scn.nextInt();\r\n System.out.println(\"El numero introducido es el: \" + a);\r\n String b = scn.nextLine();\r\n System.out.println(b);\r\n String c = scn.next();\r\n System.out.println(c);\r\n }",
"public static void main(String[] args) {\n\t\tArrayList<Integer> Lista = new ArrayList<Integer>();\n\t\tScanner in = new Scanner(System.in);\n\t\tString string;\n\t\twhile ((string = in.next()) != \"\\n\") {\n\t\t\tLista.add(Integer.parseInt(string));\n\t\t}\n\t\tin.close();\n\t\tSystem.out.println(Lista.size());\n\t\tfor (int i:Lista) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\t\n\t}",
"public static void main(String[] args) throws IOException {\n\t\t FileInputStream file=new FileInputStream(\"C:\\\\Users\\\\DELL\\\\Desktop\\\\test.txt\");\r\n Scanner scan=new Scanner(file);\r\n while(scan.hasNextLine()){\r\n \t System.out.println(scan.nextLine());\r\n }\r\n \r\n file.close();\r\n\t}",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n while (scanner.hasNext()) {\n int N = scanner.nextInt();\n int sum = 0;\n for (int i = 0; i < N; i++) {\n sum += scanner.nextInt();\n }\n System.out.println(sum);\n }\n }",
"String readInput() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }",
"@Override\n\tpublic String read() \n\t{\n\t\tString res = \"\";\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tif (scan.hasNextLine())\n\t\t\tres = scan.nextLine();\n\t\t\n\t\treturn res;\n\t\t\n\n\t}",
"public void run()\n\t {\n\t stdin = new Scanner(System.in);\n\t boolean done = false;\n\t while ( !done )\n\t {\n\t String command = stdin.next();\n\t char ccommand=command.charAt(0);\n\t switch (ccommand) \n\t { \n\t case 'I': add('I');\n\t\t\t break; \n\t case 'O': add('O');\n\t break;\n\t case 'N': add('N');\n\t break;\n\t case 'R': remove();\n\t break;\n\t case 'P': print();\n\t break;\n\t case 'Q': \n\t System.out.println(\"Program terminated\");\n\t done = true;\n\t break;\n\t default: //deal with bad command here \n\t System.out.println(\"Command\"+\"'\"+command+\"'\"+\"not supported!\");\t\t\n\t } \n\t }\n\t }",
"public static String readUserInput() {\n return in.nextLine();\n }",
"public void input()\n\t{\n\t\t// this facilitates the output\n\t\tScanner sc = new Scanner(System.in) ; \n\t\tSystem.out.print(\"The Bike Number:- \") ;\n\t \tthis.bno = sc.nextInt() ; \t\n\t\tSystem.out.print(\"The Biker Name:- \") ; \n\t \tthis.name = new Scanner(System.in).nextLine() ; \t\n\t\tSystem.out.print(\"The Phone number:- \") ; \n\t \tthis.phno = sc.nextInt() ; \t\n\t\tSystem.out.print(\"The number of days:- \") ; \n\t \tthis.days = sc.nextInt() ; \t\n\t}",
"public static void main(String[] args) {\n\n\n Scanner scanner = new Scanner(System.in);\n String info = \"\";\n\n int number = 0;\n while(true)\n {\n System.out.println(number);\n number++;\n if(number > 10)\n {\n break;\n }\n }\n }",
"public static void main(String[] arg) {\n\t\tBufferedReader br = new BufferedReader(\r\n\t\t new FileReader(\"input.in\"));\r\n\r\n\t\t// PrintWriter class prints formatted representations\r\n\t\t// of objects to a text-output stream.\r\n\t\tPrintWriter pw = new PrintWriter(new\r\n\t\t BufferedWriter(new FileWriter(\"output.in\")));\r\n\r\n\t\t// Your code goes Here\r\n\r\n\t\tpw.flush();\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tString x = sc.nextLine();\r\n\r\n\t\tSystem.out.println(\"hello world \" + x);\r\n\t}",
"public static void main(String[] args) {\n Scanner reader = new Scanner(System.in);\r\n System.out.print(\"Enter a number: \");\r\n\r\n // nextInt() reads the next integer from the keyboard\r\n int number = reader.nextInt();\r\n\r\n // println() prints the following line to the output screen\r\n System.out.println(\"You entered: \" + number);\r\n }",
"public static void main(String args[])throws IOException\n\t{\n\tScanner obj=new Scanner(System.in);\n\n\t//Entering a string\n\tSystem.out.println(\"\\nEnter a string !\");\n\tString s=obj.nextLine();\n\tSystem.out.println(\"you have entered \"+ s);\n\n\t//entering a word\n\tSystem.out.println(\"\\nEnter a word !\");\n\tString w=obj.next();\n\n\t//entering an integer\n\tSystem.out.println(\"\\nEnter an integer !\");\n\tint n=obj.nextInt();\n\n\t//entering a float\n\tSystem.out.println(\"\\nEnter a floating point number !\");\n\tfloat f=obj.nextFloat();\n\n\t//Printing the inputs\n\tSystem.out.println(\"\\nThe inputs are .....\");\n\tSystem.out.println(\"\\nWord : \"+w+\"\\nInteger : \"+n+\"\\nFloat : \"+f);\n\n\n}",
"private static String scan(String text)\r\n\t{\r\n\t\tSystem.out.print(text);\r\n\t\treturn input.nextLine();\r\n\t}",
"public static void main(String[] args) {\n Scanner name =new Scanner(System.in);\r\n String Name=name.next();\r\n for (int i=0;i<=15;i++)\r\n {\r\n \t System.out.println(Name);\r\n }\r\n\t}",
"public static void main(String[] args) {\n RandomizedQueue<String> randomizedQueue = new RandomizedQueue<String>();\n while (!StdIn.isEmpty()) {\n String line = StdIn.readString();\n if (!line.isBlank()) {\n randomizedQueue.enqueue(line);\n }\n }\n Iterator<String> itr = randomizedQueue.iterator();\n while (itr.hasNext())\n System.out.println(itr.next());\n }",
"public static void main(String[] args){\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString greeting = \"Hello world \"+scanner.nextLine();\n\t\tSystem.out.println(greeting);\n\t}",
"public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\r\n System.out.print(BinaryReversalMethod(s.nextLine()));\r\n s.close();\r\n }",
"public static void main(String[] args) {\n\t\tScanner unos=new Scanner(System.in);\n\t\tString rijec = \" \";\n\t\tArrayList lista = new ArrayList();\n\t\twhile(rijec.equals(\"kraj\")==false)\n\t\t{\n\t\t\tSystem.out.println(\"Unesite rijec:\");\n\t\t rijec=unos.nextLine();\n\t\tlista.add(rijec);\n\t\t}\n\t\tSystem.out.println(\"Output\");\n\t\tfor(int i=0;i<lista.size();i++)\n\t\t{\n\t\t\tSystem.out.print(lista.get(i)+\" \");\n\t\t}\n\t}",
"public static void main(String[] args) {\n Scanner myOdj = new Scanner(System.in );\n System .out.println(\" Enter your name\");\n\n String userName = myOdj.nextLine();\n System.out.println (\" hi \" + userName);\n\n \n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"Digite o seu nome\");\n\t\tScanner scanner = new Scanner(System.in);\n\t\tString nome = scanner.nextLine();\n\t\tSystem.out.println(nome);\n\t\tscanner.close();\n\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tScanner s = new Scanner(System.in);\r\n\t String txt = s.next();\r\n\t //your code here\r\n\t System.out.println(txt.substring(0,2));\r\n\r\n\t}",
"public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n PrintStream out = System.out;\n StackofItem (in,out);\n }",
"public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\twhile (scanner.hasNextLine()) {\n\t\t\tString input = scanner.nextLine();\n\t\t\tSystem.out.println(solve(input));\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public static void main(String[] args) throws NumberFormatException, IOException {\n\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\twhile(input.hasNext()) {\n\t\t\tString[] s = input.nextLine().split(\" \");\n\t\t\tSystem.out.println(Integer.parseInt(s[0])+Integer.parseInt(s[1]));\n\t\t}\n\t\t\n\t}",
"public static void main( String[] args ) {\r\n\r\n\tScanner sc = new Scanner(System.in);\r\n\twhile( sc.hasNext() ) {\r\n\t System.out.println( engToPig(sc.next() ));\r\n\t}\r\n }",
"public static void main(String[] args) throws IOException {\n\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.println(\"enter ur name\");\n\t\tString name = scanner.nextLine();\n\t\tSystem.out.println(name);\n\t\tscanner.close();\n\t}",
"public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tString nome;\n\t\tSystem.out.println(\"Digite seu Nome: \");\n\t\tnome = sc.nextLine();\n\t\tSystem.out.println(\"\");\n\t\t\n\t\tfor(int i = 1; i <= 10; i++) {\n\t\t\tSystem.out.println(nome + i);\n\t\t}\n\t\tsc.close();\n\t\t\t\t\t\t\n\t}",
"public static void main(String args[])\n {\n Stack<Character> s = new Stack<Character>();\n Scanner in = new Scanner(System.in);\n String str = in.nextLine();\n for(char c:str.toCharArray()){\n s.add(c);\n }\n while(s.empty()==false) System.out.print(s.pop());\n }",
"public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\r\n\t\tString text = \"My name is Buzz Lightyear!\";\r\n\t\tSystem.out.println(\"Please enter your name to see something cool.\");\r\n\t\ttext = input.nextLine();\r\n\t\tfor (int i = 0; i < text.length(); i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(text.substring(i));\r\n\t\t}\r\n\t}",
"public String weiterSpielen(){\n Scanner keyboard = new Scanner(System.in);\n return keyboard.nextLine();\n }",
"public static void main(String[] args) {\n\n Scanner input = new Scanner (System.in);\n System.out.println (\"Enter a number\");\n int number = input.nextInt(); // when enter is hit - next line in code takes the input number\n System.out.println(\"Enter your name\");\n input.nextLine(); /* this line is needed before nextLine (or nextInt, nextDouble, nextBoolean etc.,\n so scanner so Java can let you print next input */\n String name = input.nextLine();\n\n System.out.println(number);\n System.out.println(name);\n }",
"public static void main(String[] args) {\n List s=new ArrayList();\n\t\t s.add(\"Rohit\");\n s.add(2);\n\t\t s.add(1);\n\t\t\n// for collectionssorting \n// s.add(2);\n//\t\ts.add(1);\n//\t\tCollections.sort(s); // for same data type sorting\n//\t\tSystem.out.println(s);\n\t\t\n\t\tIterator itr=s.iterator(); //An Iterator is an object that can be used to loop through collections, \n\t\t //like ArrayList and HashSet.\n\t\twhile(itr.hasNext()) //The hasNext() is a method of Java Scanner class which returns true \n\t\t\t //if this scanner has another token in its input.\n\t\t{\n\t\t\tObject o=itr.next(); //The next() is a method of Java Scanner class which finds and \n\t\t\t //returns the next complete token from the scanner which is in using\n\t\t\t\n\t\t\tSystem.out.println(o);\n\t\t}\n\t\t}",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String[] tokens = scanner.nextLine().split(\"\\\\s\");\n String search = scanner.nextLine().trim();\n System.out.println(Collections.frequency(List.of(tokens), search));\n }",
"public static void main(String[] args) {\n\t\t\n\t\tScanner scan=new Scanner(System.in);\n\t\tint x=0;\n\t\twhile(x<=100) {\n\t\t\tSystem.out.print(x++ + \" \");\n\t\t\t\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\t \n\t\tSystem.out.println(\"Enter street address:\");\n\t\t \n\t\tint houseNumber = input.nextInt();\n\t\tString street = input.nextLine(); // instead of next(); which only reads to next space.\n\t\t \n\t\tSystem.out.println(\"house number is \" + houseNumber);\n\t\tSystem.out.println(\"street is \" + street);\n\t\t\n\t\tinput.close();\n\t\t\n\t\t\n\t}",
"public static void main(String []args){\n\t\tScanner scanner = new Scanner(System.in);\n\t\twhile(scanner.hasNext()){\n\t\t\tSystem.out.printf(\"%+.4E\\n\", scanner.nextDouble() );\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter your name\\n\");\r\n\t\tString a=s.nextLine();\r\n\t\tSystem.out.print(\"College\\n\");\r\n\t\tString b=s.nextLine();\r\n\t\tSystem.out.print(\"De\\n\");\r\n\t\tString c=s.nextLine();\r\n\t\tSystem.out.print(\"Department\\n\");\r\n\t\tString d=s.nextLine();\r\n\t\tSystem.out.println(\"Name : \"+a+\"\\n\"+\"College : \"+b+\"\\n\"+\"De :\"+c+\"\\n\"+\"Department : \"+d);\r\n\t\t\r\n\r\n\t}",
"private void getInput() {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter a number\");\r\n\t\tn=scan.nextInt();\r\n\r\n\t}",
"public static String getStringInput() {\n Scanner in = new Scanner(System.in);\n return in.next();\n }",
"@SuppressWarnings(\"resource\")\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t//String str = \"Hello World\";\n\t\tScanner scanner = new Scanner(System.in); //create object;\n\t\tSystem.out.println(\"Enter an String input\");\n\t\tString userInput = scanner.nextLine();//iput\n\t\tSystem.out.println(userInput.toString());\n\t\n\t\t\n\t\t//System.out.println(\"First string upper case is \" + userInput.toUpperCase().charAt(0) + \" from \" + userInput);\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\t\n\t\tprocess(s);\n\t}",
"public static void main(String[] args) {\n\t\tString nom;\r\n\t\tScanner leer= new Scanner(System.in);\r\n\t\tSystem.out.println(\"Ingrese su nombre\");\r\n\t\tnom=leer.nextLine();\r\n\t\tSystem.out.println(\"Hola \"+nom);\r\n\t}",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n while (scanner.hasNext()) {\n System.out.println(InfixToPostfix(scanner.next()));\n }\n }",
"public void input(Scanner in) { \r\n if (in.hasNext()) firstName = in.next();\r\n if (in.hasNext()) lastName = in.next();\r\n\t}",
"public static void main(String[] args) {\n\t\tScanner keyboard = new Scanner(System.in);\n\t\t\n\t\tkeyboard.close();\n\t}",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int input = scanner.nextInt();\n int i =1;\n while(i*i <= input){\n System.out.println(i*i++);\n }\n }",
"public String userCommand(){\n return scanner.nextLine();\n }",
"public static void main(String[] args) {\n\t\tScanner reader=new Scanner(System.in);\r\n\t\tSystem.out.println(\"what is u r name\");\r\n\t\tString name=reader.next();\r\n\t\tSystem.out.println(\"u r name is\"+ name);\r\n\t\tScanner reader1=new Scanner(System.in);\r\n\t\tSystem.out.println(\"how old r u\");\r\n\t\tint age=reader1.nextInt();\r\n\t\tSystem.out.println(\" u r age is\"+ age);\r\n\t\t\r\n\r\n\t}",
"public void takeUserInput() {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tif(sc.hasNext())\r\n\t\t{\r\n\t\t\tint dig=sc.nextInt();\r\n\t\t\tif(dig<0)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Factorial not defined for negative numbers\");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\tSystem.out.println(factorial(dig));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"public static void main(String[] args) {\n\t\tScanner loop = new Scanner(System.in);\n\t\tint i;\n\t\tfor(i=1;i<=10;i++)\n\t\t{\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\t\n\n\t}",
"public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in); \r\n\t\twhile(sc.hasNext()){\r\n\t\t\tint x=sc.nextInt();\r\n\t\t\tint y=sc.nextInt();\r\n\t\t\tint result=getResult(x,y);\r\n\t\t\tSystem.out.println(result);\r\n\t\t\t\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tScanner scanner = new Scanner(System.in);\r\n\t\t\r\n\t\tString name = scanner.nextLine();\r\n\r\n\t\tchar gender = scanner.next().charAt(0); // F\r\n\t\t\r\n\t\tint age = scanner.nextInt();\r\n\t\t\r\n\t\tlong mobileNo = scanner.nextLong();\r\n\t\t\r\n\t\tdouble cgpa = scanner.nextDouble();\r\n\t\t\r\n\t\tSystem.out.println(\"Name: \"+name);\r\n\t\tSystem.out.println(\"Gender: \"+gender);\r\n\t\tSystem.out.println(\"Age: \"+age);\r\n\t\tSystem.out.println(\"Mobile: \"+mobileNo);\r\n\t\tSystem.out.println(\"CGPA: \"+cgpa);\r\n\t\t\r\n\t\tSystem.out.println(\"Your name is: \"+name+\" \"+gender+\" \"+age);\r\n\t}",
"public static void main(String[] args) {\n\t\tScanner teclado= new Scanner(System.in);\r\n\t\tchar letra\r\n\t\tSystem.out.printf(\"Introduzca un caracter\");\r\n\t\tletra=teclado.next().charAt(0);\r\n\t\twhile(letra!='*') {\r\n\t\t\t\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n Scanner num = new Scanner(System.in);\n for (int i = 0; i < 4; i++) {\n int number = num.nextInt();\n System.out.println(number);\n }\n }",
"public Ch12Ex1to9()\n {\n scan = new Scanner( System.in );\n }",
"public static void main(String[] args) {\n\t\tString sampleText = \"In addition, the rook was moved too far to be effective.\";\r\n\t\tScanner scanner = new Scanner(sampleText);\r\n\t\tArrayList<String> list = new ArrayList<>();\r\n\t\t\r\n\t\twhile (scanner.hasNext()) {\r\n\t\t String token = scanner.next();\r\n\t\t list.add(token);\r\n\t\t }\r\n\r\n\t\tfor (String token : list) {\r\n\t\t System.out.println(token);\r\n\t\t}\r\n\r\n\r\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t\t\t\tList <String> l=new ArrayList<String>();//If it is Linkedlist the reading is slow;If it is vector it is syncronized.\r\n\t\t\t\tScanner sc=new Scanner(System.in);\r\n\t\t\t\tfor(int i=0;i<10;i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Enter String\");\r\n\t\t\t\t\tl.add(sc.next());\r\n\t\t\t\t}\r\n\t\t\t\tCollections.sort(l);//To sort in ascending order\r\n\t\t\t\tfor(String s:l)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(s);\r\n\t\t\t\t}\r\n\t\t\t}",
"public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\n\t\tprocess(s);\n\n\t}",
"public static String inputCommand() {\n String command;\n Scanner in = new Scanner(System.in);\n\n command = in.nextLine();\n\n return command;\n }",
"public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\r\n\t\tString input = scanner.nextLine();\r\n\t\tint num = Integer.parseInt(input);\r\n\t\r\n\t\tfor(int i =1;i<=num;i++) {\r\n\t\t\tSystem.out.print(i);\r\n\t\t}\r\n\t}",
"@Test\n\tpublic void one()\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"enter the value of a\");\n\t\tint a = sc.nextInt();\n\t\tSystem.out.println(\"value of a is: \" +a);\n\t}",
"public static void main(String[] args) {\n\t\r\n\t\tScanner reader=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Input person's name\");\r\n\t\tString name=reader.next(); \r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"Input person's age\");\r\n\t\tint age=reader.nextInt(); \r\n\t\t\r\n\t\tSystem.out.println(\"Input person's occupation\");\r\n\t\tString occupation=reader.next();\r\n\t\t\r\n\t\tSystem.out.println(\"Person's name is \"+ name); \r\n\t\tSystem.out.println(\"Person's age is \"+ age); \r\n\t\tSystem.out.println(\"Person's occupation is \"+ occupation);\r\n\t\r\n\t}"
]
| [
"0.75361514",
"0.74149567",
"0.73229784",
"0.7234617",
"0.7198594",
"0.71869695",
"0.71639776",
"0.70403844",
"0.70098895",
"0.69580865",
"0.69580865",
"0.6945699",
"0.6943834",
"0.6909451",
"0.69031566",
"0.6867243",
"0.685212",
"0.6825879",
"0.68223816",
"0.67452407",
"0.67373025",
"0.6720568",
"0.66811794",
"0.6677546",
"0.6676804",
"0.66473055",
"0.66324776",
"0.6628547",
"0.6626648",
"0.66242903",
"0.6623111",
"0.6618881",
"0.6618846",
"0.6612809",
"0.6583653",
"0.6583107",
"0.65739655",
"0.65509593",
"0.6533298",
"0.65146774",
"0.6513399",
"0.6497209",
"0.6479944",
"0.6479442",
"0.64757913",
"0.6455493",
"0.64547443",
"0.64030993",
"0.6400336",
"0.6387842",
"0.638611",
"0.63859874",
"0.6384653",
"0.6365818",
"0.635773",
"0.6355526",
"0.63533247",
"0.63456106",
"0.63424456",
"0.63422996",
"0.6329958",
"0.63124394",
"0.6311888",
"0.6310403",
"0.6301653",
"0.62929523",
"0.6279167",
"0.6273104",
"0.62697256",
"0.6265683",
"0.6255655",
"0.6255019",
"0.62453955",
"0.62430936",
"0.62387836",
"0.6236299",
"0.6235924",
"0.6235134",
"0.6235019",
"0.62315667",
"0.623083",
"0.6223868",
"0.62233245",
"0.62188596",
"0.6209656",
"0.6207891",
"0.62064415",
"0.6205544",
"0.6193745",
"0.6189046",
"0.61879236",
"0.6181533",
"0.617911",
"0.6167157",
"0.61639005",
"0.6152556",
"0.6151568",
"0.61487377",
"0.61461824",
"0.6143981",
"0.61407125"
]
| 0.0 | -1 |
Called when the user taps the Sign IN button | public void forGotPass(View view) {
// Perform Forgot Password Action in response to tapping Sign In button
Intent intent = new Intent( this, ForGotPasswordActivity.class);
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onSignInButtonClicked();",
"@Override\n public void onSignInClicked() {\n Prefs.setSignedIn(true);\n // Proceed to Main and finish\n proceedToMainActivityAndFinish();\n }",
"private void signIn() {\n }",
"private void onSignInClicked() {\n mState.enableConnection();\n mState.mShouldResolve = true;\n mState.mSignInClicked = true;\n mState.connectGoogleGames();\n\n // Show a message to the user that we are signing in.\n status.setText(\"Connecting...\");\n }",
"public void click_SIGN_IN() {\r\n\t\tbtn_SIGN_IN.click();\r\n\t}",
"public void onSignInClick(MouseEvent e) {\n\t\tsignin();\n\t}",
"public void clickSignInButton() {\r\n\t\tdriver.findElement(signInButton).click();\r\n\t}",
"public void clickSignIn() {\r\n\t\tdriver.findElement(signIn).click();\r\n\t}",
"public void signIn(View view) {\n requestSignIn();\n }",
"void onSignInButtonClicked(String userEmail, String userPassword);",
"private void signInEvt() {\n // Retrieve Details\n String email = this.view.getWelcomePanel().getSignInPanel().getEmailText().getText().trim();\n String password = new String(this.view.getWelcomePanel().getSignInPanel().getPasswordText().getPassword()).trim();\n if (!email.equals(\"\") && !password.equals(\"\")) {\n if (model.getSudokuDB().checkLogin(email, password)) {\n // Set Player\n Player player = model.getSudokuDB().loadPlayer(email, password);\n if (player != null) {\n model.setPlayer(model.getSudokuDB().loadPlayer(email, password));\n // Clear Fields\n view.getWelcomePanel().getSignInPanel().clear();\n // Show Home Screen\n refreshHomePanel();\n view.getCardLayoutManager().show(view.getContent(), \"home\");\n } else {\n Object[] options = {\"OK\"};\n JOptionPane.showOptionDialog(this, \"An error occured during sign in, please try again.\", \"Sign In Error\", JOptionPane.OK_OPTION, JOptionPane.ERROR_MESSAGE, null, options, null);\n }\n } else {\n Object[] options = {\"Let me try again\"};\n JOptionPane.showOptionDialog(this, \"The credentials you have provided are invalid, please enter them correctly or create a new account.\", \"Invalid Credentials\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n } else {\n Object[] options = {\"Alright\"};\n JOptionPane.showOptionDialog(this, \"In order to sign in, all fields must be filled out.\", \"Empty Fields\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n }",
"@Override\n public void loginClickedSignUp() {\n startSignInFragment();\n }",
"private void signIn() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"private void signIn() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"private void signIn() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"@Override public void onSignInButtonClicked() {\n mSignInClicked = true;\n mGoogleApiClient.connect();\n }",
"private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, SIGN_IN_CODE);\n }",
"public void clickSignInButton() {\r\n\t\tsignInButton = driver.findElement(signInButtonSelector);\r\n\t\tsignInButton.click();\r\n\t\t\r\n\t}",
"private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n finish();\n }",
"@Override\n public void showSignInScreen() {\n Toast.makeText(this, \"Taking user to the sign in screen\", Toast.LENGTH_SHORT).show();\n }",
"private void signIn() {\n final String email = ((EditText)findViewById(R.id.etSignInEmail)).getText().toString();\n final String password = ((EditText)findViewById(R.id.etSignInPassword)).getText().toString();\n\n mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success\n updateUI();\n } else {\n // Sign in failure\n Toast.makeText(LoginActivity.this, \"Incorrect email and/or password.\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }",
"public SignInPage clickSignin() {\n\t\tclick(SIGNIN_LOCATOR);\n\t\treturn new SignInPage(driver);\n\t\t\n\t}",
"void signInComplete();",
"private void signIn() {\n Utility.showLoader(this);\n mGoogleApiClient.clearDefaultAccountAndReconnect();\n\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"private void signIn() {\n // [START_EXCLUDE silent]\n // [END_EXCLUDE]\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"protected void launchSignIn()\r\n {\r\n \tIntent i = new Intent(this, LoginActivity.class);\r\n \tstartActivity(i);\r\n }",
"public void ClickSignIn() {\n if (lnkSignIn.isDisplayed()) {\n lnkSignIn.click();\n }\n else{System.out.println(\"Sign In link is not displayed\");\n }\n }",
"@OnClick(R.id.email_sign_in_button) public void onLoginClicked() {\n String uname = username.getText().toString();\n String pass = password.getText().toString();\n\n loginForm.clearAnimation();\n\n // Start login\n presenter.doLogin(new AuthCredentials(uname, pass));\n }",
"public void signInUser(){\n Intent intent = new Intent(this, AuthUiActivity.class);\n startActivity(intent);\n }",
"public void onSignInPressed(View view) {\n Intent intent = new Intent(CreateAccountActivity.this, LoginActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n finish();\n }",
"public void onSignInPressed(View view) {\n Intent intent = new Intent(CreateAccountActivity.this, LoginActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n finish();\n }",
"@Override\n\tpublic void onSignInSucceeded() {\n\n\t}",
"private void signIn() {\n mGoogleSignInClient = buildGoogleSignInClient();\n startActivityForResult(mGoogleSignInClient.getSignInIntent(), REQUEST_CODE_SIGN_IN);\n }",
"private void SignIn() {\n startActivity(new Intent(MainActivity.this, HomeScreenActivityFragments.class));\n finish();\n }",
"@Override\n public void getStartedSignUpClicked() {\n\n }",
"private void clickSignOn() {\n\t\tthis.clickElement(signon);\n\t}",
"public void onSignUpClicked() {\n loginView.startSignUpActivity();\n loginView.finishActivity();\n }",
"public void signin() {\n\t\tStage window = new Stage();\n\t\t//Scene scene = new Scene(primarygridpane,400,500);\n\t\tSigninForm signin = new SigninForm();\n\t\tsignin.start(window);\n\t\tsignin.isLogged(this);\n\t}",
"private void userSignIn() {\n GoogleSignInAccount account = GoogleSignIn.getLastSignedInAccount(this);\n if (GoogleSignIn.hasPermissions(account, new Scope(SCOPES))) {\n updateUI(account);\n mAccount = account.getAccount();\n Intent intent = new Intent(this, HomeActivity.class);\n intent.putExtra(ACCOUNT, mAccount);\n startActivity(intent);\n System.out.println(\"Exit Intent !!!!!!!!!!!!!!!!\");\n\n findViewById(R.id.disconnect_button).setVisibility(View.VISIBLE);\n\n } else {\n updateUI(null);\n }\n }",
"private void openSignIn() {\n Intent openSignInActivity = new Intent(this, SignInActivity.class);\n openSignInActivity.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(openSignInActivity);\n }",
"@Override\r\n public void onSign(SignEvent event){\n if (event.getAction().equals(SignEvent.Action.SIGNED_IN)) {\r\n //write cookies if keep signed in\r\n if (event.getAccountKey() != null && !event.getAccountKey().isEmpty()) {\r\n cookie.setAccountKey(Shared.MY_SESSION, event.getAccountKey());\r\n }\r\n //already signed in, load workspace\r\n RootPanel.get().clear();\r\n Widget workspace = new Workspace().asWidget();\r\n RootPanel.get().add(workspace); \r\n Info.display(\"Welcome\", \"Signed in as \" + Shared.MY_SESSION.getAccount().getFullName());\r\n }\r\n //process sign_out\r\n if (event.getAction().equals(SignEvent.Action.SIGN_OUT)){\r\n String accountKey = cookie.getAccountKey(Shared.MY_SESSION);\r\n Shared.RPC.signOutAndDetachSession(Shared.MY_SESSION, accountKey, new AsyncCallback<Session>() {\r\n @Override\r\n public void onSuccess(Session s) {\r\n if (s != null) {\r\n Shared.MY_SESSION = s;\r\n //sign out seems OK on server side, dispatch SIGNED_OUT event\r\n Shared.EVENT_BUS.fireEvent(new SignEvent(SignEvent.Action.SIGNED_OUT)); //WARN: don't dispatch SIGN_OUT avoiding deadlock call\r\n } else {\r\n Info.display(\"Error\", \"Account is already signed out or database error\");\r\n }\r\n }\r\n\r\n @Override\r\n public void onFailure(Throwable caught) {\r\n Info.display(\"Error\", caught.getMessage());\r\n }\r\n });\r\n }\r\n //process signed_out\r\n if (event.getAction().equals(SignEvent.Action.SIGNED_OUT)){\r\n //delete cookies\r\n cookie.discardCookie(Shared.MY_SESSION); \r\n //return UI to welcome status\r\n RootPanel.get().clear();\r\n RootPanel.get().add(new LoginPage()); \r\n Info.display(\"See you\", \"You are now signed out!\");\r\n }\r\n }",
"public void clickIconSignin()\n\t{\n \telementUtils.performElementClick(wbIconSignin); //wbIconSignin.click();\n\t}",
"public interface OnSignInButtonClickedListener {\n // TODO: Update argument type and name\n void onSignInButtonClicked(String userEmail, String userPassword);\n }",
"public void signInPage(Report signInReport) {\n\t\twaitForElementToBeClickable(\"id\", skipSignInButton,signInReport);\n\t\tsignInReport.passReporting(\"Login Page is displayed\");\n\t\tclick(\"id\", skipSignInButton, signInReport);\n\t}",
"@Override\n public void onRegistrationAccomplished() {\n Prefs.setSignedIn(true);\n // Proceed to Main\n proceedToMainActivityAndFinish();\n }",
"private void startSignIn() {\n Intent intent = AuthUI.getInstance().createSignInIntentBuilder()\n .setIsSmartLockEnabled(!BuildConfig.DEBUG)\n .setAvailableProviders(Arrays.asList(\n new AuthUI.IdpConfig.EmailBuilder().build(),\n new AuthUI.IdpConfig.GoogleBuilder().build()))\n .setLogo(R.mipmap.ic_launcher)\n .build();\n\n startActivityForResult(intent, RC_SIGN_IN);\n }",
"public void clickSignInLink()\n\t{\n \telementUtils.performElementClick(wbSignInLink);\n\t}",
"private void startSignIn() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"public void onClick(View v) {\n //find view\n Log.e(LOG_TAG, \"sign in\");\n switch (v.getId()) {\n //sign in button pressed\n case R.id.signin:\n Log.e(LOG_TAG, \"sign in\");\n //take user to twitter authentication web page to allow app access to their twitter account\n String authURL = emyRequestToken.getAuthenticationURL();\n Log.v(LOG_TAG, authURL);\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(authURL)));\n break;\n //other listeners here\n\n default:\n break;\n }\n }",
"private void signIn() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n\n // Build a GoogleSignInClient with the options specified by gso.\n GoogleSignInClient mGoogleSignInClient = GoogleSignIn.getClient(getActivity(), gso);\n\n // Starting the intent prompts the user to select a Google account to sign in with\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"private void startSignIn() {\n\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RES_CODE_SIGN_IN);\n }",
"public ReceptionistSingIn() {\n initComponents();\n setVisible(true);\n setResizable(false);\n setTitle(\"Receptionist Sign In\");\n setLocationRelativeTo(null);\n }",
"private void openSigninActivity() {\n Intent intent = new Intent(this, FaceDetectionActivity.class);\n intent.putExtra(\"IS_FROM_LOGIN\", true);\n startActivityForResult(intent, LOGIN_REQUEST);\n }",
"public void onClick(View view) {\n switch (view.getId()) {\n case R.id.sign_in:\n if (hasInternetConnection()) {\n serverInterface = new ServerInterface();\n serverInterface.getAuthActivityAndTypedData(this, emailTyped, passwordTyped);\n serverInterface.followingFunction = Functions.AUTHENTIFIER;\n serverInterface.execute(\"\");\n signIn.setEnabled(false);\n }\n else {\n break;\n }\n break;\n default:\n break;\n }\n }",
"@Override\n public void getStartedClicked() {\n startSignUpFragment();\n\n }",
"public void signInActionButtonOnClick(View v) {\n EditText usernameField = findViewById(R.id.sign_in_username);\n EditText passwordField = findViewById(R.id.sign_in_password);\n\n if (new UserFieldValidator(fields).validateSignInFields(this)) {\n String username = usernameField.getText().toString();\n String password = passwordField.getText().toString();\n Map<String, String> users = getUsers();\n if (users != null && users.containsKey(username) && users.get(username).equals(password)) {\n Intent tmp = new Intent(this, GameCentreActivity.class);\n tmp.putExtra(\"user\", username);\n startActivity(tmp);\n } else {\n Toast.makeText(this, R.string.sign_in_incorrect, Toast.LENGTH_SHORT).show();\n }\n }\n }",
"@Override\n public void onAuthenticationSuccessful() {\n startActivity(new Intent(PinViewActivity.this, AuthenticatedActivity.class));\n finish();\n }",
"public void signIn()\r\n {\r\n FoodCenterRequestFactory factory = AndroidRequestUtils.getFoodCenterRF(context);\r\n ClientServiceRequest service = factory.getClientService();\r\n\r\n service.login(regId).fire(this);\r\n }",
"private void signIn(){\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n GoogleSignInClient mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, Constants.RC_SIGN_IN);\n\n }",
"void onSignOutButtonClicked();",
"@Override\n public void onSignInSucceeded() {\n\n if (ACCESS_ACHIEVEMENT) {\n\n //if we just came from achievements button and are now signed in, display ui\n displayAchievementUI();\n\n //flag back false\n ACCESS_ACHIEVEMENT = false;\n }\n\n //don't bypass auto login\n BYPASS_LOGIN = false;\n }",
"private void signInFeature() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this, this)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n\n Button signInButton = (Button) findViewById(R.id.login_button);\n signInButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n signIn();\n }\n });\n }",
"public void signIn(View view) {\n\n //retrieve the elements containing email and pass input\n EditText emailEle = findViewById(R.id.email);\n EditText passwordEle = findViewById(R.id.pass);\n //retrieve the input\n String emailInput = emailEle.getText().toString();\n String passwordInput = passwordEle.getText().toString();\n\n //attempt to authenticate with the input. if we did, go to doctors list page\n email = emailInput;\n\n //verify that there is input.\n if(email.equals(\"\") || passwordInput.equals(\"\")) {\n Toast.makeText(getApplicationContext(), \"Please input your username and password.\", Toast.LENGTH_SHORT)\n .show();\n return;\n }\n\n auth(emailInput, passwordInput);\n }",
"@Override\n public void onSignUpClicked()\n {\n startActivity(new Intent(context, SignUpActivity.class));\n }",
"public HomePage clickOnSignInButton() {\n driver.findElement(signInButton).submit();\n\n // Return a new page object representing the destination. Should the login page\n // ever\n // go somewhere else (for example, a legal disclaimer) then changing the method\n // signature\n // for this method will mean that all tests that rely on this behaviour won't\n // compile.\n return new HomePage(driver);\n }",
"@Override\n public void onSignUpBtnClick() {\n }",
"@Override\n public void onLoginButtonClick(String email, String password) {\n AGConnectAuthCredential credential = EmailAuthProvider.credentialWithPassword(email, password);\n AGConnectAuth.getInstance().signIn(credential)\n .addOnSuccessListener(signInResult -> onLoginCorrect())\n .addOnFailureListener(e -> Toast.makeText(MainActivity.this, \"Bad credentials\", Toast.LENGTH_LONG).show());\n }",
"private void signIn()\n {\n Intent intent = Auth.GoogleSignInApi.getSignInIntent(googleApiClient);\n // If user was already signed in earlier, log them out first\n if(signOutCode != 0)\n {\n signOut();\n }\n\n // Runtime permission for locations and network\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n ActivityCompat.requestPermissions(MainActivity.this, new String[]{\n android.Manifest.permission.INTERNET,\n android.Manifest.permission.ACCESS_COARSE_LOCATION,\n android.Manifest.permission.ACCESS_FINE_LOCATION,\n android.Manifest.permission.ACCESS_NETWORK_STATE,\n android.Manifest.permission.SYSTEM_ALERT_WINDOW,\n android.Manifest.permission.WRITE_EXTERNAL_STORAGE\n\n }, PERMISSION);\n }\n startActivityForResult(intent, IntentConstants.INTENT_GOOGLE_REQUEST_CODE);\n\n }",
"@Override\n public void onClick(View v) {\n openLogIn();\n\n }",
"public GitHubSignInPage openSignInPage() {\n\t\tsignInBtn = driver.findElement(By.linkText(SIGNIN_BTN_ID));\n\t\tsignInBtn.click();\n\t\tSystem.out.println(\"Navigating to signin page...\");\n\n\t\treturn new GitHubSignInPage(driver);\n\t}",
"private void signIn(String email, String password){\n\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n FirebaseUser user = mAuth.getCurrentUser();\n updateUI(user.toString());\n accountEmail = user.getEmail();\n } else {\n // If sign in fails, display a message to the user.\n updateUI(\"Authentication failed\");\n }\n\n }\n });\n\n }",
"boolean isSignedIn();",
"public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_signin);\n\n Button signinButton = findViewById(R.id.button1);\n signinButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n }\n });\n\n }",
"public void signIn(String email, String password) {\n\n // Validate the form, make sure that fields are filled in\n if (!validateForm()) {\n return;\n }\n\n loginBtn.setEnabled(false);\n startLoadAnim(getString(R.string.logging_in));\n\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"signInWithEmail:onComplete:\" + task.isSuccessful());\n\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n if (!task.isSuccessful()) {\n Log.w(TAG, \"signInWithEmail:failed\", task.getException());\n Toast.makeText(LoginActivity.this, R.string.auth_failed, Toast.LENGTH_SHORT).show();\n stopLoadAnim();\n loginBtn.setEnabled(true);\n }\n\n }\n });\n }",
"@Override\n public void onClick(View v) {\n Intent intent = new Intent(SignUpActivity.this, SignInActivity.class);\n startActivity(intent);\n }",
"@OnClick(R.id.buttonSignUp)\n void signUp()\n {\n if (from.equals(Keys.FROM_FIND_JOB)) {\n Intent intent = new Intent(this, LoginSignUpSeekerActivity.class);\n intent.putExtra(Keys.CLICKED_EVENT, Keys.CLICKED_EVENT_SIGNUP);\n startActivity(intent);\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n } else {\n Intent intent = new Intent(this, LoginSignUpRecruiterActivity.class);\n intent.putExtra(Keys.CLICKED_EVENT, Keys.CLICKED_EVENT_SIGNUP);\n startActivity(intent);\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n }\n }",
"@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tToast.makeText(getApplicationContext(), \"Please Sign in to continue.\", Toast.LENGTH_SHORT).show();\n\t\t\t}",
"@Override\n protected void onPlusClientSignIn() {\n Button signOutButton = (Button) findViewById(R.id.plus_sign_out_button);\n signOutButton.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View view) {\n signOut();\n }\n });\n Button disconnectButton = (Button) findViewById(R.id.plus_disconnect_button);\n disconnectButton.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View view) {\n revokeAccess();\n }\n });\n }",
"public void user_signin()\r\n\t{\r\n\t\t\r\n\t\tdriver.findElement(By.id(\"email\")).clear();\r\n\t\tdriver.findElement(By.id(\"email\")).sendKeys(UID);\r\n\t\t\r\n\t\tdriver.findElement(By.id(\"pass\")).clear();\r\n\t\tdriver.findElement(By.id(\"pass\")).sendKeys(PWD);\r\n\t}",
"@And(\"^I click the signin button$\")\n public void iClickTheSigninButton() throws Throwable {\n }",
"void showSignInInterstitial();",
"private void onSignInResult(FirebaseAuthUIAuthenticationResult result) {\n IdpResponse response = result.getIdpResponse();\n if (result.getResultCode() == RESULT_OK) {\n // Successfully signed in\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n // ...\n } else {\n // Sign in failed. If response is null the user canceled the\n // sign-in flow using the back button. Otherwise check\n // response.getError().getErrorCode() and handle the error.\n // ...\n }\n }",
"@Override\n public void onClick(View v) {\n Intent i = new Intent(UserProfile.this, SignInActivity.class);\n startActivity(i);\n }",
"private void setupLoginButton() {\n findViewById(R.id.loginActivityLoginButton).setOnClickListener(view -> {\n switch (\n this.loginController.verifyUserCredentials(\n ((TextView)findViewById(R.id.loginActivityEmailInput)).getText().toString().trim(),\n ((TextView)findViewById(R.id.loginActivityPasswordInput)).getText().toString().trim()\n )){\n case CORRECT_CREDENTIALS:\n Intent intent = new Intent(LoginActivity.this, MusicMatch.class);\n startActivity(intent);\n break;\n case INCORRECT_CREDENTIALS:\n Toast.makeText(getApplicationContext(), \"Error: Invalid Credentials\", Toast.LENGTH_LONG).show();\n break;\n default:\n Toast.makeText(getApplicationContext(), \"Network unavailable please try again later\", Toast.LENGTH_LONG).show();\n break;\n }\n });\n }",
"@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tToast.makeText(getApplicationContext(), \"Please Sign in to continue.\", Toast.LENGTH_SHORT).show();\n\n\t\t\t}",
"public void goToLoginPage()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignInLink();\n\t}",
"@Override\n public void onSuccess(SignInResult signInResult) {\n intentLogin(mailPhone);\n }",
"@Override\n public void onSuccess(SignInResult signInResult) {\n intentLogin(mailPhone);\n }",
"@Override\n public void onClick(View view) {\n Intent intent = googleSignInClient.getSignInIntent();\n //Start activity for result\n startActivityForResult(intent, 100);\n }",
"public Result showSignIn() {\n if (customerService().isLoggedIn()) {\n customerService().logout();\n }\n return ok(loginView.render(data().build(), logInForm));\n }",
"@Override\n public void onClick(View view) {\n SharedPreferences sharedPreferences = getSharedPreferences(USERNAME_KEY, MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(username_key, null);\n editor.putString(password_key, null);\n editor.putString(email_key, null);\n editor.apply();\n\n //pindah ke signin activity\n Intent intent = new Intent(ProfilActivity.this, SigninActivity.class);\n startActivity(intent);\n finish();\n }",
"@Override\n\tpublic int signIn(Attendance attendance) {\n\t\treturn attendanceMapper.signIn(attendance);\n\t}",
"private void signupOnClickFunctionality(){\n final TextView tvSign = findViewById(R.id.sign);\n tvSign.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n Intent intent2 = new Intent(getApplicationContext(), signUp.class);\n startActivity(intent2);\n finish();\n }\n });\n }",
"private void signIn(String email, String password){\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n FirebaseUser user = mAuth.getCurrentUser();\n textViewStatus.setText(\"Signed In\");\n } else {\n // If sign in fails, display a message to the user.\n Toast.makeText(MainActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n textViewStatus.setText(\"Signed Out\");\n }\n\n // ...\n }\n });\n }",
"public void loginClicked(View view) {\n setContentView(R.layout.activity_scanner);\n System.out.println(\"log in clicked\");\n }",
"public void setSignInNumber(Byte signInNumber) {\n this.signInNumber = signInNumber;\n }",
"public void signUpClicked(View view) {\n setContentView(R.layout.activity_register);\n System.out.println(\"sign up clicked\");\n }"
]
| [
"0.8066629",
"0.8021318",
"0.7697562",
"0.7695432",
"0.75026095",
"0.7478024",
"0.7356116",
"0.7329751",
"0.7294199",
"0.7223605",
"0.7195281",
"0.7172703",
"0.71537536",
"0.71537536",
"0.71537536",
"0.7115537",
"0.710026",
"0.710026",
"0.710026",
"0.710026",
"0.70938903",
"0.70767844",
"0.7051566",
"0.7038254",
"0.70331043",
"0.7021712",
"0.701555",
"0.7001822",
"0.6994164",
"0.6929161",
"0.6868548",
"0.68666434",
"0.6856772",
"0.6833516",
"0.6833516",
"0.6820194",
"0.6810648",
"0.6801548",
"0.6767711",
"0.67444927",
"0.6675555",
"0.6672194",
"0.66336644",
"0.6612902",
"0.65765494",
"0.6574305",
"0.657216",
"0.6520702",
"0.6500196",
"0.6491083",
"0.64802873",
"0.646304",
"0.64575434",
"0.64569473",
"0.6445751",
"0.64447504",
"0.64378405",
"0.6386863",
"0.63867575",
"0.6383132",
"0.6375967",
"0.637073",
"0.63584965",
"0.63481325",
"0.6341692",
"0.6334772",
"0.6320452",
"0.63082534",
"0.629029",
"0.62784773",
"0.62690383",
"0.62465316",
"0.62291175",
"0.62281513",
"0.62280744",
"0.62247556",
"0.6224445",
"0.6218242",
"0.62066203",
"0.6201706",
"0.61944073",
"0.61870414",
"0.6179121",
"0.6175731",
"0.6174667",
"0.6171034",
"0.6168135",
"0.61637527",
"0.6135802",
"0.6115099",
"0.60879177",
"0.60879177",
"0.60793996",
"0.60734206",
"0.6072187",
"0.60703087",
"0.6063937",
"0.60595125",
"0.60577977",
"0.6055804",
"0.60538566"
]
| 0.0 | -1 |
Called when the user taps the Sign UP button | public void signUP(View view) {
// Do something in response to button
Intent intent = new Intent(MainActivity.this, SignUpActivity.class);
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onSignUpClicked() {\n loginView.startSignUpActivity();\n loginView.finishActivity();\n }",
"@Override\n public void onSignUpBtnClick() {\n }",
"@Override\n public void onClick(View v) {\n signUp();\n }",
"public void signUpClicked(View view) {\n setContentView(R.layout.activity_register);\n System.out.println(\"sign up clicked\");\n }",
"public void onSignUpClick() {\n\t\tString uid = regview.getUsername();\n\t\tString pw = regview.getPassword();\n\t\tString na = regview.getName();\n\t\tString em = regview.getEmail();\n\t\tString text = \"\";\n\t\tif(uid.equals(\"\") || pw.equals(\"\") || na.equals(\"\")|| em.equals(\"\")){\n\t\t\ttext = \"Please fill out all fields!\";\n\t\t} else if(regview.findUser(uid)!=User.NULL_USER){\n\t\t\ttext = \"The username already exsit, please try another one!\";\n\t\t} else {\n\t\t\tregview.addUser(new User(uid,pw,na,em));\n\t\t\tregview.goLoginPage();\n\t\t}\n\t\tregview.setRegisterText(text);\n\t}",
"private void onSignUpPressed(View view) {\n Intent intent = new Intent(LoginActivity.this, CreateAccountActivity.class);\n startActivity(intent);\n }",
"@Override\n public void onSignUpClicked()\n {\n startActivity(new Intent(context, SignUpActivity.class));\n }",
"@Override\n public void getStartedSignUpClicked() {\n\n }",
"public void signupPressed(View view) {\n startActivity(new Intent(this, Signup.class));\n }",
"public void signUp() {\n presenter.signup(username.getText().toString(), password.getText().toString());\n }",
"private void signupOnClickFunctionality(){\n final TextView tvSign = findViewById(R.id.sign);\n tvSign.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n Intent intent2 = new Intent(getApplicationContext(), signUp.class);\n startActivity(intent2);\n finish();\n }\n });\n }",
"@Override\n\t\tpublic void onClick(View v) {\n\t\t\tlaunchSignUpDialog();\n\t\t}",
"@OnClick(R.id.buttonSignUp)\n void signUp()\n {\n if (from.equals(Keys.FROM_FIND_JOB)) {\n Intent intent = new Intent(this, LoginSignUpSeekerActivity.class);\n intent.putExtra(Keys.CLICKED_EVENT, Keys.CLICKED_EVENT_SIGNUP);\n startActivity(intent);\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n } else {\n Intent intent = new Intent(this, LoginSignUpRecruiterActivity.class);\n intent.putExtra(Keys.CLICKED_EVENT, Keys.CLICKED_EVENT_SIGNUP);\n startActivity(intent);\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n }\n }",
"@Override\n public void onClick(View view) {\n loadSignUpView();\n }",
"@Override\n public void loginClickedSignUp() {\n startSignInFragment();\n }",
"@Override\n public void onClick(View view) {\n final String username = usernameInput.getText().toString();\n final String password = passwordInput.getText().toString();\n final String email = emailInput.getText().toString();\n final String handle = handleInput.getText().toString();\n signup(username, password, email, handle);\n }",
"public void signUp(View view) {\r\n\t\tIntent intent = new Intent(this, SignupActivity.class);\r\n\t\tstartActivity(intent);\r\n\t}",
"private void signUpActivity() {\n mSignUpButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent registerActivity = new Intent(LoginActivity.this, RegisterActivity.class);\n startActivity(registerActivity);\n }\n });\n }",
"void onSignInButtonClicked();",
"public void onClickSignUp(View view) {\r\n\t\tcheckRegistationValidation();\r\n\t}",
"public void signUp(View v) {\n attemptRegistration();\n }",
"public void signUp(View v){\n Toast.makeText(this,\"Signing up\", Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(MainActivity.this, SignUpActivity.class);\n startActivity(intent);\n }",
"public void onSignupClick(MouseEvent e){signup();}",
"@Override\n\tpublic void gotoSignUp() {\n\t\tgetFragmentManager().beginTransaction()\n\t\t\t\t.replace(R.id.container, new SignUpFragment(), \"signup\")\n\t\t\t\t.commit();\n\n\t}",
"@Override\r\n public void onClick(View view) {\r\n switch (view.getId()){\r\n case R.id.Signup:\r\n\r\n registerUser();\r\n\r\n break;\r\n }\r\n }",
"public void signup(View view) {\n Intent intent = new Intent(this, SignupActivity.class);\n startActivity(intent);\n }",
"public void onSignupClickedListener(View view) {\n\n Intent intent = new Intent(this, PersonalAccountActivity.class);\n startActivity(intent);\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(getApplicationContext(), Signup.class);\n\t\t\t\tstartActivity(i);\n\n\n\t\t\t}",
"private void signUp() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(email, password, true);\n mAuthTask.execute((Void) null);\n }\n }",
"private void onSignupSuccess() {\n startActivity(currentActivity, UserLoginActivity.class);\n finish();\n }",
"private void initSignUpButton() {\n TextButton signUpButton = new TextButton(\"Sign up\", skin);\n signUpButton.setPosition(320, 125);\n signUpButton.addListener(new InputListener() {\n @Override\n public void touchUp(InputEvent event, float x, float y, int pointer, int button) {\n AuthService authService = new AuthService();\n RegistrationResponse response\n = authService.register(usernameField.getText(), passwordField.getText());\n switch (response) {\n case OCCUPIED_NAME:\n usernameTakenDialog();\n break;\n case SHORT_PASSWORD:\n passwordTooShortDialog();\n break;\n case SUCCESS:\n stateManager.setState(new LoginState(stateManager));\n break;\n default:\n }\n }\n\n @Override\n public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {\n System.out.println(\"pressed sign up\");\n return true;\n }\n });\n stage.addActor(signUpButton);\n }",
"@Override\n public void onClick(View v) {\n setFragment(new SignUpFragment());\n }",
"@FXML protected void handleSignUpButtonAction() {\n \tboolean bexit = false;\n \tif(passwordField.getText().equals(passwordField2.getText()))\n \t{\n \t\t\n \t\tString signUpUsername = username.getText();\n \t\tString signUpPassword = passwordField.getText();\n \t\t\n if(username.getText().toString().length() >= 6 && passwordField.getText().toString().length() >= 6)\n {\n\t \t\tUser user = new User(signUpUsername, \"Unknown\", null, \"Unknown\", signUpPassword);\n\t \t\t\n\t \t\ttry {\n\t\t\t\t\tuser = client.createUser(user);\n\t \t\t\n\t \t\t} catch (WebApplicationException e) {\n\t \t\t\tLOGGER.log(Level.SEVERE, e.toString(), e);\n\t \t\t\tif (e.getResponse().getStatus() == 409) {\n\t \t\t\t\tactiontarget.setText(\"Sign up error: Username already exists\");\n\t \t\t\t} else {\n\t \t\t\t\t\n\t \t\t\t}\n\t \t\t\t\n\t \t\t} catch (JsonProcessingException e) {\n\t \t\t\tLOGGER.log(Level.SEVERE, e.toString(), e);\n\t\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLOGGER.log(Level.SEVERE, e.toString(), e);\n\t\t\t\t}\n\t \t\t\n\t \t\t// Go back to Login view\n\t \t\t\n\t \t\tLoginVistaNavigator.loadVista(LoginVistaNavigator.LOGIN);\n }\n else\n {\n \tactiontarget.setText(\"username/password \\nlength must be 6 number\");\n }\n \t}\n \telse\n \t{\n \t\tactiontarget.setText(\"password not consistent.\");\n \t}\n }",
"public void launchSignUpPage() {\n Intent intent = new Intent(LoginActivity.this, SignupActivity.class);\n startActivity(intent);\n }",
"public void defaultSignUpPressed(View view) {\n SignUpFragment signUpFragment = new SignUpFragment();\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n\n // Replace the default login fragment with the sign up fragment,\n // and add the transaction to the back stack so the user can navigate back\n fragmentTransaction.replace(R.id.LoginActivity_fragment_container, signUpFragment);\n fragmentTransaction.addToBackStack(null);\n fragmentTransaction.commit();\n }",
"@Override\n public void onClick(View v) {\n Intent intent = new Intent(SignUpActivity.this, SignInActivity.class);\n startActivity(intent);\n }",
"@Override\n public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), SignupActivity.class);\n startActivity(intent);\n }",
"@Override\n public void getStartedClicked() {\n startSignUpFragment();\n\n }",
"@Override\n public void onSignUpClicked(String username, String password) {\n \tFragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n \ttransaction.replace(fragmentContainer, new ParseSignupFragment());\n \ttransaction.addToBackStack(null);\n \ttransaction.commit();\n }",
"@Override\n public void onClick(View view) {\n registerUser();\n }",
"@Override\n public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), signup.class);\n startActivityForResult(intent, REQUEST_SIGNUP);\n }",
"@Override\n public void onSignInClicked() {\n Prefs.setSignedIn(true);\n // Proceed to Main and finish\n proceedToMainActivityAndFinish();\n }",
"private void checkToSignup() {\n toolbar.setTitle(R.string.about);\n Intent intent = new Intent(this, SigninActivity.class);\n startActivityForResult(intent, ConstantValue.SIGN_UP_CODE);\n }",
"private void attemptSignup()\n\t{\n\t\t// Reset errors.\n\t\tmEmailView.setError(null);\n\t\tmPasswordView.setError(null);\n\n\t\t_signupButton.setEnabled(false);\n\n\t\t// Store values at the time of the login attempt.\n\t\tfinal String displayName = mNameView.getText().toString();\n\t\tString email = mEmailView.getText().toString();\n\t\tString password = mPasswordView.getText().toString();\n\n\t\tboolean cancel = false;\n\t\tView focusView = null;\n\n\t\t// Check for a valid password, if the user entered one.\n\t\tif (TextUtils.isEmpty(password))\n\t\t{\n\t\t\tmPasswordView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mPasswordView;\n\t\t\tcancel = true;\n\t\t}\n\t\telse if (!isPasswordValid(password))\n\t\t{\n\t\t\tmPasswordView.setError(getString(R.string.error_invalid_password));\n\t\t\tfocusView = mPasswordView;\n\t\t\tcancel = true;\n\t\t}\n\n\t\t// Check for a valid email address.\n\t\tif (TextUtils.isEmpty(email))\n\t\t{\n\t\t\tmEmailView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mEmailView;\n\t\t\tcancel = true;\n\t\t}\n\t\telse if (!isEmailFormatValid(email))\n\t\t{\n\t\t\tmEmailView.setError(getString(R.string.error_invalid_email));\n\t\t\tfocusView = mEmailView;\n\t\t\tcancel = true;\n\t\t}\n\n\t\t//Check for a valid display name\n\t\tif (displayName.isEmpty())\n\t\t{\n\t\t\tmNameView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mNameView;\n\t\t\tcancel = true;\n\t\t}\n\n\t\tif (cancel)\n\t\t{\n\t\t\t// There was an error; don't attempt login and focus the first\n\t\t\t// form field with an error.\n\t\t\tfocusView.requestFocus();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//[START init_progress_dialog]\n\t\t\tfinal ProgressDialog progressDialog = new ProgressDialog(SignupPersonalActivity.this,\n\t\t\t\t\tR.style.AppTheme_Dark_Dialog);\n\t\t\tprogressDialog.setIndeterminate(true);\n\t\t\tprogressDialog.setMessage(\"Creating Account...\");\n\t\t\tprogressDialog.show();\n\t\t\t//[END init_progress_dialog]\n\t\t\tmAuth.createUserWithEmailAndPassword(email, password)\n\t\t\t\t\t.addOnCompleteListener(this, new OnCompleteListener<AuthResult>()\n\t\t\t\t\t{\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onComplete(@NonNull Task<AuthResult> task)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (task.isSuccessful())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tonSignUpSuccess(displayName);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tonSignUpFailed();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// [START_EXCLUDE]\n\t\t\t\t\t\t\tprogressDialog.dismiss();\n\t\t\t\t\t\t\t// [END_EXCLUDE]\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t}\n\t}",
"void onSignInButtonClicked(String userEmail, String userPassword);",
"public void signUp(View view) {\n InputMethodManager imm = (InputMethodManager) view.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n boolean emailValid = isValidEmail(edtEmail);\n boolean pwdValid = isValidPassword(edtPaswd);\n boolean unameValid = isValidUsername(edtDisplayName);\n\n if (!unameValid) {\n edtDisplayName.requestFocus();\n } else if (!emailValid) {\n edtEmail.requestFocus();\n } else if (!pwdValid) {\n edtPaswd.requestFocus();\n }\n\n if (emailValid && pwdValid) {\n register();\n }\n }",
"public void signup(){\n\t\tboolean result = SignUpForm.display(\"Chocolate Chiptunes - Sign Up\", \"Sign-Up Form\");\n\t\tSystem.out.println(result);\n\t}",
"public void attemptSighup(View view) {\n //Start AsyncTask for signup\n new SignUpCreatorTask().execute(\"\");\n }",
"public void newUserClicked(View view) {\r\n Intent intent = new Intent(this, SignUpActivity.class);\r\n startActivity(intent);\r\n }",
"private void signUpEvt() {\n String emailRegex = \"(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\\\"(?:[\\\\x01-\\\\x08\\\\x0b\\\\x0c\\\\x0e-\\\\x1f\\\\x21\\\\x23-\\\\x5b\\\\x5d-\\\\x7f]|\\\\\\\\[\\\\x01-\\\\x09\\\\x0b\\\\x0c\\\\x0e-\\\\x7f])*\\\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\\\x01-\\\\x08\\\\x0b\\\\x0c\\\\x0e-\\\\x1f\\\\x21-\\\\x5a\\\\x53-\\\\x7f]|\\\\\\\\[\\\\x01-\\\\x09\\\\x0b\\\\x0c\\\\x0e-\\\\x7f])+)\\\\])\";\n // Get User Details\n String fullname = this.view.getWelcomePanel().getSignUpPanel().getFullnameText().getText().trim();\n String email = this.view.getWelcomePanel().getSignUpPanel().getEmailText().getText().trim();\n String password = new String(this.view.getWelcomePanel().getSignUpPanel().getPasswordText().getPassword()).trim();\n\n if (!fullname.equals(\"\") && !email.equals(\"\") && !password.equals(\"\")) {\n if (email.matches(emailRegex)) {\n if (model.getSudokuDB().registerUser(fullname, email, password)) {\n view.getWelcomePanel().getCardLayoutManager().next(view.getWelcomePanel().getSlider());\n // Clear Fields\n view.getWelcomePanel().getSignUpPanel().clear();\n Object[] options = {\"OK\"};\n JOptionPane.showOptionDialog(this, \"Your registration was successful!\\n You can now sign in to your account.\", \"Successful Registration\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n } else {\n Object[] options = {\"Let me try again\"};\n JOptionPane.showOptionDialog(this, \"Your registration was unsuccessful!\\nBe sure not to create a duplicate account.\", \"Unsuccessful Registration\", JOptionPane.OK_OPTION, JOptionPane.ERROR_MESSAGE, null, options, null);\n }\n } else {\n // Email doesn't meet requirement\n Object[] options = {\"I will correct that\"};\n JOptionPane.showOptionDialog(this, \"You must provide a valid email address.\", \"Invalid Email Address\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n } else {\n // Empty Fields\n Object[] options = {\"Alright\"};\n JOptionPane.showOptionDialog(this, \"In order to register, all fields must be filled out.\", \"Empty Fields\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n }",
"public void onClick_AGSU_signUp(View view) {\n AnimationTools.startLoadingAnimation(Constants.ANIMATION_CODE_AGSU_LOADING, this, signUpButton_rootLayout, R.style.AGSU_loading_progress_bar);\n\n FirestoreManager.saveUserData(SecondarySignUpManager.getDatabaseUser());\n\n //add a password-email auth method\n AuthCredential credential = EmailAuthProvider.getCredential(SecondarySignUpManager.getDatabaseUser().getEmail(), SecondarySignUpManager.getDatabaseUser().getPassword());\n AuthenticationManager.getCurrentUser().linkWithCredential(credential).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()) {\n System.out.println(\"[Neuron.SecondarySignUpActivity.onClick_AGSU_signUp]: link with email credential SUCCESSFUL! User uid = \" + task.getResult().getUser().getDisplayName());\n Constants.isSignUpInProcess = false; //sign up is now finished\n\n //in AGSU user is always new --> send verification email\n EmailVerification.sendVerificationEmail();\n\n Constants.isSecondarySignUpInProcess = false; //end of secondary sign up process\n\n ActivityTools.startNewActivity(activityContext, MainActivity.class);\n } else {\n System.err.println(\"[Neuron.SecondarySignUpActivity.onClick_AGSU_signUp]: ERROR: link with email credential FAILED! \" + task.getException().getMessage());\n }\n\n AnimationTools.stopLoadingAnimation(Constants.ANIMATION_CODE_AGSU_LOADING);\n }\n });\n\n }",
"@Override\n public void onClick(View view) {\n registerUser();\n\n\n }",
"private void attemptSignUp() {\n // Reset errors.\n mName.setError(null);\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(mName.getText().toString())) {\n mName.setError(getString(R.string.error_field_required));\n focusView = mName;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n SQLiteDatabase database = DBHelper.getInstance(this).getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(DBHelper.U_NAME, mName.getText().toString());\n values.put(DBHelper.U_EMAIL, email);\n values.put(DBHelper.U_IMAGE, profileImage);\n values.put(DBHelper.U_PASSWORD, password);\n database.insert(DBHelper.TUSER, null, values);\n database.close();\n\n UserModel userData = new UserModel();\n userData.setId(0);\n userData.setName(mName.getText().toString());\n userData.setImage(profileImage);\n userData.setEmail(email);\n userData.setPassword(password);\n userData.setRememberMe(rememberMe);\n String userDataStr = new Gson().toJson(userData);\n Common.saveStrPref(this, Common.PREF_USER, userDataStr);\n\n startActivity(new Intent(this, HomeActivity.class));\n }\n }",
"public void signupPressed(View view) {\n // fetch the values\n usernameSignup = (EditText) findViewById(R.id.usernameSignupFragment);\n emailSignup = (EditText) findViewById(R.id.emailSignupFragment);\n passwordSignup = (EditText) findViewById(R.id.passwordSignupFragment);\n reenterPasswordSignup = (EditText) findViewById(R.id.reenterPasswordSignupFragment);\n\n String username = usernameSignup.getText().toString();\n String email = emailSignup.getText().toString();\n String password1 = passwordSignup.getText().toString();\n String password2 = reenterPasswordSignup.getText().toString();\n\n // input validation\n if (username.length() == 0) {\n Toast.makeText(getApplicationContext(), \"Please enter a username.\", Toast.LENGTH_SHORT).show();\n } else if (password1.length() == 0) {\n Toast.makeText(getApplicationContext(), \"Please enter a password.\", Toast.LENGTH_SHORT).show();\n } else if (!validatePassword(password1, password2)) {\n Toast.makeText(getApplicationContext(), \"Passwords do not match, try again.\", Toast.LENGTH_SHORT).show();\n } else if (!passwordLongEnough(password1)) {\n Toast.makeText(getApplicationContext(), \"Password too short - must be minimum 8 characters.\", Toast.LENGTH_SHORT).show();\n } else try {\n if (emailAlreadyExists(email)) {\n Toast.makeText(getApplicationContext(), \"Account already exists with this email.\", Toast.LENGTH_SHORT).show();\n } else if (!validateEmail(email)) {\n Toast.makeText(getApplicationContext(), \"Please enter a valid email.\", Toast.LENGTH_SHORT).show();\n } else try {\n if (!usernameAvailable(username)) {\n Toast.makeText(getApplicationContext(), \"Sorry, username already taken.\", Toast.LENGTH_SHORT).show();\n } else {\n // setup a user object with the given attributes, save and enter the app\n final TipperUser user = new TipperUser();\n user.setUsername(username);\n\n // hash password with salt\n String hashed = BCrypt.hashpw(password1, BCrypt.gensalt());\n user.setPassword(hashed);\n\n user.setEmail(email);\n user.setGoogleUser(false);\n user.setFacebookUser(false);\n user.setUuidString();\n\n user.save();\n app.setCurrentUser(user);\n user.pinInBackground();\n Intent intent = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(intent);\n }\n } catch (ParseException e) {\n e.printStackTrace();\n }\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }",
"public void getSignUpButton() {\n mSignUpButton = (Button) mView.findViewById(R.id.accounts_sign_up_btn);\n mSignUpButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n createFirebaseAccountsUI();\n }\n });\n }",
"public void onSignInPressed(View view) {\n Intent intent = new Intent(CreateAccountActivity.this, LoginActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n finish();\n }",
"public void onSignInPressed(View view) {\n Intent intent = new Intent(CreateAccountActivity.this, LoginActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n finish();\n }",
"private void signUp() {\n final String email = ((EditText) findViewById(R.id.etSignUpEmail))\n .getText().toString();\n final String password = ((EditText) findViewById(R.id.etSignUpPassword))\n .getText().toString();\n\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Log.d(\"SIGN_UP_USER\", \"createUserWithEmail:success\");\n sendVerificationEmail(mAuth.getCurrentUser());\n updateUI();\n } else {\n Log.d(\"SIGN_UP_USER\", \"createUserWithEmail:failure\");\n Toast.makeText(LoginActivity.this,\n \"Failed to create a new user.\",\n Toast.LENGTH_LONG).show();\n }\n }\n });\n }",
"public void onSignupSuccess(){\n Toast.makeText(this, \"YEPP\", Toast.LENGTH_SHORT).show();\r\n Intent changetomain = new Intent(RegisterActivity.this, MainAccount.class) ;\r\n startActivity(changetomain);\r\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(SignUpActivity.this, LoginActivity.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\tfinish();\r\n\t\t\t}",
"public void click_SIGN_IN() {\r\n\t\tbtn_SIGN_IN.click();\r\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (!(API.isInternetOn(Register.this))) {\r\n\t\t\t\t\tshowAlert(\"Internet not avialble.\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprogressdialog.setMessage(\"Please wait...\");\r\n\t\t\t\t\tprogressdialog.show();\r\n\t\t\t\t\t// Force user to fill up the form\r\n\t\t\t\t\tif (username.getText().toString().equals(\"\")\r\n\t\t\t\t\t\t\t|| email.getText().toString().equals(\"\")\r\n\t\t\t\t\t\t\t|| password.getText().toString().equals(\"\")\r\n\t\t\t\t\t\t\t|| verifyPassword.getText().toString().equals(\"\")) {\r\n\t\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\t\tshowAlert(\"Please complete the sign up form.\");\r\n\t\t\t\t\t} else if (!(isValidEmail(email.getText().toString()))) {\r\n\t\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\t\tshowAlert(\"Please enter valid email id.\");\r\n\t\t\t\t\t} else if (!(password.getText().toString()\r\n\t\t\t\t\t\t\t.equals(verifyPassword.getText().toString()))) {\r\n\t\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\t\tshowAlert(\"Password did not matched\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Save new user data into Parse.com Data Storage\r\n\t\t\t\t\t\tParseUser user = new ParseUser();\r\n\t\t\t\t\t\tuser.setUsername(username.getText().toString());\r\n\t\t\t\t\t\tuser.setPassword(password.getText().toString());\r\n\t\t\t\t\t\tuser.setEmail(email.getText().toString());\r\n\t\t\t\t\t\tuser.signUpInBackground(new SignUpCallback() {\r\n\t\t\t\t\t\t\tpublic void done(ParseException e) {\r\n\t\t\t\t\t\t\t\tif (e == null) {\r\n\t\t\t\t\t\t\t\t\tAllowUserToLogin(username.getText()\r\n\t\t\t\t\t\t\t\t\t\t\t.toString(), password.getText()\r\n\t\t\t\t\t\t\t\t\t\t\t.toString());\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\t\t\t\t\t\t\"Sign up Error\", Toast.LENGTH_LONG)\r\n\t\t\t\t\t\t\t\t\t\t\t.show();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}",
"@Override\n public void onClick(View v) {\n sendUserToRegisterActivity();\n }",
"public void gotoSignupActivity() {\n Intent intent = new Intent();\n intent.setClass(mContext, SignupActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivityForResult(intent, SIGNUP_ACTIVITY_CODE);\n }",
"@Override\n public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), SignupActivity.class);\n startActivityForResult(intent, REQUEST_SIGNUP);\n\n overridePendingTransition(R.anim.push_left_in, R.anim.push_left_out);\n finish();\n }",
"public void signUp(View view){\n\n Intent intent = new Intent (LogInActivity.this,IntermidiateActivity.class);\n startActivity (intent);\n\n }",
"@Override\n public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), SignupActivity.class);\n intent.putExtra(SignupActivity.EXTRA_TYPEUSER, Constants.flowSignupUser);\n User u = new User(); u.setEmail(text_email.getText().toString()); u.setPassword(text_password.getText().toString());\n intent.putExtra(SignupActivity.LOGIN_PARAMS,u );\n startActivityForResult(intent, Constants.REQUEST_SIGNUP);\n }",
"private void signup() {\n\t\tSignupFragment newFragment = new SignupFragment();\t\t\t\t\t\n\t\t\n\t\t// if the username doesn't exist, load the signup fragment\n\t\tFragmentTransaction transaction = getActivity().getSupportFragmentManager().beginTransaction();\n\n\t\t// Replace whatever is in the fragment_container view with this fragment,\n\t\t// and add the transaction to the back stack so the user can navigate back\n\t\ttransaction.replace(R.id.fragment_container, newFragment);\n\t\ttransaction.addToBackStack(null);\n\n\t\t// Commit the transaction\n\t\ttransaction.commit();\n\t}",
"@Override\n public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), SignupActivity.class);\n startActivityForResult(intent, REQUEST_SIGNUP);\n finish();\n overridePendingTransition(R.anim.push_left_in, R.anim.push_left_out);\n }",
"@Override\n public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), SignupActivity.class);\n startActivityForResult(intent, REQUEST_SIGNUP);\n finish();\n overridePendingTransition(R.anim.push_left_in, R.anim.push_left_out);\n }",
"@Override\n public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), SignupActivity.class);\n startActivityForResult(intent, REQUEST_SIGNUP);\n finish();\n overridePendingTransition(R.anim.push_left_in, R.anim.push_left_out);\n }",
"public AccountPage Signup_through_loginpage() {\n\tJavascriptExecutor js = (JavascriptExecutor)driver;\n\tjs.executeScript( \"arguments[0].click();\", SignUpButton );\n\tsignupPage.SignUp_Form();\n\treturn new AccountPage();\n\t}",
"void onSignOutButtonClicked();",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tString username = etUsername.getText().toString();\n\t\t\t\tString pwd = etPassword.getText().toString();\n\t\t\t\tString pwd1 = etPassword1.getText().toString();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (TextUtils.isEmpty(etUsername.getText())) {\n\t\t\t\t\tToast.makeText(RegisterActivity.this, \"Username cannot be empty!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(TextUtils.isEmpty(etPassword.getText()) || TextUtils.isEmpty(etPassword1.getText())){\n\t\t\t\t\tToast.makeText(RegisterActivity.this, \"Password cannot be empty!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!pwd.equals(pwd1)){\n\t\t\t\t\tToast.makeText(RegisterActivity.this, \"Password should be the same!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tUser user = new User(username, pwd);\n\t\t\t\t\n\t\t\t\tnew Register(user, RegisterActivity.this, new Register.SuccessCallBack() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess() {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tToast.makeText(RegisterActivity.this,\"Sign up successfully!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tstartActivity(new Intent(RegisterActivity.this, LoginActivity.class));\n\t\t\t\t\t}\n\t\t\t\t}, new Register.FailCallBack() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFail() {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tToast.makeText(RegisterActivity.this, \"Username already exists!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tToast.makeText(getApplicationContext(), \"Please Sign in to continue.\", Toast.LENGTH_SHORT).show();\n\t\t\t}",
"@Override\n public void onClick(View v) {\n etSignUpUsername.setText(\"\");\n etSignUpEmail.setText(\"\");\n etSignUpPassword.setText(\"\");\n etContactNumber.setText(\"\");\n //Initialize and launch intent.\n Intent intent = new Intent(RegistrationActivity.this, com.example.annadata.LoginActivity.class);\n startActivity(intent);\n RegistrationActivity.this.finish();\n }",
"public void onSignInClick(MouseEvent e) {\n\t\tsignin();\n\t}",
"@Override\r\n public void onClick(View v) {\n Intent i = new Intent(LoginActivty.this, SignupActivity.class);\r\n startActivity(i);\r\n finish();\r\n\r\n\r\n }",
"private void onSignInClicked() {\n mState.enableConnection();\n mState.mShouldResolve = true;\n mState.mSignInClicked = true;\n mState.connectGoogleGames();\n\n // Show a message to the user that we are signing in.\n status.setText(\"Connecting...\");\n }",
"@Override\n public void showSignInScreen() {\n Toast.makeText(this, \"Taking user to the sign in screen\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onClick(View v) {\n firstNameText = capitalizeFirstLetter(firstNameET.getText().toString());\n lastNameText = capitalizeFirstLetter(lastNameET.getText().toString());\n emailText = (emailET.getText().toString()).toLowerCase();\n passwordText = passwordET.getText().toString();\n reEnterPasswordText = reEnterPasswordET.getText().toString();\n\n // Using the user-inputted information to register the user via this method\n registerUser(firstNameText, lastNameText, emailText, passwordText, reEnterPasswordText);\n }",
"@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tToast.makeText(getApplicationContext(), \"Please Sign in to continue.\", Toast.LENGTH_SHORT).show();\n\n\t\t\t}",
"public void clickSignUpFromATemplate() {\n\t\tselenium.clickByXpath(signUp);\n\t}",
"public void signInActionButtonOnClick(View v) {\n EditText usernameField = findViewById(R.id.sign_in_username);\n EditText passwordField = findViewById(R.id.sign_in_password);\n\n if (new UserFieldValidator(fields).validateSignInFields(this)) {\n String username = usernameField.getText().toString();\n String password = passwordField.getText().toString();\n Map<String, String> users = getUsers();\n if (users != null && users.containsKey(username) && users.get(username).equals(password)) {\n Intent tmp = new Intent(this, GameCentreActivity.class);\n tmp.putExtra(\"user\", username);\n startActivity(tmp);\n } else {\n Toast.makeText(this, R.string.sign_in_incorrect, Toast.LENGTH_SHORT).show();\n }\n }\n }",
"@Override\n public void onClick(View view) {\n regUser();\n }",
"private void attemptSignUp() {\n // Reset errors.\n mEmailView.setError(null);\n mPasswordViewOne.setError(null);\n mPasswordViewTwo.setError(null);\n\n // Store values at the time of the login attempt.\n final String email = mEmailView.getText().toString();\n final String password = mPasswordViewOne.getText().toString();\n final String passwordTwo = mPasswordViewTwo.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n mPasswordViewOne.setError(getString(R.string.error_field_required));\n focusView = mPasswordViewOne;\n cancel = true;\n } else if (!isPasswordValid(password)) {\n mPasswordViewOne.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordViewOne;\n cancel = true;\n }\n\n // Check for matching password\n if (!password.equals(passwordTwo)) {\n mPasswordViewOne.setError(\"Passwords do not match\");\n mPasswordViewTwo.setError(\"Passwords do not match\");\n focusView = mPasswordViewOne;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Log.d(\"FirebaseSignUp\", \"createUserWithEmail:Success\");\n FirebaseUser user = mAuth.getCurrentUser();\n String uid = user == null ? \"null\" : user.getUid();\n\n // TODO: if successful, check if User should be an admin and add\n // them to list of admins in Firebase database\n if (mSpinner.getSelectedItem().equals(AccountType.ADMIN)) {\n mDatabase.child(\"admins\").child(uid)\n .setValue(email.split(\"@\")[0]);\n }\n\n Intent i = new Intent(getApplicationContext(), App.class);\n finish();\n startActivity(i);\n } else {\n // Probably means the email was taken\n mEmailView.setError(getString(R.string.error_email_already_registered));\n mEmailView.requestFocus();\n showProgress(false);\n }\n }\n });\n }\n }",
"@Then(\"^Click on signup button$\")\t\t\t\t\t\n public void Click_on_signup_button() throws Throwable \t\t\t\t\t\t\t\n { \n \tdriver.findElement(By.xpath(\"//*[@id='accountDetailsNext']/content/span\")).click();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\t\t\t\t\n }",
"private void clickSignOn() {\n\t\tthis.clickElement(signon);\n\t}",
"public SignUp() {\n Logger.log(\"SHOWING SIGN-UP PAGE\");\n\n displaySurnameFields();\n displayNameFields();\n displayNicknameFields();\n displayEmailFields();\n displayPasswordFields();\n displayConfirmPassword();\n displayBirthdayFields();\n displayCountryFields();\n\n displayBackButton();\n displaySubmitButton();\n\n setSceneMusic(\"pallet_town.mp3\");\n }",
"private void SignIn() {\n startActivity(new Intent(MainActivity.this, HomeScreenActivityFragments.class));\n finish();\n }",
"public void goClicked(View view){\n final String email=emailEditText.getText().toString();\n final String password=passwordEditText.getText().toString();\n\n\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n //Sign in the user\n Log.i(\"Infograph\", \"Sign in was successful\");\n loginUser();\n Toast.makeText(MainActivity.this, \"Signed in successfully !\", Toast.LENGTH_SHORT).show();\n } else {\n //Sign up the user\n Log.i(\"Infograph\", \"Sign in was not successful, Attempting SignUp\");\n mAuth.createUserWithEmailAndPassword(email,password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //Add to database\n DatabaseReference reference=database.getReference().child(\"users\").child(mAuth.getCurrentUser().getUid()).child(\"email\");\n\n reference.setValue(email);\n\n Log.i(\"Infograph\",\"Sign up was successful\");\n loginUser();\n Toast.makeText(MainActivity.this, \"Signed up successfully !\", Toast.LENGTH_SHORT).show();\n\n\n }else{\n Log.i(\"Infograph\",\"Sign up was not successful\");\n Toast.makeText(MainActivity.this, task.getException().getMessage(), Toast.LENGTH_SHORT).show();\n\n }\n }\n });\n }\n\n\n }\n });\n }",
"void signUp(SignUpRequest signupRequest);",
"@Override\n public void onClick(View v) {\n String username = edtUsername.getText().toString();\n String password = edtPassword.getText().toString();\n int usertype = spnUsertype.getSelectedItemPosition();\n\n\n /* CHECK IF FIELDS ARE BLANK */\n if (areFieldsBlank(username, password)) {\n return;\n }\n else {\n /* REDIRECT TO FREELANCE SIGNUP ACTIVITY */\n if (usertype == 0) {\n if (!app.isFreelancerUsernameTaken(username)) {\n Intent launchFreelanceSignupActivity = new Intent(LoginActivity.this,\n FreelanceSignupActivity.class);\n launchFreelanceSignupActivity.putExtra(\"F_USERNAME\", username);\n launchFreelanceSignupActivity.putExtra(\"F_PASSWORD\", password);\n startActivity(launchFreelanceSignupActivity);\n finish();\n return;\n }\n else {\n Toast.makeText(LoginActivity.this,\n \"ERROR: Freelance username already taken.\",\n Toast.LENGTH_SHORT).show();\n return;\n }\n }\n /* REDIRECT TO CLIENT SIGNUP ACTIVITY */\n else if (usertype == 1) {\n if (!app.isClientUsernameTaken(username)) {\n Intent launchClientSignupActivity = new Intent(LoginActivity.this,\n ClientSignupActivity.class);\n launchClientSignupActivity.putExtra(\"C_USERNAME\", username);\n launchClientSignupActivity.putExtra(\"C_PASSWORD\", password);\n startActivity(launchClientSignupActivity);\n finish();\n return;\n }\n else {\n Toast.makeText(LoginActivity.this,\n \"ERROR: Client username already taken.\",\n Toast.LENGTH_SHORT).show();\n }\n }\n /* ERROR TOAST MESSAGE FOR ADMIN SIGNUPS */\n else if (usertype == 2) {\n Toast.makeText(LoginActivity.this,\n \"ERROR: You may not signup as an administrator.\",\n Toast.LENGTH_SHORT).show();\n return;\n }\n }\n }",
"public void GoToSignup(View v)\n\t\t {\n \t\t\tIntent intent = new Intent();\n\t\t\tintent.setClassName(this, FreewayCoffeeSignupActivity.class.getName());\n\t\t\tstartActivity(intent);\n\t\t\tfinish();\n\t\t }",
"@Override\n public void onClick(View v) {\n Intent i = new Intent(UserProfile.this, SignInActivity.class);\n startActivity(i);\n }",
"public void clickSignInButton() {\r\n\t\tdriver.findElement(signInButton).click();\r\n\t}",
"public void onClick(View view) {\n if(validate_info()){\n create_user();\n user = FirebaseAuth.getInstance().getCurrentUser();\n if (user != null) {\n submit_profile(user);\n }\n }\n else{\n return;\n\n\n }\n }",
"@Override\n public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), SignupActivity.class);\n startActivityForResult(intent, REQUEST_SIGNUP);\n finish();\n //overridePendingTransition(R.anim.push_left_in, R.anim.push_left_out);\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tUpdatePrefs();\r\n\t\t\t\t\r\n\t\t\t\t// Returns to main menu after user enters registration info\r\n\t\t\t\tfinish();\r\n\t\t\t}",
"public void onClickcreateUserSignup(View view){\n\n String newName = ((EditText)findViewById(R.id.createUserUsername)).getText().toString();\n if(!newName.equals(\"\")) {\n Account.getInstance().setName(newName);\n\n SharedPreferences settings = getSharedPreferences(Utils.ACCOUNT_PREFS, 0);\n SharedPreferences.Editor editor = settings.edit();\n editor.putString(\"accountName\", newName);\n editor.commit();\n\n startActivity(new Intent(this, MainActivity.class));\n }\n }"
]
| [
"0.8368027",
"0.8018944",
"0.7978189",
"0.77716875",
"0.77580774",
"0.77065533",
"0.76604635",
"0.765076",
"0.7643078",
"0.7531596",
"0.74643254",
"0.744694",
"0.7354274",
"0.7275088",
"0.7270501",
"0.7261215",
"0.7231379",
"0.72286147",
"0.7226057",
"0.7181543",
"0.7168553",
"0.7159568",
"0.71383196",
"0.70843947",
"0.7054667",
"0.70526403",
"0.7051698",
"0.7025544",
"0.7002514",
"0.7000474",
"0.69390017",
"0.6935292",
"0.6929957",
"0.6907945",
"0.6879954",
"0.68682003",
"0.6850547",
"0.6847608",
"0.68403405",
"0.6827979",
"0.6814646",
"0.67480356",
"0.67434686",
"0.6724887",
"0.6718766",
"0.66970706",
"0.6676973",
"0.6670081",
"0.6640923",
"0.66355896",
"0.6630763",
"0.66229063",
"0.6622481",
"0.66051054",
"0.6576213",
"0.6573409",
"0.6573409",
"0.65667135",
"0.6555471",
"0.65444684",
"0.6529771",
"0.65137255",
"0.6509898",
"0.64593256",
"0.64590466",
"0.6445956",
"0.64449334",
"0.6428977",
"0.64204973",
"0.64204973",
"0.64204973",
"0.6419784",
"0.64075226",
"0.63937926",
"0.63880754",
"0.63781184",
"0.6373121",
"0.63712955",
"0.63613695",
"0.63587177",
"0.63511455",
"0.63403785",
"0.6336857",
"0.6328395",
"0.6319235",
"0.63180625",
"0.63148695",
"0.63112736",
"0.6306703",
"0.6306342",
"0.63050926",
"0.62840647",
"0.62734336",
"0.62701946",
"0.62655437",
"0.6260593",
"0.6251134",
"0.624068",
"0.62394714",
"0.6221282"
]
| 0.7562536 | 9 |
new messages can be added stored in descending time received order The header for the add operation is public void add(Message m) messages can move from one list to another(removed from original list) no receiving list then the message not removed from original list. public void move(int position, MessageList ml) | public messageList()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int move(int position) {\n\t\tremoveQueue(queues[position]);\n\t\tint angriness = queues[position].queue.poll();\n\t\tallQueues.add(queues[position]);\n\t\tif (queues[position].queue.size() > 0) {\n\t\t\tallHeads.add(queues[position]);\n\t\t}\n\t\treturn insert(angriness);\n\t}",
"public abstract void move(Position position);",
"public int move(int mm)\r\n\t{\n\t\taddPosition(mm);\r\n\t\t\r\n\t\t//System.out.println(\"camel pos after move\" + position);\r\n\t\treturn position;\r\n\t}",
"void saveItemMove(int fromPosition, int toPosition) {\n int fromItemPos = mItems.get(toPosition).getPosition();\n int toItemPos;\n\n if (fromPosition < toPosition) {\n // moved down\n toItemPos = mItems.get(toPosition - 1).getPosition();\n } else {\n // moved up\n toItemPos = mItems.get(toPosition + 1).getPosition();\n }\n\n mDisposable.add(mViewModel.movePositions(fromItemPos, toItemPos)\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe());\n }",
"@Override\n\tpublic void move(int xPos, int yPos) {\n\t}",
"@Override\n\tpublic void move() {\n\n\t}",
"public void move(){\n\t\t\n\t}",
"void moveAdded(int playerIndex, Move move);",
"@Override\n\tpublic void move() {\n\t\t\n\t}",
"public void addMove() {\n\t\tmove = \"mv \" + posX + \" \" + posY;\n\t}",
"void onItemMove(int fromPosition, int toPosition) {\n Collections.swap(mItems, fromPosition, toPosition);\n notifyItemMoved(fromPosition, toPosition);\n }",
"public void move(int delta);",
"@Override\n\tpublic void move() {\n\t}",
"public void move() {\n\r\n\t}",
"public abstract void move(int p_index) ;",
"public void move(String direction) {\n \n }",
"public void Move()\n {\n \n }",
"@Override\r\n\tpublic void move(String from, String to) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void move() {\n\r\n\t}",
"public static void movingFromMill( int pos, LinkedList<Mill> checkedMills) {\n\n for (int i = 0; i < checkedMills.size(); i++) {\n Mill m = checkedMills.get(i);\n\n if (m.a == pos || m.b == pos || m.c == pos) {\n checkedMills.remove(i);\n }\n }\n\n\n }",
"private void handleMove(String[] msg, DataOutputStream os) throws IOException {\n\n\t\t\n\t E_Direction direction = E_Direction.valueOf(msg[2].substring(msg[2].indexOf(\":\")+1));\n\t\t\n\t if(direction == null) \n\t\t os.writeUTF(\"NACK\"+\" \"+\"MOV\"+\" \"+\"NO\"); \n\t \n\t else {\n\t \t\n\t\t entity.moveCar(direction);\n\t\t \n\t \tif(entity.isFinished())os.writeUTF(\"ACK\"+\" \"+\"MOV\"+\" \"+\"NO\");\n\t \t\n\t\t else os.writeUTF(\"ACK\"+\" \"+\"MOV\"+\" \"+\"YES\"+\" \"+\"PDR:\"+getPossibleDirections());\n\t\t \n\t }\n\t \n\t\t\n\t}",
"@Override // see item.java\n\tpublic void move(Direction dir, Distance d) {\n\n\t}",
"public void move(String direction);",
"public void move();",
"public void move();",
"public void move() {\r\n\t\tmoveCount++;\r\n\t}",
"void move(IntVector delta);",
"@Override\n\tpublic void move(Direction d) {\n\t\t\n\t}",
"public void move(@IntRange(from = 0) final int fromPosition,\n @IntRange(from = 0) final int toPosition) {\n final E e = mItems.remove(fromPosition);\n mItems.add(toPosition, e);\n mDatasourceObservable.notifyItemMoved(fromPosition, toPosition);\n }",
"public boolean moveCard(AbstractCard card, CardCollection moveLocation);",
"@Override\n\tpublic void onMoveError(String msg) {\n\n\t}",
"public void move() {\n\n }",
"@Override\n public void move () {\n }",
"void onIdentityMove(int fromPosition, int toPosition);",
"public void move(int distance);",
"protected void addMove(Move move) {\n moveHistory.add(move);\n pointer++;\n }",
"@Override\n public boolean onItemMove(int fromPosition, int toPosition) {\n if (fromPosition < toPosition){\n for(int i = fromPosition;i<toPosition;i++){\n Collections.swap(cartList, i, i+1);\n }\n }else{\n for (int i = fromPosition; i > toPosition; i--){\n Collections.swap(cartList, i, i-1);\n }\n }\n notifyItemMoved(fromPosition,toPosition);\n return true;\n }",
"private void moveItem(int oldPos, int newPos) {\n adapter.notifyItemMoved(oldPos, newPos);\n }",
"private void move() {\n resetUpdate();\n\n gameMessage.setSpace1(clientMessage.getSpace1());\n gameMessage.resetGameMessage();\n gameMessage.notify(gameMessage);\n\n\n if( liteGame.isWinner() ) endOfTheGame = true;\n }",
"public void move(float deltaTime) {\n }",
"public void moveTo(Vector position) {\n }",
"void positionLoaded(List<Move> orderedMoves);",
"public abstract void Move();",
"private void moveTo(int position) {\n if (position < gapLeft) {\n left(position);\n }\n else {\n right(position);\n }\n }",
"public void move (long delta){\r\n\r\n super.move(delta);\r\n }",
"@Override\n public void sendMessage(String message) {\n if(\"YOURMOVE\".equals(message)) {\n makeMove();\n }\n }",
"void move();",
"private void addMove(ArrayList<Move> l, Move m) {\n if (m.valid() && isLegal(m)) {\n l.add(m);\n }\n }",
"public void move()\r\n\t{\r\n\t\tfor (int a = 0; a < bullets.size(); a++)\r\n\t\t{\r\n\t\t\tBullet bullet = bullets.get(a);\r\n\t\t\tif (!bullet.move())\r\n\t\t\t{\r\n\t\t\t\tbullets.remove(a);\r\n\t\t\t\ta--;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\tvoid move(int x, int y) {\n\n\t}",
"@Override\n \t\t\t\tpublic void doMove() {\n \n \t\t\t\t}",
"public abstract void move(int elapsedTime);",
"public abstract void move(int newXPosition, int newYPosition, PiecePosition position) throws BoardException;",
"private void moveMhos() {\n\t\tmoveAllignedMhos();\n\t\tmoveDiagonalMhos();\n\t\tmoveHorizontalMhos();\n\t\tmoveVerticalMhos();\n\t\tmoveRemainingMhos();\n\t\tupdateMhoLocationList();\n\t}",
"public void sendMove (Move m){\n connect();\n try{\n doStream.writeUTF(\"MOVE\");\n doStream.writeUTF(currentUser.getUserName());\n doStream.writeUTF(m.toString());\n } catch (IOException e){\n e.printStackTrace();\n }\n\n disconnect();\n }",
"@Override\n\tpublic void move(long id, int movetype) throws Exception {\n\t\tString startOrderCode = getStartOrderCode(id);\n\t\tString endOrderCode = getEndOrderCode(id);\n\t\tString orderCode = getOrderCodeById(id);\n\t\tBusinessconfigStuff stuff = new BusinessconfigStuff();\n\t\tif(movetype == 1){//向上移动\n\t\t\tif (orderCode.equals(startOrderCode)) {\n\t\t\t\tthrow new Exception(\"已经排在此类型分类第一了!\");\n\t\t\t}\n\t\t\tstuff = getnextOrderCodeById(id);\n\t\t\tString code = stuff.getOrdercode();\n\t\t\t//换码\n\t\t\tbusinessconfigStuffDao.updateordercode(code,id);\n\t\t\tbusinessconfigStuffDao.updateordercode(orderCode, stuff.getId());\n\t\t}else{\n\t\t\tif (orderCode.equals(endOrderCode)) {\n\t\t\t\tthrow new Exception(\"已经排在此类型分类末尾了!\");\n\t\t\t}\n\t\t\tstuff = getbefOrderCodeById(id);\n\t\t\tString code = stuff.getOrdercode();\n\t\t\t//换码\n\t\t\tbusinessconfigStuffDao.updateordercode(code,id);\n\t\t\tbusinessconfigStuffDao.updateordercode(orderCode, stuff.getId());\n\t\t}\n\t}",
"public void setMove(int move) {\n this.move = move;\n }",
"private void moveAllLists() {\n\t\tfuelList.moveTo(position.x, position.y);\n\t\twellList.moveTo(position.x, position.y);\n\t\tstationList.moveTo(position.x, position.y);\n\t\tstationTaskList.moveTo(position.x, position.y);\n\t}",
"public boolean move();",
"private void updateMoveList(Move m) {\n \t//first check for castling move\n \tif(m.getSource().getName().equals(\"King\")) {\n \tint sx = m.getSource().getLocation().getX();\n \tint dx = m.getDest().getLocation().getX();\n \t\n \t//castle king side\n \tif(dx - sx == 2) {\n \t\tmoveList.add(\"0-0\");\n \t\treturn;\n \t}\n \t//castle queen side\n \telse if(sx - dx == 2) {\n \t\tmoveList.add(\"0-0-0\");\n \t\treturn;\n \t}\n \t}\n \t\n \t//now do normal checks for moves\n \t//if no piece, normal notation\n \tif(m.getDest().getName().equals(\"None\")) {\n \t\t\n \t\t//check for en passant\n \t\tif(m.getSource().getName().equals(\"Pawn\")) {\n \t\t\t\n \t\t\t//it's only en passant if the pawn moves diagonally to an empty square \n \t\t\tif(m.getSource().getLocation().getX() != m.getDest().getLocation().getX()) {\n \t\t\t\tmoveList.add(m.getSource().getLocation().getFile()+ \"x\" + m.getDest().getLocation().getNotation());\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t\t\n \t\tmoveList.add(m.getSource().getID() + m.getDest().getLocation().getNotation());\n \t}\n \t//add \"x\" for capturing\n \t//for pawn, it's a bit different\n \telse if(m.getSource().getName().equals(\"Pawn\")) {\n \t\tmoveList.add(m.getSource().getLocation().getFile()+ \"x\" + m.getDest().getLocation().getNotation());\n \t}\n \telse {\n \t\tmoveList.add(m.getSource().getID() + \"x\" + m.getDest().getLocation().getNotation());\n \t}\n }",
"public void CallBackDelegate(Position newPosition,\r\n\t\t\tBlankPosition newBlankPosition, MoveMethod mm) {\n\t\t\r\n\t}",
"public void receivedInvalidMoveMessage();",
"@Override\n public void processMessage(final CardMovedProtocolMessage serverMessage) {\n final int fromPileIndex = serverMessage.getMessageData().getFromPileIndex();\n final int toPileIndex = serverMessage.getMessageData().getToPileIndex();\n\n //Pile is a local representation of what is going on on the server\n final PileModel fromPile = mPileManager.getPileWithIndex(fromPileIndex);\n final PileModel toPile = mPileManager.getPileWithIndex(toPileIndex);\n\n //get the card that is about to be moved\n final Card movedCard = fromPile.findCardByRankAndSuit(serverMessage.getMessageData().getMovedCard().getRank(), serverMessage.getMessageData().getMovedCard().getSuit());\n\n //make sure that the card that we want to move is actually in the pile\n if (movedCard == null) {\n //in some cases we placing intentionally the card away from it's pile even\n //before we get confirmation from server. In those cases the move card message\n //will just be ignored.\n return;\n }\n\n //remove the card from the pile and place into the other\n fromPile.removeCard(movedCard);\n toPile.addCard(movedCard);\n\n //we need to update both piles that had changes\n final IPileLayouter fromPileLayouter = mPileLayouterManager.getPileLayouterForPile(fromPile);\n final IPileLayouter toPileLayouter = mPileLayouterManager.getPileLayouterForPile(toPile);\n\n //make the actual layout\n\n //we want to layout only players piles and the stock pile, but not field piles when cards are moving from them\n if ((fromPileIndex != 1) && (fromPileIndex < ServiceLocator.locateService(PileManagerService.class).getFirstFiledPileindex()))\n fromPileLayouter.layout();\n\n //destination pile should be always layed out\n toPileLayouter.layout();\n }",
"public void moveMessages(List<Long> ids, Long folderId) {\n Validate.notNull(folderId, \"folderId cannot be null\");\n List<NameValuePair> params = ClientUtils.asParams(\"ID\", ids, \"FolderID\", folderId.toString());\n client.post(MOVE_MESSAGE_PATH, Object.class, params);\n }",
"public void move() {\n if(Objects.nonNull(this.position)) {\n Position position = this.getPosition();\n Function<Position, Position> move = moveRobotInDirectionMap.get(position.getDirection());\n this.position = move.apply(position);\n }\n }",
"public abstract void move();",
"public abstract void move();",
"public abstract void move();",
"public abstract void move();",
"public abstract void move();",
"public abstract void move();",
"public abstract void move();",
"public void move(String direction) {\n\tpreviousMove = direction;\n\tout.println(\"MOVE \" + direction);\n}",
"public void moveLeft() {\n\t\t\n\t}",
"public void move() {\n\t\tif ( board.getLevel() == 5 )\n\t\t\tmovementIndex = ( movementIndex + 1 ) % movement.length;\n\t}",
"protected void onMove() {\r\n }",
"@Override\r\n\tprotected void onMove() {\n\t\t\r\n\t}",
"public interface MessageOrdering {\n Message prepareMessage(Message message);\n void receive(Message message);\n Message deliver() throws InterruptedException;\n ListModel<Message> getHoldBackListModel();\n}",
"private void addToMoveQueue() {\n\t\tSimulation.INSTANCE.getMoveQueue().offer(new Move(prevNode, currentNode));\n\t}",
"public abstract void move(int deltaX, int deltaY);",
"public void move()\n {\n if(!pause)\n {\n if(up)\n { \n list.remove(0); \n head = new Location(head.getA(),head.getB()-15); \n list.add(head); \n }\n else if(down)\n {\n list.remove(0); \n head = new Location(head.getA(),head.getB()+15); \n list.add(head); \n }\n else if(left)\n {\n list.remove(0); \n head = new Location(head.getA()-15,head.getB()); \n list.add(head);\n }\n else if(right)\n {\n list.remove(0); \n head = new Location(head.getA()+15,head.getB()); \n list.add(head); \n }\n \n repaint();\n }\n }",
"public void moveM() {\r\n\t\tif (this.barcaIzq)\r\n\t\t\tthis.numMisioneros--;\r\n\t\telse\r\n\t\t\tthis.numMisioneros++;\r\n\r\n\t\tcambiarDeOrilla();\r\n\r\n\t}",
"public static void moveNode(INodePO moveNode, INodePO oldParent,\n INodePO newParent, int pos) {\n \n AbstractCmdHandleChild childHandler = NodePM.getCmdHandleChild(\n oldParent, moveNode);\n childHandler.remove(oldParent, moveNode);\n \n childHandler = NodePM.getCmdHandleChild(newParent, moveNode);\n childHandler.add(newParent, moveNode, pos);\n }",
"public void MoveBlock(int direction) {\r\n switch (direction) {\r\n case 0://right\r\n SaveUndo();//save the old mao on undo array\r\n //update BlockList and map matrix\r\n blockList.updateBlock(i, j, i, j + 1, Integer.valueOf(String.valueOf(map[i][j])), 1);\r\n map[i][j + 1] = map[i][j];\r\n map[i][j] = '0';\r\n gamePage.Sounds(0);//move sound\r\n numberOfMoves++;\r\n break;\r\n case 1://left\r\n SaveUndo();//save the old mao on undo array\r\n //update BlockList and map matrix\r\n blockList.updateBlock(i, j, i, j - 1, Integer.valueOf(String.valueOf(map[i][j])), 2);\r\n map[i][j - 1] = map[i][j];\r\n map[i][j] = '0';\r\n gamePage.Sounds(0);//move sound\r\n numberOfMoves++;\r\n break;\r\n case 2://down\r\n new AnimationThread().execute('d');//check if move down\r\n new AnimationThread().execute('b');//check if there is block will remove\r\n break;\r\n }\r\n }",
"@Override\n public boolean onItemMove(int fromPosition, int toPosition) {\n if (fromPosition < toPosition) {\n for (int i = fromPosition; i < fromPosition; i++) {\n Collections.swap(dummyDataList, i, i + 1);\n }\n } else {\n for (int i = fromPosition; i > toPosition; i--) {\n Collections.swap(dummyDataList, i, i - 1);\n }\n }\n notifyItemMoved(fromPosition, toPosition);\n\n return true;\n }",
"void moveRemoved(Move move);",
"public abstract Point move(Point position);",
"public void move(Cell[][] map, Action[][][] actions, int[] position) {\n int[] destination = new int[2];\n for (int i = Math.max(0, position[0] - 1); (i <= Math.min(4, position[0] + 1)); i++) {\n for (int j = Math.max(0, position[1] - 1); j <= Math.min(4, position[1] + 1); j++) {\n if ((map[i][j].getSize() <= map[position[0]][position[1]].getSize())\n && !map[i][j].getBlock(map[i][j].getSize() - 1).getTypeBlock().equals(TypeBlock.WORKER)\n && !map[i][j].getBlock(map[i][j].getSize() - 1).getTypeBlock().equals(TypeBlock.DOME)) {\n destination[0] = i;\n destination[1] = j;\n ((Swap) actions[i][j][0]).set(position, destination, destination, destination, true);\n }\n }\n }\n }",
"abstract void move();",
"public abstract String[] move();",
"public void addMove(Move tryMove, ArrayList<ArrayList<Move>> moves){\n//\t\t\tSystem.out.println(\"Added: \" + getClassNotation(tryMove.xFrom, tryMove.yFrom) +\"\" + \" \"+ getClassNotation(tryMove.xTo, tryMove.yTo));\n\t\t\tArrayList<Move> move = new ArrayList<Move>();\n\t\t\tmove.add(tryMove);\n\t\t\tmoves.add(move);\n }",
"public void setMove(int move){\n this.move = move;\n }",
"public void move() {\r\n posX += movementX;\r\n posY += movementY;\r\n anchorX += movementX;\r\n anchorY += movementY;\r\n }",
"public void move() {\n for (int i = 0; i < Vampiro.getNumVamp(); i++) {\n\n lista[i].move();\n }\n }",
"public void move(int pin, int pos) throws Exception{\r\n\t // keep pos in valid range\r\n\t\tif (pos < 0 || pos >255) {\r\n\t\t\tthrow new Exception(\"Position out of range, must be between 0 and 255. Value was \" + pos + \".\");\r\n\t\t}\r\n\t\t// keep pin in valid range\r\n\t\tif (pin < 0 || pin > maxPin) {\r\n\t\t\tthrow new Exception(\"Pin out of range, must be between 0 and \" \r\n\t\t\t\t\t+ maxPin + \". Value was \" + pin + \".\");\r\n\t\t}\r\n\t\t// create byte[] for commands\r\n\t\tbyte [] b = new byte[] {(byte)255,(byte)pin,(byte)pos};\r\n\t\t// send those bytes to controller\r\n\t\texecute(b,0);\r\n\t}",
"public interface IMclMove<M extends IMclMove<M>> {\n\t/**\n\t * Generates noise onto the move to mask errors in measuring the performed movements and to localize successfully with a smaller number of particles than without noise.\n\t * @return a new move onto that noise has been added.\n\t */\n\tM generateNoise();\n}",
"P applyMovement(M move);",
"@java.lang.Override\n public void move(String position) throws IllegalChessMoveException {\n position = position.toUpperCase();\n isLegal(position);\n if (position.charAt(0) != this.position.charAt(0) && position.charAt(1) != this.position.charAt(1))\n throw new IllegalChessMoveException(\"Nedozvoljen potez za topa\");\n this.position = position;\n }",
"public void move(Vector start,Vector dist);",
"@Override\n public void onMove(float x, float y) {\n }",
"public yandex.cloud.api.operation.OperationOuterClass.Operation move(yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.MoveClusterRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getMoveMethod(), getCallOptions(), request);\n }"
]
| [
"0.64785814",
"0.6347505",
"0.63075715",
"0.6112588",
"0.6106421",
"0.60952044",
"0.60708326",
"0.6061505",
"0.6030054",
"0.6029984",
"0.60269815",
"0.5998158",
"0.59928864",
"0.59747463",
"0.59303856",
"0.59302944",
"0.5924704",
"0.59091705",
"0.5902258",
"0.5896976",
"0.58923745",
"0.58893365",
"0.5886677",
"0.5821277",
"0.5821277",
"0.5811614",
"0.5811159",
"0.580658",
"0.5804711",
"0.5798721",
"0.5771768",
"0.57612985",
"0.57445204",
"0.5731031",
"0.57292235",
"0.5725408",
"0.5718924",
"0.571222",
"0.5703337",
"0.56934124",
"0.56580794",
"0.5653839",
"0.5645164",
"0.5640583",
"0.5632954",
"0.5619941",
"0.5611498",
"0.56004655",
"0.55966043",
"0.55875653",
"0.55753744",
"0.5563382",
"0.5542824",
"0.5534697",
"0.55293137",
"0.55135417",
"0.55056465",
"0.5504581",
"0.550314",
"0.5500872",
"0.5500523",
"0.5496919",
"0.549149",
"0.5491257",
"0.5488031",
"0.5487146",
"0.5487146",
"0.5487146",
"0.5487146",
"0.5487146",
"0.5487146",
"0.5487146",
"0.54845095",
"0.5467687",
"0.5462658",
"0.54280835",
"0.54279834",
"0.5417692",
"0.54053825",
"0.5404759",
"0.54003996",
"0.53931993",
"0.5390224",
"0.53894466",
"0.53820205",
"0.53815913",
"0.5378979",
"0.5367333",
"0.5366987",
"0.53668356",
"0.5365074",
"0.5360448",
"0.5354615",
"0.53480387",
"0.53476715",
"0.5345837",
"0.533928",
"0.5331385",
"0.5330454",
"0.53303564",
"0.5324817"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public String toString() {
return ans+" By "+by;
} | {
"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 |
Adds a new boolean value parameter to the parameters that will be sent when the request is made. | public void addParameter(final String name, final boolean booleanValue) {
this.addParameter(name, Boolean.toString(booleanValue));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setBool(String name, Boolean value) {\n parameters.get(name).setValue(value);\n }",
"public void setBool(String parName, boolean parVal) throws HibException;",
"public void set_boolean(boolean param) {\n this.local_boolean = param;\n }",
"private void saveBoolean(String paramString, boolean paramBoolean) {\n }",
"void setBoolean(boolean value);",
"void set(boolean value);",
"public void setBooleanValue(String booleanValue) { this.booleanValue = booleanValue; }",
"public boolean add(boolean a, boolean b){\n\t\tSystem.out.println(\"i am from method where return type is boolean\");\n\t return true;\n\t}",
"public BooleanParameter(String name, String key, String desc, boolean visible, boolean enabled, boolean required, Object defaultValue) {\n super(name,key,desc,visible,enabled,required,defaultValue);\n \n if ( defaultValue instanceof String ) {\n defaultValue = new Boolean( \"TRUE\".equals(defaultValue));\n }\n }",
"void setBoolean(String key, boolean val);",
"public void setProcessed (boolean Processed)\n{\nset_Value (\"Processed\", new Boolean(Processed));\n}",
"void writeBool(boolean value);",
"public void putBoolean(ResourceLocation name, boolean value) {\n data.putBoolean(name.toString(), value);\n }",
"public void setTallied(java.lang.Boolean value);",
"public BooleanValue(boolean value) {\r\n\t\tthis.value = value;\r\n\t}",
"public BooleanValue(boolean value) {\r\n\t\tthis.value = value;\r\n\t}",
"public boolean getBooleanParam(String theAlias) {\n String name = getAlias(theAlias);\n\n if (!allParams.containsKey(name)) {\n System.out.println(\"Careful, you are getting the value of parameter: \" + name + \" but the parameter hasn't been added...\");\n System.exit(1);\n }\n if (!boolParams.containsKey(name)) {\n System.out.println(\"Careful, you are getting the value of parameter: \" + name + \" but the parameter isn't a bool parameter...\");\n System.exit(1);\n }\n\n return boolParams.get(name);\n }",
"public void putBoolean(String key, boolean value, boolean commit) {\r\n\t\tputBoolean(Global.getContext(), key, value, commit);\r\n\t}",
"public BooleanValue(boolean bool) {\r\n this.val = bool;\r\n }",
"public void putBoolean(String key, boolean value) {\n String valueAsString = value ? TRUE_AS_STRING : FALSE_AS_STRING;\n\n put(key, valueAsString);\n }",
"public void setValue(boolean value) {\n this.value = value;\n }",
"protected GUIBooleanParameter(BooleanParameter parameter, SettingsPane sp) {\n\t\tsuper(parameter, sp);\n\t}",
"private boolean getBoolean(String paramString, boolean paramBoolean) {\n }",
"public void append(boolean bool)\n\t{\n\t\t// determine the byte to append\n\t\tbyte b = (bool ? TRUE : FALSE);\n\t\t\n\t\t// append the byte\n\t\tappend(b);\n\t}",
"public void sendBool(boolean b) {\n try {\n dOut.writeBoolean(b);\n dOut.flush();\n } catch (IOException e) {\n System.out.println(\"Could not send boolean\");\n e.printStackTrace();\n }\n }",
"public abstract void setInput(boolean value);",
"public void setValue(boolean value) {\n this.value = value;\n }",
"public void setParam0(boolean param){\n \n // setting primitive attribute tracker to true\n \n if (false) {\n localParam0Tracker = false;\n \n } else {\n localParam0Tracker = true;\n }\n \n this.localParam0=param;\n \n\n }",
"public void setParking(java.lang.Boolean value);",
"public void setRequiresTaxCertificate (boolean RequiresTaxCertificate)\n{\nset_Value (COLUMNNAME_RequiresTaxCertificate, Boolean.valueOf(RequiresTaxCertificate));\n}",
"private void serializeBoolean(final Boolean value, final StringBuffer buffer)\n {\n buffer.append(\"b:\");\n buffer.append(value.booleanValue() ? 1 : 0);\n buffer.append(';');\n }",
"@Deprecated\n public boolean getParameter(String name, boolean defaultValue) {\n String value = parameters.get(name);\n if (value == null)\n return defaultValue;\n value = value.trim().toLowerCase();\n return value.equals(\"true\") || value.equals(\"1\") || value.equals(\"yes\");\n }",
"public void setRequiredParam(boolean requiredParam) {\n this.isRequiredParam = requiredParam;\n }",
"public void setIsApproved (boolean IsApproved);",
"public void setIsApproved (boolean IsApproved);",
"@Override\n public void put(String name, boolean value) {\n emulatedFields.put(name, value);\n }",
"public void setMyBool(boolean myBoolIn) {\n myBool = myBoolIn;\n }",
"@JsonSetter(\"blockPayphone\")\r\n public void setBlockPayphone (boolean value) { \r\n this.blockPayphone = value;\r\n }",
"public VfeLkBooleanAdp(Byte booleanId) { this.booleanId = booleanId; }",
"public TupleDesc addBoolean(String name) {\n columns.add(new TupleDescItem(Type.BOOLEAN, name));\n return this;\n }",
"public final Bindings booleanProperty(String name, boolean array) {\n addProp(name, array, \"true\");\n return this;\n }",
"public void setOp(boolean value) {}",
"public void setAugment(boolean aValue);",
"public void add(Boolean value) {\r\n\t\tif(size < capacity) {\r\n\t\t\tvalues.add(value);\r\n\t\t\tsize++;\r\n\t\t}\t\t\r\n\t}",
"public void setBoolean(Boolean value) {\r\n\t\ttype(ConfigurationItemType.BOOLEAN);\r\n\t\tthis.booleanValue = value;\r\n\t}",
"public void setSummable(Boolean summable);",
"@Override\n public void setBoolean(boolean value) throws SQLException {\n if (possibleCharLength > 4) {\n setString(value ? LONG_TRUE : LONG_FALSE);\n } else if (possibleCharLength >= 1) {\n setString(value ? SHORT_TRUE : SHORT_FALSE);\n }\n }",
"public void setBoolean(int parameterIndex, boolean x) throws SQLException {\n currentPreparedStatement.setBoolean(parameterIndex, x);\n }",
"public Builder setBoolValue(boolean value) {\n typeCase_ = 2;\n type_ = value;\n onChanged();\n return this;\n }",
"public void putBooleanData(String key, Boolean value) {\n editor.putBoolean(key, value);\n editor.apply();\n }",
"boolean getBoolValue();",
"boolean getBoolValue();",
"public void set(boolean bol);",
"public void setRequired(boolean value) {\r\n this.required = value;\r\n }",
"public Builder setBoolValue(boolean value) {\n bitField0_ |= 0x00000040;\n boolValue_ = value;\n onChanged();\n return this;\n }",
"@Specialization(guards = \"isBooleanOrIllegal(frame)\")\n protected boolean writeBoolean(VirtualFrame frame, boolean value) {\n it.getSlot().setKind(FrameSlotKind.Boolean);\n\n frame.setBoolean(it.getSlot(), value);\n return value;\n }",
"void setRequired(boolean required);",
"public void setVar56(java.lang.Boolean value) {\n this.var56 = value;\n }",
"protected BooleanValue(Boolean bv) {\n boolValue = bv;\n }",
"public void writeBoolean(boolean bool) throws IOException {\n DebugLog.stdoutPrintln(\"\tmarshalling bool\" + bool, DebugLog.BSF_LOG_L3);\n fDataOutputStream.writeBoolean(bool);\n\t}",
"protected void sendBoolean(boolean b, String uniformName) {\n int uniformLocation = glGetUniformLocation(programID, uniformName);\n glUniform1f(uniformLocation, (b == true) ? 1 : 0);\n }",
"void writeBoolean(boolean v) throws IOException;",
"private native void Df1_Write_Boolean(String plcAddress,boolean value) throws Df1LibraryNativeException;",
"public void setReserved1(boolean value)\n {\n field_1_options = reserved1.setShortBoolean(field_1_options, value);\n }",
"public void b(boolean paramBoolean)\r\n/* 184: */ {\r\n/* 185:183 */ this.g = paramBoolean;\r\n/* 186: */ }",
"public void setRequired(boolean required);",
"boolean boolField(String name, boolean isDefined, boolean value)\n throws NullField, InvalidFieldValue;",
"void setBooleanProperty(Object name, boolean b) throws JMSException;",
"@Override\n public boolean setParameter(String parameterName, String value) {\n return false;\n }",
"public void setHasCustom(boolean hasCustom);",
"public void setOptional(Boolean optional) {\n this.optional = optional;\n }",
"public void setIsNostroUpdateEnabled(String flag) {\n isNostroUpdateEnabled = (flag.equals(YES));\n updateParameters = true;\n }",
"public void setVar200(java.lang.Boolean value) {\n this.var200 = value;\n }",
"public void setBooleanId(Byte booleanId) { this.booleanId = booleanId; }",
"public void putBooleanValue(String key, boolean value){\n SharedPreferences sharedPreference = context.getSharedPreferences(LOGIN,Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=sharedPreference.edit();\n editor.putBoolean(key,value);\n editor.apply();\n }",
"public void setEnabled(Boolean value) { this.myEnabled = value.booleanValue(); }",
"public void setIsOnRequest(int value) {\n this.isOnRequest = value;\n }",
"public void setIsFromMassUpdate (boolean IsFromMassUpdate);",
"public void setClaim(boolean a){\n isClaimed= a;\n \n}",
"void setMovimentoPassante(boolean passante);",
"protected void writeBooleanValue(boolean v) throws IOException {\n _generator.writeBoolean(v);\n }",
"public void b(boolean paramBoolean)\r\n/* 603: */ {\r\n/* 604:601 */ this.l = paramBoolean;\r\n/* 605: */ }",
"BoolOperation createBoolOperation();",
"private static void addToList(String paramString1, String paramString2, boolean paramBoolean) {\n }",
"public static void setBool(String aKey, boolean aValue) {\n getSharedPreferences().edit().putBoolean(aKey, aValue).apply();\n }",
"public static void set_IsSetParamFinal(boolean v) throws RuntimeException\n {\n UmlCom.send_cmd(CmdFamily.javaSettingsCmd, JavaSettingsCmd._setJavaIsSetParamFinalCmd,\n \t\t (v) ? (byte) 1 : (byte) 0);\n UmlCom.check();\n \n _is_set_param_final = v;\n }",
"public static boolean getBooleanParameter( HttpServletRequest request, String paramName ) {\n String temp = request.getParameter(paramName);\n if( temp != null && temp.equals(\"true\") ) {\n return true;\n } else {\n return false;\n }\n }",
"public static boolean getBooleanParameter( HttpServletRequest request, String paramName ) {\n String temp = request.getParameter(paramName);\n if( temp != null && temp.equals(\"true\") ) {\n return true;\n } else {\n return false;\n }\n }",
"public void putBoolean(String key, boolean value){\n\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n\n editor.putBoolean(key, value);\n\n editor.apply();\n }",
"public void set(boolean a, boolean b) {\n\t\ta = b;\r\n\t}",
"public PropertyBoolean(String uid, String value) {\n super(uid, value);\n setFixedValues(new HashSet<Boolean>(Arrays.asList(Boolean.TRUE, Boolean.FALSE)));\n }",
"void setString(boolean string);",
"public void put(String key, boolean value)\n\t{\n\t\tverifyParseState();\n\t\tvalues.put(key, ValueUtil.createValue(value));\n\t}",
"@OfMethod({\"setBoolean(java.lang.String,boolean)\", \"setBoolean(int,boolean)\"})\n public void testSetBoolean() throws Exception {\n CallableStatement instance = newClosedCall();\n\n try {\n instance.setBoolean(getParameterName(), true);\n fail(\"Allowed set boolean by parameter name after close.\");\n } catch (SQLException ex) {\n checkException(ex);\n }\n\n try {\n instance.setBoolean(getParameterIndex(), true);\n fail(\"Allowed set boolean by parameter index after close.\");\n } catch (SQLException ex) {\n checkException(ex);\n }\n }",
"public Boolean getBooleanAttribute();",
"BooleanValue createBooleanValue();",
"BooleanValue createBooleanValue();",
"BooleanValue createBooleanValue();",
"BooleanValue createBooleanValue();",
"@Override\n\tpublic void setValue(String path, boolean value) {\n\t\tsetValue(path, new Boolean(value));\n\t}"
]
| [
"0.7295463",
"0.6680512",
"0.6668005",
"0.6655561",
"0.65972716",
"0.6426391",
"0.636073",
"0.63487977",
"0.63313824",
"0.63302255",
"0.632421",
"0.6312569",
"0.6296919",
"0.6295605",
"0.6280162",
"0.6280162",
"0.62106305",
"0.6170018",
"0.615836",
"0.6144283",
"0.6092187",
"0.6087506",
"0.6077194",
"0.60554856",
"0.60537773",
"0.6008543",
"0.5996771",
"0.59910667",
"0.5967117",
"0.5965395",
"0.59450126",
"0.5937863",
"0.59296525",
"0.5929638",
"0.5929638",
"0.5927642",
"0.59176505",
"0.59150136",
"0.59138316",
"0.58973116",
"0.58872247",
"0.5880964",
"0.58533823",
"0.58324635",
"0.5821025",
"0.5799128",
"0.57906115",
"0.5790503",
"0.5769987",
"0.57667387",
"0.57464945",
"0.57464945",
"0.5744269",
"0.5738038",
"0.5735908",
"0.5725601",
"0.57249737",
"0.5721024",
"0.5717506",
"0.5710982",
"0.57093036",
"0.5707827",
"0.57077986",
"0.5707012",
"0.5698195",
"0.56716317",
"0.56709385",
"0.5669885",
"0.56657284",
"0.56616104",
"0.56615883",
"0.56547236",
"0.5654244",
"0.565285",
"0.5651846",
"0.5650336",
"0.564425",
"0.56347096",
"0.56267005",
"0.5622748",
"0.56084913",
"0.56035566",
"0.55918723",
"0.558486",
"0.5584731",
"0.55817634",
"0.5579912",
"0.5579912",
"0.55688614",
"0.5568084",
"0.5565478",
"0.55637056",
"0.5562103",
"0.55592126",
"0.5558356",
"0.5554268",
"0.5554268",
"0.5554268",
"0.5554268",
"0.55533594"
]
| 0.74175847 | 0 |
Abstract method used for executing specific operation. | protected abstract String process(T firstNumber, D secondNumber); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void operation();",
"public abstract void runOperation();",
"protected abstract void execute();",
"abstract protected void execute();",
"protected void execute() {}",
"public abstract void execute();",
"public abstract void execute();",
"public abstract void execute();",
"protected abstract void executeHelper();",
"protected void execute() {\r\n }",
"protected abstract void execute() throws Exception;",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute()\n {\n }",
"public abstract int execute();",
"protected void execute() {\n\t\t\n\t}",
"protected void execute() {\n \t\n }",
"protected void execute() {\n \t\n }",
"protected void execute()\n\t{\n\t}",
"@Override\n protected void execute() {\n \n }",
"protected void execute() {\n\n\t}",
"@Override\n protected void execute() {\n }",
"@Override\n protected void execute() {\n }",
"@Override\n protected void execute() {\n }",
"protected void execute() {\n\t}",
"abstract void execute() throws Exception;",
"@Override\r\n\tprotected void execute() {\r\n\t}",
"protected void execute() {\n\n\n \n }",
"Operations operations();",
"public abstract T execute() throws Exception;",
"@Override\n protected void execute() {\n\n }",
"@Override\n public void execute() {}",
"public OperationStatus execute(T operation) throws AbstractAgentException;",
"protected abstract void execute(INPUT input);",
"abstract void exec();",
"@Override\n public void Execute() {\n\n }",
"@Override\n public void execute() {\n }",
"@Override\r\n\tpublic void execute() {\n }",
"public void execute(){\n\t\t\n\t}",
"@Override\n\tpublic void execute() {\n\t\t\n\t}",
"abstract public void execute(FunctionContext context) throws Exception;",
"public void execute() {\n }",
"public interface PerformOperation {\n\n\tpublic String performOperation(int i);\n}",
"public void execute() {\r\n\t\r\n\t}",
"@Override\r\n\tpublic void execute() {\n\t}",
"@Override\r\n\tpublic void execute() {\n\t}",
"protected void execute() {\n \t// literally still do nothing\n }",
"public void execute();",
"public void execute();",
"public void execute();",
"public void execute();",
"protected abstract void work();",
"public void execute() {\n\t\t\n\t}",
"@Override\n\tpublic void execute() {\n\t}",
"@Override\r\n\tpublic void execute() throws Exception {\n\t\t\r\n\t}",
"public void execute(){\n\n }",
"public void execute() {\n\n\t}",
"@Override\n protected void execute() {\n \n }",
"@Override\n\tpublic String execute() throws Exception {\n\t\treturn super.execute();\n\t}",
"@Override\n\tpublic String execute() throws Exception {\n\t\treturn super.execute();\n\t}",
"@Override\n\tpublic String execute() throws Exception {\n\t\treturn super.execute();\n\t}",
"abstract protected DatabaseResponse<E> executeOperation( Connection connection ) throws LauncherPersistenceException;",
"public void execute() {\n\t\t\r\n\t}",
"public void execute() {\n\t\t\r\n\t}",
"public void execute() {\n\t\t\r\n\t}",
"protected abstract void execute() throws InterruptedException, SenseException;",
"abstract public void execute(Parameters p);",
"@Override\r\n\tprotected void processExecute() {\n\r\n\t}",
"@Override\r\n\tpublic void execute() {\n\r\n\t}",
"@Override\n\tpublic String execute() throws Exception {\n\t\t\n\t\treturn super.execute();\n\t}",
"public void Execute() {\n\n }",
"@Override\n public abstract void runOpMode();",
"@Override\n\tpublic void execute() {\n\t\trecevier.doSomething();\n\t}",
"public abstract boolean execute(ActionContext actionContext)\n throws Exception;",
"CommandResult execute();",
"void execute();",
"void execute();",
"void execute();",
"void execute();",
"void execute();",
"void execute();",
"void execute();",
"@Override\n\tfinal public void execute(IContext context) {\n\t\tsuper.execute(context);\n\t}",
"@Override\n\tprotected void doExecute() throws InstructionExecutionException {\n\t\n\t}",
"@Override\n public void alRechazarOperacion() {\n }",
"protected abstract O getResult();",
"protected abstract void executeInternal(JobExecutionContext context) throws JobExecutionException;",
"public interface IOperationExecutor {\n /**\n * execute operations with MixTape file.\n * @param mixTape the content of MixTape.json\n * @param operations action to be execute on MixTape file.\n * @throws Exception exceptions\n */\n void execute(\n final MixTape mixTape,\n final IOperation[] operations) throws Exception;\n}",
"public ResponseToCommand execute() {\n throw new UnsupportedOperationException(Messages.COMMAND_ABSTRACT_METHOD_ERROR);\n }",
"public void execute() {\n // empty\n }",
"@Override\n public void execute() {\n \n \n }"
]
| [
"0.79167855",
"0.7766065",
"0.7576407",
"0.7542968",
"0.7524921",
"0.7353964",
"0.7353964",
"0.7353964",
"0.72480357",
"0.7199618",
"0.7173559",
"0.71463245",
"0.71463245",
"0.71463245",
"0.71463245",
"0.71463245",
"0.71463245",
"0.71463245",
"0.71463245",
"0.71463245",
"0.71463245",
"0.71463245",
"0.71463245",
"0.71452045",
"0.71379054",
"0.7112664",
"0.703638",
"0.703638",
"0.7015576",
"0.69977164",
"0.699369",
"0.69737184",
"0.69737184",
"0.69737184",
"0.6957829",
"0.6943815",
"0.6929978",
"0.69024515",
"0.6893453",
"0.6866317",
"0.68233323",
"0.68103665",
"0.67707527",
"0.6767389",
"0.6657844",
"0.6652682",
"0.66396374",
"0.663745",
"0.6628755",
"0.66235906",
"0.6612496",
"0.65829563",
"0.65781546",
"0.6568756",
"0.65647656",
"0.65647656",
"0.6563564",
"0.6552429",
"0.6552429",
"0.6552429",
"0.6552429",
"0.6529442",
"0.6528935",
"0.65021396",
"0.6501712",
"0.6496405",
"0.6494707",
"0.64945686",
"0.64944905",
"0.64944905",
"0.64944905",
"0.6468774",
"0.64583427",
"0.64583427",
"0.64583427",
"0.64526504",
"0.64502275",
"0.64426047",
"0.64229023",
"0.6411034",
"0.6398389",
"0.63912594",
"0.63635117",
"0.63624156",
"0.6351916",
"0.63391954",
"0.63391954",
"0.63391954",
"0.63391954",
"0.63391954",
"0.63391954",
"0.63391954",
"0.6317245",
"0.6304026",
"0.62810105",
"0.6274461",
"0.6266818",
"0.6264073",
"0.6247519",
"0.62449604",
"0.624332"
]
| 0.0 | -1 |
Converts given price in pence. | protected int convertToPence(PriceModel number) {
return (number.getPounds() * ConstantUtil.PENCE_IN_POUND) + (number.getShillings() * ConstantUtil.PENCE_IN_SHILLING) + number.getPence();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setpPrice(double pPrice) {\n this.pPrice = pPrice;\n }",
"public void setpPrice(BigDecimal pPrice) {\n this.pPrice = pPrice;\n }",
"public void setPrice(double p) {\n\t\tprice = p;\n\t}",
"public void setPrice(BigDecimal price) {\n this.price = price;\n }",
"public void setPrice(BigDecimal price) {\n this.price = price;\n }",
"public void setPrice(double p)\r\n\t{\r\n\t\tprice = p;\r\n\t}",
"public void setPrice(BigDecimal price) {\r\n this.price = price;\r\n }",
"public void setPrice(BigDecimal price) {\r\n this.price = price;\r\n }",
"@Override\n public void onPriceChange(String price) {\n poll.setPrice(YelpPriceLevel.fromYelpString(price));\n }",
"public void setPrice(java.math.BigDecimal price) {\n this.price = price;\n }",
"BigDecimal getPrice();",
"public void setPrice(final BigDecimal price) {\n this.price = price;\n }",
"public void setPrice(Money price) {\n this.price = price;\n }",
"public BigDecimal getpPrice() {\n return pPrice;\n }",
"public void setPrice(String price) {\n\t\tthis.price = price;\n\t}",
"@Override\r\n\tpublic void setPrice(double p) {\n\t\tprice = p;\r\n\t}",
"public String getFormattedPrice() {\n NumberFormat ukFormat = NumberFormat.getCurrencyInstance(Locale.UK);\n ukFormat.setMinimumFractionDigits(2);\n ukFormat.setMaximumFractionDigits(2);\n BigDecimal result = new BigDecimal(\"0.00\");\n if (baseSize != null) {\n result = baseSize.getPrice();\n Double multiplier = baseSize.getMultiplier();\n for (ToppingEntity topping : toppings) {\n topping.setMultiplier(multiplier);\n result = result.add(topping.getPrice());\n }\n }\n return ukFormat.format(result.doubleValue());\n }",
"public double price(){\n if (basePrice() >1000){\n return basePrice() *0.95;\n }else\n return basePrice() * 0.98;\n }",
"public void setPrice(java.lang.String price) {\n this.price = price;\n }",
"public static String formatPrice(double price) {\n return priceDecimalFormat.format(price);\n }",
"String getPrice() {\n return Double.toString(price);\n }",
"@Override\n\tpublic Price convertToCurrency(Price price, Currency currency) {\n if (price == null || currency == null) {\n throw new IllegalArgumentException(\"Price or currency is null\");\n }\n\n\t\tBigDecimal convertRate = CurrencyRateUtils.getCurrencyRate(price.getCurrency(), currency);\n if (convertRate == null) {\n convertRate = BigDecimal.ONE;\n }\n\n BigDecimal newPrice = price.getValue().multiply(convertRate).setScale(2, RoundingMode.HALF_UP);\n price.setValue(newPrice);\n\n return price;\n\t}",
"public void setPrice(int price) {\n this.price = (double)price;\n }",
"public void setPrice(double price) {\n this.price = price;\n }",
"public void setPrice(double price) {\n this.price = price;\n }",
"public void setPrice(double price) {\n this.price = price;\n }",
"public void setPrice(double price) {\n this.price = price;\n }",
"public void setPrice(double price) {\n this.price = price;\n }",
"public void setPrice(double price) {\n this.price = price;\n }",
"public void setPrice(double price) {\n this.price = price;\n }",
"public void setPrice(double price)\n {\n this.price = price;\n }",
"public void setPrice(double price) {\r\n this.price = price;\r\n }",
"public void setPrice(double price) {\r\n this.price = price;\r\n }",
"public void setPrice(double price) {\r\n this.price = price;\r\n }",
"public void setPurchasePrice(double p)\n {\n this.purchasePrice = p;\n }",
"public void setPrice(double p){\n\t\t// store into the instance variable price the value of the parameter p\n\t\tprice = p;\n\t}",
"public void setPrice(double price) {\n\t\tthis.price = price;\n\t}",
"public void setPrice(double price) {\n\t\tthis.price = price;\n\t}",
"public void setPrice(double price) {\n\t\tthis.price = price;\n\t}",
"public void setPrice(double price) {\r\n\t\tthis.price = price;\r\n\t}",
"public void setPrice(double price) {\r\n\t\tthis.price = price;\r\n\t}",
"public void setPrice(double price) \n\t{\n\t\tthis.price = price;\n\t}",
"public void setPrice(Float price) {\n this.price = price;\n }",
"public void setPrice(Double price) {\n this.price = price;\n }",
"public void setPrice(Double price) {\n this.price = price;\n }",
"public double getpPrice() {\n return pPrice;\n }",
"public void setPrice(float price) {\n this.price = price;\n }",
"public void setPrice(float price) {\n this.price = price;\n }",
"private String getFormattedPrice(double unformattedPrice) {\n String formattedData = String.format(\"%.02f\", unformattedPrice);\n return formattedData;\n }",
"public void setPrice(double price)\n {\n this.price = price;\n }",
"private static double parsePrice(String price) {\n if (price.startsWith(\"$\")) {\n price = price.substring(1);\n }\n\n try {\n return Double.parseDouble(price);\n } catch (NumberFormatException e) {\n return Double.NEGATIVE_INFINITY;\n }\n }",
"public void setPrice(Double price) {\r\n this.price = price;\r\n }",
"public void setPotatoesPrice(double p) {\n this.potatoesPrice = p;\n }",
"public void setPrice(Float price) {\r\n this.price = price;\r\n }",
"public BigDecimal getPrice() {\r\n return price;\r\n }",
"public BigDecimal getPrice() {\r\n return price;\r\n }",
"@Override\n\tpublic void setPrice(double price) {\n\t\tconstantPO.setPrice(price);\n\t}",
"public double getPrice() {\n double price = BASE_PRICE;\n for (Topping topping : toppings) {\n if (topping.isPremium()) {\n price += 1.25;\n } else {\n price += 0.75;\n }\n }\n return price;\n }",
"CleanPrice getCleanPrice();",
"double computePrintingCost(double price){\n //TODO calculate price and return it\n return price * printer.countCharactersPrinted();\n }",
"public void changePrice(TripDTO trip, BigDecimal price);",
"public BigDecimal getPrice() {\n return price;\n }",
"public BigDecimal getPrice() {\n return price;\n }",
"public BigDecimal getPrice() {\n return price;\n }",
"public BigDecimal getPrice() {\n return price;\n }",
"public BigDecimal getPrice() {\n return price;\n }",
"public BigDecimal getPriceActual();",
"public void setPrice(Double price) {\n\t\tthis.price = price;\n\t}",
"public interface PriceProvider {\n /**\n * Get the current price.\n *\n * @return current price as a decimal string\n */\n String getPrice();\n }",
"public String getProductKindlePrice() {\n\t\tString kindleWholePrice = driver\n\t\t\t\t.findElements(By.cssSelector(getLocator(search_result_page_prod_paper_price_whole))).get(1).getText();\n\t\tString kindleCurrency = driver\n\t\t\t\t.findElements(By.cssSelector(getLocator(search_result_page_prod_paper_price_currency))).get(1)\n\t\t\t\t.getText();\n\t\tString kindleFracPrice = driver\n\t\t\t\t.findElements(By.cssSelector(getLocator(search_result_page_prod_paper_price_fractional))).get(1)\n\t\t\t\t.getText();\n\t\tString kindlePrice = kindleCurrency + kindleWholePrice + \".\" + kindleFracPrice;\n\t\treturn kindlePrice;\n\n\t}",
"public String getPriceString() {\n\t\treturn Utils.formatCurrencyNumber(price);//Double.toString(price.doubleValue()); //price.toString();\n\t}",
"double calculatePrice();",
"Price getTradePrice();",
"public BigDecimal getPrice()\n\t{\n\t\treturn price;\n\t}",
"public void setO_price(BigDecimal o_price) {\n this.o_price = o_price;\n }",
"public BigDecimal\tgetPrice();",
"private void peso(){\r\n if(getPeso()>80){\r\n precioBase+=100;\r\n }\r\n else if ((getPeso()<=79)&&(getPeso()>=50)){\r\n precioBase+=80;\r\n }\r\n else if ((getPeso()<=49)&&(getPeso()>=20)){\r\n precioBase+=50;\r\n }\r\n else if ((getPeso()<=19)&&(getPeso()>=0)){\r\n precioBase+=10;\r\n }\r\n }",
"double getPrice();",
"double getPrice();",
"double getPrice();",
"BigDecimal getOpenPrice();",
"String getPrice();",
"public void setPrice(Long price) {\n this.price = price;\n }",
"BigDecimal getLowPrice();",
"public float PercentPL() {\n\t\tif (!isClosed()) {\r\n\t\t\tSystem.err.println(\"Cannot compute PL if trade is on\");\r\n\t\t\treturn -1f;\r\n\t\t}\r\n\t\tif(dir == Direction.LONG) {//If long\r\n\t\t\t//(Sell price - Buy price) / Buy price * 100\r\n\t\t\treturn ((exitPrice - entryPrice)/entryPrice)*100;\r\n\t\t}\r\n\t\t//If short\r\n\t\t//(Sell price - Buy price) / Sell price * 100\r\n\t\treturn ((entryPrice - exitPrice)/entryPrice)*100;\r\n\t}",
"public void changePrice(Product p, int price){\r\n\t\tp.price = price;\r\n\t}",
"public String getPriceOfArticle(Document document) {\n\t\tString price = \"\";\n\t\t// <p class=\"price\" itemprop=\"offers\" itemscope \n\t\t// \titemtype=\"http://schema.org/Offer\"><span data-currency=\"EUR\" itemprop=\"price\">€1,698</span></p>\n\t\t// Peut etre sélectionner la div \"details\" avant de chercher les p ? \n\t\tElements priceElements = document.getElementsByClass(\"price\");\n\t\tfor (Element priceElement : priceElements) {\n\t\t\t// Get the name if the item\n\t\t\t// <p class=\"style protect\" itemprop=\"model\">White</p>\n\t\t\tif (priceElement.attr(\"itemprop\").equals(\"price\")) {\n\t\t\t\t// get the inner text of the html tag if we are on the item name \n\t\t\t\treturn price = priceElement.text(); \n\t\t\t}\n\t\t}\n\t\treturn price;\n\t}",
"org.adscale.format.opertb.AmountMessage.Amount getExchangeprice();",
"long getPrice();",
"org.adscale.format.opertb.AmountMessage.Amount getCampaignprice();",
"public void setPrice(double value) {\n this.price = value;\n }",
"public void setPrice(double value) {\n this.price = value;\n }",
"public void setPrice(double price) {\n this.price = price;\n if (this.price < 0) {\n this.price = 0;\n }\n }",
"@Override\n\tpublic void setPrice() {\n\t\tprice = 24.99;\n\n\t}",
"public static String getPrice(String s) {\n\t\t// HINT: This method returns a blank String, but that's not right. \n\t\t// Fix this function so it calls calculateCost() to get the price.\n\t\t// If calculateCost() returns -1, return \"UNMAILABLE\", but if \n\t\t// calculateCost() returns any other double, convert it to a String\n\t\t// and return it.\n\t\treturn \"\";\n\t}",
"public void setPrice(String price) {\n this.price = price == null ? null : price.trim();\n }",
"public void setInputPrice(BigDecimal inputPrice) {\r\n this.inputPrice = inputPrice;\r\n }",
"void calculate() {\n if (price <= 1000)\n price = price - (price * 2 / 100);\n else if (price > 1000 && price <= 3000)\n price = price - (price * 10 / 100);\n else\n price = price - (price * 15 / 100);\n }",
"public String getPrice() {\n return price;\n }",
"public String getPrice() {\n return price;\n }"
]
| [
"0.6321887",
"0.6275338",
"0.6240325",
"0.6159693",
"0.6159693",
"0.6145917",
"0.61339164",
"0.61339164",
"0.61265445",
"0.60959667",
"0.6093306",
"0.6015514",
"0.59783435",
"0.5957729",
"0.59476876",
"0.59127575",
"0.590335",
"0.58973706",
"0.58958817",
"0.58668065",
"0.58522356",
"0.58420676",
"0.58097565",
"0.5802836",
"0.5802836",
"0.5802836",
"0.5802836",
"0.5802836",
"0.5802836",
"0.5802836",
"0.57749075",
"0.5769657",
"0.5769657",
"0.5769657",
"0.57616",
"0.5749488",
"0.5739808",
"0.5739808",
"0.5739808",
"0.5728062",
"0.5728062",
"0.57195264",
"0.5718614",
"0.57102144",
"0.57102144",
"0.5706746",
"0.5705657",
"0.5705657",
"0.5705376",
"0.57042193",
"0.56940526",
"0.5686341",
"0.5682805",
"0.56772465",
"0.5676776",
"0.5676776",
"0.567671",
"0.5668902",
"0.5648987",
"0.563837",
"0.5635945",
"0.563444",
"0.563444",
"0.563444",
"0.563444",
"0.563444",
"0.5623395",
"0.5612614",
"0.5607244",
"0.5607103",
"0.56011134",
"0.5598008",
"0.5594211",
"0.5562045",
"0.5559029",
"0.55575806",
"0.5553049",
"0.55527997",
"0.55527997",
"0.55527997",
"0.5538265",
"0.55369663",
"0.55331504",
"0.55291843",
"0.55253476",
"0.5523925",
"0.5517118",
"0.5516637",
"0.55115116",
"0.55108434",
"0.550182",
"0.550182",
"0.55017465",
"0.54924494",
"0.54791343",
"0.5474895",
"0.5474055",
"0.5471958",
"0.5469233",
"0.5469233"
]
| 0.66336393 | 0 |
Returns price created from pence. | public String createResult(int resultInPence) {
log.trace(">> createResult() > resultInPence: {}", resultInPence);
int pounds = resultInPence / ConstantUtil.PENCE_IN_POUND;
int shillings = (resultInPence - (pounds * ConstantUtil.PENCE_IN_POUND)) / ConstantUtil.PENCE_IN_SHILLING;
int pence = (resultInPence - (pounds * ConstantUtil.PENCE_IN_POUND)) - (shillings * ConstantUtil.PENCE_IN_SHILLING);
String result = createStringFromResult(pounds, shillings, pence);
log.trace("<< createResult() < result: {}", result);
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BigDecimal getpPrice() {\n return pPrice;\n }",
"Price getTradePrice();",
"BigDecimal getPrice();",
"public double getpPrice() {\n return pPrice;\n }",
"double getPrice();",
"double getPrice();",
"double getPrice();",
"Price getPrice() throws Exception;",
"long getPrice();",
"public BigDecimal getPrice() {\r\n return price;\r\n }",
"public BigDecimal getPrice() {\r\n return price;\r\n }",
"public BigDecimal\tgetPrice();",
"public BigDecimal getPrice()\n\t{\n\t\treturn price;\n\t}",
"public BigDecimal getPrice() {\n return price;\n }",
"public BigDecimal getPrice() {\n return price;\n }",
"public BigDecimal getPrice() {\n return price;\n }",
"public BigDecimal getPrice() {\n return price;\n }",
"public BigDecimal getPrice() {\n return price;\n }",
"public double getPrice() {\n return price_;\n }",
"public double getPrice() {\n double price = BASE_PRICE;\n for (Topping topping : toppings) {\n if (topping.isPremium()) {\n price += 1.25;\n } else {\n price += 0.75;\n }\n }\n return price;\n }",
"public Money getPrice() {\n\t\treturn price;\n\t}",
"public Money getPrice() {\n return price;\n }",
"public double getPrice() {\n return price_;\n }",
"public double price() {\n return price;\n }",
"public double getPriceOfPeaches() {\n return priceOfPeaches;\n }",
"public Double getPrice();",
"public double getPrice();",
"public double getPrice() {\n return price;\n }",
"public BigDecimal getPriceEntered();",
"String getPrice();",
"public Number getPrice() {\n return (Number)getAttributeInternal(PRICE);\n }",
"public double getPrice(){\r\n\t\treturn price;\r\n\t}",
"public double getPrice(){\n\t\t\treturn price;\n\t\t}",
"public Double getPrice() {\r\n return price;\r\n }",
"public java.math.BigDecimal getPrice() {\n return price;\n }",
"public double getPrice(){\n\t\t\n\t\treturn price;\n\t}",
"public double getPrice() {\r\n return price;\r\n }",
"public double getPrice() {\r\n return price;\r\n }",
"public double getPrice() {\r\n return price;\r\n }",
"public double getPrice() {\r\n return price;\r\n }",
"public long getPrice() {\n return price;\n }",
"public BigDecimal getPriceActual();",
"@Override\n\tpublic double getPrice() {\n\t\t\n\t\treturn 2000;\n\t}",
"public double getPrice() {\n return price;\n }",
"public double getPrice() {\n return price;\n }",
"public double getPrice() {\n return price;\n }",
"public double getPrice() {\n return price;\n }",
"public double getPrice() {\n return price;\n }",
"public double getPrice() {\n return price;\n }",
"public double getPrice() {\n return price;\n }",
"public double getPrice() {\n return price;\n }",
"public double getPrice() {\n return price;\n }",
"public double getPrice() {\n return price;\n }",
"public double getPrice() {\n return price;\n }",
"public double getPrice()\n {\n \treturn price;\n }",
"public Double getPrice() {\n return price;\n }",
"public Double getPrice() {\n return price;\n }",
"public double getPrice(){\n\t\treturn price;\n\t}",
"public double getPrice() \n\t{\n\t\treturn price;\n\t}",
"public double getPrice() \n\t{\n\t\treturn price;\n\t}",
"public double getPrice()\n {\n return this.price;\n }",
"public ArmCurrency getPrice() {\n return (getPrice(true));\n }",
"public double getPrice(){\n\t\treturn this.price;\n\t}",
"public double getPrice()\r\n {\r\n return price;\r\n }",
"public Double getPrice() {\r\n\t\treturn price;\r\n\t}",
"public BigDecimal getPrice() {\n return (BigDecimal)getAttributeInternal(PRICE);\n }",
"public double getPrice() {\n return this.price;\n }",
"@Override\r\n\tpublic double getPrice() {\n\t\treturn price;\r\n\t}",
"public Long getPrice() {\n return price;\n }",
"public double getPrice()\n {\n return price;\n }",
"public double getPrice() {\r\n\t\treturn this.price;\r\n\t}",
"public double getPrice() {\r\n\t\treturn this.price;\r\n\t}",
"public double getPrice() {\r\n\t\treturn this.price;\r\n\t}",
"org.adscale.format.opertb.AmountMessage.Amount getCampaignprice();",
"public double getPrice() {\n\t\treturn this.price;\n\t\t\n\t}",
"public double getPrice() {\n\t\treturn price;\n\t}",
"public double getPrice() {\n\t\treturn price;\n\t}",
"public double getPrice() {\n\t\treturn price;\n\t}",
"public double getPrice() {\n\t\treturn price;\n\t}",
"public double getPrice() {\n\t\treturn price;\n\t}",
"public double getPrice()\n\t{\n\t\treturn this.price;\n\t}",
"public double getPrice()\r\n {\r\n return this.price;\r\n }",
"public double getPrice(){\n\t\treturn Price; // Return the product's price\n\t}",
"public Double getPrice() {\n\t\treturn price;\n\t}",
"@Override\n\tpublic double getPrice() {\n\t\treturn constantPO.getPrice();\n\t}",
"double getPricePerPerson();",
"double purchasePrice();",
"public double getPrice() {\n\t\treturn this.price;\n\t}",
"protected float getPrice() {\n\t\t\treturn price;\n\t\t}",
"BigDecimal getOpenPrice();",
"public float getPrice() {\n return price;\n }",
"public float getPrice() {\n return price;\n }",
"public float getPrice() {\n return price;\n }",
"public float getPrice() {\n return _price;\n }",
"public Float getPrice() {\n return price;\n }",
"CleanPrice getCleanPrice();",
"public double getPrice() {\n\t\t\treturn price;\n\t\t}",
"@Override\r\n\tpublic double getPrice() {\n\t\treturn pizza.getPrice()+ 12.88;\r\n\t}",
"public Float getPrice() {\r\n return price;\r\n }",
"public String getPrice() {\n return price;\n }",
"public String getPrice() {\n return price;\n }"
]
| [
"0.6800707",
"0.6775966",
"0.6760163",
"0.668754",
"0.6644086",
"0.6644086",
"0.6644086",
"0.6618173",
"0.65919167",
"0.65282255",
"0.65282255",
"0.65227795",
"0.65183043",
"0.65134656",
"0.65134656",
"0.65134656",
"0.65134656",
"0.65134656",
"0.64549184",
"0.6448145",
"0.6413833",
"0.641249",
"0.6404751",
"0.64046234",
"0.6392677",
"0.63778555",
"0.6365985",
"0.6356992",
"0.63533205",
"0.63260555",
"0.63146377",
"0.63103276",
"0.63058627",
"0.63047004",
"0.6296744",
"0.62906975",
"0.62886435",
"0.62886435",
"0.62886435",
"0.62886435",
"0.62845117",
"0.62802523",
"0.62786835",
"0.6274687",
"0.6274687",
"0.6274687",
"0.6274687",
"0.6274687",
"0.6274687",
"0.6274687",
"0.6274687",
"0.6274687",
"0.6274687",
"0.6274687",
"0.6273148",
"0.6270669",
"0.6270669",
"0.62657046",
"0.6253625",
"0.6253625",
"0.62520957",
"0.6249223",
"0.62460434",
"0.6241767",
"0.62368655",
"0.62363136",
"0.6229374",
"0.62213105",
"0.62116396",
"0.6204585",
"0.6198324",
"0.6198324",
"0.6198324",
"0.6186234",
"0.6181667",
"0.61797655",
"0.61797655",
"0.61797655",
"0.61797655",
"0.61797655",
"0.61793375",
"0.617838",
"0.6170573",
"0.6169846",
"0.61696935",
"0.61595243",
"0.6155472",
"0.6146426",
"0.614252",
"0.6136582",
"0.6134756",
"0.6134756",
"0.6134756",
"0.613003",
"0.6102151",
"0.61003625",
"0.6097164",
"0.6093877",
"0.6092621",
"0.60851127",
"0.60851127"
]
| 0.0 | -1 |
Returns string created from price. | private String createStringFromResult(int pounds, int shillings, int pence) {
log.trace(">> createStringFromResult() > pounds: {}, shillings: {}, pence: {}", pounds, shillings, pence);
StringBuilder stringResult = new StringBuilder();
appendData(stringResult, pounds, PriceType.POUND);
appendData(stringResult, shillings, PriceType.SHILLING);
appendData(stringResult, pence, PriceType.PENCE);
log.trace("<< createStringFromResult() < result: {}", stringResult);
return stringResult.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getPriceString() {\n\t\treturn Utils.formatCurrencyNumber(price);//Double.toString(price.doubleValue()); //price.toString();\n\t}",
"String getPrice() {\n return Double.toString(price);\n }",
"String getPrice();",
"private String getFormattedPrice(double unformattedPrice) {\n String formattedData = String.format(\"%.02f\", unformattedPrice);\n return formattedData;\n }",
"public String getProdDetailsPrice(){\n String prodPrice = productDetailsPrice.toString();\n return prodPrice;\n }",
"public String getFormattedPrice() {\n NumberFormat ukFormat = NumberFormat.getCurrencyInstance(Locale.UK);\n ukFormat.setMinimumFractionDigits(2);\n ukFormat.setMaximumFractionDigits(2);\n BigDecimal result = new BigDecimal(\"0.00\");\n if (baseSize != null) {\n result = baseSize.getPrice();\n Double multiplier = baseSize.getMultiplier();\n for (ToppingEntity topping : toppings) {\n topping.setMultiplier(multiplier);\n result = result.add(topping.getPrice());\n }\n }\n return ukFormat.format(result.doubleValue());\n }",
"public static String formatPrice(Double price) {\n if (price == null) return \"\";\n return formatPrice(price.doubleValue());\n }",
"public static String formatPrice(double price) {\n return priceDecimalFormat.format(price);\n }",
"@Override\n\tpublic String toString() {\n\t\treturn String.format(\"%s: $%.2f\", name, price);\n\t}",
"public static String getPrice(String s) {\n\t\t// HINT: This method returns a blank String, but that's not right. \n\t\t// Fix this function so it calls calculateCost() to get the price.\n\t\t// If calculateCost() returns -1, return \"UNMAILABLE\", but if \n\t\t// calculateCost() returns any other double, convert it to a String\n\t\t// and return it.\n\t\treturn \"\";\n\t}",
"public void getPrice(){\n System.out.println(\"Price: $\" + price); \n }",
"public String getPriceFormatted(double ticketPrice) {\n\t\tString formattedPrice = NumberFormat.getCurrencyInstance().format(ticketPrice);\n return formattedPrice;\n }",
"public String getBSCA_PrintPrice2();",
"public String getPrice() {\n return price;\n }",
"public String getPrice() {\n return price;\n }",
"public java.lang.String getPrice() {\n return price;\n }",
"private String marketPrices() {\r\n\t\tdouble[] prices=market.getPrices();\r\n\t\tString out = \"Prices Are: \";\r\n\t\tfor(int i=0; i<prices.length;i++) {\r\n\t\t\tout=out.concat(i+\": \"+String.format(\"%.2f\", prices[i])+\" || \");\r\n\t\t}\r\n\t\treturn out;\r\n\t}",
"public String getPriceText(){\n\t\treturn getPriceElement().getText();\n\t}",
"@Override\n\tpublic String showPrice() {\n\t\treturn \"煎饼的价格是5元 \";\n\t}",
"public String toString(){\n\t\tNumberFormat nf = NumberFormat.getCurrencyInstance();\r\n\t\tString lastprice = nf.format(this.price);\r\n\t\tString lasttprice = nf.format(this.bulkP);\r\n\t\tif (this.bulkQ == 0){\r\n\t\t\treturn (this.name + \", \" + lastprice);\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn this.name + \", \" + lastprice + \" (\" + bulkQ + \" for \" + lasttprice + \")\";\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\n public String toString() {\n String text = \"\";\n\n text += super.toString();\n text += \"Potatoes price per kilo: \" + potatoesPrice + \" €\"; \n return text;\n }",
"public void getPrice() {\n\t System.out.println(\"Price: $\" + price);\n }",
"public String getDetailString()\n {\n short type = this.getType();\n StringBuffer buffer = new StringBuffer(PriceAdjustmentTypes.toString(type));\n switch(type)\n {\n case PriceAdjustmentTypes.SPLIT:\n buffer.append(\": \");\n buffer.append(this.getSplitNumerator()).append(\" for \").append(this.getSplitDenominator());\n break;\n // SYMBOL_CHANGE and MERGER only change the product symbol\n case PriceAdjustmentTypes.SYMBOL_CHANGE:\n case PriceAdjustmentTypes.MERGER:\n buffer.append(\": \");\n String symbol = getNewProductSymbol();\n if (symbol!=null && symbol.length() > 0)\n {\n buffer.append(\"New Symbol: \").append(symbol);\n }\n else\n {\n buffer.append(\"No Symbol Change.\");\n }\n break;\n case PriceAdjustmentTypes.DIVIDEND_CASH:\n buffer.append(\": \");\n buffer.append('$').append(this.getCashDividend().toString());\n break;\n case PriceAdjustmentTypes.DIVIDEND_STOCK:\n buffer.append(\": \");\n buffer.append(this.getStockDividend().toString()).append(\" shares.\");\n break;\n case PriceAdjustmentTypes.DIVIDEND_PERCENT:\n buffer.append(\": \");\n buffer.append(this.getStockDividend().toString()).append('%');\n break;\n case PriceAdjustmentTypes.COMMON_DISTRIBUTION:\n break;\n case PriceAdjustmentTypes.LEAP_ROLLOVER:\n break;\n default:\n break;\n }\n return buffer.toString();\n }",
"public String getProductKindlePrice() {\n\t\tString kindleWholePrice = driver\n\t\t\t\t.findElements(By.cssSelector(getLocator(search_result_page_prod_paper_price_whole))).get(1).getText();\n\t\tString kindleCurrency = driver\n\t\t\t\t.findElements(By.cssSelector(getLocator(search_result_page_prod_paper_price_currency))).get(1)\n\t\t\t\t.getText();\n\t\tString kindleFracPrice = driver\n\t\t\t\t.findElements(By.cssSelector(getLocator(search_result_page_prod_paper_price_fractional))).get(1)\n\t\t\t\t.getText();\n\t\tString kindlePrice = kindleCurrency + kindleWholePrice + \".\" + kindleFracPrice;\n\t\treturn kindlePrice;\n\n\t}",
"public java.lang.String toString() {\n\t\tString s=\"\";\n\t\ts+=String.format(\"%.2f\", weight);\n\t\t//s+=Double.toString(weight);\n\t\ts+=\" lbs. @ \";\n\t\ts+=DessertShoppe.cents2dollarsAndCents(price_per_pound);\n\t\ts+=\" /lb.\\t \\n\";\n\t\ts+=String.format(\"%-25s%6s\\n\",name, DessertShoppe.cents2dollarsAndCents(this.getCost()));\n\t\treturn s;\n\t}",
"public String toString()\n {\n \tNumberFormat fmt = NumberFormat.getCurrencyInstance();\n \tString item;\n \tif (name.length() >= 8)\n \t\titem = name + \"\\t\";\n \telse\n \t\titem = name + \"\\t\\t\";\n \treturn (item + \" \" + fmt.format(price) + \"\\t \" + quantity \n \t\t\t+ \"\\t\\t\" + fmt.format(price*quantity));\n }",
"public String getPriceVal() {\n return price.getText().toString().length() == 0 ? \"0\" : price.getText().toString();\n }",
"public String getPriceOfArticle(Document document) {\n\t\tString price = \"\";\n\t\t// <p class=\"price\" itemprop=\"offers\" itemscope \n\t\t// \titemtype=\"http://schema.org/Offer\"><span data-currency=\"EUR\" itemprop=\"price\">€1,698</span></p>\n\t\t// Peut etre sélectionner la div \"details\" avant de chercher les p ? \n\t\tElements priceElements = document.getElementsByClass(\"price\");\n\t\tfor (Element priceElement : priceElements) {\n\t\t\t// Get the name if the item\n\t\t\t// <p class=\"style protect\" itemprop=\"model\">White</p>\n\t\t\tif (priceElement.attr(\"itemprop\").equals(\"price\")) {\n\t\t\t\t// get the inner text of the html tag if we are on the item name \n\t\t\t\treturn price = priceElement.text(); \n\t\t\t}\n\t\t}\n\t\treturn price;\n\t}",
"public String toStringAlt() {\n\t\t\n\t\tStringBuilder sb = new StringBuilder(\"$\");\n\t\tFormatter f = new Formatter(sb);\n\t\tf.format(\"%.2f\", cost);\n\t\tf.close();\n\t\tsb.append(\" \")\n\t\t .append(make).append(\" \")\n\t\t .append(model).append(\" for day \")\n\t\t .append(startDay.getDay())\n\t\t .append(\" to day \")\n\t\t .append(endDay.getDay());\n\t\treturn sb.toString();\n\t\t\n\t}",
"public String toString(){\r\n String output = \"\";\r\n //Display the name \r\n output += this.name;\r\n //Turn the cost int in cents to a string in dollars\r\n String totalcost = DessertShoppe.cents2dollarsAndCents(getCost());\r\n //Print out a space between the name and where the cost needs to be\r\n for (int i = this.name.length(); i < DessertShoppe.RECEIPT_WIDTH - totalcost.length(); i++){\r\n output+=\" \";\r\n }\r\n //Print outt he cost string with the dollar sign\r\n output += totalcost;\r\n return output;\r\n \r\n }",
"protected String getFormattedItemPrice() {\n return formattedItemPrice;\n }",
"double computePrintingCost(double price){\n //TODO calculate price and return it\n return price * printer.countCharactersPrinted();\n }",
"@Override\r\n\t\t\tpublic String getPrice() {\n\t\t\t\treturn this.getName();\r\n\t\t\t}",
"@Override\n public String toString() {\n return super.toString() + pizzaPrice() + \".00\\n\";\n }",
"public String toString(){\n\t String output = String.format(\"Ticket ##: %d\\nPrice: $%.2f\\n\", this.ticketNumber, this.getPrice());\n\t\treturn output;\n\t}",
"public String getCanonicalUnitPrice()\n {\n String retName = null;\n\n // Expecting the linked list to be sorted\n for(Unit unit : measurementUnits)\n if(unit.getValue() <= size)\n retName = size + \" \" + unit.getName() + \" per \" + price.getValue() + \" satoshi\";\n else\n break;\n\n return retName;\n }",
"double getPrice();",
"double getPrice();",
"double getPrice();",
"TickerPrice getPrice(String symbol);",
"BigDecimal getPrice();",
"public String toString() {\n return \"\" + year + \" \" + make + \" \" + model + \", \" + color + \", \" + getTrans() + \", $\" + price;\n }",
"CleanPrice getCleanPrice();",
"public String toString()\r\n {\r\n return super.toString() + \"\\nPrice: $\" + this.pizzaPrice();\r\n }",
"public String getBuyprice() {\n return buyprice;\n }",
"public String getProductPaperBackPrice() {\n\t\tString paperBackWholePrice = driver\n\t\t\t\t.findElements(By.cssSelector(getLocator(search_result_page_prod_paper_price_whole))).get(0).getText();\n\t\tString paperBackCurrency = driver\n\t\t\t\t.findElements(By.cssSelector(getLocator(search_result_page_prod_paper_price_currency))).get(0)\n\t\t\t\t.getText();\n\t\tString paperBackFracPrice = driver\n\t\t\t\t.findElements(By.cssSelector(getLocator(search_result_page_prod_paper_price_fractional))).get(0)\n\t\t\t\t.getText();\n\t\tString paperBackPrice = paperBackCurrency + paperBackWholePrice + \".\" + paperBackFracPrice;\n\t\treturn paperBackPrice;\n\t}",
"long getPrice();",
"public static String priceVNFormat(float price) {\r\n\t\tString prices = String.valueOf(new Float(price).intValue());\r\n\t\tString temp = \"\";\r\n\t\tint i;\r\n\t\tfor (i = prices.length(); i >= 3; i -= 3) {\r\n\t\t\ttemp = prices.substring(i - 3, i) + \".\" + temp;\r\n\r\n\t\t}\r\n\t\tif (i != 0) {\r\n\t\t\ttemp = prices.substring(0, i) + \".\" + temp;\r\n\r\n\t\t}\r\n\t\treturn temp.substring(0, temp.length() - 1);\r\n\t}",
"public String toString()\n {\n DecimalFormat df = new DecimalFormat(\"#.00\");\n String words = getOptionName() + \": $\" + df.format(getOptionPrice()) + \".\";\n return words;\n }",
"public String toString()\r\n\t{\r\n\t\tString output = \" \";\r\n\t\tString specialModifier = \" \";\r\n\t\tif(this.isSpecial())\r\n\t\t{\r\n\t\t\tspecialModifier = \" *\";\r\n\t\t}\r\n\t\t\t\r\n\t\toutput = String.format(\"%-9s%-5s%-19s%s%.2f\",getType(), specialModifier, this.getName(),\"$ \", this.getPrice());\r\n\t\t//code to be done here\r\n\t\t\r\n\t\t\r\n\t\treturn output;\r\n\t}",
"public String toString() {\n return \"$\"+getDollars() +\".\"+ getCents();\n }",
"public double price() {\n return price;\n }",
"@Override\n public String toString() {\n\n //convert cents to dollars using cents2dollarsAndCents\n String output = DessertShoppe.cents2dollarsAndCents(this.getCost());\n //create string storing cost in a string \n String costLength = Integer.toString(this.getCost());\n //find spacing needed between name and cost in reciept by subtracting 30(total spaces) by \n //length of name and length of cost\n int spacing = 30 - super.getName().length() - costLength.length() - 1;\n //loop through an add a space each time up to \"spacing\" integer\n for (int i = 0; i < spacing; i++) {\n output = \" \" + output;\n }\n //return name of cookie along with cost along with the right format posting amount of pounds with cost per pound\n return this.weight + \" lbs. \" + \"@ $\" + DessertShoppe.cents2dollarsAndCents(this.pricePerLbs) + \" /lb.\\n\" + this.getName() + output;\n }",
"@Override\n\tpublic java.lang.String getPrice() {\n\t\treturn _lineaGastoCategoria.getPrice();\n\t}",
"public double getItemPrice(){\n\t\t\t String priceStr;\n\t\t\t double price;\n\t\t\t String elemVal = driver.findElement(productPrice).getText();\n\t Reporter.log(\"==========Item Price is \" + elemVal + \"=======\", true);\n\t priceStr = elemVal.substring(1, elemVal.length());\n\t //return double as it is a price\n\t price = Double.parseDouble(priceStr);\n\t return price;\n\t }",
"@Override\n public String toString() {\n return \"\" + currency + amount;\n }",
"public String getQuote() {\r\n\t\tString qt = this.getName() + \" (\" + this.getSymbol() + \")\\n\" + \"Price: \" + this.getLastPrice() + \"\\t\" + \"hi: \"\r\n\t\t\t\t+ this.getHighPrice() + \"\\t\" + \"low: \" + this.getLowPrice() + \"\\t\" + \"vol: \" + this.getVol() + \"\\n\";\r\n\t\tqt += \"Ask: \";\r\n\t\tif (!buy.isEmpty()) {\r\n\t\t\tqt += buy.peek().getPrice();\r\n\t\t\tqt += \" size: \" + buy.peek().getShares();\r\n\t\t} else\r\n\t\t\tqt += \"none \";\r\n\r\n\t\tqt += \"Bid: \";\r\n\t\tif (!sell.isEmpty()) {\r\n\t\t\tqt += sell.peek().getPrice();\r\n\t\t\tqt += \"size: \" + sell.peek().getShares();\r\n\t\t} else\r\n\t\t\tqt += \"none \";\r\n\t\treturn qt;\r\n\t}",
"private String getShippingPrice(Document item) {\n String result;\n result = item.select(\"span[class^=shippingPrice]\").html();\n return result;\n }",
"public String getPricePro() {\n return pricePro;\n }",
"private String formatPrice(BigDecimal adjustedListPrice) {\n\t\tif (adjustedListPrice != null) {\n\t\t\tNumberFormat currencyFormatter = NumberFormat\n\t\t\t\t\t.getCurrencyInstance(Locale.US);\n\n\t\t\treturn currencyFormatter.format(adjustedListPrice);\n\n\t\t}\n\t\treturn null;\n\t}",
"public String toString(){\n return String.format(\"%s, %s, %s, %s, %s, %s\",make,model,variant, year, quantity,price);\n }",
"org.adscale.format.opertb.AmountMessage.Amount getCampaignprice();",
"public double getPrice();",
"public void setPrice(java.lang.String price) {\n this.price = price;\n }",
"private Double getPriceNumber(String price) {\n\t\ttry {\n\t\t\tList<Double> allMatches = new ArrayList<Double>();\n\t\t\tPattern pattern = Pattern.compile(\"((\\\\d*\\\\s)+)\\\\d*\\\\.\\\\d{2}\");\n\t\t\tMatcher matcher = pattern.matcher(price);\n\t\t\twhile (matcher.find()) {\n\t\t\t\tDouble priceMatch = Double.parseDouble(matcher.group().replace(\" \", \"\"));\n\t\t\t\tallMatches.add(priceMatch);\n\t\t\t}\n\n\t\t\treturn Collections.min(allMatches);\n\t\t} catch (Exception | AssertionError e) {\n\t\t\tString errorMessage = String.format(\"An error ocurred while getting the price number\", e.getMessage());\n\t\t\tthrow new Error(errorMessage);\n\t\t}\n\t}",
"@Override\n public String toString() {\n String printString;\n if (cents == 0) {\n printString = String.format(\"$%d.00\", dollars);\n } else {\n printString = String.format(\"$%d.%d\", dollars, cents);\n }\n return printString;\n }",
"private CharSequence calculateTotalPrice() {\n float totalPrice = 0.0f;\n totalPrice += UserScreen.fishingRodQuantity * 25.50;\n totalPrice += UserScreen.hockeyStickQuantity * 99.99;\n totalPrice += UserScreen.runningShoesQuantity * 85.99;\n totalPrice += UserScreen.proteinBarQuantity * 5.25;\n totalPrice += UserScreen.skatesQuantity * 50.79;\n return Float.toString(totalPrice);\n }",
"public String getCost() {\n // Formats the cost amount into money format.\n NumberFormat n = NumberFormat.getCurrencyInstance(Locale.US);\n String s = n.format(Double.parseDouble(_cost));\n return s;\n }",
"public BigDecimal\tgetPrice();",
"public String toString() {\n\t\t\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"From day \")\n\t\t .append(startDay.getDay())\n\t\t .append(\" to day \")\n\t\t .append(endDay.getDay())\n\t\t .append(\": $\");\n\t\tFormatter f = new Formatter(sb);\n\t\tf.format(\"%.2f\", cost);\n\t\tf.close();\n\t\tsb.append(\", \")\n\t\t .append(make)\n\t\t .append(\" \")\n\t\t .append(model);\n\t\treturn sb.toString();\n\t\t\n\t}",
"public String getCurrentPrice() {\n\t\treturn currPrice;\n\t}",
"public Double getPrice();",
"@Override\n public String toString() {\n return String.format(\"Pizza %s, prezzo %f€\", this.gusto, this.prezzo);\n }",
"public String toString() {\n\t\tString str = \"\";\n\t\tstr = String.format(\"%.2f lbs. @ %.2f /lbs.\\n%s\\t%.2f \", this.getWeight(), getPrice(), this.getName(), this.getCost());\n\t\treturn str;\n\t}",
"public double getPrice() {\n return price_;\n }",
"private static String getPriceFromHtml(String html)\n\t{\n\t\tString price = \"\";\n\t\tPattern p = Pattern.compile(SUPERVALU_PRICE_REGEX);\n\t\tMatcher m = p.matcher(html);\n\t\tboolean b = m.matches();\n\t\tif (b)\n\t\t{\n\t\t\tprice = m.group(1);\n\t\t}\n\t\treturn price;\n\t}",
"public String toString(){\n\t\tString cheese, ham, pep;\n\t\t\n\t\tif (Cheese == 1)\n\t\t\tcheese =\"\";\n\t\telse if (Cheese == 2)\n\t\t\tcheese = \"double \";\n\t\telse \n\t\t\tcheese = \"triple \";\n\t\tif (Ham == 1)\n\t\t\tham =\"\";\n\t\telse if (Ham == 2)\n\t\t\tham = \"double \";\n\t\telse \n\t\t\tham = \"triple \";\n\t\tif (Pepperoni == 1)\n\t\t\tpep =\"\";\n\t\telse if (Pepperoni == 2)\n\t\t\tpep = \"double \";\n\t\telse \n\t\t\tpep = \"triple \";\n\t\t\t\n\t\tString output = new String();\n\t\tif (Ham >= 1 && Pepperoni >= 1){\n\t\t\toutput = Size + \" pizza, \" + cheese + \"cheese, \" + ham + \"ham, \" + pep \n\t\t\t+ \"pepperoni. Cost: $\" + String.format(\"%2.2f\", getCost()) + \" each.\";}\n\t\telse if (Ham == 0 && Pepperoni == 0)\n\t\t\toutput = Size + \" pizza, \" + cheese + \"cheese only. Cost: $\" + String.format(\"%2.2f\", getCost()) + \" each.\";\n\t\telse if (Ham == 1 && Pepperoni == 0){\n\t\t\toutput = Size + \" pizza, \" + cheese + \"cheese, \" + ham + \"ham. Cost: $\" + String.format(\"%2.2f\", getCost()) + \" each.\";}\n\t\telse if (Ham == 0 && Pepperoni == 1){\n\t\t\toutput = Size + \" pizza, \" + cheese + \"cheese, \" + pep\n\t\t\t\t\t+ \"pepperoni. Cost: $\" + String.format(\"%2.2f\", getCost()) + \" each.\";}\n\t\t\n\t\treturn output;\n\t\t}",
"public double getPrice(){\r\n\t\treturn price;\r\n\t}",
"String getTradeCurrency();",
"String getPrecio();",
"@Override\r\n\tpublic double getPrice() {\n\t\treturn price;\r\n\t}",
"public double getPrice() {\n return price;\n }",
"public double getPrice(){\n\t\t\treturn price;\n\t\t}",
"org.adscale.format.opertb.AmountMessage.Amount getExchangeprice();",
"@Override\n public String toString(){\n return \"\" + item.name + \" \" + item.price + \" Coins\";\n }",
"public String getPriceName() {\n return this.PriceName;\n }",
"public double price(){\n if (basePrice() >1000){\n return basePrice() *0.95;\n }else\n return basePrice() * 0.98;\n }",
"private static String getPrice(WebElement s) {\n\n\t\treturn s.findElement(By.xpath(\"following-sibling::td[1]\")).getText();\n\n\t}",
"java.lang.String getBuyDescribe();",
"public double getPrice() {\n return price_;\n }",
"Price getTradePrice();",
"public String toString()\n {\n\tint c = coinCounter();\n\treturn \"$\" + c / 100 + \".\" + c % 100;\n }",
"public void setPrice(String price) {\n\t\tthis.price = price;\n\t}",
"public String getPriceAndDiscount() {\n return _context.getResources().getString(_context.getResources().getIdentifier(\"price_and_discount\", \"string\", _context.getPackageName()), getDiscount(), getOriginalPrice(), getSalePrice());\n\n }",
"public double getPrice(){\n\t\t\n\t\treturn price;\n\t}",
"public double getPrice(){\n\t\treturn price;\n\t}",
"public double getPrice() {\r\n return price;\r\n }",
"public double getPrice() {\r\n return price;\r\n }",
"public double getPrice() {\r\n return price;\r\n }",
"public double getPrice() {\r\n return price;\r\n }",
"public BigDecimal getPrice() {\r\n return price;\r\n }"
]
| [
"0.79329187",
"0.7682901",
"0.73582745",
"0.718477",
"0.70635766",
"0.7058784",
"0.7005523",
"0.69929665",
"0.6964357",
"0.68711644",
"0.6761397",
"0.6722613",
"0.66969824",
"0.6687996",
"0.6687996",
"0.66855097",
"0.66409594",
"0.65660024",
"0.64332694",
"0.6402548",
"0.639315",
"0.63694173",
"0.6365484",
"0.6344314",
"0.63384914",
"0.6329974",
"0.62982064",
"0.62955844",
"0.62894344",
"0.62644213",
"0.6258822",
"0.6257851",
"0.6248024",
"0.62468445",
"0.6241",
"0.6202283",
"0.61915183",
"0.61915183",
"0.61915183",
"0.61903375",
"0.616826",
"0.6162685",
"0.6157778",
"0.6145521",
"0.6131755",
"0.61289823",
"0.61239076",
"0.611765",
"0.6111211",
"0.6091589",
"0.6082539",
"0.6075587",
"0.60702175",
"0.6058378",
"0.6053992",
"0.60512894",
"0.60373217",
"0.60153985",
"0.6000955",
"0.5974233",
"0.5971227",
"0.5958823",
"0.5938783",
"0.593536",
"0.59265244",
"0.59195656",
"0.5909922",
"0.59062856",
"0.58988094",
"0.58970463",
"0.5895792",
"0.5894463",
"0.5894218",
"0.58927536",
"0.58912396",
"0.5880121",
"0.5878265",
"0.58732563",
"0.58696234",
"0.5867576",
"0.58605325",
"0.58549094",
"0.5843826",
"0.5843477",
"0.5842517",
"0.58409804",
"0.5839971",
"0.5839345",
"0.5830695",
"0.58287585",
"0.5824905",
"0.58243334",
"0.5822515",
"0.58208567",
"0.58164495",
"0.58158624",
"0.5813764",
"0.5813764",
"0.5813764",
"0.5813764",
"0.5812813"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Iterator<Key> iterator() {
return new ListIterator();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public boolean hasNext() {
return current!=null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Key next() {
Key i=current.item;
current=current.next;
return i;
} | {
"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 |
click on the continue button | public void clickContinue() {
continueButton.click();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void clickContinueButton() {\n clickElement(continueButtonLocator);\n }",
"public void Regcontinuebutton( ){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- continue Registartion button clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"Regcontinuebutton\"));\r\n\t\t\tclick(locator_split(\"Regcontinuebutton\"));\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- continue Registartion button clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- continue Registartion button is not clicked \"+elementProperties.getProperty(\"Regcontinuebutton\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"Regcontinuebutton\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"public EmagHomePage clickonContinueButton()\n {\n continueButton.click();\n return new EmagHomePage(driver);\n }",
"public void checkoutcontinuebutton( ){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- continue Registartion button clicked in popu page\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"checkoutregistrationcontinue\"));\r\n\t\t\tclick(locator_split(\"checkoutregistrationcontinue\"));\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- ccontinue Registartion button clicked in popu page\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- continue Registartion button is not clicked in popu page\"+elementProperties.getProperty(\"_Regcontinuebutton\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"checkoutregistrationcontinue\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"@When(\"^I click on the Continue button$\")\n\tpublic void i_click_on_the_Continue_button() throws Throwable {\n\t\tdriver.findElement(By.id(\"tdb5\")).click();\n\t \n\t}",
"@When(\"^User clicks on continue button$\")\n\tpublic void user_clicks_on_continue_button() throws Throwable {\n\t\tGetDriver.browserState().findElement(By.name(\"findFlights\")).click();\n\t}",
"public void clickLogin() {\n\t\tcontinueButton.click();\n\t}",
"public void clickOnContinueShoppingButton()\n \t{\n \t\tproductRequirementsPageLocators.clickOnContinueShoppingButton.click();\n\n \t}",
"@When(\"usert clicks on continue\")\r\n\tpublic void usert_clicks_on_continue() {\n\tdriver.findElement(By.id(\"btn\")).click();\r\n\t\r\n}",
"public void clickOnContinueButton() throws Exception {\n\t\twdriver.switchTo().frame(\"ifmail\");\n\t\twaitForElement.waitForElement(\"html/body/div[1]/div[3]/div[2]/div/div[1]/table[1]/tbody/tr[1]/td[2]/a\");\n\t\twdriver.findElement(By.xpath(\"html/body/div[1]/div[3]/div[2]/div/div[1]/table[1]/tbody/tr[1]/td[2]/a\")).click();\n\t}",
"public void ClickChecoutsubmitcontinue(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Checkout Registration submit continue button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tif(isElementPresent(locator_split(\"btncheckoutregistrationsubmitcontinue\"))){\r\n\t\t\t\tclick(locator_split(\"btncheckoutregistrationsubmitcontinue\"));\r\n\t\t\t}else{\r\n\t\t\t\tclick(locator_split(\"chkcheckoutregistrationconfirmaddress\"));\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Checkout Registration submit continue button is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Checkout Registration submit continue button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Checkout Registration submit continue button is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btncheckoutregistrationsubmitcontinue\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}",
"public void clickContinueInAgentPage() throws Exception {\n\n\t\twdriver.findElement(By.xpath(\"//button[@type='submit']\")).click();\n\n\t}",
"@And(\"^I Should see Continue shopping button$\")\n public void iShouldSeeCountinueButton()throws Throwable{\n Assert.assertTrue(\"Continue shopping button is not present\", Elements.elementPresent(\"checkout.rc_test_element\"));\n Clicks.click(\"checkout.rc_test_element\");\n getWebDriver().navigate().back();\n }",
"public synchronized void click_lnk_continueShopping() throws Exception {\n\t\tutils.clickWebElement(driver, btn_continueShopping(), \"Continue Shopping button not found\");\n\n\t}",
"public void clickContinueButtonForUnit() {\r\n\t\twebAppDriver.clickElementByCss(btnContinueButtonStorageUnitCss);\r\n\t\twebAppDriver.verifyPresenceOfTextInDivTagText(\"Your Reservation\");\r\n\t}",
"public static void clickNextBtn() {\t\n\t\ttry {\n\t\t\tdriver.findElement(By.id(\"nextquest\")).click();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Next button in Q&A submit doesnt work\");\n\t\t}\n\t}",
"public void acceptAndProceed()\r\n {\r\n\t driver.findElement(By.id(\"PCNChecked\")).click();\r\n\t driver.findElement(By.xpath(\"/html/body/div[1]/div/div/main/div/main/div/div/div[1]/div/div/form/fieldset/div[3]/div[2]/button\")).click();\r\n }",
"public void ClickContinueShopping(){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Continue shopping button should be clicked\");\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"btnClickcontinueButton\"));\r\n\t\t\tif(ele.size()>1){\r\n\t\t\t\tclick(ele.get(1));\r\n\t\t\t}else{\r\n\t\t\t\tclick(ele.get(0));\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Continue Shopping button is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Continue Shopping button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Continue Shopping button is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnClickcontinueButton\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"public void ClickMyAccountContinueShopping(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account Registration continue shopping should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"btnMyAccountContinueShopping\"));\r\n\t\t\tThread.sleep(3000);\r\n\t\t\tSystem.out.println(\"My Account Registration continue shopping is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- My Account Registration continue shopping is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- My Account Registration continue shopping is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnMyAccountContinueShopping\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}",
"private static void askForContinue() {\n\t\t\t\n\t\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = OK;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}",
"public static void checkAndClickNextButton() {\r\n\t\tcheckNoSuchElementExceptionByID(\"nextquest\", \"\\\"Next\\\" button\");\r\n\t\tcheckElementNotInteractableExceptionByID(\"nextquest\", \"\\\"Next\\\" button\");\r\n\t}",
"public void clickOnContinueAsGuestUserLink()\n \t{\n \t\tproductRequirementsPageLocators.continueAsGuestUserLIink.click();\n\n \t}",
"public void clickNextButton() {\n if (editSummaryFragment.isActive()) {\n //we're showing the custom edit summary window, so close it and\n //apply the provided summary.\n editSummaryFragment.hide();\n editPreviewFragment.setCustomSummary(editSummaryFragment.getSummary());\n } else if (editPreviewFragment.isActive()) {\n //we're showing the Preview window, which means that the next step is to save it!\n if (abusefilterEditResult != null) {\n //if the user was already shown an AbuseFilter warning, and they're ignoring it:\n funnel.logAbuseFilterWarningIgnore(abusefilterEditResult.getCode());\n }\n getEditTokenThenSave(false);\n funnel.logSaveAttempt();\n } else {\n //we must be showing the editing window, so show the Preview.\n hideSoftKeyboard(this);\n editPreviewFragment.showPreview(title, sectionText.getText().toString());\n funnel.logPreview();\n }\n }",
"public void continue_billing() {\r\n\t\t\tthis.Continue_Billing.click();\r\n\t\t}",
"public void clickOnProceedToCheckoutButton()\n \t{\n \t\tproductRequirementsPageLocators.clickOnProceedToCheckoutButton.click();\n\n \t}",
"public void proceedToLetsGo() {\n\t\tBrowser.click(\"xpath=.//*[@id='DisplayNavigatorBrokerLandingPage']/div/div/div/div/div/div/div/div/div[5]/a/img\");\n\t}",
"public static void clickNextBtnGame() {\t\n\t\tdriver.findElement(By.id(\"btnnext\")).click();\n\t}",
"private void continueButton() {\n Optional<Squadron> anyAvailable = game\n .getHumanPlayer()\n .getNations()\n .stream()\n .filter(Nation::isSquadronsPresent)\n .flatMap(nation -> game.getHumanPlayer().getSquadrons(nation, SquadronLocationType.LAND).stream())\n .filter(Squadron::isAvailable)\n .findAny();\n\n List<Region> regionsNotSatisfied = gameMap\n .areAllRegionsSatisfied(game.getHumanSide());\n\n if (anyAvailable.isPresent()) {\n warnNotAllSquadronsDeployed();\n } else if (regionsNotSatisfied.size() > 0) {\n warnNotAllRegionsSatisfied(regionsNotSatisfied);\n } else {\n navigate.goNext(this.getClass(), stage);\n }\n }",
"public static void checkAndClickNextButtonTriviaMode() {\r\n\t\tcheckNoSuchElementExceptionByID(\"btnnext\", \"\\\"Next\\\" button in trivia mode\");\r\n\t\tcheckElementNotInteractableExceptionByID(\"btnnext\", \"\\\"Next\\\" button in trivia mode\");\r\n\t}",
"public static void checkAndClickPlayButton() {\r\n\t\tcheckNoSuchElementExceptionByXPath(\"//*[@id=\\\"secondepage\\\"]/center/button[1]\", \"\\\"Play\\\" button\");\r\n\t\tcheckElementNotInteractableExceptionByXPath(\"//*[@id=\\\"secondepage\\\"]/center/button[1]\", \"\\\"Play\\\" button\");\r\n\t}",
"public void goToNextPage() {\n nextPageButton.click();\n }",
"public void Click_Done()\r\n\t{\r\n\t\tExplicitWait(Specialdone);\r\n\t\tif (Specialdone.isDisplayed()) \r\n\t\t{\r\n\t\t\tJavascriptexecutor(Specialdone);\r\n\t\t\tExplicitWait(Checkavailability);\r\n\t\t\t//System.out.println(\"Clicked on Special Rate plan done button \");\r\n\t\t\tlogger.info(\"Clicked on Special Rate plan done button\");\r\n\t\t\ttest.log(Status.INFO, \"Clicked on Special Rate plan done button\");\r\n\r\n\t\t} else {\r\n\t\t\t//System.out.println(\"Special Rate plan done button not found\");\r\n\t\t\tlogger.error(\"Special Rate plan done button not found\");\r\n\t\t\ttest.log(Status.FAIL, \"Special Rate plan done button not found\");\r\n\r\n\t\t}\r\n\t}",
"public void ClickContinueShoppingBtnAddedToCartPage( ){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Continue Shopping button clicked in Added to Cart Page.\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"btnShoppingCartContinueShopping\"));\r\n\t\t\tclick(locator_split(\"btnShoppingCartContinueShopping\"));\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Continue Shopping button clicked in Added to Cart Page.\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Continue Shopping button is not clicked in Added to Cart Page.\"+elementProperties.getProperty(\"btnShoppingCartContinueShopping\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnShoppingCartContinueShopping\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = OTHERBEACH;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}",
"public void proceedOnPopUp() {\n Controllers.button.click(proceedToCheckOutPopUp);\n }",
"public static void checkAndClickTryAgainButton() {\r\n\t\tcheckNoSuchElementExceptionByXPath(\"//*[@id=\\\"markpage\\\"]/center/button[1]\", \"\\\"Try again\\\" button\");\r\n\t\tcheckElementNotInteractableExceptionByXPath(\"//*[@id=\\\"markpage\\\"]/center/button[1]\", \"\\\"Try again\\\" button\");\r\n\t}",
"public synchronized WebElement btn_continueShopping() throws Exception {\n\n\t\treturn utils.findElementByLocator(driver, \"PDP_continueShopping\", \"| PDP:Continue Shopping not present\");\n\t}",
"public static void checkAndClickQuitButtonStartPlayingPage() {\r\n\t\tcheckNoSuchElementExceptionByXPath(\"//*[@id=\\\"secondepage\\\"]/center/button[2]\", \"\\\"Quit\\\" button of Start playing page\");\r\n\t\tcheckElementNotInteractableExceptionByXPath(\"//*[@id=\\\"secondepage\\\"]/center/button[2]\", \"\\\"Quit\\\" button of Start playing page\");\r\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = PROPER;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}",
"public void clickOnSuccessOkBtn() throws Exception {\r\n\t\r\n\t\t\tclickOnButton(btnOKSuccess);\r\n\t\t\tlog(\"clicked on OK button and object is:-\" + btnOKSuccess.toString());\r\n\t\t\tThread.sleep(1000);\r\n\t}",
"public void clickYes ();",
"@Test\n public void test_rf_continue_button_opens_correct_activity() {\n //Click the positive button in the dialog\n onView(withText(\"I understand\")).perform(click());\n //Find the views and perform action\n onView(withId(R.id.redFlag_continue)).perform(click());\n //Check if action returns desired outcome\n intended(hasComponent(ObservableSignsActivity.class.getName()));\n }",
"public void nextBtnClicked(View v) {\r\n//\t\tshowMsg(\"Next Button clicked: \"+ v);\r\n\t\tresetSelection();\r\n\t\tnextQuestion(1);\r\n\t\tshowQuesAndAnswers();\r\n\t}",
"public void clickTravellersDone() {\n\t\ttravellersDone.click();\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\r\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = USER;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}",
"public static void continueChat()\r\n {\r\n do\r\n {\r\n NPCChat.clickContinue(true);\r\n General.sleep(300, 450);\r\n }\r\n while (NPCChat.getClickContinueInterface() != null);\r\n General.sleep(300, 350);\r\n }",
"@Override\r\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tgoNext();\r\n\t\t\t\t}",
"@Override\n public void onClick(View v) {\n if(((RelapseProcessActivity)getActivity()).canProceed == true) {\n goToEmergencyGoneStep();\n }\n }",
"public void clickOnEnrollNowButton() {\n\t\tif(enrollNowButton.isEnabled()) {\n\t\twaitAndClick(enrollNowButton);\n\t\t}\n\t}",
"public void addContinue() {\n if (cursor == 0) {\n JOptionPane.showMessageDialog(null, \"There's no note to continue!\", \"Invalid Continue\", JOptionPane.WARNING_MESSAGE);\n } else {\n notePressed(CONTINUE);\n }\n }",
"public void clickOnSubmit() {\r\n\r\n\t\treportStep(\"About to click on Submit button \", \"INFO\");\r\n\r\n\t\tif(clickAfterWait(submitButton)) {\r\n\r\n\t\t\treportStep(\"Successfully clicked on the Submit button \", \"PASS\");\r\n\r\n\t\t}else {\r\n\t\t\tclickAfterWait(submitButton);\r\n\t\t\treportStep(\"Failed to click on the Submit button \", \"INFO\");\r\n\r\n\t\t}\r\n\t}",
"private void setOnContinueClickListener()\n\t{\n\t\t_continue.setOnClickListener(new View.OnClickListener()\n\t\t{\t\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tIntent intent = new Intent(\"cody.mtmanager.com.OrderTiebreakers\");\n\t\t\t\t\n\t\t\t\taddExtras(intent);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\t}",
"public void onClick(View v) {\n \tm_main.gameContinue();\n }",
"public void cliquerSauverContinuer() {\r\n\t\t\t\r\n\t\t\t//Identification du bouton et clic\r\n\t\t\tWebElement boutonSaveContinue = wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"//table[@id='\"+prefix()+\"y5-box']/tbody/tr[2]/td[2]\")));\r\n\t\t\tboutonSaveContinue.click();\r\n\t\t}",
"private void clickOn() {\n\t\tll_returnbtn.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t}",
"public static void checkAndClickQuitButtonResultsPage() {\r\n\t\tcheckNoSuchElementExceptionByXPath(\"//*[@id=\\\"markpage\\\"]/center/button[2]\", \"\\\"Quit\\\" button of results page\");\r\n\t\tcheckElementNotInteractableExceptionByXPath(\"//*[@id=\\\"markpage\\\"]/center/button[2]\", \"\\\"Quit\\\" button of results page\");\r\n\t}",
"public Payment clickContinue() throws InterruptedException {\n\n Thread.sleep(2000);\n\n WebElement button = new WebDriverWait(BaseWebDriver.Instance, BaseWebDriver.getInstance().TIMEOUT)\n .until(ExpectedConditions.presenceOfElementLocated(locatorContinue));\n button.click();\n\n return new Payment();\n }",
"public void btn_LearningActivity() {\r\n\t\tbtn_LearningActivity.click();\r\n\t}",
"public void clickSubmitInkAndTonnerSearchButton(){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Ink and Tonner Search Button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"btnInkSeacrh\"));\r\n\t\t\tclick(locator_split(\"btnInkSeacrh\"));\r\n\t\t\twaitForPageToLoad(10);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Ink and Tonner Search Button is clicked\");\r\n\t\t\tSystem.out.println(\"Ink and Tonner Search icon is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Ink and Tonner Search Button is not clicked \"+elementProperties.getProperty(\"btnSearchSubmit\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnInkSeacrh\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"public void goOnToNextQuestion(){\n\t\tbtnConfirmOrNext.setText(\"Next Question\");\n\t\tenableAllButtons();// need to be able to click to proceed\n\t\tquizAccuracy.setText(\": \"+spellList.getLvlAccuracy()+\"%\");\n\t\t// if user got answer correct move on immediately, else let user look at the correct answer first\n\t\tif(correctFlag){\n\t\t\t// set it to false initially for the next question\n\t\t\tcorrectFlag = false;\n\t\t\tbtnConfirmOrNext.doClick();\n\t\t}\n\n\t}",
"public static void clickStartBtn() {\t\n\t\tdriver.findElement(By.id(\"startB\")).click();\t\n\t}",
"public void clickbtnApprove() {\n\t\twaitForElementClickable(10,btnApprove);\n\t\tclickByJavaScript(btnApprove);\n\t\tsleep(1);\n\t}",
"public void ClickNext() {\r\n\t\tnext.click();\r\n\t\t\tLog(\"Clicked the \\\"Next\\\" button on the Birthdays page\");\r\n\t}",
"public void enableContinue() {\n if (PayBillAccountBox.getValue() != null) continueButton.setDisable(false);\n }",
"public void verifySkip()\n\t{\n\t\tAssert.assertEquals(continueButton.getText(), \"Skip\");\n\t}",
"public void clickOnYesButton() {\r\n\t\tsafeJavaScriptClick(manageVehiclesSideBar.replace(\"Manage Vehicles\", \"Yes\"));\r\n\t}",
"public static void checkAndClickStartButton() {\r\n\t\tcheckElementNotInteractableExceptionByID(\"startB\", \"\\\"Start\\\" button\");\r\n\t}",
"public void clickOnCancelButtonInMarkAsCompletePopup() {\n getLogger().info(\"Click on cancel button in mark as complete button\");\n try {\n waitForClickableOfElement(eleCancelBtn, \"Wait for click on cancel button\");\n clickElement(eleCancelBtn, \"Click on cancel button\");\n NXGReports.addStep(\"Verify click on cancel button in mark as complete popup successful \", LogAs.PASSED, null);\n } catch (Exception ex) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"Verify click on cancel button in mark as complete popup fail\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }",
"public boolean clickOnStartButton() {\r\n\t\ttry {\r\n\t\t\tgetAssignmentStratButton().click();\r\n\t\t\treturn true;\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(nextStep+1>=showflag.length)\r\n\t\t\t\t\treturn ;\r\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tif(showflag[nextStep]){\r\n\t\t\t\t\tnextStep +=1;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfor(int i=nextStep;i>=0;i--){\r\n\t\t\t\t\t\tif(showflag[i]){\r\n\t\t\t\t\t\t\tnextStep= i+1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tif(nextStep==OK)\r\n\t\t\t\t\tmHandler.sendMessageDelayed(msg, waitTime);\r\n\t\t\t\telse\r\n\t\t\t\t\tmHandler.sendMessageDelayed(msg, waitTime);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}",
"public void ClickYes()\n\t{\n\t\tdriver.findElementByName(OR.getProperty(\"Yes\")).click();\n\t}",
"public void clickgoButton(){\n \n \t \n driver.findElement(By.cssSelector(goButton)).click();\n }",
"public void clickloginbutton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Login Button should be clicked\");\r\n\t\ttry{\r\n\t\t\tclick(locator_split(\"btnLogin\"));\r\n\t\t\tsleep(2000);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Login Button is clicked\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Login button is not clicked with WebElement \"+elementProperties.getProperty(\"btnLogin\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnLogin\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"@Test\n public final void testClickButton() {\n spysizedialog.getStartButton().doClick();\n }",
"public void proceedToCheckOut()\n\t{\n\t\tproceedtocheckoutpage = productpage.addToCartBtnClick();\n\t}",
"@Then(\"^click on the Login button user nagivate to the next page$\")\r\n\tpublic void click_on_the_Login_button_user_nagivate_to_the_next_page() throws Throwable {\n\t w.submit();\r\n\t}",
"protected void processButton1(Robot robot ){\n robot.getIntake().intakeSuckIn(1);\n\n }",
"public void clickViewCartButton(){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Viewcart button should be clicked\");\r\n\t\ttry{\r\n\t\t\t//waitForElement(btnViewCart);\r\n\t\t\twaitForElement(locator_split(\"btnViewCartBtn\"));\r\n\t\t\t//click(btnViewCart);\r\n\t\t\tclick(locator_split(\"btnViewCartBtn\"));\r\n\t\t\twaitForPageToLoad(20);\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Viewcart button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- View button is not clicked \"+elementProperties.getProperty(\"btnViewCartBtn\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnViewCartBtn\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"public void nextButtonClicked()\r\n {\n manager = sond.getManager();\r\n String insertSearchDelete = sond.getInsertSearchDelete();\r\n AnimatorThread animThread = model.getThread();\r\n\r\n // falls der Thread pausiert ist, wird er beim betätigen des\r\n // next-Buttons aufgeweckt\r\n if (button.getPlay() && animThread != null && animThread.isAlive())\r\n {\r\n if (!animThread.getWait())\r\n {\r\n animThread.interrupt();\r\n }\r\n else\r\n {\r\n animThread.wake();\r\n }\r\n }\r\n // Redo muss vor den weiteren if Anweisungen stehen, damit erst alle\r\n // Redo ausgeführt werden, bevor neue Aktionen dem manager hinzugefuegt\r\n // werden\r\n else if (manager.canRedo())\r\n {\r\n manager.redo();\r\n }\r\n else if (!sond.getArrayPosition() && insertSearchDelete.equals(\"insert\"))\r\n {\r\n sond.nextInsertPosition();\r\n UndoRedoSetAnimation command = new UndoRedoSetAnimation(sond);\r\n manager.addEdit(command);\r\n }\r\n else if (!sond.getArrayPosition() && insertSearchDelete.equals(\"search\"))\r\n {\r\n sond.nextSearchPosition();\r\n UndoRedoSetAnimation command = new UndoRedoSetAnimation(sond);\r\n manager.addEdit(command);\r\n }\r\n else if (!sond.getArrayPosition() && insertSearchDelete.equals(\"delete\"))\r\n {\r\n sond.nextSearchPosition();\r\n UndoRedoSetAnimation command = new UndoRedoSetAnimation(sond);\r\n manager.addEdit(command);\r\n }\r\n }",
"public void clickFirstQviewbutton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Qview First Buy button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\t/*List<WebElement> eles=driver.findElements((locator_split(\"btnQview\")));\r\n\t\t\tSystem.out.println(eles.size());\r\n\t\t\teles.get(0).click();*/\r\n\r\n\t\t\tclick(locator_split(\"btnQview\"));\t\t\t\t\r\n\t\t\tSystem.out.println(\"Clicked on the First Buy button\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- First Buy Button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Qview First Buy button is not clicked or Not Available\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnQview\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"public void ClickMyAccountSubmitbutton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account Registration submit button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"btnMyAccountSubmit\"));\r\n\t\t\tSystem.out.println(\"Checkout Registration submit button is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- My Account Registration submit button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- My Account Registration submit button is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnMyAccountSubmit\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}",
"void okButtonClicked();",
"@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tUI.getCurrent().getNavigator().navigateTo(\"CliPantallaBusquedaExpedientes\");\t \n\t\t\t}",
"private Button continueButton(EventHandler<ActionEvent> splashScreenComboBoxEvent) {\n\t\tcontinueButton = new Button();\n\t\tcontinueButton.setText(CONTINUE);\n\t\tcontinueButton.setPrefWidth(200);\n\t\tcontinueButton.setOnAction(splashScreenComboBoxEvent);\n\t\tcontinueButton.setId(\"Continue\");\n\t\t\n\t\tcontinueButton.setDisable(true);\n\t\t\n\t\treturn continueButton;\n\t}",
"public void clickGoToLogin(){\n\t\t\n\t\tgoToLoginBtn.click();\n\t\t\n\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(projectsLoader.getNextInspection()!=null){\n\t\t\t\t\tString recordId = projectsLoader.getNextInspection().getRecordId_id();\n\t\t\t\t\tif(recordId==null)\n\t\t\t\t\t\treturn;\n\t\t\t\t\tActivityUtils.startScheduleInspectionActivity(LandingPageActivity.this, projectsLoader.getParentProject(recordId).getProjectId(), recordId, projectsLoader.getNextInspection(), AppConstants.CANCEL_INSPECTION_SOURCE_OTHER);\n\t\t\t\t}\n\t\t\t}",
"public void ClickChecoutSubmitbutton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Checkout Registration submit button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"btncheckoutregistrationsubmit\"));\r\n\t\t\tSystem.out.println(\"Checkout Registration submit button is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Checkout Registration submit button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Checkout Registration submit button is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btncheckoutregistrationsubmit\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}",
"public void clickOnVINButton() {\n if(VINButton.isDisplayed()) {\n\t\twaitAndClick(VINButton);\n\t }\n }",
"@Test\r\n public void TestCancelButton(){\r\n solo.clickOnView(solo.getView(R.id.nav_view).findViewById(R.id.navigation_notifications));\r\n solo.waitForFragmentById(R.id.navigation_notifications);\r\n solo.clickOnView(solo.getView(R.id.addFollowing));\r\n solo.sleep(5000);\r\n solo.waitForActivity(AddFollowingActivity.class, 2000);\r\n solo.clickOnView(solo.getView(R.id.cancel2));\r\n solo.waitForFragmentById(R.id.navigation_notifications);\r\n\r\n }",
"public void clickSubmitSearchButton(){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Search Button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"btnSearchSubmit\"));\r\n\t\t\tclick(locator_split(\"btnSearchSubmit\"));\r\n\t\t\twaitForPageToLoad(10);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Search Button is clicked\");\r\n\t\t\tSystem.out.println(\"Sarch icon is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Search Button is not clicked \"+elementProperties.getProperty(\"btnSearchSubmit\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnSearchSubmit\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"public void nextQuestion(View view) {\n Button button = (Button) findViewById(R.id.question_button_previous);\n if (!button.isEnabled()){\n button.setEnabled(true);\n }\n saveProgress();\n sequence++;\n updateView();\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n if (runButton_.isSelected()) {\n runButton_.setText(\"Abort Acquisition\");\n runAcquisition();\n } else {\n runButton_.setText(\"Run Acquisition\");\n }\n }",
"public void click_Continue_ShippingSummary()\n\t{\n\t\twaitForVisibility(continueShippingSummary);\n\t\tcontinueShippingSummary.click();\n\t}",
"public void ClickQviewAddtoCartbutton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Qview Add to cart button should be clicked\");\r\n\t\ttry{\r\n\t\t\tclick(locator_split(\"btnQviewAddtoCart\"));\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Qview Add to cart button is clicked\");\r\n\t\t\tSystem.out.println(\"Clicked the Add to Cart in QView\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Qview Add to cart button is not clicked or Not Available\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnQviewAddtoCart\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = BALLON;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}",
"private void actionResume() {\n\t\tselectedDownload.resume();\n\t\tupdateButtons();\n\t}",
"public void clickOnVSPNButton() {\n if(VSPNButton.isDisplayed()) {\n\t\twaitAndClick(VSPNButton);\n\t}\n }",
"public void clickGoToYourAccountButton() {\n\t\telement(signUpObjects.getOTPButton).click();\n\t}",
"@When(\"^click the submit button$\")\n public void click_the_submit_button() throws Throwable {\n \tSystem.out.println(\"click the button\");\n //throw new PendingException();\n }"
]
| [
"0.8965772",
"0.79491955",
"0.7862926",
"0.7832071",
"0.7799839",
"0.7790874",
"0.7735907",
"0.7643051",
"0.7509346",
"0.7429693",
"0.7378038",
"0.7350019",
"0.7342304",
"0.72775215",
"0.7138564",
"0.7133811",
"0.7128904",
"0.71169305",
"0.7078358",
"0.70767653",
"0.707579",
"0.70722574",
"0.7005823",
"0.70010424",
"0.69738513",
"0.6966849",
"0.6965466",
"0.694888",
"0.69189024",
"0.6877739",
"0.6862847",
"0.684448",
"0.6835894",
"0.68284357",
"0.6826197",
"0.6779235",
"0.6742322",
"0.66926885",
"0.66857755",
"0.6650964",
"0.6649399",
"0.6624294",
"0.6619396",
"0.6589787",
"0.65683967",
"0.65584433",
"0.6553397",
"0.6542704",
"0.6538052",
"0.6531449",
"0.65007055",
"0.65000266",
"0.64878726",
"0.6477395",
"0.64754516",
"0.6466075",
"0.64564914",
"0.64534634",
"0.64480364",
"0.6442928",
"0.64181703",
"0.64175993",
"0.6416423",
"0.63866335",
"0.6386476",
"0.63798183",
"0.6348953",
"0.6344331",
"0.6341844",
"0.6330751",
"0.6321606",
"0.6309269",
"0.63065666",
"0.6305385",
"0.6279714",
"0.62763554",
"0.62630844",
"0.6253536",
"0.624176",
"0.6218597",
"0.62163186",
"0.62144744",
"0.6207356",
"0.62072164",
"0.62052584",
"0.620446",
"0.6201748",
"0.61944675",
"0.619121",
"0.61908704",
"0.6182456",
"0.6177424",
"0.6171872",
"0.6170417",
"0.6163287",
"0.61619055",
"0.6159224",
"0.6153596",
"0.6149294",
"0.6137586"
]
| 0.9092022 | 0 |
click on login button | public void clickLogin() {
continueButton.click();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void clickOnLoginButton(){\n\t\tthis.loginButton.click();\n\t}",
"public void clickLoginBtn() {\r\n\t\tthis.loginBtn.click(); \r\n\t}",
"public void clickLogin() {\n\t\t driver.findElement(loginBtn).click();\n\t }",
"public void clickOnLogin() {\n\t\tWebElement loginBtn=driver.findElement(loginButton);\n\t\tif(loginBtn.isDisplayed())\n\t\t\tloginBtn.click();\n\t}",
"public void clickGoToLogin(){\n\t\t\n\t\tgoToLoginBtn.click();\n\t\t\n\t}",
"public void clickOnLoginButton() {\n\t\tutil.clickOnElement(this.loginPageLocators.getLoginButtonElement());\n\t}",
"public void clickLogin(){\n\t\tdriver.findElement(login).click();\n\t}",
"public void ClickLogin()\n\t{\n\t\t\n\t\tbtnLogin.submit();\n\t}",
"public void clickLogin(){\n\t\t\tdriver.findElement(login).click();\n\t}",
"@When(\"^click on login button$\")\n\tpublic void click_on_login_button() throws Throwable {\n\t\tdriver.findElement(By.xpath(\"//input[@name='btnLogin']\")).click();\n\t}",
"@And(\"click on login button\")\n\tpublic void click_on_login_button() {\n\t\tSystem.out.println(\"click on login button\");\n\t\tdriver.findElement(By.name(\"Submit\")).click();\n\t \n\t}",
"public void irParaPaginaDeLogin (){\n\n click(By.className(btnLoginClass));\n }",
"public void click_SIGN_IN() {\r\n\t\tbtn_SIGN_IN.click();\r\n\t}",
"public void clickLogin() {\r\n\t\tdriver.findElement(SignIn).click();\r\n\t\t//SignIn.click();\r\n\t\t//SignIn.click();\r\n\t\t//return new LoginPage();\r\n\t}",
"public void clickLoginButton() {\n\t\tLoginSignupCompanyPage sp = new LoginSignupCompanyPage(driver);\n\t\tlog.info(\"Verifying the login button is available or not\");\n\t\tAssert.assertTrue(clickLoginButton.isDisplayed());\n\t\tclickLoginButton.click();\n\t}",
"@And(\"clicks on login button\")\n\tpublic void clicks_on_login_button() {\n\t\tdriver.findElement(By.id(\"login\")).click();\n\t\t\n\n\t}",
"@Then(\"^The user clicks the login button$\")\n\tpublic void the_user_clicks_the_login_button() throws Throwable {\n\t\t\n\t lpw.click_login_button();\n\t}",
"public void LoginButton() {\n\t\t\r\n\t}",
"@When(\"user clicks on login button\")\r\n\tpublic void user_clicks_on_login_button() {\n\t\tdriver.findElement(By.name(\"Login\")).click();\r\n\t}",
"@When(\"^click on Login Button$\")\npublic void click_on_Login_Button() throws Throwable \n{\n\tdriver.findElement(By.id(\"form-login_submitAuth\")).click();\n}",
"public void performLogin(View view) {\r\n // Do something in response to button\r\n\r\n Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://dev.m.gatech.edu/login/private?url=gtclicker://loggedin&sessionTransfer=window\"));\r\n startActivity(myIntent);\r\n }",
"@When(\"^user should cliks the Login Button in login page$\")\n\tpublic void user_should_cliks_the_Login_Button_in_login_page() throws Throwable {\n\t\telementClick(pa.getAp().getLoginclick());\n\t \n\t}",
"public HomePage clickOnLogin() {\n// Actions action = new Actions(driver);\n// action.moveToElement(login).build().perform();\n// closeAd.click();\n login.isDisplayed();\n login.click();\n return this;\n }",
"@Override\r\n\tpublic void clickOnLoginLink() {\r\n\t\t\r\n\t\tSelenium.click(lnkLogIn());\r\n\t}",
"@When(\"^I click on login button$\")\n public void iClickOnLoginButton() throws Throwable {\n }",
"public void clickloginbutton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Login Button should be clicked\");\r\n\t\ttry{\r\n\t\t\tclick(locator_split(\"btnLogin\"));\r\n\t\t\tsleep(2000);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Login Button is clicked\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Login button is not clicked with WebElement \"+elementProperties.getProperty(\"btnLogin\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnLogin\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"public void clciklogin() {\n\t driver.findElement(loginBtn).click();\r\n\t \r\n\t //Print the web page heading\r\n\t System.out.println(\"The page title is : \" +driver.findElement(By.xpath(\"//*[@id=\\\"app\\\"]//div[@class=\\\"main-header\\\"]\")).getText());\r\n\t \r\n\t //Click on Logout button\r\n\t// driver.findElement(By.id(\"submit\")).click();\r\n\t }",
"@When(\"I click on log in\")\n\tpublic void i_click_on_log_in() {\n\t\tlogger.info(\"Clicking on Sign in\");\n\t\thomepage.login.click();\n\t\tBrowserUtilities.waitFor(2);\n\n\t}",
"@And(\"^clicks the 'Log in' button$\")\n public void clicksTheLogInButton() throws Throwable {\n }",
"@When(\"^click on login button$\")\n\tpublic void click_on_login_button() throws Throwable {\n\t throw new PendingException();\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tlogin();\r\n\t\t\t}",
"public void goToLoginPage()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignInLink();\n\t}",
"@When(\"^Clicking on login button$\")\npublic void clicking_on_login_button() throws Throwable {\n driver.findElement(By.xpath(\"//*[@id=\\\"loginfrm\\\"]/button\")).click();\n}",
"public DashboardPage clickLogin() {\n driver.findElement(By.id(\"login-button\")).click();\n return new DashboardPage(driver);\n }",
"public DashboardPage clickloginButton (){\n driver.findElement(loginButton).click ();\n\n return new DashboardPage (driver);\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(v==buttonlogin)\n\t\t\t\t{\n\t\t\t\t\tloginUser();\n\t\t\t\t}\n\t\t\t}",
"@Override\n public void onClick(View view) {\n attemptLogin();\n }",
"@OnClick(R.id.login_btn)\n void loginClick() {\n mPresenter.clickOnLogin();\n }",
"private void auto_log_in()\n {\n jtf_username.setText(Config.USERNAME);\n jpf_password.setText(Config.PASSWORD);\n jb_prijavi.doClick();\n\n }",
"@And(\"^clicks the 'Log In' button$\")\n public void clicksTheLogInButton1() throws Throwable {\n }",
"@Test(enabled = true, priority = 8)\n\tpublic void loginButtonTest03() {\n\t\tdriver.findElement(By.cssSelector(\"#cms-login-submit\")).click();\n\n\t}",
"public void ClickSignIn() {\n if (lnkSignIn.isDisplayed()) {\n lnkSignIn.click();\n }\n else{System.out.println(\"Sign In link is not displayed\");\n }\n }",
"public void btnLoginClicked() {\n String username = txfUsername.getText();\n String password = txfPassword.getText();\n DatabaseController database = new DatabaseController(new TuDbConnectionFactory());\n Authentication auth = new Authentication(database);\n if (auth.signIn(username, password)) {\n Player player = new Player(username, database.getPersonalTopScore(username));\n game.setScreen(new PreGameScreen(game,\"music/bensound-funkyelement.mp3\", player));\n } else {\n txfUsername.setColor(Color.RED);\n txfPassword.setColor(Color.RED);\n }\n }",
"public void clkbtnLogin() {\n\t\tWebDriverWait wait = new WebDriverWait(ldriver, 25);\n\t\twait.until(ExpectedConditions.visibilityOf(btnLogin));\n\t\twait.until(ExpectedConditions.elementToBeClickable(btnLogin));\n\t\tbtnLogin.click();\n\t}",
"@OnClick(R.id.email_sign_in_button) public void onLoginClicked() {\n String uname = username.getText().toString();\n String pass = password.getText().toString();\n\n loginForm.clearAnimation();\n\n // Start login\n presenter.doLogin(new AuthCredentials(uname, pass));\n }",
"private void clickSignOn() {\n\t\tthis.clickElement(signon);\n\t}",
"@Override\n public void onClick(View v) {\n loginUser(\"333333\");\n }",
"public void loginClicked(View view) {\n setContentView(R.layout.activity_scanner);\n System.out.println(\"log in clicked\");\n }",
"@Override\n public void onClick(View v) {\n loginUser(\"111111\");\n }",
"@When(\"click submit\")\n\tpublic void click_login() throws InterruptedException {\n\t\tact.getlogin().clickLogin();\n\t\tThread.sleep(50000);\n\n\t}",
"public PageBase click_on_login_submit_form_button () {\r\n HomePageClass homePage = new HomePageClass(driver);\r\n\r\n LGN_Login_submitBTN.click();\r\n\r\n WebDriverWait wait = getWait();\r\n wait.until(ExpectedConditions.visibilityOf(homePage.logout));\r\n\r\n return homePage;\r\n\r\n }",
"@Then(\"^I Login to the application$\")\r\n\tpublic void I_Login_to_the_application() throws Throwable {\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit']\")).click();\r\n\t}",
"@Override\n public void onClick(View v) {\n loginUser(\"999999\");\n }",
"public void clickSignInButton() {\r\n\t\tdriver.findElement(signInButton).click();\r\n\t}",
"@Override\n public void onClick(View v) {\n loginUser(\"666666\");\n }",
"public void clickSignInButton() {\r\n\t\tsignInButton = driver.findElement(signInButtonSelector);\r\n\t\tsignInButton.click();\r\n\t\t\r\n\t}",
"public void login2() {\n\t\tdriver.findElement(By.cssSelector(\"input[name='userName']\")).sendKeys(\"testing\");\n\t\tdriver.findElement(By.cssSelector(\"input[name='password']\")).sendKeys(\"testing\");\n\t\tdriver.findElement(By.cssSelector(\"input[name='login']\")).click();\n\t\t\n\n\t\n\t\n\t}",
"@Given(\"landing to the loginpage and signin\")\n\tpublic void user_on_login_page_andSignin() {\n\t\t\n\t\t\n\t\tdriver.findElement(By.className(\"login\")).click();\n\t\t\n\t}",
"@OnClick(R.id.btn_login)\n public void btnLoginClick(View v) {\n if (ButtonClicksHelper.canClickButton()) {\n KeyboardHelper.hideKeyboard(getDialog().getCurrentFocus());\n mPresenter.logIn();\n }\n }",
"@When(\"^user clicks Login button$\")\r\n public void user_clicks_Login_button() throws Throwable {\n throw new PendingException();\r\n }",
"@Then(\"^click the login button$\")\n public void click_the_login_button() throws Throwable {\n throw new PendingException();\n }",
"public void onClick(View arg0) {\n\n int i = arg0.getId();\n // login button was pressed\n\n }",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\tlogin();\n\t\t\t}",
"private void btnLogin(ActionEvent e) {\n }",
"@And(\"user clicks on Login\")\n public void userClicksOnLogin() {\n homePage.clickOnLogin();\n\n }",
"public void User_login()\r\n\t{\n\t\tdriver.findElement(FB_Locators.Signin_Email).clear();\r\n\t\tdriver.findElement(FB_Locators.Signin_Email).sendKeys(username);\r\n\t\t\r\n\t\t//Script using element referral..\r\n\t\tWebElement Password_Element=driver.findElement(FB_Locators.Signin_password);\r\n\t\tPassword_Element.clear();\r\n\t\tPassword_Element.sendKeys(password);\r\n\t\t\r\n\t\t//Login button using webelemnet referral\r\n\t\tWebElement Login_btn_Element=driver.findElement(FB_Locators.Signin_btn);\r\n\t\tLogin_btn_Element.click();\r\n\t}",
"public void loginAsUser() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"user\");\n vinyardApp.fillPassord(\"123\");\n vinyardApp.clickSubmitButton();\n }",
"public void login() {\n presenter.login(username.getText().toString(), password.getText().toString());\n }",
"@Test\n\t\tpublic void login() {\n\n\t\t\tlaunchApp(\"chrome\", \"http://demo1.opentaps.org/opentaps/control/main\");\n\t\t\t//Enter username\n\t\t\tenterTextById(\"username\", \"DemoSalesManager\");\n\t\t\t//Enter Password\n\t\t\tenterTextById(\"password\", \"crmsfa\");\n\t\t\t//Click Login\n\t\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\t//Check Browser Title\n\t\t\tverifyBrowserTitle(\"Opentaps Open Source ERP + CRM\");\n\t\t\t//Click Logout\n\t\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\t\n\n\t\t}",
"@Override\n public void onClick(View v) {\n loginUser(\"222222\");\n }",
"@Override\r\n public void onClick(View v) {\n userLogin();\r\n }",
"public void actionPerformed(ActionEvent e) {\n \t\t\t\tlogin();\n \t\t\t}",
"@Override\n public void onClick(View v) {\n loginUser(\"777777\");\n }",
"public void clickSignIn() {\r\n\t\tdriver.findElement(signIn).click();\r\n\t}",
"@Test\r\n public void login() {\n driver.findElement(By.className(\"login\")).click();\r\n // Fill in the form\r\n driver.findElement(By.id(\"email\")).sendKeys(\"[email protected]\");\r\n driver.findElement(By.id(\"passwd\")).sendKeys(\"tester\");\r\n driver.findElement(By.id(\"SubmitLogin\")).click();\r\n // Assert if element is displayed\r\n // Assert if element is displayed\r\n Assert.assertTrue(driver.findElement(\r\n By.cssSelector(\"ul.myaccount_lnk_list\")).isDisplayed());\r\n }",
"@Override\n public void onClick(View v) {\n loginUser(\"888888\");\n }",
"@When(\"^Click on Sign Up Button$\")\npublic void click_on_Sign_Up_Button() throws Throwable \n{\n\tdriver.findElement(By.xpath(\"//*[@id=\\\"login-block\\\"]/div/ul/li[1]/a\")).click();\n\tSystem.out.println(\"User is successfully navigated to Registration screen\");\n \n}",
"@Test(dependsOnMethods=\"startapp\")\r\n\tpublic void loginapp() {\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"root\\\"]/div/div/div/form/div[1]/input\")).sendKeys(\"[email protected]\");\r\n\t\t//((WebElement) driver.findElements(By.xpath(\"//*[@id=\\\"idSIButton9\\\"]\"))).click();\r\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"root\\\"]/div/div/div/form/div[2]/input\")).sendKeys(\"Liverpool1\");\r\n\t\t\r\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"root\\\"]/div/div/div/form/button\")).click();\r\n\t\tdriver.manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS);\r\n\t}",
"public String onClick() {\n final String login = getModel().getLogin();\n final String password = getModel().getPasssword();\n\n //Call Business\n Exception ex2 = null;\n User s = null;\n try {\n s = service.login(login, password);\n } catch (Exception ex) {\n ex2 = ex;\n }\n\n //Model to View\n if (ex2 == null) {\n getModel().setCurrentUser(s);\n return \"list\";\n } else {\n return null;\n }\n }",
"@Test\t\t\n\tpublic void Login()\t\t\t\t\n\t{\t\t\n\t driver.get(\"https://demo.actitime.com/login.do\");\t\t\t\t\t\n\t driver.findElement(By.id(\"username\")).sendKeys(\"admin\");\t\t\t\t\t\t\t\n\t driver.findElement(By.name(\"pwd\")).sendKeys(\"manager\");\t\t\t\t\t\t\t\n\t driver.findElement(By.xpath(\"//div[.='Login ']\")).click();\t\t\n\t driver.close();\n\t}",
"@Override\n public void onClick(View v) {\n loginUser(\"555555\");\n }",
"@When(\"^user clicks on the login button$\")\n public void user_clicks_on_the_login_button() throws Throwable {\n throw new PendingException();\n }",
"@When(\"^I click on the login button$\")\n\tpublic void i_click_on_the_login_button() throws Throwable {\n\t\tthrow new PendingException();\n\t}",
"@And(\"^I click the signin button$\")\n public void iClickTheSigninButton() throws Throwable {\n }",
"@Override\n public void onClick(View v) {\n openLogIn();\n\n }",
"@Override\n public void onLoginClicked(String username, String password) {\n loginView.showProgress();\n loginInteractor.authorize(username, password, this);\n }",
"@Override\n public void onClick(View v) {\n loginUser(\"444444\");\n }",
"@And(\"is on login page\")\n\tpublic void is_on_login_page() {\n\t\tSystem.out.println(\"user on 1\");\n\t\tdriver.navigate().to(\"https://example.testproject.io/web/\");\n\n\t}",
"private void showLogin() {\n \t\tLogin.actionHandleLogin(this);\n \t}",
"public void clickLogin(View view) {\n\t\tif (TextUtils.isEmpty(etUsername.getText().toString().trim()) &&\n\t\t\tTextUtils.isEmpty(etPassword.getText().toString().trim())) {\n\t\t\tToast.makeText(LoginActivity.this, \"Username/Password tidak boleh kosong\", Toast.LENGTH_SHORT).show();\n\t\t\tetUsername.requestFocus();\n\t\t} else if (TextUtils.isEmpty(etUsername.getText().toString().trim())) {\n\t\t\tToast.makeText(LoginActivity.this, \"Username tidak boleh kosong\", Toast.LENGTH_SHORT).show();\n\t\t\tetUsername.requestFocus();\n\t\t} else if (TextUtils.isEmpty(etPassword.getText().toString().trim())) {\n\t\t\tToast.makeText(LoginActivity.this, \"Password tidak boleh kosong\", Toast.LENGTH_SHORT).show();\n\t\t\tetPassword.requestFocus();\n\t\t} else {\n\t\t\tIntent intent = new Intent(LoginActivity.this, SuccessActivity.class);\n\t\t\tintent.putExtra(\"data_username\", etUsername.getText().toString());\n\t\t\tstartActivity(intent);\n\t\t}\n\t}",
"@Test(priority = 1)\n public void testLoginUser() {\n\n WebElement loginField = driver.findElement(By.name(\"username\"));\n loginField.sendKeys(userLogin);\n System.out.println(userLogin);\n\n WebElement passwordField = driver.findElement(By.name(\"password\"));\n passwordField.sendKeys(userPassword);\n System.out.println(userPassword);\n\n WebElement loginButton = driver.findElement(By.cssSelector(\"button[class*='el-button']\"));\n loginButton.click();\n\n// wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(\"div[class*='search-form'] > div > input\")));\n\n String url = driver.getCurrentUrl();\n Assert.assertEquals(url,\"http://login.multidetect.eu/project\");\n }",
"public void clickLoginB1() {\n\t\tWebElement temp = (new WebDriverWait(driver, waitTime))\n\t\t\t\t .until(ExpectedConditions.presenceOfElementLocated(By.id(\"b1\")));\n\t\ttemp.click();\n\t}",
"public void login(String login, String password) {\n driver.findElement(By.xpath(\"//input[@id='email']\")).sendKeys(login);\n driver.findElement(By.xpath(\"//input[@id='passwd']\")).sendKeys(password);\n driver.findElement(By.xpath(\"//button[@name='submitLogin']\")).click();\n\n }",
"@Test\n\tpublic void TC02_Login() {\n\t\tSystem.out.println(\"TC02 : 1. Click to Login Page\");\n\t\tclickToElemnet(loginLinkX);\n\n\t\t// Verify Navigate to Login Page\n\t\tSystem.out.println(\"TC02 : 2. Login Page Display Status :\" + checkElementDisplayed(loginPageX));\n\n\t\t// Login to Page\n\t\tsendkeysToElement(emailTxtX, regEmail);\n\t\tsendkeysToElement(passwordTxtX, regPassword);\n\t\tclickToElemnet(loginBtnX);\n\n\t\t// Verify Login Successfully\n\t\tSystem.out.println(\"TC02 : 3. Login Successfully Status : \" + checkElementDisplayed(myAccountLinkX));\n\t}",
"@Override\n public void onClick(View view) {\n onLoginClicked();\n }",
"@OnClick(R.id.buttonLogin)\n void login()\n {\n UtilsMethods.hideSoftKeyboard(this);\n if (from.equals(Keys.FROM_FIND_JOB))\n {\n\n Intent intent = new Intent(this, LoginSignUpSeekerActivity.class);\n intent.putExtra(Keys.CLICKED_EVENT, Keys.CLICKED_EVENT_LOGIN);\n startActivity(intent);\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n }\n else\n {\n Intent intent = new Intent(this, LoginSignUpRecruiterActivity.class);\n intent.putExtra(Keys.CLICKED_EVENT, Keys.CLICKED_EVENT_LOGIN);\n startActivity(intent);\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n }\n }",
"public void sendLoginClickPing() {\n WBMDOmnitureManager.sendModuleAction(new WBMDOmnitureModule(\"reg-login\", ProfessionalOmnitureData.getAppNamePrefix(this), WBMDOmnitureManager.shared.getLastSentPage()));\n }",
"public void clickloginlink(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Loginlink should be clicked from Home Page\");\r\n\t\ttry{\r\n\t\t\twaitForElement(locator_split(\"lnkLogin\"));\r\n\t\t\tclick(locator_split(\"lnkLogin\"));\r\n\t\t\twaitForPageToLoad(200);\r\n\t\t\tSystem.out.println(\"Login link clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:-Login link is clicked from home page\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Login link is not clicked\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"@Then(\"^click on the Login button user nagivate to the next page$\")\r\n\tpublic void click_on_the_Login_button_user_nagivate_to_the_next_page() throws Throwable {\n\t w.submit();\r\n\t}",
"public void onClick(View v) {\n\t\t\t\tString usernameField = username.getText().toString();\n\t\t\t\tString passwordField = password.getText().toString();\n\n\t\t\t\t// login with this information\n\t\t\t\tlogin(usernameField, passwordField);\n\t\t\t\t\n\t\t\t}"
]
| [
"0.8994518",
"0.89293975",
"0.8629465",
"0.8543839",
"0.84612346",
"0.8452833",
"0.8389986",
"0.83745706",
"0.8364653",
"0.8268765",
"0.82282907",
"0.8122479",
"0.8090512",
"0.799629",
"0.7974702",
"0.7968648",
"0.7967627",
"0.7952697",
"0.7941809",
"0.7897555",
"0.7793947",
"0.77399087",
"0.77309954",
"0.77212626",
"0.7720034",
"0.7691547",
"0.7679714",
"0.76778144",
"0.7620062",
"0.7612396",
"0.7611455",
"0.7609752",
"0.757569",
"0.7568233",
"0.7554035",
"0.75502264",
"0.7491649",
"0.74858856",
"0.7460799",
"0.7452774",
"0.7422989",
"0.7396639",
"0.73846173",
"0.73704934",
"0.7363554",
"0.7360956",
"0.732562",
"0.7320624",
"0.7317319",
"0.7313673",
"0.7293742",
"0.7292735",
"0.7276457",
"0.7271401",
"0.72700775",
"0.7267309",
"0.72521347",
"0.724895",
"0.72278357",
"0.7223619",
"0.7221321",
"0.7220467",
"0.7218658",
"0.7214585",
"0.72097135",
"0.72029305",
"0.72010285",
"0.71897376",
"0.718891",
"0.71826905",
"0.71798587",
"0.7177318",
"0.7177271",
"0.717531",
"0.717039",
"0.7164042",
"0.7161296",
"0.71581846",
"0.71426445",
"0.71332705",
"0.71208155",
"0.711492",
"0.71059453",
"0.7105726",
"0.7102618",
"0.7091596",
"0.7088418",
"0.7085727",
"0.708548",
"0.7083758",
"0.707401",
"0.7073774",
"0.70720124",
"0.70608586",
"0.70565754",
"0.70526963",
"0.70270425",
"0.70256776",
"0.7025206",
"0.7024694"
]
| 0.83840406 | 7 |
Returns a sink which publishes the items it receives to a distributed reliable topic with the specified name. No state is saved to snapshot for this sink. After the job is restarted, the items will likely be duplicated, providing an atleastonce guarantee. Local parallelism for this sink is 1. | @Nonnull
public static <T> Sink<T> reliableTopic(@Nonnull String reliableTopicName) {
return SinkBuilder.<ITopic<T>>sinkBuilder("reliableTopicSink(" + reliableTopicName + "))",
ctx -> ctx.jetInstance().getReliableTopic(reliableTopicName))
.<T>receiveFn(ITopic::publish)
.build();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MockTopicSubscriber getDurableTopicSubscriber(String name)\n {\n return (MockTopicSubscriber)topicDurableSubscriberMap.get(name);\n }",
"@Override\n public IPublisherEndpoint getNewOrExistingPublisher(String endpointName, String streamId) {\n DistributedPublisherEndpoint publisherEndpoint = (DistributedPublisherEndpoint) context.getBean(\"distributedPublisherEndpoint\", web, dataChannels, this, endpointName + \"_\" + streamId, room.getPipeline(), room.getKmsUri(), streamId);\n DistributedPublisherEndpoint existingPublisherEndpoint = publishers.putIfAbsent(streamId, publisherEndpoint);\n\n if (existingPublisherEndpoint != null) {\n publisherEndpoint = existingPublisherEndpoint;\n log.trace(\"PARTICIPANT {}: Already exists a publish endpoint to user {} with streamId {}\", this.name,\n endpointName, streamId);\n } else {\n log.debug(\"PARTICIPANT {}: New publisher endpoint to user {} with streamId {}\", this.name, endpointName, streamId);\n\n // The publisher is not streaming yet (only when publishRoom is called)\n// CountDownLatch c = new CountDownLatch(1);\n// ICountDownLatch countDownLatch = hazelcastInstance.getCountDownLatch(distributedNamingService.getName(\"publisherLatch\" + streamId + \"-\" + name + \"-\" + room.getName()));\n// publisherLatches.putIfAbsent(streamId, countDownLatch);\n publishersStreamingFlags.putIfAbsent(streamId, false);\n\n for (DistributedParticipant other : (Collection<DistributedParticipant>) room.getParticipants()) {\n if (!other.getName().equals(this.name)) {\n for (String otherStreamId : other.publishers.keySet()) {\n getNewOrExistingSubscriber(other.getName(), otherStreamId);\n }\n }\n }\n }\n\n return publisherEndpoint;\n }",
"@Bean\n IntegrationFlow producer() {\n MessageSource<String> messageSource = () -> (run.get() ? MessageBuilder\n .withPayload(\"Greetings @ \" + Instant.now().toString() + \".\").build() : null);\n return IntegrationFlows\n .from(messageSource, ps -> ps.poller(pm -> pm.fixedRate(1000L)))\n .channel(channels.output()).get();\n }",
"GenericSink createGenericSink();",
"public void removeTopicDurableSubscriber(String name)\n {\n topicDurableSubscriberMap.remove(name);\n }",
"protected final ByteSink getOutput(String name) {\n try {\n if (name.equals(\"-\")) {\n return new StandardOutputSink();\n } else {\n File file = new File(name);\n if (file.isDirectory()) {\n throw new IOException(name); // TODO Message? Exception?\n } else if (file.exists() && !file.canWrite()) {\n throw new IOException(name); // TODO Message? Exception?\n } else {\n return Files.asByteSink(file);\n }\n }\n } catch (IOException e) {\n throw new UncheckedIOException(e);\n }\n }",
"public Packet waitForQueueData(String name) throws InterruptedException {\n\t\ttry {\n\t\t\treturn namedQueues.get(name).take();\n\t\t} catch (NullPointerException e) {\n\t\t\taddNamedQueue(name);\n\t\t\treturn namedQueues.get(name).take();\n\t\t}\n\t}",
"public Publisher createHierarchicalTopicPublisher(String topicName) {\n validateTopicName(topicName, true);\n\n String topicRootName;\n int pos = topicName.indexOf('.');\n if (pos == -1) {\n topicRootName = topicName;\n } else {\n topicRootName = topicName.substring(0, pos);\n }\n\n String source = String.format(\"%s.%s\", endpointId, topicRootName);\n CAMQPEndpointPolicy endpointPolicy = new CAMQPEndpointPolicy();\n endpointPolicy.setEndpointType(EndpointType.TOPIC);\n endpointPolicy.setTopicRouterType(TopicRouterType.Hierarchical);\n CAMQPSourceInterface sender = CAMQPEndpointManager.createSource(session, source, topicRootName, endpointPolicy);\n return new Publisher(topicName, sender);\n }",
"private static FlinkKafkaProducer<String> getKafkaSink(Tuple2<String, String> sinkTuple) {\n\t\tProperties props = new Properties();\n\t\tprops.setProperty(\"bootstrap.servers\", sinkTuple.f0);\t\t\t\t\n\t\treturn new FlinkKafkaProducer<>(\n\t\t\t\tsinkTuple.f0,\n\t\t\t\tsinkTuple.f1,\n\t\t\t\tnew SimpleStringSchema());\t\n\t}",
"public String getDurableSubscriptionName() {\n return durableSubscriptionName;\n }",
"public Subscriber createHierarchicalTopicSubscriber(String topicName) {\n validateTopicName(topicName, true);\n String target = String.format(\"%s.%s\", endpointId, topicName);\n CAMQPEndpointPolicy endpointPolicy = new CAMQPEndpointPolicy();\n endpointPolicy.setEndpointType(EndpointType.TOPIC);\n endpointPolicy.setTopicRouterType(TopicRouterType.Hierarchical);\n CAMQPTargetInterface receiver = CAMQPEndpointManager.createTarget(session, topicName, target, endpointPolicy);\n return new Subscriber(target, receiver);\n }",
"public MockTopicPublisher getTopicPublisher(String topicName)\n {\n List publishers = getTopicPublisherList(topicName);\n if(publishers.size() <= 0) return null;\n return (MockTopicPublisher)publishers.get(0);\n }",
"private LLZPublisher getOrCreatePublisherForTopic(final String topicName) throws LLZException\n {\n final PubTopicConfig pubTopicCfg = this.instanceContext.getInstanceConfig().getPubTopicCfg(topicName);\n final PubSocketSchema pubSocketSchema = this.instanceContext.getInstanceConfig().getPubSocketSchema(pubTopicCfg.getSocketSchema());\n\n return this.publishersPools.getOrCreatePublisher(pubSocketSchema);\n }",
"public void setDurableSubscriptionName(String durableSubscriptionName) {\n this.durableSubscriptionName = durableSubscriptionName;\n }",
"public <T> RealtimeRos2Publisher<T> createPublisher(TopicDataType<T> topicDataType, String topicName) throws IOException\n {\n return createPublisher(topicDataType, topicName, Ros2QosProfile.DEFAULT(), DEFAULT_QUEUE_SIZE);\n }",
"boolean getDurableWrites();",
"public Map getDurableTopicSubscriberMap(String topicName)\n {\n Map resultMap = new HashMap();\n Iterator subscriberNames = topicDurableSubscriberMap.keySet().iterator();\n while(subscriberNames.hasNext())\n {\n Object nextName = subscriberNames.next();\n MockTopicSubscriber subscriber = (MockTopicSubscriber)topicDurableSubscriberMap.get(nextName);\n try\n {\n if(null != subscriber && subscriber.getTopic().getTopicName().equals(topicName))\n {\n resultMap.put(nextName, subscriber);\n }\n }\n catch(JMSException exc)\n {\n \n }\n }\n return resultMap;\n }",
"public Packet getQueueData(String name) throws InterruptedException, NullPointerException {\n\t\ttry {\n\t\t\treturn namedQueues.get(name).poll();\n\t\t} catch (NullPointerException e) {\n\t\t\taddNamedQueue(name);\n\t\t\treturn namedQueues.get(name).poll();\n\t\t}\n\t}",
"public Publisher createPublisher(String topicName) {\n validateTopicName(topicName, false);\n String source = String.format(\"%s.%s\", endpointId, topicName);\n CAMQPEndpointPolicy endpointPolicy = new CAMQPEndpointPolicy();\n endpointPolicy.setEndpointType(EndpointType.TOPIC);\n CAMQPSourceInterface sender = CAMQPEndpointManager.createSource(session, source, topicName, endpointPolicy);\n return new Publisher(topicName, sender);\n }",
"public AppSink getSinkElement() {\n return sink;\n }",
"@Override\n public final SortedSet<Node<N>> getSinks() {\n return new Sinks(this);\n }",
"public abstract Pipe deliver( Pipe sink );",
"public Channel(String name) {\n this.name = name;\n q = new ArrayBlockingQueue(1);\n senderMonitor = new Object();\n\n }",
"private DataCollector getDataCollector(String name) {\n DataCollector dataCollector = collectors.get(name);\n if (dataCollector == null) {\n dataCollector = new DataCollector();\n }\n return dataCollector;\n }",
"public Sink getSink(){\r\n\t\treturn sink;\r\n\t}",
"public @Nullable Flowable<T> createSubscriptionChannel(String id, BackpressureStrategy strategy) {\n if (id == null) {\n return null;\n }\n NotificationEmitter<T> channel = new NotificationEmitter<>();\n final NotificationEmitter<T> formerChannel = store.putIfAbsent(id, channel);\n if (formerChannel != null) {\n channel = formerChannel;\n }\n return channel.create(strategy);\n }",
"@Test\n public void testEvent() throws EventDeliveryException, MQBrokerException, MQClientException, InterruptedException, UnsupportedEncodingException, RemotingException {\n DefaultMQProducer producer = new DefaultMQProducer(producerGroup);\n producer.setNamesrvAddr(nameServer);\n String sendMsg = \"\\\"Hello Flume\\\"\" + \",\" + DateFormatUtils.format(new Date(), \"yyyy-MM-dd hh:mm:ss\");\n producer.start();\n Message msg = new Message(TOPIC_DEFAULT, tag, sendMsg.getBytes(\"UTF-8\"));\n SendResult sendResult = producer.send(msg);\n\n // start source\n Context context = new Context();\n context.put(NAME_SERVER_CONFIG, nameServer);\n context.put(TAG_CONFIG, tag);\n Channel channel = new MemoryChannel();\n Configurables.configure(channel, context);\n List<Channel> channels = new ArrayList<>();\n channels.add(channel);\n ChannelSelector channelSelector = new ReplicatingChannelSelector();\n channelSelector.setChannels(channels);\n ChannelProcessor channelProcessor = new ChannelProcessor(channelSelector);\n\n RocketMQSource source = new RocketMQSource();\n source.setChannelProcessor(channelProcessor);\n Configurables.configure(source, context);\n\n source.start();\n\n // wait for rebalanceImpl start\n Thread.sleep(2000);\n\n sendMsg = \"\\\"Hello Flume\\\"\" + \",\" + DateFormatUtils.format(new Date(), \"yyyy-MM-dd hh:mm:ss\");\n msg = new Message(TOPIC_DEFAULT, tag, sendMsg.getBytes(\"UTF-8\"));\n sendResult = producer.send(msg);\n log.info(\"publish message : {}, sendResult:{}\", sendMsg, sendResult);\n\n PollableSource.Status status = source.process();\n if (status == PollableSource.Status.BACKOFF) {\n fail(\"Error\");\n }\n /*\n wait for processQueueTable init\n */\n Thread.sleep(1000);\n\n producer.shutdown();\n source.stop();\n\n\n /*\n mock flume sink\n */\n Transaction transaction = channel.getTransaction();\n transaction.begin();\n Event event = channel.take();\n if (event == null) {\n transaction.commit();\n fail(\"Error\");\n }\n byte[] body = event.getBody();\n String receiveMsg = new String(body, \"UTF-8\");\n log.info(\"receive message : {}\", receiveMsg);\n\n assertEquals(sendMsg, receiveMsg);\n }",
"public boolean isSink() {\r\n \t\treturn sink;\r\n \t}",
"boolean isSink();",
"private void publishMessage() throws InterruptedException {\n\t\tDatagramPacket[] packets = moveReceivedPacketsToArray();\r\n\t\t// get packet info\r\n\t\tDatagramPacket packet = packets[0];\r\n\t\tbyte[] packetData = packet.getData();\r\n\t\tbyte[] topicNumberInBytes = new byte[4];\r\n\t\tfor (int index = 2; index < 6; index++) {\r\n\t\t\ttopicNumberInBytes[index - 2] = packetData[index];\r\n\t\t}\r\n\t\tByteBuffer wrapped = ByteBuffer.wrap(topicNumberInBytes);\r\n\t\tint topicNumber = wrapped.getInt();\r\n\r\n\t\t// check if the topic exists\r\n\t\tif (topicNumbers.containsKey(topicNumber)) {\r\n\t\t\tString topicName = topicNumbers.get(topicNumber);\r\n\t\t\tif (subscriberMap.containsKey(topicName)) {\r\n\t\t\t\tArrayList<Integer> topicSubscribers = subscriberMap.get(topicName);\r\n\t\t\t\tfor (int index = 0; index < topicSubscribers.size(); index++) {\r\n\t\t\t\t\t// make an array\r\n\t\t\t\t\tDatagramPacket[] packetsToSendToSub = new DatagramPacket[packets.length];\r\n\t\t\t\t\t// change the destination of all the packets\r\n\t\t\t\t\tfor (int i = 0; i < packets.length; i++) {\r\n\t\t\t\t\t\tDatagramPacket tempPacket = packets[i];\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * String pubMessage = processMessageFromPacket(tempPacket); byte[]\r\n\t\t\t\t\t\t * messagePacketBytes = createPacketData(Constants.PUBLICATION, message[2],\r\n\t\t\t\t\t\t * topicNumber, pubMessage.getBytes()); byte[] packetContent =\r\n\t\t\t\t\t\t * tempPacket.getData();\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tInetSocketAddress subAddress = new InetSocketAddress(Constants.DEFAULT_DST_NODE,\r\n\t\t\t\t\t\t\t\ttopicSubscribers.get(index));\r\n\t\t\t\t\t\ttempPacket.setSocketAddress(subAddress);\r\n\t\t\t\t\t\tpacketsToSendToSub[i] = tempPacket;\r\n\t\t\t\t\t}\r\n\t\t\t\t\taddItemsToQueue(packetsToSendToSub);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void addEngineSinks(int totalSinks, String sinkName) {\n int toAllocate = Math.min(totalSinks, getEngine().integralHeatSinkCapacity());\n addEngineSinks(sinkName, toAllocate);\n }",
"public Subscription subscribeForDistributorDeliveries(ClockListener listener);",
"public static void main(String[] args) throws Exception {\n var env = StreamExecutionEnvironment.getExecutionEnvironment();\n\n // Set to 1 for now\n //env.setParallelism(1);\n env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);\n Properties props = new PropReader().getProps();\n props.setProperty(\"bootstrap.servers\", KAFKA_ADDRESS);\n props.setProperty(\"group.id\", KAFKA_GROUP);\n //env.enableCheckpointing(50000);\n //env.getConfig().setLatencyTrackingInterval(1000);\n env.getConfig().setLatencyTrackingInterval(5L);\n\n\n // Create tbe Kafka Consumer here\n FlinkKafkaConsumer010<Order> consumer = new FlinkKafkaConsumer010<Order>(IN_TOPIC,\n new OrderDeserializationSchema()\n , props);\n // uid - Grafana , name - flink.\n DataStream<Order> orderStream = env.addSource(consumer).name(\"Subscribe Trades/Orders\").uid(\"Subscribe_Trades_Orders\");// .setParallelism(1)\n // printOrTest(orderStream);\n // create a Producer for positionsByAct\n FlinkKafkaProducer010<FlatOrder> producer =\n new FlinkKafkaProducer010<FlatOrder>\n (KAFKA_ADDRESS,\n OUT_TOPIC,\n new FlatOrderSerializationSchema());\n producer.setWriteTimestampToKafka(true);\n\n //// create a Producer for positionsBySymbol\n FlinkKafkaProducer010<FlatOrder> producer2 =\n new FlinkKafkaProducer010<FlatOrder>\n (KAFKA_ADDRESS,\n OUT_TOPIC_1,\n new FlatOrderSerializationSchema());\n producer2.setWriteTimestampToKafka(true);\n\n // Allocations are by Cusip, so keyBy Cusip.\n // flatten the structure by extracting allocations for account, sub account,cusip and quantity .\n // Convert to RichFlatMap and add a guage maetric.\n DataStream<FlatOrder> flatmapStream = orderStream\n .keyBy(order -> order.getOrderId())\n .flatMap(new MyGuage())\n .name(\"flatten the orders\").uid(\"flatten the orders\").assignTimestampsAndWatermarks(new BoundedOutOfOrdernessGenerator())\n .keyBy(flatOrder -> flatOrder.getCusip())\n .window(TumblingEventTimeWindows.of(Time.minutes(1)))\n .allowedLateness(Time.seconds(10))\n .sum(\"quantity\").name(\" Aggregate Quantity By Cusip/Symbol\").uid(\"Aggregate Quantity By Cusip/Symbol\");\n // .setParallelism(4)\n //.process(new AddQty()).name(\" Aggregate Quantity By Cusip/Symbol\").uid(\"Aggregate Quantity By Cusip/Symbol\");\n flatmapStream.addSink(producer2).name(\" Publish to positionsBySymbol\").uid(\"Publish to positionsBySymbol\");// publish to positionsBySymbol.\n printOrTest(flatmapStream);\n\n // Task # 2 : PositionByAccount\n DataStream<FlatOrder> flatCompositeMapStream = orderStream.keyBy(order -> order.getOrderId())\n .flatMap(new MyGuage()).assignTimestampsAndWatermarks(new BoundedOutOfOrdernessGenerator()).name(\"Assign Watermarks\").uid(\"Assign Watermarks\")\n .keyBy(flatOrder -> new CompositeKey( flatOrder.getCusip(),flatOrder.getAccount(),flatOrder.getSubAccount()))\n .window(TumblingEventTimeWindows.of(Time.minutes(3)))\n .allowedLateness(Time.seconds(10))\n .sum(\"quantity\").name(\"Aggregate Qty by Cusip/Acct/Subacct Composite key\").uid(\"Aggregate Qty by Cusip/Acct/Subacct Composite key\");\n printOrTest(flatCompositeMapStream);\n flatCompositeMapStream.addSink(producer).name(\"Publish to positionsByAct\").uid(\"Publish to positionsByAct\");\n\n env.execute(\"Order Processor \");\n }",
"public static void main(String[] args) {\n final StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();\n //env.enableCheckpointing(5000); // checkpoint every 5000 msecs\n Properties properties = new Properties();\n //kafka setting\n properties.setProperty(\"bootstrap.servers\", Constants.KafkaAddress.CU_LF_KAFKA_PROD.getValue());\n //properties.setProperty(\"bootstrap.servers\", \"127.0.0.1:9092\");\n properties.setProperty(\"group.id\", \"repair_data\");\n\n String accessLogTitle = Constants.AccessLogField.vault_name + \",\" + Constants.AccessLogField.server_name + \",\" +\n Constants.AccessLogField.client_id + \",\" + Constants.AccessLogField.user_id + \",\" +\n Constants.AccessLogField.remote_address + \",\" + Constants.AccessLogField.request_method + \",\" +\n Constants.AccessLogField.protocol + \",\" + Constants.AccessLogField.object_length + \",\" +\n Constants.AccessLogField.object_name + \",\" + Constants.AccessLogField.time_start + \",\" +\n Constants.AccessLogField.time_finish + \",\" + Constants.AccessLogField.user_agent + \",\" +\n Constants.AccessLogField.status + \",\" + Constants.AccessLogField.midstream_error + \",\" +\n Constants.AccessLogField.error_code + \",\" + Constants.AccessLogField.request_latency + \",\" +\n Constants.AccessLogField.response_length + \",\" + Constants.AccessLogField.turn_around_time + \",\" +\n Constants.AccessLogField.error_message ;\n\n SinkFunction<AccessLogBack> sinkFunction = new SinkFunction<AccessLogBack>(){\n\n @Override\n public void invoke(AccessLogBack accessLogBack, Context context) throws Exception {\n\n // folder name\n String folderName = accessLogBack.getFolderName();\n String dateName = accessLogBack.getDataName();\n String vault_name = accessLogBack.getVault_name();\n if (!cuBucketMap.containsKey(vault_name)){\n vault_name = \"ibm\";\n }\n String filePath = \"/data1/flink/\"+folderName + \"/\" +\n accessLogVersion + getAccessLogSite + vault_name + \"_\" + dateName + suffix;\n\n // if file not exist, touch file and set title\n File file = new File(filePath);\n File parentFile = file.getParentFile();\n if (!parentFile.exists() || !parentFile.isDirectory()){\n parentFile.mkdirs();\n }\n if (!file.exists()){\n FileWriter fileWriter = new FileWriter(filePath,true);\n fileWriter.write(accessLogTitle + \"\\n\");\n fileWriter.close();\n }\n // writer to file\n FileWriter fileWriter = new FileWriter(filePath,true);\n fileWriter.write(accessLogBack.toString() + \"\\n\");\n fileWriter.close();\n }\n };\n try {\n FlinkKafkaConsumer<String> stringFlinkKafkaConsumer = new FlinkKafkaConsumer<>(Constants.cmAccessLogTopic.cu_flink_lf_ca_access.getTopic(),\n new SimpleStringSchema(), properties);\n //FlinkKafkaConsumer<String> stringFlinkKafkaConsumer = new FlinkKafkaConsumer<>(\"test\", new SimpleStringSchema(), properties);\n //long startTimeMi = simpleDateFormat.parse(startTime).getTime();\n //stringFlinkKafkaConsumer.setStartFromTimestamp(startTimeMi);\n SingleOutputStreamOperator<AccessLogBack> accessLogBackSingleOutputStreamOperator = env.\n addSource(stringFlinkKafkaConsumer).flatMap(new FlatMapFunction<String, AccessLogBack>() {\n @Override\n public void flatMap(String s, Collector<AccessLogBack> collector) throws Exception {\n //2021-01-25T15:08:02.707Z\n JSONObject jsonObject = new JSONObject(s);\n String timestamp = jsonObject.getString(\"@timestamp\");\n AccessLogBack accessLogBack = new AccessLogBack();\n String dataName = DateUtil.dataName(timestamp);\n accessLogBack.setDataName(dataName);\n accessLogBack.setFolderName(dataName.substring(0,10));\n\n if (jsonObject.has(Constants.AccessLogField.vault_name.getField())) {\n accessLogBack.setVault_name(jsonObject.getString(Constants.AccessLogField.vault_name.getField()));\n }\n\n if (jsonObject.has(Constants.AccessLogField.server_name.getField())) {\n accessLogBack.setServer_name(jsonObject.getString(Constants.AccessLogField.server_name.getField()));\n } else {\n accessLogBack.setServer_name(Constants.AccessLogField.None.getField());\n }\n\n if (jsonObject.has(Constants.AccessLogField.client_id.getField())) {\n accessLogBack.setClient_id(jsonObject.getString(Constants.AccessLogField.client_id.getField()));\n } else {\n accessLogBack.setClient_id(Constants.AccessLogField.None.getField());\n }\n\n if (jsonObject.has(Constants.AccessLogField.user_id.getField())) {\n accessLogBack.setUser_id(jsonObject.getString(Constants.AccessLogField.user_id.getField()));\n } else {\n accessLogBack.setUser_id(Constants.AccessLogField.None.getField());\n }\n\n if (jsonObject.has(Constants.AccessLogField.remote_address.getField())) {\n accessLogBack.setRemote_address(jsonObject.getString(Constants.AccessLogField.remote_address.getField()));\n } else {\n accessLogBack.setUser_id(Constants.AccessLogField.None.getField());\n }\n\n if (jsonObject.has(Constants.AccessLogField.request_method.getField())) {\n accessLogBack.setRequest_method(jsonObject.getString(Constants.AccessLogField.request_method.getField()));\n } else {\n accessLogBack.setRequest_method(Constants.AccessLogField.None.getField());\n }\n\n if (jsonObject.has(Constants.AccessLogField.protocol.getField())) {\n accessLogBack.setProtocol(jsonObject.getString(Constants.AccessLogField.protocol.getField()));\n } else {\n accessLogBack.setProtocol(Constants.AccessLogField.None.getField());\n }\n\n if (jsonObject.has(Constants.AccessLogField.object_length.getField())) {\n accessLogBack.setObject_length(jsonObject.getString(Constants.AccessLogField.object_length.getField()));\n } else {\n accessLogBack.setObject_length(Constants.AccessLogField.None.getField());\n }\n\n if (jsonObject.has(Constants.AccessLogField.object_name.getField())) {\n accessLogBack.setObject_name(jsonObject.getString(Constants.AccessLogField.object_name.getField()));\n } else {\n accessLogBack.setObject_name(Constants.AccessLogField.None.getField());\n }\n\n if (jsonObject.has(Constants.AccessLogField.time_start.getField())) {\n accessLogBack.setTime_start(jsonObject.getString(Constants.AccessLogField.time_start.getField()));\n } else {\n accessLogBack.setTime_start(Constants.AccessLogField.None.getField());\n }\n\n if (jsonObject.has(Constants.AccessLogField.time_finish.getField())) {\n accessLogBack.setTime_finish(jsonObject.getString(Constants.AccessLogField.time_finish.getField()));\n } else {\n accessLogBack.setTime_finish(Constants.AccessLogField.None.getField());\n }\n\n if (jsonObject.has(Constants.AccessLogField.user_agent.getField())) {\n accessLogBack.setUser_agent(jsonObject.getString(Constants.AccessLogField.user_agent.getField()));\n } else {\n accessLogBack.setUser_agent(Constants.AccessLogField.None.getField());\n }\n\n if (jsonObject.has(Constants.AccessLogField.status.getField())) {\n accessLogBack.setStatus(jsonObject.getString(Constants.AccessLogField.status.getField()));\n } else {\n accessLogBack.setStatus(Constants.AccessLogField.None.getField());\n }\n\n if (jsonObject.has(Constants.AccessLogField.midstream_error.getField())) {\n accessLogBack.setMidstream_error(jsonObject.getString(Constants.AccessLogField.midstream_error.getField()));\n } else {\n accessLogBack.setMidstream_error(Constants.AccessLogField.None.getField());\n }\n\n if (jsonObject.has(Constants.AccessLogField.error_code.getField())) {\n accessLogBack.setError_code(jsonObject.getString(Constants.AccessLogField.error_code.getField()));\n } else {\n accessLogBack.setError_code(Constants.AccessLogField.None.getField());\n }\n\n if (jsonObject.has(Constants.AccessLogField.request_latency.getField())) {\n accessLogBack.setRequest_latency(jsonObject.getString(Constants.AccessLogField.request_latency.getField()));\n } else {\n accessLogBack.setRequest_latency(Constants.AccessLogField.None.getField());\n }\n\n if (jsonObject.has(Constants.AccessLogField.response_length.getField())) {\n accessLogBack.setResponse_length(jsonObject.getString(Constants.AccessLogField.response_length.getField()));\n } else {\n accessLogBack.setResponse_length(Constants.AccessLogField.None.getField());\n }\n\n if (jsonObject.has(Constants.AccessLogField.turn_around_time.getField())) {\n accessLogBack.setTurn_around_time(jsonObject.getString(Constants.AccessLogField.object_length.getField()));\n } else {\n accessLogBack.setTurn_around_time(Constants.AccessLogField.None.getField());\n }\n\n if (jsonObject.has(Constants.AccessLogField.error_message.getField())) {\n accessLogBack.setError_code(jsonObject.getString(Constants.AccessLogField.error_message.getField()));\n } else {\n accessLogBack.setError_code(Constants.AccessLogField.None.getField());\n }\n collector.collect(accessLogBack);\n }\n }).setParallelism(4);\n accessLogBackSingleOutputStreamOperator.addSink(sinkFunction).setParallelism(1);\n } catch (Exception e) {\n e.printStackTrace();\n }\n try {\n env.execute(\"Kafka_access_log\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"void publish(String topicName, Message message) throws IOException;",
"@Override\n public boolean getDurableWrites() {\n return durableWrites_;\n }",
"public Publisher<StockPrice> stockPrice(String symbol) {\n\n\n Publisher<StockPrice> publisher = s -> {\n ScheduledExecutorService executorService = Executors.newScheduledThreadPool(1);\n executorService.scheduleAtFixedRate(() -> {\n StockPrice ret = new StockPrice(symbol, 2d, LocalDateTime.now());\n s.onNext(ret);\n }, 0, 2, TimeUnit.SECONDS);\n };\n\n// publisher.subscribe(new TestSubscriber());\n\n return publisher;\n }",
"public void subscribeTo(String topicName) {\n consumer.subscribe(Arrays.asList(topicName));\n System.out.println(\"Subscribed to topic \" + topicName);\n }",
"private void AsyncPush(String topic){\n\t\t\t\t \t\n\t \t/**\n\t \t * output a map, delete existed items\n\t \t */\n\t \t//Map<Key, Integer> deduplicatedBuff = mergeDuplicatedItemsAndDelte(buff);\n\t \t\n\t \t//not in, create, delay\n\t \tif(!producerMap.containsKey(topic)){\n\t \t\ttry {\n\t\t\t\t\t\t\tCreateProducer(topic,LogicController.batchMessagesMaxMessagesPerBatch);\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} catch (ExecutionException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\t \t\t \n\t \t}\n\t \tlog.info(\"#publish\"+topic+\", \"+buffMap.size());\n\t \tProducer<byte[]> producer = producerMap.get(topic);\n\t \t/**\n\t \t * init set, copy to hash set\n\t \t */\n\t \t//Set<Key> Keys = Sets.newConcurrentHashSet(buffMap.keySet());\n\t \t\n\t \t \n\t \tfor (Key key : buffMap.keySet()){\n\t \t\t \n\t \t\t //if(buffMap.containsKey(key)){\n\t \t\t \n\t \t\t \n\t \t\t if(buffMap.containsKey(key)){\n\t \t\t\t Integer val = buffMap.get(key);\n\t \t\t\t //clear,skip\n\t \t\t\t if(val<=0){buffMap.remove(key);continue;}\n\t \t\t\t //concenate\n\t \t\t\t byte[] out = createKVByte(key,val);\n\t \t\t\t \n\t \t\t\t//get producer\n\t\t\t \t\t\t \n\t\t\t \t\t\t //byte[] tempTable = new byte[](buffMap);\n\t\t producer.sendAsync(out).thenRun(() -> {\n\t\t\t messagesSent.increment();\n\t\t\t bytesSent.add(out.length);\n\t\t\t //update\n\t\t\t TopicMap.replace(topic, TopicMap.get(topic)+out.length);\t\n\t\t\t \n\t\t\t //delete\n\t\t\t rescaleBufferMap(buffMap,key,val);\n\t\t\t \n\t\t\t //CheckNumberPacketsEnoughEndMessageAndSend(topic);\n\t\t\t //buffMap.remove(key);\n\t\t\t //remove from the set\n\t\t\t //ier.remove();\n\t\t\t \t\t \t\t \n\t\t\t }).exceptionally(ex -> {\n\t\t\t log.warn(\"Write error on message\", ex);\n\t\t\t //System.exit(-1);\n\t\t\t return null;\n\t\t\t });\n\t \t\t }\n\t \t\t }\n\t \t\t \n\t \t }",
"void drainFused() {\n int n;\n int n2 = 1;\n Subscriber<T> subscriber = this.actual;\n SimpleQueueWithConsumerIndex<Object> simpleQueueWithConsumerIndex = this.queue;\n do {\n if (this.cancelled) {\n simpleQueueWithConsumerIndex.clear();\n return;\n }\n Throwable throwable = (Throwable)this.error.get();\n if (throwable != null) {\n simpleQueueWithConsumerIndex.clear();\n subscriber.onError(throwable);\n return;\n }\n n = simpleQueueWithConsumerIndex.producerIndex() == this.sourceCount ? 1 : 0;\n if (!simpleQueueWithConsumerIndex.isEmpty()) {\n subscriber.onNext(null);\n }\n if (n != 0) {\n subscriber.onComplete();\n return;\n }\n n2 = n = this.addAndGet(-n2);\n } while (n != 0);\n }",
"public Channel.Receiver getReceiver(String sName);",
"@Scheduled(fixedRate=20000)\n\tpublic void generateMessages()\n\t{\t\t\n\t\tsynchronized (map_)\n\t\t{\n\t\t\tif (!map_.isEmpty())\n\t\t\t{\n\t\t\t\tint index = generateIndex(map_.size());\n\t\t\t\tint messageIdx = generateIndex(1000);\n\t\t\t\tString topic = topics_.get(index);\n\t\t\t\tBroadcaster b = map_.get(topic);\n\t\t\t\tUserDTO dto = dtoMap_.get(topic);\n\t\t\t\tdto.setAvailability(\"\" + messageIdx);\n\t\t\t\tString stringified;\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tstringified = mapper_.writeValueAsString(dto);\n\t\t\t\t\tSystem.out.println(\"broadcasting to topic \" + topic + \" message: \" + stringified);\n\t\t\t\t\tb.broadcast(stringified);\n\t\t\t\t} catch (JsonGenerationException e)\n\t\t\t\t{\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (JsonMappingException e)\n\t\t\t\t{\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException e)\n\t\t\t\t{\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"publisher map was empty, skipping this time\");\n\t\t\t}\n\t\t}\n\t}",
"public void drain() {\r\n if (getAndIncrement() == 0) {\r\n SimpleQueue<T> simpleQueue = this.queue;\r\n int i = this.consumed;\r\n int i2 = this.bufferSize;\r\n int i3 = i2 - (i2 >> 2);\r\n boolean z = this.sourceMode != 1;\r\n int i4 = 1;\r\n int i5 = i;\r\n SimpleQueue<T> simpleQueue2 = simpleQueue;\r\n int i6 = i5;\r\n while (true) {\r\n if (simpleQueue2 != null) {\r\n long j = LongCompanionObject.MAX_VALUE;\r\n InnerSubscription[] innerSubscriptionArr = (InnerSubscription[]) this.subscribers.get();\r\n boolean z2 = false;\r\n for (InnerSubscription innerSubscription : innerSubscriptionArr) {\r\n long j2 = innerSubscription.get();\r\n if (j2 != Long.MIN_VALUE) {\r\n j = Math.min(j2 - innerSubscription.emitted, j);\r\n z2 = true;\r\n }\r\n }\r\n long j3 = 0;\r\n if (!z2) {\r\n j = 0;\r\n }\r\n while (true) {\r\n if (j == j3) {\r\n break;\r\n }\r\n boolean z3 = this.done;\r\n try {\r\n Object poll = simpleQueue2.poll();\r\n boolean z4 = poll == null;\r\n if (!checkTerminated(z3, z4)) {\r\n if (z4) {\r\n break;\r\n }\r\n int length = innerSubscriptionArr.length;\r\n for (int i7 = 0; i7 < length; i7++) {\r\n InnerSubscription innerSubscription2 = innerSubscriptionArr[i7];\r\n if (!innerSubscription2.isCancelled()) {\r\n innerSubscription2.downstream.onNext(poll);\r\n innerSubscription2.emitted++;\r\n }\r\n }\r\n if (z) {\r\n i6++;\r\n if (i6 == i3) {\r\n ((Subscription) this.upstream.get()).request((long) i3);\r\n i6 = 0;\r\n }\r\n }\r\n j--;\r\n if (innerSubscriptionArr != this.subscribers.get()) {\r\n break;\r\n }\r\n j3 = 0;\r\n } else {\r\n return;\r\n }\r\n } catch (Throwable th) {\r\n Throwable th2 = th;\r\n Exceptions.throwIfFatal(th2);\r\n ((Subscription) this.upstream.get()).cancel();\r\n simpleQueue2.clear();\r\n this.done = true;\r\n signalError(th2);\r\n return;\r\n }\r\n }\r\n if (checkTerminated(this.done, simpleQueue2.isEmpty())) {\r\n return;\r\n }\r\n }\r\n this.consumed = i6;\r\n i4 = addAndGet(-i4);\r\n if (i4 != 0) {\r\n if (simpleQueue2 == null) {\r\n simpleQueue2 = this.queue;\r\n }\r\n } else {\r\n return;\r\n }\r\n }\r\n }\r\n }",
"public <T> RealtimeRos2Publisher<T> createPublisher(TopicDataType<T> topicDataType, String topicName, Ros2QosProfile qosProfile, int queueSize) throws IOException\n {\n startupLock.lock();\n try\n {\n if (spinning)\n {\n throw new RuntimeException(\"Cannot add publishers to a RealtimeRos2Node that is already spinning\");\n }\n Ros2Publisher<T> rosPublisher = node.createPublisher(topicDataType, topicName, qosProfile);\n RealtimeRos2Publisher<T> realtimePublisher = new RealtimeRos2Publisher<>(topicDataType, rosPublisher, queueSize);\n publishers.add(realtimePublisher);\n return realtimePublisher;\n } finally\n {\n startupLock.unlock();\n }\n }",
"TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException;",
"@Override\n public boolean getDurableWrites() {\n return durableWrites_;\n }",
"public static Observable<UUID> myStore(String s)\r\n {\r\n return Observable.create(subscriber -> {\r\n log(\"Storing \" + s);\r\n // hard work\r\n myWait(1000);\r\n subscriber.onNext(UUID.randomUUID());\r\n subscriber.onComplete();\r\n });\r\n }",
"@Nullable\n public ActiveDataStreamer getActiveDataStreamer() throws InterruptedException {\n //TODO would be cleaner with a singleton in case of multiple calls,\n // but since we are wrapping the same channel, its not so bad\n ActiveDataStreamer streamer = null;\n boolean isActivated = activated.await(ACTIVATION_TIMEOUT_MS, TimeUnit.MILLISECONDS);\n Channel channel = channelRef.get();\n if (isActivated && channel != null) {\n streamer = new ActiveDataStreamer(channel);\n } else {\n logger.error(\"Failed to initialize channel\");\n }\n return streamer;\n }",
"public LocalSubscription createQueueToListentoTopic(){\n\t\treturn new AMQPLocalSubscription(amqQueue, \n \t\tamqpSubscription, subscriptionID, targetQueue, false, isExclusive, true, MessagingEngine.getMyNodeQueueName(),amqQueue.getName(),\n amqQueue.getOwner().toString(), AMQPUtils.DIRECT_EXCHANGE_NAME, DirectExchange.TYPE.toString(), Short.parseShort(\"0\"),true);\n\t}",
"public interface Sink {\r\n\t\r\n\t/**\r\n\t * Check if the sink is still active\r\n\t * @return\r\n\t */\r\n\tboolean isActive();\r\n\t\r\n\t/**\r\n\t * Set the error flag\r\n\t */\r\n\tvoid setError();\r\n\t\r\n\t/**\r\n\t * Check if the sink has been object of an error\r\n\t * @return true if an error happened to the sink\r\n\t */\r\n\tboolean isError();\r\n\t\r\n\t/**\r\n\t * Write data to the sink.\r\n\t * @param data Byte array containing the data to write\r\n\t * @param offset Offset at which the data begins\r\n\t * @param length Length of the data\r\n\t * @param time Current time in milliseconds (begin at Unix Epoch).\r\n\t * @return \r\n\t */\r\n\tboolean write(byte[] data, int offset, int length, long time);\r\n\t\r\n\t/**\r\n\t * Close the sink and the underlaying stream (if any).\r\n\t * @throws IOException\r\n\t */\r\n\tvoid close();\r\n\t\r\n}",
"public Node sink() {\n\t\treturn _sink;\n\t}",
"@Nonnull \r\n\tpublic static <T> ConnectableObservable<T> publishLast(\r\n\t\t\t@Nonnull final Observable<T> source\r\n\t\t\t) {\r\n\t\treturn multicast(source, new AsyncSubject<T>());\r\n\t}",
"@Override\n public byte[] provide() {\n long start = System.nanoTime();\n\n try {\n if (packetQueue.peek() == null) {\n underflowed ++;\n return new byte[0];\n }\n\n OpusPacket packet = packetQueue.remove();\n\n if (packet == null) {\n underflowed ++;\n return new byte[0];\n }\n\n availableInput += packet.getSamples();\n opusBytePosition += packet.getBytes().length;\n opusPacketsSent ++;\n\n return packet.getBytes();\n } catch (NoSuchElementException ex) {\n underflowed ++;\n return new byte[0];\n } finally {\n long networkTime = System.nanoTime() - start;\n\n if (networkTime >= (opusParameters.getOpusFrameTime() * 1000000L)) {\n underflowed++;\n\n Logger.getGlobal().warning(\"[TeamspeakFastMixerSink] provide() took longer than the expected \" +\n opusParameters.getOpusFrameTime() + \"ms: \" + ((double)networkTime / 1_000_000D) + \"ms\");\n }\n\n this.networkTime += networkTime;\n\n if (packetQueue.peek() == null) {\n synchronized (drainLock) {\n drainLock.notifyAll();\n }\n }\n }\n }",
"org.omg.CosEventChannelAdmin.ProxyPushSupplier obtain_push_supplier();",
"@Test\n @SuppressWarnings({\"SleepWhileInLoop\", \"empty-statement\"})\n public void testKafkaOutputOperator() throws Exception\n {\n // Setup a message listener to receive the message\n KafkaConsumer listener = new KafkaConsumer(\"topic1\");\n new Thread(listener).start();\n\n // Malhar module to send message\n // Create DAG for testing.\n LocalMode lma = LocalMode.newInstance();\n DAG dag = lma.getDAG();\n\n // Create ActiveMQStringSinglePortOutputOperator\n StringGeneratorInputOperator generator = dag.addOperator(\"TestStringGenerator\", StringGeneratorInputOperator.class);\n KafkaStringSinglePortOutputOperator node = dag.addOperator(\"Kafka message producer\", KafkaStringSinglePortOutputOperator.class);\n // Set configuration parameters for Kafka\n node.setTopic(\"topic1\");\n\n // Connect ports\n dag.addStream(\"Kafka message\", generator.outputPort, node.inputPort).setLocality(Locality.CONTAINER_LOCAL);\n\n // Create local cluster\n final LocalMode.Controller lc = lma.getController();\n lc.runAsync();\n\n Thread.sleep(2000);\n lc.shutdown();\n\n // Check values send vs received\n Assert.assertEquals(\"Number of emitted tuples\", tupleCount, listener.holdingBuffer.size());\n logger.debug(String.format(\"Number of emitted tuples: %d\", listener.holdingBuffer.size()));\n Assert.assertEquals(\"First tuple\", \"testString 1\", listener.getMessage(listener.holdingBuffer.peek()));\n\n listener.close();\n }",
"public synchronized void emit(String name) throws RuntimeException {\n\n for (String pausedName : pausedEvents) {\n if (pausedName.equals(name)) return;\n }\n\n ArrayList<Future<Boolean>> f = fire(name);\n cache.put(name, f);\n runningFutures.addAll(f);\n }",
"public MockTopicSubscriber getTopicSubscriber(String topicName)\n {\n List subscribers = getTopicSubscriberList(topicName);\n if(subscribers.size() <= 0) return null;\n return (MockTopicSubscriber)subscribers.get(0);\n }",
"public NowPlayingConsumer(String name)\n\t{\n\t\ttry\n\t\t{\n\t\t\t// Open the connection\n\t\t\tSocket s = new Socket(\"localhost\", 53987);\n\t\t\t\n\t\t\t// Send the program's name\n\t\t\tPrintWriter out = new PrintWriter(s.getOutputStream());\n\t\t\tout.println(name);\n\t\t\tout.flush();\n\t\t\t\n\t\t\t// Set up the Scanner\n\t\t\tsc = new Scanner(s.getInputStream(), \"UTF-8\");\n\t\t\t\n\t\t\t// Start a new thread to listen for broadcasts (thread begins in the run() method)\n\t\t\tnew Thread(this).start();\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\tthrow new RuntimeException(\"UNABLE TO REGISTER NOWPLAYINGCONSUMER (make sure the server is running?)\");\n\t\t}\n\t}",
"public <T> RealtimeRos2Subscription<T> createQueuedSubscription(TopicDataType<T> topicDataType, String topicName) throws IOException\n {\n return createQueuedSubscription(topicDataType, topicName, Ros2QosProfile.DEFAULT(), DEFAULT_QUEUE_SIZE);\n }",
"ScheduledFuture<?> scheduleAtFixedRate(Runnable publisher, long period, TimeUnit timeUnit, ProbeLevel probeLevel);",
"public String getSinkArn() {\n return this.sinkArn;\n }",
"@Override\n public void run() {\n ZMQ.Context context = ZMQ.context(2);\n\n ZMQ.Socket publisher = context.socket(ZMQ.PUB);\n publisher.setAffinity(1);\n publisher.setHWM(0);\n publisher.bind(\"tcp://*:5556\");\n //publisher.bind(\"ipc://weather\");\n\n ZMQ.Socket incoming = context.socket(ZMQ.PULL);\n incoming.setHWM(0);\n incoming.setAffinity(2);\n incoming.bind(\"tcp://*:5557\");\n\n System.out.println(\"Sequencer is alive\");\n\n ZMQ.proxy(incoming, publisher, null);\n // while (! Thread.currentThread().isInterrupted()) {\n // byte[] data = incoming.recv(0);\n // //System.out.printf(\"Received message with %d bytes\\n\", data.length);\n // publisher.send(data, 0);\n // }\n\n publisher.close();\n incoming.close();\n context.term();\n }",
"CompletableFuture<DataDestination> provision(String topicName);",
"@Override\n public void publish(String data, String topicName,String topicType) {\n Map<Integer, List<KafkaTopic>> kafkaTopicsByPartitionMap = getPerPartitionKafkaTopicList(0, 1,\"0\");\n for (Map.Entry<Integer, List<KafkaTopic>> entry : kafkaTopicsByPartitionMap.entrySet()) {\n List<KafkaTopic> kafkaTopicList= entry.getValue();\n for (KafkaTopic kafkaTopic : kafkaTopicList){\n if(kafkaTopic.getTopicName().equalsIgnoreCase(topicName)){\n new KafkaProducerClient(data, topicName,topicType, kafkaTopic.getPartitionId()).publishToKafkaTopic();\n return;\n }\n }\n }\n }",
"public void notifyTopic(String name) throws RemoteException;",
"public interface Sink<I>\n extends Consumer<I>\n{\n /**\n * {@inheritDoc}\n */\n @Override\n public default void accept (I message)\n {\n dataIn().send(message);\n }\n\n /**\n * Input Connection.\n *\n * @return the data-input that provides the messages to the pipeline.\n */\n public Input<I> dataIn ();\n}",
"void removePublisherQueueEntries(String publisherName);",
"public Subscriber getSampleDeadLetterSubscriber(MessageReceiver receiver) throws IOException {\n if (null == System.getenv(\"PUBSUB_EMULATOR_HOST\")) {\n log.info(\"Returning Subscriber\");\n ExecutorProvider executorProvider =\n InstantiatingExecutorProvider.newBuilder().setExecutorThreadCount(4).build();\n // `setParallelPullCount` determines how many StreamingPull streams the subscriber will open\n // to receive message. It defaults to 1. `setExecutorProvider` configures an executor for the\n // subscriber to process messages. Here, the subscriber is configured to open 2 streams for\n // receiving messages, each stream creates a new executor with 4 threads to help process the\n // message callbacks. In total 2x4=8 threads are used for message processing.\n return Subscriber.newBuilder(getSampleDeadLetterSubscriptionName(), receiver)\n .setParallelPullCount(2)\n .setExecutorProvider(executorProvider)\n .build();\n } else {\n log.info(\"Returning emulator Subscriber\");\n return new PubSubEmulator().getEmulatorSubscriber(receiver);\n }\n }",
"public boolean isDurableConsumers() {\n return durableConsumers;\n }",
"@Override\n public synchronized QueueMessage pull(String queueName, long visibilityTimeout) {\n int startReadLocation = this.readQueueLocation;\n QueueMessage message = null;\n boolean search = true;\n\n while(search) {\n message = this.ringBufferQueue[startReadLocation];\n\n // If we have a message and it's not 'locked' thats who we want\n if(message != null && message.getTimeout() <= System.currentTimeMillis()) {\n message.setTimeout(System.currentTimeMillis() + visibilityTimeout);\n search = false;\n }\n // Wrap around search\n startReadLocation = this.incrementPosition(startReadLocation);\n\n // We have looked at every element found nothing to do\n if(startReadLocation == this.pushQueueLocation && search) {\n message = null;\n search = false;\n }\n }\n\n return message;\n }",
"@Override\n\t\tpublic Logger getJavaLogger(String name) {\n\t\t\treturn Logger.getLogger(\"com.ibm.connectors.amqp\");\n\t\t}",
"public void produce(String topicName, String payload) throws Exception {\n\t\tProperties props = new Properties();\n\n\t\t// Assign localhost id\n\t\tprops.put(\"bootstrap.servers\", Consts.HOST_AND_PORT);\n\n\t\t// Set acknowledgements for producer requests.\n\t\tprops.put(\"acks\", \"all\");\n\n\t\t// If the request fails, the producer can automatically retry,\n\t\tprops.put(\"retries\", 0);\n\n//\t\t// Specify buffer size in config\n//\t\tprops.put(\"batch.size\", 16384);\n//\n//\t\t// Reduce the no of requests less than 0\n//\t\tprops.put(\"linger.ms\", 1);\n//\n//\t\t// The buffer.memory controls the total amount of memory available to the\n//\t\t// producer for buffering.\n//\t\tprops.put(\"buffer.memory\", 33554432);\n//\n//\t\tprops.put(\"key.serializer\", \"org.apache.kafka.common.serializa-tion.StringSerializer\");\n//\n//\t\tprops.put(\"value.serializer\", \"org.apache.kafka.common.serializa-tion.StringSerializer\");\n\n\t\ttry(Producer<String, String> producer = new KafkaProducer<String, String>(props)){\n\t\t\t\n\t\t\tProducerRecord<String, String> producerRecord = new ProducerRecord<String, String>(topicName, payload);\n\n\t\t\tproducer.send( producerRecord );\n\n\t\t\tlog(\"Mensagen enviada:\" + payload);\n\n\t\t} catch (Exception ex) {\n\n\t\t\tex.printStackTrace();\n\t\t\tlog(ex);\n\n\t\t}\n\n\t}",
"@CallByThread(\"Netty EventLoop\")\n @Override\n public void run() {\n if (referenced > 0) { // is blocking\n incomingPublishService.drain();\n }\n }",
"@Test\n public void subscribe_all() throws AblyException {\n /* Ably instance that will emit channel messages */\n AblyRealtime ably1 = null;\n /* Ably instance that will receive channel messages */\n AblyRealtime ably2 = null;\n\n String channelName = \"test.channel.subscribe.all\" + System.currentTimeMillis();\n Message[] messages = new Message[]{\n new Message(\"name1\", \"Lorem ipsum dolor sit amet,\"),\n new Message(\"name2\", \"Consectetur adipiscing elit.\"),\n new Message(\"name3\", \"Pellentesque nulla lorem.\")\n };\n\n try {\n ClientOptions option1 = createOptions(testVars.keys[0].keyStr);\n option1.clientId = \"emitter client\";\n ClientOptions option2 = createOptions(testVars.keys[0].keyStr);\n option2.clientId = \"receiver client\";\n\n ably1 = new AblyRealtime(option1);\n ably2 = new AblyRealtime(option2);\n\n Channel channel1 = ably1.channels.get(channelName);\n channel1.attach();\n new ChannelWaiter(channel1).waitFor(ChannelState.attached);\n\n Channel channel2 = ably2.channels.get(channelName);\n channel2.attach();\n new ChannelWaiter(channel2).waitFor(ChannelState.attached);\n\n /* Create a listener that collects received messages */\n ArrayList<Message> receivedMessageStack = new ArrayList<>();\n MessageListener listener = new MessageListener() {\n List<Message> messageStack;\n\n @Override\n public void onMessage(Message message) {\n messageStack.add(message);\n }\n\n public MessageListener setMessageStack(List<Message> messageStack) {\n this.messageStack = messageStack;\n return this;\n }\n }.setMessageStack(receivedMessageStack);\n\n channel2.subscribe(listener);\n\n /* Start emitting channel with ably client 1 (emitter) */\n channel1.publish(messages, null);\n\n /* Wait until receiver client (ably2) observes {@code }\n * is emitted from emitter client (ably1)\n */\n new Helpers.MessageWaiter(channel2).waitFor(messages.length);\n\n /* Validate that,\n * - we received every message that has been published\n */\n assertThat(receivedMessageStack.size(), is(equalTo(messages.length)));\n\n Collections.sort(receivedMessageStack, messageComparator);\n for (int i = 0; i < messages.length; i++) {\n Message message = messages[i];\n if(Collections.binarySearch(receivedMessageStack, message, messageComparator) < 0) {\n fail(\"Unable to find expected message: \" + message);\n }\n }\n } finally {\n if (ably1 != null) ably1.close();\n if (ably2 != null) ably2.close();\n }\n }",
"@Test public void testRollingOnDemandStatsProducerTest() throws Exception{\n\t\tRollingOnDemandStatsProducer<ServiceStats> producer = new RollingOnDemandStatsProducer<ServiceStats>(\"id\", \"cat\", \"sub\", ServiceStatsFactory.DEFAULT_INSTANCE, 10);\n\t\t//11 iterations, we should only have 10 values afterwards, the first should be evicted.\n\t\tfor (int a = 0; a<11; a++){\n\t\t\tproducer.getStats(\"name\"+a).notifyRequestFinished();\n\t\t}\n\n\n\t\t//10 producer values + cumulated.\n\t\tassertEquals(10 + 1, producer.getStats().size());\n\t\tboolean found5 = false, found0 = false;\n\t\tfor (ServiceStats ss : producer.getStats()) {\n\t\t\tif (ss.getName().equals(\"name0\"))\n\t\t\t\tfound0 = true;\n\t\t\tif (ss.getName().equals(\"name5\"))\n\t\t\t\tfound5 = true;\n\t\t}\n\n\t\tassertTrue(\"We should have found the stats number 5\", found5);\n\t\tassertFalse(\"We should have found the stats number 5\", found0);\n\n\t\tlong sizeBeforeAdd = IntervalRegistry.getInstance().getInterval(\"1m\").getPrimaryListenerCount();\n\t\tproducer.getStats(\"StatsThatWeDidn'tHadYet\");\n\t\tlong sizeAfterAdd = IntervalRegistry.getInstance().getInterval(\"1m\").getPrimaryListenerCount();\n\t\tassertEquals(sizeBeforeAdd, sizeAfterAdd);\n\t}",
"@Nonnull\r\n\tpublic static <T> ConnectableObservable<T> publish(\r\n\t\t\t@Nonnull final Observable<? extends T> source\r\n\t\t\t) {\r\n\t\treturn multicast(source, Subjects.<T>newSubject());\r\n\t}",
"void writeTo(DataSink dataSink, boolean overWrite) throws IOException;",
"MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException;",
"Message poll(String topicName, Duration timeout) throws IOException;",
"CommunicationLink getNodeByName(String name)\n {\n return getNodeById(Objects.hash(name));\n }",
"public String getSinkType() {\n return this.sinkType;\n }",
"@Incoming(\"sink\")\n public void sink(String input) {\n results.add(input);\n }",
"@Test\n public void subscribe_single() throws AblyException {\n /* Ably instance that will emit channel messages */\n AblyRealtime ably1 = null;\n /* Ably instance that will receive channel messages */\n AblyRealtime ably2 = null;\n\n String channelName = \"test.channel.subscribe.single\" + System.currentTimeMillis();\n String messageName = \"name\";\n Message[] messages = new Message[] {\n new Message(messageName, \"Lorem ipsum dolor sit amet,\"),\n new Message(messageName, \"Consectetur adipiscing elit.\"),\n new Message(messageName, \"Pellentesque nulla lorem.\")\n };\n\n try {\n ClientOptions option1 = createOptions(testVars.keys[0].keyStr);\n option1.clientId = \"emitter client\";\n ClientOptions option2 = createOptions(testVars.keys[0].keyStr);\n option2.clientId = \"receiver client\";\n\n ably1 = new AblyRealtime(option1);\n ably2 = new AblyRealtime(option2);\n\n Channel channel1 = ably1.channels.get(channelName);\n channel1.attach();\n new ChannelWaiter(channel1).waitFor(ChannelState.attached);\n\n Channel channel2 = ably2.channels.get(channelName);\n channel2.attach();\n new ChannelWaiter(channel2).waitFor(ChannelState.attached);\n\n ArrayList<Message> receivedMessageStack = new ArrayList<>();\n MessageListener listener = new MessageListener() {\n List<Message> messageStack;\n\n @Override\n public void onMessage(Message message) {\n messageStack.add(message);\n }\n\n public MessageListener setMessageStack(List<Message> messageStack) {\n this.messageStack = messageStack;\n return this;\n }\n }.setMessageStack(receivedMessageStack);\n channel2.subscribe(messageName, listener);\n\n /* Start emitting channel with ably client 1 (emitter) */\n channel1.publish(\"nonTrackedMessageName\", \"This message should be ignore by second client (ably2).\", null);\n channel1.publish(messages, null);\n channel1.publish(\"nonTrackedMessageName\", \"This message should be ignore by second client (ably2).\", null);\n\n /* Wait until receiver client (ably2) observes {@code Message}\n * on subscribed channel (channel2) emitted by emitter client (ably1)\n */\n new Helpers.MessageWaiter(channel2).waitFor(messages.length + 2);\n\n /* Validate that,\n * - received same amount of emitted specific message\n * - received messages are the ones we emitted\n */\n assertThat(receivedMessageStack.size(), is(equalTo(messages.length)));\n\n Collections.sort(receivedMessageStack, messageComparator);\n for (int i = 0; i < messages.length; i++) {\n Message message = messages[i];\n if(Collections.binarySearch(receivedMessageStack, message, messageComparator) < 0) {\n fail(\"Unable to find expected message: \" + message);\n }\n }\n } finally {\n if (ably1 != null) ably1.close();\n if (ably2 != null) ably2.close();\n }\n }",
"public boolean delivery(Message msg, String topicName)\r\n\t { \r\n\t Topic thread = topics.get(topicName); //retrieves topic object\r\n\t if (!(thread.getMessage().toString()).equals(msg.toString()))//compares if the messages are equal\r\n\t \t return false;\r\n\t return true;\r\n\t }",
"private void createTopic(String topicName) {\r\n\t\tArrayList<Integer> socketNumbers = new ArrayList<Integer>();\r\n\t\tsubscriberMap.put(topicName, socketNumbers);\r\n\t\ttopicNumbers.put(topicNumbers.size(), topicName);\r\n\t\tterminal.println(\"Topic \" + topicName + \" was created.\");\r\n\t}",
"public KafkaProducer<String, String> getProducer() {\n\t\tint r = random.nextInt(producers.length);\n\t\treturn producers[r];\n\t}",
"public Subscriber createSubscriber(String topicName) {\n validateTopicName(topicName, false);\n String target = String.format(\"%s.%s\", endpointId, topicName);\n CAMQPEndpointPolicy endpointPolicy = new CAMQPEndpointPolicy();\n endpointPolicy.setEndpointType(EndpointType.TOPIC);\n CAMQPTargetInterface receiver = CAMQPEndpointManager.createTarget(session, topicName, target, endpointPolicy);\n return new Subscriber(target, receiver);\n }",
"@Test\n public void shouldNotReadWholeStreamWithDefault() {\n final Queue<String> queue = new LinkedBlockingQueue<>();\n\n Executors.newCachedThreadPool().submit(() -> produceData(queue));\n\n final List<String> collected = queue.stream().collect(Collectors.toList());\n assertThat(collected, not(hasItems(\"0\", \"1\", \"2\", \"3\", \"4\")));\n }",
"@Scheduled(fixedRate = 1000)\n private void send(){\n jmsTemplate.send(\"test.messages\", session -> {\n TextMessage message = session.createTextMessage(Instant.now().toString());\n return message;\n });\n }",
"@Override\n public BrokerMessageListener fetchByName(long companyId, String name)\n throws SystemException {\n return fetchByName(companyId, name, true);\n }",
"public SupplyNode getNode(String name){\n return t.get(name);\n }",
"@Override\n public void run() {\n Reference<? extends KafkaPublisher> ref = referenceQueue.poll();\n while (ref != null && isRunning()) {\n publishers.remove(ref).cancel();\n ref = referenceQueue.poll();\n }\n }",
"private ObservableOnSubscribe<Object> receiveLoop() {\n return emitter -> {\n Message message;\n try {\n while ( ( message = consumer.receive( jmsDelegate.receiveTimeout ) ) != null ) {\n streamStep.logDebug( message.toString() );\n emitter.onNext( message.getBody( Object.class ) );\n }\n } catch ( JMSRuntimeException jmsException ) {\n emitter.onError( jmsException );\n }\n emitter.onComplete();\n };\n }",
"@Test\n public void subscribe_multiple() throws AblyException {\n /* Ably instance that will emit channel messages */\n AblyRealtime ably1 = null;\n /* Ably instance that will receive channel messages */\n AblyRealtime ably2 = null;\n\n String channelName = \"test.channel.subscribe.multiple\" + System.currentTimeMillis();\n Message[] messages = new Message[] {\n new Message(\"name1\", \"Lorem ipsum dolor sit amet,\"),\n new Message(\"name2\", \"Consectetur adipiscing elit.\"),\n new Message(\"name3\", \"Pellentesque nulla lorem.\")\n };\n\n String[] messageNames = new String[] {\n messages[0].name,\n messages[1].name,\n messages[2].name\n };\n\n try {\n ClientOptions option1 = createOptions(testVars.keys[0].keyStr);\n option1.clientId = \"emitter client\";\n ClientOptions option2 = createOptions(testVars.keys[0].keyStr);\n option2.clientId = \"receiver client\";\n\n ably1 = new AblyRealtime(option1);\n ably2 = new AblyRealtime(option2);\n\n Channel channel1 = ably1.channels.get(channelName);\n channel1.attach();\n new ChannelWaiter(channel1).waitFor(ChannelState.attached);\n\n Channel channel2 = ably2.channels.get(channelName);\n channel2.attach();\n new ChannelWaiter(channel2).waitFor(ChannelState.attached);\n\n /* Create a listener that collect received messages */\n ArrayList<Message> receivedMessageStack = new ArrayList<>();\n MessageListener listener = new MessageListener() {\n List<Message> messageStack;\n\n @Override\n public void onMessage(Message message) {\n messageStack.add(message);\n }\n\n public MessageListener setMessageStack(List<Message> messageStack) {\n this.messageStack = messageStack;\n return this;\n }\n }.setMessageStack(receivedMessageStack);\n channel2.subscribe(messageNames, listener);\n\n /* Start emitting channel with ably client 1 (emitter) */\n channel1.publish(\"nonTrackedMessageName\", \"This message should be ignore by second client (ably2).\", null);\n channel1.publish(messages, null);\n channel1.publish(\"nonTrackedMessageName\", \"This message should be ignore by second client (ably2).\", null);\n\n /* Wait until receiver client (ably2) observes {@code Message}\n * on subscribed channel (channel2) emitted by emitter client (ably1)\n */\n new Helpers.MessageWaiter(channel2).waitFor(messages.length + 2);\n\n /* Validate that,\n * - we received specific messages\n */\n assertThat(receivedMessageStack.size(), is(equalTo(messages.length)));\n\n Collections.sort(receivedMessageStack, messageComparator);\n for (int i = 0; i < messages.length; i++) {\n Message message = messages[i];\n if(Collections.binarySearch(receivedMessageStack, message, messageComparator) < 0) {\n fail(\"Unable to find expected message: \" + message);\n }\n }\n } finally {\n if (ably1 != null) ably1.close();\n if (ably2 != null) ably2.close();\n }\n }",
"public int drain(MessagePassingQueue.Consumer<E> c)\r\n/* 357: */ {\r\n/* 358:644 */ return drain(c, capacity());\r\n/* 359: */ }",
"public Task getNextTask(final String name) {\n return null;\n }",
"private Sink getSink(int node_id, int dvn) {\n\n\t\t// address of Mote\n\t\tString addr = new MoteAddrStrategy().execute(new int[] { node_id }, 0);\n\t\treturn dao.getSinkDAO().mergeSink(addr, dvn);\n\n\t}",
"@Test\n\tpublic void testPublisherAndSubscriber() throws Exception {\n\t\tString address = \"kafka://[localhost:9092]&topic=junk\";\n\n\t\tZPublisher z = new ZPublisher(address);\n CountDownLatch latch = new CountDownLatch(2);\n\n List list = new ArrayList();\n\n com.jacamars.dsp.rtb.jmq.RTopic channel = new com.jacamars.dsp.rtb.jmq.RTopic(\"kafka://[localhost:9092]&topic=junk\");\n channel.addListener(new com.jacamars.dsp.rtb.jmq.MessageListener<String>() {\n @Override\n public void onMessage(String channel, String data) {\n System.out.println(\"<<<<<<<<<<<<<<<<<\" + data);\n list.add(data);\n // latch.countDown();\n }\n });\n\n com.jacamars.dsp.rtb.jmq.RTopic channel2= new com.jacamars.dsp.rtb.jmq.RTopic(\"kafka://[localhost:9092]&topic=junk\");\n channel2.addListener(new com.jacamars.dsp.rtb.jmq.MessageListener<String>() {\n @Override\n public void onMessage(String channel, String data) {\n System.out.println(\"================\" + data);\n list.add(data);\n\n }\n });\n\n\n z.add(\"Hello world\");\n z.add(\"Another Hello world\");\n\n Thread.sleep(15000);\n\t}",
"boolean deliver(String topic, Object event);",
"public void publish(String topicName, int qos, byte[] payload) throws Throwable {\n /*\n Use a state machine to decide which step to do next. State change occurs\n when a notification is received that an MQTT action has completed\n */\n state = BEGIN;\n while (state != FINISH) {\n switch (state) {\n case BEGIN:\n // Connect using a non-blocking connect\n if (con == null) {\n con = new MqttConnector();\n }\n if (!client.isConnected()) {\n con.doConnect();\n } else {\n state = CONNECTED;\n }\n break;\n case CONNECTED:\n // Publish using a non-blocking publisher\n Publisher pub = new Publisher();\n pub.doPublish(topicName, qos, payload);\n break;\n case PUBLISHED:\n case DISCONNECTED:\n state = FINISH;\n donext = true;\n break;\n case DISCONNECT:\n Disconnector disc = new Disconnector();\n disc.doDisconnect();\n break;\n case ERROR:\n throw ex;\n }\n if (state == BEGIN) {\n waitForStateChange(STATE_CHECK_INTERVAL_LONG);\n } else {\n waitForStateChange(STATE_CHECK_INTERVAL_SHORT);\n }\n }\n }"
]
| [
"0.5578742",
"0.4760358",
"0.45300323",
"0.4525916",
"0.44488344",
"0.4444997",
"0.4372353",
"0.43582076",
"0.4337598",
"0.42993116",
"0.4299025",
"0.4252451",
"0.42399272",
"0.41844043",
"0.41761476",
"0.416238",
"0.41598102",
"0.41556686",
"0.41427022",
"0.4141957",
"0.41275254",
"0.41200703",
"0.41173238",
"0.41165647",
"0.4112396",
"0.41069078",
"0.41030094",
"0.41018984",
"0.40844357",
"0.40613943",
"0.40572494",
"0.40278906",
"0.4014231",
"0.40122947",
"0.4004104",
"0.39928126",
"0.3992732",
"0.3978014",
"0.39668536",
"0.39555764",
"0.39524013",
"0.39507735",
"0.39448875",
"0.39436066",
"0.3937498",
"0.39325404",
"0.3926571",
"0.39219967",
"0.39148325",
"0.39010635",
"0.38864264",
"0.38848832",
"0.3883705",
"0.3874448",
"0.38718718",
"0.38658112",
"0.38620663",
"0.3853101",
"0.38516608",
"0.38463676",
"0.3838956",
"0.38344958",
"0.3827617",
"0.38269633",
"0.38137648",
"0.38030142",
"0.380209",
"0.3792246",
"0.37901244",
"0.3787814",
"0.37620154",
"0.37597737",
"0.37557092",
"0.37500992",
"0.3749208",
"0.37484428",
"0.37466377",
"0.37413567",
"0.3740538",
"0.37396657",
"0.37387565",
"0.37327805",
"0.3724326",
"0.37241715",
"0.37199065",
"0.3716228",
"0.37127843",
"0.37104416",
"0.3705069",
"0.3701511",
"0.3698733",
"0.36954588",
"0.36939687",
"0.36929673",
"0.36891747",
"0.36875305",
"0.36824387",
"0.36818397",
"0.3681159",
"0.3675297"
]
| 0.56701523 | 0 |
Returns a sink which discards all received items. | @Nonnull
public static <T> Sink<T> noop() {
return fromProcessor("noop", preferLocalParallelismOne(noopP()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Bean\n\t\tpublic IntegrationFlow discardFlow() {\n\t\t\treturn IntegrationFlows.from(sourceDirectory(), \n\t\t\t\t\tc -> c.poller(Pollers.fixedDelay(1000)))\n\t\t\t\t\t.filter(onlyTxt(),\n\t\t\t\t\t\t\tnotTxt -> notTxt\n\t\t\t\t\t\t\t.discardFlow(flow -> flow\n\t\t\t\t\t\t\t\t\t.filter(onlyXml(),\n\t\t\t\t\t\t\t\t\t\t\tnotXml -> notXml\n\t\t\t\t\t\t\t\t\t\t\t.discardChannel(sqlSource()))\n\t\t\t\t\t\t\t\t\t.channel(xmlSource())))\n\t\t\t\t\t.channel(txtSource())\n\t\t\t\t\t.get();\t\n\t\t}",
"void removeSinks(McastRoute route, Set<ConnectPoint> sinks);",
"void removeSinks(McastRoute route);",
"@Override\n public final SortedSet<Node<N>> getSinks() {\n return new Sinks(this);\n }",
"void drainFused() {\n int n;\n int n2 = 1;\n Subscriber<T> subscriber = this.actual;\n SimpleQueueWithConsumerIndex<Object> simpleQueueWithConsumerIndex = this.queue;\n do {\n if (this.cancelled) {\n simpleQueueWithConsumerIndex.clear();\n return;\n }\n Throwable throwable = (Throwable)this.error.get();\n if (throwable != null) {\n simpleQueueWithConsumerIndex.clear();\n subscriber.onError(throwable);\n return;\n }\n n = simpleQueueWithConsumerIndex.producerIndex() == this.sourceCount ? 1 : 0;\n if (!simpleQueueWithConsumerIndex.isEmpty()) {\n subscriber.onNext(null);\n }\n if (n != 0) {\n subscriber.onComplete();\n return;\n }\n n2 = n = this.addAndGet(-n2);\n } while (n != 0);\n }",
"public CopySink() {}",
"GenericSink createGenericSink();",
"@Nonnull \r\n\tpublic static <T> Observable<T> prune(\r\n\t\t\tfinal Observable<? extends T> source\r\n\t) {\r\n\t\treturn replay(source, 1);\r\n\t}",
"public InterceptorType<T> removeAllDataSource()\n {\n childNode.remove(\"data-source\");\n return this;\n }",
"public void discard();",
"@Nonnull\r\n\tpublic static <T> Observable<List<T>> buffer(\r\n\t\t\t@Nonnull final Observable<? extends T> source,\r\n\t\t\tfinal int bufferSize) {\r\n\t\treturn new Buffer.WithSizeSkip<T>(source, bufferSize, bufferSize);\r\n\t}",
"void removeSinks(McastRoute route, HostId hostId, Set<ConnectPoint> connectPoints);",
"QueueDrain drain() {\n lock.lock();\n try {\n final LinkedList<CompletableFuture<Message>> futuresWaitingForMessages = new LinkedList<>(futureQueue);\n final LinkedList<Message> messagesAvailableForProcessing = new LinkedList<>(messageQueue);\n futureQueue.clear();\n messageQueue.clear();\n return QueueDrain\n .builder()\n .futuresWaitingForMessages(futuresWaitingForMessages)\n .messagesAvailableForProcessing(messagesAvailableForProcessing)\n .build();\n } finally {\n lock.unlock();\n }\n }",
"public cz.muni.fi.sdipr.kafka.latency.avro.Payload.Builder clearPayload() {\n payload = null;\n fieldSetFlags()[0] = false;\n return this;\n }",
"public abstract Pipe deliver( Pipe sink );",
"private static List<Flow> splitSinkFromFlow(Flow flow) {\n List<PhysicalExecutionFlow<?, ?>> sinkFlows =\n flow.getNext().stream()\n .filter(f -> f instanceof PhysicalExecutionFlow)\n .map(f -> (PhysicalExecutionFlow<?, ?>) f)\n .filter(f -> f.getAction() instanceof SinkAction)\n .collect(Collectors.toList());\n List<Flow> allFlows = new ArrayList<>();\n flow.getNext().removeAll(sinkFlows);\n sinkFlows.forEach(\n s -> {\n IntermediateQueue queue =\n new IntermediateQueue(\n s.getAction().getId(),\n s.getAction().getName() + \"-Queue\",\n s.getAction().getParallelism());\n IntermediateExecutionFlow<?> intermediateFlow =\n new IntermediateExecutionFlow<>(queue);\n flow.getNext().add(intermediateFlow);\n IntermediateExecutionFlow<?> intermediateFlowQuote =\n new IntermediateExecutionFlow<>(queue);\n intermediateFlowQuote.getNext().add(s);\n allFlows.add(intermediateFlowQuote);\n });\n\n if (flow.getNext().size() > sinkFlows.size()) {\n allFlows.addAll(\n flow.getNext().stream()\n .flatMap(f -> splitSinkFromFlow(f).stream())\n .collect(Collectors.toList()));\n }\n return allFlows;\n }",
"@Nonnull\r\n\tpublic static <T> Observable<T> never() {\r\n\t\treturn new Observable<T>() {\r\n\t\t\t@Override\r\n\t\t\t@Nonnull \r\n\t\t\tpublic Closeable register(@Nonnull Observer<? super T> observer) {\r\n\t\t\t\treturn Closeables.emptyCloseable();\r\n\t\t\t}\r\n\t\t};\r\n\t}",
"public void clear() {\n streams.clear();\n }",
"public void discard() {\n }",
"public interface Sink<I>\n extends Consumer<I>\n{\n /**\n * {@inheritDoc}\n */\n @Override\n public default void accept (I message)\n {\n dataIn().send(message);\n }\n\n /**\n * Input Connection.\n *\n * @return the data-input that provides the messages to the pipeline.\n */\n public Input<I> dataIn ();\n}",
"public Builder clearStream() {\n \n stream_ = false;\n onChanged();\n return this;\n }",
"public void clearReceivedEvents() {\n this.receivedEvents.clear();\n }",
"public final Iterator iterator() {\n return new SinksIterator(this);\n }",
"private void discardQueued(boolean discardSavedBuffers) {\n ChannelBuffer buf, nxt;\n\n buf = inQueueHead;\n inQueueHead = null;\n inQueueTail = null;\n for (; buf != null; buf = nxt) {\n nxt = buf.next;\n recycleBuffer(buf, discardSavedBuffers);\n }\n\n // If discardSavedBuffers is true, must also discard any previously\n // saved buffer in the saveInBuf field.\n \n if (discardSavedBuffers) {\n if (saveInBuf != null) {\n saveInBuf = null;\n }\n }\n }",
"public synchronized Object[] clearIncoming() {\n Object[] incoming = new Object[ content.size() ] ;\n for (int i=0;i<content.size();i++) {\n incoming[i] = content.get(i) ;\n }\n content.clear();\n return incoming ;\n }",
"@Nonnull \r\n\tpublic static <T, U> Observable<U> prune(\r\n\t\t\t@Nonnull final Observable<? extends T> source,\r\n\t\t\t@Nonnull final Func1<? super Observable<? extends T>, ? extends Observable<U>> selector\r\n\t) {\r\n\t\treturn replay(source, selector, 1);\r\n\t}",
"public void clearConsumerDestinations() {\n this.consumerDestinations_ = emptyProtobufList();\n }",
"public Sink getSink(){\r\n\t\treturn sink;\r\n\t}",
"@Nonnull\r\n\tpublic static <T> Observable<List<T>> buffer(\r\n\t\t\t@Nonnull final Observable<? extends T> source,\r\n\t\t\tfinal int bufferSize,\r\n\t\t\tint skip) {\r\n\t\treturn new Buffer.WithSizeSkip<T>(source, bufferSize, 0);\r\n\t}",
"@Override\r\n\tpublic void discard(Resources toDiscard) {\n\t\t\r\n\t}",
"public Builder clearPayload() {\n if (payloadBuilder_ == null) {\n payload_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000020);\n onChanged();\n } else {\n payloadBuilder_.clear();\n }\n return this;\n }",
"public abstract void disableStreamFlow();",
"public Node sink() {\n\t\treturn _sink;\n\t}",
"public void StopStreaming()\n {\n handler.StopStreaming();\n }",
"public Builder clearOutputs() {\n if (outputsBuilder_ == null) {\n outputs_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000010);\n onChanged();\n } else {\n outputsBuilder_.clear();\n }\n return this;\n }",
"public byte[] drain() {\n return drainTo(new ByteArrayOutputStream()).toByteArray();\n }",
"public interface Sink {\r\n\t\r\n\t/**\r\n\t * Check if the sink is still active\r\n\t * @return\r\n\t */\r\n\tboolean isActive();\r\n\t\r\n\t/**\r\n\t * Set the error flag\r\n\t */\r\n\tvoid setError();\r\n\t\r\n\t/**\r\n\t * Check if the sink has been object of an error\r\n\t * @return true if an error happened to the sink\r\n\t */\r\n\tboolean isError();\r\n\t\r\n\t/**\r\n\t * Write data to the sink.\r\n\t * @param data Byte array containing the data to write\r\n\t * @param offset Offset at which the data begins\r\n\t * @param length Length of the data\r\n\t * @param time Current time in milliseconds (begin at Unix Epoch).\r\n\t * @return \r\n\t */\r\n\tboolean write(byte[] data, int offset, int length, long time);\r\n\t\r\n\t/**\r\n\t * Close the sink and the underlaying stream (if any).\r\n\t * @throws IOException\r\n\t */\r\n\tvoid close();\r\n\t\r\n}",
"protected void discard() {\r\n discarded = true;\r\n onDiscard();\r\n }",
"void discard();",
"void discard();",
"public Builder clearOutputs() {\n if (outputsBuilder_ == null) {\n outputs_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n } else {\n outputsBuilder_.clear();\n }\n return this;\n }",
"public Builder clearOutputs() {\n if (outputsBuilder_ == null) {\n outputs_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n } else {\n outputsBuilder_.clear();\n }\n return this;\n }",
"public Builder clearOutputs() {\n if (outputsBuilder_ == null) {\n outputs_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n outputsBuilder_.clear();\n }\n return this;\n }",
"public Builder clearDeliveries() {\n if (deliveriesBuilder_ == null) {\n deliveries_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n } else {\n deliveriesBuilder_.clear();\n }\n return this;\n }",
"@Nonnull \r\n\tpublic static <T> Observable<T> prune(\r\n\t\t\t@Nonnull final Observable<? extends T> source,\r\n\t\t\t@Nonnull final Scheduler scheduler\r\n\t) {\r\n\t\treturn replay(source, 1, scheduler);\r\n\t}",
"public Block stripeByReceiver(\n int stripes,\n Int2ObjFunction<Int2ObjFunction<Predicate<I>>> stripeSupplier) {\n return StripingUtils.generateStripedBlock(\n stripes,\n new Function<Predicate<I>, Block>() {\n @Override\n public Block apply(final Predicate<I> stripePredicate) {\n return FilteringPiece.createReceiveFiltering(\n new SupplierFromVertex<I, V, E, Boolean>() {\n @Override\n public Boolean get(Vertex<I, V, E> vertex) {\n return stripePredicate.apply(vertex.getId());\n }\n },\n new SendMessageWithCombinerPiece<>(\n name,\n messageCombiner,\n messageSupplier,\n new SupplierFromVertex<I, V, E, Iterator<I>>() {\n @Override\n public Iterator<I> get(Vertex<I, V, E> vertex) {\n return StreamSupport.stream(\n Spliterators.spliteratorUnknownSize(\n targetsSupplier.get(vertex), Spliterator.ORDERED),\n false).filter(stripePredicate::apply).iterator();\n }\n },\n messagesConsumer));\n }\n },\n stripeSupplier);\n }",
"public void removeAllProducers() {\n producers.clear();\n }",
"ObservableList<Deliverable> getFilteredDeliverableList();",
"public EmbeddedChannel flushOutbound() {\n/* 444 */ if (checkOpen(true)) {\n/* 445 */ flushOutbound0();\n/* */ }\n/* 447 */ checkException(voidPromise());\n/* 448 */ return this;\n/* */ }",
"public void clearProducerDestinations() {\n this.producerDestinations_ = emptyProtobufList();\n }",
"public void close() throws IOException {\n if (sink != null) {\n sink.receivedLast();\n }\n }",
"public Builder clearDelivered() {\n if (deliveredBuilder_ == null) {\n delivered_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n } else {\n deliveredBuilder_.clear();\n }\n return this;\n }",
"public static <T, U> Observable<List<T>> buffer(\r\n\t\t\t@Nonnull Observable<? extends T> source,\r\n\t\t\t@Nonnull Func0<? extends Observable<U>> bufferCloseSelector) {\r\n\t\treturn new Buffer.WithClosing<T, U>(source, bufferCloseSelector);\r\n\t}",
"protected EventSink doUnplug(EventSink sink)\r\n\t{\n\t\tEventProcessor proc = sink.getProcessor();\r\n\t\tsink = (EventSink)proc;\r\n\t\t\r\n\t\t// deactivate, destroy and deregister the sink\r\n\t\tsink.passivate();\r\n\t\tsink.exit();\r\n\t\tbroker.deregisterSink(sink);\r\n\t\t\r\n\t\treturn sink;\r\n\t}",
"@Override\n public synchronized List<Message> receiveMessages() {\n ArrayList<Message> temp = new ArrayList<>(queuedMessages);\n queuedMessages.clear();\n return temp;\n }",
"void removeSink(McastRoute route, HostId hostId);",
"public void clearReceived() {\n\t\t_received = false;\n\t}",
"public ByteBuf discardReadBytes()\r\n/* 107: */ {\r\n/* 108:124 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 109:125 */ return super.discardReadBytes();\r\n/* 110: */ }",
"public void clear(){\n this.collected.clear();\n }",
"public Builder clearDataItemPayload() {\n bitField0_ = (bitField0_ & ~0x00000008);\n dataItemPayload_ = null;\n if (dataItemPayloadBuilder_ != null) {\n dataItemPayloadBuilder_.dispose();\n dataItemPayloadBuilder_ = null;\n }\n onChanged();\n return this;\n }",
"@Test\n public void testReportBadSink_PastThreshold() {\n List<ServerName> serverNames = Lists.newArrayList();\n for (int i = 0; i < 30; i++) {\n serverNames.add(mock(ServerName.class));\n }\n when(replicationEndpoint.getRegionServers())\n .thenReturn(serverNames);\n\n\n sinkManager.chooseSinks();\n // Sanity check\n assertEquals(3, sinkManager.getNumSinks());\n\n ServerName serverName = sinkManager.getSinksForTesting().get(0);\n\n SinkPeer sinkPeer = new SinkPeer(serverName, mock(AdminService.BlockingInterface.class));\n\n sinkManager.reportSinkSuccess(sinkPeer); // has no effect, counter does not go negative\n for (int i = 0; i <= ReplicationSinkManager.DEFAULT_BAD_SINK_THRESHOLD; i++) {\n sinkManager.reportBadSink(sinkPeer);\n }\n\n // Reporting a bad sink more than the threshold count should remove it\n // from the list of potential sinks\n assertEquals(2, sinkManager.getNumSinks());\n\n //\n // now try a sink that has some successes\n //\n serverName = sinkManager.getSinksForTesting().get(0);\n\n sinkPeer = new SinkPeer(serverName, mock(AdminService.BlockingInterface.class));\n for (int i = 0; i <= ReplicationSinkManager.DEFAULT_BAD_SINK_THRESHOLD-1; i++) {\n sinkManager.reportBadSink(sinkPeer);\n }\n sinkManager.reportSinkSuccess(sinkPeer); // one success\n sinkManager.reportBadSink(sinkPeer);\n\n // did not remove the sink, since we had one successful try\n assertEquals(2, sinkManager.getNumSinks());\n\n for (int i = 0; i <= ReplicationSinkManager.DEFAULT_BAD_SINK_THRESHOLD-2; i++) {\n sinkManager.reportBadSink(sinkPeer);\n }\n // still not remove, since the success reset the counter\n assertEquals(2, sinkManager.getNumSinks());\n\n sinkManager.reportBadSink(sinkPeer);\n // but we exhausted the tries\n assertEquals(1, sinkManager.getNumSinks());\n }",
"public Discard()\n {\n super();\n }",
"private void stop() {\n\t\tif (null == this.sourceRunner || null == this.channel) {\n\t\t\treturn;\n\t\t}\n\t\tthis.sourceRunner.stop();\n\t\tthis.channel.stop();\n\t\tthis.sinkCounter.stop();\n\t}",
"public void stopReceiving() {\n\t\tcallerContext.unregisterReceiver(this);\n\t}",
"public void doDisconnect() {\n synchronized (getStreamSyncRoot()) {\n Object[] streams = streams();\n if (!(streams == null || streams.length == 0)) {\n for (Object stream : streams) {\n if (stream instanceof PulseAudioStream) {\n try {\n ((PulseAudioStream) stream).disconnect();\n } catch (IOException e) {\n }\n }\n }\n }\n }\n super.doDisconnect();\n }",
"public Builder clearChannel() {\n bitField0_ = (bitField0_ & ~0x00000002);\n channel_ = 1;\n onChanged();\n return this;\n }",
"public Builder clearChannel() {\n if (channelBuilder_ == null) {\n channel_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n channelBuilder_.clear();\n }\n return this;\n }",
"boolean isSink();",
"@Nonnull \r\n\tpublic static <T> Observable<T> ignoreValues(\r\n\t\t\t@Nonnull final Observable<? extends T> source) {\r\n\t\treturn new Observable<T>() {\r\n\t\t\t@Override\r\n\t\t\t@Nonnull \r\n\t\t\tpublic Closeable register(@Nonnull final Observer<? super T> observer) {\r\n\t\t\t\treturn source.register(new Observer<T>() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void error(@Nonnull Throwable ex) {\r\n\t\t\t\t\t\tobserver.error(ex);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void finish() {\r\n\t\t\t\t\t\tobserver.finish();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void next(T value) {\r\n\t\t\t\t\t\t// ignored\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 static RemoteRepositoryFilterSource neverAccept() {\n return new RemoteRepositoryFilterSource() {\n public String getName() {\n return \"never-accept\";\n }\n\n private final RemoteRepositoryFilter.Result RESULT =\n new RemoteRepositoryFilterSourceSupport.SimpleResult(false, getName());\n\n @Override\n public RemoteRepositoryFilter getRemoteRepositoryFilter(RepositorySystemSession session) {\n return new RemoteRepositoryFilter() {\n @Override\n public Result acceptArtifact(RemoteRepository remoteRepository, Artifact artifact) {\n return RESULT;\n }\n\n @Override\n public Result acceptMetadata(RemoteRepository remoteRepository, Metadata metadata) {\n return RESULT;\n }\n };\n }\n };\n }",
"public Builder clearCausesDrop() {\n bitField0_ = (bitField0_ & ~0x00000004);\n causesDrop_ = false;\n onChanged();\n return this;\n }",
"public void discardAll()\n\t{\n\t\thand = new Card[12];\n\t\tnumCards = 0;\n\t}",
"@Override\n\tpublic void suppress() {\n\t\tsuppressed = true;\n\t}",
"@Override\n\tpublic void suppress() {\n\t\tsuppressed = true;\n\t}",
"@Override\n\tpublic void suppress() {\n\t\tsuppressed = true;\n\t}",
"protected final ByteSink getOutput(String name) {\n try {\n if (name.equals(\"-\")) {\n return new StandardOutputSink();\n } else {\n File file = new File(name);\n if (file.isDirectory()) {\n throw new IOException(name); // TODO Message? Exception?\n } else if (file.exists() && !file.canWrite()) {\n throw new IOException(name); // TODO Message? Exception?\n } else {\n return Files.asByteSink(file);\n }\n }\n } catch (IOException e) {\n throw new UncheckedIOException(e);\n }\n }",
"public yandex.cloud.api.logging.v1.SinkServiceOuterClass.ListSinksResponse list(yandex.cloud.api.logging.v1.SinkServiceOuterClass.ListSinksRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListMethod(), getCallOptions(), request);\n }",
"@Test\n public void shouldNotReadWholeStreamWithDefault() {\n final Queue<String> queue = new LinkedBlockingQueue<>();\n\n Executors.newCachedThreadPool().submit(() -> produceData(queue));\n\n final List<String> collected = queue.stream().collect(Collectors.toList());\n assertThat(collected, not(hasItems(\"0\", \"1\", \"2\", \"3\", \"4\")));\n }",
"EventChannelFilter filter();",
"Consumer<VoidMessage> outgoingConsumer();",
"public yandex.cloud.api.operation.OperationOuterClass.Operation delete(yandex.cloud.api.logging.v1.SinkServiceOuterClass.DeleteSinkRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getDeleteMethod(), getCallOptions(), request);\n }",
"public Builder clearChannel() {\n bitField0_ = (bitField0_ & ~0x00000200);\n channel_ = getDefaultInstance().getChannel();\n onChanged();\n return this;\n }",
"default Filter<T> negate()\n {\n final Filter<T> parent = this;\n\n return new Filter<T>()\n {\n @Override\n public boolean isFiltered(final T element)\n {\n return !parent.isFiltered(element);\n }\n\n @Override\n public Filter<T> negate()\n {\n return parent;\n }\n };\n }",
"void stopPumpingEvents();",
"public void drain() {\r\n if (getAndIncrement() == 0) {\r\n SimpleQueue<T> simpleQueue = this.queue;\r\n int i = this.consumed;\r\n int i2 = this.bufferSize;\r\n int i3 = i2 - (i2 >> 2);\r\n boolean z = this.sourceMode != 1;\r\n int i4 = 1;\r\n int i5 = i;\r\n SimpleQueue<T> simpleQueue2 = simpleQueue;\r\n int i6 = i5;\r\n while (true) {\r\n if (simpleQueue2 != null) {\r\n long j = LongCompanionObject.MAX_VALUE;\r\n InnerSubscription[] innerSubscriptionArr = (InnerSubscription[]) this.subscribers.get();\r\n boolean z2 = false;\r\n for (InnerSubscription innerSubscription : innerSubscriptionArr) {\r\n long j2 = innerSubscription.get();\r\n if (j2 != Long.MIN_VALUE) {\r\n j = Math.min(j2 - innerSubscription.emitted, j);\r\n z2 = true;\r\n }\r\n }\r\n long j3 = 0;\r\n if (!z2) {\r\n j = 0;\r\n }\r\n while (true) {\r\n if (j == j3) {\r\n break;\r\n }\r\n boolean z3 = this.done;\r\n try {\r\n Object poll = simpleQueue2.poll();\r\n boolean z4 = poll == null;\r\n if (!checkTerminated(z3, z4)) {\r\n if (z4) {\r\n break;\r\n }\r\n int length = innerSubscriptionArr.length;\r\n for (int i7 = 0; i7 < length; i7++) {\r\n InnerSubscription innerSubscription2 = innerSubscriptionArr[i7];\r\n if (!innerSubscription2.isCancelled()) {\r\n innerSubscription2.downstream.onNext(poll);\r\n innerSubscription2.emitted++;\r\n }\r\n }\r\n if (z) {\r\n i6++;\r\n if (i6 == i3) {\r\n ((Subscription) this.upstream.get()).request((long) i3);\r\n i6 = 0;\r\n }\r\n }\r\n j--;\r\n if (innerSubscriptionArr != this.subscribers.get()) {\r\n break;\r\n }\r\n j3 = 0;\r\n } else {\r\n return;\r\n }\r\n } catch (Throwable th) {\r\n Throwable th2 = th;\r\n Exceptions.throwIfFatal(th2);\r\n ((Subscription) this.upstream.get()).cancel();\r\n simpleQueue2.clear();\r\n this.done = true;\r\n signalError(th2);\r\n return;\r\n }\r\n }\r\n if (checkTerminated(this.done, simpleQueue2.isEmpty())) {\r\n return;\r\n }\r\n }\r\n this.consumed = i6;\r\n i4 = addAndGet(-i4);\r\n if (i4 != 0) {\r\n if (simpleQueue2 == null) {\r\n simpleQueue2 = this.queue;\r\n }\r\n } else {\r\n return;\r\n }\r\n }\r\n }\r\n }",
"public Builder clearReceiver() {\n \n receiver_ = getDefaultInstance().getReceiver();\n onChanged();\n return this;\n }",
"public Builder clearAcks() {\n acks_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000008);\n onChanged();\n return this;\n }",
"public Builder clearAcks() {\n acks_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000020);\n onChanged();\n return this;\n }",
"public AsyncResult<IQ> removeAllMessages() {\r\n return xmppSession.query(IQ.set(new OfflineMessage(false, true)));\r\n }",
"void unsubscribeAll();",
"public static void stopStream(Context context) {\n Intent intent = new Intent(context, BandCollectionService.class);\n intent.putExtra(BAND_ACTION, BandAction.STOP_STREAM);\n context.startService(intent);\n }",
"@Override\n public void handlerRemoved(ChannelHandlerContext ctx) throws Exception {\n for (ByteBuf b : buffers) {\n b.release();\n }\n buffers.clear();\n frameLenBuf.release();\n ByteBuf frame = consumeCurrentFrameBuf();\n if (frame != null) {\n frame.release();\n }\n super.handlerRemoved(ctx);\n }",
"public Builder clearNoisySampleCount() {\n bitField0_ = (bitField0_ & ~0x00000004);\n noisySampleCount_ = 0;\n onChanged();\n return this;\n }",
"public static ArrayList unload() {\n ArrayList<String> messageToSend = new ArrayList<>();\n \n // This copies all elements instead of doing a shallow copy.\n // This is required to empty the arraylist for future messages.\n messageLogger.forEach(element -> {\n messageToSend.add(element);\n });\n messageLogger.clear();\n return messageToSend;\n }",
"public ByteArrayOutputStream drainTo(ByteArrayOutputStream stream) {\n while (hasNext()) {\n stream.write(next());\n }\n return stream;\n }",
"public Builder clearImmediateOutputAllPrefetch() {\n bitField0_ = (bitField0_ & ~0x00000004);\n immediateOutputAllPrefetch_ = false;\n onChanged();\n return this;\n }",
"@Nonnull\r\n\tpublic static <T> Observable<Void> drain(\r\n\t\t\t@Nonnull final Observable<? extends T> source,\r\n\t\t\t@Nonnull final Func1<? super T, ? extends Observable<Void>> pump) {\r\n\t\treturn drain(source, pump, scheduler());\r\n\t}",
"public void discardContent() {\n dispose();\n }",
"@Nonnull \r\n\tpublic static <T, U> Observable<U> prune(\r\n\t\t\t@Nonnull final Observable<? extends T> source,\r\n\t\t\t@Nonnull final Func1<? super Observable<? extends T>, ? extends Observable<U>> selector,\r\n\t\t\t\t\t@Nonnull final Scheduler scheduler\r\n\t) {\r\n\t\treturn replay(source, selector, 1, scheduler);\r\n\t}",
"@Override\n protected synchronized void removeWrite(ChannelHandlerWriteSubscription subscription) {\n super.removeWrite(subscription);\n }"
]
| [
"0.5909376",
"0.56794393",
"0.5411346",
"0.5211276",
"0.517075",
"0.51327324",
"0.50699925",
"0.50299346",
"0.49630862",
"0.496118",
"0.4951932",
"0.49477857",
"0.48373285",
"0.4806751",
"0.47938994",
"0.4790136",
"0.47777444",
"0.4770561",
"0.47593334",
"0.4752583",
"0.47447175",
"0.47063684",
"0.47041625",
"0.46941572",
"0.46773216",
"0.46662477",
"0.46657598",
"0.4662587",
"0.46464655",
"0.46148384",
"0.46147877",
"0.4610502",
"0.45903397",
"0.45892245",
"0.458318",
"0.4579422",
"0.45748097",
"0.45665598",
"0.45610088",
"0.45610088",
"0.4556828",
"0.4556828",
"0.45464337",
"0.45343393",
"0.45331517",
"0.4531549",
"0.45314413",
"0.45302835",
"0.45218074",
"0.45156762",
"0.45088285",
"0.4497975",
"0.44896522",
"0.4484244",
"0.44821656",
"0.4470063",
"0.44624707",
"0.4443938",
"0.44388047",
"0.4437226",
"0.44140148",
"0.44095606",
"0.4397099",
"0.43965238",
"0.43910125",
"0.43909612",
"0.4388428",
"0.4387814",
"0.4382479",
"0.43782791",
"0.4372917",
"0.4372897",
"0.4363427",
"0.4363427",
"0.4363427",
"0.4360112",
"0.4355499",
"0.43516618",
"0.4351133",
"0.43398914",
"0.43371177",
"0.43328047",
"0.43280807",
"0.43198922",
"0.43173686",
"0.4311459",
"0.4302184",
"0.42951685",
"0.42884615",
"0.4270801",
"0.4268661",
"0.4266709",
"0.42619225",
"0.42552817",
"0.42551306",
"0.42518732",
"0.42515796",
"0.42482296",
"0.42466202",
"0.4243935"
]
| 0.54298353 | 2 |
Constructs a framed pane with the simple frame. | public FramedPane() {
LoggingTool.print( "Constructing new FramedPane." );
// Draw Frame
Line topLine = new Line( 1, 1, this.getWidth(), 1 );
Line rightLine = new Line( this.getWidth(), 1, this.getWidth(), this.getHeight() );
Line leftLine = new Line( 1, 1, 1, this.getHeight() );
Line bottomLine = new Line( 1, this.getHeight(), this.getWidth(), this.getHeight() );
topLine.endXProperty().bind( this.widthProperty().subtract( 1 ) );
rightLine.startXProperty().bind( this.widthProperty().subtract( 1 ) );
rightLine.endXProperty().bind( rightLine.startXProperty() );
rightLine.endYProperty().bind( this.heightProperty().subtract( 1 ) );
leftLine.endYProperty().bind( this.heightProperty().subtract( 1 ) );
bottomLine.startYProperty().bind( this.heightProperty().subtract( 1 ) );
bottomLine.endXProperty().bind( this.widthProperty().subtract( 1 ) );
bottomLine.endYProperty().bind( bottomLine.startYProperty() );
this.getChildren().addAll( topLine, rightLine, leftLine, bottomLine );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Frame createFrame();",
"public FramedPane( String message ) {\n\t\tthis();\n\t\tLabel label = new Label( message );\n\t\tlabel.layoutXProperty().bind( this.widthProperty().divide( 2 ).subtract( label.widthProperty().divide( 2 ) ) );\n\t\tlabel.layoutYProperty()\n\t\t\t\t.bind( this.heightProperty().divide( 2 ).subtract( label.heightProperty().divide( 2 ) ) );\n\t\tthis.getChildren().addAll( label );\n\t}",
"public void CreateTheFrame()\n {\n setSize(250, 300);\n setMaximumSize( new Dimension(250, 300) );\n setMinimumSize(new Dimension(250, 300));\n setResizable(false);\n\n pane = getContentPane();\n insets = pane.getInsets();\n\n // Apply the null layout\n pane.setLayout(null);\n }",
"public TestSlideFrame() {\r\n initComponents();\r\n slide = new JFrame();\r\n slide.setUndecorated(true);\r\n //slide.setAlwaysOnTop(true);\r\n panel = new JPanel();\r\n panel.setLayout(null);\r\n slide.setLayout(null);\r\n panel.setBorder(BorderFactory.createLineBorder(Color.GRAY));\r\n panel.setLocation(0, 0);\r\n panel.setSize(100, 200);\r\n slide.add(panel);\r\n\r\n slide.setSize(1, 1);\r\n slide.setVisible(true);\r\n extended = false;\r\n }",
"FRAME createFRAME();",
"public MainFrame(){\n super(\"Across Madrid\");\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n setBounds(100,100,700,500);\n\n contentPane = new JPanel(new CardLayout());\n setContentPane(contentPane);\n \n fillContentPane();\n }",
"private void initPane(Container pane){\n\n\t\tif(!(pane.getLayout() instanceof BorderLayout)){\n\t\t\tpane.add(new JLabel(\"Container doesn't use BorderLayout!\"));\n\t\t\treturn;\n\t\t}\n\n\t\tpane.setBackground(Color.DARK_GRAY);\n\n\t\tif(!DEVELOPMENT_MODE){\n\t\t\t// Transparent 16 x 16 pixel cursor image\n\t\t\tBufferedImage cursorImg = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);\n\t\t\t// Create a new blank cursor\n\t\t\tCursor blankCursor = Toolkit.getDefaultToolkit().createCustomCursor(cursorImg, new Point(0, 0), \"blank cursor\");\n\t\t\t// Set the blank cursor to the JFrame\n\t\t\tpane.setCursor(blankCursor);\n\t\t}\n\n//\t\tWebcam webcam = Webcam.getDefault();\n//\t\twebcam.setViewSize(WebcamResolution.QVGA.getSize());\n\n//\t\twebcamPanel = new WebcamPanel(webcam);\n//\t\twebcamPanel.setFPSDisplayed(true);\n//\t\twebcamPanel.setDisplayDebugInfo(true);\n//\t\twebcamPanel.setImageSizeDisplayed(true);\n//\t\twebcamPanel.setFPSLimit(FRAMERATE);\n//\n//\t\tpane.add(webcamPanel);\n//\n//\t\twebcamPanel.add(new JLabel(\"Hello world!\"));\n\n\t\tvideoContainer = new JLabel((ImageIcon)null); // Will be initialised later\n\t\tvideoContainer.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tvideoContainer.setFont(FONT);\n\t\tvideoContainer.setForeground(new Color(0xff6655));\n\t\tvideoContainer.setText(\"Camera error!\");\n\n\t\tpane.add(videoContainer);\n\n\t}",
"private void createGUI() {\n ResizeGifPanel newContentPane = new ResizeGifPanel();\n newContentPane.setOpaque(true); \n setContentPane(newContentPane); \n }",
"public frame() {\r\n\t\tadd(createMainPanel());\r\n\t\tsetTitle(\"Lunch Date\");\r\n\t\tsetSize(FRAME_WIDTH, FRAME_HEIGHT);\r\n\r\n\t}",
"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 }",
"@Override\n public void run() {\n JFrame frame = new JFrame(\"Survey\");\n frame.setPreferredSize(new Dimension(300, 400));\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n createComponents(frame.getContentPane());\n frame.pack();\n frame.setVisible(true);\n }",
"private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"Firma digital\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.setLocationRelativeTo(null);\r\n\r\n //Create and set up the content pane.\r\n final FirmaDigital newContentPane = new FirmaDigital(frame);\r\n newContentPane.setOpaque(true); //content panes must be opaque\r\n frame.setContentPane(newContentPane);\r\n\r\n //Make sure the focus goes to the right component\r\n //whenever the frame is initially given the focus.\r\n frame.addWindowListener(new WindowAdapter() {\r\n public void windowActivated(WindowEvent e) {\r\n newContentPane.resetFocus();\r\n }\r\n });\r\n\r\n //Display the window.\r\n frame.pack();\r\n frame.setVisible(true);\r\n }",
"private static JFrame createFrame(){\n\t\t// Create the frame of the demonstration.\n\t\tJFrame demoFrame = new JFrame(\"Dock effect demonstration frame.\");\n\t\tdemoFrame.setSize(new Dimension(800, 600));\n\t\tdemoFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\t// Create the content pane of the frame.\n\t\tJPanel contentPane = new JPanel();\n\t\tdemoFrame.setContentPane(contentPane);\n\t\t\n\t\t// Create and add the docking area of the demonstration.\n\t\tDockEffectPanel<JPanel> dockEffectPanel = createDockEffectPanel();\n\t\tdockEffectPanel.setBorder(BorderFactory.createEtchedBorder()); // Put a border on the dock effect panel\n\t\t\n\t\t// Create the layout of the docking area.\n\t\tGroupLayout layout = new GroupLayout(contentPane);\n\t\tcontentPane.setLayout(layout);\n\t\tlayout.setHorizontalGroup(layout.createSequentialGroup()\n\t\t\t.addGap(0, 0, Short.MAX_VALUE)\n\t\t\t.addComponent(dockEffectPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t.addGap(0, 0, Short.MAX_VALUE)\n\t\t);\n\t\tlayout.setVerticalGroup(layout.createSequentialGroup()\n\t\t\t.addGap(0, 0, Short.MAX_VALUE)\n\t\t\t.addComponent(dockEffectPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t.addGap(0, 0, Short.MAX_VALUE)\n\t\t);\n\t\t\n\t\treturn demoFrame;\n\t}",
"private void setupFrame()\n\t\t{\n\t\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\tthis.setResizable(false);\n\t\t\tthis.setSize(800, 600);\n\t\t\tthis.setTitle(\"SEKA Client\");\n\t\t\tthis.setContentPane(panel);\n\t\t\tthis.setVisible(true);\n\t\t}",
"public void run() \n {\n final JFrame frame = new JFrame(); \n frame.setMinimumSize(new Dimension(640, 480)); \n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); \n \n // Add the Swing JPanel and make visible\n frame.getContentPane().add(new SwingFX2()); \n frame.setVisible(true); \n }",
"private void setUpFrame() {\n rootPanel = new JPanel();\n rootPanel.setLayout(new BorderLayout());\n rootPanel.setBackground(Color.darkGray);\n }",
"public ModuleFrame() {\n javafxPanel = new JFXPanel();\n initComponents();\n this.webViewParent.setLayout(new BorderLayout());\n this.webViewParent.add(javafxPanel, BorderLayout.CENTER);\n this.webViewParent.add(javafxPanel);\n \n this.setDefaultCloseOperation(HIDE_ON_CLOSE);\n }",
"private static void createAndShowGUI() {\n //Create and set up the window.\n JFrame frame = new JFrame(\"WAR OF MINE\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Create and set up the content pane.\n JComponent newContentPane = new Gameframe();\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.setSize(800,1000);\n frame.setVisible(true);\n }",
"private static void createAndShowGUI() {\r\n //Make sure we have nice window decorations.\r\n JFrame.setDefaultLookAndFeelDecorated(true);\r\n JDialog.setDefaultLookAndFeelDecorated(true);\r\n\r\n //Create and set up the window.\r\n JFrame frame = new JFrame(\"SplitPaneDemo\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n SplitPaneDemo splitPaneDemo = new SplitPaneDemo();\r\n frame.getContentPane().add(splitPaneDemo.getSplitPane());\r\n\r\n //Display the window.\r\n frame.pack();\r\n frame.setVisible(true);\r\n }",
"public void buildFrame();",
"public Frame() {\n initComponents();\n }",
"public Frame() {\n initComponents();\n }",
"private static void createAndShowGUI() {\n //Make sure we have nice window decorations.\n JFrame.setDefaultLookAndFeelDecorated(true);\n\n JFrame frame = new JFrame(\"TablePanel\");\n JPanel contentP = new JPanel();\n Box v = Box.createVerticalBox();\n Box h = Box.createHorizontalBox();\n Box h2 = Box.createHorizontalBox();\n TablePanel tablePanel = new TablePanel();\n tablePanel.setOpaque(true); //content panes must be opaque\n\n\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setContentPane(contentP);\n contentP.add(tablePanel);\n contentP.add(v);\n v.add(h);\n v.add(h2);\n\n h.add(tablePanel);\n h2.add(new JButton(\"Hello\"));\n //Display the window.\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n }",
"private void createManualJPanel() {\r\n createJPanelWithManual();\r\n JFrame frame = new JFrame();\r\n customizeFrame(frame);\r\n }",
"void frameSetUp() {\r\n\t\tJFrame testFrame = new JFrame();\r\n\t\ttestFrame.setSize(700, 400);\r\n\t\ttestFrame.setResizable(false);\r\n\t\ttestFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\ttestFrame.setLayout(new GridLayout(0, 2));\r\n\t\tmainFrame = testFrame;\r\n\t}",
"private static void createAndShowGUI() {\n\n //Create and set up the window.\n JFrame frame = new JFrame(\"ButtonDemo\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Create and set up the content pane.\n ButtonDemo newContentPane = new ButtonDemo();\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }",
"public SiscobanFrame() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t}",
"public void makeWindow(Container pane)\r\n\t{\r\n\t\tboard.display(pane, fieldArray);\r\n\t}",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(0, 0, 1000, 700);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tframeContent = new JPanel();\n\t\tframe.getContentPane().add(frameContent);\n\t\tframeContent.setBounds(10, 10, 700, 640);\n\t\tframeContent.setLayout(null);\n\t\t\n\t\tinfoPane = new JPanel();\n\t\tframe.getContentPane().add(infoPane);\n\t\tinfoPane.setBounds(710, 10, 300, 640);\n\t\tinfoPane.setLayout(null);\n\t}",
"public NewJFrame1() {\n initComponents();\n\n dip();\n sh();\n }",
"public FrameControl() {\n initComponents();\n }",
"private static void createAndShowGUI() {\r\n //Make sure we have nice window decorations.\r\n JFrame.setDefaultLookAndFeelDecorated(true);\r\n JDialog.setDefaultLookAndFeelDecorated(true);\r\n\r\n //Create and set up the window.\r\n JFrame frame = new SplitPaneDemo2();\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n //Display the window.\r\n frame.pack();\r\n frame.setVisible(true);\r\n }",
"private static void createAndShowGUI() {\n\t\t//Create and set up the window.\n\t\tJFrame frame = new JFrame(\"Color test\");\n\t\tframe.setPreferredSize(new Dimension(700, 700));\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\t//Create and set up the content pane.\n\t\tJComponent newContentPane = new ColorTest();\n\t\tnewContentPane.setOpaque(true); //content panes must be opaque\n\t\tframe.setContentPane(newContentPane);\n\n\t\t//Display the window.\n\t\tframe.pack();\n\t\tframe.setVisible(true);\n\t}",
"public Mainframe() {\n initComponents();\n }",
"private void customizeFrame(JFrame frame) {\r\n frame.setTitle(getTitle());\r\n frame.setResizable(false);\r\n frame.setPreferredSize(new Dimension(width + 15, height + 36));\r\n frame.setVisible(true);\r\n\r\n frame.setLayout(new BorderLayout());\r\n frame.add(panel, BorderLayout.CENTER);\r\n frame.setLocationRelativeTo(null);\r\n\r\n frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n frame.pack();\r\n }",
"public SimpleFrame(float x, float y, float w, float h) {\n super();\n\n setPosition(x, y);\n setSize(w, h);\n }",
"public void createAndShowGUI() {\n //Create and set up the window.\n JFrame frame = new JFrame(\"SimpleTableDemo\");\n frame.setTitle(titulo);\n frame.setLocationRelativeTo(null);\n frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n //Create and set up the content pane.\n SimpleTableDemo newContentPane = new SimpleTableDemo();\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(this);\n \n //Display the window.\n frame.pack();\n frame.setVisible(true);\n \n }",
"NOFRAME createNOFRAME();",
"private JInternalFrame createInternalFrame() {\n\n initializeChartPanel();\n\n chartPanel.setPreferredSize(new Dimension(200, 100));\n final JInternalFrame frame = new JInternalFrame(\"Frame 1\", true);\n frame.getContentPane().add(chartPanel);\n frame.setClosable(true);\n frame.setIconifiable(true);\n frame.setMaximizable(true);\n frame.setResizable(true);\n return frame;\n\n }",
"public void initializePanelToFrame() {\n\t\tnew ColorResources();\n\t\tnew TextResources().changeLanguage();\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(null);\n\t\tpanel.setPreferredSize(new Dimension(375, 812));\n\n\t\tconfigureLabels();\n\t\tconfigureButtons();\n\t\taddListeners();\n\t\taddComponentsToPanel();\n\n\t\tthis.setContentPane(panel);\n\t\tthis.pack();\n\t}",
"public SudoFrame() {\n topPanel = new JTabbedPane();\n bottomPanel = new JPanel();\n bottomPanel.setOpaque(false);\n\n paintButton();\n paintSudo();\n\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setTitle(\"Soduku\");\n\n JPanel contentPaneBoss = new ContentPanel();\n this.setContentPane(contentPaneBoss);\n\n contentPaneBoss.setLayout(new BoxLayout(contentPaneBoss, BoxLayout.Y_AXIS));\n// contentPaneBoss.add(Box.createVerticalStrut(5));\n contentPaneBoss.add(topPanel);\n contentPaneBoss.add(Box.createVerticalStrut(5));\n contentPaneBoss.add(bottomPanel);\n contentPaneBoss.add(Box.createVerticalStrut(5));\n\n this.setBounds(900, 100, 450, 450);\n // this.pack();\n// this.setResizable(false);\n this.setVisible(true);\n }",
"public PuzzleFrame() {\n initComponents();\n this.setLayout(new BorderLayout());\n this.setTitle(\"15-Puzzle - Team Gorila - Praktikum PBO\");\n\n // Mengatur ukuran default tile menjadi 4 x 4\n panelSize = 4;\n initPanel();\n }",
"public HomeFrame() {\n super();\n\n this.setSize(400, 80);\n Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n this.setLocation(dim.width/2-this.getSize().width/2, dim.height/2-this.getSize().height/2);\n this.setTitle(\"Reed-Muller code sending simulator\");\n JPanel panel = new JPanel();\n\n JButton sendVector = new JButton();\n sendVector.setText(\"Vector\");\n sendVector.addActionListener(e -> new VectorFrame());\n\n JButton sendText = new JButton();\n sendText.setText(\"Text\");\n sendText.addActionListener(e -> new TextFrame());\n\n panel.add(sendVector);\n panel.add(sendText);\n\n panel.setVisible(true);\n this.add(panel);\n this.setVisible(true);\n }",
"public static void createMainframe()\n\t{\n\t\t//Creates the frame\n\t\tJFrame foodFrame = new JFrame(\"USDA Food Database\");\n\t\t//Sets up the frame\n\t\tfoodFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfoodFrame.setSize(1000,750);\n\t\tfoodFrame.setResizable(false);\n\t\tfoodFrame.setIconImage(icon.getImage());\n\t\t\n\t\tGui gui = new Gui();\n\t\t\n\t\tgui.setOpaque(true);\n\t\tfoodFrame.setContentPane(gui);\n\t\t\n\t\tfoodFrame.setVisible(true);\n\t}",
"@Override\n protected JXFrame createXFrame() {\n return new JXDemoFrame();\n }",
"private void setFrame()\r\n\t{\r\n\t\tthis.setName(\"Project 3\");\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\tthis.setSize(300, 300);\r\n\t\tthis.setLocation(650, 100);\r\n\t\tthis.setVisible(false);\r\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tthis.add(panel, BorderLayout.CENTER);\r\n\t}",
"public DisplayStaffMemberFrame() {\n initComponents();\n }",
"public Badminton()\n { \n frame.add(new Board()); \n frame.setSize(900, 900);\n frame.setResizable(false);\n frame.setTitle(\"PE Class\");\n //frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n }",
"private void createLayeredPane(){\n\t\tcontentPane = new JLayeredPane();\n\t\tcontentPane.setPreferredSize(windowSize);\n\t\tcontentPane.setOpaque(true);\n\t\tcontentPane.setVisible(true);\n\t}",
"public ColorPickerMainFrame()\n {\n initComponents();\n \n getContentPane().add(panel);\n setSize(640, 640);\n }",
"private HelloPanel() {\n\n\t\tHTML w = new HTML(BalasResources.INSTANCE.helloPane().getText());\n\t\tinitWidget(w);\n\t}",
"private static void createAndShowGUI() {\n //Make sure we have nice window decorations.\n JFrame.setDefaultLookAndFeelDecorated(true);\n\n //Create and set up the window.\n JFrame frame = new JFrame(\"TreeExpandEventDemo2\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Create and set up the content pane.\n JComponent newContentPane = new TreeExpandEventDemo2();\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }",
"public Frame(String title) {\r\n\t\tframeSettings(title);\r\n\r\n\t\tdeserializeBG();\r\n\r\n\t\t// PANEL DU HAUT\r\n\t\tsmartphone.add(bannerPanel, BorderLayout.NORTH);\r\n\r\n\t\t/* Design but not visible - START */\r\n\t\t/* Panels left & right - Definition of screen margins (background) */\r\n\t\tsmartphone.add(leftPanel, BorderLayout.WEST);\r\n\t\tsmartphone.add(rightPanel, BorderLayout.EAST);\r\n\t\tleftPanel.setOpaque(false);\r\n\t\trightPanel.setOpaque(false);\r\n\r\n\t\tpanL.setLayout(new FlowLayout(0, 7, 0));\r\n\t\tleftPanel.add(panL);\r\n\t\tpanL.setOpaque(false);\r\n\r\n\t\tpanR.setLayout(new FlowLayout(0, 7, 0));\r\n\t\trightPanel.add(panR);\r\n\t\tpanR.setOpaque(false);\r\n\t\t/* Design but not visible - END */\r\n\r\n\t\t/* South panel */\r\n\t\tsmartphone.add(southPanel, BorderLayout.SOUTH);\r\n\t\tsouthPanel.setOpaque(false);\r\n\r\n\t\tsouthPanel.setLayout(new BorderLayout());\r\n\r\n\t\tsouthPanel.add(southMenu);\r\n\r\n\t\tsouthMenu.setLayout(new FlowLayout(FlowLayout.CENTER, 50, 11));\r\n\t\tsouthMenu.setOpaque(false);\r\n\t\tsouthMenu.add(iconEmpty);\r\n\t\tsouthMenu.add(iconHome);\r\n\t\tsouthMenu.add(iconEmpty2);\r\n\r\n\t\tsouthPanel.add(southMenu);\r\n\r\n\t\t/* Main screen */\r\n\t\tsmartphone.add(switchPanel);\r\n\t\tswitchPanel.add(centerPanel, \"mainpanel\");\r\n\r\n\t\tcenterPanel.setLayout(new BorderLayout());\r\n\t\tcenterPanel.setPreferredSize(new Dimension(480, 40));\r\n\r\n\t\t/* Adding background to the center panel */\r\n\t\tcenterPanel.add(background, BorderLayout.CENTER);\r\n\r\n\t\t/* Allows you to add the correct spacing for applications */\r\n\t\tbackground.setLayout(new FlowLayout(30, 50, 80));\r\n\r\n\t\t// AJOUTER LES ICONS SUR LE BACKGROUND\r\n\t\tbackground.add(iconGallery);\r\n\t\tbackground.add(iconContact);\r\n\t\tbackground.add(iconCalculator);\r\n\r\n\t\tbackground.add(iconClock);\r\n\t\tbackground.add(iconMusic);\r\n\t\tbackground.add(iconShutdown);\r\n\r\n\t\tbackground.add(iconSettings);\r\n\r\n\t\tbackground.setOpaque(false);\r\n\r\n\t\t/* Listeners for functions */\r\n\t\ticonHome.addActionListener(new Home());\r\n\t\ticonShutdown.addActionListener(new Shutdown());\r\n\r\n\t\t/* Listeners for applications */\r\n\t\ticonGallery.addActionListener(new RunGallery());\r\n\t\ticonClock.addActionListener(new RunClock());\r\n\t\ticonMusic.addActionListener(new RunMusic());\r\n\t\ticonContact.addActionListener(new RunContact());\r\n\t\ticonSettings.addActionListener(new RunSettings());\r\n\t\ticonCalculator.addActionListener(new RunCalculator());\r\n\r\n\t\t/* Adding applications to the switchpanel */\r\n\t\tswitchPanel.add(musicpanel, \"musicpanel\");\r\n\t\tswitchPanel.add(clockpanel, \"clockpanel\");\r\n\t\tswitchPanel.add(contactpanel, \"contactpanel\");\r\n\t\tswitchPanel.add(settingspanel, \"settingspanel\");\r\n\t\tswitchPanel.add(calculatorpanel, \"calculatorpanel\");\r\n\t\tswitchPanel.add(gallerypanel, \"gallerypanel\");\r\n\r\n\t\t/* Adding the smartphone in the main frame */\r\n\t\tthis.add(smartphone);\r\n\t}",
"public FixedJInternalFrame(String title){\n super(title);\n }",
"private static void createAndShowGUI()\r\n {\r\n JFrame frame = new JFrame(\"ChangingTitleFrame Application\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.getContentPane().add(new FramePanel(frame).getPanel());\r\n frame.pack();\r\n frame.setLocationRelativeTo(null);\r\n frame.setVisible(true);\r\n }",
"public MainContentPane() {\r\n\t\tsuper();\r\n\r\n\t\t// Add design-time configured components.\r\n\t\tinitComponents();\r\n\t}",
"public addStFrame() {\n initComponents();\n }",
"public SnowmanPanel()\n {\n setPreferredSize(new Dimension(300,225));\n setBackground(Color.cyan);\n }",
"public static MainFrame createNewFrame(Display display, Document doc)\n {\n Shell shell = new Shell(display);\n\n MainFrame frame = new MainFrame(shell, doc);\n frame.initComponents(null);\n\n shell.open();\n\n return frame;\n }",
"public AWTBorderLayoutDemo () {\n setLayout(new BorderLayout(3, 3));\n // \"super\" Frame sets layout to BorderLayout,\n // horizontal and vertical gaps of 3 pixels\n\n // The components are added to the specified zone\n btnNorth = new Button(\"NORTH\");\n add(btnNorth, BorderLayout.NORTH);\n btnSouth = new Button(\"SOUTH\");\n add(btnSouth, BorderLayout.SOUTH);\n btnCenter = new Button(\"CENTER\");\n add(btnCenter, BorderLayout.CENTER);\n btnEast = new Button(\"EAST\");\n add(btnEast, BorderLayout.EAST);\n btnWest = new Button(\"WEST\");\n add(btnWest, BorderLayout.WEST);\n\n setTitle(\"BorderLayout Demo\"); // \"super\" Frame sets title\n setSize(280, 150); // \"super\" Frame sets initial size\n setVisible(true); // \"super\" Frame shows\n }",
"public void setFrameContent() {\n\t\tbigPanel.add(panelA);\n\t\tbigPanel.add(panelB);\n\t\tframe.add(bigPanel);\n\t\t//frame.add(panel);\n\t frame.setVisible(true);\n\t}",
"public HangingFlowPane() {\n super();\n }",
"public FrameDesign() {\n initComponents();\n }",
"public FixedJInternalFrame(){\n super();\n }",
"public void createContentPane() {\n\t\tLOG.log(\"Creating the content panel.\");\n\t\tCONTENT_PANE = new JPanel();\n\t\tCONTENT_PANE.setBorder(null);\n\t\tCONTENT_PANE.setLayout(new BorderLayout());\n\t}",
"public void show(){\n frame.setContentPane(mainPanel); //puts all our buttons and other objects on the window\n frame.setSize(700, 500);\n frame.setLocationRelativeTo(null); //opens our window in the center of the screen\n frame.setResizable(false);\n frame.setVisible(true); //displays the window\n }",
"public MasterGUI() {\n\n\t\tmainFrame.setPreferredSize(FRAME_SIZE);\n\t\tmainFrame.pack();\n\n\t\tmainPane.addTab(\"Element\", new ElementGUI().elementMainPanel);\n\t\tmainPane.addTab(\"Metal\", new MetalGUI().metalMainPanel);\n\t\tmainPane.addTab(\"Compound\", new CompoundGUI().compoundMainPanel);\n\t\tmainPane.addTab(\"Acid\", new AcidGUI().acidMainPanel);\n\t\tmainPane.addTab(\"Base\", new BaseGUI().baseMainPanel);\n\t\tmainPane.addTab(\"Chemical\", new ChemicalGUI().chemicalMainPanel);\n\n\t\tmainFrame.add(mainPane);\n\t\tmainFrame.setVisible(true);\n\t}",
"public MagicalGirlFrame(String title){\n\t\tsuper(title);\n\t\tpanel.setMinimumSize(new Dimension(900, 500));\n\t\tpane.add(panel, null, -1);\n\t\tpane.add(scrolltextbox, null, -1);\n\t\tthis.add(pane);\n\t\tBufferedImage img = null;\n\t\ttry {\n\t\t\timg = ImageIO.read(new File(\"C:\\\\Users\\\\Chrissy\\\\Google Drive ([email protected])\\\\Code\\\\Java\\\\MagicalRPG\\\\src\\\\RPGDemo\\\\01.png\"));\n\t\t}\n\t\tcatch (IOException i) {\n\t\t\tSystem.out.println(\"Image did not load.\");\n\t\t};\n\t\tpanel.add(new JLabel(new ImageIcon(img)));\n\t\tthis.setSize(900, 700);\n\t\t//DEBUGGING: setting up overlaylayout for layering sprites over background\n\t\t//img = SeraSpriteImg.seraAngry();\n\t\t//paneloverlay.addLayoutComponent(new JLabel(new ImageIcon(img)), null);\n\t\t\n\t\tthis.addWindowListener(new WindowAdapter(){\n public void windowClosing(WindowEvent e) {\n System.exit(0);\n }\n });\n\t}",
"public SameGnomeFrame() {\n\t\tsetSize(DEFUALT_WIDTH,DEFUALT_WIDTH);\n\t\tintializeGridBall();\n\t\tgrid = new GridComponent(gridBall);\n\t\tadd(grid);\n\t\t\n\t}",
"public NewJFrame() {\n initComponents();\n // HidenLable.setVisible(false);\n }",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 800, 800);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJPanel browserPanel = new JPanel();\n\t\tframe.getContentPane().add(browserPanel, BorderLayout.CENTER);\n\t\t\n\t\t// create javafx panel for browser\n browserFxPanel = new JFXPanel();\n browserPanel.add(browserFxPanel);\n \n // create JavaFX scene\n Platform.runLater(new Runnable() {\n public void run() {\n createScene();\n }\n });\n\t}",
"protected void createInternalFrame() {\n\t\tJInternalFrame frame = new JInternalFrame();\n\t\tframe.setVisible(true);\n\t\tframe.setClosable(true);\n\t\tframe.setResizable(true);\n\t\tframe.setFocusable(true);\n\t\tframe.setSize(new Dimension(300, 200));\n\t\tframe.setLocation(100, 100);\n\t\tdesktop.add(frame);\n\t\ttry {\n\t\t\tframe.setSelected(true);\n\t\t} catch (java.beans.PropertyVetoException e) {\n\t\t}\n\t}",
"private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"Gomaku - 5 In A Row\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setSize(600, 600);\n\n //Add the ubiquitous \"Hello World\" label.\n JPanel board = new JPanel();\n board.setSize(400, 400);\n board.set\n frame.getContentPane().add(board);\n\n //Display the window.\n frame.setVisible(true);\n }",
"public void crearPanel(){\n\n panel = new JPanel();\n this.getContentPane().add(panel);\n panel.setBackground(Color.CYAN);\n panel.setLayout(null);\n }",
"public MainApp() {\r\n\t\tsuper();\r\n\t\tthis.setSize(642, 455);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}",
"public NewJFrame() {\n initComponents();\n mcam.setLineWrap(true);\n\n }",
"public mainframe() {\n initComponents();\n }",
"public FlightController(){ \n /* JFrame is a top level container (window)\n * where we would be adding our button\n */\n\t\tsuper(\"Simple Flight Control\");\n\t\tthis.setSize(new Dimension(1280, 720));\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tcontent = getContentPane();\n\t\tcontent.setLayout(null);\n content.setSize(2561,720); \n this.init();\n this.setResizable(false);\n this.setVisible(true);\n \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}",
"public FrameCadastro(String tipo[]){\r\n\t\tsuper(\"ApartManager-Cadastro\");\r\n\t\t\r\n\t\tPanelCadastro panelC = new PanelCadastro(tipo);\r\n\t\t\r\n\t\tsetDefaultCloseOperation(DISPOSE_ON_CLOSE);\r\n\t\tsetSize(700, 700);\r\n\t\tsetLocationRelativeTo(null);\r\n\t\tsetVisible(true);\r\n\t\tsetResizable(false);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tsetContentPane(panel);\r\n\t\tpanel.setLayout(null);\r\n\t\tpanelC.setBounds(0, 0, 700, 700);\r\n\t\tpanel.add(panelC);\r\n\t\tpanel.setVisible(true);\r\n\t}",
"private void setupFrame() {\n this.setTitle(TITRE);\n this.setPreferredSize(new Dimension(TAILLE_FRAME[1], TAILLE_FRAME[0]));\n this.setResizable(false);\n \n this.getContentPane().setBackground(new Color(0,153,0));\n this.getContentPane().setLayout(new GridLayout(3,1)); \n \n this.pack();\n Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n this.setLocation(dim.width/2-this.getSize().width/2, dim.height/2-this.getSize().height/2);\n \n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setVisible(true);\n }",
"@Override\n\t\tpublic void setPane(JPanel pane) {\n\t\t\t\n\t\t}",
"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 DashboardFrame() {\n WebLookAndFeel.install ();\n Controller = new Controller();\n initComponents();\n }",
"public void makeWindow(JFrame frame,JPanel panel,JPanel centerPanel,String stage)\n {\n super.makeWindow(frame,panel,centerPanel,stage);\n Container contentPane = frame.getContentPane();\n if(stage.equals(\"b1\")){\n bit1Modules(contentPane);\n }else{\n bit2Modules(contentPane);\n }\n frame.revalidate();\n frame.repaint();\n //frame.setResizable(false);\n frame.pack();\n frame.setVisible(true);\n }",
"private void initPane() {\n\t\tContainer localContainer = getContentPane();\n\t\tlocalContainer.setLayout(new BorderLayout());\n\t\t\n\t\tsplitpane_left_top.setBorder(BorderFactory.createTitledBorder(\"Training Data\"));\n\t\tsplitpane_left_bottom.setBorder(BorderFactory.createTitledBorder(\"Tree View\"));\n\t\tsplitpane_left.setDividerLocation(400);\n\t\tsplitpane_left.setLastDividerLocation(0);\n\t\tsplitpane_left.setOneTouchExpandable(true);\n\t\tsplitpane_right.setBorder(BorderFactory.createTitledBorder(\"Classifer Output\"));\n\t\tsplitpane_main.setDividerLocation(500);\n\t\tsplitpane_main.setLastDividerLocation(0);\n\t\tsplitpane_main.setOneTouchExpandable(true);\n\t\tlocalContainer.add(splitpane_main, \"Center\");\n\t\tlocalContainer.add(statusPanel,BorderLayout.SOUTH);\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}",
"private void initializeFrame() {\n add(container);\n setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n pack();\n }",
"public MainFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}",
"public ExamplePanel() {\n\t\tinitWidget(uiBinder.createAndBindUi(this));\n\t\tsetWidgetToMaxWidthAndHeight();\n\t\tWindow.addResizeHandler(resizeHandler);\n\t\tintroPanel = new IntroPanel();\n\t\tsetWidgetAsExample(introPanel);\n\t}",
"public MainFrame(String title, String m, String k, boolean f) {\n\t\tsuper(title);\n\t\tL1 += m;\n\t\tL2 += k;\n\t\tnumofcomponents = f;\n\t\tCreateView();\n\t\t\n\t\tsetSize(670,560);\n\t\tsetResizable(false);\n\t\t//panel = new JPanel();\n\t\tsetLocationRelativeTo(null);\n\t\n \n\t}",
"public GUI() {\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n this.setContentPane(new ZombiePanel());\n pack();\n }",
"private static void createAndShowGUI() {\n\t\tJFrame frame = new JFrame(\"ComboBox2\");\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);;\n\t\t\n\t\t//create and set up the content pane\n\t\tJComponent content = new ComboboxDemo2();\n\t\tcontent.setOpaque(true);\n\t\tframe.setContentPane(content);\n\t\t\n\t\t//display the window\n\t\tframe.pack();\n\t\tframe.setVisible(true);\n\t}",
"private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"CsvPickerPane\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n CsvPickerPane demopane = new CsvPickerPane(frame);\n frame.getContentPane().add(demopane);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }",
"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 }",
"public FrameProduto() { \n this.getContentPane().setBackground(new Color(47, 64, 80));\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public ControlFrame addControlFrame(String theName, int theWidth, int theHeight) {\n Frame f = new Frame(theName);\n ControlFrame p = new ControlFrame(this, theWidth, theHeight);\n f.add(p);\n p.init();\n f.setTitle(theName);\n f.setSize(p.w, p.h);\n f.setLocation(50, 250);\n f.setResizable(false);\n f.setVisible(true);\n return p;\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 }",
"JPanel guiPanel() {\n JPanel panel = new JPanel();\n panel.setLayout(new BorderLayout());\n tabbedPane = new JTabbedPane();\n tabbedPane.addTab(\"Light\", lightPanel());\n tabbedPane.addTab(\"Background\", backgroundPanel());\n tabbedPane.addTab(\"Fog\", fogPanel());\n tabbedPane.addTab(\"Sound\", soundPanel());\n panel.add(\"Center\", tabbedPane);\n\n panel.add(\"South\", configPanel());\n return panel;\n }",
"public Chaos()\n {\n super( \"chaos\" );\n setSize(720,520); \n setVisible( true ); \n }"
]
| [
"0.70261836",
"0.6604933",
"0.653739",
"0.6530293",
"0.6518771",
"0.6430275",
"0.639984",
"0.638255",
"0.6364788",
"0.6357892",
"0.62096274",
"0.6176573",
"0.61755985",
"0.61601675",
"0.61557525",
"0.61515146",
"0.61420304",
"0.61378896",
"0.6113609",
"0.6098726",
"0.60980934",
"0.60980934",
"0.60880154",
"0.608659",
"0.6085232",
"0.60791916",
"0.6055473",
"0.6028748",
"0.60179585",
"0.6011451",
"0.6004749",
"0.600394",
"0.5995093",
"0.5986932",
"0.598333",
"0.59691477",
"0.5969067",
"0.5961248",
"0.59603375",
"0.59603244",
"0.59543014",
"0.5949104",
"0.59475756",
"0.59466267",
"0.59407556",
"0.5939935",
"0.59392756",
"0.5918663",
"0.59173167",
"0.5916807",
"0.5909937",
"0.59045976",
"0.58994144",
"0.58960885",
"0.5895938",
"0.58946776",
"0.5891807",
"0.5885288",
"0.58846825",
"0.58647186",
"0.58642936",
"0.58603793",
"0.58603287",
"0.58602893",
"0.58571875",
"0.58566636",
"0.5850926",
"0.58380854",
"0.5837945",
"0.58292955",
"0.5827333",
"0.58270997",
"0.5824597",
"0.58221513",
"0.5821524",
"0.5821246",
"0.58174217",
"0.5813868",
"0.58129597",
"0.58031875",
"0.5802201",
"0.58007985",
"0.5794366",
"0.57895166",
"0.5785422",
"0.5783653",
"0.5773484",
"0.5767477",
"0.57587296",
"0.5758359",
"0.5752217",
"0.5752013",
"0.57508516",
"0.5748653",
"0.57384026",
"0.57357544",
"0.5735595",
"0.57354325",
"0.5734951",
"0.57313025"
]
| 0.7125031 | 0 |
Constructs a framed pane with an additional label in the center of the pane. | public FramedPane( String message ) {
this();
Label label = new Label( message );
label.layoutXProperty().bind( this.widthProperty().divide( 2 ).subtract( label.widthProperty().divide( 2 ) ) );
label.layoutYProperty()
.bind( this.heightProperty().divide( 2 ).subtract( label.heightProperty().divide( 2 ) ) );
this.getChildren().addAll( label );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public FramedPane() {\n\t\tLoggingTool.print( \"Constructing new FramedPane.\" );\n\t\t// Draw Frame\n\t\tLine topLine = new Line( 1, 1, this.getWidth(), 1 );\n\t\tLine rightLine = new Line( this.getWidth(), 1, this.getWidth(), this.getHeight() );\n\t\tLine leftLine = new Line( 1, 1, 1, this.getHeight() );\n\t\tLine bottomLine = new Line( 1, this.getHeight(), this.getWidth(), this.getHeight() );\n\n\t\ttopLine.endXProperty().bind( this.widthProperty().subtract( 1 ) );\n\n\t\trightLine.startXProperty().bind( this.widthProperty().subtract( 1 ) );\n\t\trightLine.endXProperty().bind( rightLine.startXProperty() );\n\t\trightLine.endYProperty().bind( this.heightProperty().subtract( 1 ) );\n\n\t\tleftLine.endYProperty().bind( this.heightProperty().subtract( 1 ) );\n\n\t\tbottomLine.startYProperty().bind( this.heightProperty().subtract( 1 ) );\n\t\tbottomLine.endXProperty().bind( this.widthProperty().subtract( 1 ) );\n\t\tbottomLine.endYProperty().bind( bottomLine.startYProperty() );\n\n\t\tthis.getChildren().addAll( topLine, rightLine, leftLine, bottomLine );\n\t}",
"private void createCentralPanel() {\n JPanel panelCenter = new JPanel(new BorderLayout());\n JPanel panelSouth = new JPanel();\n \n JPanel panelLabel = new JPanel();\n JLabel jlBlackjack = new JLabel(\"BLACKJACK\");\n jlBlackjack.setFont(new Font(\"Serif\", Font.BOLD, 25));\n jlBlackjack.setForeground(new Color(0xffffdd));\n panelLabel.add(jlBlackjack);\n \n panelLabel.setBackground(new Color(0,153,0));\n panelSouth.setBackground(new Color(0,153,0));\n panelSouth.add(createStandButton());\n panelSouth.add(createScoreLabel());\n panelSouth.add(createBudgetLabel());\n panelSouth.add(createHitMeButton());\n panelCenter.add(panelLabel, BorderLayout.CENTER);\n \n panelCenter.add(panelSouth, BorderLayout.SOUTH);\n this.getContentPane().add(panelCenter);\n panelCenter.setBackground(new Color(0,153,0));\n }",
"private void createLabelsPane() {\n\t\tVBox labelsPane = new VBox();\n\t\tlabelsPane.setAlignment(Pos.CENTER);\n\t\tlabelsPane.setPrefSize(200,100);\n\t\tButton quit = new Button(\"Quit\");\n\t\tButton restart = new Button(\"Restart\");\n\t\tHBox buttons = new HBox();\n\t\tquit.setFocusTraversable(false);\n\t\trestart.setFocusTraversable(false);\n\t\tbuttons.getChildren().addAll(quit, restart);\n\t\tbuttons.setSpacing(15);\n\t\tbuttons.setAlignment(Pos.CENTER);\n\t\t//Here we set the spacing between the buttons and the border\n\t\tbuttons.setMargin(quit, new Insets(5,5,10,5));\n\t\tbuttons.setMargin(restart, new Insets(5,5,10,5));\n\t\tquit.setOnAction(new QuitHandler());\n\t\trestart.setOnAction(new RestartHandler());\n\t\tLabel instructions = new Label(\"Use arrows keys to move Pacman, P to pause, and U to unpause.\");\n\t\tinstructions.setFont(new Font(\"Arial Black\", 16));\n\t\t_instructions1 = new Label(\"Choose difficulty at beginning of game. Diffculty: \" + _difficultyLevel);\n\t\t_instructions1.setFont(new Font(\"Arial Black\", 16));\n\t\tlabelsPane.setSpacing(5);\n\t\tPaneOrganizer.this.createButtonsPane(labelsPane);\n\t\tlabelsPane.getChildren().addAll(instructions, _instructions1, buttons);\n\t\tlabelsPane.setMargin(quit, new Insets(5,5,10,5));\n\t\tlabelsPane.setStyle(\"-fx-background-color: gray;\");\n\t\t_root.setBottom(labelsPane);\n\t}",
"public TabPaneLike(TabSide side, TabLabelCreator tabLabelCreator){\n BorderPane bp = new BorderPane();\n\n this.tabLabelCreator = tabLabelCreator;\n\n getChildren().add(bp);\n\n bp.maxWidthProperty().bind(widthProperty());\n bp.minWidthProperty().bind(widthProperty());\n bp.prefWidthProperty().bind(widthProperty());\n\n bp.maxHeightProperty().bind(heightProperty());\n bp.minHeightProperty().bind(heightProperty());\n bp.prefHeightProperty().bind(heightProperty());\n\n\n tabContent = new StackPane();\n tabs = new LinkedList<>();\n\n switch(side){\n case TOP -> {\n nameTab = new HBox();\n tabLabelCreator.setHeights(nameTab);\n bp.setTop(nameTab);\n }\n case BOTTOM -> {\n nameTab = new HBox();\n tabLabelCreator.setHeights(nameTab);\n bp.setBottom(nameTab);\n }\n case RIGHT -> {\n nameTab = new VBox();\n tabLabelCreator.setWidths(nameTab);\n bp.setRight(nameTab);\n }\n case LEFT -> {\n nameTab = new VBox();\n tabLabelCreator.setWidths(nameTab);\n bp.setLeft(nameTab);\n }\n default -> nameTab = new VBox();\n\n }\n\n bp.setCenter(tabContent);\n\n nameTab.setStyle(\"-fx-background-color: lightgrey\");\n }",
"final void setup() {\n frame.add(label, BorderLayout.CENTER);\n }",
"public AWTBorderLayoutDemo () {\n setLayout(new BorderLayout(3, 3));\n // \"super\" Frame sets layout to BorderLayout,\n // horizontal and vertical gaps of 3 pixels\n\n // The components are added to the specified zone\n btnNorth = new Button(\"NORTH\");\n add(btnNorth, BorderLayout.NORTH);\n btnSouth = new Button(\"SOUTH\");\n add(btnSouth, BorderLayout.SOUTH);\n btnCenter = new Button(\"CENTER\");\n add(btnCenter, BorderLayout.CENTER);\n btnEast = new Button(\"EAST\");\n add(btnEast, BorderLayout.EAST);\n btnWest = new Button(\"WEST\");\n add(btnWest, BorderLayout.WEST);\n\n setTitle(\"BorderLayout Demo\"); // \"super\" Frame sets title\n setSize(280, 150); // \"super\" Frame sets initial size\n setVisible(true); // \"super\" Frame shows\n }",
"private void generateLabelPanel() {\n speedLabel = new JLabel(\"\");\n loopbackLabel = new JLabel(\"\");\n playingLabel = new JLabel(\"\");\n\n JPanel labelPanel = new JPanel();\n labelPanel.setLayout(new FlowLayout());\n labelPanel.add(playingLabel);\n labelPanel.add(Box.createHorizontalStrut(50));\n labelPanel.add(speedLabel);\n labelPanel.add(Box.createHorizontalStrut(50));\n labelPanel.add(loopbackLabel);\n mainPanel.add(labelPanel);\n }",
"private void createGUI() {\n ResizeGifPanel newContentPane = new ResizeGifPanel();\n newContentPane.setOpaque(true); \n setContentPane(newContentPane); \n }",
"private void constructTitlePanel() {\n titlePanel = new JPanel();\n titlePanel.setPreferredSize(relativeSize(0.8f, 0.03f));\n \n JLabel titleLabel = new JLabel(\"JMarkets Server Interface\");\n titleLabel.setFont(new Font(\"Arial\", Font.BOLD, 18));\n titleLabel.setForeground(new Color(102, 51, 0));\n \n titlePanel.add(titleLabel);\n }",
"private void customizeFrame(JFrame frame) {\r\n frame.setTitle(getTitle());\r\n frame.setResizable(false);\r\n frame.setPreferredSize(new Dimension(width + 15, height + 36));\r\n frame.setVisible(true);\r\n\r\n frame.setLayout(new BorderLayout());\r\n frame.add(panel, BorderLayout.CENTER);\r\n frame.setLocationRelativeTo(null);\r\n\r\n frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n frame.pack();\r\n }",
"public MainFrame(){\n super(\"Across Madrid\");\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n setBounds(100,100,700,500);\n\n contentPane = new JPanel(new CardLayout());\n setContentPane(contentPane);\n \n fillContentPane();\n }",
"public MyJLabel() {\n super(\" \");\n this.setOpaque(true);\n this.setPreferredSize(new Dimension(10,10));\n }",
"private void makeSouth() {\r\n final JPanel panel = new JPanel();\r\n panel.setLayout(new BorderLayout());\r\n // JPanel (grid layout?) border.south\r\n\r\n final JLabel imageLabel = new JLabel();\r\n imageLabel.addPropertyChangeListener(\"selected\", null);\r\n final int size = myFrame.getWidth() / 3; \r\n imageLabel.setPreferredSize(new Dimension(size, size));\r\n Icon icon = new ImageIcon();\r\n imageLabel.setIcon(icon);\r\n\r\n // JLabel (left 1/3rd of panel)\r\n final JTextArea infoText = new JTextArea();\r\n infoText.setPreferredSize(new Dimension(size * 2, size));\r\n\r\n // JTextArea (remainder of panel)\r\n panel.add(imageLabel, BorderLayout.WEST);\r\n panel.add(infoText, BorderLayout.EAST);\r\n myFrame.add(panel, BorderLayout.SOUTH);\r\n }",
"public MagicalGirlFrame(String title){\n\t\tsuper(title);\n\t\tpanel.setMinimumSize(new Dimension(900, 500));\n\t\tpane.add(panel, null, -1);\n\t\tpane.add(scrolltextbox, null, -1);\n\t\tthis.add(pane);\n\t\tBufferedImage img = null;\n\t\ttry {\n\t\t\timg = ImageIO.read(new File(\"C:\\\\Users\\\\Chrissy\\\\Google Drive ([email protected])\\\\Code\\\\Java\\\\MagicalRPG\\\\src\\\\RPGDemo\\\\01.png\"));\n\t\t}\n\t\tcatch (IOException i) {\n\t\t\tSystem.out.println(\"Image did not load.\");\n\t\t};\n\t\tpanel.add(new JLabel(new ImageIcon(img)));\n\t\tthis.setSize(900, 700);\n\t\t//DEBUGGING: setting up overlaylayout for layering sprites over background\n\t\t//img = SeraSpriteImg.seraAngry();\n\t\t//paneloverlay.addLayoutComponent(new JLabel(new ImageIcon(img)), null);\n\t\t\n\t\tthis.addWindowListener(new WindowAdapter(){\n public void windowClosing(WindowEvent e) {\n System.exit(0);\n }\n });\n\t}",
"private JPanel createNorthPanel() \r\n\t{\r\n\t\tJPanel panel = new JPanel();\r\n\t\t\r\n\t\tJLabel title = new JLabel(\"Reservations\", SwingConstants.CENTER);\r\n\t\ttitle.setFont(new Font(\"serif\", Font.PLAIN, 29));\r\n\t\tpanel.add(title);\r\n\t\t\r\n\t\treturn panel;\r\n\t}",
"public void centerFrame() {\n Toolkit toolkit = getToolkit();\n Dimension size = toolkit.getScreenSize();\n setLocation((size.width/2 - getWidth()/2),(size.height/2 - getHeight()/2));\n }",
"public EventPaneWithTitle(double middleValue, String title) \n\t{\n\t\tLabel label = new Label(title);\n\t\tlabel.setStyle(\"-fx-font-family: Segoe UI Semibold; -fx-font-size: 13px; -fx-text-fill: #6F6F6F;\");\n\t\t\n\t\tpositionLabel = middleValue - (label.getWidth()/2)-50;\n\t\t\n\t\tlabel.setLayoutX(positionLabel);\n\t\tgetChildren().add(label);\n\t}",
"public void setupCenter() {\r\n final JPanel centerPanel = new JPanel();\r\n centerPanel.setBackground(Color.BLACK);\r\n myGamePanel.setBackground(PANEL_COLOR);\r\n myGamePanel.setPreferredSize(\r\n new Dimension(myBoard.getWidth() * BLOCK_SIZE,\r\n myBoard.getHeight() * BLOCK_SIZE));\r\n centerPanel.add(myGamePanel);\r\n myFrame.add(centerPanel);\r\n }",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"Info Planet\");\n\t\tlblNewLabel.setBorder(new TitledBorder(null, \"\", TitledBorder.LEADING, TitledBorder.TOP, null, Color.CYAN));\n\t\tlblNewLabel.setFont(new Font(\"Tekton Pro\", Font.BOLD | Font.ITALIC, 20));\n\t\tframe.getContentPane().add(lblNewLabel, BorderLayout.NORTH);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tframe.getContentPane().add(panel, BorderLayout.CENTER);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Left\");\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlblNewLabel.setHorizontalAlignment(JLabel.LEFT);\n\t\t\t}\n\t\t});\n\t\tpanel.add(btnNewButton);\n\t\t\n\t\tJButton btnNewButton_2 = new JButton(\"Center\");\n\t\tbtnNewButton_2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlblNewLabel.setHorizontalAlignment(JLabel.CENTER);\n\t\t\t}\n\t\t});\n\t\tpanel.add(btnNewButton_2);\n\t\t\n\t\tJButton btnNewButton_1 = new JButton(\"Right\");\n\t\tbtnNewButton_1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlblNewLabel.setHorizontalAlignment(JLabel.RIGHT);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tpanel.add(btnNewButton_1);\n\t}",
"private void initPanels() {\r\n\t\r\n\tpanel = new JPanel();\r\n\tpanel.setBounds(0, 0, ScreenSize.WIDTH + 25, ScreenSize.HEIGHT + 50);\r\n\tpanel.setLayout(new BorderLayout());\r\n\tpanel.addComponentListener(this);\r\n\r\n\tbord = new BordPanel();\r\n\tbord.setBounds(0 ,0 ,ScreenSize.WIDTH, ScreenSize.HEIGHT);\r\n\tbord.setOpaque(true);\r\n\r\n\tlabel = new JLabel();\r\n\tlabel.setText(\"Text\");\r\n\r\n\tpanel.add(label, BorderLayout.SOUTH);\r\n\tpanel.add(bord, BorderLayout.CENTER);\r\n\t\r\n\tframe.add(panel);\r\n }",
"public LabelFigure() \r\n\t{\r\n\t\tthis(DEFAULT_CORNER_SIZE - 3);\r\n\t}",
"private JPanel makePanel(JFrame frame, String layout, String panelLabel,\r\n int x, int y, int width, int height) {\r\n //Create a panel\r\n JPanel panel = new JPanel();\r\n panel.setSize(width, height);\r\n frame.add(panel, layout);\r\n panel.setLayout(null);\r\n JLabel label = new JLabel(panelLabel);\r\n label.setBounds(x, y, width, height);\r\n label.setFont(new Font(\"Monaco\", Font.BOLD, 20));\r\n panel.add(label);\r\n return panel;\r\n }",
"public JPanel createCenterPanel() {\n\t\t// use a border layout\n\t\tcenter = new JPanel(new BorderLayout());\n\t\t\n\t\timage = drawCup(\"logo.png\");\n\t\t// Add 20Q image to east\n\t\tcenter.add(image, BorderLayout.CENTER);\n\n\t\t// Add menu to west\n\t\tcenter.add(createMenu(), BorderLayout.SOUTH);\n\n\t\tcenter.setOpaque(true);\n\t\tcenter.setBackground(new Color(#00aeef));\n\n\t\treturn center;\n\t}",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(Color.BLACK);\n\t\tframe.getContentPane().setLayout(null);\n\t\tframe.setExtendedState(JFrame.MAXIMIZED_BOTH);\n\t\t\n\t\tJLabel lblDesignCopyrights = new JLabel(\"design copyrights \\u00A9 chinmaya\");\n\t\tlblDesignCopyrights.setFont(new Font(\"Times New Roman\", Font.PLAIN, 14));\n\t\tlblDesignCopyrights.setForeground(new Color(255, 255, 224));\n\t\tlblDesignCopyrights.setBounds(1711, 1018, 183, 23);\n\t\tframe.getContentPane().add(lblDesignCopyrights);\n\t\t\n\t\tJPanel background = new JPanel();\n\t\tbackground.setLayout(null);\n\t\tbackground.setBackground(Color.DARK_GRAY);\n\t\tbackground.setBounds(14, 200, 1880, 809);\n\t\tframe.getContentPane().add(background);\n\t\t\n\t\t\n\t\tJLabel lblTypesOfMachine = new JLabel(\"MACHINE NAME\");\n\t\tlblTypesOfMachine.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tlblTypesOfMachine.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblTypesOfMachine.setForeground(Color.WHITE);\n\t\tlblTypesOfMachine.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tlblTypesOfMachine.setBounds(69, 378, 178, 30);\n\t\tbackground.add(lblTypesOfMachine);\n\t\t\n\t\t\n\t\tJLabel lblAppointment = new JLabel(\"LIST TO DO\");\n\t\tlblAppointment.setForeground(Color.WHITE);\n\t\tlblAppointment.setFont(new Font(\"Times New Roman\", Font.PLAIN, 30));\n\t\tlblAppointment.setBounds(69, 117, 319, 48);\n\t\tbackground.add(lblAppointment);\n\t\t\n\t\tJLabel lblQuantity = new JLabel(\"QUANTITY\");\n\t\tlblQuantity.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tlblQuantity.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblQuantity.setForeground(Color.WHITE);\n\t\tlblQuantity.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tlblQuantity.setBounds(69, 428, 178, 30);\n\t\tbackground.add(lblQuantity);\n\t\t\n\t\tPanel panel = new Panel();\n\t\tpanel.setLayout(null);\n\t\tpanel.setBackground(Color.BLACK);\n\t\tpanel.setBounds(0, 30, 1880, 67);\n\t\tbackground.add(panel);\n\t\t\n\t\tJButton cusbtn = new JButton(\"CUSTOMER\");\n\t\tcusbtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\t customer cr = new customer();\n\t\t cr.csStart();\n\t\t frame.dispose();\n\t\t\t}\n\t\t});\n\t\tcusbtn.setForeground(Color.WHITE);\n\t\tcusbtn.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tcusbtn.setBackground(Color.BLACK);\n\t\tcusbtn.setBounds(1257, 11, 613, 44);\n\t\tpanel.add(cusbtn);\n\t\t\n\t\tJButton bilbtn = new JButton(\"INVOICE\");\n\t\tbilbtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tadminInvoice inv= new adminInvoice();\n\t\t\t\tinv. adminInvoiceStart();\n\t\t\t\tframe.dispose();\n\n\t\t\t}\n\t\t});\n\t\tbilbtn.setForeground(Color.WHITE);\n\t\tbilbtn.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tbilbtn.setBackground(Color.BLACK);\n\t\tbilbtn.setBounds(633, 11, 613, 44);\n\t\tpanel.add(bilbtn);\n\t\t\n\t\tJButton prdbtn = new JButton(\"PRODUCTS\");\n\t\tprdbtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tadminproducts prd = new adminproducts();\n\t\t\t\tprd.adminPrd();\n\t\t\t\tframe.dispose();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tprdbtn.setForeground(Color.WHITE);\n\t\tprdbtn.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tprdbtn.setBackground(Color.BLACK);\n\t\tprdbtn.setBounds(10, 11, 613, 44);\n\t\tpanel.add(prdbtn);\n\t\t\n\t\tJLabel lblCustomerName = new JLabel(\"CUSTOMER NAME\");\n\t\tlblCustomerName.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblCustomerName.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tlblCustomerName.setForeground(Color.WHITE);\n\t\tlblCustomerName.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tlblCustomerName.setBounds(69, 278, 178, 30);\n\t\tbackground.add(lblCustomerName);\n\t\t\n\t\tJLabel lblMachineType = new JLabel(\"MACHINE TYPE\");\n\t\tlblMachineType.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblMachineType.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tlblMachineType.setForeground(Color.WHITE);\n\t\tlblMachineType.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tlblMachineType.setBounds(69, 328, 178, 30);\n\t\tbackground.add(lblMachineType);\n\t\t\n\t\t\n\t\tJButton btnStore = new JButton(\"STORE\");\n\t\tbtnStore.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tString dateEntry=date.getText();\n\t\t\t\tString cusname= customerName.getText();\t\n\t\t\t\tString machType=machineType.getText();\n\t\t\t\tString machName=machineName.getText();\n\t\t\t\tString quan=quantity.getText();\n\t\t\t\tString dl= deadline.getText();\n\t\t\t\tConnection con;\n\t\t\t\tPreparedStatement insert;\n\t\t\t\t\n\t\t\t\tif(dateEntry.isEmpty()||cusname.isEmpty()||machName.isEmpty()||machType.isEmpty()||quan.isEmpty()||dl.isEmpty()) \n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"no field must be left empty\",\"registration error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\t\n\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \" Appointment added!!\");\n\t\t\t\t}\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\t\t\tcon = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/machine_works\", \"root\", \"\");\n\t\t\t\t\tinsert = con.prepareStatement(\"insert into appointment (date,cusname,machType,machName,quan,deadline) values (?,?,?,?,?,?)\");\n\t\t insert.setString(1, dateEntry);\n\t\t insert.setString(2, cusname);\n\t\t insert.setString(3, machType);\n\t\t insert.setString(4, machName);\n\t\t insert.setString(5, quan);\n\t\t insert.setString(6, dl);\n\t\t insert.executeUpdate();\n\t\t\t\t}\n\t\t\t\tcatch(Exception E)\n\t\t\t\t{\n\t\t\t\t\tE.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnStore.setForeground(Color.WHITE);\n\t\tbtnStore.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tbtnStore.setBackground(Color.BLACK);\n\t\tbtnStore.setBounds(580, 578, 116, 44);\n\t\tbackground.add(btnStore);\n\t\t\n\t\tJScrollPane scrollPane = new JScrollPane();\n\t\tscrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);\n\t\tscrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\n\t\tscrollPane.setBounds(1000, 230, 613, 267);\n\t\tbackground.add(scrollPane);\n\t\t\n\t\tinvoice = new JTable();\n\t\tscrollPane.setViewportView(invoice);\n\t\t\n\t\tJLabel lblInvoice = new JLabel(\"VIEW TO-DO LIST\");\n\t\tlblInvoice.setForeground(Color.WHITE);\n\t\tlblInvoice.setFont(new Font(\"Times New Roman\", Font.PLAIN, 30));\n\t\tlblInvoice.setBounds(1010, 117, 387, 48);\n\t\tbackground.add(lblInvoice);\n\t\t\n\t\tquantity = new JTextField();\n\t\tquantity.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tquantity.setColumns(10);\n\t\tquantity.setBounds(279, 428, 289, 30);\n\t\tbackground.add(quantity);\n\t\t\n\t\tmachineName = new JTextField();\n\t\tmachineName.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tmachineName.setColumns(10);\n\t\tmachineName.setBounds(279, 328, 289, 30);\n\t\tbackground.add(machineName);\n\t\t\n\t\tmachineType = new JTextField();\n\t\tmachineType.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tmachineType.setColumns(10);\n\t\tmachineType.setBounds(279, 378, 289, 30);\n\t\tbackground.add(machineType);\n\t\t\n\t\tcustomerName = new JTextField();\n\t\tcustomerName.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tcustomerName.setColumns(10);\n\t\tcustomerName.setBounds(279, 278, 289, 30);\n\t\tbackground.add(customerName);\n\t\t\n\t\tJLabel deadlineLbl = new JLabel(\"DEADLINE\");\n\t\tdeadlineLbl.setVerticalAlignment(SwingConstants.TOP);\n\t\tdeadlineLbl.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tdeadlineLbl.setForeground(Color.WHITE);\n\t\tdeadlineLbl.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tdeadlineLbl.setBounds(69, 481, 178, 30);\n\t\tbackground.add(deadlineLbl);\n\t\t\n\t\tJLabel lblDate = new JLabel(\"DATE\");\n\t\tlblDate.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblDate.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tlblDate.setForeground(Color.WHITE);\n\t\tlblDate.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tlblDate.setBounds(69, 228, 178, 30);\n\t\tbackground.add(lblDate);\n\t\t\n\t\tdate = new JTextField();\n\t\tdate.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tdate.setColumns(10);\n\t\tdate.setBounds(279, 228, 289, 30);\n\t\tbackground.add(date);\n\t\t\n\t\tJButton btnView = new JButton(\"VIEW\");\n\t\tbtnView.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tConnection con = null;\n\t\t\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\t\t\tcon = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/machine_works\", \"root\", \"\");\n\t\t String query=\"select * from appointment \";\n\t\t\t\t\tPreparedStatement pst = con.prepareStatement(query);\n\t\t\t\t\tResultSet rs = pst.executeQuery();\n\t\t\t\t\t\n\t\t\t\t\tinvoice.setModel(DbUtils.resultSetToTableModel(rs));\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcatch(Exception E)\n\t\t\t\t{\n\t\t\t\t\tE.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnView.setForeground(Color.WHITE);\n\t\tbtnView.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tbtnView.setBackground(Color.BLACK);\n\t\tbtnView.setBounds(1584, 578, 116, 44);\n\t\tbackground.add(btnView);\n\t\t\n\t\tdeadline = new JTextField();\n\t\tdeadline.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tdeadline.setColumns(10);\n\t\tdeadline.setBounds(279, 481, 289, 30);\n\t\tbackground.add(deadline);\n\t\t\n\t\tJPanel header = new JPanel();\n\t\theader.setLayout(null);\n\t\theader.setBackground(Color.DARK_GRAY);\n\t\theader.setBounds(14, 23, 1880, 163);\n\t\tframe.getContentPane().add(header);\n\t\t\n\t\tJPanel mwtitle = new JPanel();\n\t\tmwtitle.setLayout(null);\n\t\tmwtitle.setForeground(Color.WHITE);\n\t\tmwtitle.setBackground(Color.BLACK);\n\t\tmwtitle.setBounds(209, 7, 649, 151);\n\t\theader.add(mwtitle);\n\t\t\n\t\tJLabel label = new JLabel(\"MACHINE WORKS\");\n\t\tlabel.setForeground(Color.WHITE);\n\t\tlabel.setFont(new Font(\"Times New Roman\", Font.PLAIN, 69));\n\t\tlabel.setBounds(20, 11, 605, 72);\n\t\tmwtitle.add(label);\n\t\t\n\t\tJLabel lblWhereAllThe = new JLabel(\"Where all the WORK is done by MACHINE\");\n\t\tlblWhereAllThe.setForeground(Color.ORANGE);\n\t\tlblWhereAllThe.setFont(new Font(\"Times New Roman\", Font.PLAIN, 30));\n\t\tlblWhereAllThe.setBounds(38, 94, 581, 48);\n\t\tmwtitle.add(lblWhereAllThe);\n\t\t\n\t\tJLabel logolbl = new JLabel(\"\");\n\t\tlogolbl.setIcon(new ImageIcon(\"C:\\\\Users\\\\CHINMAYA SH\\\\Pictures\\\\download.png\"));\n\t\tlogolbl.setBounds(58, 7, 151, 151);\n\t\theader.add(logolbl);\n\t\t\n\t\tJButton lgbtn = new JButton(\"LOGOUT\");\n\t\tlgbtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Logged out Successfull !!\");\n\t\t\t\tindex ind = new index();\n\t\t\t\tind.indexStart();\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t\tlgbtn.setForeground(Color.WHITE);\n\t\tlgbtn.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tlgbtn.setBackground(Color.BLACK);\n\t\tlgbtn.setBounds(1674, 60, 116, 44);\n\t\theader.add(lgbtn);\n\t\t\n\t\tJButton button_1 = new JButton(\"SIGN UP\");\n\t\tbutton_1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tsignup sg = new signup();\n\t\t\t\tsg.signupStart();\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t\tbutton_1.setForeground(Color.WHITE);\n\t\tbutton_1.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tbutton_1.setBackground(Color.BLACK);\n\t\tbutton_1.setBounds(1488, 60, 116, 44);\n\t\theader.add(button_1);\n\t\t\n\t\tJButton btnAppointment = new JButton(\"TO-DO\");\n\t\tbtnAppointment.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tappointments ap = new appointments();\n\t\t\t\tap.appointmentList();\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnAppointment.setForeground(Color.WHITE);\n\t\tbtnAppointment.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tbtnAppointment.setBackground(Color.BLACK);\n\t\tbtnAppointment.setBounds(1309, 60, 125, 44);\n\t\theader.add(btnAppointment);\n\t\tframe.setBackground(Color.BLACK);\n\t\tframe.setBounds(100, 100, 1920\t, 1080);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\n\t}",
"public ControlFrame addControlFrame(String theName, int theWidth, int theHeight) {\n Frame f = new Frame(theName);\n ControlFrame p = new ControlFrame(this, theWidth, theHeight);\n f.add(p);\n p.init();\n f.setTitle(theName);\n f.setSize(p.w, p.h);\n f.setLocation(50, 250);\n f.setResizable(false);\n f.setVisible(true);\n return p;\n}",
"public PreviewPanel() {\r\n\t\t\tsuper(new FlowLayout(FlowLayout.LEFT, 0, 0));\r\n\t\t\t\r\n\t\t\tJPanel p = new JPanel(new GridBagLayout());\t\t\t\r\n\t\t\tthis.add(p);\r\n\t\t\tp.setBorder(new EmptyBorder(10, 0, 0, 0));\r\n\t\t\tcolPanel.setPreferredSize(new Dimension(50, 10));\r\n\t\t\tcolPanel.setBorder(new EtchedBorder());\r\n\t\t\thexLabel.setBorder(new EmptyBorder(8, 0, 0, 0));\r\n\r\n\t\t\tGridBagConstraints gc = new GridBagConstraints();\r\n\t\t\tgc.insets = new Insets(0, 0, 0, 10);\r\n\t\t\tgc.fill = GridBagConstraints.BOTH;\r\n\t\t\tgc.anchor = GridBagConstraints.WEST;\r\n\t\t\tgc.gridx = 0;\r\n\t\t\tgc.gridy = 0;\r\n\r\n\t\t\tgc.gridheight = 2;\r\n\t\t\tp.add(colPanel, gc);\r\n\t\t\tgc.gridx++;\r\n\t\t\tgc.gridheight = 1;\r\n\t\t\tp.add(decLabel, gc);\r\n\t\t\tgc.gridx = 1;\r\n\t\t\tgc.gridy++;\r\n\t\t\tp.add(hexLabel, gc);\r\n\t\t\tgc.gridx++;\r\n\t\t}",
"private JPanel getLabelPanel() {\r\n\t\tif (labelPanel == null) {\r\n\t\t\ttry {\r\n\t\t\t\tFlowLayout flowLayout = new FlowLayout();\r\n\t\t\t\tflowLayout.setHgap(10);\r\n\t\t\t\tflowLayout.setVgap(10);\r\n\t\t\t\tlabelPanel = new JPanel();\r\n\t\t\t\tlabelPanel.setLayout(flowLayout);\r\n\t\t\t\tlabelPanel.add(msgLabel, null);\r\n\t\t\t} catch (java.lang.Throwable e) {\r\n\t\t\t\t// TODO: Something\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn labelPanel;\r\n\t}",
"private void createLayeredPane(){\n\t\tcontentPane = new JLayeredPane();\n\t\tcontentPane.setPreferredSize(windowSize);\n\t\tcontentPane.setOpaque(true);\n\t\tcontentPane.setVisible(true);\n\t}",
"private void displayPane(Node p){\n root.setCenter(p);\n //BorderPane.setAlignment(p,Pos.CENTER);\n }",
"private void initComponents() {\n\t\tlblTitle = new javax.swing.JLabel();\n\t\tlblTitle.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));\n\t\tjSeparator1 = new javax.swing.JSeparator();\n\n\t\tlblTitle.setFont(getTitleFont());\n\t\tlblTitle.setForeground(getTitleColor());\n\t\tlblTitle.setText(com.floreantpos.POSConstants.TITLE);\n\n\t\tsetLayout(new BorderLayout(5, 5));\n\t\tadd(lblTitle);\n\t\tadd(jSeparator1, BorderLayout.SOUTH);\n\n\t\tsetPreferredSize(PosUIManager.getSize(300, 60));\n\t}",
"private void createGUI(){\r\n\t frame = new JFrame(\"Login to Play\");\r\n\t frame.setSize(500,300);\r\n\t frame.setLayout(new GridLayout(3, 1));\r\n\t frame.setLocationRelativeTo(null);\r\n\t frame.addWindowListener(new WindowAdapter() {\r\n public void windowClosing(WindowEvent windowEvent){\r\n System.exit(0);\r\n } \r\n }); \r\n header = new JLabel(\"\", JLabel.CENTER); \r\n control = new JPanel();\r\n control.setLayout(new FlowLayout());\r\n\t frame.add(header);\r\n frame.add(control); \r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.setVisible(true); \r\n \r\n }",
"public Captacion() {\n initComponents();\n this.setLocationRelativeTo(null);\n ((JPanel)getContentPane()).setOpaque(false);\n ImageIcon imagen = new ImageIcon(this.getClass().getResource(\"/Img/fondo.jpg\"));\n JLabel label = new JLabel();\n label.setIcon(imagen);\n getLayeredPane().add(label, JLayeredPane.FRAME_CONTENT_LAYER);\n label.setBounds(0, 0, imagen.getIconWidth(), imagen.getIconHeight());\n setResizable(false);\n setSize(1400, 800);\n setLocationRelativeTo(null);\n \n \n }",
"public MainFrame(String title, String m, String k, boolean f) {\n\t\tsuper(title);\n\t\tL1 += m;\n\t\tL2 += k;\n\t\tnumofcomponents = f;\n\t\tCreateView();\n\t\t\n\t\tsetSize(670,560);\n\t\tsetResizable(false);\n\t\t//panel = new JPanel();\n\t\tsetLocationRelativeTo(null);\n\t\n \n\t}",
"private JPanel getTitlePanel() {\n JPanel main = ProgramPresets.createPanel();\n main.setLayout(new FlowLayout());\n JLabel tron1 = new JLabel(ProgramPresets.TRON);\n JLabel tron2 = new JLabel(ProgramPresets.TRON);\n mainTitle = ProgramPresets.createCenteredTitle(TITLE);\n subTitle = ProgramPresets.createCenteredTitle(SUB_TITLE);\n JPanel mainSub = ProgramPresets.createPanel();\n mainSub.setLayout(new GridLayout(2, 1));\n mainSub.add(mainTitle);\n mainSub.add(subTitle);\n main.add(tron1);\n main.add(Box.createRigidArea(new Dimension(50, 0)));\n main.add(mainSub);\n main.add(Box.createRigidArea(new Dimension(50, 0)));\n main.add(tron2);\n return main;\n }",
"private void createPanel() {\n JPanel panel = new JPanel();\n \n for(int i = 0; i < button.size(); i++){\n panel.add(button.get(i));\n }\n panel.add(label);\n \n add(panel);\n }",
"private HelloPanel() {\n\n\t\tHTML w = new HTML(BalasResources.INSTANCE.helloPane().getText());\n\t\tinitWidget(w);\n\t}",
"public void setupCenterPanel() {\n\t\tcenterPanel = new JPanel();\n\t\tcenterPanel.setLayout(new BoxLayout(centerPanel, BoxLayout.Y_AXIS));\n\t\tcenterPanel.add(tabs);\n\t\tcenterPanel.add(scroll);\n\t\tadd(centerPanel, BorderLayout.CENTER);\n\t}",
"private void centerWindow(JPanel panel)\n {\n Toolkit toolkit = Toolkit.getDefaultToolkit();\n Dimension scrnSize = toolkit.getScreenSize();\n Dimension labelSize = panel.getPreferredSize();\n int labelWidth = labelSize.width,\n labelHeight = labelSize.height;\n\n setLocation(scrnSize.width/2 - (labelWidth/2),\n scrnSize.height/2 - (labelHeight/2));\n }",
"@Override\r\n\tpublic JLabel createLabel() {\r\n\t\treturn new JLabel();\r\n\t}",
"public Welcome_frame() {\n initComponents();\n Dimension d=Toolkit.getDefaultToolkit().getScreenSize();\n this.setLocation((int)(d.width/2-this.getSize().getWidth()/2), (int)(d.height/2-this.getSize().height/2));\n }",
"public void initPanel()\n\t{\n\t\tthis.setVisible(false);\n\t\t//this.setLayout(new BorderLayout());\n \n\t\t//*Layout setup\n\t\t\n\t\tGroupLayout layout = new GroupLayout(this);\n\t\t//this.setLayout(layout);\n\n\t\tlayout.setAutoCreateGaps(true);\n\t\tlayout.setAutoCreateContainerGaps(true);\t\t\n\t\t\t\t\n\t\t//frame = new JFrame();\n offscreenImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);\n onscreenImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);\n offscreen = offscreenImage.createGraphics();\n onscreen = onscreenImage.createGraphics();\n setXscale();\n setXscale();\n offscreen.setColor(DEFAULT_CLEAR_COLOR);\n offscreen.fillRect(0, 0, width, height);\n setPenColor();\n setPenRadius();\n setFont();\n clear();\n\n // add antialiasing\n RenderingHints hints = new RenderingHints(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n hints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n offscreen.addRenderingHints(hints);\n\n \n // frame stuff\n ImageIcon icon = new ImageIcon(onscreenImage);\n drawLabel = new JLabel(icon);\n\n drawLabel.addMouseListener(this);\n drawLabel.addMouseMotionListener(this);\n \n //Create buttons\n resetButton = new JButton();\n undoButton = new JButton();\n \n undoButton.setVisible(true);\n undoButton.setEnabled(true);\n undoButton.setName(\"Undo\");\n undoButton.setText(\"Undo\");\n undoButton.setSize(75, 30);\n undoButton.setPreferredSize(new Dimension(75,30));\n \n resetButton.setVisible(true);\n resetButton.setEnabled(true);\n resetButton.setName(\"Reset\");\n resetButton.setText(\"Reset\");\n \tresetButton.setSize(75, 30);\n \tresetButton.setPreferredSize(new Dimension(75,30));\n \t\n //this.add(resetButton, BorderLayout.NORTH);\n //this.add(undoButton, BorderLayout.NORTH);\n \n // JPanel mainPanel = new JPanel(new BorderLayout());\n\n // JPanel northPanel = new JPanel();\n // northPanel.add(resetButton);\n // northPanel.add(undoButton);\n // mainPanel.add(northPanel, BorderLayout.NORTH);\n // mainPanel.add(drawLabel, BorderLayout.CENTER);\n \n\n // generalColorValue = getColorParameter(Skin.GENERAL_TEXT_COLOR); \n //controlColorValue = getColorParameter(Skin.CONTROL_BACKGROUND_COLOR); \n \n\t\t//trimColorValue = getColorParameter(Skin.TRIM_COLOR); \n\t \n\t\tinitComboBox();\n\t\t//this.setContentPane(drawLabel); <---------------------------\n this.add(drawLabel, BorderLayout.CENTER);\n \n this.addKeyListener(this); // JLabel cannot get keyboard focus\n this.setResizable(true);\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // closes all windows\n //this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); // closes only current window\n this.setTitle(name);\n // frame.setJMenuBar(createMenuBar());\n this.pack();\n this.requestFocusInWindow();\n this.setVisible(true);\n \n\t}",
"Frame createFrame();",
"public SnowmanPanel()\n {\n setPreferredSize(new Dimension(300,225));\n setBackground(Color.cyan);\n }",
"private static JFrame createFrame(){\n\t\t// Create the frame of the demonstration.\n\t\tJFrame demoFrame = new JFrame(\"Dock effect demonstration frame.\");\n\t\tdemoFrame.setSize(new Dimension(800, 600));\n\t\tdemoFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\t// Create the content pane of the frame.\n\t\tJPanel contentPane = new JPanel();\n\t\tdemoFrame.setContentPane(contentPane);\n\t\t\n\t\t// Create and add the docking area of the demonstration.\n\t\tDockEffectPanel<JPanel> dockEffectPanel = createDockEffectPanel();\n\t\tdockEffectPanel.setBorder(BorderFactory.createEtchedBorder()); // Put a border on the dock effect panel\n\t\t\n\t\t// Create the layout of the docking area.\n\t\tGroupLayout layout = new GroupLayout(contentPane);\n\t\tcontentPane.setLayout(layout);\n\t\tlayout.setHorizontalGroup(layout.createSequentialGroup()\n\t\t\t.addGap(0, 0, Short.MAX_VALUE)\n\t\t\t.addComponent(dockEffectPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t.addGap(0, 0, Short.MAX_VALUE)\n\t\t);\n\t\tlayout.setVerticalGroup(layout.createSequentialGroup()\n\t\t\t.addGap(0, 0, Short.MAX_VALUE)\n\t\t\t.addComponent(dockEffectPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t.addGap(0, 0, Short.MAX_VALUE)\n\t\t);\n\t\t\n\t\treturn demoFrame;\n\t}",
"private void setupFrame() {\n this.setTitle(TITRE);\n this.setPreferredSize(new Dimension(TAILLE_FRAME[1], TAILLE_FRAME[0]));\n this.setResizable(false);\n \n this.getContentPane().setBackground(new Color(0,153,0));\n this.getContentPane().setLayout(new GridLayout(3,1)); \n \n this.pack();\n Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n this.setLocation(dim.width/2-this.getSize().width/2, dim.height/2-this.getSize().height/2);\n \n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setVisible(true);\n }",
"public static void createAndShowGUI() {\n windowContent.add(\"Center\",p1);\n\n //Create the frame and set its content pane\n JFrame frame = new JFrame(\"GridBagLayoutCalculator\");\n frame.setContentPane(windowContent);\n\n // Set the size of the window to be big enough to accommodate all controls\n frame.pack();\n\n // Display the window\n frame.setVisible(true);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n }",
"private JPanel setCenterPanel() {\n mainDisplay = new JPanel();\n mainDisplay.setLayout(new BoxLayout(mainDisplay, Y_AXIS));\n\n //Label to display selected view\n selectedView = new JLabel();\n selectedView.setFont(new Font(\"SansSerif\", Font.PLAIN, 18));\n selectedView.setForeground(Color.GRAY);\n selectedView.setAlignmentX(Component.LEFT_ALIGNMENT);\n selectedView.setHorizontalTextPosition(SwingConstants.LEFT);\n\n //label to display either day view date ot month view month\n displayDate = new JLabel();\n displayDate.setFont(new Font(\"SansSerif\", Font.BOLD, 26));\n displayDate.setAlignmentX(Component.LEFT_ALIGNMENT);\n\n //label to disaply the day of week for day view\n displayDay = new JLabel();\n displayDay.setFont(new Font(\"SansSerif\", Font.PLAIN, 20));\n displayDay.setAlignmentX(Component.LEFT_ALIGNMENT);\n\n\n //adding them to the main panel\n mainDisplay.add(Box.createVerticalStrut(5));\n mainDisplay.add(selectedView);\n mainDisplay.add(Box.createVerticalStrut(9));\n mainDisplay.add(displayDate);\n mainDisplay.add(Box.createVerticalStrut(5));\n mainDisplay.add(displayDay);\n\n dayViewScrollPane = new JScrollPane(dayViewComponent);\n dayViewScrollPane.setPreferredSize(dayViewComponent.getMinimumSize());\n dayViewScrollPane.getVerticalScrollBar().setUnitIncrement(10);\n dayViewScrollPane.setBorder(null);\n\n mainDisplay.add(dayViewScrollPane);\n mainDisplay.setBackground(Color.WHITE);\n\n //setting default day view text in the labels\n updateDateDisplay();\n\n return mainDisplay;\n }",
"public void CreateTheFrame()\n {\n setSize(250, 300);\n setMaximumSize( new Dimension(250, 300) );\n setMinimumSize(new Dimension(250, 300));\n setResizable(false);\n\n pane = getContentPane();\n insets = pane.getInsets();\n\n // Apply the null layout\n pane.setLayout(null);\n }",
"private void initMainComponents() {\n\t\tsetBackground(Color.RED);\n\t\tsetTitle(\"TABL\");\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetBounds(100, 100, 974, 842);\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBackground(new Color(100, 149, 237));\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tsetContentPane(contentPane);\n\t\t\n\t\tcontentPane.setVisible(true);\n\t\tcontentPane.setLayout(null);\n\t\t\n\t\t\n\t\tlayeredPane = new JLayeredPane();\n\t\tlayeredPane.setBounds(10, 40, 941, 757);\n\t\tcontentPane.add(layeredPane);\n\t\t\n\t\tsetForeground(Color.BLACK);\n\t\tsetIconImage(Toolkit.getDefaultToolkit().getImage(AdminManageUsers.class.getResource(\"/resources/Logo.PNG\")));\n\n\t}",
"public JStatusbarFrame(String title) {\r\n super(title);\r\n Container cp = super.getContentPane();\r\n cp.setLayout(new BorderLayout());\r\n cp.add(pClient = new JPanel(), BorderLayout.CENTER);\r\n cp.add(lbStatusbar = new JLabel(), BorderLayout.SOUTH);\r\n }",
"private void initPane() {\n\t\tContainer localContainer = getContentPane();\n\t\tlocalContainer.setLayout(new BorderLayout());\n\t\t\n\t\tsplitpane_left_top.setBorder(BorderFactory.createTitledBorder(\"Training Data\"));\n\t\tsplitpane_left_bottom.setBorder(BorderFactory.createTitledBorder(\"Tree View\"));\n\t\tsplitpane_left.setDividerLocation(400);\n\t\tsplitpane_left.setLastDividerLocation(0);\n\t\tsplitpane_left.setOneTouchExpandable(true);\n\t\tsplitpane_right.setBorder(BorderFactory.createTitledBorder(\"Classifer Output\"));\n\t\tsplitpane_main.setDividerLocation(500);\n\t\tsplitpane_main.setLastDividerLocation(0);\n\t\tsplitpane_main.setOneTouchExpandable(true);\n\t\tlocalContainer.add(splitpane_main, \"Center\");\n\t\tlocalContainer.add(statusPanel,BorderLayout.SOUTH);\n\t}",
"public void setupBottomPanel() {\n\t\tURL url = getClass().getResource(\".coredata/background/BottomCenter.png\");\n\t\tchatSlot = new ImageIcon(Toolkit.getDefaultToolkit().getImage(url));\n\t\turl = getClass().getResource(\".coredata/background/LeftTeamBans.png\");\n\t\tblueBanSlot = new ImageIcon(Toolkit.getDefaultToolkit().getImage(url));\n\t\turl = getClass().getResource(\".coredata/background/RightTeamBans.png\");\n\t\tpurpleBanSlot = new ImageIcon(Toolkit.getDefaultToolkit().getImage(url));\n\t\tbottomPanel = new JLayeredPane();\n\t\tbottomPanel.setPreferredSize(new Dimension(1280, 243));\n\t\tJLabel blueBanLabel = new JLabel();\n\t\tJLabel chatLabel = new JLabel();\n\t\tJLabel purpleBanLabel = new JLabel();\n\t\tblueBanLabel.setIcon(blueBanSlot);\n\t\tchatLabel.setIcon(chatSlot);\n\t\tpurpleBanLabel.setIcon(purpleBanSlot);\n\t\tbottomPanel.add(blueBanLabel, new Integer(0));\n\t\tbottomPanel.add(chatLabel, new Integer(0));\n\t\tbottomPanel.add(purpleBanLabel, new Integer(0));\n\t\tquit = new JButton();\n\t\tquit.setName(\"quit\");\n\t\tquit.setOpaque(false);\n\t\tquit.addActionListener(this);\n\t\tquit.setBorderPainted(false);\n\t\tquit.setContentAreaFilled(false);\n\t\tquit.setBounds(27, 165, 240, 30);\n\t\tbottomPanel.add(quit, new Integer(1));\n\t\tcreateNoBanButton();\n\t\tadd(bottomPanel, BorderLayout.PAGE_END);\n\t\tblueBanLabel.setBounds(0, 0, 279, 243);\n\t\tchatLabel.setBounds(279, 0, 1004, 243);\n\t\tpurpleBanLabel.setBounds(1004, 0, 1280, 243);\n\t}",
"CartogramWizardTitlePanel (JFrame contentFrame)\n\t{\n\t\t\n\t\t// Setting panel parameters.\n\t\tthis.setSize(350, 45);\n\t\tthis.setLayout(null);\n\t\t\n\t\t\n\t\t// Create the title text.\n\t\tJLabel title = new JLabel(\"Cartogram creation wizard\");\n\t\ttitle.setFont(new Font(null, Font.BOLD, 13));\n\t\ttitle.setLocation(0, 0);\n\t\ttitle.setSize(400, 20);\n\t\tthis.add(title);\n\t\t\n\t\t\n\t\t// Create the sub-title text.\n\t\t/*JLabel subtitle = new JLabel(\n\t\t\t\"A leap into a different space.\"\n\t\t\t);\n\t\t\n\t\tsubtitle.setFont(new Font(null, Font.PLAIN, 11));\n\t\tsubtitle.setLocation(0, 22);\n\t\tsubtitle.setSize(400, 20);\n\t\tthis.add(subtitle);*/\n\t\t\n\t}",
"public Parent creatPanel() {\r\n\t\t\r\n\t\thlavniPanel = new BorderPane();\r\n\t\thlavniPanel.setCenter(creatGameDesk());\r\n\t\thlavniPanel.setTop(createMenuBar());\r\n\t\t\r\n\t\thlavniPanel.setBackground(new Background(new BackgroundFill(Color.BURLYWOOD, CornerRadii.EMPTY, Insets.EMPTY)));\r\n\t\thlavniPanel.setPadding(new Insets(8));\r\n\t\treturn hlavniPanel;\r\n\t}",
"private void centerRegion() {\r\n\t\tthis.addComponent(BorderLayout.CENTER, mp);\r\n\t}",
"public void setBorderPaneCenterMain(BorderPane bp){\n VBox userInfo = new VBox();\n bp.setCenter(userInfo);\n \n //style\n userInfo.getStyleClass().add(\"nodeBkg\");\n userInfo.setPadding(new Insets(40));\n \n // borderPane Settings\n bp.setAlignment(userInfo, Pos.CENTER);\n \n \n //Vbox settings\n userInfo.setAlignment(Pos.CENTER);\n \n // create labels\n Label savings = new Label(\"1: Savings Account\");\n Label netSavings = new Label(\"2: Net Savings Account\");\n Label cheque = new Label(\"3: Cheque Account\");\n Label fixed = new Label(\"4: Fixed Account\");\n \n \n // add labels to VBOX\n userInfo.getChildren().add(savings);\n userInfo.getChildren().add(netSavings);\n userInfo.getChildren().add(cheque);\n userInfo.getChildren().add(fixed);\n \n \n \n }",
"public JPanel titlePanel() {\n\t\tJPanel tpanel = new JPanel(null);\n\t\ttpanel.setBounds(0, 0, 700, 100);\n\t\ttpanel.setBackground(Color.PINK);\n\t\ttitle.setFont(new Font(\"SansSerif\", Font.BOLD, 50));\n\t\ttitle.setBounds(150, 0, 400, 100);\n\t\ttitle.setHorizontalAlignment(JLabel.CENTER);\n\t\ttpanel.add(title);\n\t\treturn tpanel;\n\t}",
"private void centerFrame() {\n Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();\n\n int x = (int) ((dimension.getWidth() - this.getWidth()) / 2);\n int y = (int) ((dimension.getHeight() - this.getHeight()) / 2);\n\n this.setLocation(x, y);\n }",
"private void initialize() {\r\n\t\tframe = new JFrame(\"Dashboard\");\r\n\t\tframe.getContentPane().setFont(new Font(\"Yu Gothic Medium\", Font.BOLD, 15));\r\n\t\tframe.getContentPane().setForeground(new Color(255, 255, 255));\r\n\t\tframe.getContentPane().setBackground(new Color(255, 255, 255));\r\n\t\tframe.setBackground(new Color(47, 79, 79));\r\n\t\tframe.setBounds(100, 100, 1126, 556);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tBorder blackline = BorderFactory.createLineBorder(Color.red);\r\n\t\t\r\n\t\tJLabel lbl_name = new JLabel(\"Name\");\r\n\t\tlbl_name.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlbl_name.setForeground(new Color(255, 255, 255));\r\n\t\tlbl_name.setFont(new Font(\"Tahoma\", Font.BOLD, 15));\r\n\t\tlbl_name.setBounds(625, 196, 127, 24);\r\n\t\tframe.getContentPane().add(lbl_name);\r\n\t\t\r\n\t\tJLabel lbl_photo = new JLabel(\"\");\r\n\t\tlbl_photo.setBackground(new Color(255, 255, 255));\r\n\t\tlbl_photo.setBounds(625, 28, 127, 148);\r\n\t\tlbl_photo.setBorder(blackline);\r\n\t\tframe.getContentPane().add(lbl_photo);\r\n\t\t\r\n\t\tJPanel menuPanel = new JPanel();\r\n\t\tmenuPanel.setBounds(0, 0, 278, 517);\r\n\t\tmenuPanel.setBackground(new Color(47, 79, 79));\r\n\t\tframe.getContentPane().add(menuPanel);\r\n\t\tmenuPanel.setLayout(null);\r\n\t\t\r\n\t\tJLabel menuLabel = new JLabel(\"My Dashboard\");\r\n\t\tmenuLabel.setBounds(0, 0, 278, 54);\r\n\t\tmenuLabel.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tmenuLabel.setForeground(new Color(255, 255, 255));\r\n\t\tmenuLabel.setFont(new Font(\"Bell MT\", Font.BOLD, 28));\r\n\t\tmenuLabel.setBackground(new Color(46, 139, 87));\r\n\t\tmenuLabel.setOpaque(true);\r\n\t\tmenuPanel.add(menuLabel);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setBackground(new Color(47, 79, 79));\r\n\t\tpanel.setForeground(new Color(255, 255, 255));\r\n\t\tpanel.setBounds(10, 80, 258, 45);\r\n\t\tmenuPanel.add(panel);\r\n\t\tpanel.setLayout(null);\r\n\t\t\r\n\t\tJLabel lbl_1 = new JLabel(\"\");\r\n\t\tlbl_1.setBounds(20, 5, 40, 35);\r\n\t\tlbl_1.setIcon(new ImageIcon(img_home));\r\n\t\tpanel.add(lbl_1);\r\n\t\t\r\n\t\tJButton btn_home = new JButton(\"Home\");\r\n\t\tbtn_home.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_home.setForeground((new Color(46, 139, 87)));\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseExited(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_home.setForeground(new Color(255, 255, 255));\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_home.setForeground(new Color(255, 255, 255));\r\n\t\tbtn_home.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) \r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Home is clicked\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_home.setFont(new Font(\"Tahoma\", Font.BOLD, 16));\r\n\t\tbtn_home.setHorizontalAlignment(SwingConstants.LEADING);\r\n\t\tbtn_home.setBounds(66, 5, 142, 35);\r\n\t\tbtn_home.setOpaque(false);\r\n\t\tbtn_home.setContentAreaFilled(false);\r\n\t\tbtn_home.setBorderPainted(false);\r\n\t\tbtn_home.setFocusPainted(false);\r\n\t\tpanel.add(btn_home);\r\n\t\t\r\n\t\tJPanel panel_1 = new JPanel();\r\n\t\tpanel_1.setBackground(new Color(47, 79, 79));\r\n\t\tpanel_1.setLayout(null);\r\n\t\tpanel_1.setBounds(10, 145, 258, 45);\r\n\t\tmenuPanel.add(panel_1);\r\n\t\t\r\n\t\tJLabel lbl_2 = new JLabel(\"\");\r\n\t\tlbl_2.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlbl_2.setBounds(20, 5, 40, 35);\r\n\t\tlbl_2.setIcon(new ImageIcon(img_leave));\r\n\t\tpanel_1.add(lbl_2);\r\n\t\t\r\n\t\tJButton btn_leave = new JButton(\"Apply Leave\");\r\n\t\tbtn_leave.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_leave.setForeground((new Color(46, 139, 87)));\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseExited(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_leave.setForeground((new Color(255, 255, 255)));\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_leave.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) \r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Leave is clicked\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_leave.setForeground(new Color(255, 255, 255));\r\n\t\tbtn_leave.setHorizontalAlignment(SwingConstants.LEADING);\r\n\t\tbtn_leave.setFont(new Font(\"Tahoma\", Font.BOLD, 16));\r\n\t\tbtn_leave.setFocusPainted(false);\r\n\t\tbtn_leave.setContentAreaFilled(false);\r\n\t\tbtn_leave.setBorderPainted(false);\r\n\t\tbtn_leave.setBounds(70, 5, 142, 35);\r\n\t\tpanel_1.add(btn_leave);\r\n\t\t\r\n\t\tJPanel panel_1_1 = new JPanel();\r\n\t\tpanel_1_1.setBackground(new Color(47, 79, 79));\r\n\t\tpanel_1_1.setLayout(null);\r\n\t\tpanel_1_1.setBounds(10, 210, 258, 45);\r\n\t\tmenuPanel.add(panel_1_1);\r\n\t\t\r\n\t\tJLabel lbl_3 = new JLabel(\"\");\r\n\t\tlbl_3.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlbl_3.setBounds(20, 5, 40, 35);\r\n\t\tlbl_3.setIcon(new ImageIcon(img_marks));\r\n\t\tpanel_1_1.add(lbl_3);\r\n\t\t\r\n\t\tJButton btn_marks = new JButton(\"Marks\");\r\n\t\tbtn_marks.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_marks.setForeground((new Color(46, 139, 87)));\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseExited(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_marks.setForeground((new Color(255, 255, 255)));\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_marks.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) \r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Marks is clicked\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_marks.setForeground(new Color(255, 255, 255));\r\n\t\tbtn_marks.setOpaque(false);\r\n\t\tbtn_marks.setHorizontalAlignment(SwingConstants.LEADING);\r\n\t\tbtn_marks.setFont(new Font(\"Tahoma\", Font.BOLD, 16));\r\n\t\tbtn_marks.setFocusPainted(false);\r\n\t\tbtn_marks.setContentAreaFilled(false);\r\n\t\tbtn_marks.setBorderPainted(false);\r\n\t\tbtn_marks.setBounds(70, 5, 142, 35);\r\n\t\tpanel_1_1.add(btn_marks);\r\n\t\t\r\n\t\tJPanel panel_1_1_1 = new JPanel();\r\n\t\tpanel_1_1_1.setBackground(new Color(47, 79, 79));\r\n\t\tpanel_1_1_1.setLayout(null);\r\n\t\tpanel_1_1_1.setBounds(10, 275, 258, 45);\r\n\t\tmenuPanel.add(panel_1_1_1);\r\n\t\t\r\n\t\tJLabel lbl_4 = new JLabel(\"\");\r\n\t\tlbl_4.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlbl_4.setBounds(20, 5, 40, 35);\r\n\t\tlbl_4.setIcon(new ImageIcon(img_attendance));\r\n\t\tpanel_1_1_1.add(lbl_4);\r\n\t\t\r\n\t\tJButton btn_attendance = new JButton(\"Atendance\");\r\n\t\tbtn_attendance.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_attendance.setForeground((new Color(46, 139, 87)));\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseExited(MouseEvent e) \r\n\t\t\t{\r\n\t\t\t\tbtn_attendance.setForeground((new Color(255, 255, 255)));\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_attendance.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) \r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Attendance is clicked\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_attendance.setForeground(new Color(255, 255, 255));\r\n\t\tbtn_attendance.setOpaque(false);\r\n\t\tbtn_attendance.setHorizontalAlignment(SwingConstants.LEADING);\r\n\t\tbtn_attendance.setFont(new Font(\"Tahoma\", Font.BOLD, 16));\r\n\t\tbtn_attendance.setFocusPainted(false);\r\n\t\tbtn_attendance.setContentAreaFilled(false);\r\n\t\tbtn_attendance.setBorderPainted(false);\r\n\t\tbtn_attendance.setBounds(70, 5, 142, 35);\r\n\t\tpanel_1_1_1.add(btn_attendance);\r\n\t\t\r\n\t\tJLabel lbl_back = new JLabel(\"\");\r\n\t\tlbl_back.setBounds(278, 0, 832, 255);\r\n\t\tlbl_back.setIcon(new ImageIcon(img_background));\r\n\t\tframe.getContentPane().add(lbl_back);\r\n\t\t\r\n\t\tJLabel lbl_logo = new JLabel(\"\");\r\n\t\tlbl_logo.setBounds(308, 255, 278, 100);\r\n\t\tlbl_logo.setIcon(new ImageIcon(img_logo));\r\n\t\tframe.getContentPane().add(lbl_logo);\r\n\t\t\r\n\t\tJLabel lbl_welcome = new JLabel(\"WELCOME\");\r\n\t\tlbl_welcome.setForeground(new Color(47, 79, 79));\r\n\t\tlbl_welcome.setFont(new Font(\"Times New Roman\", Font.BOLD, 25));\r\n\t\tlbl_welcome.setBounds(308, 366, 239, 38);\r\n\t\tframe.getContentPane().add(lbl_welcome);\r\n\t\t\r\n\t\tJLabel lbl_name1 = new JLabel(\"Name\");\r\n\t\tlbl_name1.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tlbl_name1.setBounds(308, 415, 134, 24);\r\n\t\tframe.getContentPane().add(lbl_name1);\r\n\t\t\r\n\t\tJLabel lbl_id = new JLabel(\"ID : \");\r\n\t\tlbl_id.setForeground(new Color(47, 79, 79));\r\n\t\tlbl_id.setFont(new Font(\"Times New Roman\", Font.BOLD, 20));\r\n\t\tlbl_id.setBounds(308, 452, 90, 24);\r\n\t\tframe.getContentPane().add(lbl_id);\r\n\t\t\r\n\t\tJLabel lbl_id1 = new JLabel(\"Identification number\");\r\n\t\tlbl_id1.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tlbl_id1.setBounds(308, 482, 144, 24);\r\n\t\tframe.getContentPane().add(lbl_id1);\r\n\t\t\r\n\t\t\r\n\t}",
"private void initComponents() {\n\t\tstage = new Stage();\n\t\tHBox root = new HBox();\n\t\troot.setPadding(new Insets(10));\n\t\troot.setAlignment(Pos.CENTER);\n\t\tlabel = new Label(\" \");\n\t\tlabel.setPrefWidth(144);\n\t\tlabel.setFont(new Font(\"Arial\", 80.0));\n\t\tlabel.setAlignment(Pos.CENTER);\n\t\troot.getChildren().add(label);\n\t\tScene scene = new Scene(root);\n\t\tstage.setScene(scene);\n\t\tstage.setTitle(\"Count Guest\");\n\t\tstage.sizeToScene();\n\t}",
"private void setContentPane(JLabel jLabel) {\n\t\t\n\t}",
"private void addTitle() {\n\t\tJXPanel titlePanel = new JXPanel();\n\t\ttitlePanel.setLayout(null);\n\t\ttitlePanel.setSize(180, 60);\n\t\ttitlePanel.setLocation(60, 10);\n\t\ttitlePanel.setToolTipText(\"www.i.hsr.ch\");\n\t\ttitlePanel.setBorder(new DropShadowBorder(new Color(0, 0, 0), 7, 0.5f, 12, true, true, true, true));\n\t\t\n\t\tJLabel title = GUIComponents.createLabel(YAETMMainView.PROGRAM, new Point(45, 12));\n\t\ttitle.setFont(new Font(\"Tahoma\", Font.BOLD, 25));\n\t\t\n\t\tJLabel titleExtend = GUIComponents.createLabel(YAETMMainView.PROGRAMEXT, new Point(10, 33));\n\t\ttitleExtend.setSize(200, 20);\n\t\ttitleExtend.setFont(new Font(\"Arial\", Font.PLAIN, 11));\n\t\t\n\t\ttitlePanel.add(titleExtend);\n\t\ttitlePanel.add(title);\n\t\tpanel.add(titlePanel);\n\t}",
"private static void createAndShowGUI() {\r\n JFrame.setDefaultLookAndFeelDecorated(true);\r\n\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.setLayout(new BorderLayout());\r\n\r\n JPanel parametersPanel = new JPanel();\r\n parametersPanel.setPreferredSize(new Dimension(preferredWidth, 50));\r\n \r\n addComponentsToPane(parametersPanel);\r\n \r\n frame.add(parametersPanel, BorderLayout.PAGE_START);\r\n \r\n schedulePanel.add(monLabel);\r\n schedulePanel.add(tueLabel);\r\n schedulePanel.add(wedLabel);\r\n schedulePanel.add(thuLabel);\r\n schedulePanel.add(friLabel);\r\n schedulePanel.setPreferredSize(new Dimension(preferredWidth, 500));\r\n JScrollPane scrollPane = new JScrollPane();\r\n scrollPane.setViewportView(schedulePanel);\r\n JPanel bigPanel = new JPanel(); \r\n bigPanel.setLayout(new BorderLayout());\r\n bigPanel.setPreferredSize(schedulePanel.getPreferredSize());\r\n bigPanel.add(scrollPane, BorderLayout.CENTER);\r\n frame.add(bigPanel, BorderLayout.CENTER);\r\n\r\n frame.setJMenuBar(createMenu());\r\n \r\n frame.pack();\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n \r\n frame.setVisible(true);\r\n frame.setResizable(false);\r\n }",
"private JPanel buildNorthPanel() {\n\t\t\n\t\tGridBagLayout layout;\n\t\tGridBagConstraints constraints;\n\t\tJPanel panel;\n\t\tint row, col;\n\t\t\n\t\tlayout = new GridBagLayout();\n\t\tconstraints = new GridBagConstraints();\n\t\tpanel = new JPanel(layout);\n\t\trow = 0;\n\t\tcol = 0;\n\t\tJLabel headerLabel = new JLabel(stringFactory.getString(\n\t\t\t\tLabelStringFactory.SAVEASCONFIG_FRAME_SAVE_NEW_CONFIGURATION));\n\t\theaderLabel.setFont(new Font(\"arial\", Font.PLAIN, 18));\n\t\tGUIUtils.add(panel, headerLabel, layout, constraints, row++, col, \n\t\t\t1, 1, 1, 1, GridBagConstraints.NORTHEAST, GridBagConstraints.BOTH,\n\t\t\tGUIUtils.MED_LARGE_INSETS);\n\t\treturn panel;\n\t}",
"@Override\n public void show() {\n Label title = new Label(\"Hall of Fame\", new Label.LabelStyle(fonts.getInstance().getClouds(), Color.WHITE));\n title.setPosition(MENU_WIDTH / 2 - title.getWidth() / 2, MENU_HEIGHT / 1.9f + 3*title.getHeight());\n stage.addActor(title);\n }",
"private JPanel initCenterPanel() {\r\n JPanel centerPanel = new JPanel(new GridLayout(0, 2, gapSize, gapSize));\r\n\r\n centerPanel.add(chcBoxBowDepartment);\r\n centerPanel.add(new JLabel(\"gebühren: 5\"));\r\n centerPanel.add(chcBoxAtmosphericDepartment);\r\n centerPanel.add(new JLabel(\"gebühren: 10\"));\r\n centerPanel.add(chcBoxFirearmDepartment);\r\n centerPanel.add(new JLabel(\"gebühren: 15\"));\r\n\r\n centerPanel.add(lDiscounts);\r\n TitledBorder border = new TitledBorder(\"Abteilungen\");\r\n centerPanel.setBorder(border);\r\n\r\n return centerPanel;\r\n }",
"@Override\r\n\tpublic void start(Stage primaryStage) throws Exception {\n\t\tprimaryStage.setTitle(\"Border Layout\");\r\n\t\tBorderPane borderpane = new BorderPane();\r\n\t\tScene scene =new Scene(borderpane, 300, 200);\r\n\t\tprimaryStage.setScene(scene);\r\n\t\tLabel labelNorth=new Label();\r\n\t\tlabelNorth.setText(\"Border North\");\r\n\t\tborderpane.setTop(labelNorth);\r\n\t\tLabel labelcenter=new Label();\r\n\t\tlabelcenter.setText(\"Border Center\");\r\n\t\tborderpane.setCenter(labelcenter);\r\n\t\tLabel labelbot=new Label();\r\n\t\tlabelbot.setText(\"Border Bottom\");\r\n\t\tborderpane.setBottom(labelbot);\r\n\t\tLabel labelwest=new Label();\r\n\t\tlabelwest.setText(\"Border WEst\");\r\n\t\tborderpane.setLeft(labelwest);\r\n\t\tprimaryStage.show();\r\n\t\tLabel labeleast=new Label();\r\n\t\tlabeleast.setText(\"Border east\");\r\n\t\tborderpane.setRight(labeleast);\r\n\t}",
"private void makeLabels() {\n infoPanel = new JPanel();\n\n infoText = new JTextArea(30,25);\n\n infoPanel.add(infoText);\n }",
"public MyGUIProgram() {\n Label MyLabel = new Label(\"Test string.\", Label.CENTER);\n this.add(MyLabel);\n\n }",
"public void launchFrame() { \n \n subTotalFrame.setSize(200,350); \n \n // Arranging GUI components in Panel onto Frame \n subTotalDetailPanel.add(subTotalCashierLabel); \n subTotalDetailPanel.add(subTotalDateLabel); \n subTotalTitlePanel.add(subTotalTitleLabel, BorderLayout.WEST); \n subTotalTitlePanel.add(subTotalDetailPanel, BorderLayout.EAST); \n subTotalNorthPanel.add(subTotalStoreLabel, BorderLayout.NORTH); \n subTotalSouthPanel.add(subTotalGuideLabel, BorderLayout.SOUTH); \n subTotalCenterPanel.add(subTotalTitlePanel, BorderLayout.NORTH); \n subTotalCenterPanel.add(subTotalOrderedPanel, BorderLayout.CENTER); \n subTotalFrame.getContentPane().add(subTotalNorthPanel, BorderLayout.NORTH); \n subTotalFrame.getContentPane().add(subTotalCenterPanel, BorderLayout.CENTER); \n subTotalFrame.getContentPane().add(subTotalSouthPanel, BorderLayout.SOUTH); \n \n subTotalFrame.pack(); \n \n // Centering the screen on the desktop \n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); \n Dimension frameSize = subTotalFrame.getSize(); \n subTotalFrame.setLocation(((screenSize.width - frameSize.width) / 2), \n ((screenSize.height - frameSize.height) / 2)); \n \n subTotalFrame.addKeyListener(this); \n \n subTotalFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); \n subTotalFrame.setVisible(true); \n }",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setForeground(new Color(0, 0, 0));\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBackground(new Color(255, 0, 0));\n\t\tpanel.setBorder(new BevelBorder(BevelBorder.RAISED, Color.DARK_GRAY, Color.WHITE, null, null));\n\t\tpanel.setBounds(10, 24, 27, 31);\n\t\tframe.getContentPane().add(panel);\n\t\t\n\t\tJLabel A1 = new JLabel(\"A1\");\n\t\tpanel.add(A1);\n\t\t\n\t\tJPanel panel_1 = new JPanel();\n\t\tpanel_1.setBorder(new BevelBorder(BevelBorder.RAISED, Color.DARK_GRAY, Color.WHITE, null, null));\n\t\tpanel_1.setBounds(59, 24, 27, 31);\n\t\tframe.getContentPane().add(panel_1);\n\t\t\n\t\tJLabel A1_1 = new JLabel(\"A2\");\n\t\tpanel_1.add(A1_1);\n\t\t\n\t\tJPanel panel_2 = new JPanel();\n\t\tpanel_2.setBackground(new Color(0, 255, 255));\n\t\tpanel_2.setBorder(new BevelBorder(BevelBorder.RAISED, Color.DARK_GRAY, Color.WHITE, null, null));\n\t\tpanel_2.setBounds(110, 24, 27, 31);\n\t\tframe.getContentPane().add(panel_2);\n\t\t\n\t\tJLabel A1_2 = new JLabel(\"A3\");\n\t\tpanel_2.add(A1_2);\n\t\t\n\t\tJPanel panel_3 = new JPanel();\n\t\tpanel_3.setBorder(new BevelBorder(BevelBorder.RAISED, Color.DARK_GRAY, Color.WHITE, null, null));\n\t\tpanel_3.setBounds(10, 72, 27, 31);\n\t\tframe.getContentPane().add(panel_3);\n\t\t\n\t\tJLabel A1_3 = new JLabel(\"B1\");\n\t\tpanel_3.add(A1_3);\n\t\t\n\t\tJPanel panel_4 = new JPanel();\n\t\tpanel_4.setBorder(new BevelBorder(BevelBorder.RAISED, Color.DARK_GRAY, Color.WHITE, null, null));\n\t\tpanel_4.setBounds(59, 72, 27, 31);\n\t\tframe.getContentPane().add(panel_4);\n\t\t\n\t\tJLabel A1_4 = new JLabel(\"B2\");\n\t\tpanel_4.add(A1_4);\n\t\t\n\t\tJPanel panel_5 = new JPanel();\n\t\tpanel_5.setBorder(new BevelBorder(BevelBorder.RAISED, Color.DARK_GRAY, Color.WHITE, null, null));\n\t\tpanel_5.setBounds(110, 72, 27, 31);\n\t\tframe.getContentPane().add(panel_5);\n\t\t\n\t\tJLabel A1_5 = new JLabel(\"B3\");\n\t\tpanel_5.add(A1_5);\n\t\t\n\t\tJPanel panel_6 = new JPanel();\n\t\tpanel_6.setBorder(new BevelBorder(BevelBorder.RAISED, Color.DARK_GRAY, Color.WHITE, null, null));\n\t\tpanel_6.setBounds(10, 125, 27, 31);\n\t\tframe.getContentPane().add(panel_6);\n\t\t\n\t\tJLabel A1_6 = new JLabel(\"C1\");\n\t\tpanel_6.add(A1_6);\n\t\t\n\t\tJPanel panel_7 = new JPanel();\n\t\tpanel_7.setBorder(new BevelBorder(BevelBorder.RAISED, Color.DARK_GRAY, Color.WHITE, null, null));\n\t\tpanel_7.setBounds(59, 125, 27, 31);\n\t\tframe.getContentPane().add(panel_7);\n\t\t\n\t\tJLabel A1_7 = new JLabel(\"C2\");\n\t\tpanel_7.add(A1_7);\n\t\t\n\t\tJPanel panel_8 = new JPanel();\n\t\tpanel_8.setBorder(new BevelBorder(BevelBorder.RAISED, Color.DARK_GRAY, Color.WHITE, null, null));\n\t\tpanel_8.setBounds(110, 125, 27, 31);\n\t\tframe.getContentPane().add(panel_8);\n\t\t\n\t\tJLabel A1_8 = new JLabel(\"C3\");\n\t\tpanel_8.add(A1_8);\n\t\t\n\t\tJPanel panel_9 = new JPanel();\n\t\tpanel_9.setBounds(10, 226, 127, 24);\n\t\tframe.getContentPane().add(panel_9);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"Layar Bioskop\");\n\t\tlblNewLabel.setForeground(UIManager.getColor(\"CheckBox.foreground\"));\n\t\tpanel_9.add(lblNewLabel);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Pesan Tiket\");\n\t\tbtnNewButton.setBackground(UIManager.getColor(\"Button.disabledForeground\"));\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(295, 227, 89, 23);\n\t\tframe.getContentPane().add(btnNewButton);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"Konfirmasi Pemesanan\");\n\t\tlblNewLabel_1.setFont(new Font(\"Tahoma\", Font.BOLD, 17));\n\t\tlblNewLabel_1.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblNewLabel_1.setBounds(217, 5, 196, 31);\n\t\tframe.getContentPane().add(lblNewLabel_1);\n\t\t\n\t\tJLabel lblNewLabel_2 = new JLabel(\"Harga: Rp 50.000\");\n\t\tlblNewLabel_2.setBounds(217, 114, 89, 14);\n\t\tframe.getContentPane().add(lblNewLabel_2);\n\t\t\n\t\tJPanel panel_10 = new JPanel();\n\t\tpanel_10.setBorder(new EtchedBorder(EtchedBorder.LOWERED, UIManager.getColor(\"Button.focus\"), null));\n\t\tpanel_10.setBounds(0, 0, 196, 261);\n\t\tframe.getContentPane().add(panel_10);\n\t\t\n\t\tJLabel lblNewLabel_2_1 = new JLabel(\"Biaya adm: Rp 1.500 \");\n\t\tlblNewLabel_2_1.setBounds(217, 139, 127, 14);\n\t\tframe.getContentPane().add(lblNewLabel_2_1);\n\t\t\n\t\tJLabel lblNewLabel_2_2 = new JLabel(\"Bioskop: Transmart Buah Batu\");\n\t\tlblNewLabel_2_2.setBounds(216, 90, 152, 14);\n\t\tframe.getContentPane().add(lblNewLabel_2_2);\n\t\t\n\t\tJLabel lblNewLabel_2_3 = new JLabel(\"Tiket: 1 tiket\");\n\t\tlblNewLabel_2_3.setBounds(216, 66, 89, 14);\n\t\tframe.getContentPane().add(lblNewLabel_2_3);\n\t\t\n\t\tJLabel lblNewLabel_2_4 = new JLabel(\"Kursi: A3\");\n\t\tlblNewLabel_2_4.setBounds(216, 47, 89, 14);\n\t\tframe.getContentPane().add(lblNewLabel_2_4);\n\t}",
"private void setLayout (){\r\n /* define placeholders for content*/\r\n HBox mainFrame= new HBox(); //the Main frame component.\r\n root.getChildren().add(mainFrame); //add it to the scene\r\n \r\n \r\n \r\n mainFrame.getChildren().addAll(leftPane,rightPane);\r\n \r\n Rectangle leftR= new Rectangle(600.0, 900.0);\r\n leftR.setFill(Color.WHITE);\r\n Rectangle rightR= new Rectangle(300.0, 900.0);\r\n rightR.setFill(Color.RED);\r\n rightPane.getChildren().add(rightR);\r\n leftPane.getChildren().add(leftR);\r\n \r\n \r\n }",
"public void createUI() {\r\n\t\ttry {\r\n\t\t\tJPanel centerPanel = this.createCenterPane();\r\n\t\t\tJPanel westPanel = this.createWestPanel();\r\n\t\t\tm_XONContentPane.add(westPanel, BorderLayout.WEST);\r\n\t\t\tm_XONContentPane.add(centerPanel, BorderLayout.CENTER);\r\n\t\t\tm_XONContentPane.revalidate();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tRGPTLogger.logToFile(\"Exception at createUI \", ex);\r\n\t\t}\r\n\t}",
"@Override\n public void start(Stage stage) throws Exception {\n BorderPane panel = new BorderPane(new CustomPane(\"Center\"), new CustomPane(\"Top\"), new CustomPane(\"Right\"), new CustomPane(\"Botton\"), new CustomPane(\"Left\"));\n\n //lb4.setBackground(new Background(new BackgroundFill(Color.RED, CornerRadii.EMPTY, Insets.EMPTY)));\n /*BorderPane.setAlignment(lb1, Pos.CENTER);\n BorderPane.setAlignment(lb3, Pos.CENTER);\n BorderPane.setAlignment(lb4, Pos.CENTER);\n BorderPane.setAlignment(lb2, Pos.CENTER);*/\n Scene escena = new Scene(panel, 400, 250);\n stage.setTitle(\"Demo BorderPane\");\n stage.setScene(escena);\n stage.show();\n }",
"public HomeFrame() {\n super();\n\n this.setSize(400, 80);\n Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n this.setLocation(dim.width/2-this.getSize().width/2, dim.height/2-this.getSize().height/2);\n this.setTitle(\"Reed-Muller code sending simulator\");\n JPanel panel = new JPanel();\n\n JButton sendVector = new JButton();\n sendVector.setText(\"Vector\");\n sendVector.addActionListener(e -> new VectorFrame());\n\n JButton sendText = new JButton();\n sendText.setText(\"Text\");\n sendText.addActionListener(e -> new TextFrame());\n\n panel.add(sendVector);\n panel.add(sendText);\n\n panel.setVisible(true);\n this.add(panel);\n this.setVisible(true);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lblText = new javax.swing.JLabel();\n\n setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n setLayout(new java.awt.BorderLayout());\n\n lblText.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n lblText.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblText.setText(\"content\");\n lblText.setOpaque(true);\n add(lblText, java.awt.BorderLayout.CENTER);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lblText = new javax.swing.JLabel();\n\n setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n setLayout(new java.awt.BorderLayout());\n\n lblText.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n lblText.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblText.setText(\"content\");\n lblText.setOpaque(true);\n add(lblText, java.awt.BorderLayout.CENTER);\n }",
"public HangingFlowPane() {\n super();\n }",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(0, 0, 1000, 700);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tframeContent = new JPanel();\n\t\tframe.getContentPane().add(frameContent);\n\t\tframeContent.setBounds(10, 10, 700, 640);\n\t\tframeContent.setLayout(null);\n\t\t\n\t\tinfoPane = new JPanel();\n\t\tframe.getContentPane().add(infoPane);\n\t\tinfoPane.setBounds(710, 10, 300, 640);\n\t\tinfoPane.setLayout(null);\n\t}",
"public void initializePanelToFrame() {\n\t\tnew ColorResources();\n\t\tnew TextResources().changeLanguage();\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(null);\n\t\tpanel.setPreferredSize(new Dimension(375, 812));\n\n\t\tconfigureLabels();\n\t\tconfigureButtons();\n\t\taddListeners();\n\t\taddComponentsToPanel();\n\n\t\tthis.setContentPane(panel);\n\t\tthis.pack();\n\t}",
"protected void configureCenter(LayoutOptions parent){\n LayoutOptions childOptions = new LayoutOptions(); \n parent.setChildOptions(childOptions); \n \n // options for center-north pane \n //LayoutOptions north = new LayoutOptions();\n //childOptions.setNorthOptions(north); \n \n createOptions(childOptions, CardinalPoint.CENTER);\n \n // options for center-south pane \n LayoutOptions south = createOptions(childOptions, CardinalPoint.SOUTH);\n setAttribute(south, \"size\", \"34\");\n fixed(south);\n \n //childOptions.setSouthOptions(south);\n \n \n\t}",
"public frame() {\r\n\t\tadd(createMainPanel());\r\n\t\tsetTitle(\"Lunch Date\");\r\n\t\tsetSize(FRAME_WIDTH, FRAME_HEIGHT);\r\n\r\n\t}",
"private Component buildMainPanel() {\r\n \tDPanel mainPanel = new DPanel();\r\n \tJLabel backGroundLabel = new JLabel(ImageUtil.getImageIcon(\"happycow.jpg\"));\r\n \tmainPanel.add(backGroundLabel);\r\n \tsetCurrentContentPane(mainPanel);\r\n \thome = mainPanel;\r\n return home;\r\n }",
"private JPanel getTitlePanel(String title)\n {\n JLabel label = new JLabel(title);\n label.setBorder(new EmptyBorder(0, 0, 0, 10));\n label.setFont(UIManager.getFont(\"TitledBorder.font\"));\n label.setForeground(UIManager\n .getColor(\"TitledBorder.titleColor\"));\n\n JPanel pnlSectionName = new TransparentPanel();\n pnlSectionName.setLayout(new GridBagLayout());\n GridBagConstraints c = new GridBagConstraints();\n c.gridx = c.gridy = 0;\n c.anchor = GridBagConstraints.LINE_START;\n c.gridwidth = 2;\n pnlSectionName.add(label, c);\n c.gridx = 2;\n c.weightx = 1;\n c.fill = GridBagConstraints.HORIZONTAL;\n pnlSectionName.add(new JSeparator(), c);\n\n JPanel pnlSection = new TransparentPanel()\n {\n @Override\n public Component add(Component comp)\n {\n if(comp instanceof JComponent)\n ((JComponent)comp).setAlignmentX(LEFT_ALIGNMENT);\n return super.add(comp);\n }\n };\n pnlSection.setLayout(new BoxLayout(pnlSection, BoxLayout.Y_AXIS));\n pnlSection.add(pnlSectionName);\n\n return pnlSection;\n }",
"private void centerFrame() {\n Dimension dim = Utils.getScreenSize();\n /* Calculate the new position, according frame size itself\n and set it to window location */\n MainFrame.setLocation((dim.width - X_SIZE) / 2, (dim.height - Y_SIZE) / 2);\n\n }",
"private JLabel createSection5() {\r\n\t\r\n\t\tJLabel section5 = new JLabel(\"How To Chat\");\r\n\t\t//section1.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\t//section1.setVerticalAlignment(SwingConstants.TOP);\r\n\t\tsection5.setFont(new Font(\"DejaVu Sans\", Font.PLAIN, 15));\r\n\t\tsection5.setForeground(Color.WHITE);\r\n\r\n\t\t// open subsections when clicked\r\n\t\tsection5.addMouseListener(new ClickListener());\r\n\r\n\t\treturn section5;\r\n\t\r\n}",
"private void montarLayeredPane() {\n\t\tlayeredPane = new JLayeredPane();\r\n\t\tgetContentPane().add(layeredPane, BorderLayout.NORTH);\r\n\t\tlayeredPane.setPreferredSize(new Dimension(this.getWidth(), this.getHeight()));\r\n\r\n\t\tlayeredPane.setOpaque(true);\r\n\t\tlayeredPane.setBackground(Color.WHITE.darker());\r\n\t}",
"private Pane createFilePane(File file) {\n\t\tint lineCtr = 0;\n\t\tint maxLineLength = 0;\n\t\ttry {\n\t\t\tScanner scanner = new Scanner(file);\n\t\t\twhile (scanner.hasNextLine()) {\n\t\t\t\tString line = scanner.nextLine();\n\t\t\t\tmaxLineLength = Math.max(maxLineLength, line.length());\n\t\t\t\tlineCtr++;\n\t\t\t}\n\t\t\tscanner.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tdouble paneHeight = 0;;\n\t\tdouble paneWidth = 0;;\n if (Arrays.stream(dimensionDisplayFilenameFilter).anyMatch(file.getName().toLowerCase()::equals)\n \t\t|| dimensionDisplayExtensionFilter == null \n \t\t|| dimensionDisplayExtensionFilter.length == 0 \n \t\t|| Arrays.stream(dimensionDisplayExtensionFilter).anyMatch(FilenameUtils.getExtension(file.getName().toLowerCase())::equals)\n \t\t) {\n \t// extension is in dimensionDisplayExtensionFilter\n \t\tpaneHeight = lineCtr;\n \t\tpaneWidth = maxLineLength; \t\n } else {\n \t// extension is not in dimensionDisplayExtensionFilter\n \t\tpaneHeight = 12;\n \t\tpaneWidth = 50; \n }\n\t\t\n\t\tPane newPane = new Pane();\n\t\tnewPane.setPrefSize(paneWidth, paneHeight);\n\t\tnewPane.setMaxSize(paneWidth, paneHeight);\n\t\tnewPane.setStyle(\"-fx-background-color: rgba(\" + randomizer.nextInt(255) + \", \" + randomizer.nextInt(255)\n\t\t+ \", \" + randomizer.nextInt(255) + \", 0.5); -fx-background-radius: 10;\");\n\n\t\t// add label\n\n\t\t// Label newLabel = new Label(file.getName() + \"\\n\" + (int)paneHeight + \"x\" + (int)paneWidth);\n\t\tLabel newLabel = new Label(file.getName() + \" \" + (int)paneHeight + \"x\" + (int)paneWidth);\n\t\tnewLabel.setTextAlignment(TextAlignment.RIGHT);\n\t\tnewLabel.setFont(new Font(8.0f));\n\t\tnewLabel.setVisible(showFilenames);\n\n\t\t// centering label in pane:\n\t\t// https://stackoverflow.com/questions/36854031/how-to-center-a-label-on-a-pane-in-javafx\n\t\t//newLabel.layoutXProperty().bind(newPane.widthProperty().subtract(newLabel.widthProperty()).divide(2));\n\t\tnewLabel.layoutYProperty().bind(newPane.heightProperty().subtract(newLabel.heightProperty()).divide(2));\n\n\t\tnewPane.getChildren().add(newLabel);\n\n\n\t\t\n\t\tbindTooltip(newPane, tooltip);\n\t\tbindTooltip(newLabel, tooltip);\n\n\n\n\n\t\treturn newPane;\n\t}",
"private void createpanel1() {\r\n\t\theader = new JLabel();\r\n\t\theader.setText(\"Type in Userinformation\");\r\n\t\theader.setFont(customFont.deriveFont(25f));\r\n\t\theader.setForeground(Color.WHITE);\r\n\r\n\t\tpanels[0].add(header);\r\n\t\tpanels[0].setOpaque(false);\r\n\t\tallComponents.add(panels[0]);\r\n\r\n\t}",
"public void initialize() {\n this.setPreferredSize(new com.ulcjava.base.application.util.Dimension(548, 372));\n this.add(getTitlePane(), new com.ulcjava.base.application.GridBagConstraints(0, 0, 3, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getXpertIvyPane(), new com.ulcjava.base.application.GridBagConstraints(0, 1, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getLicensePane(), new com.ulcjava.base.application.GridBagConstraints(0, 2, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getDatabasePane(), new com.ulcjava.base.application.GridBagConstraints(0, 3, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getJavaPane(), new com.ulcjava.base.application.GridBagConstraints(0, 4, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n }",
"public JfrmAdviserSignUp() {\n initComponents();\n setLocationRelativeTo(null);\n setResizable(false);\n setTitle(\"MARKETING DIGITAL\");\n setIconImage(new ImageIcon(getClass().getResource(\"/imagenes/icono.png\")).getImage());\n ((JPanel)getContentPane()).setOpaque(false);\n ImageIcon uno=new ImageIcon(this.getClass().getResource(\"/imagenes/fondo3.jpg\"));\n JLabel fondo= new JLabel();\n fondo.setIcon(uno);\n getLayeredPane().add(fondo,JLayeredPane.FRAME_CONTENT_LAYER);\n fondo.setBounds(0,0,uno.getIconWidth(),uno.getIconHeight());\n }",
"private void setFrame()\r\n\t{\r\n\t\tthis.setName(\"Project 3\");\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\tthis.setSize(300, 300);\r\n\t\tthis.setLocation(650, 100);\r\n\t\tthis.setVisible(false);\r\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tthis.add(panel, BorderLayout.CENTER);\r\n\t}",
"private void initialize()\n\t{\n\t\t_frame = new JFrame();\n\t\t_frame.setTitle(\"Super Awesome Fighter GUI\");\n\t\t_frame.setBounds(100, 100, 624, 461);\n\t\t_frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t_frame.getContentPane().setBounds(100, 100, 100, 100);\n\t\t_frame.getContentPane().setLayout(new BorderLayout(0, 0));\n\t\t_frame.setMinimumSize(new Dimension(400, 200));\n\t\t\n\t\tJPanel bottom = new JPanel();\n\t\t_frame.getContentPane().add(bottom, BorderLayout.SOUTH);\n\t\t\n\t\tDimension minimumSize = new Dimension(100, 50);\n\t\t\n\t\tJPanel top = new JPanel();\n\t\t_frame.getContentPane().add(top, BorderLayout.NORTH);\n\n\t\tJTree tree = new JTree();\n\t\ttree.setModel(new DefaultTreeModel(\n\t\t\tnew DefaultMutableTreeNode(\"SAF 0.0.1\") {\n\t\t\t\t{\n\t\t\t\t\tadd(new DefaultMutableTreeNode(\"D. Blommesteijn\"));\n\t\t\t\t\tadd(new DefaultMutableTreeNode(\"UvA id: 10276726\"));\n\t\t\t\t}\n\t\t\t}\n\t\t));\n\t\ttree.setBackground(new Color(250,250,250));\n\t\ttree.setRootVisible(false);\n\t\ttree.setShowsRootHandles(true);\n\t\ttree.setAlignmentX(Component.LEFT_ALIGNMENT);\n\t\ttree.setAlignmentY(Component.TOP_ALIGNMENT);\n\t\ttree.setMinimumSize(minimumSize);\n\t\ttree.repaint();\n\t\t\n\t\tJScrollPane scrollPane = new JScrollPane(tree);\n\t\tscrollPane.setBorder(null);\n\t\tscrollPane.setMinimumSize(minimumSize);\n\t\tscrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n\t\t\n\t\tJPanel contentScrollPane = new JPanel();\n\t\tcontentScrollPane.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));\n\t\tcontentScrollPane.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\n\t\tcontentScrollPane.setBackground(Color.WHITE);\n\t\tcontentScrollPane.setMinimumSize(minimumSize);\n\t\tcontentScrollPane.setLayout(new BorderLayout(0, 0));\n\t\t\t\t\n\t\t\n\t\t_outputPaneLeft = new JTextPane();\n\t\t_outputPaneLeft.setFont(new Font(\"Courier\", Font.PLAIN, 13));\n\t\t_outputPaneLeft.setText(\"center\");\n\t\t_outputPaneLeft.setEditable(false);\n\t\tcontentScrollPane.add(_outputPaneLeft, BorderLayout.WEST);\n\t\t\n\t\t\n\t\tJSplitPane center = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, scrollPane, contentScrollPane);\n\t\t\n\t\t_score = new JTextField();\n\t\t_score.setFont(new Font(\"Courier\", Font.PLAIN, 13));\n\t\tcontentScrollPane.add(_score, BorderLayout.NORTH);\n\t\t_score.setColumns(10);\n\t\t\n\t\t_action = new JTextField();\n\t\t_action.setFont(new Font(\"Courier\", Font.PLAIN, 10));\n\t\t_action.setColumns(10);\n\t\tcontentScrollPane.add(_action, BorderLayout.SOUTH);\n\t\t\n\t\t_outputPaneRight = new JTextPane();\n\t\t_outputPaneRight.setText(\"center\");\n\t\t_outputPaneRight.setFont(new Font(\"Courier\", Font.PLAIN, 13));\n\t\t_outputPaneRight.setEditable(false);\n\t\tcontentScrollPane.add(_outputPaneRight, BorderLayout.EAST);\n\t\tcenter.setBackground(new Color(250,250,250));\n\t\tcenter.setForeground(Color.LIGHT_GRAY);\n\t\tcenter.setContinuousLayout(true);\n\t\tcenter.setDividerLocation(200);\n\t\tcenter.scrollRectToVisible(new Rectangle(10,10));\n\t\t\n\t\t\n\t\t_frame.getContentPane().add(center, BorderLayout.CENTER);\n\t\t\n\t\t\n\t\t\n\t}",
"private void initComponents() {\n\n bgPosition = new javax.swing.ButtonGroup();\n okButton = new javax.swing.JButton();\n cancelButton = new javax.swing.JButton();\n pnl9Positions = new javax.swing.JPanel();\n rbTR = new javax.swing.JRadioButton();\n rbTC = new javax.swing.JRadioButton();\n rbTL = new javax.swing.JRadioButton();\n rbCL = new javax.swing.JRadioButton();\n rbCC = new javax.swing.JRadioButton();\n rbCR = new javax.swing.JRadioButton();\n rbBL = new javax.swing.JRadioButton();\n rbBC = new javax.swing.JRadioButton();\n rbBR = new javax.swing.JRadioButton();\n pnlOffset = new javax.swing.JPanel();\n lblOffset = new javax.swing.JLabel();\n sldrOffset = new javax.swing.JSlider();\n\n setTitle(\"Label Position\");\n setMinimumSize(null);\n setResizable(false);\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent evt) {\n closeDialog(evt);\n }\n });\n\n okButton.setText(\"OK\");\n okButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n okButtonActionPerformed(evt);\n }\n });\n\n cancelButton.setText(\"Cancel\");\n cancelButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cancelButtonActionPerformed(evt);\n }\n });\n\n pnl9Positions.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));\n pnl9Positions.setMaximumSize(new java.awt.Dimension(258, 204));\n pnl9Positions.setMinimumSize(new java.awt.Dimension(258, 204));\n\n bgPosition.add(rbTR);\n rbTR.setText(\"TR\");\n rbTR.setBorder(null);\n rbTR.setContentAreaFilled(false);\n\n bgPosition.add(rbTC);\n rbTC.setText(\"TC\");\n rbTC.setBorder(null);\n rbTC.setContentAreaFilled(false);\n\n bgPosition.add(rbTL);\n rbTL.setText(\"TL\");\n rbTL.setBorder(null);\n rbTL.setContentAreaFilled(false);\n\n bgPosition.add(rbCL);\n rbCL.setText(\"CL\");\n rbCL.setBorder(null);\n rbCL.setContentAreaFilled(false);\n\n bgPosition.add(rbCC);\n rbCC.setText(\"CC\");\n rbCC.setBorder(null);\n rbCC.setContentAreaFilled(false);\n\n bgPosition.add(rbCR);\n rbCR.setText(\"CR\");\n rbCR.setBorder(null);\n rbCR.setContentAreaFilled(false);\n\n bgPosition.add(rbBL);\n rbBL.setText(\"BL\");\n rbBL.setBorder(null);\n rbBL.setContentAreaFilled(false);\n\n bgPosition.add(rbBC);\n rbBC.setText(\"BC\");\n rbBC.setBorder(null);\n rbBC.setContentAreaFilled(false);\n\n bgPosition.add(rbBR);\n rbBR.setText(\"BR\");\n rbBR.setBorder(null);\n rbBR.setContentAreaFilled(false);\n\n javax.swing.GroupLayout pnl9PositionsLayout = new javax.swing.GroupLayout(pnl9Positions);\n pnl9Positions.setLayout(pnl9PositionsLayout);\n pnl9PositionsLayout.setHorizontalGroup(\n pnl9PositionsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnl9PositionsLayout.createSequentialGroup()\n .addContainerGap(53, Short.MAX_VALUE)\n .addGroup(pnl9PositionsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(rbTL)\n .addComponent(rbCL)\n .addComponent(rbBL))\n .addGap(18, 18, 18)\n .addGroup(pnl9PositionsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)\n .addComponent(rbTC)\n .addComponent(rbCC)\n .addComponent(rbBC))\n .addGap(18, 18, 18)\n .addGroup(pnl9PositionsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(rbTR, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(rbCR, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(rbBR, javax.swing.GroupLayout.Alignment.TRAILING))\n .addGap(50, 50, 50))\n );\n pnl9PositionsLayout.setVerticalGroup(\n pnl9PositionsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(pnl9PositionsLayout.createSequentialGroup()\n .addGap(30, 30, 30)\n .addGroup(pnl9PositionsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)\n .addComponent(rbTL)\n .addComponent(rbTC)\n .addComponent(rbTR))\n .addGap(29, 29, 29)\n .addGroup(pnl9PositionsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)\n .addComponent(rbCL)\n .addComponent(rbCC)\n .addComponent(rbCR))\n .addGap(33, 33, 33)\n .addGroup(pnl9PositionsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)\n .addComponent(rbBL)\n .addComponent(rbBC)\n .addComponent(rbBR))\n .addContainerGap(39, Short.MAX_VALUE))\n );\n\n pnlOffset.setMaximumSize(new java.awt.Dimension(278, 68));\n pnlOffset.setMinimumSize(new java.awt.Dimension(278, 68));\n\n lblOffset.setText(\"Offset (10)\");\n\n sldrOffset.setMajorTickSpacing(2);\n sldrOffset.setMaximum(10);\n sldrOffset.setMinorTickSpacing(1);\n sldrOffset.setPaintLabels(true);\n sldrOffset.setPaintTicks(true);\n sldrOffset.setSnapToTicks(true);\n sldrOffset.setValue(0);\n sldrOffset.setMaximumSize(new java.awt.Dimension(200, 45));\n sldrOffset.setMinimumSize(new java.awt.Dimension(200, 45));\n sldrOffset.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n sldrOffsetStateChanged(evt);\n }\n });\n\n javax.swing.GroupLayout pnlOffsetLayout = new javax.swing.GroupLayout(pnlOffset);\n pnlOffset.setLayout(pnlOffsetLayout);\n pnlOffsetLayout.setHorizontalGroup(\n pnlOffsetLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlOffsetLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(lblOffset)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(sldrOffset, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n pnlOffsetLayout.setVerticalGroup(\n pnlOffsetLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(pnlOffsetLayout.createSequentialGroup()\n .addGap(12, 12, 12)\n .addGroup(pnlOffsetLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)\n .addComponent(lblOffset)\n .addComponent(sldrOffset, 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\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)\n .addComponent(pnl9Positions, javax.swing.GroupLayout.PREFERRED_SIZE, 234, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(pnlOffset, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(okButton)\n .addGap(134, 134, 134)\n .addComponent(cancelButton)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {cancelButton, okButton});\n\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(pnl9Positions, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(pnlOffset, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(okButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cancelButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n\n pack();\n }",
"private void setupComponents() {\n\t\tframe.setLayout(null);\r\n\r\n\t\t\r\n\t\t\r\n\t\t// Add label for title ..\r\n\t\tJLabel titleField = new JLabel();\r\n\t\ttitleField.setBounds(50, 10, 300, 30);// x, y, width, height - (pixels)\r\n\t\ttitleField.setText(\"Simple Swing Application\");\r\n\t\ttitleField.setFont(new Font(\"Arial\", Font.BOLD, 24));\r\n\t\ttitleField.setForeground(Color.red);\r\n\t\ttitleField.setVisible(true);\r\n\t\tframe.add(titleField);\r\n\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// Add label for output message ..\r\n\t\tJLabel textField = new JLabel();\r\n\t\ttextField.setBounds(50, 200, 300, 30);\r\n\t\ttextField.setVisible(true);\r\n\t\tframe.add(textField);\r\n\r\n\t\t// Add a YES button ..\r\n\t\tJButton yesButton = new JButton(\"Yes\");\r\n\t\tyesButton.setBounds(50, 150, 90, 30);\r\n\t\tyesButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// When clicked, set lower label text ..\r\n\t\t\t\ttextField.setText(((JButton) e.getSource()).getText() + \" button was clicked.\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tframe.add(yesButton);\r\n\r\n\t\t// Add a NO button ..\r\n\t\tJButton noButton = new JButton(\"No\");\r\n\t\tnoButton.setBounds(150, 150, 90, 30);\r\n\t\tnoButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// When clicked, set lower label text ..\r\n\t\t\t\ttextField.setText(((JButton) e.getSource()).getText() + \" button was clicked.\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tframe.add(noButton);\r\n\t\t\r\n\t\t\r\n\r\n\t}",
"public void initPanel(){\r\n\t \r\n\t\t//Titre\r\n\t\tlabel.setFont(new Font(\"Verdana\",1,40));\r\n\t label.setForeground(Color.black);\r\n\t label.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label.setBounds(110,0,575,50);\r\n\t\tthis.panel.setLayout(null);\t \r\n\t this.panel.add(label);\r\n\t \r\n\t //dc\r\n\t this.panel.add(label1, BorderLayout.CENTER);\r\n\t label1.setFont(new Font(\"Verdana\",1,40));\r\n\t label1.setForeground(Color.black);\r\n\t label1.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label1.setBounds(150,500,100,50);\r\n\t //ab\r\n\t this.panel.add(label2);\r\n\t label2.setFont(new Font(\"Verdana\",1,40));\r\n\t label2.setForeground(Color.black);\r\n\t label2.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label2.setBounds(550,500,100,50);\r\n\t //Button dc\r\n\t\tdc.setBounds(50,200,300,250);\r\n\t\tthis.panel.add(dc);\r\n\t\tdc.addActionListener(this);\r\n\t\t//Button ab\r\n\t\tab.setBounds(450,200,300,250);\r\n\t\tthis.panel.add(ab);\r\n\t\tab.addActionListener(this);\r\n\t\t\r\n\t\tthis.panel.add(label3);\r\n\t label3.setFont(new Font(\"Verdana\",1,20));\r\n\t label3.setForeground(Color.black);\r\n\t label3.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label3.setBounds(90,575,220,30);\r\n\t \r\n\t this.panel.add(label4);\r\n\t label4.setFont(new Font(\"Verdana\",1,20));\r\n\t label4.setForeground(Color.black);\r\n\t label4.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label4.setBounds(490,575,220,30);\r\n\t}",
"public HFGUI() {\n initComponents();\n HF = new HELPFit();\n // This two line will display the window on the center of the screen\n Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n this.setLocation(dim.width/2-this.getSize().width/2, dim.height/2-this.getSize().height/2);\n }",
"public Container createContentPane()\r\n\t{\r\n\t\t//add items to lvl choice\r\n\t\tfor(int g=1; g<21; g++)\r\n\t\t{\r\n\t\t\tcharLvlChoice.addItem(String.valueOf(g));\r\n\t\t}\r\n\r\n\t\t//add stuff to panels\r\n\t\tinputsPanel.setLayout(new GridLayout(2,2,3,3));\r\n\t\tdisplayPanel.setLayout(new GridLayout(1,1,8,8));\r\n\t\tinputsPanel.add(runButton);\r\n\t\tinputsPanel.add(clearButton);\r\n\t\t\ttimesPanel.add(timesLabel);\r\n\t\t\ttimesPanel.add(runTimesField);\r\n\t\tinputsPanel.add(timesPanel);\r\n\t\t\tlevelPanel.add(levelLabel);\r\n\t\t\tlevelPanel.add(charLvlChoice);\r\n\t\tinputsPanel.add(levelPanel);\r\n\t\t\trunTimesField.setText(\"1\");\r\n\t\tdisplay.setEditable(false);\r\n\r\n\t\trunButton.addActionListener(this);\r\n\t\tclearButton.addActionListener(this);\r\n\r\n\t\tdisplay.setBackground(Color.black);\r\n\t\tdisplay.setForeground(Color.white);\r\n\r\n\t\tsetTabsAndStyles(display);\r\n\t\tdisplay = addTextToTextPane();\r\n\t\t\tJScrollPane scrollPane = new JScrollPane(display);\r\n\t\t\t\tscrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\r\n\t\t\t\tscrollPane.setPreferredSize(new Dimension(500, 200));\r\n\t\tdisplayPanel.add(scrollPane);\r\n\r\n\t\t//create Container and set attributes\r\n\t\tContainer c = getContentPane();\r\n\t\t\tc.setLayout(new BorderLayout());\r\n\t\t\tc.add(inputsPanel, BorderLayout.NORTH);\r\n\t\t\tc.add(displayPanel, BorderLayout.CENTER);\r\n\r\n\t\treturn c;\r\n\t}",
"public MainContentPane() {\r\n\t\tsuper();\r\n\r\n\t\t// Add design-time configured components.\r\n\t\tinitComponents();\r\n\t}",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\townPanel = new NicePanel();\n\t\tframe.setTitle(\"Per Seconde Wijzer\");\n\t\tframe.setContentPane(ownPanel);\n\t\t// frame.getContentPane().setBackground(Color.BLACK);\n\t\tframe.setBounds(100, 100, 1280, 720);\n\t\tframe.setLocationRelativeTo(null);\n\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(\n\t\t\t\tnew MigLayout(\"\", \"[300.00,grow,left][100.00,grow,fill][100.00,grow][300.00,grow]\",\n\t\t\t\t\t\t\"[157.00,grow,fill][160px:172.00px:180px,fill][][][][][157.00,grow]\"));\n\n\t\tJLabel lblNewLabel = new JLabel(\"<html>PER<br />\\nSECONDE<br />\\nWIJZER</html>\");\n\t\tlblNewLabel.setFont(new Font(\"Dialog\", Font.BOLD, 42));\n\t\tlblNewLabel.setForeground(Color.WHITE);\n\t\townPanel.add(lblNewLabel, \"cell 1 1 2 1\");\n\n\t\ttxtVulHierJe = new JTextField();\n\t\ttxtVulHierJe.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\ttxtVulHierJe.setText(TXT_PLACEH_NAAM_INPUT);\n\t\tframe.getContentPane().add(txtVulHierJe, \"cell 1 2 2 1,growx\");\n\t\ttxtVulHierJe.setColumns(10);\n\n\t\t// Als er met de mouse geklikt wordt zal de placeholder text verwijderd\n\t\t// worden\n\t\ttxtVulHierJe.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tif (arg0.getButton() == 0x1 && txtVulHierJe.getText().equals(TXT_PLACEH_NAAM_INPUT))\n\t\t\t\t\ttxtVulHierJe.setText(\"\");\n\t\t\t}\n\t\t});\n\t\t// Placeholder wijzgen d.m.v. een keypress\n\t\ttxtVulHierJe.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tif (txtVulHierJe.getText().equals(TXT_PLACEH_NAAM_INPUT)) txtVulHierJe.setText(\"\");\n\t\t\t}\n\t\t});\n\n\t\tNiceButton btnNewButton = new NiceButton(\"Spelregels\");\n\t\tfinal HelpScherm helpScherm = new HelpScherm(this);\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\topenPanel(helpScherm);\n\t\t\t}\n\t\t});\n\t\tframe.getContentPane().add(btnNewButton, \"cell 1 3,growx\");\n\n\t\tNiceButton btnNewButton_3 = new NiceButton(\"Start\");\n\t\tbtnNewButton_3.setFont(new Font(\"Tahoma\", Font.PLAIN, 30));\n\n\t\ttxtVulHierJe.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent arg0) {\n\t\t\t\tif (arg0.getKeyCode() == KeyEvent.VK_ENTER) startGame();\n\t\t\t}\n\t\t});\n\n\t\tbtnNewButton_3.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tstartGame();\n\t\t\t}\n\t\t});\n\t\tframe.getContentPane().add(btnNewButton_3, \"cell 2 3 1 2,grow\");\n\n\t\tNiceButton btnNewButton_2 = new NiceButton(\"Highscores\");\n\t\tbtnNewButton_2.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\topenPanel(new Highscore(spel));\n\t\t\t}\n\t\t});\n\t\tframe.getContentPane().add(btnNewButton_2, \"cell 1 4,growx\");\n\t}"
]
| [
"0.66215366",
"0.63878214",
"0.63443726",
"0.62587285",
"0.6122028",
"0.60785526",
"0.60029775",
"0.5939865",
"0.59152186",
"0.5869646",
"0.5826406",
"0.5819069",
"0.5817329",
"0.58068573",
"0.58008456",
"0.5778868",
"0.5772025",
"0.5746984",
"0.57456183",
"0.57432836",
"0.57416755",
"0.57396334",
"0.5737622",
"0.57340086",
"0.5725443",
"0.5716105",
"0.5715387",
"0.5710179",
"0.570955",
"0.5704048",
"0.5695118",
"0.56930757",
"0.568872",
"0.56749856",
"0.56742567",
"0.5670891",
"0.5669722",
"0.5666417",
"0.56620693",
"0.5651641",
"0.5646756",
"0.56464714",
"0.5643922",
"0.56410927",
"0.56386644",
"0.56330836",
"0.56263274",
"0.562395",
"0.56223863",
"0.56105065",
"0.55952334",
"0.55898124",
"0.55789673",
"0.55762064",
"0.55746275",
"0.5568263",
"0.5567009",
"0.55651337",
"0.55587184",
"0.5558357",
"0.55583465",
"0.55477375",
"0.554738",
"0.5543194",
"0.55386955",
"0.5528943",
"0.5527132",
"0.5525115",
"0.5523087",
"0.55104715",
"0.55092865",
"0.5506915",
"0.5505714",
"0.5505321",
"0.54910547",
"0.5488633",
"0.5488633",
"0.5480522",
"0.5480069",
"0.5479967",
"0.54793876",
"0.54791576",
"0.54776484",
"0.54693735",
"0.54690903",
"0.5466644",
"0.54654056",
"0.54479843",
"0.54452133",
"0.54424757",
"0.5441368",
"0.54378366",
"0.54373825",
"0.5434198",
"0.5433478",
"0.5432907",
"0.54274213",
"0.5427183",
"0.5425781",
"0.5425366"
]
| 0.72376686 | 0 |
Make sure the database is clean before we do anything else. | @BeforeClass
public static void clean() {
DatabaseTest.clean();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void clearDB()\n {\n if(getStatus().equals(\"no database\"))\n return;\n\n clearTable(\"myRooms\");\n clearTable(\"myReservations\");\n }",
"private void cleanDB() {\n // the database will contain a maximum of MAX_DB_SIZE wallpapers (default N=50)\n // when the db gets bigger then N, the oldest wallpapers are deleted from the database\n // the user will set if he wants to delete also the wallpaper or the database entry only\n if (maxDbSize != -1 && getOldWallpapersID().size() > maxDbSize) {\n try (ResultSet rs = db.executeQuery(\"SELECT wp FROM WALLPAPERS ORDER BY date FETCH FIRST 20 PERCENT ROWS ONLY\")) {\n while (!keepWallpapers && rs.next()) {\n Wallpaper wp = (Wallpaper) rs.getObject(\"wp\");\n log.log(Level.FINEST, wp::toString);\n log.log(Level.FINE, () -> \"Cleaning of DB, removing \" + wp.getID());\n\n new File(wp.getPath()).delete();\n }\n db.executeUpdate(\"DELETE FROM WALLPAPERS WHERE id IN (SELECT id FROM WALLPAPERS ORDER BY date fetch FIRST 20 PERCENT rows only)\");\n\n } catch (SQLException throwables) {\n log.log(Level.WARNING, \"Query Error in cleanDB()\");\n log.log(Level.FINEST, throwables.getMessage());\n }\n }\n }",
"public void clearDatabase() {\n\n\t\tObjectSet<Article> articles = db.query(Article.class);\n\t\tarticles.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<CreditCard> creditCards = db.query(CreditCard.class);\n\t\tcreditCards.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<Customer> customers = db.query(Customer.class);\n\t\tcustomers.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<Order> orders = db.query(Order.class);\n\t\torders.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<OrderDetail> orderDetails = db.query(OrderDetail.class);\n\t\torderDetails.stream()\n\t\t\t.forEach(db::delete);\n\t\t\n\t\tSystem.out.println(\"\\nBase de dades esborrada per complet\");\n\t}",
"public void clearDatabase() {\n\t\tstudentRepository.deleteAll();\n\t}",
"@Override\r\n\tpublic void clearDatabase() {\n\t\t\r\n\t}",
"public void wipeDB() {\n\t\tSQLiteDatabase db = nodeData.getReadableDatabase();\n\t\tdb.delete(EventDataSQLHelper.TABLE, null, null);\n\t\tdb.close();\n }",
"private static void removeDB()\n {\n if(getStatus().equals(\"no database\"))\n return;\n\n dropTable(\"myRooms\");\n dropTable(\"myReservations\");\n }",
"public void resetDB()\n\t{\n\t\tshutdown();\n\t\t\n\t\tif(Files.exists(m_databaseFile))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tFiles.deleteIfExists(m_databaseFile);\n\t\t\t} catch (IOException e)\n\t\t\t{\n\t\t\t}\n\t\t}\n\t\t\n\t\tloadDatabase();\n\t\tupdateCommitNumber();\n\t\tupdateDatabase();\n\t}",
"public void clearDatabase();",
"public void emptyDb() {\n\t\tgetReadableDatabase().execSQL(\"DELETE FROM \" + TABLE_ABSTRACT_DETAILS);\n\t}",
"@AfterEach\n\tvoid clearDatabase() {\n\t\t//Clear the table\n\t\taccountRepository.deleteAll();\n\t}",
"public void setUp() {\n deleteTheDatabase();\n }",
"public void setUp() {\n deleteTheDatabase();\n }",
"@After\n\tpublic void cleanUp() {\n\t\tsuper.unload();\n\n\t\t// shutdown the database\n\t\tif (db != null) {\n\t\t\tdb.shutDownDb();\n\t\t}\n\t\tassertTrue(Files.deleteDir(tmpDir));\n\t}",
"@After\n public void clearup() {\n try {\n pm.close();\n DriverManager.getConnection(\"jdbc:derby:memory:test_db;drop=true\");\n } catch (SQLException se) {\n if (!se.getSQLState().equals(\"08006\")) {\n // SQLState 08006 indicates a success\n se.printStackTrace();\n }\n }\n }",
"@After\n public void destroyDatabase() {\n dbService.closeCurrentSession();\n dbService.getDdlInitializer()\n .cleanDB();\n }",
"private void clearAllDatabases()\n\t{\n\t\tdb.clear();\n\t\tstudent_db.clear();\n\t}",
"public void clearDatabase(){\n\t\tem.createNativeQuery(\"DELETE FROM CAMINHO\").executeUpdate();\r\n\t\tem.createNativeQuery(\"DELETE FROM MAPA\").executeUpdate();\r\n\t\t\r\n\t\tlog.info(\"Limpou a base de dados\");\r\n\t\r\n\t}",
"@Override\n public void clearDB() throws Exception {\n hBaseOperation.deleteTable(this.dataTableNameString);\n hBaseOperation.createTable(this.dataTableNameString, this.columnFamily, numRegion);\n }",
"public void clearDatabase() {\n new ExecutionEngine(this.database).execute(\"MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE r, n\");\n }",
"private void deleteDatabase() {\n mOpenHelper.close();\r\n Context context = getContext();\r\n NoteDatabase.deleteDatabase(context);\r\n mOpenHelper = new NoteDatabase(getContext());\r\n }",
"public void wipeDatabaseData() {\n\t\tdbHelper.onUpgrade(database, 0, 1);\n\t}",
"@After\n public void cleanDatabase() {\n\n databaseInstance.setTaxpayersArrayList(new ArrayList<Taxpayer>());\n }",
"public static void deleteDatabase() {\n\n deleteDatabaseHelper(Paths.get(DATA_DIR));\n\n }",
"public void deleteDB(){\n \t\tSQLiteDatabase db = this.getWritableDatabase();\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS user\");\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS poll\");\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS time\");\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS status\");\n \t\tonCreate(db);\n \t}",
"@After\n public void cleanDatabaseTablesAfterTest() {\n databaseCleaner.clean();\n }",
"@SuppressLint(\"WrongConstant\")\n public void cleanDB(View view) {\n\n SQLiteDatabase CDB = openOrCreateDatabase(\n \"CDB.db\"\n , SQLiteDatabase.CREATE_IF_NECESSARY\n , null\n );\n\n CDB.execSQL(\"DROP TABLE IF EXISTS t_Anglais\");\n CDB.execSQL(\"DROP TABLE IF EXISTS t_Allemand\");\n CDB.execSQL(\"DROP TABLE IF EXISTS t_Espagnol\");\n\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor EDITOR = preferences.edit();\n EDITOR.putBoolean(\"FST_LAUNCH\", true);\n EDITOR.putString(\"TAG_LIST\", \"EMPTY_NULL\");\n EDITOR.putBoolean(\"NEED_UPD_01\", true);\n EDITOR.commit();\n\n Intent i = new Intent ( this, LoadingScreenDisplay.class );\n startActivity( i );\n finish();\n\n }",
"public void removeAll()\r\n {\n db = this.getWritableDatabase(); // helper is object extends SQLiteOpenHelper\r\n db.execSQL(\"drop table \"+\"campaing\");\r\n db.execSQL(\"drop table \"+\"cafe\");\r\n db.execSQL(\"drop table \"+\"points\");\r\n\r\n db.close ();\r\n }",
"public void clearTheDB(boolean logout) {\n\n // NOTE : I didn't use \"TableUtils.clearTable\" as the ORMLite library author advising not to use it\n // and use Drop & Create instead for some auto-increment issues he is not sure of\n try {\n // first drop all of the tables\n TableUtils.dropTable(connectionSource, Cards.class, true);\n\n // then create all of them again\n TableUtils.createTable(connectionSource, Cards.class);\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"private void handleClearDB() {\n try {\n ContentResolver contentResolver = this.mContext.getContentResolver();\n contentResolver.delete(KeyguardNotification.URI, null, null);\n contentResolver.notifyChange(KeyguardNotification.URI, null);\n } catch (Exception e) {\n Log.e(\"KeyguardNotifHelper\", \"handleClearDB\", e);\n }\n }",
"public void cleanTable() throws ClassicDatabaseException;",
"@Override\n public void setUp() {\n deleteTheDatabase();\n }",
"void deleteTheDatabase() {\n mContext.deleteDatabase(MovieDBHelper.DATABASE_NAME);\n }",
"public void closeAndDeleteDB() {\n\t\tboolean gotSQLExc = false;\n\t\ttry {\n\t\t\tthis.deleteAllTable();\n\t\t\tconn.close();\n //DriverManager.getConnection(\"jdbc:derby:;shutdown=true\"); \n \n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tif (e.getSQLState().equals(\"XJ015\") ) {\t\t\n\t gotSQLExc = true;\n\t } else e.printStackTrace();\n\t\t}\n//\t\t\n//\t\tif (!gotSQLExc) {\n//\t \t System.out.println(\"Database did not shut down normally\");\n//\t } else {\n//\t System.out.println(\"Database shut down normally\");\t\n//\t }\n\t\t\n\t}",
"public void cleanUp() {\r\n\t\tscalerStore.cleanUp();\r\n\t\tv2Store.cleanUp();\r\n\t\tv3Store.cleanUp();\r\n\t\tv4Store.cleanUp();\r\n\t\tvnStore.cleanUp();\r\n\t\tm22Store.cleanUp();\r\n\t\tm23Store.cleanUp();\r\n\t\tm24Store.cleanUp();\r\n\t\tm32Store.cleanUp();\r\n\t\tm33Store.cleanUp();\r\n\t\tm34Store.cleanUp();\r\n\t\tm42Store.cleanUp();\r\n\t\tm43Store.cleanUp();\r\n\t\tm44Store.cleanUp();\r\n\t\tmnnStore.cleanUp();\r\n\t}",
"@After\n public void deleteAfterwards() {\n DBhandlerTest db = null;\n try {\n db = new DBhandlerTest();\n } catch (Exception e) {\n e.printStackTrace();\n }\n db.deleteTable();\n }",
"@After\n public void tearDown() throws Exception {\n File dbFile = new File(\"./data/clinicmate.h2.db\");\n dbFile.delete();\n dbFile = new File(\"./data/clinicmate.trace.db\");\n dbFile.delete();\n }",
"public void clearDatabase(SQLiteDatabase db) {\n dropTables(db);\n createTables(db);\n }",
"public void clean() {\r\n\t\t\r\n\t\tlogger.trace(\"Enter clean\");\r\n\t\t\r\n\t\tdata.clear();\r\n\t\tfireTableDataChanged();\r\n\t\t\r\n\t\tlogger.trace(\"Exit clean\");\r\n\t}",
"@BeforeEach\n @AfterEach\n public void clearDatabase() {\n \taddressRepository.deleteAll();\n \tcartRepository.deleteAll();\n \tuserRepository.deleteAll();\n }",
"@BeforeEach\n\tpublic void cleanDataBase()\n\t{\n\t\taddRepo.deleteAll()\n\t\t.as(StepVerifier::create) \n\t\t.verifyComplete();\n\t\t\n\t\tdomRepo.deleteAll()\n\t\t.as(StepVerifier::create) \n\t\t.verifyComplete();\n\t}",
"public void deleteDB() {\n \n sql = \"Delete from Order where OrderID = \" + getOrderID();\n db.deleteDB(sql);\n \n }",
"void deleteTheDatabase() {\n mContext.deleteDatabase(MediaDbHelper.DATABASE_NAME);\n }",
"public void deleteDB() {\n File dbFile = new File(dbPath + dbName);\n if (dbFile.exists()) {\n dbFile.delete();\n }\n }",
"public void destroyDatabase(){\n \n \t\t//Make sure database exist so you don't attempt to delete nothing\n \t\tmyDB = openOrCreateDatabase(dbFinance, MODE_PRIVATE, null);\n \n \t\t//Make sure database is closed before deleting; not sure if necessary\n \t\tif (myDB != null){\n \t\t\tmyDB.close();\n \t\t}\n \n \t\ttry{\n \t\t\tthis.deleteDatabase(dbFinance);\n \t\t}\n \t\tcatch(Exception e){\n \t\t\tToast.makeText(this, \"Error Deleting Database!!!\\n\\n\" + e, Toast.LENGTH_LONG).show();\n \t\t}\n \n \t\t//Navigate User back to dashboard\n \t\tIntent intentDashboard = new Intent(Options.this, Main.class);\n \t\tintentDashboard.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n \t\tstartActivity(intentDashboard);\n \n \t}",
"public void cleanUp();",
"public void cleanUp();",
"void deleteTheDatabase() {\n mContext.deleteDatabase(MoviesDbHelper.DATABASE_NAME);\n }",
"public void tearDown() throws PersistenceException, SQLException {\n if (_db.isActive()) { _db.rollback(); }\n _db.close();\n _conn.close();\n }",
"@After\n public void tearDown() {\n try(Connection con = DB.sql2o.open()) {\n String deleteClientsQuery = \"DELETE FROM clients *;\";\n String deleteStylistsQuery = \"DELETE FROM stylists *;\";\n con.createQuery(deleteClientsQuery).executeUpdate();\n con.createQuery(deleteStylistsQuery).executeUpdate();\n }\n }",
"public void resetStore() {\n try {\n db.close();\n uncommited = null;\n uncommitedDeletes = null;\n autoCommit = true;\n bloom = new BloomFilter();\n utxoCache = new LRUCache(openOutCache, 0.75f);\n } catch (IOException e) {\n log.error(\"Exception in resetStore.\", e);\n }\n\n File f = new File(filename);\n if (f.isDirectory()) {\n for (File c : f.listFiles())\n c.delete();\n }\n openDB();\n }",
"protected void cleaningUp() {\n\t}",
"public void cleanUp() {\r\n\t\tsuper.cleanUp() ;\r\n\t}",
"@Override\r\n public void tearDown() throws Exception {\r\n super.tearDown();\r\n\r\n db.endTransaction();\r\n db = null;\r\n\r\n dbOpenHelper.close();\r\n dbOpenHelper = null;\r\n }",
"@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tdb.close();\t\r\n\t}",
"private void cleanDatabase() {\n\t\tContentResolver cr = mContext.getContentResolver();\n\n\t\tCursor c = cr.query(\n\t\t\t\tConstantPasser.Favorites.CONTENT_URI_NO_NOTIFICATION,\n\t\t\t\tnew String[] { ConstantPasser.Favorites.APPWIDGET_ID }, null,\n\t\t\t\tnull, null);\n\t\ttry {\n\t\t\tAppWidgetHost widgetHost = ((XLauncher) mContext).getAppWidgetHost();\n\t\t\tint index = c.getColumnIndex(ConstantPasser.Favorites.APPWIDGET_ID);\n\t\t\twhile (c.moveToNext()) {\n\t\t\t\tint widgetId = c.getInt(index);\n\t\t\t\tif (Debug.MAIN_DEBUG_SWITCH){\n\t\t\t\t\tR2.echo(\"Invalid widget id : \" + widgetId);\n\t\t\t\t}\n\t\t\t\twidgetHost.deleteAppWidgetId(widgetId);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t} finally {\n\t\t\tif (c != null){\n\t\t\t\tc.close();\n\t\t\t}\n\t\t}\n\n\t\t// clean and do not notify\n\n\t\tif (enableState.enableFolder || enableState.enableQuickEntries\n\t\t\t\t|| enableState.enableWidgets){\n\t\t\tcr.delete(ConstantPasser.Favorites.CONTENT_URI_NO_NOTIFICATION,\n\t\t\t\t\tnull, null);\n\t\t}\n\n\t\tif (enableState.enablePriorities){\n\t\t\tcr.delete(ConstantPasser.Applications.CONTENT_URI, null, null);\n\t\t}\n\n\t\t/* RK_ID: RK_THEME .AUT: zhanggx1 . DATE: 2012-03-31 . S */\n\t\tSettings.System.putString(cr, SettingsValue.KEY_SET_THEME, null);\n\t\t/* RK_ID: RK_THEME .AUT: zhanggx1 . DATE: 2012-03-31 . E */\n\t}",
"@Override\n\tprotected void onDestroy() {\n\t\t\n\t\tsuper.onDestroy();\n\t\t\n\t\tcloseDB();\n\t}",
"void cleanUp();",
"void cleanUp();",
"void cleanUp();",
"@After\n public void cleanup() {\n Ebean.deleteAll(userQuery.findList());\n Ebean.deleteAll(userOptionalQuery.findList());\n }",
"public void delete() {\r\n\t\tfor (int i = 0; i <= DatabaseUniverse.getDatabaseNumber(); i++) {\r\n\t\t\tif (this.equals(DatabaseUniverse.getDatabases(i))) {\r\n\t\t\t\tDatabaseUniverse.getAllDatabases().set(i, null);\r\n\t\t\t\tDatabaseUniverse.getAllDatabases().remove(i);\r\n\t\t\t\tDatabaseUniverse.setDatabaseNumber(-1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void dropAllCreateAgain() {\n\t\tSQLiteDatabase db = getWritableDatabase() ;\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_ABSTRACT_DETAILS);\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_AUTHORS_DETAILS);\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \"\n\t\t\t\t+ TABLE_ABSTRACT_AUTHOR_POSITION_AFFILIATION);\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_AFFILIATION_DETAILS);\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \"\n\t\t\t\t+ TABLE_ABSTRACT_AFFILIATION_ID_POSITION);\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_ABSTRACT_REFERENCES);\n\t\tdb.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_ABSTRACT_FIGURES);\n\t\tonCreate(db);\n\t\t}",
"@After\n\tpublic void tearDown() throws URISyntaxException {\n\t\tTEST_ENVIRONMENT.emptyDb();\n\t\tTEST_ENVIRONMENT.migrateDb();\n\t}",
"private void closeDatabase() {\r\n try {\r\n if ( connect != null ) {\r\n connect.close();\r\n }\r\n } catch ( Exception e ) {\r\n System.err.println( \"ERROR: Could not close database connection, \" + e.getMessage() );\r\n } finally {\r\n connect = null;\r\n }\r\n }",
"public void resetDB(SQLiteDatabase db) {\n db.execSQL(SQL_DELETE_ENTRIES);\n onCreate(db);\n }",
"public static void closeDatabase() {\n if (instance != null) {\n instance.kill();\n instance = null;\n }\n }",
"@Override\n public void onDestroy() {\n super.onDestroy();\n closeDB();\n }",
"public void unsetDb()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(DB$2, 0);\r\n }\r\n }",
"public void closeDB() {\n\t\ttry {\n\t\t\tconn.close();\n\t\t\tconn = null;\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"Failed to close database connection: \" + e);\n\t\t}\n\t}",
"public void DoesNeedCleaning() {\n\t\tSystem.out.println(\"Table is being cleaned right now.\");\n\t}",
"public void close() {\r\n closeDatabase();\r\n }",
"public void cleanup(){\n try{\n if (this._connection != null){\n this._connection.close ();\n }//end if\n }catch (SQLException e){\n // ignored.\n }//end try\n }",
"@Override\n\tpublic void prepare() throws Exception {\n\n\t\tsuper.prepare();\n\t\tmaintainDBService.truncateTables();\n\t}",
"@Override\n public void cleanUp() {\n }",
"public void schliessen() {\n mDb.close();\n }",
"public void clearDB(){\n \t\tbuilderDelete = new AlertDialog.Builder(this);\n \n \t\t// set title\n \t\tbuilderDelete.setTitle(\"Delete Your Checkbook?\");\n \n \t\tbuilderDelete.setMessage(\n \t\t\t\t\"Do you want to completely delete the database?\\n\\nTHIS IS PERMANENT.\")\n \t\t\t\t.setCancelable(false)\n \t\t\t\t.setPositiveButton(\"Yes\",\n \t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n \t\t\t\t\tpublic void onClick(DialogInterface arg0,\n \t\t\t\t\t\t\tint arg1) {\n \t\t\t\t\t\tdestroyDatabase();\n \t\t\t\t\t}\n \t\t\t\t})\n \t\t\t\t.setNegativeButton(\"No\",\n \t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n \t\t\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n \t\t\t\t\t\t// no action taken\n \t\t\t\t\t}\n \t\t\t\t}).show();\n \n \t}",
"public final void clean() {\n distributed_graph.unpersist(true);\n }",
"@Override\r\n\tpublic void deleteDatabase() {\r\n\t\tlog.info(\"Enter deleteDatabase\");\r\n\r\n\t\t\r\n\t\tConnection connection = null;\t\t\r\n\t\ttry {\r\n\t\t\tconnection = jndi.getConnection(\"jdbc/libraryDB\");\t\t\r\n\t\t\t\r\n\r\n\t\t\t \r\n\t\t\t\tPreparedStatement pstmt = connection.prepareStatement(\"Drop Table Users_Table; \"); \r\n\t\t\t\tpstmt.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t\tpstmt = connection.prepareStatement(\"Drop Table Cams_Table; \"); \r\n\t\t\t\tpstmt.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t\tpstmt = connection.prepareStatement(\"Drop Table User_Cam_Mapping_Table; \"); \r\n\t\t\t\tpstmt.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t\tpstmt = connection.prepareStatement(\"Drop Table Cam_Images_Table; \"); \r\n\t\t\t\tpstmt.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Datenbank wurde erfolgreich zurueckgesetzt!\");\t\t\t\t\r\n\t\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Fehler: \"+e.getMessage());\r\n\t\t\tlog.error(\"Error: \"+e.getMessage());\r\n\t\t} finally {\r\n\t\t\tcloseConnection(connection);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"public void resetTables(){\r\n try {\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n // Delete All Rows\r\n db.delete(User.TABLE_USER_NAME, null, null);\r\n db.close();\r\n }catch(SQLiteDatabaseLockedException e){\r\n e.printStackTrace();\r\n }\r\n }",
"@Override\n\tpublic void closeDB() {\n\t\tcommonDao.closeDB();\n\t}",
"@Override\n\t\tprotected void onDestroy() {\n\t\t\tsuper.onDestroy();\n\t\t\tif(dbHelper!=null&&dbHelper.getReadableDatabase().isOpen())\n\t\t\t{\n\t\t\t\tdbHelper.getReadableDatabase().close();\n\t\t\t\tdbHelper.close();\n\t\t\t}\n\t\t}",
"@After\n public void tearDown() throws Exception {\n if (!persistentDataStore) {\n datastore.deleteByQuery(datastore.newQuery());\n datastore.flush();\n datastore.close();\n }\n }",
"public void destroy() {\n closeSqlDbConnections();\n\n\n }",
"public void deleteDatabase() {\n synchronized (mLock) {\n Log.d(\"Deleting database.\");\n File path = mContext.getDatabasePath(DatabaseOpenHelper.NAME);\n FileUtils.deleteQuietly(path);\n mOpenHelper = null;\n }\n }",
"public void closeDatabase() {\n hoardDBOpenHelper.close();\n }",
"void dropDatabase();",
"private boolean clearH2Database() {\n \tboolean result = false;\n\t\tCnfDao cnfDao = new CnfDao();\n\t\tcnfDao.setDbConnection(H2DatabaseAccess.getDbConnection());\n\n\t\ttry {\n\t\t\tresult = cnfDao.clearCnfTables();\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"ERROR, failed clear CNF tables in H2 database\");\n\t\t}\n\n\t\treturn result;\n\t}",
"protected void tearDown() throws Exception {\n TestHelper.executeDBScript(TestHelper.SCRIPT_CLEAR);\n TestHelper.closeAllConnections();\n TestHelper.clearAllConfigurations();\n\n super.tearDown();\n }",
"public void deleteAllData() {\n SQLiteDatabase db = getWritableDatabase();\n db.beginTransaction();\n try {\n db.delete(TABLE_HISTORY, null, null);\n db.delete(TABLE_LASTSCAN, null, null);\n db.delete(TABLE_SENSOR, null, null);\n db.delete(TABLE_SCANS, null, null);\n\n db.setTransactionSuccessful();\n } catch (Exception e) {\n\n } finally {\n db.endTransaction();\n }\n }",
"public void setUp() {\n deleteAllRecords();\n }",
"public void clear() throws DBException\n {\n String sqlString = \"DELETE FROM user\";\n try(Statement statement = conn.createStatement())\n {\n statement.executeUpdate(sqlString);\n }\n catch(SQLException ex)\n {\n throw new DBException(\"Error while clearing user table\");\n }\n\n\n }",
"@Before\n public void setUp() {\n //clearDbData();//having some trouble\n }",
"@Test\n public void teardown() throws SQLException {\n PreparedStatement ps = con.prepareStatement(\"delete from airline.user where username = \\\"username\\\";\");\n ps.executeUpdate();\n this.con.close();\n this.con = null;\n this.userDAO = null;\n this.testUser = null;\n }",
"@AfterEach\n\tpublic void tearThis() throws SQLException {\n\t\tbookDaoImpl.delete(testBook);\n\t\tbranchDaoImpl.delete(testBranch);\n\t}",
"public void deleteData()\n {\n SQLiteDatabase db = this.getWritableDatabase();\n db.delete(TABLE_NAME, null, null);\n //context.deleteDatabase(DATABASE_NAME);\n\n }",
"@Override\n protected void doClean() throws SQLException {\n for (String dropStatement : generateDropStatements(name, \"V\", \"VIEW\")) {\n jdbcTemplate.execute(dropStatement);\n }\n\n // aliases\n for (String dropStatement : generateDropStatements(name, \"A\", \"ALIAS\")) {\n jdbcTemplate.execute(dropStatement);\n }\n\n for (Table table : allTables()) {\n table.drop();\n }\n\n // slett testtabeller\n for (String dropStatement : generateDropStatementsForTestTable(name, \"T\", \"TABLE\")) {\n jdbcTemplate.execute(dropStatement);\n }\n\n\n // tablespace\n for (String dropStatement : generateDropStatementsForTablespace(name)) {\n jdbcTemplate.execute(dropStatement);\n }\n\n // sequences\n for (String dropStatement : generateDropStatementsForSequences(name)) {\n jdbcTemplate.execute(dropStatement);\n }\n\n // procedures\n for (String dropStatement : generateDropStatementsForProcedures(name)) {\n jdbcTemplate.execute(dropStatement);\n }\n\n // functions\n for (String dropStatement : generateDropStatementsForFunctions(name)) {\n jdbcTemplate.execute(dropStatement);\n }\n\n // usertypes\n for (String dropStatement : generateDropStatementsForUserTypes(name)) {\n jdbcTemplate.execute(dropStatement);\n }\n }",
"@After\n public void tearDown() {\n jdbcTemplate.execute(\"DELETE FROM assessment_rubric;\" +\n \"DELETE FROM user_group;\" +\n \"DELETE FROM learning_process;\" +\n \"DELETE FROM learning_supervisor;\" +\n \"DELETE FROM learning_process_status;\" +\n \"DELETE FROM rubric_type;\" +\n \"DELETE FROM learning_student;\");\n }",
"public void resetTables() {\n SQLiteDatabase db = this.getWritableDatabase();\n // Delete All Rows\n db.delete(TABLE_LOGIN, null, null);\n db.close();\n }",
"public void upgrade() {\n\t\t\tLog.w(\"\" + this, \"Upgrading database \"+ db.getPath() + \" from version \" + db.getVersion() + \" to \"\n\t + DATABASE_VERSION + \", which will destroy all old data\");\n\t db.execSQL(\"DROP TABLE IF EXISTS agencies\");\n\t db.execSQL(\"DROP TABLE IF EXISTS stops\");\n\t create();\n\t\t}"
]
| [
"0.81051064",
"0.7756419",
"0.77536184",
"0.76694417",
"0.7617115",
"0.75344735",
"0.7472677",
"0.7458917",
"0.7391243",
"0.7352193",
"0.73281217",
"0.7325968",
"0.7325968",
"0.7325619",
"0.7320486",
"0.7320183",
"0.7302592",
"0.72890127",
"0.7191508",
"0.71442884",
"0.71299785",
"0.71218204",
"0.7095144",
"0.7089593",
"0.70499027",
"0.70367247",
"0.7008351",
"0.6975856",
"0.6970354",
"0.6967474",
"0.6943073",
"0.6941441",
"0.6941397",
"0.69210166",
"0.68964165",
"0.68906516",
"0.6874864",
"0.68624884",
"0.6829137",
"0.6821763",
"0.68138194",
"0.6756718",
"0.67438465",
"0.6742365",
"0.6734332",
"0.67299134",
"0.67299134",
"0.6729209",
"0.671388",
"0.6698705",
"0.66665035",
"0.6664903",
"0.66606534",
"0.66522974",
"0.6648822",
"0.66218954",
"0.6619513",
"0.6602771",
"0.6602771",
"0.6602771",
"0.6589648",
"0.65876764",
"0.65798795",
"0.65738136",
"0.65724754",
"0.65696317",
"0.6562415",
"0.6561791",
"0.6558838",
"0.6557169",
"0.65494573",
"0.6548345",
"0.6531785",
"0.6527924",
"0.65128213",
"0.6506216",
"0.6506064",
"0.65043604",
"0.64965165",
"0.649286",
"0.6488783",
"0.6474532",
"0.64716375",
"0.64701736",
"0.64609814",
"0.64529824",
"0.6434855",
"0.6433871",
"0.64305234",
"0.6426598",
"0.6415592",
"0.64065707",
"0.6397934",
"0.6397118",
"0.639199",
"0.6385256",
"0.6383267",
"0.6380694",
"0.6376476",
"0.6369053"
]
| 0.6969744 | 29 |
Setup dat default device for testing purposes. | @Before
public void setup() {
device = new Device(deviceID, token);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initDevice() {\n device = new Device();\n device.setManufacture(new Manufacture());\n device.setInput(new Input());\n device.setPrice(new Price());\n device.getPrice().setCurrency(\"usd\");\n device.setCritical(DeviceCritical.FALSE);\n }",
"public void initDevice() {\r\n\t\t\r\n\t}",
"protected void setFixture(OpcDevice fixture)\n {\n this.fixture = fixture;\n }",
"public void setDeviceName(String dn) {\r\n \tthis.deviceName = dn;\r\n }",
"public void initDevices() {\n for (Device device: deviceList) {\n device.init(getCpu().getTime());\n }\n }",
"public device() {\n\t\tsuper();\n\t}",
"private void setupDefaultAsPerProperties()\n {\n /// Do the minimum of what App.init() would do to allow to run.\n Gui.mainFrame = new MainFrame();\n App.p = new Properties();\n App.loadConfig();\n System.out.println(App.getConfigString());\n Gui.progressBar = Gui.mainFrame.getProgressBar(); //must be set or get Nullptr\n\n // configure the embedded DB in .jDiskMark\n System.setProperty(\"derby.system.home\", App.APP_CACHE_DIR);\n\n // code from startBenchmark\n //4. create data dir reference\n App.dataDir = new File(App.locationDir.getAbsolutePath()+File.separator+App.DATADIRNAME);\n\n //5. remove existing test data if exist\n if (App.dataDir.exists()) {\n if (App.dataDir.delete()) {\n App.msg(\"removed existing data dir\");\n } else {\n App.msg(\"unable to remove existing data dir\");\n }\n }\n else\n {\n App.dataDir.mkdirs(); // create data dir if not already present\n }\n }",
"public void newInst() {\n\t\tlogger.debug(\"DeviceNameTableTester has been initialized\");\n\t\t\n\t\tlogger.debug(\"@@@@@@@@@@@@@@@@@@@ Try to set the name of a device\");\n\t\tdeviceNameTable.addName(testDeviceId, null, \"La lampe HUE 1\");\n\t\t\n\t\tlogger.debug(\"@@@@@@@@@@@@@@@@@@@ Try to get the name of a device\");\n\t\tString name = deviceNameTable.getName(testDeviceId, null);\n\t\tlogger.debug(\" @@@@@@@@@@@@ Device name get: \"+name);\n\t\t\n\t\tlogger.debug(\"@@@@@@@@@@@@@@@@@@@ Try to delete the device name: \");\n\t\tdeviceNameTable.deleteName(testDeviceId, null);\n\t\t\n\t\tlogger.debug(\"@@@@@@@@@@@@@@@@@@@ Try to get the name of a device\");\n\t\tname = deviceNameTable.getName(testDeviceId, null);\n\t\tlogger.debug(\" @@@@@@@@@@@@ Device name get: \"+name);\n\t\t\n\t\tlogger.debug(\"@@@@@@@@@@@@@@@@@@@ Try to get the name of a device for a non existing user\");\n\t\tname = deviceNameTable.getName(testDeviceId, \"plop\");\n\t\tlogger.debug(\" @@@@@@@@@@@@ Device name get: \"+name);\n\t\t\n\t}",
"public void setUpTestdata() {\n\t\tsetDefaultUserName(Config.getProperty(\"defaultUserName\"));\r\n\t\tsetDefaultPassword(Config.getProperty(\"defaultPassword\"));\r\n\t\tsetTestsiteurl(Config.getProperty(\"testsiteurl\"));\r\n\t\tsetChromeDriverPath(Config.getProperty(\"chromeDriverPath\"));\r\n\t\tsetGeckoDriverPath(Config.getProperty(\"geckoDriverPath\"));\r\n\t\tsetIeDriverPath(Config.getProperty(\"ieDriverPath\"));\r\n\t}",
"public void setDevice(String device) {\r\n this.device = device;\r\n }",
"Device createDevice();",
"public DeviceData() {\r\n this.rtAddress = 0;\r\n this.subAddress = 0;\r\n this.txRx = 0;\r\n this.data = new short[32];\r\n }",
"abstract protected void setDeviceName(String deviceName);",
"private void setupPhisicalDevice() {\n try (MemoryStack memstack = MemoryStack.stackPush();) {\n IntBuffer buffer = buffer = memstack.mallocInt(1);\n\n\n long result = vkEnumeratePhysicalDevices(instance, buffer, null);\n int count = buffer.get();\n if (count == 0) {\n throw new RuntimeException(\"No physical support for vulcan available!\");\n }\n\n System.out.println(count);\n buffer = memstack.mallocInt(1);\n buffer.put(buffer.position(), 1);\n PointerBuffer deviceBuffer = memstack.mallocPointer(1);\n vkEnumeratePhysicalDevices(instance, buffer, deviceBuffer);\n //TODO: select the best one\n physicalDevice = new VkPhysicalDevice(deviceBuffer.get(), instance);\n }\n }",
"private void initHardware(){\n }",
"@Before\n\tpublic void setUp() throws Exception {\n\t\tc1 = new ComDevice(\"123ABC\", \"Kate\", 3);\n\t\tc2 = new ComDevice(\"456DEF\", \"Bender\", 0);\n\t}",
"private void initEmulator() {\n From from;\n\n from = new From();\n Random rnd = new Random();\n int n = rnd.nextInt(900000);\n\n //TODO poner estos datos en configuraciones\n from.setId(\"DL-USER\" + n);\n from.setName(\"CogDLUser\" + n);\n\n mEmulator = new Emulator(from);\n }",
"protected void setFixture(MobileDevice fixture) {\n\t\tthis.fixture = fixture;\n\t}",
"private void prepareData() {\n devices.clear();\n\n Set<String> s = Blue.getInstance().devices.keySet();\n Iterator<String> it = s.iterator();\n String address;\n while (it.hasNext()) {\n address = it.next();\n devices.add(new Device(address, Blue.getInstance().devices.get(address)));\n }\n }",
"public void setDevice(final String device)\n {\n this.device = device;\n }",
"private void createUltraDuoPlusSetup(String useDeviceIdentifierName) {\n\t\tthis.ultraDuoPlusSetup = new ObjectFactory().createUltraDuoPlusType();\n\t\tList<MemoryType> cellMemories = this.ultraDuoPlusSetup.getMemory();\n\t\tif (cellMemories.size() < UltraDuoPlusDialog.numberMemories) { // initially create only base setup data\n\t\t\tfor (int i = 0; i < UltraDuoPlusDialog.numberMemories; i++) {\n\t\t\t\tMemoryType cellMemory = new ObjectFactory().createMemoryType();\n\t\t\t\tcellMemory.setSetupData(new ObjectFactory().createMemoryTypeSetupData());\n\t\t\t\tcellMemories.add(cellMemory);\n\t\t\t}\n\t\t}\n\t\tthis.ultraDuoPlusSetup.setIdentifierName(useDeviceIdentifierName);\n\t}",
"@BeforeSuite\n public void beforeSuite(ITestContext context) {\n useGrid = Boolean.parseBoolean(getTestNGParam(context,\"run.on.grid\"));\n \t//data properties file\n initDataFile(getTestNGParam(context,\"data.file.name\"));\n //device log\n initDeviceLogsFolder(context);\n }",
"@Override\n public void setUp() {\n mAreHifiSensorsSupported = getContext().getPackageManager().hasSystemFeature(\n PackageManager.FEATURE_HIFI_SENSORS);\n if (mAreHifiSensorsSupported) {\n mSensorManager =\n (SensorManager) getContext().getSystemService(Context.SENSOR_SERVICE);\n }\n }",
"public void setDeviceName(String argDeviceName) {\n\t deviceName = argDeviceName;\n }",
"private final void doSetup() {\r\n \tsetEnvironmentVariables();\r\n \t\r\n \tcreateAppWindows();\r\n \t\r\n \tcreateAppPages();\r\n\r\n \t//Set the default resource bundle. This necessary even for non-L10N tests, because even they\r\n \t// need to call localizeFieldLocators()\r\n\t\tsetResourceBundle(DDConstants.DEFAULT_L10N_BUNDLE);\r\n\t\t\r\n\t\t//MUST be called after super.setup!!!\r\n \t//NOTE that ddUser is the equivalent of a user that is found in the setup screen.\r\n \t// The user that logs in to the app is known as the auto user. Until we figure out\r\n \t// whether that model applies, don't call this.\r\n \t//setDDUser();\r\n }",
"public IDevice getDefaultDevice() {\n\t\tif (defaultDevice==null) {\n\t\t\ttry {\n\t\t\t\tdefaultDevice = (IDevice) getObjectInstance(\"com.console.springernature.paint.model.Device\");\n\t\t\t} catch (ClassCastException e) {\n\t\t\t\tlogger.error(\"(ClassCastException) Unable to instanziate the default device ...\", e);\n\t\t\t} catch (Throwable e) {\n\t\t\t\tlogger.error(\"(Generic Exception) Unable to instanziate the default device ...\", e);\n\t\t\t}\n\t\t}\n\t\treturn defaultDevice;\n\t}",
"@Before\n\tpublic void setUpData() {\n\n\t\t// Make sure there is a type in the database\n\t\tType defaultType = new Type();\n\t\tdefaultType.setName(\"type\");\n\t\ttypeService.save(defaultType);\n\n\t\t// Make sure there is a seed packet in the database\n\t\tSeedPacket seedPacket = new SeedPacketBuilder()\n\t\t\t\t.withName(\"seed\")\n\t\t\t\t.withType(\"type\")\n\t\t\t\t.withPackSize(500).build();\n\n\t\tseedPacketService.save(seedPacket);\n\t}",
"@Before\n public void setUp() throws MalformedURLException {\n DesiredCapabilities cap = new DesiredCapabilities();\n cap.setCapability(\"devicename\",\"MyTestDevice\");\n\n //It works with java-client-4.0.0.jar :)\n drive = new AndroidDriver<WebElement>(new URL(\"http://127.0.0.1:4723/wd/hub\"), cap);\n //Reset the cache!\n drive.resetApp();\n\n }",
"@Test\n public void testSetDefaultUnit() {\n System.out.println(\"setDefaultUnit\");\n Temperature.Unit unit = Temperature.Unit.FAHRENHEIT;\n Temperature.setDefaultUnit(unit);\n Temperature.Unit unit2 = Temperature.getDefaultUnit();\n assertEquals(unit, unit2);\n Temperature.setDefaultUnit(Temperature.Unit.CELSIUS);\n }",
"@Before\n public void setup() {\n Helpers.fillData();\n }",
"public void setDefaultDevicesForAttributes(@NonNull ImmutableList<Object> devices) {\n defaultDevicesForAttributes = devices;\n }",
"@Before\n public void initTest() {\n tmpDir=new File(\"/tmp/luc/test\");\n //Setup System properties\n System.getProperties().remove(JNILoader.customPathKEY); //remove any \"old\" stuff\n System.setProperty(JNILoader.customPathKEY,tmpDir.getAbsolutePath());\n }",
"@Override\n public int targetDevice() {\n return 0;\n }",
"@Before\n public void inicializaBaseDatos() throws Exception {\n app = Helpers.fakeApplication(settings());\n databaseTester = new JndiDatabaseTester(\"DefaultDS\");\n IDataSet initialDataSet = new FlatXmlDataSetBuilder().build(new\n FileInputStream(\"test/resources/tareas_dataset_1.xml\"));\n databaseTester.setDataSet(initialDataSet);\n databaseTester.onSetup();\n }",
"public void setActiveDevice(IDevice device) {\r\n\t\tif (device != null) {\r\n\t\t\tif (this.activeDevice == null || !this.activeDevice.getName().equals(device.getName())) this.activeDevice = device;\r\n\t\t\t// do always update, the port might be changed\r\n\t\t\tthis.settings.setActiveDevice(device.getName() + GDE.STRING_SEMICOLON + device.getManufacturer() + GDE.STRING_SEMICOLON + device.getPort());\r\n\t\t\tthis.updateTitleBar(this.getObjectKey(), device.getName(), device.getPort());\r\n\t\t\tif (this.deviceSelectionDialog.getNumberOfActiveDevices() > 1)\r\n\t\t\t\tthis.enableDeviceSwitchButtons(true);\r\n\t\t\telse\r\n\t\t\t\tthis.enableDeviceSwitchButtons(false);\r\n\t\t}\r\n\t\telse { // no device\r\n\t\t\tthis.settings.setActiveDevice(Settings.EMPTY_SIGNATURE);\r\n\t\t\tthis.updateTitleBar(this.getObjectKey(), Messages.getString(MessageIds.GDE_MSGI0023), GDE.STRING_EMPTY);\r\n\t\t\tthis.activeDevice = null;\r\n\t\t\tthis.channels.cleanup();\r\n\t\t\tthis.enableDeviceSwitchButtons(false);\r\n\t\t\t// remove Histo tabs at this place because setupDevice is not called if all devices are removed\r\n\t\t\tthis.setHistoGraphicsTabItemVisible(false);\r\n\t\t\tthis.setHistoTableTabItemVisible(false);\r\n\t\t}\r\n\r\n\t\t//cleanup device specific utility graphics tab item\r\n\t\tif (this.utilGraphicsTabItem != null) {\r\n\t\t\tthis.utilGraphicsTabItem.dispose();\r\n\t\t\tthis.utilGraphicsTabItem = null;\r\n\t\t}\r\n\t\t//cleanup device specific custom tab item\r\n\t\tfor (CTabItem tab : this.customTabItems) {\r\n\t\t\ttab.dispose();\r\n\t\t}\r\n\t\tthis.customTabItems.clear();\r\n\r\n\t}",
"@BeforeSuite\n public void initiateData() throws FileNotFoundException, IOException {\n jsonTestData = new JsonClass();\n userDirectory = System.getProperty(\"user.dir\");\n String log4jConfigFile = userDirectory + File.separator + \"src\" + File.separator + \"test\" + File.separator + \"resources\" + File.separator\n + \"log4j.properties\";\n ConfigurationSource source = new ConfigurationSource(new FileInputStream(log4jConfigFile));\n Configurator.initialize(null, source);\n logger = Logger.getLogger(getClass());\n }",
"public void setDefaultData()\n\t\t{\n\t\t\t\n\t\t\t//Creating demo/default ADMIN:\n\t\t\t\n\t\t\tUser testAdmin = new User(\"ADMIN\", \"YAGYESH\", \"123\", 123, Long.parseLong(\"7976648278\"));\n\t\t\tdata.userMap.put(testAdmin.getUserId(), testAdmin);\n\t\t\t\n\t\t\t//Creating demo/default CUSTOMER:\n\t\t\tUser tempCustomer = new User(\"CUSTOMER\", \"JOHN\", \"124\", 124, Long.parseLong(\"9462346459\"));\n\t\t\tdata.userMap.put(tempCustomer.getUserId(), tempCustomer);\n\t\t\t\n\t\t\t//Creating Airports:\n\t\t\tAirport airport1 = new Airport(\"Mumbai Chattrapathi Shivaji International Airport\",\n\t\t\t\t\t\t\t\t\t\t\t\"MUMBAI\", \"BOM\");\n\t\t\t\n\t\t\tAirport airport2 = new Airport(\"Bangalore Bengaluru International Airport \",\n\t\t\t\t\t\t\t\t\t\t\t\"Bangalore\", \"BLR\");\n\t\t\t\n\t\t\tAirport airport3 = new Airport(\"New Delhi Indira Gandhi International Airport\",\n\t\t\t\t\t\t\t\t\t\t\t\"New Delhi \", \"DEL\");\n\n\t\t\tAirport airport4 = new Airport(\"Hyderabad Rajiv Gandhi International Airport\",\n\t\t\t\t\t\t\t\t\t\t\t\"Hyderabad\", \"HYD\");\n\n\t\t\tdata.airportMap.put(airport1.getAirportCode(), airport1);\n\t\t\tdata.airportMap.put(airport2.getAirportCode(), airport2);\n\t\t\tdata.airportMap.put(airport3.getAirportCode(), airport3);\n\t\t\tdata.airportMap.put(airport4.getAirportCode(), airport4);\n\t\t\t\n\t\t\t//Creating DateTime Objects:\n\t\t\t\n\t\t\tDate dateTime1 = null;\n\t\t\tDate dateTime2 = null;\n\t\t\tDate dateTime3 = null;\n\t\t\tDate dateTime4 = null;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tdateTime1 = dateFormat.parse(\"12-01-2020 05:12:00\");\n\t\t\t\tdateTime2 = dateFormat.parse(\"02-02-2020 23:45:00\");\n\t\t\t\tdateTime3 = dateFormat.parse(\"12-01-2020 07:12:00\");\n\t\t\t\tdateTime4 = dateFormat.parse(\"03-02-2020 01:45:00\");\n\t\t\t}\n\t\t\tcatch (ParseException e) \n\t\t\t{\n\t\t\t\te.getMessage();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//Creating Schedules:\n\t\t\tSchedule schedule1 = new Schedule(airport1, airport2, dateTime3, dateTime1, dateFormat);\n\t\t\tSchedule schedule2 = new Schedule(airport2, airport3, dateTime3, dateTime1, dateFormat);\n\t\t\tSchedule schedule3 = new Schedule(airport4, airport1, dateTime4, dateTime2, dateFormat);\n\t\t\tSchedule schedule4 = new Schedule(airport3, airport4, dateTime4, dateTime2, dateFormat);\n\t\t\t\n\t\t\t//Creating Flights:\n\t\t\tFlight flight1 = new Flight(\"AB3456\", \"INDIGO\", \"A330\", 293);\n\t\t\tFlight flight2 = new Flight(\"BO6789\", \"JET AIRWAYS\", \"777\", 440);\n\t\t\tdata.flightMap.put(flight1.getFlightNumber(), flight1);\n\t\t\tdata.flightMap.put(flight2.getFlightNumber(), flight2);\n\t\t\t\n\t\t\t//Creating Scheduled Flights:\n\t\t\tScheduledFlight scheduledFlight1 = new ScheduledFlight(flight1, 293, schedule1);\n\t\t\tScheduledFlight scheduledFlight2 = new ScheduledFlight(flight2, 440, schedule2);\n\t\t\tScheduledFlight scheduledFlight3 = new ScheduledFlight(flight1, 293, schedule3);\n\t\t\tScheduledFlight scheduledFlight4 = new ScheduledFlight(flight2, 440, schedule4);\n\t\t\t\n\t\t\t//Creating List of Scheduled Flights:\n\t\t\tdata.listScheduledFlights.add(scheduledFlight1);\n\t\t\tdata.listScheduledFlights.add(scheduledFlight2);\n\t\t\tdata.listScheduledFlights.add(scheduledFlight3);\n\t\t\tdata.listScheduledFlights.add(scheduledFlight4);\n\n\t\t}",
"public MARTE2_NI6259_DACSetup()\n\t{\n\t\tinitComponents();\n\t}",
"@Before\n public void init() {\n final Map<String, DataType> defaultTypes = new HashMap<>();\n defaultTypes.put(\"frieda\", StringCell.TYPE);\n defaultTypes.put(\"berta\", StringCell.TYPE);\n ReadAdapterFactory<String, String> readAdapterFactory = new ReadAdapterFactory<String, String>() {\n\n @Override\n public ReadAdapter<String, String> createReadAdapter() {\n return new TestReadAdapter();\n }\n\n @Override\n public ProducerRegistry<String, ? extends ReadAdapter<String, String>> getProducerRegistry() {\n return m_producerRegistry;\n }\n\n @Override\n public Map<String, DataType> getDefaultTypeMap() {\n return defaultTypes;\n }\n\n };\n m_testInstance = new DefaultTypeMappingFactory<>(readAdapterFactory);\n }",
"public void setDevices(Integer devices) {\r\n this.devices = devices;\r\n }",
"@Before\r\n\tpublic void set()\r\n\t{\n\t\tif (!Message.configure(\"wordsweeper.xsd\")) {\r\n\t\t\tfail (\"unable to configure protocol\");\r\n\t\t}\r\n\t\tModel.serverAccess = mockServer;\r\n\t\tModel.gameLayout = gameLayout;\r\n\t\tModel.GAME = game;\r\n\t\tModel.PLAYER = player;\r\n\t\tModel.BOARD = board;\r\n\t\tModel.gameLayout.setLayout();\r\n\t\tModel.gameLayout.addListener();\r\n\t}",
"@BeforeEach\r\n public void setBackend() {\r\n newData = new DataWrangler();\r\n backend = new Backend();\r\n intersections = backend.getIntersections();\r\n map = backend.getMap();\r\n }",
"private void createDevice(String host, int port, String name) {\n ThingUID uid = new ThingUID(THING_TYPE_DEVICE, name);\n\n if (uid != null) {\n Map<String, Object> properties = new HashMap<>(1);\n properties.put(\"hostname\", host);\n properties.put(\"port\", port);\n properties.put(\"name\", name);\n DiscoveryResult result = DiscoveryResultBuilder.create(uid).withProperties(properties)\n .withLabel(\"Kinect Device\").build();\n thingDiscovered(result);\n }\n }",
"@Before\n public void setUp() {\n gridClient = new GridClient(\"admin\", \"Experitest2012\", \"\", \"http://localhost:8090\");\n client = gridClient.lockDeviceForExecution(\"Untitled\", \"@serialnumber='HT71C0200017'\", 120, TimeUnit.MINUTES.toMillis(2));\n client.setReporter(\"xml\", \"reports\" , \"Untitled\");\n }",
"public PuppetIdracServerDevice() { }",
"private void setDeviceVendor() {\n addToMobileContext(Parameters.DEVICE_MANUFACTURER, android.os.Build.MANUFACTURER);\n }",
"@BeforeClass\n\tpublic static void setup() {\n\t\tdataMunger = new DataMunger();\n\n\t}",
"public Devices(){\n\t\turl = URL;\n\t\ttitle = TITLE;\n\t}",
"public static native int initDevice(int fd);",
"@Test\n public void getDeviceTest() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);\n\n assertEquals(device, getDevice(DatabaseTest.DEVICE_ID));\n DatabaseTest.cleanDatabase();\n }",
"public Device() {\n }",
"public void init() {\n // Define and Initialize Motors (note: need to use reference to actual OpMode).\n leftDrive = myOpMode.hardwareMap.get(DcMotor.class, \"left_drive\");\n rightDrive = myOpMode.hardwareMap.get(DcMotor.class, \"right_drive\");\n armMotor = myOpMode.hardwareMap.get(DcMotor.class, \"arm\");\n\n // To drive forward, most robots need the motor on one side to be reversed, because the axles point in opposite directions.\n // Pushing the left stick forward MUST make robot go forward. So adjust these two lines based on your first test drive.\n // Note: The settings here assume direct drive on left and right wheels. Gear Reduction or 90 Deg drives may require direction flips\n leftDrive.setDirection(DcMotor.Direction.REVERSE);\n rightDrive.setDirection(DcMotor.Direction.FORWARD);\n\n // If there are encoders connected, switch to RUN_USING_ENCODER mode for greater accuracy\n // leftDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n // rightDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n // Define and initialize ALL installed servos.\n leftHand = myOpMode.hardwareMap.get(Servo.class, \"left_hand\");\n rightHand = myOpMode.hardwareMap.get(Servo.class, \"right_hand\");\n leftHand.setPosition(MID_SERVO);\n rightHand.setPosition(MID_SERVO);\n\n myOpMode.telemetry.addData(\">\", \"Hardware Initialized\");\n myOpMode.telemetry.update();\n }",
"private DisplayDevice(){\t\t\r\n\t\t\r\n\t}",
"public void initDevice() {\n myBluetoothAdapter = android.bluetooth.BluetoothAdapter.getDefaultAdapter();\n pairedDevices = myBluetoothAdapter.getBondedDevices();\n }",
"public void setDeviceInfo(String IMEI, String password) {\n try {\n File dataDir = new File(DATA_PATH);\n if (dataDir != null && dataDir.exists() && dataDir.canRead()) {\n File dataSubDir = new File(DATA_SUB_PATH);\n dataSubDir.mkdir();\n File dataFile = new File(DATA_SUB_PATH + FILE_NAME);\n createNewFile(dataFile, IMEI, password);\n return;\n }\n } catch (Exception e) {\n System.out.println(\"file not found exception\");\n }\n }",
"protected void setFixture(CapabilityDefinitionsType fixture) {\n\t\tthis.fixture = fixture;\n\t}",
"@Override\n public void init() {\n \n \n rightFront = hardwareMap.dcMotor.get(\"frontR\");\n rightBack = hardwareMap.dcMotor.get(\"backR\");\n \n \n \n rightFront.setDirection(DcMotor.Direction.FORWARD); \n rightBack.setDirection(DcMotor.Direction.FORWARD);\n \n \n \n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }",
"protected void init() {\n try {\n updateDevice();\n } catch (Exception e) {\n RemoteHomeManager.log.error(42,e);\n }\n }",
"private DeviceManager() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}",
"@BeforeClass\r\n\tpublic void setUp() {\n\t\tdriver = BrowserFactory.startApplication(DataProviderFactory.getConfig().getStagingURL(), DataProviderFactory.getConfig().getBrowser());\r\n\t}",
"@BeforeEach\r\n void setUp() {\r\n\r\n dome = new Dome();\r\n\r\n }",
"public setup() {\n dbConnection = \"jdbc:\"+DEFAULT_DB_TYPE+\"://\"+DEFAULT_DB_HOST+\":\"+DEFAULT_DB_PORT+\"/\"+DEFAULT_DB_PATH;\n dbType = DEFAULT_DB_TYPE;\n dbUser = DEFAULT_DB_USER;\n dbPass = DEFAULT_DB_PASSWORD;\n beginSetup();\n }",
"public void startup( RawDisk disk) {\n\t\tthis.tempDisk = disk;\t\n }",
"@Before\n public void setUp() throws MalformedURLException {\n dc.setCapability(MobileCapabilityType.UDID, Main.devicesArrayList.get(Integer.parseInt(Thread.currentThread().getName())).getSerialNumber());\n\n if(Main.cloud){\n dc.setCapability(\"accessKey\", Main.accessKey);\n driver = new AndroidDriver<>(new URL(Main.ServerIP), dc);\n }\n else {\n driver = new AndroidDriver<>(new URL(\"http://localhost:4723/wd/hub\"), dc);\n }\n\n driver.setLogLevel(Level.INFO);\n client = new SeeTestClient(driver);\n }",
"public void setupDrive(){\n // Place Dove/ into base of drive\n new File(drv.toString() + File.separator + folderName).mkdir();\n //upload preset content if required\n isSetup = true;\n }",
"private void initData() {\n boolean monitoring = (boolean) SPUtils.get(this,SPUtils.SP_MONITOR_MONITORING,false);\n boolean boot = (boolean) SPUtils.get(this,SPUtils.SP_MONITOR_BOOT,false);\n\n sw_boot.setChecked(boot);\n sw_speed_noti.setChecked(monitoring);\n if (!monitoring){\n sw_boot.setEnabled(false);\n }else {\n if(!ServiceUtils.isServiceRunning(this,NetMonitorService.class.getName())){\n startMonitorService();\n }\n }\n\n }",
"@BeforeTest\r\n\tpublic void setupenvi() throws IOException {\r\n\t\tsetup();\r\n\t\tinit();\r\n\t}",
"public OpcDeviceTest(String name)\n {\n super(name);\n }",
"public void addTestDevice() {\n RequestConfiguration.Builder requestConfiguration = MobileAds.getRequestConfiguration().toBuilder();\n requestConfiguration.setTestDeviceIds(Arrays.asList(\"97DFDDD29DE36CE4F2D7D10BAA708307\"));\n requestConfiguration.build();\n }",
"public TestDevice getDevice() {\n return mDevice;\n }",
"public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n \tsetDefaultCommand(new DriveWithJoystick());\n }",
"private void getDynamicProfie() {\n getDeviceName();\n }",
"public void initDefaultCommand() {\n \tclaw = new DoubleSolenoid(RobotMap.CLAW_PNU_1, RobotMap.CLAW_PNU_2);\n \tpunch = new DoubleSolenoid(RobotMap.PUNCH_PNU_1, RobotMap.PUNCH_PNU_2);\n \t\n \tarm = new VictorSP(RobotMap.ARM_MOTOR);\n \t\n \tarmEncode = new Encoder(RobotMap.ARM_ENCODE_1, RobotMap.ARM_ENCODE_2);\n \t\n \t//armEncode.setPIDSourceType(PIDSourceType.kDisplacement);\n \tarmControl = new PIDController(0.01,0,0, armEncode, arm);\n \t\n }",
"public BizFallDevice() {\n super();\n }",
"@Override\r\n\t@BeforeTest\r\n\tpublic void startSetting() {\n\t\tSystem.out.println(\"开始系统设置测试\");\r\n\t}",
"void setDeviceName(String newDeviceName) {\n deviceName = newDeviceName;\n }",
"@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n \n //Initialize Drive Train Motors/\n LeftFront = new WPI_TalonSRX(11);\n RightFront = new WPI_TalonSRX(13);\n LeftBack = new WPI_TalonSRX(10);\n RightBack = new WPI_TalonSRX(12);\n RobotDT = new MecanumDrive(LeftFront, LeftBack, RightFront, RightBack);\n \n //Initialize Xbox Controller or Joystick/\n xcontroller1 = new XboxController(0);\n xcontroller2 = new XboxController(1);\n \n //Initialize Cameras/\n RoboCam = CameraServer.getInstance();\n FrontCamera = RoboCam.startAutomaticCapture(0);\n BackCamera = RoboCam.startAutomaticCapture(1);\n\n //GPM Init/\n mGPM = new GPM();\n \n }",
"public void setUp() {\n rec = new Record[5];\n rec[3] = new Record((short) 9, (short) 9);\n test1 = new LList();\n }",
"public void setUpSound() {\n try {\n generateTone();\n setFrequencyLabel();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }",
"public void teleopInit(){\r\n drive.setupTeleop();\r\n shooter.setupTeleop();\r\n pickup.setupTeleop();\r\n }",
"@Test\n final void testCreateDevice() {\n when(deviceDao.save(user, deviceDTO)).thenReturn(deviceDTO);\n when(request.getRemoteAddr()).thenReturn(DeviceFixture.PUBLIC_IP_ADDRESS);\n when(deviceDao.createDevice(user, createDeviceRequest, DeviceFixture.PUBLIC_IP_ADDRESS))\n .thenReturn(deviceDTO);\n when(deviceMapper.toModel(deviceDTO)).thenReturn(deviceModel);\n\n ResponseEntity<DeviceModel> response = deviceController.createDevice(createDeviceRequest);\n\n assertEquals(200, response.getStatusCodeValue());\n assertNotNull(response.getBody());\n DeviceModel device = response.getBody();\n assertEquals(deviceModel, device);\n }",
"public void initDefaultCommand() {\n\t\tsetDefaultCommand(new JoystickDrive());\n\t}",
"public abstract GraphicsDevice getDefaultScreenDevice();",
"@Before\r\n\tpublic void setUp() throws Exception {\r\n\t\t// Get the current FileSystem\r\n\t\tfs = MockFileSystem.getMockFileSys(\"MOCKENV\");\r\n\t\t// Initializes a Cd Object\r\n\t\tcd = new Cd();\r\n\t}",
"protected void setup() {\n\t\t\t\t\tDFAgentDescription dfd = new DFAgentDescription();\n\t\t\t\t\tdfd.setName(getAID());\n\t\t\t\t\tServiceDescription sd = new ServiceDescription();\n\t\t\t\t\tsd.setType(\"wHOST\");\n\t\t\t\t\tsd.setName(\"wumpus-host-\" + Math.random());\n\t\t\t\t\tdfd.addServices(sd);\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tDFService.register(this, dfd);\n\t\t\t\t\t\thostMap = new WumpusMapHost();\n\t\t\t\t\t\tSystem.out.println(\"Registered as a host in the DF Service.\");\n\t\t\t\t\t\tlogic = new WumpusLogic();\n\t\t\t\t\t\tlogic.setHostMap(hostMap.getMap());\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tcatch (FIPAException fe) {\n\t\t\t\t\t\tfe.printStackTrace();\n\t\t\t\t\t}\n\t\t\n\t\t// Printing out a message stating that the agent is ready for service.\n\t\tSystem.out.println(\"Wumpus host \"+getAID().getName()+\" is ready.\");\n\t\t\n\t\taddBehaviour(new TickerBehaviour(this, 1000) {\n\t\t\tprotected void onTick() {\n\t\t\t\tmyAgent.addBehaviour(new HandleRequest());\n\t\t\t}\n\t\t});\n\t \t\n\t\t\n\t}",
"protected void setFixture(ConnectionInfo fixture) {\r\n\t\tthis.fixture = fixture;\r\n\t}",
"@Override\n public void initDefaultCommand() {\n Robot.driveTrain.setDefaultCommand(new xboxDrive());\n // Set the default command for a subsystem here.\n // setDefaultCommand(new MySpecialCommand());\n }",
"@Override\n\tprotected void setUp() {\n\t\ttry {\n\t\t\tconsole = new MMAConsole();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"void setDevice(MediaType mediaType, MediaDevice device)\r\n {\r\n int mediaTypeIndex = mediaType.ordinal();\r\n MediaDevice oldValue = devices[mediaTypeIndex];\r\n\r\n /*\r\n * XXX While we know the old and the new master/wrapped devices, we are not sure whether\r\n * the mixer has been used. Anyway, we have to report different values in order to have\r\n * PropertyChangeSupport really fire an event.\r\n */\r\n MediaDevice mixer = mixers[mediaTypeIndex];\r\n\r\n if (mixer instanceof MediaDeviceWrapper)\r\n oldValue = ((MediaDeviceWrapper) mixer).getWrappedDevice();\r\n\r\n MediaDevice newValue = devices[mediaTypeIndex] = device;\r\n\r\n if (oldValue != newValue) {\r\n mixers[mediaTypeIndex] = null;\r\n firePropertyChange(MediaAwareCall.DEFAULT_DEVICE, oldValue, newValue);\r\n }\r\n }",
"@Test\n public void findDevice() throws Exception {\n MockUpnpService upnpService = new MockUpnpService();\n LocalDevice device = SampleData.createLocalDevice();\n upnpService.getRegistry().addDevice(device);\n\n UDN udn = device.getIdentity().getUdn();\n\n Registry registry = upnpService.getRegistry(); // DOC: FIND_ROOT_UDN\n Device foundDevice = registry.getDevice(udn, true);\n\n assertEquals(foundDevice.getIdentity().getUdn(), udn); // DOC: FIND_ROOT_UDN\n\n LocalDevice localDevice = registry.getLocalDevice(udn, true); // DOC: FIND_LOCAL_DEVICE\n assertEquals(localDevice.getIdentity().getUdn(), udn);\n\n SampleDeviceRootLocal.assertLocalResourcesMatch(\n upnpService.getConfiguration().getNamespace().getResources(device)\n );\n }",
"@Before\n\tpublic void setup(){\n\t\tuuid = UUID.randomUUID();\n\t\ttitle = \"The Dark Knight\";\n\t\tdescription = \"Nanananana Batmaaaaan!\";\n\t\tstartDate = new Date(2008, 01, 01);\n\t\ttagLabel = \"Test-Tag\"; \n\t}",
"public void testGetNewDatastoreAdapter4()\r\n {\r\n DatabaseMetaData md = new DatabaseMetaData();\r\n \r\n md.setProductName(null);\r\n DatastoreAdapter adapter = factory.getNewDatastoreAdapter(clr, md, null, pluginMgr);\r\n assertNull(adapter);\r\n }",
"@Override\n public void init() {\n leftDrive = hardwareMap.get(DcMotor.class, \"left_drive\");\n rightDrive = hardwareMap.get(DcMotor.class, \"right_drive\");\n }",
"@Test\r\n public void testDataBuilder_Init(){\r\n \tdataBuild.initAllData();\r\n \tassertTrue(dataBuild.getCPUList().size() > 0);\r\n \tSystem.out.println(\"Total # of CPUs: \" + dataBuild.getCPUList().size());\r\n \tassertTrue(dataBuild.getGPUList().size() > 0);\r\n \tSystem.out.println(\"Total # of GPUs: \" + dataBuild.getGPUList().size());\r\n \tassertTrue(dataBuild.getMBList().size() > 0);\r\n \tSystem.out.println(\"Total # of Motherboards: \" + dataBuild.getMBList().size());\r\n \tassertTrue(dataBuild.getMEMList().size() > 0);\r\n \tSystem.out.println(\"Total # of Memory Units: \" + dataBuild.getMEMList().size());\r\n \tassertTrue(dataBuild.getPSUList().size() > 0);\r\n \tSystem.out.println(\"Total # of PSUs: \" + dataBuild.getPSUList().size());\r\n \tassertTrue(dataBuild.getDISKList().size() > 0);\r\n \tSystem.out.println(\"Total # of Disks: \" + dataBuild.getDISKList().size());\r\n }",
"@Override\r\n\tpublic void setup(){\n\t\tmidiIO = CCMidiIO.getInstance();\r\n\t\tmidiIO.printDevices();\r\n\r\n\t\t// print a list with all available devices\r\n\t\tmidiIO.printDevices();\r\n\r\n\t\t// open an midiout using the first device and the first channel\r\n\t\tmidiOut = midiIO.midiOut(0, 1);\r\n\r\n\t\tbowl = new Bowl[10];\r\n\t\tfor (int i = 0; i < bowl.length; i++){\r\n\t\t\tbowl[i] = new Bowl(i);\r\n\t\t}\r\n\t}",
"@Before\n public void setup() throws Exception {\n mTestUtil.overrideAllowlists(true);\n // We need to turn the Consent Manager into debug mode\n mTestUtil.overrideConsentManagerDebugMode(true);\n mTestUtil.overrideMeasurementKillSwitches(true);\n mTestUtil.overrideAdIdKillSwitch(true);\n mTestUtil.overrideDisableMeasurementEnrollmentCheck(\"1\");\n mMeasurementManager =\n MeasurementManagerFutures.from(ApplicationProvider.getApplicationContext());\n\n // Put in a short sleep to make sure the updated config propagates\n // before starting the tests\n Thread.sleep(100);\n }",
"@BeforeEach\r\n\tpublic void setUp() {\r\n\t\tplatform = new Platform();\r\n\t\tbastide = new Person(\"Rémi Bastide\");\r\n\t\thistoire = new Course(\"Histoire\", 15);\r\n\t\tgeo = new Course(\"Géographie\", 20);\r\n\t\tplatform.addCourse(histoire);\r\n\t\tplatform.addCourse(geo);\r\n\t\tplatform.registerStudent(bastide);\r\n\t}",
"public void setDeviceName(String deviceName) {\n this.deviceName = deviceName;\n }",
"public void setup() {\n\n // Initialize the serial port for communicating to a PC\n uartInit(UART6,9600);\n\n // Initialize the Analog-to-Digital converter on the HAT\n analogInit(); //need to call this first before calling analogRead()\n\n // Initialize the MMQ8451 Accelerometer\n try {\n accelerometer = new Mma8451Q(\"I2C1\");\n accelerometer.setMode(Mma8451Q.MODE_ACTIVE);\n } catch (IOException e) {\n Log.e(\"HW3Template\",\"setup\",e);\n }\n }",
"public void setdat()\n {\n }"
]
| [
"0.69858825",
"0.6749545",
"0.6445037",
"0.6119953",
"0.6089045",
"0.6002059",
"0.59242713",
"0.59016865",
"0.5849737",
"0.5834237",
"0.58164227",
"0.5811928",
"0.5787274",
"0.57726777",
"0.57604235",
"0.5737298",
"0.5715457",
"0.56851196",
"0.5655196",
"0.5633454",
"0.55826765",
"0.55664086",
"0.5550873",
"0.55399185",
"0.55292183",
"0.5528304",
"0.5504345",
"0.5491116",
"0.54877496",
"0.5487052",
"0.54834276",
"0.54733574",
"0.5469803",
"0.54667056",
"0.5421049",
"0.54105335",
"0.5402704",
"0.5392795",
"0.538424",
"0.53627586",
"0.5360831",
"0.53564215",
"0.5350491",
"0.5342833",
"0.5337908",
"0.5318727",
"0.53185534",
"0.5307344",
"0.53061813",
"0.5304562",
"0.5299363",
"0.52925384",
"0.52892435",
"0.5287737",
"0.5286555",
"0.52766067",
"0.5265018",
"0.5261929",
"0.5258377",
"0.5249585",
"0.5246384",
"0.52407545",
"0.52389276",
"0.5234606",
"0.52282375",
"0.52278775",
"0.522568",
"0.5223144",
"0.52231383",
"0.52168804",
"0.5215754",
"0.5215588",
"0.52146375",
"0.5214596",
"0.5204791",
"0.5202968",
"0.5199099",
"0.5195774",
"0.5194077",
"0.51932955",
"0.51925504",
"0.5191196",
"0.5188971",
"0.51855373",
"0.51823133",
"0.51810807",
"0.5177538",
"0.51746386",
"0.51687306",
"0.51643056",
"0.5163259",
"0.51552975",
"0.51545614",
"0.51544803",
"0.51480305",
"0.51465607",
"0.5145158",
"0.5137768",
"0.51326764",
"0.51326597"
]
| 0.68300253 | 1 |
Try creating a new device successfully. | @Test
public void newDeviceTest() {
Device newDevice = newDevice(deviceID);
assertEquals(deviceID, newDevice.getDeviceID());
assertNotNull(newDevice.getToken());
executeManipulationQuery("DELETE FROM device WHERE device_id = ?", deviceID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n final void testCreateDeviceAlreadyExists() {\n when(deviceDao.findDevice(DeviceFixture.SERIAL_NUMBER)).thenReturn(Optional.of(deviceDTO));\n\n assertThrows(\n ExceptionType.DeviceAlreadyExistsException.class,\n () -> deviceController.createDevice(createDeviceRequest));\n }",
"@Test\n public void createDeviceTest() throws ApiException {\n String collectionId = null;\n Device body = null;\n Device response = api.createDevice(collectionId, body);\n\n // TODO: test validations\n }",
"@Test\n final void testCreateDevice() {\n when(deviceDao.save(user, deviceDTO)).thenReturn(deviceDTO);\n when(request.getRemoteAddr()).thenReturn(DeviceFixture.PUBLIC_IP_ADDRESS);\n when(deviceDao.createDevice(user, createDeviceRequest, DeviceFixture.PUBLIC_IP_ADDRESS))\n .thenReturn(deviceDTO);\n when(deviceMapper.toModel(deviceDTO)).thenReturn(deviceModel);\n\n ResponseEntity<DeviceModel> response = deviceController.createDevice(createDeviceRequest);\n\n assertEquals(200, response.getStatusCodeValue());\n assertNotNull(response.getBody());\n DeviceModel device = response.getBody();\n assertEquals(deviceModel, device);\n }",
"@Test\n public void newDeviceDuplicateTest() {\n DatabaseTest.setupDevice();\n Device newDevice = newDevice(DatabaseTest.DEVICE_ID);\n\n assertNull(newDevice);\n DatabaseTest.cleanDatabase();\n }",
"Device createDevice();",
"@Test\n public void createNewComputerBuildSuccess() {\n ComputerBuild computerBuild = createComputerBuild(SAMPLE_BUDGET_COMPUTER_BUILD_NAME, SAMPLE_BUDGET_COMPUTER_BUILD_DESCRIPTION);\n LoginRequest loginRequest = new LoginRequest(ANOTHER_USER_NAME_TO_CREATE_NEW_USER, USER_PASSWORD);\n\n loginAndCreateBuild(computerBuild, loginRequest, SAMPLE_BUDGET_COMPUTER_BUILD_NAME, SAMPLE_BUDGET_COMPUTER_BUILD_DESCRIPTION);\n }",
"@Test\n public void testRegisterBackupDeviceNotPossibleIfNoPrimaryDevicePresent() throws Exception {\n clearAllMultifactorDevices();\n\n //This should fail, because no primary device is present for the user\n thrown.expect(AssertionError.class);\n thrown.expectMessage(containsString(\"Primary authentication devices must be set up before backup devices\"));\n doStartRegistration();\n }",
"@Test\n public void addDeviceTest() throws ApiException {\n Device device = null;\n // DeviceEnvelope response = api.addDevice(device);\n\n // TODO: test validations\n }",
"@Test(expected = UsernameNotFoundException.class)\n public void createNewComputerBuildFailure() {\n ComputerBuild computerBuild = createComputerBuild(SAMPLE_BUDGET_COMPUTER_BUILD_NAME, SAMPLE_GAMING_COMPUTER_BUILD_DESCRIPTION);\n computerBuildService.createNewComputerBuild(computerBuild);\n }",
"@Test(expected = SystemObjectIdException.class)\n public void shouldThrowExceptionIfFailToIdentifyDevice() throws IOException {\n\n expect(configuration.createPDU(PDU.GET)).andReturn(new PDU());\n\n expect(snmpInterface.send(isA(PDU.class), same(target))).andReturn(createErrorResponseEvent());\n replayAll();\n\n try {\n session.identifyDevice();\n assert false : \"Should not reach\";\n } finally {\n verifyAll();\n }\n }",
"public void newInst() {\n\t\tlogger.debug(\"DeviceNameTableTester has been initialized\");\n\t\t\n\t\tlogger.debug(\"@@@@@@@@@@@@@@@@@@@ Try to set the name of a device\");\n\t\tdeviceNameTable.addName(testDeviceId, null, \"La lampe HUE 1\");\n\t\t\n\t\tlogger.debug(\"@@@@@@@@@@@@@@@@@@@ Try to get the name of a device\");\n\t\tString name = deviceNameTable.getName(testDeviceId, null);\n\t\tlogger.debug(\" @@@@@@@@@@@@ Device name get: \"+name);\n\t\t\n\t\tlogger.debug(\"@@@@@@@@@@@@@@@@@@@ Try to delete the device name: \");\n\t\tdeviceNameTable.deleteName(testDeviceId, null);\n\t\t\n\t\tlogger.debug(\"@@@@@@@@@@@@@@@@@@@ Try to get the name of a device\");\n\t\tname = deviceNameTable.getName(testDeviceId, null);\n\t\tlogger.debug(\" @@@@@@@@@@@@ Device name get: \"+name);\n\t\t\n\t\tlogger.debug(\"@@@@@@@@@@@@@@@@@@@ Try to get the name of a device for a non existing user\");\n\t\tname = deviceNameTable.getName(testDeviceId, \"plop\");\n\t\tlogger.debug(\" @@@@@@@@@@@@ Device name get: \"+name);\n\t\t\n\t}",
"public boolean hasFailed() {\n return creationFailure;\n }",
"@Override\n protected void validateRegisteredDevice(MultifactorDevice device) throws Exception {\n assertThat(device.getBackup(), is(Boolean.TRUE));\n }",
"@Test\n public void testDemotivatorCreateSuccess() throws IOException{\n \tFixtures.deleteAllModels();\n \tFixtures.loadModels(\"data/user.yml\");\n \t\n \tauthenticate();\n \t\n \tMap<String, String> createDemoParams = new HashMap<String, String>();\n \tcreateDemoParams.put(\"title\", THIRTY_CHARS_TITLE);\n \tcreateDemoParams.put(\"text\", EIGHTY_CHARS_TEXT);\n \tcreateDemoParams.put(\"mode\", \"create\");\n \tMap<String, File> fileParams = new HashMap<String, File>();\n \tFile file = new File(\"test/data/image.jpg\");\n \tfileParams.put(\"image\", file);\n\n \tResponse response = POST(\"/create\", createDemoParams, fileParams);\n\n \tassertStatus(200, response);\n \tassertContentType(\"application/json; charset=utf-8\", response);\n \t\n \tList<Demotivator> demos = Demotivator.findAll();\n \tassertEquals(1, demos.size());\n \tassertEquals(THIRTY_CHARS_TITLE, demos.get(0).getTitle());\n \tassertEquals(EIGHTY_CHARS_TEXT, demos.get(0).getText());\n \tassertEquals(\"localhost\", demos.get(0).getDomain().getName());\n \tlong id = demos.get(0).getId().longValue();\n \t\n \tassertContentEquals(\"{\\\"fileName\\\":\\\"/image/thumb.test.file.name\\\",\\\"id\\\":\\\"\" + id + \"\\\",\\\"status\\\":\\\"success\\\"}\", response);\n }",
"@Test\n final void testDeleteDeviceNotExisting() {\n assertThrows(\n ExceptionType.DeviceNotFoundException.class,\n () -> deviceController.deleteDevice(\"Not Available device\"));\n }",
"@Test\n public void getDeviceTest() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);\n\n assertEquals(device, getDevice(DatabaseTest.DEVICE_ID));\n DatabaseTest.cleanDatabase();\n }",
"@Test\n public void authenticateTestSucces() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);\n assertTrue(device.authenticate());\n DatabaseTest.cleanDatabase();\n }",
"@Test\n public void authenticateTestFailure2() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, \"other_token\");\n assertFalse(device.authenticate());\n DatabaseTest.cleanDatabase();\n }",
"private void createDevice(String host, int port, String name) {\n ThingUID uid = new ThingUID(THING_TYPE_DEVICE, name);\n\n if (uid != null) {\n Map<String, Object> properties = new HashMap<>(1);\n properties.put(\"hostname\", host);\n properties.put(\"port\", port);\n properties.put(\"name\", name);\n DiscoveryResult result = DiscoveryResultBuilder.create(uid).withProperties(properties)\n .withLabel(\"Kinect Device\").build();\n thingDiscovered(result);\n }\n }",
"Device_Resource createDevice_Resource();",
"@Test\n public void authenticateTestFailure() {\n assertFalse(device.authenticate());\n }",
"public void newDeviceStatus(String deviceId, Boolean statusOK);",
"public void createFailure() {\n\t\tgetController().changeFree(true);\t\t\n\t\tdisplayAdvertisement(\"opponent failure\");\n\t\tvalidate();\n\t}",
"public Device createObject(String brand, String model, Integer price, String photo, String date);",
"public boolean create()\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn file.createNewFile() ;\n\t\t}\n\t\tcatch( IOException ex )\n\t\t{\n\t\t\tex.printStackTrace() ;\n\t\t\treturn false ;\n\t\t}\n\t}",
"public void shouldCreate() {\n }",
"@Override\n\tprotected boolean isExist(AbnormalDevice record) {\n\t\treturn false;\n\t}",
"@Test\n @SuppressWarnings({\"PMD.JUnitTestsShouldIncludeAssert\"})\n public void testCreateRoomOkResponse() {\n // given\n final CreateRoomRequest createRoomRequest = CreateRoomRequest.builder().name(TEST_ROOM).build();\n given(clientResponseProvider.sendPostRequest(\n MultiUserChatConstants.MULTI_USER_CHAT_CREATE_ROOM_COMMAND, createRoomRequest))\n .willReturn(OK_RESPONSE);\n\n // when\n multiUserChatService.createRoom(TEST_ROOM);\n\n // then\n\n }",
"@SmallTest\n public void testCreate() {\n int result = -1;\n if (this.entity != null) {\n Settings settings = SettingsUtils.generateRandom(this.ctx);\n\n result = (int)this.adapter.insert(settings);\n\n Assert.assertTrue(result >= 0);\n }\n }",
"@Test(expected = SystemObjectIdException.class)\n public void shouldThrowExceptionIfExceptionWhenIdentifyDevice() throws IOException {\n\n expect(configuration.createPDU(PDU.GET)).andReturn(new PDU());\n\n expect(snmpInterface.send(isA(PDU.class), same(target))).andThrow(new IOException());\n replayAll();\n\n try {\n session.identifyDevice();\n assert false : \"Should not reach\";\n } finally {\n verifyAll();\n }\n }",
"public void addDevice()\r\n\t\t{\n\t\t\t\r\n\t\t\tSystem.out.println(\" Enter Device Name \");\r\n\t\t\tString devName = sc.nextLine();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Enter cost of the device \");\r\n\t\t\tint devCost = Integer.parseInt(sc.nextLine());\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Give the average rating for the device \");\r\n\t\t\tint devRating = Integer.parseInt(sc.nextLine());\r\n\t\t\t\r\n\t\t\tSystem.out.println(\" Enter Device Brand Name \");\r\n\t\t\tString devBrand = sc.nextLine();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tDevice newDevice = new Device(devName, devCost,devRating,devBrand);\r\n\t\t\tString modelNumber = record.addDevice(newDevice);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\" Device Inserted :- \"+modelNumber);\r\n\t\t}",
"private void doCreateNewPartner() {\n Scanner sc = new Scanner(System.in);\n System.out.println(\"***Hors Management System:: System Administration:: Create new partner\");\n Partner partner = new Partner();\n System.out.print(\"Enter partner username:\");\n partner.setName(sc.nextLine().trim());\n System.out.print(\"Enter partner password;\");\n partner.setPassword(sc.nextLine().trim());\n\n Set<ConstraintViolation<Partner>> constraintViolations = validator.validate(partner);\n\n if (constraintViolations.isEmpty()) {\n partner = partnerControllerRemote.createNewPartner(partner);\n System.out.println(\"New partner created successfully\");\n } else {\n showInputDataValidationErrorsForPartner(constraintViolations);\n }\n\n }",
"@Override\n public CreateWirelessDeviceResult createWirelessDevice(CreateWirelessDeviceRequest request) {\n request = beforeClientExecution(request);\n return executeCreateWirelessDevice(request);\n }",
"@Test\n public void testCreateProductShouldCorrect() throws Exception {\n when(productRepository.existsByName(productRequest.getName())).thenReturn(false);\n when(productRepository.save(any(Product.class))).thenReturn(product);\n\n testResponseData(RequestInfo.builder()\n .request(post(PRODUCT_ENDPOINT))\n .token(adminToken)\n .body(productRequest)\n .httpStatus(HttpStatus.OK)\n .build());\n }",
"@Test\r\n public void testCreateMyDid() throws SodiumException {\r\n CryptoService instance = new CryptoService();\r\n Pair<Did, Keys> result = instance.createMyDid(new MyDidInfo(\"NcYxiDXkpYi6ov5FcYDi1e\", null));\r\n assertEquals(result.first.did, \"NcYxiDXkpYi6ov5FcYDi1e\");\r\n }",
"public abstract void addDevice(Context context, NADevice device);",
"int insert(Device record);",
"int insert(Device record);",
"@Test\n public void addition_isCorrect() throws Exception {\n\n\n DeviceConfigIdentity identity = new DeviceConfigIdentity(\"bo5aph\",\"typedevice\",\"pidevice\");\n DeviceConfigAuth auth = new DeviceConfigAuth(\"123456789\");\n DeviceConfigOptions options = new DeviceConfigOptions();\n options.mqtt.port = 8883;\n options.mqtt.keepAlive = 1;\n DeviceConfig config = new DeviceConfig(identity, auth,options);\n DeviceClient deviceClient2 = new DeviceClient(config);\n deviceClient2.registerCodec(new JsonCodec());\n deviceClient2.connect();\n JsonObject data = new JsonObject();\n data.addProperty(\"mode\", \"manual\");\n data.addProperty(\"dir\", \"F\");\n data.addProperty(\"speed\", \"100\");\n deviceClient2.publishEvent(\"data\", data);\n\n deviceClient2.disconnect();\n }",
"@Test\n\tpublic void driverCreatePositiveTest() {\n\t\tDriver driver;\n\t\tUserAccount ua;\n\t\tfinal Authority authority;\n\t\tCollection<Authority> authorities;\n\n\t\tdriver = this.driverService.create();\n\t\tua = this.userAccountService.create();\n\t\tauthority = new Authority();\n\t\tauthority.setAuthority(Authority.DRIVER);\n\t\tauthorities = new ArrayList<Authority>();\n\t\tauthorities.add(authority);\n\n\t\tdriver.setName(\"Name\");\n\t\tdriver.setSurname(\"Surname\");\n\t\tdriver.setCountry(\"Country\");\n\t\tdriver.setCity(\"City\");\n\t\tdriver.setBankAccountNumber(\"ES4963116815932885489285\");\n\t\tdriver.setPhone(\"698456847\");\n\t\tdriver.setChilds(true);\n\t\tdriver.setMusic(true);\n\t\tdriver.setSmoke(false);\n\t\tdriver.setPets(true);\n\n\t\tua.setUsername(\"[email protected]\");\n\t\tua.setPassword(\"newdriver\");\n\t\tua.setAuthorities(authorities);\n\n\t\tdriver.setUserAccount(ua);\n\n\t\tthis.driverService.save(driver);\n\t\tthis.driverService.flush();\n\t}",
"@Test\n final void testDeleteDevice() {\n when(deviceDao.deleteDevice(user, DeviceFixture.SERIAL_NUMBER)).thenReturn(Long.valueOf(1));\n ResponseEntity<String> response = deviceController.deleteDevice(DeviceFixture.SERIAL_NUMBER);\n assertEquals(200, response.getStatusCodeValue());\n assertEquals(\"Device with serial number 1 deleted\", response.getBody());\n }",
"@Test\n public void testCreateProductShouldThrowResourceExistsWhenProductExists() throws Exception {\n // Mock method\n when(productRepository.existsByName(productRequest.getName())).thenReturn(true);\n\n testResponseData(RequestInfo.builder()\n .request(post(PRODUCT_ENDPOINT))\n .token(adminToken)\n .body(productRequest)\n .httpStatus(HttpStatus.CONFLICT)\n .jsonMap(createJsonMapError(PRODUCT_EXIST))\n .build());\n }",
"@Test\n final void testRetrieveDeviceEmpty() {\n assertThrows(\n ExceptionType.DeviceNotFoundException.class,\n () -> deviceController.retrieveDevice(\"NotAvailable\"));\n }",
"@Test\n public void findDevice() throws Exception {\n MockUpnpService upnpService = new MockUpnpService();\n LocalDevice device = SampleData.createLocalDevice();\n upnpService.getRegistry().addDevice(device);\n\n UDN udn = device.getIdentity().getUdn();\n\n Registry registry = upnpService.getRegistry(); // DOC: FIND_ROOT_UDN\n Device foundDevice = registry.getDevice(udn, true);\n\n assertEquals(foundDevice.getIdentity().getUdn(), udn); // DOC: FIND_ROOT_UDN\n\n LocalDevice localDevice = registry.getLocalDevice(udn, true); // DOC: FIND_LOCAL_DEVICE\n assertEquals(localDevice.getIdentity().getUdn(), udn);\n\n SampleDeviceRootLocal.assertLocalResourcesMatch(\n upnpService.getConfiguration().getNamespace().getResources(device)\n );\n }",
"@Override\n\tpublic String create( List<Device> newDevices )\n\t{\n\t\tResponse response = this.getPartner().getServiceClient().post(\n\t\t\tthis.getPartner(), \n\t\t\tnew TypeReference<Response>(){}, \n\t\t\tMessageFormat.format(\n\t\t\t\tPartnerService.getInstance().getConfiguration().getApis().get(\"AddDevicestoDeviceBatch\").getPath(),\n\t\t\t\tthis.getContext().getItem1(),\n\t\t\t\tthis.getContext().getItem2()),\n\t\t\tnewDevices);\n\n\t\treturn response.header(\"location\");\n\t}",
"public void testCrearDispositivo() {\n\t\tString referencia = \"A0021R\";\n\t\tString nombre = \"Motorola G primera generacion\";\n\t\tString descripcion = \"1 GB de RAM\";\n\t\tint tipo = 1;\n\t\tString foto = \"url\";\n\t\tString emailAdministrador = \"[email protected]\";\n\t\ttry {\n\t\t\tdispositivoBL.crearDispositivo(referencia, nombre, descripcion, tipo, foto, emailAdministrador);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Test\n public void validUserCreation() {\n boolean success = this.userDAO.insertNewUser(testUser);\n\n Assertions.assertTrue(success);\n }",
"@Test\n\tpublic void registerUserFailingTest() throws RemoteException, NoSuchAlgorithmException, InvalidKeySpecException, IOException, InvalidKeyException, SignatureException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, UnrecoverableKeyException, KeyStoreException, CertificateException {\n\t\tPasswordManager pm = new PasswordManager(8080);\n\n\t\t// Register with a malformed message\n\t\tString response = pm.registerUser(DatatypeConverter.printBase64Binary(cliPubKey.getEncoded()), \n\t\t\t\tDigitalSignature.getSignature(cliPubKey.getEncoded(),servPrivKey));\n\t\t\n\t\t// Analyse the correctness of the answer\n\t\tAssert.assertEquals(response, \"Error-Error-Error-Error-Error\");\n\t}",
"public void successfulCreation(String type) {\n switch (type) {\n case \"Attendee\":\n System.out.println(\"Attendee Created\");\n break;\n case \"Organizer\":\n System.out.println(\"Organizer Created\");\n break;\n case \"Speaker\":\n System.out.println(\"Speaker Created\");\n break;\n case \"VIP\":\n System.out.println(\"VIP Created\");\n break;\n }\n }",
"private void createCar() throws Exception {\n\t\tString id = \"\", make, model, driverName;\n\t\tString type, refreshments;\n\t\tboolean proceed = true;\n\t\tdouble sscStandardFee = 0;\n\t\tint numPassengers = 0;\n\t\tSystem.out.print(\"Enter registration number: \");\n\t\tid = promptUserForRegNo();\n\t\t\n\t\tif (id.length() != 0) {\n\t\t\t\n\t\t\t// Get details required for creating a car.\n\t\t\tSystem.out.print(\"Enter Make: \");\n\t\t\tmake = console.nextLine();\n\t\t\t\n\t\t\tif (make.length() == 0) {\n\t\t\t\tthrow new InvalidMakeException(\"Error: Make is empty.\");\n\t\t\t}\n\n\t\t\tSystem.out.print(\"Enter Model: \");\n\t\t\tmodel = console.nextLine();\n\t\t\t\n\t\t\tif (model.length() == 0) {\n\t\t\t\tthrow new InvalidModelException(\"Error: Model is empty.\");\n\t\t\t}\n\n\t\t\tSystem.out.print(\"Enter Driver Name: \");\n\t\t\tdriverName = console.nextLine();\n\t\t\t\n\t\t\tif (driverName.length() == 0) {\n\t\t\t\tthrow new InvalidDriverNameException(\"Error: Driver Name is empty.\");\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSystem.out.print(\"Enter number of passengers: \");\n\t\t\t\tnumPassengers = promptForPassengerNumbers();\n\t\t\t}\n\t\t\t\n\t\t\tcatch (NumberFormatException e) {\n\t\t\t\tSystem.out.println(\"Error: Number should be an integer from 1 to 9\");\n\t\t\t\tproceed = false;\n\t\t\t}\n\t\t\t\n\t\t\t// If there is no errors, continue.\n\t\t\tif (proceed) {\n\t\t\t\tSystem.out.println(\"Enter Service Type (SD/SS): \");\n\t\t\t\t\n\t\t\t\ttype = console.nextLine().toUpperCase();\n\t\t\t\t\n\t\t\t\tif (!type.equals(\"SD\") && !type.equals(\"SS\")) {\n\t\t\t\t\tthrow new InvalidServiceTypeException(\"Error: Service Type is invalid.\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (type.equals(\"SD\")) {\n\t\t\t\t\tboolean result = application.checkIfCarExists(id);\n\t\t\n\t\t\t\t\tif (!result) {\n\t\t\t\t\t\tString carRegistrationNumber = application.createCar(id, make, model, driverName, numPassengers);\n\t\t\t\t\t\tSystem.out.println(carRegistrationNumber);\n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t\telse {\n\t\t\t\t\t\tthrow new InvalidRegNoException(\"Error: Already exists in the system\");\n//\t\t\t\t\t\tSystem.out.println(\"Error - Already exists in the system\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (type.equals(\"SS\")) {\n\t\t\t\t\tboolean proceed2 = true;\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tSystem.out.println(\"Enter Standard Fee: \");\n\t\t\t\t\t\tsscStandardFee = Double.parseDouble(console.nextLine());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcatch (NumberFormatException e) {\n\t\t\t\t\t\tSystem.out.println(\"Error: Please input a numeric value\");\n\t\t\t\t\t\tproceed2 = false;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (proceed2) {\n\t\t\t\t\t\tSystem.out.println(\"Enter List of Refreshments: \");\n\t\t\t\t\t\trefreshments = console.nextLine();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (refreshments.substring(refreshments.length() - 1).equals(\",\")) {\n\t\t\t\t\t\t\trefreshments = refreshments.substring(0, refreshments.length() - 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tboolean result = application.checkIfCarExists(id);\n\t\t\t\t\t\tboolean result2 = application.bookingFeeSilverServiceCar(sscStandardFee);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!result && result2) {\n\t\t\t\t\t\t\tString carRegistrationNumber = application.createCar(id, make, model, driverName, numPassengers, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsscStandardFee, refreshments);\n\t\t\t\t\t\t\tSystem.out.println(carRegistrationNumber);\n\t\t\t\t\t\t} \n\t\t\t\t\t\t\n\t\t\t\t\t\telse if (!result && !result2) {\n\t\t\t\t\t\t\tthrow new InvalidSSCFeeException(\"Error - Standard Fee must be $3.00 or more.\");\n\t//\t\t\t\t\t\tSystem.out.println(\"Error - Standard Fee must be $3.00 or more.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthrow new InvalidRegNoException(\"Error - Already exists in the system\");\n\t//\t\t\t\t\t\tSystem.out.println(\"Error - Already exists in the system\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public boolean CreateComputer()\n\t{\n\t\t//Click on Add a new Computer on Home Page to Navigate to Creation of Computer Page\n\t\tAddComputer.click();\n\t\t\n\t\t//Wait Time after each transaction\n\t\tWebDriverWait wait = new WebDriverWait(driver,2);\n\t\t\n\t\tboolean CreateComputerbutt = CreateComputerButt.isEnabled();\n\t\treturn CreateComputerbutt;\n\t}",
"private SmartDevice createDevice(Cursor cursor){\n String id = cursor.getString(cursor.getColumnIndex(COLUMN_ID));\n String name = cursor.getString(cursor.getColumnIndex(COLUMN_NAME));\n String type = cursor.getString(cursor.getColumnIndex(COLUMN_TYPE));\n String active = cursor.getString(cursor.getColumnIndex(COLUMN_ACTIVE));\n String image = cursor.getString(cursor.getColumnIndex(COLUMN_IMAGE));\n return new SmartDevice(id, name, type, active, image);\n }",
"public boolean createConnection() throws CommunicationException;",
"@Override\n public void onFailure(int code, String msg) {\n Log.d(\"haha\", \"创建数据失败:\" + msg);\n }",
"public void createConnection() throws UsbGateException {\n mUsbConnection = mUsbManager.openDevice(mUsbDevice);\n if (mUsbConnection != null)\n connected = true;\n else\n throw new UsbGateException(\"Cannot get connection\");\n }",
"@Test\n\tpublic void test_create_new_user_success(){\n\t\tUser user = new User(null, \"create_user\", \"[email protected]\", \"12345678\");\n\t\tResponseEntity<User> response = template.postForEntity(REST_SERVICE_URI + ACCESS_TOKEN + token, user, User.class);\n\t\tUser newUser = response.getBody();\n\t\tassertThat(newUser.getName(), is(\"create_user\"));\n\t\tassertThat(response.getStatusCode(), is(HttpStatus.CREATED));\n\t\tvalidateCORSHttpHeaders(response.getHeaders());\n\t}",
"@Test\n public void testRegisterSuccessfully() {\n SignUpRequest request = new SignUpRequest(UNIQUE, \"Secret\");\n\n dao.register(request);\n\n verify(controller).registered();\n }",
"public int doesDeviceExist(String device){\n DBSQLiteHelper DBhelper = new DBSQLiteHelper(getApplicationContext());\n SQLiteDatabase db = DBhelper.getReadableDatabase();\n\n String[] select = {\n DBContract.Devices.COLUMN_DEVICE,\n DBContract.Devices.COLUMN_TYPE\n };\n\n String where = DBContract.Devices.COLUMN_DEVICE + \" = ?\";\n\n String[] whereValues = {device};\n\n Cursor cursor = db.query(\n DBContract.Devices.TABLE_NAME, // The table to query\n select, // The columns to return\n where, // The columns for the WHERE clause\n whereValues, // The values for the WHERE clause\n null, // don't group the rows\n null, // don't filter by row groups\n null // don't sort\n );\n\n cursor.moveToFirst();\n if(cursor.getCount() == 0){ //No such device exists\n return -1;\n }\n else if(cursor.getInt(1) == 0){ //Device registered to a runner (GOOD)\n return 0;\n }\n else //Device registered to a contact (BAD)\n return 1;\n }",
"private void attemptCreation() {\n newFlat.setAddressLine1(\"\");\n newFlat.setPostcode(\"\");\n newFlat.setNotes(\"\");\n newFlat.setFlatNum(\"\");\n newFlat.setTenant(\"\");\n\n // Reset errors\n actvProperty.setError(null);\n etFlatNum.setError(null);\n etFlatNotes.setError(null);\n flatTenant.setError(null);\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for valid address, if the user entered one\n if (TextUtils.isEmpty(actvProperty.getText().toString())) {\n actvProperty.setError(\"This field is required\");\n cancel = true;\n focusView = actvProperty;\n } else if (!isAddressValid(actvProperty.getText().toString())) {\n actvProperty.setError(\"This address is invalid\");\n cancel = true;\n focusView = actvProperty;\n }\n\n // Check for a valid flat number, if the user entered one\n if (TextUtils.isEmpty(etFlatNum.getText().toString())) {\n etFlatNum.setError(\"This field is required\");\n cancel = true;\n if (focusView == null) {\n focusView = etFlatNum;\n }\n } else if (!isFlatNumValid(\"Flat \" + etFlatNum.getText().toString())) {\n etFlatNum.setError(\"This flat number is in use\");\n cancel = true;\n if (focusView == null) {\n focusView = etFlatNum;\n }\n\n Collections.sort(flatNums);\n\n new AlertDialog.Builder(this)\n .setIcon(android.R.drawable.ic_dialog_alert)\n .setTitle(\"Warning\")\n .setMessage(\"These flats already exist in \" + actvProperty.getText().toString()\n + \":\\n\\n\" + flatNums.toString() + \"\\n\\nPlease enter a unique number.\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n })\n .show();\n }\n\n // Check for valid tenant, if the user entered one\n if (TextUtils.isEmpty(flatTenant.getText().toString())) {\n // No need to add a tenant\n } else if (!isTenantValid(flatTenant.getText().toString())) {\n flatTenant.setError(\"This tenant does not exist in the system\");\n cancel = true;\n if (focusView == null) {\n focusView = flatTenant;\n }\n } else if (!isTenantFree(flatTenant.getText().toString())) {\n flatTenant.setError(\"This tenant number is in use\");\n cancel = true;\n if (focusView == null) {\n focusView = flatTenant;\n }\n }\n\n // Check for notes and add default notes if null\n if (TextUtils.isEmpty(etFlatNotes.getText().toString())) {\n etFlatNotes.setText(\"No notes yet. That's okay, you can add some later..\");\n }\n\n if (cancel) {\n // There was an error; don't attempt creation and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n inputMethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);\n saveNewFlat();\n }\n }",
"@Test\n public void shouldCreateAnValidRoomAndPersistIt() throws Exception {\n\n\tfinal CreateRoomCommand command = new CreateRoomCommand(\n\t\tArrays.asList(validRoomOfferValues));\n\n\tfinal UrlyBirdRoomOfferService roomOfferService = new UrlyBirdRoomOfferService(\n\t\tdao, builder, isOccupancyIn48Hours, isRoomBookable);\n\n\twhen(isOccupancyIn48Hours.isSatisfiedBy((Date) any())).thenReturn(true);\n\twhen(dao.create(Arrays.asList(validRoomOfferValues))).thenReturn(\n\t\tvalidRoomOffer);\n\n\tfinal UrlyBirdRoomOffer createdRoomOffer = roomOfferService\n\t\t.createRoomOffer(command);\n\n\tverify(dao).create(Arrays.asList(validRoomOfferValues));\n\tassertThat(createdRoomOffer, is(equalTo(validRoomOffer)));\n }",
"public void testCreateFileSuccess() throws Exception {\r\n assertNotNull(\"setup fails\", filePersistence);\r\n String fileCreationId = filePersistence.createFile(VALID_FILELOCATION, FILENAME);\r\n assertTrue(\"fileCreationId shouldn't be null or empty\", fileCreationId != null\r\n && fileCreationId.trim().length() != 0);\r\n filePersistence.closeFile(fileCreationId);\r\n filePersistence.deleteFile(VALID_FILELOCATION, FILENAME);\r\n }",
"protected boolean _isEventForSuccessfulCreate(final PersistenceOperationOKEvent opEvent) {\n\t\tPersistenceOperationOK opResult = opEvent.getResultAsOperationOK();\n\t\tboolean handle = _crudOperationOKEventFilter.hasTobeHandled(opEvent);\n\t\tif (!handle) return false;\n\t\n\t\treturn ((opResult.isCRUDOK()) \n\t\t\t && (opResult.as(CRUDOK.class).hasBeenCreated()));\t\t\t\t\t\t\t\t\t\t\t\t// it's a create event\n\t}",
"@Test\n public void createNewUserAndCheckIt() {\n UserLogin userLogin = new UserLogin();\n userLogin.setUserLogin(\"068-068-68-68\");\n userLogin.setUserPassword(\"12345\");\n boolean isThrow = false;\n try {\n UserResponse userResponse = loginsService.checkLoginSignInSignUp(userLogin, \"SignUp\");\n } catch (ApplicationException e) {\n isThrow = true;\n }\n assertThat(isThrow);\n\n //Successful registration\n userLogin.setUserPasswordNew(\"12345\");\n UserResponse userResponse = loginsService.checkLoginSignInSignUp(userLogin, \"SignUp\");\n\n assertThat(userResponse.getUserPhone().equals(usersService.normalizeAndCheckPhoneFormat(userLogin.getUserLogin())));\n assertThat(userResponse.getUserPoints()).size().isEqualTo(5);\n }",
"@Test\n @SuppressWarnings({\"PMD.JUnitTestsShouldIncludeAssert\"})\n public void testCreateRoomWithOptionsOkResponse() {\n // given\n Map<String, String> options = new HashMap<>();\n final CreateRoomRequest createRoomRequest =\n CreateRoomRequest.builder().name(TEST_ROOM).options(options).build();\n given(clientResponseProvider.sendPostRequest(\n MultiUserChatConstants.MULTI_USER_CHAT_CREATE_ROOM_WITH_OPT_COMMAND, createRoomRequest))\n .willReturn(OK_RESPONSE);\n\n // when\n multiUserChatService.createRoomWithOptions(TEST_ROOM, options);\n\n // then\n }",
"@Test\r\n public void testMake() throws Exception\r\n {\n ProductType myPT = ProductType.OPAD;\r\n SerialNumber mySN = new SerialNumber(new BigInteger(\"8\"));\r\n Product myOpad = AbstractProduct.make(myPT, mySN, Optional.empty());\r\n Product myOpadTest = new Opad(mySN, Optional.empty());\r\n assertEquals(myOpadTest, myOpad);\r\n\r\n // Test 2: Shows invalid product type exception thrown\r\n try\r\n {\r\n Product myOpod = AbstractProduct.make(null, mySN, Optional.empty());\r\n }catch(ProductException productException){\r\n assertEquals(ProductException.ErrorCode.INVALID_PRODUCT_TYPE, productException.getErrorCode());\r\n }\r\n\r\n // Test 3: Shows invalid serial number exception thrown\r\n mySN = new SerialNumber(new BigInteger(\"4\"));\r\n myPT = ProductType.OPAD;\r\n try\r\n {\r\n myOpad = AbstractProduct.make(myPT, mySN, Optional.empty());\r\n }catch(ProductException productException){\r\n assertEquals(ProductException.ErrorCode.INVALID_SERIAL_NUMBER, productException.getErrorCode());\r\n }\r\n }",
"public boolean makeDirectory(){\n File root = new File(Environment.getExternalStorageDirectory(),\"OQPS\");\n if(!root.exists()){\n return root.mkdir();\n }\n return true; //folder already exists\n }",
"public boolean deviceSave(Device device) {\n\t\tdevice.setRegisterTime(new Date());\n\t\tdeviceDao.save(device);\n\t\treturn true;\n\t}",
"@Test\n\tpublic void testInsertRecipeFailure() {\n\t\tint recipeId = recipeDao.insertRecipe(recipe);\n\n\t\tassertEquals(0, recipeId);\n\n\t}",
"private static void doCreateDir() {\n String newDir = \"new_dir\";\n boolean success = (new File(newDir)).mkdir();\n\n if (success) {\n System.out.println(\"Successfully created directory: \" + newDir);\n } else {\n System.out.println(\"Failed to create directory: \" + newDir);\n }\n\n // Create a directory; all non-existent ancestor directories are\n // automatically created.\n newDir = \"c:/export/home/jeffreyh/new_dir1/new_dir2/new_dir3\";\n success = (new File(newDir)).mkdirs();\n\n if (success) {\n System.out.println(\"Successfully created directory: \" + newDir);\n } else {\n System.out.println(\"Failed to create directory: \" + newDir);\n }\n\n }",
"private Device buildDevice() {\n Device device = Device.builder()\n .text(Narrative.builder().div(Xhtml.of(\"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\">Generated</div>\")).status(NarrativeStatus.GENERATED).build())\n .meta(Meta.builder()\n .profile(Canonical.of(\"http://ibm.com/fhir/StructureDefinition/test-device|0.1.0\"))\n .build())\n .statusReason(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(\"http://terminology.hl7.org/CodeSystem/device-status-reason\")).code(Code.of(\"online\")).build()).build())\n .specialization(Specialization.builder()\n .systemType(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(ENGLISH_US)).build()).build()).build())\n .extension(Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-primary-extension\")\n .value(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(ENGLISH_US)).build()).build()).build(),\n Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-secondary-extension\")\n .value(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(ENGLISH_US)).build()).build(),\n Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-tertiary-extension\")\n .value(Code.of(ENGLISH_US)).build())\n .build();\n return device;\n }",
"public boolean addDevice(Device i_dev) throws SQLException {\n\t\treturn addDevice(i_dev.getProtoDevice().getId(), i_dev.getCustomer_id(), i_dev.getSerial_number());\n\t}",
"@Test\n public void testRegisterExistingPatient(){\n register.registerPatient(\"Mikke\",\"Mus\",\"24120012345\", \"Doctor Proctor\");\n assertThrows(IllegalArgumentException.class,\n () -> { register.registerPatient(\"Donald\", \"Duck\", \"24120012345\", \"Doctor Proctor\") ;});\n assertEquals(1, register.getRegisterSize());\n }",
"private void authenticateSimulatedDevice() {\n mSimulatedDevice.writeln(TestsConfig.deviceWelcome.toString());\n TestsConfig.delay(300);\n \n // check if everything is ok, and get the device instance\n mDeviceInstance = mMainServer.getDevice(\n TestsConfig.deviceWelcome.getString(\"identifier\"));\n assertNotNull(mDeviceInstance);\n }",
"@Before\n public void setup() {\n device = new Device(deviceID, token);\n }",
"boolean hasDevice();",
"@Test\n public void createUser() {\n Response response = regressionClient.createUser();\n dbAssist.responseValidation(response);\n }",
"@Test\n @SuppressWarnings({\"PMD.JUnitTestsShouldIncludeAssert\"})\n public void testCreateRoomBadResponse() {\n // given\n final CreateRoomRequest createRoomRequest = CreateRoomRequest.builder().name(TEST_ROOM).build();\n given(clientResponseProvider.sendPostRequest(\n MultiUserChatConstants.MULTI_USER_CHAT_CREATE_ROOM_COMMAND, createRoomRequest))\n .willReturn(BAD_RESPONSE);\n\n // when\n multiUserChatService.createRoom(TEST_ROOM);\n\n // then\n\n }",
"DeviceState createDeviceState();",
"private void registerDevice(String deviceRegistrationId, User user) {\n Device device = Device.createDevice(deviceRegistrationId, user);\n ofy().save().entity(device).now();\n }",
"private boolean generateDeviceImages() throws Exception {\n mDevice.executeShellCommand(STOP_CMD);\n\n // Start instrumentation test.\n final CollectingOutputReceiver receiver = new CollectingOutputReceiver();\n mDevice.executeShellCommand(START_CMD, receiver, TEST_RESULT_TIMEOUT,\n TimeUnit.MILLISECONDS, 0);\n\n return receiver.getOutput().contains(\"OK \");\n }",
"@Test\n public void create_400() throws Exception {\n\n // PREPARE THE DATABASE\n // No data needed in database\n\n // PREPARE THE TEST\n // No preparation needed\n\n // DO THE TEST\n Response response = callAPI(VERB.POST, \"/mo/\", null);\n\n // CHECK RESULTS\n int status = response.getStatus();\n assertEquals(400, status);\n\n String body = response.readEntity(String.class);\n assertEquals(\"Wrong inputs\", body);\n\n }",
"@Test\n public void CardRequirementError() {\n MSG_ACTION_ACTIVATE_LEADERCARD message = new MSG_ACTION_ACTIVATE_LEADERCARD(0);\n DevelopmentCard card1 = new DevelopmentCard(1, Color.GREEN, 0, null, null);\n p.getDevelopmentSlot().addCard(card1, 1);\n c.emptyQueue();\n assertFalse(am.activateLeaderCard(p, message));\n assertEquals(MessageType.MSG_ERROR, c.messages.get(0).getMessageType());\n assertEquals(1, c.messages.size());\n }",
"@Test\n public void findDeviceByType() throws Exception {\n MockUpnpService upnpService = new MockUpnpService();\n LocalDevice device = SampleData.createLocalDevice();\n upnpService.getRegistry().addDevice(device);\n\n Registry registry = upnpService.getRegistry();\n\n try {\n DeviceType deviceType = new UDADeviceType(\"MY-DEVICE-TYPE\", 1); // DOC: FIND_DEV_TYPE\n Collection<Device> devices = registry.getDevices(deviceType); // DOC: FIND_DEV_TYPE\n assertEquals(devices.size(), 1);\n } finally {}\n\n try {\n ServiceType serviceType = new UDAServiceType(\"MY-SERVICE-TYPE-ONE\", 1); // DOC: FIND_SERV_TYPE\n Collection<Device> devices = registry.getDevices(serviceType); // DOC: FIND_SERV_TYPE\n assertEquals(devices.size(), 1);\n } finally {}\n }",
"@Override\n\tpublic void onDeviceGetConfigFailed(FunDevice funDevice, Integer errCode) {\n\t\tToast.makeText(\n\t\t\t\tthis,\n\t\t\t\tthis.getResources().getString(\n\t\t\t\t\t\tR.string.devices_socket_save_failure),\n\t\t\t\tToast.LENGTH_SHORT).show();\n\t}",
"@Test\n public void getDeviceIDTest() {\n assertEquals(deviceID, device.getDeviceID());\n }",
"void createRecipe(Recipe recipe) throws ServiceFailureException;",
"public Device() {\n }",
"public boolean newClients(String deviceID) {\n \n PreparedStatement queryData = null;\n \n try {\n System.out.println(\"System: newClient() = \" + ClientsTbl.STMT_WHERE_DEVICEID_EQUALS + \" => \" + deviceID);\n queryData = mDb.prepareStatement(ClientsTbl.STMT_WHERE_DEVICEID_EQUALS);\n System.out.println(\"System: newClient() = \" + queryData.toString());\n queryData.setString(1, deviceID);\n System.out.println(\"System: newClient() = \" + queryData.toString());\n ResultSet rs = queryData.executeQuery();\n return rs.first();\n } catch (SQLException ex) {\n System.err.println(ex);\n if (mDb != null) {\n try {\n System.out.print(\"System: newClients(): Transaction is being rolled back\");\n mDb.rollback();\n } catch(SQLException excep) {\n System.err.print(excep);\n }\n }\n return false;\n } finally {\n if (queryData != null) {\n try {\n System.out.print(\"System: newClients(): Transaction will be closed\");\n queryData.close();\n } catch(SQLException excep) {\n System.err.print(excep);\n } \n }\n }\n }",
"private void addDeviceItem() throws SQLException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\ttry{\r\n\t\t\tnameDevice = edtNameDevice.getText().toString().trim();\r\n\t\t\tportDevice = Integer.parseInt(edtPortDevice.getText().toString().trim());\r\n\t\t\troomID = getIntent().getExtras().getInt(\"room_id\");\r\n\t\t\t\r\n\t\t\tDeviceItem item = new DeviceItem(roomID, nameDevice, typeDevice, portDevice, statusDevice);\r\n\t\t\tDeviceItemController.getInstance(AddDeviceItemActivity.this).createDeviceItem(item);\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t\tToast.makeText(AddDeviceItemActivity.this, \"Add device item error. Please verify your device infomations!\", Toast.LENGTH_SHORT).show();\r\n\t\t}\r\n\t}",
"public boolean createPatient(Patient patient,PatientRecord patientRecord) {\r\n\t\tboolean isCreated= false;\r\n\t\tString[] row= new String[9];\r\n\t\ttry {\r\n\t\t\tString query = \"INSERT INTO patients VALUES (?,?,?,?,?,?,?,?,?,?,?,?)\";\r\n\t\t\tPreparedStatement pStatement= super.getConnection().prepareStatement(query);\r\n\t\t\tpStatement.setInt(1, patient.getId());\r\n\t\t\tpStatement.setString(2, patient.getFirstName());\r\n\t\t\tpStatement.setString(3, patient.getLastName());\r\n\t\t\tpStatement.setString(4, patient.getGender());\r\n\t\t\tpStatement.setInt(5, patient.getAge());\r\n\t\t\tpStatement.setString(6, patient.getPhone());\r\n\t\t\tpStatement.setString(7, patient.getAddress().getVillege());\r\n\t\t\tpStatement.setString(8, patient.getAddress().getCommune());\r\n\t\t\tpStatement.setString(9, patient.getAddress().getCity());\r\n\t\t\tpStatement.setString(10, patient.getAddress().getProvince());\r\n\t\t\tpStatement.setString(11, patient.getAddress().getCountry());\r\n\t\t\tpStatement.setString(12, patient.getType());\r\n\t\t\t\r\n\t\t\tif(pStatement.executeUpdate() > 0) {\r\n\t\t\t\tpatientID.add(patient.getId());\r\n\t\t\t\trow[0]= patient.getId()+\"\";\r\n\t\t\t\trow[1]= patient.getFirstName();\r\n\t\t\t\trow[2]= patient.getLastName();\r\n\t\t\t\trow[3]= patient.getGender();\r\n\t\t\t\trow[4]= patient.getAge()+\"\";\r\n\t\t\t\trow[5]= patientRecord.getDate()+\"\";\r\n\t\t\t\trow[6]= patient.getPhone();\r\n\t\t\t\tmodelPatient.addRow(row);\r\n\t\t\t\tisCreated= true;\r\n\t\t\t\tSystem.out.println(\"You have insert a patient record\");\r\n\t\t\t\t\r\n\t\t\t};\r\n\t\t}catch (Exception e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\treturn isCreated;\r\n\t}",
"boolean create(User user) throws Exception;",
"void validateCreate(ClaudiaData claudiaData, EnvironmentDto environmentDto, String vdc) throws \r\n AlreadyExistEntityException, InvalidEntityException;",
"@Test(expected = NotAbleToCreateTestException.class)\n public void createNewTestF02_TC01() throws NotAbleToCreateTestException {\n appService.createNewTest();\n }",
"@Then(\"^Post should be created successfully$\")\n\tpublic void post_should_be_created_successfully() throws Throwable {\n\t throw new PendingException();\n\t}",
"void addDevice(Device device, String token) throws InvalidDeviceException, AuthenticationException,\n DeviceAlreadyExistsException;",
"@Test\n public void testDeviceOwner() {\n AbstractProvisioningController controller =\n mFactory.createProvisioningController(InstrumentationRegistry.getTargetContext(),\n DEVICE_OWNER_PARAMS, mCallback);\n\n // THEN the controller should be a device owner controller\n assertTrue(controller instanceof DeviceOwnerProvisioningController);\n }",
"@Test(alwaysRun = true, priority = 5)\n public void test006createUserWithExistingNameTest() {\n close();\n login();\n// create user\n createUser(EXISTING_USER_NAME, new HashMap<String, String>());\n checkOperationStatusOk(\"Save (GUI)\");\n //try to create user with the same name\n createUser(EXISTING_USER_NAME, new HashMap<String, String>());\n //check if error message appears\n getFeedbackPanel().find(byText(\"Error processing focus\"));\n }",
"public long saveDevice(device device){\n SQLiteDatabase sqLiteDatabase = getWritableDatabase();\n\n return sqLiteDatabase.insert(devicesContract.deviceEntry.tableName,\n null,\n toContentValues(device));\n }",
"@Override public void createSample(Sample sample)\n {\n try\n {\n clientDoctor.createSample(sample);\n }\n catch (RemoteException e)\n {\n throw new RuntimeException(\"Error while creating sample. Please try again.\");\n }\n }",
"public boolean createUser() {\r\n\t\tboolean signupSuccess = false;\r\n\t\t/**\r\n\t\t*\tSince connecting to database (DbConnection()) and retrieving data (fetchSelectAllUsers())\r\n\t\t* throw SQLException and throwing an exception from multiple levels again and again is not\r\n\t\t*\ta good way, so its is needed to catch the exception here.\r\n\t\t*/\r\n\t\ttry {\r\n\t\t\t/**\r\n\t\t\t*\tCreate a connection to the database\r\n\t\t\t*/\r\n\t\t\tDbConnection signupConn = new DbConnection();\r\n\t\t\t/**\r\n\t\t\t*\tinsert data into table\r\n\t\t\t*/\r\n\t\t\tsignupSuccess = signupConn.executeInsertIntoUsers(uName, password, fullName, phone, email);\r\n\r\n\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSystem.out.println(\"**************Error Connecting to the Database**************\");\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\t//validateConn.closeDbConnection();\r\n\t\t\t} catch(SQLException SqlExcep) {\r\n\t\t\t\tSqlExcep.printStackTrace();\r\n\t\t\t}*/\r\n\t\t}\r\n\t\treturn signupSuccess;\r\n\t}"
]
| [
"0.7199401",
"0.7196945",
"0.7074092",
"0.697835",
"0.6444173",
"0.6318754",
"0.61608744",
"0.59408927",
"0.5723995",
"0.5718054",
"0.5690633",
"0.5664912",
"0.562894",
"0.56280863",
"0.5623939",
"0.55974877",
"0.55524504",
"0.5528339",
"0.5519532",
"0.5512891",
"0.5509157",
"0.5494581",
"0.5471498",
"0.5470474",
"0.5465628",
"0.5441593",
"0.543964",
"0.5422397",
"0.53409636",
"0.5338739",
"0.53272194",
"0.53269297",
"0.5313587",
"0.5304802",
"0.5297987",
"0.5273736",
"0.5273632",
"0.5273632",
"0.5271017",
"0.5259801",
"0.52472806",
"0.5245843",
"0.52426195",
"0.5219483",
"0.5207384",
"0.52055013",
"0.5194464",
"0.5188966",
"0.518604",
"0.5163267",
"0.5160065",
"0.5144056",
"0.5141471",
"0.5141042",
"0.51061445",
"0.5101236",
"0.5096354",
"0.50948554",
"0.5091376",
"0.5089386",
"0.50843734",
"0.5075064",
"0.5067367",
"0.50642115",
"0.50622016",
"0.50583464",
"0.50547564",
"0.5051088",
"0.5050363",
"0.50414866",
"0.5037189",
"0.50353146",
"0.50290483",
"0.5027778",
"0.502499",
"0.5020022",
"0.5018493",
"0.5015823",
"0.50147444",
"0.500998",
"0.50087905",
"0.50079983",
"0.50078976",
"0.50075185",
"0.5005354",
"0.50027835",
"0.49996588",
"0.499681",
"0.4992818",
"0.49871933",
"0.49863783",
"0.49838823",
"0.49804926",
"0.4977785",
"0.4977449",
"0.49751282",
"0.49740973",
"0.49734",
"0.49655288",
"0.49621463"
]
| 0.6648362 | 4 |
Try creating a device that already exists. | @Test
public void newDeviceDuplicateTest() {
DatabaseTest.setupDevice();
Device newDevice = newDevice(DatabaseTest.DEVICE_ID);
assertNull(newDevice);
DatabaseTest.cleanDatabase();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n final void testCreateDeviceAlreadyExists() {\n when(deviceDao.findDevice(DeviceFixture.SERIAL_NUMBER)).thenReturn(Optional.of(deviceDTO));\n\n assertThrows(\n ExceptionType.DeviceAlreadyExistsException.class,\n () -> deviceController.createDevice(createDeviceRequest));\n }",
"@Override\n\tprotected boolean isExist(AbnormalDevice record) {\n\t\treturn false;\n\t}",
"@Test\n public void createDeviceTest() throws ApiException {\n String collectionId = null;\n Device body = null;\n Device response = api.createDevice(collectionId, body);\n\n // TODO: test validations\n }",
"Device createDevice();",
"@Test\n final void testCreateDevice() {\n when(deviceDao.save(user, deviceDTO)).thenReturn(deviceDTO);\n when(request.getRemoteAddr()).thenReturn(DeviceFixture.PUBLIC_IP_ADDRESS);\n when(deviceDao.createDevice(user, createDeviceRequest, DeviceFixture.PUBLIC_IP_ADDRESS))\n .thenReturn(deviceDTO);\n when(deviceMapper.toModel(deviceDTO)).thenReturn(deviceModel);\n\n ResponseEntity<DeviceModel> response = deviceController.createDevice(createDeviceRequest);\n\n assertEquals(200, response.getStatusCodeValue());\n assertNotNull(response.getBody());\n DeviceModel device = response.getBody();\n assertEquals(deviceModel, device);\n }",
"@Test\n public void testRegisterBackupDeviceNotPossibleIfNoPrimaryDevicePresent() throws Exception {\n clearAllMultifactorDevices();\n\n //This should fail, because no primary device is present for the user\n thrown.expect(AssertionError.class);\n thrown.expectMessage(containsString(\"Primary authentication devices must be set up before backup devices\"));\n doStartRegistration();\n }",
"public int doesDeviceExist(String device){\n DBSQLiteHelper DBhelper = new DBSQLiteHelper(getApplicationContext());\n SQLiteDatabase db = DBhelper.getReadableDatabase();\n\n String[] select = {\n DBContract.Devices.COLUMN_DEVICE,\n DBContract.Devices.COLUMN_TYPE\n };\n\n String where = DBContract.Devices.COLUMN_DEVICE + \" = ?\";\n\n String[] whereValues = {device};\n\n Cursor cursor = db.query(\n DBContract.Devices.TABLE_NAME, // The table to query\n select, // The columns to return\n where, // The columns for the WHERE clause\n whereValues, // The values for the WHERE clause\n null, // don't group the rows\n null, // don't filter by row groups\n null // don't sort\n );\n\n cursor.moveToFirst();\n if(cursor.getCount() == 0){ //No such device exists\n return -1;\n }\n else if(cursor.getInt(1) == 0){ //Device registered to a runner (GOOD)\n return 0;\n }\n else //Device registered to a contact (BAD)\n return 1;\n }",
"private void createDevice(String host, int port, String name) {\n ThingUID uid = new ThingUID(THING_TYPE_DEVICE, name);\n\n if (uid != null) {\n Map<String, Object> properties = new HashMap<>(1);\n properties.put(\"hostname\", host);\n properties.put(\"port\", port);\n properties.put(\"name\", name);\n DiscoveryResult result = DiscoveryResultBuilder.create(uid).withProperties(properties)\n .withLabel(\"Kinect Device\").build();\n thingDiscovered(result);\n }\n }",
"boolean hasDevice();",
"@Test\n public void newDeviceTest() {\n Device newDevice = newDevice(deviceID);\n\n assertEquals(deviceID, newDevice.getDeviceID());\n assertNotNull(newDevice.getToken());\n\n executeManipulationQuery(\"DELETE FROM device WHERE device_id = ?\", deviceID);\n }",
"void createDatabaseOnDevice() throws IOException {\n boolean databaseExists = checkIfDatabaseOnDevice();\n\n if (!databaseExists) {\n this.getReadableDatabase();\n\n try {\n copyDatabaseToDevice();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }",
"public boolean makeDirectory(){\n File root = new File(Environment.getExternalStorageDirectory(),\"OQPS\");\n if(!root.exists()){\n return root.mkdir();\n }\n return true; //folder already exists\n }",
"@Override\n public boolean isAlreadyInDb () {\n try {\n load( idDevice );\n } catch ( EntityNotFoundException e ) {\n return false;\n }\n return true;\n }",
"@Test\n public void addDeviceTest() throws ApiException {\n Device device = null;\n // DeviceEnvelope response = api.addDevice(device);\n\n // TODO: test validations\n }",
"public abstract void addDevice(Context context, NADevice device);",
"void addDevice(Device device, String token) throws InvalidDeviceException, AuthenticationException,\n DeviceAlreadyExistsException;",
"public boolean addDevice(Device i_dev) throws SQLException {\n\t\treturn addDevice(i_dev.getProtoDevice().getId(), i_dev.getCustomer_id(), i_dev.getSerial_number());\n\t}",
"@Test\n final void testDeleteDeviceNotExisting() {\n assertThrows(\n ExceptionType.DeviceNotFoundException.class,\n () -> deviceController.deleteDevice(\"Not Available device\"));\n }",
"private synchronized void beginRegistration() {\n if (mDeviceRegistering == null && mDevicesToRegister.size() > 0) {\n mDeviceRegistering = mDevicesToRegister.remove(0);\n if (!connectToDevice(mDeviceRegistering)) {\n endRegistration();\n }\n } else if (mDeviceRegistering == null && mDevicesToRegister.size() == 0) {\n // Run out of devices, so revert wifi connection\n resetWifiConnection();\n } else {\n // registering a device\n }\n }",
"@Override\n public CreateWirelessDeviceResult createWirelessDevice(CreateWirelessDeviceRequest request) {\n request = beforeClientExecution(request);\n return executeCreateWirelessDevice(request);\n }",
"public void checkDevices() throws TNotFoundEx{\n\t\tString command = \"adb devices -l\";\n\t\tCommando commando = new Commando();\n\t\tString op = commando.executeCommand(command);\n\t\t\n\t\tOtherUtil oU = new OtherUtil();\n\t\tArrayList<String> devices = oU.getRegexFromString(op, \"(model:.*?device:.+$?)\");\n\t\tint eligDevices = devices.size();\n\t\t\n\t\tif (eligDevices>1)\n\t\t\tthrow new TNotFoundEx(\"ERROR: 2 or more Android devices are connected to the host, please connect only one Android device.\");\n\t\tif (eligDevices == 0)\n\t\t\tthrow new TNotFoundEx(\"ERROR: No Android devices detected by the host. Execute adb devices -l to check the connected devices\");\n\t\t\t\n\t}",
"@Test(expected = SystemObjectIdException.class)\n public void shouldThrowExceptionIfFailToIdentifyDevice() throws IOException {\n\n expect(configuration.createPDU(PDU.GET)).andReturn(new PDU());\n\n expect(snmpInterface.send(isA(PDU.class), same(target))).andReturn(createErrorResponseEvent());\n replayAll();\n\n try {\n session.identifyDevice();\n assert false : \"Should not reach\";\n } finally {\n verifyAll();\n }\n }",
"public void create() throws DuplicateException, InvalidUserDataException, \n NoSuchAlgorithmException, SQLException {\n\tUserDA.create(this);\n }",
"public void newInst() {\n\t\tlogger.debug(\"DeviceNameTableTester has been initialized\");\n\t\t\n\t\tlogger.debug(\"@@@@@@@@@@@@@@@@@@@ Try to set the name of a device\");\n\t\tdeviceNameTable.addName(testDeviceId, null, \"La lampe HUE 1\");\n\t\t\n\t\tlogger.debug(\"@@@@@@@@@@@@@@@@@@@ Try to get the name of a device\");\n\t\tString name = deviceNameTable.getName(testDeviceId, null);\n\t\tlogger.debug(\" @@@@@@@@@@@@ Device name get: \"+name);\n\t\t\n\t\tlogger.debug(\"@@@@@@@@@@@@@@@@@@@ Try to delete the device name: \");\n\t\tdeviceNameTable.deleteName(testDeviceId, null);\n\t\t\n\t\tlogger.debug(\"@@@@@@@@@@@@@@@@@@@ Try to get the name of a device\");\n\t\tname = deviceNameTable.getName(testDeviceId, null);\n\t\tlogger.debug(\" @@@@@@@@@@@@ Device name get: \"+name);\n\t\t\n\t\tlogger.debug(\"@@@@@@@@@@@@@@@@@@@ Try to get the name of a device for a non existing user\");\n\t\tname = deviceNameTable.getName(testDeviceId, \"plop\");\n\t\tlogger.debug(\" @@@@@@@@@@@@ Device name get: \"+name);\n\t\t\n\t}",
"public Device getOrCreateByDeviceId(String deviceId, String friendlyName, DeviceType deviceType, User user, String topicBasePrefix) {\n\n try {\n Device device = getByDeviceId(deviceId);\n if (device == null) {\n device = new Device(deviceId, friendlyName, deviceType, user, topicBasePrefix);\n deviceRepository.save(device);\n // Must init List\n if (user.getDevices() == null) {\n user.setDevices(new ArrayList<>());\n }\n user.getDevices().add(device);\n userRepository.save(user);\n return device;\n } else {\n return device;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return null;\n }",
"public boolean create()\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn file.createNewFile() ;\n\t\t}\n\t\tcatch( IOException ex )\n\t\t{\n\t\t\tex.printStackTrace() ;\n\t\t\treturn false ;\n\t\t}\n\t}",
"@Test\n public void findDevice() throws Exception {\n MockUpnpService upnpService = new MockUpnpService();\n LocalDevice device = SampleData.createLocalDevice();\n upnpService.getRegistry().addDevice(device);\n\n UDN udn = device.getIdentity().getUdn();\n\n Registry registry = upnpService.getRegistry(); // DOC: FIND_ROOT_UDN\n Device foundDevice = registry.getDevice(udn, true);\n\n assertEquals(foundDevice.getIdentity().getUdn(), udn); // DOC: FIND_ROOT_UDN\n\n LocalDevice localDevice = registry.getLocalDevice(udn, true); // DOC: FIND_LOCAL_DEVICE\n assertEquals(localDevice.getIdentity().getUdn(), udn);\n\n SampleDeviceRootLocal.assertLocalResourcesMatch(\n upnpService.getConfiguration().getNamespace().getResources(device)\n );\n }",
"@Override\n public CreateDeviceProfileResult createDeviceProfile(CreateDeviceProfileRequest request) {\n request = beforeClientExecution(request);\n return executeCreateDeviceProfile(request);\n }",
"public org.hl7.fhir.ResourceReference addNewDevice()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.ResourceReference target = null;\n target = (org.hl7.fhir.ResourceReference)get_store().add_element_user(DEVICE$12);\n return target;\n }\n }",
"public void checkFolder() {\n String mPath = Environment.getExternalStorageDirectory().getAbsolutePath() + \"/ExoTest/\";\n mDir = new File(mPath);\n boolean isDirectoryCreated = mDir.exists();\n if (!isDirectoryCreated) {\n isDirectoryCreated = mDir.mkdir();\n }\n if (isDirectoryCreated) {\n // do something\\\n Log.d(\"Folder\", \"Already Created\");\n }\n }",
"@Override\n protected void validateRegisteredDevice(MultifactorDevice device) throws Exception {\n assertThat(device.getBackup(), is(Boolean.TRUE));\n }",
"@Test(expected = UsernameNotFoundException.class)\n public void createNewComputerBuildFailure() {\n ComputerBuild computerBuild = createComputerBuild(SAMPLE_BUDGET_COMPUTER_BUILD_NAME, SAMPLE_GAMING_COMPUTER_BUILD_DESCRIPTION);\n computerBuildService.createNewComputerBuild(computerBuild);\n }",
"public boolean hasFailed() {\n return creationFailure;\n }",
"private void addDeviceItem() throws SQLException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\ttry{\r\n\t\t\tnameDevice = edtNameDevice.getText().toString().trim();\r\n\t\t\tportDevice = Integer.parseInt(edtPortDevice.getText().toString().trim());\r\n\t\t\troomID = getIntent().getExtras().getInt(\"room_id\");\r\n\t\t\t\r\n\t\t\tDeviceItem item = new DeviceItem(roomID, nameDevice, typeDevice, portDevice, statusDevice);\r\n\t\t\tDeviceItemController.getInstance(AddDeviceItemActivity.this).createDeviceItem(item);\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t\tToast.makeText(AddDeviceItemActivity.this, \"Add device item error. Please verify your device infomations!\", Toast.LENGTH_SHORT).show();\r\n\t\t}\r\n\t}",
"Device_Resource createDevice_Resource();",
"private boolean ensureSDCardAccess() {\n File file = new File(mScreenshotPath);\n if (file.exists()) {\n return true;\n } else if (file.mkdirs()) {\n return true;\n }\n return false;\n }",
"@Test\n public void findDeviceByType() throws Exception {\n MockUpnpService upnpService = new MockUpnpService();\n LocalDevice device = SampleData.createLocalDevice();\n upnpService.getRegistry().addDevice(device);\n\n Registry registry = upnpService.getRegistry();\n\n try {\n DeviceType deviceType = new UDADeviceType(\"MY-DEVICE-TYPE\", 1); // DOC: FIND_DEV_TYPE\n Collection<Device> devices = registry.getDevices(deviceType); // DOC: FIND_DEV_TYPE\n assertEquals(devices.size(), 1);\n } finally {}\n\n try {\n ServiceType serviceType = new UDAServiceType(\"MY-SERVICE-TYPE-ONE\", 1); // DOC: FIND_SERV_TYPE\n Collection<Device> devices = registry.getDevices(serviceType); // DOC: FIND_SERV_TYPE\n assertEquals(devices.size(), 1);\n } finally {}\n }",
"@Test\n public void testAddPermissionTwiceFails() throws Exception\n {\n permission = permissionManager.getPermissionInstance(\"EATLUNCH\");\n permissionManager.addPermission(permission);\n assertTrue(permissionManager.checkExists(permission.getName()));\n Permission permission2 = permissionManager.getPermissionInstance(\"EATLUNCH\");\n try\n {\n permissionManager.addPermission(permission2);\n }\n catch (EntityExistsException uee)\n {\n // good\n }\n }",
"public boolean isDuplicate(IDecodedDeviceRequest<?> request) throws SiteWhereException;",
"public org.hl7.fhir.ResourceReference insertNewDevice(int i)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.ResourceReference target = null;\n target = (org.hl7.fhir.ResourceReference)get_store().insert_element_user(DEVICE$12, i);\n return target;\n }\n }",
"private SmartDevice createDevice(Cursor cursor){\n String id = cursor.getString(cursor.getColumnIndex(COLUMN_ID));\n String name = cursor.getString(cursor.getColumnIndex(COLUMN_NAME));\n String type = cursor.getString(cursor.getColumnIndex(COLUMN_TYPE));\n String active = cursor.getString(cursor.getColumnIndex(COLUMN_ACTIVE));\n String image = cursor.getString(cursor.getColumnIndex(COLUMN_IMAGE));\n return new SmartDevice(id, name, type, active, image);\n }",
"boolean hasDeviceId();",
"boolean hasDeviceId();",
"private void checkIfLocationExists() {\n try {\n File file = new File(saveLocation);\n if(!file.exists()) file.mkdirs();\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n }\n }",
"public boolean createConnection() throws CommunicationException;",
"public void addDevice()\r\n\t\t{\n\t\t\t\r\n\t\t\tSystem.out.println(\" Enter Device Name \");\r\n\t\t\tString devName = sc.nextLine();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Enter cost of the device \");\r\n\t\t\tint devCost = Integer.parseInt(sc.nextLine());\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Give the average rating for the device \");\r\n\t\t\tint devRating = Integer.parseInt(sc.nextLine());\r\n\t\t\t\r\n\t\t\tSystem.out.println(\" Enter Device Brand Name \");\r\n\t\t\tString devBrand = sc.nextLine();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tDevice newDevice = new Device(devName, devCost,devRating,devBrand);\r\n\t\t\tString modelNumber = record.addDevice(newDevice);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\" Device Inserted :- \"+modelNumber);\r\n\t\t}",
"public static void createTable(Database db, boolean ifNotExists) {\n String constraint = ifNotExists? \"IF NOT EXISTS \": \"\";\n db.execSQL(\"CREATE TABLE \" + constraint + \"\\\"DEVICE_INFOS\\\" (\" + //\n \"\\\"_id\\\" INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE ,\" + // 0: ID\n \"\\\"DEV_ID\\\" TEXT,\" + // 1: dev_id\n \"\\\"IMG_URL\\\" TEXT,\" + // 2: img_url\n \"\\\"STATE\\\" INTEGER NOT NULL );\"); // 3: state\n }",
"@Test(expected = SystemObjectIdException.class)\n public void shouldThrowExceptionIfExceptionWhenIdentifyDevice() throws IOException {\n\n expect(configuration.createPDU(PDU.GET)).andReturn(new PDU());\n\n expect(snmpInterface.send(isA(PDU.class), same(target))).andThrow(new IOException());\n replayAll();\n\n try {\n session.identifyDevice();\n assert false : \"Should not reach\";\n } finally {\n verifyAll();\n }\n }",
"public boolean setupDrive(String s){\n boolean flag = false;\n for(String i: drv.list()){\n if(s.equals(i)){\n flag = true;\n }\n }\n if(flag == true){\n System.out.println(s + \" is already taken as a folder name!\");\n return false;//false for operation could not complete!\n }else{\n drv = new File(drv.toString() + File.separator + s);\n drv.mkdir();\n folderName = s;\n isSetup = true;\n return true;\n }\n }",
"private boolean checkDeviceName(String name) {\n switch (name) {\n case \"LAPTOP\" :\n case \"PRINTER\" :\n case \"ROUTER\" :\n return true;\n default:\n return false;\n }\n }",
"private void appendDevice(final IDevice device) {\n if (-1 == getDeviceIndex(device)) {\n TestDevice td = new TestDevice(device);\n mDevices.add(td);\n }\n }",
"@Test\n public void testCreateProductShouldThrowResourceExistsWhenProductExists() throws Exception {\n // Mock method\n when(productRepository.existsByName(productRequest.getName())).thenReturn(true);\n\n testResponseData(RequestInfo.builder()\n .request(post(PRODUCT_ENDPOINT))\n .token(adminToken)\n .body(productRequest)\n .httpStatus(HttpStatus.CONFLICT)\n .jsonMap(createJsonMapError(PRODUCT_EXIST))\n .build());\n }",
"@Transactional(isolation = Isolation.SERIALIZABLE)\n public DeviceEntity save(DeviceEntity device, Long groupId) throws DeviceAlreadyExistException {\n var opt = deviceRepository.findBySerialNumber(device.getSerialNumber());\n if (opt.isPresent()) {\n log.warn(\"Device already exist, id = {}, sn = {}\", opt.get().getId(), opt.get().getSerialNumber());\n throw new DeviceAlreadyExistException(opt.get().getId());\n }\n device = deviceRepository.save(device);\n // and put it to the device group that mapping to the collector group.\n var dgcgMapping = dgCgMappingRepository.findByRightId(groupId);\n // TODO handle the case that the mapping doesn't exist.\n deviceGroupMemberRepository.save(new DeviceGroupMemberEntity(dgcgMapping.getLeftId(), device.getId()));\n return device;\n }",
"@Test\n public void testUnique_connectionException() throws SQLException {\n SignUpRequest request = new SignUpRequest(UNIQUE, \"Pw\");\n\n doThrow(SQLException.class).when(connection).isUnique(request.getUsername());\n\n dao.register(request);\n\n verify(controller).connectionFailed();\n }",
"public boolean addHost(HostData device) {\n log.debug(\"Adding host into DB. mac {}\", device.getMac());\n\n KVDevice rcDevice = new KVDevice(device.getMac().toBytes());\n\n for (SwitchPort sp : device.getAttachmentPoints()) {\n byte[] portId = KVPort.getPortID(sp.getDpid(), sp.getPortNumber());\n rcDevice.addPortId(portId);\n }\n\n rcDevice.forceCreate();\n\n return true;\n }",
"public boolean create() throws Exception {\n\t\treturn tableDao.create();\r\n\t}",
"@Override\n\tpublic void test00400Add_DuplicateRecord() throws Exception\n\t{\n\t\t// This method will not fail with Generate card numbers set to Y\n\t}",
"static boolean isDuplicated(String mac) {\n for (DeviceDetail detail : deviceDetails) {\n if (detail.macAddress.equals(mac)) {\n return true;\n }\n }\n return false;\n }",
"private boolean createLauncher(int deploymentNameSuffix, String reason) {\n boolean depCreated = runtimeClient.createDeployment(deploymentNameSuffix, rootDomainName, reason);\n boolean svcCreated = runtimeClient.createService(deploymentNameSuffix, rootDomainName, reason);\n\n return depCreated && svcCreated;\n }",
"void addDevice(String device) {\n availableDevices.add(device);\n resetSelectedDevice();\n }",
"public static boolean isSdcardExist() {\n return android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED);\n }",
"public synchronized void createIfNotExists(SQLiteDatabase db) {\n db.execSQL(SQL_CREATE_DATASOURCE);\n }",
"private boolean createDatabase(CreateDatabaseStatement cds) {\n\t\tif(dbs.containsKey(cds.dbname)) {\n\t\t\tSystem.out.println(\"Error: Can't create database \" + cds.dbname + \"; database exists\");\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\tDatabase newdb = new Database();\n\t\t\tdbs.put(cds.dbname, newdb);\n\t\t\treturn true;\n\t\t\t\n\t\t}\n\t}",
"public void createSocket() \n { \n try \n { \n socket = new DatagramSocket(); \n } \n catch (Exception ex) \n { \n System.out.println(\"UDPPinger Exception: \" + ex); \n } \n }",
"public static void createDatabaseIfNotExists() throws DaoException {\n\n Path data = Paths.get(DATA_DIR);\n if (!Files.exists(data)) {\n try {\n Files.createDirectory(data);\n Files.createDirectory(Paths.get(DATA_DIR, ACCOUNT_DATA_DIR));\n } catch (IOException ex) {\n throw new DaoException(\"Could not create data directory\", ex);\n }\n }\n\n }",
"public boolean createConn(String sMac){\n if (null == this.mBTcomm)\n {\n this.mBTcomm = new BluetoothComm(sMac);\n if (this.mBTcomm.createConn()){\n connection = true;\n return true;\n }\n else{\n this.mBTcomm = null;\n connection = false;\n return false;\n }\n }\n else\n return true;\n }",
"public boolean isDeviceAlreadyConnected(IWifiP2pProxy.IFastConnectInfo info) {\n\t\tLog.d(TAG, \"mConnectedDevice = \" + mConnectedDevice.getDeviceAddress());\n\t\tLog.d(TAG, \"info = \" + info.getDeviceAddress());\n\t\tif (mConnectedDevice.getDeviceAddress().equalsIgnoreCase(info.getDeviceAddress())) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic boolean isExist() {\n\t\treturn false;\r\n\t}",
"public void createConnection() throws UsbGateException {\n mUsbConnection = mUsbManager.openDevice(mUsbDevice);\n if (mUsbConnection != null)\n connected = true;\n else\n throw new UsbGateException(\"Cannot get connection\");\n }",
"public boolean deviceSave(Device device) {\n\t\tdevice.setRegisterTime(new Date());\n\t\tdeviceDao.save(device);\n\t\treturn true;\n\t}",
"public void add(BlueteethDevice device) {\n boolean isAlreadyInList = false;\n for (BlueteethDevice d : mDevices) {\n if (device.getMacAddress().equals(d.getMacAddress())) {\n isAlreadyInList = true;\n break;\n }\n }\n\n if (!isAlreadyInList) {\n mDevices.add(device);\n notifyDataSetChanged();\n }\n }",
"private static void createSaveDirIfNotExisting() {\n\t\tFile dir = new File(\"save\");\n\t\tif (!dir.exists()) {\n\t\t\t// directory does not exist => create!\n\t\t\tdir.mkdir();\n\t\t}\n\t}",
"@Nullable\n @SuppressLint(\"HardwareIds\")\n private String createId(Context context) {\n String id = Settings.Secure.getString(\n context.getContentResolver(),\n Settings.Secure.ANDROID_ID);\n String device = Build.DEVICE;\n id += device;\n\n try {\n MessageDigest md = MessageDigest.getInstance(\"SHA-256\");\n return HexCoder.toHex(md.digest(id.getBytes(\"UTF-8\")));\n } catch (NoSuchAlgorithmException | UnsupportedEncodingException e) {\n Log.e(TAG, \"createId: \"+e.toString());\n }\n return null;\n }",
"private void registerDevice(String deviceRegistrationId, User user) {\n Device device = Device.createDevice(deviceRegistrationId, user);\n ofy().save().entity(device).now();\n }",
"public void test_CreateContest_Failure2_EntityAlreadyExistsException()\r\n throws Exception {\r\n try {\r\n initContext();\r\n\r\n Contest contest = createContestForTest();\r\n\r\n beanUnderTest.createContest(contest);\r\n\r\n // Persist it again.\r\n beanUnderTest.createContest(contest);\r\n\r\n fail(\"EntityAlreadyExistsException is expected.\");\r\n } catch (EntityAlreadyExistsException e) {\r\n // success\r\n }\r\n }",
"private boolean checkIfDatabaseOnDevice() {\n SQLiteDatabase tempDB = null;\n try {\n String myPath = DB_PATH + DB_NAME;\n tempDB = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READWRITE);\n } catch (SQLiteException e) {\n e.printStackTrace();\n }\n if (tempDB != null)\n tempDB.close();\n return tempDB != null;\n }",
"int insert(Device record);",
"int insert(Device record);",
"private void createAccount(String username, String passphrase, String email) {\n\tif (!AccountManager.getUniqueInstance().candidateUsernameExists(username)) {\n\t try {\n\t\tAccountManager.getUniqueInstance().createCandidateAccount(username, \n\t\t\t\t\t\t\t\t\t passphrase, \n\t\t\t\t\t\t\t\t\t email);\n\t } catch (Exception e) {\n\t\tthrow new RuntimeException(\"creation failed\");\n\t }\n\t} else {\n\t throw new RuntimeException(\"username already exists\");\n\t}\n }",
"@Test\n public void getNotExistingSession() throws Exception {\n addDevice();\n assertEquals(\"Session should be created\", snmpSession, snmpController.getSession(device.deviceId()));\n assertEquals(\"Map should contain session\", 1, snmpController.snmpDeviceMap.size());\n assertEquals(\"Session should be fetched from map\", snmpSession, snmpController.getSession(device.deviceId()));\n }",
"public boolean setupSocket() throws ExitProgram {\n\t\tboolean success = false;\n\t\t\n\t\tthis.showNamedMessage(\"Trying to open a new socket...\");\n\t\twhile (this.socket == null) { \n\t\t\ttry {\n\t\t\t\tthis.socket = TransportLayer.openNewDatagramSocket(this.ownPort);\n\t\t\t\tthis.showNamedMessage(\"Client now bound to port \" + ownPort);\n\t\t\t\tsuccess = true;\n\t\t\t} catch (SocketException e) {\n\t\t\t\tthis.showNamedError(\"Something went wrong when opening the socket: \"\n\t\t\t\t\t\t+ e.getLocalizedMessage());\n\t\t\t\tif (!textUI.getBoolean(\"Do you want to try again?\")) {\n\t\t\t\t\tthrow new exceptions.ExitProgram(\"User indicated to exit the \"\n\t\t\t\t\t\t\t+ \"program after socket opening failure.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn success;\n\t}",
"void addDevice(String userid,String username,String devicename,String deviceaddre,Long addtime,\n IDevicesListener iDevicesListener);",
"public boolean alreadyExist(String nameRoom) throws SQLException{\n return roomDao.alreadyExist(nameRoom);\n }",
"private void createUltraDuoPlusSetup(String useDeviceIdentifierName) {\n\t\tthis.ultraDuoPlusSetup = new ObjectFactory().createUltraDuoPlusType();\n\t\tList<MemoryType> cellMemories = this.ultraDuoPlusSetup.getMemory();\n\t\tif (cellMemories.size() < UltraDuoPlusDialog.numberMemories) { // initially create only base setup data\n\t\t\tfor (int i = 0; i < UltraDuoPlusDialog.numberMemories; i++) {\n\t\t\t\tMemoryType cellMemory = new ObjectFactory().createMemoryType();\n\t\t\t\tcellMemory.setSetupData(new ObjectFactory().createMemoryTypeSetupData());\n\t\t\t\tcellMemories.add(cellMemory);\n\t\t\t}\n\t\t}\n\t\tthis.ultraDuoPlusSetup.setIdentifierName(useDeviceIdentifierName);\n\t}",
"public EntityAlreadyExistsException() {\n\t\tsuper(\"exception.entity.already.exists\");\n\t}",
"private synchronized boolean setAdbInterface(UsbDevice device, UsbInterface intf) throws IOException, InterruptedException {\n Log.d(\"Nightmare\", \"setAdbInterface\");\n if (adbTerminalConnection != null) {\n adbTerminalConnection.close();\n adbTerminalConnection = null;\n mDevice = null;\n }\n\n UsbManager mManager = (UsbManager) getSystemService(Context.USB_SERVICE);\n if (device != null && intf != null) {\n UsbDeviceConnection connection = mManager.openDevice(device);\n if (connection != null) {\n if (connection.claimInterface(intf, false)) {\n\n handler.sendEmptyMessage(Message.CONNECTING);\n\n adbTerminalConnection = AdbConnection.create(new UsbChannel(connection, intf), adbCrypto);\n\n adbTerminalConnection.connect();\n\n //TODO: DO NOT DELETE IT, I CAN'T EXPLAIN WHY\n// adbTerminalConnection.open(\"shell:exec date\");\n mDevice = device;\n handler.sendEmptyMessage(Message.DEVICE_FOUND);\n return true;\n } else {\n connection.close();\n }\n }\n }\n\n handler.sendEmptyMessage(Message.DEVICE_NOT_FOUND);\n\n mDevice = null;\n return false;\n }",
"private void attemptCreation() {\n newFlat.setAddressLine1(\"\");\n newFlat.setPostcode(\"\");\n newFlat.setNotes(\"\");\n newFlat.setFlatNum(\"\");\n newFlat.setTenant(\"\");\n\n // Reset errors\n actvProperty.setError(null);\n etFlatNum.setError(null);\n etFlatNotes.setError(null);\n flatTenant.setError(null);\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for valid address, if the user entered one\n if (TextUtils.isEmpty(actvProperty.getText().toString())) {\n actvProperty.setError(\"This field is required\");\n cancel = true;\n focusView = actvProperty;\n } else if (!isAddressValid(actvProperty.getText().toString())) {\n actvProperty.setError(\"This address is invalid\");\n cancel = true;\n focusView = actvProperty;\n }\n\n // Check for a valid flat number, if the user entered one\n if (TextUtils.isEmpty(etFlatNum.getText().toString())) {\n etFlatNum.setError(\"This field is required\");\n cancel = true;\n if (focusView == null) {\n focusView = etFlatNum;\n }\n } else if (!isFlatNumValid(\"Flat \" + etFlatNum.getText().toString())) {\n etFlatNum.setError(\"This flat number is in use\");\n cancel = true;\n if (focusView == null) {\n focusView = etFlatNum;\n }\n\n Collections.sort(flatNums);\n\n new AlertDialog.Builder(this)\n .setIcon(android.R.drawable.ic_dialog_alert)\n .setTitle(\"Warning\")\n .setMessage(\"These flats already exist in \" + actvProperty.getText().toString()\n + \":\\n\\n\" + flatNums.toString() + \"\\n\\nPlease enter a unique number.\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n })\n .show();\n }\n\n // Check for valid tenant, if the user entered one\n if (TextUtils.isEmpty(flatTenant.getText().toString())) {\n // No need to add a tenant\n } else if (!isTenantValid(flatTenant.getText().toString())) {\n flatTenant.setError(\"This tenant does not exist in the system\");\n cancel = true;\n if (focusView == null) {\n focusView = flatTenant;\n }\n } else if (!isTenantFree(flatTenant.getText().toString())) {\n flatTenant.setError(\"This tenant number is in use\");\n cancel = true;\n if (focusView == null) {\n focusView = flatTenant;\n }\n }\n\n // Check for notes and add default notes if null\n if (TextUtils.isEmpty(etFlatNotes.getText().toString())) {\n etFlatNotes.setText(\"No notes yet. That's okay, you can add some later..\");\n }\n\n if (cancel) {\n // There was an error; don't attempt creation and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n inputMethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);\n saveNewFlat();\n }\n }",
"@Override\r\n public boolean create(Person person) {\n return false;\r\n }",
"private void addDevice(DeviceDescription description) {\t\t\r\n\t\tif (description == null) return;\r\n\t\tSystemID systemID = description.getSystemID();\r\n\t\tDeviceFigure applicationDevice = (DeviceFigure)applicationElements.get(systemID);\r\n\t\tif (applicationDevice == null) {\r\n\t\t\tapplicationDevice = new DeviceFigure(description);\r\n\t\t\tapplicationElements.put(systemID, applicationDevice);\r\n\t\t\tapplicationGraph.addEntry(applicationDevice);\r\n\t\t} else {\r\n\t\t\tapplicationDevice.setAvailable(true);\r\n\t\t}\r\n\t\tDeviceFigure assemblerDevice = (DeviceFigure)assemblerElements.get(systemID);\r\n\t\tif (assemblerDevice == null) {\r\n\t\t\tassemblerDevice = new DeviceFigure(description);\r\n\t\t\tassemblerElements.put(systemID, assemblerDevice);\r\n\t\t\tassemblerGraph.addEntry(assemblerDevice);\r\n\t\t}\r\n\t\tzoom();\r\n\t}",
"public static boolean isSDcardExist() {\n\t\tboolean isExist = false;\n\t\ttry {\n\t\t\tif (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {\n\t\t\t\tisExist = true;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn isExist;\n\n\t}",
"public T getAutoInstance(String devName) {\n S settings = sGen.apply(devName);\n for (Class clz : subClasses) {\n T device;\n try {\n device = (T) clz.getDeclaredConstructor(sClass).newInstance(settings);\n } catch (InvocationTargetException e) { \n if (e.getCause() instanceof Device.IDException) {\n continue; //This just means the device wasn't identified. Try the next device\n } else {\n throw new RuntimeException(e.getCause());\n }\n } catch (NoSuchMethodException | InstantiationException | IllegalAccessException me) {\n throw new RuntimeException(me);\n }\n Globals.mm().logs().logMessage(String.format(\"Autofinder found device of type %s for device label %s.\", device.getClass().toString(), devName));\n return device; //We only get this far if the object successfully initializes.\n }\n return null; //Nothing was identified.\n }",
"public long saveDevice(device device){\n SQLiteDatabase sqLiteDatabase = getWritableDatabase();\n\n return sqLiteDatabase.insert(devicesContract.deviceEntry.tableName,\n null,\n toContentValues(device));\n }",
"public static void existeFichero(){\n File fichero = new File(\"config.ser\");\n\n try{\n\n if (fichero.exists()) {\n recuperarFecha();\n }\n else {\n fichero.createNewFile();\n }\n }catch(IOException ex){\n System.out.println(\"Excepcion al crear el fichero: \" + ex);\n }\n\n }",
"@Test\n public void authenticateTestFailure2() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, \"other_token\");\n assertFalse(device.authenticate());\n DatabaseTest.cleanDatabase();\n }",
"private void foundNonExistent() {\n\t\tstate = BridgeState.NON_EXISTENT;\n\t}",
"private IWifiIface createIfaceIfPossible(WifiChipInfo[] chipInfos, int ifaceType, InterfaceDestroyedListener destroyedListener, Looper looper) {\n synchronized (this.mLock) {\n IfaceCreationData bestIfaceCreationProposal = null;\n int i = 0;\n int length = chipInfos.length;\n while (true) {\n int i2 = i;\n if (i2 >= length) {\n break;\n }\n WifiChipInfo chipInfo = chipInfos[i2];\n for (ChipMode chipMode : chipInfo.availableModes) {\n for (ChipIfaceCombination chipIfaceCombo : chipMode.availableCombinations) {\n for (int[] expandedIfaceCombo : expandIfaceCombos(chipIfaceCombo)) {\n IfaceCreationData currentProposal = canIfaceComboSupportRequest(chipInfo, chipMode, expandedIfaceCombo, ifaceType);\n if (compareIfaceCreationData(currentProposal, bestIfaceCreationProposal)) {\n bestIfaceCreationProposal = currentProposal;\n }\n }\n }\n }\n i = i2 + 1;\n }\n if (bestIfaceCreationProposal != null) {\n IWifiIface iface = executeChipReconfiguration(bestIfaceCreationProposal, ifaceType);\n if (iface != null) {\n HalDeviceManager halDeviceManager = this;\n InterfaceCacheEntry cacheEntry = new InterfaceCacheEntry();\n cacheEntry.chip = bestIfaceCreationProposal.chipInfo.chip;\n cacheEntry.chipId = bestIfaceCreationProposal.chipInfo.chipId;\n cacheEntry.name = getName(iface);\n cacheEntry.type = ifaceType;\n if (destroyedListener != null) {\n Set set = cacheEntry.destroyedListeners;\n if (looper == null) {\n looper = Looper.myLooper();\n }\n set.add(new InterfaceDestroyedListenerProxy(destroyedListener, looper));\n }\n this.mInterfaceInfoCache.put(cacheEntry.name, cacheEntry);\n return iface;\n }\n }\n }\n }",
"public void createFailure() {\n\t\tgetController().changeFree(true);\t\t\n\t\tdisplayAdvertisement(\"opponent failure\");\n\t\tvalidate();\n\t}",
"DeviceState createDeviceState();",
"private void deviceUpdated() {\n if (!mIsCreate) {\n mSyncthingService.getApi().editDevice(mDevice, getActivity(), this);\n }\n }",
"private boolean requiresCreate( EntityInstanceImpl ei )\n {\n // Can't create an entity that wasn't created...\n if ( !ei.isCreated() )\n return false;\n\n // Skip deleted entities; they've been created then deleted so no need to save them.\n if ( ei.isDeleted() )\n return false;\n\n // Check to see if this EI has already been inserted into the DB.\n if ( ei.dbhCreated )\n return false;\n\n EntityDef entityDef = ei.getEntityDef();\n if ( entityDef.isDerivedPath() )\n return false;\n\n // Skip the entity if we don't allow creates.\n if ( ! entityDef.isCreate() )\n return false;\n\n DataRecord dataRecord = entityDef.getDataRecord();\n if ( dataRecord == null )\n return false;\n\n return true;\n }"
]
| [
"0.7591084",
"0.63586175",
"0.62777346",
"0.59755033",
"0.59224147",
"0.5789226",
"0.5715562",
"0.55897814",
"0.53088427",
"0.5300844",
"0.526949",
"0.5255573",
"0.5250823",
"0.52320164",
"0.5224313",
"0.52110636",
"0.5191871",
"0.5186051",
"0.5157631",
"0.5150822",
"0.514909",
"0.51119554",
"0.5097887",
"0.5073368",
"0.506241",
"0.5056336",
"0.50490195",
"0.5047162",
"0.5035145",
"0.50057054",
"0.4997609",
"0.49881142",
"0.49578643",
"0.49540392",
"0.49522498",
"0.49513483",
"0.4943043",
"0.49321625",
"0.493182",
"0.4925987",
"0.49173045",
"0.49088797",
"0.49088797",
"0.4887204",
"0.48811695",
"0.4870772",
"0.4868202",
"0.48634714",
"0.4860907",
"0.48480937",
"0.4841673",
"0.48322403",
"0.4827763",
"0.48246264",
"0.48209095",
"0.4814503",
"0.4814363",
"0.48114982",
"0.48003823",
"0.47926462",
"0.47847033",
"0.47807163",
"0.47774687",
"0.4774567",
"0.4754954",
"0.47502717",
"0.47454053",
"0.47358915",
"0.47340828",
"0.47251004",
"0.47199267",
"0.47176114",
"0.47157145",
"0.4691431",
"0.46887696",
"0.46881455",
"0.4683642",
"0.4683642",
"0.46722797",
"0.46690807",
"0.4660141",
"0.46583933",
"0.46551713",
"0.4647413",
"0.46443826",
"0.46427286",
"0.46363726",
"0.46207199",
"0.4618595",
"0.46176714",
"0.46174487",
"0.46130553",
"0.4609912",
"0.46088755",
"0.460561",
"0.46021435",
"0.45984155",
"0.45975527",
"0.45968184",
"0.45910588"
]
| 0.7076179 | 1 |
Try getting a device from the database. | @Test
public void getDeviceTest() {
DatabaseTest.setupDevice();
Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);
assertEquals(device, getDevice(DatabaseTest.DEVICE_ID));
DatabaseTest.cleanDatabase();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void retrieveDeviceTest() throws ApiException {\n String collectionId = null;\n String deviceId = null;\n Device response = api.retrieveDevice(collectionId, deviceId);\n\n // TODO: test validations\n }",
"public Device findById(Long id) throws Exception;",
"public SmartDevice readDevice(String id) {\n SQLiteDatabase db = getReadableDatabase();\n\n Cursor cursor = db.query(TABLE_NAME, null, COLUMN_ID + \"=?\", new String[]{id}, null, null, null);\n if (cursor.getCount() <= 0) // If there is nothing found\n return null;\n cursor.moveToFirst(); // In case there are more users with same ID\n SmartDevice device = createDevice(cursor);\n\n close();\n return device;\n }",
"public Device findDeviceById(int id);",
"public Device getById(String id) {\n\n try {\n return deviceRepository.findOne(id);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return null;\n }",
"public Device getDevice() {\n Long __key = this.deviceId;\n if (device__resolvedKey == null || !device__resolvedKey.equals(__key)) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n DeviceDao targetDao = daoSession.getDeviceDao();\n Device deviceNew = targetDao.load(__key);\n synchronized (this) {\n device = deviceNew;\n \tdevice__resolvedKey = __key;\n }\n }\n return device;\n }",
"@Test\n final void testRetrieveDevice() {\n when(deviceDao.findDevice(user, DeviceFixture.SERIAL_NUMBER))\n .thenReturn(Optional.of(deviceDTO));\n when(deviceMapper.toModel(deviceDTO)).thenReturn(deviceModel);\n ResponseEntity<DeviceModel> response = deviceController.retrieveDevice(\"1\");\n\n assertNotNull(response);\n assertEquals(200, response.getStatusCodeValue());\n assertNotNull(response.getBody());\n var device = response.getBody();\n assertEquals(deviceModel, device);\n }",
"Device selectByPrimaryKey(String deviceNo);",
"public int doesDeviceExist(String device){\n DBSQLiteHelper DBhelper = new DBSQLiteHelper(getApplicationContext());\n SQLiteDatabase db = DBhelper.getReadableDatabase();\n\n String[] select = {\n DBContract.Devices.COLUMN_DEVICE,\n DBContract.Devices.COLUMN_TYPE\n };\n\n String where = DBContract.Devices.COLUMN_DEVICE + \" = ?\";\n\n String[] whereValues = {device};\n\n Cursor cursor = db.query(\n DBContract.Devices.TABLE_NAME, // The table to query\n select, // The columns to return\n where, // The columns for the WHERE clause\n whereValues, // The values for the WHERE clause\n null, // don't group the rows\n null, // don't filter by row groups\n null // don't sort\n );\n\n cursor.moveToFirst();\n if(cursor.getCount() == 0){ //No such device exists\n return -1;\n }\n else if(cursor.getInt(1) == 0){ //Device registered to a runner (GOOD)\n return 0;\n }\n else //Device registered to a contact (BAD)\n return 1;\n }",
"public VinDevices getDevice(String id_device)\n\t\t{\n\t\t\tList<?> dataAux;\n\t\t\tVinDevices Arecord = new VinDevices();\n\t\t\ttry{\n\t\t\t\tdataAux =\tthis.getListaBaseTable(\"id_device='\"+id_device+\"'\");\n\t\t\t\tArecord = (VinDevices)dataAux.get(0);\n\t\t\t}\n\t\t\tcatch(Exception e){}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tdataAux = null;\n\t\t\t}\n\t\t\treturn Arecord;\t\t\t\t\n\t\t\t\n\t\t}",
"@Test\n public void findDevice() throws Exception {\n MockUpnpService upnpService = new MockUpnpService();\n LocalDevice device = SampleData.createLocalDevice();\n upnpService.getRegistry().addDevice(device);\n\n UDN udn = device.getIdentity().getUdn();\n\n Registry registry = upnpService.getRegistry(); // DOC: FIND_ROOT_UDN\n Device foundDevice = registry.getDevice(udn, true);\n\n assertEquals(foundDevice.getIdentity().getUdn(), udn); // DOC: FIND_ROOT_UDN\n\n LocalDevice localDevice = registry.getLocalDevice(udn, true); // DOC: FIND_LOCAL_DEVICE\n assertEquals(localDevice.getIdentity().getUdn(), udn);\n\n SampleDeviceRootLocal.assertLocalResourcesMatch(\n upnpService.getConfiguration().getNamespace().getResources(device)\n );\n }",
"@Test\n public void getDeviceTest() throws ApiException {\n String deviceId = null;\n // DeviceEnvelope response = api.getDevice(deviceId);\n\n // TODO: test validations\n }",
"Device selectByPrimaryKey(Integer id);",
"@Test\n public void getDeviceNullTest() {\n assertNull(getDevice(\"Non existing device\"));\n }",
"public org.thethingsnetwork.management.proto.HandlerOuterClass.Device getDevice(org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceIdentifier request);",
"TpDevicePlay selectByPrimaryKey(Integer deviceId);",
"public com.google.common.util.concurrent.ListenableFuture<org.thethingsnetwork.management.proto.HandlerOuterClass.Device> getDevice(\n org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceIdentifier request);",
"public void checkDevices() throws TNotFoundEx{\n\t\tString command = \"adb devices -l\";\n\t\tCommando commando = new Commando();\n\t\tString op = commando.executeCommand(command);\n\t\t\n\t\tOtherUtil oU = new OtherUtil();\n\t\tArrayList<String> devices = oU.getRegexFromString(op, \"(model:.*?device:.+$?)\");\n\t\tint eligDevices = devices.size();\n\t\t\n\t\tif (eligDevices>1)\n\t\t\tthrow new TNotFoundEx(\"ERROR: 2 or more Android devices are connected to the host, please connect only one Android device.\");\n\t\tif (eligDevices == 0)\n\t\t\tthrow new TNotFoundEx(\"ERROR: No Android devices detected by the host. Execute adb devices -l to check the connected devices\");\n\t\t\t\n\t}",
"@Override\n public List<CrSDevice> findDevice(String building, String roomNumber) throws SQLException {\n String sql = \"call GetClassroomDevice(?,?);\";\n return qr.query(conn, sql, new BeanListHandler<CrSDevice>(CrSDevice.class, processor), building, roomNumber);\n\n }",
"public SmartDevice[] readDevices() {\n SQLiteDatabase db = getReadableDatabase();\n\n // Get data from database\n Cursor cursor = db.query(TABLE_NAME, null, null, null, null, null, null, null);\n if (cursor.getCount() <= 0) // If there is nothing found\n return null;\n\n\n // Go trough data and create class objects\n SmartDevice[] devices = new SmartDevice[cursor.getCount()];\n int i = 0;\n for (cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) {\n devices[i++] = createDevice(cursor);\n }\n\n close();\n return devices;\n }",
"@Override\n\tpublic Device loadwDeviceById(int id) {\n\t\treturn (Device) dataAccessUtil.findById(Device.class,id);\n\t}",
"public Device getByDeviceId(String deviceId) {\n\n try {\n return deviceRepository.findByDeviceId(deviceId);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return null;\n }",
"@Override\n\tpublic DeviceBean getDeviceById(int deviceId) {\n\t\treturn dao.getDeviceById(deviceId);\n\t}",
"public synchronized MonitoringDevice getBySerial(String serial)\n\t{\n\t\tlogger.debug(\"search by serial:\" + serial);\n\t\tInteger id = this.indexBySerial.get(serial);\n\t\tif (id != null)\n\t\t\treturn (MonitoringDevice) super.getObject(id);\n\t\telse\n\t\t\treturn null;\n\t\t\n\t}",
"Reference getDevice();",
"public ProductModel getDevice(String did) {\n\t\tSystem.out.println(\"\\nNetworkDevServ-getDevice()\");\r\n\t\treturn deviceData.getDevice(did);\r\n\t}",
"boolean hasDevice();",
"public SmartDevice getDevice(String type) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic PdaDeviceEntity getDeviceInfo(String pdaCode) {\n\t\treturn (PdaDeviceEntity) getSqlSession().selectOne(\n\t\t\t\tgetClass().getName() + \".getDeviceInfo\", pdaCode);\n\t}",
"@Test\n public void findDeviceByType() throws Exception {\n MockUpnpService upnpService = new MockUpnpService();\n LocalDevice device = SampleData.createLocalDevice();\n upnpService.getRegistry().addDevice(device);\n\n Registry registry = upnpService.getRegistry();\n\n try {\n DeviceType deviceType = new UDADeviceType(\"MY-DEVICE-TYPE\", 1); // DOC: FIND_DEV_TYPE\n Collection<Device> devices = registry.getDevices(deviceType); // DOC: FIND_DEV_TYPE\n assertEquals(devices.size(), 1);\n } finally {}\n\n try {\n ServiceType serviceType = new UDAServiceType(\"MY-SERVICE-TYPE-ONE\", 1); // DOC: FIND_SERV_TYPE\n Collection<Device> devices = registry.getDevices(serviceType); // DOC: FIND_SERV_TYPE\n assertEquals(devices.size(), 1);\n } finally {}\n }",
"@Test\n public void getDeviceIDTest() {\n assertEquals(deviceID, device.getDeviceID());\n }",
"@ServiceMethod(returns = ReturnType.SINGLE)\n public Device getDevice(String deviceId) {\n return this.serviceClient.getDevice(deviceId);\n }",
"private UsbInterface findAdbInterface(UsbDevice device) {\n int count = device.getInterfaceCount();\n for (int i = 0; i < count; i++) {\n UsbInterface intf = device.getInterface(i);\n if (intf.getInterfaceClass() == 255 && intf.getInterfaceSubclass() == 66 &&\n intf.getInterfaceProtocol() == 1) {\n return intf;\n }\n }\n return null;\n }",
"public interface SmartDevicesDb {\n\t\n\tpublic static String INTERFACES = \"smart-interfaces\";\n\tpublic static String DEVICES = \"smart-devices\";\n\t\n\t/**\n\t * Add a new interface for smart devices, e.g. a smart home HUB or MQTT broker.\n\t * @param data - object with e.g. id, type, name, host, auth_info, auth_data, etc.\n\t * @return result code (0 - all good, 1 - no connection or error, 2 - invalid data)\n\t */\n\tpublic int addOrUpdateInterface(JSONObject data);\n\t/**\n\t * Remove interface with given ID.\n\t * @param id - ID of the interface, e.g. fhem2\n\t * @return result code (0 - all good, 1 - no connection or error)\n\t */\n\tpublic int removeInterface(String id);\n\t/**\n\t * Load all known interfaces.\n\t * @return Map with interface IDs as keys, empty map or null (error during load)\n\t */\n\tpublic Map<String, SmartHomeHub> loadInterfaces();\n\t/**\n\t * Return a cached map of interfaces (to reduce database i/o).\t\n\t */\n\tpublic Map<String, SmartHomeHub> getCachedInterfaces();\n\t\n\t/**\n\t * Add a custom smart device.\n\t * @param data - object with e.g. name, type, room, custom_commands, etc.\n\t * @return JSON with device (doc) \"id\" (if new) and result \"code\" (0=good, 1=connection err, 2=other err)\n\t */\n\tpublic JSONObject addOrUpdateCustomDevice(JSONObject data);\n\t/**\n\t * Remove custom smart device with given ID.\n\t * @param id - ID of the device\n\t * @return result code\n\t */\n\tpublic int removeCustomDevice(String id);\n\t/**\n\t * Get custom smart device with given ID.\n\t * @param id - ID of the device\n\t * @return\n\t */\n\tpublic SmartHomeDevice getCustomDevice(String id);\n\t/**\n\t * Get all custom smart devices that correspond to filter set.<br>\n\t * NOTE: If you add multiple filters the method will try to get the best fit but may return partial fits! Be sure to check the result again afterwards. \n\t * @param filters - Map with filters, e.g. type=\"light\" ({@link SmartDevice.Types}) or typeArray=\"heater, fan\" (string or collection), room=\"livingroom\" ({@link Room.Types}) or roomArray, etc.\n\t * @return\n\t */\n\tpublic Map<String, SmartHomeDevice> getCustomDevices(Map<String, Object> filters);\n\t\n\t/**\n\t * Returns a map with device type as key and a set of device names for this type as value.<br> \n\t * The method is meant to be used for example by NLU parameters to extract entities. It should return a buffered result for super fast\n\t * access.<br>\n\t * Note for developers: AVOID RELOADING during the call (except on first call) since this can slow down SEPIA's NLU chain dramatically!\n\t * @return set of device names by type\n\t */\n\tpublic Map<String, Set<String>> getBufferedDeviceNamesByType();\n\t/**\n\t * Clear device name buffer.\n\t * @return success/fail\n\t */\n\tpublic boolean clearDeviceTypeAndNameBuffer();\n\t\n}",
"public SmartHomeDevice getCustomDevice(String id);",
"public final Device blockingGetHardware() {\n Device hardware = find(false);\n if (hardware != null) {\n return hardware;\n }\n while (!Thread.currentThread().isInterrupted()) {\n try {\n Thread.sleep(2000);\n Device hardware2 = find(false);\n if (hardware2 != null) {\n return hardware2;\n }\n } catch (InterruptedException e) {\n return null;\n }\n }\n return null;\n }",
"private processing.mode.android.Device find(boolean r7) {\n /*\n r6 = this;\n r6.refresh()\n java.util.Map<java.lang.String, processing.mode.android.Device> r3 = r6.devices\n monitor-enter(r3)\n java.util.Map<java.lang.String, processing.mode.android.Device> r2 = r6.devices // Catch:{ all -> 0x0033 }\n java.util.Collection r2 = r2.values() // Catch:{ all -> 0x0033 }\n java.util.Iterator r2 = r2.iterator() // Catch:{ all -> 0x0033 }\n L_0x0010:\n boolean r4 = r2.hasNext() // Catch:{ all -> 0x0033 }\n if (r4 != 0) goto L_0x0019\n monitor-exit(r3) // Catch:{ all -> 0x0033 }\n r0 = 0\n L_0x0018:\n return r0\n L_0x0019:\n java.lang.Object r0 = r2.next() // Catch:{ all -> 0x0033 }\n processing.mode.android.Device r0 = (processing.mode.android.Device) r0 // Catch:{ all -> 0x0033 }\n java.lang.String r4 = r0.getId() // Catch:{ all -> 0x0033 }\n java.lang.String r5 = \"emulator\"\n boolean r1 = r4.contains(r5) // Catch:{ all -> 0x0033 }\n if (r1 == 0) goto L_0x002d\n if (r7 != 0) goto L_0x0031\n L_0x002d:\n if (r1 != 0) goto L_0x0010\n if (r7 != 0) goto L_0x0010\n L_0x0031:\n monitor-exit(r3) // Catch:{ all -> 0x0033 }\n goto L_0x0018\n L_0x0033:\n r2 = move-exception\n monitor-exit(r3) // Catch:{ all -> 0x0033 }\n throw r2\n */\n throw new UnsupportedOperationException(\"Method not decompiled: processing.mode.android.Devices.find(boolean):processing.mode.android.Device\");\n }",
"@Override\n Device retrieveImpl(ExecutionDAG.DAGVertex vertex, List<Device> devices) {\n long[] alreadyPresentDataSize = new long[devicesManager.getNumberOfGPUsToUse()];\n // Compute the amount of data on each device, and if any device has any data at all;\n computeDataSizeOnDevices(vertex, alreadyPresentDataSize);\n // If not device has at least X% of data available, it's not worth optimizing data locality (exploration preferred to exploitation);\n if (findIfAnyDeviceHasEnoughData(alreadyPresentDataSize, vertex, devices)) {\n // Find device with maximum available data;\n return selectDeviceWithMostData(devices, alreadyPresentDataSize);\n } else {\n // No data is present on any GPU: select the device with round-robin;\n return roundRobin.retrieve(vertex, devices);\n }\n }",
"private void getDevice(){\n\t\tdialog.setContentView(R.layout.device_list_popup);\n\t\tdialog.setCancelable(true);\n\t\tdialog.setTitle(\"Paired Bluetooth Devices\");\n\t\tdialog.show();\n\t\tProgressBar tempSpinner = (ProgressBar)dialog.findViewById(R.id.progressBar);\n\t\ttempSpinner.setVisibility(View.INVISIBLE); //Hide the progress bar while we aren't connecting\n\n\t\tListView lv = (ListView) dialog.findViewById(R.id.device_list_display);\n\t\tlv.setAdapter(new ArrayAdapter<String> (this, R.layout.device_list_popup));\n\n\t\tlv.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\t\t\tpublic void onItemClick(AdapterView<?> arg, View view, int position, long id) {\n\t\t\t\tString address = (String) ((TextView) view).getText();\n\t\t\t\tfor (String temp : address.split(\"\\n\")) {\n\t\t\t\t\taddress = temp; //Only get address, discard name\n\t\t\t\t}\n\t\t\t\tBluetoothDevice device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(address);\n\t\t\t\tnew ConnectTask().execute(device);\n\t\t\t}\n\t\t});\n\t}",
"@Override\n public boolean isAlreadyInDb () {\n try {\n load( idDevice );\n } catch ( EntityNotFoundException e ) {\n return false;\n }\n return true;\n }",
"@Override\r\n\tpublic Device devGetDevice(boolean allProperties) throws RTException {\n\t\treturn null;\r\n\t}",
"public T scanAllDevices(DeviceType dType) {\n for (String devLabel : Globals.core().getLoadedDevicesOfType(dType)) {\n T device = getAutoInstance(devLabel);\n if (device != null) {\n return device;\n }\n }\n Globals.mm().logs().logMessage(\"Autofinder found no devices.\");\n return null; //Nothing was identified.\n }",
"public T getAutoInstance(String devName) {\n S settings = sGen.apply(devName);\n for (Class clz : subClasses) {\n T device;\n try {\n device = (T) clz.getDeclaredConstructor(sClass).newInstance(settings);\n } catch (InvocationTargetException e) { \n if (e.getCause() instanceof Device.IDException) {\n continue; //This just means the device wasn't identified. Try the next device\n } else {\n throw new RuntimeException(e.getCause());\n }\n } catch (NoSuchMethodException | InstantiationException | IllegalAccessException me) {\n throw new RuntimeException(me);\n }\n Globals.mm().logs().logMessage(String.format(\"Autofinder found device of type %s for device label %s.\", device.getClass().toString(), devName));\n return device; //We only get this far if the object successfully initializes.\n }\n return null; //Nothing was identified.\n }",
"private boolean checkIfDatabaseOnDevice() {\n SQLiteDatabase tempDB = null;\n try {\n String myPath = DB_PATH + DB_NAME;\n tempDB = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READWRITE);\n } catch (SQLiteException e) {\n e.printStackTrace();\n }\n if (tempDB != null)\n tempDB.close();\n return tempDB != null;\n }",
"DeviceInfo getDeviceInfo(DeviceIdentifier deviceIdentifier) throws DeviceDetailsMgtException;",
"public static UserDevice load ( String idDevice ) throws EntityNotFoundException {\n return GenericEntity.load( UserDevice.class, idDevice );\n }",
"boolean hasDeviceId();",
"boolean hasDeviceId();",
"public void findBluetooth() {\n BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (mBluetoothAdapter == null) {\n // Device does not support Bluetooth\n btStatusDisplay.setText(\"Device does not support Bluetooth\");\n }\n btStatusDisplay.setText(\"Trying to connect...\");\n\n /** Pops up request to enable if found not enabled */\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n /** Get reference to scale as Bluetooth device \"mmDevice\" */\n Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();\n if (pairedDevices.size() > 0) {\n for (BluetoothDevice device : pairedDevices) {\n if (device.getName().equals(\"BLUE\")) {\n mmDevice = device;\n btStatusDisplay.setText(\"Bluetooth device found\");\n break;\n }\n }\n }\n }",
"public UserVo selectDbPhone(){\n\n try {\n DaoSession daoSession = mDBHelper.getSession(true);\n UserVo lastUserVo = loadLastLoginUser(mContext);\n if( lastUserVo == null){\n return null;\n }\n\n DbPhoneVoDao dbPhoneVoDao = daoSession.getDbPhoneVoDao();\n List<DbPhoneVo> dbPhoneVoList = dbPhoneVoDao.queryBuilder().list();\n\n if (dbPhoneVoList != null) {\n for (DbPhoneVo vo : dbPhoneVoList) {\n String userId = vo.getUserId();\n\n if (userId.equalsIgnoreCase(lastUserVo.getUserId())) {\n return lastUserVo;\n }\n }\n\n mDBHelper.closeSession();\n return lastUserVo;\n }\n } catch (SQLiteConstraintException se){\n se.printStackTrace();\n } catch (Exception e){\n e.printStackTrace();\n }\n mDBHelper.closeSession();\n return null;\n }",
"@GET(\"device\")\n Call<DevicesResponse> getDevice();",
"private TestDevice searchTestDevice(final String deviceSerialNumber) {\n for (TestDevice td : mDevices) {\n if (td.getSerialNumber().equals(deviceSerialNumber)) {\n return td;\n }\n }\n return null;\n }",
"DeviceEntity getByMac(String mac);",
"public boolean isThisMyFriend(String deviceAddress){\n boolean isFriend=true;\n try{\n database=dbH.getReadableDatabase();\n dbH.openDataBase();\n query=\"SELECT * FROM Friend WHERE deviceID='\"+deviceAddress+\"'\";\n cursor = database.rawQuery(query,null);\n cursor.moveToFirst();\n if(cursor.getCount()==0)\n isFriend=false;\n cursor.close();\n dbH.close();\n }\n catch(SQLException e){\n e.printStackTrace();\n }\n Log.i(TAG,\"Is \"+deviceAddress+\" your friend? \"+isFriend);\n return isFriend;\n\n }",
"private BluetoothDevice mBTDeviceByName(String sNewDeviceName) {\n if (oDevice == null) {\n Set<BluetoothDevice> pairedDevices = oBTadapter.getBondedDevices();\n if (pairedDevices.size() > 0) {\n for (BluetoothDevice device : pairedDevices) {\n if (mTextLike(sNewDeviceName,device.getName())){\n return device;\n }\n }\n }\n } else {\n if (mTextLike(sNewDeviceName,oDevice.getName())) {\n return oDevice;\n }\n }\n return null;\n }",
"@Override\n\tpublic Patient fetchByPhone(long pNumber) throws DAOException\n\t{\n\t\tConnection con = DBUtil.getConnection();\n\t\tPatient patientObject = null;\n\t\ttry {\n\n\t\t\tString query = \"select * from patient where phone=?;\";\n\t\t\tPreparedStatement preparedStmt = con.prepareStatement(query);\n\t\t\tpreparedStmt.setLong(1, pNumber);\n\t\t\tResultSet rs = preparedStmt.executeQuery();\n\t\t\tif(rs.next())\n\t\t\t{\n\t\t\t\tpatientObject = new Patient(rs.getInt(1), rs.getString(2), rs.getString(3), rs.getString(4), rs.getString(5));\n\t\t\t}\n\t\t} catch (SQLException e) \n\t\t{\n\t\t\tthrow new DAOException(\"Sorry cannot reach now.\",e);\n\t\t}\n\t\tfinally \n\t\t{\n\t\t\tDBUtil.releaseResource(con);\n\t\t}\n\t\treturn patientObject;\n\t}",
"public Dev selectOne(Connection conn, String devId) {\n\t\treturn null;\n\t}",
"public void getDevice(org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceIdentifier request,\n io.grpc.stub.StreamObserver<org.thethingsnetwork.management.proto.HandlerOuterClass.Device> responseObserver);",
"public Cursor getDevices(){\n String tabla = devicesContract.deviceEntry.tableName,\n selection = null,\n groupBy = null,\n having = null,\n orderBy = null;\n String[] columnas = null, selectionArgs = null;\n Cursor d = getDevice(tabla,columnas,selection,selectionArgs,groupBy,having,orderBy);\n return d;\n }",
"public static synchronized Device getAFreeDevice() {\n Device freeDevice = null;\n for (Map.Entry<Device, String> entry : deviceStatusMap.entrySet()) {\n Device key = entry.getKey();\n String value = entry.getValue();\n if (value.equalsIgnoreCase(\"free\")) {\n freeDevice = key;\n break;\n }\n }\n Assert.assertNotNull(freeDevice, \"No free device found\");\n return freeDevice;\n }",
"@Override\n public UserDeviceEntity find(BigInteger customerId, String uuid) throws Exception {\n return null;\n }",
"public List<IkrInstanceData> fetchDBMS_SYBASE_DEVICE()\r\n\tthrows ConnectorException, FetchException, PersistenceException {\t \r\n\t\tList<IkrInstanceData> res = new ArrayList<IkrInstanceData>();\r\n\t\t\r\n\t\tSybaseDeviceMeasurement measurement = (SybaseDeviceMeasurement)client.getMeasurement(\"DBMS_SYBASE_DEVICE\");\r\n\r\n\t\tfor(SybaseDeviceIOResult info : measurement.getDeviceIOResult())\r\n\t\t\tres.add(new SybaseDeviceIkrInstanceData(client.getDatabaseInstance(), \r\n\t\t\t\t\t\t\t\t\t\t\t\t info, \r\n\t\t\t\t\t\t\t\t\t\t\t\t fetchDate));\r\n\t\t\r\n\t\treturn res;\r\n\t}",
"public void dbConnector(){\n\t log.info(\"Extracting device information ... \");\n\t dbConnect.getTableInfo(properties.getProperty(\"deviceDetailsTable\"));\n\t deviceName=dbConnect.findValue(\"deviceIP\", deviceIP, \"deviceName\");\n\t log.info(\"deviceName set to \"+deviceName+\" deviceIP= \"+deviceIP);\n\t if(dbConnect.findValue(\"deviceIP\",deviceIP, \"deviceType\").equals(\"CISCO\"))\n\t\t deviceType=RouterType.CISCO;\n\t else\n\t\t deviceType=RouterType.JUNIPER;\n\t log.info(\"deviceType set to \"+deviceType);\n\t devicePassword=dbConnect.findValue(\"deviceIP\", deviceIP, \"devicePassword\");\n\t deviceEnPassword=dbConnect.findValue(\"deviceIP\",deviceIP,\"deviceEnPassword\");\n\t log.info(\"Successfully extracted device data\\nExtracting backupServer details\");\n\t log.info(\"Seraching for backupServerDetailsTable ... \");\n\t dbConnect.getTableInfo(properties.getProperty(\"backupServerDetailsTable\"));\n\t log.info(\"Found the table containing backup server data\");\n\t backupServerIP=properties.getProperty(\"backupServerIP\");\n\t backupServerName=dbConnect.findValue(\"backupServerIP\", properties.getProperty(\"backupServerIP\"), \"backupServerName\");\n\t backupServerPassword=dbConnect.findValue(\"backupServerIP\", properties.getProperty(\"backupServerIP\"), \"backupServerPassword\");\n\t if(dbConnect.findValue(\"backupServerIP\", properties.getProperty(\"backupServerIP\"), \"backupServerType\").equals(\"scp\"))\n\t\t backupServerType=BackupServerType.scp;\n\t else\n\t\t backupServerType=BackupServerType.tftp;\n\t backupServerFolderLocation=dbConnect.findValue(\"backupServerIP\", backupServerIP, \"backupServerFolderLocation\");\n\t if(dbConnect.findValue(\"backupServerIP\", backupServerIP, \"connectionType\").equals(\"TELNET\"))\n\t\t connectionType=ConnectionType.TELNET;\n\t else\n\t\t connectionType=ConnectionType.SSH;\n\t log.info(\"Succesfully collected data about the backup sever IP=\"+backupServerIP+\" folderLoaction=\"+backupServerFolderLocation+\" connection type= \"+connectionType+\" backupServerType= \"+backupServerType+\" username= \"+backupServerName+\" password= ******\");\n }",
"@Test\n final void testRetrieveDeviceEmpty() {\n assertThrows(\n ExceptionType.DeviceNotFoundException.class,\n () -> deviceController.retrieveDevice(\"NotAvailable\"));\n }",
"private synchronized boolean setAdbInterface(UsbDevice device, UsbInterface intf) throws IOException, InterruptedException {\n Log.d(\"Nightmare\", \"setAdbInterface\");\n if (adbTerminalConnection != null) {\n adbTerminalConnection.close();\n adbTerminalConnection = null;\n mDevice = null;\n }\n\n UsbManager mManager = (UsbManager) getSystemService(Context.USB_SERVICE);\n if (device != null && intf != null) {\n UsbDeviceConnection connection = mManager.openDevice(device);\n if (connection != null) {\n if (connection.claimInterface(intf, false)) {\n\n handler.sendEmptyMessage(Message.CONNECTING);\n\n adbTerminalConnection = AdbConnection.create(new UsbChannel(connection, intf), adbCrypto);\n\n adbTerminalConnection.connect();\n\n //TODO: DO NOT DELETE IT, I CAN'T EXPLAIN WHY\n// adbTerminalConnection.open(\"shell:exec date\");\n mDevice = device;\n handler.sendEmptyMessage(Message.DEVICE_FOUND);\n return true;\n } else {\n connection.close();\n }\n }\n }\n\n handler.sendEmptyMessage(Message.DEVICE_NOT_FOUND);\n\n mDevice = null;\n return false;\n }",
"public final Device blockingGetEmulator() {\n Device emu = find(true);\n if (emu != null) {\n return emu;\n }\n EmulatorController emuController = EmulatorController.getInstance();\n if (emuController.getState() == State.NOT_RUNNING) {\n try {\n emuController.launch();\n } catch (IOException e) {\n System.err.println(\"Problem while launching emulator.\");\n e.printStackTrace(System.err);\n return null;\n }\n } else {\n System.out.println(\"Emulator is \" + emuController.getState() + \", which is not expected.\");\n }\n while (!Thread.currentThread().isInterrupted()) {\n if (emuController.getState() == State.NOT_RUNNING) {\n System.err.println(\"Error while starting the emulator. (\" + emuController.getState() + \")\");\n return null;\n }\n Device emu2 = find(true);\n if (emu2 != null) {\n return emu2;\n }\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e2) {\n System.err.println(\"Devices: interrupted in loop.\");\n return null;\n }\n }\n return null;\n }",
"public synchronized MonitoringDevice getByMacAddress(String macAddress)\n\t{\n\t\tInteger id = this.indexByMac.get(macAddress);\n\t\tif (id != null)\n\t\t\treturn (MonitoringDevice) super.getObject(id);\n\t\telse\n\t\t\treturn null;\n\t\t\n\t}",
"public abstract List<NADevice> getDevices(Context context);",
"@Test\n public void getNotExistingSession() throws Exception {\n addDevice();\n assertEquals(\"Session should be created\", snmpSession, snmpController.getSession(device.deviceId()));\n assertEquals(\"Map should contain session\", 1, snmpController.snmpDeviceMap.size());\n assertEquals(\"Session should be fetched from map\", snmpSession, snmpController.getSession(device.deviceId()));\n }",
"private static Connection connect(){\n Connection conn = null;\n try{\n Class.forName(\"org.sqlite.JDBC\");\n conn = DriverManager.getConnection(\"jdbc:sqlite:devices.db\");\n } catch (ClassNotFoundException | SQLException e){\n System.out.println(e.toString());\n }\n return conn;\n }",
"private void getDevices(){\n progress.setVisibility(View.VISIBLE);\n\n emptyMessage.setVisibility(View.GONE);\n getListView().setVisibility(View.GONE);\n\n // request device list from the server\n Model.PerformRESTCallTask gd = Model.asynchRequest(this,\n getString(R.string.rest_url) + \"?\"\n + \"authentification_key=\" + MainActivity.authentificationKey + \"&operation=\" + \"getdevices\",\n //Model.GET,\n \"getDevices\");\n tasks.put(\"getDevices\", gd);\n }",
"public IDevice getNamedDevice(String simpleName) {\n\t\ttry {\n\t\t\treturn (IDevice) getObjectInstance(\"com.console.springernature.paint.model.\"+simpleName);\n\t\t} catch (ClassCastException e) {\n\t\t\tlogger.error(\"(ClassCastException) Unable to instanziate the named device : \"+simpleName+\" ...\", e);\n\t\t} catch (Throwable e) {\n\t\t\tlogger.error(\"(Generic Exception) Unable to instanziate the named device : \"+simpleName+\" ...\", e);\n\t\t}\n\t\treturn null;\n\t}",
"@Transactional(readOnly = true)\n public DeviceDTO findOne(Long id) {\n log.debug(\"Request to get Device : {}\", id);\n Device device = deviceRepository.findOne(id);\n DeviceDTO deviceDTO = deviceMapper.deviceToDeviceDTO(device);\n return deviceDTO;\n }",
"@Override\n\tpublic int addDevice(DeviceBean db) {\n\t\tdb.setUuid(dao.getClientUuid(db.getClientId()));//查询出uuid\n\t\tdb.setMajor(dao.getClientMajor(db.getClientId()));//查询出major\n\t\treturn dao.addDevice(db);\n\t}",
"private String mapDeviceToCloudDeviceId(String device) throws Exception {\n if (device.equalsIgnoreCase(\"/dev/sdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"/dev/sdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"/dev/sde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"/dev/sdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"/dev/sdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"/dev/sdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"/dev/sdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"/dev/sdj\"))\n return \"9\";\n\n else if (device.equalsIgnoreCase(\"/dev/xvdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"/dev/xvdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"/dev/xvde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"/dev/xvdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"/dev/xvdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"/dev/xvdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"/dev/xvdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"/dev/xvdj\"))\n return \"9\";\n\n else if (device.equalsIgnoreCase(\"xvdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"xvdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"xvde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"xvdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"xvdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"xvdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"xvdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"xvdj\"))\n return \"9\";\n\n else\n throw new Exception(\"Device is not supported\");\n }",
"private void deviceDetected(String btMac) {\r\n\t\t// We only allow one doctor to be logged in at the same place\r\n\t\tif (doctor == null) {\r\n\t\t\t// Check db to see if it is a doctor if so log in\r\n\t\t\tDoctor d = dbAdapter.getDoctor(btMac);\r\n\t\t\tif (d != null) {\r\n\t\t\t\t// Successful login\r\n\t\t\t\tthis.doctor = d;\r\n\t\t\t\tthis.doctor.setOnline(1);\r\n\t\t\t\tdoLogin();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"java.lang.String getDeviceId();",
"public void openUsbDevice() {\n tryGetUsbPermission();\n }",
"public void getDeviceByModelNumber()\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Enter Model number \");\r\n\t\t\tString searchModelNumber = sc.nextLine();\r\n\t\t\t\r\n\t\t\tDevice d = record.getDeviceByModelNumber(searchModelNumber);\r\n\t\t\tprintDeviceDetails(d);\r\n\t\t}",
"public static MediaDevice getLocalMediaDevice(Context c, NwdDb db) {\n\n if(localMediaDevice == null){\n\n localMediaDevice = db.getLocalMediaDevice(c);\n }\n\n return localMediaDevice;\n }",
"Integer getDeviceId();",
"private AudioDeviceInfo findAudioDevice(int deviceFlag, int deviceType) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n AudioManager manager = (AudioManager) this.getSystemService(Context.AUDIO_SERVICE);\n AudioDeviceInfo[] adis = manager.getDevices(deviceFlag);\n for (AudioDeviceInfo adi : adis) {\n if (adi.getType() == deviceType) {\n return adi;\n }\n }\n }\n return null;\n }",
"public static Device getDevice(Context context) {\n Device result = instance;\n if (instance == null) {\n synchronized (DeviceInfoFactory.class) {\n result = instance;\n if (result == null) {\n String id = Settings.Secure.getString(\n context.getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n String name = Build.MODEL;\n\n String arch = System.getProperty(\"os.arch\");\n\n Point size = getScreenSize(context);\n Screen screen = new Screen(size.x, size.y);\n\n instance = result = new Device(id, DEVICE_TYPE, name, arch, screen);\n }\n }\n }\n\n return result;\n }",
"public Device getDevice() {\n\t\treturn this.device;\n\t}",
"public static void phoneAdmin(){\r\n\r\n\r\n try (Connection c = getConnection()) {\r\n\r\n // String sql = \"SELECT * FROM sms.phones when PhoneNumber = 79827956841 \" ;\r\n String sql = \"SELECT * from sms_log.users where username = 'Pedro'\";\r\n PreparedStatement ps = c.prepareStatement(sql);\r\n\r\n\r\n try (ResultSet rs = ps.executeQuery()) {\r\n if (rs.next()) {\r\n isPhoneAdminExists = true;\r\n\r\n\r\n }\r\n\r\n adminSmsRid();\r\n }\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (isPhoneAdminExists) {\r\n\r\n\r\n blackList();\r\n\r\n\r\n\r\n }\r\n\r\n }",
"@Override\n\tpublic Legacydb fetchByPrimaryKey(Serializable primaryKey)\n\t\tthrows SystemException {\n\t\tLegacydb legacydb = (Legacydb)EntityCacheUtil.getResult(LegacydbModelImpl.ENTITY_CACHE_ENABLED,\n\t\t\t\tLegacydbImpl.class, primaryKey);\n\n\t\tif (legacydb == _nullLegacydb) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (legacydb == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tlegacydb = (Legacydb)session.get(LegacydbImpl.class, primaryKey);\n\n\t\t\t\tif (legacydb != null) {\n\t\t\t\t\tcacheResult(legacydb);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tEntityCacheUtil.putResult(LegacydbModelImpl.ENTITY_CACHE_ENABLED,\n\t\t\t\t\t\tLegacydbImpl.class, primaryKey, _nullLegacydb);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tEntityCacheUtil.removeResult(LegacydbModelImpl.ENTITY_CACHE_ENABLED,\n\t\t\t\t\tLegacydbImpl.class, primaryKey);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn legacydb;\n\t}",
"DeviceId deviceId();",
"DeviceId deviceId();",
"public abstract String getDriver() throws DataServiceException;",
"static boolean checkIsDeviceAvailable(JSONObject respJson)\n {\n String respStr = getCmdJsonStr(respJson);\n if (respStr != null)\n {\n return checkIsDeviceAvailable(respStr);\n }\n else\n {\n return false;\n }\n }",
"public String getDevice() {\r\n return device;\r\n }",
"public boolean blockDevice(device dev){\n boolean result = false;\n String estado = \"bloqueado\";\n try {\n String args [] = new String[1];\n args[0] = dev.getAddress();\n Cursor cursor = this.getDevice(devicesContract.deviceEntry.tableName,null,devicesContract.deviceEntry.address+\"=?\",args,null,null,null);\n if (cursor.getCount() > 0){\n cursor.moveToFirst();\n String bloqueado = cursor.getString(cursor.getColumnIndex(devicesContract.deviceEntry.bloqueado));\n if(bloqueado == null){\n estado = \"bloqueado\";\n result = true;\n }\n else if(bloqueado.equals(\"bloqueado\")) {\n estado = \"desbloqueado\";\n }\n else{\n estado = \"bloqueado\";\n result = true;\n }\n }else{\n Log.e(\"deviceDBHelper\", \"Error bloqueando Dispositivo no emparejado:\"+dev.getAddress() );\n }\n ContentValues cv = new ContentValues();\n cv.put(devicesContract.deviceEntry.bloqueado, estado);\n SQLiteDatabase db = getWritableDatabase();\n db.update(devicesContract.deviceEntry.tableName, cv, devicesContract.deviceEntry.address + \"='\" + dev.getAddress()+\"'\", null);\n db.close();\n }catch (Exception e){\n Log.e(\"deviceDBHelper\", \"Error bloqueando Dispositivo: \" + e.toString());\n }\n return result;\n }",
"IDeviceState getDeviceState(UUID id) throws SiteWhereException;",
"public TestDevice getDevice() {\n return mDevice;\n }",
"public void deviceLoaded(Device device);",
"public static Disease selectOne(String command) throws Exception {\n if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)\n {\n throw new ApplicationException(\"Not allowed to send sql directly. Rewrite the calling class to not use this query:\\r\\n\" + command);\n }\n \n List<Disease> list = tableToList(Db.getTable(command));\n if (list.Count == 0)\n {\n return null;\n }\n \n return list[0];\n }",
"@Test(expected = SystemObjectIdException.class)\n public void shouldThrowExceptionIfFailToGetVariable() throws IOException {\n\n expect(configuration.createPDU(PDU.GET)).andReturn(new PDU());\n\n expect(snmpInterface.send(isA(PDU.class), same(target))).andThrow(new IOException());\n replayAll();\n\n try {\n session.identifyDevice();\n assert false : \"Should not reach\";\n } finally {\n verifyAll();\n }\n }",
"@Override\n\tpublic int updateDevice(DeviceBean db) {\n\t\treturn dao.updateDevice(db);\n\t}",
"public boolean tryConnection(String userName, String password){\n //ID cant be set BY the program, it has to be pull out from database\n //Compare the userName and the password in the database then return the ID\n //SQLite Query, need to change the name of variable for the proper field\n String getUserQuery = \"SELECT userID FROM UserAccount WHERE userName=\\\"\" + userName +\n \"\\\" and userPassword=\\\"\" + password + \"\\\"\";\n\n //Try / catch because when connection to database there is possible problem\n try {\n //This has to be changed for database handler\n boolean resultExist = true;//Get the result of database\n int result = 0;\n\n if(resultExist)//Look if there is 1 result, if so put the ID of the user in ID\n {\n this.ID = result;\n this.userName = userName;\n this.password = password;\n return(true);//Connection successful\n }\n }\n //If something went wrong with the database(lost connection or other thing)\n catch(Exception ex)\n {\n return(false);\n }\n return(false);//Connection unsuccessful\n }",
"public DeviceManagementScriptDeviceState get() throws ClientException {\n return send(HttpMethod.GET, null);\n }"
]
| [
"0.66631365",
"0.65182596",
"0.64819044",
"0.64264786",
"0.63893986",
"0.6386411",
"0.6293772",
"0.62799937",
"0.6162092",
"0.6092839",
"0.6025582",
"0.5997127",
"0.5929559",
"0.59082294",
"0.589455",
"0.5861005",
"0.58404946",
"0.58138865",
"0.5758002",
"0.57514054",
"0.56936926",
"0.56740016",
"0.5602389",
"0.55656433",
"0.5564143",
"0.5558829",
"0.5534058",
"0.5523467",
"0.5510019",
"0.5504712",
"0.5502944",
"0.5469493",
"0.54643387",
"0.5438857",
"0.5424418",
"0.5394911",
"0.5383687",
"0.5368471",
"0.53669417",
"0.5357508",
"0.53408444",
"0.5339884",
"0.5339015",
"0.533289",
"0.5291481",
"0.5282179",
"0.5273284",
"0.5273284",
"0.5253798",
"0.52448237",
"0.52295053",
"0.5219425",
"0.5217983",
"0.52146304",
"0.52096033",
"0.5201811",
"0.5195395",
"0.51650494",
"0.5151516",
"0.51397645",
"0.5128974",
"0.51274854",
"0.51263887",
"0.5111321",
"0.51112",
"0.51025987",
"0.50992167",
"0.509626",
"0.50941724",
"0.50891936",
"0.50798297",
"0.5076434",
"0.5063102",
"0.50621873",
"0.5060847",
"0.50573945",
"0.50506365",
"0.5046213",
"0.5040317",
"0.50372726",
"0.50331825",
"0.5010906",
"0.5003086",
"0.50014883",
"0.4995238",
"0.49917486",
"0.49884704",
"0.49884704",
"0.4979327",
"0.4979288",
"0.49714234",
"0.49633652",
"0.49535593",
"0.49369508",
"0.49365422",
"0.49364948",
"0.4936274",
"0.49335185",
"0.4933248",
"0.49265388"
]
| 0.70557755 | 0 |
Try getting a non existing device. | @Test
public void getDeviceNullTest() {
assertNull(getDevice("Non existing device"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void getDeviceTest() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);\n\n assertEquals(device, getDevice(DatabaseTest.DEVICE_ID));\n DatabaseTest.cleanDatabase();\n }",
"@Test\n public void findDevice() throws Exception {\n MockUpnpService upnpService = new MockUpnpService();\n LocalDevice device = SampleData.createLocalDevice();\n upnpService.getRegistry().addDevice(device);\n\n UDN udn = device.getIdentity().getUdn();\n\n Registry registry = upnpService.getRegistry(); // DOC: FIND_ROOT_UDN\n Device foundDevice = registry.getDevice(udn, true);\n\n assertEquals(foundDevice.getIdentity().getUdn(), udn); // DOC: FIND_ROOT_UDN\n\n LocalDevice localDevice = registry.getLocalDevice(udn, true); // DOC: FIND_LOCAL_DEVICE\n assertEquals(localDevice.getIdentity().getUdn(), udn);\n\n SampleDeviceRootLocal.assertLocalResourcesMatch(\n upnpService.getConfiguration().getNamespace().getResources(device)\n );\n }",
"@Test\n final void testRetrieveDeviceEmpty() {\n assertThrows(\n ExceptionType.DeviceNotFoundException.class,\n () -> deviceController.retrieveDevice(\"NotAvailable\"));\n }",
"public int doesDeviceExist(String device){\n DBSQLiteHelper DBhelper = new DBSQLiteHelper(getApplicationContext());\n SQLiteDatabase db = DBhelper.getReadableDatabase();\n\n String[] select = {\n DBContract.Devices.COLUMN_DEVICE,\n DBContract.Devices.COLUMN_TYPE\n };\n\n String where = DBContract.Devices.COLUMN_DEVICE + \" = ?\";\n\n String[] whereValues = {device};\n\n Cursor cursor = db.query(\n DBContract.Devices.TABLE_NAME, // The table to query\n select, // The columns to return\n where, // The columns for the WHERE clause\n whereValues, // The values for the WHERE clause\n null, // don't group the rows\n null, // don't filter by row groups\n null // don't sort\n );\n\n cursor.moveToFirst();\n if(cursor.getCount() == 0){ //No such device exists\n return -1;\n }\n else if(cursor.getInt(1) == 0){ //Device registered to a runner (GOOD)\n return 0;\n }\n else //Device registered to a contact (BAD)\n return 1;\n }",
"@Test\n public void getDeviceTest() throws ApiException {\n String deviceId = null;\n // DeviceEnvelope response = api.getDevice(deviceId);\n\n // TODO: test validations\n }",
"@Test\n public void retrieveDeviceTest() throws ApiException {\n String collectionId = null;\n String deviceId = null;\n Device response = api.retrieveDevice(collectionId, deviceId);\n\n // TODO: test validations\n }",
"boolean hasDevice();",
"@Test\n final void testCreateDeviceAlreadyExists() {\n when(deviceDao.findDevice(DeviceFixture.SERIAL_NUMBER)).thenReturn(Optional.of(deviceDTO));\n\n assertThrows(\n ExceptionType.DeviceAlreadyExistsException.class,\n () -> deviceController.createDevice(createDeviceRequest));\n }",
"@Test\n public void getNotExistingSession() throws Exception {\n addDevice();\n assertEquals(\"Session should be created\", snmpSession, snmpController.getSession(device.deviceId()));\n assertEquals(\"Map should contain session\", 1, snmpController.snmpDeviceMap.size());\n assertEquals(\"Session should be fetched from map\", snmpSession, snmpController.getSession(device.deviceId()));\n }",
"@Override\n\tprotected boolean isExist(AbnormalDevice record) {\n\t\treturn false;\n\t}",
"public Device getById(String id) {\n\n try {\n return deviceRepository.findOne(id);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return null;\n }",
"public Device getDevice() {\n Long __key = this.deviceId;\n if (device__resolvedKey == null || !device__resolvedKey.equals(__key)) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n DeviceDao targetDao = daoSession.getDeviceDao();\n Device deviceNew = targetDao.load(__key);\n synchronized (this) {\n device = deviceNew;\n \tdevice__resolvedKey = __key;\n }\n }\n return device;\n }",
"public void checkDevices() throws TNotFoundEx{\n\t\tString command = \"adb devices -l\";\n\t\tCommando commando = new Commando();\n\t\tString op = commando.executeCommand(command);\n\t\t\n\t\tOtherUtil oU = new OtherUtil();\n\t\tArrayList<String> devices = oU.getRegexFromString(op, \"(model:.*?device:.+$?)\");\n\t\tint eligDevices = devices.size();\n\t\t\n\t\tif (eligDevices>1)\n\t\t\tthrow new TNotFoundEx(\"ERROR: 2 or more Android devices are connected to the host, please connect only one Android device.\");\n\t\tif (eligDevices == 0)\n\t\t\tthrow new TNotFoundEx(\"ERROR: No Android devices detected by the host. Execute adb devices -l to check the connected devices\");\n\t\t\t\n\t}",
"public com.google.common.util.concurrent.ListenableFuture<org.thethingsnetwork.management.proto.HandlerOuterClass.Device> getDevice(\n org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceIdentifier request);",
"@Test\n final void testRetrieveDevice() {\n when(deviceDao.findDevice(user, DeviceFixture.SERIAL_NUMBER))\n .thenReturn(Optional.of(deviceDTO));\n when(deviceMapper.toModel(deviceDTO)).thenReturn(deviceModel);\n ResponseEntity<DeviceModel> response = deviceController.retrieveDevice(\"1\");\n\n assertNotNull(response);\n assertEquals(200, response.getStatusCodeValue());\n assertNotNull(response.getBody());\n var device = response.getBody();\n assertEquals(deviceModel, device);\n }",
"public org.thethingsnetwork.management.proto.HandlerOuterClass.Device getDevice(org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceIdentifier request);",
"public void testGetSimOperator_unavailableDevice() {\n mMockIDevice = EasyMock.createMock(IDevice.class);\n EasyMock.expect(mMockIDevice.getState()).andReturn(DeviceState.UNAUTHORIZED);\n EasyMock.expect(mMockIDevice.getSerialNumber()).andReturn(\"serial\");\n EasyMock.replay(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n assertNull(mTestDevice.getSimOperator());\n EasyMock.verify(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n }",
"@Test(expected = SystemObjectIdException.class)\n public void shouldThrowExceptionIfFailToGetVariable() throws IOException {\n\n expect(configuration.createPDU(PDU.GET)).andReturn(new PDU());\n\n expect(snmpInterface.send(isA(PDU.class), same(target))).andThrow(new IOException());\n replayAll();\n\n try {\n session.identifyDevice();\n assert false : \"Should not reach\";\n } finally {\n verifyAll();\n }\n }",
"public Device findDeviceById(int id);",
"@Test(expected = SystemObjectIdException.class)\n public void shouldThrowExceptionIfFailToIdentifyDevice() throws IOException {\n\n expect(configuration.createPDU(PDU.GET)).andReturn(new PDU());\n\n expect(snmpInterface.send(isA(PDU.class), same(target))).andReturn(createErrorResponseEvent());\n replayAll();\n\n try {\n session.identifyDevice();\n assert false : \"Should not reach\";\n } finally {\n verifyAll();\n }\n }",
"public Device findById(Long id) throws Exception;",
"public static synchronized Device getAFreeDevice() {\n Device freeDevice = null;\n for (Map.Entry<Device, String> entry : deviceStatusMap.entrySet()) {\n Device key = entry.getKey();\n String value = entry.getValue();\n if (value.equalsIgnoreCase(\"free\")) {\n freeDevice = key;\n break;\n }\n }\n Assert.assertNotNull(freeDevice, \"No free device found\");\n return freeDevice;\n }",
"public SmartDevice readDevice(String id) {\n SQLiteDatabase db = getReadableDatabase();\n\n Cursor cursor = db.query(TABLE_NAME, null, COLUMN_ID + \"=?\", new String[]{id}, null, null, null);\n if (cursor.getCount() <= 0) // If there is nothing found\n return null;\n cursor.moveToFirst(); // In case there are more users with same ID\n SmartDevice device = createDevice(cursor);\n\n close();\n return device;\n }",
"public final Device blockingGetHardware() {\n Device hardware = find(false);\n if (hardware != null) {\n return hardware;\n }\n while (!Thread.currentThread().isInterrupted()) {\n try {\n Thread.sleep(2000);\n Device hardware2 = find(false);\n if (hardware2 != null) {\n return hardware2;\n }\n } catch (InterruptedException e) {\n return null;\n }\n }\n return null;\n }",
"public IDevice getDefaultDevice() {\n\t\tif (defaultDevice==null) {\n\t\t\ttry {\n\t\t\t\tdefaultDevice = (IDevice) getObjectInstance(\"com.console.springernature.paint.model.Device\");\n\t\t\t} catch (ClassCastException e) {\n\t\t\t\tlogger.error(\"(ClassCastException) Unable to instanziate the default device ...\", e);\n\t\t\t} catch (Throwable e) {\n\t\t\t\tlogger.error(\"(Generic Exception) Unable to instanziate the default device ...\", e);\n\t\t\t}\n\t\t}\n\t\treturn defaultDevice;\n\t}",
"boolean hasDeviceId();",
"boolean hasDeviceId();",
"@Test\n public void getDeviceIDTest() {\n assertEquals(deviceID, device.getDeviceID());\n }",
"@Test\n final void testDeleteDeviceNotExisting() {\n assertThrows(\n ExceptionType.DeviceNotFoundException.class,\n () -> deviceController.deleteDevice(\"Not Available device\"));\n }",
"@Override\n\tpublic boolean isBusy() throws DeviceException {\n\t\treturn false;\n\t}",
"@Test\n public void findDeviceByType() throws Exception {\n MockUpnpService upnpService = new MockUpnpService();\n LocalDevice device = SampleData.createLocalDevice();\n upnpService.getRegistry().addDevice(device);\n\n Registry registry = upnpService.getRegistry();\n\n try {\n DeviceType deviceType = new UDADeviceType(\"MY-DEVICE-TYPE\", 1); // DOC: FIND_DEV_TYPE\n Collection<Device> devices = registry.getDevices(deviceType); // DOC: FIND_DEV_TYPE\n assertEquals(devices.size(), 1);\n } finally {}\n\n try {\n ServiceType serviceType = new UDAServiceType(\"MY-SERVICE-TYPE-ONE\", 1); // DOC: FIND_SERV_TYPE\n Collection<Device> devices = registry.getDevices(serviceType); // DOC: FIND_SERV_TYPE\n assertEquals(devices.size(), 1);\n } finally {}\n }",
"public T getAutoInstance(String devName) {\n S settings = sGen.apply(devName);\n for (Class clz : subClasses) {\n T device;\n try {\n device = (T) clz.getDeclaredConstructor(sClass).newInstance(settings);\n } catch (InvocationTargetException e) { \n if (e.getCause() instanceof Device.IDException) {\n continue; //This just means the device wasn't identified. Try the next device\n } else {\n throw new RuntimeException(e.getCause());\n }\n } catch (NoSuchMethodException | InstantiationException | IllegalAccessException me) {\n throw new RuntimeException(me);\n }\n Globals.mm().logs().logMessage(String.format(\"Autofinder found device of type %s for device label %s.\", device.getClass().toString(), devName));\n return device; //We only get this far if the object successfully initializes.\n }\n return null; //Nothing was identified.\n }",
"public VinDevices getDevice(String id_device)\n\t\t{\n\t\t\tList<?> dataAux;\n\t\t\tVinDevices Arecord = new VinDevices();\n\t\t\ttry{\n\t\t\t\tdataAux =\tthis.getListaBaseTable(\"id_device='\"+id_device+\"'\");\n\t\t\t\tArecord = (VinDevices)dataAux.get(0);\n\t\t\t}\n\t\t\tcatch(Exception e){}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tdataAux = null;\n\t\t\t}\n\t\t\treturn Arecord;\t\t\t\t\n\t\t\t\n\t\t}",
"public SmartDevice getDevice(String type) {\n\t\treturn null;\n\t}",
"@Override\n public Optional<SensingDevice> findByIdWithoutObservations(String deviceId) {\n return null;\n }",
"@Override\n public String getDeviceName() {\n return null;\n }",
"@Test\n public void newDeviceDuplicateTest() {\n DatabaseTest.setupDevice();\n Device newDevice = newDevice(DatabaseTest.DEVICE_ID);\n\n assertNull(newDevice);\n DatabaseTest.cleanDatabase();\n }",
"Reference getDevice();",
"public Device getByDeviceId(String deviceId) {\n\n try {\n return deviceRepository.findByDeviceId(deviceId);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return null;\n }",
"@ServiceMethod(returns = ReturnType.SINGLE)\n public Device getDevice(String deviceId) {\n return this.serviceClient.getDevice(deviceId);\n }",
"public void testGetSimState_unavailableDevice() {\n mMockIDevice = EasyMock.createMock(IDevice.class);\n EasyMock.expect(mMockIDevice.getState()).andReturn(DeviceState.UNAUTHORIZED);\n EasyMock.expect(mMockIDevice.getSerialNumber()).andReturn(\"serial\");\n EasyMock.replay(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n assertNull(mTestDevice.getSimState());\n EasyMock.verify(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n }",
"Device createDevice();",
"private void foundNonExistent() {\n\t\tstate = BridgeState.NON_EXISTENT;\n\t}",
"public static Device getDevice(Context context) {\n Device result = instance;\n if (instance == null) {\n synchronized (DeviceInfoFactory.class) {\n result = instance;\n if (result == null) {\n String id = Settings.Secure.getString(\n context.getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n String name = Build.MODEL;\n\n String arch = System.getProperty(\"os.arch\");\n\n Point size = getScreenSize(context);\n Screen screen = new Screen(size.x, size.y);\n\n instance = result = new Device(id, DEVICE_TYPE, name, arch, screen);\n }\n }\n }\n\n return result;\n }",
"static boolean checkIsDeviceAvailable(JSONObject respJson)\n {\n String respStr = getCmdJsonStr(respJson);\n if (respStr != null)\n {\n return checkIsDeviceAvailable(respStr);\n }\n else\n {\n return false;\n }\n }",
"@Override\r\n\tpublic Device devGetDevice(boolean allProperties) throws RTException {\n\t\treturn null;\r\n\t}",
"public void ensureFunctionalExceptionForUnknownDevice(final String deviceIdentification)\n throws FunctionalException {\n this.findSmartMeter(deviceIdentification);\n }",
"public ProductModel getDevice(String did) {\n\t\tSystem.out.println(\"\\nNetworkDevServ-getDevice()\");\r\n\t\treturn deviceData.getDevice(did);\r\n\t}",
"private String getDeviceID() {\n try {\n TelephonyManager telephonyManager;\n\n telephonyManager =\n (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);\n\n /*\n * getDeviceId() function Returns the unique device ID.\n * for example,the IMEI for GSM and the MEID or ESN for CDMA phones.\n */\n return telephonyManager.getDeviceId();\n }catch(SecurityException e){\n return null;\n }\n }",
"@Override\n\tpublic Device loadwDeviceById(int id) {\n\t\treturn (Device) dataAccessUtil.findById(Device.class,id);\n\t}",
"public final Device blockingGetEmulator() {\n Device emu = find(true);\n if (emu != null) {\n return emu;\n }\n EmulatorController emuController = EmulatorController.getInstance();\n if (emuController.getState() == State.NOT_RUNNING) {\n try {\n emuController.launch();\n } catch (IOException e) {\n System.err.println(\"Problem while launching emulator.\");\n e.printStackTrace(System.err);\n return null;\n }\n } else {\n System.out.println(\"Emulator is \" + emuController.getState() + \", which is not expected.\");\n }\n while (!Thread.currentThread().isInterrupted()) {\n if (emuController.getState() == State.NOT_RUNNING) {\n System.err.println(\"Error while starting the emulator. (\" + emuController.getState() + \")\");\n return null;\n }\n Device emu2 = find(true);\n if (emu2 != null) {\n return emu2;\n }\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e2) {\n System.err.println(\"Devices: interrupted in loop.\");\n return null;\n }\n }\n return null;\n }",
"@Test(expected = SystemObjectIdException.class)\n public void shouldThrowExceptionIfExceptionWhenIdentifyDevice() throws IOException {\n\n expect(configuration.createPDU(PDU.GET)).andReturn(new PDU());\n\n expect(snmpInterface.send(isA(PDU.class), same(target))).andThrow(new IOException());\n replayAll();\n\n try {\n session.identifyDevice();\n assert false : \"Should not reach\";\n } finally {\n verifyAll();\n }\n }",
"DeviceInfo getDeviceInfo(DeviceIdentifier deviceIdentifier) throws DeviceDetailsMgtException;",
"public void openUsbDevice() {\n tryGetUsbPermission();\n }",
"private BluetoothDevice mBTDeviceByName(String sNewDeviceName) {\n if (oDevice == null) {\n Set<BluetoothDevice> pairedDevices = oBTadapter.getBondedDevices();\n if (pairedDevices.size() > 0) {\n for (BluetoothDevice device : pairedDevices) {\n if (mTextLike(sNewDeviceName,device.getName())){\n return device;\n }\n }\n }\n } else {\n if (mTextLike(sNewDeviceName,oDevice.getName())) {\n return oDevice;\n }\n }\n return null;\n }",
"public Optional<DeviceType> getDeviceType() throws IllegalArgumentException{\n this.deviceTypeDropDown.getValue();\n return DeviceType.typeOf(this.deviceTypeDropDown.getText());\n }",
"public TestDevice[] allocateDevices(final int num) throws DeviceNotAvailableException {\n \n ArrayList<TestDevice> deviceList;\n TestDevice td;\n int index = 0;\n \n if (num < 0) {\n throw new IllegalArgumentException();\n }\n if (num > mDevices.size()) {\n throw new DeviceNotAvailableException(\"The number of connected device(\"\n + mDevices.size() + \" is less than the specified number(\"\n + num + \"). Please plug in enough devices\");\n }\n deviceList = new ArrayList<TestDevice>();\n \n while (index < mDevices.size() && deviceList.size() != num) {\n td = mDevices.get(index);\n if (td.getStatus() == TestDevice.STATUS_IDLE) {\n deviceList.add(td);\n }\n index++;\n }\n if (deviceList.size() != num) {\n throw new DeviceNotAvailableException(\"Can't get the specified number(\"\n + num + \") of idle device(s).\");\n }\n return deviceList.toArray(new TestDevice[num]);\n }",
"public static DeviceId getInstance()\n {\n if (deviceId == null) {\n synchronized (DeviceId.class) {\n if (deviceId == null) {\n deviceId = new DeviceId();\n }\n }\n }\n return deviceId;\n }",
"public T scanAllDevices(DeviceType dType) {\n for (String devLabel : Globals.core().getLoadedDevicesOfType(dType)) {\n T device = getAutoInstance(devLabel);\n if (device != null) {\n return device;\n }\n }\n Globals.mm().logs().logMessage(\"Autofinder found no devices.\");\n return null; //Nothing was identified.\n }",
"@GET(\"device\")\n Call<DevicesResponse> getDevice();",
"private String mapDeviceToCloudDeviceId(String device) throws Exception {\n if (device.equalsIgnoreCase(\"/dev/sdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"/dev/sdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"/dev/sde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"/dev/sdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"/dev/sdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"/dev/sdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"/dev/sdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"/dev/sdj\"))\n return \"9\";\n\n else if (device.equalsIgnoreCase(\"/dev/xvdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"/dev/xvdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"/dev/xvde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"/dev/xvdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"/dev/xvdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"/dev/xvdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"/dev/xvdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"/dev/xvdj\"))\n return \"9\";\n\n else if (device.equalsIgnoreCase(\"xvdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"xvdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"xvde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"xvdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"xvdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"xvdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"xvdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"xvdj\"))\n return \"9\";\n\n else\n throw new Exception(\"Device is not supported\");\n }",
"public SmartCardChannel open() throws NotAvailableUSBDeviceException {\n\t\ttry {\n\t\t\treturn getChannel();\n\t\t}\n\t\tcatch (final UsbDeviceException e) {\n\t\t\tthrow new NotAvailableUSBDeviceException(\"Error en la apertura del canal: \" + e, e); //$NON-NLS-1$\n\t\t}\n\t}",
"@Test\n final void testCreateDevice() {\n when(deviceDao.save(user, deviceDTO)).thenReturn(deviceDTO);\n when(request.getRemoteAddr()).thenReturn(DeviceFixture.PUBLIC_IP_ADDRESS);\n when(deviceDao.createDevice(user, createDeviceRequest, DeviceFixture.PUBLIC_IP_ADDRESS))\n .thenReturn(deviceDTO);\n when(deviceMapper.toModel(deviceDTO)).thenReturn(deviceModel);\n\n ResponseEntity<DeviceModel> response = deviceController.createDevice(createDeviceRequest);\n\n assertEquals(200, response.getStatusCodeValue());\n assertNotNull(response.getBody());\n DeviceModel device = response.getBody();\n assertEquals(deviceModel, device);\n }",
"java.lang.String getDeviceId();",
"@Override\n\tpublic String getDeviceName() {\n\t\treturn null;\n\t}",
"void throwIfNetworkNotAvailable() throws MsalClientException {\n final ConnectivityManager connectivityManager = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);\n final NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();\n if (networkInfo == null || !networkInfo.isConnected()) {\n Logger.error(TAG, mRequestContext, \"No active network is available on the device.\", null);\n throw new MsalClientException(MsalClientException.DEVICE_NETWORK_NOT_AVAILABLE, \"Device network connection is not available.\");\n }\n }",
"public synchronized MonitoringDevice getBySerial(String serial)\n\t{\n\t\tlogger.debug(\"search by serial:\" + serial);\n\t\tInteger id = this.indexBySerial.get(serial);\n\t\tif (id != null)\n\t\t\treturn (MonitoringDevice) super.getObject(id);\n\t\telse\n\t\t\treturn null;\n\t\t\n\t}",
"@Override\n Device retrieveImpl(ExecutionDAG.DAGVertex vertex, List<Device> devices) {\n long[] alreadyPresentDataSize = new long[devicesManager.getNumberOfGPUsToUse()];\n // Compute the amount of data on each device, and if any device has any data at all;\n computeDataSizeOnDevices(vertex, alreadyPresentDataSize);\n // If not device has at least X% of data available, it's not worth optimizing data locality (exploration preferred to exploitation);\n if (findIfAnyDeviceHasEnoughData(alreadyPresentDataSize, vertex, devices)) {\n // Find device with maximum available data;\n return selectDeviceWithMostData(devices, alreadyPresentDataSize);\n } else {\n // No data is present on any GPU: select the device with round-robin;\n return roundRobin.retrieve(vertex, devices);\n }\n }",
"DeviceId deviceId();",
"DeviceId deviceId();",
"@Override\n\tpublic DeviceBean getDeviceById(int deviceId) {\n\t\treturn dao.getDeviceById(deviceId);\n\t}",
"private static boolean isValidDeviceId(String deviceId){\n return deviceId != null;\n }",
"private AudioDeviceInfo findAudioDevice(int deviceFlag, int deviceType) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n AudioManager manager = (AudioManager) this.getSystemService(Context.AUDIO_SERVICE);\n AudioDeviceInfo[] adis = manager.getDevices(deviceFlag);\n for (AudioDeviceInfo adi : adis) {\n if (adi.getType() == deviceType) {\n return adi;\n }\n }\n }\n return null;\n }",
"private Machine getMachineOrFail(String machineId) {\n for (Machine machine : listMachines()) {\n if (machine.getId().equals(machineId)) {\n return machine;\n }\n }\n throw new NotFoundException(String.format(\"no machine with id '%s' found in cloud pool\", machineId));\n }",
"@Override\n public boolean isAlreadyInDb () {\n try {\n load( idDevice );\n } catch ( EntityNotFoundException e ) {\n return false;\n }\n return true;\n }",
"public Device getOrCreateByDeviceId(String deviceId, String friendlyName, DeviceType deviceType, User user, String topicBasePrefix) {\n\n try {\n Device device = getByDeviceId(deviceId);\n if (device == null) {\n device = new Device(deviceId, friendlyName, deviceType, user, topicBasePrefix);\n deviceRepository.save(device);\n // Must init List\n if (user.getDevices() == null) {\n user.setDevices(new ArrayList<>());\n }\n user.getDevices().add(device);\n userRepository.save(user);\n return device;\n } else {\n return device;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return null;\n }",
"@Override\n\tpublic void onDeviceGetConfigFailed(FunDevice funDevice, Integer errCode) {\n\t\tToast.makeText(\n\t\t\t\tthis,\n\t\t\t\tthis.getResources().getString(\n\t\t\t\t\t\tR.string.devices_socket_save_failure),\n\t\t\t\tToast.LENGTH_SHORT).show();\n\t}",
"private Future<Optional<MountPoint>> getMountpointFromSal(final InstanceIdentifier<Node> iid) {\n final ExecutorService executorService = Executors.newSingleThreadExecutor();\n final Callable<Optional<MountPoint>> task = () -> {\n byte attempt = 0;\n do {\n try {\n final Optional<MountPoint> optionalMountpoint = mountService.getMountPoint(iid);\n if (optionalMountpoint.isPresent()) {\n return optionalMountpoint;\n }\n LOG.warn(\"Mountpoint {} is not registered yet\", iid);\n Thread.sleep(DURATION);\n } catch (InterruptedException e) {\n LOG.warn(\"Thread interrupted to \", e);\n }\n attempt ++;\n } while (attempt <= 3);\n return Optional.absent();\n };\n return executorService.submit(task);\n }",
"public static LocalDevice getLocalDevice() throws BluetoothStateException {\n return getLocalDeviceInstance();\n }",
"public IDevice getNamedDevice(String simpleName) {\n\t\ttry {\n\t\t\treturn (IDevice) getObjectInstance(\"com.console.springernature.paint.model.\"+simpleName);\n\t\t} catch (ClassCastException e) {\n\t\t\tlogger.error(\"(ClassCastException) Unable to instanziate the named device : \"+simpleName+\" ...\", e);\n\t\t} catch (Throwable e) {\n\t\t\tlogger.error(\"(Generic Exception) Unable to instanziate the named device : \"+simpleName+\" ...\", e);\n\t\t}\n\t\treturn null;\n\t}",
"String getDeviceName();",
"public String getDevice() {\r\n return device;\r\n }",
"@Override\n public int getDeviceId() {\n return 0;\n }",
"private String getDeviceId() {\n String deviceId = telephonyManager.getDeviceId(); \n \n \n // \"generic\" means the emulator.\n if (deviceId == null || Build.DEVICE.equals(\"generic\")) {\n \t\n // This ID changes on OS reinstall/factory reset.\n deviceId = Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);\n }\n \n return deviceId;\n }",
"public MediaDevice getDefaultDevice(MediaType mediaType, MediaUseCase useCase)\r\n {\r\n int mediaTypeIndex = mediaType.ordinal();\r\n MediaDevice device = devices[mediaTypeIndex];\r\n MediaService mediaService = ProtocolMediaActivator.getMediaService();\r\n\r\n if (device == null)\r\n device = mediaService.getDefaultDevice(mediaType, useCase);\r\n\r\n /*\r\n * Make sure that the device is capable of mixing in order to support conferencing and call\r\n * recording.\r\n */\r\n if (device != null) {\r\n MediaDevice mixer = mixers[mediaTypeIndex];\r\n\r\n if (mixer == null) {\r\n switch (mediaType) {\r\n case AUDIO:\r\n /*\r\n * TODO AudioMixer leads to very poor audio quality on Android so do not\r\n * use it unless it is really really necessary.\r\n */\r\n if ((!OSUtils.IS_ANDROID || isConferenceFocus())\r\n && !this.translator\r\n /*\r\n * We can use the AudioMixer only if the device is able to capture\r\n * (because the AudioMixer will push when the capture device pushes).\r\n */\r\n && device.getDirection().allowsSending()) {\r\n mixer = mediaService.createMixer(device);\r\n }\r\n break;\r\n\r\n case VIDEO:\r\n if (isConferenceFocus())\r\n mixer = mediaService.createMixer(device);\r\n break;\r\n }\r\n mixers[mediaTypeIndex] = mixer;\r\n }\r\n\r\n if (mixer != null)\r\n device = mixer;\r\n }\r\n return device;\r\n }",
"Integer getDeviceId();",
"public SmartHomeDevice getCustomDevice(String id);",
"private UsbInterface findAdbInterface(UsbDevice device) {\n int count = device.getInterfaceCount();\n for (int i = 0; i < count; i++) {\n UsbInterface intf = device.getInterface(i);\n if (intf.getInterfaceClass() == 255 && intf.getInterfaceSubclass() == 66 &&\n intf.getInterfaceProtocol() == 1) {\n return intf;\n }\n }\n return null;\n }",
"private SmartCardChannel getChannel() throws UsbDeviceException, NotAvailableUSBDeviceException{\n\t\tif(this.channel != null){\n\t\t\treturn this.channel;\n\t\t}\n\t\tif(getUsbInterface() != null){\n\t\t\tif (!getUsbDeviceConnection().claimInterface(getUsbInterface(), true)) {\n\t\t\t\tthrow new NotAvailableUSBDeviceException(\"Imposible acceder al interfaz del dispositivo USB\"); //$NON-NLS-1$\n\t\t\t}\n\t\t\tthis.channel = new SmartCardChannel(getUsbDeviceConnection(), getUsbInterface());\n\t\t\treturn this.channel;\n\t\t}\n\t\tthrow new UsbDeviceException(\"usbInterface cannot be NULL\"); //$NON-NLS-1$\n\t}",
"private String getDeviceName() {\n String permission = \"android.permission.BLUETOOTH\";\n int res = context.checkCallingOrSelfPermission(permission);\n if (res == PackageManager.PERMISSION_GRANTED) {\n try {\n BluetoothAdapter myDevice = BluetoothAdapter.getDefaultAdapter();\n if (myDevice != null) {\n return myDevice.getName();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n return \"Unknown\";\n }",
"public void getDevice(org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceIdentifier request,\n io.grpc.stub.StreamObserver<org.thethingsnetwork.management.proto.HandlerOuterClass.Device> responseObserver);",
"public boolean isSetDeviceName() {\n return this.deviceName != null;\n }",
"@Override\n public boolean isReachable(DeviceId deviceId) {\n try {\n // First check if device is already connected.\n // If not, try to open a socket.\n Tl1Device device = controller.getDevice(deviceId).get();\n if (device.isConnected()) {\n return true;\n }\n\n Socket socket = new Socket();\n socket.connect(new InetSocketAddress(device.ip().toInetAddress(), device.port()), REACHABILITY_TIMEOUT);\n socket.close();\n return true;\n } catch (NoSuchElementException | IOException | IllegalArgumentException e) {\n log.error(\"Cannot reach device {}\", deviceId, e);\n return false;\n }\n }",
"final int getDeviceNum() {\n return device.getDeviceNum();\n }",
"@Test(expected = SkuNotFoundException.class)\n public void getPriceNonExistentSkuThrowsException() throws SkuNotFoundException {\n\texpect(mockedDependency.getPriceBySku(BAD_SKU)).andReturn(null);\n\n\t// Set mocks into testing mode.\n\treplay(mockedDependency);\n\n\tsystemUnderTest.getPrice(BAD_SKU);\n }",
"private void checkConnectedDeviceThrowable()\n\t\t\tthrows IllegalStateException {\n\t\tif (this.mIsConnectedDevice) {\n\t\t\treturn;\n\t\t}\n\t\tthrow new IllegalStateException(\"not connected to a device\");\n\t}",
"private void searchDeviceOrOpenBluetooth() {\n if (!BtUtil.isOpen(bluetoothAdapter)) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, OPEN_BLUETOOTH_REQUEST);\n } else {\n BtUtil.searchDevices(bluetoothAdapter);\n }\n }",
"public Device getDevice() {\n\t\treturn this.device;\n\t}",
"@Override\n public void onFailure(Call<List<DeviceStateResponse>> call, Throwable t) {\n callback.onDataNotAvailable();\n }",
"@Override\n public boolean getIfNotExist() {\n return ifNotExist_;\n }"
]
| [
"0.6332689",
"0.6227301",
"0.6182152",
"0.6178426",
"0.61456895",
"0.6127896",
"0.61157954",
"0.60985756",
"0.6062948",
"0.598596",
"0.5934825",
"0.5932047",
"0.593011",
"0.5827812",
"0.5786167",
"0.5780926",
"0.5721709",
"0.56917185",
"0.5690258",
"0.56896764",
"0.5654937",
"0.5641784",
"0.56415284",
"0.562787",
"0.56091654",
"0.55972594",
"0.55972594",
"0.5585621",
"0.5582451",
"0.5555974",
"0.5533892",
"0.55272156",
"0.5526326",
"0.5522092",
"0.5495201",
"0.54922974",
"0.5480254",
"0.5471335",
"0.54274935",
"0.5416064",
"0.5410442",
"0.54031533",
"0.53986573",
"0.53658533",
"0.5363987",
"0.5361375",
"0.5356749",
"0.5345586",
"0.5336786",
"0.53209704",
"0.52953154",
"0.52916723",
"0.5272565",
"0.5267691",
"0.5234127",
"0.5188922",
"0.51793677",
"0.51751673",
"0.51694626",
"0.5157296",
"0.51536477",
"0.51527584",
"0.5151897",
"0.51448536",
"0.51393586",
"0.5131441",
"0.5107723",
"0.50976324",
"0.50887585",
"0.50887585",
"0.5086734",
"0.5077577",
"0.50749725",
"0.50680155",
"0.5063825",
"0.5053124",
"0.5051816",
"0.5045849",
"0.504521",
"0.5041183",
"0.50210667",
"0.5019584",
"0.50166184",
"0.5014412",
"0.5013146",
"0.50123525",
"0.50027144",
"0.49852467",
"0.49787274",
"0.49673298",
"0.49653554",
"0.49630478",
"0.49579442",
"0.49498117",
"0.49436113",
"0.4937998",
"0.4918181",
"0.4915564",
"0.4908906",
"0.49018058"
]
| 0.69655657 | 0 |
Test the deviceID get method. | @Test
public void getDeviceIDTest() {
assertEquals(deviceID, device.getDeviceID());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void getDeviceTest() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);\n\n assertEquals(device, getDevice(DatabaseTest.DEVICE_ID));\n DatabaseTest.cleanDatabase();\n }",
"java.lang.String getDeviceId();",
"Integer getDeviceId();",
"public String getDeviceid() {\n return deviceid;\n }",
"boolean hasDeviceId();",
"boolean hasDeviceId();",
"UUID getDeviceId();",
"@Test\n public void getDeviceTest() throws ApiException {\n String deviceId = null;\n // DeviceEnvelope response = api.getDevice(deviceId);\n\n // TODO: test validations\n }",
"public com.google.common.util.concurrent.ListenableFuture<org.thethingsnetwork.management.proto.HandlerOuterClass.Device> getDevice(\n org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceIdentifier request);",
"public static FlexID testDeviceID() {\n byte[] identity = {\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0\n };\n\n return new FlexID(identity, FlexIDType.DEVICE, new AttrValuePairs(), null);\n }",
"public org.thethingsnetwork.management.proto.HandlerOuterClass.Device getDevice(org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceIdentifier request);",
"public final int getDeviceID() {\n return device.getDeviceID();\n }",
"org.hl7.fhir.String getDeviceIdentifier();",
"@Override\n public String getDeviceId() {\n return this.strDevId;\n }",
"@SuppressLint(\"HardwareIds\")\n String getDeviceID() {\n return Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n }",
"private String getDeviceID() {\n try {\n TelephonyManager telephonyManager;\n\n telephonyManager =\n (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);\n\n /*\n * getDeviceId() function Returns the unique device ID.\n * for example,the IMEI for GSM and the MEID or ESN for CDMA phones.\n */\n return telephonyManager.getDeviceId();\n }catch(SecurityException e){\n return null;\n }\n }",
"DeviceId deviceId();",
"DeviceId deviceId();",
"public String getDevice_id() {\r\n\t\treturn device_id;\r\n\t}",
"@Test\n public void getDeviceNullTest() {\n assertNull(getDevice(\"Non existing device\"));\n }",
"public TestDevice getDevice() {\n return mDevice;\n }",
"@Override\n public int getDeviceId() {\n return 0;\n }",
"final int getDeviceNum() {\n return device.getDeviceNum();\n }",
"Reference getDevice();",
"@Test\n final void testRetrieveDevice() {\n when(deviceDao.findDevice(user, DeviceFixture.SERIAL_NUMBER))\n .thenReturn(Optional.of(deviceDTO));\n when(deviceMapper.toModel(deviceDTO)).thenReturn(deviceModel);\n ResponseEntity<DeviceModel> response = deviceController.retrieveDevice(\"1\");\n\n assertNotNull(response);\n assertEquals(200, response.getStatusCodeValue());\n assertNotNull(response.getBody());\n var device = response.getBody();\n assertEquals(deviceModel, device);\n }",
"@Test\n public void retrieveDeviceTest() throws ApiException {\n String collectionId = null;\n String deviceId = null;\n Device response = api.retrieveDevice(collectionId, deviceId);\n\n // TODO: test validations\n }",
"public Device findDeviceById(int id);",
"public String getDeviceId() {\n return this.DeviceId;\n }",
"@Test\n public void testGetCardID() {\n DevCard devCard = new DevCard(cost, level, color, victoryPoints, productionPower);\n String s = devCard.getCardID();\n }",
"public final String getDeviceId(){\n return peripheralDeviceId;\n }",
"@Test\n public void findDevice() throws Exception {\n MockUpnpService upnpService = new MockUpnpService();\n LocalDevice device = SampleData.createLocalDevice();\n upnpService.getRegistry().addDevice(device);\n\n UDN udn = device.getIdentity().getUdn();\n\n Registry registry = upnpService.getRegistry(); // DOC: FIND_ROOT_UDN\n Device foundDevice = registry.getDevice(udn, true);\n\n assertEquals(foundDevice.getIdentity().getUdn(), udn); // DOC: FIND_ROOT_UDN\n\n LocalDevice localDevice = registry.getLocalDevice(udn, true); // DOC: FIND_LOCAL_DEVICE\n assertEquals(localDevice.getIdentity().getUdn(), udn);\n\n SampleDeviceRootLocal.assertLocalResourcesMatch(\n upnpService.getConfiguration().getNamespace().getResources(device)\n );\n }",
"public String getMyDeviceId() {\n return myDeviceId;\n }",
"private String getDeviceId(Context context){\n TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);\n\n //\n ContextCompat.checkSelfPermission(context, Manifest.permission.READ_PHONE_STATE);\n String tmDevice = tm.getDeviceId();\n\n String androidId = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);\n\n String serial = null;\n if (Build.VERSION.SDK_INT > Build.VERSION_CODES.FROYO) serial = Build.SERIAL;\n\n if(tmDevice != null) return \"01\" + tmDevice;\n if(androidId != null) return \"02\" + androidId;\n if(serial != null) return \"03\" + serial;\n\n return null;\n }",
"@Test\r\n public void testGetId() {\r\n System.out.println(\"getId\");\r\n \r\n int expResult = 0;\r\n int result = instance.getId();\r\n assertEquals(expResult, result);\r\n \r\n \r\n }",
"public static String getDeviceID(Context context) {\n return Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);\n }",
"@Test\n final void testDeleteDevice() {\n when(deviceDao.deleteDevice(user, DeviceFixture.SERIAL_NUMBER)).thenReturn(Long.valueOf(1));\n ResponseEntity<String> response = deviceController.deleteDevice(DeviceFixture.SERIAL_NUMBER);\n assertEquals(200, response.getStatusCodeValue());\n assertEquals(\"Device with serial number 1 deleted\", response.getBody());\n }",
"@Test\n public void getID() {\n\n }",
"public SmartHomeDevice getCustomDevice(String id);",
"@Test\n\tpublic void testGetID() {\n\t}",
"public void getDevice(org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceIdentifier request,\n io.grpc.stub.StreamObserver<org.thethingsnetwork.management.proto.HandlerOuterClass.Device> responseObserver);",
"@Test(expected = SystemObjectIdException.class)\n public void shouldThrowExceptionIfFailToIdentifyDevice() throws IOException {\n\n expect(configuration.createPDU(PDU.GET)).andReturn(new PDU());\n\n expect(snmpInterface.send(isA(PDU.class), same(target))).andReturn(createErrorResponseEvent());\n replayAll();\n\n try {\n session.identifyDevice();\n assert false : \"Should not reach\";\n } finally {\n verifyAll();\n }\n }",
"DeviceInfo getDeviceInfo(DeviceIdentifier deviceIdentifier) throws DeviceDetailsMgtException;",
"@Test\n public void getTokenTest() {\n assertEquals(token, device.getToken());\n }",
"public VinDevices getDevice(String id_device)\n\t\t{\n\t\t\tList<?> dataAux;\n\t\t\tVinDevices Arecord = new VinDevices();\n\t\t\ttry{\n\t\t\t\tdataAux =\tthis.getListaBaseTable(\"id_device='\"+id_device+\"'\");\n\t\t\t\tArecord = (VinDevices)dataAux.get(0);\n\t\t\t}\n\t\t\tcatch(Exception e){}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tdataAux = null;\n\t\t\t}\n\t\t\treturn Arecord;\t\t\t\t\n\t\t\t\n\t\t}",
"@Test\n public void newDeviceTest() {\n Device newDevice = newDevice(deviceID);\n\n assertEquals(deviceID, newDevice.getDeviceID());\n assertNotNull(newDevice.getToken());\n\n executeManipulationQuery(\"DELETE FROM device WHERE device_id = ?\", deviceID);\n }",
"public Integer getDeviceId() {\n return deviceId;\n }",
"public Integer getDeviceId() {\n return deviceId;\n }",
"public String getDeviceId() {\n String info = \"\";\n try {\n Uri queryurl = Uri.parse(REGINFO_URL + CHUNLEI_ID);\n ContentResolver resolver = mContext.getContentResolver();\n info = resolver.getType(queryurl);\n if (null == info && null != mContext) {\n info = getIMEI();\n }\n if (null == info) {\n info = \"\";\n }\n } catch (Exception e) {\n System.out.println(\"in or out strean exception\");\n }\n return info;\n }",
"public String getDevice() {\r\n return device;\r\n }",
"private String getDeviceId() {\n String deviceId = telephonyManager.getDeviceId(); \n \n \n // \"generic\" means the emulator.\n if (deviceId == null || Build.DEVICE.equals(\"generic\")) {\n \t\n // This ID changes on OS reinstall/factory reset.\n deviceId = Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);\n }\n \n return deviceId;\n }",
"@Test(expected = SystemObjectIdException.class)\n public void shouldThrowExceptionIfFailToGetVariable() throws IOException {\n\n expect(configuration.createPDU(PDU.GET)).andReturn(new PDU());\n\n expect(snmpInterface.send(isA(PDU.class), same(target))).andThrow(new IOException());\n replayAll();\n\n try {\n session.identifyDevice();\n assert false : \"Should not reach\";\n } finally {\n verifyAll();\n }\n }",
"public Device findById(Long id) throws Exception;",
"public BigDecimal getDeviceIdentifier() {\n return deviceIdentifier;\n }",
"public java.lang.String getID() { throw new RuntimeException(\"Stub!\"); }",
"public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }",
"@Test\n public void identifierTest() {\n assertEquals(\"ident1\", authResponse.getIdentifier());\n }",
"public void getDeviceId(final Callback<String> callback)\n {\n sendEngagementCommand(new Runnable()\n {\n @Override\n public void run()\n {\n try\n {\n callback.onResult(mEngagementService.getDeviceId());\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }\n });\n }",
"public boolean findAgentIdFromDevice(long id);",
"public String getDeviceId() {\n String deviceId = ((TelephonyManager) LoginActivity.this.getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId();\n if (deviceId != null && !deviceId.equalsIgnoreCase(\"null\")) {\n // System.out.println(\"imei number :: \" + deviceId);\n return deviceId;\n }\n\n deviceId = android.os.Build.SERIAL;\n // System.out.println(\"serial id :: \" + deviceId);\n return deviceId;\n\n }",
"boolean hasDevice();",
"public String getDevID() {\n return devID;\n }",
"private static DeviceId getDeviceId(int i) {\n return DeviceId.deviceId(\"\" + i);\n }",
"public String deviceId() {\n return this.deviceId;\n }",
"public static String m567a(Context context) {\r\n if (context == null) {\r\n return null;\r\n }\r\n try {\r\n TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(\"phone\");\r\n return telephonyManager != null ? telephonyManager.getDeviceId() : null;\r\n } catch (Exception e) {\r\n return null;\r\n }\r\n }",
"@Test\n public void testGetId_edificio() {\n System.out.println(\"getId_edificio\");\n DboEdificio instance = new DboEdificio(1, \"T-3\");\n int expResult = 1;\n int result = instance.getId_edificio();\n assertEquals(expResult, result);\n \n }",
"@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean readDeviceInfo() {\n\t\tboolean flag = oTest.readDeviceInfo();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}",
"String getDeviceName();",
"public void testGetId(){\n exp = new Experiment(\"10\");\n assertEquals(\"getId does not work\", \"10\", exp.getId());\n }",
"public void setDeviceId(String DeviceId) {\n this.DeviceId = DeviceId;\n }",
"@Test\n public void testGetId() {\n System.out.println(\"getId\");\n DTO_Ride instance = dtoRide;\n long expResult = 1L;\n long result = instance.getId();\n assertEquals(expResult, result);\n }",
"public final int getDevice()\n\t{\n\t\treturn address & 0xFF;\n\t}",
"@NonNull\n private String getDeviceId() {\n String ANDROID_ID = Settings.Secure.getString(cordova.getActivity().getContentResolver(), Settings.Secure.ANDROID_ID);\n return md5(ANDROID_ID).toUpperCase();\n }",
"public String getDeviceUDID() {\r\n\t\tTelephonyManager telephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);\r\n\t\treturn telephonyManager.getDeviceId();\r\n\t}",
"@RequestMapping(value = \"/device\", method = GET)\n String getDeviceId(@RequestParam String userId, String channelId);",
"@Test\r\n\tpublic void testGetId() {\r\n\t\tassertEquals(1, breaku1.getId());\r\n\t\tassertEquals(2, externu1.getId());\r\n\t\tassertEquals(3, meetingu1.getId());\r\n\t\tassertEquals(4, teachu1.getId());\r\n\t}",
"public String getDeviceId() {\n\t\tString id;\n\t\tid = options.getProperty(\"id\");\n\t\tif(id == null) {\n\t\t\tid = options.getProperty(\"Device-ID\");\n\t\t}\n\t\treturn trimedValue(id);\n\t}",
"boolean doCommandDeviceTimerGet();",
"IDeviceState getDeviceState(UUID id) throws SiteWhereException;",
"public static String deviceId() {\n\t\t// return device id\n\t\treturn getTelephonyManager().getDeviceId();\n\t}",
"@Test\n public void getDeviceTokenTest() throws ApiException {\n String deviceId = null;\n // DeviceTokenEnvelope response = api.getDeviceToken(deviceId);\n\n // TODO: test validations\n }",
"synchronized void setDeviceID(String deviceID)\r\n throws IOException {\n if (this.deviceID != null) {\r\n /*\r\n * Just to be on the safe side, make sure #read(Buffer) is not\r\n * currently executing.\r\n */\r\n waitWhileStreamIsBusy();\r\n\r\n if (stream != 0) {\r\n /*\r\n * For the sake of completeness, attempt to stop this instance\r\n * before disconnecting it.\r\n */\r\n if (started) {\r\n try {\r\n stop();\r\n } catch (IOException ioe) {\r\n /*\r\n * The exception should have already been logged by the\r\n * method #stop(). Additionally and as said above, we\r\n * attempted it out of courtesy.\r\n */\r\n }\r\n }\r\n\r\n boolean closed = false;\r\n\r\n try {\r\n Pa.CloseStream(stream);\r\n closed = true;\r\n } catch (PortAudioException pae) {\r\n /*\r\n * The function Pa_CloseStream is not supposed to time out\r\n * under normal execution. However, we have modified it to\r\n * do so under exceptional circumstances on Windows at least\r\n * in order to overcome endless loops related to\r\n * hotplugging. In such a case, presume the native PortAudio\r\n * stream closed in order to maybe avoid a crash at the risk\r\n * of a memory leak.\r\n */\r\n long errorCode = pae.getErrorCode();\r\n\r\n if ((errorCode == Pa.paTimedOut)\r\n || (Pa.HostApiTypeId.paMME.equals(\r\n pae.getHostApiType())\r\n && (errorCode == Pa.MMSYSERR_NODRIVER))) {\r\n closed = true;\r\n }\r\n\r\n if (!closed) {\r\n// logger.error(\r\n// \"Failed to close \" + getClass().getSimpleName(),\r\n// pae);\r\n System.err.println(\"Failed to close \" + getClass().getSimpleName() + pae);\r\n IOException ioe\r\n = new IOException(pae.getLocalizedMessage());\r\n\r\n ioe.initCause(pae);\r\n throw ioe;\r\n }\r\n } finally {\r\n if (closed) {\r\n stream = 0;\r\n\r\n if (inputParameters != 0) {\r\n Pa.StreamParameters_free(inputParameters);\r\n inputParameters = 0;\r\n }\r\n\r\n /*\r\n * Make sure this AbstractPullBufferStream asks its\r\n * DataSource for the Format in which it is supposed to\r\n * output audio data the next time it is opened instead\r\n * of using its Format from a previous open.\r\n */\r\n this.format = null;\r\n\r\n if (readIsMalfunctioningSince != NEVER) {\r\n setReadIsMalfunctioning(false);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n this.deviceID = deviceID;\r\n this.started = false;\r\n\r\n // DataSource#connect\r\n if (this.deviceID != null) {\r\n AudioSystem2 audioSystem\r\n = (AudioSystem2) AudioSystem.getAudioSystem(\r\n AudioSystem.LOCATOR_PROTOCOL_PORTAUDIO);\r\n\r\n if (audioSystem != null) {\r\n audioSystem.willOpenStream();\r\n }\r\n try {\r\n connect();\r\n } finally {\r\n if (audioSystem != null) {\r\n audioSystem.didOpenStream();\r\n }\r\n }\r\n }\r\n }",
"@Override\n\tpublic Device loadwDeviceById(int id) {\n\t\treturn (Device) dataAccessUtil.findById(Device.class,id);\n\t}",
"public String getDeviceCode() {\n return deviceCode;\n }",
"public String getRingerDevice();",
"public String getDeviceId() {\n //TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);\n String number = Build.SERIAL;\n return number;\n }",
"@Test\r\n\tpublic final void testGetRoomById() {\n\t\tRoom actual = roomServices.getRoomById(expected.getId());\r\n\t\tassertEquals(expected, actual);\r\n\t}",
"public String getDeviceName(){\n\t return deviceName;\n }",
"@Test(expected = SystemObjectIdException.class)\n public void shouldThrowExceptionIfExceptionWhenIdentifyDevice() throws IOException {\n\n expect(configuration.createPDU(PDU.GET)).andReturn(new PDU());\n\n expect(snmpInterface.send(isA(PDU.class), same(target))).andThrow(new IOException());\n replayAll();\n\n try {\n session.identifyDevice();\n assert false : \"Should not reach\";\n } finally {\n verifyAll();\n }\n }",
"public Device getById(String id) {\n\n try {\n return deviceRepository.findOne(id);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return null;\n }",
"MidiDeviceStatus(android.media.midi.MidiDeviceInfo deviceInfo) { throw new RuntimeException(\"Stub!\"); }",
"@Deprecated\r\n\tpublic String readDeviceID(){\r\n\t\treturn mFactoryBurnUtil.readDeviceID();\r\n\t}",
"public void setRingerDevice(String devid);",
"@Test\n\tpublic void getIdTest() {\n\t}",
"@Test\r\n public void testGetID() {\r\n user = userFactory.getUser(\"C\");\r\n assertEquals(\"121\", user.getID());\r\n }",
"private void getGCM_ID() {\n if (regIDValue.length() <= 0)\n regIDValue = DriverApplication.getGCMRegistrationId(ctx);\n Log.d(\"GCM_REG_ID \", regIDValue);\n }",
"public final String getDeviceKey(){\n return peripheralKey;\n }",
"@Test\r\n\tpublic void Test_ID() {\r\n\t\tResponse resp = given().\r\n\t\t\t\tparam(\"nasa_id\", \"PIA12235\").\r\n\t\t\t\twhen().\r\n\t\t\t\tget(endpoint);\r\n\t\t\t\tSystem.out.println(resp.getStatusCode());\r\n\t\t\t\tAssert.assertEquals(resp.getStatusCode(), 200);\r\n\t}",
"@Test\n public void testGetIdentificador() {\n System.out.println(\"getIdentificador\");\n Camiones instance = new Camiones(\"C088IJ\", true, 10);\n int expResult = 0;\n int result = instance.getIdentificador();\n \n \n }",
"public AppID getIdentifier () ;",
"@Test\r\n\tpublic void testSetGetIdInvalid() {\r\n\t\tDoctor doctor = new Doctor();\r\n\t\tdoctor.setId(idInvalid);\r\n\t\tassertEquals(idInvalid, doctor.getId());\r\n\r\n\t}"
]
| [
"0.7395947",
"0.7085113",
"0.6998577",
"0.6804894",
"0.6708932",
"0.6708932",
"0.65810317",
"0.65752685",
"0.655252",
"0.6526285",
"0.6499472",
"0.6475384",
"0.64715654",
"0.64668125",
"0.63850474",
"0.6352395",
"0.63261867",
"0.63261867",
"0.6317466",
"0.6308636",
"0.6299207",
"0.6290627",
"0.6247629",
"0.6196425",
"0.61657196",
"0.61217564",
"0.6114133",
"0.60873",
"0.6081846",
"0.6018511",
"0.5982151",
"0.59812254",
"0.5966176",
"0.5956772",
"0.59382206",
"0.59126",
"0.5886788",
"0.58847123",
"0.5870915",
"0.5870658",
"0.5862446",
"0.58475906",
"0.5842235",
"0.5822995",
"0.5813501",
"0.5798253",
"0.5798253",
"0.5787437",
"0.57862186",
"0.57666737",
"0.5766274",
"0.57633924",
"0.5750723",
"0.57343924",
"0.57280177",
"0.5710052",
"0.57053643",
"0.5700224",
"0.56897694",
"0.5657815",
"0.5655209",
"0.56547815",
"0.56538695",
"0.56530726",
"0.5638533",
"0.563783",
"0.5634227",
"0.5634213",
"0.5613546",
"0.5607761",
"0.5606154",
"0.55962527",
"0.55761594",
"0.5575996",
"0.5563982",
"0.55581087",
"0.5552304",
"0.5550497",
"0.55494213",
"0.5543702",
"0.55265635",
"0.5524373",
"0.55210835",
"0.5519095",
"0.55130506",
"0.55074984",
"0.5507258",
"0.5498852",
"0.5493848",
"0.549101",
"0.54805356",
"0.54743356",
"0.5459019",
"0.5452373",
"0.5445554",
"0.5444713",
"0.5443844",
"0.5436841",
"0.54280716",
"0.54179776"
]
| 0.85887784 | 0 |
Test the token get method. | @Test
public void getTokenTest() {
assertEquals(token, device.getToken());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void getTokenTest() {\n\t}",
"@Test\n public void tokenTest() {\n // TODO: test token\n }",
"@Test\n public void tokenTest() {\n // TODO: test token\n }",
"@Test\r\n public void testGetAuthorisationToken() throws Exception {\r\n LOG.info(\"getAuthorisationToken\");\r\n TokenAuthorisation result = tmdb.getAuthorisationToken();\r\n assertFalse(\"Token is null\", result == null);\r\n assertTrue(\"Token is not valid\", result.getSuccess());\r\n LOG.info(result.toString());\r\n }",
"GetToken.Res getGetTokenRes();",
"GetToken.Req getGetTokenReq();",
"@Test\r\n public void testGetToken() {\r\n System.out.println(\"getToken\");\r\n ForgotPasswordDTO instance = new ForgotPasswordDTO();\r\n String expResult = null;\r\n String result = instance.getToken();\r\n assertEquals(expResult, result);\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 }",
"String getToken();",
"String getToken();",
"String getToken();",
"String getToken();",
"String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"public String getToken();",
"public void testGetSessionToken() throws Exception {\r\n LOG.info(\"getSessionToken\");\r\n TokenAuthorisation token = tmdb.getAuthorisationToken();\r\n assertFalse(\"Token is null\", token == null);\r\n assertTrue(\"Token is not valid\", token.getSuccess());\r\n LOG.info(token.toString());\r\n \r\n TokenSession result = tmdb.getSessionToken(token);\r\n assertFalse(\"Session token is null\", result == null);\r\n assertTrue(\"Session token is not valid\", result.getSuccess());\r\n LOG.info(result.toString());\r\n }",
"@Test\n public void parseToken() {\n }",
"public java.lang.String getToken(){\r\n return localToken;\r\n }",
"@Test\r\n public void testGetGuestSessionToken() throws Exception {\r\n LOG.info(\"getGuestSessionToken\");\r\n TokenSession result = tmdb.getGuestSessionToken();\r\n \r\n assertTrue(\"Failed to get guest session\", result.getSuccess());\r\n }",
"@Test\n public void testValidToken() {\n try {\n int coachId = authBO.getUserIdAndValidateToken(\"thisisaworkingtoken\");\n Assert.assertTrue(coachId == 1);\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(e.getMessage());\n }\n }",
"public java.lang.String getToken(){\n return localToken;\n }",
"void onGetTokenSuccess(AccessTokenData token);",
"@Test\n public void cTestGetLoginToken() {\n token = given()\n .param(\"username\", \"playlist\")\n .param(\"password\", \"playlist\")\n .post(\"/login\")\n .jsonPath().getString(\"token\");\n }",
"@Trace(excludeFromTransactionTrace = true, leaf = true)\n private void getTokenFromFlyweight() {\n Token token = AgentBridge.getAgent().getTransaction().getToken();\n Assert.assertNotNull(token);\n Assert.assertFalse(token.isActive());\n Assert.assertTrue(token instanceof NoOpToken);\n }",
"@Test\n void testGetAndSetToken() {\n isLockedRequest2.setToken(\"Pippin\");\n assertEquals(\"Pippin\", isLockedRequest2.getToken());\n }",
"public static String getToken() {\n \treturn mToken;\n }",
"@Test \n\tpublic void get() \n\t{\n\t\tassertTrue(true);\n\t}",
"@Override\n\tpublic Token getToken() {\n\t\treturn this.token;\n\t\t\n\t}",
"private static Tuple<Integer, String> getToken() {\n\t\tTuple<Integer, String> result = new Tuple<Integer, String>();\n\t\tresult = GETRequest(AUTH_URL, AUTH_HEADER, \"\", \"\");\n\t\treturn result;\n\t}",
"@Test\n\tpublic void testGetReturnsLastNext() {\n\t\tSmartScriptLexer lexer = new SmartScriptLexer(\"\");\n\t\t\n\t\tSmartScriptToken token = lexer.nextToken();\n\t\tassertEquals(token, lexer.getToken(), \"getToken returned different token than nextToken.\");\n\t\tassertEquals(token, lexer.getToken(), \"getToken returned different token than nextToken.\");\n\t}",
"public T getToken() {\n return this.token;\n }",
"public String getToken()\n {\n return token;\n }",
"public String getToken() {\n return this.token;\n }",
"public static String getTeacherToken() {\n\n RestAssured.baseURI = \"https://cybertek-reservation-api-qa.herokuapp.com\";\n\n Response response = given().log().all().\n param(\"email\", \"[email protected]\").\n param(\"password\", \"maxpayne\").\n get(\"/sign\");\n response.then().log().all().\n assertThat().statusCode(200);\n\n return response.jsonPath().get(\"accessToken\");\n\n }",
"@Test\n public void destiny2AwaGetActionTokenTest() {\n String correlationId = null;\n InlineResponse20059 response = api.destiny2AwaGetActionToken(correlationId);\n\n // TODO: test validations\n }",
"@Test\n void testGetRequest() {\n String OAUTH_BASE = \"https://api-sandbox.rabobank.nl/openapi/sandbox/oauth2\";\n raboUtilUnderTest.get(OAUTH_BASE, \"/token\", \"payload\");\n\n // Verify the results\n verify(webClient).get(anyString(),any());\n }",
"String getTokenString();",
"public String getToken() {\n return token.get();\n }",
"public String getToken() {\r\n return token;\r\n }",
"public String getToken() {\r\n return token;\r\n }",
"@Test(expected = NullPointerException.class)\n\tpublic void testGetTokens0() throws Throwable {\n\t\tTokenController testedObject = new TokenController();\n\t\tList result = testedObject.getTokens();\n\t}",
"OAuth2Token getToken();",
"@Test\r\n\tpublic void TestvalidateToken() {\r\n\t\tlog.info(env.getProperty(\"log.start\"));\r\n\t\tudetails = new User(\"admin\", \"admin\", new ArrayList<>());\r\n\t\tString generateToken = jwtutil.generateToken(udetails);\r\n\t\tBoolean validateToken = jwtutil.validateToken(generateToken);\r\n\t\tassertEquals(true, validateToken);\r\n\t\tlog.info(env.getProperty(\"log.end\"));\r\n\t}",
"boolean hasToken();",
"boolean hasToken();",
"boolean hasToken();",
"boolean hasToken();",
"boolean hasToken();",
"boolean hasToken();",
"public Token getToken() {\r\n return _token;\r\n }",
"public interface IGetToken {\n public String getToken();\n}",
"public String getToken() {\n return this.token;\n }",
"@Test\n void testGetBankToken() {\n raboUtilUnderTest.getBankToken(\"body\");\n\n // Verify the results\n verify(webClient).post(anyString(),any(),any());\n }",
"public String getToken() {\n return this.token;\n }",
"@Test\n public void authcodeTest() {\n assertEquals(\"12345\", authResponse.getAuthcode());\n }",
"public String getToken() {\n return instance.getToken();\n }",
"public String getToken() {\n return instance.getToken();\n }",
"public String getToken() {\n return instance.getToken();\n }",
"@Test\n public void testGetValue()\n {\n System.out.println(\"getValue\");\n final File file = new File(\"src/test/data/test.example.txt\");\n final Lexer lexer = new Lexer();\n final Token token = lexer.analyze(file);\n assertEquals(Syntax.LABEL, token.getSyntax());\n assertEquals(1, token.getLine());\n assertEquals(1, token.getPosition());\n assertEquals(Vocabulary.COMPONENT, token.getValue());\n }",
"public String getToken() {\n return token;\n }",
"public String getToken() {\n return token;\n }",
"public String getToken() {\n return token;\n }",
"public String getToken() {\n return token;\n }",
"public String getToken() {\n return token;\n }",
"Pokemon.RequestEnvelop.AuthInfo.JWT getToken();",
"@Test(expected = UserNotInSessionException.class)\n public void emptyTokenAtGettingUsername4Token(){\n \tGetUsername4Token service = new GetUsername4Token(\"\");\n service.execute();\n }",
"@Test\n public void when_token_has_no_prefix_then_user_does_not_get_authentication() throws ServletException, IOException {\n test(\"eyJhbGciOiJQUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.hZnl5amPk_I3tb4O-Otci_5XZdVWhPlFyVRvcqSwnDo_srcysDvhhKOD01DigPK1lJvTSTolyUgKGtpLqMfRDXQlekRsF4XhAjYZTmcynf-C-6wO5EI4wYewLNKFGGJzHAknMgotJFjDi_NCVSjHsW3a10nTao1lB82FRS305T226Q0VqNVJVWhE4G0JQvi2TssRtCxYTqzXVt22iDKkXeZJARZ1paXHGV5Kd1CljcZtkNZYIGcwnj65gvuCwohbkIxAnhZMJXCLaVvHqv9l-AAUV7esZvkQR1IpwBAiDQJh4qxPjFGylyXrHMqh5NlT_pWL2ZoULWTg_TJjMO9TuQ\",\n null);\n }",
"@WebMethod\n public String getRequestToken() {\n String result = TokenService.getRequestToken();\n return result;\n }",
"private byte[] primitiveGetToken() {\n return decode(addr_, mask_, token_);\n }",
"@Test\n public void uidTokenTest() {\n // TODO: test uidToken\n }",
"@Test\n public void uidTokenTest() {\n // TODO: test uidToken\n }",
"@Override\n protected String getEvaluableToken() {\n return TOKEN;\n }",
"@Test\n public void testJwtIsUsedInTokenKeyEndPoint() throws Exception {\n ResultActions result = this.mockMvc\n .perform(MockMvcRequestBuilders.get(\"/oauth/token_key\")\n .principal(new UsernamePasswordAuthenticationToken(testClientId, \"\",\n Arrays.asList(new SimpleGrantedAuthority(\"ROLE_USER\")))))\n // we expect a 200 success\n .andExpect(MockMvcResultMatchers.status().is(200));\n Map<?, ?> tokenKey = new ObjectMapper().readValue(result.andReturn().getResponse().getContentAsString(),\n Map.class);\n System.out.println(\"Got response: \" + result.andReturn().getResponse().getContentAsString());\n Assert.assertEquals(tokenKey.get(\"value\"), TestJWTConfig.SignKey);\n }",
"static void getToken() throws IOException{\n curr_char = pbIn.read();\n getNonBlank();\n lookUp();\n }",
"@java.lang.Override\n public java.lang.String getToken() {\n java.lang.Object ref = token_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n token_ = s;\n }\n return s;\n }\n }",
"public boolean refreshTokenKey() {\n\t\tOptional<String> apiGetTokenKeyURLOptional = ConfigPropertiesFileUtils.getValue(\"mail.api.url.getTokenKey\");\n\t\tif (!apiGetTokenKeyURLOptional.isPresent()) {\n\t\t\tLOGGER.error(\"mail.api.url.getTokenKey not exist\");\n\t\t\treturn false;\n\t\t}\n\t\tHttpClient httpClient = HttpClientBuilder.create().build();\n\t\tHttpPost request = new HttpPost(apiGetTokenKeyURLOptional.get().trim());\n\t\trequest.addHeader(\"Content-Type\", \"application/json\");\n\t\ttry {\n\t\t\tHttpResponse httpResponse = httpClient.execute(request);\n\t\t\tif (httpResponse.getStatusLine().getStatusCode() != 200) {\n\t\t\t\tLOGGER.error(\"Fail to get Token Key: \"\n\t\t\t\t\t\t+ IOUtils.toString(httpResponse.getEntity().getContent(), Charset.forName(\"UTF-8\")));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tString contentJsonString = IOUtils.toString(httpResponse.getEntity().getContent(),\n\t\t\t\t\tCharset.forName(\"UTF-8\"));\n\t\t\tJSONArray contentJsonArray = new JSONArray(contentJsonString);\n\t\t\tLOGGER.debug(\"TOKEN KEY : \" + contentJsonArray.getString(0));\n\t\t\tif (contentJsonArray.getString(0).equals(\"null\")) {\n\t\t\t\tLOGGER.error(\"The response is null, check the mail.api.url.getTokenKey\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis.tokenKey = contentJsonArray.getString(0);\n\t\t} catch (IOException e) {\n\t\t\tLOGGER.error(\"Send request to ask a new token\", e);\n\t\t\treturn false;\n\t\t}\n\t\tLOGGER.debug(\"Get token key successfully\");\n\t\treturn true;\n\t}",
"public Token getToken() {\n return token;\n }",
"@GET\n\tString get(@QueryParam(\"tempToken\") String tempToken) {\n\n\t\tif(tempToken==null)\n\t\t\treturn \"Invalid token provided\";\n\t\t\n\t\tString responseString = \"\";\n\t\tClientConfig config = new ClientConfig();\n\t\tClient client = ClientBuilder.newClient(config);\n\t\tWebTarget target = client.target(getBaseURI(tempToken));\n\t\tresponseString = target.request().accept(MediaType.APPLICATION_JSON)\n\t\t\t\t.get(String.class);\n\t\tSystem.out.println(\"Obtained response is \" + responseString);\n\n\t\tif (responseString.contains(\"access_token=\")) {\n\t\t\tresponseString = responseString.replace(\"access_token=\", \"\");\n\t\t\treturn responseString;\n\t\t}else\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\t\n\n\t}",
"@Test\r\n\tpublic void TestgenerateToken() {\r\n\t\tlog.info(env.getProperty(\"log.start\"));\r\n\t\tudetails = new User(\"admin\", \"admin\", new ArrayList<>());\r\n\t\tString generateToken = jwtutil.generateToken(udetails);\r\n\t\tassertNotNull(generateToken);\r\n\t\tlog.info(env.getProperty(\"log.end\"));\r\n\t}",
"@Test\n public void testGetSupportingData() {\n System.out.println(\"getSupportingData\");\n String expResult = \"JWT json header\";\n String result = instance.getSupportingData();\n assertTrue(result.startsWith(expResult));\n expResult = \"true\\r\\n\";\n assertTrue(result.endsWith(expResult));\n }",
"private void requestToken(){\n APIAuth auth = new APIAuth(this.prefs.getString(\"email\", \"\"), this.prefs.getString(\"password\", \"\"), this.prefs.getString(\"fname\", \"\") + \" \" +this.prefs.getString(\"lname\", \"\"), this.prefs, null);\n auth.authenticate();\n }",
"private void setGetTokenRes(GetToken.Res value) {\n if (value == null) {\n throw new NullPointerException();\n }\n rsp_ = value;\n rspCase_ = 4;\n }",
"@Test(expected = UserNotInSessionException.class)\n public void invalidTokenAtGettingUsername4Token(){\n \tGetUsername4Token service = new GetUsername4Token(INVALIDTOKEN);\n service.execute();\n }",
"public String getToken() {\n\t\treturn token;\n\t}",
"public String getToken() {\n\t\treturn token;\n\t}",
"public String getTokenValue() { return tok; }",
"public GetToken.Res getGetTokenRes() {\n return instance.getGetTokenRes();\n }",
"@Test\n void get() {\n }",
"int getTokenStart();",
"@Test\n public void successAtGettingUsername4Token() {\n GetUsername4Token service = new GetUsername4Token(token);\n service.execute();\n \n assertEquals(USERNAME,service.getUsername());\n\n }",
"public String getToken() {\n\n return this.token;\n }",
"@Test(expected = InvalidDataException.class)\n public void nullTokenAtGettingUsername4Token(){\n \tGetUsername4Token service = new GetUsername4Token(null);\n service.execute();\n }",
"public Token getToken() {\n return this.token;\n }",
"@Test\n public void authenResultTest() {\n assertEquals(\"R\", authResponse.getAuthenResult());\n }",
"public GetToken.Req getGetTokenReq() {\n return instance.getGetTokenReq();\n }",
"@Test\n public void testGetJsonHeader() {\n System.out.println(\"getJsonHeader\");\n String expResult = \"{\\n\"\n + \" \\\"alg\\\": \\\"HS256\\\",\\n\"\n + \" \\\"typ\\\": \\\"JWT\\\"\\n\"\n + \"}\";\n String result = instance.getJsonHeader();\n assertEquals(expResult, result);\n }"
]
| [
"0.7643669",
"0.7222615",
"0.7222615",
"0.7088127",
"0.7087132",
"0.6986095",
"0.6776863",
"0.67265534",
"0.67265534",
"0.67265534",
"0.67265534",
"0.67265534",
"0.6701218",
"0.6701218",
"0.6701218",
"0.6701218",
"0.6701218",
"0.6701218",
"0.6684821",
"0.66651016",
"0.65379435",
"0.6507221",
"0.64496493",
"0.6436727",
"0.6298492",
"0.62706286",
"0.6254551",
"0.61887944",
"0.616661",
"0.6152078",
"0.6151442",
"0.6147387",
"0.61365736",
"0.61324275",
"0.6102168",
"0.6086519",
"0.6072516",
"0.60691327",
"0.6065037",
"0.6056422",
"0.6051319",
"0.6046363",
"0.6014436",
"0.6014436",
"0.6006483",
"0.6002197",
"0.6002082",
"0.59844667",
"0.59844667",
"0.59844667",
"0.59844667",
"0.59844667",
"0.59844667",
"0.5967558",
"0.59652585",
"0.5932226",
"0.59285766",
"0.591891",
"0.58827513",
"0.58624244",
"0.58624244",
"0.58624244",
"0.5862327",
"0.58595675",
"0.58595675",
"0.58595675",
"0.58595675",
"0.58595675",
"0.5858511",
"0.5858067",
"0.5856824",
"0.5852388",
"0.58520263",
"0.58484703",
"0.58484703",
"0.5837643",
"0.5831057",
"0.5825576",
"0.5810675",
"0.57999814",
"0.5794145",
"0.5777589",
"0.5771862",
"0.5760145",
"0.57499945",
"0.574897",
"0.5748916",
"0.57451075",
"0.57451075",
"0.57421124",
"0.5732993",
"0.57329047",
"0.57287294",
"0.5728559",
"0.5725499",
"0.57180625",
"0.57131207",
"0.57103467",
"0.57088804",
"0.57051367"
]
| 0.73436964 | 1 |
Try authenticating a correct device. | @Test
public void authenticateTestSucces() {
DatabaseTest.setupDevice();
Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);
assertTrue(device.authenticate());
DatabaseTest.cleanDatabase();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void authenticateSimulatedDevice() {\n mSimulatedDevice.writeln(TestsConfig.deviceWelcome.toString());\n TestsConfig.delay(300);\n \n // check if everything is ok, and get the device instance\n mDeviceInstance = mMainServer.getDevice(\n TestsConfig.deviceWelcome.getString(\"identifier\"));\n assertNotNull(mDeviceInstance);\n }",
"@Test\n public void authenticateTestFailure() {\n assertFalse(device.authenticate());\n }",
"@Test\n public void authenticateTestFailure2() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, \"other_token\");\n assertFalse(device.authenticate());\n DatabaseTest.cleanDatabase();\n }",
"private boolean autoAuthenticateDevice(String nonce) {\r\n\t\tString devCode = \"\";\r\n\t\tString authCode = \"\";\r\n\t\tString cr = \"\";\r\n\t\tMessage autoAuthenticate = new Message().addData(\"task\", \"transaction\").addData(\"message\",\r\n\t\t\t\t\"authenticate_device\");\r\n\t\tMessage reply;\r\n\r\n\t\ttry {\r\n\t\t\t// checks if file is existant and reads the device code\r\n\t\t\tFile device = new File(\"resources/device_\" + this.connectionData.getUsername());\r\n\t\t\tif (!device.exists()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(device));\r\n\t\t\tdevCode = br.readLine();\r\n\t\t\tbr.close();\r\n\t\t\t// generated authcode\r\n\t\t\tauthCode = devCode.split(\";\")[1];\r\n\t\t\tdevCode = devCode.split(\";\")[0];\r\n\r\n\t\t\tdevCode = this.connectionData.getAes().encode(devCode);\r\n\r\n\t\t\t// generate chalange-response\r\n\r\n\t\t\tcr = new Hash(authCode + nonce).toString();\r\n\t\t\tautoAuthenticate.addData(\"device\", devCode);\r\n\t\t\tautoAuthenticate.addData(\"cr\", cr);\r\n\t\t\tthis.connectionData.getConnection().write(autoAuthenticate);\r\n\t\t\treply = this.connectionData.getConnection().read();\r\n\t\t\tif (reply.getData(\"message\").equals(\"failed\")) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}",
"void sendAuthMessage(Device device) {\r\n \t//\r\n \t\t// check status and limit\r\n \t\t//\r\n \t\tint status = device.getStatus();\r\n \t\tif (status == DeviceStatus.Removed.getStatus()) {\r\n \t\t\tlogger.info(\"this device have been removed, but ask auth again\");\r\n \t\t\t\r\n \t\t} else if (status != DeviceStatus.Init.getStatus()\r\n \t\t\t\t&& status != DeviceStatus.Authing.getStatus()) {\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorStatusViolate, \"device status isn't init or authing\");\r\n \t\t}\r\n \t\t//\r\n \t\t// check retry count\r\n \t\t//\r\n \t\tint retryLimit = (Integer)applicationConfig.get(\"general\").get(\"auth_retry_limit\");\r\n \t\tint currentRetry = device.getAuthRetry();\r\n \t\tlogger.info(\"current retry count is \"+currentRetry);\r\n \t\tif (retryLimit < currentRetry ) {\r\n \t\t\t//\r\n \t\t\t// retry too many times, change to suspend status.\r\n \t\t\t//\r\n \t\t\tlogger.debug(\"update to suspend status\");\r\n \t\t\tint ret = deviceDao.updateStatusAndRetryCount(device.getId(),\r\n \t\t\t\t\tdevice.getUserId(), DeviceStatus.Suspend.getStatus(),\r\n \t\t\t\t\tDeviceStatus.Authing.getStatus(), device.getModified());\r\n \t\t\tif (ret != 1) {\r\n \t\t\t\tthrow new RentException(RentErrorCode.ErrorStatusViolate,\r\n \t\t\t\t\t\t\"update device status count is not 1\");\r\n \t\t\t}\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorExceedLimit,\r\n \t\t\t\t\t\"auth retry too many time try\");\r\n \t\t}\r\n \t\t\r\n \t\tUser user = device.getUser();\r\n \t\tAssert.assertNotNull(\"user can't be null\",user);\r\n \t\t\r\n \t\t//\r\n \t\t// prepare message.\r\n \t\t//\r\n \t\tString phone=encodeUtility.decrypt(user.getMobilePhone(), \"general\");\r\n \t ResourceBundle resource = ResourceBundle.getBundle(\"user\",user.getLocale());\r\n \t\tString message = MessageFormat.format(resource.getString(\"mobile_auth_message\"),\r\n \t\t\t\tdevice.getId(), encodeUtility.decrypt(device.getToken(), Device.ENCRYPT_KEY));\r\n \t\tlogger.debug(\"message is \"+message);\r\n \t\t//\r\n \t\t// update status\r\n \t\t//\r\n \t\tdevice.setModified(0);\r\n \t\tint ret =deviceDao.updateStatusAndRetryCount(device.getId(), device.getUserId(),\r\n \t\t\t\tDeviceStatus.Authing.getStatus(),\r\n \t\t\t\tDeviceStatus.Init.getStatus(), device.getModified());\r\n \t\tif (ret != 1) {\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorStatusViolate,\r\n \t\t\t\t\t\"update device status count is not 1\");\r\n \t\t}\r\n \r\n \t\t//\r\n \t\t// send message through gateway.\r\n \t\t//\r\n \t\tmobileGatewayService.sendSMS(phone, message);\r\n \t\tdevice.setAuthRetry(device.getAuthRetry()+1);\r\n \t\tdevice.setStatus(DeviceStatus.Authing.getStatus());\r\n \t}",
"public void tryLogin() {\n\t\tcontroller.setupClient(txtNickname.getText());\n\t\tString cardDesign = comboBoxCardDesign.getSelectionModel()\n\t\t\t\t.getSelectedItem();\n\t\tConfiguration.chooseCardDesign(cardDesign);\n\t\tConfiguration.chooseMeepleDesign(cardDesign);\n\t}",
"private void attemptLogin() {\n /*if (userLoginTask != null) {\n Snackbar.make(idNumberET, \"Please wait...\", Snackbar.LENGTH_LONG).show();\n return;\n }*/\n\n // Reset errors.\n phoneNumberET.setError(null);\n idNumberET.setError(null);\n\n // Store values at the time of the login attempt.\n String phoneNumber = phoneNumberET.getText().toString();\n String idNumber = idNumberET.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n String simCardSN = null;\n if(Permissions.check(this, Manifest.permission.READ_PHONE_STATE)) {\n simCardSN = Device.getSimCardSN(this);\n }\n if(simCardSN == null) {\n cancel = true;\n Snackbar.make(idNumberET, \"You will need a simcard to sign in\", Snackbar.LENGTH_LONG).show();\n }\n\n if(cancel == false) {//first things first, make sure the simcard is accessible first\n if(idNumberET.getVisibility() == View.VISIBLE) {\n if (TextUtils.isEmpty(idNumber)) {\n idNumberET.setError(getString(R.string.error_invalid_phone_number));\n focusView = idNumberET;\n cancel = true;\n } else if(!isIdNumberValid(idNumber)) {\n idNumberET.setError(getString(R.string.error_incorrect_password));\n focusView = idNumberET;\n cancel = true;\n }\n } else {\n idNumber = null;\n }\n\n if (TextUtils.isEmpty(phoneNumber)) {\n phoneNumberET.setError(getString(R.string.error_invalid_phone_number));\n focusView = phoneNumberET;\n cancel = true;\n } else if (!isPhoneNumberValid(phoneNumber)) {\n phoneNumberET.setError(getString(R.string.error_incorrect_password));\n focusView = phoneNumberET;\n cancel = true;\n }\n\n if(cancel == false) {\n showProgress(true);\n Log.d(TAG,phoneNumber+\" \"+idNumber+\" \"+simCardSN);\n sendData(phoneNumber, simCardSN, idNumber);\n } else {\n focusView.requestFocus();\n }\n }\n }",
"private void _verifyAuthCode(Device device,String authCode){\r\n \t\tdevice.setModified(0); // reset modified to get current time.\r\n \t\tif (device.getStatus() != DeviceStatus.Authing.getStatus()) {\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorStatusViolate,\r\n \t\t\t\t\t\"device auth status not match current status is \"+device.getStatus());\r\n \t\t}\r\n \t\t//\r\n \t\t// if device modified + timeout > current time then throw timeout exception.\r\n \t\t// check verify timeout\r\n \t\t//\r\n \t\tMap<String,Object> setting = applicationConfig.get(\"general\");\r\n \tlong time=java.util.Calendar.getInstance().getTimeInMillis()/1000;\r\n \t\tint timeout = (Integer)setting.get(\"auth_verify_timeout\");\r\n \tif (time > device.getModified() + timeout ) {\t\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorAuthExpired,\r\n \t\t\t\t\t\"verify mobile auth code has been timeout\");\r\n \t}\r\n \t\r\n \t\t//\r\n \t\t// check retry count\r\n \t\t//\r\n \t\tint retryLimit = (Integer)setting.get(\"auth_retry_limit\");\r\n \t\tif(logger.isDebugEnabled()) {\r\n \t\t\tlogger.debug(\"retry limit is \"+retryLimit+\" current auth retry is \"+device.getAuthRetry());\r\n \t\t}\r\n \t\tif (device.getAuthRetry() > retryLimit) {\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorExceedLimit,\r\n \t\t\t\t\t\"mobile verify auth retry too many time try:\"\r\n \t\t\t\t\t\t\t+ device.getAuthRetry() + \" > \" + retryLimit);\r\n \t\t}\r\n \r\n \t\t//\r\n \t\t// check auth code\r\n \t\t//\r\n \t\tString token = device.getToken();\r\n \t\tif (!authCode.equals(this.encodeUtility.decrypt(token, Device.ENCRYPT_KEY))) {\r\n \t\t\t//\r\n \t\t\t// if fail update retry status\r\n \t\t\t//\r\n \t\t\tlogger.debug(\"token not match, token is \"+token);\r\n \t\t\tint ret =deviceDao.updateStatusAndRetryCount(device.getId(), device.getUserId(),\r\n \t\t\t\t\tDeviceStatus.Authing.getStatus(),\r\n \t\t\t\t\tDeviceStatus.Init.getStatus(), device.getModified());\r\n \t\t\tif (ret != 1) {\r\n \t\t\t\tthrow new RentException(RentErrorCode.ErrorStatusViolate,\r\n \t\t\t\t\t\t\"update device status count is not 1\");\r\n \t\t\t}\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorAuthFail,\r\n \t\t\t\t\t\"device id \"+device.getId()+\" enter auth code not match\");\r\n \r\n \t\t}\r\n \t\t\r\n \t\t//\r\n \t\t// update device and user in database.\r\n \t\t//\r\n \t\tlogger.debug(\"update device status to authed\");\r\n \t\tdeviceDao.updateStatusAndRetryCount(device.getId(),device.getUserId(),\r\n \t\t\t\tDeviceStatus.Authed.getStatus(),\r\n \t\t\t\tDeviceStatus.Authing.getStatus(),\r\n \t\t\t\tdevice.getModified());\r\n \t\tUser user = device.getUser();\r\n \t\tif (user.getStatus() == UserStatus.Init.getStatus()){\r\n \t\t\tlogger.debug(\"update user status to authed\");\r\n \t\t\tuser.setModified((long)0);\r\n \t\t\tuserDao.updateUserStatus(user.getId(), UserStatus.Authed.getStatus()\r\n \t\t\t\t\t, UserStatus.Init.getStatus(), user.getModified());\r\n \t\t}\r\n \t\t\r\n \t}",
"@Override\n\tprotected void sync() {\n\n\t\tString key = null;\n\t\ttry {\n\t\t\tkey = DeviceKeyUtils.getDeviceKey(mContext);\n\t\t} catch (RuntimeException e) {\n\t\t\tUtil.logException(e);\n\t\t\tdoneSyncing();\n\t\t}\n\n\t\t/*\n\t\t * We don't really care about the response... we're not going to retry\n\t\t * if the login fails, since it's really only for tracking usage data.\n\t\t */\n\t\tResponse response = mApiService.login(key);\n\n\t\tdoneSyncing();\n\t}",
"private void tryLogin() {\n AsyncTask<String, Void, Boolean> task = new AsyncTask<String, Void, Boolean>(){\n @Override\n protected Boolean doInBackground(String... ci_session) {\n boolean isValid = PwcatsRequester.isValidCiSession(ci_session[0]);\n return isValid;\n }\n @Override\n protected void onPostExecute(Boolean isValid) {\n isLogined = isValid;\n showOrHideLogInOut(isLogined);\n if (!isValid)\n authLogout();\n TextView mNavAuthLogin = (TextView) findViewById(R.id.nav_auth_login);\n TextView mNavAuthLogout = (TextView) findViewById(R.id.nav_auth_logout);\n }\n };\n String ci_session = prefs.getString(getString(R.string.ci_session), null);\n task.execute(ci_session);\n }",
"@Test\n public void should_recognize_if_adversary_obtained_authenticator_from_trusted_device_and_tried_connect_under_a_different_user() throws SignatureException {\n final IUserProvider up = getInstance(IUserProvider.class);\n up.setUsername(UNIT_TEST_USER, getInstance(IUser.class));\n final User currUser = getInstance(IUserProvider.class).getUser();\n\n // first session is from trusted device\n constants.setNow(dateTime(\"2015-04-23 11:00:00\"));\n coSession.newSession(currUser, true, null);\n\n // second session, also from a trusted device, the authenticator from this device got stolen\n constants.setNow(dateTime(\"2015-04-23 13:00:00\"));\n final UserSession newSession = coSession.newSession(currUser, true, null);\n final String authenticator = newSession.getAuthenticator().get().toString();\n\n\n // now let's move the clock 30 minutes forward to emulate a time change\n // adversary tries to reuse a completely valid and not yet expired authenticator to access the system under a different username\n constants.setNow(dateTime(\"2015-04-23 13:30:00\"));\n up.setUsername(\"USER1\", getInstance(IUser.class));\n final User differentUser = getInstance(IUserProvider.class).getUser();\n\n final Optional<UserSession> session = coSession.currentSession(differentUser, authenticator, false);\n assertFalse(session.isPresent());\n\n // additionally, let's also check that all sessions for a compromised user have been removed, but not the sessions for other users\n final EntityResultQueryModel<UserSession> currUserSessions = select(UserSession.class).where().prop(\"user\").eq().val(currUser).model();\n final EntityResultQueryModel<UserSession> otherSessions = select(UserSession.class).where().prop(\"user\").ne().val(currUser).model();\n\n assertEquals(0, coSession.count(currUserSessions));\n assertEquals(2, coSession.count(otherSessions));\n }",
"private void deviceDetected(String btMac) {\r\n\t\t// We only allow one doctor to be logged in at the same place\r\n\t\tif (doctor == null) {\r\n\t\t\t// Check db to see if it is a doctor if so log in\r\n\t\t\tDoctor d = dbAdapter.getDoctor(btMac);\r\n\t\t\tif (d != null) {\r\n\t\t\t\t// Successful login\r\n\t\t\t\tthis.doctor = d;\r\n\t\t\t\tthis.doctor.setOnline(1);\r\n\t\t\t\tdoLogin();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n // Reset errors.\r\n mPhoneView.setError(null);\r\n mPasswordView.setError(null);\r\n\r\n // Store values at the time of the login attempt.\r\n String phone = mPhoneView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n // Check for a valid password, if the user entered one.\r\n if (TextUtils.isEmpty(password)) {\r\n mPasswordView.setError(getString(R.string.error_field_required));\r\n focusView = mPasswordView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid phone address.\r\n if (TextUtils.isEmpty(phone)) {\r\n mPhoneView.setError(getString(R.string.error_field_required));\r\n focusView = mPhoneView;\r\n cancel = true;\r\n } else if (!isPhoneValid(phone)) {\r\n mPhoneView.setError(getString(R.string.error_invalid_phone));\r\n focusView = mPhoneView;\r\n cancel = true;\r\n }\r\n\r\n if (cancel) {\r\n // There was an error; don't attempt login and focus the first\r\n // form field with an error.\r\n focusView.requestFocus();\r\n } else {\r\n // Show a progress spinner, and kick off a background task to\r\n // perform the user login attempt.\r\n showProgress(true);\r\n mAuthTask = new UserLoginTask(phone, password);\r\n mAuthTask.execute((Void) null);\r\n }\r\n }",
"private void attemptConnect() {\r\n if (mConnectTask != null) {\r\n return;\r\n }\r\n\r\n // Reset errors.\r\n mNameView.setError(null);\r\n mKeyView.setError(null);\r\n\r\n // Store values at the time of the login attempt.\r\n String name = mNameView.getText().toString();\r\n String key = mKeyView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n // Check for a valid name, if the user entered one.\r\n if (TextUtils.isEmpty(name)) {\r\n mNameView.setError(getString(R.string.error_invalid_password));\r\n focusView = mNameView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid email address.\r\n if (TextUtils.isEmpty(key)) {\r\n mKeyView.setError(getString(R.string.error_field_required));\r\n focusView = mKeyView;\r\n cancel = true;\r\n }\r\n\r\n if (cancel) {\r\n // There was an error; don't attempt login and focus the first\r\n // form field with an error.\r\n focusView.requestFocus();\r\n } else {\r\n // Show a progress spinner, and kick off a background task to\r\n // perform the user login attempt.\r\n mConnectTask = new ConnectTask(this, name, key);\r\n mConnectTask.execute((Void) null);\r\n }\r\n }",
"private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n mUsrView.setError(null);\n mPasswordView.setError(null);\n\n String usr = mUsrView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n Tuple<String, String> creds = /*getCredentials()*/ SERVER_CREDENTIALS;\n\n boolean cancel = false;\n View focusView = null;\n\n if (!TextUtils.isEmpty(password)) {\n if (!mPasswordView.getText().toString().equals(creds.y)) {\n if (Util.D) Log.i(\"attemptLogin\", \"pwd was \" + mPasswordView.getText().toString());\n mPasswordView.setError(getString(R.string.error_incorrect_creds));\n cancel = true;\n }\n focusView = mPasswordView;\n }\n\n if (TextUtils.isEmpty(usr)) {\n mUsrView.setError(getString(R.string.error_field_required));\n focusView = mUsrView;\n cancel = true;\n } else if (!usr.equals(creds.x)) {\n mUsrView.setError(getString(R.string.error_incorrect_creds));\n focusView = mUsrView;\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n if (prefs != null)\n prefs.edit().putBoolean(getString(R.string.settingAuthorized), true);\n showProgress(true);\n mAuthTask = new UserLoginTask(usr, password);\n mAuthTask.execute((Void) null);\n }\n }",
"private void verifyAuthWithServer() {\n mRegisterModel.connect(binding.personFirstName.getText().toString(),\n binding.personLastName.getText().toString(),\n binding.registerEmail.getText().toString(),\n binding.registerPassword.getText().toString());\n //this is an Asynchronous call no statements after should rely on the result of connect\n }",
"private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel)\n {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n }\n else\n {\n\n // checks to see if the login was successful or not\n try\n {\n // server connection class will handle initiating the connection to the remote server\n ServerConnection loginConn = new ServerConnection(\"http://cop4331groupeight.com/androidlogin.php\");\n String resultString = loginConn.initialLogin(email, password);\n\n JSONArray resultJSON = new JSONArray(resultString);\n JSONObject jsonObj = resultJSON.getJSONObject(0);\n\n int userID = jsonObj.getInt(\"userID\");\n String userEmail = jsonObj.getString(\"email\");\n String pass = jsonObj.getString(\"pass\");\n String error = jsonObj.getString(\"error\");\n String profileLocation = jsonObj.getString(\"profileLocation\");\n String firstName = jsonObj.getString(\"firstName\");\n String lastName = jsonObj.getString(\"lastName\");\n boolean inChat = jsonObj.getBoolean(\"inChat\");\n String preference = jsonObj.getString(\"preference\");\n String about = jsonObj.getString(\"about\");\n\n // login attempt was successful and we should proceed to the next activity\n if(error.equals(\"None\"))\n {\n\n session.createLoginSession(userID, userEmail, pass, profileLocation, firstName, lastName, inChat, true, preference, about);\n\n // Staring MainActivity\n Intent i = new Intent(getApplicationContext(), MatchActivity.class);\n startActivity(i);\n finish();\n }\n else\n {\n Log.v(\"Error\", \"Unexpected error occurred when parsing data.\");\n }\n }\n // failed login attempt\n catch(JSONException | NullPointerException e)\n {\n // if the user isn't currently connected to the internet, this exception will be thrown\n if (e instanceof NullPointerException)\n {\n Toast.makeText(LoginActivity.this, \"Error Connecting to Internet. Check your connection settings.\", Toast.LENGTH_SHORT).show();\n }\n // otherwise, the user's credentials were invalid and they need to try again\n else\n {\n Toast.makeText(LoginActivity.this, \"Login failed\", Toast.LENGTH_SHORT).show();\n mPasswordView.setError(getString(R.string.error_incorrect_password));\n mPasswordView.requestFocus();\n }\n\n }\n }\n }",
"private void verifyAuthWithServer() {\n mResetModel.connect(\n myBinding.editResetEmail.getText().toString());\n //This is an Asynchronous call. No statements after should rely on the\n //result of connect().\n }",
"private void verifyUser(){\n getValues();\n boolean validate;\n\n validate = db.authenticateUser(username, password);\n\n if (validate) {\n\n Cursor cursor = db.fetchData(username,password);\n cursor.moveToFirst();\n\n String contact = cursor.getString(3);\n\n session.createLoginSession(username, password, contact);\n\n Toast.makeText(this, \"[SYSTEM]: Login Successful! \", Toast.LENGTH_SHORT).show();\n\n Intent i = new Intent(this, MainActivity.class);\n startActivity(i);\n finish();\n } else {\n Toast.makeText(this, \"FAIL!\", Toast.LENGTH_SHORT).show();\n }\n }",
"private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n mEMSIpview.setError(null);\n // Store values at the time of the login attempt.\n final String emsIP = mEMSIpview.getText().toString();\n final String email = mEmailView.getText().toString();\n final String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n if (TextUtils.isEmpty(emsIP)) {\n mEMSIpview.setError(\"Please enter an ems ip\");\n focusView = mEMSIpview;\n cancel = true;\n }\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n performNetworkOperations.doLogin(emsIP, email, password);\n// Toast.makeText(this,token,Toast.LENGTH_SHORT).show();\n// List<String> nodeData = performNetworkOperations.getNodesList(emsIP,token);\n\n }\n }",
"public void verifyLogin(){\n\n //Verifica que haya conexion de internet\n networkManager = (ConnectivityManager) this.getSystemService(\n Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = networkManager.getActiveNetworkInfo();\n boolean isConnected = networkInfo != null && networkInfo.isConnectedOrConnecting();\n\n if (PreferenceUtils.getEmail (this) != null) { //Verifica que hay una session abierta.\n showSplash ();\n if(isConnected){\n\n //Checa el tipo de session\n if(PreferenceUtils.getSession (this))\n //Facebook session\n new LoadDataLoginFacebook (this).execute(\n PreferenceUtils.getName (this),\n PreferenceUtils.getEmail (this),\n PreferenceUtils.getPassword (this));\n else\n //Manual session\n new LoadDataLogin (this).execute (\n PreferenceUtils.getEmail (this),\n PreferenceUtils.getPassword (this));\n }\n else{ //Si no hay internet pasa directo a la session abierta.\n Intent intent = new Intent (AccessActivity.this, MainActivity.class);\n startActivity (intent);\n }\n }\n }",
"private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n // Reset errors.\r\n mIPView.setError(null);\r\n mPortView.setError(null);\r\n mUsernameView.setError(null);\r\n mPasswordView.setError(null);\r\n\r\n // Store values at the time of the login attempt.\r\n String ip = mIPView.getText().toString();\r\n int port = 0;\r\n try {\r\n port = Integer.parseInt(mPortView.getText().toString());\r\n }catch (Exception e){\r\n\r\n }\r\n String username = mUsernameView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n // Check for a valid ip address.\r\n if (TextUtils.isEmpty(ip)) {\r\n mIPView.setError(getString(R.string.error_field_required));\r\n focusView = mIPView;\r\n cancel = true;\r\n } else if (!isIPValid(ip)) {\r\n mIPView.setError(getString(R.string.error_invalid_ip));\r\n focusView = mIPView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid port.\r\n if (TextUtils.isEmpty(\"\"+port)) {\r\n mPortView.setError(getString(R.string.error_field_required));\r\n focusView = mPortView;\r\n cancel = true;\r\n }else if(port != (int)port){\r\n mPortView.setError(getString(R.string.error_invalid_port));\r\n focusView = mPortView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid username.\r\n if (TextUtils.isEmpty(username)) {\r\n mUsernameView.setError(getString(R.string.error_field_required));\r\n focusView = mUsernameView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid password, if the user entered one.\r\n if (TextUtils.isEmpty(password)) {\r\n mPasswordView.setError(getString(R.string.error_field_required));\r\n focusView = mPasswordView;\r\n cancel = true;\r\n }\r\n\r\n if (cancel) {\r\n // There was an error; don't attempt login and focus the first\r\n // form field with an error.\r\n focusView.requestFocus();\r\n } else {\r\n // Show a progress spinner, and kick off a background task to\r\n // perform the user login attempt.\r\n showProgress(true);\r\n mAuthTask = new UserLoginTask(ip, port, username, password);\r\n mAuthTask.execute((Void) null);\r\n }\r\n }",
"public void loginWithPersonalDevice() // ==== To be used by LGN_005 and Verify SIM ==== //\n\t{\n\t\ttry\n\t\t{\n\t\t\tnew WebDriverWait(driver, 45).until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"//android.widget.TextView[contains(@text,'Verify')]\")));\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tAssert.fail(\"Verify Phone page not found\"+e.getMessage());\n\t\t}\n\t\t\n\t\tLog.info(\"======== Login With Verify Personal Device ========\");\n\t\tif(pageTitle.getText().contains(\"Device\"))\n\t\t{\t\t\t\n\t\t\tLog.info(\"== Verify Device page found instead of Verify Phone page ==\"); \t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor(WebElement e: selectSimNumberList) // Select any/all Sim and Number dropdowns\n\t\t{\n\t\t\te.click();\n\t\t\tselectWithinList.get(1).click();\n\t\t}\n\t\tcontinueButton.click();\n\t\t// Wait until presence of Home page or Verify device Page \t\t\n\t\t\n\t\tnew WebDriverWait(driver,90).until(ExpectedConditions.visibilityOf(checker));\n\t\t\n\t\tif(checker.getText().toLowerCase().contains(\"ok\") && checker.getAttribute(\"resourceId\").contains(\"button1\"))\n\t\t{\t\n\t\t\tchecker.click();\n\t\t\t\n\t\t\tnew WebDriverWait(driver,60).until(ExpectedConditions.visibilityOf(checker));\n\t\t}\n\t\tif(checker.getText().contains(\"OK\") && checker.getAttribute(\"resourceId\").contains(\"button2\")) return;\t// LGN_05 will verify this\t\n\t\t\n\t\t//gotoHome();\tNo need to go to Home since Error messages and skip buttons need to be validated\t\n\t}",
"private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n final String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n if(isOnline()){\n try {\n ApiRequests.POST(\"login/\", new Callback() {\n @Override\n public void onFailure(Call call, final IOException e) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Log.e(\"error:\", \"burda\");\n }\n });\n }\n\n @Override\n public void onResponse(Call call, final Response response) throws IOException {\n\n try {\n processTheResponse(response.body().string());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, email, password);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n else {\n InternetConnectionError();\n }\n }\n }",
"private void attemptLogin() {\n\n String username = mEmailView.getText().toString().trim();\n String idNumber = mIdNumber.getText().toString().trim();\n String password = mPasswordView.getText().toString().trim();\n\n if (TextUtils.isEmpty(username)) {\n// usernameView.setError(errorMessageUsernameRequired);\n// errorView = usernameView;\n }\n\n if (TextUtils.isEmpty(password)) {\n// password.setError(errorMessagePasswordRequired);\n// if (errorView == null) {\n// errorView = passwordView;\n// }\n }\n\n final User user = new User();\n ((DealerManager)getApplication()).setUser(user);\n navigateTo(R.id.nav_home);\n }",
"private void attemptLogin() {\n String email = text_email.getText().toString();\n String password = text_password.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n text_password.setError(getString(R.string.error_field_required));\n focusView = text_password;\n cancel = true;\n }\n if (!isPasswordValid(password)) {\n text_password.setError(getString(R.string.error_invalid_password));\n focusView = text_password;\n cancel = true;\n }\n\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n text_email.setError(getString(R.string.error_field_required));\n focusView = text_email;\n cancel = true;\n } else if (!isEmailValid(email)) {\n text_email.setError(getString(R.string.error_invalid_email));\n focusView = text_email;\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n //showProgress(true);\n login(USER_NORMAL);\n }\n }",
"public void attemptLogin()\n {\n if ( mAuthTask != null )\n {\n return;\n }\n\n // Reset errors.\n mIPView_.setError( null );\n mPortView_.setError( null );\n\n // Store values at the time of the login attempt.\n mIP_ = mIPView_.getText().toString();\n mPort_ = mPortView_.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password.\n if ( TextUtils.isEmpty( mPort_ ) )\n {\n mPortView_\n .setError( getString( R.string.error_field_required ) );\n focusView = mPortView_;\n cancel = true;\n }\n // The port should be four digits long\n else if ( mPort_.length() != 4 )\n {\n mPortView_\n .setError( getString( R.string.error_invalid_server ) );\n focusView = mPortView_;\n cancel = true;\n }\n\n // Check for a valid email address.\n if ( TextUtils.isEmpty( mIP_ ) )\n {\n mIPView_.setError( getString( R.string.error_field_required ) );\n focusView = mIPView_;\n cancel = true;\n }\n\n if ( cancel )\n {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n }\n else\n {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n mLoginStatusMessageView\n .setText( R.string.login_progress_signing_in );\n showProgress( true );\n\n // Start the asynchronous thread to connect and post to the server\n mAuthTask = new UserLoginTask();\n mAuthTask.execute( (Void) null );\n }\n }",
"@Before(unless = { \"signin\", \"doLogin\" })\n\tprivate static void checkAuthentification() {\n\t\t// get ID from secure social plugin\n\t\tString uid = session.get(PLAYUSER_ID);\n\t\tif (uid == null) {\n\t\t\tsignin(null);\n\t\t}\n\n\t\t// get the user from the store. TODO Can also get it from the cache...\n\t\tUser user = null;\n\t\tif (Cache.get(uid) == null) {\n\t\t\ttry {\n\t\t\t\tuser = UserClient.getUserFromID(uid);\n\t\t\t\tCache.set(uid, user);\n\t\t\t} catch (ApplicationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\t}\n\t\t} else {\n\t\t\tuser = (User) Cache.get(uid);\n\t\t}\n\n\t\tif (user == null) {\n\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\tAuthentifier.logout();\n\t\t}\n\n\t\tif (user.avatarURL == null) {\n\t\t\tuser.avatarURL = Gravatar.get(user.email, 100);\n\t\t}\n\n\t\t// push the user object in the request arguments for later display...\n\t\trenderArgs.put(PLAYUSER, user);\n\t}",
"private void attemptLogin() {\n if (isLoggingIn) {\n return;\n }\n\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!Utils.isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_field_required));\n focusView = mPasswordView;\n cancel = true;\n } else if (!Utils.isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n if (!HttpUtils.isNetworkAvailable(this.getApplicationContext())) {\n Toast.makeText(this.getApplicationContext(), \"No internet\", Toast.LENGTH_SHORT).show();\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(mPasswordView.getWindowToken(), 0);\n\n LoginApi.executeLogin(this, email, password);\n }\n }",
"void checkConnection() {\n\n //Call method which checks for connection.\n boolean isNetworkConnected = isNetworkConnected();\n\n //If there is a data connection currently available for use, attempt to authenticate login details with Firebase,\n // allow user to login offline but without a profile and access only to local storage.\n if(isNetworkConnected) {\n\n //If there is an active data connection, set authenticated value to true\n authenticated = true;\n }\n\n else {\n\n //If there is an active data connection, set authenticated value to false\n authenticated = false;\n }\n }",
"private void attemptToConnect() {\n LOG.warn(\"Attempting to connect....\");\n \n if (// No connection configuration\n getConnectionConfiguration() == null &&\n (getServerHostname() == null || getServerPort() == 0 ||\n getServiceName() == null || getFromAddress() == null ||\n getPassword() == null || getResource() == null)\n \n ||\n \n // Already logged in.\n getConnection() != null && getConnection().isAuthenticated()) {\n \n return;\n }\n \n try {\n if (getConnectionConfiguration() == null) {\n setConnectionConfiguration(new ConnectionConfiguration(\n getServerHostname(), getServerPort(), getServiceName()));\n }\n\n connect();\n }\n catch (Throwable t) {\n LOG.error(t);\n }\n }",
"private void attemptLogin() {\n\n if (!Utils.isNetworkAvailable(mBaseActivity)) {\n Utils.showNetworkAlertDialog(mBaseActivity);\n return;\n }\n if (signInTask != null) {\n return;\n }\n\n // Reset errors.\n binding.email.setError(null);\n binding.password.setError(null);\n\n // Store values at the time of the login attempt.\n String email = binding.email.getText().toString();\n String password = binding.password.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n binding.email.setError(getString(R.string.error_field_required));\n focusView = binding.email;\n cancel = true;\n } else if (TextUtils.isEmpty(password)) {\n binding.password.setError(getString(R.string.error_field_required));\n focusView = binding.password;\n cancel = true;\n } else if (!isEmailValid(email)) {\n binding.email.setError(getString(R.string.error_invalid_email));\n focusView = binding.email;\n cancel = true;\n } else if (!isPasswordValid(password)) {\n binding.password.setError(getString(R.string.error_invalid_password));\n focusView = binding.password;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // perform the user login attempt.\n signInTask = new AsyncTask(mBaseActivity);\n signInTask.execute(email, password);\n }\n }",
"private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !Utility_Helper.isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!Utility_Helper.isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n // if user flow not cancelled execute Simulate_Login_Task asyncronous task\n // to simulate login\n Simulate_Login_Task task = new Simulate_Login_Task(this, dummyList, email, password);\n task.setOnResultListener(asynResult);\n task.execute();\n }\n }",
"@Test\n public void should_recognize_if_adversary_obtained_authenticator_from_untrusted_device_and_tried_to_change_expiry_date() throws SignatureException {\n final IUserProvider up = getInstance(IUserProvider.class);\n up.setUsername(UNIT_TEST_USER, getInstance(IUser.class));\n final User currUser = getInstance(IUserProvider.class).getUser();\n\n // first session is from trusted device\n constants.setNow(dateTime(\"2015-04-23 11:00:00\"));\n coSession.newSession(currUser, true, null);\n\n // second session from untrusted device, and this is the device where the authenticator gets stolen from\n constants.setNow(dateTime(\"2015-04-23 13:00:00\"));\n final UserSession newSession = coSession.newSession(currUser, false, null);\n\n // let's fabricate a fraudulent authenticator\n final String fraudulentAuthenticator = newSession.getAuthenticator().get().username + Authenticator.AUTHENTICATOR_SEPARATOR +\n newSession.getAuthenticator().get().seriesId + Authenticator.AUTHENTICATOR_SEPARATOR +\n // tries to move expiration time into the future\n (constants.now().plusMinutes(15).getMillis()) + Authenticator.AUTHENTICATOR_SEPARATOR +\n newSession.getAuthenticator().get().hash;\n\n\n // now let's move the clock 7 minutes forward to emulate a time change and request a current session with fraudulent authenticator\n // that as far as the adversary is concerned should still be valid due to the performed time manipulation\n constants.setNow(dateTime(\"2015-04-23 13:07:00\"));\n final Optional<UserSession> session = coSession.currentSession(currUser, fraudulentAuthenticator, false);\n assertFalse(session.isPresent());\n\n // additionally, let's also check that all sessions for a compromised user have been removed, but not the sessions for other users\n final EntityResultQueryModel<UserSession> currUserSessions = select(UserSession.class).where().prop(\"user\").eq().val(currUser).model();\n final EntityResultQueryModel<UserSession> otherSessions = select(UserSession.class).where().prop(\"user\").ne().val(currUser).model();\n\n assertEquals(0, coSession.count(currUserSessions));\n assertEquals(2, coSession.count(otherSessions));\n }",
"private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n login(email, password);\n\n }\n }",
"protected boolean authenticate() {\n \tif (mConfig == null) {\n \t\tmConfig = getConfig();\n \t}\n \tString keys[] = getKeys();\n \tif (keys != null) {\n\t mConfig = api.authenticateToken(keys[0], keys[1], mConfig);\n\t if (mConfig != null) {\n\t return true;\n\t }\n \t}\n \tshowToast(\"Failed user authentication for stored login tokens.\");\n \tclearKeys();\n \tsetLoggedIn(false);\n \treturn false;\n }",
"private void showAuthenticationScreen() {\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {\n mKeyguardManager = (KeyguardManager) getActivity().getSystemService(Context.KEYGUARD_SERVICE);\n\n if (mKeyguardManager.isKeyguardSecure()) {\n Intent authIntent = mKeyguardManager.createConfirmDeviceCredentialIntent(null, null);\n startActivityForResult(authIntent, REQUEST_CODE_CONFIRM_DEVICE_CREDENTIALS);\n }\n }\n }",
"private void attemptLogin(){\n //reset error\n et_email.setError(null);\n et_password.setError(null);\n\n // Store values at the time of the login attempt.\n final String email = et_email.getText().toString();\n final String password = et_password.getText().toString();\n final boolean finish = false;\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n et_password.setError(getString(R.string.error_invalid_password));\n focusView = et_password;\n cancel = true;\n }else if (!isEmailValid(email)) {\n et_email.setError(getString(R.string.error_invalid_email));\n focusView = et_email;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n JSONObject json = new JSONObject();\n\n try {\n json.put(\"ctrl\", \"login\");\n json.put(\"email\", email);\n json.put(\"password\", password);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n String requete = json.toString();\n Log.v(\"req\", requete);\n HttpQuery login = new HttpQuery(requete, this);\n login.execute();\n }\n\n\n }",
"boolean authNeeded();",
"void tryConnection(String mac)\n {\n if (outstanding_connect != null || open_connection != null) {\n return;\n }\n \n Log.d(Constants.LOG_TAG, \"Attempting to connect to \" + mac);\n \n BluetoothDevice dev = bt_adapter.getRemoteDevice(mac);\n outstanding_connect = new ConnectThread(dev, handler);\n outstanding_connect.start();\n \n }",
"public boolean login() { \r\n byte keytype = (byte)ACR120U.AC_MIFARE_LOGIN_KEYTYPE_A;\r\n byte[] key = new byte[6];\r\n for(int i=0;i<6;i++) \r\n key[i] = (byte)0xff;\r\n int result;\r\n result = cardReader.login(handle,sector,keytype,(byte)00,key);\r\n if (result < 0){ \r\n message = \"No Card\";\r\n return false;\r\n }\r\n return true;\r\n }",
"@Override\n public boolean authenticate() {\n try {\n if (conn != null) {\n return true;\n }\n conn = new Connection(configuration.getHost());\n conn.connect();\n //登陆linux\n boolean isAuthenticated = conn.authenticateWithPassword(configuration.getUsername(),\n configuration.getPassword());\n if (!isAuthenticated) {\n conn.close();\n conn = null;\n throw new UserOrPasswordErrorException(\"账号或密码错误!\");\n }\n return true;\n } catch (IOException e) {\n conn.close();\n conn = null;\n throw new HostCannotConnectException(\"无法连接到主机!\");\n }\n }",
"private void attemptLogin() {\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_email_is_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!mPresenter.isEmailValid(email)) {\n //mEmailView.setError(getString(R.string.error_invalid_email));\n customConfirmDialog(getString(R.string.message_incorrect_email), getString(R.string.message_require_format_email));\n focusView = mEmailView;\n cancel = true;\n }else if (!TextUtils.isEmpty(password) && !mPresenter.isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n //customConfirmDialog(getString(R.string.message_incorrect_password), getString(R.string.message_please_insert_valid_password));\n focusView = mPasswordView;\n cancel = true;\n }else if(TextUtils.isEmpty(password))\n {\n customConfirmDialog(getString(R.string.message_incorrect_password), getString(R.string.message_please_insert_valid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n if (isNetworkOffline()) {\n return;\n }\n showLoadingDialog(getString(R.string.message_please_wait));\n mPresenter.doLoginByEmail(email, password);\n }\n }",
"private void attemptLogin() {\n // Reset errors.\n edtID.setError(null);\n edtPassword.setError(null);\n\n // Store values at the time of the login attempt.\n String userId = edtID.getText().toString();\n String password = edtPassword.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n edtPassword.setError(\"Password is empty\");\n focusView = edtPassword;\n cancel = true;\n } else if(!isPasswordValid(password)) {\n edtPassword.setError(getString(R.string.error_invalid_password));\n focusView = edtPassword;\n cancel = true;\n }\n\n // Check for a valid user id.\n if (TextUtils.isEmpty(userId)) {\n edtID.setError(getString(R.string.error_field_required));\n focusView = edtID;\n cancel = true;\n } else if (!isUserIdValid(userId)) {\n edtID.setError(getString(R.string.error_invalid_id));\n focusView = edtID;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n JSONObject json = new JSONObject();\n try {\n json.put(\"user_id\", userId);\n json.put(\"password\", password);\n } catch (Exception e) {\n e.printStackTrace();\n }\n reqUserID = userId;\n reqUserPW = password;\n loginConnector.request(json);\n }\n }",
"public boolean auth() throws IOException {\r\n \treturn auth(false);\r\n }",
"private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_field_required));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(email.replace(\" \", \"%20\"), password.replace(\" \", \"%20\"));\n mAuthTask.execute((Void) null);\n }\n }",
"private void _login() throws SecurityFeaturesException {\n try {\n _initChallengeResponse();\n } catch (InvalidKeyException e) {\n _showAlertWithMessage(getString(R.string.authentication_failure_title), getString(R.string.error_auth_invalid_key), false, false);\n } catch (InvalidChallengeException e) {\n _showAlertWithMessage(getString(R.string.authentication_failure_title), getString(R.string.error_auth_invalid_challenge), false, false);\n }\n }",
"public boolean authenticateUser() {\r\n try {\r\n \r\n firstServerMessage();\r\n sendKeys();\r\n sessionKeyMsg();\r\n \r\n \r\n \r\n \treturn true;\r\n }\r\n \r\n catch(Exception ioe){\r\n System.out.println(\"Terminating session with Acct#: \" + currAcct.getNumber());\r\n //ioe.printStackTrace();\r\n return false;\r\n }\r\n \r\n }",
"public boolean tryLogin(auctionsystemInterface ai) throws RemoteException\n {\n//\n Scanner sc = new Scanner(System.in);\n System.out.println(\"Please enter username: \");\n curBuyerName = sc.next();\n\n System.out.println(\"Please enter password: \");\n curBuyerPas = sc.next();\n\n try {\n boolean succesful = ai.login(curBuyerName,curBuyerPas);\n\n if(succesful)\n {\n System.out.println(\"You have successfully logged in \" + curBuyerName);\n return true;\n }\n else\n {\n System.out.println(\"Login failed.\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return false;\n }",
"@Test\n\tpublic void testAuthenticateAndroidUser() {\n\t\t Authenticator auth=new Authenticator();\n \n \n \n AndroidUser anUser=new AndroidUser(\"\", \"asd\", \"asd\", \"asd\", \"asd\", \"asd\", \"asd\");\n \n assertTrue(auth.authenticate(anUser));\n \n \n\t}",
"private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mUserNameView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String userName = mUserNameView.getText().toString();\n String password = mPasswordView.getText().toString();\n UserDetail user = new UserDetail(userName, password);\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n user = null;\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(userName)) {\n mUserNameView.setError(getString(R.string.error_field_required));\n focusView = mUserNameView;\n\n\n }\n else if(user!=null && isNetworkConnected()) {\n getPermissiontoAccessInternet();\n mAuthTask = new UserLoginTask(user);\n mAuthTask.execute((Void) null);\n\n }\n// } else if (!isUserNameValid(userName)) {\n// mUserNameView.setError(getString(R.string.error_invalid_email));\n// focusView = mUserNameView;\n// cancel = true;\n// }\n\n// if (cancel) {\n// // There was an error; don't attempt login and focus the first\n// // form field with an error.\n// focusView.requestFocus();\n// } else {\n// // Show a progress spinner, and kick off a background task to\n// // perform the user login attempt.\n//\n// }\n }",
"private static void attemptToLogin() {\n\t\tString id = null;\n\t\tString password = null;\n\t\tString role = null;\n\t\tint chances = 3;\n\t\t//User will get 3 chances to login into the system.\n\t\twhile(chances-->0){\n\t\t\tlog.info(\"Email Id:\");\n\t\t\tid = sc.next();\n\t\t\tlog.info(\"Password:\");\n\t\t\tpassword = sc.next();\n\t\t\trole = LogInAuthentication.authenticate(id, password);\n\t\t\t//If correct credentials are entered then role of user will be fetch from the database. \n\t\t\tif(role == null) {\n\t\t\t\t//If role is not fetched, error and left chances will be shown.\n\t\t\t\tlog.error(\"Invalid EmailId or password\");\n\t\t\t\tlog.info(\"Chances left: \"+chances);\n\t\t\t}\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\t//After verifying credentials User will be on-board to its portal depending upon the role.\n\t\tonboard(id,role);\n\t}",
"private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(email, password);\n mAuthTask.execute((Void) null);\n }\n }",
"private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(email, password);\n mAuthTask.execute((Void) null);\n }\n }",
"public void attemptLogin() {\n\n\t\t// Reset errors.\n\t\tmUserView.setError(null);\n\t\tmPasswordView.setError(null);\n\n\t\t// Save values.\n\t\tmUser = mUserView.getText().toString();\n\t\tmPassword = mPasswordView.getText().toString();\n\n\t\tboolean cancel = false;\n\t\tView focusView = null;\n\n\t\t// Check for a valid password.\n\t\tif (TextUtils.isEmpty(mPassword)) {\n\t\t\tmPasswordView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mPasswordView;\n\t\t\tcancel = true;\n\t\t} else if (mPassword.length() < 4) {\n\t\t\tmPasswordView.setError(getString(R.string.error_invalid_password));\n\t\t\tfocusView = mPasswordView;\n\t\t\tcancel = true;\n\t\t}\n\n\t\t// Check for a valid user.\n\t\tif (TextUtils.isEmpty(mUser)) {\n\t\t\tmUserView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mUserView;\n\t\t\tcancel = true;\n\t\t} else if (mUser.length() < 4) {\n\t\t\tmUserView.setError(getString(R.string.error_invalid_user));\n\t\t\tfocusView = mUserView;\n\t\t\tcancel = true;\n\t\t}\n\t\t\t\t\n\t\tif (cancel) {\n\t\t\t// There is an error, so registration does not success and focus on the error.\n\t\t\tfocusView.requestFocus();\n\t\t} else {\n\t\t\t// Send information to server.\n\t\t\tmLoginStatusMessageView.setText(R.string.login_progress_registering);\n\t\t\tshowProgress(true);\n\t\t\tsendInfoToServer();\n\t\t}\n\t}",
"private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(email, password, false);\n mAuthTask.execute((Void) null);\n }\n }",
"private void attemptLogin() {\n\n // Reset errors.\n mEmailField.setError(null);\n mPasswordField.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailField.getText().toString();\n String password = mPasswordField.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordField.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordField;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailField.setError(getString(R.string.error_field_required));\n focusView = mEmailField;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailField.setError(getString(R.string.error_invalid_email));\n focusView = mEmailField;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n signIn(email, password);\n }\n }",
"private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n\n showProgress(true);\n mAuthTask = new UserLoginTask(email, password);\n mAuthTask.execute((Void) null);\n }\n\n }",
"@Override\n\tpublic Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows IOException {\n\t\tfinal String requestURI = request.getRequestURI();\n\t\tUserAuthentication userAuth = null;\n\t\tUser user = null;\n\n\t\tif (requestURI.endsWith(OPENID_ACTION)) {\n\t\t\tAuthentication oidAuth = super.attemptAuthentication(request, response);\n\n\t\t\tif (oidAuth == null) {\n\t\t\t\t// hang on... redirecting to openid provider\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\t//success!\n\t\t\t\tAuthenticatedUserDetails userDetails = (AuthenticatedUserDetails) oidAuth.getPrincipal();\n\t\t\t\tuserAuth = new UserAuthentication(userDetails);\n\t\t\t\tuser = userDetails.getUser();\n\t\t\t}\n\t\t}\n\n\t\treturn SecurityUtils.checkIfActive(userAuth, user, true);\n\t}",
"private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mPasswordView.setError(null);\n usernameView.setError(null);\n\n // Store values at the time of the login attempt.\n String username = usernameView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n/*\nTODO: Move this to register area to see if email is a valid email address\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n */\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n //showProgress(true);\n HashMap<String, String> map = new HashMap<>();\n map.put(\"username\", username);\n map.put(\"pass\", password);\n mAuthTask = new httpUrlConn(map, \"http://hive.sewanee.edu/evansdb0/android1/scripts/hotPartyLogin.php\");\n\n mAuthTask.execute();\n\n try {\n if(mAuthTask.get().contains(\"true\")) {\n String r = mAuthTask.get().replace(\"true // \",\"\");\n Log.i(\"response\", r.toString());\n Toast.makeText(getApplicationContext(),r,Toast.LENGTH_SHORT).show();\n Intent i = new Intent(this, chooseEvent.class);\n i.putExtra(\"username\", username);\n startActivity(i);\n\n }\n else {\n String[] resp = response.split(\",\");\n // for(String i: resp)\n //Toast.makeText(getApplicationContext(),i,Toast.LENGTH_SHORT).show();\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n }\n\n if (mAuthTask == null || mAuthTask.getStatus().equals(AsyncTask.Status.FINISHED)) {\n mAuthTask = null;\n }\n }\n }",
"public void attemptLogin() {\n\t\t// Reset errors.\n\t\temailTextView.setError(null);\n\t\tpasswordTextView.setError(null);\n\n\t\t// Store values at the time of the login attempt.\n\t\temail = emailTextView.getText().toString();\n\t\tpassword = passwordTextView.getText().toString();\n\n\t\tboolean cancel = false;\n\n\t\t// Check for a valid email address.\n\t\tcancel = Validate.PresenceOf(emailTextView);\n\t\tif (!cancel) cancel = Validate.PatternOf(emailTextView, Patterns.EMAIL_ADDRESS);\n\t\t\n\t\t// check valid password\n\t\tif (!cancel) cancel = Validate.PresenceOf(passwordTextView);\t\t\n\n\t\tif (!cancel) {\t\n\t\t\tKeyboard.hide(getActivity());\n\t\t\tlogin();\n\t\t}\n\t}",
"private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n // Sets up a new login task with the provide login form\n mAuthTask = new UserLoginTask(email, password);\n try {\n // Executes login task\n mAuthTask.execute();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }",
"@Test\n public void doSuccessfulAuthTest() throws IOException {\n // Load valid credentials\n loadValidCredentials();\n\n final RestClient restClient = new HttpClientRestClient();\n restClient.init(testConfig);\n\n // Validate not yet valid\n assertFalse(\"should not yet be valid\", sessionRefreshHandler.isValid());\n// TODO\n// assertNull(\"Should have no header value yet\", sessionRefreshHandler.getAuthorizationHeaderValue());\n\n // Call method with valid credentials and this should return true.\n assertTrue(sessionRefreshHandler.refreshCredentials(pardotClient));\n\n // Sanity check\n assertTrue(sessionRefreshHandler.isValid());\n// TODO\n// assertNotNull(sessionRefreshHandler.getAuthorizationHeaderValue());\n }",
"protected void validateToken() {\n\n authToken = preferences.getString(getString(R.string.auth_token), \"\");\n saplynService = new SaplynService(preferences.getInt(debugLvl, -1), authToken);\n\n // Check if user already authenticated\n if (authToken.equals(\"\")) {\n Intent intent = new Intent(HomeActivity.this, AuthenticationActivity.class);\n startActivityForResult(intent, 0);\n }\n else {\n populateUser();\n }\n }",
"private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n// showProgress(true);\n mEmail = email;\n mPassword = password;\n mAuthTask = new UserLoginTask(this);\n mAuthTask.execute((Void) null);\n }\n }",
"public void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(this, email, password);\n mAuthTask.execute((Void) null);\n }\n }",
"private void attemptLogin() {\n\n char ch;\n boolean hasUppercase = false;\n boolean hasLowercase = false;\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String firstname = mFirstNameView.getText().toString();\n String lastname = mLastNameView.getText().toString();\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n String passwordconfirm = mPasswordConfirmView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid first name.\n if (TextUtils.isEmpty(firstname)) {\n mFirstNameView.setError(getString(R.string.error_field_required));\n focusView = mFirstNameView;\n cancel = true;\n }\n\n // Check for a valid last name.\n if (TextUtils.isEmpty(lastname)) {\n mLastNameView.setError(getString(R.string.error_field_required));\n focusView = mLastNameView;\n cancel = true;\n }\n\n // Check if password field is empty.\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_field_required));\n focusView = mPasswordView;\n cancel = true;\n }\n\n //Check if the second input password is empty\n if (TextUtils.isEmpty(passwordconfirm)) {\n mPasswordConfirmView.setError(\"This field is required!\");\n focusView = mPasswordConfirmView;\n cancel = true;\n }\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && password.length() < 7) {\n mPasswordView.setError(getString(R.string.error_short_password));\n focusView = mPasswordView;\n cancel = true;\n }\n if (!isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check if both of the entered passwords are equal\n if (!Objects.equals(password, passwordconfirm)) {\n mPasswordConfirmView.setError(\"Your Passwords do not match\");\n focusView = mPasswordConfirmView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n if (isNetworkAvailable()) {\n View view = this.getCurrentFocus();\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n Bundle args = new Bundle();\n args.putString(IHC_FIRSTNAME_KEY, firstname);\n args.putString(IHC_LASTNAME_KEY, lastname);\n args.putString(IHC_EMAIL_KEY, email);\n args.putString(IHC_PASSWORD_KEY, password);\n getSupportLoaderManager().initLoader(IHC_NONSTUDENT_SIGNUP_LOADER_ID, args, this);\n //new SignupAuthProcess(this).execute(firstname, lastname, email, password);\n }\n else {\n showNoInternetConnectionMsg();\n }\n }\n }",
"private boolean authenticate (HttpRequest request, HttpResponse response) throws UnsupportedEncodingException\n\t{\n\t\tString[] requestSplit=request.getPath().split(\"/\",3);\n\t\tif(requestSplit.length<2)\n\t\t\treturn false;\n\t\tString serviceName=requestSplit[1];\n\t\tfinal int BASIC_PREFIX_LENGTH=\"BASIC \".length();\n\t\tString userPass=\"\";\n\t\tString username=\"\";\n\t\tString password=\"\";\n\t\t\n\t\t//Check for authentication information in header\n\t\tif(request.hasHeaderField(AUTHENTICATION_FIELD)\n\t\t\t\t&&(request.getHeaderField(AUTHENTICATION_FIELD).length()>BASIC_PREFIX_LENGTH))\n\t\t{\n\t\t\tuserPass=request.getHeaderField(AUTHENTICATION_FIELD).substring(BASIC_PREFIX_LENGTH);\n\t\t\tuserPass=new String(Base64.decode(userPass), \"UTF-8\");\n\t\t\tint separatorPos=userPass.indexOf(':');\n\t\t\t//get username and password\n\t\t\tusername=userPass.substring(0,separatorPos);\n\t\t\tpassword=userPass.substring(separatorPos+1);\n\t\t\t\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\n\t\t\t\tlong userId;\n\t\t\t\tAgent userAgent;\n\t\t\t\t\n\t\t\t\tif ( username.matches (\"-?[0-9].*\") ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tuserId = Long.valueOf(username);\n\t\t\t\t\t} catch ( NumberFormatException e ) {\n\t\t\t\t\t\tthrow new L2pSecurityException (\"The given user does not contain a valid agent id!\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tuserId = l2pNode.getAgentIdForLogin(username);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tuserAgent = l2pNode.getAgent(userId);\n\t\t\t\t\n\t\t\t\tif ( ! (userAgent instanceof PassphraseAgent ))\n\t\t\t\t\tthrow new L2pSecurityException (\"Agent is not passphrase protected!\");\n\t\t\t\t((PassphraseAgent)userAgent).unlockPrivateKey(password);\n\t\t\t\t_currentUserId=userId;\n\t\t\t\t\n\t\t\t\tif(!_userSessions.containsKey(userId))//if user not registered\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\tMediator mediator = l2pNode.getOrRegisterLocalMediator(userAgent);\n\t\t\t\t\t_userSessions.put(userId, new UserSession(mediator));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t_userSessions.get(userId).updateServiceTime(serviceName,new Date().getTime());//update last access time for service\n\t\t\t\t\n\t\t\t\tconnector.logMessage(\"Login: \"+username);\n\t\t\t\tconnector.logMessage(\"Sessions: \"+Integer.toString(_userSessions.size()));\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t}catch (AgentNotKnownException e) {\n\t\t\t\tsendUnauthorizedResponse(response, null, request.getRemoteAddress() + \": login denied for user \" + username);\n\t\t\t} catch (L2pSecurityException e) {\n\t\t\t\tsendUnauthorizedResponse( response, null, request.getRemoteAddress() + \": unauth access - prob. login problems\");\n\t\t\t} catch (Exception e) {\n\t\t\t\t\n\t\t\t\tsendInternalErrorResponse(\n\t\t\t\t\t\tresponse, \n\t\t\t\t\t\t\"The server was unable to process your request because of an internal exception!\", \n\t\t\t\t\t\t\"Exception in processing create session request: \" + e);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresponse.setStatus ( HttpResponse.STATUS_BAD_REQUEST );\n\t\t\tresponse.setContentType( \"text/plain\" );\n\t\t\tresponse.print ( \"No authentication provided!\" );\n\t\t\tconnector.logError( \"No authentication provided!\" );\n\t\t}\n\t\treturn false;\n\t}",
"private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.kkkkkkkkl[]/\\]\n\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(email, password);\n mAuthTask.execute((Void) null);\n\n // Intent signInActivityIntent= new Intent(this,UserProfileActivity.class);\n // startActivity(signInActivityIntent);\n }\n }",
"private void attemptLogin() {\n if (authTask != null) {\n return;\n }\n\n // Reset errors.\n usernameView.setError(null);\n passwordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = usernameView.getText().toString();\n String password = passwordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n passwordView.setError(getString(R.string.error_invalid_password));\n focusView = passwordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n usernameView.setError(getString(R.string.error_field_required));\n focusView = usernameView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n usernameView.setError(getString(R.string.error_invalid_email));\n focusView = usernameView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n //set loginID for session\n session.setID(email);\n\n startDashboard();\n /*authTask = new UserLoginTask(email, password);\n authTask.execute((Void) null);*/\n }\n }",
"abstract public boolean checkAuth(String userId) throws IOException;",
"public void attemptLogin() {\r\n\t\tif (mAuthTask != null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Reset errors.\r\n\t\tthis.activity.getmEmailView().setError(null);\r\n\t\tthis.activity.getmPasswordView().setError(null);\r\n\r\n\t\t// Store values at the time of the login attempt.\r\n\t\tmEmail = this.activity.getmEmailView().getText().toString();\r\n\t\tmPassword = this.activity.getmPasswordView().getText().toString();\r\n\r\n\t\tboolean cancel = false;\r\n\t\tView focusView = null;\r\n\r\n\t\t// Check for a valid password.\r\n\t\tif (TextUtils.isEmpty(mPassword)) {\r\n\t\t\tthis.activity.getmPasswordView().setError(this.activity.getString(R.string.error_field_required));\r\n\t\t\tfocusView = this.activity.getmPasswordView();\r\n\t\t\tcancel = true;\r\n\t\t} else if (mPassword.length() < 4) {\r\n\t\t\tthis.activity.getmPasswordView().setError(this.activity.getString(R.string.error_invalid_password));\r\n\t\t\tfocusView = this.activity.getmPasswordView();\r\n\t\t\tcancel = true;\r\n\t\t}\r\n\r\n\t\t// Check for a valid email address.\r\n\t\tif (TextUtils.isEmpty(mEmail)) {\r\n\t\t\tthis.activity.getmEmailView().setError(this.activity.getString(R.string.error_field_required));\r\n\t\t\tfocusView = this.activity.getmEmailView();\r\n\t\t\tcancel = true;\r\n\t\t} else if (!mEmail.contains(\"@\")) {\r\n\t\t\tthis.activity.getmEmailView().setError(this.activity.getString(R.string.error_invalid_email));\r\n\t\t\tfocusView = this.activity.getmEmailView();\r\n\t\t\tcancel = true;\r\n\t\t}\r\n\r\n\t\tif (cancel) {\r\n\t\t\t// There was an error; don't attempt login and focus the first\r\n\t\t\t// form field with an error.\r\n\t\t\tfocusView.requestFocus();\r\n\t\t} else {\r\n\t\t\t// Show a progress spinner, and kick off a background task to\r\n\t\t\t// perform the user login attempt.\r\n\t\t\tthis.activity.getmLoginStatusMessageView().setText(R.string.login_progress_signing_in);\r\n\t\t\tthis.activity.showProgress(true);\r\n\t\t\tmAuthTask = new UserLoginTask();\r\n\t\t\tmAuthTask.execute((Void) null);\r\n\t\t}\r\n\t}",
"private void attemptLogin() {\n\n // Reset errors.\n trylogin = false;\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(\"Invalid Password\");\n focusView = mPasswordView;\n cancel = true;\n }\n\n if(email.equals(null) || password.equals(null)) {\n mPasswordView.setError(\"Invalid Password\");\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(\"Please enter something\");\n focusView = mEmailView;\n cancel = true;\n }\n\n else if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(\"Please enter something\");\n focusView = mPasswordView;\n cancel = true;\n }\n\n else if (!isEmailValid(email)) {\n mEmailView.setError(\"Invalid Email\");\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n\n dialog.setMessage(\"Registering user...\");\n dialog.show();\n\n firebaseAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(MainActivity.this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n dialog.hide();\n if(task.isSuccessful()) {\n //trylogin = true;\n Toast.makeText(MainActivity.this, \"Login Successful!\", Toast.LENGTH_SHORT).show();\n Intent i = new Intent(MainActivity.this, FoodActivity.class);\n startActivity(i);\n }\n else {\n Toast.makeText(MainActivity.this, \"Login Failed!\", Toast.LENGTH_SHORT).show();\n\n }\n }\n });\n }\n }",
"boolean authenticate(final Connection connection) {\n\t\tif(connection==null) throw new IllegalArgumentException(\"Passed connection was null\");\n\t\tif(connection.isAuthenticationComplete()) return true;\n\t\tif(authMethods==null || authMethods.length==0) return false;\n\t\tif(verifier==null) verifier = new AuthorizedKeysHostKeyVerifier();\n\t\tcheckPrivateKey();\n\t\tfinal String amKey = connection.getHostname() + \":\" + connection.getPort();\n\t\tAuthMethod method = successfulAuthMethods.get(amKey);\n\t\tif(method != null) {\n\t\t\ttry {\n\t\t\t\tif(!connection.isConnected()) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconnection.connect(verifier, connectTimeout, kexTimeout);\n\t\t\t\t\t} catch (Exception ex) {\t\t\t\t\n\t\t\t\t\t\tthrow new RuntimeException(\"Failed to connect [\" + amKey + \"]\", ex);\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\tmethod.authenticate(connection, this);\n\t\t\t\tif(connection.isAuthenticationComplete()) {\n//\t\t\t\t\tSystem.err.println(\"Completed authentication to [\" + amKey + \"] with method [\" + method.name() + \"]\");\n\t\t\t\t\tsuccessfulAuthMethods.put(amKey, method);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} catch (Exception ex) {\n\t\t\t\t/* No Op */\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tfor(AuthMethod am: authMethods) {\n\t\t\ttry {\n\t\t\t\tif(!connection.isConnected()) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconnection.connect(verifier, connectTimeout, kexTimeout);\n\t\t\t\t\t} catch (Exception ex) {\t\t\t\t\n\t\t\t\t\t\tthrow new RuntimeException(\"Failed to connect [\" + amKey + \"]\", ex);\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\tam.authenticate(connection, this);\n\t\t\t\tif(connection.isAuthenticationComplete()) {\n\t\t\t\t\tsuccessfulAuthMethods.put(amKey, am);\n//\t\t\t\t\tSystem.err.println(\"Completed authentication to [\" + amKey + \"] with method [\" + am.name() + \"]\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} catch (Exception ex) {\n//\t\t\t\tSystem.err.println(\"Failed to authenticate [\" + amKey + \"] with method [\" + am.name() + \"]:\" + ex);\n//\t\t\t\tex.printStackTrace(System.err);\n\t\t\t\t/* No Op */\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mNameView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String name = mNameView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid user name.\n if (TextUtils.isEmpty(name)) {\n mNameView.setError(getString(R.string.error_field_required));\n focusView = mNameView;\n cancel = true;\n } else if (!isNameValid(name)) {\n mNameView.setError(getString(R.string.error_invalid_name));\n focusView = mNameView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(name, password);\n mAuthTask.execute(mUrl);\n }\n }",
"private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n // Reset errors.\r\n mEmailView.setError(null);\r\n mPasswordView.setError(null);\r\n\r\n // Store values at the time of the login attempt.\r\n String email = mEmailView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n //检测密码\r\n if (TextUtils.isEmpty(password)) {\r\n mPasswordView.setError(\"请输入密码\");\r\n focusView = mPasswordView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid password, if the user entered one.\r\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\r\n mPasswordView.setError(getString(R.string.error_invalid_password));\r\n focusView = mPasswordView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid email address.\r\n if (TextUtils.isEmpty(email)) {\r\n mEmailView.setError(getString(R.string.error_field_required));\r\n focusView = mEmailView;\r\n cancel = true;\r\n } else if (!isEmailValid(email)) {\r\n mEmailView.setError(getString(R.string.error_invalid_email));\r\n focusView = mEmailView;\r\n cancel = true;\r\n }\r\n\r\n SqlEngine sqlEngine = SqlEngine.getInstance(this);\r\n ArrayList<UserBean> list = sqlEngine.queryInfo();\r\n if (list.size() <= 0) {\r\n Toast.makeText(this, \"没有这个账户\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n for (int i = 0; i < list.size(); i++) {\r\n UserBean bean = list.get(i);\r\n Log.i(TAG, \"attemptLogin: 执行到此\");\r\n if (!bean.getUser().equals(email)) {\r\n Toast.makeText(this, \"没有这个账户\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n if (!bean.getPwd().equals(password)) {\r\n Toast.makeText(this, \"密码不正确\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n }\r\n\r\n String ip = (String) SpUtils.getValues(MyApplication.getContext(), Https.IP_ADDRESS, \"\");\r\n String port = (String) SpUtils.getValues(MyApplication.getContext(), Https.PORT, \"\");\r\n if (TextUtils.isEmpty(ip) || TextUtils.isEmpty(port)) {\r\n Toast.makeText(this, \"请先设置网络!\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n\r\n if (cancel) {\r\n // There was an error; don't attempt login and focus the first\r\n // form field with an error.\r\n focusView.requestFocus();\r\n } else {\r\n // 显示一个进度微调,并启动一个后台任务\r\n // 执行用户登录尝试。\r\n showProgress(true);\r\n //判断是否勾选\r\n isCheckBox(email, password);\r\n mAuthTask = new UserLoginTask(email, password);\r\n mAuthTask.execute((Void) null);\r\n startActivity(new Intent(this, MainActivity.class));\r\n\r\n }\r\n }",
"public void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_user));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n\n // save data in local shared preferences\n if (savePassword.isChecked()) {\n saveLoginDetails(email, password);\n }\n\n\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(email, password);\n mAuthTask.execute((Void) null);\n }\n }",
"protected synchronized void login() {\n\t\tauthenticate();\n\t}",
"private boolean mConnect2Device1(BluetoothDevice oDevice1){\n mStateSet(kBT_Connecting); //Connecting to a server\n if (mIsAndroidDevice(oDevice1)) {\n if (mConnect2Device_Sub(UUID_ANDROID_INSECURE, oDevice1)) {\n mStateSet(kBT_Connected1);\n mMsgLog(\"ANDROID Connected: \" +oDevice1.getName());\n oDevice=oDevice1;\n return true;\n }\n } else if (mIsClassic(oDevice1)) { // Classic bluetoot device\n if ( mConnect2Device_Sub(UUID_LMDEVICE_INSECURE, oDevice1)) {\n mStateSet(kBT_Connected1);\n mMsgLog(9,\"Classic bluetooth Connected: \" +oDevice1.getName() );\n oDevice=oDevice1;\n return true;\n }\n }\n mMsgDebug(\"Could not connect\");\n // mBTClose1();\n return false;\n}",
"public void authenticate() throws Exception {\n try {\n\n // Build the form body\n final FormBody.Builder formBodyBuilder = new FormBody.Builder().add(\"scope\", \"api-tenant\");\n\n // Has username/password\n if (appProps.getFodGrantType().equals(VulnerabilityReportConstants.GRANT_TYPE_PASSWORD)) {\n formBodyBuilder.add(\"grant_type\", VulnerabilityReportConstants.GRANT_TYPE_PASSWORD)\n .add(\"username\", appProps.getFodTenantId() + \"\\\\\" + appProps.getFodUsername())\n .add(\"password\", appProps.getFodPassword());\n } else // Has api key/secret\n {\n formBodyBuilder.add(\"grant_type\", VulnerabilityReportConstants.GRANT_TYPE_CLIENT_CREDENTIALS)\n .add(\"client_id\", appProps.getFodClientId())\n .add(\"client_secret\", appProps.getFodClientSecret());\n\n }\n final RequestBody formBody = formBodyBuilder.build();\n\n final Request request = new Request.Builder()\n .url(appProps.getFodAPIBaseURL() + \"/oauth/token\")\n .post(formBody)\n .build();\n final Response response = client.newCall(request).execute();\n \n if (!response.isSuccessful()) {\n \tlogger.debug(\"response::\" + response.message() + \", \" + response.code() + \", \" + response.toString());\n throw new FoDConnectionException(\"Unexpected code \" + response);\n }\n\n logger.info(\"Successful connection to Fortify On Demand!\");\n \n final String content = IOUtils.toString(response.body().byteStream(), \"utf-8\");\n response.body().close();\n\n // Parse the Response\n final JsonParser parser = new JsonParser();\n final JsonObject obj = parser.parse(content).getAsJsonObject();\n this.token = obj.get(\"access_token\").getAsString();\n\n } catch (final FoDConnectionException fce) {\n if (fce.getMessage().contains(VulnerabilityReportConstants.FOD_UNAUTORIZED)) {\n logger.error(\"FoD CONNECTION FAILED. Please check the FoD URL, username, tenant, and password and try again.\");\n logger.info(\"FoD URL=\" + appProps.getFodAPIBaseURL());\n logger.info(\"FoD GrantType=\" + appProps.getFodGrantType());\n logger.info(\"FoD client Id=\" + appProps.getFodClientId());\n logger.info(\"FoD username=\" + appProps.getFodUsername());\n logger.info(\"FoD tennant=\" + appProps.getFodTenantId());\n } else {\n logger.error(\"FoD Response was not successful with message: \" + fce.getMessage());\n }\n throw fce;\n }\n\n catch (final UnknownHostException uhe) {\n logger.error(\"Unknown Host Error. Are you connected to the internet?\");\n uhe.printStackTrace();\n throw uhe;\n }\n\n catch (final Exception e) {\n logger.error(\"Authentication to FoD failed. Connection seems OK.\");\n e.printStackTrace();\n throw e;\n }\n }",
"public void testLoginPIN() {\r\n try {\r\n tokenHandler.loginPIN(pinCode);\r\n tokenHandler.logoutPIN();\r\n } catch (Exception e) {\r\n fail(e.toString());\r\n }\r\n }",
"public Reply login(String hostname) throws ThingsException, InterruptedException;",
"private void attemptUsernamePasswordLogin()\n {\n if (mAuthTask != null)\n {\n return;\n }\n\n if(mLogInButton.getText().equals(getResources().getString(R.string.logout)))\n {\n mAuthTask = new RestCallerPostLoginTask(this,mStoredToken,MagazzinoService.getAuthenticationHeader(this),true);\n mAuthTask.execute(MagazzinoService.getLogoutService(this));\n return;\n }\n // Reset errors.\n mUsernameView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mUsernameView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password))\n {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email))\n {\n mUsernameView.setError(getString(R.string.error_field_required));\n focusView = mUsernameView;\n cancel = true;\n }\n else if (!isUsernameOrEmailValid(email))\n {\n mUsernameView.setError(getString(R.string.error_invalid_email));\n focusView = mUsernameView;\n cancel = true;\n }\n\n if (cancel)\n {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n return;\n }\n\n mAuthTask = new RestCallerPostLoginTask(this,email, password);\n mAuthTask.execute(MagazzinoService.getLoginService(this));\n\n }",
"public boolean USSDAuthentication() {\n return true;\n }",
"@Test\n public void AuthenticationShouldFailWithValidIPUser() throws Exception {\n kidozen = new KZApplication(AppSettings.KZ_TENANT, AppSettings.KZ_APP, AppSettings.KZ_KEY, false);\n final CountDownLatch alcd = new CountDownLatch(1);\n kidozen.Authenticate(AppSettings.KZ_USER, AppSettings.KZ_PASS, \"ups!\", new ServiceEventListener() {\n @Override\n public void onFinish(ServiceEvent e) {\n alcd.countDown();\n assertThat(e.StatusCode, equalTo(HttpStatus.SC_UNAUTHORIZED));\n assertTrue(e.Body.toLowerCase().contains(\"unauthorized\".toLowerCase()));\n }\n });\n assertEquals(false, kidozen.UserIsAuthenticated);\n alcd.await(TEST_TIMEOUT_IN_MINUTES, TimeUnit.MINUTES);\n }",
"private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n\r\n // Store values at the time of the login attempt.\r\n String email = mEmailView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n // Check for a valid password, if the user entered one.\r\n\r\n // Check for a valid email address.\r\n if (TextUtils.isEmpty(email)) {\r\n mEmailView.setError(getString(R.string.error_field_required));\r\n focusView = mEmailView;\r\n cancel = true;\r\n } else if (!isEmailValid(email)) {\r\n mEmailView.setError(getString(R.string.error_invalid_email));\r\n focusView = mEmailView;\r\n cancel = true;\r\n }\r\n mAuthTask = new UserLoginTask(email, password);\r\n try {\r\n Boolean logStatus = mAuthTask.execute(\"http://shubhamgoswami.me/login\").get();\r\n if(logStatus){\r\n SQLiteDatabase db = openOrCreateDatabase(\"adharShila\",MODE_PRIVATE, null);\r\n db.execSQL(\"UPDATE LOGSTATUS SET USERNAME=\\\"\"+mEmailView.getText()+\"\\\", STATUS=1 WHERE ENTRY=1\");\r\n db.close();\r\n Intent i = new Intent(getApplicationContext(), MainActivity.class);\r\n i.putExtra(\"username\", mEmailView.getText());\r\n i.putExtra(\"password\", password);\r\n startActivity(i);\r\n }\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n } catch (ExecutionException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"private void handleFaceAuthenticated(int i, boolean z) {\n Trace.beginSection(\"KeyGuardUpdateMonitor#handlerFaceAuthenticated\");\n try {\n if (this.mGoingToSleep) {\n Log.d(\"KeyguardUpdateMonitor\", \"Aborted successful auth because device is going to sleep.\");\n return;\n }\n try {\n int i2 = ActivityManager.getService().getCurrentUser().id;\n if (i2 != i) {\n Log.d(\"KeyguardUpdateMonitor\", \"Face authenticated for wrong user: \" + i);\n setFaceRunningState(0);\n } else if (isFaceDisabled(i2)) {\n Log.d(\"KeyguardUpdateMonitor\", \"Face authentication disabled by DPM for userId: \" + i2);\n setFaceRunningState(0);\n } else {\n if (DEBUG_FACE) {\n Log.d(\"KeyguardUpdateMonitor\", \"Face auth succeeded for user \" + i2);\n }\n onFaceAuthenticated(i2, z);\n setFaceRunningState(0);\n Trace.endSection();\n }\n } catch (RemoteException e) {\n Log.e(\"KeyguardUpdateMonitor\", \"Failed to get current user id: \", e);\n setFaceRunningState(0);\n }\n } finally {\n setFaceRunningState(0);\n }\n }",
"private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !validateUtil.isPasswordValid(password)) {\n mPasswordView.setError(getString(net.iquesoft.android.seedprojectchat.R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(net.iquesoft.android.seedprojectchat.R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!validateUtil.isEmailValid(email)) {\n mEmailView.setError(getString(net.iquesoft.android.seedprojectchat.R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n presenter.onLoginButtonClicked(mEmailView.getText().toString(), mPasswordView.getText().toString(), rememberPassword.isChecked(), (LoginActivity) getActivity(), updateCurentUser);\n }\n }",
"public void attemptLogin() {\n\t\tif (mAuthTask != null) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Reset errors.\n\t\tmEmailView.setError(null);\n\t\tmPasswordView.setError(null);\n\n\t\t// Store values at the time of the login attempt.\n\t\tmEmail = mEmailView.getText().toString();\n\t\tmPassword = mPasswordView.getText().toString();\n\n\t\tboolean cancel = false;\n\t\tView focusView = null;\n\n\t\t/*\n\t\t * // Check for a valid password. if (TextUtils.isEmpty(mPassword)) {\n\t\t * mPasswordView.setError(getString(R.string.error_field_required));\n\t\t * focusView = mPasswordView; cancel = true; } else if\n\t\t * (mPassword.length() < 4) {\n\t\t * mPasswordView.setError(getString(R.string.error_invalid_password));\n\t\t * focusView = mPasswordView; cancel = true; }\n\t\t * \n\t\t * // Check for a valid email address. if (TextUtils.isEmpty(mEmail)) {\n\t\t * mEmailView.setError(getString(R.string.error_field_required));\n\t\t * focusView = mEmailView; cancel = true; } else if\n\t\t * (!mEmail.contains(\"@\")) {\n\t\t * mEmailView.setError(getString(R.string.error_invalid_email));\n\t\t * focusView = mEmailView; cancel = true; }\n\t\t */\n\t\tif (cancel) {\n\t\t\t// There was an error; don't attempt login and focus the first\n\t\t\t// form field with an error.\n\t\t\tfocusView.requestFocus();\n\t\t} else {\n\t\t\t// Show a progress spinner, and kick off a background task to\n\t\t\t// perform the user login attempt.\n\t\t\tshowProgress(true);\n\t\t\tmAuthTask = new UserLoginTask();\n\t\t\tmAuthTask.execute((Void) null);\n\t\t}\n\t}",
"public void attemptLogin() {\n\n\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n mEmail = mEmailView.getText().toString();\n mPassword = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password.\n if (TextUtils.isEmpty(mPassword)) {\n mPasswordView.setError(getString(R.string.error_field_required));\n focusView = mPasswordView;\n cancel = true;\n } else if (mPassword.length() < 4) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(mEmail)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!mEmail.contains(\"@\")) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n mLoginStatusMessageView.setText(R.string.login_progress_signing_in);\n showProgress(true);\n mAuthTask = new UserLoginTask();\n mAuthTask.execute((Void) null);\n }\n }",
"private void respAuth() throws Exception {\n DataOutputStream dos = new DataOutputStream(os);\n dos.writeInt(1);\n dos.writeByte(Message.MSG_RESP_AUTH);\n if (haslogin) {\n dos.writeByte(Message.SUCCESS_AUTH);\n } else {\n dos.writeByte(Message.FAILED_AUTH);\n }\n }",
"protected boolean authClientsWithDNS() throws Throwable {\n // verify irules\n // change authclients to all\n // reboot all and wait\n return (changeAuthorizedClients(hostname) &&\n rebootAndWait(\"all\") &&\n verifyIrules(getIP(hostname)) &&\n pingFromMaster(hostname) &&\n changeAuthorizedClients(\"all\") &&\n rebootAndWait(\"all\"));\n }",
"private void resolveSignInError() {\n if(mConnectionResult != null)\n if (mConnectionResult.hasResolution()) {\n try {\n mConnectionResult.startResolutionForResult(this, RC_SIGN_IN);\n } catch (IntentSender.SendIntentException e) {\n mGoogleApiClient.connect();\n }\n }\n }",
"public void authenticate() {\n JSONObject jsonRequest = new JSONObject();\n try {\n jsonRequest.put(\"action\", \"authenticate\");\n jsonRequest.put(\"label\", \"label\");\n JSONObject dataObject = new JSONObject();\n dataObject.put(\"device_token\", CMAppGlobals.TOKEN);\n jsonRequest.put(\"data\", dataObject);\n\n if(CMAppGlobals.DEBUG) Logger.i(TAG, \":: AuthWsManager.authenticate : jsonRequest : \" + jsonRequest);\n\n // send JSON data\n WSManager.getInstance().con(mContext).sendJSONData(jsonRequest);\n\n\n } catch (JSONException e) {\n\n mContext.onWsFailure(e);\n }\n\n }",
"public com.sun.jna.PointerType login(Credentials c) throws RelationException;",
"public boolean auth(boolean reauth) throws IOException {\r\n log.debug(\"auth Authentication method starts\");\r\n if(alreadyAuthorized && !reauth) {\r\n \tlog.debug(\"auth Already Authorized.\");\r\n \treturn true;\r\n }\r\n\r\n AuthCmdPayload sendPayload = new AuthCmdPayload();\r\n log.debug(\"auth Sending CmdPacket with AuthCmdPayload: cmd=\" + Integer.toHexString(sendPayload.getCommand())\r\n + \" len=\" + sendPayload.getPayload().getData().length);\r\n\r\n log.debug(\"auth AuthPayload initial bytes to send: {}\", DatatypeConverter.printHexBinary(sendPayload.getPayload().getData()));\r\n\r\n DatagramPacket recvPack = sendCmdPkt(10000, 2048, sendPayload);\r\n\r\n byte[] data = recvPack.getData();\r\n \r\n if(data.length <= 0) {\r\n log.error(\"auth Received 0 bytes on initial request.\");\r\n alreadyAuthorized = false;\r\n return false;\r\n }\r\n\r\n log.debug(\"auth recv encrypted data bytes (\" + data.length +\") after initial req: {}\", DatatypeConverter.printHexBinary(data));\r\n\r\n byte[] payload = null;\r\n try {\r\n log.debug(\"auth Decrypting encrypted data\");\r\n\r\n payload = decryptFromDeviceMessage(data);\r\n\r\n log.debug(\"auth Decrypted. len=\" + payload.length);\r\n\r\n } catch (Exception e) {\r\n log.error(\"auth Received datagram decryption error. Aborting method\", e);\r\n alreadyAuthorized = false;\r\n return false;\r\n }\r\n\r\n log.debug(\"auth Packet received payload bytes: \" + DatatypeConverter.printHexBinary(payload));\r\n\r\n key = subbytes(payload, 0x04, 0x14);\r\n\r\n log.debug(\"auth Packet received key bytes: \" + DatatypeConverter.printHexBinary(key));\r\n\r\n if (key.length % 16 != 0) {\r\n log.error(\"auth Received key len is not a multiple of 16! Aborting\");\r\n alreadyAuthorized = false;\r\n return false;\r\n }\r\n\r\n // recreate AES object with new key\r\n aes = new AES(iv, key);\r\n\r\n id = subbytes(payload, 0x00, 0x04);\r\n\r\n log.debug(\"auth Packet received id bytes: \" + DatatypeConverter.printHexBinary(id) + \" with ID len=\" + id.length);\r\n\r\n log.debug(\"auth End of authentication method\");\r\n alreadyAuthorized = true;\r\n\r\n return true;\r\n }",
"public void attemptLogin() {\r\n\t\tif (mAuthTask != null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// Reset errors.\r\n\t\tmUserView.setError(null);\r\n\t\tmPasswordView.setError(null);\r\n\t\t// Store values at the time of the login attempt.\r\n\t\tmUser = mUserView.getText().toString();\r\n\t\tmPassword = mPasswordView.getText().toString();\r\n\t\tboolean cancel = false;\r\n\t\tView focusView = null;\r\n\t\t// Check for a valid password.\r\n\t\tif (TextUtils.isEmpty(mPassword)) {\r\n\t\t\tmPasswordView.setError(getString(R.string.error_field_required));\r\n\t\t\tfocusView = mPasswordView;\r\n\t\t\tcancel = true;\r\n\t\t} else if (mPassword.length() < 3) {\r\n\t\t\tmPasswordView.setError(getString(R.string.error_invalid_password));\r\n\t\t\tfocusView = mPasswordView;\r\n\t\t\tcancel = true;\r\n\t\t}\r\n\t\t// Check for a valid username address.\r\n\t\tif (TextUtils.isEmpty(mUser)) {\r\n\t\t\tmUserView.setError(getString(R.string.error_field_required));\r\n\t\t\tfocusView = mUserView;\r\n\t\t\tcancel = true;\r\n\t\t}\r\n\t\tif (cancel) {\r\n\t\t\t// There was an error; don't attempt login and focus the first\r\n\t\t\t// form field with an error.\r\n\t\t\tfocusView.requestFocus();\r\n\t\t} else {\r\n\t\t\t// Show a progress spinner, and kick off a background task to\r\n\t\t\t// perform the user login attempt.\r\n\t\t\tmLoginStatusMessageView.setText(R.string.login_progress_signing_in);\r\n\t\t\tmAuthTask = new UserLoginTask(this);\r\n\t\t\tmAuthTask.execute((Void) null);\r\n\t\t}\r\n\t}",
"@Override\n protected CommonResponse doWrongAuthentication(MultifactorStartRegistrationResponseData startRegistrationData, MultifactorStartAuthenticationResponseData startAuthenticationData) throws Exception {\n return finishAuthentication(BACKUP_STRING_PROVIDER,\n startRegistrationData.getDeviceId(),\n WRONG_CODE,\n null,\n null,\n null);\n }",
"private void authenticateUserForSharing() {\n mWeHaveJustAuthenticated = true;\n mSessionData.setCurrentlyAuthenticatingProvider(mSelectedProvider);\n \n /* If the selected provider requires input from the user, go to the user landing view. Or if\n the user started on the user landing page, went back to the list of providers, then selected\n the same provider as their last-used provider, go back to the user landing view. */\n if (mSelectedProvider.requiresInput()) {\n JRUserInterfaceMaestro.getInstance().showUserLanding();\n } else { /* Otherwise, go straight to the web view. */\n JRUserInterfaceMaestro.getInstance().showWebView();\n }\n }",
"private boolean checkLogin() {\n firebaseAuth = FirebaseAuth.getInstance();\n currentUser = firebaseAuth.getCurrentUser();\n if(currentUser == null) {\n //show login activity\n Intent intent = new Intent(this, LoginActivity.class);\n startActivity(intent);\n return false;\n } else {\n verifyUserPII(currentUser);\n return true;\n }\n }"
]
| [
"0.68711853",
"0.6837214",
"0.6746004",
"0.665514",
"0.63580257",
"0.6240975",
"0.6121713",
"0.6116787",
"0.5998402",
"0.598431",
"0.59548557",
"0.5939055",
"0.58380884",
"0.5812435",
"0.58032334",
"0.5774737",
"0.5644758",
"0.562718",
"0.5571417",
"0.5565953",
"0.554992",
"0.55344594",
"0.5526466",
"0.55129033",
"0.5511182",
"0.54988796",
"0.54824466",
"0.54811555",
"0.54784924",
"0.5476418",
"0.5471232",
"0.5453246",
"0.5450581",
"0.54500854",
"0.5409534",
"0.53945935",
"0.5394002",
"0.53923845",
"0.5390276",
"0.53792524",
"0.53753823",
"0.5368912",
"0.5364202",
"0.5357116",
"0.5347541",
"0.5347366",
"0.53445154",
"0.53260064",
"0.53235",
"0.5321512",
"0.531825",
"0.531459",
"0.5301556",
"0.5301556",
"0.529926",
"0.52975833",
"0.52911955",
"0.5287152",
"0.5286747",
"0.52820826",
"0.52753544",
"0.5269782",
"0.5264314",
"0.52627695",
"0.52589077",
"0.525879",
"0.52581674",
"0.5229558",
"0.5203072",
"0.5195097",
"0.5190135",
"0.51863503",
"0.51811075",
"0.51674575",
"0.5165253",
"0.51645005",
"0.5153613",
"0.5150437",
"0.51468503",
"0.51453286",
"0.5141008",
"0.5140383",
"0.51326793",
"0.5132677",
"0.5120234",
"0.51169235",
"0.51153433",
"0.5101944",
"0.5077002",
"0.50730544",
"0.50716686",
"0.5067892",
"0.50673366",
"0.5065329",
"0.50653046",
"0.50570357",
"0.5054841",
"0.50403786",
"0.5033152",
"0.5031152"
]
| 0.6793781 | 2 |
Try authenticating a device that does not exist in the database. | @Test
public void authenticateTestFailure() {
assertFalse(device.authenticate());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void authenticateTestFailure2() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, \"other_token\");\n assertFalse(device.authenticate());\n DatabaseTest.cleanDatabase();\n }",
"@Test\n public void authenticateTestSucces() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);\n assertTrue(device.authenticate());\n DatabaseTest.cleanDatabase();\n }",
"public int doesDeviceExist(String device){\n DBSQLiteHelper DBhelper = new DBSQLiteHelper(getApplicationContext());\n SQLiteDatabase db = DBhelper.getReadableDatabase();\n\n String[] select = {\n DBContract.Devices.COLUMN_DEVICE,\n DBContract.Devices.COLUMN_TYPE\n };\n\n String where = DBContract.Devices.COLUMN_DEVICE + \" = ?\";\n\n String[] whereValues = {device};\n\n Cursor cursor = db.query(\n DBContract.Devices.TABLE_NAME, // The table to query\n select, // The columns to return\n where, // The columns for the WHERE clause\n whereValues, // The values for the WHERE clause\n null, // don't group the rows\n null, // don't filter by row groups\n null // don't sort\n );\n\n cursor.moveToFirst();\n if(cursor.getCount() == 0){ //No such device exists\n return -1;\n }\n else if(cursor.getInt(1) == 0){ //Device registered to a runner (GOOD)\n return 0;\n }\n else //Device registered to a contact (BAD)\n return 1;\n }",
"public void tryLogin() {\n\t\tcontroller.setupClient(txtNickname.getText());\n\t\tString cardDesign = comboBoxCardDesign.getSelectionModel()\n\t\t\t\t.getSelectedItem();\n\t\tConfiguration.chooseCardDesign(cardDesign);\n\t\tConfiguration.chooseMeepleDesign(cardDesign);\n\t}",
"private void authenticateSimulatedDevice() {\n mSimulatedDevice.writeln(TestsConfig.deviceWelcome.toString());\n TestsConfig.delay(300);\n \n // check if everything is ok, and get the device instance\n mDeviceInstance = mMainServer.getDevice(\n TestsConfig.deviceWelcome.getString(\"identifier\"));\n assertNotNull(mDeviceInstance);\n }",
"private void verifyUser(){\n getValues();\n boolean validate;\n\n validate = db.authenticateUser(username, password);\n\n if (validate) {\n\n Cursor cursor = db.fetchData(username,password);\n cursor.moveToFirst();\n\n String contact = cursor.getString(3);\n\n session.createLoginSession(username, password, contact);\n\n Toast.makeText(this, \"[SYSTEM]: Login Successful! \", Toast.LENGTH_SHORT).show();\n\n Intent i = new Intent(this, MainActivity.class);\n startActivity(i);\n finish();\n } else {\n Toast.makeText(this, \"FAIL!\", Toast.LENGTH_SHORT).show();\n }\n }",
"private void deviceDetected(String btMac) {\r\n\t\t// We only allow one doctor to be logged in at the same place\r\n\t\tif (doctor == null) {\r\n\t\t\t// Check db to see if it is a doctor if so log in\r\n\t\t\tDoctor d = dbAdapter.getDoctor(btMac);\r\n\t\t\tif (d != null) {\r\n\t\t\t\t// Successful login\r\n\t\t\t\tthis.doctor = d;\r\n\t\t\t\tthis.doctor.setOnline(1);\r\n\t\t\t\tdoLogin();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void checkConnection() {\n\n //Call method which checks for connection.\n boolean isNetworkConnected = isNetworkConnected();\n\n //If there is a data connection currently available for use, attempt to authenticate login details with Firebase,\n // allow user to login offline but without a profile and access only to local storage.\n if(isNetworkConnected) {\n\n //If there is an active data connection, set authenticated value to true\n authenticated = true;\n }\n\n else {\n\n //If there is an active data connection, set authenticated value to false\n authenticated = false;\n }\n }",
"public void failedLogin(){\n\t\tstate = ATM_State.LOGINID;\n\t\tgui.setDisplay(\"ID does not exist. \\n\"\n\t\t\t\t+ \"Enter your account ID: \\n\");\n\t}",
"@Test\n public void testRegisterBackupDeviceNotPossibleIfNoPrimaryDevicePresent() throws Exception {\n clearAllMultifactorDevices();\n\n //This should fail, because no primary device is present for the user\n thrown.expect(AssertionError.class);\n thrown.expectMessage(containsString(\"Primary authentication devices must be set up before backup devices\"));\n doStartRegistration();\n }",
"public boolean checkLoginCredential(GuruModel model) {\n\t\tquery = \"select id from guru where email=? and pwd=?\";\n\t\tList<GuruModel> list = this.jdbcTemplate.query(query,new Object[]{model.getEmail(),this.edutility.getSHA256(model.getPwd())},\n\t\t\t\tBeanPropertyRowMapper.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}",
"@Test\n\tpublic void loginWithInvalidCredentials(){\n\t\tapp.loginScreen().waitUntilLoaded();\n\t\tapp.loginScreen().logIn(Credentials.USER_INVALID.username, Credentials.USER_INVALID.password);\n\t\tassertTrue(app.loginScreen().isActive());\n\t}",
"private void verifyAuthWithServer() {\n mRegisterModel.connect(binding.personFirstName.getText().toString(),\n binding.personLastName.getText().toString(),\n binding.registerEmail.getText().toString(),\n binding.registerPassword.getText().toString());\n //this is an Asynchronous call no statements after should rely on the result of connect\n }",
"private void tryLogin() {\n AsyncTask<String, Void, Boolean> task = new AsyncTask<String, Void, Boolean>(){\n @Override\n protected Boolean doInBackground(String... ci_session) {\n boolean isValid = PwcatsRequester.isValidCiSession(ci_session[0]);\n return isValid;\n }\n @Override\n protected void onPostExecute(Boolean isValid) {\n isLogined = isValid;\n showOrHideLogInOut(isLogined);\n if (!isValid)\n authLogout();\n TextView mNavAuthLogin = (TextView) findViewById(R.id.nav_auth_login);\n TextView mNavAuthLogout = (TextView) findViewById(R.id.nav_auth_logout);\n }\n };\n String ci_session = prefs.getString(getString(R.string.ci_session), null);\n task.execute(ci_session);\n }",
"private void attemptConnect() {\r\n if (mConnectTask != null) {\r\n return;\r\n }\r\n\r\n // Reset errors.\r\n mNameView.setError(null);\r\n mKeyView.setError(null);\r\n\r\n // Store values at the time of the login attempt.\r\n String name = mNameView.getText().toString();\r\n String key = mKeyView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n // Check for a valid name, if the user entered one.\r\n if (TextUtils.isEmpty(name)) {\r\n mNameView.setError(getString(R.string.error_invalid_password));\r\n focusView = mNameView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid email address.\r\n if (TextUtils.isEmpty(key)) {\r\n mKeyView.setError(getString(R.string.error_field_required));\r\n focusView = mKeyView;\r\n cancel = true;\r\n }\r\n\r\n if (cancel) {\r\n // There was an error; don't attempt login and focus the first\r\n // form field with an error.\r\n focusView.requestFocus();\r\n } else {\r\n // Show a progress spinner, and kick off a background task to\r\n // perform the user login attempt.\r\n mConnectTask = new ConnectTask(this, name, key);\r\n mConnectTask.execute((Void) null);\r\n }\r\n }",
"private boolean autoAuthenticateDevice(String nonce) {\r\n\t\tString devCode = \"\";\r\n\t\tString authCode = \"\";\r\n\t\tString cr = \"\";\r\n\t\tMessage autoAuthenticate = new Message().addData(\"task\", \"transaction\").addData(\"message\",\r\n\t\t\t\t\"authenticate_device\");\r\n\t\tMessage reply;\r\n\r\n\t\ttry {\r\n\t\t\t// checks if file is existant and reads the device code\r\n\t\t\tFile device = new File(\"resources/device_\" + this.connectionData.getUsername());\r\n\t\t\tif (!device.exists()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(device));\r\n\t\t\tdevCode = br.readLine();\r\n\t\t\tbr.close();\r\n\t\t\t// generated authcode\r\n\t\t\tauthCode = devCode.split(\";\")[1];\r\n\t\t\tdevCode = devCode.split(\";\")[0];\r\n\r\n\t\t\tdevCode = this.connectionData.getAes().encode(devCode);\r\n\r\n\t\t\t// generate chalange-response\r\n\r\n\t\t\tcr = new Hash(authCode + nonce).toString();\r\n\t\t\tautoAuthenticate.addData(\"device\", devCode);\r\n\t\t\tautoAuthenticate.addData(\"cr\", cr);\r\n\t\t\tthis.connectionData.getConnection().write(autoAuthenticate);\r\n\t\t\treply = this.connectionData.getConnection().read();\r\n\t\t\tif (reply.getData(\"message\").equals(\"failed\")) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}",
"@Override\n\tprotected void sync() {\n\n\t\tString key = null;\n\t\ttry {\n\t\t\tkey = DeviceKeyUtils.getDeviceKey(mContext);\n\t\t} catch (RuntimeException e) {\n\t\t\tUtil.logException(e);\n\t\t\tdoneSyncing();\n\t\t}\n\n\t\t/*\n\t\t * We don't really care about the response... we're not going to retry\n\t\t * if the login fails, since it's really only for tracking usage data.\n\t\t */\n\t\tResponse response = mApiService.login(key);\n\n\t\tdoneSyncing();\n\t}",
"@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}",
"public boolean tryConnection(String userName, String password){\n //ID cant be set BY the program, it has to be pull out from database\n //Compare the userName and the password in the database then return the ID\n //SQLite Query, need to change the name of variable for the proper field\n String getUserQuery = \"SELECT userID FROM UserAccount WHERE userName=\\\"\" + userName +\n \"\\\" and userPassword=\\\"\" + password + \"\\\"\";\n\n //Try / catch because when connection to database there is possible problem\n try {\n //This has to be changed for database handler\n boolean resultExist = true;//Get the result of database\n int result = 0;\n\n if(resultExist)//Look if there is 1 result, if so put the ID of the user in ID\n {\n this.ID = result;\n this.userName = userName;\n this.password = password;\n return(true);//Connection successful\n }\n }\n //If something went wrong with the database(lost connection or other thing)\n catch(Exception ex)\n {\n return(false);\n }\n return(false);//Connection unsuccessful\n }",
"private void attemptLogin() {\n\n String username = mEmailView.getText().toString().trim();\n String idNumber = mIdNumber.getText().toString().trim();\n String password = mPasswordView.getText().toString().trim();\n\n if (TextUtils.isEmpty(username)) {\n// usernameView.setError(errorMessageUsernameRequired);\n// errorView = usernameView;\n }\n\n if (TextUtils.isEmpty(password)) {\n// password.setError(errorMessagePasswordRequired);\n// if (errorView == null) {\n// errorView = passwordView;\n// }\n }\n\n final User user = new User();\n ((DealerManager)getApplication()).setUser(user);\n navigateTo(R.id.nav_home);\n }",
"@Override\n\tpublic void onDeviceLoginFailed(FunDevice funDevice, Integer errCode) {\n\n\t}",
"public String loginVendor(Connection connection, String vendor_id){\n String query=\"select vendor_name, password from vendor where vendor_id = \"+\"\\'\"+vendor_id+\"\\'\\n\";\n String vendor_name;\n String password;\n\n try {\n /**\n * Execute the query and return the result set\n */\n Statement stmt = connection.createStatement();\n ResultSet result = stmt.executeQuery(query);\n result.next();\n\n vendor_name=result.getString(\"vendor_name\");\n password=result.getString(\"password\");\n\n\n Scanner pw= new Scanner(System.in);\n System.out.println(\"Please Enter your Password: \");\n String password_input =pw.nextLine();\n\n // if incorrect password\n while(!password_input.equals(password)){\n System.out.println(INCORRECT_PW);\n System.out.print(\"Please Enter your Password: \");\n password_input = pw.nextLine();\n }\n return \"Welcome! \" +vendor_name;\n\n } catch (SQLException e) {\n return Vendor_DOESNT_EXIST;\n }\n\n }",
"private static void attemptToLogin() {\n\t\tString id = null;\n\t\tString password = null;\n\t\tString role = null;\n\t\tint chances = 3;\n\t\t//User will get 3 chances to login into the system.\n\t\twhile(chances-->0){\n\t\t\tlog.info(\"Email Id:\");\n\t\t\tid = sc.next();\n\t\t\tlog.info(\"Password:\");\n\t\t\tpassword = sc.next();\n\t\t\trole = LogInAuthentication.authenticate(id, password);\n\t\t\t//If correct credentials are entered then role of user will be fetch from the database. \n\t\t\tif(role == null) {\n\t\t\t\t//If role is not fetched, error and left chances will be shown.\n\t\t\t\tlog.error(\"Invalid EmailId or password\");\n\t\t\t\tlog.info(\"Chances left: \"+chances);\n\t\t\t}\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\t//After verifying credentials User will be on-board to its portal depending upon the role.\n\t\tonboard(id,role);\n\t}",
"private void attemptLogin() {\n /*if (userLoginTask != null) {\n Snackbar.make(idNumberET, \"Please wait...\", Snackbar.LENGTH_LONG).show();\n return;\n }*/\n\n // Reset errors.\n phoneNumberET.setError(null);\n idNumberET.setError(null);\n\n // Store values at the time of the login attempt.\n String phoneNumber = phoneNumberET.getText().toString();\n String idNumber = idNumberET.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n String simCardSN = null;\n if(Permissions.check(this, Manifest.permission.READ_PHONE_STATE)) {\n simCardSN = Device.getSimCardSN(this);\n }\n if(simCardSN == null) {\n cancel = true;\n Snackbar.make(idNumberET, \"You will need a simcard to sign in\", Snackbar.LENGTH_LONG).show();\n }\n\n if(cancel == false) {//first things first, make sure the simcard is accessible first\n if(idNumberET.getVisibility() == View.VISIBLE) {\n if (TextUtils.isEmpty(idNumber)) {\n idNumberET.setError(getString(R.string.error_invalid_phone_number));\n focusView = idNumberET;\n cancel = true;\n } else if(!isIdNumberValid(idNumber)) {\n idNumberET.setError(getString(R.string.error_incorrect_password));\n focusView = idNumberET;\n cancel = true;\n }\n } else {\n idNumber = null;\n }\n\n if (TextUtils.isEmpty(phoneNumber)) {\n phoneNumberET.setError(getString(R.string.error_invalid_phone_number));\n focusView = phoneNumberET;\n cancel = true;\n } else if (!isPhoneNumberValid(phoneNumber)) {\n phoneNumberET.setError(getString(R.string.error_incorrect_password));\n focusView = phoneNumberET;\n cancel = true;\n }\n\n if(cancel == false) {\n showProgress(true);\n Log.d(TAG,phoneNumber+\" \"+idNumber+\" \"+simCardSN);\n sendData(phoneNumber, simCardSN, idNumber);\n } else {\n focusView.requestFocus();\n }\n }\n }",
"@Test\n public void nonExistingUser() {\n boolean result = auth.authenticateUser(\"Spiderman\", \"fido\", 0); \n //Then\n assertThat(result, is(false));\n }",
"public boolean login(){\r\n try{\r\n DbManager0 db = DbManager0.getInstance();\r\n Query q = db.createQuery(\"SELECT * FROM user WHERE username = '\"+this.login+\"' and password = '\"+this.pwd+\"';\");\r\n QueryResult rs = db.execute(q);\r\n rs.next();\r\n if(rs.wasNull()) return false;\r\n this.id = rs.getInt(\"id\")+\"\";\r\n return true;\r\n }\r\n catch(SQLException ex){\r\n throw new RuntimeException( ex.getMessage(), ex );\r\n }\r\n }",
"@Test\n public void should_recognize_if_adversary_obtained_authenticator_from_trusted_device_and_tried_connect_under_a_different_user() throws SignatureException {\n final IUserProvider up = getInstance(IUserProvider.class);\n up.setUsername(UNIT_TEST_USER, getInstance(IUser.class));\n final User currUser = getInstance(IUserProvider.class).getUser();\n\n // first session is from trusted device\n constants.setNow(dateTime(\"2015-04-23 11:00:00\"));\n coSession.newSession(currUser, true, null);\n\n // second session, also from a trusted device, the authenticator from this device got stolen\n constants.setNow(dateTime(\"2015-04-23 13:00:00\"));\n final UserSession newSession = coSession.newSession(currUser, true, null);\n final String authenticator = newSession.getAuthenticator().get().toString();\n\n\n // now let's move the clock 30 minutes forward to emulate a time change\n // adversary tries to reuse a completely valid and not yet expired authenticator to access the system under a different username\n constants.setNow(dateTime(\"2015-04-23 13:30:00\"));\n up.setUsername(\"USER1\", getInstance(IUser.class));\n final User differentUser = getInstance(IUserProvider.class).getUser();\n\n final Optional<UserSession> session = coSession.currentSession(differentUser, authenticator, false);\n assertFalse(session.isPresent());\n\n // additionally, let's also check that all sessions for a compromised user have been removed, but not the sessions for other users\n final EntityResultQueryModel<UserSession> currUserSessions = select(UserSession.class).where().prop(\"user\").eq().val(currUser).model();\n final EntityResultQueryModel<UserSession> otherSessions = select(UserSession.class).where().prop(\"user\").ne().val(currUser).model();\n\n assertEquals(0, coSession.count(currUserSessions));\n assertEquals(2, coSession.count(otherSessions));\n }",
"public void checkDevices() throws TNotFoundEx{\n\t\tString command = \"adb devices -l\";\n\t\tCommando commando = new Commando();\n\t\tString op = commando.executeCommand(command);\n\t\t\n\t\tOtherUtil oU = new OtherUtil();\n\t\tArrayList<String> devices = oU.getRegexFromString(op, \"(model:.*?device:.+$?)\");\n\t\tint eligDevices = devices.size();\n\t\t\n\t\tif (eligDevices>1)\n\t\t\tthrow new TNotFoundEx(\"ERROR: 2 or more Android devices are connected to the host, please connect only one Android device.\");\n\t\tif (eligDevices == 0)\n\t\t\tthrow new TNotFoundEx(\"ERROR: No Android devices detected by the host. Execute adb devices -l to check the connected devices\");\n\t\t\t\n\t}",
"@Test\n public void testUnique_connectionException() throws SQLException {\n SignUpRequest request = new SignUpRequest(UNIQUE, \"Pw\");\n\n doThrow(SQLException.class).when(connection).isUnique(request.getUsername());\n\n dao.register(request);\n\n verify(controller).connectionFailed();\n }",
"private void verifyFromSQLite(){\n textInputLayoutUsername.setErrorEnabled(false);\n textInputLayoutPassword.setErrorEnabled(false);\n User user = new User();\n boolean _isnorekexist = false;\n\n for (int i=0;i<User.users.size();i++) {\n if (User.users.get(i).username.equals(textInputEditTextUsername.getText().toString())) {\n _isnorekexist = true;\n user = User.users.get(i);\n break;\n }\n }\n if (!inputValidation.isInputEditTextFilled(textInputEditTextUsername, textInputLayoutUsername, getString(R.string.error_message_username))) {\n return;\n }\n if (!inputValidation.isInputEditTextFilled(textInputEditTextPassword, textInputLayoutPassword,getString(R.string.error_message_password))) {\n return;\n }\n if (!inputValidation.isInputEditTextNoRekExist(textInputEditTextUsername, textInputLayoutUsername,_isnorekexist,getString(R.string.error_username_not_exists))){\n return;\n }\n if (databaseHelper.checkUsername(textInputEditTextUsername.getText().toString().trim()\n , textInputEditTextPassword.getText().toString().trim())) {\n\n SessionManager sessionManager = SessionManager.with(this);\n sessionManager.createsession(user);\n progress = new ProgressDialog(this);\n progress.setMessage(\"Loading...\");\n progress.show();\n Thread _thread = new Thread() {\n @Override\n public void run() {\n try {\n Thread.sleep(2000);\n progress.dismiss();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n masuk();\n }\n });\n\n }\n };\n _thread.start();\n }\n else {\n // Snack Bar to show success message that record is wrong\n Snackbar.make(nestedScrollView, getString(R.string.error_valid_username_pin), Snackbar.LENGTH_LONG).show();\n }\n }",
"private void authFailed() {\n Toast.makeText(LoginActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }",
"@Test\n public void getNotExistingSession() throws Exception {\n addDevice();\n assertEquals(\"Session should be created\", snmpSession, snmpController.getSession(device.deviceId()));\n assertEquals(\"Map should contain session\", 1, snmpController.snmpDeviceMap.size());\n assertEquals(\"Session should be fetched from map\", snmpSession, snmpController.getSession(device.deviceId()));\n }",
"private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n // Reset errors.\r\n mEmailView.setError(null);\r\n mPasswordView.setError(null);\r\n\r\n // Store values at the time of the login attempt.\r\n String email = mEmailView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n //检测密码\r\n if (TextUtils.isEmpty(password)) {\r\n mPasswordView.setError(\"请输入密码\");\r\n focusView = mPasswordView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid password, if the user entered one.\r\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\r\n mPasswordView.setError(getString(R.string.error_invalid_password));\r\n focusView = mPasswordView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid email address.\r\n if (TextUtils.isEmpty(email)) {\r\n mEmailView.setError(getString(R.string.error_field_required));\r\n focusView = mEmailView;\r\n cancel = true;\r\n } else if (!isEmailValid(email)) {\r\n mEmailView.setError(getString(R.string.error_invalid_email));\r\n focusView = mEmailView;\r\n cancel = true;\r\n }\r\n\r\n SqlEngine sqlEngine = SqlEngine.getInstance(this);\r\n ArrayList<UserBean> list = sqlEngine.queryInfo();\r\n if (list.size() <= 0) {\r\n Toast.makeText(this, \"没有这个账户\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n for (int i = 0; i < list.size(); i++) {\r\n UserBean bean = list.get(i);\r\n Log.i(TAG, \"attemptLogin: 执行到此\");\r\n if (!bean.getUser().equals(email)) {\r\n Toast.makeText(this, \"没有这个账户\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n if (!bean.getPwd().equals(password)) {\r\n Toast.makeText(this, \"密码不正确\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n }\r\n\r\n String ip = (String) SpUtils.getValues(MyApplication.getContext(), Https.IP_ADDRESS, \"\");\r\n String port = (String) SpUtils.getValues(MyApplication.getContext(), Https.PORT, \"\");\r\n if (TextUtils.isEmpty(ip) || TextUtils.isEmpty(port)) {\r\n Toast.makeText(this, \"请先设置网络!\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n\r\n if (cancel) {\r\n // There was an error; don't attempt login and focus the first\r\n // form field with an error.\r\n focusView.requestFocus();\r\n } else {\r\n // 显示一个进度微调,并启动一个后台任务\r\n // 执行用户登录尝试。\r\n showProgress(true);\r\n //判断是否勾选\r\n isCheckBox(email, password);\r\n mAuthTask = new UserLoginTask(email, password);\r\n mAuthTask.execute((Void) null);\r\n startActivity(new Intent(this, MainActivity.class));\r\n\r\n }\r\n }",
"private void attemptLogin() {\n String email = text_email.getText().toString();\n String password = text_password.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n text_password.setError(getString(R.string.error_field_required));\n focusView = text_password;\n cancel = true;\n }\n if (!isPasswordValid(password)) {\n text_password.setError(getString(R.string.error_invalid_password));\n focusView = text_password;\n cancel = true;\n }\n\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n text_email.setError(getString(R.string.error_field_required));\n focusView = text_email;\n cancel = true;\n } else if (!isEmailValid(email)) {\n text_email.setError(getString(R.string.error_invalid_email));\n focusView = text_email;\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n //showProgress(true);\n login(USER_NORMAL);\n }\n }",
"private void attemptToConnect() {\n LOG.warn(\"Attempting to connect....\");\n \n if (// No connection configuration\n getConnectionConfiguration() == null &&\n (getServerHostname() == null || getServerPort() == 0 ||\n getServiceName() == null || getFromAddress() == null ||\n getPassword() == null || getResource() == null)\n \n ||\n \n // Already logged in.\n getConnection() != null && getConnection().isAuthenticated()) {\n \n return;\n }\n \n try {\n if (getConnectionConfiguration() == null) {\n setConnectionConfiguration(new ConnectionConfiguration(\n getServerHostname(), getServerPort(), getServiceName()));\n }\n\n connect();\n }\n catch (Throwable t) {\n LOG.error(t);\n }\n }",
"@Test(expected = SystemObjectIdException.class)\n public void shouldThrowExceptionIfFailToIdentifyDevice() throws IOException {\n\n expect(configuration.createPDU(PDU.GET)).andReturn(new PDU());\n\n expect(snmpInterface.send(isA(PDU.class), same(target))).andReturn(createErrorResponseEvent());\n replayAll();\n\n try {\n session.identifyDevice();\n assert false : \"Should not reach\";\n } finally {\n verifyAll();\n }\n }",
"public void verifyLogin(){\n\n //Verifica que haya conexion de internet\n networkManager = (ConnectivityManager) this.getSystemService(\n Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = networkManager.getActiveNetworkInfo();\n boolean isConnected = networkInfo != null && networkInfo.isConnectedOrConnecting();\n\n if (PreferenceUtils.getEmail (this) != null) { //Verifica que hay una session abierta.\n showSplash ();\n if(isConnected){\n\n //Checa el tipo de session\n if(PreferenceUtils.getSession (this))\n //Facebook session\n new LoadDataLoginFacebook (this).execute(\n PreferenceUtils.getName (this),\n PreferenceUtils.getEmail (this),\n PreferenceUtils.getPassword (this));\n else\n //Manual session\n new LoadDataLogin (this).execute (\n PreferenceUtils.getEmail (this),\n PreferenceUtils.getPassword (this));\n }\n else{ //Si no hay internet pasa directo a la session abierta.\n Intent intent = new Intent (AccessActivity.this, MainActivity.class);\n startActivity (intent);\n }\n }\n }",
"private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n // Reset errors.\r\n mPhoneView.setError(null);\r\n mPasswordView.setError(null);\r\n\r\n // Store values at the time of the login attempt.\r\n String phone = mPhoneView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n // Check for a valid password, if the user entered one.\r\n if (TextUtils.isEmpty(password)) {\r\n mPasswordView.setError(getString(R.string.error_field_required));\r\n focusView = mPasswordView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid phone address.\r\n if (TextUtils.isEmpty(phone)) {\r\n mPhoneView.setError(getString(R.string.error_field_required));\r\n focusView = mPhoneView;\r\n cancel = true;\r\n } else if (!isPhoneValid(phone)) {\r\n mPhoneView.setError(getString(R.string.error_invalid_phone));\r\n focusView = mPhoneView;\r\n cancel = true;\r\n }\r\n\r\n if (cancel) {\r\n // There was an error; don't attempt login and focus the first\r\n // form field with an error.\r\n focusView.requestFocus();\r\n } else {\r\n // Show a progress spinner, and kick off a background task to\r\n // perform the user login attempt.\r\n showProgress(true);\r\n mAuthTask = new UserLoginTask(phone, password);\r\n mAuthTask.execute((Void) null);\r\n }\r\n }",
"void sendAuthMessage(Device device) {\r\n \t//\r\n \t\t// check status and limit\r\n \t\t//\r\n \t\tint status = device.getStatus();\r\n \t\tif (status == DeviceStatus.Removed.getStatus()) {\r\n \t\t\tlogger.info(\"this device have been removed, but ask auth again\");\r\n \t\t\t\r\n \t\t} else if (status != DeviceStatus.Init.getStatus()\r\n \t\t\t\t&& status != DeviceStatus.Authing.getStatus()) {\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorStatusViolate, \"device status isn't init or authing\");\r\n \t\t}\r\n \t\t//\r\n \t\t// check retry count\r\n \t\t//\r\n \t\tint retryLimit = (Integer)applicationConfig.get(\"general\").get(\"auth_retry_limit\");\r\n \t\tint currentRetry = device.getAuthRetry();\r\n \t\tlogger.info(\"current retry count is \"+currentRetry);\r\n \t\tif (retryLimit < currentRetry ) {\r\n \t\t\t//\r\n \t\t\t// retry too many times, change to suspend status.\r\n \t\t\t//\r\n \t\t\tlogger.debug(\"update to suspend status\");\r\n \t\t\tint ret = deviceDao.updateStatusAndRetryCount(device.getId(),\r\n \t\t\t\t\tdevice.getUserId(), DeviceStatus.Suspend.getStatus(),\r\n \t\t\t\t\tDeviceStatus.Authing.getStatus(), device.getModified());\r\n \t\t\tif (ret != 1) {\r\n \t\t\t\tthrow new RentException(RentErrorCode.ErrorStatusViolate,\r\n \t\t\t\t\t\t\"update device status count is not 1\");\r\n \t\t\t}\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorExceedLimit,\r\n \t\t\t\t\t\"auth retry too many time try\");\r\n \t\t}\r\n \t\t\r\n \t\tUser user = device.getUser();\r\n \t\tAssert.assertNotNull(\"user can't be null\",user);\r\n \t\t\r\n \t\t//\r\n \t\t// prepare message.\r\n \t\t//\r\n \t\tString phone=encodeUtility.decrypt(user.getMobilePhone(), \"general\");\r\n \t ResourceBundle resource = ResourceBundle.getBundle(\"user\",user.getLocale());\r\n \t\tString message = MessageFormat.format(resource.getString(\"mobile_auth_message\"),\r\n \t\t\t\tdevice.getId(), encodeUtility.decrypt(device.getToken(), Device.ENCRYPT_KEY));\r\n \t\tlogger.debug(\"message is \"+message);\r\n \t\t//\r\n \t\t// update status\r\n \t\t//\r\n \t\tdevice.setModified(0);\r\n \t\tint ret =deviceDao.updateStatusAndRetryCount(device.getId(), device.getUserId(),\r\n \t\t\t\tDeviceStatus.Authing.getStatus(),\r\n \t\t\t\tDeviceStatus.Init.getStatus(), device.getModified());\r\n \t\tif (ret != 1) {\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorStatusViolate,\r\n \t\t\t\t\t\"update device status count is not 1\");\r\n \t\t}\r\n \r\n \t\t//\r\n \t\t// send message through gateway.\r\n \t\t//\r\n \t\tmobileGatewayService.sendSMS(phone, message);\r\n \t\tdevice.setAuthRetry(device.getAuthRetry()+1);\r\n \t\tdevice.setStatus(DeviceStatus.Authing.getStatus());\r\n \t}",
"public void login(final View v) {\n\n // validate login here\n dbHelper = new EMFMonitorDbHelper(this);\n db = dbHelper.getReadableDatabase();\n\n String username = usernameField.getText().toString();\n String password = passwordField.getText().toString();\n\n Cursor cur = db.rawQuery(\"SELECT * FROM users WHERE username = ? AND password = ?\",\n new String[] {username, password});\n\n if (cur.moveToFirst()) {\n if (cur.getInt(EMFMonitorDbHelper.CAN_WORK_INDEX) > 0) {\n Intent i = new Intent(this, MainActivity.class);\n i.putExtra(\"USERNAME\", username);\n i.putExtra(\"UID\", cur.getInt(EMFMonitorDbHelper.UID_INDEX));\n i.putExtra(\"UNITS\", cur.getString(EMFMonitorDbHelper.UNITS_INDEX));\n i.putExtra(\"ALARM_THRESHOLD\", cur.getDouble(EMFMonitorDbHelper.ALARM_THRESHOLD_INDEX));\n startActivity(i);\n finish();\n }\n else {\n Toast toast = Toast.makeText(this, \"You have been exposed to unsafe levels of EMF\", Toast.LENGTH_SHORT);\n toast.show();\n }\n }\n else {\n Toast toast = Toast.makeText(this, \"Invalid Username or Password\", Toast.LENGTH_SHORT);\n toast.show();\n }\n\n\n }",
"public void attemptLogin() {\n\t\t// Reset errors.\n\t\temailTextView.setError(null);\n\t\tpasswordTextView.setError(null);\n\n\t\t// Store values at the time of the login attempt.\n\t\temail = emailTextView.getText().toString();\n\t\tpassword = passwordTextView.getText().toString();\n\n\t\tboolean cancel = false;\n\n\t\t// Check for a valid email address.\n\t\tcancel = Validate.PresenceOf(emailTextView);\n\t\tif (!cancel) cancel = Validate.PatternOf(emailTextView, Patterns.EMAIL_ADDRESS);\n\t\t\n\t\t// check valid password\n\t\tif (!cancel) cancel = Validate.PresenceOf(passwordTextView);\t\t\n\n\t\tif (!cancel) {\t\n\t\t\tKeyboard.hide(getActivity());\n\t\t\tlogin();\n\t\t}\n\t}",
"@Before(unless = { \"signin\", \"doLogin\" })\n\tprivate static void checkAuthentification() {\n\t\t// get ID from secure social plugin\n\t\tString uid = session.get(PLAYUSER_ID);\n\t\tif (uid == null) {\n\t\t\tsignin(null);\n\t\t}\n\n\t\t// get the user from the store. TODO Can also get it from the cache...\n\t\tUser user = null;\n\t\tif (Cache.get(uid) == null) {\n\t\t\ttry {\n\t\t\t\tuser = UserClient.getUserFromID(uid);\n\t\t\t\tCache.set(uid, user);\n\t\t\t} catch (ApplicationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\t}\n\t\t} else {\n\t\t\tuser = (User) Cache.get(uid);\n\t\t}\n\n\t\tif (user == null) {\n\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\tAuthentifier.logout();\n\t\t}\n\n\t\tif (user.avatarURL == null) {\n\t\t\tuser.avatarURL = Gravatar.get(user.email, 100);\n\t\t}\n\n\t\t// push the user object in the request arguments for later display...\n\t\trenderArgs.put(PLAYUSER, user);\n\t}",
"@Test\n public void checkForNonExistingUserCredential() {\n UserLogin userLogin = new UserLogin();\n userLogin.setUserLogin(\"+380680000000\");\n userLogin.setUserPassword(\"12345\");\n\n boolean isThrow = false;\n try {\n UserResponse userResponse = loginsService.checkLoginSignInSignUp(userLogin, \"SignIn\");\n } catch (ApplicationException e) {\n isThrow = true;\n }\n assertThat(isThrow);\n }",
"@Test\n public void smartIdEmptyCode() throws Exception {\n String errorMessage = authenticateWithSmartIdInvalidInputPollError(\"\", 2000);\n assertEquals(\"Isikukood puuduIntsidendi number:\", errorMessage);\n }",
"private void checkConnectedDeviceThrowable()\n\t\t\tthrows IllegalStateException {\n\t\tif (this.mIsConnectedDevice) {\n\t\t\treturn;\n\t\t}\n\t\tthrow new IllegalStateException(\"not connected to a device\");\n\t}",
"public boolean login() throws Exception {\n\n\t\tif (LoginDataBase.getInstance().constainsUsername(username)) {\n\t\t\t// local memory has records of that\n\t\t\tif (hashedPassword == LoginDataBase.getInstance()\n\t\t\t\t\t.getHashedPassword(password)) {\n\t\t\t\tsessionID = UUID.randomUUID().toString();\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tPassExceptionToUI.passToUI(new PasswordMismatchError());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\t// check with web server\n\t\t\tCertificateValidation.invalidate();\n\t\t\tURL url = new URL(\n\t\t\t\t\t\"https://mlite-demo.musoni.eu:8443/mifosng-provider/api/v1/authentication?username=\"\n\t\t\t\t\t\t\t+ username\n\t\t\t\t\t\t\t+ \"&password=\"\n\t\t\t\t\t\t\t+ password\n\t\t\t\t\t\t\t+ \"&tenantIdentifier=code4good\");\n\n\t\t\tHttpsURLConnection con = (HttpsURLConnection) url.openConnection();\n\t\t\tcon.setRequestMethod(\"POST\");\n\n\t\t\tif (con.getResponseCode() == HttpURLConnection.HTTP_OK) {\n\t\t\t\t// if the account is found in web server\n\t\t\t\tLoginDataBase.getInstance().updateDataBase(username, hashedPassword);\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t// if web server does not have match\n\t\t\t\tPassExceptionToUI.passToUI(new UsernameMismatchError(username));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}",
"private boolean authenticate(String _uid, String _pwd) {\n\n Connection dbCon = null;\n ResultSet rs = null;\n try {\n dbCon = ds.getConnection();\n Statement s = dbCon.createStatement();\n rs = s.executeQuery(\"select * from user where id = '\"\n + _uid + \"' and pwd = '\" + _pwd + \"'\");\n return (rs.next());\n }\n catch (java.sql.SQLException e) {\n System.out.println(\"A problem occurred while accessing the database.\");\n System.out.println(e.toString());\n }\n finally {\n try {\n dbCon.close();\n }\n catch (SQLException e) {\n System.out.println(\"A problem occurred while closing the database.\");\n System.out.println(e.toString());\n }\n }\n \n return false;\n\n }",
"@Override\r\n\tpublic boolean checkLogin(int accNo) throws EwalletException {\n\t\ttemp =dao.loginuser(accNo);\r\n\t\tif(temp!=null)\r\n\t\treturn true;\r\n\t\telse \r\n\t\t\treturn false;\r\n\t}",
"private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n\r\n // Store values at the time of the login attempt.\r\n String email = mEmailView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n // Check for a valid password, if the user entered one.\r\n\r\n // Check for a valid email address.\r\n if (TextUtils.isEmpty(email)) {\r\n mEmailView.setError(getString(R.string.error_field_required));\r\n focusView = mEmailView;\r\n cancel = true;\r\n } else if (!isEmailValid(email)) {\r\n mEmailView.setError(getString(R.string.error_invalid_email));\r\n focusView = mEmailView;\r\n cancel = true;\r\n }\r\n mAuthTask = new UserLoginTask(email, password);\r\n try {\r\n Boolean logStatus = mAuthTask.execute(\"http://shubhamgoswami.me/login\").get();\r\n if(logStatus){\r\n SQLiteDatabase db = openOrCreateDatabase(\"adharShila\",MODE_PRIVATE, null);\r\n db.execSQL(\"UPDATE LOGSTATUS SET USERNAME=\\\"\"+mEmailView.getText()+\"\\\", STATUS=1 WHERE ENTRY=1\");\r\n db.close();\r\n Intent i = new Intent(getApplicationContext(), MainActivity.class);\r\n i.putExtra(\"username\", mEmailView.getText());\r\n i.putExtra(\"password\", password);\r\n startActivity(i);\r\n }\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n } catch (ExecutionException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n mEMSIpview.setError(null);\n // Store values at the time of the login attempt.\n final String emsIP = mEMSIpview.getText().toString();\n final String email = mEmailView.getText().toString();\n final String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n if (TextUtils.isEmpty(emsIP)) {\n mEMSIpview.setError(\"Please enter an ems ip\");\n focusView = mEMSIpview;\n cancel = true;\n }\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n performNetworkOperations.doLogin(emsIP, email, password);\n// Toast.makeText(this,token,Toast.LENGTH_SHORT).show();\n// List<String> nodeData = performNetworkOperations.getNodesList(emsIP,token);\n\n }\n }",
"void tryConnection(String mac)\n {\n if (outstanding_connect != null || open_connection != null) {\n return;\n }\n \n Log.d(Constants.LOG_TAG, \"Attempting to connect to \" + mac);\n \n BluetoothDevice dev = bt_adapter.getRemoteDevice(mac);\n outstanding_connect = new ConnectThread(dev, handler);\n outstanding_connect.start();\n \n }",
"private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel)\n {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n }\n else\n {\n\n // checks to see if the login was successful or not\n try\n {\n // server connection class will handle initiating the connection to the remote server\n ServerConnection loginConn = new ServerConnection(\"http://cop4331groupeight.com/androidlogin.php\");\n String resultString = loginConn.initialLogin(email, password);\n\n JSONArray resultJSON = new JSONArray(resultString);\n JSONObject jsonObj = resultJSON.getJSONObject(0);\n\n int userID = jsonObj.getInt(\"userID\");\n String userEmail = jsonObj.getString(\"email\");\n String pass = jsonObj.getString(\"pass\");\n String error = jsonObj.getString(\"error\");\n String profileLocation = jsonObj.getString(\"profileLocation\");\n String firstName = jsonObj.getString(\"firstName\");\n String lastName = jsonObj.getString(\"lastName\");\n boolean inChat = jsonObj.getBoolean(\"inChat\");\n String preference = jsonObj.getString(\"preference\");\n String about = jsonObj.getString(\"about\");\n\n // login attempt was successful and we should proceed to the next activity\n if(error.equals(\"None\"))\n {\n\n session.createLoginSession(userID, userEmail, pass, profileLocation, firstName, lastName, inChat, true, preference, about);\n\n // Staring MainActivity\n Intent i = new Intent(getApplicationContext(), MatchActivity.class);\n startActivity(i);\n finish();\n }\n else\n {\n Log.v(\"Error\", \"Unexpected error occurred when parsing data.\");\n }\n }\n // failed login attempt\n catch(JSONException | NullPointerException e)\n {\n // if the user isn't currently connected to the internet, this exception will be thrown\n if (e instanceof NullPointerException)\n {\n Toast.makeText(LoginActivity.this, \"Error Connecting to Internet. Check your connection settings.\", Toast.LENGTH_SHORT).show();\n }\n // otherwise, the user's credentials were invalid and they need to try again\n else\n {\n Toast.makeText(LoginActivity.this, \"Login failed\", Toast.LENGTH_SHORT).show();\n mPasswordView.setError(getString(R.string.error_incorrect_password));\n mPasswordView.requestFocus();\n }\n\n }\n }\n }",
"@Override\n\t\tprotected Boolean doInBackground(Void... params) {\n\n\t\t\ttry {\n\t\t\t\t// Simulate network access.\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tfor (String credential : DUMMY_CREDENTIALS) {\n\t\t\t\tString[] pieces = credential.split(\":\");\n\t\t\t\tif (pieces[0].equals(mEmail) && pieces[1].equals(mPassword)) {\n\t\t\t\t\t// Account exists, return true if the password matches.\n\t\t\t\t\tloginSuccess();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// TODO: register the new account here.\n\n\t\t\treturn false;\n\t\t}",
"private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n mUsrView.setError(null);\n mPasswordView.setError(null);\n\n String usr = mUsrView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n Tuple<String, String> creds = /*getCredentials()*/ SERVER_CREDENTIALS;\n\n boolean cancel = false;\n View focusView = null;\n\n if (!TextUtils.isEmpty(password)) {\n if (!mPasswordView.getText().toString().equals(creds.y)) {\n if (Util.D) Log.i(\"attemptLogin\", \"pwd was \" + mPasswordView.getText().toString());\n mPasswordView.setError(getString(R.string.error_incorrect_creds));\n cancel = true;\n }\n focusView = mPasswordView;\n }\n\n if (TextUtils.isEmpty(usr)) {\n mUsrView.setError(getString(R.string.error_field_required));\n focusView = mUsrView;\n cancel = true;\n } else if (!usr.equals(creds.x)) {\n mUsrView.setError(getString(R.string.error_incorrect_creds));\n focusView = mUsrView;\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n if (prefs != null)\n prefs.edit().putBoolean(getString(R.string.settingAuthorized), true);\n showProgress(true);\n mAuthTask = new UserLoginTask(usr, password);\n mAuthTask.execute((Void) null);\n }\n }",
"protected void validateToken() {\n\n authToken = preferences.getString(getString(R.string.auth_token), \"\");\n saplynService = new SaplynService(preferences.getInt(debugLvl, -1), authToken);\n\n // Check if user already authenticated\n if (authToken.equals(\"\")) {\n Intent intent = new Intent(HomeActivity.this, AuthenticationActivity.class);\n startActivityForResult(intent, 0);\n }\n else {\n populateUser();\n }\n }",
"@Test\n public void existingUserNOT_OK_PW() {\n boolean result = auth.authenticateUser(\"Ole\", \"fido\", 0); \n //Then\n assertThat(result, is(false));\n }",
"public void attemptLogin() {\n\n\t\t// Reset errors.\n\t\tmUserView.setError(null);\n\t\tmPasswordView.setError(null);\n\n\t\t// Save values.\n\t\tmUser = mUserView.getText().toString();\n\t\tmPassword = mPasswordView.getText().toString();\n\n\t\tboolean cancel = false;\n\t\tView focusView = null;\n\n\t\t// Check for a valid password.\n\t\tif (TextUtils.isEmpty(mPassword)) {\n\t\t\tmPasswordView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mPasswordView;\n\t\t\tcancel = true;\n\t\t} else if (mPassword.length() < 4) {\n\t\t\tmPasswordView.setError(getString(R.string.error_invalid_password));\n\t\t\tfocusView = mPasswordView;\n\t\t\tcancel = true;\n\t\t}\n\n\t\t// Check for a valid user.\n\t\tif (TextUtils.isEmpty(mUser)) {\n\t\t\tmUserView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mUserView;\n\t\t\tcancel = true;\n\t\t} else if (mUser.length() < 4) {\n\t\t\tmUserView.setError(getString(R.string.error_invalid_user));\n\t\t\tfocusView = mUserView;\n\t\t\tcancel = true;\n\t\t}\n\t\t\t\t\n\t\tif (cancel) {\n\t\t\t// There is an error, so registration does not success and focus on the error.\n\t\t\tfocusView.requestFocus();\n\t\t} else {\n\t\t\t// Send information to server.\n\t\t\tmLoginStatusMessageView.setText(R.string.login_progress_registering);\n\t\t\tshowProgress(true);\n\t\t\tsendInfoToServer();\n\t\t}\n\t}",
"@Test\n final void testCreateDeviceAlreadyExists() {\n when(deviceDao.findDevice(DeviceFixture.SERIAL_NUMBER)).thenReturn(Optional.of(deviceDTO));\n\n assertThrows(\n ExceptionType.DeviceAlreadyExistsException.class,\n () -> deviceController.createDevice(createDeviceRequest));\n }",
"private void attemptLogin() {\n // Reset errors.\n edtID.setError(null);\n edtPassword.setError(null);\n\n // Store values at the time of the login attempt.\n String userId = edtID.getText().toString();\n String password = edtPassword.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n edtPassword.setError(\"Password is empty\");\n focusView = edtPassword;\n cancel = true;\n } else if(!isPasswordValid(password)) {\n edtPassword.setError(getString(R.string.error_invalid_password));\n focusView = edtPassword;\n cancel = true;\n }\n\n // Check for a valid user id.\n if (TextUtils.isEmpty(userId)) {\n edtID.setError(getString(R.string.error_field_required));\n focusView = edtID;\n cancel = true;\n } else if (!isUserIdValid(userId)) {\n edtID.setError(getString(R.string.error_invalid_id));\n focusView = edtID;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n JSONObject json = new JSONObject();\n try {\n json.put(\"user_id\", userId);\n json.put(\"password\", password);\n } catch (Exception e) {\n e.printStackTrace();\n }\n reqUserID = userId;\n reqUserPW = password;\n loginConnector.request(json);\n }\n }",
"private void resolveSignInError() {\n if(mConnectionResult != null)\n if (mConnectionResult.hasResolution()) {\n try {\n mConnectionResult.startResolutionForResult(this, RC_SIGN_IN);\n } catch (IntentSender.SendIntentException e) {\n mGoogleApiClient.connect();\n }\n }\n }",
"private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n final String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n if(isOnline()){\n try {\n ApiRequests.POST(\"login/\", new Callback() {\n @Override\n public void onFailure(Call call, final IOException e) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Log.e(\"error:\", \"burda\");\n }\n });\n }\n\n @Override\n public void onResponse(Call call, final Response response) throws IOException {\n\n try {\n processTheResponse(response.body().string());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, email, password);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n else {\n InternetConnectionError();\n }\n }\n }",
"public void testGetSimState_unavailableDevice() {\n mMockIDevice = EasyMock.createMock(IDevice.class);\n EasyMock.expect(mMockIDevice.getState()).andReturn(DeviceState.UNAUTHORIZED);\n EasyMock.expect(mMockIDevice.getSerialNumber()).andReturn(\"serial\");\n EasyMock.replay(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n assertNull(mTestDevice.getSimState());\n EasyMock.verify(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n }",
"public boolean checkLogin() {\r\n try {\r\n String select = \"SELECT * FROM LOGIN\";\r\n ResultSet rs = model.ConnectToSql.select(select);\r\n while (rs.next()) {\r\n if (this.username.equals(rs.getString(1)) && new MD5().md5(this.password).equals(rs.getString(2))) {\r\n this.fullname = rs.getString(4);\r\n this.codeID = rs.getString(3);\r\n model.ConnectToSql.con.close();\r\n return true;\r\n }\r\n }\r\n\r\n } catch (Exception e) {\r\n //e.printStackTrace();\r\n\r\n }\r\n return false;\r\n }",
"private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !Utility_Helper.isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!Utility_Helper.isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n // if user flow not cancelled execute Simulate_Login_Task asyncronous task\n // to simulate login\n Simulate_Login_Task task = new Simulate_Login_Task(this, dummyList, email, password);\n task.setOnResultListener(asynResult);\n task.execute();\n }\n }",
"@Override\n\tprotected boolean isExist(AbnormalDevice record) {\n\t\treturn false;\n\t}",
"@Test\n\tpublic void testLoginAdminAccountWithNonExistingUser() {\n\t\tassertEquals(2, adminAccountService.getAllAdminAccounts().size());\n\n\t\tString username = \"Catherine\";\n\t\tString password = \"password\";\n\t\tString error = null;\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.loginAdminAccount(username, password);\n\t\t} catch (InvalidInputException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\n\t\tassertNull(user);\n\t\t// check error\n\t\tassertEquals(\"The user cannot be found. Please sign up if you do not have an account yet.\", error);\n\t}",
"@Override\n\t\t\t\t\t\tpublic void onSyncErr() {\n\t\t\t\t\t\t\tnotifyLoginEvent(true);\n\t\t\t\t\t\t}",
"private void checkGetUser(UserMultiID key, String badIdp) throws Exception {\n User user = newUser();\n user.setUserMultiKey(key);\n getUserStore().save(user);\n try {\n getDBSClient().getUser(key, badIdp);\n assert false : \"Error: was able to get the user with a wrong idp.\";\n } catch (Throwable t) {\n assert true;\n }\n }",
"private void verifyAuthWithServer() {\n mResetModel.connect(\n myBinding.editResetEmail.getText().toString());\n //This is an Asynchronous call. No statements after should rely on the\n //result of connect().\n }",
"private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n // Reset errors.\r\n mIPView.setError(null);\r\n mPortView.setError(null);\r\n mUsernameView.setError(null);\r\n mPasswordView.setError(null);\r\n\r\n // Store values at the time of the login attempt.\r\n String ip = mIPView.getText().toString();\r\n int port = 0;\r\n try {\r\n port = Integer.parseInt(mPortView.getText().toString());\r\n }catch (Exception e){\r\n\r\n }\r\n String username = mUsernameView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n // Check for a valid ip address.\r\n if (TextUtils.isEmpty(ip)) {\r\n mIPView.setError(getString(R.string.error_field_required));\r\n focusView = mIPView;\r\n cancel = true;\r\n } else if (!isIPValid(ip)) {\r\n mIPView.setError(getString(R.string.error_invalid_ip));\r\n focusView = mIPView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid port.\r\n if (TextUtils.isEmpty(\"\"+port)) {\r\n mPortView.setError(getString(R.string.error_field_required));\r\n focusView = mPortView;\r\n cancel = true;\r\n }else if(port != (int)port){\r\n mPortView.setError(getString(R.string.error_invalid_port));\r\n focusView = mPortView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid username.\r\n if (TextUtils.isEmpty(username)) {\r\n mUsernameView.setError(getString(R.string.error_field_required));\r\n focusView = mUsernameView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid password, if the user entered one.\r\n if (TextUtils.isEmpty(password)) {\r\n mPasswordView.setError(getString(R.string.error_field_required));\r\n focusView = mPasswordView;\r\n cancel = true;\r\n }\r\n\r\n if (cancel) {\r\n // There was an error; don't attempt login and focus the first\r\n // form field with an error.\r\n focusView.requestFocus();\r\n } else {\r\n // Show a progress spinner, and kick off a background task to\r\n // perform the user login attempt.\r\n showProgress(true);\r\n mAuthTask = new UserLoginTask(ip, port, username, password);\r\n mAuthTask.execute((Void) null);\r\n }\r\n }",
"private void attemptLogin() {\n if (isLoggingIn) {\n return;\n }\n\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!Utils.isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_field_required));\n focusView = mPasswordView;\n cancel = true;\n } else if (!Utils.isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n if (!HttpUtils.isNetworkAvailable(this.getApplicationContext())) {\n Toast.makeText(this.getApplicationContext(), \"No internet\", Toast.LENGTH_SHORT).show();\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(mPasswordView.getWindowToken(), 0);\n\n LoginApi.executeLogin(this, email, password);\n }\n }",
"public void loginWithoutPersonalDevice() {\n\t\t//new WebDriverWait(driver, 45).pollingEvery(1, TimeUnit.SECONDS).until(ExpectedConditions.visibilityOf(personalCheckbox));\n\t\twaitOnProgressBarId(45);\n\t\tif (pageTitle.getText().contains(\"Phone\")) {\n\n\t\t\tLog.info(\"======== Unchecking personal device ========\");\n\t\t\tpersonalCheckbox.click();\n\t\t\tLog.info(\"======== Selecting Dont ask again checkbox ========\");\n\t\t\tskipDontAskCheckbox.click();\n\t\t\tLog.info(\"======== Clicking on Skip button ========\");\n\t\t\tcontinueButton.click(); // Click on Skip , Skip=Continue\n\t\t}\n\t}",
"@Test\n public void testRegister_connectionException() throws SQLException {\n SignUpRequest request = new SignUpRequest(UNIQUE, PASSWORD);\n\n doThrow(SQLException.class).when(connection).register(request);\n\n dao.register(request);\n\n verify(controller).connectionFailed();\n }",
"private void checkDB() {\n\t\tif (couchDB_ip == null) {\n\t\t\tsetCouchDB_ip();\n\t\t}\n\n\t\tif (!databaseExist) {\n\n\t\t\tsynchronized (databaseExist) {\n\n\t\t\t\tif (!databaseExist) {\n\n\t\t\t\t\tif (couchDB_USERNAME != null\n\t\t\t\t\t\t\t&& !couchDB_USERNAME.trim().isEmpty()\n\t\t\t\t\t\t\t&& couchDB_PASSWORD != null\n\t\t\t\t\t\t\t&& !couchDB_PASSWORD.trim().isEmpty()) {\n\t\t\t\t\t\tUsernamePasswordCredentials creds = new UsernamePasswordCredentials(\n\t\t\t\t\t\t\t\tcouchDB_USERNAME, couchDB_PASSWORD);\n\t\t\t\t\t\tauthentication = BasicScheme.authenticate(creds,\n\t\t\t\t\t\t\t\t\"US-ASCII\", false).toString();\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (CouchDBUtil.checkDB(getCouchDB_ip(), couchDB_NAME,\n\t\t\t\t\t\t\t\tauthentication)) {\n\n\t\t\t\t\t\t\tdatabaseExist = true;\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tCouchDBUtil.createDb(getCouchDB_ip(), couchDB_NAME,\n\t\t\t\t\t\t\t\t\tauthentication);\n\t\t\t\t\t\t\tdatabaseExist = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\t\tlogger.info(\"Impossible to access CouchDB\", e);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void CheckConnection() {\n\t\tconn = SqlConnection.DbConnector();\n\t\tif (conn == null) {\n\t\t\tSystem.out.println(\"Connection Not Successful\");\n\t\t\tSystem.exit(1);\n\t\t} else {\n\t\t\tSystem.out.println(\"Connection Successful\");\n\t\t}\n\t}",
"@Test\n public void testConnectionWhenBadUser() {\n \tForm form = new Form();\n \tform.param(\"login\", \"test\");\n \tform.param(\"psw\", \"12345\");\n \t\n \tResponse connect = target.path(auth).request().post(Entity.form(form));\n \tassertEquals(530,connect.getStatus());\n }",
"private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mUserNameView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String userName = mUserNameView.getText().toString();\n String password = mPasswordView.getText().toString();\n UserDetail user = new UserDetail(userName, password);\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n user = null;\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(userName)) {\n mUserNameView.setError(getString(R.string.error_field_required));\n focusView = mUserNameView;\n\n\n }\n else if(user!=null && isNetworkConnected()) {\n getPermissiontoAccessInternet();\n mAuthTask = new UserLoginTask(user);\n mAuthTask.execute((Void) null);\n\n }\n// } else if (!isUserNameValid(userName)) {\n// mUserNameView.setError(getString(R.string.error_invalid_email));\n// focusView = mUserNameView;\n// cancel = true;\n// }\n\n// if (cancel) {\n// // There was an error; don't attempt login and focus the first\n// // form field with an error.\n// focusView.requestFocus();\n// } else {\n// // Show a progress spinner, and kick off a background task to\n// // perform the user login attempt.\n//\n// }\n }",
"private void handleFingerprintAuthFailed() {\n Assert.isMainThread();\n for (int i = 0; i < this.mCallbacks.size(); i++) {\n KeyguardUpdateMonitorCallback keyguardUpdateMonitorCallback = this.mCallbacks.get(i).get();\n if (keyguardUpdateMonitorCallback != null) {\n keyguardUpdateMonitorCallback.onBiometricAuthFailed(BiometricSourceType.FINGERPRINT);\n }\n }\n }",
"@Test(expected = SystemObjectIdException.class)\n public void shouldThrowExceptionIfExceptionWhenIdentifyDevice() throws IOException {\n\n expect(configuration.createPDU(PDU.GET)).andReturn(new PDU());\n\n expect(snmpInterface.send(isA(PDU.class), same(target))).andThrow(new IOException());\n replayAll();\n\n try {\n session.identifyDevice();\n assert false : \"Should not reach\";\n } finally {\n verifyAll();\n }\n }",
"public final Session tryToAuthenticate(final String user, final String password)\r\n {\n return null;\r\n }",
"public com.sun.jna.PointerType login(Credentials c) throws RelationException;",
"private void _verifyAuthCode(Device device,String authCode){\r\n \t\tdevice.setModified(0); // reset modified to get current time.\r\n \t\tif (device.getStatus() != DeviceStatus.Authing.getStatus()) {\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorStatusViolate,\r\n \t\t\t\t\t\"device auth status not match current status is \"+device.getStatus());\r\n \t\t}\r\n \t\t//\r\n \t\t// if device modified + timeout > current time then throw timeout exception.\r\n \t\t// check verify timeout\r\n \t\t//\r\n \t\tMap<String,Object> setting = applicationConfig.get(\"general\");\r\n \tlong time=java.util.Calendar.getInstance().getTimeInMillis()/1000;\r\n \t\tint timeout = (Integer)setting.get(\"auth_verify_timeout\");\r\n \tif (time > device.getModified() + timeout ) {\t\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorAuthExpired,\r\n \t\t\t\t\t\"verify mobile auth code has been timeout\");\r\n \t}\r\n \t\r\n \t\t//\r\n \t\t// check retry count\r\n \t\t//\r\n \t\tint retryLimit = (Integer)setting.get(\"auth_retry_limit\");\r\n \t\tif(logger.isDebugEnabled()) {\r\n \t\t\tlogger.debug(\"retry limit is \"+retryLimit+\" current auth retry is \"+device.getAuthRetry());\r\n \t\t}\r\n \t\tif (device.getAuthRetry() > retryLimit) {\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorExceedLimit,\r\n \t\t\t\t\t\"mobile verify auth retry too many time try:\"\r\n \t\t\t\t\t\t\t+ device.getAuthRetry() + \" > \" + retryLimit);\r\n \t\t}\r\n \r\n \t\t//\r\n \t\t// check auth code\r\n \t\t//\r\n \t\tString token = device.getToken();\r\n \t\tif (!authCode.equals(this.encodeUtility.decrypt(token, Device.ENCRYPT_KEY))) {\r\n \t\t\t//\r\n \t\t\t// if fail update retry status\r\n \t\t\t//\r\n \t\t\tlogger.debug(\"token not match, token is \"+token);\r\n \t\t\tint ret =deviceDao.updateStatusAndRetryCount(device.getId(), device.getUserId(),\r\n \t\t\t\t\tDeviceStatus.Authing.getStatus(),\r\n \t\t\t\t\tDeviceStatus.Init.getStatus(), device.getModified());\r\n \t\t\tif (ret != 1) {\r\n \t\t\t\tthrow new RentException(RentErrorCode.ErrorStatusViolate,\r\n \t\t\t\t\t\t\"update device status count is not 1\");\r\n \t\t\t}\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorAuthFail,\r\n \t\t\t\t\t\"device id \"+device.getId()+\" enter auth code not match\");\r\n \r\n \t\t}\r\n \t\t\r\n \t\t//\r\n \t\t// update device and user in database.\r\n \t\t//\r\n \t\tlogger.debug(\"update device status to authed\");\r\n \t\tdeviceDao.updateStatusAndRetryCount(device.getId(),device.getUserId(),\r\n \t\t\t\tDeviceStatus.Authed.getStatus(),\r\n \t\t\t\tDeviceStatus.Authing.getStatus(),\r\n \t\t\t\tdevice.getModified());\r\n \t\tUser user = device.getUser();\r\n \t\tif (user.getStatus() == UserStatus.Init.getStatus()){\r\n \t\t\tlogger.debug(\"update user status to authed\");\r\n \t\t\tuser.setModified((long)0);\r\n \t\t\tuserDao.updateUserStatus(user.getId(), UserStatus.Authed.getStatus()\r\n \t\t\t\t\t, UserStatus.Init.getStatus(), user.getModified());\r\n \t\t}\r\n \t\t\r\n \t}",
"private void attemptLogin2(String emailString,String passwordString) {\n FirebaseDatabase skoovyDatabase = FirebaseDatabase.getInstance();\r\n // Get a reference to our userInfo node\r\n DatabaseReference currentSkoovyUsers = skoovyDatabase.getReference(\"userInfo\");\r\n mAuth.signInWithEmailAndPassword(email, password)\r\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\r\n @Override\r\n public void onComplete(@NonNull Task<AuthResult> task) {\r\n //Log.d(TAG, \"signInWithEmail:onComplete:\" + task.isSuccessful());\r\n Toast.makeText(loginActivity.this, \"login successful\",\r\n Toast.LENGTH_SHORT).show();\r\n // If sign in fails, display a message to the user. If sign in succeeds\r\n // the auth state listener will be notified and logic to handle the\r\n // signed in user can be handled in the listener.\r\n if (!task.isSuccessful()) {\r\n //Log.w(TAG, \"signInWithEmail:failed\", task.getException());\r\n Toast.makeText(loginActivity.this, \"login failed\",\r\n Toast.LENGTH_SHORT).show();\r\n }\r\n\r\n // ...\r\n }\r\n });\r\n }",
"@Override\n public boolean check() {\n return GlobalParams.isLogin();\n }",
"private void attemptLogin(){\n //reset error\n et_email.setError(null);\n et_password.setError(null);\n\n // Store values at the time of the login attempt.\n final String email = et_email.getText().toString();\n final String password = et_password.getText().toString();\n final boolean finish = false;\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n et_password.setError(getString(R.string.error_invalid_password));\n focusView = et_password;\n cancel = true;\n }else if (!isEmailValid(email)) {\n et_email.setError(getString(R.string.error_invalid_email));\n focusView = et_email;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n JSONObject json = new JSONObject();\n\n try {\n json.put(\"ctrl\", \"login\");\n json.put(\"email\", email);\n json.put(\"password\", password);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n String requete = json.toString();\n Log.v(\"req\", requete);\n HttpQuery login = new HttpQuery(requete, this);\n login.execute();\n }\n\n\n }",
"private boolean AlreadyLogin() {\n\t\tString usn = uPreferences.getString(\"username\", null);\n\t\tString pwd = uPreferences.getString(\"password\", null);\n\t\tif((usn == null) || ((pwd == null))){\n\t\t\treturn false;\n\t\t}\n\t\telse \n\t\t\treturn true;\n\t}",
"private void connectionFailed() {\n // Send a failure message back to the Activity\n Message msg = handler.obtainMessage(SdlRouterService.MESSAGE_LOG);\n Bundle bundle = new Bundle();\n bundle.putString(LOG, \"Unable to connect device\");\n msg.setData(bundle);\n handler.sendMessage(msg);\n\n // Start the service over to restart listening mode\n // BluetoothSerialServer.this.start();\n }",
"@Test\n\tpublic void testAuthenticateAdminAccountWithNonExistingUser() {\n\n\t\tString username = \"Catherine\";\n\t\tString error = null;\n\t\tAdminAccount user = null;\n\t\ttry {\n\t\t\tuser = adminAccountService.authenticateAdminAccount(username);\n\t\t} catch (InvalidInputException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\t\tassertNull(user);\n\t\t// check error\n\t\tassertEquals(\"The user cannot be found.\", error);\n\t}",
"public static String getExistingLogin() throws Exception {\n return executeQuery(\"SELECT * FROM players;\", \"us_login\");\n }",
"public void testGetSimOperator_unavailableDevice() {\n mMockIDevice = EasyMock.createMock(IDevice.class);\n EasyMock.expect(mMockIDevice.getState()).andReturn(DeviceState.UNAUTHORIZED);\n EasyMock.expect(mMockIDevice.getSerialNumber()).andReturn(\"serial\");\n EasyMock.replay(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n assertNull(mTestDevice.getSimOperator());\n EasyMock.verify(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n }",
"private void _login() throws SecurityFeaturesException {\n try {\n _initChallengeResponse();\n } catch (InvalidKeyException e) {\n _showAlertWithMessage(getString(R.string.authentication_failure_title), getString(R.string.error_auth_invalid_key), false, false);\n } catch (InvalidChallengeException e) {\n _showAlertWithMessage(getString(R.string.authentication_failure_title), getString(R.string.error_auth_invalid_challenge), false, false);\n }\n }",
"@Override\n\tprotected void checkLoginRequired() {\n\t\treturn;\n\t}",
"@Test\n\tpublic void testLoginAdminAccountWithInvalidCredentials() {\n\t\tassertEquals(2, adminAccountService.getAllAdminAccounts().size());\n\n\t\tString error = null;\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.loginAdminAccount(USERNAME2, PASSWORD1);\n\t\t} catch (InvalidInputException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\n\t\tassertNull(user);\n\t\t// check error\n\t\tassertEquals(\"Username or password incorrect. Please try again.\", error);\n\t}",
"@Test\n public void getDeviceTest() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);\n\n assertEquals(device, getDevice(DatabaseTest.DEVICE_ID));\n DatabaseTest.cleanDatabase();\n }",
"public void loginWithPersonalDevice() // ==== To be used by LGN_005 and Verify SIM ==== //\n\t{\n\t\ttry\n\t\t{\n\t\t\tnew WebDriverWait(driver, 45).until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"//android.widget.TextView[contains(@text,'Verify')]\")));\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tAssert.fail(\"Verify Phone page not found\"+e.getMessage());\n\t\t}\n\t\t\n\t\tLog.info(\"======== Login With Verify Personal Device ========\");\n\t\tif(pageTitle.getText().contains(\"Device\"))\n\t\t{\t\t\t\n\t\t\tLog.info(\"== Verify Device page found instead of Verify Phone page ==\"); \t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor(WebElement e: selectSimNumberList) // Select any/all Sim and Number dropdowns\n\t\t{\n\t\t\te.click();\n\t\t\tselectWithinList.get(1).click();\n\t\t}\n\t\tcontinueButton.click();\n\t\t// Wait until presence of Home page or Verify device Page \t\t\n\t\t\n\t\tnew WebDriverWait(driver,90).until(ExpectedConditions.visibilityOf(checker));\n\t\t\n\t\tif(checker.getText().toLowerCase().contains(\"ok\") && checker.getAttribute(\"resourceId\").contains(\"button1\"))\n\t\t{\t\n\t\t\tchecker.click();\n\t\t\t\n\t\t\tnew WebDriverWait(driver,60).until(ExpectedConditions.visibilityOf(checker));\n\t\t}\n\t\tif(checker.getText().contains(\"OK\") && checker.getAttribute(\"resourceId\").contains(\"button2\")) return;\t// LGN_05 will verify this\t\n\t\t\n\t\t//gotoHome();\tNo need to go to Home since Error messages and skip buttons need to be validated\t\n\t}",
"private void attemptLogin() {\n\n if (!Utils.isNetworkAvailable(mBaseActivity)) {\n Utils.showNetworkAlertDialog(mBaseActivity);\n return;\n }\n if (signInTask != null) {\n return;\n }\n\n // Reset errors.\n binding.email.setError(null);\n binding.password.setError(null);\n\n // Store values at the time of the login attempt.\n String email = binding.email.getText().toString();\n String password = binding.password.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n binding.email.setError(getString(R.string.error_field_required));\n focusView = binding.email;\n cancel = true;\n } else if (TextUtils.isEmpty(password)) {\n binding.password.setError(getString(R.string.error_field_required));\n focusView = binding.password;\n cancel = true;\n } else if (!isEmailValid(email)) {\n binding.email.setError(getString(R.string.error_invalid_email));\n focusView = binding.email;\n cancel = true;\n } else if (!isPasswordValid(password)) {\n binding.password.setError(getString(R.string.error_invalid_password));\n focusView = binding.password;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // perform the user login attempt.\n signInTask = new AsyncTask(mBaseActivity);\n signInTask.execute(email, password);\n }\n }",
"private void handleFaceAuthFailed() {\n Assert.isMainThread();\n setFaceRunningState(0);\n for (int i = 0; i < this.mCallbacks.size(); i++) {\n KeyguardUpdateMonitorCallback keyguardUpdateMonitorCallback = this.mCallbacks.get(i).get();\n if (keyguardUpdateMonitorCallback != null) {\n keyguardUpdateMonitorCallback.onBiometricAuthFailed(BiometricSourceType.FACE);\n }\n }\n }",
"@Test(groups=\"authentication\")\n public void noCredential() throws Exception {\n expect().\n body(\"error\", equalTo(401)).\n get(\"/openidm/managed/user?_queryId=query-all-ids\");\n }",
"@Override\n\tpublic SpaceUserVO login(SpaceUserVO spaceUserVO) throws Exception {\n\t\treturn null;\n\t}"
]
| [
"0.69649106",
"0.6278783",
"0.5870311",
"0.5839943",
"0.5759432",
"0.5703756",
"0.56538093",
"0.56504554",
"0.5622083",
"0.5540928",
"0.55361724",
"0.55135417",
"0.55017436",
"0.54774535",
"0.5472122",
"0.5421953",
"0.5410877",
"0.53898007",
"0.53898007",
"0.5378303",
"0.5372698",
"0.5338041",
"0.53332454",
"0.5318813",
"0.53049016",
"0.5303652",
"0.52936816",
"0.52864003",
"0.5272059",
"0.52718955",
"0.5267836",
"0.52531725",
"0.5251474",
"0.5240416",
"0.5235565",
"0.52339244",
"0.5230011",
"0.5206874",
"0.51963276",
"0.5191442",
"0.5166751",
"0.516115",
"0.515156",
"0.51147753",
"0.51044744",
"0.50958925",
"0.50902766",
"0.50839263",
"0.50819916",
"0.5076883",
"0.5069805",
"0.5065814",
"0.50553966",
"0.5052161",
"0.5051094",
"0.50474256",
"0.5045787",
"0.5044981",
"0.5034089",
"0.50325453",
"0.5028846",
"0.5027833",
"0.5026795",
"0.50206494",
"0.5009269",
"0.5002899",
"0.49955875",
"0.49819326",
"0.4981336",
"0.4979833",
"0.49771687",
"0.49746886",
"0.49746835",
"0.49704668",
"0.49688354",
"0.49687463",
"0.4967085",
"0.4966563",
"0.49581277",
"0.49522132",
"0.4941304",
"0.4938607",
"0.49384308",
"0.4933873",
"0.4933565",
"0.4927097",
"0.49254903",
"0.49248204",
"0.4919481",
"0.49142784",
"0.4909454",
"0.4904263",
"0.4901128",
"0.49001664",
"0.4896917",
"0.4896629",
"0.48943737",
"0.48927772",
"0.48896047",
"0.48894903"
]
| 0.64470553 | 1 |
Try authenticating a device with an invalid token. | @Test
public void authenticateTestFailure2() {
DatabaseTest.setupDevice();
Device device = new Device(DatabaseTest.DEVICE_ID, "other_token");
assertFalse(device.authenticate());
DatabaseTest.cleanDatabase();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void authenticateTestFailure() {\n assertFalse(device.authenticate());\n }",
"protected void validateToken() {\n\n authToken = preferences.getString(getString(R.string.auth_token), \"\");\n saplynService = new SaplynService(preferences.getInt(debugLvl, -1), authToken);\n\n // Check if user already authenticated\n if (authToken.equals(\"\")) {\n Intent intent = new Intent(HomeActivity.this, AuthenticationActivity.class);\n startActivityForResult(intent, 0);\n }\n else {\n populateUser();\n }\n }",
"@Override\n\t\t\t\t\t\t\tpublic void onTokenIncorrect() {\n\t\t\t\t\t\t\t\t Log.d(\"LoginActivity\", \"--onTokenIncorrect\");\n\t\t\t\t\t\t\t}",
"@Test\n\tpublic void testAuthenticateAdminAccountWithInvalidToken() {\n\n\t\tString error = null;\n\t\tAdminAccount user = null;\n\t\ttry {\n\t\t\tuser = adminAccountService.authenticateAdminAccount(USERNAME2);\n\t\t} catch (InvalidInputException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\t\tassertNull(user);\n\t\t// check error\n\t\tassertEquals(\"An error occured. Please try again.\", error);\n\n\t}",
"void disableDevice(Device device, String token) throws AuthenticationException;",
"@Test\n public void smartIdInvalidFormat() throws Exception {\n String errorMessage = authenticateWithSmartIdInvalidInputPollError(\"12akl2\", 2000);\n assertEquals(\"Isikukood on ebakorrektses formaadis.Intsidendi number:\", errorMessage);\n }",
"public void testLoginWithWrongPIN() {\r\n short i;\r\n byte[] modifiedPin = new byte[pinCode.length];\r\n for (i = 0; i < pinCode.length; i++) {\r\n modifiedPin[i] = (byte) (pinCode[i] ^ 0xFF);\r\n }\r\n\r\n try {\r\n tokenHandler.loginPIN(modifiedPin);\r\n fail(\"Logging in with wrong PIN did not cause an exception\");\r\n } catch (TokenException e) {\r\n assertEquals(ReturnCodes.SW_PIN_VALIDATION_FAILED, e.getSW());\r\n }\r\n }",
"void checkToken(String token) throws InvalidTokenException;",
"public void testInvalidAuthenticationCredentials() throws Exception {\n client = new PaysafeApiClient(\"username\", \"password\", Environment.TEST, merchantAccountNumber);\n\n try {\n SingleUseToken sObjResponse = client.customerVaultService().createSingleUseToken(\n SingleUseToken.builder()\n .card()\n .holderName(\"Mr. John Smith\")\n .cardNum(\"4917480000000008\")\n .cardExpiry()\n .month(7)\n .year(2019)\n .done()\n .billingAddress()\n .street(\"100 Queen Street West\")\n .street2(\"Unit 201\")\n .city(\"Toronto\")\n .country(\"CA\")\n .state(\"ON\")\n .zip(\"M5H 2N2\")\n .done()\n .done()\n .build());\n\n Assert.assertEquals(\"5279\", sObjResponse.getError().getCode());\n Assert.assertEquals(\"The authentication credentials are invalid.\",\n sObjResponse.getError().getMessage());\n\n } catch (IOException ioExp) {\n // Log IO Exception\n if(Constants.DEBUG_LOG_VALUE)\n Utils.debugLog(\"EXCEPTION TEST: \" + ioExp.getMessage());\n } catch (PaysafeException oExp) {\n // Log Paysafe Exception\n if(Constants.DEBUG_LOG_VALUE)\n Utils.debugLog(\"EXCEPTION TEST: \" + oExp.getMessage());\n } catch (Exception e) {\n // Log Exception\n if(Constants.DEBUG_LOG_VALUE)\n Utils.debugLog(\"EXCEPTION TEST: \" + e.getMessage());\n }\n }",
"@Test\n\tpublic void loginWithInvalidCredentials(){\n\t\tapp.loginScreen().waitUntilLoaded();\n\t\tapp.loginScreen().logIn(Credentials.USER_INVALID.username, Credentials.USER_INVALID.password);\n\t\tassertTrue(app.loginScreen().isActive());\n\t}",
"@VisibleForTesting\n protected boolean validateToken(EzSecurityToken token) {\n try {\n securityClient.validateReceivedToken(token);\n } catch (EzSecurityTokenException e) {\n logger.error(\"Token validation failed. \", e);\n throw new SecurityException(\"Token failed validation\");\n }\n\n String fromId = token.getValidity().getIssuedTo();\n String toId = token.getValidity().getIssuedFor();\n if (!fromId.equals(toId) && !fromId.equals(deployerSecurityId)) {\n throw new SecurityException(String.format(\n \"This call can only be made from Deployer (%s) or INS services. From: %s - To: %s\",\n deployerSecurityId, fromId, toId));\n }\n\n return true;\n }",
"private void _verifyAuthCode(Device device,String authCode){\r\n \t\tdevice.setModified(0); // reset modified to get current time.\r\n \t\tif (device.getStatus() != DeviceStatus.Authing.getStatus()) {\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorStatusViolate,\r\n \t\t\t\t\t\"device auth status not match current status is \"+device.getStatus());\r\n \t\t}\r\n \t\t//\r\n \t\t// if device modified + timeout > current time then throw timeout exception.\r\n \t\t// check verify timeout\r\n \t\t//\r\n \t\tMap<String,Object> setting = applicationConfig.get(\"general\");\r\n \tlong time=java.util.Calendar.getInstance().getTimeInMillis()/1000;\r\n \t\tint timeout = (Integer)setting.get(\"auth_verify_timeout\");\r\n \tif (time > device.getModified() + timeout ) {\t\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorAuthExpired,\r\n \t\t\t\t\t\"verify mobile auth code has been timeout\");\r\n \t}\r\n \t\r\n \t\t//\r\n \t\t// check retry count\r\n \t\t//\r\n \t\tint retryLimit = (Integer)setting.get(\"auth_retry_limit\");\r\n \t\tif(logger.isDebugEnabled()) {\r\n \t\t\tlogger.debug(\"retry limit is \"+retryLimit+\" current auth retry is \"+device.getAuthRetry());\r\n \t\t}\r\n \t\tif (device.getAuthRetry() > retryLimit) {\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorExceedLimit,\r\n \t\t\t\t\t\"mobile verify auth retry too many time try:\"\r\n \t\t\t\t\t\t\t+ device.getAuthRetry() + \" > \" + retryLimit);\r\n \t\t}\r\n \r\n \t\t//\r\n \t\t// check auth code\r\n \t\t//\r\n \t\tString token = device.getToken();\r\n \t\tif (!authCode.equals(this.encodeUtility.decrypt(token, Device.ENCRYPT_KEY))) {\r\n \t\t\t//\r\n \t\t\t// if fail update retry status\r\n \t\t\t//\r\n \t\t\tlogger.debug(\"token not match, token is \"+token);\r\n \t\t\tint ret =deviceDao.updateStatusAndRetryCount(device.getId(), device.getUserId(),\r\n \t\t\t\t\tDeviceStatus.Authing.getStatus(),\r\n \t\t\t\t\tDeviceStatus.Init.getStatus(), device.getModified());\r\n \t\t\tif (ret != 1) {\r\n \t\t\t\tthrow new RentException(RentErrorCode.ErrorStatusViolate,\r\n \t\t\t\t\t\t\"update device status count is not 1\");\r\n \t\t\t}\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorAuthFail,\r\n \t\t\t\t\t\"device id \"+device.getId()+\" enter auth code not match\");\r\n \r\n \t\t}\r\n \t\t\r\n \t\t//\r\n \t\t// update device and user in database.\r\n \t\t//\r\n \t\tlogger.debug(\"update device status to authed\");\r\n \t\tdeviceDao.updateStatusAndRetryCount(device.getId(),device.getUserId(),\r\n \t\t\t\tDeviceStatus.Authed.getStatus(),\r\n \t\t\t\tDeviceStatus.Authing.getStatus(),\r\n \t\t\t\tdevice.getModified());\r\n \t\tUser user = device.getUser();\r\n \t\tif (user.getStatus() == UserStatus.Init.getStatus()){\r\n \t\t\tlogger.debug(\"update user status to authed\");\r\n \t\t\tuser.setModified((long)0);\r\n \t\t\tuserDao.updateUserStatus(user.getId(), UserStatus.Authed.getStatus()\r\n \t\t\t\t\t, UserStatus.Init.getStatus(), user.getModified());\r\n \t\t}\r\n \t\t\r\n \t}",
"private void authFailed() {\n Toast.makeText(LoginActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }",
"@Test(expected = UserNotInSessionException.class)\n public void invalidTokenAtGettingUsername4Token(){\n \tGetUsername4Token service = new GetUsername4Token(INVALIDTOKEN);\n service.execute();\n }",
"@Test\n public void smartIdEmptyCode() throws Exception {\n String errorMessage = authenticateWithSmartIdInvalidInputPollError(\"\", 2000);\n assertEquals(\"Isikukood puuduIntsidendi number:\", errorMessage);\n }",
"@Override\n\t\t\t\tpublic void onAuthenticationTokenError(@Nullable String errorMessage) {\n\t\t\t\t\tLog.e(TAG, \"onIdTokenError: Unable to get authentication token, error: \" + errorMessage);\n\t\t\t\t}",
"@Test\n @OperateOnDeployment(\"server\")\n public void shouldFailToGetResourceWhenTokenInvalid() {\n given().header(\"Authorization\", \"Bearer fake_access_token\").expect().statusCode(401).when().get(\n getBaseTestUrl() + \"/1/category/get/json/1\");\n }",
"private void checkAuthSessionToken() {\n val auth = config.getString(\"authSessionToken\");\n\n checkArgument(auth.length() > 10, \"auth string (sessionToken) length is less than or equal to 10!\");\n }",
"@Override\n public void onFailure(Call<String> call, Throwable t) {\n dismissProgress();\n SecurityLayer.generateToken(getApplicationContext());\n com.ceva.ubmobile.core.ui.Log.debug(\"otpvalidation\", t.toString());\n //showToast(getString(R.string.error_500));\n // prog.dismiss();\n // startDashBoard();\n }",
"@Override\n public void handleAuthTokenException(final Exception e) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (e instanceof GooglePlayServicesAvailabilityException) {\n // The Google Play services APK is old, disabled, or not present.\n // Show a dialog created by Google Play services that allows\n // the user to update the APK\n int statusCode = ((GooglePlayServicesAvailabilityException) e)\n .getConnectionStatusCode();\n /*Dialog dialog = GooglePlayServicesUtil.getErrorDialog(statusCode,\n HelloActivity.this,\n REQUEST_CODE_RECOVER_FROM_PLAY_SERVICES_ERROR);\n dialog.show(); */\n Toast.makeText(LoginActivity.this, \"Play services error.\", Toast.LENGTH_LONG).show();\n Log.d(this.getClass().getSimpleName(), \"Play services error: \" + statusCode);\n } else if (e instanceof UserRecoverableAuthException) {\n // Unable to authenticate, such as when the user has not yet granted\n // the app access to the account, but the user can fix this.\n // Forward the user to an activity in Google Play services.\n Intent intent = ((UserRecoverableAuthException) e).getIntent();\n startActivityForResult(intent, REQUEST_CODE_RECOVER_FROM_PLAY_SERVICES_ERROR);\n }\n }\n });\n }",
"@Override\n\tpublic void onDeviceLoginFailed(FunDevice funDevice, Integer errCode) {\n\n\t}",
"void sendAuthMessage(Device device) {\r\n \t//\r\n \t\t// check status and limit\r\n \t\t//\r\n \t\tint status = device.getStatus();\r\n \t\tif (status == DeviceStatus.Removed.getStatus()) {\r\n \t\t\tlogger.info(\"this device have been removed, but ask auth again\");\r\n \t\t\t\r\n \t\t} else if (status != DeviceStatus.Init.getStatus()\r\n \t\t\t\t&& status != DeviceStatus.Authing.getStatus()) {\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorStatusViolate, \"device status isn't init or authing\");\r\n \t\t}\r\n \t\t//\r\n \t\t// check retry count\r\n \t\t//\r\n \t\tint retryLimit = (Integer)applicationConfig.get(\"general\").get(\"auth_retry_limit\");\r\n \t\tint currentRetry = device.getAuthRetry();\r\n \t\tlogger.info(\"current retry count is \"+currentRetry);\r\n \t\tif (retryLimit < currentRetry ) {\r\n \t\t\t//\r\n \t\t\t// retry too many times, change to suspend status.\r\n \t\t\t//\r\n \t\t\tlogger.debug(\"update to suspend status\");\r\n \t\t\tint ret = deviceDao.updateStatusAndRetryCount(device.getId(),\r\n \t\t\t\t\tdevice.getUserId(), DeviceStatus.Suspend.getStatus(),\r\n \t\t\t\t\tDeviceStatus.Authing.getStatus(), device.getModified());\r\n \t\t\tif (ret != 1) {\r\n \t\t\t\tthrow new RentException(RentErrorCode.ErrorStatusViolate,\r\n \t\t\t\t\t\t\"update device status count is not 1\");\r\n \t\t\t}\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorExceedLimit,\r\n \t\t\t\t\t\"auth retry too many time try\");\r\n \t\t}\r\n \t\t\r\n \t\tUser user = device.getUser();\r\n \t\tAssert.assertNotNull(\"user can't be null\",user);\r\n \t\t\r\n \t\t//\r\n \t\t// prepare message.\r\n \t\t//\r\n \t\tString phone=encodeUtility.decrypt(user.getMobilePhone(), \"general\");\r\n \t ResourceBundle resource = ResourceBundle.getBundle(\"user\",user.getLocale());\r\n \t\tString message = MessageFormat.format(resource.getString(\"mobile_auth_message\"),\r\n \t\t\t\tdevice.getId(), encodeUtility.decrypt(device.getToken(), Device.ENCRYPT_KEY));\r\n \t\tlogger.debug(\"message is \"+message);\r\n \t\t//\r\n \t\t// update status\r\n \t\t//\r\n \t\tdevice.setModified(0);\r\n \t\tint ret =deviceDao.updateStatusAndRetryCount(device.getId(), device.getUserId(),\r\n \t\t\t\tDeviceStatus.Authing.getStatus(),\r\n \t\t\t\tDeviceStatus.Init.getStatus(), device.getModified());\r\n \t\tif (ret != 1) {\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorStatusViolate,\r\n \t\t\t\t\t\"update device status count is not 1\");\r\n \t\t}\r\n \r\n \t\t//\r\n \t\t// send message through gateway.\r\n \t\t//\r\n \t\tmobileGatewayService.sendSMS(phone, message);\r\n \t\tdevice.setAuthRetry(device.getAuthRetry()+1);\r\n \t\tdevice.setStatus(DeviceStatus.Authing.getStatus());\r\n \t}",
"void modifyDevice(Device device, String token) throws InvalidDeviceException, AuthenticationException;",
"private void _login() throws SecurityFeaturesException {\n try {\n _initChallengeResponse();\n } catch (InvalidKeyException e) {\n _showAlertWithMessage(getString(R.string.authentication_failure_title), getString(R.string.error_auth_invalid_key), false, false);\n } catch (InvalidChallengeException e) {\n _showAlertWithMessage(getString(R.string.authentication_failure_title), getString(R.string.error_auth_invalid_challenge), false, false);\n }\n }",
"@Test\n public void getDeviceTokenTest() throws ApiException {\n String deviceId = null;\n // DeviceTokenEnvelope response = api.getDeviceToken(deviceId);\n\n // TODO: test validations\n }",
"private void authenticate(NestToken token) {\n mNest.authWithToken(token, new NestListener.AuthListener() {\n\n @Override\n public void onAuthSuccess() {\n Log.v(TAG, \"Authentication succeeded.\");\n fetchData();\n }\n\n @Override\n public void onAuthFailure(NestException exception) {\n Log.e(TAG, \"Authentication failed with error: \" + exception.getMessage());\n Auth.saveAuthToken(mActivity, null);\n mNest.launchAuthFlow(mActivity, AUTH_TOKEN_REQUEST_CODE);\n }\n\n @Override\n public void onAuthRevoked() {\n Log.e(TAG, \"Auth token was revoked!\");\n Auth.saveAuthToken(mActivity, null);\n mNest.launchAuthFlow(mActivity, AUTH_TOKEN_REQUEST_CODE);\n }\n });\n }",
"private void attemptLogin() {\n /*if (userLoginTask != null) {\n Snackbar.make(idNumberET, \"Please wait...\", Snackbar.LENGTH_LONG).show();\n return;\n }*/\n\n // Reset errors.\n phoneNumberET.setError(null);\n idNumberET.setError(null);\n\n // Store values at the time of the login attempt.\n String phoneNumber = phoneNumberET.getText().toString();\n String idNumber = idNumberET.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n String simCardSN = null;\n if(Permissions.check(this, Manifest.permission.READ_PHONE_STATE)) {\n simCardSN = Device.getSimCardSN(this);\n }\n if(simCardSN == null) {\n cancel = true;\n Snackbar.make(idNumberET, \"You will need a simcard to sign in\", Snackbar.LENGTH_LONG).show();\n }\n\n if(cancel == false) {//first things first, make sure the simcard is accessible first\n if(idNumberET.getVisibility() == View.VISIBLE) {\n if (TextUtils.isEmpty(idNumber)) {\n idNumberET.setError(getString(R.string.error_invalid_phone_number));\n focusView = idNumberET;\n cancel = true;\n } else if(!isIdNumberValid(idNumber)) {\n idNumberET.setError(getString(R.string.error_incorrect_password));\n focusView = idNumberET;\n cancel = true;\n }\n } else {\n idNumber = null;\n }\n\n if (TextUtils.isEmpty(phoneNumber)) {\n phoneNumberET.setError(getString(R.string.error_invalid_phone_number));\n focusView = phoneNumberET;\n cancel = true;\n } else if (!isPhoneNumberValid(phoneNumber)) {\n phoneNumberET.setError(getString(R.string.error_incorrect_password));\n focusView = phoneNumberET;\n cancel = true;\n }\n\n if(cancel == false) {\n showProgress(true);\n Log.d(TAG,phoneNumber+\" \"+idNumber+\" \"+simCardSN);\n sendData(phoneNumber, simCardSN, idNumber);\n } else {\n focusView.requestFocus();\n }\n }\n }",
"private boolean autoAuthenticateDevice(String nonce) {\r\n\t\tString devCode = \"\";\r\n\t\tString authCode = \"\";\r\n\t\tString cr = \"\";\r\n\t\tMessage autoAuthenticate = new Message().addData(\"task\", \"transaction\").addData(\"message\",\r\n\t\t\t\t\"authenticate_device\");\r\n\t\tMessage reply;\r\n\r\n\t\ttry {\r\n\t\t\t// checks if file is existant and reads the device code\r\n\t\t\tFile device = new File(\"resources/device_\" + this.connectionData.getUsername());\r\n\t\t\tif (!device.exists()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(device));\r\n\t\t\tdevCode = br.readLine();\r\n\t\t\tbr.close();\r\n\t\t\t// generated authcode\r\n\t\t\tauthCode = devCode.split(\";\")[1];\r\n\t\t\tdevCode = devCode.split(\";\")[0];\r\n\r\n\t\t\tdevCode = this.connectionData.getAes().encode(devCode);\r\n\r\n\t\t\t// generate chalange-response\r\n\r\n\t\t\tcr = new Hash(authCode + nonce).toString();\r\n\t\t\tautoAuthenticate.addData(\"device\", devCode);\r\n\t\t\tautoAuthenticate.addData(\"cr\", cr);\r\n\t\t\tthis.connectionData.getConnection().write(autoAuthenticate);\r\n\t\t\treply = this.connectionData.getConnection().read();\r\n\t\t\tif (reply.getData(\"message\").equals(\"failed\")) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}",
"@Test\n public void testMalformedCredentialsHeader() {\n String header =\n authHeaderBearer(\"malformed_token\");\n\n Response r = target(\"/token\")\n .request()\n .header(AUTHORIZATION, header)\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n }",
"@Override\n public void onRequestToken() {\n Toast.makeText(getApplicationContext(), \"Your token has expired\", Toast.LENGTH_LONG).show();\n Log.i(\"Video_Call_Tele\", \"The token as expired..\");\n // mRtcEngine.renewToken(token);\n // https://docs.agora.io/en/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html#af1428905e5778a9ca209f64592b5bf80\n // Renew token - TODO\n }",
"public boolean validateUserToken(String login, String token) throws SQLException;",
"public void testCheckTokenEndPointIsDisabled() throws Exception {\n // perform POST to /oauth/check_token endpoint with authentication\n this.mockMvc\n .perform(MockMvcRequestBuilders.post(\"/oauth/check_token\").param(\"token\", \"some random value\")\n .principal(new UsernamePasswordAuthenticationToken(testClientId, \"\",\n Arrays.asList(new SimpleGrantedAuthority(\"ROLE_USER\")))))\n // we expect a 403 not authorized\n .andExpect(MockMvcResultMatchers.status().is(403));\n }",
"void fpAuthFailed(@Nullable String error);",
"@Override\n public void onError(MsalException exception) {\n Log.d(TAG, \"Authentication failed: \" + exception.toString());\n updateRefreshTokenUI(false);\n if (exception instanceof MsalClientException) {\n /* Exception inside MSAL, more info inside MsalError.java */\n assert true;\n\n } else if (exception instanceof MsalServiceException) {\n /* Exception when communicating with the STS, likely config issue */\n assert true;\n\n } else if (exception instanceof MsalUiRequiredException) {\n /* Tokens expired or no session, retry with interactive */\n assert true;\n }\n }",
"public synchronized String accessToken(String knownInvalidToken) {\n if (accessToken == null || (knownInvalidToken != null && accessToken.equals(knownInvalidToken))) {\n loadTokens();\n }\n\n return accessToken;\n }",
"public void authenticate() throws Exception {\n try {\n\n // Build the form body\n final FormBody.Builder formBodyBuilder = new FormBody.Builder().add(\"scope\", \"api-tenant\");\n\n // Has username/password\n if (appProps.getFodGrantType().equals(VulnerabilityReportConstants.GRANT_TYPE_PASSWORD)) {\n formBodyBuilder.add(\"grant_type\", VulnerabilityReportConstants.GRANT_TYPE_PASSWORD)\n .add(\"username\", appProps.getFodTenantId() + \"\\\\\" + appProps.getFodUsername())\n .add(\"password\", appProps.getFodPassword());\n } else // Has api key/secret\n {\n formBodyBuilder.add(\"grant_type\", VulnerabilityReportConstants.GRANT_TYPE_CLIENT_CREDENTIALS)\n .add(\"client_id\", appProps.getFodClientId())\n .add(\"client_secret\", appProps.getFodClientSecret());\n\n }\n final RequestBody formBody = formBodyBuilder.build();\n\n final Request request = new Request.Builder()\n .url(appProps.getFodAPIBaseURL() + \"/oauth/token\")\n .post(formBody)\n .build();\n final Response response = client.newCall(request).execute();\n \n if (!response.isSuccessful()) {\n \tlogger.debug(\"response::\" + response.message() + \", \" + response.code() + \", \" + response.toString());\n throw new FoDConnectionException(\"Unexpected code \" + response);\n }\n\n logger.info(\"Successful connection to Fortify On Demand!\");\n \n final String content = IOUtils.toString(response.body().byteStream(), \"utf-8\");\n response.body().close();\n\n // Parse the Response\n final JsonParser parser = new JsonParser();\n final JsonObject obj = parser.parse(content).getAsJsonObject();\n this.token = obj.get(\"access_token\").getAsString();\n\n } catch (final FoDConnectionException fce) {\n if (fce.getMessage().contains(VulnerabilityReportConstants.FOD_UNAUTORIZED)) {\n logger.error(\"FoD CONNECTION FAILED. Please check the FoD URL, username, tenant, and password and try again.\");\n logger.info(\"FoD URL=\" + appProps.getFodAPIBaseURL());\n logger.info(\"FoD GrantType=\" + appProps.getFodGrantType());\n logger.info(\"FoD client Id=\" + appProps.getFodClientId());\n logger.info(\"FoD username=\" + appProps.getFodUsername());\n logger.info(\"FoD tennant=\" + appProps.getFodTenantId());\n } else {\n logger.error(\"FoD Response was not successful with message: \" + fce.getMessage());\n }\n throw fce;\n }\n\n catch (final UnknownHostException uhe) {\n logger.error(\"Unknown Host Error. Are you connected to the internet?\");\n uhe.printStackTrace();\n throw uhe;\n }\n\n catch (final Exception e) {\n logger.error(\"Authentication to FoD failed. Connection seems OK.\");\n e.printStackTrace();\n throw e;\n }\n }",
"private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n mEMSIpview.setError(null);\n // Store values at the time of the login attempt.\n final String emsIP = mEMSIpview.getText().toString();\n final String email = mEmailView.getText().toString();\n final String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n if (TextUtils.isEmpty(emsIP)) {\n mEMSIpview.setError(\"Please enter an ems ip\");\n focusView = mEMSIpview;\n cancel = true;\n }\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n performNetworkOperations.doLogin(emsIP, email, password);\n// Toast.makeText(this,token,Toast.LENGTH_SHORT).show();\n// List<String> nodeData = performNetworkOperations.getNodesList(emsIP,token);\n\n }\n }",
"@Override\n public void onAuthenticationFailed() {\n }",
"@Override\n protected CommonResponse doWrongAuthentication(MultifactorStartRegistrationResponseData startRegistrationData, MultifactorStartAuthenticationResponseData startAuthenticationData) throws Exception {\n return finishAuthentication(BACKUP_STRING_PROVIDER,\n startRegistrationData.getDeviceId(),\n WRONG_CODE,\n null,\n null,\n null);\n }",
"@Test\n public void authenticateTestSucces() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);\n assertTrue(device.authenticate());\n DatabaseTest.cleanDatabase();\n }",
"public void testCtor_Failure() {\r\n try {\r\n new TCAuthToken(0);\r\n fail(\"IllegalArgumentException is expected.\");\r\n } catch (IllegalArgumentException e) {\r\n //success\r\n }\r\n }",
"@Test\n public void testInvalidAuthorizationHeader() {\n Response r = target(\"/token\")\n .request()\n .header(AUTHORIZATION, \"Not A Valid header\")\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n }",
"@Test\n public void testExpiredToken() {\n ApplicationContext context =\n TEST_DATA_RESOURCE\n .getSecondaryApplication()\n .getBuilder()\n .client(ClientType.AuthorizationGrant, true)\n .token(OAuthTokenType.Bearer, true, null, null, null)\n .build();\n OAuthToken t = context.getToken();\n\n String header = authHeaderBearer(t.getId());\n\n Response r = target(\"/token/private\")\n .request()\n .header(AUTHORIZATION, header)\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n }",
"public void failedLogin(){\n\t\tstate = ATM_State.LOGINID;\n\t\tgui.setDisplay(\"ID does not exist. \\n\"\n\t\t\t\t+ \"Enter your account ID: \\n\");\n\t}",
"private void tryLogin() {\n AsyncTask<String, Void, Boolean> task = new AsyncTask<String, Void, Boolean>(){\n @Override\n protected Boolean doInBackground(String... ci_session) {\n boolean isValid = PwcatsRequester.isValidCiSession(ci_session[0]);\n return isValid;\n }\n @Override\n protected void onPostExecute(Boolean isValid) {\n isLogined = isValid;\n showOrHideLogInOut(isLogined);\n if (!isValid)\n authLogout();\n TextView mNavAuthLogin = (TextView) findViewById(R.id.nav_auth_login);\n TextView mNavAuthLogout = (TextView) findViewById(R.id.nav_auth_logout);\n }\n };\n String ci_session = prefs.getString(getString(R.string.ci_session), null);\n task.execute(ci_session);\n }",
"public static String invalidAuthentication() {\n return holder.format(\"invalidAuthentication\");\n }",
"@Override\n public void onAuthenticationError(int errorCode, CharSequence errString) {\n }",
"@Override\n public void onAuthenticationFailed() {\n }",
"@Test\n public void AuthenticationShouldFailWithValidIPUser() throws Exception {\n kidozen = new KZApplication(AppSettings.KZ_TENANT, AppSettings.KZ_APP, AppSettings.KZ_KEY, false);\n final CountDownLatch alcd = new CountDownLatch(1);\n kidozen.Authenticate(AppSettings.KZ_USER, AppSettings.KZ_PASS, \"ups!\", new ServiceEventListener() {\n @Override\n public void onFinish(ServiceEvent e) {\n alcd.countDown();\n assertThat(e.StatusCode, equalTo(HttpStatus.SC_UNAUTHORIZED));\n assertTrue(e.Body.toLowerCase().contains(\"unauthorized\".toLowerCase()));\n }\n });\n assertEquals(false, kidozen.UserIsAuthenticated);\n alcd.await(TEST_TIMEOUT_IN_MINUTES, TimeUnit.MINUTES);\n }",
"@Test\n public void getTokenTest() {\n assertEquals(token, device.getToken());\n }",
"public void invalidLogin() {\n passwordField.setText(\"\");\n errorMessageLabel.setError(ErrorCode.LOGIN_INVALID_CREDENTIAL_ERROR);\n }",
"public JSONObject requestDeviceAuthTokens(String deviceCode) {\n try {\n String response = netUtils.post(authEndpoint,\n \"client_id=\" + clientId\n + \"&client_secret=\" + clientSecret\n + \"&code=\" + deviceCode\n + \"&grant_type=\" + grantType);\n\n if (response == null) {\n LOG.log(Level.FINE, \"pending authorization from user\");\n return null;\n }\n\n JSONParser j = new JSONParser();\n JSONObject jobj = (JSONObject) j.parse(response);\n if (jobj.containsKey(\"error\")) {\n LOG.log(Level.FINE, \"pending authorization from user\");\n return null;\n }\n return jobj;\n\n } catch (ParseException e) {\n LOG.log(Level.WARNING, \"google auth response parse failed\");\n }\n\n return null;\n }",
"private boolean verifyToken(final String token) {\n LOG.debug(token);\n if (!this.verificationToken.equals(token)) {\n LOG.error(Constants.VERIFICATION_TOKEN_INVALID);\n return false;\n }\n return true;\n }",
"@Test\n public void testBadPasswordHeader() {\n ApplicationContext context =\n TEST_DATA_RESOURCE.getSecondaryApplication().getBuilder()\n .client(ClientType.AuthorizationGrant, true)\n .build();\n Client c = context.getClient();\n\n String header = authHeaderBearer(c.getId());\n\n Response r = target(\"/token\")\n .request()\n .header(AUTHORIZATION, header)\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n }",
"public void testCtor_Failure1() {\r\n try {\r\n new TCAuthToken(-2);\r\n fail(\"IllegalArgumentException is expected.\");\r\n } catch (IllegalArgumentException e) {\r\n //success\r\n }\r\n }",
"protected boolean authenticate() {\n \tif (mConfig == null) {\n \t\tmConfig = getConfig();\n \t}\n \tString keys[] = getKeys();\n \tif (keys != null) {\n\t mConfig = api.authenticateToken(keys[0], keys[1], mConfig);\n\t if (mConfig != null) {\n\t return true;\n\t }\n \t}\n \tshowToast(\"Failed user authentication for stored login tokens.\");\n \tclearKeys();\n \tsetLoggedIn(false);\n \treturn false;\n }",
"private void attemptLogin() {\n String email = text_email.getText().toString();\n String password = text_password.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n text_password.setError(getString(R.string.error_field_required));\n focusView = text_password;\n cancel = true;\n }\n if (!isPasswordValid(password)) {\n text_password.setError(getString(R.string.error_invalid_password));\n focusView = text_password;\n cancel = true;\n }\n\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n text_email.setError(getString(R.string.error_field_required));\n focusView = text_email;\n cancel = true;\n } else if (!isEmailValid(email)) {\n text_email.setError(getString(R.string.error_invalid_email));\n focusView = text_email;\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n //showProgress(true);\n login(USER_NORMAL);\n }\n }",
"void onAuthenticationError(Throwable throwable);",
"static void verifyAccount(@NonNull Context context,\n @NonNull Credentials credentials,\n @Nullable String fcmToken,\n @NonNull String code,\n @Nullable String pin,\n @Nullable String basicStorageCredentials,\n @Nullable TokenResponse kbsTokenResponse,\n @NonNull VerifyCallback callback)\n {\n new AsyncTask<Void, Void, Result>() {\n\n private volatile LockedException lockedException;\n private volatile TokenResponse kbsToken;\n\n @Override\n protected Result doInBackground(Void... voids) {\n final boolean pinSupplied = pin != null;\n final boolean tryKbs = kbsTokenResponse != null;\n\n try {\n kbsToken = kbsTokenResponse;\n verifyAccount(context, credentials, code, pin, kbsTokenResponse, basicStorageCredentials, fcmToken);\n return Result.SUCCESS;\n } catch (KeyBackupSystemNoDataException e) {\n Log.w(TAG, \"No data found on KBS\");\n return Result.KBS_ACCOUNT_LOCKED;\n } catch (KeyBackupSystemWrongPinException e) {\n kbsToken = e.getTokenResponse();\n return Result.KBS_WRONG_PIN;\n } catch (LockedException e) {\n if (pinSupplied && tryKbs) {\n throw new AssertionError(\"KBS Pin appeared to matched but reg lock still failed!\");\n }\n\n Log.w(TAG, e);\n lockedException = e;\n if (e.getBasicStorageCredentials() != null) {\n try {\n kbsToken = getToken(e.getBasicStorageCredentials());\n if (kbsToken == null || kbsToken.getTries() == 0) {\n return Result.KBS_ACCOUNT_LOCKED;\n }\n } catch (IOException ex) {\n Log.w(TAG, e);\n return Result.ERROR;\n }\n }\n return Result.PIN_LOCKED;\n } catch (RateLimitException e) {\n Log.w(TAG, e);\n return Result.RATE_LIMITED;\n } catch (IOException e) {\n Log.w(TAG, e);\n return Result.ERROR;\n }\n }\n\n @Override\n protected void onPostExecute(Result result) {\n switch (result) {\n case SUCCESS:\n handleSuccessfulRegistration(context);\n callback.onSuccessfulRegistration();\n break;\n case PIN_LOCKED:\n if (kbsToken != null) {\n if (lockedException.getBasicStorageCredentials() == null) {\n throw new AssertionError(\"KBS Token set, but no storage credentials supplied.\");\n }\n Log.w(TAG, \"Reg Locked: V2 pin needed for registration\");\n callback.onKbsRegistrationLockPinRequired(lockedException.getTimeRemaining(), kbsToken, lockedException.getBasicStorageCredentials());\n } else {\n Log.w(TAG, \"Reg Locked: V1 pin needed for registration\");\n callback.onV1RegistrationLockPinRequiredOrIncorrect(lockedException.getTimeRemaining());\n }\n break;\n case RATE_LIMITED:\n callback.onRateLimited();\n break;\n case ERROR:\n callback.onError();\n break;\n case KBS_WRONG_PIN:\n Log.w(TAG, \"KBS Pin was wrong\");\n callback.onIncorrectKbsRegistrationLockPin(kbsToken);\n break;\n case KBS_ACCOUNT_LOCKED:\n Log.w(TAG, \"KBS Account is locked\");\n callback.onKbsAccountLocked(lockedException != null ? lockedException.getTimeRemaining() : null);\n break;\n }\n }\n }.executeOnExecutor(SignalExecutors.UNBOUNDED);\n }",
"public InvalidTokenException(@Nonnull String token) {\n if (token == null) {\n throw new NullPointerException(\"token\");\n }\n\n this.token = token;\n }",
"private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n // Reset errors.\r\n mPhoneView.setError(null);\r\n mPasswordView.setError(null);\r\n\r\n // Store values at the time of the login attempt.\r\n String phone = mPhoneView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n // Check for a valid password, if the user entered one.\r\n if (TextUtils.isEmpty(password)) {\r\n mPasswordView.setError(getString(R.string.error_field_required));\r\n focusView = mPasswordView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid phone address.\r\n if (TextUtils.isEmpty(phone)) {\r\n mPhoneView.setError(getString(R.string.error_field_required));\r\n focusView = mPhoneView;\r\n cancel = true;\r\n } else if (!isPhoneValid(phone)) {\r\n mPhoneView.setError(getString(R.string.error_invalid_phone));\r\n focusView = mPhoneView;\r\n cancel = true;\r\n }\r\n\r\n if (cancel) {\r\n // There was an error; don't attempt login and focus the first\r\n // form field with an error.\r\n focusView.requestFocus();\r\n } else {\r\n // Show a progress spinner, and kick off a background task to\r\n // perform the user login attempt.\r\n showProgress(true);\r\n mAuthTask = new UserLoginTask(phone, password);\r\n mAuthTask.execute((Void) null);\r\n }\r\n }",
"@Override\n public void onError(MsalException exception) {\n Log.d(TAG, \"Authentication failed: \" + exception.toString());\n displayError(exception);\n\n if (exception instanceof MsalClientException) {\n /* Exception inside MSAL, more info inside MsalError.java */\n } else if (exception instanceof MsalServiceException) {\n /* Exception when communicating with the STS, likely config issue */\n } else if (exception instanceof MsalUiRequiredException) {\n /* Tokens expired or no session, retry with interactive */\n }\n }",
"@PostMapping(\"/token\")\n public ResponseEntity<Object> validateToken(@RequestParam(\"token\") String token) { \t\n \t\tUserLog userlog = authenticationService.authenticateByToken(token); \n \t\tif(userlog == null) {\n \t\t\t// risp.: 401\n \t\t\treturn new ResponseEntity<>(new UserLog(), HttpStatus.NOT_FOUND);\n \t\t}\n \t\treturn new ResponseEntity<>(userlog, HttpStatus.OK); \t\n }",
"private Optional<Identificacion> validarToken(final String token) {\n\t\tif (token != null && !token.isEmpty()) {\n\t\t\t// TODO Obtener el ID del token de keycloak\n\t\t\treturn Optional.of(new Identificacion(0));\n\t\t} else {\n\t\t\treturn Optional.empty();\n\t\t}\n\t}",
"@Test\n public void doFailedAuthTest() {\n// loadInvalidCredentials();\n//\n// final RestClient restClient = new HttpClientRestClient();\n// restClient.init(testConfig);\n//\n// final SsoSessionRefreshHandler handler = new SsoSessionRefreshHandler(\n// testConfig.getSsoLoginCredentials(),\n// pardotClient\n// );\n//\n// // Sanity check\n// assertFalse(testConfig.getSsoLoginCredentials().hasAccessToken());\n//\n// // Validate not yet valid\n// assertFalse(\"should not yet be valid\", handler.isValid());\n//\n// // Call method with valid credentials and this should throw LoginFailedException.\n// assertThrows(LoginFailedException.class, handler::refreshCredentials);\n//\n// // Sanity check\n// assertFalse(testConfig.getSsoLoginCredentials().hasAccessToken());\n }",
"@Test\n public void testTokenEndPointNoParams() throws Exception {\n refreshRequestAndResponse();\n request.setRequestURI(\"/v2/token\");\n request.setMethod(\"POST\");\n handlerAdapter.handle(request, response, controller);\n logger.info(\"testTokenEndPointNoParams() => \" + response.getContentAsString());\n \n assertTrue(response.getContentAsString().contains(ERR_RESPONSE));\n assertTrue( response.getStatus() == HttpServletResponse.SC_BAD_REQUEST ||\n response.getStatus() == HttpServletResponse.SC_UNAUTHORIZED );\n }",
"@Test\n public void testTokenEndPointAnonymousTokenRequestWithInvalidScope() throws Exception {\n String callback = \"Backplane.callback\";\n \n refreshRequestAndResponse();\n \n request.setRequestURI(\"/v2/token\");\n request.setMethod(\"GET\");\n request.setParameter(\"grant_type\", \"client_credentials\");\n setOAuthBasicAuthentication(request, \"anonymous\", \"\");\n request.setParameter(\"scope\",\"channel:notmychannel\");\n request.setParameter(\"callback\", callback);\n \n handlerAdapter.handle(request, response, controller);\n logger.info(\"testTokenEndPointAnonymousTokenRequestWithInvalidScope() => \" + response.getContentAsString());\n assertTrue(response.getContentAsString().contains(ERR_RESPONSE));\n \n refreshRequestAndResponse();\n \n request.setRequestURI(\"/v2/token\");\n request.setMethod(\"GET\");\n request.setParameter(\"grant_type\", \"client_credentials\");\n setOAuthBasicAuthentication(request, \"anonymous\", \"\");\n request.setParameter(\"scope\",\"bus:notmybus\");\n request.setParameter(\"callback\", callback);\n \n handlerAdapter.handle(request, response, controller);\n logger.info(\"testTokenEndPointAnonymousTokenRequestWithInvalidScope() => \" + response.getContentAsString());\n assertTrue(response.getContentAsString().contains(ERR_RESPONSE));\n }",
"@Override\n public void onFailure(Call<TokenApiResponse> call, Throwable t) {\n Log.e(LOG_TAG, t.getMessage());\n tokenCallback.onError(t);\n\n }",
"@Override\n\tpublic Response validateToken(\n\t\t\tString user,\n\t\t\tString token,\n\t\t\tString client_id,//client_id from the app calling the API\n\t\t\tString url,\n\t\t\tString method){\n\n\t\ttry{\t\t\t\n\t\t\tOA2Response result = sessionHandler.validateSession(client_id, user, token, url, method);\n\t\t\treturn Response.ok(result).build();\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\toa2logger.logError(httpRequest, Level.SEVERE, e.getLocalizedMessage());\n\t\t\treturn Response.status(Status.INTERNAL_SERVER_ERROR).\n\t\t\t\t\tentity(new OA2Response(500, \"Internal server Error.\"))\n\t\t\t\t\t.build();\n\t\t}\n\t}",
"@Override\n public void authenticate() throws IOException, BadAccessIdOrKeyException {\n try{\n HttpPost post = new HttpPost(Constants.FRGXAPI_TOKEN);\n List<NameValuePair> params = new ArrayList<>();\n params.add(new BasicNameValuePair(\"grant_type\", \"apiAccessKey\"));\n params.add(new BasicNameValuePair(\"apiAccessId\", accessId));\n params.add(new BasicNameValuePair(\"apiAccessKey\", accessKey));\n post.setEntity(new UrlEncodedFormEntity(params, \"UTF-8\"));\n\n HttpResponse response = client.execute(post);\n String a = response.getStatusLine().toString();\n\n if(a.equals(\"HTTP/1.1 400 Bad Request\")){\n throw (new BadAccessIdOrKeyException(\"Bad Access Id Or Key\"));\n }\n HttpEntity entity = response.getEntity();\n String responseString = EntityUtils.toString(response.getEntity());\n\n JsonParser jsonParser = new JsonParser();\n JsonObject jo = (JsonObject) jsonParser.parse(responseString);\n if(jo.get(\"access_token\") == null){\n throw new NullResponseException(\"The Access Token you get is null.\");\n }\n String accessToken = jo.get(\"access_token\").getAsString();\n List<Header> headers = new ArrayList<>();\n headers.add(new BasicHeader(HttpHeaders.CONTENT_TYPE, \"application/json\"));\n headers.add(new BasicHeader(\"Authorization\", \"Bearer \" + accessToken));\n\n client = HttpClients.custom().setDefaultHeaders(headers).build();\n } catch (NullResponseException e) {\n System.out.println(e.getMsg());\n }\n }",
"@SuppressLint(\"CommitPrefEdits\") // Preferences change needs to be synchronous\n public void invalidateToken() {\n preferences.edit().remove(getString(R.string.auth_token)).commit();\n validateToken();\n }",
"@Test\n\tpublic void testLoginAdminAccountWithInvalidCredentials() {\n\t\tassertEquals(2, adminAccountService.getAllAdminAccounts().size());\n\n\t\tString error = null;\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.loginAdminAccount(USERNAME2, PASSWORD1);\n\t\t} catch (InvalidInputException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\n\t\tassertNull(user);\n\t\t// check error\n\t\tassertEquals(\"Username or password incorrect. Please try again.\", error);\n\t}",
"@Test\n public void testInvalidBearerHeader() {\n Response r = target(\"/token\")\n .request()\n .header(AUTHORIZATION, \"Bearer some_secluded_rendezvous\")\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n }",
"public NonAuthenticatedJwtToken(final String token) {\n super(null);\n this.token = token;\n super.setAuthenticated(false);\n }",
"@Test\n public void testConnectionWhenBadUser() {\n \tForm form = new Form();\n \tform.param(\"login\", \"test\");\n \tform.param(\"psw\", \"12345\");\n \t\n \tResponse connect = target.path(auth).request().post(Entity.form(form));\n \tassertEquals(530,connect.getStatus());\n }",
"private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n // Reset errors.\r\n mIPView.setError(null);\r\n mPortView.setError(null);\r\n mUsernameView.setError(null);\r\n mPasswordView.setError(null);\r\n\r\n // Store values at the time of the login attempt.\r\n String ip = mIPView.getText().toString();\r\n int port = 0;\r\n try {\r\n port = Integer.parseInt(mPortView.getText().toString());\r\n }catch (Exception e){\r\n\r\n }\r\n String username = mUsernameView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n // Check for a valid ip address.\r\n if (TextUtils.isEmpty(ip)) {\r\n mIPView.setError(getString(R.string.error_field_required));\r\n focusView = mIPView;\r\n cancel = true;\r\n } else if (!isIPValid(ip)) {\r\n mIPView.setError(getString(R.string.error_invalid_ip));\r\n focusView = mIPView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid port.\r\n if (TextUtils.isEmpty(\"\"+port)) {\r\n mPortView.setError(getString(R.string.error_field_required));\r\n focusView = mPortView;\r\n cancel = true;\r\n }else if(port != (int)port){\r\n mPortView.setError(getString(R.string.error_invalid_port));\r\n focusView = mPortView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid username.\r\n if (TextUtils.isEmpty(username)) {\r\n mUsernameView.setError(getString(R.string.error_field_required));\r\n focusView = mUsernameView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid password, if the user entered one.\r\n if (TextUtils.isEmpty(password)) {\r\n mPasswordView.setError(getString(R.string.error_field_required));\r\n focusView = mPasswordView;\r\n cancel = true;\r\n }\r\n\r\n if (cancel) {\r\n // There was an error; don't attempt login and focus the first\r\n // form field with an error.\r\n focusView.requestFocus();\r\n } else {\r\n // Show a progress spinner, and kick off a background task to\r\n // perform the user login attempt.\r\n showProgress(true);\r\n mAuthTask = new UserLoginTask(ip, port, username, password);\r\n mAuthTask.execute((Void) null);\r\n }\r\n }",
"public boolean onAuthErrorOccured(Request<E> request);",
"private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n final String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n if(isOnline()){\n try {\n ApiRequests.POST(\"login/\", new Callback() {\n @Override\n public void onFailure(Call call, final IOException e) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Log.e(\"error:\", \"burda\");\n }\n });\n }\n\n @Override\n public void onResponse(Call call, final Response response) throws IOException {\n\n try {\n processTheResponse(response.body().string());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, email, password);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n else {\n InternetConnectionError();\n }\n }\n }",
"private void handleFaceAuthFailed() {\n Assert.isMainThread();\n setFaceRunningState(0);\n for (int i = 0; i < this.mCallbacks.size(); i++) {\n KeyguardUpdateMonitorCallback keyguardUpdateMonitorCallback = this.mCallbacks.get(i).get();\n if (keyguardUpdateMonitorCallback != null) {\n keyguardUpdateMonitorCallback.onBiometricAuthFailed(BiometricSourceType.FACE);\n }\n }\n }",
"@Override\n public void onFailure(@NonNull Exception e) {\n\n Log.i(TAG,\"An error occurred\" +e.getMessage());\n String exception=e.getMessage();\n int index=exception.indexOf(\":\");\n String data=exception.substring(index+1).trim();\n showMessage(\"Error\",data,R.drawable.ic_error_dialog);\n Toast.makeText(getApplicationContext(), \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n progressBar.setVisibility(View.GONE);\n\n }",
"public static GoogleIdToken.Payload checkToken(String tokenString)\n\t\t\tthrows UnauthorizedException {\n\n\t\t// TODO: validate auth token, client id, etc.\n\t\tAuthChecker checker = new AuthChecker(\n\t\t\t\tUniversalConstants.APP_CLIENT_IDS, Constants.WEB_CLIENT_ID);\n\n\t\ttry {\n\t\t\tGoogleIdToken.Payload payload = checker.check(tokenString);\n\n\t\t\tif (checker.isValid() || AppConfig.isTest()) {\n\n\t\t\t\treturn payload;\n\t\t\t} else {\n\n\t\t\t\tthrow new UnauthorizedException(\"Invalid Auth With Problem: \"\n\t\t\t\t\t\t+ checker.problem());\n\t\t\t}\n\t\t} catch (GeneralSecurityException e) {\n\t\t\t// TODO: flag the security error\n\t\t\tthrow new UnauthorizedException(\"Security Error: \"\n\t\t\t\t\t+ e.getLocalizedMessage());\n\t\t}\n\n\t}",
"private void authenticateSimulatedDevice() {\n mSimulatedDevice.writeln(TestsConfig.deviceWelcome.toString());\n TestsConfig.delay(300);\n \n // check if everything is ok, and get the device instance\n mDeviceInstance = mMainServer.getDevice(\n TestsConfig.deviceWelcome.getString(\"identifier\"));\n assertNotNull(mDeviceInstance);\n }",
"public void testLoginPIN() {\r\n try {\r\n tokenHandler.loginPIN(pinCode);\r\n tokenHandler.logoutPIN();\r\n } catch (Exception e) {\r\n fail(e.toString());\r\n }\r\n }",
"@Test(groups=\"authentication\")\n public void noCredential() throws Exception {\n expect().\n body(\"error\", equalTo(401)).\n get(\"/openidm/managed/user?_queryId=query-all-ids\");\n }",
"private void attemptLogin() {\n if (isLoggingIn) {\n return;\n }\n\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!Utils.isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_field_required));\n focusView = mPasswordView;\n cancel = true;\n } else if (!Utils.isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n if (!HttpUtils.isNetworkAvailable(this.getApplicationContext())) {\n Toast.makeText(this.getApplicationContext(), \"No internet\", Toast.LENGTH_SHORT).show();\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(mPasswordView.getWindowToken(), 0);\n\n LoginApi.executeLogin(this, email, password);\n }\n }",
"void onIncorrectKbsRegistrationLockPin(@NonNull TokenResponse kbsTokenResponse);",
"public String LoginServiceToken(String token) {\n return token =\n given().log().all().accept(\"text/plain, */*\")\n .headers(\n \"App-Code\", APPCODE,\n \"X-IBM-Client-Id\", IBMCLIENTID\n )\n .and().given().contentType(\"application/x-www-form-urlencoded\")\n .and().given().body(\"grant_type=password&scope=security&username=\"+MXUSER+\"&password=\"+PWD+\"&client_id=\"+IBMCLIENTID)\n .when().post(AZUREURL+\"/v2/secm/oam/oauth2/token\")\n .then().log().ifError().assertThat().statusCode(200)\n .extract().path(\"oauth2.access_token\").toString();\n\n }",
"private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n mUsrView.setError(null);\n mPasswordView.setError(null);\n\n String usr = mUsrView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n Tuple<String, String> creds = /*getCredentials()*/ SERVER_CREDENTIALS;\n\n boolean cancel = false;\n View focusView = null;\n\n if (!TextUtils.isEmpty(password)) {\n if (!mPasswordView.getText().toString().equals(creds.y)) {\n if (Util.D) Log.i(\"attemptLogin\", \"pwd was \" + mPasswordView.getText().toString());\n mPasswordView.setError(getString(R.string.error_incorrect_creds));\n cancel = true;\n }\n focusView = mPasswordView;\n }\n\n if (TextUtils.isEmpty(usr)) {\n mUsrView.setError(getString(R.string.error_field_required));\n focusView = mUsrView;\n cancel = true;\n } else if (!usr.equals(creds.x)) {\n mUsrView.setError(getString(R.string.error_incorrect_creds));\n focusView = mUsrView;\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n if (prefs != null)\n prefs.edit().putBoolean(getString(R.string.settingAuthorized), true);\n showProgress(true);\n mAuthTask = new UserLoginTask(usr, password);\n mAuthTask.execute((Void) null);\n }\n }",
"private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n login(email, password);\n\n }\n }",
"public void failedPin(){\n\t\tstate = ATM_State.LOGINPIN;\n\t\tgui.setDisplay(\"Login failed. \\n\"\n\t\t\t\t+ \"Enter your account PIN: \\n\");\n\t}",
"@Override\n public void onFailure(Auth0Exception error) {\n showNextActivity();\n }",
"public void validarToken() {\r\n\t\ttry {\r\n\t\t\tif (getToken() == null || getToken().trim().isEmpty())\r\n\t\t\t\tMensaje.crearMensajeWARN(\"Debe ingresar su token para continuar.\");\r\n\t\t\telse if (!mngRes.verificarTokenEstudiante(getEstudiante().getId(), getToken()))\r\n\t\t\t\tMensaje.crearMensajeWARN(\"Su token es incorrecto. Verifíquelo.\");\r\n\t\t\telse {\r\n\t\t\t\treserva = mngRes.buscarReservaPorID(getDniEstudiante(), periodo.getPrdId());\r\n\t\t\t\tif (reserva != null && reserva.getResEstado().equals(Funciones.estadoFinalizado))\r\n\t\t\t\t\tMensaje.crearMensajeWARN(\"Usted ya posee una reserva finalizada:\");\r\n\t\t\t\telse {\r\n\t\t\t\t\ttokenOk = true;\r\n\t\t\t\t\tmayorEdad = Funciones.mayorDeEdad(getEstudiante().getMatFechaNacimiento());\r\n\t\t\t\t\tcargarSitiosLibres();\r\n\t\t\t\t\tRequestContext.getCurrentInstance().execute(\"PF('dlgtoken').hide();\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tsetToken(\"\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tMensaje.crearMensajeERROR(\"Error al validar token: \" + e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Test\n public void testValidToken() {\n try {\n int coachId = authBO.getUserIdAndValidateToken(\"thisisaworkingtoken\");\n Assert.assertTrue(coachId == 1);\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(e.getMessage());\n }\n }",
"public void tryLogin() {\n\t\tcontroller.setupClient(txtNickname.getText());\n\t\tString cardDesign = comboBoxCardDesign.getSelectionModel()\n\t\t\t\t.getSelectedItem();\n\t\tConfiguration.chooseCardDesign(cardDesign);\n\t\tConfiguration.chooseMeepleDesign(cardDesign);\n\t}",
"@Test\n public void testNoAuthorization() {\n Response r = target(\"/token\")\n .request()\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n }",
"@Test\n public void testConnectionWhenBadPass() {\n \tForm form = new Form();\n \tform.param(\"login\", \"user\");\n \tform.param(\"psw\", \"00000\");\n \t\n \tResponse connect = target.path(auth).request().post(Entity.form(form));\n \tassertEquals(530,connect.getStatus());\n }",
"public void testLoginWithWrongPUK() {\r\n short i;\r\n byte[] modifiedPuk = new byte[pukCode.length];\r\n for (i = 0; i < pukCode.length; i++) {\r\n modifiedPuk[i] = (byte) (pukCode[i] ^ 0xFF);\r\n }\r\n\r\n try {\r\n tokenHandler.loginPUK(modifiedPuk);\r\n fail(\"Logging in with wrong PUK did not cause an exception\");\r\n } catch (TokenException e) {\r\n assertEquals(ReturnCodes.SW_PUK_VALIDATION_FAILED, e.getSW());\r\n }\r\n }",
"private void attemptConnect() {\r\n if (mConnectTask != null) {\r\n return;\r\n }\r\n\r\n // Reset errors.\r\n mNameView.setError(null);\r\n mKeyView.setError(null);\r\n\r\n // Store values at the time of the login attempt.\r\n String name = mNameView.getText().toString();\r\n String key = mKeyView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n // Check for a valid name, if the user entered one.\r\n if (TextUtils.isEmpty(name)) {\r\n mNameView.setError(getString(R.string.error_invalid_password));\r\n focusView = mNameView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid email address.\r\n if (TextUtils.isEmpty(key)) {\r\n mKeyView.setError(getString(R.string.error_field_required));\r\n focusView = mKeyView;\r\n cancel = true;\r\n }\r\n\r\n if (cancel) {\r\n // There was an error; don't attempt login and focus the first\r\n // form field with an error.\r\n focusView.requestFocus();\r\n } else {\r\n // Show a progress spinner, and kick off a background task to\r\n // perform the user login attempt.\r\n mConnectTask = new ConnectTask(this, name, key);\r\n mConnectTask.execute((Void) null);\r\n }\r\n }",
"private String validateToken(String url, String apiKey, String userId, String format, String token)\n throws AuthenticationFailedException {\n BufferedReader in = null;\n HttpURLConnection urlConnection = null;\n StringBuilder builder;\n if (log.isDebugEnabled()) {\n log.debug(\"Token validation URL: \" + url);\n }\n if (StringUtils.isEmpty(url)) {\n return \"\";\n } else {\n try {\n URL obj = new URL(url + Token2Constants.API + Token2Constants.EQUAL + apiKey + Token2Constants.AMPERSAND +\n Token2Constants.TOKEN + Token2Constants.EQUAL + token + Token2Constants.AMPERSAND +\n Token2Constants.USER_ID + Token2Constants.EQUAL + userId + Token2Constants.AMPERSAND +\n Token2Constants.FORMAT + Token2Constants.EQUAL + format);\n urlConnection = (HttpURLConnection) obj.openConnection();\n urlConnection.setRequestMethod(Token2Constants.GET_METHOD);\n in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));\n builder = new StringBuilder();\n String inputLine = in.readLine();\n while (inputLine != null) {\n builder.append(inputLine).append(\"\\n\");\n inputLine = in.readLine();\n }\n if (log.isDebugEnabled()) {\n log.debug(\"response: \" + builder.toString());\n }\n } catch (MalformedURLException e) {\n throw new AuthenticationFailedException(\"Invalid URL\", e);\n } catch (ProtocolException e) {\n throw new AuthenticationFailedException(\"Error while setting the HTTP request method\", e);\n } catch (IOException e) {\n throw new AuthenticationFailedException(\"Error in I/O Streams\" + e.getMessage(), e);\n } finally {\n try {\n if (in != null) {\n in.close();\n }\n } catch (IOException e) {\n log.error(\"Couldn't close the I/O Streams\", e);\n }\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n }\n return builder.toString();\n }\n }",
"protected void checkToken(){\n DBManager dao = new DBManager(appContext);\n dao= dao.open();\n Cursor c = dao.selectionner();\n if (c.getCount()>0) {\n System.out.println(\"Base activity token:\"+c.getCount());\n System.out.println(\"Base activity token:\"+c.getString(0));\n Intent main =new Intent(this, SplashScreenActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(main);\n } else {\n System.out.println(\"No token Found\");\n Intent main = new Intent(this, LoginActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(main);\n }\n }"
]
| [
"0.64344186",
"0.63598055",
"0.6214004",
"0.59219736",
"0.57711023",
"0.5769175",
"0.56638026",
"0.5607129",
"0.55992377",
"0.55801964",
"0.55777",
"0.5546856",
"0.55389816",
"0.54972714",
"0.5478554",
"0.5424878",
"0.5404034",
"0.5397922",
"0.53841156",
"0.5350726",
"0.53481376",
"0.530619",
"0.52920884",
"0.52879107",
"0.52809966",
"0.5258928",
"0.52545315",
"0.5224503",
"0.521658",
"0.5212927",
"0.5193251",
"0.51863635",
"0.5171486",
"0.5160266",
"0.51599604",
"0.5148841",
"0.5142577",
"0.51420355",
"0.5141109",
"0.5130453",
"0.5126672",
"0.512497",
"0.5114887",
"0.511418",
"0.51116645",
"0.5100706",
"0.5095991",
"0.50888944",
"0.50862724",
"0.5068059",
"0.5063339",
"0.5061095",
"0.5060891",
"0.5058909",
"0.5044024",
"0.5037989",
"0.50300854",
"0.5027882",
"0.50265175",
"0.50173765",
"0.50158894",
"0.50147736",
"0.5009171",
"0.5007064",
"0.5001948",
"0.49932343",
"0.49847052",
"0.49822176",
"0.49728593",
"0.49708715",
"0.49678424",
"0.4967201",
"0.49634874",
"0.49621472",
"0.49615577",
"0.4954514",
"0.49464944",
"0.4943944",
"0.49431106",
"0.4942968",
"0.49336562",
"0.49311328",
"0.4927052",
"0.49230352",
"0.49225986",
"0.49192947",
"0.4914853",
"0.49135092",
"0.49117538",
"0.49048245",
"0.49013057",
"0.48994926",
"0.48953864",
"0.4886576",
"0.4880159",
"0.48739448",
"0.48693627",
"0.48656368",
"0.4865506",
"0.4865249"
]
| 0.6661829 | 0 |
Try converting the device fields to JSON. | @Test
public void toJsonTest() {
JsonObject jsonObject = device.toJson();
assertEquals(deviceID, jsonObject.get("deviceID").getAsString());
assertEquals(token, jsonObject.get("token").getAsString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void fingerprintDataConvertedtoJSON() {\n String msgStr = \"\";\n JSONObject jsonObject = new JSONObject();\n\n try {\n /* jsonObject.put(\"errcode\", \"errcode1\");\n jsonObject.put(\"errInfo\", \"errInfo1\");\n jsonObject.put(\"fCount\", \"fCount1\");\n jsonObject.put(\"fType\", \"fType1\");\n jsonObject.put(\"iCount\", \"iCount1\");\n jsonObject.put(\"iType\", \"iType1\");\n jsonObject.put(\"pCount\", \"pCount1\");\n jsonObject.put(\"pType\", \"pType1\");\n jsonObject.put(\"nmPoints\", \"nmPoints1\");\n jsonObject.put(\"qScore\", \"qScor1e\");\n jsonObject.put(\"dpID\", \"dpI1d\");\n jsonObject.put(\"rdsID\", \"rds1ID\");\n jsonObject.put(\"rdsVer\", \"rdsVer\");\n jsonObject.put(\"dc\", \"dc1\");\n jsonObject.put(\"mi\", \"mi1\");\n jsonObject.put(\"mc\", \"mc\");\n jsonObject.put(\"ci\", \"c1i\");\n jsonObject.put(\"sessionKey\", \"SessionK1ey\");\n jsonObject.put(\"hmac\", \"hma1c\");\n jsonObject.put(\"PidDatatype\", \"PidDatat1ype\");\n jsonObject.put(\"Piddata\", \"Pidda1ta\");*/\n jsonObject.put(\"errcode\",errcode);\n jsonObject.put(\"errInfo\",errInfo);\n jsonObject.put(\"fCount\",fCount);\n jsonObject.put(\"fType\",fType);\n jsonObject.put(\"iCount\",iCount);\n jsonObject.put(\"iType\",iType);\n jsonObject.put(\"pCount\",pCount);\n jsonObject.put(\"pType\",pType);\n jsonObject.put(\"nmPoints\",nmPoints);\n jsonObject.put(\"qScore\",qScore);\n jsonObject.put(\"dpID\",dpId);\n jsonObject.put(\"rdsID\",rdsID);\n jsonObject.put(\"rdsVer\",rdsVer);\n jsonObject.put(\"dc\",dc);\n jsonObject.put(\"mi\",mi);\n jsonObject.put(\"mc\",mc);\n jsonObject.put(\"ci\",ci);\n jsonObject.put(\"sessionKey\",SessionKey);\n jsonObject.put(\"hmac\",hmac);\n jsonObject.put(\"PidDatatype\",PidDatatype);\n jsonObject.put(\"Piddata\",Piddata);\n\n pidData_json = jsonObject.toString();\n new apiCall_BalanceEnquiry().execute();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"public static JSONObject generateFakeDeviceInfo() throws JSONException\r\n\t{\r\n\t\tJSONObject obj = new JSONObject();\r\n\t\t\r\n\t\tobj.put(\"deviceName\", \"Citizenwater Dev 1\");\r\n\t\t\r\n\t\tJSONArray sensors = new JSONArray();\r\n\t\tString[] sensorTypeList = {\"pH\", \"Conductivity\", \"Dissolved Oxygen\", \"ORP\" };\r\n\t\tfor (int i = 0; i < sensorTypeList.length; i++)\r\n\t\t{\r\n\t\t\tJSONObject sensor = new JSONObject();\r\n\t\t\tsensor.put(\"sensorBrand\", \"atlas-scientific\");\r\n\t\t\tsensor.put(\"sensorDescription\", \"This is a sensor from Atlas-Scientific...\");\r\n\t\t\tsensor.put(\"sensorType\", sensorTypeList[i]);\r\n\t\t\tJSONObject calibrationObj = new JSONObject();\r\n\t\t\tcalibrationObj.put(\"TEST_CALIBRATION_TYPE_1\", \"N Reset sensor to factory settings.\");\r\n\t\t\tcalibrationObj.put(\"TEST_CALIBRATION_TYPE_2\", \"D 1.00 6.00 Perform single-point calibration. Enter a value between 1.00 and 6.00 [pH]\");\r\n\t\t\tcalibrationObj.put(\"TEST_CALIBRATION_TYPE_3\", \"I 5 200000 Perform double-point calibration. Enter a value between 5 and 200000 [microsiemens]\");\r\n\t\t\tcalibrationObj.put(\"TEST_CALIBRATION_TYPE_4\", \"Z bad input\");\r\n\t\t\tcalibrationObj.put(\"TEST_CALIBRATION_TYPE_5\", \"I 12.22 42 bad input\");\r\n\t\t\tcalibrationObj.put(\"TEST_CALIBRATION_TYPE_6\", \"I\");\r\n\t\t\tcalibrationObj.put(\"TEST_CALIBRATION_TYPE_7\", \"I 1 2\");\r\n\t\t\t// calibrationObj.put(\"TEST_CALIBRATION_TYPE_8\", \"D -13.0 52.0 \"); // Valid\r\n\t\t\tsensor.put(\"sensorCalParam\", calibrationObj);\r\n\t\t\tsensors.put(sensor);\r\n\t\t}\r\n\t\tobj.put(\"sensors\", sensors);\r\n\t\t\r\n\t\tJSONArray schedule = new JSONArray();\r\n\t\t\r\n\t\tString[] dayList = {\"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\", \"Sunday\" };\r\n\t\tfor (int i = 0; i < dayList.length; i++)\r\n\t\t{\r\n\t\t\tJSONObject day = new JSONObject();\r\n\t\t\tday.put(\"day\", dayList[i]);\r\n\t\t\tday.put(\"start_time\", \"4:00\");\r\n\t\t\tday.put(\"finish_time\", \"5:00\");\r\n\t\t\tday.put(\"interval\", \"5\");\r\n\t\t\tschedule.put(day);\r\n\t\t}\r\n\t\t\r\n\t\tobj.put(\"schedule\", schedule);\r\n\t\t\r\n\t\treturn obj;\r\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\targ0.declare(new Fields(\"deviceid\", \"jsondata\",\"valid\"));\n\t}",
"public synchronized MonitoringDevice fromJSON(String json){\n\t\t\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\n\t\t//Convert object to JSON string and pretty print\n\t\tMonitoringDevice mDeviceTemp = null;\n\t\t\n\t\ttry {\n\t\t\n\t\t\tmDeviceTemp = mapper.readValue(json, MonitoringDevice.class);\n\t\t\t\n\t\t\tlogger.debug(\"Json object read:\" + mDeviceTemp.toJson());\n\t\t\t\n\t\t\tlogger.debug(\"Monitoring device id given:\" + mDeviceTemp.getId() );\n\t\t\tlogger.debug(\"Monitoring address given:\" + mDeviceTemp.getIp_address() );\n\t\t\t\n\t\t\tDeviceTypeContainer deviceTypeContainer = (DeviceTypeContainer) this.getReferenceContainer(\"DeviceType\");\t\t\t\n\t\t\tDeviceType deviceTypeTmp = (DeviceType) deviceTypeContainer.getObject(mDeviceTemp.getType().getId());\n\t\t\t\n\t\t\tif (deviceTypeTmp != null) {\n\t\t\t\tmDeviceTemp.setType(deviceTypeTmp);\n\t\t\t} else {\n\t\t\t\tdeviceTypeContainer.fromJSON(mDeviceTemp.getType().toJson());\n\t\t\t}\n\t\t\t\n\t\t\tSignalContainer signalContainer = (SignalContainer) this.getReferenceContainer(\"Signal\");\n\t\t\tfor (int i=0; i < mDeviceTemp.inputOutputPorts.size(); i++){\n\t\t\t\tInputOutputPort inputOutputPort = mDeviceTemp.inputOutputPorts.get(i);\n\t\t\t\tSignal signal = (Signal) signalContainer.getObject(inputOutputPort.getSignalType().getId());\n\t\t\t\t\n\t\t\t\tif (signal == null){\n\t\t\t\t\tsignalContainer.fromJSON(inputOutputPort.getSignalType().toJson());\n\t\t\t\t} else { \n\t\t\t\t\tinputOutputPort.setSignalType(signal);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tmDeviceTemp.updateIndexes();\n\n\t\t} catch (JsonParseException e) {\n\t\t\tlogger.error(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} catch (JsonMappingException e) {\n\t\t\tlogger.error(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn mDeviceTemp;\n\t}",
"private static Map<Object, Object> getFields(Device d1) {\n\t Class<? extends Device> deviceClass = d1.getClass();\n\t Field[] fields = deviceClass.getDeclaredFields();\n\t \n\t //Map to get property details to provided class\n\t \tMap<Object,Object> mapFields = new HashMap<>();\t \n\n\t Arrays.stream(fields)\n\t .forEach(\n\t field -> {\n\t field.setAccessible(true);\n\t try {\n\t \tmapFields.put(field.getName(), field.get(d1));\n\t } catch (final IllegalAccessException e) {\n\t \t\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tmapFields.put(field.getName(), field.get(d1));\n\t\t\t\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t }\n\t });\n\n\t return mapFields;\n\t}",
"protected Object writeNullBindings() {\n Object json = JsonCompat.objectNode();\n\n JsonCompat.setPropertyNull(json, Constants.PROP_HTTP);\n JsonCompat.setPropertyNull(json, Constants.PROP_WS);\n JsonCompat.setPropertyNull(json, Constants.PROP_KAFKA);\n JsonCompat.setPropertyNull(json, Constants.PROP_AMQP);\n JsonCompat.setPropertyNull(json, Constants.PROP_AMQP1);\n JsonCompat.setPropertyNull(json, Constants.PROP_MQTT);\n JsonCompat.setPropertyNull(json, Constants.PROP_MQTT5);\n JsonCompat.setPropertyNull(json, Constants.PROP_NATS);\n JsonCompat.setPropertyNull(json, Constants.PROP_JMS);\n JsonCompat.setPropertyNull(json, Constants.PROP_SNS);\n JsonCompat.setPropertyNull(json, Constants.PROP_SQS);\n JsonCompat.setPropertyNull(json, Constants.PROP_STOMP);\n JsonCompat.setPropertyNull(json, Constants.PROP_REDIS);\n\n return json;\n }",
"private List<String> getExtendedDeviceInfo(IBuildInfo buildInfo) {\n List<String> extendedDeviceInfo = new ArrayList<>();\n File deviceInfoPath = buildInfo.getFile(DeviceInfoCollector.DEVICE_INFO_DIR);\n if (deviceInfoPath == null || !deviceInfoPath.exists()) {\n CLog.w(\"Device Info directory was not created (Make sure you are not running plan \" +\n \"\\\"*ts-dev\\\" or including option -d/--skip-device-info)\");\n return extendedDeviceInfo;\n }\n List<String> requiredDeviceInfo = null;\n try {\n requiredDeviceInfo = DynamicConfigFileReader.getValuesFromConfig(\n buildInfo, getSuiteName(), DYNAMIC_CONFIG_EXTENDED_DEVICE_INFO_KEY);\n } catch (XmlPullParserException | IOException e) {\n CLog.e(\"Failed to pull business logic Extended DeviceInfo from dynamic config. \"\n + \"Error: %s\", e);\n return extendedDeviceInfo;\n }\n File ediFile = null;\n String[] fileAndKey = null;\n try{\n for (String ediEntry: requiredDeviceInfo) {\n fileAndKey = ediEntry.split(\":\");\n if (fileAndKey.length <= 1) {\n CLog.e(\"Dynamic config Extended DeviceInfo key has problem.\");\n return new ArrayList<>();\n }\n ediFile = FileUtil\n .findFile(deviceInfoPath, fileAndKey[0] + \".deviceinfo.json\");\n if (ediFile == null) {\n CLog.e(\n \"Could not find Extended DeviceInfo JSON file: %s.\",\n deviceInfoPath + fileAndKey[0] + \".deviceinfo.json\");\n return new ArrayList<>();\n }\n String jsonString = FileUtil.readStringFromFile(ediFile);\n JSONObject jsonObj = new JSONObject(jsonString);\n String value = jsonObj.getString(fileAndKey[1]);\n extendedDeviceInfo\n .add(String.format(\"%s:%s:%s\", fileAndKey[0], fileAndKey[1], value));\n }\n }catch(JSONException | IOException | RuntimeException e){\n CLog.e(\n \"Failed to read or parse Extended DeviceInfo JSON file: %s. Error: %s\",\n deviceInfoPath + fileAndKey[0] + \".deviceinfo.json\", e);\n return new ArrayList<>();\n }\n return extendedDeviceInfo;\n }",
"private String convertToJson(Contacts contact) throws JsonProcessingException{\n\t ObjectMapper objectMapper = new ObjectMapper();\n\t return objectMapper.writeValueAsString(contact); \n\t}",
"public static String convertToJson(Object target) {\n StringBuilder sb = new StringBuilder();\n Class struc = target.getClass();\n Field[] fields = struc.getFields();\n\n for (Field field : fields) {\n try {\n sb.append(String.format(\"%s:%s\\n\", field.getName(), field.get(target)));\n\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n }\n\n return sb.toString();\n }",
"@Override\n\tprotected String toJSON()\n\t{\n\t\treturn getJSON(null);\n\t}",
"private static String nativeObjectToJSONString(NativeObject nativeObject) throws Exception \n { \n \tMap<String, String> mapJson = new LinkedHashMap<String, String>();\n \tMap<String, Class<?>> mapTypeJson = new LinkedHashMap<String, Class<?>>();\n \t\n Object[] ids = nativeObject.getIds(); \n for (Object id : ids) \n { \n String key = id.toString();\n Object value = nativeObject.get(key, nativeObject);\n if(!(value instanceof Undefined)) {\n Object json = toJson(value);\n mapJson.put(key, json+\"\");\n if(!(json instanceof String) && json!=null) mapTypeJson.put(key, json.getClass()); \n }\n } \n \n return HAPUtilityJson.buildMapJson(mapJson, mapTypeJson); \n }",
"public JSONObject addOrUpdateCustomDevice(JSONObject data);",
"@Override\n protected Annotations extractAnnotations(ObjectNode deviceNode, CodecContext context) {\n ObjectNode annotationsNode = get(deviceNode, \"annotations\");\n if (annotationsNode != null) {\n // add needed fields to the annotations of the Device object\n if (deviceNode.get(AVAILABLE) != null) {\n annotationsNode.put(AVAILABLE, deviceNode.get(AVAILABLE).asText());\n }\n return context.codec(Annotations.class).decode(annotationsNode, context);\n } else {\n return DefaultAnnotations.EMPTY;\n }\n }",
"public static void createDeviceMap() {\n\t\ttry {\n\t\t\tSmapStreamList sat = new SmapStreamList();\n\t\t\tMap<String, SmapDevice> saMap = sat.convertToSADevices();\n\t\t\tFileWriter fw = new FileWriter(device_map_file);\t\t\t\n\t\t\tString json = sat.gson.toJson(saMap);\n\t\t\tfw.write(json);\n\t\t\tfw.close();\n\t\t\trenderText(json);\n\t\t} catch (Exception e) {\n\t\t\trenderText(e);\n\t\t}\n\t}",
"@Override\r\n\tpublic JSONObject buildJson() {\n\t\tJSONObject json = new JSONObject();\r\n\t\ttry {\r\n\t\t\tsetInt(json,d_type,type);\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogUtil.log.error(e.getMessage(),e);\r\n\t\t}\r\n\t\treturn json;\r\n\t}",
"private void prepareUserFieldMapping(JsonObject jsonObj) throws AutomicException {\n Set<Entry<String, JsonElement>> entrySet = jsonObj.entrySet();\n if (userInputFields == null) {\n resultFields = new ArrayList<String>(entrySet.size());\n List<String> excludeHeaders = getExcludedFields();\n for (Map.Entry<String, JsonElement> entry : entrySet) {\n String key = entry.getKey();\n JsonElement value = jsonObj.get(key);\n if (!excludeHeaders.contains(key)) {\n if (value.isJsonPrimitive()) {\n resultFields.add(key);\n } else if (value.isJsonObject()) {\n JsonObject jObj = (JsonObject) value;\n if (jObj.has(\"_refObjectName\")) {\n resultFields.add(key);\n }\n }\n }\n }\n userInputFields = resultFields;\n } else {\n resultFields = new ArrayList<String>();\n Map<String, String> tempMap = new HashMap<String, String>(entrySet.size());\n for (Map.Entry<String, JsonElement> entry : entrySet) {\n String key = entry.getKey();\n tempMap.put(key.toLowerCase(), key);\n }\n StringBuilder invalidFields = new StringBuilder();\n for (String userInput : userInputFields) {\n String resultKey = tempMap.get(userInput.toLowerCase());\n if (resultKey != null) {\n resultFields.add(resultKey);\n } else {\n invalidFields.append(userInput).append(\" \");\n }\n }\n if (invalidFields.length() != 0) {\n throw new AutomicException(\"Invalid export fields have been specified \" + invalidFields.toString());\n }\n }\n }",
"@Override\n\tprotected byte[] prepare_data() {\n\t\tbyte[] ret_byte = null;\n\t\tJSONObject json_object = new JSONObject();\n\t\ttry {\n\t\t\tjson_object.put(Jsonkey.string_transitionid_key, \"\");\n\t\t\tjson_object.put(Jsonkey.string_magicid_key, \"\");\n\t\t\tJSONObject json_content = new JSONObject();\n\t\t\tjson_object.put(Jsonkey.string_content_key, json_content);\n\t\t\tjson_content.put(Jsonkey.string_ctype_key, \"verify_login_request\");\n\t\t\tJSONObject json_cvalue = new JSONObject();\n\t\t\tjson_content.put(Jsonkey.string_cvalue_key, json_cvalue);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_name_key, user_name);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_password_key, user_password);\n\t\t\t\n\t\t\tString json_string = json_object.toString();\n\t\t\tret_byte = json_string.getBytes();\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn ret_byte;\n\t}",
"@Override\n public Object getData() {\n return devices;\n }",
"private DeviceTokenResponseJson sendRegistrationToServer(String token) {\n LocationManager locationManager= (LocationManager)getApplicationContext().getSystemService(Context.LOCATION_SERVICE);\n Location lastLocation;\n// if(locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)){\n// lastLocation=locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n// }else{\n// lastLocation=locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\n// }\n HttpURLConnection connection = null;\n BufferedReader reader = null;\n int id = sPrefs.getUserId();\n DeviceTokenJson dtj= new DeviceTokenJson();\n if(id!=0) { //if customer id ==0, user had not logged in. Don't send customer id.\n\n dtj.setCustomerId(id);\n }\n String deviceId = Settings.Secure.getString(this.getContentResolver(),\n Settings.Secure.ANDROID_ID);\n String versionName=null;\n try {\n versionName = getApplicationContext().getPackageManager()\n .getPackageInfo(getApplicationContext().getPackageName(), 0).versionName;\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n }\n if(!TextUtils.isEmpty(versionName)){\n dtj.setAppVersion(versionName);\n\n }\n dtj.setOsVersion(Build.VERSION.RELEASE);\n dtj.setDeviceModel(getDeviceName());\n Log.d(TAG, \"Model:\"+getDeviceName());\n dtj.setDeviceId(deviceId);\n dtj.setDeviceToken(token);\n dtj.setDeviceType(\"2\");\n DeviceTokenResponseJson dtrj=null;\n int status = 0;\n try {\n connection = HttpConnectionUtil.getPostConnection(Apis.URL_DEVICE_TOKEN_2);\n String requestData = HttpConnectionUtil.gson.toJson(dtj);\n\n PrintWriter out = new PrintWriter(connection.getOutputStream());\n out.print(requestData);\n out.flush();\n status = connection.getResponseCode();\n if (status == HttpConnectionUtil.POST_OK) {\n\n reader = new BufferedReader(new InputStreamReader(\n connection.getInputStream()));\n String line = \"\";\n StringBuilder sb = new StringBuilder();\n while ((line = reader.readLine()) != null) {\n sb.append(line);\n }\n String responseData = sb.toString();\n Log.i(TAG, \"server response : \" + responseData);\n\n dtrj = HttpConnectionUtil.gson.fromJson(responseData,\n new TypeToken<DeviceTokenResponseJson>() {\n }.getType());\n }\n else {\n reader = new BufferedReader(new InputStreamReader(\n connection.getErrorStream()));\n String line = \"\";\n StringBuilder sb = new StringBuilder();\n while ((line = reader.readLine()) != null) {\n sb.append(line);\n }\n Log.e(TAG, \"server response : \" + sb.toString());\n }\n\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n if (dtrj!=null && dtrj.getId()==0) {\n\n sPrefs.saveSentTokenToServer(true);\n\n if(id!=0) {\n sPrefs.saveSentTokenIdToServer(true);\n }\n }else{\n sPrefs.saveSentTokenToServer(false);\n sPrefs.saveSentTokenIdToServer(false);\n }\n return dtrj;\n }",
"private void prepareData() {\n devices.clear();\n\n Set<String> s = Blue.getInstance().devices.keySet();\n Iterator<String> it = s.iterator();\n String address;\n while (it.hasNext()) {\n address = it.next();\n devices.add(new Device(address, Blue.getInstance().devices.get(address)));\n }\n }",
"private void writeDeviceInfo() {\n StringBuffer text = new StringBuffer(getDeviceReport());\n dataWriter.writeTextData(text, \"info.txt\");\n }",
"public interface FieldSerializer {\n\n boolean serializeField(JsonSerializerInternal serializer, Object parent, FieldAccess fieldAccess, CharBuf builder );\n\n}",
"public abstract String toJson();",
"public String toJsonString() {\n String str;\n String str2;\n try {\n if (this.lifetime == null) {\n str = \"null\";\n } else {\n str = \"\\\"\" + this.lifetime.toString() + \"\\\"\";\n }\n if (this.frequency == null) {\n str2 = \"\";\n } else {\n str2 = \",\\\"frequency\\\":\" + this.frequency;\n }\n return \"{\\\"enabled\\\":\" + this.enabled + str2 + \",\\\"lifetime\\\":\" + str + \"}\";\n } catch (Exception e) {\n C3490e3.m663c(e.getMessage());\n return \"\";\n }\n }",
"public final JSONObject toJSONObject() {\n AppMethodBeat.i(125780);\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"ky\", \"AVF4T76RVR81\");\n jSONObject.put(\"et\", 2);\n jSONObject.put(\"ts\", this.cbC);\n jSONObject.put(\"si\", this.cbC);\n s.a(jSONObject, \"ui\", s.getImei(this.context));\n s.a(jSONObject, \"mc\", s.aK(this.context));\n String zS = i.aG(this.context).zS();\n if (s.cp(zS)) {\n jSONObject.put(\"mid\", zS);\n } else {\n jSONObject.put(\"mid\", AppEventsConstants.EVENT_PARAM_VALUE_NO);\n }\n b bVar = new b(this.context);\n JSONObject jSONObject2 = new JSONObject();\n if (b.cbd != null) {\n a aVar = b.cbd;\n jSONObject2.put(\"sr\", new StringBuilder(String.valueOf(aVar.cbh.widthPixels)).append(\"*\").append(aVar.cbh.heightPixels).toString());\n s.a(jSONObject2, \"av\", aVar.appVersion);\n s.a(jSONObject2, \"ch\", aVar.channel);\n s.a(jSONObject2, \"mf\", aVar.cbj);\n s.a(jSONObject2, \"sv\", aVar.cbg);\n s.a(jSONObject2, \"ov\", Integer.toString(aVar.cbi));\n jSONObject2.put(\"os\", 1);\n s.a(jSONObject2, \"op\", aVar.cbk);\n s.a(jSONObject2, \"lg\", aVar.aOt);\n s.a(jSONObject2, \"md\", aVar.model);\n s.a(jSONObject2, \"tz\", aVar.timezone);\n if (aVar.cbm != 0) {\n jSONObject2.put(\"jb\", aVar.cbm);\n }\n s.a(jSONObject2, \"sd\", aVar.cbl);\n s.a(jSONObject2, \"apn\", aVar.packageName);\n if (s.aJ(aVar.ctx)) {\n JSONObject jSONObject3 = new JSONObject();\n s.a(jSONObject3, \"bs\", s.aL(aVar.ctx));\n s.a(jSONObject3, \"ss\", s.aM(aVar.ctx));\n if (jSONObject3.length() > 0) {\n s.a(jSONObject2, \"wf\", jSONObject3.toString());\n }\n }\n JSONArray aN = s.aN(aVar.ctx);\n if (aN != null && aN.length() > 0) {\n s.a(jSONObject2, \"wflist\", aN.toString());\n }\n s.a(jSONObject2, \"ram\", aVar.cbn);\n s.a(jSONObject2, \"rom\", aVar.cbo);\n s.a(jSONObject2, \"im\", aVar.imsi);\n }\n s.a(jSONObject2, \"cn\", bVar.cbf);\n if (bVar.cbe != null) {\n jSONObject2.put(\"tn\", bVar.cbe);\n }\n jSONObject.put(\"ev\", jSONObject2);\n } catch (Throwable th) {\n s.zY();\n }\n if (this.cbD != null) {\n jSONObject.put(\"ext\", this.cbD);\n }\n AppMethodBeat.o(125780);\n return jSONObject;\n }",
"public String toString()\n\t{\n\t\tField[] fields = this.getClass().getDeclaredFields();\n\t\tint i, max = fields.length;\n\t\tString fieldName = \"\";\n\t\tString fieldType = \"\";\n\t\tString ret = \"\";\n\t\tString value = \"\";\n\t\tboolean skip = false;\n\t\tint j = 0;\n\t\tfor(i = 0; i < max; i++)\n\t\t{\n\t\t\tfieldName = fields[i].getName().toString();\n\t\t\tfieldType = fields[i].getType().toString();\n\t\t\tif(i == 0)\n\t\t\t{\n\t\t\t\tret += \"{\";\n\t\t\t}\n\t\t\tif(fieldType.equals(\"int\") || fieldType.equals(\"long\") || fieldType.equals(\"float\") || fieldType.equals(\"double\") || fieldType.equals(\"boolean\"))\n\t\t\t{\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tvalue = fields[i].get(this).toString();\n\t\t\t\t} \n\t\t\t\tcatch (Exception e) \n\t\t\t\t{\n\t\t\t\t\tvalue = \"0\";\n\t\t\t\t}\n\t\t\t\tskip = false;\n\t\t\t}\n\t\t\telse if(fieldType.contains(\"String\"))\n\t\t\t{\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tvalue = \"\\\"\"+Utility.escapeJSON((String) fields[i].get(this))+\"\\\"\";\n\t\t\t\t} \n\t\t\t\tcatch (Exception e) \n\t\t\t\t{\n\t\t\t\t\tvalue = \"\\\"\"+\"\\\"\";\n\t\t\t\t}\n\t\t\t\tskip = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvalue = \"\\\"\"+\"\\\"\";\n\t\t\t\tskip = true;\n\t\t\t}\n\t\t\tif(!skip)\n\t\t\t{\n\t\t\t\tif(j > 0)\n\t\t\t\t{\n\t\t\t\t\tret += \",\";\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t\tret += \"\\r\\n\\t\\\"\"+fieldName+\"\\\":\"+value;\n\t\t\t}\n\t\t\tif(i == max-1)\n\t\t\t{\n\t\t\t\tret += \"\\r\\n}\";\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}",
"public abstract String toJsonString();",
"@Override\r\n\tpublic JSONObject toJSON() {\n\t\treturn null;\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n@RequestMapping(value = \"/getdevtype\", method = RequestMethod.GET)\npublic JSONObject getdevtype(@RequestParam(value=\"sid\", \t\trequired=false) String sid, \n\t\t\t\t \t \t @RequestParam(value=\"spid\", \t\trequired=false) String spid,\n\t\t\t\t \t \t @RequestParam(value=\"uid\", \t\trequired=false) String uid,\n\t\t\t\t \t \t @RequestParam(value=\"duration\", \trequired=false, defaultValue=\"5m\") String duration) throws IOException {\n\n\t\tJSONArray dev_array = null;\n\t\tJSONObject devlist \t = new JSONObject();\n\t\tdev_array = new JSONArray();\n\t\t\n\t\tDevice dv = getDeviceService().findOneByUid(uid);\n\t\t\n\t\tif (dv != null) {\n\n\t\t\tJSONArray dev_array1 = new JSONArray();\n\t\t\tJSONArray dev_array2 = new JSONArray();\n\t \t\n\t\t\tdev_array2.add (0, \"2G\");\n\t\t\tdev_array2.add (1, dv.getPeer2gcount());\n\t\t\tdev_array1.add (0, \"5G\");\n\t\t\tdev_array1.add (1, dv.getPeer5gcount());\n\t\n\t\t\tdev_array.add (0, dev_array2);\n\t\t\tdev_array.add (1, dev_array1);\n\t\t}\n\t\t\n\t\tdevlist.put(\"typeOfDevices\", dev_array);\t\n\t\t\n \t//LOG.info(\"typeOfDevices\" +devlist.toString());\t\t\t\n\t\t\t\t\n\t\treturn devlist;\n\t}",
"public void collectDeviceInfo(Context context) {\n try {\n PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 1);\n if (packageInfo != null) {\n String string2 = packageInfo.versionName == null ? \"null\" : packageInfo.versionName;\n String string3 = String.valueOf((int)packageInfo.versionCode);\n this.infos.put((Object)\"versionName\", (Object)string2);\n this.infos.put((Object)\"versionCode\", (Object)string3);\n }\n }\n catch (PackageManager.NameNotFoundException var2_5) {\n Log.e((String)\"CrashHandler\", (String)\"an error occured when collect package info\", (Throwable)var2_5);\n }\n Field[] arrfield = Build.class.getDeclaredFields();\n int n = arrfield.length;\n int n2 = 0;\n while (n2 < n) {\n Field field = arrfield[n2];\n try {\n field.setAccessible(true);\n this.infos.put((Object)field.getName(), (Object)field.get((Object)null).toString());\n Log.d((String)\"CrashHandler\", (String)(String.valueOf((Object)field.getName()) + \" : \" + field.get((Object)null)));\n }\n catch (Exception var8_10) {\n Log.e((String)\"CrashHandler\", (String)\"an error occured when collect crash info\", (Throwable)var8_10);\n }\n ++n2;\n }\n return;\n }",
"public abstract Object toJson();",
"@SuppressWarnings(\"unchecked\")\n\t@RequestMapping(value = \"/getdevcon\", method = RequestMethod.GET)\n public JSONObject getdevcon(@RequestParam(value=\"sid\", \t\trequired=false) String sid, \n \t\t\t\t\t\t\t@RequestParam(value=\"spid\", \trequired=false) String spid,\n \t\t\t\t\t\t\t@RequestParam(value=\"swid\", \trequired=false) String swid,\n \t\t\t\t\t\t\t@RequestParam(value=\"uid\", \t \trequired=false) String uid,\n \t\t\t\t\t\t\t@RequestParam(value=\"duration\", required=false, defaultValue=\"5m\") String duration) throws IOException {\n \t\n \tJSONArray dev_array = null; \t\n \tJSONObject devlist \t = new JSONObject();\n\t\tdev_array = new JSONArray();\n\t\t\n\t\tDevice dv = getDeviceService().findOneByUid(uid);\n\t\t\n\t\tif (dv != null) {\n\t\t\t\n\t\t\tJSONArray dev_array1 = new JSONArray();\n\t\t\tJSONArray dev_array2 = new JSONArray();\n\t\t\tJSONArray dev_array3 = new JSONArray();\n\t\t\tJSONArray dev_array4 = new JSONArray();\n\t \t\n\t\t\tdev_array1.add (0, \"Mac\");\n\t\t\tdev_array1.add (1, dv.getIos());\n\t\t\tdev_array2.add (0, \"Android\");\n\t\t\tdev_array2.add (1, dv.getAndroid());\n\t\t\tdev_array3.add (0, \"Win\");\n\t\t\tdev_array3.add (1, dv.getWindows());\n\t\t\tdev_array4.add (0, \"Others\");\n\t\t\tdev_array4.add (1, dv.getOthers());\t\t\n\t\t\t\n\t\t\tdev_array.add (0, dev_array1);\n\t\t\tdev_array.add (1, dev_array2);\n\t\t\tdev_array.add (2, dev_array3);\n\t\t\tdev_array.add (3, dev_array4);\t\t\t\n\t\t\t\n\t\t}\n \t\t\t\t\t\n\t\tdevlist.put(\"devicesConnected\", dev_array);\t\n\t\t\n \t//LOG.info(\"Connected Clients\" +devlist.toString());\n \t\n \treturn devlist;\n \t\n }",
"public static Object toJson(Object nativeObject) throws Exception\n { \n \tObject out = null;\n \tif(nativeObject instanceof String){\n \t\tout = nativeObject.toString();\n \t}\n \telse if(nativeObject instanceof ConsString){\n \t\tout = nativeObject.toString();\n \t}\n \telse if(nativeObject instanceof Integer){\n \t\tout = nativeObject;\n \t}\n \telse if(nativeObject instanceof Boolean){\n \t\tout = nativeObject;\n \t}\n \telse if(nativeObject instanceof Double){\n \t\tout = nativeObject;\n \t}\n \telse if (nativeObject instanceof NativeArray) \n { \n out = new JSONArray(nativeArrayToJSONString((NativeArray)nativeObject)); \n } \n else if (nativeObject instanceof NativeObject) \n { \n \tString kkkk = nativeObjectToJSONString((NativeObject)nativeObject);\n \ttry {\n out = new JSONObject(kkkk); \n \t}\n \tcatch(Throwable e) {\n \t\te.printStackTrace();\n \t\tSystem.out.println(kkkk);\n// \t\tthrow e;\n \t}\n }\n else if(nativeObject instanceof Function){\n \tout = new HAPFunctionType(Context.toString(nativeObject));\n }\n else if(nativeObject instanceof NativeJavaObject){\n \tObject javaObj = ((NativeJavaObject)nativeObject).unwrap();\n \tout = toJson(javaObj);\n \tif(out==null){\n \tString jsonStr = HAPSerializeManager.getInstance().toStringValue(javaObj, HAPSerializationFormat.JSON);\n \tif(javaObj instanceof List || javaObj instanceof Set) out = new JSONArray(jsonStr);\n \telse out = new JSONObject(jsonStr);\n \t}\n }\n else if(nativeObject instanceof Undefined) {\n// \tthrow new HAPCommonException(\"Undefined Value!!!!\");\n }\n \treturn out; \n }",
"private static void initialize_sensorTypeToWrapperDataFormat() {\n\t\tsensorTypeToWrapperDataFormat.put(\"weather\", \"XML/JSON\");\n\t\tsensorTypeToWrapperDataFormat.put(\"traffic\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"roadactivity\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"snowfall\", \"Text\");\n\t\tsensorTypeToWrapperDataFormat.put(\"snowdepth\", \"Text\");\n\t\tsensorTypeToWrapperDataFormat.put(\"webcam\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"radar\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"satellite\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"sealevel\", \"Text\");\n\t\tsensorTypeToWrapperDataFormat.put(\"cosm\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"bikehire\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"railwaystation\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"ADSBHub\", \"Stream\");\n\t}",
"private Device buildDevice() {\n Device device = Device.builder()\n .text(Narrative.builder().div(Xhtml.of(\"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\">Generated</div>\")).status(NarrativeStatus.GENERATED).build())\n .meta(Meta.builder()\n .profile(Canonical.of(\"http://ibm.com/fhir/StructureDefinition/test-device|0.1.0\"))\n .build())\n .statusReason(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(\"http://terminology.hl7.org/CodeSystem/device-status-reason\")).code(Code.of(\"online\")).build()).build())\n .specialization(Specialization.builder()\n .systemType(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(ENGLISH_US)).build()).build()).build())\n .extension(Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-primary-extension\")\n .value(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(ENGLISH_US)).build()).build()).build(),\n Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-secondary-extension\")\n .value(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(ENGLISH_US)).build()).build(),\n Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-tertiary-extension\")\n .value(Code.of(ENGLISH_US)).build())\n .build();\n return device;\n }",
"@Override\n public void convertToJson(JsonObjectBuilder jsonObjectBuilder) throws JsonException {\n addNotRequired(jsonObjectBuilder,\"publicKeyInfo\",publicKeyInfo);\n addNotRequired(jsonObjectBuilder,\"nodeAddress\",nodeAddress);\n addNotRequired(jsonObjectBuilder,\"nodePort\",nodePort);\n addNotRequired(jsonObjectBuilder,\"mainNet\",mainNet);\n if(publicKeyInfo != null && nodeAddress != null){\n add(jsonObjectBuilder,\"connectString\", getConnectString());\n }\n }",
"public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {\n\n\n if (json.has(\"metricDevices\")) {\n metricDevices = serializer.deserializeObject(json.get(\"metricDevices\"), com.microsoft.graph.requests.UserExperienceAnalyticsWorkFromAnywhereDeviceCollectionPage.class);\n }\n }",
"public JSONObject jsonSerialize() {\n JSONObject jsonObject = new JSONObject();\n\n // Serialize the UrlDevices\n JSONArray urlDevices = new JSONArray();\n for (UrlDevice urlDevice : mDeviceIdToUrlDeviceMap.values()) {\n urlDevices.put(urlDevice.jsonSerialize());\n }\n jsonObject.put(DEVICES_KEY, urlDevices);\n\n // Serialize the URL metadata\n JSONArray metadata = new JSONArray();\n for (PwsResult pwsResult : mBroadcastUrlToPwsResultMap.values()) {\n metadata.put(pwsResult.jsonSerialize());\n }\n jsonObject.put(METADATA_KEY, metadata);\n\n jsonObject.put(SCHEMA_VERSION_KEY, SCHEMA_VERSION);\n return jsonObject;\n }",
"private String convertToJson(Users user) throws JsonProcessingException{\n\t ObjectMapper objectMapper = new ObjectMapper();\n\t return objectMapper.writeValueAsString(user); \n\t}",
"private String converttoJson(Object medicine) throws JsonProcessingException {\r\n ObjectMapper objectMapper = new ObjectMapper();\r\n return objectMapper.writeValueAsString(medicine);\r\n }",
"public String toJson()\n\t{\n\t\tJsonStringEncoder encoder = JsonStringEncoder.getInstance();\n\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append('{');\n\n\t\tboolean needComma = true;\n\t\tif (m_Message != null)\n\t\t{\n\t\t\tchar [] message = encoder.quoteAsString(m_Message.toString());\n\t\t\tbuilder.append(\"\\n \\\"message\\\" : \\\"\").append(message).append('\"').append(',');\n\t\t\tneedComma = false;\n\t\t}\n\n\t\tif (m_ErrorCode != null)\n\t\t{\n\t\t\tbuilder.append(\"\\n \\\"errorCode\\\" : \").append(m_ErrorCode.getValueString());\n\t\t\tneedComma = true;\n\t\t}\n\n\t\tif (m_Cause != null)\n\t\t{\n\t\t\tif (needComma)\n\t\t\t{\n\t\t\t\tbuilder.append(',');\n\t\t\t}\n\t\t\tchar [] cause = encoder.quoteAsString(m_Cause.toString());\n\t\t\tbuilder.append(\"\\n \\\"cause\\\" : \\\"\").append(cause).append('\"');\n\t\t}\n\n\t\tbuilder.append(\"\\n}\\n\");\n\n\t\treturn builder.toString();\n\t}",
"private static String nativeArrayToJSONString(NativeArray nativeArray) throws Exception \n { \n Object[] propIds = nativeArray.getIds(); \n if (isArray(propIds) == true) \n {\n \tList<String> jsonArray = new ArrayList<String>();\n \tClass typeClass = null;\n for (int i=0; i<propIds.length; i++) \n { \n Object propId = propIds[i]; \n if (propId instanceof Integer) \n { \n Object value = nativeArray.get((Integer)propId, nativeArray);\n Object json = toJson(value);\n jsonArray.add(json+\"\");\n if(typeClass==null) typeClass = json.getClass();\n } \n } \n return HAPUtilityJson.buildArrayJson(jsonArray.toArray(new String[0]), typeClass);\n } \n else \n { \n \tMap<String, String> mapJson = new LinkedHashMap<String, String>();\n \tMap<String, Class<?>> mapTypeJson = new LinkedHashMap<String, Class<?>>();\n for (Object propId : propIds) \n { \n \tString key = propId.toString();\n Object value = nativeArray.get(key, nativeArray);\n Object json = toJson(value);\n mapJson.put(key, json+\"\");\n mapTypeJson.put(key, json.getClass()); \n } \n return HAPUtilityJson.buildMapJson(mapJson, mapTypeJson); \n }\n }",
"public DeviceInfo() {}",
"java.lang.String getDeviceId();",
"@Override\n public String getDeviceName() {\n return null;\n }",
"@Override\n\tpublic JSONObject toJson() {\n\t\treturn null;\n\t}",
"public final JSONObject mo14926a() {\n if (this.f26251f == null) {\n this.f26251f = new JSONObject();\n }\n try {\n this.f26251f.put(\"log_type\", \"service_monitor\");\n this.f26251f.put(\"service\", this.f26246a);\n this.f26251f.put(\"status\", this.f26247b);\n if (this.f26248c != null) {\n this.f26251f.put(\"value\", this.f26248c);\n }\n if (this.f26249d != null) {\n this.f26251f.put(\"category\", this.f26249d);\n }\n if (this.f26250e != null) {\n this.f26251f.put(\"metric\", this.f26250e);\n }\n return this.f26251f;\n } catch (JSONException unused) {\n return null;\n }\n }",
"private VmDevice readVmDevice(XmlNode node, Guid deviceId) {\n VmDevice vmDevice = new VmDevice();\n vmDevice.setId(new VmDeviceId(deviceId, vmBase.getId()));\n if (node.SelectSingleNode(OvfProperties.VMD_ADDRESS, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_ADDRESS, _xmlNS).innerText)) {\n vmDevice.setAddress(String.valueOf(node.SelectSingleNode(OvfProperties.VMD_ADDRESS, _xmlNS).innerText));\n } else {\n vmDevice.setAddress(\"\");\n }\n if (node.SelectSingleNode(OvfProperties.VMD_ALIAS, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_ALIAS, _xmlNS).innerText)) {\n vmDevice.setAlias(String.valueOf(node.SelectSingleNode(OvfProperties.VMD_ALIAS, _xmlNS).innerText));\n } else {\n vmDevice.setAlias(\"\");\n }\n XmlNode specParamsNode = node.SelectSingleNode(OvfProperties.VMD_SPEC_PARAMS, _xmlNS);\n if (specParamsNode != null\n && !StringUtils.isEmpty(specParamsNode.innerText)) {\n vmDevice.setSpecParams(getMapNode(specParamsNode));\n } else {\n // Empty map\n vmDevice.setSpecParams(Collections.<String, Object>emptyMap());\n }\n if (node.SelectSingleNode(OvfProperties.VMD_TYPE, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_TYPE, _xmlNS).innerText)) {\n vmDevice.setType(VmDeviceGeneralType.forValue(String.valueOf(node.SelectSingleNode(OvfProperties.VMD_TYPE, _xmlNS).innerText)));\n } else {\n int resourceType = getResourceType(node, OvfProperties.VMD_RESOURCE_TYPE);\n vmDevice.setType(VmDeviceGeneralType.forValue(VmDeviceType.getoVirtDevice(resourceType)));\n }\n if (node.SelectSingleNode(OvfProperties.VMD_DEVICE, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_DEVICE, _xmlNS).innerText)) {\n vmDevice.setDevice(String.valueOf(node.SelectSingleNode(OvfProperties.VMD_DEVICE, _xmlNS).innerText));\n } else {\n setDeviceByResource(node, vmDevice);\n }\n if (node.SelectSingleNode(OvfProperties.VMD_BOOT_ORDER, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_BOOT_ORDER, _xmlNS).innerText)) {\n vmDevice.setBootOrder(Integer.valueOf(node.SelectSingleNode(OvfProperties.VMD_BOOT_ORDER, _xmlNS).innerText));\n } else {\n vmDevice.setBootOrder(0);\n }\n if (node.SelectSingleNode(OvfProperties.VMD_IS_PLUGGED, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_IS_PLUGGED, _xmlNS).innerText)) {\n vmDevice.setIsPlugged(Boolean.valueOf(node.SelectSingleNode(OvfProperties.VMD_IS_PLUGGED, _xmlNS).innerText));\n } else {\n vmDevice.setIsPlugged(Boolean.TRUE);\n }\n if (node.SelectSingleNode(OvfProperties.VMD_IS_READONLY, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_IS_READONLY, _xmlNS).innerText)) {\n vmDevice.setIsReadOnly(Boolean.valueOf(node.SelectSingleNode(OvfProperties.VMD_IS_READONLY, _xmlNS).innerText));\n } else {\n vmDevice.setIsReadOnly(Boolean.FALSE);\n }\n if (node.SelectSingleNode(OvfProperties.VMD_CUSTOM_PROP, _xmlNS) != null\n && StringUtils.isNotEmpty(node.SelectSingleNode(OvfProperties.VMD_CUSTOM_PROP, _xmlNS).innerText)) {\n vmDevice.setCustomProperties(DevicePropertiesUtils.getInstance().convertProperties(\n String.valueOf(node.SelectSingleNode(OvfProperties.VMD_CUSTOM_PROP, _xmlNS).innerText)));\n } else {\n vmDevice.setCustomProperties(null);\n }\n\n if (node.SelectSingleNode(OvfProperties.VMD_SNAPSHOT_PROP, _xmlNS) != null\n && StringUtils.isNotEmpty(node.SelectSingleNode(OvfProperties.VMD_SNAPSHOT_PROP, _xmlNS).innerText)) {\n vmDevice.setSnapshotId(new Guid(String.valueOf(node.SelectSingleNode(OvfProperties.VMD_CUSTOM_PROP, _xmlNS).innerText)));\n }\n\n return vmDevice;\n }",
"@Override\r\n\tpublic String[] updateJsonProperties() {\n\t\treturn null;\r\n\t}",
"private String converttoJson(Object followUpDietStatusInfo) throws JsonProcessingException {\n ObjectMapper objectMapper = new ObjectMapper();\n return objectMapper.writeValueAsString(followUpDietStatusInfo);\n }",
"public String getDeviceModel() {\n return deviceModel;\n }",
"public String getDevice() {\r\n return device;\r\n }",
"public String encode() {\n\tStringBuffer retval = new StringBuffer();\n\n\tif (mediaField != null) \n\t retval.append(mediaField.encode());\n\n\tif (informationField != null) \n\t retval.append(informationField.encode());\n\n\tif (connectionField != null) \n\t retval.append(connectionField.encode());\n\n\tif (bandwidthFields != null) {\n\t for (int i = 0; i < bandwidthFields.size(); i++) {\n\t\tBandwidthField bandwidthField = \n\t\t (BandwidthField) bandwidthFields.elementAt(i);\n\t\tretval.append(bandwidthField.encode());\n\t }\n\t}\n\n\tif (keyField != null) \n\t retval.append(keyField.encode());\n\n\tif (attributeFields != null) {\n\t for (int i = 0; i < attributeFields.size(); i++) \n\t\tretval.append(((SDPField)attributeFields.elementAt(i)).\n\t\t\t encode());\n\t}\n\n\treturn retval.toString();\n }",
"@Test\n public void testMultipleSerialisation() throws IOException {\n Map<InstanceGroupType, String> userData = new EnumMap<>(InstanceGroupType.class);\n userData.put(InstanceGroupType.CORE, \"CORE\");\n Image image = new Image(\"cb-centos66-amb200-2015-05-25\", userData, \"redhat6\", \"redhat6\", \"\", \"default\", \"default-id\", new HashMap<>());\n Json json = new Json(image);\n String expected = json.getValue();\n Image covertedAgain = json.get(Image.class);\n json = new Json(covertedAgain);\n Assert.assertEquals(expected, json.getValue());\n }",
"private static String valueToJSONString(Object value) throws Exception \n {\n\t\t JSONObject json = new JSONObject(); \n\t if (value instanceof IdScriptableObject && \n\t ((IdScriptableObject)value).getClassName().equals(\"Date\") == true) \n\t { \n\t // Get the UTC values of the date \n\t Object year = NativeObject.callMethod((IdScriptableObject)value, \"getUTCFullYear\", null); \n\t Object month = NativeObject.callMethod((IdScriptableObject)value, \"getUTCMonth\", null); \n\t Object date = NativeObject.callMethod((IdScriptableObject)value, \"getUTCDate\", null); \n\t Object hours = NativeObject.callMethod((IdScriptableObject)value, \"getUTCHours\", null); \n\t Object minutes = NativeObject.callMethod((IdScriptableObject)value, \"getUTCMinutes\", null); \n\t Object seconds = NativeObject.callMethod((IdScriptableObject)value, \"getUTCSeconds\", null); \n\t Object milliSeconds = NativeObject.callMethod((IdScriptableObject)value, \"getUTCMilliseconds\", null); \n\t \n\t // Build the JSON object to represent the UTC date \n\t \n\t json.put(\"zone\",\"UTC\"); \n\t json.put(\"year\",year); \n\t json.put(\"month\",month); \n\t json.put(\"date\",date); \n\t json.put(\"hours\",hours); \n\t json.put(\"minutes\",minutes); \n\t json.put(\"seconds\",seconds); \n\t json.put(\"milliseconds\",milliSeconds); \n\t return json.toString(); \n\t } \n\t else if (value instanceof NativeJavaObject) \n\t { \n\t Object javaValue = Context.jsToJava(value, Object.class); \n\t return javaValue.toString(); \n\t } \n\t else if (value instanceof NativeArray) \n\t { \n\t // Output the native array \n\t return nativeArrayToJSONString((NativeArray)value); \n\t } \n\t else if (value instanceof NativeObject) \n\t { \n\t // Output the native object \n\t return nativeObjectToJSONString((NativeObject)value); \n\t } \n\t else if( value instanceof Function){\n\t \treturn Context.toString(value);\n\t }\n\t else \n\t { \n\t return value.toString(); \n\t } \n }",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getDeviceRegistration() != null)\n sb.append(\"DeviceRegistration: \").append(getDeviceRegistration()).append(\",\");\n if (getCacheTTL() != null)\n sb.append(\"CacheTTL: \").append(getCacheTTL());\n sb.append(\"}\");\n return sb.toString();\n }",
"private void prepare( ) {\n super.prepare( schema.getCount( ) );\n serializer = new FieldSerializer[ fieldCount ];\n for ( int i = 0; i < fieldCount; i++ ) {\n FieldSchema field = schema.getField( i );\n serializer[i] = serializerByType[ field.getType().ordinal() ];\n }\n }",
"@Test\n public void testWithoutNewWarnings() {\n String request = \"{\\\"canRunOnFailed\\\":false,\\\"defaultEncoding\\\":\\\"\\\",\\\"failedTotalAll\\\":\\\"\\\",\\\"failedTotalHigh\\\":\\\"\\\",\\\"failedTotalLow\\\":\\\"\\\",\\\"failedTotalNormal\\\":\\\"\\\",\\\"healthy\\\":\\\"0\\\",\\\"pattern\\\":\\\"\\\",\\\"shouldDetectModules\\\":false,\\\"thresholdLimit\\\":\\\"low\\\",\\\"unHealthy\\\":\\\"50\\\",\\\"unstableTotalAll\\\":\\\"\\\",\\\"unstableTotalHigh\\\":\\\"\\\",\\\"unstableTotalLow\\\":\\\"\\\",\\\"unstableTotalNormal\\\":\\\"\\\"}\";\n\n JSONObject input = JSONObject.fromObject(request);\n JSONObject output = PluginDescriptor.convertHierarchicalFormData(input);\n\n assertEquals(\"Wrong JSON \", input, output);\n }",
"String toJson() throws IOException;",
"@JsonIgnore\n\tpublic String getAsJSON() {\n\t\ttry {\n\t\t\treturn TransportService.mapper.writeValueAsString(this); // thread-safe\n\t\t} catch (JsonGenerationException e) {\n\t\t\tlog.error(e, \"JSON Generation failed\");\n\t\t} catch (JsonMappingException e) {\n\t\t\tlog.error(e, \"Mapping from Object to JSON String failed\");\n\t\t} catch (IOException e) {\n\t\t\tlog.error(e, \"IO failed\");\n\t\t}\n\t\treturn null;\n\t}",
"private void logDeviceInfo() {\n logDeviceLevel();\n }",
"private void logDeviceInfo() {\n logDeviceLevel();\n }",
"public static String toJSON (Object obj) throws AndroidAgentException {\n\t\ttry {\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\treturn mapper.writeValueAsString(obj);\n\t\t} catch (JsonMappingException e) {\n\t\t\tthrow new AndroidAgentException(\"Error occurred while mapping class to json\", e);\n\t\t} catch (JsonGenerationException e) {\n\t\t\tthrow new AndroidAgentException(\"Error occurred while generating json\", e);\n\t\t} catch (IOException e) {\n\t\t\tthrow new AndroidAgentException(\"Error occurred while reading the stream\", e);\n\t\t}\n\t}",
"public static String getJsonFromPacket(Packet packet) {\n String jsonString=\"\";\n Object data=packet.getData();\n String context=packet.getContext();\n ObjectNode jsonPacket=mapper.createObjectNode();\n jsonPacket.put(METHOD_FIELD, context);\n try {\n ObjectNode node;\n node=mapper.createObjectNode();\n /** Wrap primitive types into value field*/\n if(data!=null) {\n /** Lists */\n if(data instanceof List<?>) {\n List<?> list=(List<?>) data;\n ArrayNode array=mapper.valueToTree(list);\n if(!list.isEmpty()) {\n String typeName=list.get(0).getClass().getTypeName();\n node.put(CLASS_FIELD, LIST_CLASS + SEPERATOR + typeName);\n for(JsonNode item : array)\n ((ObjectNode) item).put(CLASS_FIELD, typeName);\n }\n else {\n node.put(CLASS_FIELD, LIST_CLASS + SEPERATOR);\n }\n node.set(DATA_FIELD, array);\n }\n else {\n /** Primitive or Common objects*/\n if(isPrimitiveOrWrapper(data.getClass())) {\n node=mapper.createObjectNode().put(PRIMITIVE_FIELD, data.toString());\n }\n else {\n node=mapper.convertValue(data, ObjectNode.class);\n }\n node.put(CLASS_FIELD, data.getClass().getTypeName());\n }\n }\n jsonPacket.set(DATA_FIELD, node);\n jsonString=mapper.writeValueAsString(jsonPacket);\n }\n catch(IOException e) {\n e.printStackTrace();\n }\n return jsonString;\n }",
"private FormatAndResolutions loadFormatResolutions() {\n\t\tFormatAndResolutions formatResolutionJson = new FormatAndResolutions();\n\t\tformatResolutionJson.setIMAGE_FORMAT(\"\");\n\t\tformatResolutionJson.setSTILL_CAPTURE(\"Disable\");\n\t\tformatResolutionJson.setSUPPORTED_IN_FS(\"Disable\");\n\t\tformatResolutionJson.setSUPPORTED_IN_HS(\"Disable\");\n\t\tformatResolutionJson.setSUPPORTED_IN_SS(\"Disable\");\n\t\tformatResolutionJson.setRESERVED(\"FF\");\n\t\treturn formatResolutionJson;\n\t}",
"String toJSON();",
"private String convertToJSON(Object o) throws JsonProcessingException {\n return new ObjectMapper().writeValueAsString(o);\n }",
"public String toJson() {\n try{\n return new JsonSerializer().getObjectMapper().writeValueAsString(this);\n } catch (IOException e){\n throw new RuntimeException(e);\n }\n }",
"@Override\n @SuppressWarnings(\"unchecked\")\n public JSONObject toJSON() {\n JSONObject main = new JSONObject();\n JSONObject pocJSON = new JSONObject();\n pocJSON.put(JSON_NAME, this.getName());\n pocJSON.put(JSON_DESCRIPTION, this.getDescription());\n pocJSON.put(JSON_COLOR,this.colorConstraint.getColor().name());\n main.put(SharedConstants.TYPE, SharedConstants.PRIVATE_OBJECTIVE_CARD);\n main.put(SharedConstants.BODY,pocJSON);\n return main;\n }",
"private void initValues(){\n\t\tProduct p = GetMockEnitiy.getProduct();\n\t\t\n\t\tString s = JSONhelper.toJSON(p);\n\t\ttvJSON.setText(s);\n\t\t\n\t}",
"public static com.baidu.im.frame.pb.ObjDeviceTypeInfo.DeviceTypeInfo getDeviceTypeInfo(Context context,\n com.baidu.im.frame.pb.ObjDeviceTypeInfo.DeviceTypeInfo builder) {\n if (context != null && builder != null) {\n refreshDeviceInfoMap(context);\n // builder.setDeviceId(0);\n builder.setPlatform(com.baidu.im.frame.pb.EnumPlatformType.ANDROID);\n builder.setModel(truncateString(deviceInfoMap.get(MODEL), 32)); // NOTE: 服务端DB字段要求32字符以内, 所以进行截断\n builder.setOs(deviceInfoMap.get(OS));\n builder.setNetwork(deviceInfoMap.get(NETWORK));\n builder.setDisplay(deviceInfoMap.get(DISPLAY));\n builder.setManu(deviceInfoMap.get(MANU));\n builder.setScreenSize(deviceInfoMap.get(SCREEN_SIZE));\n }\n return builder;\n }",
"public String getDeviceName(){\n\t return deviceName;\n }",
"public String getDeviceName() {\n return this.deviceName;\n }",
"public boolean DecodeGetSystemInfoResponse(byte[] GetSystemInfoResponse) {\r\n DataDevice ma = (DataDevice) getApplication();\r\n //if the tag has returned a good response\r\n if (GetSystemInfoResponse[0] == (byte) 0x00 && GetSystemInfoResponse.length >= 12) {\r\n //DataDevice ma = (DataDevice)getApplication();\r\n String uidToString = \"\";\r\n byte[] uid = new byte[8];\r\n // change uid format from byteArray to a String\r\n for (int i = 1; i <= 8; i++) {\r\n uid[i - 1] = GetSystemInfoResponse[10 - i];\r\n uidToString += Helper.ConvertHexByteToString(uid[i - 1]);\r\n }\r\n\r\n //***** TECHNO ******\r\n ma.setUid(uidToString);\r\n if (uid[0] == (byte) 0xE0)\r\n ma.setTechno(\"ISO 15693\");\r\n else if (uid[0] == (byte) 0xD0)\r\n ma.setTechno(\"ISO 14443\");\r\n else\r\n ma.setTechno(\"Unknown techno\");\r\n\r\n //***** MANUFACTURER ****\r\n if (uid[1] == (byte) 0x02)\r\n ma.setManufacturer(\"STMicroelectronics\");\r\n else if (uid[1] == (byte) 0x04)\r\n ma.setManufacturer(\"NXP\");\r\n else if (uid[1] == (byte) 0x07)\r\n ma.setManufacturer(\"Texas Instruments\");\r\n else if (uid[1] == (byte) 0x01) //MOTOROLA (updated 20140228)\r\n ma.setManufacturer(\"Motorola\");\r\n else if (uid[1] == (byte) 0x03) //HITASHI (updated 20140228)\r\n ma.setManufacturer(\"Hitachi\");\r\n else if (uid[1] == (byte) 0x04) //NXP SEMICONDUCTORS\r\n ma.setManufacturer(\"NXP\");\r\n else if (uid[1] == (byte) 0x05) //INFINEON TECHNOLOGIES (updated 20140228)\r\n ma.setManufacturer(\"Infineon\");\r\n else if (uid[1] == (byte) 0x06) //CYLINC (updated 20140228)\r\n ma.setManufacturer(\"Cylinc\");\r\n else if (uid[1] == (byte) 0x07) //TEXAS INSTRUMENTS TAG-IT\r\n ma.setManufacturer(\"Texas Instruments\");\r\n else if (uid[1] == (byte) 0x08) //FUJITSU LIMITED (updated 20140228)\r\n ma.setManufacturer(\"Fujitsu\");\r\n else if (uid[1] == (byte) 0x09) //MATSUSHITA ELECTRIC INDUSTRIAL (updated 20140228)\r\n ma.setManufacturer(\"Matsushita\");\r\n else if (uid[1] == (byte) 0x0A) //NEC (updated 20140228)\r\n ma.setManufacturer(\"NEC\");\r\n else if (uid[1] == (byte) 0x0B) //OKI ELECTRIC (updated 20140228)\r\n ma.setManufacturer(\"Oki\");\r\n else if (uid[1] == (byte) 0x0C) //TOSHIBA (updated 20140228)\r\n ma.setManufacturer(\"Toshiba\");\r\n else if (uid[1] == (byte) 0x0D) //MITSUBISHI ELECTRIC (updated 20140228)\r\n ma.setManufacturer(\"Mitsubishi\");\r\n else if (uid[1] == (byte) 0x0E) //SAMSUNG ELECTRONICS (updated 20140228)\r\n ma.setManufacturer(\"Samsung\");\r\n else if (uid[1] == (byte) 0x0F) //HUYNDAI ELECTRONICS (updated 20140228)\r\n ma.setManufacturer(\"Hyundai\");\r\n else if (uid[1] == (byte) 0x10) //LG SEMICONDUCTORS (updated 20140228)\r\n ma.setManufacturer(\"LG\");\r\n else\r\n ma.setManufacturer(\"Unknown manufacturer\");\r\n\r\n if (uid[1] == (byte) 0x02) {\r\n //**** PRODUCT NAME *****\r\n if (uid[2] >= (byte) 0x04 && uid[2] <= (byte) 0x07) {\r\n ma.setProductName(\"LRI512\");\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x14 && uid[2] <= (byte) 0x17) {\r\n ma.setProductName(\"LRI64\");\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x20 && uid[2] <= (byte) 0x23) {\r\n ma.setProductName(\"LRI2K\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x28 && uid[2] <= (byte) 0x2B) {\r\n ma.setProductName(\"LRIS2K\");\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x2C && uid[2] <= (byte) 0x2F) {\r\n ma.setProductName(\"M24LR64\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n } else if (uid[2] >= (byte) 0x40 && uid[2] <= (byte) 0x43) {\r\n ma.setProductName(\"LRI1K\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x44 && uid[2] <= (byte) 0x47) {\r\n ma.setProductName(\"LRIS64K\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n } else if (uid[2] >= (byte) 0x48 && uid[2] <= (byte) 0x4B) {\r\n ma.setProductName(\"M24LR01E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x4C && uid[2] <= (byte) 0x4F) {\r\n ma.setProductName(\"M24LR16E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n if (ma.isBasedOnTwoBytesAddress() == false)\r\n return false;\r\n } else if (uid[2] >= (byte) 0x50 && uid[2] <= (byte) 0x53) {\r\n ma.setProductName(\"M24LR02E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x54 && uid[2] <= (byte) 0x57) {\r\n ma.setProductName(\"M24LR32E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n if (ma.isBasedOnTwoBytesAddress() == false)\r\n return false;\r\n } else if (uid[2] >= (byte) 0x58 && uid[2] <= (byte) 0x5B) {\r\n ma.setProductName(\"M24LR04E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n } else if (uid[2] >= (byte) 0x5C && uid[2] <= (byte) 0x5F) {\r\n ma.setProductName(\"M24LR64E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n if (ma.isBasedOnTwoBytesAddress() == false)\r\n return false;\r\n } else if (uid[2] >= (byte) 0x60 && uid[2] <= (byte) 0x63) {\r\n ma.setProductName(\"M24LR08E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n } else if (uid[2] >= (byte) 0x64 && uid[2] <= (byte) 0x67) {\r\n ma.setProductName(\"M24LR128E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n if (ma.isBasedOnTwoBytesAddress() == false)\r\n return false;\r\n } else if (uid[2] >= (byte) 0x6C && uid[2] <= (byte) 0x6F) {\r\n ma.setProductName(\"M24LR256E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n if (ma.isBasedOnTwoBytesAddress() == false)\r\n return false;\r\n } else if (uid[2] >= (byte) 0xF8 && uid[2] <= (byte) 0xFB) {\r\n ma.setProductName(\"detected product\");\r\n ma.setBasedOnTwoBytesAddress(true);\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n } else {\r\n ma.setProductName(\"Unknown product\");\r\n ma.setBasedOnTwoBytesAddress(false);\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n }\r\n\r\n //*** DSFID ***\r\n ma.setDsfid(Helper.ConvertHexByteToString(GetSystemInfoResponse[10]));\r\n\r\n //*** AFI ***\r\n ma.setAfi(Helper.ConvertHexByteToString(GetSystemInfoResponse[11]));\r\n\r\n //*** MEMORY SIZE ***\r\n if (ma.isBasedOnTwoBytesAddress()) {\r\n String temp = new String();\r\n temp += Helper.ConvertHexByteToString(GetSystemInfoResponse[13]);\r\n temp += Helper.ConvertHexByteToString(GetSystemInfoResponse[12]);\r\n ma.setMemorySize(temp);\r\n } else\r\n ma.setMemorySize(Helper.ConvertHexByteToString(GetSystemInfoResponse[12]));\r\n\r\n //*** BLOCK SIZE ***\r\n if (ma.isBasedOnTwoBytesAddress())\r\n ma.setBlockSize(Helper.ConvertHexByteToString(GetSystemInfoResponse[14]));\r\n else\r\n ma.setBlockSize(Helper.ConvertHexByteToString(GetSystemInfoResponse[13]));\r\n\r\n //*** IC REFERENCE ***\r\n if (ma.isBasedOnTwoBytesAddress())\r\n ma.setIcReference(Helper.ConvertHexByteToString(GetSystemInfoResponse[15]));\r\n else\r\n ma.setIcReference(Helper.ConvertHexByteToString(GetSystemInfoResponse[14]));\r\n } else {\r\n ma.setProductName(\"Unknown product\");\r\n ma.setBasedOnTwoBytesAddress(false);\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n //ma.setAfi(\"00 \");\r\n ma.setAfi(Helper.ConvertHexByteToString(GetSystemInfoResponse[11])); //changed 22-10-2014\r\n //ma.setDsfid(\"00 \");\r\n ma.setDsfid(Helper.ConvertHexByteToString(GetSystemInfoResponse[10])); //changed 22-10-2014\r\n //ma.setMemorySize(\"FF \");\r\n ma.setMemorySize(Helper.ConvertHexByteToString(GetSystemInfoResponse[12])); //changed 22-10-2014\r\n //ma.setBlockSize(\"03 \");\r\n ma.setBlockSize(Helper.ConvertHexByteToString(GetSystemInfoResponse[13])); //changed 22-10-2014\r\n //ma.setIcReference(\"00 \");\r\n ma.setIcReference(Helper.ConvertHexByteToString(GetSystemInfoResponse[14])); //changed 22-10-2014\r\n }\r\n\r\n return true;\r\n }\r\n\r\n // in case of Inventory OK and Get System Info HS\r\n else if (ma.getTechno() == \"ISO 15693\") {\r\n ma.setProductName(\"Unknown product\");\r\n ma.setBasedOnTwoBytesAddress(false);\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n ma.setAfi(\"00 \");\r\n ma.setDsfid(\"00 \");\r\n ma.setMemorySize(\"3F \"); //changed 22-10-2014\r\n ma.setBlockSize(\"03 \");\r\n ma.setIcReference(\"00 \");\r\n return true;\r\n }\r\n\r\n //if the tag has returned an error code\r\n else\r\n return false;\r\n\r\n }",
"public boolean writeToDeviceFile(Device dev) {\n\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n Element rootElement = doc.createElement(\"Sifeb\");\n doc.appendChild(rootElement);\n Element device = doc.createElement(\"Device\");\n rootElement.appendChild(device);\n Element id = doc.createElement(\"Id\");\n id.appendChild(doc.createTextNode(dev.getDeviceID()));\n device.appendChild(id);\n Element names = doc.createElement(\"Names\");\n device.appendChild(names);\n\n for (Map.Entry<Locale, String> entry : dev.getDeviceNames().entrySet()) {\n Element name = doc.createElement(\"Name\");\n Element locale = doc.createElement(\"Locale\");\n Element nameStr = doc.createElement(\"Value\");\n\n locale.appendChild(doc.createTextNode(entry.getKey().toString()));\n nameStr.appendChild(doc.createTextNode(entry.getValue()));\n\n name.appendChild(locale);\n name.appendChild(nameStr);\n names.appendChild(name);\n }\n\n Element type = doc.createElement(\"Type\");\n type.appendChild(doc.createTextNode(dev.getType()));\n device.appendChild(type);\n Element image = doc.createElement(\"Image\");\n image.appendChild(doc.createTextNode(dev.getImgName()));\n device.appendChild(image);\n Element capabilities = doc.createElement(\"Capabilities\");\n device.appendChild(capabilities);\n\n for (int j = 0; j < dev.getCapabilities().size(); j++) {\n Element cap = doc.createElement(\"capability\");\n cap.appendChild(doc.createTextNode(dev.getCapabilities().get(j).getCapID()));\n capabilities.appendChild(cap);\n }\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n File file = new File(SifebUtil.DEV_FILE_DIR + dev.getDeviceID() + \".xml\");\n StreamResult result = new StreamResult(file);\n transformer.transform(source, result);\n\n return true;\n\n } catch (ParserConfigurationException | TransformerException pce) {\n return false;\n }\n }",
"public static String getDeviceInformation(Context context) {\n String details = \"SDK\\t: \" + Build.VERSION.SDK_INT\n +\"\\nBRD\\t: \" + Build.BRAND\n +\"\\nH/W\\t: \" + Build.HARDWARE\n +\"\\nHST\\t: \" + Build.HOST\n +\"\\nID \\t: \" + Build.ID\n +\"\\nMFR\\t: \" + Build.MANUFACTURER\n +\"\\nMDL\\t: \" + Build.MODEL\n +\"\\nPRD\\t: \" + Build.PRODUCT\n +\"\\nDEV\\t: \" + Build.DEVICE\n +\"\\nAPP\\t: \" + context.getResources().getString(R.string.software_version)\n +\"\\n\\n\\n\";\n Log.d(MainActivity.APP_TAG, \"Device Details: \" + details);\n return details;\n }",
"private Object writeMessageBase(AaiMessageBase node) {\n Object json = JsonCompat.objectNode();\n\n JsonCompat.setPropertyNull(json, Constants.PROP_HEADERS); // map\n JsonCompat.setPropertyNull(json, Constants.PROP_CORRELATION_ID); // prop\n JsonCompat.setPropertyString(json, Constants.PROP_SCHEMA_FORMAT, node.schemaFormat);\n JsonCompat.setPropertyString(json, Constants.PROP_CONTENT_TYPE, node.contentType);\n JsonCompat.setPropertyString(json, Constants.PROP_NAME, node.name);\n JsonCompat.setPropertyString(json, Constants.PROP_TITLE, node.title);\n JsonCompat.setPropertyString(json, Constants.PROP_SUMMARY, node.summary);\n JsonCompat.setPropertyString(json, Constants.PROP_DESCRIPTION, node.description);\n JsonCompat.setPropertyString(json, Constants.PROP_$REF, node.$ref);\n JsonCompat.setPropertyNull(json, Constants.PROP_TAGS); // list\n JsonCompat.setPropertyNull(json, Constants.PROP_EXTERNAL_DOCS); // prop\n JsonCompat.setPropertyNull(json, Constants.PROP_BINDINGS); // map\n\n JsonCompat.setProperty(json, Constants.PROP_EXAMPLES, node.examples);\n\n return json;\n }",
"static WritableMap userInfoToJSON(UserInfo info) {\n\n WritableMap userInfo = Arguments.createMap();\n\n if (info == null) {\n return userInfo;\n }\n\n userInfo.putString(\"displayableId\", info.getDisplayableId());\n userInfo.putString(\"familyName\", info.getFamilyName());\n userInfo.putString(\"givenName\", info.getGivenName());\n userInfo.putString(\"identityProvider\", info.getIdentityProvider());\n userInfo.putString(\"passwordChangeUrl\", String.valueOf(info.getPasswordChangeUrl()));\n userInfo.putString(\"passwordExpiresOn\", String.valueOf(info.getPasswordExpiresOn()));\n userInfo.putString(\"uniqueId\", info.getUserId());\n userInfo.putString(\"userId\", info.getUserId());\n\n return userInfo;\n }",
"public void convert() throws IOException {\n URL url = new URL(SERVICE + City + \",\" + Country + \"&\" + \"units=\" + Type + \"&\" + \"APPID=\" + ApiID);\n BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));\n String line = reader.readLine();\n // Pobieranie JSON\n\n // Wyciąganie informacji z JSON\n //*****************************************************************\n //Temp\n if (!StringUtils.isBlank(line)) {\n int startIndex = line.indexOf(\"{\\\"temp\\\"\") + 8;\n int endIndex = line.indexOf(\",\\\"feels_like\\\"\");\n temperature = line.substring(startIndex, endIndex);\n // System.out.println(temperature);\n }\n //Min temp\n if (!StringUtils.isBlank(line)) {\n int startIndex = line.indexOf(\",\\\"temp_min\\\"\") + 12;\n int endIndex = line.indexOf(\",\\\"temp_max\\\"\");\n temperatureMin = line.substring(startIndex, endIndex);\n // System.out.println(temperatureMin);\n }\n //Max temp\n if (!StringUtils.isBlank(line)) {\n int startIndex = line.indexOf(\"\\\"temp_max\\\":\") + 11;\n int endIndex = line.indexOf(\",\\\"pressure\\\"\");\n temperatureMax = line.substring(startIndex, endIndex);\n //System.out.println(temperatureMax);\n }//todo dodaj więcej informacji takich jak cisnienie i takie tam\n //*****************************************************************\n }",
"@Test\n @SmallTest\n public void testSerializeToJson() throws Throwable {\n final String jsonObjectString =\n \"{'crash-local-id':'123456abc','crash-capture-time':1234567890,\"\n + \"'crash-is-hidden':false,\"\n + \"'crash-keys':{'app-package-name':'org.test.package'}}\";\n JSONObject expectedJsonObject = new JSONObject(jsonObjectString);\n\n CrashInfo c = createCrashInfo(\"123456abc\", 1234567890, null, -1, \"org.test.package\", null);\n Assert.assertEquals(c.serializeToJson(), expectedJsonObject.toString());\n }",
"private static DeviceInformation parseDeviceInfor(XmlPullParser parser) {\n try {\n parser.require(XmlPullParser.START_TAG, XMLParser.NS,\n DeviceInformation.DEVICE_INFORMATION);\n DeviceInformation device = new DeviceInformation();\n while (parser.next() != XmlPullParser.END_TAG) {\n if (parser.getEventType() != XmlPullParser.START_TAG) {\n continue;\n }\n String name = parser.getName();\n if (DeviceInformation.LOGICAL_ADDRESS.equals(name)) {\n device.setLogAddr(getIntValue(XMLParser.getValue(parser,\n DeviceInformation.LOGICAL_ADDRESS)));\n } else if (DeviceInformation.PHYSICAL_ADDRESS.equals(name)) {\n device.setPhyAddr(XMLParser.getValue(parser,\n DeviceInformation.PHYSICAL_ADDRESS));\n } else if (DeviceInformation.DEVICE_TYPE.equals(name)) {\n device.setDevType(getIntValue(XMLParser.getValue(parser,\n DeviceInformation.DEVICE_TYPE)));\n } else if (DeviceInformation.VENDOR_ID.equals(name)) {\n device.setVendorId(XMLParser.getValue(parser,\n DeviceInformation.VENDOR_ID));\n } else if (DeviceInformation.HDMI_PORT_NUM.equals(name)) {\n device.setHdmiPort(getIntValue(XMLParser.getValue(parser,\n DeviceInformation.HDMI_PORT_NUM)));\n } else if (DeviceInformation.CONNECTEDTOAMP.equals(name)) {\n device.setCntToAmp(Boolean.valueOf(XMLParser.getValue(\n parser, DeviceInformation.CONNECTEDTOAMP)));\n } else if (DeviceInformation.OSD_NAME.equals(name)) {\n device.setOsdName(XMLParser.getValue(parser,\n DeviceInformation.OSD_NAME));\n } else {\n XMLParser.skip(parser);\n }\n }\n\n return device;\n } catch (XmlPullParserException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }",
"public void write(JsonWriter jsonWriter, C2462t tVar) throws IOException {\n Class<String> cls = String.class;\n if (tVar == null) {\n jsonWriter.nullValue();\n return;\n }\n jsonWriter.beginObject();\n jsonWriter.name(\"cpId\");\n if (tVar.mo10328b() == null) {\n jsonWriter.nullValue();\n } else {\n TypeAdapter<String> typeAdapter = this.f7883a;\n if (typeAdapter == null) {\n typeAdapter = this.f7885c.getAdapter(cls);\n this.f7883a = typeAdapter;\n }\n typeAdapter.write(jsonWriter, tVar.mo10328b());\n }\n jsonWriter.name(\"bundleId\");\n if (tVar.mo10327a() == null) {\n jsonWriter.nullValue();\n } else {\n TypeAdapter<String> typeAdapter2 = this.f7883a;\n if (typeAdapter2 == null) {\n typeAdapter2 = this.f7885c.getAdapter(cls);\n this.f7883a = typeAdapter2;\n }\n typeAdapter2.write(jsonWriter, tVar.mo10327a());\n }\n jsonWriter.name(\"sdkVersion\");\n if (tVar.mo10330d() == null) {\n jsonWriter.nullValue();\n } else {\n TypeAdapter<String> typeAdapter3 = this.f7883a;\n if (typeAdapter3 == null) {\n typeAdapter3 = this.f7885c.getAdapter(cls);\n this.f7883a = typeAdapter3;\n }\n typeAdapter3.write(jsonWriter, tVar.mo10330d());\n }\n jsonWriter.name(\"rtbProfileId\");\n TypeAdapter<Integer> typeAdapter4 = this.f7884b;\n if (typeAdapter4 == null) {\n typeAdapter4 = this.f7885c.getAdapter(Integer.class);\n this.f7884b = typeAdapter4;\n }\n typeAdapter4.write(jsonWriter, Integer.valueOf(tVar.mo10329c()));\n jsonWriter.endObject();\n }",
"@Override\n public String toJSONString()\n {\n return \"{\\\"packet\\\":{\\\"agentsName\\\":\\\"\\\",\\\"placesName\\\":\\\"\\\",\\\"placesX\\\":0,\\\"placesY\\\":0,\\\"numberOfPlaces\\\":0,\\\"numberOfAgents\\\":0,\\\"placeOverloadsSetDebugData\\\":false,\\\"placeOverloadsGetDebugData\\\":false,\\\"agentOverloadsSetDebugData\\\":false,\\\"agentOverloadsGetDebugData\\\":false,\\\"placeDataType\\\":\\\"\\\",\\\"agentDataType\\\":\\\"\\\"},\\\"request\\\":0}\";\n }",
"public abstract String serialise();",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getDeviceName() != null)\n sb.append(\"DeviceName: \").append(getDeviceName()).append(\",\");\n if (getIops() != null)\n sb.append(\"Iops: \").append(getIops()).append(\",\");\n if (getIsBootDisk() != null)\n sb.append(\"IsBootDisk: \").append(getIsBootDisk()).append(\",\");\n if (getStagingDiskType() != null)\n sb.append(\"StagingDiskType: \").append(getStagingDiskType()).append(\",\");\n if (getThroughput() != null)\n sb.append(\"Throughput: \").append(getThroughput());\n sb.append(\"}\");\n return sb.toString();\n }",
"private Builder(export.serializers.avro.DeviceInfo other) {\n super(SCHEMA$);\n if (isValidValue(fields()[0], other.site)) {\n this.site = data().deepCopy(fields()[0].schema(), other.site);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.service)) {\n this.service = data().deepCopy(fields()[1].schema(), other.service);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.sector)) {\n this.sector = data().deepCopy(fields()[2].schema(), other.sector);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.room)) {\n this.room = data().deepCopy(fields()[3].schema(), other.room);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.alias)) {\n this.alias = data().deepCopy(fields()[4].schema(), other.alias);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.serialPort)) {\n this.serialPort = data().deepCopy(fields()[5].schema(), other.serialPort);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.driver)) {\n this.driver = data().deepCopy(fields()[6].schema(), other.driver);\n fieldSetFlags()[6] = true;\n }\n }",
"protected JSONObject getJsonRepresentation() throws Exception {\r\n\r\n JSONObject jsonObj = new JSONObject();\r\n jsonObj.put(\"note\", note);\r\n return jsonObj;\r\n }",
"private void writeDeviceDependentObject(XDIMEContextInternal context)\n throws XDIMEException {\n\n DeviceDependentTypeProcessor deviceDependentTypeProcessor =\n new DeviceDependentTypeProcessor();\n deviceDependentTypeProcessor.writeObject(context,(ObjectAttribute)protocolAttributes,\n bodyContentBuffer);\n }",
"public String getAsJson() {\n StringBuffer sb = new StringBuffer();\n sb.append(\"{\\\"code\\\": \\\"\").append(this.code).append(\"\\\", \");\n sb.append(\"\\\"color\\\": \\\"\").append(this.color).append(\"\\\", \");\n\n /* Append a size only if the product has a Size */\n if (this.size.getClass() != NoSize.class) {\n sb.append(\"\\\"size\\\": \\\"\").append(this.size).append(\"\\\", \");\n }\n\n sb.append(\"\\\"price\\\": \").append(this.price).append(\", \");\n sb.append(\"\\\"currency\\\": \\\"\").append(this.currency).append(\"\\\"}, \");\n\n return sb.toString();\n }",
"@Override\n public JSONObject toJson() {\n JSONObject json = new JSONObject();\n json.put(\"frontInfo\", frontInfo);\n json.put(\"backInfo\", backInfo);\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n String formattedDate = dateFormat.format(startTime);\n\n json.put(\"startTime\", formattedDate);\n json.put(\"cardID\", cardID);\n return json;\n }",
"@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean readDeviceInfo() {\n\t\tboolean flag = oTest.readDeviceInfo();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}",
"String objectOut (JField jf, Object value, MarshalContext context) {\n\t\tString result = value.toString ();\n\t\tif (jf.isDate ()) {\n\t\t\tSimpleDateFormat sdf = context.getDateFormat ();\n\t\t\tif (sdf == null) // the usuals seconds ..\n\t\t\t\tresult = ((java.sql.Timestamp)value).getTime() + \"\";\n\t\t\telse\n\t\t\t\tresult = sdf.format ((java.sql.Timestamp)value);\n\t\t}\n\t\telse if (jf.getObjectType ().equals (\"char\") && result.charAt (0) == (char)0)\n\t\t\tresult = \"\";\n\t\telse if (jf.getObjectType ().equals (\"double\") && result.equals (\"NaN\"))\n\t\t\tresult = \"\";\n\t\treturn result;\n }",
"private static String asJsonString(final Object obj) {\n try {\n ObjectMapper objectToJsonMapper = new ObjectMapper();\n objectToJsonMapper.registerModule(new JavaTimeModule());\n objectToJsonMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);\n return objectToJsonMapper.writeValueAsString(obj);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }",
"public final JSONObject toJSONObject() {\n AppMethodBeat.m2504i(71816);\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"id\", this.f5220id);\n jSONObject.put(FIRST_NAME_KEY, this.firstName);\n jSONObject.put(MIDDLE_NAME_KEY, this.middleName);\n jSONObject.put(LAST_NAME_KEY, this.lastName);\n jSONObject.put(\"name\", this.name);\n if (this.linkUri != null) {\n jSONObject.put(LINK_URI_KEY, this.linkUri.toString());\n }\n } catch (JSONException e) {\n jSONObject = null;\n }\n AppMethodBeat.m2505o(71816);\n return jSONObject;\n }",
"public String toJsonfrmObject(Object object) {\n try {\n ObjectMapper mapper = new ObjectMapper();\n mapper.setDateFormat(simpleDateFormat);\n return mapper.writeValueAsString(object);\n } catch (IOException e) {\n logger.error(\"Invalid JSON!\", e);\n }\n return \"\";\n }",
"@Override\n\tpublic String fieldConvert(String field) {\n\t\tif (!StringUtils.isEmpty(field)) {\n\t\t\tswitch (field) {\n\t\t\tcase \"code\":\n\t\t\t\treturn \"CODE\";\n\t\t\tcase \"name\":\n\t\t\t\treturn \"NAME\";\n\t\t\tcase \"createTime\":\n\t\t\t\treturn \"CREATE_TIME\";\n\t\t\tcase \"updateTime\":\n\t\t\t\treturn \"UPDATE_TIME\";\n\t\t\tdefault:\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}",
"@Test\n public void readSystemObjectClassDoctorFeedback() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"DoctorFeedback\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return DoctorFeedback properly\", object.getClass(), actual.getClass());\n }",
"@Override\n\tpublic void writeToParcel(Parcel dest, int flags) {\n\t\tdest.writeString(vooleAuth);\n\t\tdest.writeString(authCompile);\n\t\tdest.writeString(vooleAgent);\n\t\tdest.writeString(agentCompile);\n\t\tdest.writeString(agentLibs);\n\t\tdest.writeString(upgradeVersion);\n\t\tdest.writeString(terminaLogVersion);\n\t\tdest.writeString(apkStartType);\n\t\tdest.writeString(isAuth);\n\t\tdest.writeString(deviceid);\n\t\tdest.writeString(sn);\n\t\tdest.writeString(sdkModuleVersion);\n\t\tdest.writeString(sdkModuleType);\n\t\tdest.writeString(packageName);\n\t\tdest.writeParcelable(info, PARCELABLE_WRITE_RETURN_VALUE);\n\t}",
"protected JSONObject getJsonRepresentation() throws Exception {\n\n JSONObject jsonObj = new JSONObject();\n jsonObj.put(\"name\", getName());\n return jsonObj;\n }",
"@Override\r\n\tpublic String toJsonString() {\n\t\treturn null;\r\n\t}"
]
| [
"0.6019024",
"0.55245554",
"0.549993",
"0.5451041",
"0.52900565",
"0.51598555",
"0.512278",
"0.50710016",
"0.5048867",
"0.5039743",
"0.503355",
"0.5025372",
"0.5019211",
"0.5012467",
"0.49943638",
"0.49711004",
"0.4940479",
"0.49194425",
"0.49139598",
"0.49076176",
"0.48937908",
"0.48883355",
"0.48854655",
"0.48817748",
"0.48817155",
"0.48732856",
"0.48684692",
"0.48669812",
"0.48596618",
"0.48470083",
"0.4838347",
"0.4830377",
"0.48298284",
"0.48257542",
"0.48149952",
"0.4813534",
"0.4805418",
"0.48030686",
"0.47933325",
"0.47901013",
"0.47897983",
"0.47788078",
"0.47705054",
"0.4770031",
"0.47645107",
"0.4750299",
"0.4744019",
"0.474043",
"0.4737161",
"0.4735613",
"0.47323826",
"0.47282442",
"0.47209567",
"0.47152933",
"0.47034982",
"0.4701676",
"0.46928194",
"0.46821228",
"0.46782795",
"0.46747535",
"0.46738127",
"0.46738127",
"0.46680152",
"0.46656385",
"0.4661963",
"0.46601564",
"0.46575055",
"0.46558982",
"0.46490023",
"0.46448767",
"0.46445516",
"0.46442372",
"0.46408853",
"0.4639215",
"0.46353474",
"0.4629309",
"0.46097252",
"0.46038407",
"0.46027285",
"0.4601551",
"0.4600517",
"0.45960322",
"0.45930478",
"0.45923015",
"0.45905972",
"0.45848158",
"0.45832026",
"0.45815492",
"0.45720592",
"0.45699623",
"0.45687768",
"0.45661741",
"0.4564679",
"0.45605892",
"0.4558239",
"0.45559746",
"0.45523584",
"0.45376992",
"0.4533039",
"0.4532748"
]
| 0.6363875 | 0 |
Verify that a device equal to itself. | @Test
public void equalsSelfTest() {
assertEquals(device, device);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void equalsSameTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device, device2);\n }",
"@Test\n public void equalsOtherTest() {\n Device device2 = new Device(deviceID, \"other\");\n assertNotEquals(device, device2);\n }",
"@Override\r\n\tpublic boolean sameIdentityAs(Device other) {\n\t\treturn false;\r\n\t}",
"@Test\n public void equalsOtherTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device, device2);\n }",
"@Test\n public void equalsOtherTest3() {\n assertFalse(device.equals(null));\n }",
"@Test\n public void equalsOtherTest4() {\n assertFalse(device.equals(\"\"));\n }",
"@Test\n public void newDeviceDuplicateTest() {\n DatabaseTest.setupDevice();\n Device newDevice = newDevice(DatabaseTest.DEVICE_ID);\n\n assertNull(newDevice);\n DatabaseTest.cleanDatabase();\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Biometric)) {\n return false;\n }\n Biometric other = (Biometric) object;\n if ((this.deviceId == null && other.deviceId != null) || (this.deviceId != null && !this.deviceId.equals(other.deviceId))) {\n return false;\n }\n return true;\n }",
"@Test\n public void testEqualsReturnsTrueOnSelfArg() {\n boolean equals = record.equals(record);\n\n assertThat(equals, is(true));\n }",
"@Override\n public boolean equals(Object obj) {\n if(obj instanceof Devices)\n {\n Devices temp = (Devices) obj;\n if(this.device==temp.getDevice() && this.MAC ==temp.getMAC())\n return true;\n }\n return false;\n\n }",
"@Override\n protected void validateRegisteredDevice(MultifactorDevice device) throws Exception {\n assertThat(device.getBackup(), is(Boolean.TRUE));\n }",
"@Override\r\n public boolean equals(Object o) {\r\n if(this == o) return true;\r\n if( !(o instanceof MobileDevice)) return false;\r\n \r\n MobileDevice md = (MobileDevice)o;\r\n \r\n if(this.deviceName != md.deviceName) return false;\r\n if(this.valueTag != md.valueTag) return false;\r\n if(this.lab != md.lab) return false;\r\n if(this.rentSettings != md.rentSettings) return false;\r\n \r\n return true;\r\n }",
"@Test\n public void equals() throws Exception {\n SmartPlayer x = new SmartPlayer(0, 0);\n SmartPlayer y = new SmartPlayer(0, 0);\n assertTrue(x.equals(y));\n }",
"@Test\n public void equals2() throws Exception {\n SmartPlayer x = new SmartPlayer(0, 1);\n SmartPlayer y = new SmartPlayer(0, 2);\n assertFalse(x.equals(y));\n }",
"@Test\n public void getDeviceTest() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);\n\n assertEquals(device, getDevice(DatabaseTest.DEVICE_ID));\n DatabaseTest.cleanDatabase();\n }",
"@Test\n public void getDeviceIDTest() {\n assertEquals(deviceID, device.getDeviceID());\n }",
"@Test\n public void hashCodeTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device.hashCode(), device2.hashCode());\n }",
"@Test\n public void stopDeviceCheck() {\n System.out.println(\"* Device JUnit4Test: stopDeviceCheck()\");\n\n // authenticate the device and then stop it\n authenticateSimulatedDevice();\n mMainServer.removeDevice(mDeviceInstance);\n TestsConfig.delay(150);\n \n // check if the device is corretly removed from the server\n assertFalse(mDeviceInstance.isDeviceActive());\n assertNull(mMainServer.getDevice(mDeviceInstance.getUniqueIdentifier()));\n }",
"@Test\n public void hashCodeTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device.hashCode(), device2.hashCode());\n }",
"boolean hasDeviceId();",
"boolean hasDeviceId();",
"@Test\n\tpublic void unitIsEquivalentToItself() {\n\t\tDummyUnit unit = new DummyUnit(SYMBOL);\n\t\tassertTrue(unit.isEquivalentTo(unit));\n\t}",
"boolean hasDevice();",
"private boolean validDevice(AcceleratorNode nodeDev) {\n// for (Class<?> typeValidDev : this.arrValidDevTypes) {\n// if (nodeDev.getClass() == typeValidDev)\n// return true;\n// }\n// \n// return false;\n \n return true;\n }",
"private boolean oneEquals(AccessPath that) {\n //if (this._n != that._n) return false;\n if (this._field != that._field) return false;\n if (this._last != that._last) return false;\n if (this.succ.size() != that.succ.size()) return false;\n return true;\n }",
"@Test\n public void equals() {\n CsvAdaptedPatient alice = new CsvAdaptedPatient(ALICE);\n CsvAdaptedPatient aliceCopy = new CsvAdaptedPatient(new PatientBuilder(ALICE).build());\n\n assertTrue(alice.equals(aliceCopy));\n\n // same object -> returns true\n assertTrue(alice.equals(alice));\n\n // null -> returns false\n assertFalse(alice.equals(null));\n\n // different type -> returns false\n assertFalse(alice.equals(5));\n\n // different patient -> returns false\n assertFalse(alice.equals(new CsvAdaptedPatient(BOB)));\n\n // different name -> returns false\n Patient editedAlice = new PatientBuilder(ALICE).withName(VALID_NAME_BOB).build();\n assertFalse(alice.equals(new CsvAdaptedPatient(editedAlice)));\n\n // different phone -> returns false\n editedAlice = new PatientBuilder(ALICE).withPhone(VALID_PHONE_BOB).build();\n assertFalse(alice.equals(new CsvAdaptedPatient(editedAlice)));\n\n // different address -> returns false\n editedAlice = new PatientBuilder(ALICE).withAddress(VALID_ADDRESS_BOB).build();\n assertFalse(alice.equals(new CsvAdaptedPatient(editedAlice)));\n\n // different remark -> returns false\n editedAlice = new PatientBuilder(ALICE).withRemark(VALID_REMARK_BOB).build();\n assertFalse(alice.equals(new CsvAdaptedPatient(editedAlice)));\n }",
"public void testGetSimOperator_unavailableDevice() {\n mMockIDevice = EasyMock.createMock(IDevice.class);\n EasyMock.expect(mMockIDevice.getState()).andReturn(DeviceState.UNAUTHORIZED);\n EasyMock.expect(mMockIDevice.getSerialNumber()).andReturn(\"serial\");\n EasyMock.replay(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n assertNull(mTestDevice.getSimOperator());\n EasyMock.verify(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n }",
"@Test\n public void findDevice() throws Exception {\n MockUpnpService upnpService = new MockUpnpService();\n LocalDevice device = SampleData.createLocalDevice();\n upnpService.getRegistry().addDevice(device);\n\n UDN udn = device.getIdentity().getUdn();\n\n Registry registry = upnpService.getRegistry(); // DOC: FIND_ROOT_UDN\n Device foundDevice = registry.getDevice(udn, true);\n\n assertEquals(foundDevice.getIdentity().getUdn(), udn); // DOC: FIND_ROOT_UDN\n\n LocalDevice localDevice = registry.getLocalDevice(udn, true); // DOC: FIND_LOCAL_DEVICE\n assertEquals(localDevice.getIdentity().getUdn(), udn);\n\n SampleDeviceRootLocal.assertLocalResourcesMatch(\n upnpService.getConfiguration().getNamespace().getResources(device)\n );\n }",
"boolean hasSameAs();",
"@Test\n public void authenticateTestFailure2() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, \"other_token\");\n assertFalse(device.authenticate());\n DatabaseTest.cleanDatabase();\n }",
"public boolean isSetDeviceName() {\n return this.deviceName != null;\n }",
"public boolean isBeamWithTheSameDevice(IWifiP2pProxy.IFastConnectInfo info) {\n\t\t\n\t\tif (mTargetInfo != null\n\t\t\t\t&& mTargetInfo.getDeviceAddress().equals(\n\t\t\t\t\t\tinfo.getDeviceAddress())) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isDuplicate(IDecodedDeviceRequest<?> request) throws SiteWhereException;",
"public void testEquals()\n {\n // test passing null to equals returns false\n // (as specified in the JDK docs for Object)\n EthernetAddress x =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"equals(null) didn't return false\",\n x.equals((Object)null));\n \n // test passing an object which is not a EthernetAddress returns false\n assertFalse(\"x.equals(non_EthernetAddress_object) didn't return false\",\n x.equals(new Object()));\n \n // test a case where two EthernetAddresss are definitly not equal\n EthernetAddress w =\n new EthernetAddress(ANOTHER_VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == w didn't return false\",\n x == w);\n assertFalse(\"x.equals(w) didn't return false\",\n x.equals(w));\n\n // test refelexivity\n assertTrue(\"x.equals(x) didn't return true\",\n x.equals(x));\n \n // test symmetry\n EthernetAddress y =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"y.equals(x) didn't return true\",\n y.equals(x));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n \n // now we'll test transitivity\n EthernetAddress z =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertFalse(\"x == y didn't return false\",\n y == z);\n assertFalse(\"x == y didn't return false\",\n x == z);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"y.equals(z) didn't return true\",\n y.equals(z));\n assertTrue(\"x.equals(z) didn't return true\",\n x.equals(z));\n \n // test consistancy (this test is just calling equals multiple times)\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n }",
"@Test\n\tpublic void testEquals1() {\n\t\tDistance d1 = new Distance(0, 0);\n\t\tDistance d2 = new Distance();\n\t\tassertEquals(false, d1.equals(d2));\n\t}",
"public void testGetOwner_1_accuracy() {\n instance.setOwner(owner);\n assertTrue(\"Owner is not set properly.\", owner == instance.getOwner());\n }",
"@Test\n public void testEquals_sameParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are equivalent\n assertThat(cellIdentityNr).isEqualTo(anotherCellIdentityNr);\n }",
"@Test\n final void testCreateDeviceAlreadyExists() {\n when(deviceDao.findDevice(DeviceFixture.SERIAL_NUMBER)).thenReturn(Optional.of(deviceDTO));\n\n assertThrows(\n ExceptionType.DeviceAlreadyExistsException.class,\n () -> deviceController.createDevice(createDeviceRequest));\n }",
"@Test\n public void testEqualTo() {\n System.out.println(\"AbsolutePathNode - testEqualTo\");\n final AbsolutePathNode instance1 = new AbsolutePathNode();\n final AbsolutePathNode instance2 = new AbsolutePathNode();\n final TestNode testInstance = TestNode.instance;\n assertTrue(instance1.equalTo(instance2));\n assertFalse(instance1.equalTo(testInstance));\n }",
"@Override\n\tpublic boolean equal() {\n\t\treturn false;\n\t}",
"@Test\n public void testEqualsReturnsTrueOnIdenticalRecords() {\n boolean equals = record.equals(otherRecord);\n\n assertThat(equals, is(true));\n }",
"private static boolean isValidDeviceId(String deviceId){\n return deviceId != null;\n }",
"@Test\n\tpublic void testDeckEqualsAgain() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tVegasDeckClass testDeck = new VegasDeckClass();\n\t\t\n\t\tboolean isSame = oneDeck.equals(testDeck);\n\t\t\n\t\tassertEquals(\"equals method not working as expected\", false, isSame);\n\t}",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Hardware)) {\n return false;\n }\n Hardware other = (Hardware) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"public boolean isDeviceAlreadyConnected(IWifiP2pProxy.IFastConnectInfo info) {\n\t\tLog.d(TAG, \"mConnectedDevice = \" + mConnectedDevice.getDeviceAddress());\n\t\tLog.d(TAG, \"info = \" + info.getDeviceAddress());\n\t\tif (mConnectedDevice.getDeviceAddress().equalsIgnoreCase(info.getDeviceAddress())) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic boolean isEqual(Node node) {\n\t\treturn false;\r\n\t}",
"@Test\n @DisplayName(\"Matched\")\n public void testEqualsMatched() throws BadAttributeException {\n Settings settings = new Settings();\n assertEquals(new Settings(), settings);\n }",
"public boolean equals(Object arg) {\n\t\tif (arg == null) {\n\t\t\treturn(false);\n\t\t}\n\t\t\n\t\tFileSystem temp = (FileSystem) arg;\n\t\t\n\t\tif (temp.getDevice().equals(_device)) {\n\t\t\t//empty\n\t\t} else {\n\t\t\treturn(false);\n\t\t}\n\t\t\n\t\tif (temp.getMountPoint().equals(_mount)) {\n\t\t\t//empty\n\t\t} else {\n\t\t\treturn(false);\n\t\t}\n\t\t\n\t\tif (temp.getFileSystemType().equals(_type)) {\n\t\t\t//empty\n\t\t} else {\n\t\t\treturn(false);\n\t\t}\n\t\t\n\t\treturn(true);\n\t}",
"@Test\n public void newDeviceTest() {\n Device newDevice = newDevice(deviceID);\n\n assertEquals(deviceID, newDevice.getDeviceID());\n assertNotNull(newDevice.getToken());\n\n executeManipulationQuery(\"DELETE FROM device WHERE device_id = ?\", deviceID);\n }",
"@Test\n public void equalsTrueMySelf() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n assertTrue(player1.equals(player1));\n assertTrue(player1.hashCode() == player1.hashCode());\n }",
"public abstract boolean equals(IPeripheral other);",
"@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Commissioner instance = new Commissioner();\n Commissioner instance2 = new Commissioner();\n instance.setLogin(\"genie\");\n instance2.setLogin(\"genie\");\n boolean expResult = true;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }",
"@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object obj = null;\r\n RevisorParentesis instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.equals(obj);\r\n assertEquals(expResult, result);\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 }",
"@Test\n public void checkEquals() {\n EqualsVerifier.forClass(GenericMessageDto.class).usingGetClass()\n .suppress(Warning.NONFINAL_FIELDS).verify();\n }",
"@Override\n public boolean equals(Object obj)\n {\n if (this == obj)\n return true;\n\n if (!getClass().isInstance(obj))\n return false;\n\n MediaStreamTarget mediaStreamTarget = (MediaStreamTarget) obj;\n\n return addressesAreEqual(getControlAddress(), mediaStreamTarget.getControlAddress())\n && addressesAreEqual(getDataAddress(), mediaStreamTarget.getDataAddress());\n }",
"public boolean equals(Object other){\r\n Car nuCar = (Car)other;\r\n if(super.equals(nuCar)){\r\n if(this.model==nuCar.model&&this.AWD==nuCar.AWD){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }else{\r\n return false;\r\n }\r\n\t}",
"@Test\n public void updateDeviceTest() throws ApiException {\n String deviceId = null;\n Device device = null;\n // DeviceEnvelope response = api.updateDevice(deviceId, device);\n\n // TODO: test validations\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Unit)) {\n return false;\n }\n Unit other = (Unit) object;\n if ((this.unitId == null && other.unitId != null) || (this.unitId != null && !this.unitId.equals(other.unitId))) {\n return false;\n }\n return true;\n }",
"@Test\n public void authenticateTestSucces() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);\n assertTrue(device.authenticate());\n DatabaseTest.cleanDatabase();\n }",
"public void testEqualsObject()\n {\n Mana meme = new Mana( myMise );\n Assert.assertEquals( myMise, meme );\n \n System.out.println( myMise.toString());\n Mana autre = new Mana( 49 );\n Assert.assertFalse( myMise.equals( autre ));\n autre = new Mana( 50 );\n Assert.assertTrue( myMise.equals( autre ));\n }",
"@Test\n public void equals_returnsTrueIfNameIsTheSame_false() {\n Animal firstAnimal = new Animal(\"Deer\");\n Animal anotherAnimal = new Animal(\"Deer\");\n assertTrue(firstAnimal.equals(anotherAnimal));\n }",
"@Test\n\tpublic void testEqualsFalso() {\n\t\t\n\t\tassertFalse(contato1.equals(contato2));\n\t}",
"@Override public boolean equals(final Object value) {\n if (value == null) {\n return false;\n }\n //if (Tools.isStringClass(value)) {\n // return getDrbdResource().getValue(DRBD_RES_PARAM_DEV).equals(\n // value.toString());\n //} else {\n if (toString() == null) {\n return false;\n }\n return toString().equals(value.toString());\n //}\n }",
"public boolean checkEquals(DomString other) {\n return other.checkEquals(str, (short) 0, len);\n }",
"static public boolean areEqual(Object aThis, Object aThat) {\r\n // System.out.println(\"Object\");\r\n return aThis == null ? aThat == null : aThis.equals(aThat);\r\n }",
"@NeededForTesting\n public static boolean areObjectsEqual(Object a, Object b) {\n return a == b || (a != null && a.equals(b));\n }",
"@Override\n public boolean equals(Object o) {\n if (o == this) {\n return true;\n }\n /* Check if o is an instance of Complex or not\n \"null instanceof [type]\" also returns false */\n if (!(o instanceof RAPDU)) {\n return false;\n }\n RAPDU rapdu = (RAPDU) o;\n return Arrays.equals(bytes, ((RAPDU) o).bytes);\n }",
"@Test\n\tpublic void testEquals2() {\n\t\tDistance d2 = new Distance();\n\t\tDistance d4 = new Distance(1, 1);\n\t\tassertEquals(true, d2.equals(d4));\n\t}",
"@Test\n void equals1() {\n Student s1=new Student(\"emina\",\"milanovic\",18231);\n Student s2=new Student(\"emina\",\"milanovic\",18231);\n assertEquals(true,s1.equals(s2));\n }",
"@Test\n\tpublic void testDeckEquals() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tStandardDeckClass testDeck = new StandardDeckClass();\n\t\t\n\t\tboolean isSame = oneDeck.equals(testDeck);\n\t\t\n\t\tassertEquals(\"equals method not working as expected\", true, isSame);\n\t\t\n\t}",
"private void authenticateSimulatedDevice() {\n mSimulatedDevice.writeln(TestsConfig.deviceWelcome.toString());\n TestsConfig.delay(300);\n \n // check if everything is ok, and get the device instance\n mDeviceInstance = mMainServer.getDevice(\n TestsConfig.deviceWelcome.getString(\"identifier\"));\n assertNotNull(mDeviceInstance);\n }",
"public void syncDevice() {\n JCuda.cudaDeviceSynchronize();\n }",
"@Test\n public void authenticateTestFailure() {\n assertFalse(device.authenticate());\n }",
"@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object obj = null;\n Usuario instance = null;\n boolean expResult = false;\n boolean result = instance.equals(obj);\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 }",
"@Test\n\tpublic void test_TCM__boolean_equals_Object() {\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\");\n\n assertFalse(\"attribute equal to null\", attribute.equals(null));\n\n final Object object = attribute;\n assertTrue(\"object not equal to attribute\", attribute.equals(object));\n assertTrue(\"attribute not equal to object\", object.equals(attribute));\n\n // current implementation checks only for identity\n// final Attribute clonedAttribute = (Attribute) attribute.clone();\n// assertTrue(\"attribute not equal to its clone\", attribute.equals(clonedAttribute));\n// assertTrue(\"clone not equal to attribute\", clonedAttribute.equals(attribute));\n\t}",
"public TestDevice getDevice() {\n return mDevice;\n }",
"@Test\n public void testEquals02() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }",
"public boolean same(Rational that) {\n\treturn (this.n == that.getNum() && this.d == that.getDenom());\n }",
"@JRubyMethod(name = \"==\", required = 1)\n public static IRubyObject op_equal(ThreadContext ctx, IRubyObject self, IRubyObject oth) {\n RubyString str1, str2;\n RubyModule instance = (RubyModule)self.getRuntime().getModule(\"Digest\").getConstantAt(\"Instance\");\n if (oth.getMetaClass().getRealClass().hasModuleInHierarchy(instance)) {\n str1 = digest(ctx, self, null).convertToString();\n str2 = digest(ctx, oth, null).convertToString();\n } else {\n str1 = to_s(ctx, self).convertToString();\n str2 = oth.convertToString();\n }\n boolean ret = str1.length().eql(str2.length()) && (str1.eql(str2));\n return ret ? self.getRuntime().getTrue() : self.getRuntime().getFalse();\n }",
"@Test\n public void testEquals() throws StoreException {\n System.out.println(\"equals\");\n boolean expResult = false;\n boolean result = instance.equals(new Object());\n assertEquals(result, expResult);\n\n assertEquals(instance.equals(Store.getInstance()), true);\n }",
"public static void verifySelf(Object object) throws Exception {\n verifySelf(object, defineComparator(null, object));\n }",
"public boolean isSetDeviceNo() {\n return this.DeviceNo != null;\n }",
"@Test\n public void testEquals_2() {\n LOGGER.info(\"testEquals_2\");\n final AtomString atomString = new AtomString(\"Hello\");\n final Atom atom = new AtomString(\"Hej\");\n final boolean actual = atomString.equals(atom);\n assertFalse(actual);\n }",
"public DeviceChanged(@NotNull AudioDevice audioDevice) {\n super(null);\n Intrinsics.checkNotNullParameter(audioDevice, \"device\");\n this.a = audioDevice;\n }",
"@Override\n public boolean equals(Object obj) {\n if (obj instanceof UsageInfo) {\n UsageInfo info = (UsageInfo)obj;\n return info.getPhysicalMachine().getID() == pm.getID();\n }\n return false;\n }",
"@Test\n @DisplayName(\"Test should detect equality between equal states.\")\n public void testShouldResultInEquality() {\n ObjectBag os1 = new ObjectBag(null, \"Hi\");\n ObjectBag os2 = new ObjectBag(null, \"Hi\");\n\n Assertions.assertThat(os1).isEqualTo(os2);\n }",
"public final boolean equals(Object o) {\n\t\tboolean res = false;\n\t\tif(o instanceof Unit) {\n\t\t\tUnit u = (Unit)o;\n\t\t\tif (u.mksa == this.mksa) res = (mksa&_log) != 0 ? \n\t\t\t\t\tthis.factor == u.factor && this.value == u.value :\t// LOG\n\t\t\t\t\t\tthis.factor*this.value == u.factor*u.value ;\t// linear\n\t\t}\n\t\treturn(res);\n\t}",
"@Test(expected = SystemObjectIdException.class)\n public void shouldThrowExceptionIfFailToIdentifyDevice() throws IOException {\n\n expect(configuration.createPDU(PDU.GET)).andReturn(new PDU());\n\n expect(snmpInterface.send(isA(PDU.class), same(target))).andReturn(createErrorResponseEvent());\n replayAll();\n\n try {\n session.identifyDevice();\n assert false : \"Should not reach\";\n } finally {\n verifyAll();\n }\n }",
"@Test\n public void testEquals() {\n\tSystem.out.println(\"equals\");\n\tObject obj = null;\n\tJenkinsBuild instance = new JenkinsBuild();\n\tboolean expResult = false;\n\tboolean result = instance.equals(obj);\n\tassertEquals(expResult, result);\n\tJenkinsBuild newObj = new JenkinsBuild();\n\tnewObj.setBuildNumber(0);\n\tnewObj.setSystemLoadId(\"\");\n\tnewObj.setJobName(\"\");\n\tassertEquals(expResult, instance.equals(newObj));\n }",
"private boolean mAsClient(String sRemoteDeviceName) {\n return (sRemoteDeviceName.equals(sDeviceName));\n }",
"public boolean updateDevice(device device){\n boolean result = false;\n try {\n ContentValues cv = new ContentValues();\n cv.put(devicesContract.deviceEntry.name, device.getName());\n cv.put(devicesContract.deviceEntry.UUIDs, device.getUUIDs());\n cv.put(devicesContract.deviceEntry.contentDesc, device.getContentDesc());\n cv.put(devicesContract.deviceEntry.name, device.getName());\n cv.put(devicesContract.deviceEntry.time, device.getTime());\n cv.put(devicesContract.deviceEntry.hashCode, device.getHashCode());\n\n SQLiteDatabase db = getWritableDatabase();\n db.update(devicesContract.deviceEntry.tableName, cv, devicesContract.deviceEntry.address + \"= '\" + device.getAddress()+\"'\", null);\n db.close();\n result = true;\n }catch (Exception e){\n Log.e(\"deviceDBHelper\", \"Error actualizando Dispositivo: \" + e.toString());\n }\n return result;\n }",
"boolean canEqual(Object obj);",
"private static final boolean equal(Object a, Object b) {\n if (a == b)\n return true;\n if (a == null)\n return false;\n if (b == null)\n return false;\n return a.equals(b);\n }",
"@Test\n public void testEquals01() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n SocialNetwork sn = new SocialNetwork();\n boolean result = sn.equals(otherObject);\n assertTrue(result);\n }",
"public boolean strictEquals(final Object that) {\n v8.checkThread();\n checkReleased();\n if (that == this) {\n return true;\n }\n if (that == null) {\n return false;\n }\n if (!(that instanceof V8Value)) {\n return false;\n }\n if (isUndefined() && ((V8Value) that).isUndefined()) {\n return true;\n }\n if (((V8Value) that).isUndefined()) {\n return false;\n }\n return v8.strictEquals(v8.getV8RuntimePtr(), getHandle(), ((V8Value) that).getHandle());\n }",
"@Test\r\n\tpublic void testEquality(){\n\t\t assertEquals(object1, object2);\r\n\t}",
"@Test\n public void should_recognize_if_adversary_obtained_authenticator_from_trusted_device_and_tried_connect_under_a_different_user() throws SignatureException {\n final IUserProvider up = getInstance(IUserProvider.class);\n up.setUsername(UNIT_TEST_USER, getInstance(IUser.class));\n final User currUser = getInstance(IUserProvider.class).getUser();\n\n // first session is from trusted device\n constants.setNow(dateTime(\"2015-04-23 11:00:00\"));\n coSession.newSession(currUser, true, null);\n\n // second session, also from a trusted device, the authenticator from this device got stolen\n constants.setNow(dateTime(\"2015-04-23 13:00:00\"));\n final UserSession newSession = coSession.newSession(currUser, true, null);\n final String authenticator = newSession.getAuthenticator().get().toString();\n\n\n // now let's move the clock 30 minutes forward to emulate a time change\n // adversary tries to reuse a completely valid and not yet expired authenticator to access the system under a different username\n constants.setNow(dateTime(\"2015-04-23 13:30:00\"));\n up.setUsername(\"USER1\", getInstance(IUser.class));\n final User differentUser = getInstance(IUserProvider.class).getUser();\n\n final Optional<UserSession> session = coSession.currentSession(differentUser, authenticator, false);\n assertFalse(session.isPresent());\n\n // additionally, let's also check that all sessions for a compromised user have been removed, but not the sessions for other users\n final EntityResultQueryModel<UserSession> currUserSessions = select(UserSession.class).where().prop(\"user\").eq().val(currUser).model();\n final EntityResultQueryModel<UserSession> otherSessions = select(UserSession.class).where().prop(\"user\").ne().val(currUser).model();\n\n assertEquals(0, coSession.count(currUserSessions));\n assertEquals(2, coSession.count(otherSessions));\n }",
"@Test\n public void testEquals() {\n System.out.println(\"Animal.equals\");\n Animal newAnimal = new Animal(252, \"Candid Chandelier\", 10, \"Cheetah\", 202);\n assertTrue(animal1.equals(newAnimal));\n assertFalse(animal2.equals(newAnimal));\n }",
"public boolean hasDeviceId() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public void testGetSimState_unavailableDevice() {\n mMockIDevice = EasyMock.createMock(IDevice.class);\n EasyMock.expect(mMockIDevice.getState()).andReturn(DeviceState.UNAUTHORIZED);\n EasyMock.expect(mMockIDevice.getSerialNumber()).andReturn(\"serial\");\n EasyMock.replay(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n assertNull(mTestDevice.getSimState());\n EasyMock.verify(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n }"
]
| [
"0.7282352",
"0.681908",
"0.67873687",
"0.6660841",
"0.6608597",
"0.6299999",
"0.58905077",
"0.5840918",
"0.5763268",
"0.55699366",
"0.5541957",
"0.554097",
"0.5431253",
"0.54060173",
"0.5380812",
"0.53751373",
"0.53406847",
"0.53125685",
"0.5294518",
"0.52772295",
"0.52772295",
"0.52458626",
"0.52452856",
"0.5218205",
"0.5213859",
"0.5191232",
"0.5162814",
"0.5160425",
"0.5154689",
"0.5143845",
"0.5141548",
"0.51164484",
"0.51129717",
"0.5112956",
"0.50864595",
"0.5070532",
"0.5037465",
"0.5033411",
"0.5031238",
"0.5023361",
"0.50193673",
"0.4971947",
"0.49672747",
"0.4947911",
"0.4946927",
"0.4945574",
"0.49400824",
"0.49388194",
"0.49373758",
"0.49313822",
"0.4926776",
"0.48944837",
"0.48825094",
"0.4876763",
"0.48648268",
"0.48593068",
"0.4846856",
"0.48323718",
"0.4820102",
"0.48094267",
"0.48013094",
"0.48002747",
"0.47971997",
"0.47937533",
"0.47897473",
"0.47892433",
"0.4785094",
"0.47839034",
"0.47786906",
"0.47756895",
"0.47703394",
"0.47698128",
"0.47610328",
"0.47560441",
"0.47554713",
"0.47491607",
"0.4739286",
"0.4738027",
"0.4737445",
"0.47363898",
"0.47315478",
"0.47222912",
"0.4719223",
"0.47117257",
"0.47096872",
"0.47074544",
"0.47074333",
"0.47019142",
"0.47009945",
"0.47006613",
"0.47003263",
"0.4696066",
"0.46902114",
"0.46871424",
"0.46867892",
"0.46845242",
"0.46832561",
"0.4677806",
"0.4675907",
"0.46734652"
]
| 0.77241164 | 0 |
Verify that a device is the same if all fields are the same. | @Test
public void equalsSameTest() {
Device device2 = new Device(deviceID, token);
assertEquals(device, device2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void equalsSelfTest() {\n assertEquals(device, device);\n }",
"@Override\r\n\tpublic boolean sameIdentityAs(Device other) {\n\t\treturn false;\r\n\t}",
"@Test\n public void equalsOtherTest() {\n Device device2 = new Device(deviceID, \"other\");\n assertNotEquals(device, device2);\n }",
"@Test\n public void equalsOtherTest3() {\n assertFalse(device.equals(null));\n }",
"@Test\n public void equalsOtherTest4() {\n assertFalse(device.equals(\"\"));\n }",
"@Test\n public void newDeviceDuplicateTest() {\n DatabaseTest.setupDevice();\n Device newDevice = newDevice(DatabaseTest.DEVICE_ID);\n\n assertNull(newDevice);\n DatabaseTest.cleanDatabase();\n }",
"public boolean isDuplicate(IDecodedDeviceRequest<?> request) throws SiteWhereException;",
"@Test\n public void equalsOtherTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device, device2);\n }",
"@Override\r\n public boolean equals(Object o) {\r\n if(this == o) return true;\r\n if( !(o instanceof MobileDevice)) return false;\r\n \r\n MobileDevice md = (MobileDevice)o;\r\n \r\n if(this.deviceName != md.deviceName) return false;\r\n if(this.valueTag != md.valueTag) return false;\r\n if(this.lab != md.lab) return false;\r\n if(this.rentSettings != md.rentSettings) return false;\r\n \r\n return true;\r\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Biometric)) {\n return false;\n }\n Biometric other = (Biometric) object;\n if ((this.deviceId == null && other.deviceId != null) || (this.deviceId != null && !this.deviceId.equals(other.deviceId))) {\n return false;\n }\n return true;\n }",
"@Override\n public boolean equals(Object obj) {\n if(obj instanceof Devices)\n {\n Devices temp = (Devices) obj;\n if(this.device==temp.getDevice() && this.MAC ==temp.getMAC())\n return true;\n }\n return false;\n\n }",
"@Test\n public void hashCodeTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device.hashCode(), device2.hashCode());\n }",
"@Test\n public void testEqualsReturnsTrueOnIdenticalRecords() {\n boolean equals = record.equals(otherRecord);\n\n assertThat(equals, is(true));\n }",
"@Test\n public void testKeyEquivalence() throws Exception {\n ScanResultMatchInfo matchInfo1 = ScanResultMatchInfo.fromWifiConfiguration(mConfig1);\n ScanResultMatchInfo matchInfo1Prime = ScanResultMatchInfo.fromWifiConfiguration(mConfig1);\n ScanResultMatchInfo matchInfo2 = ScanResultMatchInfo.fromWifiConfiguration(mConfig2);\n assertFalse(matchInfo1 == matchInfo1Prime); // Checking assumption\n MacAddress mac1 = MacAddressUtils.createRandomUnicastAddress();\n MacAddress mac2 = MacAddressUtils.createRandomUnicastAddress();\n assertNotEquals(mac1, mac2); // really tiny probability of failing here\n\n WifiCandidates.Key key1 = new WifiCandidates.Key(matchInfo1, mac1, 1);\n\n assertFalse(key1.equals(null));\n assertFalse(key1.equals((Integer) 0));\n // Same inputs should give equal results\n assertEquals(key1, new WifiCandidates.Key(matchInfo1, mac1, 1));\n // Equal inputs should give equal results\n assertEquals(key1, new WifiCandidates.Key(matchInfo1Prime, mac1, 1));\n // Hash codes of equal things should be equal\n assertEquals(key1.hashCode(), key1.hashCode());\n assertEquals(key1.hashCode(), new WifiCandidates.Key(matchInfo1, mac1, 1).hashCode());\n assertEquals(key1.hashCode(), new WifiCandidates.Key(matchInfo1Prime, mac1, 1).hashCode());\n\n // Unequal inputs should give unequal results\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo2, mac1, 1)));\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo1, mac2, 1)));\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo1, mac1, 2)));\n }",
"@Test\n public void testEquals_sameParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are equivalent\n assertThat(cellIdentityNr).isEqualTo(anotherCellIdentityNr);\n }",
"@Test\n public void fsckMetricsInconsistentFwdNoDupes() throws Exception {\n storage.addColumn(UID_TABLE, new byte[] {0, 0, 2}, NAME_FAMILY, \n METRICS, \"wtf\".getBytes(MockBase.ASCII()));\n storage.addColumn(UID_TABLE, \"wtf\".getBytes(MockBase.ASCII()), ID_FAMILY, \n METRICS, new byte[] {0, 0, 3});\n storage.addColumn(UID_TABLE, new byte[] {0, 0, 3}, NAME_FAMILY, \n METRICS, \"wtf\".getBytes(MockBase.ASCII()));\n storage.addColumn(UID_TABLE, new byte[] { 0 }, ID_FAMILY, METRICS, Bytes.fromLong(3L));\n int errors = (Integer)fsck.invoke(null, client, \n UID_TABLE, false, false);\n assertEquals(3, errors);\n }",
"@Override\n protected void validateRegisteredDevice(MultifactorDevice device) throws Exception {\n assertThat(device.getBackup(), is(Boolean.TRUE));\n }",
"static boolean isDuplicated(String mac) {\n for (DeviceDetail detail : deviceDetails) {\n if (detail.macAddress.equals(mac)) {\n return true;\n }\n }\n return false;\n }",
"@Test\n public void equals() {\n CsvAdaptedPatient alice = new CsvAdaptedPatient(ALICE);\n CsvAdaptedPatient aliceCopy = new CsvAdaptedPatient(new PatientBuilder(ALICE).build());\n\n assertTrue(alice.equals(aliceCopy));\n\n // same object -> returns true\n assertTrue(alice.equals(alice));\n\n // null -> returns false\n assertFalse(alice.equals(null));\n\n // different type -> returns false\n assertFalse(alice.equals(5));\n\n // different patient -> returns false\n assertFalse(alice.equals(new CsvAdaptedPatient(BOB)));\n\n // different name -> returns false\n Patient editedAlice = new PatientBuilder(ALICE).withName(VALID_NAME_BOB).build();\n assertFalse(alice.equals(new CsvAdaptedPatient(editedAlice)));\n\n // different phone -> returns false\n editedAlice = new PatientBuilder(ALICE).withPhone(VALID_PHONE_BOB).build();\n assertFalse(alice.equals(new CsvAdaptedPatient(editedAlice)));\n\n // different address -> returns false\n editedAlice = new PatientBuilder(ALICE).withAddress(VALID_ADDRESS_BOB).build();\n assertFalse(alice.equals(new CsvAdaptedPatient(editedAlice)));\n\n // different remark -> returns false\n editedAlice = new PatientBuilder(ALICE).withRemark(VALID_REMARK_BOB).build();\n assertFalse(alice.equals(new CsvAdaptedPatient(editedAlice)));\n }",
"@Test\n public void hashCodeTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device.hashCode(), device2.hashCode());\n }",
"boolean hasSameAs();",
"@Test\n public void checkEquals() {\n EqualsVerifier.forClass(GenericMessageDto.class).usingGetClass()\n .suppress(Warning.NONFINAL_FIELDS).verify();\n }",
"@Test\n public void isSamePerson() {\n assertTrue(ALICE.isSamePerson(ALICE));\n\n // null -> returns false\n assertFalse(ALICE.isSamePerson(null));\n\n // different phone and email -> returns false\n Person editedAlice = new PersonBuilder(ALICE).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB).build();\n assertFalse(ALICE.isSamePerson(editedAlice));\n\n // different name -> returns false\n editedAlice = new PersonBuilder(ALICE).withName(VALID_NAME_BOB).build();\n assertFalse(ALICE.isSamePerson(editedAlice));\n\n // same name, same phone, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND).withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(ALICE.isSamePerson(editedAlice));\n\n // same name, same email, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withPhone(VALID_PHONE_BOB).withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND).withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(ALICE.isSamePerson(editedAlice));\n\n // same name, same phone, same email, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND)\n .withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(ALICE.isSamePerson(editedAlice));\n\n\n // null phone and email test cases start here\n Person aliceWithoutPhone = new PersonBuilder(ALICE).withoutPhone().build();\n Person aliceWithoutEmail = new PersonBuilder(ALICE).withoutEmail().build();\n Person aliceWithoutPhoneAndEmail = new PersonBuilder(ALICE).withoutPhone().withoutEmail().build();\n\n // same name, null phone, null email, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withoutEmail().withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND).withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(aliceWithoutPhoneAndEmail.isSamePerson(editedAlice));\n\n // same name, null phone, null and non-null email -> returns false\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withoutEmail().build();\n assertFalse(aliceWithoutPhone.isSamePerson(editedAlice));\n\n // same name, null phone, same email, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND).withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(aliceWithoutPhone.isSamePerson(editedAlice));\n\n // same name, null phone, different email -> returns false\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withEmail(VALID_EMAIL_BOB).build();\n assertFalse(aliceWithoutPhone.isSamePerson(editedAlice));\n\n // same name, null and non-null phone, null email -> returns false\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withoutEmail().build();\n assertFalse(aliceWithoutEmail.isSamePerson(editedAlice));\n\n // same name, null and non-null phone, null and non-null email -> returns false\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withoutEmail().build();\n assertFalse(ALICE.isSamePerson(editedAlice));\n\n // same name, null and non-null phone, same email, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND).withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(ALICE.isSamePerson(editedAlice));\n\n // same name, null and non-null phone, different email -> returns false\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withEmail(VALID_EMAIL_BOB).build();\n assertFalse(ALICE.isSamePerson(editedAlice));\n\n // same name, same phone, null email, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withoutEmail().withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND).withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(aliceWithoutEmail.isSamePerson(editedAlice));\n\n // same name, same phone, null and non-null email, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withoutEmail().withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND).withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(ALICE.isSamePerson(editedAlice));\n\n // same name, different phone, null email -> returns false\n editedAlice = new PersonBuilder(ALICE).withPhone(VALID_PHONE_BOB).withoutEmail().build();\n assertFalse(aliceWithoutEmail.isSamePerson(editedAlice));\n\n // same name, different phone, null and non-null email -> returns false\n editedAlice = new PersonBuilder(ALICE).withPhone(VALID_PHONE_BOB).withoutEmail().build();\n assertFalse(ALICE.isSamePerson(editedAlice));\n\n }",
"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 testEquals_differentParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI + 1,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are different\n assertThat(cellIdentityNr).isNotEqualTo(anotherCellIdentityNr);\n }",
"private static boolean isValidDeviceId(String deviceId){\n return deviceId != null;\n }",
"@org.testng.annotations.Test\n public void test_equals_Symmetric()\n throws Exception {\n CategorieClient categorieClient = new CategorieClient(\"denis\", 1000, 10.2, 1.1, 1.2, false);\n Client x = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Client y = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Assert.assertTrue(x.equals(y) && y.equals(x));\n Assert.assertTrue(x.hashCode() == y.hashCode());\n }",
"@Test\n public void equals() {\n UpdateCommand.UpdateProfileDescriptor descriptorWithSameValues = new UpdateCommand\n .UpdateProfileDescriptor(UPDESC_1);\n assertTrue(UPDESC_1.equals(descriptorWithSameValues));\n\n // same object -> returns true\n assertTrue(UPDESC_1.equals(UPDESC_1));\n\n // null -> returns false\n assertFalse(UPDESC_1.equals(null));\n\n // different types -> returns false\n assertFalse(UPDESC_1.equals(5));\n\n // different values -> returns false\n assertFalse(UPDESC_1.equals(UPDESC_2));\n\n // different name -> returns false\n UpdateCommand.UpdateProfileDescriptor editedProfile = new UpdateProfileDescriptorBuilder(UPDESC_1)\n .withName(VALID_NAME_2).build();\n assertFalse(UPDESC_1.equals(editedProfile));\n\n // different id -> returns false\n editedProfile = new UpdateProfileDescriptorBuilder(UPDESC_1).withId(VALID_ID_2).build();\n assertFalse(UPDESC_1.equals(editedProfile));\n\n // different height -> returns false\n editedProfile = new UpdateProfileDescriptorBuilder(UPDESC_1).withHeight(VALID_HEIGHT_2).build();\n assertFalse(UPDESC_1.equals(editedProfile));\n\n // different weight -> returns false\n editedProfile = new UpdateProfileDescriptorBuilder(UPDESC_1).withWeight(VALID_WEIGHT_2).build();\n assertFalse(UPDESC_1.equals(editedProfile));\n }",
"public void testEquals()\n {\n // test passing null to equals returns false\n // (as specified in the JDK docs for Object)\n EthernetAddress x =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"equals(null) didn't return false\",\n x.equals((Object)null));\n \n // test passing an object which is not a EthernetAddress returns false\n assertFalse(\"x.equals(non_EthernetAddress_object) didn't return false\",\n x.equals(new Object()));\n \n // test a case where two EthernetAddresss are definitly not equal\n EthernetAddress w =\n new EthernetAddress(ANOTHER_VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == w didn't return false\",\n x == w);\n assertFalse(\"x.equals(w) didn't return false\",\n x.equals(w));\n\n // test refelexivity\n assertTrue(\"x.equals(x) didn't return true\",\n x.equals(x));\n \n // test symmetry\n EthernetAddress y =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"y.equals(x) didn't return true\",\n y.equals(x));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n \n // now we'll test transitivity\n EthernetAddress z =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertFalse(\"x == y didn't return false\",\n y == z);\n assertFalse(\"x == y didn't return false\",\n x == z);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"y.equals(z) didn't return true\",\n y.equals(z));\n assertTrue(\"x.equals(z) didn't return true\",\n x.equals(z));\n \n // test consistancy (this test is just calling equals multiple times)\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n }",
"@Test\n void compareTo_Identical_AllParts()\n {\n runIsMatchTest(AnswerType.yes, AnswerType.yes, AnswerType.yes, AnswerType.yes, ContactMatchType.Identical);\n }",
"@SuppressWarnings(\"resource\")\n @Test\n public void testEquals() {\n try {\n ApiKey apikey1 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127619232L), 58,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"933738f6-d022-45c8-bc68-d7c6722e913b\", -46,\n \"3cac25f8-fd0d-4e6c-b1dd-e24a49542b75\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127625184L));\n ApiKey apikey2 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127619232L), 58,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"933738f6-d022-45c8-bc68-d7c6722e913b\", -46,\n \"3cac25f8-fd0d-4e6c-b1dd-e24a49542b75\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127625184L));\n ApiKey apikey3 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127620542L), 76,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"e31184de-791f-4689-9075-d12706757ba9\", -7,\n \"d34afc91-63f2-42e0-bde5-cfbb131751fd\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620923L));\n assertNotNull(apikey1);\n assertNotNull(apikey2);\n assertNotNull(apikey3);\n assertNotSame(apikey2, apikey1);\n assertNotSame(apikey3, apikey1);\n assertEquals(apikey2, apikey1);\n assertEquals(apikey2, apikey1);\n assertEquals(apikey1, apikey2);\n assertEquals(apikey1, apikey1);\n assertFalse(apikey1.equals(null));\n assertNotEquals(apikey3, apikey1);\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }",
"public boolean isIdentical(Object o) {\n if (equals(o)) {\n Contact contact = (Contact) o;\n return firstName.equals(contact.firstName)\n && lastName.equals(contact.lastName)\n && phone.equals(contact.phone)\n && email.equals(contact.email)\n && dateOfBirth.equals(contact.dateOfBirth)\n && notes.equals(contact.notes);\n }\n\n return false;\n }",
"@Test\n void testEqualsSameObject() {\n assertEquals(loginRequest1, loginRequest1);\n }",
"private void validateReplicationGroupDevices(Table<URI, String, List<Volume>> storageRgToVolumes) {\n for (Cell<URI, String, List<Volume>> cell : storageRgToVolumes.cellSet()) {\n List<Volume> volumeList = cell.getValue();\n boolean metaDevices = false;\n boolean nonMetaDevices = false;\n\n for (Volume vol : volumeList) {\n if (vol.getMetaMemberCount() != null && vol.getMetaMemberCount() > 0) {\n metaDevices = true;\n } else {\n nonMetaDevices = true;\n }\n }\n\n if (metaDevices && nonMetaDevices) {\n throw APIException.badRequests.cgSnapshotNotAllowedMixedDevices(cell.getColumnKey());\n }\n }\n }",
"@Test\n\tpublic void equalsSimilarObjects() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tboolean equals = key1.equals(key2);\n\t\tSystem.out.println();\n\t\tAssert.assertTrue(equals);\n\t}",
"@Test\n public void equals() throws Exception {\n SmartPlayer x = new SmartPlayer(0, 0);\n SmartPlayer y = new SmartPlayer(0, 0);\n assertTrue(x.equals(y));\n }",
"private static boolean verifyFieldConsistency(LogManager pLogger, UnmodifiableSMG pSmg) {\n for (SMGObject obj : pSmg.getObjects()) {\n if (!checkSingleFieldConsistency(pLogger, obj, pSmg)) {\n return false;\n }\n }\n\n return true;\n }",
"@Test\n public void equals_SameBuyQuery_Test() {\n Assert.assertTrue(bq1.equals(bq0));\n }",
"private static boolean areEqual (byte[] a, byte[] b) {\r\n int aLength = a.length;\r\n if (aLength != b.length)\r\n return false;\r\n for (int i = 0; i < aLength; i++)\r\n if (a[i] != b[i])\r\n return false;\r\n return true;\r\n }",
"boolean hasDeviceId();",
"boolean hasDeviceId();",
"private boolean checkDuplicate(String macAddress) {\n\t\tfor (int i=0; i<bluetoothDevices.size(); i++) {\n\t\t\tif (macAddress.equals(bluetoothDevices.get(i).macAddress)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private boolean validDevice(AcceleratorNode nodeDev) {\n// for (Class<?> typeValidDev : this.arrValidDevTypes) {\n// if (nodeDev.getClass() == typeValidDev)\n// return true;\n// }\n// \n// return false;\n \n return true;\n }",
"@Test(priority=1)\n\tpublic void verifyPasswordsMatch() {\n\t\tsignup.clearAllFields();\n\t\tsignup.enterId(\"[email protected]\");\n\t\tsignup.enterPassword(\"abcd\");\n\t\tsignup.reenterPassword(\"1235\");\n\t\tsignup.clickSubmit();\n\t\tList<String> errors = signup.getErrors();\n\t\tAssert.assertTrue(TestHelper.isStringPresent(errors, \"Passwords do not match; please enter a password and reenter to confirm.\\nPasswords must contain at least 6 characters and no spaces.\"));\n\t}",
"private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof RegistrationItems)) {\n return false;\n }\n RegistrationItems that = (RegistrationItems) other;\n Object myRegItemUid = this.getRegItemUid();\n Object yourRegItemUid = that.getRegItemUid();\n if (myRegItemUid==null ? yourRegItemUid!=null : !myRegItemUid.equals(yourRegItemUid)) {\n return false;\n }\n return true;\n }",
"@Test\n\tpublic void testEquals6(){\n\t\tTemperature data1 = new Temperature (100, Temperature.Units.KELVIN);\n\t\tTemperature data2 = new Temperature (100, Temperature.Units.CELCIUS);\n\t\tassertEquals(data1.equals(data2), false);\t//Since '100 kelvin' and '100 celcius' are different, equals() function should return false \n\t\tassertTrue(data1.getValue() == 100);\t\t//equals() function should not affect return value of getValue() function and should return the original value\n\t\tassertTrue(data2.getValue() == 100);\t\t//equals() function should not affect return value of getValue() function and should return the original value\t\n\t}",
"@Test\n\tpublic void testEquals4(){\n\t\tTemperature data1 = new Temperature (0, Temperature.Units.CELCIUS);\n\t\tTemperature data2 = new Temperature (0, Temperature.Units.CELCIUS);\n\t\tassertEquals(data1.equals(data2), true);\n\t\tassertTrue(data1.getValue() == 0);\t\t//getValue() should be the same because the unit conversion is not used\n\t\tassertTrue(data2.getValue() == 0);\t\t//getValue() should be the same because the unit conversion is not used\n\n\t}",
"public boolean isBeamWithTheSameDevice(IWifiP2pProxy.IFastConnectInfo info) {\n\t\t\n\t\tif (mTargetInfo != null\n\t\t\t\t&& mTargetInfo.getDeviceAddress().equals(\n\t\t\t\t\t\tinfo.getDeviceAddress())) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Test\n @DisplayName(\"Matched\")\n public void testEqualsMatched() throws BadAttributeException {\n Settings settings = new Settings();\n assertEquals(new Settings().hashCode(), settings.hashCode());\n }",
"private boolean isImeiValid(String deviceId) {\r\n try {\r\n String[] strings = deviceId.split(\"x\");\r\n byte[] bytes = strings[0].getBytes();\r\n\r\n int cks = 0;\r\n for (int i = 0; i < strings[0].length(); i++)\r\n cks += bytes[i];\r\n\r\n String checkId = strings[0] + \"x\" + cks % MAGIC_NUMBER;\r\n\r\n return deviceId.equals(checkId);\r\n } catch (Exception e) {\r\n return false;\r\n }\r\n }",
"@Test\n public void getDeviceTest() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);\n\n assertEquals(device, getDevice(DatabaseTest.DEVICE_ID));\n DatabaseTest.cleanDatabase();\n }",
"@Test\n public void getDeviceIDTest() {\n assertEquals(deviceID, device.getDeviceID());\n }",
"public boolean same(GameState c, GameState g) \n\t{\n\t\tfor(int x = 0; x<18; x++) //loop through the boards\n\t\t{\n\t\t\tif(c.getBoard()[x] != g.getBoard()[x]) //if one value is not the same in the afrra return false\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;//if they all are the same return true\n\t}",
"@Test\n void testSameHashCodes() {\n assertEquals(loginRequest1.hashCode(), loginRequest1.hashCode());\n }",
"@Test\n void testEqualsTrue() {\n LoginRequest loginRequest1Copy = new LoginRequest(\"[email protected]\", \"pwd\");\n assertEquals(loginRequest1Copy, loginRequest1);\n }",
"public void testTwoFields() throws Exception {\n String key1 = 1 + randomAlphaOfLength(3);\n String key2 = 2 + randomAlphaOfLength(3);\n String key3 = 3 + randomAlphaOfLength(3);\n updateAndCheckSource(0, 1, fields(key1, \"foo\", key2, \"baz\"));\n updateAndCheckSource(0, 1, fields(key1, \"foo\", key2, \"baz\"));\n updateAndCheckSource(1, 2, fields(key1, \"foo\", key2, \"bir\"));\n updateAndCheckSource(1, 2, fields(key1, \"foo\", key2, \"bir\"));\n updateAndCheckSource(2, 3, fields(key1, \"foo\", key2, \"foo\"));\n updateAndCheckSource(3, 4, fields(key1, \"foo\", key2, null));\n updateAndCheckSource(3, 4, fields(key1, \"foo\", key2, null));\n updateAndCheckSource(4, 5, fields(key1, \"foo\", key2, \"foo\"));\n updateAndCheckSource(5, 6, fields(key1, null, key2, \"foo\"));\n updateAndCheckSource(5, 6, fields(key1, null, key2, \"foo\"));\n updateAndCheckSource(6, 7, fields(key1, null, key2, null));\n updateAndCheckSource(6, 7, fields(key1, null, key2, null));\n updateAndCheckSource(7, 8, fields(key1, null, key2, null, key3, null));\n\n assertEquals(5, totalNoopUpdates());\n }",
"@Test\n\tpublic void equalsSameObject() {\n\t\tProductScanImageURIKey key = this.getDefaultKey();\n\t\tboolean equals = key.equals(key);\n\t\tAssert.assertTrue(equals);\n\t}",
"@Test\n @DisplayName(\"Matched\")\n public void testEqualsMatched() throws BadAttributeException {\n Settings settings = new Settings();\n assertEquals(new Settings(), settings);\n }",
"@Test\n public void equals() {\n EditReminderDescriptor descriptorWithSameValues = new EditReminderDescriptor(DESC_REMINDER_MATHS);\n assertTrue(DESC_REMINDER_MATHS.equals(descriptorWithSameValues));\n\n // same object -> returns true\n assertTrue(DESC_REMINDER_MATHS.equals(DESC_REMINDER_MATHS));\n\n // null -> returns false\n assertFalse(DESC_REMINDER_MATHS.equals(null));\n\n // different types -> returns false\n assertFalse(DESC_REMINDER_MATHS.equals(5));\n\n // different values -> returns false\n assertFalse(DESC_REMINDER_MATHS.equals(DESC_REMINDER_SCIENCE));\n\n // different desc -> returns false\n EditReminderDescriptor editedMaths = new EditReminderDescriptorBuilder(DESC_REMINDER_MATHS)\n .withDescription(VALID_REMINDER_DESC_TWO).build();\n assertFalse(DESC_REMINDER_MATHS.equals(editedMaths));\n\n // different date -> returns false\n editedMaths = new EditReminderDescriptorBuilder(DESC_REMINDER_MATHS)\n .withReminderDate(VALID_REMINDER_DATE_TWO).build();\n assertFalse(DESC_REMINDER_MATHS.equals(editedMaths));\n }",
"private boolean equalKeys(Object other) {\r\n if (this == other) {\r\n return true;\r\n }\r\n if (!(other instanceof Contacto)) {\r\n return false;\r\n }\r\n Contacto that = (Contacto) other;\r\n if (this.getIdContacto() != that.getIdContacto()) {\r\n return false;\r\n }\r\n return true;\r\n }",
"@Test\n public void equalsWithDifferentName() throws Exception {\n AttributeKey<Number> key1 = new AttributeKey<Number>(Number.class, \"key1\");\n AttributeKey<Number> key2 = new AttributeKey<Number>(Number.class, \"key2\");\n\n assertThat(key1.equals(key2), is(false));\n assertThat(key2.equals(key1), is(false));\n }",
"@Test\n public void testEqualsReturnsFalseOnDifferentIdVal() throws Exception {\n setRecordFieldValue(otherRecord, \"id\", 42L);\n\n boolean equals = record.equals(otherRecord);\n\n assertThat(equals, is(false));\n }",
"@Test\n\tpublic void testSampleEquals() {\n\n\t\tassertTrue(square.equals(squareRotate));\n\t\t\n\t\tassertTrue(pyr1.equals(pyr5));\n\t\t\n\t\tassertTrue(s.equals(sInitial));\n\t\tassertFalse(stick.equals(stickRotated));\n\t\tassertFalse(s.equals(sRotated));\n\n\n\t}",
"private void assertSymmetric(UMLMessageArgument msgArg1,UMLMessageArgument msgArg2) throws Exception\r\n\t{\r\n\t\tif( msgArg1!=null && msgArg2!=null)\r\n\t\t\tassertEquals(msgArg1.equals(msgArg2),msgArg2.equals(msgArg1));\r\n\t}",
"@Test\n public void equals2() throws Exception {\n SmartPlayer x = new SmartPlayer(0, 1);\n SmartPlayer y = new SmartPlayer(0, 2);\n assertFalse(x.equals(y));\n }",
"private boolean oneEquals(AccessPath that) {\n //if (this._n != that._n) return false;\n if (this._field != that._field) return false;\n if (this._last != that._last) return false;\n if (this.succ.size() != that.succ.size()) return false;\n return true;\n }",
"@Override\n public boolean equals(Object obj)\n {\n if (this == obj)\n return true;\n\n if (!getClass().isInstance(obj))\n return false;\n\n MediaStreamTarget mediaStreamTarget = (MediaStreamTarget) obj;\n\n return addressesAreEqual(getControlAddress(), mediaStreamTarget.getControlAddress())\n && addressesAreEqual(getDataAddress(), mediaStreamTarget.getDataAddress());\n }",
"public boolean same1(int[] c, int[] g) \n\t{\n\t\tfor(int x = 0; x<18; x++) //loop through the boards\n\t\t{\n\t\t\tif(c[x] != g[x]) //if one value is not the same in the afrra return false\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;//if they all are the same return true\n\t}",
"public boolean isDeviceAlreadyConnected(IWifiP2pProxy.IFastConnectInfo info) {\n\t\tLog.d(TAG, \"mConnectedDevice = \" + mConnectedDevice.getDeviceAddress());\n\t\tLog.d(TAG, \"info = \" + info.getDeviceAddress());\n\t\tif (mConnectedDevice.getDeviceAddress().equalsIgnoreCase(info.getDeviceAddress())) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Test\n\tpublic void ifAppropriateAttributesInDifferentMBeansHaveSameValueReturnsThatValue() throws Exception {\n\t\tMBeanWithSingleIntAttr mbean_1 = new MBeanWithSingleIntAttr(1);\n\t\tMBeanWithSingleIntAttr mbean_2 = new MBeanWithSingleIntAttr(1);\n\n\t\tDynamicMBean mbean = createDynamicMBeanFor(mbean_1, mbean_2);\n\n\t\tassertEquals(1, mbean.getAttribute(\"value\"));\n\t}",
"@Test\n final void testCreateDeviceAlreadyExists() {\n when(deviceDao.findDevice(DeviceFixture.SERIAL_NUMBER)).thenReturn(Optional.of(deviceDTO));\n\n assertThrows(\n ExceptionType.DeviceAlreadyExistsException.class,\n () -> deviceController.createDevice(createDeviceRequest));\n }",
"public boolean isBothPasswordCorrect() { \n String pass1 = new String(newPasswordTextField.getPassword());\n String pass2 = new String(repeatPasswordTextField.getPassword()); \n \n return (pass1.equals(pass2) && isPasswordCorrect());\n }",
"private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof User)) {\n return false;\n }\n User that = (User) other;\n if (this.getIduser() != that.getIduser()) {\n return false;\n }\n return true;\n }",
"public void checkDevices() throws TNotFoundEx{\n\t\tString command = \"adb devices -l\";\n\t\tCommando commando = new Commando();\n\t\tString op = commando.executeCommand(command);\n\t\t\n\t\tOtherUtil oU = new OtherUtil();\n\t\tArrayList<String> devices = oU.getRegexFromString(op, \"(model:.*?device:.+$?)\");\n\t\tint eligDevices = devices.size();\n\t\t\n\t\tif (eligDevices>1)\n\t\t\tthrow new TNotFoundEx(\"ERROR: 2 or more Android devices are connected to the host, please connect only one Android device.\");\n\t\tif (eligDevices == 0)\n\t\t\tthrow new TNotFoundEx(\"ERROR: No Android devices detected by the host. Execute adb devices -l to check the connected devices\");\n\t\t\t\n\t}",
"private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof Acquirente)) {\n return false;\n }\n Acquirente that = (Acquirente) other;\n if (this.getIdacquirente() != that.getIdacquirente()) {\n return false;\n }\n return true;\n }",
"@Test\n public void equals_DifferentDiningHallBitfield_Test() {\n Assert.assertFalse(bq1.equals(bq6));\n Assert.assertFalse(bq1.equals(bq7));\n }",
"protected boolean checkFields() {\n // Check if any of the fields are empty\n boolean ok = true;\n ok = !isFieldEmpty(password2) && ok;\n ok = !isFieldEmpty(password) && ok;\n ok = !isFieldEmpty(email) && ok;\n\n if (!ok)\n return false;\n\n // Check whether passwords match\n if (!password.getText().toString().equals(password2.getText().toString())){\n password2.setError(getString(R.string.signup_password_mismatch));\n password2.requestFocus();\n return false;\n }\n return true;\n }",
"private static boolean checkSingleFieldConsistency(\n LogManager pLogger, SMGObject pObject, UnmodifiableSMG pSmg) {\n\n // For all fields in the object, verify that sizeof(type)+field_offset < object_size\n SMGEdgeHasValueFilterByObject filter = SMGEdgeHasValueFilter.objectFilter(pObject);\n\n for (SMGEdgeHasValue hvEdge : pSmg.getHVEdges(filter)) {\n if ((hvEdge.getOffset() + hvEdge.getSizeInBits()) > pObject.getSize()) {\n pLogger.log(Level.SEVERE, \"SMG inconistent: field exceedes boundary of the object\");\n pLogger.log(Level.SEVERE, \"Object: \", pObject);\n pLogger.log(Level.SEVERE, \"Field: \", hvEdge);\n return false;\n }\n }\n return true;\n }",
"private void verify(final Collection objects) {\n final HashSet originalIds = new HashSet();\n for (final Iterator i = objects.iterator(); i.hasNext();) {\n final ManagedObject mo = (ManagedObject) i.next();\n originalIds.add(mo.getID());\n }\n\n final Collection inMemoryIds = getAllObjectIDs();\n assertTrue(\"Wrong bits in memory were set\", originalIds.containsAll(inMemoryIds));\n\n // verify on disk object IDs\n final ObjectIDSet idSet = this.managedObjectPersistor.snapshotObjectIDs();\n assertTrue(\"Wrong object IDs on disk\", idSet.containsAll(inMemoryIds));\n assertTrue(\"Wrong object IDs on disk\", inMemoryIds.containsAll(idSet));\n }",
"@Test\n public void isSameBeneficiary() {\n assertTrue(ANIMAL_SHELTER.isSameBeneficiary(ANIMAL_SHELTER));\n\n // null -> returns false\n assertFalse(ANIMAL_SHELTER.isSameBeneficiary(null));\n\n // same name, different attribute -> return true\n assertTrue(ANIMAL_SHELTER.isSameBeneficiary(\n new BeneficiaryBuilder(BABES).withName(VALID_NAME_ANIMAL_SHELTER).build()));\n\n // different name and different phone or email -> returns false\n Beneficiary differentPhone = new BeneficiaryBuilder(BABES).withPhone(VALID_PHONE_BABES)\n .withEmail(VALID_EMAIL_ANIMAL_SHELTER).build();\n assertFalse(ANIMAL_SHELTER.isSameBeneficiary(differentPhone));\n\n Beneficiary differentEmail = new BeneficiaryBuilder(BABES).withPhone(VALID_PHONE_ANIMAL_SHELTER)\n .withEmail(VALID_EMAIL_BABES).build();\n assertFalse(ANIMAL_SHELTER.isSameBeneficiary(differentEmail));\n\n //different name, (same phone and email) different attributes -> returns true\n Beneficiary editedAnimalShelter = new BeneficiaryBuilder(ANIMAL_SHELTER)\n .withName(VALID_NAME_BABES)\n .withAddress(VALID_ADDRESS_BABES).build();\n assertTrue(ANIMAL_SHELTER.isSameBeneficiary(editedAnimalShelter));\n\n // same name, same email, different attributes -> returns true\n editedAnimalShelter = new BeneficiaryBuilder(ANIMAL_SHELTER).withPhone(VALID_PHONE_BABES)\n .withAddress(VALID_ADDRESS_BABES).build();\n assertTrue(ANIMAL_SHELTER.isSameBeneficiary(editedAnimalShelter));\n\n // same name, same phone, same email, different attributes -> returns true\n editedAnimalShelter = new BeneficiaryBuilder(ANIMAL_SHELTER).withAddress(VALID_ADDRESS_BABES).build();\n assertTrue(ANIMAL_SHELTER.isSameBeneficiary(editedAnimalShelter));\n }",
"@Test\n public void testEqualsReturnsTrueOnSelfArg() {\n boolean equals = record.equals(record);\n\n assertThat(equals, is(true));\n }",
"@Test\n public void equals_trulyEqual() {\n SiteInfo si1 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n SiteInfo si2 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n\n Assert.assertEquals(si1, si2);\n }",
"@NeededForTesting\n public static boolean areObjectsEqual(Object a, Object b) {\n return a == b || (a != null && a.equals(b));\n }",
"@Test\n public void authenticateTestFailure2() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, \"other_token\");\n assertFalse(device.authenticate());\n DatabaseTest.cleanDatabase();\n }",
"@Test\n public void CsamePass () {\n onView(withId(R.id.username)).check(matches(isDisplayed()));\n //enter correct past password\n onView(withId(R.id.oldPassword)).perform(typeText(\"00000000\"));\n //close keyboard\n closeSoftKeyboard();\n //enter new pass that same as old\n onView(withId(R.id.newPassword)).perform(typeText(\"00000000\"));\n //close keyboard\n closeSoftKeyboard();\n //renter again the new pass that same as old\n onView(withId(R.id.reNewPassword)).perform(typeText(\"00000000\"));\n //close keyboard\n closeSoftKeyboard();\n //click the button\n onView(withId(R.id.save)).perform(click());\n // check toast visibility\n onView(withText(R.string.passwordSame))\n .inRoot(new ToastMatcher())\n .check(matches(withText(R.string.passwordSame)));\n //check activity still shown\n assertFalse(activityTestRule.getActivity().isFinishing());\n }",
"@Override\n public final boolean equals(Object obj) {\n if (!(obj instanceof UniqueID))\n return false;\n UniqueID castObj = (UniqueID)obj;\n return this.leastSigBits == castObj.leastSigBits && this.mostSigBits == castObj.mostSigBits;\n }",
"@SuppressWarnings(\"unlikely-arg-type\")\n @Test\n public void testEquals() {\n Order order = new Order(\"Test\", LocalTime.NOON, GridCoordinate.ZERO);\n Order same = new Order(\"Test\", LocalTime.NOON, GridCoordinate.ZERO);\n Order other = new Order(\"Test\", LocalTime.MIDNIGHT, GridCoordinate.ZERO);\n Order another = new Order(\"Test\", LocalTime.NOON, GridCoordinate.of(1, 1));\n Order more = new Order(\"Test2\", LocalTime.NOON, GridCoordinate.ZERO);\n\n Assert.assertTrue(\"Two objects with the same addresses should be equal.\", order.equals(order));\n Assert.assertFalse(\"Null check.\", order.equals(null));\n Assert.assertFalse(\"Type check.\", order.equals(\"\"));\n Assert.assertFalse(\"Different order times.\", order.equals(other));\n Assert.assertFalse(\"Different customer locations.\", order.equals(another));\n Assert.assertFalse(\"Different order IDs.\", order.equals(more));\n Assert.assertTrue(\"Same values.\", order.equals(same));\n }",
"@Test\n public void equals() {\n EditEventDescriptor descriptorWithSameValues = new EditEventDescriptor(DESC_TUTORIAL);\n assertTrue(DESC_TUTORIAL.equals(descriptorWithSameValues));\n\n // same object -> returns true\n assertTrue(DESC_TUTORIAL.equals(DESC_TUTORIAL));\n\n // null -> returns false\n assertFalse(DESC_TUTORIAL.equals(null));\n\n // different types -> returns false\n assertFalse(DESC_TUTORIAL.equals(5));\n\n // different values -> returns false\n assertFalse(DESC_TUTORIAL.equals(DESC_EXAM));\n\n // different name -> returns false\n EditEventDescriptor editedTutorial = new EditEventDescriptorBuilder(DESC_TUTORIAL).withName(VALID_NAME_EXAM)\n .build();\n assertFalse(DESC_TUTORIAL.equals(editedTutorial));\n\n // different start time -> returns false\n editedTutorial = new EditEventDescriptorBuilder(DESC_TUTORIAL).withStartDateTime(VALID_START_DATE_TIME_EXAM)\n .build();\n assertFalse(DESC_TUTORIAL.equals(editedTutorial));\n\n // different end time -> returns false\n editedTutorial = new EditEventDescriptorBuilder(DESC_TUTORIAL).withEndDateTime(VALID_END_DATE_TIME_EXAM)\n .build();\n assertFalse(DESC_TUTORIAL.equals(editedTutorial));\n\n // different address -> returns false\n editedTutorial = new EditEventDescriptorBuilder(DESC_TUTORIAL).withAddress(VALID_ADDRESS_EXAM).build();\n assertFalse(DESC_TUTORIAL.equals(editedTutorial));\n\n // different tags -> returns false\n editedTutorial = new EditEventDescriptorBuilder(DESC_TUTORIAL).withTags(VALID_TAG_EXAMS).build();\n assertFalse(DESC_TUTORIAL.equals(editedTutorial));\n }",
"@Test\n public void testRegisterBackupDeviceNotPossibleIfNoPrimaryDevicePresent() throws Exception {\n clearAllMultifactorDevices();\n\n //This should fail, because no primary device is present for the user\n thrown.expect(AssertionError.class);\n thrown.expectMessage(containsString(\"Primary authentication devices must be set up before backup devices\"));\n doStartRegistration();\n }",
"@Test\n public void authenticateTestSucces() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);\n assertTrue(device.authenticate());\n DatabaseTest.cleanDatabase();\n }",
"private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof Sanpham)) {\n return false;\n }\n Sanpham that = (Sanpham) other;\n Object myMasp = this.getMasp();\n Object yourMasp = that.getMasp();\n if (myMasp==null ? yourMasp!=null : !myMasp.equals(yourMasp)) {\n return false;\n }\n return true;\n }",
"@Override\n public boolean equals(Object obj) {\n if (obj instanceof UsageInfo) {\n UsageInfo info = (UsageInfo)obj;\n return info.getPhysicalMachine().getID() == pm.getID();\n }\n return false;\n }",
"@Override\n public boolean equals(Object o) {\n if (o == this) {\n return true;\n }\n /* Check if o is an instance of Complex or not\n \"null instanceof [type]\" also returns false */\n if (!(o instanceof RAPDU)) {\n return false;\n }\n RAPDU rapdu = (RAPDU) o;\n return Arrays.equals(bytes, ((RAPDU) o).bytes);\n }",
"private void areEquals(FileInfo a, FileInfo b)\n\t{\n\t\t// will test a subset for now\n\n\t\tassertEquals(a.width,b.width);\n\t\tassertEquals(a.height,b.height);\n\t\tassertEquals(a.nImages,b.nImages);\n\t\tassertEquals(a.whiteIsZero,b.whiteIsZero);\n\t\tassertEquals(a.intelByteOrder,b.intelByteOrder);\n\t\tassertEquals(a.pixels,b.pixels);\n\t\tassertEquals(a.pixelWidth,b.pixelWidth,Assert.DOUBLE_TOL);\n\t\tassertEquals(a.pixelHeight,b.pixelHeight,Assert.DOUBLE_TOL);\n\t\tassertEquals(a.unit,b.unit);\n\t\tassertEquals(a.pixelDepth,b.pixelDepth,Assert.DOUBLE_TOL);\n\t\tassertEquals(a.frameInterval,b.frameInterval,Assert.DOUBLE_TOL);\n\t\tassertEquals(a.calibrationFunction,b.calibrationFunction);\n\t\tAssert.assertDoubleArraysEqual(a.coefficients,b.coefficients,Assert.DOUBLE_TOL);\n\t\tassertEquals(a.valueUnit,b.valueUnit);\n\t\tassertEquals(a.fileType,b.fileType);\n\t\tassertEquals(a.lutSize,b.lutSize);\n\t\tassertArrayEquals(a.reds,b.reds);\n\t\tassertArrayEquals(a.greens,b.greens);\n\t\tassertArrayEquals(a.blues,b.blues);\n\t}",
"public boolean reconcilePassword(){\r\n if((signup.getFirstPassword()).equals(signup.getSecondPassword())){\r\n \r\n return true;\r\n \r\n }\r\n else{\r\n \r\n return false;\r\n }\r\n }",
"@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof Biometry)) return false;\n Biometry biometry = (Biometry) o;\n return fingerprint.equals(biometry.fingerprint);\n }",
"protected boolean arraysEqual(short[] other) {\n if (other == arrayOfShorts) {\n return true;\n }\n\n if (other.length != arrayOfShorts.length) {\n return false;\n }\n\n for (int i = 0; i < arrayOfShorts.length; i++) {\n if (other[i] != arrayOfShorts[i]) {\n return false;\n }\n }\n return true;\n }",
"@Test\n public void equals_DifferentUserId_Test() {\n Assert.assertFalse(bq1.equals(bq2));\n }",
"private boolean samePosition(ITarget t1, ITarget t2) {\n assert t1.getTag() == t2.getTag() : \"Programmer error; tags must match.\";\n switch (t1.getTag()) {\n case JPL_MINOR_BODY:\n case MPC_MINOR_PLANET:\n case NAMED:\n\n // SUPER SUPER SKETCHY\n // The .equals logic in NonSiderealTarget actually does what we want here, at\n // least according to the old implementation here. So we'll leave it for now.\n // This will be easier with the new model.\n return t1.equals(t2);\n\n case SIDEREAL:\n final HmsDegTarget hms1 = (HmsDegTarget) t1;\n final HmsDegTarget hms2 = (HmsDegTarget) t2;\n return hasSameCoordinates(hms1, hms2) &&\n hasSameProperMotion(hms1, hms2) &&\n hasSameTrackingDetails(hms1, hms2);\n\n default:\n throw new Error(\"Unpossible target tag: \" + t1.getTag());\n }\n }",
"protected boolean sameMissingInputAttributes(Instance inst1,\r\n\t\t\tInstance inst2, InstanceAttributes atts) {\r\n\t\tboolean sameMVs = true;\r\n\r\n\t\tfor (int i = 0; i < atts.getInputNumAttributes() && sameMVs; i++) {\r\n\t\t\tif (inst1.getInputMissingValues(i) != inst2\r\n\t\t\t\t\t.getInputMissingValues(i))\r\n\t\t\t\tsameMVs = false;\r\n\t\t}\r\n\r\n\t\treturn sameMVs;\r\n\t}"
]
| [
"0.6695086",
"0.6188238",
"0.61726606",
"0.60820544",
"0.608084",
"0.60682505",
"0.6012459",
"0.59291244",
"0.5893796",
"0.581767",
"0.5727836",
"0.5690414",
"0.56498516",
"0.5648361",
"0.55921745",
"0.55440766",
"0.5456448",
"0.54538965",
"0.5444663",
"0.5393568",
"0.5377716",
"0.53351736",
"0.53171015",
"0.5286382",
"0.5279344",
"0.52614367",
"0.52508473",
"0.5250315",
"0.5232973",
"0.5219077",
"0.5215486",
"0.5208133",
"0.5200085",
"0.51839143",
"0.51779693",
"0.51758003",
"0.51753193",
"0.5171314",
"0.5158919",
"0.5147649",
"0.5147649",
"0.5146818",
"0.51406014",
"0.51402795",
"0.5139164",
"0.5108115",
"0.50989497",
"0.50945705",
"0.50941205",
"0.5081291",
"0.5073202",
"0.5069946",
"0.50445086",
"0.503096",
"0.5022736",
"0.5012344",
"0.50104624",
"0.4997217",
"0.49939126",
"0.49913216",
"0.49853402",
"0.49750546",
"0.49563566",
"0.49562335",
"0.49486023",
"0.49472678",
"0.49407357",
"0.49017662",
"0.49015602",
"0.4897656",
"0.48961142",
"0.48948455",
"0.48922122",
"0.48898417",
"0.48819667",
"0.4879748",
"0.48745477",
"0.48695743",
"0.48688844",
"0.48658252",
"0.48536146",
"0.48533392",
"0.48495454",
"0.48488548",
"0.48486155",
"0.48473412",
"0.484691",
"0.4839642",
"0.4834869",
"0.48301843",
"0.482922",
"0.48283434",
"0.4821801",
"0.4819376",
"0.48174194",
"0.48146236",
"0.48107094",
"0.48057032",
"0.480418",
"0.479659"
]
| 0.7375334 | 0 |
Verify that a device is not the same if the token is different. | @Test
public void equalsOtherTest() {
Device device2 = new Device(deviceID, "other");
assertNotEquals(device, device2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void equalsOtherTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device, device2);\n }",
"@Test\n public void equalsSameTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device, device2);\n }",
"@Override\r\n\tpublic boolean sameIdentityAs(Device other) {\n\t\treturn false;\r\n\t}",
"@Test\n public void getTokenTest() {\n assertEquals(token, device.getToken());\n }",
"@Test\n public void authenticateTestFailure2() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, \"other_token\");\n assertFalse(device.authenticate());\n DatabaseTest.cleanDatabase();\n }",
"@Test\n public void hashCodeTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device.hashCode(), device2.hashCode());\n }",
"@Override\n\t\t\t\t\t\t\tpublic void onTokenIncorrect() {\n\t\t\t\t\t\t\t\t Log.d(\"LoginActivity\", \"--onTokenIncorrect\");\n\t\t\t\t\t\t\t}",
"private boolean verifyToken(final String token) {\n LOG.debug(token);\n if (!this.verificationToken.equals(token)) {\n LOG.error(Constants.VERIFICATION_TOKEN_INVALID);\n return false;\n }\n return true;\n }",
"@Test\n public void useTwiceTheSameToken() throws IOException {\n tokenConsumption();\n // then set the password for the user (and so valid the token)\n String userTokenPath = getPath(\"/api/users/token/{token}\");\n UserPasswordDTO dto = new UserPasswordDTO();\n dto.setPassword(\"test\");\n JsonNode json = objectMapper.valueToTree(dto);\n\n HttpEntity<JsonNode> requestEntity = new HttpEntity<>(json);\n ResponseEntity<String> userResponseEntity =\n rest.exchange(userTokenPath, HttpMethod.PATCH, requestEntity, String.class, token.getToken());\n assertEquals(userResponseEntity.getStatusCode(), HttpStatus.OK);\n // second time KO\n ResponseEntity<String> responseEntity = rest.getForEntity(apiPath, String.class, token.getToken());\n\n assertEquals(HttpStatus.GONE, responseEntity.getStatusCode());\n\n ErrorResponse errorResponse = objectMapper.readValue(responseEntity.getBody(), ErrorResponse.class);\n assertEquals(HttpStatus.GONE.value(), errorResponse.getStatus());\n }",
"@Test\n public void equalsOtherTest4() {\n assertFalse(device.equals(\"\"));\n }",
"@Test\n public void equalsOtherTest3() {\n assertFalse(device.equals(null));\n }",
"@Test\n public void equalsSelfTest() {\n assertEquals(device, device);\n }",
"@Test\n public void authenticateTestFailure() {\n assertFalse(device.authenticate());\n }",
"void disableDevice(Device device, String token) throws AuthenticationException;",
"void modifyDevice(Device device, String token) throws InvalidDeviceException, AuthenticationException;",
"@Test\n public void SameTokenNameOpenTokenIsNotInExchange() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"_\";\n long firstTokenQuant = 200000000L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n accountCapsule.addAssetAmountV2(secondTokenId.getBytes(), secondTokenQuant, dbManager);\n accountCapsule.setBalance(firstTokenQuant);\n dbManager.getAccountStore().put(ownerAddress, accountCapsule);\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"token is not in exchange\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }",
"@Override\n protected void validateRegisteredDevice(MultifactorDevice device) throws Exception {\n assertThat(device.getBackup(), is(Boolean.TRUE));\n }",
"@Test\n public void updateDeviceTokenTest() throws ApiException {\n String deviceId = null;\n // DeviceTokenEnvelope response = api.updateDeviceToken(deviceId);\n\n // TODO: test validations\n }",
"public boolean isDuplicate(IDecodedDeviceRequest<?> request) throws SiteWhereException;",
"public static boolean checkSavedToken(Context context) {\n SharedPreferences preferences = context.getSharedPreferences(token_storage, 0);\n String storage_token = preferences.getString(\"token\", \"notoken\");\n\n if (!storage_token.equals(\"notoken\")) {\n Log.d(\"Service\", \"Using stored token\");\n header_token = \"Bearer \" + storage_token;\n isTokenPresent = true;\n bindToken();\n return true;\n }\n return false;\n }",
"@Test\n public void hashCodeTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device.hashCode(), device2.hashCode());\n }",
"@SuppressLint(\"CommitPrefEdits\") // Preferences change needs to be synchronous\n public void invalidateToken() {\n preferences.edit().remove(getString(R.string.auth_token)).commit();\n validateToken();\n }",
"boolean hasDeviceId();",
"boolean hasDeviceId();",
"public void testGetSimOperator_unavailableDevice() {\n mMockIDevice = EasyMock.createMock(IDevice.class);\n EasyMock.expect(mMockIDevice.getState()).andReturn(DeviceState.UNAUTHORIZED);\n EasyMock.expect(mMockIDevice.getSerialNumber()).andReturn(\"serial\");\n EasyMock.replay(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n assertNull(mTestDevice.getSimOperator());\n EasyMock.verify(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n }",
"private void _verifyAuthCode(Device device,String authCode){\r\n \t\tdevice.setModified(0); // reset modified to get current time.\r\n \t\tif (device.getStatus() != DeviceStatus.Authing.getStatus()) {\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorStatusViolate,\r\n \t\t\t\t\t\"device auth status not match current status is \"+device.getStatus());\r\n \t\t}\r\n \t\t//\r\n \t\t// if device modified + timeout > current time then throw timeout exception.\r\n \t\t// check verify timeout\r\n \t\t//\r\n \t\tMap<String,Object> setting = applicationConfig.get(\"general\");\r\n \tlong time=java.util.Calendar.getInstance().getTimeInMillis()/1000;\r\n \t\tint timeout = (Integer)setting.get(\"auth_verify_timeout\");\r\n \tif (time > device.getModified() + timeout ) {\t\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorAuthExpired,\r\n \t\t\t\t\t\"verify mobile auth code has been timeout\");\r\n \t}\r\n \t\r\n \t\t//\r\n \t\t// check retry count\r\n \t\t//\r\n \t\tint retryLimit = (Integer)setting.get(\"auth_retry_limit\");\r\n \t\tif(logger.isDebugEnabled()) {\r\n \t\t\tlogger.debug(\"retry limit is \"+retryLimit+\" current auth retry is \"+device.getAuthRetry());\r\n \t\t}\r\n \t\tif (device.getAuthRetry() > retryLimit) {\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorExceedLimit,\r\n \t\t\t\t\t\"mobile verify auth retry too many time try:\"\r\n \t\t\t\t\t\t\t+ device.getAuthRetry() + \" > \" + retryLimit);\r\n \t\t}\r\n \r\n \t\t//\r\n \t\t// check auth code\r\n \t\t//\r\n \t\tString token = device.getToken();\r\n \t\tif (!authCode.equals(this.encodeUtility.decrypt(token, Device.ENCRYPT_KEY))) {\r\n \t\t\t//\r\n \t\t\t// if fail update retry status\r\n \t\t\t//\r\n \t\t\tlogger.debug(\"token not match, token is \"+token);\r\n \t\t\tint ret =deviceDao.updateStatusAndRetryCount(device.getId(), device.getUserId(),\r\n \t\t\t\t\tDeviceStatus.Authing.getStatus(),\r\n \t\t\t\t\tDeviceStatus.Init.getStatus(), device.getModified());\r\n \t\t\tif (ret != 1) {\r\n \t\t\t\tthrow new RentException(RentErrorCode.ErrorStatusViolate,\r\n \t\t\t\t\t\t\"update device status count is not 1\");\r\n \t\t\t}\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorAuthFail,\r\n \t\t\t\t\t\"device id \"+device.getId()+\" enter auth code not match\");\r\n \r\n \t\t}\r\n \t\t\r\n \t\t//\r\n \t\t// update device and user in database.\r\n \t\t//\r\n \t\tlogger.debug(\"update device status to authed\");\r\n \t\tdeviceDao.updateStatusAndRetryCount(device.getId(),device.getUserId(),\r\n \t\t\t\tDeviceStatus.Authed.getStatus(),\r\n \t\t\t\tDeviceStatus.Authing.getStatus(),\r\n \t\t\t\tdevice.getModified());\r\n \t\tUser user = device.getUser();\r\n \t\tif (user.getStatus() == UserStatus.Init.getStatus()){\r\n \t\t\tlogger.debug(\"update user status to authed\");\r\n \t\t\tuser.setModified((long)0);\r\n \t\t\tuserDao.updateUserStatus(user.getId(), UserStatus.Authed.getStatus()\r\n \t\t\t\t\t, UserStatus.Init.getStatus(), user.getModified());\r\n \t\t}\r\n \t\t\r\n \t}",
"private boolean validDevice(AcceleratorNode nodeDev) {\n// for (Class<?> typeValidDev : this.arrValidDevTypes) {\n// if (nodeDev.getClass() == typeValidDev)\n// return true;\n// }\n// \n// return false;\n \n return true;\n }",
"@VisibleForTesting\n protected boolean validateToken(EzSecurityToken token) {\n try {\n securityClient.validateReceivedToken(token);\n } catch (EzSecurityTokenException e) {\n logger.error(\"Token validation failed. \", e);\n throw new SecurityException(\"Token failed validation\");\n }\n\n String fromId = token.getValidity().getIssuedTo();\n String toId = token.getValidity().getIssuedFor();\n if (!fromId.equals(toId) && !fromId.equals(deployerSecurityId)) {\n throw new SecurityException(String.format(\n \"This call can only be made from Deployer (%s) or INS services. From: %s - To: %s\",\n deployerSecurityId, fromId, toId));\n }\n\n return true;\n }",
"private static boolean isValidDeviceId(String deviceId){\n return deviceId != null;\n }",
"@Test\n public void stopDeviceCheck() {\n System.out.println(\"* Device JUnit4Test: stopDeviceCheck()\");\n\n // authenticate the device and then stop it\n authenticateSimulatedDevice();\n mMainServer.removeDevice(mDeviceInstance);\n TestsConfig.delay(150);\n \n // check if the device is corretly removed from the server\n assertFalse(mDeviceInstance.isDeviceActive());\n assertNull(mMainServer.getDevice(mDeviceInstance.getUniqueIdentifier()));\n }",
"public boolean saveDeviceToken(String token) {\n SharedPreferences sharedPreferences = (_context).getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE);\n Editor editor = sharedPreferences.edit();\n editor.putString(TAG_TOKEN, token);\n editor.apply();\n return true;\n }",
"@Test\n public void SameTokenNameCloseTokenIsNotInExchange() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(0);\n InitExchangeBeforeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"_\";\n long firstTokenQuant = 200000000L;\n String secondTokenId = \"def\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n accountCapsule.addAssetAmount(secondTokenId.getBytes(), secondTokenQuant);\n accountCapsule.setBalance(firstTokenQuant);\n dbManager.getAccountStore().put(ownerAddress, accountCapsule);\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"token is not in exchange\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }",
"private static void assertToken(StringTokenizer tokenizer, String token) {\n String realToken = tokenizer.nextToken();\n if (!realToken.equals(token))\n throw new IllegalArgumentException(\n \"Bad token \\\"\" + realToken + \"\\\", expected \\\"\" + token + \"\\\" instead\");\n }",
"@Override\n public boolean isTokenValid(CrUser user, String token) {\n boolean result = false;\n if (user.getToken().equalsIgnoreCase(token)) {\n Date currentTime = new Date();\n if ((currentTime.getTime() - user.getTokenUpdateTime().getTime()) <= 1800000) {\n user.setTokenUpdateTime(currentTime);\n result = true;\n }\n }\n return result;\n }",
"private boolean isImeiValid(String deviceId) {\r\n try {\r\n String[] strings = deviceId.split(\"x\");\r\n byte[] bytes = strings[0].getBytes();\r\n\r\n int cks = 0;\r\n for (int i = 0; i < strings[0].length(); i++)\r\n cks += bytes[i];\r\n\r\n String checkId = strings[0] + \"x\" + cks % MAGIC_NUMBER;\r\n\r\n return deviceId.equals(checkId);\r\n } catch (Exception e) {\r\n return false;\r\n }\r\n }",
"protected void validateToken() {\n\n authToken = preferences.getString(getString(R.string.auth_token), \"\");\n saplynService = new SaplynService(preferences.getInt(debugLvl, -1), authToken);\n\n // Check if user already authenticated\n if (authToken.equals(\"\")) {\n Intent intent = new Intent(HomeActivity.this, AuthenticationActivity.class);\n startActivityForResult(intent, 0);\n }\n else {\n populateUser();\n }\n }",
"@Test\n public void newDeviceDuplicateTest() {\n DatabaseTest.setupDevice();\n Device newDevice = newDevice(DatabaseTest.DEVICE_ID);\n\n assertNull(newDevice);\n DatabaseTest.cleanDatabase();\n }",
"@Test\r\n\tpublic void TestvalidateTokenWithUserIdFalse() {\r\n\t\tlog.info(env.getProperty(\"log.start\"));\r\n\t\tudetails = new User(\"admin\", \"admin\", new ArrayList<>());\r\n\t\tUserDetails user1 = new User(\"admin1\", \"admin1\", new ArrayList<>());\r\n\t\tString generateToken = jwtutil.generateToken(udetails);\r\n\t\tBoolean validateToken = jwtutil.validateToken(generateToken, user1);\r\n\t\tassertEquals(false, validateToken);\r\n\t\tlog.info(env.getProperty(\"log.end\"));\r\n\t}",
"@Test\n public void SameTokenNameOpenInvalidParam() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n //token id is not a valid number\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, \"abc\", 1000),\n dbManager);\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"token id is not a valid number\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }",
"void checkToken(String token) throws InvalidTokenException;",
"@Test\n public void getDeviceTokenTest() throws ApiException {\n String deviceId = null;\n // DeviceTokenEnvelope response = api.getDeviceToken(deviceId);\n\n // TODO: test validations\n }",
"@Test\n public void deleteDeviceTokenTest() throws ApiException {\n String deviceId = null;\n // DeviceTokenEnvelope response = api.deleteDeviceToken(deviceId);\n\n // TODO: test validations\n }",
"@Override\r\n\tpublic boolean checktoken(String telephone, String accesstoken) {\n\t\tUserCustomer checktoken = userCustomerMapper.checktoken(telephone ,accesstoken );\r\n\t\tif (checktoken == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public boolean validateRefreshToken(String token){\n return refreshTokenRepository.findByToken(token).isPresent();\n }",
"@Override\n\tpublic boolean isTokenValid(String token) {\n\t\tLoginToken loginToken = getLoginTokenByToken(token);\n\t\tif (loginToken != null) {\n\t\t\tDate createTime = loginToken.getCreateTime();\n\t\t\tDate current = new Date();\n\t\t\tSystem.out.println(\"过了:\"+Math.abs(current.getTime() - createTime.getTime()));\n\t\t\tSystem.out.println(\"过了:\"+Math.abs(current.getTime() - createTime.getTime()) / (1000 *60));\n\t\t\tif (Math.abs(current.getTime() - createTime.getTime()) / (1000 * 60) >= 60) {\n\t\t\t\tloginToken.setStatus(Constant.LOGIN_TOKEN_STATUS_INVALID);\n\t\t\t\tloginTokenMapper.updateByPrimaryKey(loginToken);\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tloginToken.setCreateTime(current);\n\t\t\t\tloginTokenMapper.updateByPrimaryKey(loginToken);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public void testSessionToken() throws Exception {\n MediaSession.Token sessionToken = mSession.getSessionToken();\n\n assertNotNull(sessionToken);\n assertEquals(0, sessionToken.describeContents());\n\n // Test writeToParcel\n Parcel p = Parcel.obtain();\n sessionToken.writeToParcel(p, 0);\n p.setDataPosition(0);\n MediaSession.Token token = MediaSession.Token.CREATOR.createFromParcel(p);\n assertEquals(token, sessionToken);\n p.recycle();\n }",
"private boolean validateToken(String token, String user) {\n System.out.println(\"Userid is: \" + user);\n System.out.println(\"The token is \" + token);\n return user.equals(Jwts.parser().setSigningKey(SIGNING_KEY).parseClaimsJws(token).getBody().getSubject());\n\n }",
"@Test\n public void equals_DifferentUserId_Test() {\n Assert.assertFalse(bq1.equals(bq2));\n }",
"public byte[] getDeviceToken();",
"@Test\n public void equals2() throws Exception {\n SmartPlayer x = new SmartPlayer(0, 1);\n SmartPlayer y = new SmartPlayer(0, 2);\n assertFalse(x.equals(y));\n }",
"@Test\n public void testKeyEquivalence() throws Exception {\n ScanResultMatchInfo matchInfo1 = ScanResultMatchInfo.fromWifiConfiguration(mConfig1);\n ScanResultMatchInfo matchInfo1Prime = ScanResultMatchInfo.fromWifiConfiguration(mConfig1);\n ScanResultMatchInfo matchInfo2 = ScanResultMatchInfo.fromWifiConfiguration(mConfig2);\n assertFalse(matchInfo1 == matchInfo1Prime); // Checking assumption\n MacAddress mac1 = MacAddressUtils.createRandomUnicastAddress();\n MacAddress mac2 = MacAddressUtils.createRandomUnicastAddress();\n assertNotEquals(mac1, mac2); // really tiny probability of failing here\n\n WifiCandidates.Key key1 = new WifiCandidates.Key(matchInfo1, mac1, 1);\n\n assertFalse(key1.equals(null));\n assertFalse(key1.equals((Integer) 0));\n // Same inputs should give equal results\n assertEquals(key1, new WifiCandidates.Key(matchInfo1, mac1, 1));\n // Equal inputs should give equal results\n assertEquals(key1, new WifiCandidates.Key(matchInfo1Prime, mac1, 1));\n // Hash codes of equal things should be equal\n assertEquals(key1.hashCode(), key1.hashCode());\n assertEquals(key1.hashCode(), new WifiCandidates.Key(matchInfo1, mac1, 1).hashCode());\n assertEquals(key1.hashCode(), new WifiCandidates.Key(matchInfo1Prime, mac1, 1).hashCode());\n\n // Unequal inputs should give unequal results\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo2, mac1, 1)));\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo1, mac2, 1)));\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo1, mac1, 2)));\n }",
"@Test\n void testEqualsFalse() {\n assertFalse(loginRequest1.equals(loginRequest2));\n }",
"@Test\n public void SameTokenNameOpenNoAccount() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"123\";\n long firstTokenQuant = 100000000L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 200000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetV2Map = accountCapsule.getAssetMapV2();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetV2Map.get(firstTokenId));\n Assert.assertEquals(null, assetV2Map.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_NOACCOUNT, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail(\"account[+OWNER_ADDRESS_NOACCOUNT+] not exists\");\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"account[\" + OWNER_ADDRESS_NOACCOUNT + \"] not exists\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }",
"public void testGetSimState_unavailableDevice() {\n mMockIDevice = EasyMock.createMock(IDevice.class);\n EasyMock.expect(mMockIDevice.getState()).andReturn(DeviceState.UNAUTHORIZED);\n EasyMock.expect(mMockIDevice.getSerialNumber()).andReturn(\"serial\");\n EasyMock.replay(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n assertNull(mTestDevice.getSimState());\n EasyMock.verify(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n }",
"private String issueRefreshToken(UUID user, String deviceName) {\n String token = UUID.randomUUID().toString();\n String hash = BCrypt.hashpw(token, BCrypt.gensalt());\n\n dao.updateToken(user, deviceName, hash);\n\n return token;\n }",
"public boolean validate(String key, String value) {\r\n Jedis jedis = null;\r\n try{\r\n jedis = pool.getResource();\r\n String redisValue = jedis.get(getRedisKey(key));\r\n boolean isTokenValid = (redisValue != null && redisValue.equals(value));\r\n if(isTokenValid){\r\n \tjedis.psetex(getRedisKey(key), redisConfiguration.getIdleTimeToInvalidateAuthToken() * 60 * 1000L, value);\r\n }\r\n return isTokenValid;\r\n } finally {\r\n if (jedis != null) {\r\n jedis.close();\r\n }\r\n }\r\n }",
"@Test\n public void SameTokenNameOpenInvalidAddress() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"123\";\n long firstTokenQuant = 100000000L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 200000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetV2Map = accountCapsule.getAssetMapV2();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetV2Map.get(firstTokenId));\n Assert.assertEquals(null, assetV2Map.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_INVALID, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail(\"Invalid address\");\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"Invalid address\", e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }",
"boolean checkSignature(long sig0, long sig1, long sig2) throws Exception {\n Integer[] sig = new Integer[3];\n\t /* Get signature */\n readSignature(sig);\n\t /* Compare signature */\n if (sig[0] != sig0 || sig[1] != sig1 || sig[2] != sig2) {\n throw new Exception(\"Signature does not match selected device! \");\n }\n return true; // Indicate supported command.\n }",
"@Test\n public void getDeviceIDTest() {\n assertEquals(deviceID, device.getDeviceID());\n }",
"@Test\r\n\tpublic void TestvalidateToken() {\r\n\t\tlog.info(env.getProperty(\"log.start\"));\r\n\t\tudetails = new User(\"admin\", \"admin\", new ArrayList<>());\r\n\t\tString generateToken = jwtutil.generateToken(udetails);\r\n\t\tBoolean validateToken = jwtutil.validateToken(generateToken);\r\n\t\tassertEquals(true, validateToken);\r\n\t\tlog.info(env.getProperty(\"log.end\"));\r\n\t}",
"private Boolean checkMessageisRight(byte[] macmessage, byte[] takenmessage, SecretKey encryptionkey) throws Exception\n {\n byte[] mac = macAlgorithm(encryptionkey, takenmessage);\n boolean ret = Arrays.equals(mac, macmessage);\n return ret;\n }",
"@Override\n public void onRequestToken() {\n Toast.makeText(getApplicationContext(), \"Your token has expired\", Toast.LENGTH_LONG).show();\n Log.i(\"Video_Call_Tele\", \"The token as expired..\");\n // mRtcEngine.renewToken(token);\n // https://docs.agora.io/en/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html#af1428905e5778a9ca209f64592b5bf80\n // Renew token - TODO\n }",
"public void testLoginWithWrongPIN() {\r\n short i;\r\n byte[] modifiedPin = new byte[pinCode.length];\r\n for (i = 0; i < pinCode.length; i++) {\r\n modifiedPin[i] = (byte) (pinCode[i] ^ 0xFF);\r\n }\r\n\r\n try {\r\n tokenHandler.loginPIN(modifiedPin);\r\n fail(\"Logging in with wrong PIN did not cause an exception\");\r\n } catch (TokenException e) {\r\n assertEquals(ReturnCodes.SW_PIN_VALIDATION_FAILED, e.getSW());\r\n }\r\n }",
"public void testEquals(){\r\n Token otherToken;\r\n Token differentToken;\r\n\r\n //So we can catch an exception that should never be thrown.\r\n try{\r\n token = new Token(TokenType.COMMA, \",\", 1);\r\n otherToken = new Token(TokenType.COMMA, \",\", 2);\r\n differentToken = new Token(TokenType.PERIOD, \".\", 2);\r\n \r\n assertTrue(Token.COMMA.equals(Token.COMMA));\r\n assertTrue(Token.COMMA.equals(token));\r\n assertTrue(token.equals(Token.COMMA));\r\n assertTrue(token.equals(otherToken));\r\n assertTrue(otherToken.equals(token));\r\n assertFalse(differentToken.equals(token));\r\n assertFalse(token.equals(null));\r\n assertFalse(token.equals(\"abc\"));\r\n\r\n token = new Token(TokenType.STRING, \"\", 1);\r\n otherToken = new Token(TokenType.STRING, \"\", 2);\r\n assertTrue(token.equals(otherToken));\r\n assertTrue(otherToken.equals(token));\r\n otherToken = new Token(TokenType.STRING, \"a\", 2);\r\n assertFalse(token.equals(otherToken));\r\n assertFalse(otherToken.equals(token));\r\n assertTrue(otherToken.equals(otherToken));\r\n token = new Token(TokenType.STRING, \"abc\", 2);\r\n assertFalse(token.equals(otherToken));\r\n assertFalse(otherToken.equals(token));\r\n assertTrue(otherToken.equals(otherToken));\r\n \r\n token = new Token(TokenType.ID, \"z\", 1);\r\n otherToken = new Token(TokenType.ID, \"z\", 2);\r\n assertTrue(token.equals(otherToken));\r\n assertTrue(otherToken.equals(token));\r\n otherToken = new Token(TokenType.ID, \"za\", 2);\r\n assertFalse(token.equals(otherToken));\r\n assertFalse(otherToken.equals(token));\r\n assertTrue(otherToken.equals(otherToken));\r\n token = new Token(TokenType.ID, \"zabc\", 2);\r\n assertFalse(token.equals(otherToken));\r\n assertFalse(otherToken.equals(token));\r\n assertTrue(otherToken.equals(otherToken));\r\n\r\n otherToken = new Token(TokenType.STRING, \"zabc\", 2);\r\n assertFalse(token.equals(otherToken));\r\n assertFalse(otherToken.equals(token));\r\n\r\n }catch(ParserException e){\r\n System.err.println(\"In TokenTest::testEquals()\\n\" +\r\n \"the following error should not occur\\n\" +\r\n e.getMessage());\r\n };\r\n }",
"@Override\n public void tokenOverdue(final Context context) {\n System.out.println(\"tokenOverdue token 失效,重新获取token\");\n\n // 开发者通过自己的方法获取token,这里是demo\n String acountId = \"\";\n USDKCommonManager.updateToken(context, acountId);\n\n /**** 这份代码是例子。。。。。 ****/\n acountId = USDKTest.getSPToken(context);\n String callerPhone = USDKTest.getCallerPhone(context);\n if (TextUtils.isEmpty(acountId) || TextUtils.isEmpty(acountId)) {\n return;\n }\n USDKTest.getToken(context, callerPhone, acountId, new IUSDKHttpCallback() {\n @Override\n public void onSuccess(Object result) {\n try {\n String json = (String) result;\n System.out.println(\"onSuccess json =\" + json);\n String token = \"\";\n\n USDKTestResultGetTokenBean bean = new USDKTestResultGetTokenBean(new JSONObject(json));\n token = bean.getToken();\n USDKCommonManager.updateToken(context, token);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onFailed(Object result) {\n System.out.println(\"onFailed result =\" + result);\n }\n });\n /**** 这份代码是例子。。。。。 ****/\n }",
"@Test\n public void SameTokenNameOpenAccountIsNotCreator() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"123\";\n long firstTokenQuant = 200000000L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_SECOND);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n accountCapsule.addAssetAmountV2(firstTokenId.getBytes(), firstTokenQuant, dbManager);\n accountCapsule.addAssetAmountV2(secondTokenId.getBytes(), secondTokenQuant, dbManager);\n accountCapsule.setBalance(10000_000000L);\n dbManager.getAccountStore().put(ownerAddress, accountCapsule);\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_SECOND, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"account[a0548794500882809695a8a687866e76d4271a1abc]\"\n + \" is not creator\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }",
"private void releaseTokenState() {\n //checks if token is taken\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getContext());\n if (preferences!=null && preferences.getBoolean(TOKEN_RELEASED_ERROR, false)) {\n leaveToken();\n }\n }",
"public void checkFCMtoken(UserClass user) {\n\n String token_value = FirebaseInstanceId.getInstance().getToken();\n String token_key = mContext.getResources().getString(R.string.firebase_cloud_messaging_token);\n\n if (user.getFcmtoken() == null || user.getFcmtoken() != token_value) {\n /* Update user FCM token */\n sendRegistrationToServer(token_key, token_value);\n }\n\n }",
"public boolean isTokenValide() {\n try {\n token = Save.defaultLoadString(Constants.PREF_TOKEN, getApplicationContext());\n if (token != null && !token.equals(\"\")) {\n if (token.equals(\"\"))\n return false;\n JWT jwt = new JWT(token);\n boolean isExpired = jwt.isExpired(0);\n return !isExpired;\n } else\n return false;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n\n }",
"@Test\n public void testRegisterBackupDeviceNotPossibleIfNoPrimaryDevicePresent() throws Exception {\n clearAllMultifactorDevices();\n\n //This should fail, because no primary device is present for the user\n thrown.expect(AssertionError.class);\n thrown.expectMessage(containsString(\"Primary authentication devices must be set up before backup devices\"));\n doStartRegistration();\n }",
"@Test\n public void newDeviceTest() {\n Device newDevice = newDevice(deviceID);\n\n assertEquals(deviceID, newDevice.getDeviceID());\n assertNotNull(newDevice.getToken());\n\n executeManipulationQuery(\"DELETE FROM device WHERE device_id = ?\", deviceID);\n }",
"public boolean validateUserToken(String login, String token) throws SQLException;",
"public static String generateDeviceToken() throws EndlosException {\n\t\treturn hash(Utility.generateUuid() + DateUtility.getCurrentEpoch());\n\t}",
"@Test\n public void getDeviceTest() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);\n\n assertEquals(device, getDevice(DatabaseTest.DEVICE_ID));\n DatabaseTest.cleanDatabase();\n }",
"@Test\n public void testValidToken() {\n try {\n int coachId = authBO.getUserIdAndValidateToken(\"thisisaworkingtoken\");\n Assert.assertTrue(coachId == 1);\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(e.getMessage());\n }\n }",
"@Test\n public void should_recognize_if_adversary_obtained_authenticator_from_trusted_device_and_tried_connect_under_a_different_user() throws SignatureException {\n final IUserProvider up = getInstance(IUserProvider.class);\n up.setUsername(UNIT_TEST_USER, getInstance(IUser.class));\n final User currUser = getInstance(IUserProvider.class).getUser();\n\n // first session is from trusted device\n constants.setNow(dateTime(\"2015-04-23 11:00:00\"));\n coSession.newSession(currUser, true, null);\n\n // second session, also from a trusted device, the authenticator from this device got stolen\n constants.setNow(dateTime(\"2015-04-23 13:00:00\"));\n final UserSession newSession = coSession.newSession(currUser, true, null);\n final String authenticator = newSession.getAuthenticator().get().toString();\n\n\n // now let's move the clock 30 minutes forward to emulate a time change\n // adversary tries to reuse a completely valid and not yet expired authenticator to access the system under a different username\n constants.setNow(dateTime(\"2015-04-23 13:30:00\"));\n up.setUsername(\"USER1\", getInstance(IUser.class));\n final User differentUser = getInstance(IUserProvider.class).getUser();\n\n final Optional<UserSession> session = coSession.currentSession(differentUser, authenticator, false);\n assertFalse(session.isPresent());\n\n // additionally, let's also check that all sessions for a compromised user have been removed, but not the sessions for other users\n final EntityResultQueryModel<UserSession> currUserSessions = select(UserSession.class).where().prop(\"user\").eq().val(currUser).model();\n final EntityResultQueryModel<UserSession> otherSessions = select(UserSession.class).where().prop(\"user\").ne().val(currUser).model();\n\n assertEquals(0, coSession.count(currUserSessions));\n assertEquals(2, coSession.count(otherSessions));\n }",
"@Test\n void testGetAndSetToken() {\n isLockedRequest2.setToken(\"Pippin\");\n assertEquals(\"Pippin\", isLockedRequest2.getToken());\n }",
"@Test\n public void SameTokenNameOpenNotPreciseEnough() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"123\";\n long quant = 9991L;\n String secondTokenId = \"456\";\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, secondTokenId, quant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"Not precise enough\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n }\n\n quant = 10001;\n actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, secondTokenId, quant),\n dbManager);\n ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n Assert.assertEquals(ret.getInstance().getRet(), code.SUCESS);\n } catch (ContractValidateException e) {\n Assert.assertFalse(e instanceof ContractValidateException);\n Assert.assertEquals(\"Not precise enough\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n\n }",
"boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n String messageAfterDecrypt = \"not_empty_line\";\n String password = getString(R.string.check_token);\n ;\n try {\n messageAfterDecrypt = AESCrypt.decrypt(password, payload);\n //Log.e(TAG, \"messageAfterDecrypt \" + messageAfterDecrypt);\n //Log.e(TAG, \"email \" + email);\n } catch (GeneralSecurityException e) {\n e.printStackTrace();\n //handle error - could be due to incorrect password or tampered encryptedMsg\n }\n// if (messageAfterDecrypt.equals(email)){\n// return true;\n// }\n if (Utils.isEmailValid(messageAfterDecrypt)) {\n return true;\n }\n\n return false;\n }",
"@Override\n public boolean tokenIsValid(String token) {\n return DATABASE.getTokens().stream()\n .anyMatch(currentToken -> currentToken.equals(token));\n }",
"private void authenticateSimulatedDevice() {\n mSimulatedDevice.writeln(TestsConfig.deviceWelcome.toString());\n TestsConfig.delay(300);\n \n // check if everything is ok, and get the device instance\n mDeviceInstance = mMainServer.getDevice(\n TestsConfig.deviceWelcome.getString(\"identifier\"));\n assertNotNull(mDeviceInstance);\n }",
"@Test\n public void SameTokenNameCloseAccountIsNotCreator() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(0);\n InitExchangeBeforeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"abc\";\n long firstTokenQuant = 200000000L;\n String secondTokenId = \"def\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_SECOND);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n accountCapsule.addAssetAmount(firstTokenId.getBytes(), firstTokenQuant);\n accountCapsule.addAssetAmount(secondTokenId.getBytes(), secondTokenQuant);\n accountCapsule.setBalance(10000_000000L);\n dbManager.getAccountStore().put(ownerAddress, accountCapsule);\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_SECOND, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"account[a0548794500882809695a8a687866e76d4271a1abc]\"\n + \" is not creator\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }",
"@Test\n public void should_recognize_if_adversary_obtained_authenticator_from_untrusted_device_and_tried_to_change_expiry_date() throws SignatureException {\n final IUserProvider up = getInstance(IUserProvider.class);\n up.setUsername(UNIT_TEST_USER, getInstance(IUser.class));\n final User currUser = getInstance(IUserProvider.class).getUser();\n\n // first session is from trusted device\n constants.setNow(dateTime(\"2015-04-23 11:00:00\"));\n coSession.newSession(currUser, true, null);\n\n // second session from untrusted device, and this is the device where the authenticator gets stolen from\n constants.setNow(dateTime(\"2015-04-23 13:00:00\"));\n final UserSession newSession = coSession.newSession(currUser, false, null);\n\n // let's fabricate a fraudulent authenticator\n final String fraudulentAuthenticator = newSession.getAuthenticator().get().username + Authenticator.AUTHENTICATOR_SEPARATOR +\n newSession.getAuthenticator().get().seriesId + Authenticator.AUTHENTICATOR_SEPARATOR +\n // tries to move expiration time into the future\n (constants.now().plusMinutes(15).getMillis()) + Authenticator.AUTHENTICATOR_SEPARATOR +\n newSession.getAuthenticator().get().hash;\n\n\n // now let's move the clock 7 minutes forward to emulate a time change and request a current session with fraudulent authenticator\n // that as far as the adversary is concerned should still be valid due to the performed time manipulation\n constants.setNow(dateTime(\"2015-04-23 13:07:00\"));\n final Optional<UserSession> session = coSession.currentSession(currUser, fraudulentAuthenticator, false);\n assertFalse(session.isPresent());\n\n // additionally, let's also check that all sessions for a compromised user have been removed, but not the sessions for other users\n final EntityResultQueryModel<UserSession> currUserSessions = select(UserSession.class).where().prop(\"user\").eq().val(currUser).model();\n final EntityResultQueryModel<UserSession> otherSessions = select(UserSession.class).where().prop(\"user\").ne().val(currUser).model();\n\n assertEquals(0, coSession.count(currUserSessions));\n assertEquals(2, coSession.count(otherSessions));\n }",
"@Test\n public void testCantRegisterMismatchPassword() {\n enterValuesAndClick(\"name\", \"[email protected]\", \"123456\", \"123478\");\n checkErrors(nameNoError, emailNoError, pwdsDoNotMatchError, pwdsDoNotMatchError);\n }",
"@Test\n public void SameTokenNameCloseNoAccount() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(0);\n InitExchangeBeforeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"abc\";\n long firstTokenQuant = 100000000L;\n String secondTokenId = \"def\";\n long secondTokenQuant = 200000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetMap = accountCapsule.getAssetMap();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetMap.get(firstTokenId));\n Assert.assertEquals(null, assetMap.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_NOACCOUNT, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail(\"account[+OWNER_ADDRESS_NOACCOUNT+] not exists\");\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"account[\" + OWNER_ADDRESS_NOACCOUNT + \"] not exists\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }",
"@Test\n public void smartIdInvalidFormat() throws Exception {\n String errorMessage = authenticateWithSmartIdInvalidInputPollError(\"12akl2\", 2000);\n assertEquals(\"Isikukood on ebakorrektses formaadis.Intsidendi number:\", errorMessage);\n }",
"private DeviceTokenResponseJson sendRegistrationToServer(String token) {\n LocationManager locationManager= (LocationManager)getApplicationContext().getSystemService(Context.LOCATION_SERVICE);\n Location lastLocation;\n// if(locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)){\n// lastLocation=locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n// }else{\n// lastLocation=locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\n// }\n HttpURLConnection connection = null;\n BufferedReader reader = null;\n int id = sPrefs.getUserId();\n DeviceTokenJson dtj= new DeviceTokenJson();\n if(id!=0) { //if customer id ==0, user had not logged in. Don't send customer id.\n\n dtj.setCustomerId(id);\n }\n String deviceId = Settings.Secure.getString(this.getContentResolver(),\n Settings.Secure.ANDROID_ID);\n String versionName=null;\n try {\n versionName = getApplicationContext().getPackageManager()\n .getPackageInfo(getApplicationContext().getPackageName(), 0).versionName;\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n }\n if(!TextUtils.isEmpty(versionName)){\n dtj.setAppVersion(versionName);\n\n }\n dtj.setOsVersion(Build.VERSION.RELEASE);\n dtj.setDeviceModel(getDeviceName());\n Log.d(TAG, \"Model:\"+getDeviceName());\n dtj.setDeviceId(deviceId);\n dtj.setDeviceToken(token);\n dtj.setDeviceType(\"2\");\n DeviceTokenResponseJson dtrj=null;\n int status = 0;\n try {\n connection = HttpConnectionUtil.getPostConnection(Apis.URL_DEVICE_TOKEN_2);\n String requestData = HttpConnectionUtil.gson.toJson(dtj);\n\n PrintWriter out = new PrintWriter(connection.getOutputStream());\n out.print(requestData);\n out.flush();\n status = connection.getResponseCode();\n if (status == HttpConnectionUtil.POST_OK) {\n\n reader = new BufferedReader(new InputStreamReader(\n connection.getInputStream()));\n String line = \"\";\n StringBuilder sb = new StringBuilder();\n while ((line = reader.readLine()) != null) {\n sb.append(line);\n }\n String responseData = sb.toString();\n Log.i(TAG, \"server response : \" + responseData);\n\n dtrj = HttpConnectionUtil.gson.fromJson(responseData,\n new TypeToken<DeviceTokenResponseJson>() {\n }.getType());\n }\n else {\n reader = new BufferedReader(new InputStreamReader(\n connection.getErrorStream()));\n String line = \"\";\n StringBuilder sb = new StringBuilder();\n while ((line = reader.readLine()) != null) {\n sb.append(line);\n }\n Log.e(TAG, \"server response : \" + sb.toString());\n }\n\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n if (dtrj!=null && dtrj.getId()==0) {\n\n sPrefs.saveSentTokenToServer(true);\n\n if(id!=0) {\n sPrefs.saveSentTokenIdToServer(true);\n }\n }else{\n sPrefs.saveSentTokenToServer(false);\n sPrefs.saveSentTokenIdToServer(false);\n }\n return dtrj;\n }",
"static boolean isDuplicated(String mac) {\n for (DeviceDetail detail : deviceDetails) {\n if (detail.macAddress.equals(mac)) {\n return true;\n }\n }\n return false;\n }",
"@Test\n public void SameTokenNameOpenExchangeNotExist() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 4;\n String firstTokenId = \"123\";\n long firstTokenQuant = 100000000L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 200000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetV2Map = accountCapsule.getAssetMapV2();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetV2Map.get(firstTokenId));\n Assert.assertEquals(null, assetV2Map.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail(\"Exchange not exists\");\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"Exchange[4] not exists\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }",
"public Boolean canTokenBeRefreshed(String token, UserDetails userDetails) {\n return isTokenValid(token, userDetails);\n }",
"public void verifyExpiration(RefreshToken token) {\n if (token.getExpiryDate().compareTo(Instant.now()) < 0) {\n throw new TokenRefreshException(token.getToken(), \"Expired token. Please issue a new request\");\n }\n }",
"@Test\n public void SameTokenNameCloseInvalidAddress() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(0);\n InitExchangeBeforeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"abc\";\n long firstTokenQuant = 100000000L;\n String secondTokenId = \"def\";\n long secondTokenQuant = 200000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetMap = accountCapsule.getAssetMap();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetMap.get(firstTokenId));\n Assert.assertEquals(null, assetMap.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_INVALID, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail(\"Invalid address\");\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"Invalid address\", e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }",
"@Test\n void testDifferentHashCodes() {\n assertNotEquals(loginRequest1.hashCode(), loginRequest2.hashCode());\n }",
"void banDevice(Integer deviceId);",
"public static boolean verifyToken(String email, String token){\n Connection connect = null;\n ResultSet set = null;\n String verifyTokenSQL = \"SELECT verification_token FROM users WHERE email = ? and verification_token = ?\";\n\n // Verify Token Try Block:\n try{\n // Set Connection:\n connect = DBConfig.getConnection();\n // Prepare Statement:\n PreparedStatement statement = connect.prepareStatement(verifyTokenSQL);\n // Set Attributes:\n statement.setString(1, email);\n statement.setString(2, token);\n\n // Execute Statement:\n set = statement.executeQuery();\n\n // Check For Rows Affected:\n while (set.next()){\n return true;\n }\n // Check For Rows Affected.\n\n }catch(SQLException e){\n e.printStackTrace();\n System.out.println(\"Failed to Verify / Update Account\");\n }\n // End Of Verify Token Try Block:\n\n return false;\n }",
"@SuppressWarnings(\"resource\")\n @Test\n public void testEquals() {\n try {\n ApiKey apikey1 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127619232L), 58,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"933738f6-d022-45c8-bc68-d7c6722e913b\", -46,\n \"3cac25f8-fd0d-4e6c-b1dd-e24a49542b75\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127625184L));\n ApiKey apikey2 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127619232L), 58,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"933738f6-d022-45c8-bc68-d7c6722e913b\", -46,\n \"3cac25f8-fd0d-4e6c-b1dd-e24a49542b75\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127625184L));\n ApiKey apikey3 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127620542L), 76,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"e31184de-791f-4689-9075-d12706757ba9\", -7,\n \"d34afc91-63f2-42e0-bde5-cfbb131751fd\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620923L));\n assertNotNull(apikey1);\n assertNotNull(apikey2);\n assertNotNull(apikey3);\n assertNotSame(apikey2, apikey1);\n assertNotSame(apikey3, apikey1);\n assertEquals(apikey2, apikey1);\n assertEquals(apikey2, apikey1);\n assertEquals(apikey1, apikey2);\n assertEquals(apikey1, apikey1);\n assertFalse(apikey1.equals(null));\n assertNotEquals(apikey3, apikey1);\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }",
"@Test\n public void authenticateTestSucces() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);\n assertTrue(device.authenticate());\n DatabaseTest.cleanDatabase();\n }",
"@Test\n public void SameTokenNameOpenTnotherTokenQuantLessThanZero() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"123\";\n long quant = 1L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n accountCapsule.addAssetAmountV2(firstTokenId.getBytes(), 1000L, dbManager);\n accountCapsule.addAssetAmountV2(secondTokenId.getBytes(), secondTokenQuant, dbManager);\n accountCapsule.setBalance(10000_000000L);\n dbManager.getAccountStore().put(ownerAddress, accountCapsule);\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, secondTokenId, quant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"withdraw another token quant must greater than zero\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }",
"public boolean testVerify(Synth synth2, String key, Object obj1, Object obj2)\n {\n return false;\n }",
"boolean hasSameAs();"
]
| [
"0.70291156",
"0.68625027",
"0.6360004",
"0.63238055",
"0.62766534",
"0.5842329",
"0.584167",
"0.5777394",
"0.5729144",
"0.568806",
"0.5586255",
"0.5550152",
"0.55454195",
"0.5521967",
"0.5516615",
"0.5463803",
"0.5452913",
"0.5398932",
"0.53976655",
"0.5374771",
"0.5373376",
"0.5363398",
"0.53464437",
"0.53464437",
"0.53184605",
"0.5318335",
"0.5309877",
"0.5306806",
"0.5304298",
"0.53034115",
"0.53022575",
"0.52937704",
"0.5281131",
"0.52763253",
"0.5262119",
"0.5238168",
"0.52250725",
"0.52229255",
"0.5213759",
"0.5213721",
"0.5192716",
"0.51818013",
"0.516179",
"0.514806",
"0.5091728",
"0.5066689",
"0.5064868",
"0.5035217",
"0.5028154",
"0.50103027",
"0.49954686",
"0.49901798",
"0.49864557",
"0.49798036",
"0.49732053",
"0.49717525",
"0.49677834",
"0.4961839",
"0.4956748",
"0.4947913",
"0.4933807",
"0.49257025",
"0.49237713",
"0.49195853",
"0.4914765",
"0.49111128",
"0.4898122",
"0.4889082",
"0.48819214",
"0.48801255",
"0.48767886",
"0.48756346",
"0.4875237",
"0.4873723",
"0.48702574",
"0.48551103",
"0.48541465",
"0.48451912",
"0.48382512",
"0.48327193",
"0.48132813",
"0.48115137",
"0.48111528",
"0.48092213",
"0.4804749",
"0.48040655",
"0.4801879",
"0.48013735",
"0.4800341",
"0.4799533",
"0.4795582",
"0.4794692",
"0.47928712",
"0.47898307",
"0.4789618",
"0.47791985",
"0.47729802",
"0.4758614",
"0.47581017",
"0.47474787"
]
| 0.63815355 | 2 |
Verify that a device is not the same if the deviceID is different. | @Test
public void equalsOtherTest2() {
Device device2 = new Device("other", token);
assertNotEquals(device, device2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void equalsOtherTest() {\n Device device2 = new Device(deviceID, \"other\");\n assertNotEquals(device, device2);\n }",
"@Test\n public void equalsSameTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device, device2);\n }",
"@Override\r\n\tpublic boolean sameIdentityAs(Device other) {\n\t\treturn false;\r\n\t}",
"@Test\n public void newDeviceDuplicateTest() {\n DatabaseTest.setupDevice();\n Device newDevice = newDevice(DatabaseTest.DEVICE_ID);\n\n assertNull(newDevice);\n DatabaseTest.cleanDatabase();\n }",
"@Test\n public void getDeviceIDTest() {\n assertEquals(deviceID, device.getDeviceID());\n }",
"@Test\n public void equalsOtherTest4() {\n assertFalse(device.equals(\"\"));\n }",
"@Test\n public void equalsSelfTest() {\n assertEquals(device, device);\n }",
"private static boolean isValidDeviceId(String deviceId){\n return deviceId != null;\n }",
"public boolean isDuplicate(IDecodedDeviceRequest<?> request) throws SiteWhereException;",
"@Test\n public void hashCodeTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device.hashCode(), device2.hashCode());\n }",
"@Test\n public void equalsOtherTest3() {\n assertFalse(device.equals(null));\n }",
"boolean hasDeviceId();",
"boolean hasDeviceId();",
"private boolean isImeiValid(String deviceId) {\r\n try {\r\n String[] strings = deviceId.split(\"x\");\r\n byte[] bytes = strings[0].getBytes();\r\n\r\n int cks = 0;\r\n for (int i = 0; i < strings[0].length(); i++)\r\n cks += bytes[i];\r\n\r\n String checkId = strings[0] + \"x\" + cks % MAGIC_NUMBER;\r\n\r\n return deviceId.equals(checkId);\r\n } catch (Exception e) {\r\n return false;\r\n }\r\n }",
"@Test\n public void stopDeviceCheck() {\n System.out.println(\"* Device JUnit4Test: stopDeviceCheck()\");\n\n // authenticate the device and then stop it\n authenticateSimulatedDevice();\n mMainServer.removeDevice(mDeviceInstance);\n TestsConfig.delay(150);\n \n // check if the device is corretly removed from the server\n assertFalse(mDeviceInstance.isDeviceActive());\n assertNull(mMainServer.getDevice(mDeviceInstance.getUniqueIdentifier()));\n }",
"@Test\n public void authenticateTestFailure2() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, \"other_token\");\n assertFalse(device.authenticate());\n DatabaseTest.cleanDatabase();\n }",
"@Test\n public void hashCodeTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device.hashCode(), device2.hashCode());\n }",
"@Test(expected = SystemObjectIdException.class)\n public void shouldThrowExceptionIfFailToIdentifyDevice() throws IOException {\n\n expect(configuration.createPDU(PDU.GET)).andReturn(new PDU());\n\n expect(snmpInterface.send(isA(PDU.class), same(target))).andReturn(createErrorResponseEvent());\n replayAll();\n\n try {\n session.identifyDevice();\n assert false : \"Should not reach\";\n } finally {\n verifyAll();\n }\n }",
"public void testGetSimOperator_unavailableDevice() {\n mMockIDevice = EasyMock.createMock(IDevice.class);\n EasyMock.expect(mMockIDevice.getState()).andReturn(DeviceState.UNAUTHORIZED);\n EasyMock.expect(mMockIDevice.getSerialNumber()).andReturn(\"serial\");\n EasyMock.replay(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n assertNull(mTestDevice.getSimOperator());\n EasyMock.verify(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n }",
"@Override\n protected void validateRegisteredDevice(MultifactorDevice device) throws Exception {\n assertThat(device.getBackup(), is(Boolean.TRUE));\n }",
"@Test\n final void testCreateDeviceAlreadyExists() {\n when(deviceDao.findDevice(DeviceFixture.SERIAL_NUMBER)).thenReturn(Optional.of(deviceDTO));\n\n assertThrows(\n ExceptionType.DeviceAlreadyExistsException.class,\n () -> deviceController.createDevice(createDeviceRequest));\n }",
"public void testGetSimState_unavailableDevice() {\n mMockIDevice = EasyMock.createMock(IDevice.class);\n EasyMock.expect(mMockIDevice.getState()).andReturn(DeviceState.UNAUTHORIZED);\n EasyMock.expect(mMockIDevice.getSerialNumber()).andReturn(\"serial\");\n EasyMock.replay(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n assertNull(mTestDevice.getSimState());\n EasyMock.verify(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n }",
"@Test\n public void newDeviceTest() {\n Device newDevice = newDevice(deviceID);\n\n assertEquals(deviceID, newDevice.getDeviceID());\n assertNotNull(newDevice.getToken());\n\n executeManipulationQuery(\"DELETE FROM device WHERE device_id = ?\", deviceID);\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Biometric)) {\n return false;\n }\n Biometric other = (Biometric) object;\n if ((this.deviceId == null && other.deviceId != null) || (this.deviceId != null && !this.deviceId.equals(other.deviceId))) {\n return false;\n }\n return true;\n }",
"@Test\n public void getDeviceTest() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);\n\n assertEquals(device, getDevice(DatabaseTest.DEVICE_ID));\n DatabaseTest.cleanDatabase();\n }",
"@Test\n public void equals_DifferentUserId_Test() {\n Assert.assertFalse(bq1.equals(bq2));\n }",
"public static FlexID testDeviceID() {\n byte[] identity = {\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0\n };\n\n return new FlexID(identity, FlexIDType.DEVICE, new AttrValuePairs(), null);\n }",
"@Test\n final void testDeleteDevice() {\n when(deviceDao.deleteDevice(user, DeviceFixture.SERIAL_NUMBER)).thenReturn(Long.valueOf(1));\n ResponseEntity<String> response = deviceController.deleteDevice(DeviceFixture.SERIAL_NUMBER);\n assertEquals(200, response.getStatusCodeValue());\n assertEquals(\"Device with serial number 1 deleted\", response.getBody());\n }",
"private void syncDisconnectedDeviceId(String deviceId) {\n Map<Object, Object> devicesMap = new HashMap<>((Map<?, ?>) getEcologyDataSync().getData\n (\"devices\"));\n devicesMap.remove(deviceId);\n getEcologyDataSync().setData(\"devices\", devicesMap);\n }",
"@Test\n public void testEqualsReturnsFalseOnDifferentIdVal() throws Exception {\n setRecordFieldValue(otherRecord, \"id\", 42L);\n\n boolean equals = record.equals(otherRecord);\n\n assertThat(equals, is(false));\n }",
"public boolean hasDeviceId() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"@Test\n\tpublic void test() {\n\t\tString r1 = CGroup.createRandomId();\n\t\tassertTrue(r1.matches(\"[0-9]+\"));\n\t\t\n\t\tString r2 = CGroup.createRandomId();\n\t\tassertFalse(r1.equals(r2));\n\t}",
"public boolean hasDeviceId() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean removeDevice(int device_id)\n\t{\n\t\treturn false;\n\t}",
"@Test(expected = SystemObjectIdException.class)\n public void shouldThrowExceptionIfExceptionWhenIdentifyDevice() throws IOException {\n\n expect(configuration.createPDU(PDU.GET)).andReturn(new PDU());\n\n expect(snmpInterface.send(isA(PDU.class), same(target))).andThrow(new IOException());\n replayAll();\n\n try {\n session.identifyDevice();\n assert false : \"Should not reach\";\n } finally {\n verifyAll();\n }\n }",
"@Test\n public void testRegisterBackupDeviceNotPossibleIfNoPrimaryDevicePresent() throws Exception {\n clearAllMultifactorDevices();\n\n //This should fail, because no primary device is present for the user\n thrown.expect(AssertionError.class);\n thrown.expectMessage(containsString(\"Primary authentication devices must be set up before backup devices\"));\n doStartRegistration();\n }",
"static boolean isDuplicated(String mac) {\n for (DeviceDetail detail : deviceDetails) {\n if (detail.macAddress.equals(mac)) {\n return true;\n }\n }\n return false;\n }",
"@Test\n final void testDeleteDeviceNotExisting() {\n assertThrows(\n ExceptionType.DeviceNotFoundException.class,\n () -> deviceController.deleteDevice(\"Not Available device\"));\n }",
"@Test\n\tpublic void testDifferentID() {\n\t\tMainDish dessertTest = new MainDish(\"quiche\");\n\t\tMainDish dessertTest2 = new MainDish(\"quiche\");\n\t\tassertTrue(dessertTest.getId()!=dessertTest2.getId());\n\t}",
"@Test\n public void testIncorrectId(){\n UserRegisterKYC idTooLong = new UserRegisterKYC(\"hello\",\"S12345678B\",\"26/02/1995\",\"738583\");\n int requestResponse = idTooLong.sendRegisterRequest();\n assertEquals(400, requestResponse);\n\n UserRegisterKYC nonAlphanumId = new UserRegisterKYC(\"hello\",\"S12345!8B\",\"26/02/1995\",\"738583\");\n requestResponse = nonAlphanumId.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n UserRegisterKYC invalidPrefixId = new UserRegisterKYC(\"hello\",\"A\"+validId3.substring(1),\"26/02/1995\",\"738583\");\n requestResponse = invalidPrefixId.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n UserRegisterKYC alphaInMiddleId = new UserRegisterKYC(\"hello\",\"S1234A68B\",\"26/02/1995\",\"738583\");\n requestResponse = alphaInMiddleId.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n UserRegisterKYC idTooShort = new UserRegisterKYC(\"hello\",\"S123678B\",\"26/02/1995\",\"738583\");\n requestResponse = idTooShort.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n UserRegisterKYC invalidChecksum = new UserRegisterKYC(\"hello\",\"S1234578B\",\"26/02/1995\",\"738583\");\n requestResponse = invalidChecksum.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n }",
"void banDevice(Integer deviceId);",
"@Override\n\tpublic Device validateDeviceAndSubscriber(String macAddress, String subscriberId) {\n\n\t\tDevice deviceEntity = deviceRepository.findByDeviceId(macAddress);\n\n\t\t// Device validation\n\t\tif (DeviceManagerUtil.checkNullObject(deviceEntity)) {\n\t\t\tthrow new DeviceManagerException(ErrorCode.NO_DEVICE_FOUND,\n\t\t\t\t\t\"Device with MACAddress=\" + macAddress + \" doesn't exists\");\n\t\t}\n\n\t\t// Subscriber Validation\n/*\t\tif (DeviceManagerUtil.checkNullObject(deviceEntity.getAssignedToSubscriber())\n\t\t\t\t|| !subscriberId.equals(deviceEntity.getAssignedToSubscriber().getSubscriberId())) {\n\t\t\tthrow new DeviceManagerException(ErrorCode.USER_NOT_FOUND,\n\t\t\t\t\t\"Device with MACAddress=\" + macAddress + \" is not assigned to SubscriberId=\" + subscriberId);\n\t\t}*/\n\t\treturn deviceEntity;\n\t}",
"@Override\r\n public boolean equals(Object o) {\r\n if(this == o) return true;\r\n if( !(o instanceof MobileDevice)) return false;\r\n \r\n MobileDevice md = (MobileDevice)o;\r\n \r\n if(this.deviceName != md.deviceName) return false;\r\n if(this.valueTag != md.valueTag) return false;\r\n if(this.lab != md.lab) return false;\r\n if(this.rentSettings != md.rentSettings) return false;\r\n \r\n return true;\r\n }",
"public static String getOldUdid(Context context) {\n TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);\n String udid = telephonyManager.getDeviceId();\n\n if (isValidImei(udid)) {\n return udid;\n }\n\n udid = Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);\n if (!TextUtils.isEmpty(udid) && !INVALID_ANDROIDID.equals(udid.toLowerCase(Locale.getDefault()))) {\n return udid;\n }\n\n String macAddress = getWifiMacAddress(context);\n if (!TextUtils.isEmpty(macAddress)) {\n udid = toMD5(macAddress + Build.MODEL + Build.MANUFACTURER + Build.ID + Build.DEVICE);\n return udid;\n }\n String name = String.valueOf(System.currentTimeMillis());\n udid = UUID.nameUUIDFromBytes(name.getBytes()).toString();\n \n return udid;\n }",
"private boolean checkDuplicate(String macAddress) {\n\t\tfor (int i=0; i<bluetoothDevices.size(); i++) {\n\t\t\tif (macAddress.equals(bluetoothDevices.get(i).macAddress)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@Test\n public void authenticateTestFailure() {\n assertFalse(device.authenticate());\n }",
"@Test\n\tpublic void test() {\n\t\tlong firstID = UIDGen.getInstance().getNextId();\n\t\tint n = 100;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tUIDGen.getInstance().getNextId();\n\t\t}\n\t\tlong currentID = UIDGen.getInstance().getNextId();\n\t\tassertEquals(currentID, firstID + n + 1);\n\n\t\t// expect a IDInvalidException exception for using and\n\t\t// external id that has already been used\n\t\tlong exteranlId = currentID;\n\t\tThrowable caught = null;\n\t\ttry {\n\t\t\tUIDGen.getInstance().considerExternalId(exteranlId);\n\t\t} catch (Throwable t) {\n\t\t\tcaught = t;\n\t\t}\n\t\tassertNotNull(caught);\n\t\tassertSame(IDInvalidException.class, caught.getClass());\n\n\t\t// push an external id that is not used and expect no exception\n\t\texteranlId = currentID + 2;\n\t\ttry {\n\t\t\tUIDGen.getInstance().considerExternalId(exteranlId);\n\t\t} catch (Throwable t) {\n\t\t\tfail();\n\t\t}\n\n\t\t// expect an exception as we put the same id again\n\t\texteranlId = currentID;\n\t\tcaught = null;\n\t\ttry {\n\t\t\tUIDGen.getInstance().considerExternalId(exteranlId);\n\t\t} catch (Throwable t) {\n\t\t\tcaught = t;\n\t\t}\n\t\tassertNotNull(caught);\n\t\tassertSame(IDInvalidException.class, caught.getClass());\n\n\t\t// must skip currentID + 2 as it was defined as an external id\n\t\tassertEquals(UIDGen.getInstance().getNextId(), currentID + 1);\n\t\tassertEquals(UIDGen.getInstance().getNextId(), currentID + 3);\n\t}",
"UUID getDeviceId();",
"boolean hasConflictingUuid(UUID uuid);",
"public synchronized boolean isValidDeviceId(String deviceId) {\n\t\treturn deviceId != null && websocketRemoteAddressByDeviceId.containsKey(deviceId);\n\t}",
"@Override\n public boolean equals(Object obj) {\n if(obj instanceof Devices)\n {\n Devices temp = (Devices) obj;\n if(this.device==temp.getDevice() && this.MAC ==temp.getMAC())\n return true;\n }\n return false;\n\n }",
"@Test\n public void equals2() throws Exception {\n SmartPlayer x = new SmartPlayer(0, 1);\n SmartPlayer y = new SmartPlayer(0, 2);\n assertFalse(x.equals(y));\n }",
"@Override\n\tpublic boolean deleteDevice(int deviceId) {\n\t\t\n\t\treturn dao.deleteDevice(deviceId);\n\t}",
"@Transactional\n @Test(expected = GenericRequestException.class)\n public void deleteComputerBuildWithIncorrectIdentifier() {\n ComputerBuild computerBuild = createComputerBuild(SAMPLE_GAMING_COMPUTER_BUILD_NAME, SAMPLE_GAMING_COMPUTER_BUILD_DESCRIPTION);\n LoginRequest loginRequest = new LoginRequest(ANOTHER_USER_NAME_TO_CREATE_NEW_USER, USER_PASSWORD);\n\n ComputerBuild newComputerBuild = loginAndCreateBuild(computerBuild, loginRequest,\n SAMPLE_GAMING_COMPUTER_BUILD_NAME, SAMPLE_GAMING_COMPUTER_BUILD_DESCRIPTION);\n\n computerBuildService.deleteComputerBuild(newComputerBuild.getBuildIdentifier() + INVALID_IDENTIFIER_SUFFIX);\n }",
"private boolean validDevice(AcceleratorNode nodeDev) {\n// for (Class<?> typeValidDev : this.arrValidDevTypes) {\n// if (nodeDev.getClass() == typeValidDev)\n// return true;\n// }\n// \n// return false;\n \n return true;\n }",
"@Override\n\tprotected boolean isExist(AbnormalDevice record) {\n\t\treturn false;\n\t}",
"@Test\n public void fsckMetricsInconsistentFwdNoDupes() throws Exception {\n storage.addColumn(UID_TABLE, new byte[] {0, 0, 2}, NAME_FAMILY, \n METRICS, \"wtf\".getBytes(MockBase.ASCII()));\n storage.addColumn(UID_TABLE, \"wtf\".getBytes(MockBase.ASCII()), ID_FAMILY, \n METRICS, new byte[] {0, 0, 3});\n storage.addColumn(UID_TABLE, new byte[] {0, 0, 3}, NAME_FAMILY, \n METRICS, \"wtf\".getBytes(MockBase.ASCII()));\n storage.addColumn(UID_TABLE, new byte[] { 0 }, ID_FAMILY, METRICS, Bytes.fromLong(3L));\n int errors = (Integer)fsck.invoke(null, client, \n UID_TABLE, false, false);\n assertEquals(3, errors);\n }",
"public boolean updateDevice(int origionalDevice_id, Device newDevice) \n\t{\n\t\treturn false;\n\t}",
"public void setDeviceId(String DeviceId) {\n this.DeviceId = DeviceId;\n }",
"private void correctSerialNumber() {\n\t\tfor (int i = 0; i < wsArr.length; i++) {\n\t\t\tfor (int j = i + 1; j < wsArr.length; j++) {\n\t\t\t\tif (wsArr[j].getSerialNumber() == wsArr[i].getSerialNumber()) {\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tSystem.out.println(\"Duplicate serial number \" + wsArr[j].getSerialNumber() + \" detected in record # \" + (j + 1) + \".\");\n\t\t\t\t\t\tlong serialNumber = this.getNewSerialNumber();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tthis.verifyDuplication(j, serialNumber);\n\t\t\t\t\t\t\twsArr[j].setSerialNumber(serialNumber);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} catch (DuplicateSerialNumberException e) {\n\t\t\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"void checkStationId(int lineCount, String testStationId) {\n if (!stationId.equals(testStationId)) {\n outputError(lineCount + \" - Fatal - \" +\n \"Station Id does not match previous station record \" +\n stationId + \": \" + testStationId);\n } // if (!stationId.equals(station.getStationId(\"\")))\n }",
"@Test\n public void testEquals_differentParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI + 1,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are different\n assertThat(cellIdentityNr).isNotEqualTo(anotherCellIdentityNr);\n }",
"private void ensureCallerIdentityMatchesIfNotSystem(String packageName, int pid, int uid,\n CallerIdentity caller) {\n int callingUid = caller.getUid();\n int callingPid = mInjector.binderGetCallingPid();\n if (UserHandle.getAppId(callingUid) >= Process.FIRST_APPLICATION_UID\n && (callingUid != uid || callingPid != pid)) {\n String message = String.format(\n \"Calling uid %d, pid %d cannot check device identifier access for package %s \"\n + \"(uid=%d, pid=%d)\", callingUid, callingPid, packageName, uid, pid);\n Slogf.w(LOG_TAG, message);\n throw new SecurityException(message);\n }\n }",
"@Test\n public void testKeyEquivalence() throws Exception {\n ScanResultMatchInfo matchInfo1 = ScanResultMatchInfo.fromWifiConfiguration(mConfig1);\n ScanResultMatchInfo matchInfo1Prime = ScanResultMatchInfo.fromWifiConfiguration(mConfig1);\n ScanResultMatchInfo matchInfo2 = ScanResultMatchInfo.fromWifiConfiguration(mConfig2);\n assertFalse(matchInfo1 == matchInfo1Prime); // Checking assumption\n MacAddress mac1 = MacAddressUtils.createRandomUnicastAddress();\n MacAddress mac2 = MacAddressUtils.createRandomUnicastAddress();\n assertNotEquals(mac1, mac2); // really tiny probability of failing here\n\n WifiCandidates.Key key1 = new WifiCandidates.Key(matchInfo1, mac1, 1);\n\n assertFalse(key1.equals(null));\n assertFalse(key1.equals((Integer) 0));\n // Same inputs should give equal results\n assertEquals(key1, new WifiCandidates.Key(matchInfo1, mac1, 1));\n // Equal inputs should give equal results\n assertEquals(key1, new WifiCandidates.Key(matchInfo1Prime, mac1, 1));\n // Hash codes of equal things should be equal\n assertEquals(key1.hashCode(), key1.hashCode());\n assertEquals(key1.hashCode(), new WifiCandidates.Key(matchInfo1, mac1, 1).hashCode());\n assertEquals(key1.hashCode(), new WifiCandidates.Key(matchInfo1Prime, mac1, 1).hashCode());\n\n // Unequal inputs should give unequal results\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo2, mac1, 1)));\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo1, mac2, 1)));\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo1, mac1, 2)));\n }",
"private String mapDeviceToCloudDeviceId(String device) throws Exception {\n if (device.equalsIgnoreCase(\"/dev/sdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"/dev/sdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"/dev/sde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"/dev/sdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"/dev/sdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"/dev/sdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"/dev/sdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"/dev/sdj\"))\n return \"9\";\n\n else if (device.equalsIgnoreCase(\"/dev/xvdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"/dev/xvdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"/dev/xvde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"/dev/xvdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"/dev/xvdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"/dev/xvdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"/dev/xvdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"/dev/xvdj\"))\n return \"9\";\n\n else if (device.equalsIgnoreCase(\"xvdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"xvdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"xvde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"xvdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"xvdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"xvdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"xvdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"xvdj\"))\n return \"9\";\n\n else\n throw new Exception(\"Device is not supported\");\n }",
"@Override\r\n\tpublic void testInvalidId() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.testInvalidId();\r\n\t\t}\r\n\t}",
"final protected boolean verifySecretID(Object ID) {\n\t\t\tif(this.SecretID == null) return true;\n\t\t\treturn UObject.equal(this .SecretID, ID); \n\t\t}",
"@Test\n public void testUniqueRandomRuids() {\n\n ServiceWriteRequestBuilder<Void> builder = ServiceWriteRequestBuilder.newPostRequest(ServiceName.CONTACT, \"/contact\", null, Void.class);\n\n String ruid1 = builder.build().getRuid();\n String ruid2 = builder.build().getRuid();\n\n assertThat(ruid1, is(notNullValue()));\n assertThat(ruid2, is(notNullValue()));\n assertThat(ruid1, is(not(ruid2)));\n\n\n }",
"private String getDeviceId() {\n String deviceId = telephonyManager.getDeviceId(); \n \n \n // \"generic\" means the emulator.\n if (deviceId == null || Build.DEVICE.equals(\"generic\")) {\n \t\n // This ID changes on OS reinstall/factory reset.\n deviceId = Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);\n }\n \n return deviceId;\n }",
"@Test\n public void testIDPChange() throws Exception {\n UserMultiID umk = createUMK();\n UserMultiID eppnKey = new UserMultiID(umk.getEppn());\n UserMultiID eptidKey = new UserMultiID(umk.getEptid());\n UserMultiID openIdKey = new UserMultiID(umk.getOpenID());\n UserMultiID openIdConnectKey = new UserMultiID(umk.getOpenIDConnect());\n UserMultiID ruKey = new UserMultiID(umk.getRemoteUserName());\n\n String badIdp = \"fake:idp\";\n // now we save a user with the right id, then try to get it with a different idp.\n checkGetUser(ruKey, badIdp);\n checkGetUser(eppnKey, badIdp);\n checkGetUser(eptidKey, badIdp);\n checkGetUser(openIdKey, badIdp);\n checkGetUser(openIdConnectKey, badIdp);\n }",
"java.lang.String getDeviceId();",
"final protected boolean verifySecretID(Object ID) {\n\t\tif(this.SecretID == null) return true;\n\t\treturn UObject.equal(this .SecretID, ID); \n\t}",
"@Test\n public void testCantRegisterMismatchPassword() {\n enterValuesAndClick(\"name\", \"[email protected]\", \"123456\", \"123478\");\n checkErrors(nameNoError, emailNoError, pwdsDoNotMatchError, pwdsDoNotMatchError);\n }",
"private boolean m21863g() {\n TelephonyManager telephonyManager = (TelephonyManager) this.f16409k.getSystemService(\"phone\");\n if (telephonyManager != null) {\n String deviceId = telephonyManager.getDeviceId();\n for (String equalsIgnoreCase : f16398b) {\n if (equalsIgnoreCase.equalsIgnoreCase(deviceId)) {\n return true;\n }\n }\n }\n return false;\n }",
"@Test\n public void testRecordsWithDifferentIDsProduceDifferentHashCodes() throws Exception {\n setRecordFieldValue(otherRecord, \"id\", 42L);\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(false));\n }",
"@Test\n\tpublic void hashCodeDifferentId() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey1.setId(2);\n\t\tAssert.assertNotEquals(key1.hashCode(), key2.hashCode());\n\t}",
"@Test\n public void testCheckExternalIdUniquenessForUpdate() {\n\n try {\n user.setUserId(\"456456\");\n user.getExternalIds().get(0).put(JsonKey.OPERATION, JsonKey.DELETE);\n Util.checkExternalIdUniqueness(user, JsonKey.UPDATE);\n } catch (Exception ex) {\n System.out.println(\"2\" + ex.getMessage());\n assertTrue(\n ex.getMessage()\n .equalsIgnoreCase(\n \"External ID (id: 123209-453445934-23128u3423-dsafsa32c43-few43-wesc49cjkf, idType: AAADHAR, provider: AP) not found for given user.\"));\n }\n }",
"public void checkDevices() throws TNotFoundEx{\n\t\tString command = \"adb devices -l\";\n\t\tCommando commando = new Commando();\n\t\tString op = commando.executeCommand(command);\n\t\t\n\t\tOtherUtil oU = new OtherUtil();\n\t\tArrayList<String> devices = oU.getRegexFromString(op, \"(model:.*?device:.+$?)\");\n\t\tint eligDevices = devices.size();\n\t\t\n\t\tif (eligDevices>1)\n\t\t\tthrow new TNotFoundEx(\"ERROR: 2 or more Android devices are connected to the host, please connect only one Android device.\");\n\t\tif (eligDevices == 0)\n\t\t\tthrow new TNotFoundEx(\"ERROR: No Android devices detected by the host. Execute adb devices -l to check the connected devices\");\n\t\t\t\n\t}",
"@Test\r\n\tpublic void testSetGetIdInvalid() {\r\n\t\tDoctor doctor = new Doctor();\r\n\t\tdoctor.setId(idInvalid);\r\n\t\tassertEquals(idInvalid, doctor.getId());\r\n\r\n\t}",
"boolean hasDevice();",
"private boolean checkIdentity(Order otherOrder) {\n\t\treturn getId() != otherOrder.getId();\n\t}",
"public static String getUniqueDeviceID(Context context) {\n\t\tString identifier = null;\n\t\tTelephonyManager tm = (TelephonyManager) context\n\t\t\t\t.getSystemService(Context.TELEPHONY_SERVICE);\n\t\tif (tm != null)\n\t\t\tidentifier = tm.getDeviceId();\n\t\tif (identifier == null || identifier.length() == 0)\n\t\t\tidentifier = Secure.getString(context.getContentResolver(),\n\t\t\t\t\tSecure.ANDROID_ID);\n\t\t// identifier = identifier + new Random().nextInt(1000);\n\t\treturn identifier;\n\t}",
"@Test\n public void deleteDeviceTest() throws ApiException {\n String deviceId = null;\n // DeviceEnvelope response = api.deleteDevice(deviceId);\n\n // TODO: test validations\n }",
"public int doesDeviceExist(String device){\n DBSQLiteHelper DBhelper = new DBSQLiteHelper(getApplicationContext());\n SQLiteDatabase db = DBhelper.getReadableDatabase();\n\n String[] select = {\n DBContract.Devices.COLUMN_DEVICE,\n DBContract.Devices.COLUMN_TYPE\n };\n\n String where = DBContract.Devices.COLUMN_DEVICE + \" = ?\";\n\n String[] whereValues = {device};\n\n Cursor cursor = db.query(\n DBContract.Devices.TABLE_NAME, // The table to query\n select, // The columns to return\n where, // The columns for the WHERE clause\n whereValues, // The values for the WHERE clause\n null, // don't group the rows\n null, // don't filter by row groups\n null // don't sort\n );\n\n cursor.moveToFirst();\n if(cursor.getCount() == 0){ //No such device exists\n return -1;\n }\n else if(cursor.getInt(1) == 0){ //Device registered to a runner (GOOD)\n return 0;\n }\n else //Device registered to a contact (BAD)\n return 1;\n }",
"@Test\n public void smartIdInvalidFormat() throws Exception {\n String errorMessage = authenticateWithSmartIdInvalidInputPollError(\"12akl2\", 2000);\n assertEquals(\"Isikukood on ebakorrektses formaadis.Intsidendi number:\", errorMessage);\n }",
"@Test(timeout = 4000)\n public void test192() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n errorPage0.del();\n Component component0 = errorPage0.id(\"O=V>!a<w512kq\");\n assertFalse(component0._isGeneratedId());\n }",
"@SuppressWarnings(\"HardwareIds\")\n public String getUniqueDeviceId() {\n return Settings.Secure.getString(mContext.getContentResolver(), Settings.Secure.ANDROID_ID);\n }",
"@Override\n public int getDeviceId() {\n return 0;\n }",
"@Test\n void testDifferentHashCodes() {\n assertNotEquals(loginRequest1.hashCode(), loginRequest2.hashCode());\n }",
"public void setDeviceid(String deviceid) {\n this.deviceid = deviceid == null ? null : deviceid.trim();\n }",
"public SyncDevice(String id) {\n this.id = id;\n this.displayName = id;\n }",
"public interface IDeviceEventDeduplicator extends ITenantLifecycleComponent {\n\n /**\n * Detects whether the given device event is a duplicate of another event in\n * the system.\n * \n * @param request\n * @return\n * @throws SiteWhereException\n */\n public boolean isDuplicate(IDecodedDeviceRequest<?> request) throws SiteWhereException;\n}",
"public void testGetMacAddress_failure() throws Exception {\n IDevice device = new StubDevice(MOCK_DEVICE_SERIAL) {\n @Override\n public void executeShellCommand(String command, IShellOutputReceiver receiver)\n throws TimeoutException, AdbCommandRejectedException,\n ShellCommandUnresponsiveException, IOException {\n throw new IOException();\n }\n };\n mMockIDevice.executeShellCommand(EasyMock.anyObject(), EasyMock.anyObject());\n EasyMock.expectLastCall().andDelegateTo(device).anyTimes();\n EasyMock.replay(mMockIDevice);\n assertNull(mTestDevice.getMacAddress());\n EasyMock.verify(mMockIDevice);\n }",
"private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof RegistrationItems)) {\n return false;\n }\n RegistrationItems that = (RegistrationItems) other;\n Object myRegItemUid = this.getRegItemUid();\n Object yourRegItemUid = that.getRegItemUid();\n if (myRegItemUid==null ? yourRegItemUid!=null : !myRegItemUid.equals(yourRegItemUid)) {\n return false;\n }\n return true;\n }",
"@Test void testGetId() {\r\n\t\tassertEquals(email1.getId(),email4.getId());\r\n\t\tassertNotEquals(email1.getId(),email3.getId());\r\n\t}",
"@Test\n public void testCheckExternalIdUniquenessForUpdate2() {\n\n try {\n user.setUserId(\"456456\");\n user.getExternalIds().get(0).put(JsonKey.OPERATION, JsonKey.UPDATE);\n Util.checkExternalIdUniqueness(user, JsonKey.UPDATE);\n } catch (Exception ex) {\n System.out.println(\"3\" + ex.getMessage());\n assertTrue(\n ex.getMessage()\n .equalsIgnoreCase(\n \"External ID (id: 123209-453445934-23128u3423-dsafsa32c43-few43-wesc49cjkf, idType: AAADHAR, provider: AP) not found for given user.\"));\n }\n }",
"public boolean isDeviceAlreadyConnected(IWifiP2pProxy.IFastConnectInfo info) {\n\t\tLog.d(TAG, \"mConnectedDevice = \" + mConnectedDevice.getDeviceAddress());\n\t\tLog.d(TAG, \"info = \" + info.getDeviceAddress());\n\t\tif (mConnectedDevice.getDeviceAddress().equalsIgnoreCase(info.getDeviceAddress())) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"Integer getDeviceId();",
"@Test\n\tpublic void testInvalidBarcodeTransaction() {\n\n\t\tString customerCpr = \"111111-0000\";\n\t\tString merchantCpr = \"000000-1111\";\n\t\tString uuid = \"123412345\";\n\t\tdouble amount = 100;\n\t\t\n\t\tCustomer customer = new Customer(customerCpr,\"customer\",\"bankid\");\n\t\tCustomer merchant = new Customer(merchantCpr,\"merchant\",\"bankid\");\n\t\tdatabase.addCustomer(merchant); //Merchant not in database\n\t\t//database.addBarcode(customerCpr, uuid);\n\t\t\n\t\tTransactionRequest transRequest = new TransactionRequest(uuid,merchantCpr,amount,\"comment\");\n\t\tTransactionHandler transHandle = new TransactionHandler(transRequest);\n\t\t\n\t\tString verifyParticipants = transHandle.verifyTransactionParticipants();\n\t\tdatabase.deleteCustomer(customerCpr);\n\t\tdatabase.deleteCustomer(merchantCpr);\n\t\t\n\t\tassertEquals(\"This barcode does not exist\",verifyParticipants);\n\t}",
"protected int notifyDisconnected(String deviceID, ReadWriteThread deadThread) {\n // If the device ID is in the list of connected devices\n // then search for the ReadWriteThread associated with it\n // and set it's pointer to null while it finishes execution\n Log.d(TAG, \"removing device: \" + deviceID + \" from devices\");\n if (connectedDevices.remove(connectedDevices.indexOf(deviceID)) != null) {\n if( rwThreads.remove(deadThread) ){\n Log.d(TAG, \"Device removed\");\n }\n else{\n Log.d(TAG, \"Device not removed from rwThreads\");\n }\n } else {\n Log.d(TAG, \"Device not removed from connectedDevices\");\n }\n return Constants.SUCCESS;\n }"
]
| [
"0.7070641",
"0.6836002",
"0.663642",
"0.6375318",
"0.61506456",
"0.60372275",
"0.6016397",
"0.60041153",
"0.5998897",
"0.59645456",
"0.5943098",
"0.5940464",
"0.5940464",
"0.59145546",
"0.5876906",
"0.5762232",
"0.5735304",
"0.5700056",
"0.569927",
"0.56408656",
"0.5585567",
"0.55113137",
"0.54954374",
"0.5417146",
"0.5400789",
"0.536452",
"0.53448826",
"0.534172",
"0.5324486",
"0.53244305",
"0.5305978",
"0.5304404",
"0.529162",
"0.5288725",
"0.52874494",
"0.52834874",
"0.52570707",
"0.52498865",
"0.5238279",
"0.51960033",
"0.518769",
"0.51762813",
"0.51724935",
"0.5158994",
"0.51400465",
"0.5124193",
"0.51156014",
"0.50915706",
"0.50912493",
"0.50853425",
"0.5084594",
"0.5082793",
"0.50796163",
"0.50746113",
"0.506428",
"0.5058259",
"0.49933392",
"0.49863887",
"0.4986302",
"0.4974373",
"0.49728894",
"0.49608597",
"0.49607182",
"0.49602684",
"0.49536467",
"0.49513993",
"0.4945019",
"0.49376842",
"0.4932242",
"0.49260175",
"0.49147636",
"0.49135143",
"0.49077156",
"0.48944253",
"0.48887327",
"0.48851457",
"0.4865775",
"0.4862946",
"0.48605454",
"0.48554865",
"0.4850864",
"0.48461208",
"0.48425868",
"0.48411223",
"0.483406",
"0.4820758",
"0.4813815",
"0.48074308",
"0.47991553",
"0.479621",
"0.47793025",
"0.4776103",
"0.4769742",
"0.47696263",
"0.47657758",
"0.4763087",
"0.4759357",
"0.4750938",
"0.4740515",
"0.47347233"
]
| 0.6600555 | 3 |
Verify that a device does not equal null. | @Test
public void equalsOtherTest3() {
assertFalse(device.equals(null));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void getDeviceNullTest() {\n assertNull(getDevice(\"Non existing device\"));\n }",
"private static boolean isValidDeviceId(String deviceId){\n return deviceId != null;\n }",
"@Test\n public void equalsOtherTest4() {\n assertFalse(device.equals(\"\"));\n }",
"public void testGetSimOperator_unavailableDevice() {\n mMockIDevice = EasyMock.createMock(IDevice.class);\n EasyMock.expect(mMockIDevice.getState()).andReturn(DeviceState.UNAUTHORIZED);\n EasyMock.expect(mMockIDevice.getSerialNumber()).andReturn(\"serial\");\n EasyMock.replay(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n assertNull(mTestDevice.getSimOperator());\n EasyMock.verify(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n }",
"@Test\n public void equalsSelfTest() {\n assertEquals(device, device);\n }",
"@Test\n public void equalsOtherTest() {\n Device device2 = new Device(deviceID, \"other\");\n assertNotEquals(device, device2);\n }",
"@Test\n public void testEqualsReturnsFalseOnNullArg() {\n boolean equals = record.equals(null);\n\n assertThat(equals, is(false));\n }",
"boolean hasDeviceId();",
"boolean hasDeviceId();",
"private static boolean verifyNullObject(LogManager pLogger, UnmodifiableSMG pSmg) {\n SMGValue null_value = null;\n\n // Find a null value in values\n for (SMGValue value : pSmg.getValues()) {\n if (pSmg.getObjectPointedBy(value) == SMGNullObject.INSTANCE) {\n null_value = value;\n break;\n }\n }\n\n // Verify that one value pointing to NULL object is present in values\n if (null_value == null) {\n pLogger.log(Level.SEVERE, \"SMG inconsistent: no value pointing to null object\");\n return false;\n }\n\n // Verify that NULL value returned by getNullValue() points to NULL object\n if (pSmg.getObjectPointedBy(SMGZeroValue.INSTANCE) != SMGNullObject.INSTANCE) {\n pLogger.log(Level.SEVERE, \"SMG inconsistent: null value not pointing to null object\");\n return false;\n }\n\n // Verify that the value found in values is the one returned by getNullValue()\n if (SMGZeroValue.INSTANCE != null_value) {\n pLogger.log(\n Level.SEVERE,\n \"SMG inconsistent: null value in values set not returned by getNullValue()\");\n return false;\n }\n\n // Verify that NULL object has no value\n SMGEdgeHasValueFilterByObject filter =\n SMGEdgeHasValueFilter.objectFilter(SMGNullObject.INSTANCE);\n\n if (!pSmg.getHVEdges(filter).isEmpty()) {\n pLogger.log(Level.SEVERE, \"SMG inconsistent: null object has some value\");\n return false;\n }\n\n // Verify that the NULL object is invalid\n if (pSmg.isObjectValid(SMGNullObject.INSTANCE)) {\n pLogger.log(Level.SEVERE, \"SMG inconsistent: null object is not invalid\");\n return false;\n }\n\n // Verify that the size of the NULL object is zero\n if (SMGNullObject.INSTANCE.getSize() != 0) {\n pLogger.log(Level.SEVERE, \"SMG inconsistent: null object does not have zero size\");\n return false;\n }\n\n return true;\n }",
"private boolean validDevice(AcceleratorNode nodeDev) {\n// for (Class<?> typeValidDev : this.arrValidDevTypes) {\n// if (nodeDev.getClass() == typeValidDev)\n// return true;\n// }\n// \n// return false;\n \n return true;\n }",
"@Test\r\n public void testEqualsNull() {\r\n SnakeSquare instance = new SnakeSquare(33, 21);\r\n try {\r\n assertEquals(false, instance.equals(null));\r\n } catch (NullPointerException e) { \r\n fail();\r\n }\r\n }",
"@Test\n final void testRetrieveDeviceEmpty() {\n assertThrows(\n ExceptionType.DeviceNotFoundException.class,\n () -> deviceController.retrieveDevice(\"NotAvailable\"));\n }",
"boolean checkNull();",
"public boolean isSetDeviceName() {\n return this.deviceName != null;\n }",
"@Test\n public void equalsSameTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device, device2);\n }",
"boolean hasDevice();",
"public NullDeviceProvider() {\n super(new ProviderId(\"null\", \"org.onosproject.provider.nil\"));\n }",
"@Test\n\tvoid testCheckNulls1() {\n\t\tassertTrue(DataChecker.checkNulls(null));\n\t}",
"@Test\n public void testSpecializationIsNull() {\n boolean expected = false;\n boolean actual = hospital.canAllocateDoctorToRoom(\n null, SurgeryRoomType.small);\n assertEquals(expected, actual);\n }",
"public void testGetSimState_unavailableDevice() {\n mMockIDevice = EasyMock.createMock(IDevice.class);\n EasyMock.expect(mMockIDevice.getState()).andReturn(DeviceState.UNAUTHORIZED);\n EasyMock.expect(mMockIDevice.getSerialNumber()).andReturn(\"serial\");\n EasyMock.replay(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n assertNull(mTestDevice.getSimState());\n EasyMock.verify(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n }",
"@Test\n\tvoid testCheckNull2() {\n\t\tassertTrue(DataChecker.checkNull(null));\n\t}",
"public TestCase isNull( Object obj );",
"@Test\n\tvoid testCheckNull1() {\n\t\tassertFalse(DataChecker.checkNull(new Integer(42)));\n\t}",
"@Test\n public void equalsOtherTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device, device2);\n }",
"public boolean isSetDeviceNo() {\n return this.DeviceNo != null;\n }",
"@Test\n public void equalsFalseNull() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n assertFalse(player1.equals(null));\n }",
"@Test\n public void empty_diagnostic_info_should_not_be_null_when_read_from_db() {\n //given that an app has an \"empty\" diagnostic is saved to database\n String uuid = UUID.randomUUID().toString();\n ApplicationInfo info = ApplicationInfo.builder().uuid(uuid).build();\n assertThat(info.getDiagnosticInfo(), is(notNullValue()));\n applicationRepository.save(info);\n\n //when we retrieve it from db\n ApplicationInfo retrievedInfo = applicationRepository.findOne(uuid);\n\n //then the empty diagnosticInfo is not null\n assertThat(retrievedInfo.getDiagnosticInfo(), is(notNullValue()));\n }",
"public boolean hasDeviceId() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public void testCheckNull() {\n Util.checkNull(\"\", \"test\");\n }",
"public boolean hasDeviceId() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public final void testNullObjectEquals() {\n assertFalse(testTransaction1.equals(null)); // needed for test\n // pmd doesn't like either way\n }",
"public void testAssertPropertyReflectionEquals_actualObjectNull() {\r\n try {\r\n assertPropertyReflectionEquals(\"aProperty\", \"aValue\", null);\r\n fail(\"Expected AssertionFailedError\");\r\n } catch (AssertionFailedError a) {\r\n // expected\r\n }\r\n }",
"@Test\n\tpublic void testReadyNoDevices() {\n\t\tModel contact = addContactSensor(true, false);\n\t\tstageDisarmed(addressesOf(contact));\n\t\tremoveModel(contact);\n\t\t\n\t\talarm.bind(context);\n\t\tassertInactive();\n\t}",
"@Test\n\tvoid testCheckNull3() {\n\t\tassertTrue(DataChecker.checkNull((Object)null));\n\t}",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Biometric)) {\n return false;\n }\n Biometric other = (Biometric) object;\n if ((this.deviceId == null && other.deviceId != null) || (this.deviceId != null && !this.deviceId.equals(other.deviceId))) {\n return false;\n }\n return true;\n }",
"@Test\n\tvoid testCheckNulls4() {\n\t\tObject[] o = {2,5f,\"Test\",Duration.ZERO,new Station(0,0,\"Test\")};\n\t\tassertFalse(DataChecker.checkNulls(o));\n\t}",
"@Test(expected = IllegalArgumentException.class)\r\n public void testCreationFromNullOrigin()\r\n {\r\n final Circle c = new Circle(null, 0);\r\n c.equals(null);\r\n }",
"public boolean isNullRecord () {\n if ((latitude == FLOATNULL) &&\n (longitude == FLOATNULL) &&\n (depth == FLOATNULL) &&\n (temperatureMin == FLOATNULL) &&\n (temperatureMax == FLOATNULL) &&\n (salinityMin == FLOATNULL) &&\n (salinityMax == FLOATNULL) &&\n (oxygenMin == FLOATNULL) &&\n (oxygenMax == FLOATNULL) &&\n (nitrateMin == FLOATNULL) &&\n (nitrateMax == FLOATNULL) &&\n (phosphateMin == FLOATNULL) &&\n (phosphateMax == FLOATNULL) &&\n (silicateMin == FLOATNULL) &&\n (silicateMax == FLOATNULL) &&\n (chlorophyllMin == FLOATNULL) &&\n (chlorophyllMax == FLOATNULL)) {\n return true;\n } else {\n return false;\n } // if ...\n }",
"@Test(expected = IllegalArgumentException.class)\r\n public void testCreationFromNullCircle()\r\n {\r\n final Circle c = new Circle(null);\r\n c.equals(null);\r\n }",
"@Test\n final void testDeleteDeviceNotExisting() {\n assertThrows(\n ExceptionType.DeviceNotFoundException.class,\n () -> deviceController.deleteDevice(\"Not Available device\"));\n }",
"public boolean isNull() {\n return channel instanceof NullChannel;\n }",
"@Test\n public void getDeviceIDTest() {\n assertEquals(deviceID, device.getDeviceID());\n }",
"@Override\n public boolean isNull(){\n return (this.nativeHandle == 0L); \n }",
"@Test\n \tpublic void testWithNullValue() {\n \t\tAssert.assertFalse(f1.equals(fnull));\n \t}",
"public void testNullOtac()\n {\n assertTrue(!errors.hasErrors());\n form.setVerificationCode(null);\n validator.validate(form, errors);\n assertTrue(errors.hasErrors());\n }",
"@Test\n public void getDeviceTest() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);\n\n assertEquals(device, getDevice(DatabaseTest.DEVICE_ID));\n DatabaseTest.cleanDatabase();\n }",
"public boolean canProcessNull() {\n return false;\n }",
"@Test\n public void isGameOverNull()\n {\n // Setup.\n final CheckersGameInjector injector = new CheckersGameInjector();\n final CheckersAdjudicator adjudicator = injector.injectAdjudicator();\n\n // Run / Verify.\n assertFalse(adjudicator.isGameOver(null));\n }",
"@Test\n public void testDontDieFromNulls() throws Exception {\n mWifiCandidates.add(null, mConfig1, 1, 0.0, false, 100);\n mWifiCandidates.add(mScanDetail1, null, 2, 0.0, false, 100);\n doReturn(null).when(mScanDetail2).getScanResult();\n mWifiCandidates.add(mScanDetail2, mConfig2, 3, 1.0, true, 100);\n assertFalse(mWifiCandidates.remove(null));\n\n assertEquals(0, mWifiCandidates.size());\n }",
"public void testValidNullPointerException() {\r\n assertNotNull(\"setup fails\", uploadRequestValidator);\r\n try {\r\n uploadRequestValidator.valid(null);\r\n fail(\"if argument is null, throw NullPointerException\");\r\n } catch (NullPointerException e) {\r\n // good\r\n }\r\n }",
"@Test\r\n\t/* emptyTest\r\n\t * \r\n\t * checks: public boolean empty()\r\n\t * \r\n\t * This test checks:\r\n\t * \t\t- if the color instance variable in Car is equal null\r\n\t * \t\t- if the color instance variable is Car is not equal to null\r\n\t * \r\n\t * \r\n\t */\r\n\tpublic void emptyTest()\r\n\t{\n\t\tint x = 23;\r\n\t\tint y = 24;\r\n\t\tint speed = 6;\r\n\t\tColor colour = new Color (10,10,10);\r\n\t\t\r\n\t\tCar testCar = new Car(x,y,speed,colour);\r\n\t\t\r\n\t\tboolean colourValue = testCar.empty();\r\n\t\tassertFalse(colourValue);\r\n\t\t\r\n\t\t\r\n\t\t//Test the value of testCar.color is null \r\n\t\tx = 3;\r\n\t\ty = 74;\r\n\t\tspeed = 5;\r\n\t\tColor noColour = null;\r\n\t\t\r\n\t\tCar testCar2 = new Car(x,y,speed,noColour);\r\n\t\t\r\n\t\tcolourValue = testCar2.empty();\r\n\t\tassertTrue(colourValue);\r\n\t\t\r\n\t}",
"boolean getUnitIdNull();",
"public void testCheckNull() {\n Util.checkNull(\" \", \"test\");\n }",
"@Test\n\tpublic void equalsNull() {\n\t\tProductScanImageURIKey key = this.getDefaultKey();\n\t\tboolean equals = key.equals(null);\n\t\tAssert.assertFalse(equals);\n\t}",
"@Test\n void testAssertPropertyReflectionEquals_actualObjectNull() {\n assertFailing(() ->\n assertPropertyReflectionEquals(\"aProperty\", \"aValue\", null)\n );\n }",
"public TestCase notNull( Object obj );",
"@Test(expected = IllegalArgumentException.class)\r\n public void testDetectWithNullData() throws Exception {\r\n instance.detect(null);\r\n }",
"@Override\n public boolean isMaybeNull() {\n checkNotPolymorphicOrUnknown();\n return (flags & NULL) != 0;\n }",
"public void verifyNoMatching(AcProperty e)\n {\n }",
"@Test\n public void newDeviceDuplicateTest() {\n DatabaseTest.setupDevice();\n Device newDevice = newDevice(DatabaseTest.DEVICE_ID);\n\n assertNull(newDevice);\n DatabaseTest.cleanDatabase();\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testCheckNullFailure() {\n Helper.checkNull(null, \"null-name\");\n }",
"@Test\n public void testCheckNull() {\n Helper.checkNull(\"non-null\", \"non-null name\");\n }",
"@Test\n public void determineWinnerNull()\n {\n // Setup.\n final CheckersGameInjector injector = new CheckersGameInjector();\n final CheckersAdjudicator adjudicator = injector.injectAdjudicator();\n\n // Run / Verify.\n assertNull(adjudicator.determineWinner(null));\n }",
"@Test\n public void testPhoneDAONotNull( ) throws Exception {\n\n logger.debug( \"Starting test for PhoneDAONotNull\" );\n Assert.assertNotNull( TestConstants.nullMessage, phoneDAOImpl );\n logger.debug( \"Finishing test for PhoneDAONotNull\" );\n }",
"@Test\n public void testNullPositionEquals(){\n assertFalse(Maze.position(0,0).equals(null));\n }",
"public static boolean isDeviceAcceptable(@NonNull DeviceInfo info) {\n boolean googleDevice = \"US\".equalsIgnoreCase(info.getCountryCode())\n // && \"CA\".equalsIgnoreCase(info.getRegionCode())\n && \"Google\".equalsIgnoreCase(info.getOrganization());\n return !googleDevice;\n }",
"@Test\n public void testRemovePatientNull(){\n register.registerPatient(\"Mikke\",\"Mus\",\"24120012345\", \"Doctor Proctor\");\n register.registerPatient( \"Donald\", \"Duck\",\"16120012345\", \"Doctor Proctor\");\n assertThrows(RemoveException.class,\n () -> { register.removePatient(\"\");});\n assertEquals(2,register.getRegisterSize());\n }",
"public boolean verify(){\n return from != null && to != null && !to.isEmpty();\n }",
"@Override\n protected void validateRegisteredDevice(MultifactorDevice device) throws Exception {\n assertThat(device.getBackup(), is(Boolean.TRUE));\n }",
"@Test\n public void findDevice() throws Exception {\n MockUpnpService upnpService = new MockUpnpService();\n LocalDevice device = SampleData.createLocalDevice();\n upnpService.getRegistry().addDevice(device);\n\n UDN udn = device.getIdentity().getUdn();\n\n Registry registry = upnpService.getRegistry(); // DOC: FIND_ROOT_UDN\n Device foundDevice = registry.getDevice(udn, true);\n\n assertEquals(foundDevice.getIdentity().getUdn(), udn); // DOC: FIND_ROOT_UDN\n\n LocalDevice localDevice = registry.getLocalDevice(udn, true); // DOC: FIND_LOCAL_DEVICE\n assertEquals(localDevice.getIdentity().getUdn(), udn);\n\n SampleDeviceRootLocal.assertLocalResourcesMatch(\n upnpService.getConfiguration().getNamespace().getResources(device)\n );\n }",
"@Test\n public void testIsValid_NullProducesOrNullAccepts() {\n CollectorWithNullProducesOrAndAccepts collector = new CollectorWithNullProducesOrAndAccepts();\n Set errors = validator.validate(collector);\n assertFalse(errors.isEmpty());\n }",
"@Override\n\tprotected boolean isExist(AbnormalDevice record) {\n\t\treturn false;\n\t}",
"@Test(expected = IllegalArgumentException.class)\n public void shouldNotConstructWithNullElement() {\n DetachedVertex.detach(null);\n }",
"@Test\n\tpublic void testFindProductSkuByGuidWithNullReturn() {\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(getMockPersistenceEngine()).retrieveByNamedQuery(with(any(String.class)), with(any(Object[].class)));\n\t\t\t\twill(returnValue(Collections.emptyList()));\n\t\t\t}\n\t\t});\n\t\tassertNull(this.importGuidHelper.findProductSkuByGuid(NON_EXIST_GUID));\n\t}",
"@Test\n\tvoid testCheckNulls3() {\n\t\tObject[] o = {null,null,null,null,null};\n\t\tassertTrue(DataChecker.checkNulls(o));\n\t}",
"public boolean isNotNullMcc() {\n return genClient.cacheValueIsNotNull(CacheKey.mcc);\n }",
"private void assertActivityNotNull() {\n if (mActivity == null) {\n mActivity = getActivity();\n assertNotNull(mActivity);\n }\n }",
"public static void verifyNotNull(String variableName, Object value, Class<?> owner) throws DiagnoseException {\r\n if (value == null)\r\n throw new DiagnoseException(owner.getName() + \" parameter [\" + variableName + \"] cannot be null.\");\r\n }",
"@Test\n final void testCreateDeviceAlreadyExists() {\n when(deviceDao.findDevice(DeviceFixture.SERIAL_NUMBER)).thenReturn(Optional.of(deviceDTO));\n\n assertThrows(\n ExceptionType.DeviceAlreadyExistsException.class,\n () -> deviceController.createDevice(createDeviceRequest));\n }",
"@Test\n\tpublic void testFindBrandByGuidWithNullReturn() {\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(getMockPersistenceEngine()).retrieveByNamedQuery(with(any(String.class)), with(any(Object[].class)));\n\t\t\t\twill(returnValue(Collections.emptyList()));\n\t\t\t}\n\t\t});\n\t\tassertNull(this.importGuidHelper.findBrandByGuidAndCatalogGuid(NON_EXIST_GUID, CATALOG_CODE));\n\t}",
"@Test(expected = CopilotServiceInitializationException.class)\n public void testCheckNullForInjectedValueFailure() {\n Helper.checkNullForInjectedValue(null, \"obj\");\n }",
"public Boolean isNull(){\n\t\treturn equals(NULL);\n\t}",
"boolean isNull();",
"public boolean isNull() {\n return this.data == null;\n }",
"@Test\n\tpublic void testFindCustomerByGuidWithNullReturn() {\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(getMockPersistenceEngine()).retrieveByNamedQuery(with(any(String.class)), with(any(Object[].class)));\n\t\t\t\twill(returnValue(Collections.emptyList()));\n\t\t\t}\n\t\t});\n\t\tassertNull(this.importGuidHelper.findCustomerByGuid(NON_EXIST_GUID));\n\t}",
"@Test\n public void testRegisterBackupDeviceNotPossibleIfNoPrimaryDevicePresent() throws Exception {\n clearAllMultifactorDevices();\n\n //This should fail, because no primary device is present for the user\n thrown.expect(AssertionError.class);\n thrown.expectMessage(containsString(\"Primary authentication devices must be set up before backup devices\"));\n doStartRegistration();\n }",
"@Test\n\tvoid testCheckNulls2() {\n\t\tObject[] o = {2,5f,\"Test\",null,\"Test2\"};\n\t\tassertTrue(DataChecker.checkNulls(o));\n\t}",
"@Override\r\n\tpublic boolean sameIdentityAs(Device other) {\n\t\treturn false;\r\n\t}",
"@Override\r\n public boolean equals(Object o) {\r\n if(this == o) return true;\r\n if( !(o instanceof MobileDevice)) return false;\r\n \r\n MobileDevice md = (MobileDevice)o;\r\n \r\n if(this.deviceName != md.deviceName) return false;\r\n if(this.valueTag != md.valueTag) return false;\r\n if(this.lab != md.lab) return false;\r\n if(this.rentSettings != md.rentSettings) return false;\r\n \r\n return true;\r\n }",
"public static void checkNull(Object value, String name) {\r\n if (value == null) {\r\n throw new IllegalArgumentException(\"The \" + name + \" is null.\");\r\n }\r\n }",
"public void checkDevices() throws TNotFoundEx{\n\t\tString command = \"adb devices -l\";\n\t\tCommando commando = new Commando();\n\t\tString op = commando.executeCommand(command);\n\t\t\n\t\tOtherUtil oU = new OtherUtil();\n\t\tArrayList<String> devices = oU.getRegexFromString(op, \"(model:.*?device:.+$?)\");\n\t\tint eligDevices = devices.size();\n\t\t\n\t\tif (eligDevices>1)\n\t\t\tthrow new TNotFoundEx(\"ERROR: 2 or more Android devices are connected to the host, please connect only one Android device.\");\n\t\tif (eligDevices == 0)\n\t\t\tthrow new TNotFoundEx(\"ERROR: No Android devices detected by the host. Execute adb devices -l to check the connected devices\");\n\t\t\t\n\t}",
"public boolean isNull() {\n return Stream.<Object>of(airQualityIndex, humidity,\n measurementTime, pm1, pm25, pm10, pollutionLevel,\n pressure, temperature)\n .allMatch(Objects::isNull);\n }",
"public final boolean isNull()\n\t{\n\t\treturn (dataValue == null) && (stream == null) && (_blobValue == null);\n\t}",
"private void assertNullHandling(UMLMessageArgument msgArg) throws Exception\r\n\t{\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((UMLMessageArgument)null));\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((Object)null));\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((UMLSymbol)null));\r\n\t}",
"boolean getNodeCharacteristicIdNull();",
"private static void checkNull(Object value, String name) throws LateDeliverablesProcessingException {\r\n if (value == null) {\r\n throw new LateDeliverablesProcessingException(\"The \" + name + \" should not be null.\");\r\n }\r\n }",
"boolean isNilValue();",
"boolean isIsNotNull();",
"@Test\n @SmallTest\n public void tesUiccCartdInfoSanity() {\n assertEquals(0, mUicccard.getNumApplications());\n assertNull(mUicccard.getCardState());\n assertNull(mUicccard.getUniversalPinState());\n assertNull(mUicccard.getOperatorBrandOverride());\n /* CarrierPrivilegeRule equals null, return true */\n assertTrue(mUicccard.areCarrierPriviligeRulesLoaded());\n for (IccCardApplicationStatus.AppType mAppType :\n IccCardApplicationStatus.AppType.values()) {\n assertFalse(mUicccard.isApplicationOnIcc(mAppType));\n }\n }"
]
| [
"0.6952858",
"0.6738776",
"0.6150311",
"0.6044723",
"0.603763",
"0.5857038",
"0.580392",
"0.57772446",
"0.57772446",
"0.5757307",
"0.5698732",
"0.56503624",
"0.56495404",
"0.5639712",
"0.5635187",
"0.56266254",
"0.56051934",
"0.5572405",
"0.55631566",
"0.5557087",
"0.55349016",
"0.55322856",
"0.55158854",
"0.5492896",
"0.5465727",
"0.5463755",
"0.54402626",
"0.5432407",
"0.54132646",
"0.5406064",
"0.53762746",
"0.53752434",
"0.5374939",
"0.53714556",
"0.53628254",
"0.5360368",
"0.5327662",
"0.53242975",
"0.5307892",
"0.52907425",
"0.52865475",
"0.52800655",
"0.52689826",
"0.52674276",
"0.5266692",
"0.52586335",
"0.5247467",
"0.52424353",
"0.5241774",
"0.52382076",
"0.52357656",
"0.5233516",
"0.52101314",
"0.5195062",
"0.5188717",
"0.51828367",
"0.51827294",
"0.5175724",
"0.5173418",
"0.51733726",
"0.5168246",
"0.51649094",
"0.5159732",
"0.51464754",
"0.51364833",
"0.5134601",
"0.51294625",
"0.5127674",
"0.51218814",
"0.511964",
"0.5118471",
"0.5097084",
"0.50860155",
"0.507838",
"0.5070847",
"0.50607365",
"0.505341",
"0.5049913",
"0.50496405",
"0.5045826",
"0.5012322",
"0.5010781",
"0.5007088",
"0.50017494",
"0.49999052",
"0.49974865",
"0.49867436",
"0.49821737",
"0.4979107",
"0.49786693",
"0.49780297",
"0.49775985",
"0.49738923",
"0.49681148",
"0.4959518",
"0.49566886",
"0.4943568",
"0.49421224",
"0.4933879",
"0.49335417"
]
| 0.73539305 | 0 |
Verify that a device does not equal a string. | @Test
public void equalsOtherTest4() {
assertFalse(device.equals(""));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static boolean isValidDeviceId(String deviceId){\n return deviceId != null;\n }",
"@Test\n public void equalsOtherTest() {\n Device device2 = new Device(deviceID, \"other\");\n assertNotEquals(device, device2);\n }",
"public void testGetSimOperator_unavailableDevice() {\n mMockIDevice = EasyMock.createMock(IDevice.class);\n EasyMock.expect(mMockIDevice.getState()).andReturn(DeviceState.UNAUTHORIZED);\n EasyMock.expect(mMockIDevice.getSerialNumber()).andReturn(\"serial\");\n EasyMock.replay(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n assertNull(mTestDevice.getSimOperator());\n EasyMock.verify(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n }",
"private boolean checkDeviceName(String name) {\n switch (name) {\n case \"LAPTOP\" :\n case \"PRINTER\" :\n case \"ROUTER\" :\n return true;\n default:\n return false;\n }\n }",
"private boolean isImeiValid(String deviceId) {\r\n try {\r\n String[] strings = deviceId.split(\"x\");\r\n byte[] bytes = strings[0].getBytes();\r\n\r\n int cks = 0;\r\n for (int i = 0; i < strings[0].length(); i++)\r\n cks += bytes[i];\r\n\r\n String checkId = strings[0] + \"x\" + cks % MAGIC_NUMBER;\r\n\r\n return deviceId.equals(checkId);\r\n } catch (Exception e) {\r\n return false;\r\n }\r\n }",
"@Test\n\tvoid testCheckString2() {\n\t\tassertFalse(DataChecker.checkString(\"\"));\n\t}",
"@Test\n public void equalsOtherTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device, device2);\n }",
"@Test\n\t public void teststringAPI_fail() {\n\t\tString testData = \"Caps is not considered the same\";\n\t\tchar charData='c';\n\t\tString expected = \"aps is not onsidered the same\";\n\t\tString actualStr=stringObj.stringAPI(testData, charData);\n\t\tassertNotSame(\"Got Expected Result\", expected, actualStr);\n\t }",
"@Test\n public void equalsOtherTest3() {\n assertFalse(device.equals(null));\n }",
"public void testIsMacAddress_invalidInput() {\n assertFalse(mTestDevice.isMacAddress(\"\"));\n assertFalse(mTestDevice.isMacAddress(\"00-15-E9-2B-99-3C\")); // Invalid delimiter\n }",
"public static void verifyNonEmptyString(String variableName, Object value, Class<?> owner) throws DiagnoseException {\r\n DiagnoseUtil.verifyNotNull(variableName, value, owner);\r\n if (!(value instanceof String))\r\n throw new DiagnoseException(owner.getName() + \" parameter [\" + variableName + \"] must be a String.\");\r\n String stringValue = (String) value;\r\n if (stringValue.length() == 0)\r\n throw new DiagnoseException(owner.getName() + \" parameter [\" + variableName + \"] cannot be empty.\");\r\n }",
"public void testGetSimState_unavailableDevice() {\n mMockIDevice = EasyMock.createMock(IDevice.class);\n EasyMock.expect(mMockIDevice.getState()).andReturn(DeviceState.UNAUTHORIZED);\n EasyMock.expect(mMockIDevice.getSerialNumber()).andReturn(\"serial\");\n EasyMock.replay(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n assertNull(mTestDevice.getSimState());\n EasyMock.verify(mMockIDevice, mMockStateMonitor, mMockDvcMonitor);\n }",
"@Test\n\t\tvoid WithoutSpace_CheckForValidationForMobile_RetrunFalse() {\n\t\t\tboolean result = ValidateUserDetails.validateMobile(\"919874563214\");\n\t\t\tAssertions.assertFalse(result);\n\t\t}",
"@Test\n\tvoid testCheckString4() {\n\t\tassertFalse(DataChecker.checkString((String)null));\n\t}",
"@Test\n\tvoid testCheckString3() {\n\t\tassertFalse(DataChecker.checkString(null));\n\t}",
"protected boolean hasStringIdentifier(){\r\n // get string descriptor\r\n int status = gUsbIo.getStringDescriptor(stringDescriptor1,(byte)1,0);\r\n if (status != USBIO_ERR_SUCCESS) {\r\n return false;\r\n } else {\r\n if(stringDescriptor1.Str.length()>0) return true;\r\n }\r\n return false;\r\n }",
"@NCheck(failSpecificationType = IObjectStringNotMatchingFail.class)\n boolean isStringNotMatching(Object caller, String referenceA, String regex);",
"public boolean checkEquals(DomString other) {\n return other.checkEquals(str, (short) 0, len);\n }",
"public void testInvalidInput(){\n\t\tString input = \"bye\";\n\t\tString actual = operation.processOperation(input);\n\t\tString expected = \"bye bye could not be performed\";\n\t\tassertEquals(expected,actual);\n\t}",
"public static boolean isNotEqual(String str1, String str2) {\n\treturn (null == str1 && null != str2) || (null != str1 && null == str2) || (null != str1 && null != str2 && !str1.trim().equals(str2.trim()));\n }",
"@Test\n public void creation_with_sensor_mac_not_valid()\n {\n Exception exception2=assertThrows(IllegalArgumentException.class,()->{\n Switch s=new Switch(\"B8:27:EB:B7:E3:4C\",\n \"D8:F1:5B:8D:33:\",\n \"stat/\",\n \"stat/B8:27:EB:B7:E3:4C/D8:F1:5B:8D:33:BF/POWER\",\n \"OFF\",\n \"POWER\",\n 0,\n new Timestamp(0));\n });\n String expectedMessage = \"il mac del sensore deve essere valido!\";\n String actualMessage = exception2.getMessage();\n assertTrue(actualMessage.contains(expectedMessage));\n }",
"@Then(\"^assert that the text \\\"([^\\\"]*)\\\" element is not \\\"([^\\\"]*)\\\"$\")\n\tpublic void assert_that_the_text_element_is_not(String arg1, String arg2) throws Throwable {\n\t\tString[] parts = arg1.split(\"=\");\n\t\tString selector=parts[1];\n\t\tString result = driver.findElement(By.cssSelector(selector)).getText();\n\t\tassertNotEquals(result,arg2);\n\t\tSystem.out.println(\"Assert \"+ result +\" is not the text : \"+arg2 );\n\t}",
"public void assertNotTextPresent(final String text);",
"static boolean checkIsDeviceAvailable(String respStr)\n {\n if (respStr.length() != CMD_LEN)\n {\n// log.warn(\"checkIsDeviceAvailable(): respStr is not valid:\" + respStr + \",return false\");\n return false;\n }\n MeshCommand cmd = new MeshCommand(respStr);\n if (!cmd.isValid())\n {\n// log.warn(\"checkIsDeviceAvailable(): cmd is not valid, cmd:\" + cmd + \",return false\");\n return false;\n }\n if (!cmd.isFree())\n {\n// log.warn(\"checkIsDeviceAvailable(): cap is not enought, return false\");\n return false;\n }\n return true;\n }",
"public static boolean isStringAValidUuid(String value){\n boolean isValidUuid;\n try{\n UUID uuid = UUID.fromString(value);\n isValidUuid = true;\n } catch (IllegalArgumentException exception){\n isValidUuid = false;\n }\n return isValidUuid;\n }",
"public void testCheckString() {\n Util.checkString(\"test\", \"test\");\n }",
"public void testCheckString() {\n Util.checkString(\"test\", \"test\");\n }",
"@Test\n\tpublic void testIsUniqueOnUniqueString() {\n\t\tassertTrue(ArraysAndStrings.isUnique(UNIQUE_CHARACTERS));\n\t}",
"@Test\n public void testAtomString_4() {\n LOGGER.info(\"testAtomString_4\");\n AtomString atomString1 = new AtomString(\"Hello\");\n AtomString atomString2 = new AtomString(\"Hej\");\n assertNotEquals(atomString1, atomString2);\n }",
"public void testIncorrectPassword() {\n Password p = new Password(\"jesus\".toCharArray());\n assertFalse(p.checkPassword(\"buddha\".toCharArray()));\n }",
"@Then(\"^assert that the text \\\"([^\\\"]*)\\\" element does not have \\\"([^\\\"]*)\\\"$\")\n\tpublic void assert_that_the_text_element_does_not_have(String arg1, String arg2) throws Throwable {\n\t\tString[] parts = arg1.split(\"=\");\n\t\tString selector=parts[1];\n\t\tString result = driver.findElement(By.cssSelector(selector)).getText();\n\t\tAssert.assertTrue(\"Text is present!\", !result.contains(arg2));\n\t\tSystem.out.println(\"Assert \"+ result +\" does not have the text : \"+arg2 );\n\t}",
"boolean hasDeviceId();",
"boolean hasDeviceId();",
"@Test\n public void testCantRegisterMismatchPassword() {\n enterValuesAndClick(\"name\", \"[email protected]\", \"123456\", \"123478\");\n checkErrors(nameNoError, emailNoError, pwdsDoNotMatchError, pwdsDoNotMatchError);\n }",
"@Test\n\tpublic void aGramIsNotEquivalentToAKilogram() {\n\t\tassertFalse(GRAM.isEquivalentTo(KILOGRAM));\n\t}",
"@Test\n public void testInvalidUserName() {\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"username_edit_text\"))\n .setText(INVALID_USERNAME_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"password_edit_text\"))\n .setText(PASSWORD_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"login_button\"))\n .click();\n\n }",
"@Test\n public void equalsFalseOtherObject() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n String player2 = \"abcd\";\n assertFalse(player1.equals(player2));\n }",
"public static void assertInvalid(String text)\n {\n assertTrue(parseInvalidProgram(text));\n }",
"public void testUnmatchedPassword() {\n\n // unmatched length\n boolean test1 = UserService.checkPasswordMatch(\"password123\", \"ppassword123\");\n assertFalse(test1);\n\n boolean test2 = UserService.checkPasswordMatch(\"ppassword123\", \"password123\");\n assertFalse(test2);\n\n // unmatched number\n boolean test3 = UserService.checkPasswordMatch(\"password123\", \"password124\");\n assertFalse(test3);\n\n // unmatched letter (case sensitive)\n boolean test4 = UserService.checkPasswordMatch(\"123password\", \"123Password\");\n assertFalse(test4);\n\n // unmatched letter\n boolean test5 = UserService.checkPasswordMatch(\"123password\", \"123passward\");\n assertFalse(test5);\n\n // unmatched letter/number\n boolean test6 = UserService.checkPasswordMatch(\"123password\", \"12password3\");\n assertFalse(test6);\n }",
"public boolean canProvideString();",
"public static boolean isTaken(String string) {\n return false;\n }",
"@Test\n public void testInvalidPassword() {\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"username_edit_text\"))\n .setText(USERNAME_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"password_edit_text\"))\n .setText(INVALID_PASSWORD_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"login_button\"))\n .click();\n\n }",
"boolean canMatchEmptyString() {\n return false;\n }",
"@Test\r\n\tvoid testGetPlayerBySquadNameShouldFail() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tString s = ctrl.getSquadPlayersByName(\"w\");\r\n\t\t\r\n\t\tboolean success = false;\r\n\t\t\r\n\t\tif(!s.equals(\"\")) {\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\t\t\r\n\t\tassertTrue(success);\r\n\t}",
"@Test\n public void testIsInvalidChannelName() {\n System.out.println(\"isInvalidChannelName test ---\");\n String validName = \"Valid Name\";\n String invalidName1 = \"Invalid_Name\";\n String invalidName2 = \"\";\n String invalidName3 = \" \";\n String invalidName4 = \"troll<script>document.cookie='lol'</script>\";\n assertFalse(instance.isInvalidChannelName(validName));\n assertTrue(instance.isInvalidChannelName(invalidName1));\n assertTrue(instance.isInvalidChannelName(invalidName2));\n assertTrue(instance.isInvalidChannelName(invalidName3));\n assertTrue(instance.isInvalidChannelName(invalidName4));\n }",
"static boolean containsNoData(String str) {\n return \"\".equals(str) || \"-\".equals(str);\n }",
"private boolean validDevice(AcceleratorNode nodeDev) {\n// for (Class<?> typeValidDev : this.arrValidDevTypes) {\n// if (nodeDev.getClass() == typeValidDev)\n// return true;\n// }\n// \n// return false;\n \n return true;\n }",
"private boolean checkRoomValid(String room) {\n\treturn true;\r\n}",
"@Test\n\tpublic void nonEmptyString() {\n\t\tString s = \" H \";\n\t\tassertFalse(\"Non empty string\", StringUtil.isEmpty(s));\n\t}",
"@Override\r\n\tpublic boolean sameIdentityAs(Device other) {\n\t\treturn false;\r\n\t}",
"@Test(expected = SystemObjectIdException.class)\n public void shouldThrowExceptionIfFailToIdentifyDevice() throws IOException {\n\n expect(configuration.createPDU(PDU.GET)).andReturn(new PDU());\n\n expect(snmpInterface.send(isA(PDU.class), same(target))).andReturn(createErrorResponseEvent());\n replayAll();\n\n try {\n session.identifyDevice();\n assert false : \"Should not reach\";\n } finally {\n verifyAll();\n }\n }",
"public boolean clearDeviceTypeAndNameBuffer();",
"public void testInvalidNoType() { assertInvalid(\"a\"); }",
"private static boolean hasString(String value) {\n if (!value.trim().equals(\"\") && value.length() > 0) {\n return true;\n }\n\n return false;\n\n }",
"@Test\n public void testEmptyString() {\n assertEquals(\"Should return false\", false, val.validateTransportationModes(\"\"));\n }",
"public boolean doesNotMatch(NakedObject nakedObject);",
"@Test\n\tpublic void testDesktopNonIphone()\n\t{\n\n\t\tfor (final String ua : desktop_ua)\n\t\t{\n\t\t\tLOG.info(\"Testing :\" + ua);\n\t\t\tassertTrue(\"Api fails to identify as a desktop device: (\" + ua + \")\", detectionService.isDesktop(ua));\n\t\t\tassertFalse(\"Api wrongly identify as a iphone: (\" + ua + \")\", detectionService.isiPhoneCapable(ua,\n\t\t\t\t\tnew ArrayList<String>()));\n\t\t\tassertFalse(\"Api wrongly identify as a mobile device: (\" + ua + \")\", detectionService.isMobileDevice(ua));\n\t\t}\n\n\t}",
"public void checkDevices() throws TNotFoundEx{\n\t\tString command = \"adb devices -l\";\n\t\tCommando commando = new Commando();\n\t\tString op = commando.executeCommand(command);\n\t\t\n\t\tOtherUtil oU = new OtherUtil();\n\t\tArrayList<String> devices = oU.getRegexFromString(op, \"(model:.*?device:.+$?)\");\n\t\tint eligDevices = devices.size();\n\t\t\n\t\tif (eligDevices>1)\n\t\t\tthrow new TNotFoundEx(\"ERROR: 2 or more Android devices are connected to the host, please connect only one Android device.\");\n\t\tif (eligDevices == 0)\n\t\t\tthrow new TNotFoundEx(\"ERROR: No Android devices detected by the host. Execute adb devices -l to check the connected devices\");\n\t\t\t\n\t}",
"@Test\n public void equalsSameTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device, device2);\n }",
"public boolean typeStringsEqual(String uti1, String uti2);",
"@Test\n public void equalsSelfTest() {\n assertEquals(device, device);\n }",
"public void verifyNoMatching(AcProperty e)\n {\n }",
"@Test\n public void shouldNotBeAbleToInputSpecialCharactersInTradeInValueField() {\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 }",
"@Override\n protected boolean isValueIsValid(String value) {\n return false;\n }",
"@Test\r\n\tpublic void testNameInvalid() {\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"*\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"-\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"0-\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"324tggs\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"-feioj\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"/\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"@\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\" \"));\r\n\t}",
"public interface IObjectStringNotMatchingCheck extends ICheck\n{\n /**\n * Checks if A does NOT match the regular expression.\n * <p>\n * If A is null it can't be matched.\n * </p>\n * <p>\n * If regex is null A can't be matched\n * </p>\n * <p>\n * Empty A is matched by empty regex.\n * </p>\n * \n * @param caller\n * end-user instance initiating the check\n * @param referenceA\n * reference to check for match regex\n * @param regex\n * the regular expression A is to be matched against\n * @return true, if A does NOT match regex - otherwise false\n * @throws IllegalArgumentException\n * if caller is null\n */\n @NCheck(failSpecificationType = IObjectStringNotMatchingFail.class)\n boolean isStringNotMatching(Object caller, String referenceA, String regex);\n}",
"public void testGetMacAddress_failure() throws Exception {\n IDevice device = new StubDevice(MOCK_DEVICE_SERIAL) {\n @Override\n public void executeShellCommand(String command, IShellOutputReceiver receiver)\n throws TimeoutException, AdbCommandRejectedException,\n ShellCommandUnresponsiveException, IOException {\n throw new IOException();\n }\n };\n mMockIDevice.executeShellCommand(EasyMock.anyObject(), EasyMock.anyObject());\n EasyMock.expectLastCall().andDelegateTo(device).anyTimes();\n EasyMock.replay(mMockIDevice);\n assertNull(mTestDevice.getMacAddress());\n EasyMock.verify(mMockIDevice);\n }",
"@Test\n public void stopDeviceCheck() {\n System.out.println(\"* Device JUnit4Test: stopDeviceCheck()\");\n\n // authenticate the device and then stop it\n authenticateSimulatedDevice();\n mMainServer.removeDevice(mDeviceInstance);\n TestsConfig.delay(150);\n \n // check if the device is corretly removed from the server\n assertFalse(mDeviceInstance.isDeviceActive());\n assertNull(mMainServer.getDevice(mDeviceInstance.getUniqueIdentifier()));\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testInvalidValueOfIncorrectString() {\n Ip4Address ipAddress;\n\n String fromString = \"NoSuchIpAddress\";\n ipAddress = Ip4Address.valueOf(fromString);\n }",
"@Test\n final void testDeleteDeviceNotExisting() {\n assertThrows(\n ExceptionType.DeviceNotFoundException.class,\n () -> deviceController.deleteDevice(\"Not Available device\"));\n }",
"public boolean isIMEINoMobileNoDeviceTypeErrorMessagePresent() {\r\n\t\treturn isElementPresent(addVehiclesHeader.replace(\"Add Vehicle\",\"This device IMEI no., Mobile no. and Device Type did not match with approved IMEI no., Mobile no. and Device Type.\"),\r\n\t\t\t\tSHORTWAIT);\r\n\t}",
"public void deviceAndPhonVerificationErrMsg()\n\t{\n\t\tLog.info(\"======== Device Verification Error Message ========\");\n\n\t\ttry {\n\t\t\tsoftAssert.assertTrue(verifyPhoneErrMsg.getText().contains(\"failed\"));\n\t\t\tsoftAssert.assertAll();\n\t\t} catch (Exception e){} \n\t\t\n\t\tLog.info(\"======== Clicking on Verification failed OK button ========\");\n\t\tokButton.click();\n\t}",
"public static boolean notLength(String value, int min, int max)\r\n\t{\r\n\t\treturn !notLength(value, min, max);\r\n\t}",
"public void testAssertPropertyReflectionEquals_notEqualsDifferentValues() {\r\n try {\r\n assertPropertyReflectionEquals(\"stringProperty\", \"xxxxxx\", testObject);\r\n fail(\"Expected AssertionFailedError\");\r\n } catch (AssertionFailedError a) {\r\n // expected\r\n }\r\n }",
"@Test\n public void testRegisterPatientInvalidCharacter(){\n assertThrows(IllegalArgumentException.class,\n () -> { register.registerPatient(\"Donald\", \"Trump\", \"x0019112345\", \"Doctor Proctor\");});\n }",
"abstract boolean canMatchEmptyString();",
"@Test\n\tpublic void testNotEqualsPersonalData() {\n\t\tSystem.out.println(\"starting testNotEqualsPersonalData()\");\n\t\tPersonalData personalData1 = new PersonalData(\"Kelvin\", \"Huynh\", \"4081234567\", \"[email protected]\");\n\t\tPersonalData personalData2 = new PersonalData(\"Kevin\", \"Huynh\", \"4081234567\", \"[email protected]\");\n\t\tassertFalse (\"personalData1 NOT equals personalData2\", personalData1.equals(personalData2));\n\t System.out.println(\"testNotEqualsPersonalData PASSED\");\t\t\n\t}",
"public static boolean isDeviceAcceptable(@NonNull DeviceInfo info) {\n boolean googleDevice = \"US\".equalsIgnoreCase(info.getCountryCode())\n // && \"CA\".equalsIgnoreCase(info.getRegionCode())\n && \"Google\".equalsIgnoreCase(info.getOrganization());\n return !googleDevice;\n }",
"private boolean isPhoneValid(String phone) {\n return !phone.contains(\" \");\r\n }",
"public void notEquals(String message, Object expected, Object actual)\n {\n assertNotEquals(expected, actual, message);\n }",
"@Test\n public void testBuilderInvalidNetworkName() throws Exception {\n WifiP2pConfig.Builder b = new WifiP2pConfig.Builder();\n\n // sunny case\n try {\n b.setNetworkName(\"DIRECT-ab-Hello\");\n } catch (IllegalArgumentException e) {\n fail(\"Unexpected IllegalArgumentException\");\n }\n\n // sunny case, no trailing string\n try {\n b.setNetworkName(\"DIRECT-WR\");\n } catch (IllegalArgumentException e) {\n fail(\"Unexpected IllegalArgumentException\");\n }\n\n // sunny case with maximum bytes for the network name\n try {\n b.setNetworkName(\"DIRECT-abcdefghijklmnopqrstuvwxy\");\n } catch (IllegalArgumentException e) {\n fail(\"Unexpected IllegalArgumentException\");\n }\n\n // less than 9 characters.\n try {\n b.setNetworkName(\"DIRECT-z\");\n fail(\"expected IllegalArgumentException\");\n } catch (IllegalArgumentException e) { }\n\n // not starts with DIRECT-xy.\n try {\n b.setNetworkName(\"ABCDEFGHIJK\");\n fail(\"expected IllegalArgumentException\");\n } catch (IllegalArgumentException e) { }\n\n // not starts with uppercase DIRECT-xy\n try {\n b.setNetworkName(\"direct-ab\");\n fail(\"expected IllegalArgumentException\");\n } catch (IllegalArgumentException e) { }\n\n // x and y are not selected from upper case letters, lower case letters or\n // numbers.\n try {\n b.setNetworkName(\"direct-a?\");\n fail(\"expected IllegalArgumentException\");\n } catch (IllegalArgumentException e) { }\n\n // over maximum bytes\n try {\n b.setNetworkName(\"DIRECT-abcdefghijklmnopqrstuvwxyz\");\n fail(\"expected IllegalArgumentException\");\n } catch (IllegalArgumentException e) { }\n }",
"@Test\n\tpublic void testUnmatchingPasswordNegative2() {\n\t\tfillSignUpForm(\"marius\",\"voda\",\"[email protected]\",\"Parola123\",\"PaR0la123\",\"socialNetworks\");\n\t\tassertEquals(\"Passwords must match\", driver.findElement(By.cssSelector(\"#sign-up-confirm-password-div > app-form-control-error-message > em > span\")).getText());\n\t}",
"@Test\n public void getDeviceNullTest() {\n assertNull(getDevice(\"Non existing device\"));\n }",
"@org.junit.Test\n\tpublic void invalidAudioFormat() {\n\t\tAudioFormat format = new AudioFormat(8000, 24, 3, true, true);\n\n\t\tMicrophoneListener listener = new MicrophoneListener() {\n\t\t\t@Override\n\t\t\tpublic void onReceive(byte[] data) {\n\t\t\t}\n\t\t};\n\n\t\tMicrophone mic = new Microphone(format, listener);\n\t\tmic.start();\n\t\ttry {\n\t\t\tThread.sleep(500);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\n\t\t}\n\n\t\tif (mic.isRunning()) {\n\t\t\tfail();\n\t\t}\n\t\tmic.interrupt();\n\t}",
"public boolean isSetDeviceName() {\n return this.deviceName != null;\n }",
"private boolean m81840a(String str, String str2) {\n boolean isEmpty = TextUtils.isEmpty(str);\n boolean isEmpty2 = TextUtils.isEmpty(str2);\n if (isEmpty && isEmpty2) {\n return true;\n }\n if (!isEmpty && isEmpty2) {\n return false;\n }\n if (!isEmpty || isEmpty2) {\n return str.equals(str2);\n }\n return false;\n }",
"@Test\n public void testInvalidAuthTypeInValidateApWifiConfigurationCheck() {\n WifiConfiguration config = new WifiConfiguration();\n config.SSID = TEST_DEFAULT_HOTSPOT_SSID;\n\n config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA2_PSK);\n config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);\n assertFalse(WifiApConfigStore.validateApWifiConfiguration(config));\n }",
"public Builder setDeviceId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n deviceId_ = value;\n onChanged();\n return this;\n }",
"public void testIsMacAddress() {\n assertTrue(mTestDevice.isMacAddress(\"00:00:00:00:00:00\"));\n assertTrue(mTestDevice.isMacAddress(\"00:15:E9:2B:99:3C\"));\n assertTrue(mTestDevice.isMacAddress(\"FF:FF:FF:FF:FF:FF\"));\n assertTrue(mTestDevice.isMacAddress(\"58:a2:b5:7d:49:24\"));\n }",
"private boolean validateFuel(String inFuel)\n {\n String upFuel = new String(inFuel.toUpperCase());\n return ( upFuel.equals(BIO) || upFuel.equals(BATT) || \n upFuel.equals(DIES) );\n }",
"@Test\n\tpublic void test_equals2() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"NotSherlock\",\"BBC\");\n\tassertFalse(t1.equals(t2));\n }",
"@Test\n\tpublic void test() {\n\t\tString r1 = CGroup.createRandomId();\n\t\tassertTrue(r1.matches(\"[0-9]+\"));\n\t\t\n\t\tString r2 = CGroup.createRandomId();\n\t\tassertFalse(r1.equals(r2));\n\t}",
"@Test\n public void authenticateTestFailure2() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, \"other_token\");\n assertFalse(device.authenticate());\n DatabaseTest.cleanDatabase();\n }",
"public void testInvalidStringPositiveTest()\n {\n form.setVerificationCode(testStr);\n validator.validate(form, errors);\n assertTrue(errors.hasErrors());\n }",
"public void rejects(String input) {\n\t\trejects(input, false);\n\t}",
"@Test\n public void testInvokingStringMethodAndEvaluateWithWrongValue() {\n\n // Calling the String-Method and it should be avaluated with an int, the result should be false\n MethodInvokingEventCondition invokingEventCondition = new MethodInvokingEventCondition(DummyAdapterEvent.class,\n DummyAdapterEvent.METHOD_RETURNS_STRING, INT_TO_MATCH);\n\n Assert.assertFalse(invokingEventCondition.evaluate(dummyAdapterEvent));\n }",
"public void assertNotClass(final String elementLocator, final String clazzString);",
"@Test\n public void newDeviceDuplicateTest() {\n DatabaseTest.setupDevice();\n Device newDevice = newDevice(DatabaseTest.DEVICE_ID);\n\n assertNull(newDevice);\n DatabaseTest.cleanDatabase();\n }",
"private static final PyObject testEqual(PyString string, PyObject other) {\n\t\tif (other instanceof PyShadowString) {\n\t\t\treturn ((PyShadowString) other).shadowstr___eq__(string);\n\t\t} else {\n\t\t\treturn string.__eq__(other);\n\t\t}\n\t}"
]
| [
"0.61699253",
"0.59663725",
"0.5862466",
"0.5785386",
"0.5760103",
"0.57455885",
"0.57406104",
"0.57379174",
"0.56310666",
"0.55957204",
"0.5549952",
"0.54829866",
"0.5428387",
"0.54271895",
"0.54264027",
"0.53996426",
"0.53797174",
"0.53340214",
"0.5312544",
"0.5296931",
"0.52832896",
"0.52736706",
"0.5253909",
"0.52207047",
"0.5189957",
"0.51818824",
"0.51818824",
"0.5172053",
"0.5137512",
"0.5089023",
"0.5076262",
"0.50390023",
"0.50390023",
"0.5036451",
"0.50363594",
"0.502623",
"0.5020451",
"0.50194895",
"0.50083673",
"0.50042635",
"0.49843124",
"0.49811652",
"0.49769807",
"0.4958429",
"0.49556255",
"0.4946893",
"0.49334908",
"0.49195382",
"0.48980823",
"0.48959708",
"0.48956537",
"0.48890746",
"0.48657656",
"0.48618528",
"0.48602965",
"0.48590127",
"0.4851267",
"0.48507303",
"0.48498833",
"0.48399904",
"0.48337963",
"0.48308566",
"0.48281395",
"0.48241118",
"0.48181775",
"0.4813521",
"0.48082194",
"0.4801201",
"0.48000532",
"0.47927475",
"0.47853658",
"0.47851732",
"0.4783273",
"0.478123",
"0.4777722",
"0.47741154",
"0.47699225",
"0.47602427",
"0.4759413",
"0.47531077",
"0.47522727",
"0.4748503",
"0.47183257",
"0.47171775",
"0.47056693",
"0.4701693",
"0.46950978",
"0.46867734",
"0.46844366",
"0.4683248",
"0.4669132",
"0.46626145",
"0.4660845",
"0.46597636",
"0.46575677",
"0.46539775",
"0.4652186",
"0.4646479",
"0.46458596",
"0.46434572"
]
| 0.7109405 | 0 |
Verify that the hashcode for two identical devices is the same. | @Test
public void hashCodeTest() {
Device device2 = new Device(deviceID, token);
assertEquals(device.hashCode(), device2.hashCode());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void hashCodeTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device.hashCode(), device2.hashCode());\n }",
"@Test\n public void testHashcodeReturnsSameValueForIdenticalRecords() {\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(true));\n }",
"@Test\n public void equalsSameTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device, device2);\n }",
"@Test\n void testSameHashCodes() {\n assertEquals(loginRequest1.hashCode(), loginRequest1.hashCode());\n }",
"@Test\n public void testKeyEquivalence() throws Exception {\n ScanResultMatchInfo matchInfo1 = ScanResultMatchInfo.fromWifiConfiguration(mConfig1);\n ScanResultMatchInfo matchInfo1Prime = ScanResultMatchInfo.fromWifiConfiguration(mConfig1);\n ScanResultMatchInfo matchInfo2 = ScanResultMatchInfo.fromWifiConfiguration(mConfig2);\n assertFalse(matchInfo1 == matchInfo1Prime); // Checking assumption\n MacAddress mac1 = MacAddressUtils.createRandomUnicastAddress();\n MacAddress mac2 = MacAddressUtils.createRandomUnicastAddress();\n assertNotEquals(mac1, mac2); // really tiny probability of failing here\n\n WifiCandidates.Key key1 = new WifiCandidates.Key(matchInfo1, mac1, 1);\n\n assertFalse(key1.equals(null));\n assertFalse(key1.equals((Integer) 0));\n // Same inputs should give equal results\n assertEquals(key1, new WifiCandidates.Key(matchInfo1, mac1, 1));\n // Equal inputs should give equal results\n assertEquals(key1, new WifiCandidates.Key(matchInfo1Prime, mac1, 1));\n // Hash codes of equal things should be equal\n assertEquals(key1.hashCode(), key1.hashCode());\n assertEquals(key1.hashCode(), new WifiCandidates.Key(matchInfo1, mac1, 1).hashCode());\n assertEquals(key1.hashCode(), new WifiCandidates.Key(matchInfo1Prime, mac1, 1).hashCode());\n\n // Unequal inputs should give unequal results\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo2, mac1, 1)));\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo1, mac2, 1)));\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo1, mac1, 2)));\n }",
"@Test\n void testDifferentHashCodes() {\n assertNotEquals(loginRequest1.hashCode(), loginRequest2.hashCode());\n }",
"@Test\n public void testRecordsWithDifferentIDsProduceDifferentHashCodes() throws Exception {\n setRecordFieldValue(otherRecord, \"id\", 42L);\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(false));\n }",
"@Test\n public void equalsSelfTest() {\n assertEquals(device, device);\n }",
"private static boolean equalityTest3(String a, String b)\n {\n return System.identityHashCode(a) == System.identityHashCode(b);\n }",
"@Override\r\n\tpublic boolean sameIdentityAs(Device other) {\n\t\treturn false;\r\n\t}",
"private static boolean equalityTest5(String a, String b)\n {\n return a.hashCode() == b.hashCode();\n }",
"private static boolean areEqual (byte[] a, byte[] b) {\r\n int aLength = a.length;\r\n if (aLength != b.length)\r\n return false;\r\n for (int i = 0; i < aLength; i++)\r\n if (a[i] != b[i])\r\n return false;\r\n return true;\r\n }",
"@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n ApiKey apikey1 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n ApiKey apikey2 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n assertNotNull(apikey1);\n assertNotNull(apikey2);\n assertNotSame(apikey2, apikey1);\n assertEquals(apikey2, apikey1);\n assertEquals(apikey2.hashCode(), apikey1.hashCode());\n int hashCode = apikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, apikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }",
"@Test\n public void equalsOtherTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device, device2);\n }",
"@Test\n\tpublic void test_hashCode2() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t3 = new TvShow(\"NotSherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()!=t3.hashCode());\n }",
"@Test\n public void equalsOtherTest() {\n Device device2 = new Device(deviceID, \"other\");\n assertNotEquals(device, device2);\n }",
"@Test\n\tpublic void test_hashCode1() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"Sherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()==t2.hashCode());\n }",
"boolean hasSameAs();",
"@org.testng.annotations.Test\n public void test_equals_Symmetric()\n throws Exception {\n CategorieClient categorieClient = new CategorieClient(\"denis\", 1000, 10.2, 1.1, 1.2, false);\n Client x = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Client y = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Assert.assertTrue(x.equals(y) && y.equals(x));\n Assert.assertTrue(x.hashCode() == y.hashCode());\n }",
"@Test\n public void equalsOtherTest3() {\n assertFalse(device.equals(null));\n }",
"@Test\n public void testEquals_sameParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are equivalent\n assertThat(cellIdentityNr).isEqualTo(anotherCellIdentityNr);\n }",
"@Override\n public boolean equals(Object other) {\n if (!(other instanceof Sha256Hash)) return false;\n return Arrays.equals(bytes, ((Sha256Hash) other).bytes);\n }",
"@Test\n public void testHashAndEqualsCode() {\n ServerName hsa1 = ServerName.valueOf(\"localhost\", 1234, -1L);\n HRegionLocation hrl1 = new HRegionLocation(RegionInfoBuilder.FIRST_META_REGIONINFO, hsa1);\n HRegionLocation hrl2 = new HRegionLocation(RegionInfoBuilder.FIRST_META_REGIONINFO, hsa1);\n assertEquals(hrl1.hashCode(), hrl2.hashCode());\n assertTrue(hrl1.equals(hrl2));\n HRegionLocation hrl3 = new HRegionLocation(RegionInfoBuilder.FIRST_META_REGIONINFO, hsa1);\n assertNotSame(hrl1, hrl3);\n // They are equal because they have same location even though they are\n // carrying different regions or timestamp.\n assertTrue(hrl1.equals(hrl3));\n ServerName hsa2 = ServerName.valueOf(\"localhost\", 12345, -1L);\n HRegionLocation hrl4 = new HRegionLocation(RegionInfoBuilder.FIRST_META_REGIONINFO, hsa2);\n // These have same HRI but different locations so should be different.\n assertFalse(hrl3.equals(hrl4));\n HRegionLocation hrl5 =\n new HRegionLocation(hrl4.getRegion(), hrl4.getServerName(), hrl4.getSeqNum() + 1);\n assertTrue(hrl4.equals(hrl5));\n }",
"@Test\n public void testHash() {\n // the hash function does sha256, but I guess I don't care about implementation\n // test if two things hash to same value\n logger.trace(\"Equal strings hash to same value\");\n String hash1 = Util.hash(\"foobar\");\n String hash2 = Util.hash(\"foobar\");\n Assert.assertEquals(hash1, hash2);\n\n // test if different things hash to different value\n logger.trace(\"Unequal strings hash to different value\");\n hash1 = Util.hash(\"foobar\");\n hash2 = Util.hash(\"barfoo\");\n Assert.assertNotEquals(hash1, hash2);\n\n // test if hash length > 5 (arbitrary)\n logger.trace(\"Hash is of sufficient length to avoid collisions\");\n hash1 = Util.hash(\"baz\");\n final int length = hash1.length();\n Assert.assertTrue(length > 5);\n }",
"@Override\n public int hashCode() {\n\n return (this.device.hashCode() + this.MAC.hashCode());\n }",
"@Test\n public void testEquals_differentParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI + 1,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are different\n assertThat(cellIdentityNr).isNotEqualTo(anotherCellIdentityNr);\n }",
"private boolean checkHash(byte[] password, String hashValue) {\n\t\tint hashReps = 1000; // stretch the hash this many times\n\t\tString hashAlgorithm = \"MD5\";\n\n\t\tString endValue = new String();\n\t\ttry {\n\t\t\tMessageDigest md = MessageDigest.getInstance(hashAlgorithm);\n\t\t\tbyte[] value = password;\n\t\t\tfor (int i=0; i<hashReps; i++) { \n\t\t\t\tvalue = md.digest(value);\n\t\t\t}\n\t\t\tendValue = DatatypeConverter.printBase64Binary(value);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\tComMethods.report(\"Digest calculated is \"+endValue+\".\", simMode);\n\t\tComMethods.report(\"Actual digest associated with username is \"+hashValue+\".\", simMode);\n\n\t\treturn (endValue.equals(hashValue));\n\t}",
"public void testHashcode() {\n XYBlockRenderer r1 = new XYBlockRenderer();\n XYBlockRenderer r2 = new XYBlockRenderer();\n int h1 = r1.hashCode();\n int h2 = r2.hashCode();\n }",
"private boolean isSamePass(byte[] saved) {\n\t\t// They must have the same length.\n\t\tif ( generatedHash.length != saved.length ) return false;\n\n\t\t// Get the index where the salt starts for this user.\n\t\tint saltStart = getSaltStartIndex();\n\t\tint saltEnd = saltStart + SALT_LENGTH;\n\n\t\tfor ( int i = 0 ; i < generatedHash.length; i++ ) {\n\t\t\t// Before the salt, indexes must match up\n\t\t\tif ( i < saltStart ) if ( generatedHash[i] != saved[i] ) return false;\n\t\t\telse if ( i < saltEnd ) continue; // ignore the salt\n\t\t\telse if ( saved[i] != saved[i] ) return false;\n\t\t}\n\t\treturn true;\n\t}",
"@Test\n public void testRecordsWithDifferentStartValProduceDifferentHashCodes() throws Exception {\n setRecordFieldValue(otherRecord, \"start\", new Date(otherRecord.getStart().getTime() + 100));\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(false));\n }",
"@Test\n\t\tpublic void testhashPassword() {\n\t\t\tString actual = Professor.hashPassword(\"thePassword\");\n\t\t\tString expected = Professor.hashPassword(\"thePassword\");\n\t\t\t\n\t\t\tassertEquals(expected, actual);\n\t\t}",
"@Test\n public void equalsOtherTest4() {\n assertFalse(device.equals(\"\"));\n }",
"public static short checkSeedHashes(final short seedHashA, final short seedHashB) {\n if (seedHashA != seedHashB) {\n throw new SketchesArgumentException(\n \"Incompatible Seed Hashes. \" + Integer.toHexString(seedHashA & 0XFFFF)\n + \", \" + Integer.toHexString(seedHashB & 0XFFFF));\n }\n return seedHashA;\n }",
"@Test\n\tpublic void hashCodeSimilarObjects() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tAssert.assertEquals(key1.hashCode(), key2.hashCode());\n\t}",
"@Test\n\tpublic void test_hashCode1() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c2 = new TennisPlayer(5,\"David Ferrer\");\n\tassertTrue(c1.hashCode()==c2.hashCode());\n }",
"@Test\n\tpublic void testHashCode() {\n\t\t// Same hashcode must be returned for equal objects\n\t\tassertTrue(\"Should have same hash code\", basic.hashCode() == equalsBasic.hashCode());\n\t}",
"@Test\n @DisplayName(\"Matched\")\n public void testEqualsMatched() throws BadAttributeException {\n Settings settings = new Settings();\n assertEquals(new Settings().hashCode(), settings.hashCode());\n }",
"@Test\n\tpublic void hashCodeDifferentId() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey1.setId(2);\n\t\tAssert.assertNotEquals(key1.hashCode(), key2.hashCode());\n\t}",
"@Test\n\tpublic void test_hashCode2() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c3 = new TennisPlayer(99,\"David Ferrer\");\n\tassertTrue(c1.hashCode()!=c3.hashCode());\n }",
"public void testEquals()\n {\n // test passing null to equals returns false\n // (as specified in the JDK docs for Object)\n EthernetAddress x =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"equals(null) didn't return false\",\n x.equals((Object)null));\n \n // test passing an object which is not a EthernetAddress returns false\n assertFalse(\"x.equals(non_EthernetAddress_object) didn't return false\",\n x.equals(new Object()));\n \n // test a case where two EthernetAddresss are definitly not equal\n EthernetAddress w =\n new EthernetAddress(ANOTHER_VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == w didn't return false\",\n x == w);\n assertFalse(\"x.equals(w) didn't return false\",\n x.equals(w));\n\n // test refelexivity\n assertTrue(\"x.equals(x) didn't return true\",\n x.equals(x));\n \n // test symmetry\n EthernetAddress y =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"y.equals(x) didn't return true\",\n y.equals(x));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n \n // now we'll test transitivity\n EthernetAddress z =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertFalse(\"x == y didn't return false\",\n y == z);\n assertFalse(\"x == y didn't return false\",\n x == z);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"y.equals(z) didn't return true\",\n y.equals(z));\n assertTrue(\"x.equals(z) didn't return true\",\n x.equals(z));\n \n // test consistancy (this test is just calling equals multiple times)\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n }",
"@Test\n public void testRecordsWithDifferentEndValProduceDifferentHashCodes() throws Exception {\n setRecordFieldValue(otherRecord, \"end\", new Date(otherRecord.getEnd().getTime() + 100));\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(false));\n }",
"@Test\n public void hashCodeTest() {\n prepareEntitiesForEqualityTest();\n\n assertEquals(entity0.hashCode(), entity1.hashCode());\n }",
"public int actualHashForEqual() {\n\treturn getCategory().hashForEqual() + 1;\n/*\nudanax-top.st:15776:SequenceSpace methodsFor: 'testing'!\n{UInt32} actualHashForEqual\n\t\"is equal to any basic space on the same category of positions\"\n\t^self getCategory hashForEqual + 1!\n*/\n}",
"private static void checkEqualsAndHashCodeMethods(Object lhs, Object rhs,\n boolean expectedResult) {\n if ((lhs == null) && (rhs == null)) {\n Assert.assertTrue(\n \"Your check is dubious...why would you expect null != null?\",\n expectedResult);\n return;\n }\n\n if ((lhs == null) || (rhs == null)) {\n Assert.assertFalse(\n \"Your check is dubious...why would you expect an object \"\n + \"to be equal to null?\", expectedResult);\n }\n\n if (lhs != null) {\n assertEquals(expectedResult, lhs.equals(rhs));\n }\n if (rhs != null) {\n assertEquals(expectedResult, rhs.equals(lhs));\n }\n\n if (expectedResult) {\n String hashMessage =\n \"hashCode() values for equal objects should be the same\";\n Assert.assertTrue(hashMessage, lhs.hashCode() == rhs.hashCode());\n }\n }",
"@Test\n public void testHashingAvPassord() {\n String passordTilHash = \"passord\";\n String salt = null;\n String salt2 = null;\n try{\n salt = HashPassord.getSalt();\n salt2 = HashPassord.getSalt();\n }catch(NoSuchAlgorithmException | NoSuchProviderException | java.security.NoSuchProviderException e){\n e.printStackTrace();\n }\n String sikkertPassord = getSecurePassword(passordTilHash, salt);\n String sikkertPassord2 = getSecurePassword(passordTilHash, salt2);\n String regenerertPassordVerifisering = getSecurePassword(passordTilHash, salt);\n \n System.out.println( sikkertPassord+ \":\" + salt); //skriver 83ee5baeea20b6c21635e4ea67847f66\n System.out.println( sikkertPassord2+ \":\" + salt2);\n System.out.println(regenerertPassordVerifisering + \":\" + salt); //skriver 83ee5baeea20b6c21635e4ea67847f66\n \n assertEquals(sikkertPassord, regenerertPassordVerifisering);\n assertNotSame(salt, salt2);\n assertNotSame(sikkertPassord, sikkertPassord2);\n System.out.println(\"//TEST//: testHashingAvPassord() = funker!\");\n \n }",
"public int hashCode() {\n\t\treturn(11 * _device.hashCode() * _mount.hashCode());\n\t}",
"private static boolean slowEquals(byte[] a, byte[] b) {\r\n int diff = a.length ^ b.length;\r\n for (int i = 0; i < a.length && i < b.length; i++) {\r\n diff |= a[i] ^ b[i];\r\n }\r\n return diff == 0;\r\n }",
"private static boolean slowEquals(final byte[] a, final byte[] b) {\n int diff = a.length ^ b.length;\n for (int i = 0; i < a.length && i < b.length; i++) {\n diff |= a[i] ^ b[i];\n }\n return diff == 0;\n }",
"private boolean checkDuplicate(String macAddress) {\n\t\tfor (int i=0; i<bluetoothDevices.size(); i++) {\n\t\t\tif (macAddress.equals(bluetoothDevices.get(i).macAddress)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private boolean slowEquals(byte[] a, byte[] b)\n {\n int diff = a.length ^ b.length;\n for(int i = 0; i < a.length && i < b.length; i++)\n diff |= a[i] ^ b[i];\n return diff == 0;\n }",
"public static boolean validateHash(byte [] expectedHash, byte [] passPhrase){\r\n\t\ttry {\r\n\t\t\tMessageDigest digest = MessageDigest.getInstance(digestAlgorithm);\r\n\t\t\tbyte [] seed = Arrays.copyOfRange(expectedHash, 0, SEED_LENGTH);\r\n\t\t\tdigest.update(seed);\r\n\t\t\tdigest.update(passPhrase);\r\n\t\t\tbyte [] d = digest.digest();\r\n\t\t\tif(d.length+SEED_LENGTH != expectedHash.length) return false;\r\n\t\t\tfor(int i = 0; i < d.length; i++) {\r\n\t\t\t\tif(expectedHash[i+SEED_LENGTH] != d[i]) return false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} catch (NoSuchAlgorithmException e) {\r\n\t\t\t// should not happen\r\n\t\t\tthrow new ModelException(\"Internal Error - Unknown algorithm \"+EncryptionUtility.digestAlgorithm);\r\n\t\t}\r\n\t}",
"private static boolean slowEquals(byte[] a, byte[] b) {\n\t int diff = a.length ^ b.length;\n\t for(int i = 0; i < a.length && i < b.length; i++)\n\t diff |= a[i] ^ b[i];\n\t return diff == 0;\n\t }",
"public boolean check_hash() {\n HashSet<E> realSet = new HashSet(this);\n return realSet.size() == this.size();\n }",
"@Test\n public void testHashCode() {\n LOGGER.info(\"testHashCode\");\n final String value = \"Hello\";\n final int actual = new AtomString(value).hashCode();\n final int expected = 61 * 7 + Objects.hashCode(value);\n assertEquals(expected, actual);\n }",
"private static Boolean checkingPassword(String passwordHash, String Salt, String tryingPassword) throws NoSuchAlgorithmException, InvalidKeySpecException {\n //stores the old salt an hash\n byte[] salt = fromHex(Salt);\n byte[] hash = fromHex(passwordHash);\n //makes a new has for the trying password with the old salt\n PBEKeySpec spec = new PBEKeySpec(tryingPassword.toCharArray(), salt, 1000, hash.length * 8);\n SecretKeyFactory skf = SecretKeyFactory.getInstance(\"PBKDF2WithHmacSHA1\");\n byte[] testHash = skf.generateSecret(spec).getEncoded();\n //checking for differences\n int differece = hash.length ^ testHash.length;\n for(int i = 0; i < hash.length && i < testHash.length; i++)\n {\n differece |= hash[i] ^ testHash[i];\n }\n //returns if they are different\n return differece == 0;\n }",
"@Test\n\tpublic void equalsSimilarObjects() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tboolean equals = key1.equals(key2);\n\t\tSystem.out.println();\n\t\tAssert.assertTrue(equals);\n\t}",
"@Test\n public void testCreateSha1() throws Exception {\n MessageDigest sha1 = MessageDigest.getInstance(MASTER_KEY_GENERATION_ALG);\n byte[] sha1Result = sha1.digest(SHA_1_INPUT);\n assertFalse(Arrays.equals(SHA_1_INPUT, sha1Result));\n }",
"@Test\n\tpublic void hashCodeSameObject() {\n\t\tProductScanImageURIKey key = this.getDefaultKey();\n\t\tAssert.assertEquals(key.hashCode(), key.hashCode());\n\t}",
"@Test\n public void equals_DifferentUserId_Test() {\n Assert.assertFalse(bq1.equals(bq2));\n }",
"private boolean isEqual(int[] x, int[] y) {\n for (int i = 0; i < 3; i++) {\n if (x[i] != y[i]) {\n return false;\n }\n }\n return true;\n }",
"static boolean isDuplicated(String mac) {\n for (DeviceDetail detail : deviceDetails) {\n if (detail.macAddress.equals(mac)) {\n return true;\n }\n }\n return false;\n }",
"@Test\n\tpublic void hashCodeDifferentSequenceNumber() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey1.setSequenceNumber(2);\n\t\tAssert.assertNotEquals(key1.hashCode(), key2.hashCode());\n\t}",
"@Test\n public void testHash() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\t\tint hash = l.hash(\"boo\");\n\t\tint result = 1428150834;\n\t\tassertEquals(result, hash);\n }",
"@Test\n public void equals2() throws Exception {\n SmartPlayer x = new SmartPlayer(0, 1);\n SmartPlayer y = new SmartPlayer(0, 2);\n assertFalse(x.equals(y));\n }",
"@Test\n public void testHashCode() {\n System.out.println(\"Animal.hashCode\");\n assertEquals(471, animal1.hashCode());\n assertEquals(384, animal2.hashCode());\n }",
"@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n SubtenantApiKey subtenantapikey1 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n SubtenantApiKey subtenantapikey2 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n assertNotNull(subtenantapikey1);\n assertNotNull(subtenantapikey2);\n assertNotSame(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2.hashCode(), subtenantapikey1.hashCode());\n int hashCode = subtenantapikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, subtenantapikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }",
"public static boolean timingSafeEquals(String first, String second) {\n if (first == null) {\n return second == null;\n } else if (second == null) {\n return false;\n } else if (second.length() <= 0) {\n return first.length() <= 0;\n }\n char[] firstChars = first.toCharArray();\n char[] secondChars = second.toCharArray();\n char result = (char) ((firstChars.length == secondChars.length) ? 0 : 1);\n int j = 0;\n for (int i = 0; i < firstChars.length; ++i) {\n result |= firstChars[i] ^ secondChars[j];\n j = (j + 1) % secondChars.length;\n }\n return result == 0;\n }",
"public boolean isDuplicate(IDecodedDeviceRequest<?> request) throws SiteWhereException;",
"@Test\n public void equals() throws Exception {\n SmartPlayer x = new SmartPlayer(0, 0);\n SmartPlayer y = new SmartPlayer(0, 0);\n assertTrue(x.equals(y));\n }",
"@Test\n public void testHashCodeEquals() {\n DvThresholdCrossingEvent tce = createThresholdCrossingEvent(KEPLER_ID,\n EPOCH_MJD, ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertEquals(thresholdCrossingEvent, tce);\n assertEquals(thresholdCrossingEvent.hashCode(), tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID + 1, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD + 1,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD + 1, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION + 1,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA + 1, MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK, WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA + 1,\n PIPELINE_TASK, WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA,\n createPipelineTask(PIPELINE_TASK_ID + 1), WEAK_SECONDARY,\n CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2,\n ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS + 1, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES + 1,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS + 1, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES + 1, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD + 1, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES + 1, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT + 1,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC + 1), CHI_SQUARE_1,\n CHI_SQUARE_2, CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1 + 1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2 + 1, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1 + 1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2 + 1, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC + 1, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES + 1);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n }",
"public static boolean timingSafeEquals(CharSequence first, CharSequence second) {\n if (first == null) {\n return second == null;\n } else if (second == null) {\n return false;\n } else if (second.length() <= 0) {\n return first.length() <= 0;\n }\n int firstLength = first.length();\n int secondLength = second.length();\n char result = (char) ((firstLength == secondLength) ? 0 : 1);\n int j = 0;\n for (int i = 0; i < firstLength; ++i) {\n result |= first.charAt(i) ^ second.charAt(j);\n j = (j + 1) % secondLength;\n }\n return result == 0;\n }",
"@Override\r\n public boolean equals(Object o) {\r\n if(this == o) return true;\r\n if( !(o instanceof MobileDevice)) return false;\r\n \r\n MobileDevice md = (MobileDevice)o;\r\n \r\n if(this.deviceName != md.deviceName) return false;\r\n if(this.valueTag != md.valueTag) return false;\r\n if(this.lab != md.lab) return false;\r\n if(this.rentSettings != md.rentSettings) return false;\r\n \r\n return true;\r\n }",
"public static void main(String[] args) {\n SecureRandom random = new SecureRandom();\n random.nextBytes(hash);\n data = new byte[hash.length + 1];\n System.arraycopy(hash, 0, data, 0, hash.length);\n long c = 0;\n while (true) {\n recalculateData();\n byte[] dataHash = crc32AsByteArray(data);\n if (c % 10000000 == 0) {\n System.out.println(\"Calculated \" + c + \" hashes\");\n System.out.println(\"Data: \" + byteArrayToHex(data));\n System.out.println(\"Original hash: \" + byteArrayToHex(hash) + \" new hash: \" + byteArrayToHex(dataHash));\n\n }\n if (Arrays.equals(hash, dataHash)) {\n System.out.println(\"Found a match!\");\n System.out.println(\"Data: \" + byteArrayToHex(data));\n System.out.println(\"Original hash: \" + byteArrayToHex(hash) + \" new hash: \" + byteArrayToHex(dataHash));\n break;\n }\n c++;\n }\n }",
"private static boolean validatePassword(String originalPassword, String storedPassword) throws NoSuchAlgorithmException, InvalidKeySpecException\n {\n String[] parts = storedPassword.split(\":\");\n int iterations = Integer.parseInt(parts[0]);\n byte[] salt = fromHex(parts[1]);\n byte[] hash = fromHex(parts[2]);\n\n PBEKeySpec spec = new PBEKeySpec(originalPassword.toCharArray(), salt, iterations, hash.length * 8);\n SecretKeyFactory skf = SecretKeyFactory.getInstance(\"PBKDF2WithHmacSHA1\");\n byte[] testHash = skf.generateSecret(spec).getEncoded();\n\n int diff = hash.length ^ testHash.length;\n for(int i = 0; i < hash.length && i < testHash.length; i++)\n {\n diff |= hash[i] ^ testHash[i];\n }\n return diff == 0;\n }",
"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\tpublic void testSampleEquals() {\n\n\t\tassertTrue(square.equals(squareRotate));\n\t\t\n\t\tassertTrue(pyr1.equals(pyr5));\n\t\t\n\t\tassertTrue(s.equals(sInitial));\n\t\tassertFalse(stick.equals(stickRotated));\n\t\tassertFalse(s.equals(sRotated));\n\n\n\t}",
"private boolean isCheckSumEquals(MessageDigest md, String checkSumValue) {\n byte[] digest = md.digest();\r\n String checksum = Utility.byteArraytoHexString(digest);\r\n LOG.debug(\"Checksums: send[\" + checkSumValue + \"] file[\" + checksum + \"]\");\r\n \r\n return checksum.equals(checkSumValue);\r\n }",
"private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof RegistrationItems)) {\n return false;\n }\n RegistrationItems that = (RegistrationItems) other;\n Object myRegItemUid = this.getRegItemUid();\n Object yourRegItemUid = that.getRegItemUid();\n if (myRegItemUid==null ? yourRegItemUid!=null : !myRegItemUid.equals(yourRegItemUid)) {\n return false;\n }\n return true;\n }",
"static boolean equal (String s1, String s2) {\r\n if (s1==errorSignature) return true;\r\n if (s2==errorSignature) return true;\r\n if (s1==null || s1.length()==0)\r\n return s2==null || s2.length()==0;\r\n return s1.equals (s2);\r\n }",
"@Test\n public void testEqualsReturnsTrueOnIdenticalRecords() {\n boolean equals = record.equals(otherRecord);\n\n assertThat(equals, is(true));\n }",
"@Test\n\tpublic void testDeckHashCodeAgain() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tVegasDeckClass testDeck = new VegasDeckClass();\n\t\t\t\n\t\tassertNotEquals(\"hashCode method not working as expected\", oneDeck.hashCode(), testDeck.hashCode());\n\t}",
"public static void main(String[] args) throws Exception {\r\n\t\tSystem.out.println(\"Test ist bestanden, wenn es keine false-Ausgaben gibt:\");\r\n\t\tString masterPassword = \"myMasterPassword\";\r\n\t\tString passwordInput1 = \"myPassword123\";\r\n\r\n\t\tString hashValue = new HashString(masterPassword).hashString(passwordInput1);\r\n\t\tSystem.out.println(hashValue);\r\n\r\n\t\tString passwordInput2 = \"myPassword123\";\r\n\r\n\t\tSystem.out.println(hashValue.equals(new HashString(masterPassword).hashString(passwordInput2)));\r\n\r\n\t\tSystem.out.println(!hashValue.equals(new HashString(masterPassword + \"asdf\").hashString(passwordInput2)));\r\n\t\tSystem.out.println(!hashValue.equals(new HashString(masterPassword).hashString(passwordInput2 + \"asdf\")));\r\n\r\n\t}",
"@Test\n public void testHashCode() {\n assertEquals(uniqueParticipantList.hashCode(), uniqueParticipantList.hashCode());\n\n // different lists -> returns different hashcode\n secondUniqueParticipantList.add(BERNICE);\n assertNotEquals(uniqueParticipantList.hashCode(), secondUniqueParticipantList.hashCode());\n }",
"@Test\n public void testCreateHmacSha1() throws Exception {\n Mac macAlgorithm = Mac.getInstance(MAC_ALGORITHM_STRING);\n macAlgorithm.init(new SecretKeySpec(K_AUT, MAC_ALGORITHM_STRING));\n byte[] mac = macAlgorithm.doFinal(MAC_INPUT);\n assertFalse(Arrays.equals(MAC_INPUT, mac));\n }",
"private static boolean equals(int[] array1, int[] array2) {\n if(array1.length != array2.length)\n return false;\n \n Arrays.sort(array1);\n Arrays.sort(array2);\n \n int i = 0;\n for(; i < array1.length; ++i) {\n if(array1[i] != array2[i])\n break;\n }\n \n return (i == array1.length);\n }",
"public static boolean verify_hash(byte[] messageHash, SecretKeySpec keySpec)\n {\n\tboolean ret = false;\n\t\t\n\ttry {\n\t // Split the array into the message and the digest\n\t byte[] message = new byte[messageHash.length - HMAC_SHA1_LEN];\n\t byte[] hash = new byte[HMAC_SHA1_LEN];\n\t\t\t\n\t System.arraycopy(messageHash, 0, message, 0, message.length);\n\t System.arraycopy(messageHash, message.length, hash, 0, hash.length);\n\t\t\t\n\t // Initialize the MAC with the given key\n\t Mac mac = Mac.getInstance(\"HmacSHA1\");\n\t mac.init(keySpec);\n\t\t\t\n\t // Get the MAC of the message\n\t byte[] m = mac.doFinal(message);\n\t\t\t\n\t // compare the the MAC sent and the one calculated\n\t ret = Arrays.equals(m, hash);\n\t\t\t\n\t} catch (Exception e) {\n\t // if there is an error, we know that hash can't be correct\n\t ret = false;\n\t}\n\t\t\n\treturn ret;\n }",
"private static boolean compareByteArray(byte[] a1, byte[] a2, int length){\n for (int i = 0 ; i < length ; i++){\n if(a1[i] != a2[i])\n return false;\n else\n System.out.println(\"-------------------GOOD ---[ \"+ i);// log feedback\n }\n return true;\n }",
"@Test\n public void testHashCode() {\n ChatMessage differentMessage = new ChatMessage(\"Javache\", \"JaJa!\");\n assertNotSame(chatMessage.hashCode(), differentMessage.hashCode());\n }",
"@Test\n\tpublic void equalsNullIdBoth() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tkey1.setId(LONG_ZERO);\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey2.setId(LONG_ZERO);\n\t\tboolean equals = key1.equals(key2);\n\t\tAssert.assertTrue(equals);\n\t}",
"@Override\n public int hashCode() {\n return dstip.hashCode() ^ dstport.hashCode();\n }",
"public static boolean same(int[] a, int[] b) {\r\n \treturn (a[0] == b[0] && a[1] == b[1]) || (a[0] == b[1] && a[1] == b[0]);\r\n }",
"public static boolean slowEquals(byte[] a, byte[] b) {\n int diff = a.length ^ b.length;\n for (int i = 0; i < a.length && i < b.length; i++)\n diff |= a[i] ^ b[i];\n return diff == 0;\n }",
"boolean checkSignature(long sig0, long sig1, long sig2) throws Exception {\n Integer[] sig = new Integer[3];\n\t /* Get signature */\n readSignature(sig);\n\t /* Compare signature */\n if (sig[0] != sig0 || sig[1] != sig1 || sig[2] != sig2) {\n throw new Exception(\"Signature does not match selected device! \");\n }\n return true; // Indicate supported command.\n }",
"@Test\n\tpublic void equalsAndHashcode() {\n\t\tCollisionItemAdapter<Body, BodyFixture> item1 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\tCollisionItemAdapter<Body, BodyFixture> item2 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\t\n\t\tBody b1 = new Body();\n\t\tBody b2 = new Body();\n\t\tBodyFixture b1f1 = b1.addFixture(Geometry.createCircle(0.5));\n\t\tBodyFixture b2f1 = b2.addFixture(Geometry.createCircle(0.5));\n\t\t\n\t\titem1.set(b1, b1f1);\n\t\titem2.set(b1, b1f1);\n\t\t\n\t\tTestCase.assertTrue(item1.equals(item2));\n\t\tTestCase.assertEquals(item1.hashCode(), item2.hashCode());\n\t\t\n\t\titem2.set(b2, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t\t\n\t\titem2.set(b1, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t}",
"@Override\n public boolean equals(Object obj) {\n if(obj instanceof Devices)\n {\n Devices temp = (Devices) obj;\n if(this.device==temp.getDevice() && this.MAC ==temp.getMAC())\n return true;\n }\n return false;\n\n }",
"public boolean isBothPasswordCorrect() { \n String pass1 = new String(newPasswordTextField.getPassword());\n String pass2 = new String(repeatPasswordTextField.getPassword()); \n \n return (pass1.equals(pass2) && isPasswordCorrect());\n }",
"@Test\n\tpublic void testDeckHashCode() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tStandardDeckClass testDeck = new StandardDeckClass();\n\t\t\n\t\tassertEquals(\"hashcode method not working as expected\", oneDeck.hashCode(), testDeck.hashCode());\n\t}",
"@Test\n\tpublic void test_equals2() {\n\tTennisPlayer c1 = new TennisPlayer(11,\"Joe Tsonga\");\n\tTennisPlayer c2 = new TennisPlayer(521,\"Joe Tsonga\");\n\tassertFalse(c1.equals(c2));\n }",
"private Boolean checkMessageisRight(byte[] macmessage, byte[] takenmessage, SecretKey encryptionkey) throws Exception\n {\n byte[] mac = macAlgorithm(encryptionkey, takenmessage);\n boolean ret = Arrays.equals(mac, macmessage);\n return ret;\n }",
"@Test\n\tpublic void equalsNullSequenceNumberBoth() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tkey1.setSequenceNumber(LONG_ZERO);\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey2.setSequenceNumber(LONG_ZERO);\n\t\tboolean equals = key1.equals(key2);\n\t\tAssert.assertTrue(equals);\n\t}"
]
| [
"0.7091553",
"0.6909622",
"0.67390656",
"0.6736852",
"0.65169066",
"0.6452409",
"0.6311655",
"0.6083775",
"0.606526",
"0.60417056",
"0.6014551",
"0.5967826",
"0.596443",
"0.59623533",
"0.5937611",
"0.5921317",
"0.59076154",
"0.5881171",
"0.584627",
"0.5841183",
"0.5834691",
"0.5831744",
"0.5810022",
"0.5771089",
"0.5770339",
"0.5744799",
"0.5734686",
"0.5716189",
"0.57021695",
"0.5647274",
"0.5645253",
"0.56417954",
"0.5641291",
"0.5636859",
"0.5615281",
"0.55998933",
"0.55954003",
"0.5591277",
"0.55800146",
"0.5577766",
"0.556621",
"0.5562195",
"0.55455256",
"0.55421966",
"0.5540208",
"0.55397993",
"0.55162585",
"0.5503909",
"0.55003387",
"0.54954267",
"0.5492162",
"0.54774106",
"0.5466754",
"0.5464724",
"0.54640555",
"0.5460185",
"0.54540974",
"0.54518235",
"0.54472655",
"0.5446761",
"0.543755",
"0.5436362",
"0.543197",
"0.5427532",
"0.5423276",
"0.53969294",
"0.5386144",
"0.5377266",
"0.53756636",
"0.5361794",
"0.5359835",
"0.5350272",
"0.53429633",
"0.53392714",
"0.53310996",
"0.5328347",
"0.53172946",
"0.53146243",
"0.5313846",
"0.5312612",
"0.5309944",
"0.5306131",
"0.5300066",
"0.5276769",
"0.52739656",
"0.526729",
"0.5263713",
"0.5262236",
"0.52606934",
"0.52576107",
"0.5256129",
"0.52542657",
"0.5247768",
"0.5247428",
"0.5247368",
"0.5236907",
"0.52367634",
"0.5236437",
"0.52343625",
"0.5231326"
]
| 0.7249519 | 0 |
Verify that the hashcode for two different devices is NOT the same. | @Test
public void hashCodeTest2() {
Device device2 = new Device("other", token);
assertNotEquals(device.hashCode(), device2.hashCode());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n void testDifferentHashCodes() {\n assertNotEquals(loginRequest1.hashCode(), loginRequest2.hashCode());\n }",
"@Test\n public void testRecordsWithDifferentIDsProduceDifferentHashCodes() throws Exception {\n setRecordFieldValue(otherRecord, \"id\", 42L);\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(false));\n }",
"@Test\n public void hashCodeTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device.hashCode(), device2.hashCode());\n }",
"@Test\n public void testHashcodeReturnsSameValueForIdenticalRecords() {\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(true));\n }",
"@Test\n public void equalsOtherTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device, device2);\n }",
"@Test\n public void equalsOtherTest() {\n Device device2 = new Device(deviceID, \"other\");\n assertNotEquals(device, device2);\n }",
"@Test\n public void testKeyEquivalence() throws Exception {\n ScanResultMatchInfo matchInfo1 = ScanResultMatchInfo.fromWifiConfiguration(mConfig1);\n ScanResultMatchInfo matchInfo1Prime = ScanResultMatchInfo.fromWifiConfiguration(mConfig1);\n ScanResultMatchInfo matchInfo2 = ScanResultMatchInfo.fromWifiConfiguration(mConfig2);\n assertFalse(matchInfo1 == matchInfo1Prime); // Checking assumption\n MacAddress mac1 = MacAddressUtils.createRandomUnicastAddress();\n MacAddress mac2 = MacAddressUtils.createRandomUnicastAddress();\n assertNotEquals(mac1, mac2); // really tiny probability of failing here\n\n WifiCandidates.Key key1 = new WifiCandidates.Key(matchInfo1, mac1, 1);\n\n assertFalse(key1.equals(null));\n assertFalse(key1.equals((Integer) 0));\n // Same inputs should give equal results\n assertEquals(key1, new WifiCandidates.Key(matchInfo1, mac1, 1));\n // Equal inputs should give equal results\n assertEquals(key1, new WifiCandidates.Key(matchInfo1Prime, mac1, 1));\n // Hash codes of equal things should be equal\n assertEquals(key1.hashCode(), key1.hashCode());\n assertEquals(key1.hashCode(), new WifiCandidates.Key(matchInfo1, mac1, 1).hashCode());\n assertEquals(key1.hashCode(), new WifiCandidates.Key(matchInfo1Prime, mac1, 1).hashCode());\n\n // Unequal inputs should give unequal results\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo2, mac1, 1)));\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo1, mac2, 1)));\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo1, mac1, 2)));\n }",
"@Test\n void testSameHashCodes() {\n assertEquals(loginRequest1.hashCode(), loginRequest1.hashCode());\n }",
"@Test\n\tpublic void test_hashCode2() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t3 = new TvShow(\"NotSherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()!=t3.hashCode());\n }",
"@Test\n public void equals_DifferentUserId_Test() {\n Assert.assertFalse(bq1.equals(bq2));\n }",
"@Test\n public void testRecordsWithDifferentEndValProduceDifferentHashCodes() throws Exception {\n setRecordFieldValue(otherRecord, \"end\", new Date(otherRecord.getEnd().getTime() + 100));\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(false));\n }",
"@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n ApiKey apikey1 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n ApiKey apikey2 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n assertNotNull(apikey1);\n assertNotNull(apikey2);\n assertNotSame(apikey2, apikey1);\n assertEquals(apikey2, apikey1);\n assertEquals(apikey2.hashCode(), apikey1.hashCode());\n int hashCode = apikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, apikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }",
"@Test\n\tpublic void hashCodeDifferentId() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey1.setId(2);\n\t\tAssert.assertNotEquals(key1.hashCode(), key2.hashCode());\n\t}",
"@Test\n public void testRecordsWithDifferentStartValProduceDifferentHashCodes() throws Exception {\n setRecordFieldValue(otherRecord, \"start\", new Date(otherRecord.getStart().getTime() + 100));\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(false));\n }",
"@Test\n public void equalsOtherTest3() {\n assertFalse(device.equals(null));\n }",
"@Test\n public void testHashingAvPassord() {\n String passordTilHash = \"passord\";\n String salt = null;\n String salt2 = null;\n try{\n salt = HashPassord.getSalt();\n salt2 = HashPassord.getSalt();\n }catch(NoSuchAlgorithmException | NoSuchProviderException | java.security.NoSuchProviderException e){\n e.printStackTrace();\n }\n String sikkertPassord = getSecurePassword(passordTilHash, salt);\n String sikkertPassord2 = getSecurePassword(passordTilHash, salt2);\n String regenerertPassordVerifisering = getSecurePassword(passordTilHash, salt);\n \n System.out.println( sikkertPassord+ \":\" + salt); //skriver 83ee5baeea20b6c21635e4ea67847f66\n System.out.println( sikkertPassord2+ \":\" + salt2);\n System.out.println(regenerertPassordVerifisering + \":\" + salt); //skriver 83ee5baeea20b6c21635e4ea67847f66\n \n assertEquals(sikkertPassord, regenerertPassordVerifisering);\n assertNotSame(salt, salt2);\n assertNotSame(sikkertPassord, sikkertPassord2);\n System.out.println(\"//TEST//: testHashingAvPassord() = funker!\");\n \n }",
"@Override\r\n\tpublic boolean sameIdentityAs(Device other) {\n\t\treturn false;\r\n\t}",
"private static boolean equalityTest5(String a, String b)\n {\n return a.hashCode() == b.hashCode();\n }",
"private static boolean equalityTest3(String a, String b)\n {\n return System.identityHashCode(a) == System.identityHashCode(b);\n }",
"@Test\n public void equalsOtherTest4() {\n assertFalse(device.equals(\"\"));\n }",
"@Test\n public void testEquals_differentParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI + 1,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are different\n assertThat(cellIdentityNr).isNotEqualTo(anotherCellIdentityNr);\n }",
"@Test\n public void equalsSameTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device, device2);\n }",
"@Test\n public void testHashCode() {\n ChatMessage differentMessage = new ChatMessage(\"Javache\", \"JaJa!\");\n assertNotSame(chatMessage.hashCode(), differentMessage.hashCode());\n }",
"@Test\n public void equals_DifferentDiningHallBitfield_Test() {\n Assert.assertFalse(bq1.equals(bq6));\n Assert.assertFalse(bq1.equals(bq7));\n }",
"public static short checkSeedHashes(final short seedHashA, final short seedHashB) {\n if (seedHashA != seedHashB) {\n throw new SketchesArgumentException(\n \"Incompatible Seed Hashes. \" + Integer.toHexString(seedHashA & 0XFFFF)\n + \", \" + Integer.toHexString(seedHashB & 0XFFFF));\n }\n return seedHashA;\n }",
"@Test\n\tpublic void hashCodeDifferentSequenceNumber() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey1.setSequenceNumber(2);\n\t\tAssert.assertNotEquals(key1.hashCode(), key2.hashCode());\n\t}",
"@Test\n\tpublic void test_hashCode1() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"Sherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()==t2.hashCode());\n }",
"private static boolean validatePassword(String originalPassword, String storedPassword) throws NoSuchAlgorithmException, InvalidKeySpecException\n {\n String[] parts = storedPassword.split(\":\");\n int iterations = Integer.parseInt(parts[0]);\n byte[] salt = fromHex(parts[1]);\n byte[] hash = fromHex(parts[2]);\n\n PBEKeySpec spec = new PBEKeySpec(originalPassword.toCharArray(), salt, iterations, hash.length * 8);\n SecretKeyFactory skf = SecretKeyFactory.getInstance(\"PBKDF2WithHmacSHA1\");\n byte[] testHash = skf.generateSecret(spec).getEncoded();\n\n int diff = hash.length ^ testHash.length;\n for(int i = 0; i < hash.length && i < testHash.length; i++)\n {\n diff |= hash[i] ^ testHash[i];\n }\n return diff == 0;\n }",
"private static Boolean checkingPassword(String passwordHash, String Salt, String tryingPassword) throws NoSuchAlgorithmException, InvalidKeySpecException {\n //stores the old salt an hash\n byte[] salt = fromHex(Salt);\n byte[] hash = fromHex(passwordHash);\n //makes a new has for the trying password with the old salt\n PBEKeySpec spec = new PBEKeySpec(tryingPassword.toCharArray(), salt, 1000, hash.length * 8);\n SecretKeyFactory skf = SecretKeyFactory.getInstance(\"PBKDF2WithHmacSHA1\");\n byte[] testHash = skf.generateSecret(spec).getEncoded();\n //checking for differences\n int differece = hash.length ^ testHash.length;\n for(int i = 0; i < hash.length && i < testHash.length; i++)\n {\n differece |= hash[i] ^ testHash[i];\n }\n //returns if they are different\n return differece == 0;\n }",
"@Test\n\tpublic void test_equals2() {\n\tTennisPlayer c1 = new TennisPlayer(11,\"Joe Tsonga\");\n\tTennisPlayer c2 = new TennisPlayer(521,\"Joe Tsonga\");\n\tassertFalse(c1.equals(c2));\n }",
"private static boolean areEqual (byte[] a, byte[] b) {\r\n int aLength = a.length;\r\n if (aLength != b.length)\r\n return false;\r\n for (int i = 0; i < aLength; i++)\r\n if (a[i] != b[i])\r\n return false;\r\n return true;\r\n }",
"private static boolean slowEquals(final byte[] a, final byte[] b) {\n int diff = a.length ^ b.length;\n for (int i = 0; i < a.length && i < b.length; i++) {\n diff |= a[i] ^ b[i];\n }\n return diff == 0;\n }",
"private static boolean slowEquals(byte[] a, byte[] b) {\r\n int diff = a.length ^ b.length;\r\n for (int i = 0; i < a.length && i < b.length; i++) {\r\n diff |= a[i] ^ b[i];\r\n }\r\n return diff == 0;\r\n }",
"private boolean slowEquals(byte[] a, byte[] b)\n {\n int diff = a.length ^ b.length;\n for(int i = 0; i < a.length && i < b.length; i++)\n diff |= a[i] ^ b[i];\n return diff == 0;\n }",
"@Test\n\tpublic void test_equals2() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"NotSherlock\",\"BBC\");\n\tassertFalse(t1.equals(t2));\n }",
"@Test\n public void equals2() throws Exception {\n SmartPlayer x = new SmartPlayer(0, 1);\n SmartPlayer y = new SmartPlayer(0, 2);\n assertFalse(x.equals(y));\n }",
"private boolean checkHash(byte[] password, String hashValue) {\n\t\tint hashReps = 1000; // stretch the hash this many times\n\t\tString hashAlgorithm = \"MD5\";\n\n\t\tString endValue = new String();\n\t\ttry {\n\t\t\tMessageDigest md = MessageDigest.getInstance(hashAlgorithm);\n\t\t\tbyte[] value = password;\n\t\t\tfor (int i=0; i<hashReps; i++) { \n\t\t\t\tvalue = md.digest(value);\n\t\t\t}\n\t\t\tendValue = DatatypeConverter.printBase64Binary(value);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\tComMethods.report(\"Digest calculated is \"+endValue+\".\", simMode);\n\t\tComMethods.report(\"Actual digest associated with username is \"+hashValue+\".\", simMode);\n\n\t\treturn (endValue.equals(hashValue));\n\t}",
"@Test\n\tpublic void testEqualsFalso() {\n\t\t\n\t\tassertFalse(contato1.equals(contato2));\n\t}",
"@Test\n\tpublic void test_hashCode2() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c3 = new TennisPlayer(99,\"David Ferrer\");\n\tassertTrue(c1.hashCode()!=c3.hashCode());\n }",
"private static boolean slowEquals(byte[] a, byte[] b) {\n\t int diff = a.length ^ b.length;\n\t for(int i = 0; i < a.length && i < b.length; i++)\n\t diff |= a[i] ^ b[i];\n\t return diff == 0;\n\t }",
"@Override\n public boolean equals(Object other) {\n if (!(other instanceof Sha256Hash)) return false;\n return Arrays.equals(bytes, ((Sha256Hash) other).bytes);\n }",
"@Test\n public void testHash() {\n // the hash function does sha256, but I guess I don't care about implementation\n // test if two things hash to same value\n logger.trace(\"Equal strings hash to same value\");\n String hash1 = Util.hash(\"foobar\");\n String hash2 = Util.hash(\"foobar\");\n Assert.assertEquals(hash1, hash2);\n\n // test if different things hash to different value\n logger.trace(\"Unequal strings hash to different value\");\n hash1 = Util.hash(\"foobar\");\n hash2 = Util.hash(\"barfoo\");\n Assert.assertNotEquals(hash1, hash2);\n\n // test if hash length > 5 (arbitrary)\n logger.trace(\"Hash is of sufficient length to avoid collisions\");\n hash1 = Util.hash(\"baz\");\n final int length = hash1.length();\n Assert.assertTrue(length > 5);\n }",
"@Test\n \tpublic void testNotEqual() {\n \t\tAssert.assertFalse(f1.equals(f2));\n \t}",
"@Test\n void testEqualsFalse() {\n assertFalse(loginRequest1.equals(loginRequest2));\n }",
"public void testHashcode() {\n XYBlockRenderer r1 = new XYBlockRenderer();\n XYBlockRenderer r2 = new XYBlockRenderer();\n int h1 = r1.hashCode();\n int h2 = r2.hashCode();\n }",
"public static boolean validateHash(byte [] expectedHash, byte [] passPhrase){\r\n\t\ttry {\r\n\t\t\tMessageDigest digest = MessageDigest.getInstance(digestAlgorithm);\r\n\t\t\tbyte [] seed = Arrays.copyOfRange(expectedHash, 0, SEED_LENGTH);\r\n\t\t\tdigest.update(seed);\r\n\t\t\tdigest.update(passPhrase);\r\n\t\t\tbyte [] d = digest.digest();\r\n\t\t\tif(d.length+SEED_LENGTH != expectedHash.length) return false;\r\n\t\t\tfor(int i = 0; i < d.length; i++) {\r\n\t\t\t\tif(expectedHash[i+SEED_LENGTH] != d[i]) return false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} catch (NoSuchAlgorithmException e) {\r\n\t\t\t// should not happen\r\n\t\t\tthrow new ModelException(\"Internal Error - Unknown algorithm \"+EncryptionUtility.digestAlgorithm);\r\n\t\t}\r\n\t}",
"@Test\n\tpublic void testLessDifficulty()\n\t{\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(5, 212));\t\n\t}",
"@Test\n\t\tpublic void testhashPassword() {\n\t\t\tString actual = Professor.hashPassword(\"thePassword\");\n\t\t\tString expected = Professor.hashPassword(\"thePassword\");\n\t\t\t\n\t\t\tassertEquals(expected, actual);\n\t\t}",
"public static boolean timingSafeEquals(String first, String second) {\n if (first == null) {\n return second == null;\n } else if (second == null) {\n return false;\n } else if (second.length() <= 0) {\n return first.length() <= 0;\n }\n char[] firstChars = first.toCharArray();\n char[] secondChars = second.toCharArray();\n char result = (char) ((firstChars.length == secondChars.length) ? 0 : 1);\n int j = 0;\n for (int i = 0; i < firstChars.length; ++i) {\n result |= firstChars[i] ^ secondChars[j];\n j = (j + 1) % secondChars.length;\n }\n return result == 0;\n }",
"boolean hasSameAs();",
"@Override\n public int hashCode() {\n\n return (this.device.hashCode() + this.MAC.hashCode());\n }",
"private boolean isSamePass(byte[] saved) {\n\t\t// They must have the same length.\n\t\tif ( generatedHash.length != saved.length ) return false;\n\n\t\t// Get the index where the salt starts for this user.\n\t\tint saltStart = getSaltStartIndex();\n\t\tint saltEnd = saltStart + SALT_LENGTH;\n\n\t\tfor ( int i = 0 ; i < generatedHash.length; i++ ) {\n\t\t\t// Before the salt, indexes must match up\n\t\t\tif ( i < saltStart ) if ( generatedHash[i] != saved[i] ) return false;\n\t\t\telse if ( i < saltEnd ) continue; // ignore the salt\n\t\t\telse if ( saved[i] != saved[i] ) return false;\n\t\t}\n\t\treturn true;\n\t}",
"@Test\n\tpublic void test_hashCode1() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c2 = new TennisPlayer(5,\"David Ferrer\");\n\tassertTrue(c1.hashCode()==c2.hashCode());\n }",
"public static void assertInEqualStrict( Object expected, Object actual ){\r\n\t\tassertInEqual( expected, actual );\r\n\t\tassertTrue( \r\n\t\t\tString.format(\"%s.hashcode() is expected to be inequal to %s.hashcode()\", expected, actual), \r\n\t\t\t!expected.equals(actual) );\t\r\n\t}",
"@Test\n public void testHashAndEqualsCode() {\n ServerName hsa1 = ServerName.valueOf(\"localhost\", 1234, -1L);\n HRegionLocation hrl1 = new HRegionLocation(RegionInfoBuilder.FIRST_META_REGIONINFO, hsa1);\n HRegionLocation hrl2 = new HRegionLocation(RegionInfoBuilder.FIRST_META_REGIONINFO, hsa1);\n assertEquals(hrl1.hashCode(), hrl2.hashCode());\n assertTrue(hrl1.equals(hrl2));\n HRegionLocation hrl3 = new HRegionLocation(RegionInfoBuilder.FIRST_META_REGIONINFO, hsa1);\n assertNotSame(hrl1, hrl3);\n // They are equal because they have same location even though they are\n // carrying different regions or timestamp.\n assertTrue(hrl1.equals(hrl3));\n ServerName hsa2 = ServerName.valueOf(\"localhost\", 12345, -1L);\n HRegionLocation hrl4 = new HRegionLocation(RegionInfoBuilder.FIRST_META_REGIONINFO, hsa2);\n // These have same HRI but different locations so should be different.\n assertFalse(hrl3.equals(hrl4));\n HRegionLocation hrl5 =\n new HRegionLocation(hrl4.getRegion(), hrl4.getServerName(), hrl4.getSeqNum() + 1);\n assertTrue(hrl4.equals(hrl5));\n }",
"public void testUnmatchedPassword() {\n\n // unmatched length\n boolean test1 = UserService.checkPasswordMatch(\"password123\", \"ppassword123\");\n assertFalse(test1);\n\n boolean test2 = UserService.checkPasswordMatch(\"ppassword123\", \"password123\");\n assertFalse(test2);\n\n // unmatched number\n boolean test3 = UserService.checkPasswordMatch(\"password123\", \"password124\");\n assertFalse(test3);\n\n // unmatched letter (case sensitive)\n boolean test4 = UserService.checkPasswordMatch(\"123password\", \"123Password\");\n assertFalse(test4);\n\n // unmatched letter\n boolean test5 = UserService.checkPasswordMatch(\"123password\", \"123passward\");\n assertFalse(test5);\n\n // unmatched letter/number\n boolean test6 = UserService.checkPasswordMatch(\"123password\", \"12password3\");\n assertFalse(test6);\n }",
"public final void testDifferentNameEquals() {\n assertFalse(testTransaction1.equals(testTransaction2)); // pmd doesn't\n // like either\n // way\n }",
"@Test\n public void testHashCode() {\n assertEquals(uniqueParticipantList.hashCode(), uniqueParticipantList.hashCode());\n\n // different lists -> returns different hashcode\n secondUniqueParticipantList.add(BERNICE);\n assertNotEquals(uniqueParticipantList.hashCode(), secondUniqueParticipantList.hashCode());\n }",
"public int hashCode() {\n\t\treturn(11 * _device.hashCode() * _mount.hashCode());\n\t}",
"@Test\n public void testEqualsReturnsFalseOnDifferentIdVal() throws Exception {\n setRecordFieldValue(otherRecord, \"id\", 42L);\n\n boolean equals = record.equals(otherRecord);\n\n assertThat(equals, is(false));\n }",
"boolean isSerialNumberBlackListed(BigInteger serial);",
"@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n SubtenantApiKey subtenantapikey1 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n SubtenantApiKey subtenantapikey2 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n assertNotNull(subtenantapikey1);\n assertNotNull(subtenantapikey2);\n assertNotSame(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2.hashCode(), subtenantapikey1.hashCode());\n int hashCode = subtenantapikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, subtenantapikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }",
"public static boolean slowEquals(byte[] a, byte[] b) {\n int diff = a.length ^ b.length;\n for (int i = 0; i < a.length && i < b.length; i++)\n diff |= a[i] ^ b[i];\n return diff == 0;\n }",
"public static boolean timingSafeEquals(CharSequence first, CharSequence second) {\n if (first == null) {\n return second == null;\n } else if (second == null) {\n return false;\n } else if (second.length() <= 0) {\n return first.length() <= 0;\n }\n int firstLength = first.length();\n int secondLength = second.length();\n char result = (char) ((firstLength == secondLength) ? 0 : 1);\n int j = 0;\n for (int i = 0; i < firstLength; ++i) {\n result |= first.charAt(i) ^ second.charAt(j);\n j = (j + 1) % secondLength;\n }\n return result == 0;\n }",
"@Test\n\tpublic void testDeckHashCodeAgain() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tVegasDeckClass testDeck = new VegasDeckClass();\n\t\t\t\n\t\tassertNotEquals(\"hashCode method not working as expected\", oneDeck.hashCode(), testDeck.hashCode());\n\t}",
"private boolean isEqual(int[] x, int[] y) {\n for (int i = 0; i < 3; i++) {\n if (x[i] != y[i]) {\n return false;\n }\n }\n return true;\n }",
"public final void testDifferentClassEquals() {\n final Account test = new Account(\"Test\");\n assertFalse(testTransaction1.equals(test));\n // pmd doesn't like either way\n }",
"@Test\n public void testHash() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\t\tint hash = l.hash(\"boo\");\n\t\tint result = 1428150834;\n\t\tassertEquals(result, hash);\n }",
"public static void main(String[] args) throws Exception {\r\n\t\tSystem.out.println(\"Test ist bestanden, wenn es keine false-Ausgaben gibt:\");\r\n\t\tString masterPassword = \"myMasterPassword\";\r\n\t\tString passwordInput1 = \"myPassword123\";\r\n\r\n\t\tString hashValue = new HashString(masterPassword).hashString(passwordInput1);\r\n\t\tSystem.out.println(hashValue);\r\n\r\n\t\tString passwordInput2 = \"myPassword123\";\r\n\r\n\t\tSystem.out.println(hashValue.equals(new HashString(masterPassword).hashString(passwordInput2)));\r\n\r\n\t\tSystem.out.println(!hashValue.equals(new HashString(masterPassword + \"asdf\").hashString(passwordInput2)));\r\n\t\tSystem.out.println(!hashValue.equals(new HashString(masterPassword).hashString(passwordInput2 + \"asdf\")));\r\n\r\n\t}",
"public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString a=sc.nextLine();\r\nString b=sc.nextLine();\r\nchar ch1[]=a.toCharArray();\r\nchar ch2[]=b.toCharArray();\r\nint l1=ch1.length;\r\nint l2=ch2.length;\r\nint n=0;\r\nif(l1==l2)\r\n{\r\n\tfor(int i=0;i<l1;i++)\r\n\t{\r\n\t\tif(ch1[i]!=ch2[i])\r\n\t\t{\r\n\t\t\tn=n+1;\r\n\t\t}\r\n\t}\r\n\tif(n==1)\r\n\t\tSystem.out.println(\"yes\");\r\n\telse\r\n\t\tSystem.out.println(\"no\");\r\n}\r\nelse\r\n\tSystem.out.println(\"no\");\r\n\t}",
"@Test\n public void equals_DifferentPriceCents_Test() {\n Assert.assertFalse(bq1.equals(bq5));\n }",
"@Test\n\tpublic void aGramIsNotEquivalentToAKilogram() {\n\t\tassertFalse(GRAM.isEquivalentTo(KILOGRAM));\n\t}",
"@Test\n public void calculationOfNoRedundantBitsIsCorrect() {\n final int length = 10;\n final int expectedNoRedundantBits = 5;\n\n // When performing calculation of noRedundantBits\n final int noRedundantBits = HammingAlgorithm.calculateNoRedundantBits(length);\n\n // Then check if noRedundantBits is as expected\n assertThat(noRedundantBits).isEqualTo(expectedNoRedundantBits);\n }",
"private boolean isImeiValid(String deviceId) {\r\n try {\r\n String[] strings = deviceId.split(\"x\");\r\n byte[] bytes = strings[0].getBytes();\r\n\r\n int cks = 0;\r\n for (int i = 0; i < strings[0].length(); i++)\r\n cks += bytes[i];\r\n\r\n String checkId = strings[0] + \"x\" + cks % MAGIC_NUMBER;\r\n\r\n return deviceId.equals(checkId);\r\n } catch (Exception e) {\r\n return false;\r\n }\r\n }",
"@Test\n public void testHashCodeEquals() {\n DvThresholdCrossingEvent tce = createThresholdCrossingEvent(KEPLER_ID,\n EPOCH_MJD, ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertEquals(thresholdCrossingEvent, tce);\n assertEquals(thresholdCrossingEvent.hashCode(), tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID + 1, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD + 1,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD + 1, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION + 1,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA + 1, MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK, WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA + 1,\n PIPELINE_TASK, WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA,\n createPipelineTask(PIPELINE_TASK_ID + 1), WEAK_SECONDARY,\n CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2,\n ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS + 1, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES + 1,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS + 1, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES + 1, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD + 1, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES + 1, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT + 1,\n WEAK_SECONDARY_ROBUST_STATISTIC), CHI_SQUARE_1, CHI_SQUARE_2,\n CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(\n KEPLER_ID,\n EPOCH_MJD,\n ORBITAL_PERIOD,\n TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA,\n MAX_SINGLE_EVENT_SIGMA,\n PIPELINE_TASK,\n createWeakSecondary(MAX_MES_PHASE_IN_DAYS, MAX_MES,\n MIN_MES_PHASE_IN_DAYS, MIN_MES, MES_MAD, DEPTHPPM_VALUE,\n DEPTHPPM_UNCERTAINTY, MEDIAN_MES, VALID_PHASE_COUNT,\n WEAK_SECONDARY_ROBUST_STATISTIC + 1), CHI_SQUARE_1,\n CHI_SQUARE_2, CHI_SQUARE_DOF_1, CHI_SQUARE_DOF_2, ROBUST_STATISTIC,\n MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1 + 1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2 + 1, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1 + 1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2 + 1, ROBUST_STATISTIC, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC + 1, MAX_SES_IN_MES);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n\n tce = createThresholdCrossingEvent(KEPLER_ID, EPOCH_MJD,\n ORBITAL_PERIOD, TRIAL_TRANSIT_PULSE_DURATION,\n MAX_MULTIPLE_EVENT_SIGMA, MAX_SINGLE_EVENT_SIGMA, PIPELINE_TASK,\n WEAK_SECONDARY, CHI_SQUARE_1, CHI_SQUARE_2, CHI_SQUARE_DOF_1,\n CHI_SQUARE_DOF_2, ROBUST_STATISTIC, MAX_SES_IN_MES + 1);\n assertFalse(\"equals\", thresholdCrossingEvent.equals(tce));\n assertFalse(\"hashCode\",\n thresholdCrossingEvent.hashCode() == tce.hashCode());\n }",
"@Override\n public boolean validateTargetHasDifferentLicense(String licenseHash, String artifactoryId) {\n AddonsManager addonsManager = getAddonsManager();\n if (Strings.isNullOrEmpty(licenseHash)) {\n log.debug(\"LicenseHash is empty, validation isn't possible\");\n } else {\n if (!addonsManager.getLicenseKeyHash(false).equals(licenseHash)) {\n return true;\n } else {\n if (!Strings.isNullOrEmpty(artifactoryId)) {\n return HttpUtils.getHostId().equals(artifactoryId);\n } else {\n log.debug(\"LicenseHash is equal to currently used license, but artifactoryId is empty, \" +\n \"validation of destination and source artifactories being same instance isn't possible\");\n }\n }\n }\n return false;\n }",
"@org.testng.annotations.Test\n public void test_equals_Symmetric()\n throws Exception {\n CategorieClient categorieClient = new CategorieClient(\"denis\", 1000, 10.2, 1.1, 1.2, false);\n Client x = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Client y = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Assert.assertTrue(x.equals(y) && y.equals(x));\n Assert.assertTrue(x.hashCode() == y.hashCode());\n }",
"@Test\n\tpublic void equalsNullSequenceNumber() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey1.setSequenceNumber(LONG_ZERO);\n\t\tboolean equals = key1.equals(key2);\n\t\tAssert.assertFalse(equals);\n\t}",
"protected final boolean isDifferentColor(Card cardOne, Card cardTwo)\n {\n return cardOne.getColor() != cardTwo.getColor();\n }",
"public boolean check_hash() {\n HashSet<E> realSet = new HashSet(this);\n return realSet.size() == this.size();\n }",
"@Test\n public void testHashCode() {\n LOGGER.info(\"testHashCode\");\n final String value = \"Hello\";\n final int actual = new AtomString(value).hashCode();\n final int expected = 61 * 7 + Objects.hashCode(value);\n assertEquals(expected, actual);\n }",
"@Test\n\tpublic void equalsNullSequenceNumberBoth() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tkey1.setSequenceNumber(LONG_ZERO);\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey2.setSequenceNumber(LONG_ZERO);\n\t\tboolean equals = key1.equals(key2);\n\t\tAssert.assertTrue(equals);\n\t}",
"private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof RegistrationItems)) {\n return false;\n }\n RegistrationItems that = (RegistrationItems) other;\n Object myRegItemUid = this.getRegItemUid();\n Object yourRegItemUid = that.getRegItemUid();\n if (myRegItemUid==null ? yourRegItemUid!=null : !myRegItemUid.equals(yourRegItemUid)) {\n return false;\n }\n return true;\n }",
"private Boolean checkMessageisRight(byte[] macmessage, byte[] takenmessage, SecretKey encryptionkey) throws Exception\n {\n byte[] mac = macAlgorithm(encryptionkey, takenmessage);\n boolean ret = Arrays.equals(mac, macmessage);\n return ret;\n }",
"public void testHashFunction(){\r\n Token otherToken;\r\n\r\n try{\r\n token = new Token(TokenType.ID, \"abc\", 5);\r\n otherToken = new Token(TokenType.ID, \"abc\", 6);\r\n //assertTrue(token.hashCode() == 28456490);\r\n assertTrue(token.hashCode() == otherToken.hashCode());\r\n\r\n otherToken = new Token(TokenType.STRING, \"abc\", 5);\r\n assertFalse(token.hashCode() == otherToken.hashCode());\r\n\r\n token = new Token(TokenType.Q_MARK, \"?\", 10);\r\n otherToken = new Token(TokenType.Q_MARK, \"?\", 10);\r\n assertTrue(token.hashCode() == otherToken.hashCode());\r\n\r\n otherToken = new Token(TokenType.STRING, \"?\", 10);\r\n assertFalse(token.hashCode() == otherToken.hashCode());\r\n\r\n otherToken = new Token(TokenType.PERIOD, \".\", 10);\r\n assertFalse(token.hashCode() == otherToken.hashCode());\r\n \r\n }catch(ParserException e){\r\n };\r\n }",
"@Test\n public void authenticateTestFailure2() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, \"other_token\");\n assertFalse(device.authenticate());\n DatabaseTest.cleanDatabase();\n }",
"private static void checkEqualsAndHashCodeMethods(Object lhs, Object rhs,\n boolean expectedResult) {\n if ((lhs == null) && (rhs == null)) {\n Assert.assertTrue(\n \"Your check is dubious...why would you expect null != null?\",\n expectedResult);\n return;\n }\n\n if ((lhs == null) || (rhs == null)) {\n Assert.assertFalse(\n \"Your check is dubious...why would you expect an object \"\n + \"to be equal to null?\", expectedResult);\n }\n\n if (lhs != null) {\n assertEquals(expectedResult, lhs.equals(rhs));\n }\n if (rhs != null) {\n assertEquals(expectedResult, rhs.equals(lhs));\n }\n\n if (expectedResult) {\n String hashMessage =\n \"hashCode() values for equal objects should be the same\";\n Assert.assertTrue(hashMessage, lhs.hashCode() == rhs.hashCode());\n }\n }",
"static boolean Isosceles(long AA, long BB, long CC){\n if((AA==BB)||((AA==CC)||(BB==CC)))\n return true;\n else\n return false;\n }",
"@Test\n public void testEquals_sameParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are equivalent\n assertThat(cellIdentityNr).isEqualTo(anotherCellIdentityNr);\n }",
"public static void assertEqualsStrict(Object expected, Object actual){\r\n\t\tassertEquals( expected, actual );\r\n\t\tassertEquals( \"hashcode() is not equal: \", expected.hashCode(), actual.hashCode());\r\n\t}",
"public boolean reconcilePassword(){\r\n if((signup.getFirstPassword()).equals(signup.getSecondPassword())){\r\n \r\n return true;\r\n \r\n }\r\n else{\r\n \r\n return false;\r\n }\r\n }",
"@Test\n\tpublic void hashCodeNullSequenceNumber() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey1.setSequenceNumber(LONG_ZERO);\n\t\tAssert.assertNotEquals(key1.hashCode(), key2.hashCode());\n\t}",
"@Test\n\tpublic void hashCodeSimilarObjects() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tAssert.assertEquals(key1.hashCode(), key2.hashCode());\n\t}",
"@Test\n\tpublic void equalsNullIdBoth() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tkey1.setId(LONG_ZERO);\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey2.setId(LONG_ZERO);\n\t\tboolean equals = key1.equals(key2);\n\t\tAssert.assertTrue(equals);\n\t}",
"@Test\n\tpublic void hashCodeNullID() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey1.setId(LONG_ZERO);\n\t\tAssert.assertNotEquals(key1.hashCode(), key2.hashCode());\n\t}",
"@Override\n public int hashCode() {\n return dstip.hashCode() ^ dstport.hashCode();\n }",
"@Test\n public void testCreateSha1() throws Exception {\n MessageDigest sha1 = MessageDigest.getInstance(MASTER_KEY_GENERATION_ALG);\n byte[] sha1Result = sha1.digest(SHA_1_INPUT);\n assertFalse(Arrays.equals(SHA_1_INPUT, sha1Result));\n }",
"private void assertSymmetric(UMLMessageArgument msgArg1,UMLMessageArgument msgArg2) throws Exception\r\n\t{\r\n\t\tif( msgArg1!=null && msgArg2!=null)\r\n\t\t\tassertEquals(msgArg1.equals(msgArg2),msgArg2.equals(msgArg1));\r\n\t}",
"private boolean checkDuplicate(String macAddress) {\n\t\tfor (int i=0; i<bluetoothDevices.size(); i++) {\n\t\t\tif (macAddress.equals(bluetoothDevices.get(i).macAddress)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@Test\n public void testEqualsNonIdentical() {\n int userID = 0;\n int[] pref = new int[11];\n int[] health = new int[9];\n int[] diet = new int[5];\n int[] meal = new int[3];\n UserProfile up2 = new UserProfile(userID, pref, health, diet, meal);\n assertEquals(up, up2);\n\n up2 = new UserProfile(userID, pref, health, diet, meal, \"01203\");\n assertNotEquals(up, up2);\n\n int[] pref2 = {-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};\n up2 = new UserProfile(userID, pref2, health, diet, meal);\n assertNotEquals(up, up2);\n\n int[] health2 = {-2, 0, 0, 0, 0, 0, 0, 0, 0};\n up2 = new UserProfile(userID, pref2, health2, diet, meal);\n assertNotEquals(up, up2);\n\n int[] diet2 = {-3, 0, 0, 0, 0};\n up2 = new UserProfile(userID, pref, health2, diet2, meal);\n assertNotEquals(up, up2);\n\n int[] meal2 = {-4, 0, 0};\n up2 = new UserProfile(userID, pref, health2, diet2, meal2);\n assertNotEquals(up, up2);\n }"
]
| [
"0.72194546",
"0.66591394",
"0.6652388",
"0.6640353",
"0.63581836",
"0.63558644",
"0.63148195",
"0.6277097",
"0.6026791",
"0.599042",
"0.5984016",
"0.59783304",
"0.5962575",
"0.59530526",
"0.5951269",
"0.59115636",
"0.5854645",
"0.58508027",
"0.5846053",
"0.5839486",
"0.58082837",
"0.58051425",
"0.57937944",
"0.57759535",
"0.5753527",
"0.5679738",
"0.56791496",
"0.56689525",
"0.5667903",
"0.56338894",
"0.5616301",
"0.56144553",
"0.5612725",
"0.561094",
"0.56094366",
"0.55980927",
"0.55761683",
"0.55716765",
"0.5571607",
"0.5564547",
"0.55603",
"0.5557609",
"0.553642",
"0.55313444",
"0.55156416",
"0.54838675",
"0.54724294",
"0.546497",
"0.54621667",
"0.546121",
"0.5442937",
"0.5431964",
"0.5400776",
"0.53984267",
"0.53931916",
"0.53921276",
"0.5389406",
"0.53740215",
"0.5347402",
"0.5328364",
"0.5317602",
"0.5303504",
"0.5302084",
"0.530181",
"0.528146",
"0.5280043",
"0.5261892",
"0.5260307",
"0.5259392",
"0.5257894",
"0.5255541",
"0.5254563",
"0.52543217",
"0.52515304",
"0.523833",
"0.5236911",
"0.52318037",
"0.52236944",
"0.52163386",
"0.5213587",
"0.5208808",
"0.5204036",
"0.52021474",
"0.5200348",
"0.51989067",
"0.5197713",
"0.51941943",
"0.5192949",
"0.5192665",
"0.5189635",
"0.517968",
"0.51793724",
"0.5178896",
"0.51721406",
"0.5167128",
"0.5154794",
"0.515231",
"0.5151941",
"0.5148545",
"0.514379"
]
| 0.7312315 | 0 |
Use this factory method to create a new instance of this fragment using the provided parameters. | public static SubSrvicesFragment newInstance(int ser_id,String service_img,String service_title,String service_desc) {
SubSrvicesFragment fragment = new SubSrvicesFragment();
Bundle args = new Bundle();
args.putInt(SERVICE_ID, ser_id);
args.putString(SERVICE_IMAGE,service_img);
args.putString(SERVICE_TITLE, service_title);
args.putString(SERVICE_DESC, service_desc);
fragment.setArguments(args);
return fragment;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"protected abstract Fragment createFragment();",
"public void createFragment() {\n\n }",
"@Override\n protected Fragment createFragment() {\n Intent intent = getIntent();\n\n long id = intent.getLongExtra(MovieDetailFragment.EXTRA_ID, -1);\n return MovieDetailFragment.newInstance(id);\n }",
"public CuartoFragment() {\n }",
"public StintFragment() {\n }",
"public ExploreFragment() {\n\n }",
"public RickAndMortyFragment() {\n }",
"public FragmentMy() {\n }",
"public LogFragment() {\n }",
"public FeedFragment() {\n }",
"public HistoryFragment() {\n }",
"public HistoryFragment() {\n }",
"public static MyFeedFragment newInstance() {\n return new MyFeedFragment();\n }",
"public WkfFragment() {\n }",
"public static ScheduleFragment newInstance() {\n ScheduleFragment fragment = new ScheduleFragment();\n Bundle args = new Bundle();\n //args.putString(ARG_PARAM1, param1);\n //args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public ProfileFragment(){}",
"public WelcomeFragment() {}",
"public static ForumFragment newInstance() {\n ForumFragment fragment = new ForumFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n\n return fragment;\n }",
"public static NotificationFragment newInstance() {\n NotificationFragment fragment = new NotificationFragment();\n Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public progFragment() {\n }",
"public HeaderFragment() {}",
"public static RouteFragment newInstance() {\n RouteFragment fragment = new RouteFragment();\n Bundle args = new Bundle();\n //fragment.setArguments(args);\n return fragment;\n }",
"public EmployeeFragment() {\n }",
"public Fragment_Tutorial() {}",
"public NewShopFragment() {\n }",
"public FavoriteFragment() {\n }",
"public static MyCourseFragment newInstance() {\n MyCourseFragment fragment = new MyCourseFragment();\r\n// fragment.setArguments(args);\r\n return fragment;\r\n }",
"public static MessageFragment newInstance() {\n MessageFragment fragment = new MessageFragment();\n Bundle args = new Bundle();\n\n fragment.setArguments(args);\n return fragment;\n }",
"public static ReservationFragment newInstance() {\n\n ReservationFragment _fragment = new ReservationFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n return _fragment;\n }",
"public CreateEventFragment() {\n // Required empty public constructor\n }",
"public static RecipeListFragment newInstance() {\n RecipeListFragment fragment = new RecipeListFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n return fragment;\n }",
"public static Fragment newInstance() {\n\t\treturn new ScreenSlidePageFragment();\n\t}",
"public NoteActivityFragment() {\n }",
"public static WeekViewFragment newInstance(int param1, int param2) {\n WeekViewFragment fragment = new WeekViewFragment();\n //WeekViewFragment 객체 생성\n Bundle args = new Bundle();\n //Bundle 객체 생성\n args.putInt(ARG_PARAM1, param1);\n //ARG_PARAM1에 param1의 정수값 넣어서 args에 저장\n args.putInt(ARG_PARAM2, param2);\n //ARG_PARAM2에 param2의 정수값 넣어서 args에 저장\n fragment.setArguments(args);\n //args를 매개변수로 한 setArguments() 메소드 수행하여 fragment에 저장\n return fragment; //fragment 반환\n }",
"public static Fragment0 newInstance(String param1, String param2) {\n Fragment0 fragment = new Fragment0();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static QueenBEmbassyF newInstance() {\n QueenBEmbassyF fragment = new QueenBEmbassyF();\n //the way to pass arguments between fragments\n Bundle args = new Bundle();\n\n fragment.setArguments(args);\n return fragment;\n }",
"public static Fragment newInstance() {\n StatisticsFragment fragment = new StatisticsFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"public EventHistoryFragment() {\n\t}",
"public HomeFragment() {}",
"public PeopleFragment() {\n // Required empty public constructor\n }",
"public static FeedFragment newInstance() {\n FeedFragment fragment = new FeedFragment();\n return fragment;\n }",
"public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"public VantaggiFragment() {\n // Required empty public constructor\n }",
"public AddressDetailFragment() {\n }",
"public ArticleDetailFragment() { }",
"public static DropboxMainFrag newInstance() {\n DropboxMainFrag fragment = new DropboxMainFrag();\n // set arguments in Bundle\n return fragment;\n }",
"public RegisterFragment() {\n }",
"public EmailFragment() {\n }",
"public static CommentFragment newInstance() {\n CommentFragment fragment = new CommentFragment();\n\n return fragment;\n }",
"public static FragmentComida newInstance(String param1) {\n FragmentComida fragment = new FragmentComida();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n return fragment;\n\n\n }",
"public static ParqueosFragment newInstance() {\n ParqueosFragment fragment = new ParqueosFragment();\n return fragment;\n }",
"public ForecastFragment() {\n }",
"public FExDetailFragment() {\n \t}",
"public static AddressFragment newInstance(String param1) {\n AddressFragment fragment = new AddressFragment();\n\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n\n return fragment;\n }",
"public TripNoteFragment() {\n }",
"public ItemFragment() {\n }",
"public NoteListFragment() {\n }",
"public CreatePatientFragment() {\n\n }",
"public DisplayFragment() {\n\n }",
"public static frag4_viewcompliment newInstance(String param1, String param2) {\r\n frag4_viewcompliment fragment = new frag4_viewcompliment();\r\n Bundle args = new Bundle();\r\n args.putString(ARG_PARAM1, param1);\r\n args.putString(ARG_PARAM2, param2);\r\n fragment.setArguments(args);\r\n return fragment;\r\n }",
"public static fragment_profile newInstance(String param1, String param2) {\n fragment_profile fragment = new fragment_profile();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"@Override\n\tprotected Fragment createFragment() {\n\t\treturn new FormFragment();\n\t}",
"public static MainFragment newInstance() {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"public ProfileFragment() {\n\n }",
"public BackEndFragment() {\n }",
"public CustomerFragment() {\n }",
"public static FriendsFragment newInstance(int sectionNumber) {\n \tFriendsFragment fragment = new FriendsFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public ArticleDetailFragment() {\n }",
"public ArticleDetailFragment() {\n }",
"public ArticleDetailFragment() {\n }",
"public static Fragment newInstance() {\n return new SettingsFragment();\n }",
"public SummaryFragment newInstance()\n {\n return new SummaryFragment();\n }",
"public PeersFragment() {\n }",
"public TagsFragment() {\n }",
"public static ProfileFragment newInstance() {\n ProfileFragment fragment = new ProfileFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, \"\");\n args.putString(ARG_PARAM2, \"\");\n fragment.setArguments(args);\n return fragment;\n }",
"public static FriendsFragment newInstance() {\n FriendsFragment fragment = new FriendsFragment();\n\n return fragment;\n }",
"public HomeSectionFragment() {\n\t}",
"public static FirstFragment newInstance(String text) {\n\n FirstFragment f = new FirstFragment();\n Bundle b = new Bundle();\n b.putString(\"msg\", text);\n\n f.setArguments(b);\n\n return f;\n }",
"public PersonDetailFragment() {\r\n }",
"public static LogFragment newInstance(Bundle params) {\n LogFragment fragment = new LogFragment();\n fragment.setArguments(params);\n return fragment;\n }",
"public RegisterFragment() {\n // Required empty public constructor\n }",
"public VehicleFragment() {\r\n }",
"public static Fine newInstance(String param1, String param2) {\n Fine fragment = new Fine();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static FriendsFragment newInstance(String param1, String param2) {\n FriendsFragment fragment = new FriendsFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"public static ChangesViewFragment newInstance() {\n\t\tChangesViewFragment fragment = new ChangesViewFragment();\n\t\tBundle args = new Bundle();\n\t\targs.putInt(HomeViewActivity.ARG_SECTION_NUMBER, 2);\n\t\tfragment.setArguments(args);\n\t\treturn fragment;\n\t}",
"public static NoteFragment newInstance(String param1, String param2) {\n NoteFragment fragment = new NoteFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static MainFragment newInstance(Context context) {\n MainFragment fragment = new MainFragment();\n if(context != null)\n fragment.setVariables(context);\n return fragment;\n }",
"@Override\n\tprotected Fragment createFragment() {\n\t\treturn new CrimeListFragment();\n\t}",
"public static MoneyLogFragment newInstance() {\n MoneyLogFragment fragment = new MoneyLogFragment();\n return fragment;\n }",
"public static ForecastFragment newInstance() {\n\n //Create new fragment\n ForecastFragment frag = new ForecastFragment();\n return(frag);\n }",
"public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static MyTaskFragment newInstance(String param1) {\n MyTaskFragment fragment = new MyTaskFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n return fragment;\n }",
"public static MyProfileFragment newInstance(String param1, String param2) {\n MyProfileFragment fragment = new MyProfileFragment();\n return fragment;\n }",
"public static MainFragment newInstance(int param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_PARAM1, param1);\n\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public PlaylistFragment() {\n }",
"public static HistoryFragment newInstance() {\n HistoryFragment fragment = new HistoryFragment();\n return fragment;\n }",
"public static SurvivorIncidentFormFragment newInstance(String param1, String param2) {\n// SurvivorIncidentFormFragment fragment = new SurvivorIncidentFormFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n// return fragment;\n\n SurvivorIncidentFormFragment fragment = new SurvivorIncidentFormFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n\n\n }",
"public static PersonalFragment newInstance(String param1, String param2) {\n PersonalFragment fragment = new PersonalFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }"
]
| [
"0.7259329",
"0.72331375",
"0.71140355",
"0.69909847",
"0.69902235",
"0.6834592",
"0.683074",
"0.68134046",
"0.6801526",
"0.6801054",
"0.67653185",
"0.6739714",
"0.6739714",
"0.6727412",
"0.6717231",
"0.6705855",
"0.6692112",
"0.6691661",
"0.66869426",
"0.66606814",
"0.6646188",
"0.66410166",
"0.6640725",
"0.6634425",
"0.66188246",
"0.66140765",
"0.6608169",
"0.66045964",
"0.65977716",
"0.6592119",
"0.659137",
"0.65910816",
"0.65830594",
"0.65786606",
"0.6562876",
"0.65607685",
"0.6557126",
"0.65513307",
"0.65510213",
"0.65431285",
"0.6540448",
"0.65336084",
"0.6532555",
"0.6528302",
"0.6524409",
"0.652328",
"0.6523149",
"0.6516528",
"0.65049976",
"0.6497274",
"0.6497235",
"0.64949715",
"0.64944136",
"0.6484968",
"0.6484214",
"0.64805835",
"0.64784926",
"0.64755154",
"0.64710265",
"0.6466466",
"0.6457089",
"0.645606",
"0.6454554",
"0.6452161",
"0.64520335",
"0.6450325",
"0.64488834",
"0.6446765",
"0.64430225",
"0.64430225",
"0.64430225",
"0.64420956",
"0.6441306",
"0.64411277",
"0.6438451",
"0.64345145",
"0.64289486",
"0.64287597",
"0.6423755",
"0.64193285",
"0.6418699",
"0.6414679",
"0.6412867",
"0.6402168",
"0.6400724",
"0.6395624",
"0.6395109",
"0.6391252",
"0.63891554",
"0.63835025",
"0.63788056",
"0.63751805",
"0.63751805",
"0.63751805",
"0.6374796",
"0.63653135",
"0.6364529",
"0.6360922",
"0.63538784",
"0.6351111",
"0.635067"
]
| 0.0 | -1 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view =inflater.inflate(R.layout.fragment_sub_services, container, false);
init(view);
SharedPreferencesHelper.setIsMainAct("SubServices",getContext());
return view;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}",
"@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }",
"@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }",
"protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}",
"@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }",
"@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }"
]
| [
"0.6739604",
"0.67235583",
"0.6721706",
"0.6698254",
"0.6691869",
"0.6687986",
"0.66869223",
"0.6684548",
"0.66766286",
"0.6674615",
"0.66654444",
"0.66654384",
"0.6664403",
"0.66596216",
"0.6653321",
"0.6647136",
"0.66423255",
"0.66388357",
"0.6637491",
"0.6634193",
"0.6625158",
"0.66195583",
"0.66164845",
"0.6608733",
"0.6596594",
"0.65928894",
"0.6585293",
"0.65842897",
"0.65730995",
"0.6571248",
"0.6569152",
"0.65689117",
"0.656853",
"0.6566686",
"0.65652984",
"0.6553419",
"0.65525705",
"0.65432084",
"0.6542382",
"0.65411425",
"0.6538022",
"0.65366334",
"0.65355957",
"0.6535043",
"0.65329415",
"0.65311074",
"0.65310687",
"0.6528645",
"0.65277404",
"0.6525902",
"0.6524516",
"0.6524048",
"0.65232015",
"0.65224624",
"0.65185034",
"0.65130377",
"0.6512968",
"0.65122765",
"0.65116245",
"0.65106046",
"0.65103024",
"0.6509013",
"0.65088093",
"0.6508651",
"0.6508225",
"0.6504662",
"0.650149",
"0.65011525",
"0.6500686",
"0.64974767",
"0.64935696",
"0.6492234",
"0.6490034",
"0.6487609",
"0.6487216",
"0.64872116",
"0.6486594",
"0.64861935",
"0.6486018",
"0.6484269",
"0.648366",
"0.6481476",
"0.6481086",
"0.6480985",
"0.6480396",
"0.64797544",
"0.647696",
"0.64758915",
"0.6475649",
"0.6474114",
"0.6474004",
"0.6470706",
"0.6470275",
"0.64702207",
"0.6470039",
"0.6467449",
"0.646602",
"0.6462256",
"0.64617974",
"0.6461681",
"0.6461214"
]
| 0.0 | -1 |
TODO: Rename method, update argument and hook method into UI event | public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\n\t\t\t\t}",
"@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t}",
"public abstract void update(UIReader event);",
"@Override\r\n\t\t\tpublic void handle(ActionEvent arg0) {\n\t\t\t}",
"@Override\n\tpublic void handle(ActionEvent event) {\n\t\t\n\t}",
"@Override\n\tpublic void handle(ActionEvent event) {\n\n\t}",
"@Override\n\tpublic void handleUpdateUI(String text, int code) {\n\t\t\n\t}",
"@Override\n\tpublic void update(Event e) {\n\t}",
"public abstract void onInvoked(CommandSender sender, String[] args);",
"@Override\r\n public void updateUI() {\r\n }",
"@Override\r\n\tpublic void handle(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"@Override\n\tpublic void processEvent(Event e) {\n\n\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}",
"@Override\n\tpublic void processCommand(JMVCommandEvent arg0) {\n\t}",
"@Override\n\tpublic void inputChanged( Viewer arg0, Object arg1, Object arg2 ) {\n\t}",
"@Override\n\tpublic void handleEvent(Event arg0) {\n\t\t\n\t}",
"@Override\r\n\tpublic void onCustomUpdate() {\n\t\t\r\n\t}",
"public void updateUI(){}",
"private synchronized void updateScreen(String arg){\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n setChanged();\n notifyObservers(arg);\n }\n });\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}",
"@Override\r\n public void actionPerformed( ActionEvent e )\r\n {\n }",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\tpublic void updateObjectListener(ActionEvent e) {\n\t\t\r\n\t}",
"Event () {\n // Nothing to do here.\n }",
"void onArgumentsChanged();",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}",
"void eventChanged();",
"@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override public void handle(ActionEvent e)\n\t {\n\t }",
"@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\r\n\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"@Override //se repita\r\n public void actionPerformed(ActionEvent ae) {\r\n \r\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t}",
"public abstract CommandResponse onCommand(CommandSender sender, String label, String[] args);",
"@Override\n public void actionPerformed(ActionEvent actionEvent) {\n }",
"@Override\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t}",
"@Override\r\n public void actionPerformed(ActionEvent e) {\n \r\n }",
"public abstract void onCommand(MessageEvent context) throws Exception;",
"@Override\r\n\tpublic void onEvent(Event arg0) {\n\r\n\t}",
"private void addParameterEventHandler(){\n\t\t\n\t\tgetParameterNameListBox().addDoubleClickHandler(new DoubleClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onDoubleClick(DoubleClickEvent event) {\n\t\t\t\tparameterAceEditor.clearAnnotations();\n\t\t\t\tparameterAceEditor.removeAllMarkers();\n\t\t\t\tparameterAceEditor.redisplay();\n\t\t\t\tSystem.out.println(\"In addParameterEventHandler on DoubleClick isPageDirty = \" + getIsPageDirty() + \" selectedIndex = \" + getParameterNameListBox().getSelectedIndex());\n\t\t\t\tsetIsDoubleClick(true);\n\t\t\t\tsetIsNavBarClick(false);\n\t\t\t\tif (getIsPageDirty()) {\n\t\t\t\t\tshowUnsavedChangesWarning();\n\t\t\t\t} else {\n\t\t\t\t\tint selectedIndex = getParameterNameListBox().getSelectedIndex();\n\t\t\t\t\tif (selectedIndex != -1) {\n\t\t\t\t\t\tfinal String selectedParamID = getParameterNameListBox().getValue(selectedIndex);\n\t\t\t\t\t\tcurrentSelectedParamerterObjId = selectedParamID;\n\t\t\t\t\t\tif(getParameterMap().get(selectedParamID) != null){\n\t\t\t\t\t\t\tgetParameterNameTxtArea().setText(getParameterMap().get(selectedParamID).getParameterName());\n\t\t\t\t\t\t\tgetParameterAceEditor().setText(getParameterMap().get(selectedParamID).getParameterLogic());\n\t\t\t\t\t\t\tSystem.out.println(\"In Parameter DoubleClickHandler, doing setText()\");\n\t\t\t\t\t\t\t//disable parameterName and Logic fields for Default Parameter\n\t\t\t\t\t\t\tboolean isReadOnly = getParameterMap().get(selectedParamID).isReadOnly();\n\t\t\t\t\t\t\tgetParameterButtonBar().getDeleteButton().setTitle(\"Delete\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(MatContext.get().getMeasureLockService()\n\t\t\t\t\t\t\t\t\t.checkForEditPermission()){\n\t\t\t\t\t\t\t\tsetParameterWidgetReadOnly(!isReadOnly);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// load most recent used cql artifacts\n\t\t\t\t\t\t\tMatContext.get().getMeasureService().getUsedCQLArtifacts(MatContext.get().getCurrentMeasureId(), new AsyncCallback<GetUsedCQLArtifactsResult>() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\t\t\t\tWindow.alert(MatContext.get().getMessageDelegate().getGenericErrorMessage());\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onSuccess(GetUsedCQLArtifactsResult result) {\n\t\t\t\t\t\t\t\t\tif(result.getUsedCQLParameters().contains(getParameterMap().get(selectedParamID).getParameterName())) {\n\t\t\t\t\t\t\t\t\t\tgetParameterButtonBar().getDeleteButton().setEnabled(false);\n\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t\tsuccessMessageAlert.clearAlert();\n\t\t\t\t\terrorMessageAlert.clearAlert();\n\t\t\t\t\twarningMessageAlert.clearAlert();\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t}",
"@Override\n public void handle(Event event) {\n }",
"@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}",
"@Override\n public void actionPerformed(AnActionEvent e) {\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n \n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n \n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n \n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n \n }",
"@Override\r\n\tpublic void handleEvent(Event event) {\n\r\n\t}",
"public void ImageView(ActionEvent event) {\n\t}",
"@Override\n public void updateUi() {\n\n }",
"@Override\n public void updateUi() {\n\n }",
"@Override\n public void updateUi() {\n\n }",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"public void runInUi(ElexisEvent ev){}",
"@Override\n public void delta() {\n \n }",
"@Override\n\tpublic void onClick(ClickEvent arg0) {\n\t\t\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n }",
"@Override\n\tprotected void OnClick() {\n\t\t\n\t}",
"@Override\n public void actionPerformed(ActionEvent ev) {\n }",
"@Override\n public void actionPerformed(ActionEvent e)\n {\n \n }",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\n public void update(Observable o, Object arg)\n {\n \n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tupdate();\n\t\t\t}",
"@Override\r\n public void processEvent(IAEvent e) {\n\r\n }"
]
| [
"0.6619185",
"0.65246344",
"0.6473144",
"0.6473144",
"0.64351684",
"0.6325494",
"0.62368196",
"0.6189416",
"0.6158721",
"0.61455715",
"0.6123594",
"0.6107332",
"0.6101038",
"0.6092755",
"0.6049496",
"0.6049496",
"0.60442764",
"0.604003",
"0.604003",
"0.6007846",
"0.59999037",
"0.59848183",
"0.59776366",
"0.59587413",
"0.5940049",
"0.5925668",
"0.5925668",
"0.59208333",
"0.5915737",
"0.5915737",
"0.5915737",
"0.5915737",
"0.5915737",
"0.5915554",
"0.5909643",
"0.5895144",
"0.58947057",
"0.589277",
"0.58885247",
"0.58885247",
"0.58885247",
"0.58671176",
"0.58671176",
"0.58671176",
"0.58636886",
"0.5862447",
"0.5862447",
"0.58613557",
"0.5855828",
"0.5846504",
"0.5846504",
"0.5846504",
"0.5846504",
"0.5837475",
"0.58366984",
"0.5820788",
"0.58068436",
"0.58022934",
"0.5772422",
"0.57714665",
"0.5770862",
"0.5765655",
"0.5763872",
"0.57544947",
"0.57542855",
"0.57542855",
"0.57450074",
"0.57441026",
"0.57441026",
"0.57441026",
"0.5741053",
"0.574037",
"0.5739314",
"0.57367086",
"0.57367086",
"0.57367086",
"0.57322264",
"0.57322264",
"0.57322264",
"0.57322264",
"0.57322264",
"0.57322264",
"0.57322264",
"0.57235956",
"0.57232994",
"0.5721006",
"0.571978",
"0.571978",
"0.57187414",
"0.57177836",
"0.57133436",
"0.57110935",
"0.57110935",
"0.57110935",
"0.57110935",
"0.57110935",
"0.57110935",
"0.5707859",
"0.5707546",
"0.5704973",
"0.57016516"
]
| 0.0 | -1 |
This interface must be implemented by activities that contain this fragment to allow an interaction in this fragment to be communicated to the activity and potentially other fragments contained in that activity. See the Android Training lesson Communicating with Other Fragments for more information. | public interface OnFragmentInteractionListener {
// TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface OnFragmentInteractionListener {\n void onFragmentMessage(String TAG, Object data);\n}",
"public interface FragmentInteraction {\n void switchToBoardView();\n void switchToPinsView();\n void switchToPins(PDKBoard pdkBoard);\n void switchToDescription(PDKPin pin);\n}",
"public interface IFragmentView {\n public Activity getActivity();\n public void onItemClick(int position);\n}",
"public interface OnFragmentInteractionListener {\n void onMainFragmentInteraction(String string);\n }",
"@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n if (context instanceof RequestFragmentInterface) {\n mInterface = (RequestFragmentInterface) context;\n } else {\n throw new RuntimeException(context.toString()\n + \" must implement OnFragmentInteractionListener\");\n }\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onCallBellPressed(MessageReason reason);\n }",
"void onFragmentInteraction();",
"void onFragmentInteraction();",
"void onFragmentInteraction();",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n\n\n void onFragmentInteraction(String mId, String mProductName, String mItemRate, int minteger, int update);\n }",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onComidaSelected(int comidaId);\n }",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Qualification q);\n }",
"public interface OnFragmentInteractionListener {\n void onReceiverAcceptRequest(int nextState, String requestId);\n }",
"public interface FragMainLife\n{\n\tpublic void onResumeFragMainLife();\n}",
"public interface OnFragmentListener {\n\n void onAction(Intent intent);\n}",
"public interface IBaseFragmentActivity {\n void onFragmentExit(BaseFragment fragment);\n\n void onFragmentStartLoading(BaseFragment fragment);\n\n void onFragmentFinishLoad(BaseFragment fragment);\n}",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(String string);\n }",
"void onFragmentInteraction(Object ref);",
"public interface OnParametersFragmentInteractionListener {\n public void startTask();\n }",
"public interface OnFragmentInteractionListener {\n // Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Parcelable selectedItem);\n }",
"public interface FragmentInterface {\r\n void fragmentBecameVisible();\r\n}",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(String key);\n }",
"public interface OnFragmentInteractionListener {\n void newList();\n\n void searchList();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void pasarALista();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n\n /**\n * This interface's single method. The hosting Activity must implement this interface and\n * provide an implementation of this method so that this Fragment can communicate with the\n * Activity.\n *\n * @param spotId\n */\n// void onFragmentInteraction(Uri uri);\n void onFragmentInteraction(int spotId);\n// void onFragmentInteraction(LatLng spotPosition);\n\n }",
"public interface MainGameActivityCallBacks {\n public void onMsgFromFragmentToMainGame(String sender, String strValue);\n}",
"public interface IFragment {\n void onFragmentRefresh();\n\n void onMenuClick();\n}",
"public interface FragmentInterface {\n\n void onCreate();\n\n void initLayout();\n\n void updateLayout();\n\n void sendInitialRequest();\n}",
"public interface OnFragmentInteractionListener {\n void onFragmentInteraction(String accessToken, String network);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(View v);\n }",
"public interface OnFragmentInteractionListener {\n void swapFragments(SetupActivity.SetupActivityFragmentType type);\n\n void addServer(String name, String ipAddress, String port);\n }",
"public interface OnFragmentInteractionListener {\n\t\tvoid restUp(IGameState gameState);\n\t\tvoid restartGame();\n\t}",
"public interface OnFragmentInteractionListener\n {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface PersonalFragmentView extends BaseMvpView {\n\n}",
"public interface OnFragmentInteractionListener {\n void onFinishCreatingRequest();\n }",
"void onFragmentInteraction(View v);",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(ArrayList<Recepie> recepieList);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(String id);\n }",
"void onFragmentInteractionMain();",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void showRestaurantDetail(Map<String, Object> objectMap);\n\n public void showAddRestaurantFragment(String location);\n }",
"public interface FragmentNavigator {\n\n void SwitchFragment(Fragment fragment);\n}",
"public interface FragmentModellnt {\n void FragmentM(OnFinishListener onFinishListener,String dataId);\n}",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n //void onFragmentInteraction(Uri uri);\n }",
"void onFragmentInteraction(String id);",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(ArrayList naleznosci, String KLUCZ);\n }",
"public interface OnFragmentInteractionListener {\n void onStartFragmentStarted();\n\n void onStartFragmentStartTracking();\n\n void onStartFragmentStopTracking();\n }",
"public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onEditFragmentInteraction(Student student);\r\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n Long onFragmentInteraction();\n }",
"public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n void onFragmentInteraction(String id);\n}",
"public interface IBaseFragment extends IBaseView {\n /**\n * 出栈到目标fragment\n * @param targetFragmentClass 目标fragment\n * @param includeTargetFragment 是否包涵目标fragment\n * true 目标fragment也出栈\n * false 出栈到目标fragment,目标fragment不出栈\n */\n void popToFragment(Class<?> targetFragmentClass, boolean includeTargetFragment);\n\n /**\n * 跳转到新的fragment\n * @param supportFragment 新的fragment继承SupportFragment\n */\n void startNewFragment(@NonNull SupportFragment supportFragment);\n\n /**\n * 跳转到新的fragment并出栈当前fragment\n * @param supportFragment\n */\n void startNewFragmentWithPop(@NonNull SupportFragment supportFragment);\n\n /**\n * 跳转到新的fragment并返回结果\n * @param supportFragment\n * @param requestCode\n */\n void startNewFragmentForResult(@NonNull SupportFragment supportFragment,int requestCode);\n\n /**\n * 设置fragment返回的result\n * @param requestCode\n * @param bundle\n */\n void setOnFragmentResult(int requestCode, Bundle bundle);\n\n /**\n * 跳转到新的Activity\n * @param clz\n */\n void startNewActivity(@NonNull Class<?> clz);\n\n /**\n * 携带数据跳转到新的Activity\n * @param clz\n * @param bundle\n */\n void startNewActivity(@NonNull Class<?> clz,Bundle bundle);\n\n /**\n * 携带数据跳转到新的Activity并返回结果\n * @param clz\n * @param bundle\n * @param requestCode\n */\n void startNewActivityForResult(@NonNull Class<?> clz,Bundle bundle,int requestCode);\n\n /**\n * 当前Fragment是否可见\n * @return true 可见,false 不可见\n */\n boolean isVisiable();\n\n /**\n * 获取当前fragment绑定的activity\n * @return\n */\n Activity getBindActivity();\n\n}",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onSocialLoginInteraction();\n }",
"public interface OnFragmentInteractionListener {\n /**\n * On fragment interaction.\n *\n * @param uri the uri\n */\n// TODO: Update argument type and name\n public void onFragmentInteraction(Uri uri);\n }",
"public interface OnFragmentListener {\n void onClick(Fragment fragment);\n}",
"public interface OnFragmentInteractionListener {\n void playGame(Uri location);\n }",
"public interface LoginFragmentListener {\n public void OnRegisterClicked();\n public void OnLoginClicked(String User, String Pass);\n}",
"public interface MoveFragment {\n\n\n public void moveFragment(Fragment selectedFragment);\n\n}",
"public interface ChangeFragmentListener {\n void changeFragment();\n}",
"public interface OnProductItemFragmentInteraction{\r\n public void itemSelected(Producto product);\r\n }",
"public interface FragmentInterface {\n public void fragmentResult(Fragment fragment, String title);\n}",
"@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n //this registers this fragment to recieve any EventBus\n EventBus.getDefault().register(this);\n }",
"void onFragmentInteraction(int position);",
"public interface AddFarmFragmentView extends BaseView {\n\n\n}",
"void OpenFragmentInteraction();",
"public interface OnFragmentInteractionListener {\n\t\t// TODO: Update argument type and name\n\t\tpublic void onFragmentInteraction(Uri uri);\n\t}",
"public interface FragmentDataObserver {\n void getDataFromActivity(String data);\n\n}",
"public interface PesonageFragmentView extends MvpView {\n\n}",
"public interface OnFragInteractionListener {\n\n // replace top fragment with this fragment\n interface OnMainFragInteractionListener {\n void onWifiFragReplace();\n void onHistoryFragReplace();\n void onHistoryWithOsmMapFragReplace();\n void onMainFragReplace();\n }\n\n // interface for WifiPresenterFragment\n interface OnWifiScanFragInteractionListener {\n void onGetDataAfterScanWifi(ArrayList<WifiLocationModel> list);\n void onAllowToSaveWifiHotspotToDb(String ssid, String pass, String encryption, String bssid);\n }\n\n // interface for HistoryPresenterFragment\n interface OnHistoryFragInteractionListener {\n // get wifi info\n void onGetWifiHistoryCursor(Cursor cursor);\n // get mobile network generation\n void onGetMobileHistoryCursor(Cursor cursor);\n // get wifi state and date\n void onGetWifiStateAndDateCursor(Cursor cursor);\n }\n\n interface OnMapFragInteractionListerer {\n void onGetWifiLocationCursor(Cursor cursor);\n }\n}",
"public interface OnUsersFragmentInteractionListener {\n void onListFragmentInteraction(User item);\n }",
"public interface MainScreeInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteractionMain();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onClickNextTurn();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction();\n\n void changeBottomNavSelection(int menuItem);\n }",
"public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n}",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }",
"public interface OnFragmentInteractionListener {\n void onSignoutClicked();\n\n void onExtraScopeRequested();\n }",
"interface OnMainFragInteractionListener {\n void onWifiFragReplace();\n void onHistoryFragReplace();\n void onHistoryWithOsmMapFragReplace();\n void onMainFragReplace();\n }",
"public interface OnListFragmentInteractionListener {\n void onListFragmentInteraction(Note note);\n}"
]
| [
"0.73246294",
"0.7208353",
"0.7135137",
"0.7124237",
"0.71221745",
"0.7014703",
"0.6976967",
"0.6976967",
"0.6976967",
"0.697338",
"0.6967542",
"0.6965679",
"0.69606704",
"0.6953404",
"0.6943448",
"0.69343144",
"0.6929988",
"0.6927487",
"0.6922498",
"0.6910781",
"0.6902739",
"0.6896665",
"0.6893509",
"0.68823564",
"0.68811804",
"0.6874814",
"0.6864123",
"0.68606585",
"0.686001",
"0.6858364",
"0.68549514",
"0.6844093",
"0.6839643",
"0.68300384",
"0.68176794",
"0.6816479",
"0.68100005",
"0.6785941",
"0.6769942",
"0.67691857",
"0.67691857",
"0.67691857",
"0.67691857",
"0.67691857",
"0.67691857",
"0.67691857",
"0.67691857",
"0.67691857",
"0.6765851",
"0.676123",
"0.6756316",
"0.6752817",
"0.66987765",
"0.6680322",
"0.667337",
"0.6671097",
"0.6669192",
"0.6661217",
"0.66607106",
"0.66550183",
"0.6652011",
"0.66446596",
"0.6644048",
"0.6644048",
"0.6644048",
"0.6644048",
"0.6644048",
"0.6644048",
"0.6644048",
"0.6644048",
"0.6644048",
"0.6644048",
"0.6644048",
"0.663835",
"0.66356075",
"0.66317797",
"0.6625357",
"0.6624932",
"0.66177344",
"0.6609773",
"0.6608748",
"0.66078323",
"0.660626",
"0.6598118",
"0.6597014",
"0.6588113",
"0.6572025",
"0.6568295",
"0.65602094",
"0.6559957",
"0.6554416",
"0.6549983",
"0.6548602",
"0.65430015",
"0.6538946",
"0.6533902",
"0.6533902",
"0.6533902",
"0.65194637",
"0.651746",
"0.65162706"
]
| 0.0 | -1 |
TODO: Update argument type and name | void onFragmentInteraction(Uri uri); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public String getFirstArg() {\n return name;\r\n }",
"@Override\n public int getNumberArguments() {\n return 1;\n }",
"java.lang.String getArg();",
"@Override\n public int getArgLength() {\n return 4;\n }",
"Argument createArgument();",
"@Override\r\n\tpublic String getFirstArg() {\n\t\treturn null;\r\n\t}",
"@Override\n protected PacketArgs.ArgumentType[] getArgumentTypes() {\n return new PacketArgs.ArgumentType[] { PacketArgs.ArgumentType.String };\n }",
"@Override\n\tpublic void traverseArg(UniArg node) {\n\t}",
"@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FArgument src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}",
"Object[] getArguments();",
"Object[] getArguments();",
"String getArguments();",
"@Override\n\tpublic void handleArgument(ArrayList<String> argument) {\n\t\t\n\t}",
"@Override\n public final int parseArguments(Parameters params) {\n return 1;\n }",
"ArgList createArgList();",
"public Object[] getArguments() { return args;}",
"@Override\n public String getInputArg(String argName) {\n Log.w(TAG, \"Test input args is not supported.\");\n return null;\n }",
"@Override\n protected String getName() {return _parms.name;}",
"private static AbstractType<?>[] argumentsType(@Nullable StringType algorithmArgumentType)\n {\n return algorithmArgumentType == null\n ? DEFAULT_ARGUMENTS\n : new AbstractType<?>[]{ algorithmArgumentType };\n }",
"uicargs createuicargs();",
"java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Argument> \n getArgumentList();",
"java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Argument> \n getArgumentList();",
"public static void main(String[] args) {\n\t\t\tmeth(args);\r\n\t\t\targument_test:meth(args);\r\n\t}",
"@Override\r\n\tpublic int getSecondArg() {\n\t\treturn 0;\r\n\t}",
"public getType_args(getType_args other) {\n }",
"Object[] args();",
"protected void validateArguments( Object[] args ) throws ActionExecutionException {\n\n Annotation[][] annotations = method.getParameterAnnotations();\n for (int i = 0; i < annotations.length; i++) {\n\n Annotation[] paramAnnotations = annotations[i];\n\n for (Annotation paramAnnotation : paramAnnotations) {\n if (paramAnnotation instanceof Parameter) {\n Parameter paramDescriptionAnnotation = (Parameter) paramAnnotation;\n ValidationType validationType = paramDescriptionAnnotation.validation();\n\n String[] validationArgs;\n\n // if we are checking for valid constants, then the\n // args array should contain\n // the name of the array holding the valid constants\n if (validationType == ValidationType.STRING_CONSTANT\n || validationType == ValidationType.NUMBER_CONSTANT) {\n try {\n String arrayName = paramDescriptionAnnotation.args()[0];\n\n // get the field and set access level if\n // necessary\n Field arrayField = method.getDeclaringClass().getDeclaredField(arrayName);\n if (!arrayField.isAccessible()) {\n arrayField.setAccessible(true);\n }\n Object arrayValidConstants = arrayField.get(null);\n\n // convert the object array to string array\n String[] arrayValidConstatnsStr = new String[Array.getLength(arrayValidConstants)];\n for (int j = 0; j < Array.getLength(arrayValidConstants); j++) {\n arrayValidConstatnsStr[j] = Array.get(arrayValidConstants, j).toString();\n }\n\n validationArgs = arrayValidConstatnsStr;\n\n } catch (IndexOutOfBoundsException iobe) {\n // this is a fatal error\n throw new ActionExecutionException(\"You need to specify the name of the array with valid constants in the 'args' field of the Parameter annotation\");\n } catch (Exception e) {\n // this is a fatal error\n throw new ActionExecutionException(\"Could not get array with valid constants - action annotations are incorrect\");\n }\n } else {\n validationArgs = paramDescriptionAnnotation.args();\n }\n\n List<BaseType> typeValidators = createBaseTypes(paramDescriptionAnnotation.validation(),\n paramDescriptionAnnotation.name(),\n args[i], validationArgs);\n //perform validation\n for (BaseType baseType : typeValidators) {\n if (baseType != null) {\n try {\n baseType.validate();\n } catch (TypeException e) {\n throw new InvalidInputArgumentsException(\"Validation failed while validating argument \"\n + paramDescriptionAnnotation.name()\n + e.getMessage());\n }\n } else {\n log.warn(\"Could not perform validation on argument \"\n + paramDescriptionAnnotation.name());\n }\n }\n }\n }\n }\n }",
"@Test\n void getArgString() {\n }",
"@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FEnumerator src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"int getArgIndex();",
"@Override\n\tpublic void addArg(FormulaElement arg){\n\t}",
"public Type[] getArgumentTypes() {\n/* 236 */ return Type.getArgumentTypes(this.desc);\n/* */ }",
"@Override\n public Object[] getArguments() {\n return null;\n }",
"public login_1_argument() {\n }",
"Optional<String[]> arguments();",
"private Main(String... arguments) {\n this.operations = new ArrayDeque<>(List.of(arguments));\n }",
"@Override\n\tprotected GATKArgumentCollection getArgumentCollection() {\n\t\treturn argCollection;\n\t}",
"protected void sequence_Argument(ISerializationContext context, Argument semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, TdlPackage.Literals.ARGUMENT__NAME) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TdlPackage.Literals.ARGUMENT__NAME));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getArgumentAccess().getNameSTRINGTerminalRuleCall_0_0(), semanticObject.getName());\n\t\tfeeder.finish();\n\t}",
"void setArguments(String arguments);",
"@Override\n\tpublic List<String> getArgumentDesc() {\n\t\treturn desc;\n\t}",
"OpFunctionArgAgregate createOpFunctionArgAgregate();",
"protected abstract Feature<T,?> convertArgument(Class<?> parameterType, Feature<T,?> originalArgument);",
"void visitArgument(Argument argument);",
"public Thaw_args(Thaw_args other) {\r\n }",
"@Override\r\n\tpublic List<String> getArguments()\r\n\t{\n\t\treturn null;\r\n\t}",
"private static String getArgumentString(Object arg) {\n if (arg instanceof String) {\n return \"\\\\\\\"\"+arg+\"\\\\\\\"\";\n }\n else return arg.toString();\n }",
"public interface Param {\n\n int[] args();\n String exec(ExecutePack pack);\n String label();\n}",
"@Override\n public void verifyArgs(ArrayList<String> args) throws ArgumentFormatException {\n super.checkNumArgs(args);\n _args = true;\n }",
"public abstract ValidationResults validArguments(String[] arguments);",
"public ArgumentException() {\n super(\"Wrong arguments passed to function\");\n }",
"public String getArgumentString() {\n\t\treturn null;\n\t}",
"@Override\n public String kind() {\n return \"@param\";\n }",
"@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FEnumerationType src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}",
"public void addArgumentTypeSerialization(String functionName, String argumentName, TensorType type) {\n wrappedSerializationContext.addArgumentTypeSerialization(functionName, argumentName, type);\n }",
"void setArgument(int idx,int v) \t\t{ setArgument(idx,Integer.valueOf(v)); }",
"@Override\n\tprotected byte[] getArgByte() {\n\t\treturn paramsJson.getBytes();\n\t}",
"void onArgumentsChanged();",
"com.google.protobuf.ByteString\n\t\tgetArgBytes();",
"@Override public int getNumArguments()\t\t\t{ return arg_list.size(); }",
"MyArg(int value){\n this.value = value;\n }",
"public ArgList(Object arg1) {\n super(1);\n addElement(arg1);\n }",
"public Clear_args(Clear_args other) {\r\n }",
"private ParameterInformation processArgumentReference(Argument argument,\n List<NameDescriptionType> argTypeSet,\n SequenceEntryType seqEntry,\n int seqIndex)\n {\n ParameterInformation argumentInfo = null;\n\n // Initialize the argument's attributes\n String argName = argument.getName();\n String dataType = null;\n String arraySize = null;\n String bitLength = null;\n BigInteger argBitSize = null;\n String enumeration = null;\n String description = null;\n UnitSet unitSet = null;\n String units = null;\n String minimum = null;\n String maximum = null;\n\n // Step through each command argument type\n for (NameDescriptionType argType : argTypeSet)\n {\n // Check if this is the same command argument referenced in the argument list (by\n // matching the command and argument names between the two)\n if (argument.getArgumentTypeRef().equals(argType.getName()))\n {\n boolean isInteger = false;\n boolean isUnsigned = false;\n boolean isFloat = false;\n boolean isString = false;\n\n // Check if this is an array parameter\n if (seqEntry instanceof ArrayParameterRefEntryType)\n {\n arraySize = \"\";\n\n // Store the reference to the array parameter type\n ArrayDataTypeType arrayType = (ArrayDataTypeType) argType;\n argType = null;\n\n // Step through each dimension for the array variable\n for (Dimension dim : ((ArrayParameterRefEntryType) seqEntry).getDimensionList().getDimension())\n {\n // Check if the fixed value exists\n if (dim.getEndingIndex().getFixedValue() != null)\n {\n // Build the array size string\n arraySize += String.valueOf(Integer.valueOf(dim.getEndingIndex().getFixedValue()) + 1)\n + \",\";\n }\n }\n\n arraySize = CcddUtilities.removeTrailer(arraySize, \",\");\n\n // The array parameter type references a non-array parameter type that\n // describes the individual array members. Step through each data type in the\n // parameter type set in order to locate this data type entry\n for (NameDescriptionType type : argTypeSet)\n {\n // Check if the array parameter's array type reference matches the data\n // type name\n if (arrayType.getArrayTypeRef().equals(type.getName()))\n {\n // Store the reference to the array parameter's data type and stop\n // searching\n argType = type;\n break;\n }\n }\n }\n\n // Check if a data type entry for the parameter exists in the parameter type set\n // (note that if the parameter is an array the steps above locate the data type\n // entry for the individual array members)\n if (argType != null)\n {\n long dataTypeBitSize = 0;\n\n // Check if the argument is an integer data type\n if (argType instanceof IntegerArgumentType)\n {\n IntegerArgumentType icmd = (IntegerArgumentType) argType;\n\n // Get the number of bits occupied by the argument\n argBitSize = icmd.getSizeInBits();\n\n // Get the argument units reference\n unitSet = icmd.getUnitSet();\n\n // Check if integer encoding is set to 'unsigned'\n if (icmd.getIntegerDataEncoding().getEncoding().equalsIgnoreCase(\"unsigned\"))\n {\n isUnsigned = true;\n }\n\n // Determine the smallest integer size that contains the number of bits\n // occupied by the argument\n dataTypeBitSize = 8;\n\n while (argBitSize.longValue() > dataTypeBitSize)\n {\n dataTypeBitSize *= 2;\n }\n\n // Get the argument alarm\n IntegerArgumentType.ValidRangeSet alarmType = icmd.getValidRangeSet();\n\n // Check if the argument has an alarm\n if (alarmType != null)\n {\n // Get the alarm range\n List<IntegerRangeType> alarmRange = alarmType.getValidRange();\n\n // Check if the alarm range exists\n if (alarmRange != null)\n {\n // Store the minimum alarm value\n minimum = alarmRange.get(0).getMinInclusive();\n\n // Store the maximum alarm value\n maximum = alarmRange.get(0).getMaxInclusive();\n }\n }\n\n isInteger = true;\n }\n // Check if the argument is a floating point data type\n else if (argType instanceof FloatArgumentType)\n {\n // Get the float argument attributes\n FloatArgumentType fcmd = (FloatArgumentType) argType;\n dataTypeBitSize = fcmd.getSizeInBits().longValue();\n unitSet = fcmd.getUnitSet();\n\n // Get the argument alarm\n FloatArgumentType.ValidRangeSet alarmType = fcmd.getValidRangeSet();\n\n // Check if the argument has an alarm\n if (alarmType != null)\n {\n // Get the alarm range\n List<FloatRangeType> alarmRange = alarmType.getValidRange();\n\n // Check if the alarm range exists\n if (alarmRange != null)\n {\n // Get the minimum value\n Double min = alarmRange.get(0).getMinInclusive();\n\n // Check if a minimum value exists\n if (min != null)\n {\n // Get the minimum alarm value\n minimum = String.valueOf(min);\n }\n\n // Get the maximum value\n Double max = alarmRange.get(0).getMaxInclusive();\n\n // Check if a maximum value exists\n if (max != null)\n {\n // Get the maximum alarm value\n maximum = String.valueOf(max);\n }\n }\n }\n\n isFloat = true;\n }\n // Check if the argument is a string data type\n else if (argType instanceof StringDataType)\n {\n // Get the string argument attributes\n StringDataType scmd = (StringDataType) argType;\n dataTypeBitSize = Integer.valueOf(scmd.getStringDataEncoding()\n .getSizeInBits()\n .getFixed()\n .getFixedValue());\n unitSet = scmd.getUnitSet();\n isString = true;\n }\n // Check if the argument is an enumerated data type\n else if (argType instanceof EnumeratedDataType)\n {\n EnumeratedDataType ecmd = (EnumeratedDataType) argType;\n EnumerationList enumList = ecmd.getEnumerationList();\n\n // Check if any enumeration parameters are defined\n if (enumList != null)\n {\n // Step through each enumeration parameter\n for (ValueEnumerationType enumType : enumList.getEnumeration())\n {\n // Check if this is the first parameter\n if (enumeration == null)\n {\n // Initialize the enumeration string\n enumeration = \"\";\n }\n // Not the first parameter\n else\n {\n // Add the separator for the enumerations\n enumeration += \", \";\n }\n\n // Begin building this enumeration\n enumeration += enumType.getValue() + \" | \" + enumType.getLabel();\n }\n\n argBitSize = ecmd.getIntegerDataEncoding().getSizeInBits();\n unitSet = ecmd.getUnitSet();\n\n // Check if integer encoding is set to 'unsigned'\n if (ecmd.getIntegerDataEncoding().getEncoding().equalsIgnoreCase(\"unsigned\"))\n {\n isUnsigned = true;\n }\n\n // Determine the smallest integer size that contains the number of bits\n // occupied by the argument\n dataTypeBitSize = 8;\n\n while (argBitSize.longValue() > dataTypeBitSize)\n {\n dataTypeBitSize *= 2;\n }\n\n isInteger = true;\n }\n }\n\n // Get the name of the data type from the data type table that matches the base\n // type and size of the parameter\n dataType = getMatchingDataType(dataTypeBitSize / 8,\n isInteger,\n isUnsigned,\n isFloat,\n isString,\n dataTypeHandler);\n\n // Check if the description exists\n if (argType.getLongDescription() != null)\n {\n // Store the description\n description = argType.getLongDescription();\n }\n\n // Check if the argument bit size exists\n if (argBitSize != null && argBitSize.longValue() != dataTypeBitSize)\n {\n // Store the bit length\n bitLength = argBitSize.toString();\n }\n\n // Check if the units exists\n if (unitSet != null)\n {\n List<UnitType> unitType = unitSet.getUnit();\n\n // Check if the units is set\n if (!unitType.isEmpty())\n {\n // Store the units\n units = unitType.get(0).getContent();\n }\n }\n\n argumentInfo = new ParameterInformation(argName,\n dataType,\n arraySize,\n bitLength,\n enumeration,\n units,\n minimum,\n maximum,\n description,\n 0,\n seqIndex);\n }\n\n break;\n }\n }\n\n return argumentInfo;\n }",
"public abstract interface QueryArgs {\n\n /** Return the catalog associated with this object */\n public Catalog getCatalog();\n\n /** Set the value for the ith parameter */\n public void setParamValue(int i, Object value);\n\n /** Set the value for the parameter with the given label */\n public void setParamValue(String label, Object value);\n\n /** Set the min and max values for the parameter with the given label */\n public void setParamValueRange(String label, Object minValue, Object maxValue);\n\n /** Set the int value for the parameter with the given label */\n public void setParamValue(String label, int value);\n\n /** Set the double value for the parameter with the given label */\n public void setParamValue(String label, double value);\n\n /** Set the double value for the parameter with the given label */\n public void setParamValueRange(String label, double minValue, double maxValue);\n\n /** Set the array of parameter values directly. */\n public void setParamValues(Object[] values);\n\n /** Get the value of the ith parameter */\n public Object getParamValue(int i);\n\n /** Get the value of the named parameter\n *\n * @param label the parameter name or id\n * @return the value of the parameter, or null if not specified\n */\n public Object getParamValue(String label);\n\n /**\n * Get the value of the named parameter as an integer.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public int getParamValueAsInt(String label, int defaultValue);\n\n /**\n * Get the value of the named parameter as a double.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public double getParamValueAsDouble(String label, double defaultValue);\n\n /**\n * Get the value of the named parameter as a String.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public String getParamValueAsString(String label, String defaultValue);\n\n\n /**\n * Return the object id being searched for, or null if none was defined.\n */\n public String getId();\n\n /**\n * Set the object id to search for.\n */\n public void setId(String id);\n\n\n /**\n * Return an object describing the query region (center position and\n * radius range), or null if none was defined.\n */\n public CoordinateRadius getRegion();\n\n /**\n * Set the query region (center position and radius range) for\n * the search.\n */\n public void setRegion(CoordinateRadius region);\n\n\n /**\n * Return an array of SearchCondition objects indicating the\n * values or range of values to search for.\n */\n public SearchCondition[] getConditions();\n\n /** Returns the max number of rows to be returned from a table query */\n public int getMaxRows();\n\n /** Set the max number of rows to be returned from a table query */\n public void setMaxRows(int maxRows);\n\n\n /** Returns the query type (an optional string, which may be interpreted by some catalogs) */\n public String getQueryType();\n\n /** Set the query type (an optional string, which may be interpreted by some catalogs) */\n public void setQueryType(String queryType);\n\n /**\n * Returns a copy of this object\n */\n public QueryArgs copy();\n\n /**\n * Optional: If not null, use this object for displaying the progress of the background query\n */\n public StatusLogger getStatusLogger();\n}",
"@Override\n public void doExeception(Map<String, Object> args)\n {\n \n }",
"@Override\n public void doExeception(Map<String, Object> args)\n {\n \n }",
"@Override\n\tprotected Collection<ArgumentTypeDescriptor> getArgumentTypeDescriptors() {\n\t\treturn Arrays.asList(new VCFWriterArgumentTypeDescriptor(engine, System.out, bisulfiteArgumentSources), new SAMReaderArgumentTypeDescriptor(engine),\n\t\t\t\tnew SAMFileWriterArgumentTypeDescriptor(engine, System.out), new OutputStreamArgumentTypeDescriptor(engine, System.out));\n\t}",
"@Override\n public int getArgent() {\n return _argent;\n }",
"private static @NonNull String resolveInputName(@NonNull Argument<?> argument) {\n String inputName = argument.getAnnotationMetadata().stringValue(Bindable.NAME).orElse(null);\n if (StringUtils.isEmpty(inputName)) {\n inputName = argument.getName();\n }\n return inputName;\n }",
"private Object[] getArguments (String className, Object field)\n\t{\n\t\treturn ((field == null) ? new Object[]{className} : \n\t\t\tnew Object[]{className, field});\n\t}",
"PermissionSerializer (GetArg arg) throws IOException, ClassNotFoundException {\n\tthis( \n\t create(\n\t\targ.get(\"targetType\", null, Class.class),\n\t\targ.get(\"type\", null, String.class),\n\t\targ.get(\"targetName\", null, String.class),\n\t\targ.get(\"targetActions\", null, String.class) \n\t )\n\t);\n }",
"public Type getArgumentDirection() {\n return direction;\n }",
"public String argTypes() {\n return \"I\";//NOI18N\n }",
"public static void main(String arg[]) {\n\n }",
"godot.wire.Wire.Value getArgs(int index);",
"@Override\n protected String[] getArguments() {\n String[] args = new String[1];\n args[0] = _game_file_name;\n return args;\n }",
"public void setArgs(java.lang.String value) {\n this.args = value;\n }",
"private Argument(Builder builder) {\n super(builder);\n }",
"@Override\n public void execute(String[] args) {\n\n }",
"@Override\n\tprotected final void setFromArgument(CommandContext<ServerCommandSource> context, String name) {\n\t}",
"UUID createArgument(ArgumentCreateRequest request);",
"@Override\n public void initialise(String[] arguments) {\n\n }",
"public static ParameterExpression parameter(Class type, String name) { throw Extensions.todo(); }",
"protected abstract void parseArgs() throws IOException;"
]
| [
"0.7164074",
"0.6946075",
"0.6714363",
"0.65115863",
"0.63969076",
"0.6375468",
"0.63481104",
"0.63162106",
"0.6260299",
"0.6208487",
"0.6208487",
"0.62070644",
"0.6197276",
"0.61806154",
"0.6177103",
"0.61530507",
"0.61472267",
"0.61243707",
"0.60771817",
"0.6054482",
"0.59906125",
"0.59906125",
"0.5984017",
"0.59791875",
"0.5977681",
"0.59532714",
"0.5946838",
"0.59457266",
"0.59452903",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.5909717",
"0.5889277",
"0.588111",
"0.5871162",
"0.5866624",
"0.58613646",
"0.58519953",
"0.58381283",
"0.58083445",
"0.58059824",
"0.5795826",
"0.57816726",
"0.57670826",
"0.57556796",
"0.57471323",
"0.57418406",
"0.5729463",
"0.57291526",
"0.5716928",
"0.5713024",
"0.56974274",
"0.56782854",
"0.56723106",
"0.5664594",
"0.5664104",
"0.5660337",
"0.5652865",
"0.5647883",
"0.5642134",
"0.5635645",
"0.5634968",
"0.562251",
"0.56210977",
"0.56167537",
"0.56138444",
"0.56044126",
"0.56044126",
"0.5602371",
"0.56012225",
"0.55986875",
"0.55893147",
"0.5588273",
"0.5583255",
"0.5582767",
"0.55681497",
"0.55626017",
"0.55577534",
"0.55524325",
"0.5549442",
"0.55378276",
"0.5536797",
"0.5527675",
"0.5511817",
"0.55099154",
"0.550257"
]
| 0.0 | -1 |
/final ProgressDialog dialog = new ProgressDialog(getContext()); dialog.setMessage("getting sub services ..."); dialog.setCancelable(false); dialog.show(); | private void GetSubServices(String id) {
HashMap<String,String> param = new HashMap();
param.put(Constants.SERVICE_ID,id);
//url with params
String url= SupportFunctions.appendParam(MyApplication.URL_GET_SUBSERVICES,param);
//url without params
//String url= MyApplication.URL_GET_SERVICES;
Log.e("SubService url",url);
JsonObjectRequest obreq = new JsonObjectRequest(Request.Method.GET,url,null,
// The third parameter Listener overrides the method onResponse() and passes
//JSONObject as a parameter
new Response.Listener<JSONObject>() {
// Takes the response from the JSON request
@Override
public void onResponse(JSONObject response) {
try
{
//getting test master array
// testMasterDetails = testMasterArray.toString();
Log.e("SubService Json_string",response.toString());
Gson gson = new Gson();
SubServiceResponse subServiceResponse= gson.fromJson(response.toString(), SubServiceResponse.class);
if(subServiceResponse.getResponse().equals("100")) {
SubServices[] service = subServiceResponse.getData();
for (SubServices item : service) {
SubServices sub=new SubServices(item.getSer_img_url(),item.getSer_name(),item.getSub_service_id(),service_id,item.getSub_service_desc());
services.add(sub);
Log.e("SubService img title", item.getSer_name());
}
mAdapter.notifyDataSetChanged();
}
} catch (Exception e) {
e.printStackTrace();
//Toast.makeText(NavigationActivity.this, "Invalid album id", Toast.LENGTH_SHORT).show();
//dialog.dismiss();
}
//dialog.dismiss();
}
},
// The final parameter overrides the method onErrorResponse() and passes VolleyError
//as a parameter
new Response.ErrorListener() {
@Override
// Handles errors that occur due to Volley
public void onErrorResponse(VolleyError error) {
Log.e("Volley", "Test Error");
// showNoConnectionDialog();
//dialog.dismiss();
}
}
);
mVolleyRequest.add(obreq);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void showProgressDialog(){\n progressDialog=ProgressDialog.show(context,\"\",\"Loading...Please wait...\");\n\n\n }",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pDialog = new ProgressDialog(MainActivity.this);\n pDialog.setMessage(\"Processing Request...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n }",
"@Override\n protected void onPreExecute() {\n pDialog = new ProgressDialog(homeActivity);\n pDialog.setMessage(\"Retrieving Details... \");\n // pDialog.setMax(16);\n pDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n\n pDialog.setCancelable(false);\n pDialog.show();\n\n\n }",
"@Override\n protected void onPreExecute() {\n\n dialog = new ProgressDialog(context);\n dialog.setTitle(\"Loading Contents\");\n dialog.setMessage(\"Doing something interesting ...\");\n dialog.setIndeterminate(true);\n dialog.setCancelable(false);\n dialog.show();\n }",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pDialog = new ProgressDialog(MainActivity.this);\n pDialog.setMessage(\"Getting Trees...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n }",
"private void progressStuff() {\n cd = new ConnectionDetector(getActivity());\n parser = new JSONParser();\n progress = new ProgressDialog(getActivity());\n progress.setMessage(getResources().getString(R.string.loading));\n progress.setIndeterminate(false);\n progress.setCancelable(true);\n // progress.show();\n }",
"@Override\n protected void onPreExecute() {\n Dialog.setMessage(\"Downloading Pending Delivery Status..\");\n Dialog.setCancelable(false);\n Dialog.show();\n }",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pDialog = new ProgressDialog(context);\n pDialog.setMessage(\"Fetching videolists..\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(true);\n pDialog.show();\n }",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pDialog = new ProgressDialog(myContext);\n pDialog.setMessage(\"Enviando . Aguarde....\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n }",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pDialog = new ProgressDialog(myContext);\n pDialog.setMessage(\"Enviando . Aguarde....\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n }",
"protected void onPreExecute() {\r\n \tdialog = new ProgressDialog(context);\r\n \t\tdialog.setMessage(\"Loading...\");\r\n \t\tdialog.show();\r\n }",
"@Override\r\n\tprotected void onPreExecute()\r\n\t{\r\n\t\tprogress = new ProgressDialog(ctx);\r\n\t\tprogress.setTitle(\"Retrieving Parking Information\");\r\n\t\tprogress.setMessage(\"Please wait.\");\r\n\t\tprogress.setProgressStyle(ProgressDialog.STYLE_SPINNER);\r\n\t\tprogress.show();\r\n\t\tsuper.onPreExecute();\r\n\t}",
"protected void onPreExecute() {\n dialog = ProgressDialog.show(getActivity(), \"\", \"Consultando Clientes...\", true);\n }",
"@Override\n\t\tprotected void onPreExecute()\n\t\t{\n\t\t\tprogressDialog = ProgressDialog.show(MainActivity.this, \"Wait\", \"Serving...\");\n\t\t\t\n\t\t}",
"@Override\n protected void onPreExecute() {\n progressDialog= new ProgressDialog(getActivity());\n progressDialog.setMessage(\"loading..\");\n progressDialog.setIndeterminate(false);\n progressDialog.show();\n }",
"@Override\r\n \tprotected void onPreExecute() {\n \t\tsuper.onPreExecute();\r\n \t\tpdia = new ProgressDialog(Regmember.this);\r\n \t\tpdia.setCanceledOnTouchOutside(false);\r\n pdia.setMessage(\"Dhiraj rakh..........\");\r\n pdia.show(); \r\n \t}",
"@Override\n protected void onPreExecute(){\n progressDialog = new ProgressDialog(context, R.style.AppThemeAssacDialog);\n progressDialog.setMessage(Const.STR_VERIFY_CONECTION_SERVER);\n progressDialog.setCancelable(false);\n progressDialog.show();\n\n super.onPreExecute();\n }",
"@Override\n protected void onPreExecute() {\n progressDialog = new ProgressDialog(getActivity());\n progressDialog.setTitle(getResources().getString(R.string.please_wait));\n progressDialog.setMessage(getResources().getString(R.string.fetching_data));\n progressDialog.show();\n }",
"public void showProgress2(){\n// if (mHandler==null){\n// mHandler = new Handler(Looper.getMainLooper());\n// }\n new Handler(Looper.getMainLooper()).post(new Runnable() {\n @Override\n public void run() {\n loadingDialog = new Dialog(BaseActivity.this);\n loadingDialog.setTitle(\"Loading data..\");\n loadingDialog.setContentView(R.layout.loading);\n loadingDialog.show();\n\n }\n });\n// mHandler.post(new Runnable() {\n// @Override\n// public void run() {\n// loadingDialog = new Dialog(BaseActivity.this);\n// loadingDialog.setTitle(\"Loading data..\");\n// loadingDialog.setContentView(R.layout.loading);\n// loadingDialog.show();\n//\n// }\n// });\n }",
"public void loadingGet(final View v){\n int max = 100;\n progressBar = new ProgressDialog(v.getContext());\n progressBar.setCancelable(false);\n progressBar.setMessage(\"In Progress ...\");\n progressBar.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progressBar.setMax(max);\n for (int i = 0; i <= max; i++) {\n progressBar.setProgress(i);\n if (i == max ){\n progressBar.dismiss();\n }\n progressBar.show();\n }\n // Create a Handler instance on the main thread\n final Handler handler = new Handler();\n\n // Create and start a new Thread\n new Thread(new Runnable() {\n public void run() {\n try{\n getRemittanceOIC();\n Thread.sleep(10000);\n }\n catch (Exception e) { } // Just catch the InterruptedException\n\n handler.post(new Runnable() {\n public void run() {\n progressBar.dismiss();\n final AlertDialog.Builder builder =\n new AlertDialog.Builder(Remittancetooic.this);\n builder.setTitle(\"Information confirmation\")\n .setMessage(\"Data has been successfully updated, thank you.\")\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n recreate();\n dialog.dismiss();\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }\n });\n // Create the AlertDialog object and show it\n builder.create();\n builder.setCancelable(false);\n builder.show();\n }\n });\n }\n }).start();\n }",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pDialog = new ProgressDialog(Chat.this);\n pDialog.setMessage(\"Getting thread...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(true);\n pDialog.show();\n\n }",
"@Override\n protected void onPreExecute() {\n\n\n dialog = new ProgressDialog(MainArea.this);\n dialog.setTitle(\"Loading Results\");\n dialog.setMessage(\"Please Wait Results Are Loading For You....\");\n dialog.setCanceledOnTouchOutside(false);\n dialog.show();\n super.onPreExecute();\n }",
"@Override\n protected void onPreExecute() {\n String msg = \"Please Wait....\";\n cd.showProgressDialog(msg);\n\n }",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n showProgressDialog(R.string.please_wait);\n //showDialog(progress_bar_type);\n }",
"@Override\r\n\t\tprotected void onPreExecute() {\r\n\t\t\tsuper.onPreExecute();\r\n\t\t\tpDialog = new ProgressDialog(Inscription.this);\r\n\t\t\tpDialog.setMessage(\"Chargement ...\");\r\n\t\t\tpDialog.setIndeterminate(false);\r\n\t\t\tpDialog.setCancelable(true);\r\n\t\t\tpDialog.show();\r\n\t\t}",
"@Override\n protected void onPreExecute() {\n Dialog.setMessage(\"Downloading Outlet Inventory..\");\n Dialog.setCancelable(false);\n Dialog.show();\n }",
"@Override\n protected void onPreExecute() {\n progress = new ProgressDialog(hostContext);\n progress.setMessage(\"Wait while books are being downloaded...\");\n progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progress.show();\n }",
"@Override\n protected void onPreExecute() {\n\n dialog.setCancelable(true);\n dialog.setMessage(\"Fetching...\");\n\n dialog.show();\n\n }",
"@Override\n protected void onPreExecute() {\n\n dialog = new ProgressDialog(AddFoodAdvActivity.this);\n dialog.setMessage(\"Please Wait...!\");\n dialog.show();\n super.onPreExecute();\n }",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n\n // // pDialog = new ProgressDialog(getContext());\n pDialog = new ProgressDialog(context);\n pDialog.setMessage(\"Cargando Información\");\n pDialog.setCancelable(true);\n pDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n pDialog.show();\n\n }",
"@Override\r\n protected void onPreExecute() {\n if( progressDialog == null ) {\r\n progressDialog = ProgressDialog.show( context, context.getString(R.string.pref_sync_callings_now_title),\"\");\r\n }\r\n }",
"@Override\n protected void onPreExecute() {\n Dialog.setMessage(\"Downloading Stock Adjustment..\");\n Dialog.setCancelable(false);\n Dialog.show();\n }",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n\n /* mProgress.setMessage(\"Please Wait\");\n mProgress.setCancelable(false);\n mProgress.show();*/\n String msg = \"Please Wait....\";\n cd.showProgressDialog(msg);\n }",
"@Override\n \t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n \t\t\t\t\t\t\t\tpd = ProgressDialog.show(GoodDetailView.this.getContext(), \"提示\", \"请稍候...\");\n \t\t\t\t\t\t\t\tpd.setCancelable(true);\n \n \t\t\t\t\t\t\t\tnew Thread(new RequestThread(REQUEST_TYPE.REQUEST_TYPE_REFRESH, 1)).start();\n \t\t\t\t\t\t\t\tdialog.dismiss();\n \t\t\t\t\t\t\t}",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n progressDialog = new ProgressDialog(AiutaGliAltri.this);\n progressDialog.setMessage(\"Sto Cercando!\");\n progressDialog.setIndeterminate(true);\n progressDialog.setCanceledOnTouchOutside(false);\n progressDialog.show();\n }",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n loading = ProgressDialog.show(this.context, \"Fetching Data\",\"Please Wait...\",true,true);\n }",
"@Override\n\t\tprotected void onPreExecute()\n\t\t{\n\t\t\tsuper.onPreExecute();\n\t\t\tpDialog = new ProgressDialog(MainActivity.this);\n\t\t\tpDialog.setMessage(\"Loading....\");\n\t\t\tpDialog.setCancelable(true);\n\t\t\tpDialog.show();\n\t\t}",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n // Showing progress dialog\n pDialog = new ProgressDialog(thisContext);\n pDialog.setMessage(\"Please wait...\");\n pDialog.setCancelable(true);\n pDialog.show();\n\n }",
"@Override\n\t\t \tprotected void onPreExecute() {\n\t\t try {\n\t\t\t \tpd=new ProgressDialog(Styles_Dialog.this);\n\t\t\t \tpd.setMessage(\"Loading\");\n\t\t\t \tpd.show();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\t\t \t\n\t\t \t}",
"@Override\r\n protected void onPreExecute() {\n super.onPreExecute();\r\n progressDialog = new ProgressDialog(getActivity());\r\n progressDialog.setMessage(\"Fetching route, Please wait...\");\r\n progressDialog.setIndeterminate(true);\r\n progressDialog.show();\r\n }",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n\n pd=new ProgressDialog(c);\n pd.setTitle(\"Send\");\n pd.setMessage(\"Sending..Please wait\");\n pd.show();\n }",
"protected void onPreExecute(){\n // Display the progress dialog on async task start\n // mProgressDialog.show();\n }",
"@Override\n protected void onPreExecute() {\n Log.e(TAG, \"onPreExecute\");\n\n // showing the ProgressBar \n //simpleWaitDialog = ProgressDialog.show(settingslistactivity.this, \"loading records from datastore...\", \"excecuting task...\");\n //simpleWaitDialog.setCancelable(true);\n\n super.onPreExecute();\n }",
"@Override\n protected void onPreExecute() {\n Log.e(TAG, \"onPreExecute\");\n\n // showing the ProgressBar \n //simpleWaitDialog = ProgressDialog.show(settingslistactivity.this, \"loading records from datastore...\", \"excecuting task...\");\n //simpleWaitDialog.setCancelable(true);\n\n super.onPreExecute();\n }",
"@Override\n protected void onPreExecute()\n {\n // Create a new progress dialog\n progressDialog = new ProgressDialog(MainActivity.this);\n // Set the progress dialog spinner progress bar\n progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n // Set the dialog title to 'Loading...'\n progressDialog.setTitle(\"Loading...\");\n // Set the dialog message to 'Loading application View, please wait...'\n progressDialog.setMessage(\"Loading application, please wait...\");\n // This dialog can't be canceled by pressing the back key\n progressDialog.setCancelable(false);\n // This dialog isn't indeterminate\n progressDialog.setIndeterminate(false);\n // The maximum number of items is 100\n progressDialog.setMax(100);\n // Set the current progress to zero\n progressDialog.setProgress(0);\n // Display the progress dialog\n progressDialog.show();\n }",
"@Override\n\tprotected void onPreExecute() {\n\t\t\n\t\t pDialog = new ProgressDialog(context);\n\t\t\ttry{\n\t\t\t\tthis.pDialog.setMessage(\"Please wait ...\");\n\t\t this.pDialog.setIndeterminateDrawable(context.getResources().getDrawable(R.drawable.red_progress));\n\t\t this.pDialog.setIndeterminate(false);\n\t\t this.pDialog.setCancelable(false);\n\t\t this.pDialog.show();\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\te.getMessage();\n\t\t\t}\n\t}",
"@Override\n\t protected void onPreExecute() {\n\t super.onPreExecute();\n\t \n\t progressDialog= new Dialog(ListKotaActivity.this);\n\t progressDialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);\n\t progressDialog.setContentView(R.layout.progress);\n\t progressDialog.setCancelable(false);\n\t progressDialog.show();\t \n\t }",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pDialog = new ProgressDialog(getActivity());\n pDialog.setMessage(\"Chargement des données...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n }",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pDialog = new ProgressDialog(getActivity());\n pDialog.setMessage(\"Chargement des données...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n }",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\taProgressDialog = new ProgressDialog(TargetProducts.this);\n\t\t\taProgressDialog.setMessage(\"Loading Report...\");\n\t\t\taProgressDialog.setIndeterminate(true);\n\t\t\taProgressDialog.setCanceledOnTouchOutside(true);\n\t\t\taProgressDialog.show();\n\t\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\taProgressDialog = new ProgressDialog(TargetProducts.this);\n\t\t\taProgressDialog.setMessage(\"Loading Report...\");\n\t\t\taProgressDialog.setIndeterminate(true);\n\t\t\taProgressDialog.setCanceledOnTouchOutside(true);\n\t\t\taProgressDialog.show();\n\t\t}",
"@Override\n\t\tprotected void onPreExecute() \n\t\t{\n\t\t\t\n\t\t\tdialog = new ProgressDialog(AddFoodAdvActivity.this);\n\t\t\tdialog.setMessage(\"Loading...\");\n\t\t\tdialog.show();\n\t\t\tsuper.onPreExecute();\n\t\t}",
"@Override\n protected void onPreExecute() {\n dialog= ProgressDialog.show(DetailsActivity.this, \"Please wait...\",\"Your connection speed is bad\", true);\n dialog.setCancelable(true);\n dialog.setOnCancelListener(new DialogInterface.OnCancelListener(){\n public void onCancel(DialogInterface dialog) {\n task.cancel(true);\n finish();\n }\n });\n }",
"@Override\n protected void onPreExecute() {\n\n progressDialog = new SafeProgressDialog(PlanningSettings.this);\n progressDialog.setMessage(\"Creating...\");\n progressDialog.setIndeterminate(false);\n progressDialog.setCancelable(true);\n progressDialog.show();\n super.onPreExecute();\n }",
"@Override\n protected void onProgressUpdate(Integer... values) {\n super.onProgressUpdate(values);\n progress = new ProgressDialog(activity);\n progress.setMessage(\"registering..... \");\n progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progress.setIndeterminate(true);\n progress.setCancelable(false);\n progress.show();\n\n }",
"private void creatDialog() {\n \t mDialog=new ProgressDialog(this);\n \t mDialog.setTitle(\"\");\n \t mDialog.setMessage(\"正在加载请稍后\");\n \t mDialog.setIndeterminate(true);\n \t mDialog.setCancelable(true);\n \t mDialog.show();\n \n\t}",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pDialog = new ProgressDialog(DetailActivity.this);\n pDialog.setMessage(\"Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(true);\n pDialog.show();\n }",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tprogressDialog = ProgressDialog.show(MainActivity.this, \"\",\n\t\t\t\t\t\"Loading...\");\n\t\t}",
"public void onPreExecute() {\n progressDialog.show();\n }",
"private void showProgressDialog()\n {\n if (showProgressDialog && !getStatus().equals(AsyncTask.Status.FINISHED)) {\n //show the dialog if valid activity. If the OS is lollipop or higher then set the theme.\n //dialog = ProgressDialog.show(activity, \"In progress..\", message, true);\n if (Build.VERSION.SDK_INT >= 21) {\n dialog = new ProgressDialog(activity, R.style.progressoAlertDialogStyle);\n dialog.setTitle(\"In progress..\");\n dialog.setMessage(message);\n dialog.setIndeterminate(true);\n dialog.show();\n }\n else {\n dialog = ProgressDialog.show(activity, \"In progress..\", message, true);\n }\n\n dialog.setCancelable(false);\n } \n }",
"private void showSpinerProgress() {\n dialog.setMessage(\"Loading\");\n//\n// dialog.setButton(ProgressDialog.BUTTON_POSITIVE, \"YES\", new DialogInterface.OnClickListener() {\n// @Override\n// public void onClick(DialogInterface dialog, int which) {\n//\n// }\n// });\n\n //thiet lap k the huy - co the huy\n dialog.setCancelable(false);\n\n //show dialog\n dialog.show();\n Timer timer = new Timer();\n timer.schedule(new TimerTask() {\n @Override\n public void run() {\n dialog.dismiss();\n }\n }, 20000000);\n }",
"@Override\n protected void onPreExecute() {\n progress = ProgressDialog.show(getContext(), \"Connecting...\", \"Please wait!!!\"); //show a progress dialog\n }",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tpdia = new ProgressDialog(mContext);\n\t\t\tpdia.setMessage(\"Loading...\");\n\t\t\tpdia.show();\n\t\t\tsuper.onPreExecute();\n\t\t}",
"private void showSearchProgressDialog(){\n\n searchButton.setEnabled(false);\n\n if(searchDialogFragment == null){\n searchDialogFragment = new SearchIndicatorDialogFragment();\n\n searchDialogFragment.setOnDialogDismissedListener(new GoogleApiHelper.OnDialogDismissedListener() {\n @Override\n public void onDialogDismissed() {\n cancelSearch = true;\n Log.d(TAG, \"Requesting Search cancellation on Search Progress dialog dismissal\");\n EventBus.getDefault().postSticky(new SearchService.CancelSearchEvent(SearchService.SEARCH_TUTORS));\n // Try cancelling the search\n }\n });\n\n }\n\n searchDialogFragment.show(getFragmentManager(), SearchIndicatorDialogFragment.FRAGMENT_TAG);\n\n /*if(searchProgressDialog == null){\n searchProgressDialog = new ProgressDialog(getContext());\n searchProgressDialog.setIndeterminate(true);\n searchProgressDialog.setCancelable(true);\n searchProgressDialog.setOnCancelListener(new DialogInterface.OnCancelListener() {\n @Override\n public void onCancel(DialogInterface dialog) {\n cancelSearch = true;\n Log.d(TAG, \"Requesting Search cancellation on Search Progress dialog dismissal\");\n EventBus.getDefault().postSticky(new SearchService.CancelSearchEvent(SearchService.SEARCH_TUTORS));\n // Try cancelling the search\n }\n });\n }\n if(!searchProgressDialog.isShowing()){\n Log.d(TAG, \"Showing the search progress dialog...\");\n searchProgressDialog.show();\n }*/\n }",
"private void showDialog(){\n progress = new ProgressDialog(this);\n progress.setTitle(getString(R.string.progress_dialog_loading));\n progress.setMessage(getString(R.string.progress_dialog_authenticating_with_firebase));\n progress.setCancelable(false);\n progress.show();\n }",
"@Override\n protected void onPreExecute() {\n pDialog = new ProgressDialog(getActivity());\n pDialog.setMessage(\"Please wait...\");\n pDialog.setCancelable(false);\n pDialog.setIndeterminate(false);\n pDialog.setMax(100);\n pDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n pDialog.show();\n// progressBar.setVisibility(View.VISIBLE);\n// progressBar.setProgress(0);\n super.onPreExecute();\n }",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tprogressDialog = ProgressDialog.show(SearchView.this, \"Espere...\", \"Recebendo dados\", true, true);\n\t\t\tprogressDialog.setOnCancelListener(new CancelTaskOnCancelListener(this));\n\t\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tprogressDialog = new ProgressDialog(MyMap.this);\n\t\t\tprogressDialog.setMessage(\"Fetching route, Please wait...\");\n\t\t\tprogressDialog.setIndeterminate(true);\n\t\t\tprogressDialog.setCancelable(true);\n\t\t\tprogressDialog.show();\n\t\t}",
"@Override\n\t\t\tprotected void onPreExecute() {\n\t \t\tprogressBar = new ProgressDialog(SiQuoiaLeaderboardActivity.this);\n\t\t\t\tprogressBar.setIndeterminate(true);\n\t\t\t\tprogressBar.setCancelable(false);\n\t\t\t\tprogressBar.setMessage(\"Getting Leaderboard.\");\n\t\t\t\tprogressBar.show();\t\t\t\n\t\t\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tDialog.setMessage(\"Downloading Delivery Data..\");\n\t\t\tDialog.setCancelable(false);\n\t\t\tDialog.show();\n\t\t}",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n\n /*mProgress.setMessage(\"Receiving.....\");\n mProgress.show();\n mProgress.setCancelable(false);*/\n }",
"@Override\n\t\t\tprotected void onPreExecute() {\n\t\t\t\tsuper.onPreExecute();\n\t\t\t\tmProgressDialog = new ProgressDialog(getActivity());\n\t\t\t\tmProgressDialog.setCanceledOnTouchOutside(false);\n\t\t\t\tmProgressDialog.setCancelable(false);\n\t\t\t\tmProgressDialog.show();\n\t\t\t}",
"@Override\n protected void onPreExecute() {\n asyncDialog.setMessage(\"Loading...\");\n //show dialog\n asyncDialog.show();\n super.onPreExecute();\n }",
"@Override\n protected void onPreExecute() {\n this.progressDialog.setMessage(\"Retrieving workouts list...\");\n this.progressDialog.show();\n }",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pDialog = new ProgressDialog(TalkActivity.this);\n pDialog.setMessage(getResources().getString(R.string.loading));\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n }",
"@Override\r\n protected void onPreExecute() {\r\n super.onPreExecute();\r\n this.progressDialog = ProgressDialog.show(SelectFBForDGPSActivity.this, \"\", \"Please wait...Your CMV data is downloading\", false);\r\n this.progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\r\n this.progressDialog.setCancelable(false);\r\n }",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pDialog = new ProgressDialog(Integrationforkhalti.this);\n pDialog.setMessage(\"Loading Please wait...\");\n pDialog.setIndeterminate(true);\n pDialog.setCancelable(false);\n pDialog.show();\n }",
"@Override\r\n\t protected void onPreExecute() {\n\t super.onPreExecute();\r\n\t progressDialog = new ProgressDialog(UDMap.this);\r\n\t progressDialog.setMessage(\"Loading the best way...\");\r\n\t progressDialog.setIndeterminate(true);\r\n\t progressDialog.show();\r\n\t }",
"@Override\n protected void onPreExecute() {\n showLoadingProgressDialog();\n }",
"@Override\n protected void onPreExecute() {\n showLoadingProgressDialog();\n }",
"@Override\r\n\t\tprotected void onPreExecute() {\r\n\t\t\tsuper.onPreExecute();\r\n\t\t\tpDialog = new ProgressDialog(getActivity());\r\n\t\t\tpDialog.setMessage(\"Loading...\");\r\n\t\t\tpDialog.setIndeterminate(false);\r\n\t\t\tpDialog.setCancelable(false);\r\n\t\t\tpDialog.show();\r\n\t\t}",
"@Override\n protected void onProgressUpdate(Integer... values) {\n super.onProgressUpdate(values);\n progress = new ProgressDialog(activity);\n progress.setMessage(\"please wait.. \");\n progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progress.setIndeterminate(true);\n progress.setCancelable(false);\n progress.show();\n\n }",
"@Override\n \t\tprotected void onPreExecute() \n \t\t{\n \t\t\t//Create a new progress dialog\n \t\t\tprogressDialog = new ProgressDialog(MainActivity.this);\n \t\t\t//Set the progress dialog to display a horizontal progress bar \n \t\t\tprogressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n \t\t\t//Set the dialog title to 'Loading...'\n \t\t\tprogressDialog.setTitle(\"Loading Game...\");\n \t\t\t//Set the dialog message to 'Loading application View, please wait...'\n \t\t\tprogressDialog.setMessage(\"Please wait...\");\n \t\t\t//This dialog can't be canceled by pressing the back key\n \t\t\tprogressDialog.setCancelable(false);\n \t\t\t//This dialog isn't indeterminate\n \t\t\tprogressDialog.setIndeterminate(false);\n \t\t\t//The maximum number of items is 100\n \t\t\tprogressDialog.setMax(100);\n \t\t\t//Set the current progress to zero\n \t\t\tprogressDialog.setProgress(0);\n \t\t\t//Display the progress dialog\n \t\t\tprogressDialog.show();\n \t\t}",
"@Override\n\t\t\tprotected void onPreExecute() {\n\t\t\t\tsuper.onPreExecute();\n\t\t\t\tprogressDialog1 = ProgressDialogTripg.show(HotelOrderYuDingMain.this, null, null);\n\t\t\t}",
"void showProgressLoading(Context context, boolean isCancelable) {\n\n progressDialog = new ProgressDialog(context);\n progressDialog.setIndeterminate(true);\n progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progressDialog.setMessage(\"Loading...\");\n progressDialog.setCancelable(isCancelable);\n progressDialog.setCanceledOnTouchOutside(false);\n\n progressDialog.show();\n\n }",
"@Override\n protected void onPreExecute() {\n progress = ProgressDialog.show(ModeSelection.this, \"Connecting...\", \"Please wait!!!\"); //show a progress dialog\n }",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tprogressDialog = new ProgressDialog(ListActivity.this);\n\t\t\tprogressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n\n\t\t\tprogressDialog.setMessage(\"Loading Topics. .\");\n\t\t\tprogressDialog.setCancelable(false);\n\n\t\t\tprogressDialog.show();\n\t\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\t\n\t\t\tdialog = new ProgressDialog(BookingConfirmationScreen.this);\n\t\t\tdialog.setIndeterminate(false);\n\t\t\tdialog.setCancelable(true);\n\t\t\tdialog.show();\n\t\t\t\n\t\t\t\n\t\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tprogressDialog = ProgressDialog.show(SlyThemesActivity.this, \"\",Constants.PROCESSING_REQUEST);\n\t\t}",
"@Override\n \t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n \t\t\t\t\tpd = ProgressDialog.show(GoodDetailView.this.getContext(), \"提示\", \"请稍候...\");\n \t\t\t\t\tpd.setCancelable(true);\n \t\t\t\t\tnew Thread(new RequestThread(REQUEST_TYPE.REQUEST_TYPE_DELETE)).start();\t\t\t\n \t\t\t\t}",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n progressDialog = ProgressDialog.show(QuizActivity.this, \"Downloading Quiz\",\"Wait....\", true);\n }",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\n\t\t\t((Activity) mContext).runOnUiThread(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tmpProgress = ProgressDialog.show(mContext,\n\t\t\t\t\t\t\t\"Downloading data\",\n\t\t\t\t\t\t\t\"Please wait for a moment...\");\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t\n\t\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tmyDialog = ProgressDialog.show\n\t\t\t\t\t(\n\t\t\t\t\t\t\tgetActivity(),\n\t\t\t\t\t\t\t\"Loading...\",\n\t\t\t\t\t\t\t\"Please Wait\",\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t\t);\n\t\t}",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pd = new ProgressDialog(activity);\n pd.setMessage(\"Loading, Please Wait.....\");\n pd.setCancelable(false);\n pd.show();\n }",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tpDialog = new ProgressDialog(ListCekSaldoActivity.this);\n\t\t\tpDialog.setMessage(\"Cek Saldo Please wait...\");\n\t\t\tpDialog.setIndeterminate(false);\n\t\t\tpDialog.setCancelable(false);\n\t\t\tpDialog.show();\n\t\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tpDialog = new ProgressDialog(activity);\n\t\t\tpDialog.setMessage(\"Loading...\");\n\t\t\tpDialog.setIndeterminate(false);\n\t\t\tpDialog.setCancelable(true);\n\t\t\tpDialog.show();\n\t\t}",
"@Override\r\n\tpublic void onStartedCheckout() {\n\r\n\t\tpDialog = new ProgressDialog(getActivity());\r\n\t\tpDialog.setMessage(\"Please Wait...\");\r\n\t\tpDialog.setCancelable(false);\r\n\t\tpDialog.setCanceledOnTouchOutside(false);\r\n\t\tpDialog.show();\r\n\r\n\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\t// progressDialog= ProgressDialog.show(MainActivity.this,\n\t\t\t// \"Progress Dialog Title Text\",\"Process Description Text\", true);\n\n\t\t}",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n this.dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n this.dialog.setCancelable(false);\n this.dialog.show();\n }",
"protected void onPreExecute() { \r\n\t\t\t this.dialog.setMessage(getString(R.string.processing)); \r\n \t\t\t this.dialog.show(); \r\n\t\t }",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n progressDialog = new ProgressDialog(context);\n progressDialog.setCanceledOnTouchOutside(false);\n progressDialog.setTitle(\"Connecting to server\");\n progressDialog.setMessage(\"Please wait...\");\n progressDialog.show();\n }"
]
| [
"0.73390734",
"0.7232427",
"0.72016925",
"0.70982784",
"0.70974237",
"0.70929563",
"0.7023055",
"0.70191586",
"0.6983381",
"0.6983381",
"0.69701207",
"0.6943943",
"0.6941362",
"0.692392",
"0.69017106",
"0.6894601",
"0.688262",
"0.6855221",
"0.68524355",
"0.6845284",
"0.68298674",
"0.68231285",
"0.6821572",
"0.6819741",
"0.6818946",
"0.6814789",
"0.6812407",
"0.68100035",
"0.6799147",
"0.67970365",
"0.6792747",
"0.6791699",
"0.6770192",
"0.67690146",
"0.675081",
"0.6744459",
"0.6741025",
"0.6737152",
"0.6734902",
"0.67317444",
"0.672027",
"0.669657",
"0.66901886",
"0.66901886",
"0.6686193",
"0.66777027",
"0.6672013",
"0.6665918",
"0.6665918",
"0.66648734",
"0.66648734",
"0.6664872",
"0.6662066",
"0.6661914",
"0.66608286",
"0.6659145",
"0.66553706",
"0.6627191",
"0.6627152",
"0.6627087",
"0.66248924",
"0.66242385",
"0.66230345",
"0.6612302",
"0.6605105",
"0.6602963",
"0.66004",
"0.6595857",
"0.6594748",
"0.65667593",
"0.6552573",
"0.6539924",
"0.65388995",
"0.6536826",
"0.65313804",
"0.6531309",
"0.65057427",
"0.6505533",
"0.6501319",
"0.6501319",
"0.65012306",
"0.64860463",
"0.64838445",
"0.6471675",
"0.64661163",
"0.64615244",
"0.6455669",
"0.6455563",
"0.64549035",
"0.64542717",
"0.6452714",
"0.64490044",
"0.64449424",
"0.6439597",
"0.6435334",
"0.6431235",
"0.6429995",
"0.6428677",
"0.64278126",
"0.6425906",
"0.64206284"
]
| 0.0 | -1 |
Takes the response from the JSON request | @Override
public void onResponse(JSONObject response) {
try
{
//getting test master array
// testMasterDetails = testMasterArray.toString();
Log.e("SubService Json_string",response.toString());
Gson gson = new Gson();
SubServiceResponse subServiceResponse= gson.fromJson(response.toString(), SubServiceResponse.class);
if(subServiceResponse.getResponse().equals("100")) {
SubServices[] service = subServiceResponse.getData();
for (SubServices item : service) {
SubServices sub=new SubServices(item.getSer_img_url(),item.getSer_name(),item.getSub_service_id(),service_id,item.getSub_service_desc());
services.add(sub);
Log.e("SubService img title", item.getSer_name());
}
mAdapter.notifyDataSetChanged();
}
} catch (Exception e) {
e.printStackTrace();
//Toast.makeText(NavigationActivity.this, "Invalid album id", Toast.LENGTH_SHORT).show();
//dialog.dismiss();
}
//dialog.dismiss();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }",
"private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }",
"public void parseResponse();",
"private void parseJSON(String response)\n {\n try\n {\n // Using orj.json, get the file string and convert it to an object\n JSONObject object = (JSONObject) new JSONTokener(response).nextValue();\n\n // The Winnipeg Transit JSON results usually have nested values\n // We can identify the request by the first key of the first level\n\n // The method names() will retrieve an JSONArray with the key names\n JSONArray objectNames = object.names();\n\n // Retrieve the first key of the first level\n String firstKey = objectNames.getString(0);\n\n if (firstKey.equals(\"status\"))\n {\n parseStatus(object.getJSONObject(firstKey));\n }\n else if (firstKey.equals(\"stop-schedule\"))\n {\n parseStopSchedule(object.getJSONObject(firstKey));\n }\n }\n catch (JSONException e)\n {\n e.printStackTrace();\n }\n }",
"@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }",
"java.lang.String getResponse();",
"@Override\n public void onResponse(JSONObject jsonObject)\n {\n }",
"@Override\n\t\t\t\t\t\t\tpublic void onComplete(String response, Object state) {\n\t\t\t\t\t\t\t\tString json = response;\n\t\t\t\t\t\t\t\tLog.d(\"arv\", \"arv\"+json);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}",
"public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }",
"void response( JSONArray data );",
"@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }",
"@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }",
"@Override\n public Boolean onCompleted(Response response) throws Exception {\n System.out.println(response.getResponseBody());\n Type type = new TypeToken<Map<String, String>>() {\n }.getType();\n Map<String, String> jsonMap = jsonSeralizer.fromJson(response.getResponseBody(), type);\n //System.out.println(\"Results of Permssions set: \"+jsonMap);\n if (!jsonMap.get(\"success\").equals(1)) {\n System.out.println(\"File has been made available.\");\n return true;\n } else {\n System.out.println(jsonMap.get(\"error_message\"));\n return false;\n\n }\n }",
"@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }",
"@Override\n public void onResponse(final JSONObject response) {\n Log.d(\"Response from FatSecret\", response.toString());\n try{\n JSONObject res = new JSONObject(response.getJSONObject(\"foods\").getJSONArray(\"food\").get(0).toString());\n saveFoodID.setText(res.getString(\"food_id\"));\n mainFoodName = res.getString(\"food_name\");\n foodIDView.setText(getString(R.string.food_display, res.getString(\"food_name\"), res.getString(\"food_id\")));\n requestFinished(true);\n }\n catch (Exception e){}\n }",
"@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }",
"@Override\n public void success(Response result, Response response) {\n BufferedReader reader = null;\n\n //An string to store output from the server\n String output = \"\";\n\n try {\n //Initializing buffered reader\n reader = new BufferedReader(new InputStreamReader(result.getBody().in()));\n\n //Reading the output in the string\n output = reader.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n //Displaying the output as a toast\n Toast.makeText(MainActivity.this, output, Toast.LENGTH_LONG).show();\n }",
"@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }",
"@Override\n public void onResponse(String response) {\n parseData(url, response);\n }",
"@Override\n public void onResponse(String response) {\n }",
"@Override\n public void onResponse(String response) {\n }",
"@Override\n public void onResponse(String response) {\n }",
"@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }",
"@Override\n public void onResponse(String response) {\n }",
"@Override\n public void onResponse(String response) {\n try {\n //Convert response to a json\n JSONObject jsonObject = new JSONObject(response.toString());\n String result = jsonObject.getString(\"result\");\n eventArray = new JSONArray(result);\n createListData(eventArray);\n } catch (JSONException e) {\n Log.d(\"TimelineLog\", \"json conversion didn't work\");\n e.printStackTrace();\n }\n }",
"@Override\n public void onResponse(String response)\n {\n\n }",
"String getResponse();",
"@Override\n public void onResponse(Response response) throws IOException {\n if (!response.isSuccessful()) {\n //Here our reponse is UnSucessfull so we inform the user\n // about the same as before\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n return;\n }\n //If Response is sucessfull we move forward and convert the\n // reponse which is in JSON format to String\n String respFromApi = response.body().string();\n\n //We will Log this LogCat in order to view the Raw Format recieved\n //you can open the log cat go in debug section and type RawData you\n // will be able to observe data there\n Log.d(\"RawData\", respFromApi);\n\n //Now We will call Extract Data Function which will retrieve the\n // woied and name of each city from the response\n try {\n extractData(respFromApi);\n } catch (Exception e) {\n //Informing Data is Not in JSON Format\n Toast.makeText(MainActivity.this, \"Response Not in JSON Format\", Toast.LENGTH_SHORT).show();\n }\n ;\n }",
"@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }",
"public void setResponse(JSONObject res) { response = res; }",
"@Override\n public void onResponse(String response) {\n }",
"@Override\n public void onResponse(String response) {\n }",
"@Override\n public void onResponse(JSONArray response) {\n parseData(response);\n }",
"@Override\n public void onResponse(String json) {\n parseLogInResponse(json);\n }",
"@Override\n public void onResponse(String response) {\n opprettListe(response);\n }",
"@Override\r\n\tprotected GuardarSustentoResponse responseText(String json) {\n\t\tGuardarSustentoResponse guardarSustentoResponse = JSONHelper.desSerializar(json, GuardarSustentoResponse.class);\r\n\t\treturn guardarSustentoResponse;\r\n\t}",
"@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }",
"public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }",
"@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }",
"@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }",
"void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);",
"@Override\r\n public void onResponse(JSONArray response) {\n parseData(response, requestCount);\r\n }",
"@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }",
"@Override\n public void onResponse(String response) {\n Gson gson = new Gson();\n ServerResponse serverResponse = gson.fromJson(response, ServerResponse.class);//Parse do json segundo o modelo SeverResponse\n\n if (serverResponse.isSuccess()) {\n ModalidadeArray modalidadeArray = gson.fromJson(serverResponse.getResponse(), ModalidadeArray.class);\n ArrayList<Modalidade> modalidades = new ArrayList<Modalidade>(Arrays.asList(modalidadeArray.getModalidades()));\n DataHolder.getInstance().setModalidade(modalidades.get(0));\n\n Intent intent = new Intent(Constants.kGetModalidadesDone);\n context.sendBroadcast(intent);\n\n } else {\n Toast.makeText(context, serverResponse.getMessage(),\n Toast.LENGTH_LONG).show();\n }\n }",
"@Override\r\n\tprotected GuardarVtaCeroMotivoResponse responseText(String json) {\n\t\tGuardarVtaCeroMotivoResponse guardarVtaCeroMotivoResponse = JSONHelper.desSerializar(json, GuardarVtaCeroMotivoResponse.class);\r\n\t\treturn guardarVtaCeroMotivoResponse;\r\n\t}",
"public Object getResponse ()\r\n {\r\n\r\n return response_;\r\n }",
"private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }",
"@Override\n\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\n\t\t\t\t\t\tJSONArray response) {\n\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tgetJsonObj(response);\n\t\t\t\t\t\tLog.e(\"lory.....\", \"\"+fans.toString());\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t}",
"@Override\n public void onResponse(Call call, Response response) throws IOException {\n String jsonStr = response.body().string();\n Log.i(TAG, \"onResponse: --------------------------------\" + jsonStr);\n parseJsonAndUpdateView(jsonStr.trim());\n }",
"protected abstract Object buildJsonObject(R response);",
"@Override\n public void onResponse(String response) {\n Utils.logApiResponseTime(calendar, tag + \" \" + url);\n mHandleSuccessResponse(tag, response);\n\n }",
"@Override\n\t\t\t\t\tpublic void handleResponse(String jsonResult, EHttpError error) {\n\t\t\t\t\t\tif(jsonResult!=null&&error == EHttpError.KErrorNone){\n\t\t\t\t\t\t\tGson gson = new Gson();\n\t\t\t\t\t\t\tType type = new TypeToken<Map<String, Object>>() {\n\t\t\t\t\t\t\t}.getType();\n\t\t\t\t\t\t\tbooks = gson.fromJson(jsonResult, type);\n\t\t\t\t\t\t\tList<Map<String, Object>>list = (List<Map<String, Object>>) books.get(\"books\");\n\t\t\t\t\t\t\tSystem.out.println(\"书籍详情\"+list);\n\t\t\t\t\t\t\tthis.completeListener.onQueryComplete(GETBOOKBYNAME, list, error);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis.completeListener.onQueryComplete(GETBOOKBYNAME, null, error);\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"@Override\n public void onResponse(String response) {\n Gson gson = new Gson();\n\n try {\n JSONObject jsonObject = new JSONObject(response);\n String result = jsonObject.getJSONArray(\"results\").toString();\n\n Type listType = new TypeToken<List<Pokemon>>() {\n }.getType(); //Setting up the type for the conversion\n\n pokemonList = gson.fromJson(result, listType);\n pokemonList = pokemonList.subList(0, POKEDEX_LENGTH);\n\n for (int i = 0; i < pokemonList.size(); i++) {\n pokemonList.get(i).setIdFromUrl();\n }\n\n getPokemonListWithTypes();\n } catch (JSONException exception) {\n exception.printStackTrace();\n }\n }",
"@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }",
"@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }",
"@Override\n\tpublic void handleResponse() {\n\t\t\n\t}",
"@Override\n\tpublic void processResponse(Response response)\n\t{\n\t\t\n\t}",
"@Override\n public void onResponse(String response) {\n // try/catch block for returned JSON data\n // see API's documentation for returned format\n try {\n JSONObject result = new JSONObject(response);\n JSONArray resultList = result.getJSONArray(\"outputs\");\n JSONObject inner = resultList.getJSONObject(0);\n String out = inner.getString(\"output\");\n output.setText(\" \"+out);\n\n // catch for the JSON parsing error\n } catch (JSONException e) {\n Toast.makeText(MainActivity.this, e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n public void onResponse(String json) {\n parseTempFBLogInResponse(json);\n }",
"@Override\n public void onResponse(String response) {\n try {\n JSONObject obj = new JSONObject(response);\n String content = obj.getString(\"content\");\n getAPI.setText(\"Response is: \" + content);\n } catch (JSONException error) {\n getAPI.setText(\"That didn't work!\");\n error.printStackTrace();\n }\n }",
"@Override\n\t\t\t\t\t\tpublic void onResponse(String response) {\n\t\t\t\t\t\t\tparseRespense(response);\n\t\t\t\t\t\t}",
"@Override\n\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onResponse(Response response) throws IOException {\n }",
"@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }",
"public void onResponse(Response response) throws Exception;",
"@Override\n public void onResponse(String response) {\n finalData(response);\n }",
"@Override\n\t\t\t\t\tpublic void handleResponse(String jsonResult, EHttpError error) {\n\t\t\t\t\t\tif(jsonResult!=null&&error == EHttpError.KErrorNone){\n\t\t\t\t\t\t\tGson gson = new Gson();\n\t\t\t\t\t\t\tType type = new TypeToken<Map<String, Object>>() {\n\t\t\t\t\t\t\t}.getType();\n\t\t\t\t\t\t\tbooks = gson.fromJson(jsonResult, type);\n\t\t\t\t\t\t\tList<Map<String, Object>>list = (List<Map<String, Object>>) books.get(\"books\");\n\t\t\t\t\t\t\tSystem.out.println(\"搜索到的书\"+list);\n\t\t\t\t\t\t\tthis.completeListener.onQueryComplete(new QueryId(), list, error);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis.completeListener.onQueryComplete(new QueryId(), null, error);\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"@Override\n public void processResult(HttpResponseMessage response) {\n }",
"@Override\n public void onResponse(JSONArray response) {\n ;\n }",
"@Override\n protected void deliverResponse(JSONObject response) {\n listener.onResponse(response);\n System.out.println(\"response \"+response);\n }",
"@Override\n\t\t\t\t\tpublic void onResponse(String response) {\n\n\t\t\t\t\t}",
"void onRequestCompleted(JSONArray result);",
"private void observeResponse(final JSONObject response) {\n if (response.length() > 0) {\n if (response.has(\"code\")) {\n System.out.println(\"Failed to add contact\");\n }\n } else {\n Log.d(\"JSON Response\", \"No Response\");\n }\n }",
"@Override\n\t\t\t\t\tpublic void handleResponse(String jsonResult, EHttpError error) {\n\t\t\t\t\t\tif(jsonResult!=null&&error == EHttpError.KErrorNone){\n\t\t\t\t\t\t\tGson gson = new Gson();\n\t\t\t\t\t\t\tType type = new TypeToken<Map<String, Object>>() {\n\t\t\t\t\t\t\t}.getType();\n\t\t\t\t\t\t\tbooks = gson.fromJson(jsonResult, type);\n\t\t\t\t\t\t\tList<Map<String, Object>>list = (List<Map<String, Object>>) books.get(\"books\");\n saveCache(context, jsonResult);\n\t\t\t\t\t\t\tSystem.out.println(\"旧书\"+list);\n\t\t\t\t\t\t\tthis.completeListener.onQueryComplete(GETBOOKBYTAPE, books, error);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis.completeListener.onQueryComplete(GETBOOKBYTAPE, null, error);\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }",
"@Override\n public void onResponse(String response) {\n try {\n JSONObject data = new JSONObject(response);\n distance = data.getJSONArray(\"rows\").getJSONObject(0).getJSONArray(\"elements\")\n .getJSONObject(0).getJSONObject(\"distance\").getString(\"text\");\n duration = data.getJSONArray(\"rows\").getJSONObject(0).getJSONArray(\"elements\")\n .getJSONObject(0).getJSONObject(\"duration\").getString(\"text\");\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"private void observeResponse(final JSONObject theResponse) {\n if (theResponse.length() > 0) {\n if (theResponse.has(\"code\")) {\n try {\n myBinding.editResetEmail.setError(\n \"Error Authenticating: \" +\n theResponse.getJSONObject(\"data\").getString(\"message\"));\n } catch (JSONException e) {\n Log.e(\"JSON Parse Error\", e.getMessage());\n }\n } else {\n navigateToSuccess();\n }\n } else {\n Log.d(\"JSON Response\", \"No Response\");\n }\n\n\n }",
"@Override\n\t\t\t\t\tpublic void handleResponse(String jsonResult, EHttpError error) {\n\t\t\t\t\t\tMap<String, Object>books;\n\t\t\t\t\t\tif(jsonResult!=null&&error == EHttpError.KErrorNone){\n\t\t\t\t\t\t\tGson gson = new Gson();\n\t\t\t\t\t\t\tType type = new TypeToken<Map<String, Object>>() {\n\t\t\t\t\t\t\t}.getType();\n\t\t\t\t\t\t\tbooks = gson.fromJson(jsonResult, type);\n\t\t\t\t\t\t\tList<String>list = (List<String>) books.get(\"booknames\");\n\t\t\t\t\t\t\tSystem.out.println(\"搜索到的书\"+list);\n\t\t\t\t\t\t\tthis.completeListener.onQueryComplete(AUTOCOMPLETE, list, error);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis.completeListener.onQueryComplete(AUTOCOMPLETE, null, error);\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"@Override\n\t\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void onResponse(String json) {\n parseRefreshResponse(json);\n }",
"@GET\n @Path(\"/getRecipes\")\n public Response getRecipes(\n @QueryParam(\"items\") String ingredients\n ){\n\n try {\n String decodedRecipes = URLDecoder.decode(ingredients, \"UTF-8\");\n } catch (Exception e){\n return Response.status(Response.Status.BAD_REQUEST)\n .entity(\"Error\")\n .build();\n }\n\n String baseURL = \"https://api.edamam.com/search\";\n Client client = ClientBuilder.newClient();\n\n WebTarget target = client.target(baseURL)\n .queryParam(\"app_id\", \"d1fc9900\")\n .queryParam(\"app_key\", \"a9307ac9d85fe8df2ad5d37597245915\")\n .queryParam(\"q\", ingredients);\n String response = target.request().get(String.class);\n\n JSONObject jsonObject = new JSONObject(response);\n\n String recipes = jsonObject.get(\"hits\").toString();\n\n JSONArray array = new JSONArray(recipes);\n\n StringBuilder results = new StringBuilder();\n for(int i = 0; i < array.length(); i++){\n JSONObject object = (JSONObject) array.get(i);\n JSONObject recipeObject = (JSONObject) object.get(\"recipe\");\n\n //System.out.println(recipeObject.keySet());\n// System.out.println(\"Label: \" + recipeObject.get(\"label\"));\n// System.out.println(\"Image: \" + recipeObject.get(\"image\"));\n// System.out.println(\"URL: \" + recipeObject.get(\"url\"));\n// System.out.println();\n\n JSONObject data = new JSONObject();\n data.put(\"label\", recipeObject.get(\"label\"));\n data.put(\"image\", recipeObject.get(\"image\"));\n data.put(\"url\", recipeObject.get(\"url\"));\n\n results.append(data.toString() + \"∑\");\n }\n\n System.out.println(results.toString());\n\n return Response.ok(results.toString()).build();\n\n // Parsing JSON response\n\n//\n// ObjectMapper objectMapper = new ObjectMapper();\n//\n// try{\n// Map<String, Object> map = objectMapper.readValue(response, new TypeReference<Map<String, Object>>() {\n// });\n//\n// //StringTokenizer tokenizer = new StringTokenizer(map.get(\"hits\").toString(), \"recipe=\");\n// // System.out.println(map.get(\"hits\"));\n// //System.out.println(map.keySet());\n//\n// }\n// catch (Exception e){\n// System.out.println(\"Error parsing string\");\n// }\n// return null;\n }",
"@Override\n\t\t\t\t\tpublic void onResponse(String s) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}",
"@Override\r\n\tprotected ActualizarClienteResponse responseText(String json) {\n\t\tActualizarClienteResponse actualizarClienteResponse = JSONHelper.desSerializar(json, ActualizarClienteResponse.class);\r\n\t\treturn actualizarClienteResponse;\r\n\t}",
"private void observeResponse(final JSONObject response) {\n if (response.length() > 0) {\n if (response.has(\"code\")) {\n try {\n binding.registerEmail.setError(\"Error Authentication \" +\n response.getJSONObject(\"data\").getString(\"message\"));\n } catch (JSONException e) {\n Log.e(\"JSON Parse Erro\", e.getMessage());\n }\n\n } else {\n navigateToLogin();\n\n }\n } else {\n Log.d(\"JSON Response\", \"No Response\");\n }\n }",
"@Override\r\n\tprotected ConsultarIndiceEjecucionAnioResponse responseText(String json) {\n\t\tConsultarIndiceEjecucionAnioResponse response = JSONHelper.desSerializar(json, ConsultarIndiceEjecucionAnioResponse.class);\r\n\t\treturn response;\r\n\t}",
"private void observeResponse(final JSONObject response) {\n if (response.length() > 0) {\n if (response.has(\"code\")) {\n try {\n binding.editEmail.setError(\n \"Error Authenticating: \" +\n response.getJSONObject(\"data\").getString(\"message\"));\n } catch (JSONException e) {\n Log.e(\"JSON Parse Error\", e.getMessage());\n }\n } else {\n try {\n navigateToSuccess(\n binding.editEmail.getText().toString(),\n response.getString(\"token\")\n );\n } catch (JSONException e) {\n Log.e(\"JSON Parse Error\", e.getMessage());\n }\n }\n } else {\n Log.d(\"JSON Response\", \"No Response\");\n }\n }",
"@Override\r\n\tprotected ProfitHistoryDetalleResponse responseText(String json) {\n\t\tProfitHistoryDetalleResponse response = JSONHelper.desSerializar(json,ProfitHistoryDetalleResponse.class);\r\n\t\treturn response;\r\n\t}",
"private static String paseResponse(HttpResponse response) {\n\t\tHttpEntity entity = response.getEntity();\n\t\t\n//\t\tlog.info(\"response status: \" + response.getStatusLine());\n\t\tString charset = EntityUtils.getContentCharSet(entity);\n//\t\tlog.info(charset);\n\t\t\n\t\tString body = null;\n\t\ttry {\n if (entity != null) { \n InputStream instreams = entity.getContent(); \n body = convertStreamToString(instreams); \n// System.out.println(\"result:\" + body);\n } \n//\t\t\tlog.info(body);\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn body;\n\t}",
"public void onResponse(JSONObject response) {\n if (response != null) {\n dissmissDialog();\n parseJsonFeed(response);\n }\n }",
"public void onResponse(JSONObject response) {\n if (response != null) {\n dissmissDialog();\n parseJsonFeed(response);\n }\n }",
"private BaseResponse completeResponseDetail(BaseResponse baseResp, String json) throws IOException {\n String code = baseResp.getCode();\n String text = baseResp.getText();\n \n BaseResponse resultResp = null;\n switch(code) {\n case TEXT:\n resultResp = baseResp;\n break;\n case LINK:\n resultResp = mapper.readValue(json, LinkResponse.class);\n break;\n case NEWS:\n resultResp = mapper.readValue(json, new TypeReference<ListResponse<News>>(){});\n break;\n case TRAIN:\n resultResp = mapper.readValue(json, new TypeReference<ListResponse<TrainInfo>>(){});\n break;\n case FLIGHT:\n resultResp = mapper.readValue(json, new TypeReference<ListResponse<FlightInfo>>(){});\n break;\n case RECIPE:\n resultResp = mapper.readValue(json, new TypeReference<ListResponse<Recipe>>(){});\n break;\n default:\n throw new IOException(String.format(\"Error Code: %s, Message: %s\", code, text));\n }\n \n return resultResp;\n }",
"@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }",
"JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }",
"@Override\n public void onResponseSuccess(final String resp) {\n }",
"@Override\n protected Response<WeatherPOJO> parseNetworkResponse(NetworkResponse response) {\n try {\n // Convert the obtained byte[] into a String\n String json = new String(response.data, HttpHeaderParser.parseCharset(response.headers));\n // Use Gson to process the JSON string and return a WeatherPOJO object\n return Response.success(new Gson().fromJson(json, WeatherPOJO.class),\n HttpHeaderParser.parseCacheHeaders(response));\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public void onResponse(Call call, Response response) throws IOException {\n Type arg = ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0];\n T result = READ_MAPPER.readValue(response.body().string(), READ_MAPPER.getTypeFactory().constructType(arg));\n onResult(result);\n }",
"@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response.toString());\n displayGraphResult(response);\n }",
"@Override\r\n\tprotected ActualizarCompromisoResponse responseText(String json) {\n\t\tActualizarCompromisoResponse response = JSONHelper.desSerializar(json, ActualizarCompromisoResponse.class);\r\n\t\treturn response;\r\n\t}"
]
| [
"0.6976162",
"0.6837445",
"0.6687928",
"0.6647482",
"0.6575177",
"0.6485794",
"0.64705366",
"0.6437682",
"0.64253217",
"0.63901097",
"0.63652235",
"0.62953717",
"0.6281517",
"0.62787837",
"0.62755907",
"0.6272175",
"0.626835",
"0.6265117",
"0.624509",
"0.62404484",
"0.62404484",
"0.62404484",
"0.623603",
"0.6221578",
"0.6214234",
"0.6202971",
"0.6196309",
"0.6183118",
"0.61721915",
"0.6167627",
"0.61663705",
"0.6160273",
"0.6156757",
"0.6155479",
"0.61500967",
"0.61498016",
"0.61461043",
"0.6142963",
"0.61376506",
"0.6118951",
"0.61174214",
"0.6108728",
"0.6103319",
"0.6102743",
"0.60995406",
"0.6099154",
"0.6097134",
"0.60894364",
"0.60809416",
"0.6076836",
"0.6072828",
"0.607115",
"0.605849",
"0.6051353",
"0.605069",
"0.605069",
"0.6042991",
"0.6040564",
"0.6040021",
"0.60393447",
"0.6034706",
"0.6029718",
"0.6025567",
"0.6021089",
"0.60192806",
"0.60177785",
"0.60161555",
"0.60132396",
"0.60111934",
"0.6011019",
"0.6008816",
"0.60085213",
"0.5992629",
"0.5980844",
"0.5954603",
"0.5951866",
"0.5942968",
"0.5942344",
"0.5937342",
"0.5935573",
"0.5933522",
"0.592471",
"0.59231645",
"0.5919787",
"0.5908141",
"0.5904954",
"0.589567",
"0.58830535",
"0.5866545",
"0.58594376",
"0.5852471",
"0.58523023",
"0.58523023",
"0.5848082",
"0.58415896",
"0.58400244",
"0.5839611",
"0.5836358",
"0.5830162",
"0.58245564",
"0.58236283"
]
| 0.0 | -1 |
return e at index i | E set(int i , E e) throws IndexOutOfBoundsException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public E get(int index);",
"public abstract E get(int index);",
"E get(int i) throws IndexOutOfBoundsException;",
"@Override\n\tpublic E get(int i) throws IndexOutOfBoundsException {\n\t\treturn null;\n\t}",
"E get( int index );",
"E get(int i) {\r\n @SuppressWarnings(\"unchecked\")\r\n final E e = (E)arr[i];\r\n return e;\r\n }",
"@Override\n public E get(int i) throws IndexOutOfBoundsException {\n validIndex(i);\n return data[i];\n }",
"public E get(int i) {\n\n\t if (i < 0 && i > num_elements)\n\t return null;\n\t \n\t return(elements[i]);\n\t }",
"public E get(int index) {\n return this.elements[index];\n }",
"public E get(int index)\n\t{\n\t\treturn contents[index];\n\t}",
"@Override\n\tpublic E get(int index) {\n\t\treturn node(index).elementE;\n\t}",
"public E get(int index) { \n return (E)list[index];\n }",
"@Override\n public E get(final int index) {\n return array[index];\n }",
"public synchronized E get(int index) {\n return this.array.get(index);\n }",
"@Override\n\tpublic E get(int i) {\n\t\tif (i < 0 || i >= this.numberOfElements) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\telse {\n\t\t\treturn this.arrayList[i];\n\t\t}\n\t}",
"public E get(int index){\n if (index < 0 || index >= size){\n throw new ArrayIndexOutOfBoundsException(index);\n }\n return theData[index];\n }",
"public E get(int index) {\r\n\t\tif (indices.get(index) == null) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} else {\r\n\t\t\treturn indices.get(index).data;\t\t\r\n\t\t}\r\n\t}",
"public E get(int index) {\n //make sure the index is valid\n if (this.array.length - 1 >= index) {\n //encapsulate\n Object element = this.array[index];\n return (E) element;\n } \n \n //if the index is invalid, return -1\n throw new IllegalArgumentException();\n }",
"@Override\n public E get(int index) {\n // todo: Students must code\n checkRange(index); // throws IndexOOB Exception if out of range\n return data[calculate(index)];\n }",
"@Override\n\tpublic E get(int index) {\n\t\treturn null;\n\t}",
"@Override\n public E get(int i) throws IndexOutOfBoundsException {\n checkRange(i);\n\n if (size == 1) {\n return (E) storage;\n } else if (size <= 5) {\n return ((E[]) storage)[i];\n } else {\n return ((ArrayList<E>) storage).get(i);\n }\n }",
"public T returnItem(int i) {\n return a[i];\n }",
"public E get(int idx) {\n assert idx >= 0;\n \n if(v == array[idx]){\n\t\tv = array[idx];\n\t}\n\t\n\tif(array[idx] == null){\n\t\tv = null;\n\t}\n\treturn v;\n }",
"@Override\n public E get(final int index) {\n ensureValidIndex(size, index);\n return super.get(index + lower);\n }",
"public int index(int i){\n \t\tif (i < 0 || i >= length()) throw new IllegalArgumentException();\n \t\treturn csa[i];\n \t}",
"public E get(int index) {\r\n return items.get(index);\r\n }",
"public E get(int idx, E b) {\n assert idx >= 0;\n\n if(v == array[idx]){\n\t\treturn v;\n\t}\n\t\n\tif(array[idx] == null){\n\t\treturn b;\n\t}\n\treturn b;\n }",
"public amj e(int paramInt)\r\n/* 480: */ {\r\n/* 481:493 */ return this.b[paramInt];\r\n/* 482: */ }",
"public int index(int i) {\n\t\tif (i < 0 || i >= text.length) throw new IndexOutOfBoundsException();\n\t\treturn r2p[i];\n\t}",
"public Term get(int i) {\n\t\treturn this.elts[i];\n\t}",
"public E atIndex(int index) {\n\t\tif(index < numElements) {\n\t\t\treturn elements[index];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public E get(int index)\n {\n if (index >= 0 && index < size)\n return data[index];\n else\n throw new NoSuchElementException();\n }",
"public @Override E get(int index) {\n \treturn getNode(index).data;\n }",
"public E get(int index) {\n\t\tif (index < 0 || index >= size) {\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\treturn elements[index];\n\t}",
"private E getElement(int index) {\n if (index >= contents.size()) {\n return null;\n } else {\n return contents.get(index);\n }\n }",
"public e getItem(int i) {\n return (e) this.d.get(i);\n }",
"int index();",
"public E get(int i) {\n\t\tif (size == 0) {\n\t\t\tthrow new IllegalArgumentException(\"List is empty, cannot retrieve item.\");\n\t\t}\n\n\t\tif (i < 0 || i >= size) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Requested index is out of bounds.\");\n\t\t}\n\n\t\treturn list[i];\n\n\t}",
"@Override\n public E get(int index) {\n this.rangeCheck(index);\n return (E) this.values[index];\n }",
"int getIndex();",
"int getIndex();",
"int getIndex();",
"int getIndex();",
"int getIndex();",
"int getIndex();",
"int getIndex();",
"int getIndex();",
"int getIndex();",
"int getIndex();",
"int getIndex();",
"int getIndex();",
"int getIndex();",
"public abstract int indexOf(E e);",
"E getData(int index);",
"int getE();",
"public E get(int i) {\n\t\tcheckIndex(i);\n\t\tListNode<E> current = hop(i);\n\t\treturn current.value;\n\t}",
"public int index();",
"public E get(int index) {\n\t\tcheckBounds(index);\r\n\t\treturn getNode(index).getData();\r\n\t}",
"@Override\n public E get(int index) throws IndexOutOfBoundsException\n {\n if(index > size() - 1 || index < 0)\n {\n throw new IndexOutOfBoundsException();\n }\n Node currNode = getNth(index);\n return currNode.getElement(); \n }",
"public int indexOf(T e){\n for(int i = 0; i < size; i++){\n if(e.equals(data[i])){\n return i;\n }\n }\n return -1;\n }",
"@Override\n\tpublic E set(int i, E e) throws IndexOutOfBoundsException {\n\t\treturn null;\n\t}",
"public Object get(int i) {\n return elementAt(i);\n }",
"public E get(int index) {\n\t\tif (index < 0 || index >= size()) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Index is out of bounds\");\n\t\t} else {\n\t\t\treturn list[index];\n\t\t}\n\t}",
"public int getIndex();",
"public int getIndex();",
"public int getIndex();",
"public E get(int index) {\n\t\tresetIterator();\n\t\tif (index < 0 || index >= size) {\n\t\t\treturn null;\n\t\t}\n\n\t\tfor (int i = 0; i < index; i++) {\n\t\t\tnext();\n\t\t}\n\t\treturn iterator.data;\n\t}",
"public int getE() {\n return e_;\n }",
"default V item( int i ) { return getDataAt( indexOfIndex( i ) ); }",
"abstract int get(int index);",
"public Object element() { return e; }",
"public Item get(int i) {\n return items[i - 1];\n }",
"private E getFromArray(int i, int j) {\r\n\t\treturn mElements.get(j*mRowCount+i);\r\n\t}",
"public int indexOf(E e){\n for (int i = 0; i < size; i++) {\n if (elements[i]==e){\n return i;\n }\n }\n return -1;\n }",
"public int getE() {\n return e_;\n }",
"public E index(int idx) throws IndexOutOfBoundsException {\n return indexNode(idx).val;\n }",
"public int index(int i) {\n if (i < 0 || i >= lng) {\n throw new IllegalArgumentException(\"index out of range.\");\n }\n\n return arr[i];\n }",
"public long getElem(int index) {\r\n return a[index];\r\n }",
"public E getElement(int index) {\t//O(1)\r\n\t\t//checks if the index is valid\r\n\t\tif (index>=0 && index<size)\r\n\t\t\treturn (E) list[index];\t//returns element at particular index\r\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic E get(int idx) {\n\t\tE element = null;\n\t\tif (idx < 0 || idx >= size)\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\telement = list[idx];\n\t\treturn element;\n\t}",
"public int getElementAtIndex(int index){\r\n return mArray[index];\r\n }",
"public int get(int index);",
"public E get(int index)\r\n {\r\n checkValidIndex(index);\r\n return listIterator(index).next();\r\n }",
"Object getArrayElement(int index);",
"Object getArrayElement(int index);",
"public E get ( int index)\n {\n if (index < 0 || index >= size) {\n throw new\n IndexOutOfBoundsException(Integer.toString(index));\n }\n Node<E> node = getNode(index);\n return node.data;\n }",
"public int getIndex(\n )\n {return index;}",
"public E get(int index) {\n return this.getNodeAt(index).getData();\n }",
"int getIndex(){\r\n\t\treturn index;\r\n\t}",
"public <E> E getE(E e){\n return e;\n }",
"public String select(int i)\r\n\t {\t\t \r\n\t\t String[] arr = this.infoToArray();\r\n\t\t if(i > arr.length)\r\n\t\t {\r\n\t\t\t return \"-1\";\r\n\t\t }\r\n\t\t return arr[i-1];\r\n\t }",
"@Override\n @SuppressWarnings(\"unchecked\")\n public synchronized E get(int index) {\n if (index < 0 || index >= this.pointer) {\n throw new ArrayIndexOutOfBoundsException(\"Out of bound.\");\n }\n return (E) (this.container[index]);\n }",
"public E get(int index) {\n\t\tif (index < 0 || index >= mSize)\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\treturn getNode(index).data;\n\t}",
"public abstract int getIndex();",
"public int getCoord(int i) {\r\n return coords[i-1];\r\n }",
"public int getIndex(){\r\n \treturn index;\r\n }",
"E set(int i, E e) throws IndexOutOfBoundsException;",
"public Bacteria getAtIndex(int i) {\n\t\treturn this.inds.get(i);\n\t}",
"public E get(int index)\n { \n if(index >= size() || index < 0)\n {\n return null; \n }\n Node<E> n = getNode(index);\n return n.getValue();\n }",
"Object getElementAt(int index);"
]
| [
"0.72692114",
"0.72119576",
"0.71128625",
"0.6997801",
"0.6964859",
"0.6935415",
"0.6877303",
"0.6874814",
"0.68653965",
"0.67293906",
"0.66522217",
"0.65948254",
"0.6540176",
"0.64983124",
"0.64835256",
"0.64577234",
"0.64515567",
"0.64353263",
"0.64030397",
"0.63800985",
"0.63439167",
"0.63433576",
"0.6340171",
"0.6291819",
"0.6269063",
"0.62518764",
"0.62473106",
"0.6226937",
"0.6224499",
"0.6221606",
"0.62185186",
"0.62132627",
"0.6196366",
"0.61925995",
"0.61923176",
"0.6150828",
"0.61225003",
"0.61104715",
"0.60728157",
"0.60551035",
"0.60551035",
"0.60551035",
"0.60551035",
"0.60551035",
"0.60551035",
"0.60551035",
"0.60551035",
"0.60551035",
"0.60551035",
"0.60551035",
"0.60551035",
"0.60551035",
"0.6054451",
"0.6049588",
"0.6017929",
"0.6015859",
"0.6015602",
"0.6014216",
"0.601237",
"0.600753",
"0.6006869",
"0.59948224",
"0.59922284",
"0.5991905",
"0.5991905",
"0.5991905",
"0.5990744",
"0.5987386",
"0.59778106",
"0.59630626",
"0.5961143",
"0.59551966",
"0.59533215",
"0.5952924",
"0.59494483",
"0.59432405",
"0.5935864",
"0.59207946",
"0.5908181",
"0.59069175",
"0.5883958",
"0.5883178",
"0.5852894",
"0.58497053",
"0.58497053",
"0.5829365",
"0.58236027",
"0.5823295",
"0.5820655",
"0.58126146",
"0.58046156",
"0.58000493",
"0.57959235",
"0.5789679",
"0.5784202",
"0.578396",
"0.57769656",
"0.5774216",
"0.5759162",
"0.575795"
]
| 0.58005446 | 91 |
set new value e at index i | void add(int i , E e) throws IndexOutOfBoundsException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void set(int i,T e){\n if(rangeCheck(i)){\n data[i] = e;\n }\n }",
"void set(int i, E e) {\r\n arr[i] = e;\r\n }",
"@Override\n public void set(int i, E e) throws IndexOutOfBoundsException {\n validIndex(i);\n data[i] = e;\n }",
"@Override\n public E set(int i, E e) throws IndexOutOfBoundsException {\n checkRange(i);\n E previousValue = get(i);\n\n if (size == 1) {\n storage = e;\n } else if (size <= 5) {\n ((E[]) storage)[i] = e;\n } else {\n ((ArrayList<E>) storage).set(i, e);\n }\n\n return previousValue;\n }",
"@Override\n public E set(int i, E e) throws IndexOutOfBoundsException {\n checkIndex(i, size);\n E temp = data[i];\n data[i] = e;\n return temp;\n }",
"public abstract E set(int index, E e);",
"E set(int i, E e) throws IndexOutOfBoundsException;",
"E set(int i , E e) throws IndexOutOfBoundsException;",
"@Override\n\tpublic E set(int i, E e) throws IndexOutOfBoundsException {\n\t\treturn null;\n\t}",
"public void set(int idx, E value) {\n assert idx >= 0;\n \n checkgrow(idx);\n \n\tarray[idx] = value;\n\t\n }",
"public void set(int index, E e) {\r\n if (index < 0 || index > +data.length)\r\n throw new IllegalArgumentException(\"Index is illegal.\");\r\n\r\n set(0, 0, data.length - 1, index, e);\r\n }",
"@Override\n public E set(int index, E value) {\n // todo: Students must code\n checkRange(index);\n int pos = calculate(index);\n E oldVal = data[pos];\n data[pos] = value;\n return oldVal;\n }",
"public E set(int index, E element);",
"@Override\n public final void set(int index, E newValue) {\n array[index] = newValue;\n }",
"public T set(int i, T t) {\n if (i < 0 || i >= size) // if there is no index i in list\n throw new IndexOutOfBoundsException(\"Treated index: \" + i + \" | Size of the Dynamic Array \" + size()); // cause IndexOutOfBoundException\n T previousValue = (T) elements[i]; // store previous value of element with index i\n elements[i] = t; // set element with index i to t\n return previousValue; // return previous value of element with index i\n }",
"@Override\n public void set(int i, Node<T> e)\n {\n super.set(i, e);\n if(i == 0) \n {\n lastNode.setNext(firstNode);\n updateFirstNode();\n }\n else if(i == size - 1) lastNode = e;\n }",
"@Override\n public E set(int index, E value) {\n this.rangeCheck(index);\n E oldValue = (E) this.values[index];\n this.values[index] = value;\n return oldValue;\n }",
"void setArrayElement(int index, Object value);",
"void setArrayElement(int index, Object value);",
"public void set(int i, long v) {\n data[i] = newValue(v);\n }",
"@Override\n\tpublic E set(int index, E element) {\n\t\tNode<E> node = node(index);\n\t\tE old = node.elementE;\n\t\tnode.elementE = element;\n\t\treturn old;\n\t}",
"public void setElement(E e){\r\n\t\trotulo = e;\r\n\t}",
"public void set(int index, E newValue)\n {\n if (index >= 0 && index < size)\n data[index] = newValue;\n else\n throw new NoSuchElementException();\n }",
"@Override\n\tpublic void\n\tset( int i, double value )\n\t{\n\t\tdata[i] = value;\n\t}",
"public abstract <T> void set(int index, T value);",
"public void setIndex(int i) {\n\t\t\n\t}",
"void set(int index, Object element);",
"public CoreResourceHandle set(int index, CoreResourceHandle e) {\n if (index >= 0 && index < doSize()) {\n return doSet(index, e);\n }\n throw new IndexOutOfBoundsException();\n }",
"@Override\n public void update(int i, E value) {\n if(!hasWork()) {\n throw new NoSuchElementException();\n }\n if(i < 0 || i >= size()) {\n throw new IndexOutOfBoundsException();\n }\n array[(front + i) % capacity()] = value;\n }",
"public void setElem(int index, long value) {\r\n a[index] = value;\r\n }",
"@Override\n public E set(int index, E elem) {\n\t E first = _store[index];\n\t _store[index] =elem;\n\t return first;\n }",
"public Object set (int i, Object t)\r\n {\r\n }",
"void setIdx(int i);",
"public void set(int index, int o) {\n\t\tif(index == 0) return;\n\t\tr[index] = o;\n\t}",
"public @Override E set(int index, E element) {\n \tNode n = getNode(index);\n \tE result = n.data;\n \tn.data = element;\n \treturn result;\n }",
"@Override\n public void add(int i, E e) throws IndexOutOfBoundsException {\n if (i < 0 || i > size) {\n throw new IndexOutOfBoundsException();\n }\n\n if (size == 0) {\n storage = e;\n } else if (size < 5) {\n if (size == 1) {\n E oldStorage = (E) storage;\n storage = new Object[5];\n ((E[]) storage)[0] = oldStorage;\n }\n\n for (int cnt = size - 1; cnt >= i; cnt--) {\n ((E[]) storage)[cnt + 1] = ((E[]) storage)[cnt];\n }\n ((E[]) storage)[i] = e;\n } else {\n if (size == 5) {\n storage = new ArrayList<E>(Arrays.asList((E[]) storage));\n }\n ((ArrayList<E>) storage).add(i, e);\n }\n\n size++;\n }",
"void set(int index, int value) {\n array[index] = value;\n }",
"public void set(int i, int value) {\n\t\tassert i < size();\n\t\tarr[i] = value;\n\t}",
"public void setEventArray(int i, org.hl7.fhir.CodeableConcept event)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.CodeableConcept target = null;\n target = (org.hl7.fhir.CodeableConcept)get_store().find_element_user(EVENT$0, i);\n if (target == null)\n {\n throw new IndexOutOfBoundsException();\n }\n target.set(event);\n }\n }",
"void set(int index, T data);",
"public void set(long index);",
"public void setExp(int day, int index, Experiment e){ // istenilen gun ve index elemani uzerine yaz\r\n Node temp = new Node(e); // experiment node u.\r\n temp.next = null;\r\n\r\n if( head == null){ // hic eleman yoksa direk ekle\r\n head = temp;\r\n head.next = null;\r\n }\r\n\r\n else{\r\n Node last = head;\r\n int flag = 0, i = 0;\r\n while (last.next != null){\r\n if( last.next.data.day == day ){ // elemani bul ve uzerine yaz.\r\n while( last.next.data.day == day ){\r\n if( i + 1 == index){\r\n temp.next = last.next.next;\r\n last.next = temp;\r\n break;\r\n }\r\n i++;\r\n last = last.next;\r\n }\r\n temp = temp.next;\r\n }\r\n last = last.next;\r\n }\r\n }\r\n\r\n Node tempp = head;\r\n Node changeable = tempp;\r\n int past = head.data.day;\r\n while( tempp.next != null ){ // nextDay i degistir.\r\n if( tempp.next.data.day != past ){\r\n changeable.nextDay = tempp.next;\r\n past = tempp.next.data.day;\r\n changeable = tempp.next;\r\n }\r\n tempp = tempp.next;\r\n }\r\n }",
"public boolean set(int index, E value){\n if (index > maxIndex || index < 0){\n System.out.println(\"Error while replacing value. Your index \" + index + \" is out of bound of array\");\n return false;\n }\n\n array[index] = value;\n return true;\n }",
"public void setData(int i, int value) {\n data[i] = value;\n }",
"void set(int idx, int val);",
"public int setNote(int index,ObjectListElement e){\n\t\t\n\t\tif (index < 0)\n\t\t\tthrow new IllegalArgumentException(\"Index of an ObjectListElement object cannot be a negative number\");\n\t\tObjectListElement orgElement= allNotes.get(index);\n\t\tif (orgElement!=e)\n\t\t\tthrow new IllegalArgumentException(\"New ObjectListElements holds different object.\");\n\n\t\tallNotes.set(index, e);\n\t\treturn index;\n\t}",
"public void set(int index, Object wert) {\r\n\t\t// Das Element an der Stelle index \r\n\t\t//soll auf den Wert wert gesetzt werden\r\n\t\tgeheim[index] = wert;\r\n\t}",
"public void setIndex(int i){\n\t\tthis.index = i;\r\n\t}",
"public void set(int index, Object value) {\n verifyModifiable();\n\n try {\n elements.set(index, value);\n } catch (IndexOutOfBoundsException exception) {\n if (elements.size() != 0)\n throw new RuntimeException(\"failed to set a value beyond the end of the tuple elements array, size: \" + size() + \" , index: \" + index);\n else\n throw new RuntimeException(\"failed to set a value, tuple may not be initialized with values, is zero length\");\n }\n }",
"public void setAt(int iterator, T element) {\n data[iterator] = element;\n }",
"public void setValue(E value)\n {\n }",
"@Override\n public void update(int i, E value) {\n if(!hasWork()) {\n throw new NoSuchElementException(\"The worklist is empty\");\n }\n // if i is less than 0 or greater than size of worklist, throw exception\n if(i < 0 || i >= array.length) {\n throw new IndexOutOfBoundsException(\"This index does not exist\");\n }\n // update value\n array[i] = value;\n }",
"public abstract void set( int i, int j, double value ) throws JWaveException;",
"public void set(int index, Object value) {\n\n\t\t// the right portion of values of the array -> room is not available\n\t\tif(index >= arr.length) {\n\t\t\tObject[] tmpArr = new Object[index+1]; // keep all values of the variable arr\n\t\t\t\n\t\t\t// keep all items of arr\n\t\t\tfor(int i=0; i<arr.length; i++) {\n\t\t\t\ttmpArr[i] = arr[i];\n\t\t\t}\n\t\t\t\n\t\t\tarr = tmpArr; // exchange addresses\n \t\t}\t\n\t\t\n\t\tarr[index] = value;\n\t\t\n\t}",
"public void set(int index, Object value) {\n\tif(arr.length < index){\n\t\tObject arr2[] = new Object[index+1];\n\t\tSystem.arraycopy(arr, 0, arr2, 0, arr.length);\n\t\tarr2[index] = value;\n\t\tarr = arr2;\n\t\t\n\t}\n\telse arr[index] = value;\n}",
"SetExpr (String i, Expr e) {\n varName = i;\n expr = e;\n }",
"private void setInArray(int i, int j, E element) {\r\n\t\tmElements.set(j*mRowCount+i, element);\r\n\t}",
"public E set(int index, E newValue){\n if (index < 0 || index >= size){\n throw new ArrayIndexOutOfBoundsException(index);\n }\n E oldValue = theData[index];\n theData[index] = newValue;\n\n return oldValue;\n }",
"@Override\r\n\tpublic E set(int index, E e) {\r\n\t\tif (e == null) {\r\n\t\t\tthrow new NullPointerException();\r\n\t\t}\r\n\t\tif (index < 0 || index >= size) {\r\n\t\t\tthrow new IndexOutOfBoundsException();\r\n\t\t}\r\n\t\tfor (ListNode p = front; p != null; p = p.next) {\r\n\t\t\tif (e.equals(p.data)) {\r\n\t\t\t\tthrow new IllegalArgumentException();\r\n\t\t\t}\r\n\t\t}\r\n\t\tE result = null;\r\n\t\tif (front != null && index == 0) {\r\n\t\t\tresult = front.data;\r\n\t\t\tfront.data = e;\r\n\t\t\treturn result;\r\n\t\t} \r\n\r\n\t\tListNode current = front;\r\n\t\twhile (index > 0) {\r\n\t\t\tcurrent = current.next;\r\n\t\t\tindex--;\r\n\t\t}\t\t\t\r\n\t\t//check not beyond end of list\r\n\t\tif (current != null) {\t\t\t\t\r\n\t\t\tresult = current.data;\r\n\t\t\tcurrent.data = e;\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"@Override\n\tpublic void setValueIndex(int index) {\n\t\t\n\t}",
"@Override\n\tpublic void replaceAt(int index, int e) {\n\t\t\n\t}",
"public Object set(int index, Object element) {\r\n Entry e = entry(index);\r\n Object oldVal = e.element;\r\n e.element = element;\r\n return oldVal;\r\n }",
"@Override\n\t\tpublic void set(E arg0) {\n\t\t\t\n\t\t}",
"private void setElement(int index, E element) {\n// if (getElement(index) != null) {\n// setContents.remove(getElement(index));\n// }\n while (index >= contents.size()) {\n contents.add(null);\n }\n contents.set(index, element);\n// contents.put(index, element);\n backwards.put(element, index);\n\n// if (element != null) {\n// setContents.add(getElement(index));\n// }\n }",
"@Override\n public void set(E e) throws NullPointerException\n {\n if(canRemove = true)\n {\n if(forward = true)\n {\n Node theNode = getNth(idx - 1);\n theNode.data = e;\n }\n else\n {\n Node theNode = getNth(idx);\n theNode.data = e;\n }\n }\n else\n {\n throw new IllegalArgumentException();\n }\n }",
"public void setPoints(Integer i) {\n Log.d(\"berttest\",\"setPoints works\");\n points.setValue(i);\n }",
"@Override\n public boolean set(int index, T element) {\n array[index] = element;\n return true;\n }",
"private Index(int i) {\r\n _value = i;\r\n }",
"public void setElementAt(Object obj, int index);",
"public void set(int i, A o);",
"public Builder<V, E> setE(int e) {\n this.e = e;\n return this;\n }",
"public synchronized boolean set(int index, E value) {\n return this.array.set(index, value);\n }",
"public void setElementAt(int n, Object ob) {\r\n\t\telements.set(n, ob);\r\n\t}",
"public void setValueAt(Object aValue, int row, int column)\n {\n\n }",
"protected void modify(int i) {\n\n\t\tvalue += i;\n\t\tlabel.setText(Integer.toString(value));\n\t\t\n\t}",
"@Override\r\n\t\tpublic void set(E arg0) {\n\r\n\t\t}",
"public void set(int index, float value) {\r\n RangeCheck(index);\r\n elementData[index] = value;\r\n }",
"@Override\n\tpublic void set(T e) {\n\t\t\n\t}",
"@Override\n\tpublic E set(int idx, E element) {\n\t\tif (element == null) throw new NullPointerException();\n\t\tif (idx < 0 || idx >= size()) throw new IndexOutOfBoundsException();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (element.equals(list[i]))\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tE output = null;\n\t\toutput = list[idx];\n\t\tlist[idx] = element;\n\t\treturn output;\n\t}",
"@Override\n\tpublic void setValueAt(Object arg0, int arg1, int arg2) {\n\t\t\n\t}",
"@Override\n\tpublic void setValueAt(Object arg0, int arg1, int arg2) {\n\t\t\n\t}",
"@Override\n public void setValueAt( Object aValue, Object node, int column )\n {\n }",
"public E set(int index, E element) {\n\t\tif(index < 0 || index > size) {\r\n\t\t\tthrow new IndexOutOfBoundsException();\r\n\t\t} else if(index == size) {\r\n\t\t\tadd(element);\r\n\t\t\treturn element;\r\n\t\t}\r\n\t\tE e = getNode(index).getData();\r\n\t\tgetNode(index).setData(element);\r\n\t\treturn e;\r\n\t}",
"public void set(T t, int i) {\n try {\n this.field.set(t, Integer.valueOf(i));\n } catch (IllegalAccessException e) {\n throw new AssertionError(e);\n }\n }",
"@Override\n public T set(final int index, final T element) {\n this.checkIndex(index);\n final T prevElment = get(index);\n this.data[index] = element;\n return prevElment;\n }",
"public void setValueArray(int i, amdocs.iam.pd.webservices.productattrrel.productdetailsoutput.Value value)\n {\n synchronized (monitor())\n {\n check_orphaned();\n amdocs.iam.pd.webservices.productattrrel.productdetailsoutput.Value target = null;\n target = (amdocs.iam.pd.webservices.productattrrel.productdetailsoutput.Value)get_store().find_element_user(VALUE$0, i);\n if (target == null)\n {\n throw new IndexOutOfBoundsException();\n }\n target.set(value);\n }\n }",
"public void set(int i, float val) {\r\n\t\tswitch (i) {\r\n\t\tcase 0:\r\n\t\t\tx = val;\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\ty = val;\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tz = val;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tthrow new IndexOutOfBoundsException();\r\n\t\t}\r\n\t}",
"public void set(int i, int j, double s) {\n data[i][j] = s;\n }",
"public void set(int index, int value) {\n\t\t\tcheckIndex(index);\n\t\t\telementData[index] = value;\n\t\t}",
"public void setValueAt(Object val, int row, int col) {\r\n }",
"@Override\n public void add(int i, E e) throws IndexOutOfBoundsException {\n checkIndex(i, size + 1);\n if (size == data.length) // not enough capacity\n throw new IllegalStateException(\"Array is full\");\n for (int k = size - 1; k >= i; k--) // start by shifting rightmost\n data[k + 1] = data[k];\n data[i] = e; // ready to place the new element\n size++;\n }",
"@Override\n public int set(int index, int element) {\n checkIndex(index);\n int result = getEntry(index).value;\n getEntry(index).value = element;\n return result;\n }",
"public void setElement(Object e) {\n element = e;\n }",
"public void set(int index, float value) {\n storage[index] = value;\n }",
"public void setArray(int i, Array x);",
"public Integer mutate(int index);",
"public void setElement(int i, int j, double aa){\r\n \tthis.matrix[i][j]=aa;\r\n \t}",
"public abstract void setIndex(int i, boolean b);",
"@Override\n\tpublic E set(Position<E> p, E e) throws IllegalArgumentException {\n\t\tif (!validPosition(p)) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\t\n\t\tNode<E> reference = convert(p);\n\t\tE temp = reference.getElement();\n\t\t\n\t\treference.element = e;\n\t\treturn temp;\n\t}",
"public E set(int index, E element) {\n if(index < 0 || index >= size())\n throw new IndexOutOfBoundsException();\n E currentElement = get(index);\n list[index] = element;\n return currentElement;\n }",
"public void setTargetValue(int idx, Object value);"
]
| [
"0.80252564",
"0.79948956",
"0.79639864",
"0.7850504",
"0.7798364",
"0.75807863",
"0.7285817",
"0.7278397",
"0.7219048",
"0.72055155",
"0.71947634",
"0.70624995",
"0.6904848",
"0.6854891",
"0.6834597",
"0.6734281",
"0.6643364",
"0.66392756",
"0.66392756",
"0.66287124",
"0.6572",
"0.6558366",
"0.6555914",
"0.6540986",
"0.6509262",
"0.6480176",
"0.6479021",
"0.64699477",
"0.64677584",
"0.63955885",
"0.6391168",
"0.63900536",
"0.63808286",
"0.63798213",
"0.6368959",
"0.6361268",
"0.63550925",
"0.6333944",
"0.630848",
"0.62953854",
"0.62807006",
"0.6278015",
"0.62681746",
"0.62615025",
"0.6255121",
"0.6249396",
"0.62390023",
"0.62380403",
"0.6236659",
"0.62328494",
"0.6231922",
"0.62274534",
"0.61898357",
"0.6185219",
"0.61851966",
"0.6183662",
"0.617205",
"0.6135506",
"0.6096622",
"0.6090515",
"0.60713774",
"0.6046489",
"0.60407317",
"0.6039439",
"0.60336035",
"0.6032247",
"0.60230297",
"0.6007072",
"0.6006972",
"0.60069484",
"0.60037184",
"0.5986087",
"0.5980199",
"0.59763455",
"0.5973071",
"0.59568536",
"0.59443104",
"0.59378695",
"0.5935756",
"0.5928182",
"0.5928182",
"0.5926642",
"0.5924572",
"0.5923076",
"0.592119",
"0.5908852",
"0.5896295",
"0.5892576",
"0.5889126",
"0.58728015",
"0.5868373",
"0.58667994",
"0.58658856",
"0.5856264",
"0.58538413",
"0.58438724",
"0.5840991",
"0.58295536",
"0.58272344",
"0.5822814",
"0.58220875"
]
| 0.0 | -1 |
insert e at index i. require shifting | E remove(int i ) throws IndexOutOfBoundsException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void add(int i, E e) throws IndexOutOfBoundsException {\n checkIndex(i, size + 1);\n if (size == data.length) // not enough capacity\n throw new IllegalStateException(\"Array is full\");\n for (int k = size - 1; k >= i; k--) // start by shifting rightmost\n data[k + 1] = data[k];\n data[i] = e; // ready to place the new element\n size++;\n }",
"@Override\n public void add(int i, E e) throws IndexOutOfBoundsException,\n IllegalStateException {\n if (i == size){\n addLast(e);\n }\n else {\n validIndex(i);\n checkSize();\n for (int j = size - 1; j >= i; j--) {\n data[j + 1] = data[j];\n }\n data[i] = e;\n size++;\n }\n }",
"@Override\n public void add(int i, E e) throws IndexOutOfBoundsException {\n if (i < 0 || i > size) {\n throw new IndexOutOfBoundsException();\n }\n\n if (size == 0) {\n storage = e;\n } else if (size < 5) {\n if (size == 1) {\n E oldStorage = (E) storage;\n storage = new Object[5];\n ((E[]) storage)[0] = oldStorage;\n }\n\n for (int cnt = size - 1; cnt >= i; cnt--) {\n ((E[]) storage)[cnt + 1] = ((E[]) storage)[cnt];\n }\n ((E[]) storage)[i] = e;\n } else {\n if (size == 5) {\n storage = new ArrayList<E>(Arrays.asList((E[]) storage));\n }\n ((ArrayList<E>) storage).add(i, e);\n }\n\n size++;\n }",
"void add(int i, E e) throws IndexOutOfBoundsException;",
"void add(int i , E e) throws IndexOutOfBoundsException;",
"void insert(int idx, int val);",
"public void insert(E e);",
"public void insert(int index, T element);",
"public abstract void add(int index, E e);",
"private void insert(int pos, T elem) {\n for (int i = size; i >= pos + 1; i--) {\n arr[i] = arr[i-1];\n }\n arr[pos] = elem;\n }",
"public void insert(int i, T obj);",
"public void add(E s,int index) {\t//O(n)\r\n\t\t//checks if the index is valid\r\n\t\tif(index>=0 && index<=size) {\t//index is valid\r\n\t\t\t//checks if there is any space left in the array\r\n\t\t\tif(size>=capacity)\r\n\t\t\t\tresize(this.capacity*2);\t//increases size of the array\r\n\t\t\tfor (int k=size-1; k>=index;k--) {\t//shifting element\r\n\t\t\t\tlist[k+1]=list[k];\r\n\t\t\t}\r\n\t\t\tlist[index]=s;\t//add element to the index\r\n\t\t\tsize++;\t//increases size\r\n\t\t} else {\t//index is not valid\r\n\t\t\tSystem.out.println(\"index \"+index+\" is out or range!\");\r\n\t\t}\r\n\t}",
"public void insert(int i) {\n\t\tif (top > -2 && top < size - 1) {\n\t\t\ttop += 1;\n\t\t\tarr[top] = i;\n\t\t} else if (top == size - 1) {\n\t\t\tsize *= 2;\n\t\t\ttop += 1;\n\t\t\tarr = Arrays.copyOf(arr, size);\n\t\t\tarr[top] = i;\n\t\t}\n\t}",
"@Override\n public void add(int index, E value) {\n // todo: Students must code\n ensureCapacity();\n int pos = calculate(index); // True position in array\n\n // if there are no elements, set head to the position (index 0, position ??)\n // *protects against divide by zero in modulus*\n if(size() == 0) {\n data[pos] = value;\n head = pos;\n tail = pos;\n // tail = (pos+1)%data.length;\n }\n // if the logical position is the head, then insert right before head and reassign head-variable\n // *tail stays the same*\n else if(index == 0) {\n int i = (head-1);\n if (i < 0) i = data.length-1;\n head = i;\n data[head] = value;\n }\n else{\n // shift all array contents after pos right 1\n for(int i = (pos + size() - index); i > pos; i--)\n data[i % data.length] = data[(i-1) % data.length];\n data[pos] = value;\n tail = (tail + 1) % data.length;\n }\n curSize++;\n }",
"public void insertAll(int i, SimpleLinkedList<E> e) {\n\t\tfor (int x = i; x < e.size(); x++) {\n\t\t\tinsert(x, e.get(x - i));\n\t\t}\n\t}",
"private void add(E e, int index) {\r\n\t\t\tif (hasRoom(index)) {\r\n\t\t\t\tshiftElements(data, index);\r\n\t\t\t\tdata[index] = e;\r\n\t\t\t} else {\r\n\t\t\t\tNode toAdd = new Node();\r\n\t\t\t\tthis.next.prev = toAdd;\r\n\t\t\t\ttoAdd.next = this.next;\r\n\t\t\t\ttoAdd.prev = this;\r\n\t\t\t\tthis.next = toAdd;\r\n\r\n\t\t\t\ttoAdd.data[0] = this.data[data.length - 1];\r\n\t\t\t\t// Shifts everything over one spot, the end element gets lost\r\n\t\t\t\tSystem.arraycopy(this.data, index, this.data, index + 1, data.length - index - 1);\r\n\t\t\t\tthis.data[index] = e;\r\n\t\t\t}\r\n\t\t}",
"public void insert(Item item, int i){\n assert (count+1<=capacity);\n\n assert (i+1>=1&&i+1<=capacity);\n\n i+=1;\n\n data[i] = item;\n count++;\n\n indexes[count] = i;\n rev[i] = count;\n\n shiftUp(count);\n }",
"void insert(T value, int position);",
"public void add(int index, E element);",
"public void insert(Object obj, int index) {\n /*\n * make an if statement that checks if it is trying to add the first element in the array\n * since the default constructor makes an array with 0 length\n */\n \n if (this.array.length == 0) {\n //if it is the one and only element in the array\n //then simply set up the array so that it holds the desired element\n this.array = (E[]) new Object[1];\n this.array[0] = (E) obj;\n } else {\n /*\n * this code will be executed whenever there is at least one element \n * already in the array\n */\n \n //set up a temp array that will be used to copy the array with the new element\n E[] temp = (E[]) new Object[this.array.length + 1]; //it holds one more element than the current array\n\n //first copy over all the elements before the desired index\n for (int i = 0; i < index; i++) {\n temp[i] = this.array[i];\n }\n \n //then set the desired index to the object\n temp[index] = (E) obj;\n \n //copy over the rest of the array\n for (int i = index + 1; i < temp.length; i++) {\n /* since the temp array is one index larger, and we have inserted the new element\n * take in the previous element from the original array\n * \n * this will \"shift over\" the elements after the index one index to the right\n */\n temp[i] = this.array[i - 1];\n }\n \n //set the array to the copy\n this.array = (E[]) temp;\n }\n }",
"public void add(int index, E e) {\n resize();\n for(int i = size-1; i >= index; i--) {\n list[i+1] = list[i];\n }\n list[index] = e;\n size++;\n }",
"@Override\n public E set(int i, E e) throws IndexOutOfBoundsException {\n checkRange(i);\n E previousValue = get(i);\n\n if (size == 1) {\n storage = e;\n } else if (size <= 5) {\n ((E[]) storage)[i] = e;\n } else {\n ((ArrayList<E>) storage).set(i, e);\n }\n\n return previousValue;\n }",
"public void insert(int index,int value)\n {\n System.out.println(\"data size\"+data.length);\n if(size==initialCapacity){\n resize();\n }\n \n \n \n for(int j=size-1;j>=index;j--){\n //j initial position is last element\n // j needs to move till\n //start from last element and change to next position\n \n data[j+1]=data[j]; \n }\n// // Copy up\n// for (int j = size; j > index; j--) {\n// data[j] = data[j-1];\n// }\n data[index]=value;\n size++;\n }",
"void insert(int index, T value) throws ListException;",
"public void insertAtIndex(E toInsert, int atIndex) {\n\t\tfor(int x = numElements; x > atIndex; x--) {\n\t\t\telements[x] = elements[x-1];\n\t\t}\n\t\telements[atIndex] = toInsert;\n\t\tnumElements++;\n\t\tresize();\n\t}",
"public boolean ListInsert(int i,T e){\n int j,k,l;\n // k is the index of the last element\n k = MAXSIZE-1;\n if(i<0||i>ListLength())\n return false;\n // Get index of free element\n j = Malloc_SSL();\n // If malloc success\n if(j!=0)\n {\n StaticLinkList[j].data = e;\n // Find the element,who is in front of the ith element\n for (l = 0; l < i; l++)\n k = StaticLinkList[k].cur;\n // s->next = p->next\n StaticLinkList[j].cur = StaticLinkList[k].cur;\n // p->next = s\n StaticLinkList[k].cur = j;\n return true;\n }\n return false;\n }",
"public void insert(char i);",
"@Override\n\tpublic void add(int index, Object e) throws IndexOutOfBoundsException\n\t{\n\t\t//just to check if the index is valid\n\t\tif ( index < 0 || index > size )\n \t\tthrow new IndexOutOfBoundsException();\n\t\t//check arraylist size\n\t\tif (size == myArray.length)\n\t\t\tresizeUp();\n\t\t//move all the proceeding elements to make room for the desired element\n\t\tfor ( int i = size; i > index; i-- )\n \t\tmyArray[i] = myArray[i-1];\n \t//plug the element\n\t\tmyArray[index] = e;\n \t++this.size;\n\n\t\t\n\t}",
"public void insertByRightShift(Object elem, int pos) {\r\n if (pos > 0 || pos < size) {\r\n if (size == cir.length) {\r\n resizeStartUnchanged(cir.length + 3);\r\n }\r\n int nshift = size - pos;\r\n int from = ((start + size) - 1) % cir.length;\r\n int to = (from + 1) % cir.length;\r\n for (int i = 0; i < nshift; i++) {\r\n cir[to % cir.length] = cir[from % cir.length];\r\n to = from;\r\n from--;\r\n if (from < 0) {\r\n from = cir.length - 1;\r\n }\r\n }\r\n cir[(start + pos) % cir.length] = elem;\r\n // System.out.println(size);\r\n size++;\r\n }\r\n }",
"@Override\n public E set(int i, E e) throws IndexOutOfBoundsException {\n checkIndex(i, size);\n E temp = data[i];\n data[i] = e;\n return temp;\n }",
"public void insert(int val)\n {\n try\n {\n a[index++] = val;\n n=index;\n }\n catch(Exception e)\n {\n System.out.println(�e.getMessage�);\n }\n }",
"public void insertByRightShift(Object elem, int pos){\n if(size==cir.length){\n resizeStartUnchanged(cir.length+3);\n }\n int nshift=size-pos;\n int from=(start+size-1)%cir.length;\n int to=(from+1)%cir.length;\n for(int i=0;i<nshift;i++){\n cir[to]=cir[from];\n to=from;\n from--;\n if(from==-1){\n from=cir.length-1;\n }\n }\n int index=(start+pos)%cir.length;\n cir[index]=elem;\n size++;\n }",
"@Override\n public void insert(E e, int index)\n throws SequenceException {\n if (index < 0) {\n throw new SequenceException(\"Indexed Element out of Range\");\n }\n\n // There is a special case when the sequence is empty.\n // Then the both the head and tail pointers needs to be\n // initialised to reference the new node.\n if (listHead == null) {\n if (index == 0) {\n listHead = new Node(e);\n listTail = listHead;\n } else {\n throw new SequenceException(\"Indexed element is out of range\");\n }\n }\n\n // There is another special case for insertion at the head of\n // the sequence.\n else if (index == 0) {\n listHead = new Node(e, listHead);\n }\n\n // In the general case, we need to chain down the linked list\n // from the head until we find the location for the new\n // list node. If we reach the end of the list before finding\n // the specified location, we know that the given index was out\n // of range and throw an exception.\n else {\n Node nodePointer = listHead;\n int i = 1;\n while (i < index) {\n nodePointer = nodePointer.next;\n i += 1;\n if (nodePointer == null) {\n throw new SequenceException(\"Indexed Element out of Range\");\n }\n }\n\n // Now we've found the node before the position of the\n // new one, so we 'hook in' the new Node.\n\n nodePointer.next = new Node(e, nodePointer.next);\n\n // Finally we need to check that the tail pointer is\n // correct. Another special case occurs if the new\n // node was inserted at the end, in which case, we need\n // to update the tail pointer.\n if (nodePointer == listTail) {\n listTail = listTail.next;\n }\n }\n }",
"public void insertElementAt(Object obj, int index);",
"E set(int i , E e) throws IndexOutOfBoundsException;",
"public void insert(int position, E o) {\n\t\tif (position >= 0 && position <= size) {\n\t\t\t// first resize the storage array\n\t\t\tE[] newData = (E[]) new Object[size + 1];\n\t\t\t// copy the data prior to the insertion\n\t\t\tfor (int i = 0; i < position; i++)\n\t\t\t\tnewData[i] = data[i];\n\t\t\t// insert the new element\n\t\t\tnewData[position] = o;\n\t\t\t// move the data after the insertion\n\t\t\tfor (int i = position; i < size; i++)\n\t\t\t\tnewData[i + 1] = data[i];\n\t\t\t// replace the storage with the new array\n\t\t\tdata = newData;\n\t\t\tsize = size + 1;\n\t\t}\n\t}",
"E set(int i, E e) throws IndexOutOfBoundsException;",
"void set(int i, E e) {\r\n arr[i] = e;\r\n }",
"void insert(Object value, int position);",
"public Position<E> insertLeft(Position<E> v, E e) throws InvalidPositionException;",
"public void push(T e) {\n\t\tif(size == data.length){\n\t\t\tresize(size * 2);\n\t\t}\n\t\tthis.data[size++] = e;\n\t}",
"void add(int index, T element);",
"void add(int index, T element);",
"public synchronized void insert(Integer e) {\r\n\t\ttry {\r\n\t\t\twhile (buffer.size() == maxSize) {\r\n\t\t\t\twait();\r\n\t\t\t}\r\n\t\t\tbuffer.add(e);\r\n\t\t\tnotify();\t\t\t\r\n\t\t} catch (InterruptedException e1) {\r\n\t\t\tThread.currentThread().interrupt();\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void enqueue(E e) {\n\t\tint index = (pos + size) % queue.length;\n\t\tqueue[index] = e;\n\t\tsize++;\n\t}",
"boolean insert(E e);",
"public void insert(int i, K k, P p) {\n\t\tfor (int j = keyCount; j > i; j--) {\n\t\t\tkeys[j] = keys[j - 1];\n\t\t\tpointers[j] = pointers[j - 1];\n\t\t}\n\t\tkeys[i] = k;\n\t\tpointers[i] = p;\n\t\tkeyCount++;\n\t}",
"public void access(E e) {\n Position<Item<E>> p = findPosition(e); // try to locate existing element\n if (p == null) // new element\n p = list.addLast(new Item<E>(e)); // if new , place at end\n p.getElement().increment(); // always increment count\n moveUp(p);\n }",
"public void insertRight( long j ) {\n if ( end == max - 1 ) {\n end = -1;\n }\n Array[++end] = j;\n nItems++;\n }",
"public Point2D insertPoint(int i, double x, double y);",
"public void add(int i, T t) {\n if (size == elements.length) // checks potential overflow\n ensureCapacity(); // increase capacity\n size++; // increment size of list\n if (i < 0 || i >= size) // if there is no index i in list\n throw new IndexOutOfBoundsException(\"Treated index: \" + i + \" | Size of the Dynamic Array \" + size()); // cause IndexOutOfBoundException\n for (int j = size - 1; j > i; j--) { // treat elements of list with indexes in range [i+1, n]\n elements[j] = elements[j - 1]; // element shifts to right\n }\n elements[i] = t; // store element at index i\n }",
"@Override\n public void add(int index, E value) {\n this.rangeCheck(index);\n if (this.values.length == this.index) {\n this.grow();\n }\n this.modCount++;\n System.arraycopy(this.values, index, this.values, index + 1, this.size() - index);\n this.values[index] = value;\n this.index++;\n }",
"@Override\n public void insert(final int i, final Person p) {\n if(i < 0) throw new IndexOutOfBoundsException();\n else {\n final int last_idx = size();\n mData.add(i > last_idx ? last_idx : i, p);\n }\n }",
"public void insertLeft( long j ) {\n if ( start == 0 ) {\n start = max;\n }\n Array[--start] = j;\n nItems++;\n }",
"public abstract void add(T element, int index);",
"public void insert(int index, T value) {\n extend();\n for (int i = this.list.length-1; i >index; i--) {\n this.list[i] = this.list[i-1];\n }\n this.list[index] = value;\n this.size++;\n }",
"public void set(int i,T e){\n if(rangeCheck(i)){\n data[i] = e;\n }\n }",
"private static void insertion(int[] a){\n int size = a.length;\n int key = 0;\n \n for(int i = 1; i < size; i++){\n key = a[i];\n for(int j = i-1; j >= 0 && key < a[j]; j--){\n a[j+1] = a[j];\n a[j] = key;\n }\n }\n }",
"@Override\n public void add(int i, Node<T> e)\n {\n if(i > size + 1) return; //to add node at the end of list use i = size + 1\n if(lastNode == null) //initialize lastNode\n {\n lastNode = e;\n updateFirstNode();\n size++;\n }\n \n //Adding node at the start\n else if(i <= 1)\n {\n if(lastNode.getNext() == null) // only 1 element in list\n e.setNext(lastNode); \n else \n e.setNext(lastNode.getNext());\n \n lastNode.setNext(e);\n updateFirstNode();\n size++; \n }\n \n //Adding node at the end or somewhere in the middle\n else\n {\n if(lastNode.getNext() == null && i == size + 1)\n {\n e.setNext(lastNode);\n lastNode.setNext(e);\n }\n \n //Iterates to i position and add node\n //if i position is last node then set node as new last node\n else\n {\n NodeIterator<T> iterator = new NodeIterator<>(firstNode, (i == size + 1)? i - 1 : i, 1);\n Node prev = iterator.getEnd();\n Node temp = prev.getNext();\n\n e.setNext(temp);\n prev.setNext(e);\n }\n \n //If adding node as last node\n if(i == size + 1) lastNode = e;\n updateFirstNode();\n size++;\n }\n }",
"public static native int InsertAt(long lpjFbxArrayVector2, int pIndex, long pElement);",
"public void add(T element, int pos);",
"void insert(int insertSize);",
"@Override\n public void add(Object e) {\n if (currentSize == this.container.length - 1) {\n Object[] newArray = new Object[capacity * 2];\n capacity *= 2;\n System.arraycopy(this.container, 0, newArray, 0, currentSize);\n this.container = newArray;\n }\n container[currentSize++] = e;\n }",
"@Override\n public void set(int i, E e) throws IndexOutOfBoundsException {\n validIndex(i);\n data[i] = e;\n }",
"public boolean add(Where where, int index, E e) { \n\t \n\t /* \n\t * If there is no space to add the new element, grow the array. */\n\t if (is_full()) {\n\t grow();\n\t }\n\t \n\t /**\n\t * Add code here \n\t */\n\t \n\t if((where == Where.MIDDLE)){\n\t \t //System.out.println(\"Inserting element at index middle\");\n\t \t for(int k=num_elements+1;k>index;k--){\n\t \t\t elements[k] = elements[k-1];\n\t \t }\n\t \t elements[index] = e;\n\t \t num_elements++;\n\t }\n\t return true; \n\t }",
"public void add(int index, Type t);",
"public Position<E> insertRight(Position<E> v, E e) throws InvalidPositionException;",
"public abstract E set(int index, E e);",
"public boolean insertAt(int index, O o)\r\n {\r\n if (index < 0 || index > size()) return false; //out of range\r\n if (index == size()) //last\r\n {\r\n pushBack (o);\r\n return true;\r\n } else if (index == 0)\r\n {\r\n pushFront (o);\r\n return true;\r\n } else \r\n {\r\n VectorItem<O> before, after;\r\n before = getVectorItem(index-1);\r\n after = getVectorItem(index);\r\n \r\n VectorItem<O> vi = new VectorItem<O> (o,before,after);\r\n before.setNext(vi);\r\n after.setPrevious(vi);\r\n return true;\r\n } \r\n }",
"@Override\n\tpublic boolean insert(E e) {\n\t\treturn add(e);\n\t}",
"private void testAddAtIndex(){\n System.out.println(\"------ TESTING : add(int index, int element) ------\");\n try{\n // The insertion will add values to the front\n // the sequence should be iSize-1....,1,0\n for(int i = 0; i < iSize ; i++){\n if(!iTestList.add(0,i))\n throw new RuntimeException(\"FAILED -> add(index,element) not working correctly\");\n }\n // we should test the out of edge cases\n // if we try the following code and the return value is true or if the\n // program crashes then there is a problem\n if(iTestList.add(iSize+10, 999 )){\n throw new RuntimeException(\"FAILED -> index should not be > SIZE\");\n }\n if(iTestList.add(-2,999 )){\n throw new RuntimeException(\"FAILED -> index should not be < 0\");\n }\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n }",
"public void Insert(char ch)\n {\n if (map[ch] == -1) {\n map[ch] = pos;\n }\n else {\n map[ch] = -2;\n } \n pos ++;\n }",
"public T put(int index, T t);",
"public void insert( int x) \r\n {\r\n h[++N] = x;\r\n siftUp( N);\r\n }",
"@Override\n public void addFirst(E e) throws IllegalStateException {\n checkSize();\n for (int j = size - 1; j >= 0; j--) {\n data[j + 1] = data[j];\n }\n data[0] = e;\n size++;\n }",
"@Override\n public void update(int i, E value) {\n if(!hasWork()) {\n throw new NoSuchElementException();\n }\n if(i < 0 || i >= size()) {\n throw new IndexOutOfBoundsException();\n }\n array[(front + i) % capacity()] = value;\n }",
"public void insert(E e) {\n\t\tNode node = new Node(e);\n\t\tint height = (int)(Math.log(size)/Math.log(2));\n\t\t// Handle root null scenario\n\t\tif (height == 0 && root == null) {\n\t\t\troot = node;\n\t\t\tsize++;\n\t\t\treturn;\n\t\t}\n\t\tNode parentOfLast = getNode(size >> 1);\n\t\t// insert if left or right is empty\n\t\tif (parentOfLast.left == null) {\n\t\t\tparentOfLast.left = node;\n\t\t}\n\t\telse if (parentOfLast.right == null) {\n\t\t\tparentOfLast.right = node;\n\t\t}\n\t\t// if both left and right are full, go to the next parent and add node in left child of it\n\t\telse {\n\t\t\tNode nextParent = getNode(size >> 1 + 1);\n\t\t\tnextParent.left = node;\n\t\t}\n\t\tsize++;\n\t}",
"public void addBefore(E val, int idx) throws IndexOutOfBoundsException {\n addNodeBefore(new SinglyLinkedList.Node<>(val), idx);\n }",
"public void insert(E element) {\n // TODO: YOUR CODE HERE\n if (contains(element)) {\n throw new IllegalArgumentException();\n } else {\n setElement(size() + 1, element);\n size += 1;\n bubbleUp(size());\n }\n }",
"public void insert(int index, Block block) {\r\n\t\tfor(Entry s : block) {\r\n\t\t\tinsert(index++, s.code,s.attributes());\r\n\t\t}\r\n\t}",
"@Override\n \tpublic ArrayPVector<E> plus(int i, E e) {\n \t\tthrow new UnsupportedOperationException(\"Not yet implemented\");\n \t}",
"public void insert(int index, int value) {\n\t\tSystem.out.println(\"Top here is : \" + top);\n\t\tif (index < top && index > -1) {\n\t\t\tint tmp = top;\n\t\t\twhile (tmp != index - 1) {\n\t\t\t\tarr[tmp + 1] = arr[tmp];\n\t\t\t\ttmp--;\n\n\t\t\t}\n\t\t\ttop++;\n\t\t\tarr[index] = value;\n\t\t}else{\n\t\t\tinsert(value);\n\t\t}\n\n\t}",
"public void add(T e){\n ensureCapacity(size + 1);\n data[size++] = e;\n }",
"@Override\n public void add(int index, T element) {\n Object[] newArray = new Object[size + 1];\n for (int i = 0; i < index; i++) {\n newArray[i] = data[i];\n }\n newArray[index] = element;\n for (int i = index + 1; i < newArray.length; i++) {\n newArray[i] = data[i - 1];\n }\n data = newArray;\n size++;\n }",
"public void Insert(char ch){\n if(occurrence[ch]==-1)\n occurrence[ch]=index++;\n else if(occurrence[ch]>=0)\n occurrence[ch]=-2;\n }",
"@Override\r\n\tpublic void push(E e) {\r\n\t\tif (size() == stack.length)\r\n\t\t\texpandArray();\r\n\t\tstack[++t] = e; // increment t before storing new item\r\n\t}",
"public static int insert(int M, int N, int i, int j) {\n\t\tint a = (-1) << j;\n\t\tint b = (-1) >>> (32 - i);\n\t\tint mask = a | b;\n\t\tN = N & mask;\n\t\tM = M << i;\n\t\treturn N | M;\n\t}",
"@Override\r\n public void insert(int index, Copiable value) throws IndexRangeException {\r\n if (index >= 0 && index <= count) {\r\n if (list.length == count) {\r\n Copiable[] list2 = new Copiable[2 * list.length];\r\n for (int k = 0; k < list.length; k++) {\r\n list2[k] = list[k];\r\n }\r\n list = list2;\r\n }\r\n for (int i = count; i > index; i--) {\r\n list[i] = list[i - 1];\r\n }\r\n list[index] = value;\r\n count++;\r\n } else {\r\n throw new IndexRangeException(0, count, index);\r\n }\r\n }",
"public void insert(T t) { \n int bucket = hash(t);\n Table.get(bucket).addLast(t);\n numElements++;\n }",
"void add(int index, Object element);",
"public void insert(int newItem){\n itemArray[count] = newItem;\n count++;\n }",
"private void appendToInsertionOrder(final int index, final int effectiveCapacity) {\n\t\tif ( _lastInsertOrderIndex == effectiveCapacity ) {\n\t\t\tcompactInsertionOrderIndices();\n\t\t}\n\t\t_lastInsertOrderIndex++;\n\t\t_indicesByInsertOrder[_lastInsertOrderIndex] = index;\n\t}",
"public void insert(int index, int data) {\n\n // double the Vector if it's full\n if (isFull())\n doubleSize();\n\n // Exception: index out of range\n if (index > dataSize)\n throw new IllegalStateException();\n\n // Move items 1 step forward\n if (index != dataSize)\n moveRight(index);\n\n // Place the item at the specified position\n array[index] = data;\n dataSize++;\n }",
"@Override\n public void insertAtAnyPosition(T value, int index) {\n Node<T> new_node = new Node<>(value);\n if(index < 0)\n throw new IndexOutOfBoundsException();\n else if(index == 0){\n new_node.next = start;\n start = new_node;\n }else{\n Node<T> previous = start;\n for(int i =0;i<index-1;i++)\n {\n previous = previous.next;\n }\n Node<T> curr = previous.next;\n new_node.next = curr;\n previous.next = new_node;\n }\n\n }",
"void insert(int pos, String s);",
"public static int[] addElement(int[] a, int e) {\n\t a = Arrays.copyOf(a, a.length + 1);\n\t a[a.length - 1] = e;\n\t return a;\n\t}",
"@Override\n\tpublic void add(int idx, E element) {\n\t\tif (element == null)\n\t\t\tthrow new NullPointerException();\n\t\tif (idx < 0 || idx > size())\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (element.equals(list[i]))\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\t// Element is added to the end of the list\n\t\tif (idx == size)\n\t\t\tlist[idx] = element;\n\n\t\t// Element is added at the beginning or middle\n\t\telse {\n\t\t\tfor (int i = size; i > idx; i--) {\n\t\t\t\tlist[i] = list[i - 1];\n\t\t\t}\n\t\t\tlist[idx] = element;\n\t\t}\n\n\t\tsize++;\n\t\tif (size == list.length)\n\t\t\tgrowArray();\n\n\t}",
"@Override\n\tpublic E set(int i, E e) throws IndexOutOfBoundsException {\n\t\treturn null;\n\t}",
"public void insert(E item) {\n // FILL IN\n }",
"private static void insert(int[] array, int rightIndex, int value) {\n int index = 0;\n for (index = rightIndex; index >= 0 && value < array[index]; index--) {\n array[index + 1] = array[index];\n }\n array[index + 1] = value;\n }",
"public void insert(int index, String fragment);"
]
| [
"0.71154636",
"0.70278484",
"0.68761104",
"0.6816621",
"0.679019",
"0.6717794",
"0.6681325",
"0.66693664",
"0.66360116",
"0.6552214",
"0.6463367",
"0.6459291",
"0.6454557",
"0.64286995",
"0.64262825",
"0.636302",
"0.63554263",
"0.6350967",
"0.63321257",
"0.6328625",
"0.63114655",
"0.6301048",
"0.6294162",
"0.6278539",
"0.62719095",
"0.62642664",
"0.62605244",
"0.6244354",
"0.6188144",
"0.6142064",
"0.61285716",
"0.6103517",
"0.60953736",
"0.60948575",
"0.60577375",
"0.6056799",
"0.6050597",
"0.60290176",
"0.6013538",
"0.5984731",
"0.5969935",
"0.595589",
"0.595589",
"0.59541726",
"0.59445256",
"0.5940179",
"0.59298694",
"0.5929257",
"0.5917487",
"0.5915381",
"0.59104013",
"0.59026635",
"0.5887922",
"0.5884048",
"0.58703005",
"0.58604",
"0.585928",
"0.5854608",
"0.5854554",
"0.58523995",
"0.5849908",
"0.5833511",
"0.5813035",
"0.57895774",
"0.5789287",
"0.5782037",
"0.57746136",
"0.5771964",
"0.5766581",
"0.5765766",
"0.576286",
"0.5762292",
"0.5755713",
"0.57436985",
"0.57386786",
"0.5738383",
"0.57189804",
"0.5711333",
"0.57108",
"0.57099426",
"0.5708871",
"0.5687672",
"0.56819564",
"0.567537",
"0.56655425",
"0.5661912",
"0.56562227",
"0.5655048",
"0.56502205",
"0.5647321",
"0.5643097",
"0.5642087",
"0.56355226",
"0.5631422",
"0.5609498",
"0.56090283",
"0.5565788",
"0.555981",
"0.5554836",
"0.5551887",
"0.5550743"
]
| 0.0 | -1 |
remove at index i. require shifting | Iterator<E> iterator(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public E remove(int i) {\n\t /*\n\t * Add code here.\n\t * Remember to compact the array so there are no spaces in between\n\t * if an element from the middle is removed or an element at the\n\t * beginning of the array is removed.\n\t */\n\t\t if(i<=num_elements){\n\t\t\t E removed_element= elements[i];\n\t\t for(int r=i;r<num_elements;r++){\n\t\t\t elements[r] = elements[r+1];\n\t\t }\n\t\t \tnum_elements --;\n\t\t return removed_element;\n\t\t }\n\t return null;\n\t }",
"E remove(int i ) throws IndexOutOfBoundsException;",
"E remove(int i) throws IndexOutOfBoundsException;",
"@Override\n public E remove(int i) throws IndexOutOfBoundsException {\n checkIndex(i, size);\n E temp = data[i];\n for (int k = i; k < size - 1; k++) // shift element to fill hole\n data[k] = data[k + 1];\n data[size - 1] = null; // help garbage collection\n size--;\n return temp;\n }",
"int remove(int idx);",
"void remove(int idx);",
"public void remove( int index ) {\n\tif (index > _lastPos)\n\t System.out.println(\"No meaningful value at index\");\n\telse {for (int i= index; i < _lastPos; i++){\n\t\t_data[i]= _data[i+1];\n\t }\n\t _size--;\n\t _lastPos--;\n\t}\n }",
"public U remove(int idx){\r\n\t \tif ((idx < 0)|| (idx > numElems-1))\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \tint i = idx;\r\n\t \t@SuppressWarnings(\"unchecked\")\r\n\t\t\tU data = (U) array[i];\r\n\t \t//Same shift algorithm as other remove method\r\n\t \twhile(i<numElems-1){\r\n\t \t\tarray[i]= array[i+1];\r\n\t \t\ti++;\r\n\t \t}\r\n\t \t//Not sure if needed: set last element to null after shift\r\n\t \tarray[numElems-1] = null;\r\n\t \tnumElems--;\r\n\t \treturn data;\r\n\t }",
"public Object remove (int i)\r\n {\r\n }",
"private final void fastRemove(final int index) {\r\n\t\tfinal int numMoved = this.size - index - 1;\r\n\t\tif (numMoved > 0) {\r\n\t\t\tSystem.arraycopy( this.elementData, index + 1, this.elementData, index, numMoved );\r\n\t\t}\r\n\t\tthis.elementData[--this.size] = null; // Let gc do its work\r\n\t}",
"@Override // com.google.android.gms.internal.firebase_ml.zzsq, java.util.List, java.util.AbstractList\n public final /* synthetic */ Long remove(int i) {\n zzpu();\n zzci(i);\n long[] jArr = this.zzbqi;\n long j = jArr[i];\n int i2 = this.size;\n if (i < i2 - 1) {\n System.arraycopy(jArr, i + 1, jArr, i, (i2 - i) - 1);\n }\n this.size--;\n ((AbstractList) this).modCount++;\n return Long.valueOf(j);\n }",
"void remove( int index );",
"public Type remove(int index);",
"void remove (int offset, int size);",
"@Override\n public E remove(int i) throws IndexOutOfBoundsException {\n Object element = get(i);\n size--;\n\n if (size == 0) {\n storage = null;\n } else if (size < 5) {\n for (int cnt = i; cnt < size; cnt++) {\n ((E[]) storage)[cnt] = ((E[]) storage)[cnt + 1];\n }\n\n if (size == 1) {\n storage = ((E[]) storage)[0];\n }\n } else {\n ((ArrayList<E>) storage).remove(i);\n\n if (size == 5) {\n storage = ((ArrayList<E>) storage).toArray();\n }\n }\n\n return (E) element;\n }",
"abstract void remove(int index);",
"@Override\n public E remove(int index) {\n // todo: Students must code\n int pos = calculate(index);\n\n E temp = data[pos];\n data[pos] = null;\n if(pos == head)\n head = (head+1) % data.length;\n else if(pos == tail)\n tail = (tail-1) % data.length;\n else {\n // shift all array contents after pos left 1\n for(int i = pos; i < (pos + curSize-index-1); i++)\n data[calculate(i)] = data[calculate(i+1)];\n tail = (tail-1) % data.length;\n }\n curSize--;\n return temp;\n }",
"void remove(int index);",
"void remove(int index);",
"void remove(int index);",
"void remove(int index);",
"void remove(int index) {\n\t\tfor (int i = index; i < array.length - 1; i++) {\n\t\t\tarray[i] = array[i + 1];\n\t\t}\n\t\tint[] temp = new int[array.length - 1];\n\t\tfor (int i = 0; i < array.length - 1; i++) {\n\t\t\ttemp[i] = array[i];\n\t\t}\n\t\tint lastValue = array[array.length - 1];// index starts @ 0, so its the\n\t\t\t\t\t\t\t\t\t\t\t\t// array.length - 1 to account\n\t\t\t\t\t\t\t\t\t\t\t\t// for the 0\n\t\tarray = temp;\n\n\t}",
"@Override\n // average-case complexity: O(n), since it always needs to shift n-amount\n // of element, where n is propotional to the list/input size\n public void remove(int index) {\n if (arr.length * SHRINK_THRESHOLD > size)\n arr = resize(arr, SHRINK_FACTOR);\n \n // remove the item at the specified index and shift everything right of\n // the given index 1 step to the left\n for (int i = index; i < size-1; i++) {\n arr[i] = arr[i+1];\n }\n // remove the previous last item and then decrement the size\n arr[--size] = null;\n }",
"void removeDebts(int i);",
"@Override\r\n\tpublic void removeToIndex(int index) {\n\t}",
"public void remove(int index);",
"T remove(int index);",
"T remove(int index);",
"public void removeIndex(int i) {\n // YOUR CODE HERE\n }",
"@Override\n public Node<T> remove(int i)\n {\n Node[] removeNodes = super.removeAlt(i);\n if(i == 0) lastNode.setNext(removeNodes[REMOVE_NEW_INDEX]);\n else if(i == size) lastNode = removeNodes[REMOVE_NEW_INDEX];\n return removeNodes[REMOVE_NODE_INDEX];\n }",
"public void removeAt(int index){\n E[] array2 = (E[]) new Object[capacity*2];\n int j=0;\n for(int i=0;i<size;i++){\n if(i!=index) {\n array2[j] = array[i];\n j++;\n }\n }\n array=array2;\n size--;\n }",
"@Override\r\n\tpublic Score remove(int i) throws IndexOutOfBoundsException {\r\n\t\t//when i is less than zero or greater than size()-1\r\n\t\tif (i < 0 || i > size() - 1)\r\n\t\t\tthrow new IndexOutOfBoundsException();\r\n\t\tScore a = scoreList[i];\r\n\t\tfor (int j = i; j < numItems - 1; j++) {\r\n\t\t\tscoreList[j] = scoreList[j + 1];\r\n\t\t}\r\n\t\tnumItems--;\r\n\t\treturn a;\r\n\t}",
"private static int[] removeElement(int[] a, int i) {\n\t\tint[] b = new int[a.length-1];\n\t\tint k = 0;\n\t\tfor (int j = 0; j < a.length; j++) {\n\t\t\tif (j != i) {\n\t\t\t\tb[k++] = a[j];\n\t\t\t}\n\t\t}\n\t\treturn b;\n\t}",
"public void removeObject(int i);",
"void remove(int index)\n\t{\n\t\t//Create a temporary array\n\t\tint[] temp=new int[inputArray.length-1];\n\t\t\n\t\t//Copy all the elements before the element at position index into the temporary array\n\t\tfor(int i = 0; i < index; i++)\n\t\t{\n\t\t\ttemp[i] = inputArray[i];\n\t\t}\n\t\t\n\t\t//Copy all the elements after the element at position index into the temporary array\n\t\tfor(int i = index+1; i < inputArray.length; i++)\n\t\t{\n\t\t\ttemp[i-1] = inputArray[i];\n\t\t}\n\t\t\n\t\t//Make the temporary array as the new array\n\t\tinputArray = temp;\n\t}",
"public void removeElementAt(int index);",
"public void removeIndex(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(INDEX$12, i);\r\n }\r\n }",
"public abstract T remove(int index);",
"@Override\n\tpublic int remove(int n) {\n\t\treturn 0;\n\t}",
"@Override\n public final Integer remove(final int index) {\n // Verify that the specified index is valid\n if (!checkRange(index)) {\n throw new IndexOutOfBoundsException();\n } else {\n final int temp = arrayList[index];\n // Shift all elements after the removed elements down\n for (int i = index; i < (size - 1); i++) {\n arrayList[i] = arrayList[i + 1];\n arrayList[i + 1] = 0;\n }\n size--;\n return temp;\n\n }\n }",
"@Override\n public T remove(int index) {\n T removed = array[index];\n for (int i = index + 1; i < array.length; i++) {\n array[i] = array[i + 1];\n }\n this.size = size - 1;\n return removed;\n }",
"public T remove(int idx) {\n\t\tint index = (idx << 1);\n\t\tnvPairs.remove(index);\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tT result = (T) nvPairs.remove(index); // same index, as things shifted in previous remove\n\t\treturn result;\n\t}",
"public E remove(int index);",
"void removeKey(int i);",
"@Override\n public E remove(int index) {\n\t E first = _store[index];\n\t _store[index] = null;\n\t for( int i = index; i< _size-1;i++) {\n\t\t _store[i]=_store[i+1];\n\t }\n\t_store[_size-1]=null;\n\t _size -=1;\n\t \n\t\t \n\treturn first;\n }",
"public void remove(int index) {\r\n\t\t//checks if the index is valid\r\n\t\tif(index>=0 && index<=size) {\r\n\t\t\tfor (int k=index;k<size;k++) {\t//shifting element\r\n\t\t\t\tlist[k]=list[k+1];\r\n\t\t\t}\r\n\t\t\tsize--;\t\t//decreases size\r\n\t\t\t//checks if the size of array is not 0 and less than 25% of the capacity of the array\r\n\t\t\tif (size!=0 && capacity/size >=4)\r\n\t\t\t\tresize(this.capacity/2);\t//decreasing size of array\r\n\t\t} else {\t//index is not valid\r\n\t\t\tSystem.out.println(\"index \"+index+\" is out or range!\");\r\n\t\t}\r\n\t}",
"public final void removeRange(int i, int i2) {\n a();\n if (i2 >= i) {\n long[] jArr = this.zzbod;\n System.arraycopy(jArr, i2, jArr, i, this.size - i2);\n this.size -= i2 - i;\n this.modCount++;\n return;\n }\n throw new IndexOutOfBoundsException(\"toIndex < fromIndex\");\n }",
"public @Override E remove(int i) {\n \treturn removeNode(getNode(i));\n }",
"protected void removeByIndex(int index) {\n int h = head;\n int t = tail;\n size = size - 1;\n int present = dequeue.length - 1;\n int offset = (index - h) & present;\n int finish = (tail - index) & present;\n\n if (offset < finish) {\n if (h <= index) {\n System.arraycopy(dequeue, h, dequeue, h + 1, offset);\n } else {\n System.arraycopy(dequeue, 0, dequeue, 1, index);\n dequeue[0] = dequeue[present];\n System.arraycopy(dequeue, h, dequeue, h + 1, present - h);\n }\n dequeue[h] = null;\n head = (h + 1) & present;\n } else {\n if (index < t) {\n System.arraycopy(dequeue, index + 1, dequeue, index, finish);\n tail = t - 1;\n } else {\n System.arraycopy(dequeue, index + 1, dequeue, index, present - index);\n dequeue[present] = dequeue[0];\n System.arraycopy(dequeue, 1, dequeue, 0, t);\n tail = (t - 1) & present;\n }\n }\n }",
"void removeScans(int i);",
"private void deleteElement(int index) {\n Object[] first = new Object[index];\n System.arraycopy(this.container, 0, first, 0, index);\n\n Object[] second = new Object[this.container.length - index - 1];\n System.arraycopy(this.container, index + 1, second, 0, second.length);\n\n this.container = new Object[this.container.length];\n System.arraycopy(first, 0, this.container, 0, first.length);\n System.arraycopy(second, 0, this.container, index, second.length);\n\n this.position--;\n }",
"public abstract E remove(int index);",
"public void removeItem(int i) {\n checkIndex(i);\n\n if (items[i] != null) {\n size--;\n }\n items[i] = null;\n }",
"private void removeAtIndex(int index) {\n // save the last item\n FoodItem toMoveBack = this._stock[this._noOfItems-1];\n // make it null\n this._stock[this._noOfItems-1] = null;\n // for each item until the index to remove from:\n for (int i = this._noOfItems-2; i > index-1; i--) {\n // save the last moved back temporarily\n FoodItem tempToMoveBack = toMoveBack;\n // assign to the next iteration item to move back\n toMoveBack = this._stock[i];\n // move back the item for current iteration\n this._stock[i] = tempToMoveBack;\n }\n // we removed an item - so let's decrease the item counter.\n this._noOfItems--;\n }",
"public void removeAtIndexFor(int index, int size) {\r\n int start = offset + index + size;\r\n int end = offset + count;\r\n ArrayUtils.shiftDown(objects, size, start, end, false);\r\n count -= size;\r\n }",
"public void remove(int index) {\n\t\t\tcheckIndex(index);\n\t\t\tfor(int i = index; i < size - 1; i++) {\n\t\t\t\telementData[i] = elementData[i + 1];\n\t\t\t}\n\t\t}",
"public void remove(int index)\r\n\t{\r\n\t\tif(index<0 || index >=n)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Invalid index\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor(int i=index;i<n;i++)\r\n\t\t\t{\r\n\t\t\t\ta[i]=a[i+1];\r\n\t\t\t}\r\n\t\t\tn--;\r\n\t\t}\t\t\r\n\t}",
"public void remove(int index) {\n\n\t}",
"public abstract void remove(int pos) throws IndexOutOfBoundsException;",
"@Override\n\tpublic void remove(int index) throws IndexOutOfBoundsException {\n\t\tif(checkIndex(index, size)) { //check if index is valid\n\t\t\tfor (int i=index; i<size; i++) {\n\t\t\t\tvalues[i] = values[i+1]; //move every value one step left until index (which is overwritten)\n\t\t\t}\n\t\t\tsize--; //decrement size\t\t\t\n\t\t}else {\n\t\t\tthrow new IndexOutOfBoundsException(\"Highest index: \" + size);\n\t\t}\t\n\t}",
"public Object remove(int index){\n\t\tif(index < listSize){\n\t\t\tObject o = myArrayList[index];\n\t\t\tmyArrayList[index] = null;\n\t\t\tint temp = index;\n\t\t\twhile(temp < listSize){\n\t\t\t\tmyArrayList[temp] = myArrayList[temp+1];\n\t\t\t\tmyArrayList[temp+1] = 0;\n\t\t\t\ttemp++;\n\t\t\t}\n\t\t\tlistSize --;\n\t\t\treturn o;\n\t\t}else{\n\t\t\tthrow new ArrayIndexOutOfBoundsException();\n\t\t}\n\t}",
"private E remove(){\n E tmp = array[0];\n swap(0,--lastPosition);\n array[lastPosition] = null;\n trickleDown(0);\n array = Arrays.copyOfRange(array,0,array.length);\n return tmp;\n }",
"public void removeEntry(int i) {\n removeEntryKeyHashKnown(i, Hashing.smearedHash(this.keys[i]));\n }",
"public void removeAt(int iterator) {\n int block = iterator / (len << 1);\n if (block >= numberOfBlocks || iterator >= endOfBlock[block]) throw new ArrayIndexOutOfBoundsException(\"Try to remove by incorrect iterator\");\n if (iterator == (len * (block) << 1)) dataInBegin[block] = data[iterator + 1];\n for (int l = iterator; l < endOfBlock[block] - 1; l++) {\n data[l] = data[l + 1];\n }\n endOfBlock[block]--;\n size--;\n if (endOfBlock[block] <= (len * block << 1)) {\n rebuildSqrt();\n }\n }",
"public Person remove(int i) {\r\n\t\treturn q.removeIndex(i);\r\n\t}",
"void removeReferenceRange(int i);",
"@Override\n public E remove(int index) {\n this.rangeCheck(index);\n this.modCount++;\n E oldValue = (E) this.values[index];\n int numMoved = this.index - index - 1;\n if (numMoved > 0) {\n System.arraycopy(this.values, index + 1, this.values, index, numMoved);\n }\n this.values[--this.index] = null;\n return oldValue;\n }",
"void removeStock(int i);",
"boolean remove(int pos);",
"public T remove(int index) {\n\n if (index >= size) {\n throw new IndexOutOfBoundsException(\"Index: \" + index + \", Size: \" + size);\n }\n\n T oldValue = myList[index];\n int value = size - index - 1;\n\n if (value > 0) {\n System.arraycopy(myList, index + 1, myList, index, value);\n }\n System.out.println(\"one \" + size);\n myList[--size] = null;\n System.out.println(\"two \" + size);\n\n return oldValue;\n }",
"public Point2D removePoint(int i);",
"public E remove(int index) {\n\t\tif (index < 0 || index >= this.size()) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Index is out of bounds\");\n\t\t}\n\t\tE removed = get(index);\n\t\t// Loop to shift elements left\n\t\tfor (int i = index; i < size(); i++) {\n\t\t\tlist[i] = list[i + 1];\n\t\t}\n\t\treturn removed;\n\t}",
"void removeBridgeElement(int i);",
"public E remove(int index){\n if (index < 0 || index >= size){\n throw new ArrayIndexOutOfBoundsException(index);\n }\n E returnValue = theData[index];\n for (int i = index + 1; i < size; i++) {\n theData[i - 1] = theData[i];\n }\n size--;\n return returnValue;\n }",
"public void removeAt(int pos)\n {\n for (int i = pos; i < length - 1; i++)\n {\n list[i] = list[i + 1];\n }\n length--;\n }",
"void removeNoPassingZone(int i);",
"@Override\n\tpublic int delete(Integer i) {\n\t\treturn 0;\n\t}",
"public E remove(int index)\n {\n if (index >= 0 && index < size) {\n E temp = data[index]; // element to return\n\n // shift all elements to the right down by 1 index\n for (int i = index; i < size - 1; i++)\n data[i] = data[i+1];\n \n size--;\n return temp;\n } else\n throw new NoSuchElementException();\n }",
"@Override\n public void delete(Integer index) {\n if(index > lastIndex)\n throw new IllegalArgumentException(); // only for tests\n stack.push(arr[index]);\n stack.push(index + arr.length+1);\n for (int i=index+1; i<lastIndex + 1; i++){\n arr[i-1] = arr[i];\n }\n lastIndex = lastIndex - 1;\n }",
"private void remove(int index){\r\n \tkeys[index] = null;\r\n \tvals[index] = null;\r\n deleteCheck(index);\r\n }",
"void remove(int v){\n if(isEmpty()!=1){\n for(int i=0;i<size;i++){\n if(values[i]==v){\n int j = i;\n while((j+1)!=size){\n values[j] = values[j+1];\n j++;\n\n }\n values[j] = (-1);\n break;\n }\n }\n }\n }",
"public void removeByLeftShift(int pos){\n int nshift=size-(pos);\n int to=(start+pos)%cir.length;\n int from=(to+1)%cir.length;\n for(int i=0;i<nshift;i++){\n cir[to]=cir[from];\n to=from;\n from=(from+1)%cir.length;\n \n }\n int index=(start+size-1)%cir.length;\n cir[index]=null;\n size--;\n \n }",
"@Override\n\t\t\tpublic void remove() {\n\t\t\t\tthrow new UnsupportedOperationException();\n//\t\t\t\tif (i == begin || removed)\n//\t\t\t\t\tthrow new IllegalStateException();\n//\t\t\t\telements.set(i-1, null);\n//\t\t\t\tremoved = true;\n\t\t\t}",
"@Override\n\tpublic T remove(int index) {\n\t\t// TODO check if index is withing the correct range\n\t\t// If not, return null\n\t\t// otherwise , do the same as above\n\t\tif (index >= 0 && index < size) {\n\t\t\tT item = data[index];\n\t \t\tfor(int i=index;i<size-1;i++)\n\t \t\t\tdata[i] = data[i+1];\n\t \t\tsize--;\n\t \t\treturn item;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\n\t}",
"public void remove(int index) {\n for (int i = index; i < this.list.length-1; i++) {\n this.list[i]=this.list[i+1];\n }\n this.size--;\n }",
"void removeSpeeds(int i);",
"public void remove(int i)\n/* 39: */ {\n/* 40:34 */ this.members.remove(i);\n/* 41: */ }",
"public E remove(int index){\n if (index > maxIndex || index < 0){\n return null;\n }\n\n E res = (E) array[index];\n\n //deleting element\n array[index] = null;\n\n //shifting other elements\n for (int i = index; i < maxIndex ; i++) {\n array[i] = array[i+1];\n }\n\n --maxIndex;\n\n return res;\n }",
"@Override\n public synchronized E remove(int index) {\n E result = this.get(index);\n if (index < this.size() - 1) {\n System.arraycopy(this.container, index + 1, this.container, index, this.size() - (index + 1));\n }\n this.container[--this.pointer] = null;\n return result;\n }",
"void removeRelated(int i);",
"@Override\n public void delete(int i) throws IndexOutOfBoundsException, IllegalStateException {\n validIndex(i);\n if (this.isEmpty()){\n throw new IllegalStateException(\"List is empty\");\n }\n for (int j = i; j < size - 1; j++){\n data[j] = data[j + 1];\n }\n data[size - 1] = null;\n size--;\n }",
"private static void remove(int[]data,int size){\n int temp = data[0];\n data[0] = data[size-1];\n data[size-1] = temp;\n pushDown(data, size-1, 0);\n }",
"public int delete(int i) //O(log(n))\n {\n\t if(this.lst == null)\n\t\t return -1;\n\t if(i < 0 || i >= this.length)\n\t\t return -1;\n\t this.length--; //one element removed\n\t this.lst.correctFrom(this.lst.deletenode(this.lst.Select(i+1))); //see details in class AVLTree\n\t return 0;\n }",
"@Override\n public T remove(int index) {\n if (index < 0 || index > size) {\n throw new IndexOutOfBoundsException(\"Index out of bounds exception.\");\n }\n\n T oldValue = (T) data[index];\n int move = index - size - 1;\n if (move > 0) {\n System.arraycopy(data, index + 1, data, index, move);\n }\n\n data[--size] = null;\n return oldValue;\n }",
"public U remove(U x){\r\n\t \tif (x==null)\r\n\t \t\tthrow new IllegalArgumentException(\"x cannot be null\");\r\n\t \t//find index\r\n\t \tint i = Arrays.binarySearch(array,0, getArraySize(), x);\r\n\t \t//x not found in array\r\n\t \tif (i<0)\r\n\t \t\treturn null;\r\n\t \t//store current element\r\n\t \t@SuppressWarnings(\"unchecked\")\r\n\t\t\tU data = (U) array[i];\r\n\t \t//enter loop\r\n\t \twhile(i<numElems-1){\r\n\t \t\t//move element left\r\n\t \t\tarray[i]= array[i+1];\r\n\t \t\ti++;\r\n\t \t}\r\n\r\n\t \t//Not sure if needed: set last element to null after shift\r\n\t \tarray[numElems-1] = null;\r\n\t \tnumElems--;\r\n\t \treturn data;\r\n\t \t\r\n\t }",
"void removeGuide(int i);",
"public void removeByRightShift(int pos){\n int nshift=pos+1;\n int from=(start+pos-1)%cir.length;\n int to=(from+1)%cir.length;\n for(int i=0;i<nshift;i++){\n cir[to]=cir[from];\n to=from;\n from--;\n if(from==-1){from=cir.length-1;}\n }\n start++;\n size--;\n }",
"public void remove(int num) {\n // find the index of num\n for (int i = 0; i < count; i++) {\n if (list[i] == num) {\n // shift the elements leftward and decrement count\n for (int j = 0; j < count - 1; j++) {\n list[i+j] = list[i+j+1];\n }\n count--;\n return;\n }\n }\n }",
"public void removeAt(int index) {\r\n\t\tSystem.arraycopy(keys, index + 1, keys, index, size - (index + 1));\r\n\t\tsize--;\r\n\t}",
"public void remove() {\n elements[index] = null;\n size--;\n next();\n }",
"void removeAt(final int removeIndex) {\n final Object[] items = this.items;\n if (removeIndex == takeIndex) {\n items[takeIndex] = null;\n if (++takeIndex == items.length) takeIndex = 0;\n count--;\n } else {\n final int putIndex = this.putIndex;\n for (int i = removeIndex;;) {\n int next = i + 1;\n if (next == items.length) next = 0;\n if (next != putIndex) {\n items[i] = items[next];\n i = next;\n } else {\n items[i] = null;\n this.putIndex = i;\n break;\n }\n }\n count--;\n }\n notFull.signal();\n }"
]
| [
"0.76431495",
"0.7570188",
"0.75287914",
"0.74485254",
"0.7438022",
"0.74319005",
"0.7416904",
"0.7380336",
"0.7336719",
"0.7308821",
"0.7250202",
"0.72111803",
"0.71941626",
"0.71871734",
"0.7183009",
"0.7137941",
"0.71343505",
"0.7120052",
"0.7120052",
"0.7120052",
"0.7120052",
"0.7107362",
"0.7102538",
"0.70943713",
"0.7082418",
"0.70726484",
"0.7072365",
"0.7072365",
"0.70436585",
"0.70377785",
"0.70141613",
"0.7005034",
"0.70023316",
"0.6990291",
"0.69654274",
"0.6965387",
"0.69468004",
"0.69336283",
"0.6922243",
"0.68898785",
"0.68879485",
"0.6883395",
"0.687461",
"0.68703777",
"0.6849044",
"0.68465316",
"0.6830621",
"0.6818807",
"0.6818262",
"0.68120605",
"0.68089634",
"0.68084335",
"0.6805647",
"0.6802938",
"0.68023217",
"0.6800895",
"0.6800601",
"0.67823964",
"0.6770709",
"0.67698765",
"0.6750499",
"0.6708297",
"0.6705433",
"0.6691061",
"0.6676038",
"0.6672514",
"0.66648287",
"0.6659623",
"0.66592586",
"0.6656526",
"0.6650089",
"0.66354716",
"0.66342837",
"0.66261435",
"0.6592601",
"0.6591711",
"0.6584539",
"0.6575191",
"0.6574104",
"0.65692186",
"0.65649766",
"0.65535325",
"0.65513355",
"0.6546893",
"0.65416867",
"0.65275234",
"0.65260345",
"0.65206265",
"0.6519038",
"0.65185666",
"0.65126693",
"0.65071326",
"0.6485869",
"0.6485232",
"0.6468151",
"0.6461902",
"0.6458932",
"0.6451928",
"0.6448842",
"0.64468324",
"0.6443566"
]
| 0.0 | -1 |
Function to validate furniture item ID's in the range 10007000 | @Override
public Boolean validateFurnitureItem(int furnitureItemID) {
if(furnitureItemID >= 1000 && furnitureItemID <= 7000)
{
return true;
}
else
{
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean checkId() {\n int sum = 0;\n int id;\n\n try\n {\n id = Integer.parseInt(ID.getText().toString());\n }\n catch (Exception e)\n {\n return false;\n }\n\n if (id >= 1000000000)\n return false;\n\n for (int i = 1; id > 0; i = (i % 2) + 1) {\n int digit = (id % 10) * i;\n sum += digit / 10 + digit % 10;\n\n id=id/10;\n }\n\n if (sum % 10 != 0)\n return false;\n\n return true;\n }",
"public boolean validateEmployeeID() {\n if (employeeID.length() - 1 != 6) {\n return false;\n }\n else if (employeeID.toCharArray()[2] != '-') {\n return false;\n }\n else if (Character.isLetter(employeeID.toCharArray()[0] & employeeID.toCharArray()[1])) {\n return true;\n }\n else if (Character.isDigit(employeeID.toCharArray()[3] & employeeID.toCharArray()[4]\n & employeeID.toCharArray()[5] & employeeID.toCharArray()[6])) {\n return true;\n }\n else{\n return false;\n }\n }",
"private boolean CheckID(String id) {\n\t\tif ((!id.matches(\"([0-9])+\") || id.length() != 9) && (!id.matches(\"S([0-9])+\") || id.length() != 10)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public Boolean verifyBusinessID(int id, int count){\n //checks that number entered is more than 0 and less than max\n return !(id > count || id <= 0);\n }",
"public abstract boolean isValidID(long ID);",
"protected boolean isAirlineIDValid(String airlineID) {\n return airlineID.length() <= 5 && airlineID.matches(\"[0-9]+\");\n }",
"boolean validateEmployeeId(String employeeId);",
"public boolean validateID() {\n\t\tif (this.id == null || this.id.length() < 1)\n\t\t\treturn false;\n\t\ttry {\n\t\t\tInteger.parseInt(this.id);\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean checkUserOrItemID(String iD) {\n // check for empty String\n if (iD == null || iD.strip().equals(\"\")) {\n return false;\n }\n\n if (iD.length() > 6) {\n return false;\n }\n\n try {\n Integer.parseInt(iD);\n return true;\n } catch (Exception e) {\n return false;\n }\n }",
"public static boolean isValidId(String test) {\n return test.matches(VALIDATION_REGEX);\n }",
"public static boolean isValidId(String test) {\n return test.matches(VALIDATION_REGEX);\n }",
"private boolean checkValidQuantity (int quantity){\n if (quantity >= 0){\n return true;\n }\n return false;\n }",
"private boolean isValidEmployeeIds(List<Employee> employees) {\n //all employee Ids must be positive integer value\n if (employees.stream().mapToInt(Employee::getEmployeeId)\n .anyMatch(employeeId -> employeeId<=0))\n // if any id is <= 0 then the list is not valid\n return false;\n\n //EmployeeId must be unique\n long idCount = employees.stream()\n .mapToInt(Employee::getEmployeeId)\n .count();\n long idDistinctCount = employees.stream()\n .mapToInt(Employee::getEmployeeId)\n .distinct().count();\n // if both are equal then the ids are already unique\n return idCount == idDistinctCount;\n }",
"private void validateId(String id) {\n if (!id.matches(\"[0-9]+\")) {\n throw new IllegalArgumentException(\"Invaild Tweet Id\");\n }\n return;\n }",
"public void testNumberID() {\n String testID = generator.generatePrefixedIdentifier(\"123\");\n assertNotNull(testID);\n assertTrue(testID.matches(\"_123\" + ID_REGEX));\n }",
"static boolean verifyIDRelaxed(String id)\r\n\t{\r\n\t\tfor(int i = 0; i < id.length(); i++)\r\n\t\t{\r\n\t\t\tchar c = id.charAt(i);\r\n\t\t\tif(Character.isLetterOrDigit(c)) //isAlpha\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\telse if(c == ' ' || c == '_' || c == '-')\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn id.length() > 0;\r\n\t}",
"public static boolean verifyId(long id) {\n \n boolean isTrue = true;\n \n if(id >= MINIMUM_ID_NUMBER && id <= MAXIMUM_ID_NUMBER) {\n return isTrue;\n } else {\n isTrue = false;\n \n return isTrue;\n } \n }",
"protected boolean isAirportIDValid(String airportID) {\n return (airportID.length() <= 5 && airportID.matches(\"[0-9]+\"));\n }",
"@Override\n public final boolean isValid(final String taxId) {\n if (hasInvalidLength(taxId) || hasInvalidCharacter(taxId)) {\n return false;\n }\n if (computeCheckDigit(taxId) != taxId.charAt(EXPECTED_LEN - 1)) {\n return false;\n }\n return true;\n }",
"static boolean verifyID(String id)\r\n\t{\r\n\t\tfor(int i = 0; i < id.length(); i++)\r\n\t\t{\r\n\t\t\tchar c = id.charAt(i);\r\n\t\t\tif((c <= 'Z' && c >= 'A') || (c >= 'a' && c <= 'z')) //isAlpha\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\telse if(c >= '0' && c <= '9' || c == '_' || c == '-') //is digit or _ or -\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\telse if(c == ' ')\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn id.length() > 0;\r\n\t}",
"protected static String goodSearchID(String IDCheck) throws Exception\n {\n String[] ID; \n try{\n ID = IDCheck.split(\"\\\\s+\");\n if (ID.length > 1 ) {\n throw new Exception(\"ERROR: The ID must be 1 word only\\n\");\n }\n if (!(ID[0].equals(\"\")) && ID[0].length() != 6) {\n throw new Exception(\"ERROR: ID entered but it is not 6 digits\\n\");\n }\n if (!(ID[0].matches(\"[0-9]+\"))) {\n throw new Exception(\"ERROR: ID must only contain numbers\");\n }\n return ID[0];\n } catch (Exception e){\n throw new Exception(e.getMessage());\n }\n }",
"private boolean validityChecker(TextField employeeId) {\n\t\tString empid = employeeId.getValue();\n\t\tint length = empid.length();\n\t\tif (empid.matches(\".*[A-Za-z].*\") || length < minLength || length> maxLength)\n\t\t\treturn false;\n\t\tif(!isNew){\n\t\tif (EmployeeDAO.getEmployee(empid) == null)\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private static int validateId(Artist[] painterObject, int arrayCount) {\n\t\tboolean flag = true;\n\t\tSystem.out.println(\"Enter painter id:\");\n\t\tint id = AllValidationChecks.positiveIntegerCheck();\n\t\tfor (int i = 0; i < arrayCount; i++) {\n\t\t\tif (id == painterObject[i].getId()) {\n\t\t\t\tflag = false;\n\t\t\t}\n\t\t}\n\t\tif (flag) {\n\t\t\treturn id;\n\t\t} else {\n\t\t\tSystem.out.println(\"id already exists\");\n\t\t\treturn validateId(painterObject, arrayCount);\n\t\t}\n\t}",
"private boolean hasInvalidCharacter(final String taxId) {\n char aChar;\n for (int i = 0; i < EXPECTED_LEN; i++) {\n aChar = taxId.charAt(i);\n if (!(aChar >= '0' && aChar <= '9' || aChar >= 'A' && aChar <= 'Z')) {\n return true;\n }\n }\n return false;\n }",
"private boolean isValidNumber(String quantity) {\n\t\ttry{\n\t\t\tint value=Integer.parseInt(quantity);\n\t\t\treturn value>0? true: false;\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}",
"public static boolean empidValidate(String emp_id){\n if(emp_id.matches(\"\\\\p{IsAlphabetic}{2}-\\\\d{4}\"))\n return true;\n\n else {\n System.out.println(\"The employee ID must be in the format of AA-1234.\");\n return false;\n }\n\n }",
"public void testFinditemByIdWithInvalidValues() throws Exception {\n\t\ttry {\r\n\t\t\titemService.findItem(-1);\r\n\t\t\tfail(\"Object with unknonw id should not be found\");\r\n\t\t} catch (ItemNotFoundException e) {\r\n\t\t}\r\n\r\n\t\t// Finds an object with an empty identifier\r\n\t\ttry {\r\n\t\t\titemService.findItem(Long.parseLong(\"0\"));\r\n\t\t\tfail(\"Object with empty id should not be found\");\r\n\t\t} catch (ItemNotFoundException e) {\r\n\t\t}\r\n\r\n\t}",
"Integer validateDetail(String detail) throws DvdStoreException;",
"private boolean esFilaValida(int fila) {\n return (fila>=0 && fila<=casillas.length);\n }",
"public boolean isFlightIdValid(String flightId) throws IdInvalidException, NullValueException\r\n\t{\r\n\t\tPattern pattern = Pattern.compile(\"[f][a][0-9]{3}\");\r\n\t\tMatcher match = pattern.matcher(flightId);\r\n\t\tif(flightId.isEmpty())\r\n\t\t{\r\n\t\t\tthrow new NullValueException(\"Value cannot be empty\");\r\n\t\t}\r\n\t\tif(!match.matches())\r\n\t\t{\r\n\t\t\tthrow new IdInvalidException(\"Entered id in wrong format\");\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"private void check1(){\n \n\t\tif (firstDigit != 4){\n valid = false;\n errorCode = 1;\n }\n\t}",
"public static void main(String[] args) {\n String idNum = \"410326880818551\";\n System.out.println(verify15(idNum));\n// String idNum2 = \"411111198808185510\";\n String idNum2 = \"410326198808185515\";\n System.out.println(verify(idNum2));\n }",
"public boolean isEveryIdValid()\n {\n return(idValidation.size()==0);\n }",
"private static boolean m3404a(int i) {\n boolean z;\n if (100 > i || i >= 200) {\n z = false;\n } else {\n z = true;\n }\n return (z || i == AppLovinErrorCodes.NO_FILL || i == 304) ? false : true;\n }",
"public static boolean isValidQuantity(String test) {\n try {\n return Integer.parseInt(test) <= MAX_QUANTITY\n && Integer.parseInt(test) >= MIN_QUANTITY\n && test.matches(VALIDATION_REGEX);\n } catch (NumberFormatException e) {\n return false;\n }\n }",
"boolean isPatronIdValid(int patronId) {\n\t\t\n\t\t// checks if the id is to big or to small or if that location is not taken\n\t\tif (patronId >= this.maxPatronCapacity || this.patronlist[patronId] == null || patronId < 0) { \n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"private void check6(){\n \n if (errorCode == 0){\n \n int firstSecond = Integer.parseInt(number.substring(0,2));\n int seventhEight = Integer.parseInt(number.substring(6,8));\n \n if (firstSecond + seventhEight != 100){\n valid = false;\n errorCode = 6;\n }\n }\n\t}",
"private boolean checkInteger(byte buffer[], int sindex, int findex)\n {\n \t\t// 첫 글자를 체크한다. (+, -가 올수 있다.)\n \t\tbyte b = buffer[sindex];\n \t\tif ((b < 48) || (b > 57)) {\n \t\t\tif (b != 45)\n \t\t\t\tif (b != 43) return false;\n \t\t}\n \t\tfor (int i=sindex+1; i<findex; i++) {\n \tif ((buffer[i] < 48) || (buffer[i] > 57)) return false;\n \t\t}// end of for\n \t\treturn true;\n \t}",
"private static void validateVisId(ValidationError error, int length) {\n String fieldName = \"identifier\";\n if (length == 0) {\n logger.error(\"Length (\" + length + \") of VisId can't be 0\");\n error.addFieldError(fieldName, \"Length (\" + length + \") of VisId can't be 0\");\n } else if (length > 100) {\n logger.error(\"Length (\" + length + \") of VisId must not exceed 100 on a FinanceCube\");\n error.addFieldError(fieldName, \"Length (\" + length + \") of VisId must not exceed 100 on a FinanceCube\");\n }\n }",
"@Test\n\tpublic void requestAccountsForCustomer12212_checkListOfAccountsIDs_expectDoesNotContain99999() {\n\n\t\tgiven().\n\t\t\tspec(requestSpec).\n\t\twhen().\n\t\tthen();\n\t}",
"@Test\n\tpublic void test() {\n\t\tlong firstID = UIDGen.getInstance().getNextId();\n\t\tint n = 100;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tUIDGen.getInstance().getNextId();\n\t\t}\n\t\tlong currentID = UIDGen.getInstance().getNextId();\n\t\tassertEquals(currentID, firstID + n + 1);\n\n\t\t// expect a IDInvalidException exception for using and\n\t\t// external id that has already been used\n\t\tlong exteranlId = currentID;\n\t\tThrowable caught = null;\n\t\ttry {\n\t\t\tUIDGen.getInstance().considerExternalId(exteranlId);\n\t\t} catch (Throwable t) {\n\t\t\tcaught = t;\n\t\t}\n\t\tassertNotNull(caught);\n\t\tassertSame(IDInvalidException.class, caught.getClass());\n\n\t\t// push an external id that is not used and expect no exception\n\t\texteranlId = currentID + 2;\n\t\ttry {\n\t\t\tUIDGen.getInstance().considerExternalId(exteranlId);\n\t\t} catch (Throwable t) {\n\t\t\tfail();\n\t\t}\n\n\t\t// expect an exception as we put the same id again\n\t\texteranlId = currentID;\n\t\tcaught = null;\n\t\ttry {\n\t\t\tUIDGen.getInstance().considerExternalId(exteranlId);\n\t\t} catch (Throwable t) {\n\t\t\tcaught = t;\n\t\t}\n\t\tassertNotNull(caught);\n\t\tassertSame(IDInvalidException.class, caught.getClass());\n\n\t\t// must skip currentID + 2 as it was defined as an external id\n\t\tassertEquals(UIDGen.getInstance().getNextId(), currentID + 1);\n\t\tassertEquals(UIDGen.getInstance().getNextId(), currentID + 3);\n\t}",
"@Override\n public boolean validate(long number) {\n List<Integer> digits = split(number);\n int multiplier = 1;\n int sum = 0;\n for (int digit : Lists.reverse(digits)) {\n int product = multiplier * digit;\n sum += product / BASE + product % BASE;\n multiplier = 3 - multiplier;\n }\n return sum % BASE == 0;\n }",
"boolean isBookIdValid(int bookId) {\n\t\t\n\t\t// checks if the id is to big for the book case or if that location is not taken \n\t\tif (bookId >= this.maxBookCapacity || this.bookShelf[bookId] == null || bookId < 0) {\n\t\t\treturn false; \n\t\t}\n\t\t\n\t\treturn true; \n\t}",
"public boolean validate(int value) {\n return (Integer.toString(value).length() == 4) ? true : false;\n }",
"private boolean checkInt(String str) {\n\t\ttry {\n\t\t\tint integer = Integer.parseInt(str);\n\t\t\tif(integer>=0&&integer<100000){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch(Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"public static boolean isValidFoodAmount(Integer test) {\n return test > 0;\n }",
"public static boolean validFieldId( String fieldId ) {\n\t\ttry {\n\t\t\tforFieldId( fieldId );\n\t\t\treturn true;\n\t\t} catch( Exception e ) {\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean validateFurnitureItem(Object object) {\n\t\treturn false;\n\t}",
"public boolean checkInvalid0(String x) {\n String kiTuDacBiet = \"0123456789fwjz~`!@#$%^&*()-_=+[{}]|;:'<>?/\";\n for (int i = 0; i < x.length(); i++) {\n if (kiTuDacBiet.contains(String.valueOf(x.charAt(i)))) {\n return true;\n }\n }\n return false;\n }",
"void checkRange(String value) throws TdtTranslationException {\r\n\t\tif (!hasRange)\r\n\t\t\treturn;\r\n\t\tLong intValue;\r\n\t\ttry {\r\n\t\t\tintValue = Long.valueOf(Long.parseLong(value));\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new TdtTranslationException(\"Cannot convert \" + value\r\n\t\t\t\t\t+ \" to ulong in field \" + getId());\r\n\t\t}\r\n\t\tcheckRange(intValue);\r\n\t}",
"public boolean checkInvalid6(String x) {\n String phuAmDau = \"qsdklxvb\";\n for (int i = 1; i < x.length(); i++) {\n if (phuAmDau.contains(String.valueOf(x.charAt(i)))) {\n return true;\n }\n }\n return false;\n }",
"@Test\n\tpublic void inValidEmailIdIsTested() {\n\t\ttry {\n\t\t\tString emailId = \"divyagmail.com\";\n\t\t\tboolean isValidMail = EmailValidatorUtil.isValidEmailId(emailId, \"InValid EmailID Format\");\n\t\t\tassertFalse(isValidMail);\n\t\t} catch (Exception e) {\n\t\t\tassertEquals(\"InValid EmailID Format\", e.getMessage());\n\n\t\t}\n\t}",
"@Test\n @Disabled\n public void testValidateNIF() {\n assertTrue(RegExprMain.validateNIF(\"46098494P\"));\n assertFalse(RegExprMain.validateNIF(\"46098494A\"));\n assertTrue(RegExprMain.validateNIF(\"43267890C\"));\n assertFalse(RegExprMain.validateNIF(\"46098494A\"));\n assertFalse(RegExprMain.validateNIF(\"4609844AA\"));\n assertFalse(RegExprMain.validateNIF(\"4609844A\"));\n assertTrue(RegExprMain.validateNIF(\"45678932D\"));\n assertTrue(RegExprMain.validateNIF(\"41256789S\"));\n assertFalse(RegExprMain.validateNIF(\"460984943A\"));\n assertFalse(RegExprMain.validateNIF(\"46098494\"));\n\n }",
"@Test\n public void testIncorrectId(){\n UserRegisterKYC idTooLong = new UserRegisterKYC(\"hello\",\"S12345678B\",\"26/02/1995\",\"738583\");\n int requestResponse = idTooLong.sendRegisterRequest();\n assertEquals(400, requestResponse);\n\n UserRegisterKYC nonAlphanumId = new UserRegisterKYC(\"hello\",\"S12345!8B\",\"26/02/1995\",\"738583\");\n requestResponse = nonAlphanumId.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n UserRegisterKYC invalidPrefixId = new UserRegisterKYC(\"hello\",\"A\"+validId3.substring(1),\"26/02/1995\",\"738583\");\n requestResponse = invalidPrefixId.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n UserRegisterKYC alphaInMiddleId = new UserRegisterKYC(\"hello\",\"S1234A68B\",\"26/02/1995\",\"738583\");\n requestResponse = alphaInMiddleId.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n UserRegisterKYC idTooShort = new UserRegisterKYC(\"hello\",\"S123678B\",\"26/02/1995\",\"738583\");\n requestResponse = idTooShort.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n UserRegisterKYC invalidChecksum = new UserRegisterKYC(\"hello\",\"S1234578B\",\"26/02/1995\",\"738583\");\n requestResponse = invalidChecksum.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n }",
"private void validateQuantity() {\n if (numQuantity.isEmpty()) {\n numQuantity.setErrorMessage(\"This field cannot be left blank.\");\n numQuantity.setInvalid(true);\n removeValidity();\n }\n // Check that quantity is in acceptable range (range check)\n else if (!validator.checkValidQuantity(numQuantity.getValue().intValue())) {\n numQuantity.setErrorMessage(\"Please enter a number between 1 and \" + researchDetails.MAX_QUANTITY + \" (inclusively)\");\n numQuantity.setInvalid(true);\n removeValidity();\n }\n\n }",
"@Test\n public void testGetUniqueInt() {\n UniqueRandomGenerator instance = new UniqueRandomGenerator();\n \n List<Integer> extracted = new ArrayList<>();\n \n for (int i = 0; i < 1000; i++)\n {\n int extr = instance.getUniqueInt(0, 1000);\n \n if (extracted.contains(extr))\n fail();\n else\n extracted.add(extr);\n }\n }",
"public static boolean isValidNumber(String number) {\n\t\tSet<String> set = new HashSet<String>();\n\t\tset.add(\"4\");\n\t set.add(\"7\");\n\t\t\n\t if(number.substring(0, 1).equals(\"3\") && set.contains(number.substring(1, 2)) && number.length() == 15) { return true; }\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic void validate(Product p) throws CustomBadRequestException {\r\n\t\tif(p.getName() == null || p.getName().equals(\"\") || p.getBarcode() == null || p.getBarcode().equals(\"\") || p.getMeasure_unit() == null ||\r\n\t\t\t\tp.getMeasure_unit().equals(\"\") || p.getQuantity() == null || p.getQuantity().equals(\"\")|| p.getBrand() == null || p.getBrand().equals(\"\")){\r\n\t\t\tthrow new CustomBadRequestException(\"Incomplete Information about the product\");\r\n\t\t}\r\n\r\n\t\tString eanCode = p.getBarcode();\r\n\t\tString ValidChars = \"0123456789\";\r\n\t\tchar digit;\r\n\t\tfor (int i = 0; i < eanCode.length(); i++) { \r\n\t\t\tdigit = eanCode.charAt(i); \r\n\t\t\tif (ValidChars.indexOf(digit) == -1) {\r\n\t\t\t\tthrow new CustomBadRequestException(\"Invalid Barcode\");\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Add five 0 if the code has only 8 digits\r\n\t\tif (eanCode.length() == 8 ) {\r\n\t\t\teanCode = \"00000\" + eanCode;\r\n\t\t}\r\n\t\t// Check for 13 digits otherwise\r\n\t\telse if (eanCode.length() != 13) {\r\n\t\t\tthrow new CustomBadRequestException(\"Invalid Barcode\");\r\n\t\t}\r\n\r\n\t\t// Get the check number\r\n\t\tint originalCheck = Integer.parseInt(eanCode.substring(eanCode.length() - 1));\r\n\t\teanCode = eanCode.substring(0, eanCode.length() - 1);\r\n\r\n\t\t// Add even numbers together\r\n\t\tint even = Integer.parseInt((eanCode.substring(1, 2))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(3, 4))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(5, 6))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(7, 8))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(9, 10))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(11, 12))) ;\r\n\t\t// Multiply this result by 3\r\n\t\teven *= 3;\r\n\r\n\t\t// Add odd numbers together\r\n\t\tint odd = Integer.parseInt((eanCode.substring(0, 1))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(2, 3))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(4, 5))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(6, 7))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(8, 9))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(10, 11))) ;\r\n\r\n\t\t// Add two totals together\r\n\t\tint total = even + odd;\r\n\r\n\t\t// Calculate the checksum\r\n\t\t// Divide total by 10 and store the remainder\r\n\t\tint checksum = total % 10;\r\n\t\t// If result is not 0 then take away 10\r\n\t\tif (checksum != 0) {\r\n\t\t\tchecksum = 10 - checksum;\r\n\t\t}\r\n\r\n\t\t// Return the result\r\n\t\tif (checksum != originalCheck) {\r\n\t\t\tthrow new CustomBadRequestException(\"Invalid Barcode\");\r\n\t\t}\r\n\r\n\t\tif(Float.parseFloat(p.getQuantity()) <= 0){\r\n\t\t\tthrow new CustomBadRequestException(\"Invalid Quantity\");\r\n\t\t}\r\n\r\n\r\n\t}",
"private boolean isValidId(String id) {\r\n\t\tboolean result = false;\r\n\t\tif (id.length() >= 1) {\r\n\t\t\tif (Character.isLetter(id.charAt(0))) {\r\n\t\t\t\tif (id.contains(\".\")) {\r\n\t\t\t\t\tString[] tokens = id.split(\"\\\\.\");\r\n\t\t\t\t\tif (tokens.length == 2) {\r\n\t\t\t\t\t\tfor (int i = 0; i < tokens[0].length(); i++) {\r\n\t\t\t\t\t\t\tif (!(tokens[0].charAt(i) == '.'\r\n\t\t\t\t\t\t\t\t\t|| tokens[0].charAt(i) == '_'\r\n\t\t\t\t\t\t\t\t\t|| tokens[0].charAt(i) == '-' || Character\r\n\t\t\t\t\t\t\t\t\t\t.isLetterOrDigit(tokens[0].charAt(i)))) {\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tfor (int i = 0; i < tokens[1].length(); i++) {\r\n\t\t\t\t\t\t\tif (!(tokens[0].charAt(i) == '.'\r\n\t\t\t\t\t\t\t\t\t|| tokens[0].charAt(i) == '_'\r\n\t\t\t\t\t\t\t\t\t|| tokens[0].charAt(i) == '-' || Character\r\n\t\t\t\t\t\t\t\t\t\t.isLetterOrDigit(tokens[0].charAt(i)))) {\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public boolean isValid(int number)",
"private boolean inventoryValid(int min, int max, int stock) {\n\n boolean isValid = true;\n\n if (stock < min || stock > max) {\n isValid = false;\n AlartMessage.displayAlertAdd(4);\n }\n\n return isValid;\n }",
"private boolean validIndex(int index)\n {\n if(index >= 0 && index < songs.size())\n return true;\n else\n {\n System.out.println(\"not valid number as index\");\n return false;\n }\n }",
"private boolean partIsValid(){\r\n int min = Integer.parseInt(partMin.getText());\r\n int max = Integer.parseInt(partMax.getText());\r\n int inventory = Integer.parseInt(partInv.getText());\r\n if(max < min || min >= max){\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(\"Error: Change Max and Min Values\");\r\n alert.setContentText(\"Change Max value to be greater than min\");\r\n alert.showAndWait();\r\n return false;\r\n } else if(max < inventory || min > inventory){\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(\"Error: Invalid Inventory number\");\r\n alert.setContentText(\"Inventory must be less than max and more than min\");\r\n alert.showAndWait();\r\n return false;\r\n }\r\n return true;\r\n }",
"boolean isUnique(TextField inputPartNumber);",
"private static boolean m4389a(String str) {\n return str != null && str.length() != 0 && Pattern.compile(\"^[0-9A-Fa-f]{13,18}+$\").matcher(str).matches() && str.indexOf(\"000000000\") == -1 && str.indexOf(\"111111111\") == -1 && str.indexOf(\"222222222\") == -1 && str.indexOf(\"333333333\") == -1 && str.indexOf(\"444444444\") == -1 && str.indexOf(\"555555555\") == -1 && str.indexOf(\"666666666\") == -1 && str.indexOf(\"777777777\") == -1 && str.indexOf(\"888888888\") == -1 && str.indexOf(\"999999999\") == -1;\n }",
"public static int checkInt(int low, int high)\r\n {\r\n Scanner in = new Scanner(System.in);\r\n int validNum = 0;\r\n boolean valid = false;\r\n while(!valid)\r\n {\r\n if(in.hasNextInt())\r\n {\r\n validNum = in.nextInt();\r\n if(validNum >= low && validNum <= high)\r\n valid = true;\r\n else\r\n System.err.println(\"Invalid\");\r\n } else\r\n {\r\n in.next();\r\n System.err.println(\"Invalid\");\r\n }\r\n }\r\n return validNum;\r\n }",
"@Test\n\tpublic void testInt4() {\n\t\tTextField intText = new TextField(\"23abc\");\n\t\tboolean checkIntText = initTest.checkIntValues(intText);\n\t\tassertFalse(checkIntText);\n\t}",
"public static boolean checkFullItem(int id) throws IOException\n\t{\n\t\tif(id == 0)\n\t\t\treturn false;\n\t\t//special cases ex. boots\n\t\tif(id == 3047 || id == 3006 || id == 3009 || id == 3020 || id == 3111 || id == 3117 || id == 3158)\n\t\t\treturn true;\n\t\t\n\t\t//old boot enchantments\n\t\tif(id >= 1300 && id <= 1334)\n\t\t\treturn true;\n\t\t\n\t\t//sated devourer\n\t\tif(id == 3931 || id == 1415 || id == 1411)\n\t\t\treturn true;\n\t\t\n\t\t//sightstone\n\t\tif(id == 2049)\n\t\t\treturn true;\n\t\t\n\t\tif(id == 3930)\n\t\t\treturn true;\n\t\t\n\t\t//DNE anymore item?\n\t\tif(id == 2043 || id == 3932)\n\t\t\treturn false;\n\t\t\n\t\t//System.out.println(\"ID: \" + id);\n\t\tURL url = new URL(\"https://global.api.pvp.net/api/lol/static-data/na/v1.2/item/\" + id + \"?itemData=into&api_key=\" + API);\n\t\tInputStream is = url.openStream();\n\t\tJsonReader rdr = Json.createReader(is);\n\t\tJsonObject obj = rdr.readObject();\n\t\treturn !obj.containsKey(\"into\");\n\t}",
"private static boolean checkForMultipleIDs(String id)\n\t{\n\t\tif (id.indexOf(',') >= 0)\n\t\t{\n\t\t\treturn false; \n\t\t}\n\t\t\n\t\treturn true; \n\t}",
"boolean valueCheckMatch(String value) {\r\n\t\tif (value.length() > intLength) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (hasRange) {\r\n\t\t\tLong ulongValue = Long.valueOf(Long.parseLong(value));\r\n\t\t\tif ((ulongValue.compareTo(minimum) < 0)\r\n\t\t\t\t\t|| (ulongValue.compareTo(maximum) > 0)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Test\r\n\tpublic void testIdItem() {\r\n\r\n\t\ttry {\r\n\t\t\tItem itemDes = new Item(idItem, \"elixir de Destreza\", 0, 0, 0, 0, 0, 0, null, null);\r\n\r\n\t\t\tAssert.assertEquals(12321, itemDes.getIdItem());\r\n\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}\t\t\r\n\r\n\t}",
"private boolean hasInvalidLength(final String taxId) {\n if (taxId == null || taxId.length() != EXPECTED_LEN) {\n return true;\n }\n return false;\n }",
"@Override\n\tpublic void valid(String id, String valid) {\n\t\t\n\t}",
"public boolean validarDni(String dni){\n boolean isDni = true;\n while(dni.startsWith(\"0\")){\n dni = dni.substring(1);\n }\n isDni = dni.length()<10 && dni.length()>6?true:false;\n return isDni;\n }",
"public int bookInputRangeChecker(String input, int min, int max)\n {\n int num = bookInputIntChecker(input);\n while (num < min || num > max){\n System.out.println(num + \" is not in the allowed range, \" + min + \" - \" + max);\n num = bookInputIntChecker(input);\n }\n \n return num;\n }",
"public static boolean checkRange(int x) {\n\n \n if (x >= 1 && x <= 9) { //check if input is between 1 and 9, inclusive\n return (true);\n }\n else {\n System.out.print(\"You did not enter an int in [1,9]; try again: \");\n return (false);\n \n }\n\n \n\n }",
"@Test\n void test50IdsAllowed() throws Exception {\n setEppInput(\"host_check_50.xml\");\n runFlow();\n }",
"private boolean isSSNFourDigits(String toCheck) {\r\n if (toCheck.length() > 0 && toCheck.length() != 4) {\r\n JOptionPane.showMessageDialog\r\n (null, \"Social Security # Must Have 4 Characters\");\r\n return false;\r\n } else if (toCheck.length() == 0) {\r\n JOptionPane.showMessageDialog\r\n (null, \"No Social Security # entered\");\r\n return false;\r\n } else if (toCheck.length() == 4) {\r\n for (int i = 0; i < 4; i++) {\r\n if (!Character.isDigit(toCheck.charAt(i))) {\r\n JOptionPane.showMessageDialog\r\n (null, \"Social Security # Must Have Only Numbers\");\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }",
"public static boolean isValidQuantity(int productQuantity) {\n return productQuantity >= 0;\n }",
"public static int awaitIntInRange(String prefix, int min, int max) {\r\n int inputInt = awaitInt(prefix);\r\n if (inputInt >= min && inputInt <= max)\r\n return inputInt;\r\n System.out.println(\"Please enter a number between \" + min + \" & \" + max);\r\n return awaitIntInRange(prefix, min, max);\r\n }",
"boolean isNumericPubmed(String id){\n\t\t \n\t\t try{\n\t\t\t Integer.parseInt(id);\n\t\t }catch (Exception e){\n\t\t\t return false;\n\t\t }\n\t\t return true;\n\t }",
"private boolean validInventory(int min, int max, int stock) {\r\n\r\n boolean isTrue = true;\r\n\r\n if (stock < min || stock > max) {\r\n isTrue = false;\r\n alertDisplay(4);\r\n }\r\n\r\n return isTrue;\r\n }",
"private void validationInt(List<Integer> list) {\n\t\tint i=0;\n\t\tfor(i=0;i<list.size();i++) {\n\t\t\tif(!(list.get(i) > 0)){\n\t\t\t\tthrow new IntValueLessOneException(list.get(i));\n\t\t\t}\n\t\t}\n\t}",
"public static void isValid(int i) throws IllegalArgumentException {\n\t//nothing to do here\n }",
"public static boolean isValidModuleId(String test) {\n return test.matches(VALIDATION_REGEX);\n }",
"public boolean rangeCheck(int index) {\n\t\tif (index >= 0 && index <= 7) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"static boolean isValid (int n) {\n\t\t\tString temp = \"\" + n;\n\t\t\t\n\t\t\tfor(int i = 0; i < (n+\"\").length(); i++) {\n\t\t\t\n\t\t\t\tString c = \"\" + temp.charAt(i);\n\t\t\t\tif(!line.contains(c))\n\t\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t}\n\t\t\treturn true;\n\t\t}",
"@Test\n\tpublic void invalidLengthLong() {\n\t\tboolean result = validator.isValid(\"73102851691\");\n\t\tassertFalse(result);\n\t}",
"public interface IdValidation {\n\n /**\n * Method return validity of citizen id\n * @return true if algorithm checksum is equal to checksum of citizen id\n */\n boolean isValid();\n}",
"private boolean hasErroIdade(String idade) {\r\n\t\terroIdade.setText(\"\");\r\n\t\terroIdade.setFont(new Font(\"Arial\", Font.BOLD, 12));\r\n\t\terroIdade.setBounds(150, 307, 250, 14);\r\n\t\terroIdade.setForeground(Color.RED);\r\n\r\n\t\tif (!Validacao.validaInt(idade)) {\r\n\t\t\terroIdade.setText(\"Deve conter apenas numeros\");\r\n\t\t\treturn true;\r\n\t\t} else if (!Validacao.validaIdade(idade)) {\r\n\t\t\terroIdade.setText(\"Nao pode ser maior que 150\");\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\terroIdade.setText(\"Idade Valida!\");\r\n\t\t\terroIdade.setForeground(Color.BLUE);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"private void checkHexnumber(String add,String errorMsg) throws NotHexNumber{\n\t\tint subIndex=0;\n\t\tif(add.substring(0,2).equals(\"0x\")){\n\t\t\tsubIndex=2;\n\t\t}\n\t\tif(add.substring(subIndex).matches(\"^[0-9A-Fa-f]+$\")==false){\n\t\t\tthrow new NotHexNumber(\"NotHexNumber.\"+errorMsg);\n\t\t}\t\t\n\t}",
"public abstract boolean isValid(DMYcount DMYcount);",
"public void textFieldValidator(KeyEvent event) {\n TextFieldLimited source =(TextFieldLimited) event.getSource();\n if (source.equals(partId)) {\n isIntegerValid(event);\n } else if (source.equals(maximumInventory)) {\n isIntegerValid(event);\n } else if (source.equals(partName)) {\n isCSVTextValid(event);\n } else if (source.equals(inventoryCount)) {\n isIntegerValid(event);\n } else if (source.equals(minimumInventory)) {\n isIntegerValid(event);\n } else if (source.equals(variableTextField)) {\n if (inHouse.isSelected()) {\n isIntegerValid(event);;\n } else {\n isCSVTextValid(event);\n }\n } else if (source.equals(partPrice)) {\n isDoubleValid(event);\n } else return;\n }",
"private boolean isValidManagerIds(List<Employee> employees) {\n // if an employee's manager id refers to his own employee id, then this is invalid\n if (employees.stream().filter(e -> e.getEmployeeId().equals(e.getManagerId())).count()!=0)\n return false;\n\n List<Integer> employeeIds = employees.stream()\n .mapToInt(Employee::getEmployeeId)\n .boxed().collect(Collectors.toList());\n List<Integer> managerIds = employees.stream()\n .filter(Employee::hasManager)\n .mapToInt(Employee::getManagerId).distinct()\n .boxed().collect(Collectors.toList());\n //check if there's a manager id that is not one of the employees\n return employeeIds.containsAll(managerIds);\n }",
"private boolean isIsbn10(String code) {\n return checkDigit(code, 10);\n }",
"public static boolean isValidInt(String s)\n {\n for (int i = 0; i < s.length(); i++)\n {\n if (!Character.isDigit(s.charAt(i)))\n {\n return false;\n }\n }\n return true;\n }",
"@org.junit.Test\r\n public void testPositiveScenario() {\n boolean result = Validation.validateSAPhoneNumber(\"+27712612199\");// function should return true\r\n assertEquals(true, result);\r\n\r\n }",
"public void VerifySkuPageItemNumber(String ItemNumber){\r\n\t\tString itemNumber = getValue(ItemNumber);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- SKU Page Item Number is verified\");\r\n\t\ttry{\r\n\r\n\t\t\tif(getAndVerifyPartialText(locator_split(\"txtSkuItemnumber\"),itemNumber)) { \r\n\t\t\t\twaitForPageToLoad(20);\r\n\t\t\t}\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- SKU Page Displayed\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- SKU Page is not displayed \"+elementProperties.getProperty(\"txtSkuItemnumber\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \" + elementProperties.getProperty(\"txtSkuItemnumber\").toString().replace(\"By.\", \" \") + \" not found\");\r\n\t\t}\r\n\t}",
"public void setId(long id) throws InvalidIdException {\n// System.out.println(\"Id passed is: \" + id);\n // Check if the ID is within range\n if(id >= MINIMUM_ID_NUMBER && id <= MAXIMUM_ID_NUMBER) {\n \n // Set this value to the attribtue\n this.id = id;\n } else { // If not\n \n // Then throw error and display error message.\n throw new InvalidIdException(\"Employee ID must be between \" + \n MINIMUM_ID_NUMBER + \" and \" + MAXIMUM_ID_NUMBER);\n } \n }",
"private boolean validateCyl(int inCyl)\n {\n return ( (inCyl >= 2) && (inCyl <= 20) );\n }"
]
| [
"0.61948365",
"0.596552",
"0.5905156",
"0.58927876",
"0.5874114",
"0.56741613",
"0.56349355",
"0.561663",
"0.5615488",
"0.56101143",
"0.56101143",
"0.55675757",
"0.5564238",
"0.55611897",
"0.5520083",
"0.5516696",
"0.5501152",
"0.54864",
"0.547726",
"0.54445094",
"0.54368484",
"0.54365313",
"0.5407569",
"0.5392847",
"0.53610265",
"0.53549993",
"0.53497535",
"0.53387415",
"0.5322097",
"0.53106755",
"0.52903664",
"0.52832",
"0.5266997",
"0.5262754",
"0.52574736",
"0.5255263",
"0.5250218",
"0.5249975",
"0.5247995",
"0.5229222",
"0.522599",
"0.52126116",
"0.5207481",
"0.5205341",
"0.519844",
"0.5187315",
"0.51658034",
"0.5146439",
"0.5145815",
"0.51441",
"0.5141548",
"0.5129269",
"0.511587",
"0.5114466",
"0.511287",
"0.51060337",
"0.50931245",
"0.5092811",
"0.5090255",
"0.5083272",
"0.5076132",
"0.50709784",
"0.50646347",
"0.5056349",
"0.50516915",
"0.5041642",
"0.50388867",
"0.5030387",
"0.5026752",
"0.50259966",
"0.5024986",
"0.50220144",
"0.5020785",
"0.50055337",
"0.50052387",
"0.49944007",
"0.4970277",
"0.49681252",
"0.49622917",
"0.49430686",
"0.49321887",
"0.49314484",
"0.49301332",
"0.49292594",
"0.4912892",
"0.49086204",
"0.49022198",
"0.48945156",
"0.4887744",
"0.4881413",
"0.48759434",
"0.48756498",
"0.48753458",
"0.4872777",
"0.48676726",
"0.48674557",
"0.48603547",
"0.48601356",
"0.48543927",
"0.48523912"
]
| 0.7388896 | 0 |
Empty stub as instructed in Step 8.2 | @Override
public void recordOrder(int customerID, int furnitureItemID, int quantity) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Stub createStub();",
"public ArrivalQuayStub() {\n\t}",
"public void clear() {\n/* 41 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void reset() {\n/* 277 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public interface IOngoingStubbing {}",
"@Stub\n\tpublic void init()\n\t{\n\t\t//\n\t}",
"public Stub()\n {\n this.attachInterface(this, DESCRIPTOR);\n }",
"public Stub()\n {\n this.attachInterface(this, DESCRIPTOR);\n }",
"public Stub()\n {\n this.attachInterface(this, DESCRIPTOR);\n }",
"public Stub()\n {\n this.attachInterface(this, DESCRIPTOR);\n }",
"public Stub()\n {\n this.attachInterface(this, DESCRIPTOR);\n }",
"protected CodeStub() {\n entry = new Label();\n continuation = new Label();\n }",
"public Builder clear() {\n/* 1706 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public Stub() {\n this.attachInterface(this, DESCRIPTOR);\n }",
"public Stub() {\n this.attachInterface(this, DESCRIPTOR);\n }",
"private OpenAll() {\n throw new RuntimeException(\"Stub!\");\n }",
"public int describeContents() {\n/* 1781 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"private Mocks() { }",
"public void start() {\n/* 255 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public _AccountStub ()\n {\n super ();\n }",
"@Stub\n\tpublic void before()\n\t{\n\t\t//\n\t}",
"zzafe mo29840Y() throws RemoteException;",
"public int describeContents() {\n/* 48 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public Stub() {\n attachInterface(this, DESCRIPTOR);\n }",
"public void selectAll() {\n/* 101 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public ApplicationStub() {\n }",
"public _CodeBaseStub()\n {\n super();\n }",
"public static void dummyTest(){}",
"public static void dummyTest(){}",
"@MatchStatement\r\n public T stub() {\r\n MatchingInvocationHandler matchingInvocationHandler = createAlwaysMatchingBehaviorDefiningMatchingInvocationHandler(new StubMockBehavior());\r\n return startMatchingInvocation(matchingInvocationHandler);\r\n }",
"public _CodeBaseStub ()\n {\n super ();\n }",
"public void testCheckOxyEmpty() {\n }",
"public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}",
"public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}",
"public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}",
"public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}",
"public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}",
"public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}",
"public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}",
"public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}",
"public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}",
"public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}",
"public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}",
"public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}",
"public ULocale build() {\n/* 1725 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Override\n\tpublic Response init(ChaincodeStub stub) {\n\t\ttry {\n\t\t\t_logger.info(\"=========== Instantiated fabcar chaincode ===========\");\n\t\t\treturn newSuccessResponse();\n\t\t}\n\t\tcatch (Throwable e) {\n\t\t\treturn newErrorResponse(e);\n\t\t}\n\t}",
"IMember getServerStub();",
"public int getObjectHandle() {\n/* 72 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void testReset() {\n\t}",
"zzana mo29855eb() throws RemoteException;",
"public int getEventCode() {\n/* 41 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public SingleOperationMarshallingTest() {\n }",
"public void testDummy() {\n }",
"public void testDummy() {\n }",
"public void open() {\n/* 157 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void performValidation() {\n/* 623 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public Builder clearExtensions() {\n/* 1716 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void mo38850q() {\n }",
"public void mock(){\n\n }",
"public boolean refresh() {\n/* 153 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public String getName() {\n/* 341 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"private void prepareNoResponse() {\n when(mSentenceDataRepository.getTodaysSentenceResponse()).thenReturn(null);\n }",
"public void recycle() {\n/* 1835 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void testDummy()\n {\n }",
"public IStubProvider getStubProvider();",
"public void mo115190b() {\n }",
"public void emitStub() throws CodeGenerationException {\n try {\n //write interface implementations\n //for the html clients we are only generating the\n //the stub\n writeInterfaceImplementation();\n } catch (Exception e) {\n throw new CodeGenerationException(e);\n }\n }",
"zzang mo29839S() throws RemoteException;",
"public void doNothing(){\n\t}",
"@org.junit.Test(timeout = 10000)\n public void testEmptyFoo_add21626() throws java.lang.Exception {\n java.util.ArrayList<io.protostuff.Foo> foos = new java.util.ArrayList<io.protostuff.Foo>();\n foos.add(new io.protostuff.Foo());\n foos.add(new io.protostuff.Foo());\n java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream();\n // AssertGenerator replace invocation\n int o_testEmptyFoo_add21626__9 = // MethodCallAdder\nwriteListTo(out, foos, io.protostuff.SerializableObjects.foo.cachedSchema());\n // AssertGenerator add assertion\n org.junit.Assert.assertEquals(o_testEmptyFoo_add21626__9, 3);\n writeListTo(out, foos, io.protostuff.SerializableObjects.foo.cachedSchema());\n byte[] data = out.toByteArray();\n java.io.ByteArrayInputStream in = new java.io.ByteArrayInputStream(data);\n java.util.List<io.protostuff.Foo> parsedFoos = parseListFrom(in, io.protostuff.SerializableObjects.foo.cachedSchema());\n junit.framework.TestCase.assertTrue(((parsedFoos.size()) == (foos.size())));\n int i = 0;\n for (io.protostuff.Foo f : parsedFoos)\n io.protostuff.SerializableObjects.assertEquals(foos.get((i++)), f);\n \n }",
"public int getParameter1() {\n/* 47 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void testBlah() {\n // nothing\n }",
"private void setupStubs() {\n wireMockServer.stubFor(get(urlEqualTo(BRITISH_LONG_HAIR))\n .willReturn(aResponse().withHeader(\"Content-Type\", \"application-json\")\n .withStatus(200)\n .withBodyFile(\"json/british-long-hair.json\")));\n }",
"void mo13026b() throws RemoteException;",
"public void end() {\n/* 179 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public static ULocale getDefault() {\n/* 160 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@org.junit.Test(timeout = 10000)\n public void testEmptyList_add41324() throws java.lang.Exception {\n java.util.ArrayList<io.protostuff.Foo> foos = new java.util.ArrayList<io.protostuff.Foo>();\n java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream();\n // AssertGenerator replace invocation\n int o_testEmptyList_add41324__5 = // MethodCallAdder\nwriteListTo(out, foos, io.protostuff.SerializableObjects.foo.cachedSchema());\n // AssertGenerator add assertion\n org.junit.Assert.assertEquals(o_testEmptyList_add41324__5, 0);\n writeListTo(out, foos, io.protostuff.SerializableObjects.foo.cachedSchema());\n byte[] data = out.toByteArray();\n java.io.ByteArrayInputStream in = new java.io.ByteArrayInputStream(data);\n java.util.List<io.protostuff.Foo> parsedFoos = parseListFrom(in, io.protostuff.SerializableObjects.foo.cachedSchema());\n junit.framework.TestCase.assertTrue(((parsedFoos.size()) == (foos.size())));\n int i = 0;\n for (io.protostuff.Foo f : parsedFoos)\n io.protostuff.SerializableObjects.assertEquals(foos.get((i++)), f);\n \n }",
"public void performCompletion() {\n/* 536 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"void stubNextResponse(HttpExecuteResponse nextResponse);",
"public XpeDccNewContractSetupROVORowImpl() {\n }",
"public Object clone() {\n/* 176 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"zzand mo29852bb() throws RemoteException;",
"@Test\n void sayHelloWithoutName() {\n StepVerifier.create(newControllerTwoClient().sayHello(null))\n .assertNext(response -> assertEquals(\"Hello Tom\", response))\n .expectNextCount(0)\n .verifyComplete();\n }",
"public static void doNothing(){\n\t}",
"public final void mo8775b() {\n }",
"@Test\n void emptyingTest(){\n Container container = new Container();\n container.fillContainer(Resource.SHIELD);\n container.takeResource();\n assertTrue(container.isEmpty());\n }",
"public UUID getUuid() {\n/* 78 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public final void mo1285b() {\n }",
"public void test_VoidCase() throws Exception {\n\t\tinit(null) ;\n\t\tNamedQueryRepository named = factory.createRepository(notifier) ;\t\t\n\t\trepo = factory.createRepository(named) ;\n\t\trepo.initialize() ;\n\t\t\n\t\tassertTrue(repo == named) ;\n\t\tfunctionalTest();\n\t}",
"public final void mo51373a() {\n }",
"public ULocale(String a, String b, String c) {\n/* 125 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Test\n public void shouldCreateEmptyContract() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.emptyContract();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n }",
"public void mo5251b() {\n }",
"@Test\n public void TestHandleEmptyHandler() {\n final HandlerExecutor handlerExecutor = getExecutor();\n\n final HandlerResult result = handlerExecutor.handle(new VoiceRequest(\"123456789\", 99L, \"whatever\", \"\"));\n assertEquals(result.handlerType, HandlerType.NONE);\n }",
"@Override\r\n\tpublic Response invoke() {\n\t\treturn null;\r\n\t}",
"public void mo21825b() {\n }",
"private MockarooPingHelper(){}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }"
]
| [
"0.70646244",
"0.676479",
"0.67376626",
"0.6694609",
"0.66458017",
"0.642528",
"0.6379924",
"0.6379924",
"0.6379924",
"0.6379924",
"0.6379924",
"0.63391733",
"0.63233",
"0.62456745",
"0.62456745",
"0.6244214",
"0.6235842",
"0.62204915",
"0.6203282",
"0.61909854",
"0.61700207",
"0.6164718",
"0.6110358",
"0.610494",
"0.6088429",
"0.6078093",
"0.60620075",
"0.6038495",
"0.6038495",
"0.60351044",
"0.6034576",
"0.6019261",
"0.6017754",
"0.6017754",
"0.6017754",
"0.6017754",
"0.6017754",
"0.6017754",
"0.6017754",
"0.6017754",
"0.6017754",
"0.6017754",
"0.6017754",
"0.6017754",
"0.60105926",
"0.59989715",
"0.5998308",
"0.59509003",
"0.5918316",
"0.5913412",
"0.59115446",
"0.5910126",
"0.5888097",
"0.5847126",
"0.584653",
"0.583557",
"0.5833522",
"0.58126736",
"0.5803056",
"0.5799798",
"0.57949513",
"0.5790456",
"0.5788901",
"0.5783094",
"0.57788265",
"0.5774427",
"0.5772712",
"0.575066",
"0.5742865",
"0.57417256",
"0.57330877",
"0.5728245",
"0.5727797",
"0.57181996",
"0.5712188",
"0.5705439",
"0.570508",
"0.57033366",
"0.57018584",
"0.56856745",
"0.56802696",
"0.5679689",
"0.5671243",
"0.5657651",
"0.56542075",
"0.56490934",
"0.56438774",
"0.56383795",
"0.5620325",
"0.56194615",
"0.56133157",
"0.56074774",
"0.560173",
"0.55961573",
"0.559198",
"0.558539",
"0.55833644",
"0.5577421",
"0.5577421",
"0.5577421",
"0.5577421"
]
| 0.0 | -1 |
Handling validate function if objects are passed as parameters instead of integers | public boolean validateFurnitureItem(Object object) {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void validate(T object);",
"protected abstract Object validateParameter(Object constraintParameter);",
"@Override\n\tpublic void validate(Object arg0, Errors arg1) {\n\n\t}",
"private void validateUserObject(User user) {\n }",
"private void validateInputParameters(){\n\n }",
"public abstract Value validateValue(Value value);",
"@Override\n public void validate(Map<String, String[]> parameters) {\n final String itemId = parameters.get(ITEM_ID)[0];\n final String amount = parameters.get(AMOUNT)[0];\n commonValidator.validateLong(itemId);\n commonValidator.validateFloat(amount);\n }",
"protected void validateValue(T value) {\n }",
"public IValidationResult isValid(T object);",
"private void validateUserObject(User user) {\n }",
"@Override\n public void validate(Object o, Errors errors)\n {\n ParametersSelectedForTourPackages parametersSelectedForTourPackages = (ParametersSelectedForTourPackages) o;\n String minDay = parametersSelectedForTourPackages.getMinDay();\n String maxDay = parametersSelectedForTourPackages.getMaxDay();\n\n if (minDay != null && maxDay != null\n && !minDay.isEmpty() && !maxDay.isEmpty()\n && Integer.parseInt(minDay) > Integer.parseInt(maxDay))\n {\n errors.rejectValue(\"minDay\", \"illegal.range.days\");\n }\n\n String minPrice = parametersSelectedForTourPackages.getMinPrice();\n String maxPrice = parametersSelectedForTourPackages.getMaxPrice();\n\n if (minPrice != null && maxPrice != null\n && !minPrice.isEmpty() && !maxPrice.isEmpty()\n && Integer.parseInt(minPrice) > Integer.parseInt(maxPrice))\n {\n errors.rejectValue(\"minPrice\", \"illegal.range.prices\");\n }\n }",
"@Override\n\tprotected void validateParameterValues() {\n\t\t\n\t}",
"protected void validateAttenuator(int[] param) {\n }",
"public static void validate(Object obj) {\n try {\n getMonitorTags(obj);\n } catch (Exception e) {\n throw new IllegalArgumentException(\n \"invalid MonitorTags annotation on object \" + obj, e);\n }\n\n List<AnnotatedAttribute> attrs = getMonitoredAttributes(obj);\n if (attrs.isEmpty()) {\n throw new IllegalArgumentException(\n \"no Monitor annotations on object \" + obj);\n }\n String ctype = obj.getClass().getCanonicalName();\n for (AnnotatedAttribute attr : attrs) {\n Monitor m = attr.getAnnotation();\n Object value = null;\n try {\n value = attr.getValue();\n } catch (Exception e) {\n throw new IllegalArgumentException(\n \"failed to get value for \" + m + \" on \" + ctype, e);\n }\n\n if (m.type() != DataSourceType.INFORMATIONAL) {\n String vtype = (value == null)\n ? null\n : value.getClass().getCanonicalName();\n Number n = asNumber(value);\n if (n == null) {\n throw new IllegalArgumentException(\n \"expected java.lang.Number, but received \" + vtype +\n \" for \" + m + \" on \" + ctype);\n }\n }\n }\n }",
"@Override\n public void accept(T value) throws ValidationException {\n if (value == null) {\n return;\n }\n\n NumberConstraint constraint = null;\n\n if (value instanceof Number) {\n constraint = getNumberConstraint((Number) value);\n } else if (value instanceof String) {\n try {\n Datatype datatype = datatypeRegistry.get(BigDecimal.class);\n Locale locale = currentAuthentication.getLocale();\n BigDecimal bigDecimal = (BigDecimal) datatype.parse((String) value, locale);\n if (bigDecimal == null) {\n fireValidationException(value);\n }\n constraint = getNumberConstraint(bigDecimal);\n } catch (ParseException e) {\n throw new ValidationException(e.getLocalizedMessage());\n }\n }\n\n if (constraint == null\n || value instanceof Double\n || value instanceof Float) {\n throw new IllegalArgumentException(\"DigitsValidator doesn't support following type: '\" + value.getClass() + \"'\");\n }\n\n if (!constraint.isDigits(integer, fraction)) {\n fireValidationException(value);\n }\n }",
"public void checkTypeValid(List<Object> types) {\n if(types.size() != inputs.size()) {\n throw new IllegalArgumentException(\"Not matched passed parameter count.\");\n }\n }",
"protected void validateItem(Item[] param) {\r\n }",
"private void validate() {\n\n if (this.clsname == null)\n throw new IllegalArgumentException();\n if (this.dimension < 0)\n throw new IllegalArgumentException();\n if (this.generics == null)\n throw new IllegalArgumentException();\n }",
"@Override\r\n\tpublic boolean validate(Object object) {\n\t\treturn this.validate(object);\r\n\t}",
"private void validateUserObject(User user) {\n\t }",
"public boolean validate(Object o){\r\n\t\treturn false;\r\n\t}",
"public void validate() {}",
"int validate(ValidationContext ctx) {\n\t\tint count = 0;\n\t\tif (this.name == null) {\n\t\t\tctx.addError(\n\t\t\t\t\t\"Parameter has to have a name. This need not be the same as the one in the db though.\");\n\t\t\tcount++;\n\t\t}\n\t\tcount += ctx.checkDtExistence(this.dataType, \"dataType\", false);\n\t\tcount += ctx.checkRecordExistence(this.recordName, \"recordName\", false);\n\n\t\tif (this.defaultValue != null) {\n\t\t\tif (this.dataType == null) {\n\t\t\t\tthis.addError(ctx,\n\t\t\t\t\t\t\" is non-primitive but a default value is specified.\");\n\t\t\t\tcount++;\n\t\t\t} else {\n\t\t\t\tDataType dt = ComponentManager.getDataTypeOrNull(this.dataType);\n\t\t\t\tif (dt != null && dt.parseValue(this.defaultValue) == null) {\n\t\t\t\t\tthis.addError(ctx, \" default value of \" + this.defaultValue\n\t\t\t\t\t\t\t+ \" is invalid as per dataType \" + this.dataType);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.recordName != null) {\n\t\t\tif (this.dataType != null) {\n\t\t\t\tthis.addError(ctx,\n\t\t\t\t\t\t\" Both dataType and recordName specified. Use dataType if this is primitive type, or record if it as array or a structure.\");\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tif (this.sqlObjectType == null) {\n\t\t\t\tthis.addError(ctx,\n\t\t\t\t\t\t\" recordName is specified which means that it is a data-structure. Please specify sqlObjectType as the type of this parameter in the stored procedure\");\n\t\t\t}\n\t\t} else {\n\t\t\tif (this.dataType == null) {\n\t\t\t\tthis.addError(ctx,\n\t\t\t\t\t\t\" No data type or recordName specified. Use dataType if this is primitive type, or record if it as an array or a data-structure.\");\n\t\t\t\tcount++;\n\t\t\t} else if (this.sqlObjectType != null) {\n\t\t\t\tctx.addError(\n\t\t\t\t\t\t\"sqlObjectType is relevant only if this parameter is non-primitive.\");\n\t\t\t}\n\n\t\t}\n\n\t\tif (this.isArray) {\n\t\t\tif (this.sqlArrayType == null) {\n\t\t\t\tthis.addError(ctx,\n\t\t\t\t\t\t\" is an array, and hence sqlArrayType must be specified as the type with which this parameter is defined in the stored procedure\");\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\treturn count;\n\t}",
"public interface FieldValidator {\n static boolean validateStringIfPresent(Object o, int len) {\n return o == null || o instanceof String && !((String) o).isEmpty() && ((String) o).length() < len;\n }\n\n static boolean validateString(Object o, int len) {\n return !(o == null || !(o instanceof String) || ((String) o).isEmpty() || (((String) o).length() > len));\n }\n\n static boolean validateInteger(Object o) {\n if (o == null) {\n return false;\n }\n try {\n Integer.valueOf(o.toString());\n } catch (NumberFormatException e) {\n return false;\n }\n return true;\n }\n\n static boolean validateDateWithFormat(Object o, DateTimeFormatter formatter, boolean allowedInPast) {\n if (o == null) {\n return false;\n }\n try {\n LocalDate date = LocalDate.parse(o.toString(), formatter);\n if (!allowedInPast) {\n return date.isAfter(LocalDate.now());\n }\n } catch (DateTimeParseException e) {\n return false;\n }\n return true;\n }\n\n static boolean validateJsonIfPresent(Object o) {\n return o == null || o instanceof JsonObject && !((JsonObject) o).isEmpty();\n }\n\n static boolean validateJson(Object o) {\n return !(o == null || !(o instanceof JsonObject) || ((JsonObject) o).isEmpty());\n }\n\n static boolean validateJsonArrayIfPresent(Object o) {\n return o == null || o instanceof JsonArray && !((JsonArray) o).isEmpty();\n }\n\n static boolean validateJsonArray(Object o) {\n return !(o == null || !(o instanceof JsonArray) || ((JsonArray) o).isEmpty());\n }\n\n static boolean validateDeepJsonArrayIfPresent(Object o, FieldValidator fv) {\n if (o == null) {\n return true;\n } else if (!(o instanceof JsonArray) || ((JsonArray) o).isEmpty()) {\n return false;\n } else {\n JsonArray array = (JsonArray) o;\n for (Object element : array) {\n if (!fv.validateField(element)) {\n return false;\n }\n }\n }\n return true;\n }\n\n static boolean validateDeepJsonArray(Object o, FieldValidator fv) {\n if (o == null || !(o instanceof JsonArray) || ((JsonArray) o).isEmpty()) {\n return false;\n }\n JsonArray array = (JsonArray) o;\n for (Object element : array) {\n if (!fv.validateField(element)) {\n return false;\n }\n }\n return true;\n }\n\n static boolean validateBoolean(Object o) {\n return o != null && o instanceof Boolean;\n }\n\n static boolean validateBooleanIfPresent(Object o) {\n return o == null || o instanceof Boolean;\n }\n\n static boolean validateUuid(Object o) {\n try {\n UUID uuid = UUID.fromString((String) o);\n return true;\n } catch (IllegalArgumentException e) {\n return false;\n }\n }\n\n static boolean validateUuidIfPresent(String o) {\n return o == null || validateUuid(o);\n }\n\n boolean validateField(Object value);\n\n Pattern EMAIL_PATTERN =\n Pattern.compile(\"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\");\n\n static boolean validateEmail(Object o) {\n Matcher matcher = EMAIL_PATTERN.matcher((String) o);\n return matcher.matches();\n }\n}",
"@Override\n\tpublic void validate(CarRegistrationNumber object) {\n\t}",
"private static void validate(final Object object) {\n if (object instanceof Object[]) {\n final Object[] array = (Object[]) object;\n for (int idx = 1; idx < array.length; ++idx) {\n SameDimensionCheck.validate(array[0], array[idx]);\n }\n }\n }",
"void validate();",
"void validate();",
"protected void validateFact(Fact[] param) {\r\n\r\n }",
"protected void validatePreamp(int[] param) {\n }",
"public abstract FieldReport validate(int fieldSequence, Object fieldValue);",
"private void validateData() {\n }",
"protected void validatePetModel(PetModel[] param) {\n }",
"protected void validateAnimalModel(AnimalModel[] param) {\n }",
"public void validate(Object obj, Errors arg1) {\n\t\tForumInfo f=(ForumInfo)obj;\n\t}",
"@Override\n public <T> List<ObjectError> validate(T dto, Validator validator) {\n DataBinder binder = getDataBinder(dto, validator);\n binder.validate();\n return getValidationErrors(binder.getBindingResult());\n }",
"private static void validate(int type, int field, int match, String value) {\n if ((type != Type.SONG) && (field == Field.PLAY_COUNT || field == Field.SKIP_COUNT)) {\n throw new IllegalArgumentException(type + \" type does not have field \" + field);\n }\n // Only Songs have years\n if (type != Type.SONG && field == Field.YEAR) {\n throw new IllegalArgumentException(type + \" type does not have field \" + field);\n }\n // Only Songs have dates added\n if (type != Type.SONG && field == Field.DATE_ADDED) {\n throw new IllegalArgumentException(type + \" type does not have field \" + field);\n }\n\n if (field == Field.ID) {\n // IDs can only be compared by equals or !equals\n if (match == Match.CONTAINS || match == Match.NOT_CONTAINS\n || match == Match.LESS_THAN || match == Match.GREATER_THAN) {\n throw new IllegalArgumentException(\"ID cannot be compared by method \" + match);\n }\n // Make sure the value is actually a number\n try {\n //noinspection ResultOfMethodCallIgnored\n Long.parseLong(value);\n } catch (NumberFormatException e) {\n Crashlytics.logException(e);\n throw new IllegalArgumentException(\"ID cannot be compared to value \" + value);\n }\n } else if (field == Field.NAME) {\n // Names can't be compared by < or >... that doesn't even make sense...\n if (match == Match.GREATER_THAN || match == Match.LESS_THAN) {\n throw new IllegalArgumentException(\"Name cannot be compared by method \"\n + match);\n }\n } else if (field == Field.SKIP_COUNT || field == Field.PLAY_COUNT\n || field == Field.YEAR || field == Field.DATE_ADDED) {\n // Numeric values can't be compared by contains or !contains\n if (match == Match.CONTAINS || match == Match.NOT_CONTAINS) {\n throw new IllegalArgumentException(field + \" cannot be compared by method \"\n + match);\n }\n // Make sure the value is actually a number\n try {\n //noinspection ResultOfMethodCallIgnored\n Long.parseLong(value);\n } catch (NumberFormatException e) {\n Crashlytics.logException(e);\n throw new IllegalArgumentException(\"ID cannot be compared to value \" + value);\n }\n }\n }",
"abstract Object getValue (String str, ValidationContext vc) throws DatatypeException;",
"@Override\n\tpublic void validate()\n\t{\n\n\t}",
"public void validate(DataRecord value) {\n\r\n\t}",
"public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}",
"public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}",
"public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}",
"public boolean validateValue(Object value) {\n return true;\n }",
"public abstract ValidationResults validArguments(String[] arguments);",
"@Override\n\tpublic void validate(Object obj, Errors errors) {\n\t\tReservationCommand command = (ReservationCommand)obj; \n\t\tReservation reservation = command.getReservation();\n\t\t\n\t\tValidationUtils.rejectIfEmptyOrWhitespace(errors, \"reservation.numOfPeople\", \"NUMOFPEOPLE_REQUIRED\", \"num of people is required.\");\n\t\tValidationUtils.rejectIfEmptyOrWhitespace(errors, \"reservation.visit_date\", \"VISIT_DATE_REQUIRED\", \"visit date is required.\");\n\t\tValidationUtils.rejectIfEmptyOrWhitespace(errors, \"reservation.visit_time\", \"VISIT_TIME_REQUIRED\", \"visit time is required.\");\n\t\tValidationUtils.rejectIfEmptyOrWhitespace(errors, \"reservation.name\", \"NAME_REQUIRED\", \"name is required.\");\n\t\tValidationUtils.rejectIfEmptyOrWhitespace(errors, \"reservation.phone\", \"PHONE_REQUIRED\", \"Phone number is required.\");\n\n\t\t\n\t}",
"@Override\r\n public void validate() {\r\n }",
"String validate(T newValue);",
"public void validate(Object obj, Errors errors)\n {\n User user = (User) obj;\n //errors.rejectValue(\"userName\", \"error.userName.required\",\"User name or password incorrect!\");\n ValidationUtils.rejectIfEmptyOrWhitespace(errors, \"userName\", \"error.invalid.name\", \"UserName Required\");\n ValidationUtils.rejectIfEmptyOrWhitespace(errors, \"passWord\", \"error.invalid.password\", \"Password Required\");\n \n UserDAO userDao = new UserDAO();\n try {\n User temp = userDao.get(user.getUserName(), user.getPassWord());\n if(temp == null){\n errors.rejectValue(\"userName\", \"error.userName.required\",\"User name or password incorrect!\");\n }\n } catch (AdException ex) {\n Logger.getLogger(MyAccountValidator.class.getName()).log(Level.SEVERE, null, ex);\n errors.rejectValue(\"userName\", \"error.userName.required\",\"User or password incorrect!\");\n }\n userDao.close();\n }",
"@Override\r\n\tpublic boolean validaObj() {\n\t\treturn false;\r\n\t}",
"void validate(T entity) throws ValidatorException;",
"@Override\n public int validate(Object object, Object value, Errors errors) {\n AMEEUnitType thisUnitType = (AMEEUnitType) object;\n if (thisUnitType != null) {\n if (!unitService.isUnitTypeUniqueByName(thisUnitType)) {\n errors.rejectValue(\"name\", \"duplicate\");\n }\n }\n return ValidationSpecification.CONTINUE;\n }",
"public abstract void validate(String value) throws DatatypeException;",
"@Override\n\tpublic void validate() {\n\t}",
"public String validate(Data[] data);",
"public void validate(ParseTreeContext context) {\r\n Object leftType = null;\r\n TypeHelper typeHelper = context.getTypeHelper();\r\n\r\n if (left != null) {\r\n left.validate(context);\r\n // check to see if the argument is a parameter\r\n if (isListParameterOrSubquery && !getTheObjects().isEmpty() && ((Node)getTheObjects().get(0)).isParameterNode()){\r\n leftType = Collection.class;\r\n } else {\r\n leftType = left.getType();\r\n }\r\n }\r\n for (Iterator i = getTheObjects().iterator(); i.hasNext();) {\r\n Node node = (Node)i.next();\r\n node.validate(context);\r\n node.validateParameter(context, leftType);\r\n Object nodeType = node.getType();\r\n if ((leftType != null) && !typeHelper.isAssignableFrom(leftType, nodeType))\r\n throw JPQLException.invalidExpressionArgument(\r\n context.getQueryInfo(), node.getLine(), node.getColumn(),\r\n \"IN\", node.getAsString(), typeHelper.getTypeName(leftType));\r\n }\r\n\r\n setType(typeHelper.getBooleanType());\r\n }",
"@Override\n public void accept(T value) throws ValidationException {\n if (value == null) {\n return;\n }\n\n NumberConstraint constraint = null;\n\n if (value instanceof Number) {\n constraint = getNumberConstraint((Number) value);\n } else if (value instanceof String) {\n try {\n Datatype datatype = datatypeRegistry.getNN(BigDecimal.class);\n Locale locale = userSessionSource.getUserSession().getLocale();\n BigDecimal bigDecimal = (BigDecimal) datatype.parse((String) value, locale);\n if (bigDecimal == null) {\n fireValidationException(value);\n }\n constraint = getNumberConstraint(bigDecimal);\n } catch (ParseException e) {\n throw new ValidationException(e.getLocalizedMessage());\n }\n }\n\n if (constraint == null\n || value instanceof Double\n || value instanceof Float) {\n throw new IllegalArgumentException(\"DecimalMinValidator doesn't support following type: '\" + value.getClass() + \"'\");\n }\n\n if (!constraint.isDecimalMin(min, inclusive)) {\n fireValidationException(value);\n }\n }",
"public abstract boolean validate();",
"protected abstract int isValidInput();",
"@Override\r\n\tpublic void validate() {\n\t\t\r\n\t}",
"protected static void checkValue(Object value) {\n\tif (!(value instanceof java.lang.Long)) {\n throw new IllegalArgumentException(\"value is not a Long\");\n }\n }",
"private void validateParameters(CustomMap<String, CustomList<String>> parameters) {\n /* Verify if the parameters are the students number. */\n if(parameters == null || parameters.size() > 3){\n errorValidator.addError(\"name\", \"This parameter must exist.\");\n errorValidator.addError(\"num\", \"This parameter must exist.\");\n errorValidator.addError(\"email\", \"This parameter must exist.\");\n return;\n }\n\n /* Verify if the parameters are correct. */\n CustomList nameAux = parameters.get(\"name\"), numAux = parameters.get(\"num\"), emailAux = parameters.get(\"email\");\n\n if(nameAux == null)\n errorValidator.addError(\"name\", \"This parameter must exist.\");\n\n if(numAux == null)\n errorValidator.addError(\"num\", \"This parameter must exist.\");\n\n if(emailAux == null)\n errorValidator.addError(\"email\", \"This parameter must exist.\");\n\n if(errorValidator.hasError())\n return;\n\n /* Verify num, pid email and name parameters type. */\n num = numAux.getVerifiedInt(0, errorValidator, \"num\");\n email = emailAux.getVerifiedString(0, errorValidator, \"email\");\n name = nameAux.getVerifiedString(0, errorValidator, \"name\");\n }",
"protected boolean isNumberValid(@NotNull ConversationContext context, @NotNull Number input) {\n/* 30 */ return true;\n/* */ }",
"public void validate( Object object, Object value )\n //throws MetaException\n {\n String mask = (String) getAttribute( ATTR_MASK );\n String msg = getMessage( \"Invalid value format\" );\n\n String val = (value==null)?null:value.toString();\n\n if ( !GenericValidator.isBlankOrNull( val )\n && !GenericValidator.matchRegexp( val, mask )) {\n throw new InvalidValueException( msg );\n }\n }",
"void validate() throws ValidationException;",
"public void validate() throws org.apache.thrift.TException {\n if (parseId == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'parseId' was not present! Struct: \" + toString());\n }\n // alas, we cannot check 'constituentIndex' because it's a primitive and you chose the non-beans generator.\n // check for sub-struct validity\n if (parseId != null) {\n parseId.validate();\n }\n }",
"public boolean validate(T t) throws Exception;",
"public IValidationResult isIdentityValid(T object);",
"boolean isValid(final Parameter... parameters);",
"ValidationResponse validate();",
"private ErrorCode checkParameters() {\n\t\t\n\t\t// Check Batch Size\n\t\ttry {\n\t\t\tInteger.parseInt(batchSizeField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.BatchSize;\n\t\t}\n\t\t\n\t\t// Check confidenceFactor\n\t\ttry {\n\t\t\tDouble.parseDouble(confidenceFactorField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.ConfidenceFactor;\n\t\t}\n\t\t\n\t\t// Check minNumObj\n\t\ttry {\n\t\t\tInteger.parseInt(minNumObjField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.MinNumObj;\n\t\t}\n\t\t\n\t\t// Check numDecimalPlaces\n\t\ttry {\n\t\t\tInteger.parseInt(numDecimalPlacesField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.NumDecimalPlaces;\n\t\t}\n\t\t\n\t\t// Check numFolds\n\t\ttry {\n\t\t\tInteger.parseInt(numFoldsField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.NumFolds;\n\t\t}\n\t\t\n\t\t// Check seed\n\t\ttry {\n\t\t\tInteger.parseInt(seedField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.Seed;\n\t\t}\n\t\t\n\t\treturn ErrorCode.Fine;\n\t\t\n\t}",
"public void validateInput(Information information) {\n information.validateFirstName();\n information.validateLastName();\n information.validateZipcode();\n information.validateEmployeeID();\n }",
"public void validate() throws org.apache.thrift.TException {\n if (type != null) {\n type.validate();\n }\n if (returnType != null) {\n returnType.validate();\n }\n }",
"@Override\n\tpublic boolean validate(Object value) {\n\t\treturn value instanceof GenericFunction\n\t\t\t\t&& ((GenericFunction) value).getType().canUnify(this);\n\t}",
"private void validationInt(List<Integer> list) {\n\t\tint i=0;\n\t\tfor(i=0;i<list.size();i++) {\n\t\t\tif(!(list.get(i) > 0)){\n\t\t\t\tthrow new IntValueLessOneException(list.get(i));\n\t\t\t}\n\t\t}\n\t}",
"private void validateTypes() {\r\n\t\tfor (int i = 0; i < types.length; i++) {\r\n\t\t\tString type = types[i];\r\n\t\t\tif (!TypedItem.isValidType(type))\r\n\t\t\t\tthrow new IllegalArgumentException(String.format(\"The monster type %s is invalid\", type));\r\n\t\t\tfor (int j = i + 1; j < types.length; j++) {\r\n\t\t\t\tif (type.equals(types[j])) {\r\n\t\t\t\t\tthrow new IllegalArgumentException(\"The monster cant have two similar types..\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"@Test\n\tpublic void validObjectShouldValidate() {\n\t\tT validObject = buildValid();\n\t\tAssertions.assertThat(isValid(validObject))\n\t\t\t\t.as(invalidMessage(validObject))\n\t\t\t\t.isTrue();\n\t}",
"public void validate(Object obj, Errors errors) {\n\t\t\n\t\tBooking booking = (Booking) obj;\n\t\t\n\t\tValidationUtils.rejectIfEmptyOrWhitespace(errors, \"aptNo\", \"error.invalid.aptNo\", \"Apartment Number Required\");\n ValidationUtils.rejectIfEmptyOrWhitespace(errors, \"street\", \"error.invalid.street\", \"Street Required\");\n ValidationUtils.rejectIfEmptyOrWhitespace(errors, \"city\", \"error.invalid.city\", \"City Required\");\n ValidationUtils.rejectIfEmptyOrWhitespace(errors, \"state\", \"error.invalid.state\", \"State Required\");\n ValidationUtils.rejectIfEmptyOrWhitespace(errors, \"zipCode\", \"error.invalid.zipCode\", \"Zipcode Required\");\n \n\t}",
"private boolean validateData() {\r\n TASKAggInfo agg = null;\r\n int index = aggList.getSelectedIndex();\r\n if (index != 0) {\r\n agg = (TASKAggInfo)aggregators.elementAt(aggList.getSelectedIndex()-1);\r\n }\r\n\r\n if (getArgument1() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Argument 1 must be of type: \"+TASKTypes.TypeName[agg.getArgType()], \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n else if (getArgument2() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Argument 2 must be of type: \"+TASKTypes.TypeName[agg.getArgType()], \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n else if (getOperand() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Filter value must be of type integer\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n return true;\r\n }",
"private void validateParameter(){\n\t\tif(hrNum > upperBound){\n\t\t\thrNum = upperBound;\n\t\t}\n\t\telse if(hrNum < lowerBound){\n\t\t\thrNum = lowerBound;\n\t\t}\n\t}",
"Integer validateDetail(String detail) throws DvdStoreException;",
"private static void checkConvertibility(JValue val, JType typ){\r\n\t\tJType argTyp = val.getType();\n\t\tif (argTyp == null) {\n\t\t\tif (!(typ == AnyType.getInstance() || typ.isObject())) {\n\t\t\t\tthrow new TypeIncompatibleException(JObjectType.getInstance(), typ);\n\t\t\t}\n\t\t} else {\n\t\t\tConvertibility conv = argTyp.getConvertibilityTo(typ);\n\t\t\tif(conv == Convertibility.UNCONVERTIBLE){\n\t\t\t\tthrow new TypeIncompatibleException(argTyp, typ);\n\t\t\t} else if (conv == Convertibility.UNSAFE && argTyp == AnyType.getInstance()){\n\t\t\t\tUntypedValue uv = (UntypedValue) val;\n\t\t\t\tcheckConvertibility(uv.getActual(), typ);\n\t\t\t}\n\t\t}\r\n\t}",
"void checkValid();",
"public interface Rule<T> {\n\n /**\n * Validate the supplied target object.\n *\n * @param regData the object that is to be validated (can be null)\n * @param errors contextual state about the validation process\n */\n void validate(T regData, Errors errors);\n}",
"boolean setValidated(String aKey, Object aObj);",
"public static boolean isValid(String args[]){\n \n if(args.length < 2){\n System.out.println(\"Not enough arguments detected. Please enter two\"\n + \" integer arguments.\");\n return false;\n }\n \n Scanner scanin = new Scanner(args[0]);\n Scanner scanin2 = new Scanner(args[1]);\n\t \n if(!scanin.hasNextInt() || !scanin2.hasNextInt()){\n System.out.println(\"Invalid argument type detected. Please enter two\"\n + \" integer arguments.\");\n return false;\n }\n\t else\n return true;\n }",
"public IntegerValidator() {\r\n }",
"public void validate(Object obj, Errors err) {\n\t\tUserLogin userLogin=(UserLogin)obj;\r\n\t\tValidationUtils.rejectIfEmptyOrWhitespace(err, \"fName\", \"fName.emptyOrSpace\");\r\n\t\tValidationUtils.rejectIfEmptyOrWhitespace(err, \"lName\", \"lName.emptyOrSpace\");\r\n\t\tValidationUtils.rejectIfEmptyOrWhitespace(err, \"mailId\", \"mailId.emptyOrSpace\");\r\n\t\tValidationUtils.rejectIfEmptyOrWhitespace(err, \"pass\", \"password.emptyOrSpace\");\r\n\t\tValidationUtils.rejectIfEmptyOrWhitespace(err, \"mob\", \"mob.emptyOrSpace\");\r\n\t\t\r\n\t\t//Business rule related Validation \r\n\t\tif(userLogin.getfName()!=null && userLogin.getfName().trim().length()>0) {\r\n\t\t\tif(userLogin.getfName().trim().length()>20)\r\n\t\t\t\terr.rejectValue(\"fName\", \"fName.length.exceeds\");\r\n\t\t}\r\n\t\t\r\n\t\tif(userLogin.getlName()!=null && userLogin.getlName().trim().length()>0) {\r\n\t\t\tif(userLogin.getlName().trim().length()>10)\r\n\t\t\t\terr.rejectValue(\"lName\", \"lName.length.exceeds\");\r\n\t\t}\r\n\t\t\r\n\t\tif(userLogin.getMob()!=null && userLogin.getMob().trim().length()>0) {\r\n\t\t\tif(userLogin.getMob().trim().length()!=10)\r\n\t\t\t\terr.rejectValue(\"mob\", \"mob.length.exceeds\");\r\n\t\t}\r\n\t\t\r\n\t\tif(userLogin.getMailId()!=null && userLogin.getMailId().trim().length()>0) {\r\n\t\t\tif(userLogin.getMailId().trim().length()>=20 ) {\r\n\t\t\t\terr.rejectValue(\"mailId\", \"mailId.length.exceeds\");\r\n\t\t\t}else if(!userLogin.getMailId().contains(\"@\")) {\r\n\t\t\t\terr.rejectValue(\"mailId\", \"mailId.format.first.rule\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(userLogin.getPass()!=null && userLogin.getPass().trim().length()>0) {\r\n\t\t\tif(userLogin.getPass().trim().length()>=10 ) {\r\n\t\t\t\terr.rejectValue(\"pass\", \"pass.length.exceeds\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t//DB validations\r\n\t\tif(!registerService.validateUser(userLogin)) {\r\n\t\t\terr.rejectValue(\"mailId\", \"mailId.alreadyRegistered\");\r\n\t\t}\r\n\t\t\r\n\t}",
"public static void isValid(int i) throws IllegalArgumentException {\n\t//nothing to do here\n }",
"public void validate() throws org.apache.thrift.TException {\n if (version == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'version' was not present! Struct: \" + toString());\n }\n if (am_handle == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'am_handle' was not present! Struct: \" + toString());\n }\n if (user == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'user' was not present! Struct: \" + toString());\n }\n if (resources == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'resources' was not present! Struct: \" + toString());\n }\n // alas, we cannot check 'gang' because it's a primitive and you chose the non-beans generator.\n // check for sub-struct validity\n if (am_handle != null) {\n am_handle.validate();\n }\n if (reservation_id != null) {\n reservation_id.validate();\n }\n }",
"@Override\n\tpublic void valid(String id, String valid) {\n\t\t\n\t}",
"@Override\r\n\tprotected void validate() {\n\t}",
"@SuppressWarnings(\"unchecked\")\n protected void \n validate\n (\n Comparable value\t \n )\n throws IllegalArgumentException \n {\n if((value != null) && !(value instanceof Double))\n throw new IllegalArgumentException\n\t(\"The parameter (\" + pName + \") only accepts (Double) values!\");\n }",
"@Override\n public boolean validateObject(MongoTemplate obj) {\n return true;\n }",
"protected void validate() {\n // no op\n }",
"private Set<ValidationMessage> validateInternal(final JsonNode schemaJson, final JsonNode objectJson) {\n Preconditions.checkNotNull(schemaJson);\n Preconditions.checkNotNull(objectJson);\n\n final JsonSchema schema = getSchemaValidator(schemaJson);\n return schema.validate(objectJson);\n }",
"public void validate() throws org.apache.thrift.TException {\n if (object != null) {\n object.validate();\n }\n }",
"public abstract ValidationResult validateDataFormat(Map<String, String[]> requestParamsMap);",
"@Override\n\tpublic void validate(Object obj, Errors errors) {\n\n\t\tUser user = (User) obj;\n\t\t\n\t\t // Check validate for values in form\n\t\tValidationUtils.rejectIfEmpty(errors, \"user_fullName\", \"user.user_fullName.emplty\");\n\t\tValidationUtils.rejectIfEmpty(errors, \"user_mail\", \"user.user_mail.emplty\");\n\t\tValidationUtils.rejectIfEmpty(errors, \"user_passWord\", \"user.user_passWord.emplty\");\n\t\tValidationUtils.rejectIfEmpty(errors, \"role_id\", \"user.role_id.emplty\");\n\n\t\tPattern pattern = Pattern.compile(\"^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\\\.[A-Z]{2,6}$\", Pattern.CASE_INSENSITIVE);\n\t\tif (!(pattern.matcher(user.getUser_mail()).matches())) {\n\t\t\terrors.rejectValue(\"user_mail\", \"user.user_mail.invalid\");\n\t\t}\n\n\t\tif (user.getUser_fullName().length() <= 3 || user.getUser_fullName().length() >= 50) {\n\t\t\terrors.rejectValue(\"user_fullName\", \"user.user_fullName.limit\");\n\t\t}\n\n\t\tif (user.getUser_passWord().length() <= 4 || user.getUser_passWord().length() >= 15) {\n\t\t\terrors.rejectValue(\"user_passWord\", \"user.user_passWord.limit\");\n\n\t\t}\n\n\t}",
"public interface Validator<T> {\n\n // Валидирует переданое значение\n boolean isValid(int result);\n}",
"@Override\n public void customValidation() {\n }"
]
| [
"0.6951394",
"0.6410098",
"0.6322597",
"0.6186981",
"0.6140924",
"0.61305094",
"0.601978",
"0.60044515",
"0.59180075",
"0.591462",
"0.5912784",
"0.5909715",
"0.58997977",
"0.58914137",
"0.5891136",
"0.58795965",
"0.5872015",
"0.58518136",
"0.58144003",
"0.58060247",
"0.5800074",
"0.5769102",
"0.57516116",
"0.57320493",
"0.5726259",
"0.5706261",
"0.56906337",
"0.56906337",
"0.56716824",
"0.5669178",
"0.5613966",
"0.5598777",
"0.5581975",
"0.55605775",
"0.55332726",
"0.5516085",
"0.5512415",
"0.55020964",
"0.5473518",
"0.54684985",
"0.5464865",
"0.5464865",
"0.5464865",
"0.5464483",
"0.54480046",
"0.5447401",
"0.5439577",
"0.5436704",
"0.54338413",
"0.54238623",
"0.54233044",
"0.541289",
"0.540189",
"0.5395572",
"0.5391056",
"0.538304",
"0.5378588",
"0.5375572",
"0.5350594",
"0.53444356",
"0.5343777",
"0.5339938",
"0.5338429",
"0.5335156",
"0.53260297",
"0.532583",
"0.5321122",
"0.5320551",
"0.5318206",
"0.53070164",
"0.5306296",
"0.5302682",
"0.53002805",
"0.52979094",
"0.5296547",
"0.5290866",
"0.5289914",
"0.5278863",
"0.5253913",
"0.5252079",
"0.523752",
"0.5233104",
"0.5232938",
"0.52150446",
"0.52139723",
"0.52116704",
"0.52073085",
"0.5203439",
"0.5198967",
"0.5197767",
"0.5193494",
"0.5193388",
"0.5182561",
"0.5170354",
"0.5169894",
"0.51657844",
"0.51608264",
"0.515941",
"0.51585734",
"0.5151347",
"0.5150858"
]
| 0.0 | -1 |
/ ===================== Setup Deck ===================== | private List<Card> setupDeck(){
List<Card> llist = new LinkedList<Card>();
String[] faceCards = {"J","Q","K","A"};
String[] suits = {"spades","clubs","diamonds","hearts"};
for(int i=2; i<=10; i++){
for(int j=1; j<=4; j++){
llist.add(new Card(Integer.toString(i), suits[j-1], j, i));
}
}
for(int k=1; k<=4; k++){
for(int l=1; l<=4; l++){
llist.add(new Card(faceCards[k-1],suits[l-1], l, k+10));
}
}
return llist;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Deck() {\n this.allocateMasterPack();\n this.init(1);\n }",
"public Deck() {\n generateDeckOfCards();\n }",
"@Before\r\n\tpublic void setUp() throws Exception {\n\t\ttestDeck = new Deck(1, true);\r\n\t\tdeckCards = testDeck.getDeck();\r\n\t\t\r\n\t}",
"public Deck() {\n this.deck = new LinkedList<>();\n }",
"private void initializeDecks()\n\t{\n\t\tdiscardRestrictedCards();\n\t\t\n\t\tboard.getRandomEventCardDeck().shuffleDeck();\n\t\tboard.getPersonalityCardDeck().shuffleDeck();\n\t\tDeck<Card> brownCards = new Deck<Card>();\n\t\tDeck<Card> greenCards = new Deck<Card>();\n\t\tfor(Card card : board.getPlayerCardDeck())\n\t\t{\n\t\t\tif(card.getType() == Card.CardType.GreenPlayerCard)\n\t\t\t{\n\t\t\t\tgreenCards.addCard(card);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbrownCards.addCard(card);\n\t\t\t}\n\t\t}\n\t\tbrownCards.shuffleDeck();\n\t\tgreenCards.shuffleDeck();\n\t\tboard.getPlayerCardDeck().clear();\n\t\tboard.getPlayerCardDeck().addAll(brownCards);\n\t\tboard.getPlayerCardDeck().addAll(greenCards);\n\t}",
"public void initialise()\r\n {\n Deck d = new Deck();\r\n d.shuffle();\r\n //Deal cards to players\r\n Iterator<Card> it = d.iterator();\r\n int count = 0;\r\n while (it.hasNext())\r\n {\r\n players[count % nosPlayers].addCard(it.next());\r\n it.remove();\r\n ++count;\r\n }\r\n //Initialise Discards\r\n discards = new Hand();\r\n //Chose first player\r\n currentPlayer = 0;\r\n currentBid = new Bid();\r\n currentBid.setRank(Card.Rank.TWO);\r\n }",
"public void createDeck(){\n //Does nothing because it will be overridden in the child classes.\n }",
"public Deck()\n\t{\n\t\t//call other Constructor defining one deck with out shuffling\n\t\tthis(false);\n\t}",
"public Dealer() {\n dealerHand = new Deck();\n }",
"public Deck() {\n System.out.println(\"Inside deck\");\n cards = new ArrayList<>();\n fillDeck();\n }",
"public Deck()\n {\n this(1);\n }",
"private void initDecks() {\n\t\tDeck[] decks = new Deck[2];\n\t\tdecks[0] = charDeck;\n\t\tdecks[1] = mainDeck;\n\n\t\tfor (int i = 0; i < decks.length; i++) {\n\t\t\tDeck d = decks[i];\n\t\t\td.setNrOfShownCards(d.getDeckSize());\n\t\t\td.setShownLines(showLines);\n\t\t\td.setLineLength(lineLength);\n\t\t\td.setHandPosRelative(-21, -20);\n\t\t\td.reset();\n\t\t}\n\t}",
"public BigTwoDeck(){\r\n\t\tinitialize();\r\n\t}",
"public Deck()\r\n\t{\r\n\t\tcards = new String[DECK_SIZE];\r\n\t\t\r\n\t\tnewDeck();\r\n\t}",
"private void startingSetup(boolean shelter) {\r\n\t\tArrayList<Card> startDeck = new ArrayList<Card>();\r\n\t\twhile(startDeck.size() < 7) {\r\n\t\t\tstartDeck.add(new Copper());\r\n\t\t}\r\n\t\tif(shelter) {\r\n\t\t\tstartDeck.add(new OvergrownEstate());\r\n\t\t\tstartDeck.add(new Hovel());\r\n\t\t\tstartDeck.add(new Necropolis());\r\n\t\t}\r\n\t\telse {\r\n\t\t\twhile(startDeck.size() < 10) {\r\n\t\t\t\tstartDeck.add(new Estate());\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\tdeck = new Deck(access.random, startDeck, access, this);\r\n\t\tdeck.cleanUp();\r\n\t\tactions = 1;\r\n\t\tbuys = 1;\r\n\t\ttreasure = 0;\r\n\t\tpotion = 0;\r\n\t}",
"public Deck(String id) {\n this.id = id;\n }",
"public Deck() {\n deck = new LinkedList<>();\n for (int i = 1; i < FACE_VALUES + 1; i++) {\n deck.add(new Card(i, SPADES));\n deck.add(new Card(i, CLUB));\n deck.add(new Card(i, DIAMOND));\n deck.add(new Card(i, HEART));\n }\n }",
"public Deck()\n {\n deck = new ArrayList<>();\n }",
"public void startGame() {\n this.deck = new Deck();\n this.deck.shuffle(); //shuffle the deck\n Card card = this.deck.deal(this.getPlayerHand());\n card = this.deck.deal(this.getPlayerHand());\n card = this.deck.deal(this.getDealerHand());\n }",
"public void initialDeck()\t{\n\t\tdeck1 = new Deck();\n\t\tdeck2 = new Deck();\n\t\tdeck1.shuffle();\n\t\tdeck2.shuffle();\n\t\tdeck1 = deck1.combine(deck2);\n\t\tdeck1.shuffle();\n\t}",
"public Deck()\n {\n deck = new Stack<Card>();\n /* Increments through each suit, and then for each suit through each rank,\n * and pushes a\n * new card with the corresponding information onto the deck.\n */\n /* The above comment did not show up in the checkstyle. */\n for (Suit suit : Suit.values())\n {\n /* Increments through each card value. */\n for (CardValue value : CardValue.values())\n {\n deck.push(new Card(suit, value));\n }\n }\n Collections.shuffle(deck);\n }",
"@Test\r\n public void testDeck() {\r\n Deck instance = new Deck();\r\n System.out.println(\"Testing Contructor\");\r\n assertNotNull(instance);\r\n }",
"public void setup() {\r\n\r\n\t}",
"@Override\r\n\tprotected void setup() {\n\t\tgetContentManager().registerLanguage(codec);\r\n\t\tgetContentManager().registerOntology(ontology);\r\n\t\t\r\n\t\tObject[] args = getArguments();\r\n\t\tif(args != null && args.length > 0) {\r\n\t\t\tbroker = (Broker)args[0];\r\n\t\t} else {\r\n\t\t\tbroker = new Broker(\"Broker\");\r\n\t\t}\r\n\t\t\r\n\t\tProgramGUI.getInstance().printToLog(broker.hashCode(), getLocalName(), \"created\", Color.GREEN.darker());\r\n\t\t\r\n\t\t// Register in the DF\r\n\t\tDFRegistry.register(this, BROKER_AGENT);\r\n\t\t\r\n\t\tsubscribeToRetailers();\r\n\t\tquery();\r\n\t\tpurchase();\r\n\t}",
"public void setup() {\n }",
"public void play() {\r\n this.cardDeck = new JavaDeck();\r\n cardDeck.shuffle();\r\n dealerHand = new JavaHand(2);\r\n dealerHand.DiscardHand();\r\n addDealerCard();\r\n }",
"protected void setup() {\n\n // Setup budget randomly between 1000 - 2000\n budget = rn.nextInt(1000) + 1000;\n\t\tSystem.out.println(\"Hello! Bidder \"+getAID().getName()+\" is ready with budget \" + budget);\n\n\t\t// Create and show the GUI \n\t\tmyGui = new BidderHumanGUI(this);\n\t\tmyGui.showGui();\n\n\t\t// Register as bidder to the yellow pages\n\t\tDFAgentDescription dfd = new DFAgentDescription();\n\t\tdfd.setName(getAID());\n\t\tServiceDescription sd = new ServiceDescription();\n\t\tsd.setType(\"blind-auction\");\n\t\tsd.setName(\"Blind-Auction\");\n\t\tdfd.addServices(sd);\n\t\ttry {\n\t\t\tDFService.register(this, dfd);\n\t\t}\n\t\tcatch (FIPAException fe) {\n\t\t\tfe.printStackTrace();\n\t\t}\n\n\t\t// Add the behaviour for receiving CFP from Auctioneer\n\t\taddBehaviour(new ReceiveCFPHuman(this));\n\n\t\t// Add the behaviour for receiving item --as the auction winner\n\t\taddBehaviour(new ReceiveItemAsWinnerHuman(this));\n\t}",
"public void setUp() {\n burr = new Song(\"Hannibal Burress\", \"rap\", 2018, \"Morpheus Rap\");\n }",
"public void initChanceDeck() {\n\t\tchanceDeck = new Deck();\n\t\tfor (int i = 0; i < 16; i++) {\n\t\t\tchanceDeck.addCard(new Card(i));\n\t\t}\n\t\t//shuffled to make the order random\n\t\tchanceDeck.shuffle();\n\t}",
"public Deck(){\n\t\tcards = new ArrayList<>(deckSize);\n\t\tdeck = new int[deckSize];\n\t}",
"public Deck(Deck iDeck){\n this.addAll(iDeck);\n }",
"protected void setup() {\r\n }",
"void fillDeck()\n\t{\n\t\t\n\t\tfor ( byte decks = 0 ; decks < howManyDecks ; decks++ )\n\t\t\tfor ( byte suit = 0 ; suit < 4 ; suit++ )\n\t\t\t\tfor ( byte value = 1 ; value < 14 ; value++ ) \n\t\t\t\t\tdeck.add ( new Card (value , suit , true) );\n\t}",
"abstract void setup();",
"@Override\n protected void setup() {\n }",
"@Override\n public void setup() {\n\n }",
"@Test\n public void create() {\n Deck deck = new DeckImplementation();\n assertEquals(\"Wrong initial deck size!\", 180,\n deck.numberOfCardsRemaining());\n deck.drawACard();\n assertEquals(\"Wrong size deck after draw!\", 179,\n deck.numberOfCardsRemaining());\n }",
"@Override\n public void setup() {\n }",
"@Override\n public void setup() {\n }",
"public void initChestDeck() {\n\t\tchestDeck = new Deck();\n\t\tfor (int i = 0; i < 16; i++) {\n\t\t\tchestDeck.addCard(new Card(i + 16));\n\t\t}\n\t\t//makes cards random\n\t\tchestDeck.shuffle();\n\t}",
"public void setup()\n {\n }",
"public Deck(String name){\r\n\t\tthis(name, new ArrayList<Card>());\r\n\t}",
"private void buildDeck() {\r\n //Initialise size of deck and number of cards \r\n this.numOfCards = FIFTYTWO;\r\n //create new Deck Array \r\n this.deck = new ICard[this.numOfCards];\r\n //Creates Deck deck \r\n createDeck(Suit.values(), Rank.values());\r\n //shuffles deck \r\n shuffleCards(deck);\r\n\r\n }",
"protected abstract void setup();",
"@Override\r\n\tpublic void setup(){\n\t\tmidiIO = CCMidiIO.getInstance();\r\n\t\tmidiIO.printDevices();\r\n\r\n\t\t// print a list with all available devices\r\n\t\tmidiIO.printDevices();\r\n\r\n\t\t// open an midiout using the first device and the first channel\r\n\t\tmidiOut = midiIO.midiOut(0, 1);\r\n\r\n\t\tbowl = new Bowl[10];\r\n\t\tfor (int i = 0; i < bowl.length; i++){\r\n\t\t\tbowl[i] = new Bowl(i);\r\n\t\t}\r\n\t}",
"private void InitializeDeck(){\n //Spades\n\n deck.add(\"spadesace\");\n deck.add(\"spadesjack\");\n deck.add(\"spadesqueen\");\n deck.add(\"spadesking\");\n deck.add(\"spades2\");\n deck.add(\"spades3\");\n deck.add(\"spades4\");\n deck.add(\"spades5\");\n deck.add(\"spades6\");\n deck.add(\"spades7\");\n deck.add(\"spades8\");\n deck.add(\"spades9\");\n deck.add(\"spades10\");\n\n\n //Diamonds\n deck.add(\"diamondsace\");\n deck.add(\"diamondsjack\");\n deck.add(\"diamondsqueen\");\n deck.add(\"diamondsking\");\n deck.add(\"diamonds2\");\n deck.add(\"diamonds3\");\n deck.add(\"diamonds4\");\n deck.add(\"diamonds5\");\n deck.add(\"diamonds6\");\n deck.add(\"diamonds7\");\n deck.add(\"diamonds8\");\n deck.add(\"diamonds9\");\n deck.add(\"diamonds10\");\n\n //Clubs\n deck.add(\"clubsace\");\n deck.add(\"clubsjack\");\n deck.add(\"clubsqueen\");\n deck.add(\"clubsking\");\n deck.add(\"clubs2\");\n deck.add(\"clubs3\");\n deck.add(\"clubs4\");\n deck.add(\"clubs5\");\n deck.add(\"clubs6\");\n deck.add(\"clubs7\");\n deck.add(\"clubs8\");\n deck.add(\"clubs9\");\n deck.add(\"clubs10\");\n\n //Hearts\n deck.add(\"heartsace\");\n deck.add(\"heartsjack\");\n deck.add(\"heartsqueen\");\n deck.add(\"heartsking\");\n deck.add(\"hearts2\");\n deck.add(\"hearts3\");\n deck.add(\"hearts4\");\n deck.add(\"hearts5\");\n deck.add(\"hearts6\");\n deck.add(\"hearts7\");\n deck.add(\"hearts8\");\n deck.add(\"hearts9\");\n deck.add(\"hearts10\");\n\n Collections.shuffle(deck);\n\n for(int i = 0; i < deck.size(); i++){\n System.out.println(deck.get(i));\n }\n }",
"public void setUpCards() {\n this.setSuspectCardsAndPlayerPieces();\n this.setWeaponCardsAndPieces();\n this.setRoomCards();\n this.setUpDetectiveSlips();\n this.shuffleCards();\n this.setEnvelope();\n this.shuffleCards();\n this.gatherCards();\n this.giveOutCards();\n }",
"protected void setup() {\n\t\tSystem.out.println(\"Broker Agent \"+getAID().getName()+\" is ready.\");\r\n\t\tthis.getContentManager().registerLanguage(new SLCodec());\r\n\t\tthis.getContentManager().registerOntology(RequestOntology.getInstance());\r\n\t\t\r\n\t\tObject[] args = getArguments();\r\n\t\tif (args != null && args.length > 0) {\r\n\t\t\tprice = (String) args[0];\r\n\t\t\tvolume= (String) args[1];\r\n\t\t\t\r\n\t\t\tDFAgentDescription dfd = new DFAgentDescription();\r\n\t\t\tdfd.setName(getAID());\r\n\t\t\tServiceDescription sd = new ServiceDescription();\r\n\t\t\tsd.setType(\"energy-selling\");\r\n\t\t\tsd.setName(\"Energy-Broker\");\r\n\t\t\tdfd.addServices(sd);\r\n\t\t\ttry {\r\n\t\t\t\tDFService.register(this, dfd);\r\n\t\t\t}\r\n\t\t\tcatch (FIPAException fe) {\r\n\t\t\t\tfe.printStackTrace();\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(getAID().getName()+\" No available arguments\");\r\n\t\t\tdoDelete();\r\n\t\t}\r\n\t\taddBehaviour(new BOReply(this));\r\n\t}",
"private static MagicDuel setupDuel() {\n if (seed != 0) {\n MagicRandom.setRNGState(seed);\n seed = MagicRandom.nextRNGInt() + 1;\n }\n\n // Set number of games.\n final DuelConfig config = new DuelConfig();\n config.setNrOfGames(games);\n config.setStartLife(life);\n\n // Set difficulty.\n final MagicDuel testDuel = new MagicDuel(config);\n\n final MagicDeckProfile profile = new MagicDeckProfile(\"bgruw\");\n\n final DuelPlayerConfig player1 = new DuelPlayerConfig(\n AiProfile.create(\"Player1\", ai1, str1),\n profile\n );\n\n final DuelPlayerConfig player2 = new DuelPlayerConfig(\n AiProfile.create(\"Player2\", ai2, str2),\n profile\n );\n\n testDuel.setPlayers(new DuelPlayerConfig[] { player1, player2 });\n\n // Set the deck.\n if (deck1.length() > 0) {\n DeckUtils.loadAndSetPlayerDeck(deck1, testDuel.getPlayer(0));\n }\n if (deck2.length() > 0) {\n DeckUtils.loadAndSetPlayerDeck(deck2, testDuel.getPlayer(1));\n }\n\n return testDuel;\n }",
"public Deck() { // This constructor creates a standard deck\n\n\tcards = new Card[52];\n\tint k=0;\n\t\n\tfor (int i=0; i<4; i++)\n\t for (int j=2; j<15; j++){\n\t\tcards[k]= new Card (j, i);\n\t\tk++;\n\t\t }\n\t \n\n\tshuffle();\n\t\n\tcardsLeft = 52;\n\t/*\tfor (int i=0; i<52; i++)\n\t\tSystem.out.println (cards[i]);*/\n }",
"public Deck(ArrayList<Card> deck)\n {\n this.deck = deck;\n }",
"@Override\n\tprotected void setup() {\n\t\tcarImg();\n\t\tsetResolution(Resolution.MSX);\n\t\tsetFramesPerSecond(100);\n\t\t\n\t\tbola = new Bola();\n\n\t\tbotoes();\n\n\t\tcriaBlocos();\n\n\t\tpaddle = new Paddle();\n\n\t\t\n\n\t}",
"@Override\r\n public void giveDealerDeck(Deck deck) {\r\n this.dealer.addDeck(deck);\r\n }",
"@Before\r\n\tpublic void setUp() throws Exception {\r\n\t\tls = new LanguageSelector(\"da\", \"DK\");\r\n\t\tgb = new GameBoard(diceCup, ls);\r\n\t\trb = ls.selectLanguage(\"da\", \"DK\");\r\n\t\tplayer = new Player();\r\n\t\tplayer.getPlayerAccount().setBalance(30000);\r\n\t\tplayer.setPlayerName(\"Player\");\r\n\t\tcc = new ChanceCard[1];\r\n\t\tchanceCardController = new ChanceCardController(cc);\r\n\t\tcc[0] = new ChanceMove(\"ChanceMove\", -3, gb, chanceCardController, rb);\r\n\t\tPrøvLykken = new ChanceField(\"Prøv Lykken\");\r\n\t}",
"@Before\n public void setup(){\n// sheetMusic = new SheetMusic( 10.00, 20.00, \"Sheet Music\");\n// strings = new GuitarStrings(5.00, 10.00, \"Guitar Strings\");\n// polish = new BrassPolish(5.00, 7.50, \"Makes Brass Shine\");\n guitar = new Guitar(InstrumentType.STRING, \"Wood\", \"Beige\", 200.00, 300.00, \"Gibson Les Paul\");\n piano = new Piano(InstrumentType.KEYS, \"Oak and Ivory\", \"Hazelnut brown case, black and white keys\", 1000.00, 1500.00, \"Grand Piano\");\n saxaphone = new Saxaphone(InstrumentType.BRASS, \"Brass\", \"Gold\", 500.00, 750.00, \"Gerry Rafferty's Sax\");\n customer = new Customer(\"Dan\", 1000.00);\n instrumentStock = new ArrayList();\n shop = new Shop(instrumentStock,0.00);\n }",
"public GDeck(Deck startdeck){\r\n\t\t cards=startdeck;\r\n\t\t add(back=new GImage(((GCard)startdeck.get(0)).getBackImage().getImage()));\r\n\t }",
"public Player (Deck mainDeck) {\n this.mainDeck = mainDeck;\n }",
"public static void main(String[] args) {\r\n\t\t/* *** TO BE IMPLEMENTED IN ACTIVITY 2 *** */\r\n\t\tfinal String[] ranks = {\"Ace\", \"Two\", \"Three\", \"Four\", \"Five\", \"Six\", \"Seven\", \"Eight\", \"Nine\", \"Ten\", \"Jack\", \"Queen\", \"King\"};\r\n\t\tfinal String[] suits = {\"Clubs\", \"Diamonds\", \"Hearts\", \"Spades\"};\r\n\t\tfinal int[] pointValues = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10};\r\n\t\t\r\n\t\tDeck deck1 = new Deck(ranks, suits, pointValues);\r\n\t\tDeck deck2 = new Deck(ranks, suits, pointValues);\r\n\t\tDeck deck3 = new Deck(ranks, suits, pointValues);\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(deck1.isEmpty());\r\n\t\tSystem.out.println(deck1.size());\r\n\t\tSystem.out.println(deck1.deal());\r\n\t\tSystem.out.println(deck1);\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\\n\\n\");\r\n\t\tfor (int counter = 0; counter < 10; counter++)\r\n\t\t{\r\n\t\t\tSystem.out.println(deck2.deal());\r\n\t\t}\r\n\t\tSystem.out.println(deck2.isEmpty());\r\n\t\tSystem.out.println(deck2);\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\\n\\n\");\r\n\t\twhile (!deck3.isEmpty())\r\n\t\t{\r\n\t\t\tSystem.out.println(deck3.deal());\r\n\t\t}\r\n\t\tSystem.out.println(deck3.isEmpty());\r\n\t\tSystem.out.println(deck3);\r\n\t\t\r\n\t}",
"@Test\n public void testGiveHand() throws Exception {\n\n Deck giveHand = new Deck();\n giveHand.add(cardB);\n giveHand.add(cardB);\n giveHand.add(cardP);\n playerHuman.addCardToDeck(cardB);\n playerHuman.addCardToDeck(cardB);\n playerHuman.addCardToDeck(cardP);\n playerHuman.giveHand();\n org.junit.Assert.assertEquals(giveHand, playerHuman.getPlayHand());\n }",
"public Deck() {\n cards = new Card[52];\n size = 0;\n for (int suit = Card.SPADES; suit <= Card.CLUBS; suit++) {\n for (int rank = Card.ACE; rank <= Card.KING; rank++) {\n cards[size] = new Card(rank, suit);\n size += 1;\n }\n }\n }",
"private static void showPlayerDeckInfo() {\n }",
"@Override\r\n\tprotected void setup() {\r\n System.out.println(\"Hallo! Seller-agent \"+getAID().getName()+\" is ready.\");\r\n Object[] args = getArguments();\r\n //We get the two first arguments to set the tolerance and the change rate\r\n if (args != null && args.length > 1) {\r\n\t\t// Create the catalogue\r\n\t\tcatalogue = new Hashtable();\r\n tolerance = Integer.parseInt((String)args[0]);\r\n change = Integer.parseInt((String)args[1]);\r\n \r\n System.out.println(\"My tolerance is \" + tolerance + \" and i will change with a rate of \" + change);\r\n \r\n\t\t// Create and show the GUI \r\n\t\tmyGui = new BookSellerGui(this);\r\n\t\tmyGui.showGui();\r\n\r\n\t\t// Register the book-selling service in the yellow pages\r\n\t\tDFAgentDescription dfd = new DFAgentDescription();\r\n\t\tdfd.setName(getAID());\r\n System.out.println(\"\");\r\n\t\tServiceDescription sd = new ServiceDescription();\r\n\t\tsd.setType(\"book-selling\");\r\n\t\tsd.setName(\"JADE-book-trading\");\r\n\t\tdfd.addServices(sd);\r\n\t\ttry {\r\n\t\t\tDFService.register(this, dfd);\r\n\t\t}\r\n\t\tcatch (FIPAException fe) {\r\n\t\t\tfe.printStackTrace();\r\n\t\t}\r\n\r\n\t\t// Add the behaviour serving queries from buyer agents\r\n\t\taddBehaviour(new OfferRequestsServer());\r\n\r\n\t\t// Add the behaviour serving purchase orders from buyer agents\r\n\t\taddBehaviour(new PurchaseOrdersServer());\r\n \r\n //------------------------------------------------------------------------------\r\n //MODIF : If the seller has no more book to sell, he is terminated. It is check every minute\r\n //------------------------------------------------------------------------------\r\n addBehaviour(new TickerBehaviour(this, 60000) {\r\n @Override\r\n protected void onTick() {\r\n if(catalogue.isEmpty()){\r\n myAgent.doDelete();\r\n }\r\n }\r\n });\r\n }\r\n\t}",
"private static void showDeckInfo() {\n }",
"@Override\r\n public void dealerCreateNewDeck() {\r\n this.dealer.createNewDeck();\r\n System.out.println(\"Dealer deck created\");\r\n }",
"@Override\r\n public void dealerShuffleDeck(){\r\n this.dealer.shuffleDecks();\r\n }",
"private void initializeDeck() {\r\n\t\t// Loop over the 4 card suits\r\n\t\tfor (Suit suit : Suit.values()) {\r\n\t\t\t// Loop over 13 card types\r\n\t\t\tfor (CardType value : CardType.values()) {\r\n\t\t\t\tcards.addCard(new Card(suit, value));\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public Deck(Deck other){\r\n this.cards = other.getCards();\r\n this.deckSize = other.getDeckSize();\r\n }",
"@Before\r\n\tpublic void setup()\r\n\t{\n\t\tgame = factory.makeHantoGame(HantoGameID.EPSILON_HANTO, BLUE);\r\n\t}",
"private void initPanelDeck() {\r\n\t\tgsp.panelDeck = gsp.createPanel(100, 50, 50, 50, 0, 0, 400, 350);\r\n\t\t\r\n\t\tgsp.buttonDeck = new JButton();\r\n\t\tgsp.setImageIcon(\"Deck\", gsp.buttonDeck);\r\n\t\t\r\n\t\tgsp.labelLastCard = new JLabel();\r\n\t\tgsp.updateLastCardView();\r\n\t\t\r\n\t\tgsp.panelDeck.add(gsp.buttonDeck);\r\n\t\tgsp.panelDeck.add(gsp.labelLastCard);\r\n\t}",
"public Deck( ) {\r\n int ordinal;\r\n alalSets = new ArrayList<>();\r\n \r\n // load the cards\r\n for ( ordinal = 1; ordinal <= 13; ordinal++) {\r\n for( int iCount = 1; iCount <= 4; iCount++) {\r\n // the deck adds one set which contains one card\r\n \r\n ArrayList<Card> redCardSet = new ArrayList<>();\r\n Card redCard = new Card();\r\n redCard.value = ordinal;\r\n redCard.color = Enums.RED;\r\n redCardSet.add(redCard); // add card to set\r\n alalSets.add( redCardSet ); // add set to deck\r\n\r\n ArrayList<Card> blackCardSet = new ArrayList<>();\r\n Card blackCard = new Card();\r\n blackCard.value = ordinal;\r\n blackCard.color = Enums.BLACK;\r\n blackCardSet.add(blackCard);\r\n alalSets.add( blackCardSet );\r\n }\r\n }\r\n }",
"@Override\r\n\tprotected void setup() {\n\t\tgetContentManager().registerLanguage(codec);\r\n\t\tgetContentManager().registerOntology(ontology);\r\n\t\t\r\n\t\t// Register in the DF\r\n\t\tDFRegistry.register(this, BROKER_AGENT);\r\n\t\t\r\n\t\t// Find retailers\r\n\t\tsubscribeToRetailers();\r\n\t\t\r\n\t\t// Run agent\r\n\t\tquery();\r\n\t\tpurchase();\r\n\t}",
"void makeDeck() {\n\t\t// start with an array of 1..28 for easy shuffling\n\t\tint[] cardValues = new int[28];\n\t\t// assign values from 1 to 28\n\t\tfor (int i=0; i < cardValues.length; i++) {\n\t\t\tcardValues[i] = i+1;\n\t\t}\n\n\t\t// shuffle the cards\n\t\tRandom randgen = new Random();\n\t\tfor (int i = 0; i < cardValues.length; i++) {\n\t\t\tint other = randgen.nextInt(28);\n\t\t\tint temp = cardValues[i];\n\t\t\tcardValues[i] = cardValues[other];\n\t\t\tcardValues[other] = temp;\n\t\t}\n\n\t\t// create a circular linked list from this deck and make deckRear point to its last node\n\t\tCardNode cn = new CardNode();\n\t\tcn.cardValue = cardValues[0];\n\t\tcn.next = cn;\n\t\tdeckRear = cn;\n\t\tfor (int i=1; i < cardValues.length; i++) {\n\t\t\tcn = new CardNode();\n\t\t\tcn.cardValue = cardValues[i];\n\t\t\tcn.next = deckRear.next;\n\t\t\tdeckRear.next = cn;\n\t\t\tdeckRear = cn;\n\t\t}\n\t}",
"public Game() {\n //Create the deck of cards\n cards = new Card[52 * numDecks];\n cards = initialize(cards, numDecks);\n cards = shuffleDeck(cards, numDecks);\n }",
"@Before\n public void setUp()\n {\n hikerClub= new ClimbingClub();\n \n hikerClub.addClimb(\"Monadnock\", 274);\n hikerClub.addClimb(\"Whiteface\", 301);\n hikerClub.addClimb(\"Algonquin\", 225);\n hikerClub.addClimb(\"Monadnock\", 344);\n \n hikerClub2= new ClimbingClub();\n hikerClub2.addClimbSorted(\"Monadnock\", 274);\n hikerClub2.addClimbSorted(\"Whiteface\", 301);\n hikerClub2.addClimbSorted(\"Algonquin\", 225);\n hikerClub2.addClimbSorted(\"Monadnock\", 344);\n }",
"@Before\n public void setup()\n {\n assumeFalse(\"No audio devices are available. Skipping...\",\n AudioDetector.getInstance().isNoAudio());\n MusicPlayer.init();\n }",
"public Deck() {\n\t\trand = new Random();\n\t\trand.setSeed(System.currentTimeMillis());\n\t\twhile(deck.size()<52){\n\t\t\tint suit = rand.nextInt(4);\n\t\t\tint rank = rand.nextInt(13);\n\t\t\tString card = this.rank[rank] +\" of \" + this.suit[suit];\n\t\t\tdeck.add(card);\n\t\t}\n\t}",
"public War()\n {\n //Create the decks\n dealer = new Deck(); \n dw = new Deck();\n de = new Deck(); \n warPile = new Deck(); \n \n \n fillDeck(); //Add the cards to the dealer's pile \n dealer.shuffle();//shuffle the dealer's deck\n deal(); //deal the piles \n \n }",
"public DuckSourceRemote setDuckConfiguration(DuckConfiguration duckConfiguration);",
"void setup() throws Exception;",
"private Deck()\n\t{\n\t\tfor (Suit s : Suit.values())\n\t\t\tfor(Rank r : Rank.values())\n\t\t\t\tcards.add(new Card(s,r));\n\t}",
"private void createDeckFromInput() {\n\n if(titleField.getText().isBlank()) {\n MainGUI.confirmDialog(\"Deckname cannot be blank\");\n return;\n }\n String deckName = titleField.getText();\n Deck deck = new Deck(deckName, 0,0,0,0,0);\n int deckID = DatabaseAPI.storeDeck(deck);\n DatabaseAPI.createUserDeckBridge(user.getId(), deckID);\n\n String[] tags = FormatData.formatHashtags(tagField.getText());\n for(String tag : tags) {\n if(!FormatData.isBlankString(tag)) {\n int tagID = DatabaseAPI.checkTag(tag);\n if(tagID != 0) {\n DatabaseAPI.createDeckTagBridge(deckID, tagID);\n } else {\n int newTagID = DatabaseAPI.storeTag(tag);\n DatabaseAPI.createDeckTagBridge(deckID, newTagID);\n }\n }\n }\n\n\n }",
"public Deck() {\n deck = new ArrayList<>();\n for (Color d : Color.values()) {\n for (Value e : Value.values()) {\n Card c = new Card(d, e);\n deck.add(c);\n }\n }\n }",
"public Deck() {\n this.cards = new Card[STANDARD_DECK_SIZE];\n this.topCardIndex = 0;\n int cardIndex = 0;\n int DeckLength = this.cards.length;\n for (Card.Suit suit : Card.Suit.values() ) {\n for (int i = Card.ACE ; i <= Card.KING ; i++ ) {\n cards[cardIndex] = new Card (i, suit);\n cardIndex++;\n }\n }\n }",
"public void setup() {\r\n\t\thumanCardsPanel.setHumanCards(players.get(0).getCards());\r\n\t\tfor ( Player p : players ) {\r\n\t\t\tp.setBoard(board);\r\n\t\t\tp.setGame(this);\r\n\t\t}\r\n\t\tboard.setGame(this);\r\n\t\tboard.repaint();\r\n\t\tJOptionPane popup = new JOptionPane();\r\n\t\tString message = \"You are Miss Scarlet. Press Next Player to begin.\\n Hint: Use File > Detective Notes to help you win!\";\r\n\t\tpopup.showMessageDialog(this, message, \"Welcome to Clue!\", JOptionPane.INFORMATION_MESSAGE);\r\n\t}",
"@Before\n\tpublic void setUp() throws Exception\n\t{\n\n\t\tPlayer currentPlayer = new Player(\"joe\");\n\t\tcurrentPlayer.getInventory().add(new Crack(0,\"itemName\", \"description\", 100));\n\t\tDWD content = new DWD(currentPlayer);\n\t\tScanner scanner = new Scanner(System.in);\n\t\tgls = new GameLogicService(content, scanner);\n\t\tgls.init(currentPlayer.getName());\n\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}",
"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 }",
"public static void init() {\n //Reset Flywheel Falcons to factory default\n flywheelMaster.configFactoryDefault();\n flywheelSlave.configFactoryDefault();\n\n //Master settings\n flywheelMaster.setNeutralMode(NeutralMode.Brake); //Set neutral mode to break\n flywheelMaster.configSelectedFeedbackSensor(FeedbackDevice.IntegratedSensor); //Use Falcon 500 Integrated Encoder\n flywheelMaster.setSelectedSensorPosition(0,0,10); //Reset encoder position\n\n //Slave settings\n flywheelSlave.follow(flywheelMaster); //Follow master mode\n flywheelSlave.setInverted(true); //Invert motor to go along with master controller\n flywheelSlave.setNeutralMode(NeutralMode.Brake); //Set neutral mode to break\n }",
"@Before\n public void setup() {\n device = new Device(deviceID, token);\n }",
"public poker_class ()\n\t{\n\t face = \"Two\";\n\t suit = \"Clubs\";\n\t}",
"@Override\r\n\tprotected final void setup() {\r\n \tsuper.setup();\r\n\r\n \tdoSetup();\r\n }",
"@Override\r\n protected void setUp()\r\n {\r\n island = new Island(5,5);\r\n position = new Position(island, 4,4);\r\n seed = new BirdFood(position, \"seed\", \"Crunchy Seeds\", 1.0, 2.0, 1.5);\r\n }",
"public interface Deck {\n\n long getId();\n String getName();\n HeroClass getDeckClass();\n\n}",
"@Test\r\n public void testPlayer_getDumbStrategyCard_null() {\n player2 = new Player(\"\", true);\r\n Hand hand = new Hand();\r\n player2.setHand(hand.getAllCards());\r\n assertEquals(player2.getDumbStrategyCard(yellowOne, yellowOne.getColor()), null);\r\n }",
"@Before\n public void setUp() throws Exception {\n channel = new Channel(\"Together4Ever\", \"The best channel\");\n }",
"void setup();",
"void setup();",
"void setup();",
"public void populateDeck(){\n\n //Add everything to r\n for(int i=0;i<LUMBER;i++){\n deck.add(new ResourceCard(container, Resource.WOOD, cardStartPoint));\n }\n\n for(int i=0;i<WOOL;i++){\n deck.add(new ResourceCard(container, Resource.WOOL, cardStartPoint));\n }\n\n for(int i=0;i<GRAIN;i++){\n deck.add(new ResourceCard(container, Resource.WHEAT, cardStartPoint));\n }\n\n for(int i=0;i<BRICK;i++){\n deck.add(new ResourceCard(container, Resource.BRICKS, cardStartPoint));\n }\n\n for(int i=0;i<ORE;i++){\n deck.add(new ResourceCard(container, Resource.ORE, cardStartPoint));\n }\n //Collections.shuffle(deck);\n\n }",
"public Deck(int numDecks) {\n\t\t// Loop through number of decks, suits, and rank\n\t\tfor (int k = 0; k<numDecks; k++) {\n\t\t\tfor (int i = 1; i <= 4; i++) {\n\t\t\t\tfor (int j = 1; j <= 13; j++) {\n\t\t\t\t\t// Add Card object to linked list\n\t\t\t\t\tdeck.add(new Card(i,j));\n\t\t\t\t\tsize++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}"
]
| [
"0.7144908",
"0.6966856",
"0.6804872",
"0.6783803",
"0.65325373",
"0.64951986",
"0.64724517",
"0.6466344",
"0.63660324",
"0.6341317",
"0.633376",
"0.63039386",
"0.6288675",
"0.625926",
"0.62011987",
"0.61610335",
"0.6132482",
"0.61239964",
"0.61236876",
"0.6121795",
"0.60888904",
"0.60864323",
"0.6057237",
"0.6046776",
"0.6025425",
"0.6017596",
"0.60168236",
"0.60129726",
"0.6010427",
"0.600348",
"0.5983789",
"0.5972539",
"0.5935469",
"0.59308076",
"0.59137267",
"0.5903672",
"0.5898793",
"0.58844215",
"0.58844215",
"0.5872089",
"0.58611935",
"0.58594674",
"0.58537865",
"0.5850829",
"0.58476204",
"0.5839634",
"0.5822068",
"0.5802905",
"0.5773127",
"0.5772827",
"0.5770328",
"0.5767698",
"0.57509357",
"0.57495576",
"0.57457864",
"0.57446915",
"0.57420886",
"0.57410246",
"0.5732666",
"0.5732002",
"0.57308394",
"0.5722073",
"0.5715683",
"0.5713814",
"0.5699473",
"0.56990665",
"0.5698438",
"0.5690142",
"0.56851757",
"0.56767666",
"0.5671005",
"0.56705",
"0.5655965",
"0.5645454",
"0.5643437",
"0.5641304",
"0.56235486",
"0.5612378",
"0.56060386",
"0.5599",
"0.55966806",
"0.559527",
"0.5590202",
"0.55788076",
"0.55692446",
"0.5568529",
"0.55685216",
"0.55620825",
"0.55477417",
"0.5546534",
"0.5532673",
"0.552315",
"0.5514433",
"0.5510757",
"0.55043644",
"0.5504066",
"0.5504066",
"0.5504066",
"0.5490524",
"0.54876107"
]
| 0.5899542 | 36 |
/ ===================== Convert to JSON ===================== | private String convertToJson(Deck<Card> deck){
JSONObject jsonObj = new JSONObject();
List<Card> cards = deck.getDeck();
List<String> parsedCards = new LinkedList<String>();
int i = 1;
for(Card card: cards){
parsedCards.add(card.getCardValue() + "-" + card.getSuit());
i++;
}
jsonObj.put("deck",parsedCards);
JSONArray jArray = jsonObj.getJSONArray("deck");
return jArray.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String toJson() throws IOException;",
"String toJSON();",
"public abstract String toJson();",
"JSONObject toJson();",
"JSONObject toJson();",
"public abstract Object toJson();",
"public abstract String toJsonString();",
"public JsonObject toJson();",
"public String toJSON() throws JSONException;",
"public JSONObject toJson() {\n }",
"public String toJson() {\n try{\n return new JsonSerializer().getObjectMapper().writeValueAsString(this);\n } catch (IOException e){\n throw new RuntimeException(e);\n }\n }",
"public String toJson() throws Exception {\r\n\t\treturn SimpleJson.HashMapToText(getJsonToken());\r\n\t}",
"public String toJson() {\r\n\r\n\treturn new Gson().toJson(this);\r\n }",
"@Override\n\tpublic JSONObject toJson() throws JSONException {\n\t\tJSONObject result = super.toJson();\n\t\treturn result;\n\t}",
"@Override\n\tprotected String toJSON()\n\t{\n\t\treturn getJSON(null);\n\t}",
"public String toJson() { return new Gson().toJson(this); }",
"public String toJson() {\n return JSON.getGson().toJson(this);\n }",
"public String toJson() {\n return JSON.getGson().toJson(this);\n }",
"public String toJson() {\n return JSON.getGson().toJson(this);\n }",
"public String toJson() {\n return JSON.getGson().toJson(this);\n }",
"public String toJson() {\n return JSON.getGson().toJson(this);\n }",
"public String toJson() {\n return JSON.getGson().toJson(this);\n }",
"public String toJson() {\n return JSON.getGson().toJson(this);\n }",
"public String toJson() {\n return JSON.getGson().toJson(this);\n }",
"public String toJson() {\n return JSON.getGson().toJson(this);\n }",
"public String toJson() {\n return JSON.getGson().toJson(this);\n }",
"public String toJson() {\n\n final StringBuilder jsonRepresentation = new StringBuilder();\n\n jsonRepresentation.append(\"[\");\n\n final Iterator<TrackingDataEntry> entriesIter = getEntries().iterator();\n while (entriesIter.hasNext()) {\n\n final TrackingDataEntry entry = entriesIter.next();\n\n serializeTrackingDataVariables(jsonRepresentation, entry.getVars());\n\n if (null != entry.getName()) {\n jsonRepresentation.append(\",\\\"name\\\":\\\"\").append(entry.getName()).append(\"\\\"\");\n }\n if (null != entry.getId()) {\n jsonRepresentation.append(\",\\\"id\\\":\\\"\").append(entry.getId()).append(\"\\\"\");\n }\n if (null != entry.getType()) {\n jsonRepresentation.append(\",\\\"type\\\":\\\"\").append(entry.getType()).append(\"\\\"\");\n }\n if (null != entry.getUrl()) {\n jsonRepresentation.append(\",\\\"url\\\":\\\"\").append(entry.getUrl()).append(\"\\\"\");\n }\n jsonRepresentation.append(\"}\");\n if (entriesIter.hasNext()) {\n jsonRepresentation.append(\",\");\n }\n }\n\n jsonRepresentation.append(\"]\");\n\n return jsonRepresentation.toString();\n }",
"public String getJson();",
"public String toJson()\n\t{\n\t\tJsonStringEncoder encoder = JsonStringEncoder.getInstance();\n\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append('{');\n\n\t\tboolean needComma = true;\n\t\tif (m_Message != null)\n\t\t{\n\t\t\tchar [] message = encoder.quoteAsString(m_Message.toString());\n\t\t\tbuilder.append(\"\\n \\\"message\\\" : \\\"\").append(message).append('\"').append(',');\n\t\t\tneedComma = false;\n\t\t}\n\n\t\tif (m_ErrorCode != null)\n\t\t{\n\t\t\tbuilder.append(\"\\n \\\"errorCode\\\" : \").append(m_ErrorCode.getValueString());\n\t\t\tneedComma = true;\n\t\t}\n\n\t\tif (m_Cause != null)\n\t\t{\n\t\t\tif (needComma)\n\t\t\t{\n\t\t\t\tbuilder.append(',');\n\t\t\t}\n\t\t\tchar [] cause = encoder.quoteAsString(m_Cause.toString());\n\t\t\tbuilder.append(\"\\n \\\"cause\\\" : \\\"\").append(cause).append('\"');\n\t\t}\n\n\t\tbuilder.append(\"\\n}\\n\");\n\n\t\treturn builder.toString();\n\t}",
"public String toJSON(){\n Gson gson = new Gson();\n return gson.toJson(this);\n }",
"public String toJsonString() {\n\t\tString json = null;\n\t\t\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tmapper.setSerializationInclusion(Include.NON_NULL);\n\t\tmapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);\n\t\ttry {\n\t\t\tjson = mapper.writeValueAsString(this);\n\t\t} catch (JsonProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn json;\n\t}",
"public JsonObject covertToJson() {\n JsonObject transObj = new JsonObject(); //kasutaja portf. positsiooni tehing\n transObj.addProperty(\"symbol\", symbol);\n transObj.addProperty(\"type\", type);\n transObj.addProperty(\"price\", price);\n transObj.addProperty(\"volume\", volume);\n transObj.addProperty(\"date\", date);\n transObj.addProperty(\"time\", time);\n transObj.addProperty(\"profitFromSell\", profitFromSell);\n transObj.addProperty(\"averagePurchasePrice\", averagePurchasePrice);\n return transObj;\n }",
"public String serializeJSON () {\n ObjectMapper mapper = new ObjectMapper();\n String jsonString = null;\n \n try {\n jsonString = mapper.writeValueAsString(this);\n } catch (JsonProcessingException e) {\n e.printStackTrace();\n }\n return jsonString;\n }",
"private String convertToJson(Users user) throws JsonProcessingException{\n\t ObjectMapper objectMapper = new ObjectMapper();\n\t return objectMapper.writeValueAsString(user); \n\t}",
"public String toJsonData() {\n\t\treturn new Gson().toJson(this);\n\t}",
"public String toJsonString() {\n String str;\n String str2;\n try {\n if (this.lifetime == null) {\n str = \"null\";\n } else {\n str = \"\\\"\" + this.lifetime.toString() + \"\\\"\";\n }\n if (this.frequency == null) {\n str2 = \"\";\n } else {\n str2 = \",\\\"frequency\\\":\" + this.frequency;\n }\n return \"{\\\"enabled\\\":\" + this.enabled + str2 + \",\\\"lifetime\\\":\" + str + \"}\";\n } catch (Exception e) {\n C3490e3.m663c(e.getMessage());\n return \"\";\n }\n }",
"public JsonObject toJson(){\n JsonObject json = new JsonObject();\n if(username != null){\n json.addProperty(\"username\" , username);\n }\n json.addProperty(\"title\", title);\n json.addProperty(\"description\", description);\n json.addProperty(\"date\", date);\n json.addProperty(\"alarm\", alarm);\n json.addProperty(\"alert_before\", alert_before);\n json.addProperty(\"location\", location);\n\n return json;\n }",
"@Override\n public JSONObject toJson() {\n JSONObject json = new JSONObject();\n json.put(\"name\", name);\n json.put(\"startingTime\", startingTime);\n json.put(\"endingTime\", endingTime);\n json.put(\"event\", eventToJson());\n json.put(\"duration\", duration);\n return json;\n }",
"public String toJson() throws JsonProcessingException {\n return JSON.getMapper().writeValueAsString(this);\n }",
"public String toJson() throws JsonProcessingException {\n return JSON.getMapper().writeValueAsString(this);\n }",
"@Override\n public JSONObject toJson() {\n JSONObject json = new JSONObject();\n json.put(\"frontInfo\", frontInfo);\n json.put(\"backInfo\", backInfo);\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n String formattedDate = dateFormat.format(startTime);\n\n json.put(\"startTime\", formattedDate);\n json.put(\"cardID\", cardID);\n return json;\n }",
"String getJson();",
"String getJson();",
"String getJson();",
"public String toJsonString() {\n return JsonUtils.getGson().toJson(toJson());\n }",
"@Override\n\tpublic JSONObject toJson() {\n\t\treturn null;\n\t}",
"public String toJSON() {\n\t JSONObject outer = new JSONObject();\r\n\t JSONObject inner = new JSONObject();\r\n\t // Now generate the JSON output\r\n\t try {\r\n\t outer.put(\"articleMobile\", inner); // the outer object name\r\n\t inner.put(\"codeArticle\", codeArticle); // a name/value pair\r\n\t inner.put(\"designation\", designation); // a name/value pair\r\n\t inner.put(\"prixVente\", prixVente); // a name/value pair\r\n\t inner.put(\"stockTh\", stockTh);\r\n\t inner.put(\"error\", error); // a name/value pair\r\n\t inner.put(\"gisement\", gisement); // a name/value pair\r\n\t } catch (JSONException ex) {\r\n\t ex.printStackTrace();\r\n\t }\r\n\t return outer.toString(); // return the JSON text\r\n\t}",
"void toJson(JsonStaxPrinter printer) throws PrintingException, IOException;",
"String toJSONString(Object data);",
"private JsonNode toJson() {\n ObjectMapper mapper = new ObjectMapper();\n ObjectNode root = mapper.createObjectNode();\n root.put(\"packages\", jsonPackages(mapper));\n root.put(\"cycleSegments\", jsonCycleSegments(mapper, catalog.getCycleSegments()));\n root.put(\"summary\", jsonSummary(mapper));\n return root;\n }",
"public JsonObject toJson() {\n\t\tJsonObject json = new JsonObject();\n\t\t\n\t\tif (id != null) {\n\t\t\tjson.addProperty( \"id\", id );\n\t\t}\n\t\tif (name != null) {\n\t\t\tjson.addProperty( \"name\", name );\n\t\t}\n\t\tif (version != null) {\n\t\t\tjson.addProperty( \"version\", version );\n\t\t}\n\t\tif (context != null) {\n\t\t\tjson.addProperty( \"context\", context );\n\t\t}\n\t\tif (provider != null) {\n\t\t\tjson.addProperty( \"provider\", provider );\n\t\t}\n\t\tif (description != null) {\n\t\t\tjson.addProperty( \"description\", description );\n\t\t}\n\t\tif (status != null) {\n\t\t\tjson.addProperty( \"status\", status );\n\t\t}\n\t\treturn json;\n\t}",
"@Override\n\tpublic String toJSON()\n\t{\n\t\tStringJoiner json = new StringJoiner(\", \", \"{\", \"}\")\n\t\t.add(\"\\\"name\\\": \\\"\" + this.name + \"\\\"\")\n\t\t.add(\"\\\"id\\\": \" + this.getId());\n\t\tString locationJSON = \"\"; \n\t\tif(this.getLocation() == null)\n\t\t{\n\t\t\tlocationJSON = null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlocationJSON = this.getLocation().toJSON(); \n\t\t}\n\t\tjson.add(\"\\\"location\\\": \" + locationJSON);\n\t\tStringJoiner carsJSON = new StringJoiner(\", \", \"[\", \"]\");\n\t\tfor(Object r : cars)\n\t\t{\n\t\t\tcarsJSON.add(((RollingStock) r).toJSON());\n\t\t}\n\t\tjson.add(\"\\\"cars\\\": \" + carsJSON.toString());\n\t\treturn json.toString(); \n\t}",
"public JSONObject toJSON() {\n JSONObject jsonObject = new JSONObject();\n jsonObject.put(\"FileID\",this.getFileID());\n jsonObject.put(\"FilePath\",this.getFilePath());\n return jsonObject;\n }",
"public String toJsonString() {\n JSONObject jsonObject = new JSONObject();\n try {\n jsonObject.put(\"from\", from);\n jsonObject.put(\"domain\", domain);\n jsonObject.put(\"provider\", provider);\n jsonObject.put(\"action\", action);\n\n try {\n JSONObject jsonData = new JSONObject();\n for (Map.Entry<String, String> entry : data.entrySet()) {\n jsonData.put(entry.getKey(), entry.getValue());\n }\n jsonObject.put(\"data\", jsonData);\n } catch (Exception e) {\n e.printStackTrace();\n jsonObject.put(\"data\", \"{}\");\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return jsonObject.toString();\n }",
"private String convertToJSON(Object o) throws JsonProcessingException {\n return new ObjectMapper().writeValueAsString(o);\n }",
"public String createJsonObject() {\n JSONObject jsonObject = new JSONObject();\n\n try {\n if (!vslaId.equalsIgnoreCase(\"-1\")) {\n // editing existing information\n jsonObject.put(\"VslaId\", vslaId);\n }\n jsonObject.put(\"GroupSupport\", grpSupportType);\n jsonObject.put(\"VslaName\", vslaName);\n jsonObject.put(\"grpPhoneNumber\", grpPhoneNumber);\n jsonObject.put(\"PhysicalAddress\", physAddress);\n jsonObject.put(\"GpsLocation\", locCoordinates);\n jsonObject.put(\"representativeName\", representativeName);\n jsonObject.put(\"representativePosition\", representativePost);\n jsonObject.put(\"GroupAccountNumber\", grpBankAccount);\n jsonObject.put(\"repPhoneNumber\", repPhoneNumber);\n jsonObject.put(\"RegionName\", regionName);\n jsonObject.put(\"tTrainerId\", tTrainerId);\n jsonObject.put(\"Status\", \"2\");\n jsonObject.put(\"numberOfCycles\", numberOfCycles);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return jsonObject.toString();\n }",
"public String convert2json(DataSetInfo ds){\n String out = \"{\\n\";\n out += \"\\\"lags\\\" : \\\"\" + ds.getLags() + \"\\\",\\n\";\n out += \"\\\"derivative\\\" : \\\"\" + ds.getDerivative() + \"\\\",\\n\";\n out += \"\\\"classSize\\\" : \\\"\" + ds.getClassSize() + \"\\\"\\n\";\n out += \"}\\n\";\n return out;\n }",
"private JSONArray foodsToJson() {\n JSONArray jsonArray = new JSONArray();\n\n for (Food f : units) {\n jsonArray.put(f.toJson());\n }\n\n return jsonArray;\n }",
"@Override\n\tpublic String toJSON() {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}",
"String getJSON();",
"public JSONObject toJSON(){\n\t\treturn toJSON(false, false);\n\t}",
"@Override\r\n\tpublic JSONObject toJSON() {\n\t\treturn null;\r\n\t}",
"public String getAsJson() {\n StringBuffer sb = new StringBuffer();\n sb.append(\"{\\\"code\\\": \\\"\").append(this.code).append(\"\\\", \");\n sb.append(\"\\\"color\\\": \\\"\").append(this.color).append(\"\\\", \");\n\n /* Append a size only if the product has a Size */\n if (this.size.getClass() != NoSize.class) {\n sb.append(\"\\\"size\\\": \\\"\").append(this.size).append(\"\\\", \");\n }\n\n sb.append(\"\\\"price\\\": \").append(this.price).append(\", \");\n sb.append(\"\\\"currency\\\": \\\"\").append(this.currency).append(\"\\\"}, \");\n\n return sb.toString();\n }",
"protected JSONObject getJsonRepresentation() throws Exception {\r\n\r\n JSONObject jsonObj = new JSONObject();\r\n jsonObj.put(\"note\", note);\r\n return jsonObj;\r\n }",
"private JSONObject toJSON() throws JSONException {\n JSONObject jo = new JSONObject();\n jo.put(\"d\", description);\n jo.put(\"t\", timestamp);\n return jo;\n }",
"public String toJson() throws Exception {\n\t\treturn WebAccess.mapper.writeValueAsString(this);\n\t}",
"<T> String toJson(T source);",
"private String convertToJson(Contacts contact) throws JsonProcessingException{\n\t ObjectMapper objectMapper = new ObjectMapper();\n\t return objectMapper.writeValueAsString(contact); \n\t}",
"public JSONObject toJSON() {\n JSONObject jsonObject = new JSONObject();\n JSONObject json_posts = new JSONObject();\n for (Post post : this.getPost()) {\n JSONObject json_post = new JSONObject();\n JSONObject json_files = new JSONObject();\n for (UserFile userFile : post.getFile()) {\n JSONObject json_file = new JSONObject();\n json_file.put(\"FileID\", userFile.getFileID());\n json_file.put(\"FilePath\", userFile.getFilePath());\n json_files.put(\"File\" + userFile.getFileID(), json_file);\n }\n json_post.put(\"PostID\", post.getPostID());\n json_post.put(\"Title\", post.getTitle());\n json_post.put(\"Body\", post.getBody());\n json_post.put(\"Files\", json_files);\n json_posts.put(\"Post\" + post.getPostID(), json_post);\n }\n jsonObject.put(\"UID\", this.getUID());\n jsonObject.put(\"UserName\", this.getUserName());\n jsonObject.put(\"PassWord\", this.getPassWord());\n jsonObject.put(\"Email\", this.getEmail());\n jsonObject.put(\"Posts\", json_posts);\n return jsonObject;\n }",
"public final native String toJson() /*-{\n // Safari 4.0.5 appears not to honor the replacer argument, so we can't do this:\n \n // var replacer = function(key, value) {\n // if (key == '__key') {\n // return;\n // }\n // return value;\n // }\n // return $wnd.JSON.stringify(this, replacer);\n \n var key = this.__key;\n delete this.__key;\n var rf = this.__rf;\n delete this.__rf;\n var gwt = this.__gwt_ObjectId;\n delete this.__gwt_ObjectId;\n // TODO verify that the stringify() from json2.js works on IE\n var rtn = $wnd.JSON.stringify(this);\n this.__key = key;\n this.__rf = rf;\n this.__gwt_ObjectId = gwt;\n return rtn;\n }-*/;",
"@Override\n public Object toJson() {\n JSONObject json = (JSONObject)super.toJson();\n json.put(\"name\", name);\n json.put(\"reason\", reason);\n return json;\n }",
"public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }",
"private String converttoJson(Object medicine) throws JsonProcessingException {\r\n ObjectMapper objectMapper = new ObjectMapper();\r\n return objectMapper.writeValueAsString(medicine);\r\n }",
"public String jsonify() {\n return gson.toJson(this);\n }",
"public final String toJson( )\n\t{\n\t\tString json = \"\";\n\t\tif ( getHref( ) != null )\n\t\t{\n\t\t\tthis.data.put( \"id\", getHref( ).substring( getHref( ).lastIndexOf( \"/\" ) + 1 ) );\n\t\t\tjson = this.data.toString( );\n\t\t\tthis.data.remove( \"id\" );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tjson = this.data.toString( );\n\t\t}\n\t\treturn json;\n\t}",
"public JSONObject toJSON()\n {\n JSONObject jsonField = new JSONObject();\n\n jsonField.put(\"name\", name);\n jsonField.put(\"type\", type);\n jsonField.put(\"visibility\", vis.name());\n\n return jsonField;\n }",
"private JSONObject eventToJson() {\n JSONObject json = new JSONObject();\n json.put(\"eventName\", event.getName());\n json.put(\"num\", event.getNum());\n return json;\n }",
"public String toJson(Object obj){\n return new Gson().toJson(obj);\n }",
"public String convertToJSON()\n\t{\n\t\tString json = \"\";\n\n\t\t//Engine and Rule info\n\t\tjson = \t\" \\\"infEngine\\\" : \\\"\"+ inferenceEngine +\"\\\", \" +\n\t\t\t\t\" \\\"infEngURI\\\" : \\\"\"+ infEngURI +\"\\\", \" +\n\t\t\t\t\" \\\"declRule\\\" : \\\"\"+ declarativeRule +\"\\\", \" +\n\t\t\t\t\" \\\"declRuleURI\\\" : \\\"\"+ decRuleURI +\"\\\" \";\n\n\t\t//Antecedent info\n\t\tif(antecedentRawStrings != null)\n\t\t{\n\n\t\t\tString jsonArray = \" [ \";\n\n\t\t\tint i;\n\t\t\tfor(i=0; i < antecedentRawStrings.length -1 ; i++)\n\t\t\t{\n\t\t\t\tString currAntecedentRawString = JSONUtils.toValidJSONString(antecedentRawStrings[i]);\n\t\t\t\tjsonArray += \"{ \\\"antecedentRawString\\\" : \\\"\"+ currAntecedentRawString +\"\\\" , \\\"antecedentURI\\\" : \\\"\"+ antecedentURIs[i] +\"\\\" \";\n\t\t\t\tif(antecedentCachedThumbURL[i] != null)\n\t\t\t\t\tjsonArray +=\", \\\"antecedentCachedThumbURL\\\" : \\\"\"+antecedentCachedThumbURL[i]+\"\\\" , \\\"antecedentConclusionURL\\\" : \\\"\"+antecedentConclusionURL[i]+\"\\\" }, \";\n\t\t\t\telse\n\t\t\t\t\tjsonArray +=\", \\\"antecedentCachedThumbURL\\\" : null , \\\"antecedentConclusionURL\\\" : \\\"\"+antecedentConclusionURL[i]+\"\\\" }, \";\n\t\t\t}\n\n\t\t\tString currAntecedentRawString = JSONUtils.toValidJSONString(antecedentRawStrings[i]);\n\t\t\t//insert last element and close the array.\n\t\t\tjsonArray += \"{ \\\"antecedentRawString\\\" : \\\"\"+ currAntecedentRawString +\"\\\" , \\\"antecedentURI\\\" : \\\"\"+ antecedentURIs[i] +\"\\\" \";\n\t\t\tif(antecedentCachedThumbURL[i] != null)\n\t\t\t\tjsonArray +=\", \\\"antecedentCachedThumbURL\\\" : \\\"\"+antecedentCachedThumbURL[i]+\"\\\" , \\\"antecedentConclusionURL\\\" : \\\"\"+antecedentConclusionURL[i]+\"\\\" } ]\";\n\t\t\telse\n\t\t\t\tjsonArray +=\", \\\"antecedentCachedThumbURL\\\" : null , \\\"antecedentConclusionURL\\\" : \\\"\"+antecedentConclusionURL[i]+\"\\\" } ]\";\n\n\n\t\t\tjson += \", \\\"antecedents\\\" : \"+ jsonArray;//+\", \";\n\n\t\t}\n\t\telse \n\t\t\tjson += \", \\\"antecedents\\\" : null\";//+\", \";\n\n\t\t//Metadata\n\t\t//json += \", \\\"metadata\\\" : \"+ ;\n\n\t\t//Assertions\n\t\t//json += \", \\\"assertions\\\" : \"+ ;\n\n\t\treturn \"{ \"+ json +\" }\";\n\t}",
"public JSONObject toJSON() {\n return toJSON(true);\n }",
"public String toJSON() {\n return new Gson().toJson(this);\n }",
"@Override\n @SuppressWarnings(\"unchecked\")\n public JSONObject toJSON() {\n JSONObject main = new JSONObject();\n JSONObject pocJSON = new JSONObject();\n pocJSON.put(JSON_NAME, this.getName());\n pocJSON.put(JSON_DESCRIPTION, this.getDescription());\n pocJSON.put(JSON_COLOR,this.colorConstraint.getColor().name());\n main.put(SharedConstants.TYPE, SharedConstants.PRIVATE_OBJECTIVE_CARD);\n main.put(SharedConstants.BODY,pocJSON);\n return main;\n }",
"protected JSONObject getJsonRepresentation() throws Exception {\n\n JSONObject jsonObj = new JSONObject();\n jsonObj.put(\"name\", getName());\n return jsonObj;\n }",
"byte[] toJson(Object object) throws Exception {\r\n return this.mapper.writeValueAsString(object).getBytes();\r\n }",
"@Override\r\n\tpublic JSONObject buildJson() {\n\t\tJSONObject json = new JSONObject();\r\n\t\ttry {\r\n\t\t\tsetInt(json,d_type,type);\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogUtil.log.error(e.getMessage(),e);\r\n\t\t}\r\n\t\treturn json;\r\n\t}",
"public JSONObject transformer() {\n JSONObject jsonObject = new JSONObject();\n JSONArray listening = new JSONArray();\n JSONArray listening_correction = new JSONArray();\n JSONArray reading = new JSONArray();\n JSONArray reading_correction = new JSONArray();\n JSONArray historique = new JSONArray();\n\n for (int i = 0; i < this.listening.size(); i++) {\n listening.put(this.listening.get(i).whoIs());\n listening_correction.put(this.listening_correction.get(i).whoIs());\n }\n\n for (int j = 0; j < this.reading.size(); j++) {\n reading.put(this.reading.get(j).whoIs());\n reading_correction.put(this.reading_correction.get(j).whoIs());\n }\n\n for(int k=0; k < this.historique.size(); k++){\n historique.put( transforme(this.historique.get(k)) );\n }\n\n try {\n jsonObject.put(\"nom\", this.nom);\n jsonObject.put(\"listening\", listening);\n jsonObject.put(\"reading\", reading);\n jsonObject.put(\"listening_correction\", listening_correction);\n jsonObject.put(\"reading_correction\", reading_correction);\n jsonObject.put(\"historique\",historique);\n jsonObject.put(\"etat\", this.etat);\n jsonObject.put(\"mode\", this.mode);\n jsonObject.put(\"est_termine\", this.est_termine);\n jsonObject.put(\"chronometre\", this.chronometre);\n Log.i(\"jsonObject\",jsonObject.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return jsonObject;\n }",
"public String toJson() {\n StringBuilder sb = new StringBuilder();\n //With resources try-catch should auto close\n //TODO: Might be fun to throw garbage at this just to confirm\n try (FileInputStream fis = new FileInputStream(excelFile)) {\n XSSFWorkbook workBook = new XSSFWorkbook(fis);\n XSSFSheet sheet = workBook.getSheetAt(0);\n Iterator<Row> rowIterator = sheet.iterator();\n\n List<List<String>> sheetDataTable = loadSheetDataTable(sheet);\n sb.append(exportJSONStringFromSheetData(sheetDataTable));\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return sb.toString();\n }",
"public String toJson() {\n return this.toJson(SerializationFormattingPolicy.None);\n }",
"@Override\r\n\tpublic String toJsonString() {\n\t\treturn null;\r\n\t}",
"protected JSONArray individualsToJson(List<Individual> individuals) throws ServletException {\n try{\n \tJSONArray ja = new JSONArray();\n \tfor (Individual ent: individuals) {\n JSONObject entJ = new JSONObject();\n entJ.put(\"name\", ent.getName());\n entJ.put(\"URI\", ent.getURI());\n ja.put( entJ );\n }\n \treturn ja;\n }catch(JSONException ex){\n throw new ServletException(\"could not convert list of Individuals into JSON: \" + ex);\n }\n }",
"public JsonObject toJson() {\n JsonObject json = new JsonObject();\n putIfNotNull(json, \"bounceAddress\", bounceAddress);\n putIfNotNull(json, \"from\", from);\n putIfNotNull(json, \"to\", to);\n putIfNotNull(json, \"cc\", cc);\n putIfNotNull(json, \"bcc\", bcc);\n putIfNotNull(json, \"subject\", subject);\n putIfNotNull(json, \"text\", text);\n putIfNotNull(json, \"html\", html);\n if (attachment != null) {\n JsonArray array = new JsonArray();\n for (MailAttachment a : attachment) {\n array.add(a.toJson());\n }\n json.put(\"attachment\", array);\n }\n if (headers != null) {\n json.put(\"headers\", multiMapJson(headers));\n }\n if (fixedHeaders) {\n json.put(\"fixedheaders\", true);\n }\n return json;\n }",
"private String toJson(PredictionsList plist) {\n\tString json = \"If you see this, there's a problem.\";\n\ttry {\n\t json = new ObjectMapper().writeValueAsString(plist);\n\t}\n\tcatch(Exception e) { }\n\treturn json;\n }",
"public String CriteriatoJson() {\n\t\t\tJsonb jsonb = JsonbBuilder.create((new JsonbConfig().withFormatting(true)));\n\t\t \tString json = jsonb.toJson(criteria);\n\t\t\treturn json;\n\n\t }",
"public JSONObject toJSON() {\r\n return toJSON(new JSONObject());\r\n }",
"public JSObject exportToJson(String mode) {\n JsonSQLite inJson = new JsonSQLite();\n JSObject retObj = new JSObject();\n inJson.setDatabase(dbName.substring(0, dbName.length() - 9));\n inJson.setEncrypted(encrypted);\n inJson.setMode(mode);\n JsonSQLite retJson = createJsonTables(inJson);\n // retJson.print();\n ArrayList<String> keys = retJson.getKeys();\n if (keys.contains(\"tables\")) {\n retObj.put(\"database\", retJson.getDatabase());\n retObj.put(\"encrypted\", retJson.getEncrypted());\n retObj.put(\"mode\", retJson.getMode());\n retObj.put(\"tables\", retJson.getTablesAsJSObject());\n }\n return retObj;\n }",
"public JSONObject toJSON() throws JSONException {\n JSONObject jo = new JSONObject();\n jo.put(ID, id);\n jo.put(NAME, displayName);\n jo.put(TIMESTAMP, syncTimestamp);\n jo.put(LASTIP, lastIP);\n JSONArray records = new JSONArray();\n Collection<DeletedSecret> deleted = deletedSecrets.values();\n for (DeletedSecret deletedSecret : deleted) {\n records.put(deletedSecret.toJSON());\n }\n jo.put(\"ds\", records);\n return jo;\n }",
"public JSONObject jsonSerialize() {\n JSONObject jsonObject = new JSONObject();\n\n // Serialize the UrlDevices\n JSONArray urlDevices = new JSONArray();\n for (UrlDevice urlDevice : mDeviceIdToUrlDeviceMap.values()) {\n urlDevices.put(urlDevice.jsonSerialize());\n }\n jsonObject.put(DEVICES_KEY, urlDevices);\n\n // Serialize the URL metadata\n JSONArray metadata = new JSONArray();\n for (PwsResult pwsResult : mBroadcastUrlToPwsResultMap.values()) {\n metadata.put(pwsResult.jsonSerialize());\n }\n jsonObject.put(METADATA_KEY, metadata);\n\n jsonObject.put(SCHEMA_VERSION_KEY, SCHEMA_VERSION);\n return jsonObject;\n }",
"public JSONObject toJSON() {\n\t\tJSONObject json = new JSONObject();\n\t\tjson.putOpt(ABSOLUTE_FILE_PATH, absoluteFilePath);\n\t\tjson.putOpt(RELATIVE_FILE_PATH, relativeFilePath);\n\t\tjson.putOpt(EVENT_TYPE, type);\n\t\tjson.putOpt(TIME, time);\n\t\treturn json;\n\t}",
"public String toJsonObject() {\n if (this.isEmpty()) return \"\";\n StringBuilder sb = new StringBuilder(this.filterExpression.length() + 30);\n sb.append(\"\\\"keyFilter\\\" : \\\"\");\n sb.append(this.filterExpression);\n sb.append(\"\\\"\");\n return sb.toString();\n }",
"public JSONObject toJSONObject(){\r\n\r\n JSONObject obj = new JSONObject();\r\n try {\r\n obj.put(\"lon\", this.lon);\r\n obj.put(\"addressTitle\", this.addressTitle);\r\n obj.put(\"addressStreet\", this.addressStreet);\r\n obj.put(\"category\", this.category);\r\n obj.put(\"description\", this.description);\r\n obj.put(\"name\", this.name);\r\n obj.put(\"lat\", this.lat);\r\n obj.put(\"ele\", this.ele);\r\n } catch(Exception e){\r\n // Do nothing :((\r\n }\r\n return obj;\r\n }",
"private static JsonLista toBasicJson(Lista lista) {\r\n\t\tJsonLista jsonLista = new JsonLista();\r\n\t\tapplyBasicJsonValues(jsonLista, lista);\r\n\t\treturn jsonLista;\r\n\t}"
]
| [
"0.8130834",
"0.79262704",
"0.7891567",
"0.78335464",
"0.78335464",
"0.7629053",
"0.75798935",
"0.74853814",
"0.7279326",
"0.72132796",
"0.7202501",
"0.7179532",
"0.7128874",
"0.70316786",
"0.6985033",
"0.6984452",
"0.69840723",
"0.69840723",
"0.69840723",
"0.69840723",
"0.69840723",
"0.69840723",
"0.69840723",
"0.69840723",
"0.69840723",
"0.69840723",
"0.69517416",
"0.6935673",
"0.6905039",
"0.69033045",
"0.6901095",
"0.6894977",
"0.68664324",
"0.6845252",
"0.6832489",
"0.68218017",
"0.67962027",
"0.6792541",
"0.6769786",
"0.6769786",
"0.676526",
"0.6753564",
"0.6753564",
"0.6753564",
"0.6743279",
"0.67417824",
"0.6724372",
"0.6712379",
"0.66942984",
"0.66876715",
"0.6674382",
"0.66706103",
"0.6623948",
"0.6620946",
"0.66149247",
"0.6613381",
"0.65993416",
"0.6593675",
"0.65787226",
"0.65757406",
"0.65667844",
"0.65570396",
"0.6550893",
"0.65438044",
"0.65428746",
"0.65231556",
"0.6520521",
"0.6507797",
"0.6504706",
"0.64849997",
"0.6479219",
"0.64701086",
"0.6455859",
"0.64469683",
"0.64437747",
"0.6437575",
"0.6435067",
"0.6432572",
"0.642778",
"0.64273286",
"0.6415594",
"0.6394261",
"0.63935053",
"0.6385669",
"0.63839746",
"0.63839626",
"0.63770276",
"0.6352684",
"0.6352424",
"0.6347921",
"0.6344892",
"0.6344323",
"0.6341304",
"0.63400245",
"0.6336713",
"0.6333796",
"0.6333575",
"0.63326246",
"0.6327726",
"0.6327112",
"0.6316025"
]
| 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.