query
stringlengths 7
33.1k
| document
stringlengths 7
335k
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Stores all owners in an arrayList only if they do not already exist in the arrayList | public void printOwners(){
ArrayList<String> ownerList = new ArrayList<String>();
for(RegistrationPlate plates: this.registrationList.keySet()){
if(!ownerList.contains(this.registrationList.get(plates)))
ownerList.add(this.registrationList.get(plates));
}
printAllOwners(ownerList);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setOwnerList(Collection<OwnerModel> ownerList)\r\n\t{\r\n\t\tthis.ownerList = ownerList;\r\n\t}",
"public OwnerList()\n {\n ownerList = new ArrayList<>();\n }",
"@Override\n protected void onCreate(KeyList<Ujo> list, InnerDataStore<Ujo> innerData) throws IllegalStateException {\n final Set<String> set = new HashSet<>(list.size());\n for (Key<Ujo,?> key : list) {\n final boolean unique = set.add(key.getName());\n Assert.isTrue(unique, \"The key name is not unique: {}\", key);\n }\n }",
"private static void assignMembersOwnersToMemberships(Collection<Object[]> membershipArrays) {\r\n for (Object[] membershipArray : GrouperUtil.nonNull(membershipArrays)) {\r\n assignMemberOwnerToMembership(membershipArray);\r\n } \r\n }",
"Update withOwners(List<ManagementLockOwner> owners);",
"protected int[] getOwners() {\n \t\treturn owners;\n \t}",
"@Override\n public boolean addOwner(Resident owner) {\n if (!owner.getTowns().contains(town))\n return false;\n\n return owners.add(owner);\n }",
"private void updateTrackingList(HashMap<String, ArrayList<Passenger>> pasGroupList, ArrayList<Passenger> individualList) {\n Iterator<String> iter = pasGroupList.keySet().iterator();\n while (iter.hasNext()) {\n String gName = iter.next();\n ArrayList<Passenger> group = pasGroupList.get(gName);\n groupReservedList.put(gName, new GroupOfPassenger(group, gName, group.get(1).isEconomy()));\n }\n\n for (Passenger k : individualList) {\n individualReservedList.put(k.getName(), k);\n }\n }",
"public void addFriend() {\n\n /* if (ageOK == true) {\n for (int i = 0; i < listRelationships.size(); i++) {\n if (firstFriend.equalsIgnoreCase(list.get(i).getFirstFriend())) {\n listRelationships.get(i).setFriends(secondFriend);\n System.out.println(listRelationships.get(i));\n System.out.println();\n\n } else if (secondFriend.equalsIgnoreCase(list.get(i).getSecondFriend())) {\n listRelationships.get(i).setFriends(firstFriend);\n System.out.println(listRelationships.get(i));\n System.out.println();\n }\n }\n } */\n }",
"public static void createOwnership() throws IOException {\n\t\tString cc = CCnumbers.get(random(CCnumbers.size()));\n\t\tint cid = random(SSNmap.keySet().size()) + 1;\n\t\t\n\t\twhile(ownership.get(cid) != null && (ownership.get(cid).contains(cc) || ownership.get(cid).size() > 3)){\n\t\t\tcid = random(SSNmap.keySet().size()) + 1;\n\t\t}\n\t\t\n\t\tif(ownership.get(cid) == null)\n\t\t\townership.put(cid, new ArrayList<String>());\n\t\townership.get(cid).add(cc);\n\t\t\n\t\twriter.write(\"INSERT INTO Ownership (CustomerId, CCNum, isActive) Values (\" + cid + \", '\" + cc + \"', \" + rando() + line);\n\t\twriter.flush();\n\t}",
"private void printAllOwners(ArrayList<String> ownerList){\n for(int i = 0; i < ownerList.size(); i++){\n System.out.println(ownerList.get(i));\n }\n }",
"void inPut(ArrayList<SanPham> list);",
"private static void assignBankAccounts() {\n\t\tfor (Customer customer : customerList) {\n\t\t\t//make sure customer has no current accounts before adding serialized accounts\n\t\t\tcustomer.clearAccounts();\n\t\t\t\n\t\t\tfor (BankAccount account : accountList) {\n\t\t\t\tif (account.getCustomer().getUsername().equals(customer.getUsername())) {\n\t\t\t\t\tcustomer.addAccount(account);\n\t\t\t\t} else if (account.getJointCustomer() != null\n\t\t\t\t\t\t&& account.getJointCustomer().getUsername().equals(customer.getUsername()))\n\t\t\t\t\tcustomer.addAccount(account);\n\t\t\t}\n\t\t}\n\t}",
"protected int[] getCollectionOwners() {\n \t\treturn null;\n \t}",
"private void manageIgnoredUsers(AccountDataElement accountDataElement, boolean isInitialSync) {\n List<String> newIgnoredUsers = null;\n\n // Extract the ignored users list from the account data events list.\n if (accountDataElement.content.containsKey(AccountDataElement.ACCOUNT_DATA_KEY_IGNORED_USERS)) {\n Map<String, Object> ignored_users = (Map<String, Object>) accountDataElement.content.get(AccountDataElement.ACCOUNT_DATA_KEY_IGNORED_USERS);\n\n if (null != ignored_users) {\n newIgnoredUsers = new ArrayList<>(ignored_users.keySet());\n }\n }\n\n if (null != newIgnoredUsers) {\n List<String> curIgnoredUsers = getIgnoredUserIds();\n\n // the both lists are not empty\n if ((0 != newIgnoredUsers.size()) || (0 != curIgnoredUsers.size())) {\n // check if the ignored users list has been updated\n if ((newIgnoredUsers.size() != curIgnoredUsers.size()) || !newIgnoredUsers.containsAll(curIgnoredUsers)) {\n // update the store\n mStore.setIgnoredUserIdsList(newIgnoredUsers);\n mIgnoredUserIdsList = newIgnoredUsers;\n\n if (!isInitialSync) {\n // warn there is an update\n onIgnoredUsersListUpdate();\n }\n }\n }\n }\n }",
"void transferOwnerShipToUser(List<String> list, String toEmail);",
"public void addToFollowedUsers(List<String> followedUsers);",
"public void addtofriendcollection(String userNames){\n\tString [] taggedfriendsArray = userNames.split(\" \");\n\tfor(int indks=0;indks<taggedfriendsArray.length;indks++){\n\t\tIterator<User> itr = UserCollection.userlist.iterator();\n\t\twhile(itr.hasNext()){\n\t\t\tUser element = itr.next();\n\t\t\tif(taggedfriendsArray[indks].equals(element.getUserName())){\n\t\t\t\ttaggedFriends.add(element);\n\t\t\t}\n\t\t}\n\t}\n\t\n}",
"public void addUser(ArrayList<Player> list,String U,String F,String G) {\r\n\t\tboolean flag = true;\r\n\t\tIterator<Player> aa = list.iterator();\r\n\t\twhile (aa.hasNext()) {\r\n\t\t\tPlayer in = aa.next();\r\n\t\t\tif(in.getUserName().equals(U)){\r\n\t\t\t\tSystem.out.println(\"The player already exists.\");\r\n\t\t\t\tflag =false;\r\n\t\t\t\treturn;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t\r\n\t\tif(flag)\r\n\t\t\tlist.add(new NimPlayer(U,F,G,0,0,\"Human\"));\r\n\t\tSystem.out.println(\"\");\r\n\t}",
"protected void unique() {\n List<Double> unique = new ArrayList<Double>(size());\n for (Double f : data) {\n if (!unique.contains(f)) {\n unique.add(f);\n }\n }\n this.setData(unique);\n }",
"WithCreate withOwners(List<ManagementLockOwner> owners);",
"public OrglRoot setAllOwners(ID owner) {\n\tthrow new SubclassResponsibilityException();\n/*\nudanax-top.st:9676:OrglRoot methodsFor: 'accessing'!\n{OrglRoot} setAllOwners: owner {ID}\n\t\"Return the portiong whose owner couldn't be changed.\"\n\t\t\n\tself subclassResponsibility!\n*/\n}",
"void setList(ArrayList<UserContactInfo> contactDeatailsList);",
"private List<String> convertWorkspaceUsers(\n\t\t\tfinal List<WorkspaceUser> owners) {\n\t\tfinal List<String> own = new ArrayList<String>();\n\t\tfor (final WorkspaceUser wu: owners) {\n\t\t\town.add(wu.getUser());\n\t\t}\n\t\treturn own;\n\t}",
"private void createAllUsersList(){\n\t\tunassignedUsersList.clear();\n\t\tlistedUsersAvailList.clear();\n\t\tArrayList<User> users = jdbc.get_users();\n\t\tfor (int i = 0; i < users.size(); i++) {\n\t\t\tunassignedUsersList.addElement(String.format(\"%s, %s\", users.get(i).get_lastname(), users.get(i).get_firstname()));\n\t\t\tlistedUsersAvailList.addElement(String.format(\"%s, %s\", users.get(i).get_lastname(), users.get(i).get_firstname()));\n\t\t}\n\t}",
"public void setOwnerArray(com.scene7.www.ipsapi.xsd._2016_01_14_beta.AssetArray param) {\n this.localOwnerArrayTracker = param != null;\n\n this.localOwnerArray = param;\n\n }",
"private void updateLocalPatients(){\n if (localUser == null){\n Log.d(Constants.NULL_USER_TAG, \"updateLocalPatients: local User is null\");\n return;\n }\n localPatients = new ArrayList<>();\n CollectionReference patientsCollection = db.collection(Constants.PATIENTS_COLLECTION_FIELD);\n for (final String patientId : localUser.getPatientIds()) {\n patientsCollection.document(patientId).get().addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>() {\n @Override\n public void onSuccess(DocumentSnapshot documentSnapshot) {\n // attempt to get patient\n Patient patient = documentSnapshot.toObject(Patient.class);\n if (patient == null){\n return;\n }\n // assert this patient allows local user to follow\n if (patient.hasCaregiverWithId(localUser.getId()) || patient.hasFriendWithId(localUser.getId())){\n localPatients.add(patient);\n }\n }\n });\n }\n }",
"public final void anonymize(final boolean[] list) {\r\n\r\n if (list.length != FileInfoDicom.anonymizeTagIDs.length) {\r\n throw new IllegalArgumentException(\"Anonymize list not of correct size!\");\r\n }\r\n\r\n // DICOM type 2 fields. Existance is required, although value is not.\r\n for (int i = 0; i < 2; i++) {\r\n\r\n try {\r\n\r\n if (list[i]) {\r\n\r\n for (int varIndex = 0; varIndex < getVarArray().length; varIndex++) {\r\n\r\n // System.out.println(\"looking for \" + \"dicom_0x\" +\r\n // getDicomTag(FileInfoDicom.anonymizeTagIDs[i])); System.out.println(\"found \" +\r\n // getVarElem(varIndex).name);\r\n if (getVarElem(varIndex).name.equals(\"dicom_0x\"\r\n + FileInfoMinc.getTagGroup(FileInfoDicom.anonymizeTagIDs[i]))) {\r\n\r\n for (int attIndex = 0; attIndex < getVarElem(varIndex).vattArray.length; attIndex++) {\r\n\r\n // System.out.println(\"looking for \" + \"el_0x\" +\r\n // getDicomElem(FileInfoDicom.anonymizeTagIDs[i])); System.out.println(\"found \" +\r\n // getVarElem(varIndex).getVattElem(attIndex).name);\r\n if (getVarElem(varIndex).getVattElem(attIndex).name.equals(\"el_0x\"\r\n + FileInfoMinc.getTagElem(FileInfoDicom.anonymizeTagIDs[i]))) {\r\n\r\n // System.out.println(\"want to erase \" + FileInfoDicom.anonymizeTagIDs[i] + \" -- \"\r\n // + getVarElem(varIndex).getVattElem(attIndex).toString());\r\n getVarElem(varIndex).getVattElem(attIndex).nelems = 1;\r\n getVarElem(varIndex).getVattElem(attIndex).values = new Object[] {Character.valueOf(' ')};\r\n // System.out.println(\"value now \" + FileInfoDicom.anonymizeTagIDs[i] + \" -- \" +\r\n // getVarElem(varIndex).getVattElem(attIndex).toString());\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } catch (final NullPointerException npe) {\r\n\r\n // an IllegalArgumentException is probably not right here....\r\n throw new IllegalArgumentException(\"(\" + FileInfoDicom.anonymizeTagIDs[i]\r\n + \") is a required type 2 tag.\");\r\n }\r\n }\r\n\r\n // all other fields to anonymize are DICOM type 3 fields and\r\n // are neither required to have an entry nor required to exist\r\n // in the image info.\r\n for (int i = 2; i < FileInfoDicom.anonymizeTagIDs.length; i++) {\r\n // change each of the following tags to (empty) if we are asked to anonymize this info and if the tag exists\r\n // in the hashtable.\r\n\r\n if (list[i]) {\r\n\r\n for (int varIndex = 0; varIndex < getVarArray().length; varIndex++) {\r\n\r\n // System.out.println(\"looking for \" + \"dicom_0x\" + getDicomTag(FileInfoDicom.anonymizeTagIDs[i]));\r\n // System.out.println(\"found \" + getVarElem(varIndex).name);\r\n if (getVarElem(varIndex).name.equals(\"dicom_0x\"\r\n + FileInfoMinc.getTagGroup(FileInfoDicom.anonymizeTagIDs[i]))) {\r\n\r\n for (int attIndex = 0; attIndex < getVarElem(varIndex).vattArray.length; attIndex++) {\r\n\r\n // System.out.println(\"looking for \" + \"el_0x\" +\r\n // getDicomElem(FileInfoDicom.anonymizeTagIDs[i])); System.out.println(\"found \" +\r\n // getVarElem(varIndex).getVattElem(attIndex).name);\r\n if (getVarElem(varIndex).getVattElem(attIndex).name.equals(\"el_0x\"\r\n + FileInfoMinc.getTagElem(FileInfoDicom.anonymizeTagIDs[i]))) {\r\n\r\n // System.out.println(\"want to erase \" + FileInfoDicom.anonymizeTagIDs[i] + \" -- \" +\r\n // getVarElem(varIndex).getVattElem(attIndex).toString());\r\n getVarElem(varIndex).getVattElem(attIndex).nelems = 0;\r\n getVarElem(varIndex).getVattElem(attIndex).values = new Object[] {};\r\n // System.out.println(\"value now \" + FileInfoDicom.anonymizeTagIDs[i] + \" -- \" +\r\n // getVarElem(varIndex).getVattElem(attIndex).toString());\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n // *** anonymize fields which may be saved directly in the minc var format (but not converted from dicom tags)\r\n for (int i = 0; i < FileInfoDicom.anonymizeTagIDs.length; i++) {\r\n\r\n if (list[i] && (FileInfoMinc.dicomToMincVarMap[i] != null)) {\r\n\r\n for (int varIndex = 0; varIndex < getVarArray().length; varIndex++) {\r\n\r\n // System.out.println(\"looking for \" + getTagGroup(FileInfoMinc.dicomToMincVarMap[i]));\r\n // System.out.println(\"found \" + getVarElem(varIndex).name);\r\n if (getVarElem(varIndex).name.equals(FileInfoMinc.getTagGroup(FileInfoMinc.dicomToMincVarMap[i]))) {\r\n\r\n for (int attIndex = 0; attIndex < getVarElem(varIndex).vattArray.length; attIndex++) {\r\n\r\n // System.out.println(\"looking for \" + getTagElem(FileInfoMinc.dicomToMincVarMap[i]));\r\n // System.out.println(\"found \" + getVarElem(varIndex).getVattElem(attIndex).name);\r\n if (getVarElem(varIndex).getVattElem(attIndex).name.equals(FileInfoMinc\r\n .getTagElem(FileInfoMinc.dicomToMincVarMap[i]))) {\r\n\r\n // System.out.println(\"want to erase \" + FileInfoMinc.dicomToMincVarMap + \" -- \" +\r\n // getVarElem(varIndex).getVattElem(attIndex).toString());\r\n getVarElem(varIndex).getVattElem(attIndex).nelems = 0;\r\n getVarElem(varIndex).getVattElem(attIndex).values = new Object[] {};\r\n // System.out.println(\"value now \" + FileInfoMinc.dicomToMincVarMap + \" -- \" +\r\n // getVarElem(varIndex).getVattElem(attIndex).toString());\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n // this fileInfo is now an expurgated/sanitised version\r\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Owner)) {\n return false;\n }\n Owner other = (Owner) object;\n if ((this.ownerId == null && other.ownerId != null) || (this.ownerId != null && !this.ownerId.equals(other.ownerId))) {\n return false;\n }\n return true;\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Owner)) {\n return false;\n }\n Owner other = (Owner) 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 List<TradeGood> uniqueList(TradeGood[] cargoArr) {\n List<TradeGood> uniqueGoods = new ArrayList<>();\n\n for (int i = 0; i < cargoArr.length; i++) {\n boolean inUniqueList = false;\n if(cargoArr[i] != null) {\n for (int j = 0; j < uniqueGoods.size(); j++) {\n if(cargoArr[i].equals(uniqueGoods.get(j))) {\n inUniqueList = true;\n }\n }\n if(!inUniqueList) {\n uniqueGoods.add(cargoArr[i]);\n }\n }\n }\n return uniqueGoods;\n }",
"private void createUploadList() {\n\t\tfor (int i=0; i<students.size(); i++) {\n\t\t\tif (students.get(i).status == false) {\n\t\t\t\tuploadStudents.add(students.get(i));\n\t\t\t}\n\t\t}\n\t}",
"private void addFriendList(People value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureFriendListIsMutable();\n friendList_.add(value);\n }",
"@Override\n\tpublic Identifier[] getStrongOwners() {\n\t\treturn new Identifier[0];\n\t}",
"public static void checkForPeopleInShelters() {\n\t\tfor(int i=0; i<vertexMatrix.length; i++){\n\t\t\tif (shelters[i])\n\t\t\t\tpeopleToSave[i]=0;\t\t\n\t\t}\n\t}",
"void createOrUpdateSroAssociatedObligations(List<PsdSroAssocOblig> listPsdSroAssocOblig);",
"public static ArrayList<String> saveDuplicates(ArrayList<String> arlList) {\n // this functions save all duplicated in an Array.\n\n Set<String> set = new HashSet<String>();\n List<String> newList = new ArrayList<String>();\n List<String> newListDuplicates = new ArrayList<String>();\n for (Iterator<String> iter = arlList.iterator(); iter.hasNext();) {\n String element = iter.next();\n if (set.add(element))\n newList.add(element);\n else {\n newListDuplicates.add(element);\n }\n }\n arlList.clear();\n arlList.addAll(newListDuplicates);\n return arlList;\n }",
"void commitShadowList() {\n int shadowNextIdx = 0;\n for(int i = 0, j = 0; i < nextIdx && j < shadowList.size(); i++){\n if(actualList.get(i).equals(shadowList.get(j))){\n // replace the shadow list's element with actual list's element to persist execution state\n shadowList.set(j, actualList.get(i));\n j++;\n shadowNextIdx++;\n } else if(j != 0){\n break;\n }\n }\n List<Action> tmpList = shadowList;\n shadowList = actualList;\n actualList = tmpList;\n nextIdx = shadowNextIdx;\n shadowList.clear();\n }",
"Boolean updateList(List<Customer> list);",
"void loadOwners() {\n synchronized (getLockObject()) {\n mOwners.load();\n setDeviceOwnershipSystemPropertyLocked();\n if (mOwners.hasDeviceOwner()) {\n setGlobalSettingDeviceOwnerType(\n mOwners.getDeviceOwnerType(mOwners.getDeviceOwnerPackageName()));\n }\n }\n }",
"@Override\n\tpublic boolean hasStrongOwners() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic int getAnnonymousOwners() {\n\t\treturn 0;\n\t}",
"public void setAchievments(ArrayList<Achievment> arrayList) {\r\n\t\tDB db = new DB();\r\n\t\tTransaction trans = db.session.beginTransaction();\r\n\t\ttry {\r\n\t\t\tfor (Achievment achiev : arrayList)\r\n\t\t\t\tdb.session.saveOrUpdate(achiev);\r\n\t\t\ttrans.commit();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\ttrans.rollback();\r\n\t\t}\r\n\t}",
"private void checkNoDataObjectsWithConflictingNames(final Collection<String> objectNames, final ObjectIdentity<?> targetLocationIdentity) throws InsightServiceException, ServiceException {\n final Collection<String> conflictingNames = getConflictingNamesInRepository(objectNames, targetLocationIdentity);\n if (!conflictingNames.isEmpty()) {\n throw new InsightServiceException(InsightServiceException.Code.I_DUPLICATE_OBJECT, getOriginalConflictingName(objectNames, getFirst(conflictingNames)));\n }\n }",
"private List<ItemModel> addList() {\n List<ItemModel> items = new ArrayList<>();\n\n managerlist = new ArrayList(strangerList);\n for(int i = 0; i < managerlist.size(); i++)\n if(managerlist.get(i).getId().equals(mPI.getId())) {\n managerlist.remove(i);\n break;\n }\n for(PersonalInformation i : managerlist){\n items.add(new ItemModel(i.getGraph(), i.getName(), i.getCity(), i.getAge()));\n }\n return items;\n }",
"public void updateOwners() {\n\t\tbuyOrder.getOwner().executedOrder(buyOrder,this);\n\t\tsellOrder.getOwner().executedOrder(sellOrder,this);\n\t}",
"private void addOwnersToTable(List<Owner> ownerList)\n {\n for (int i = 0; i < ownerList.size(); i++)\n {\n TableRow row = new TableRow(this);\n TableRow.LayoutParams lp = new TableRow.LayoutParams(TableRow.LayoutParams.FILL_PARENT, 30);\n\n row.setLayoutParams(lp);\n\n TextView name = new TextView(this);\n name.setText(ownerList.get(i).Name);\n name.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);\n name.setTextSize(20);\n\n\n TextView city = new TextView(this);\n city.setText(ownerList.get(i).City);\n city.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);\n city.setTextSize(20);\n\n\n TextView state = new TextView(this);\n state.setText(ownerList.get(i).State);\n state.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);\n state.setTextSize(20);\n\n\n row.addView(name);\n row.addView(city);\n row.addView(state);\n if(i%2 ==0)\n {\n row.setBackgroundColor(getResources().getColor(R.color.evenRowBackground));\n }\n table.addView(row, i);\n }\n scrollView.addView(table);\n }",
"private boolean duplicationCheck(String userName) {\n\t\tboolean ret = true;\n\t\tif(obs.isEmpty()) {\n\t\t\tret = true;\n\t\t}\n\t\telse {\n\t\t\tfor(int i=0; i<obs.size(); i++) {\n\t\t\t\tif(obs.get(i).getUserName().compareTo(userName) == 0) {\n\t\t\t\t\tret = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tret = true;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}",
"public void updateList(ArrayList<String> users) {\n System.out.println(\"Updating the list...\");\n listModel.removeAllElements();\n userArrayList = users;\n int index = userArrayList.indexOf(user);\n if(index >= 0) {\n \tuserArrayList.remove(index);\n }\n for(int i=0; i<userArrayList.size(); i++){\n\t\t System.out.println(\"Adding to GUI List: \" + userArrayList.get(i));\n\t\t listModel.addElement(userArrayList.get(i));\n }\n userList.repaint();\n \n if(listModel.size() == 0) {\n \tJOptionPane.showMessageDialog(null,\"There are no other members registered on the server.\");\n\t \tfrmMain.dispatchEvent(new WindowEvent(frmMain, WindowEvent.WINDOW_CLOSING));\n }\n }",
"private void setPartyList(List<String> partyList, PolicyHeader policyHeader, String viewName) {\r\n if (!EXCLUDE_PARTY.equalsIgnoreCase(viewName)) {\r\n RecordSet underWriterRS = loadUnderwriterInformation(policyHeader);\r\n RecordSet agentRecordSet = loadAgentInformation(new Record(), policyHeader);\r\n Record policyRec = loadPolicyInformation(new Record(), policyHeader);\r\n\r\n Iterator underWriterIte = underWriterRS.getRecords();\r\n String partyNumberId = \"\";\r\n while (underWriterIte.hasNext()) {\r\n Record record = (Record) underWriterIte.next();\r\n partyNumberId = record.getStringValue(\"entityId\", \"\");\r\n if (!partyList.contains(partyNumberId)) {\r\n partyList.add(partyNumberId);\r\n }\r\n }\r\n\r\n Iterator agentRSIte = agentRecordSet.getRecords();\r\n while (agentRSIte.hasNext()) {\r\n Record record = (Record) agentRSIte.next();\r\n partyNumberId = record.getStringValue(\"entityId\", \"\");\r\n if (!partyList.contains(partyNumberId)) {\r\n partyList.add(partyNumberId);\r\n }\r\n }\r\n\r\n String issueCompany = policyRec.getStringValue(\"issueCompanyEntityId\", \"\");\r\n if (!partyList.contains(issueCompany)) {\r\n partyList.add(issueCompany);\r\n }\r\n\r\n String policyHolderEntityId = policyHeader.getPolicyHolderNameEntityId();\r\n if (!partyList.contains(policyHolderEntityId)) {\r\n partyList.add(policyHolderEntityId);\r\n }\r\n }\r\n }",
"public void addUsers(String[] array) {\n\n boolean existingUser = false;\n int newUser;\n ArrayList<Integer> userList;\n\n if(userObservers.containsKey(array[1])) {\n addObserver(userObservers.get(array[1]));\n users.add(array[1]);\n existingUser = false;\n }\n\n if(array.length > 2){\n String[] otherUsers = array[2].split(nameSeparator);\n\n for(int i = 0; i < otherUsers.length; i++) {\n addObserver(userObservers.get(otherUsers[i]));\n users.add(otherUsers[i]);\n }\n }\n }",
"public boolean addUsers(List<User> users);",
"public AINotebookEntry(List<Player> possibleOwners) {\n\t\tthis.possibleOwners = new ArrayList<Player>(possibleOwners);\n\t\tthis.possibleOwners.add(CASE_FILE_PLAYER);\n\t\towner = null;\n\t}",
"List<ManagementLockOwner> owners();",
"public void testAssignBlogOwners() {\n rootBlog.setProperty(SimpleBlog.BLOG_OWNERS_KEY, \"user1\");\n assertEquals(\"user1\", rootBlog.getProperty(SimpleBlog.BLOG_OWNERS_KEY));\n assertEquals(\"user1\", rootBlog.getBlogOwners());\n\n Collection users = rootBlog.getUsersInRole(Constants.BLOG_OWNER_ROLE);\n assertEquals(1, users.size());\n assertTrue(users.contains(\"user1\"));\n\n rootBlog.setProperty(SimpleBlog.BLOG_OWNERS_KEY, \"user1,user2\");\n assertEquals(\"user1,user2\", rootBlog.getProperty(SimpleBlog.BLOG_OWNERS_KEY));\n assertEquals(\"user1,user2\", rootBlog.getBlogOwners());\n\n users = rootBlog.getUsersInRole(Constants.BLOG_OWNER_ROLE);\n assertEquals(2, users.size());\n assertTrue(users.contains(\"user1\"));\n assertTrue(users.contains(\"user2\"));\n }",
"public void addAI(ArrayList<Player> list,String U,String F,String G) {\r\n\t\tboolean flag = true;\r\n\t\tIterator<Player> aa = list.iterator();\r\n\t\twhile (aa.hasNext()) {\r\n\t\t\tPlayer in = aa.next();\r\n\t\t\tif(in.getUserName().equals(U)){\r\n\t\t\t\tSystem.out.println(\"The player already exists.\");\r\n\t\t\t\tflag =false;\r\n\t\t\t\treturn;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\tif(flag)\r\n\t\t\tlist.add(new NimAIPlayer(U,F,G,0,0,\"AI\"));\r\n\t\tSystem.out.println(\"\");\r\n\t}",
"@Override\r\n\tpublic List<OwnerVO> ownerList() {\n\t\treturn adao.OwnerList();\r\n\t}",
"private static void removeExistingFromResults(List<Author> resultList, List<String> existingList) {\n\n // Check that existingList is not null\n if (existingList == null) return;\n\n // Remove items from resultList that are already in the user's friend/follow list\n for (String userId : existingList) {\n for (int i = resultList.size() - 1; i >= 0; i--) {\n Author user = resultList.get(i);\n\n if (user.firebaseId.equals(userId)) {\n resultList.remove(user);\n break;\n }\n }\n }\n }",
"public void createInfoForDeleteInfo(){\n List<String> usernameList=userService.getAllUsers().stream().map(User::getName).collect(Collectors.toList());\n List<String> liveNameList=liveLessonDao.getAllLiveLessonTable().stream().map(LiveLessonTable::getUsername).collect(Collectors.toList());\n for(String a:usernameList){\n if(!liveNameList.contains(a))\n createLiveLessonTableForSignUp(a);\n }\n }",
"private void clearLists(){\r\n\t\tfor(int i=0; i<potentialFriends.length; i++){\r\n\t\t\tpotentialFriends[i] = null;\r\n\t\t}\r\n\t\tfor(int i=0; i<mutualNum.length; i++){\r\n\t\t\tmutualNum[i] = -1;\r\n\t\t}\r\n\t}",
"public boolean insertAuthoredByTable(int itemID, ArrayList<String> authors) {\n\t\tfor (int i = 0; i < authors.size(); ++i) {\n\t\t\tString author = authors.get(i);\n\t\t\tString sqlCheckAuthor = \"select * from Authors where AuthorName = ?\";\n\t\t\tString sqlAuthors = \"insert into Authors (AuthorName) values (?)\";\n\t\t\tString sqlAuthorID = \"select AuthorID from Authors where AuthorName = ?\";\n\t\t\tString sqlAuthoredByCheck = \"select * from AuthoredBy where AuthorID = ? and ItemID = ?\";\n\t\t\tString sqlAuthoredBy = \"insert into AuthoredBy (AuthorID, ItemID) values (?,?)\";\n//\t\t\tString sqlGraphStore = \"insert into GraphStore (Subject, Object) values (?,?)\";\n\t\t\tint authorID = 0;\n\t\t\ttry {\n\t\t\t\tConnection connection = dataSource.getConnection();\n\t\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(sqlCheckAuthor);\n\t\t\t\tpreparedStatement.setString(1, author);\n\t\t\t\tResultSet resultSetCheck = preparedStatement.executeQuery();\n\t\t\t\tint size = 0;\n\t\t\t\tif (resultSetCheck != null) {\n\t\t\t\t\tresultSetCheck.beforeFirst();\n\t\t\t\t\tresultSetCheck.last();\n\t\t\t\t\tsize = resultSetCheck.getRow();\n\t\t\t\t}\n\t\t\t\tif (size == 0) {\t// no duplicate record in Authors table\n\t\t\t\t\tpreparedStatement = connection.prepareStatement(sqlAuthors);\n\t\t\t\t\tpreparedStatement.setString(1, author);\n\t\t\t\t\tpreparedStatement.execute();\n\t\t\t\t\t\n\t\t\t\t\tString subject = \"A\" + authorID;\n\t\t\t\t\tEntityStoreDAO entityStoreDAO = new EntityStoreDAO();\n\t\t\t\t\tentityStoreDAO.insertRecord(subject, \"AuthorName\", author);\n\t\t\t\t}\n\t\t\t\tpreparedStatement = connection.prepareStatement(sqlAuthorID);\n\t\t\t\tpreparedStatement.setString(1, author);\n\t\t\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\t\twhile (resultSet.next()) {\n\t\t\t\t\tauthorID = resultSet.getInt(\"AuthorID\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// check\n\t\t\t\tpreparedStatement = connection.prepareStatement(sqlAuthoredByCheck);\n\t\t\t\tpreparedStatement.setInt(1, authorID);\n\t\t\t\tpreparedStatement.setInt(2, itemID);\n\t\t\t\tResultSet resultSetCheckAuthors = preparedStatement.executeQuery();\n\t\t\t\tsize = 0;\n\t\t\t\tif (resultSetCheckAuthors != null) {\n\t\t\t\t\tresultSetCheckAuthors.beforeFirst();\n\t\t\t\t\tresultSetCheckAuthors.last();\n\t\t\t\t\tsize = resultSetCheckAuthors.getRow();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (size == 0) {\n\t\t\t\t\tpreparedStatement = connection.prepareStatement(sqlAuthoredBy);\n\t\t\t\t\tpreparedStatement.setInt(1, authorID);\n\t\t\t\t\tpreparedStatement.setInt(2, itemID);\n\t\t\t\t\tpreparedStatement.execute();\n\t\t\t\t}\n\t\t\t\t// insert into GraphStore\n//\t\t\t\tpreparedStatement = connection.prepareStatement(sqlGraphStore);\n\t\t\t\tString subject = \"I\" + Integer.toString(itemID);\n\t\t\t\tString object = \"A\" + Integer.toString(authorID);\n\t\t\t\tGraphStoreDAO graphStoreDAO = new GraphStoreDAO();\n\t\t\t\tgraphStoreDAO.insertRecord(subject, object);\n//\t\t\t\tpreparedStatement.setString(1, subject);\n//\t\t\t\tpreparedStatement.setString(2, object);\n//\t\t\t\tpreparedStatement.execute();\n\t\t\t\tconnection.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn false;\n\t}",
"private static void addObjectsInList () {\n //Create objects Users\n User userFirst = new User (1, \"Иван\", \"Иванович\", \"Иванов\", \"MC234567, 15.08.2010\", \"г. Жодино, ул. Калиновского 5-8\",\n \"+375296785643\", \"ivan\", \"123\", \"[email protected]\", 2);\n User userSecond = new User (2, \"Петр\", \"Петрович\", \"Петров\", \"MC 456789, 12.06.1999\", \"г. Минск, ул. Энгельса 6-8\",\n \"+375447774323\", \"petr\", \"456\", \"[email protected]\", 1);\n users.add(userFirst);\n users.add(userSecond);\n //Create object Role\n Role roleFirst = new Role (1,\"Admin\");\n Role roleSecond = new Role (2,\"User\");\n roles.add(roleFirst);\n roles.add(roleSecond);\n //Create object Account\n Account accountFirst = new Account(1, 250, \"Working\", 1);\n Account accountSecond = new Account(2, 547, \"Working\", 1);\n Account accountThird = new Account(3, 3456, \"Working\", 1);\n accounts.add(accountFirst);\n accounts.add(accountSecond);\n accounts.add(accountThird);\n //Create object payment\n Payment paymentFirst = new Payment (1, 1, \"Перевод средств\",2, Date.valueOf(\"2016-07-13\"), 50);\n Payment paymentSecond = new Payment (2, 3, \"Перевод средств\",1, Date.valueOf(\"2016-07-01\"), 100);\n Payment paymentThird = new Payment (3, 2, \"Перевод средств\",1, Date.valueOf(\"2016-06-06\"), 10);\n payments.add(paymentFirst);\n payments.add(paymentSecond);\n payments.add(paymentThird);\n }",
"com.microsoft.schemas.crm._2011.contracts.ArrayOfAppointmentsToIgnore addNewAppointmentsToIgnore();",
"private void compareSavedUser( ArrayList<NetworkGPS.UserFetchedGPS> fetched) throws IOException, JSONException {\n for(int i=0; i< fetched.size(); i++)\n {\n NetworkGPS.UserFetchedGPS curFetched = fetched.get(i);\n if(userList.containsKey(curFetched.facebookId))\n {\n UserMap curUser = userList.get(curFetched.facebookId);\n curUser.position = new LatLng(curFetched.latitude,curFetched.longitude);\n }\n else\n {\n networkGPS.fetchUserPicture(curFetched.facebookId);\n UserMap curUser = new UserMap();\n curUser.position = new LatLng(curFetched.latitude,curFetched.longitude);\n curUser.facebookId = curFetched.facebookId;\n curUser.icon = createMarker(new BitmapDrawable(getResources(), networkGPS.getLastPicture()));\n userList.put(curFetched.facebookId,curUser);\n }\n }\n }",
"private void addUsers(List<String> userList, SubscriptionList subscriptionList, SubscriptionEventType eventType) {\n\t\tSubscription subscription = null;\n\t\t\n\t\tfor (Subscription s : subscriptionList.getSubscription()) {\n\t\t\tif (s.getEventType() == eventType) {\n\t\t\t\tsubscription = s;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (subscription != null) {\n\t\t\tfor (String userId : subscription.getUser()) {\n\t\t\t\tif (!userList.contains( userId )) {\n\t\t\t\t\tuserList.add( userId );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void createUserListQual() {\n\t\tuserListAvailQual.clear();\n\t\tArrayList<User> users = jdbc.get_users();\n\t\tfor (int i = 0; i < users.size(); i++) {\n\t\t\tuserListAvailQual.addElement(String.format(\"%s, %s [%s]\", users.get(i).get_lastname(), users.get(i).get_firstname(), users.get(i).get_username()));\n\t\t}\n\t}",
"static void findDuplicate()\n\t{\n\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\toList = new ArrayList<String>();\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Dog\");\n\t\t\toList.add(\"Eagle\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\tSystem.out.println(oList);\n\t\t\t\n\t\t\toSet = new TreeSet<>();\n\t\t\t\n\t\t\tString s = \"\";\n\t\t\tfor(int i=0;i<oList.size();i++)\n\t\t\t{\n\t\t\t\tif((oSet.add(oList.get(i))==false) && (!s.contains(oList.get(i))))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Duplicate: \"+oList.get(i));\n\t\t\t\t\ts+=oList.get(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toList = null;\n\t\t\toSet = null;\n\t\t}\n\t}",
"@Override\n\tpublic void onUserListUpdate(User listOwner, UserList list) {\n\n\t}",
"@Override\n\tpublic String[] getOutsideOwners() {\n\t\treturn new String[0];\n\t}",
"public boolean addList(ArrayList<Npcinfo> NpcinfoList);",
"public void StoreUsers(ArrayList<User> usersList) {\r\n\t\ttry {\r\n\t\t\tfw = new FileWriter(\".\\\\data\\\\users.txt\"); // writes data into\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// \\\\data\\\\books.txt\r\n\t\t\tbw = new BufferedWriter(fw);\r\n\r\n\t\t\tfor (int i = 0; i < usersList.size(); i++) { // for loop will run\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// till\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the size of the\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// array\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// list usersList\r\n\t\t\t\tString content = \"\"; // Content is declared as String\r\n\t\t\t\tUser user = usersList.get(i); // Gets content of the array list\r\n\t\t\t\tcontent += user.getId() + \"::\"; // Gets ID of the Member and\r\n\t\t\t\t\t\t\t\t\t\t\t\t// adds ::\r\n\t\t\t\tcontent += user.getName() + \"::\"; // Gets Name of the Member and\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// adds ::\r\n\t\t\t\tcontent += user.getNumBooksBorrowed() + \"::\"; // Gets Number of\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Books\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Borrowed of\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the Member\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// and adds ::\r\n\t\t\t\tcontent += user.getPhone() + \"::\"; // Gets Phone Number of the\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Member and adds ::\r\n\t\t\t\tcontent += user.getreturndate() + \"\\n\"; // Gets Return Date of\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the Member\r\n\r\n\t\t\t\tbw.write(content); // writes the content of the Members in the\r\n\t\t\t\t\t\t\t\t\t// text file\r\n\r\n\t\t\t}\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Complete storing all users!\", \"Store Users\",\r\n\t\t\t\t\tJOptionPane.PLAIN_MESSAGE); // confirms with a message that\r\n\t\t\t\t\t\t\t\t\t\t\t\t// the Members are stored\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (bw != null)\r\n\t\t\t\t\tbw.close();\r\n\t\t\t\tif (fw != null)\r\n\t\t\t\t\tfw.close();\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private boolean checkUserNameExists(ArrayList<Member> members) throws Exception {\nfor(Member member:members) {\nif(this.userName.equals(member.userName)){\nreturn true;\n}\n}\nreturn false;\n}",
"public void addAuthor(Author a)\n {\n boolean unique = true;\n \n for(Author x : authors)\n {\n if(x == a)\n {\n unique = false;\n }\n }\n \n if(unique)\n {\n authors.add(a);\n }\n }",
"public List<String> getPropertyOwners();",
"public static void checkForAgentsWithPeopleInCar() {\n\t\tfor(int i=0; i<numOfAgents; i++) {\n\t\t\tagents[i].peopleInCar += peopleToSave[agents[i].position];\n\t\t\tpeopleToSave[agents[i].position]=0;\n\t\t}\n\t}",
"public static void notifyCitizen(ArrayList<Record> exposed){\n int i,j;\n String usernameE, usernameC;\n\n for(i=0;i<exposed.size();i++)\n {\n usernameE = exposed.get(i).getUsername();\n for(j=0;j<accounts.size();j++)\n {\n usernameC = accounts.get(j).getUsername();\n\n if(usernameE.equals(usernameC)){\n accounts.get(j).setExposed();\n }\n }\n }\n }",
"private void setIsNoted(ArrayList<OrderItem> oil) {\n if (oil != null) {\n int size = oil.size();\n isNoted = new boolean[size];\n\n for (int i = 0; i < size; i++) {\n isNoted[i] = !oil.get(i).getNote().equals(\"\");\n }\n }\n }",
"private void addRestaurantsToTheList(JSONArray jsonArray, List<Restaurant> restaurantsList) {\n\t\tfor (int i = 0; i < jsonArray.length(); i++) {\n\t\t\ttry {\n\t\t\t\tJSONObject jsonObject = jsonArray.getJSONObject(i);\n\t\t\t\tRestaurant restaurant = new Restaurant(jsonObject);\n\t\t\t\trestaurantsList.add(restaurant);\n\t\n\t\t\t\t// Check if the restaurant already exists in the hashMap\n\t\t\t\t// If not, insert it into the temporal hashmap\n\t\t\t\t// and the database\n\t\t\t\tif (!restaurants.containsKey(restaurant.getId())) {\n\t\t\t\t\t// Insert data\n\t\t\t\t\trestaurants.put(restaurant.getId(), restaurant);\n\t\t\t\t\t// Save the data into the database\n\t\t\t\t\trestaurantDBAdapter.insertNewRestaurant(restaurant);\n\t\t\t\t}\n\t\t\t} catch (JSONException e) {\n\t\t\t\tLog.e(LOG_TAG, \"Error parsing the restaurant returned by Google at the position \" +\n\t\t\t i + \" of\" + jsonArray.toString());\n\t\t\t}\n\t\t}\n\t}",
"public static boolean allocateIds(List<ToDoItem> listToDos)\r\n\t{\r\n\t\tboolean changesMade = false;\r\n\t\tList<Integer> listUsedIds = getUsedIds(listToDos);\r\n\t\t\r\n\t\tfor(ToDoItem item: listToDos)\r\n\t\t{\r\n\t\t\tif (item.getId() <= 0)//id needs to be allocated\r\n\t\t\t{\r\n\t\t\t\tchangesMade = true;//flag that changes have been made\r\n\t\t\t\t\r\n\t\t\t\tfor(int i=1; i<=1000000; i++)//one million different possible ids\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!listUsedIds.contains(Integer.valueOf(i)))//if id not in use\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * appropriate id found, allocate to this todo and quit\r\n\t\t\t\t\t\t * loop\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\titem.setId(i);\r\n\t\t\t\t\t\tlistUsedIds.add(i);//add this id to list of used ones\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn changesMade;\r\n\t}",
"int batchUpsert(@Param(\"list\") List<UserShare5Min> list);",
"private void createManagersList(){\n\t\tmanagerList.clear();\n\t\tArrayList<User> users = jdbc.get_Managers();\n\t\tfor (int i = 0; i < users.size(); i++) {\n\t\t\tmanagerList.addElement(String.format(\"%s, %s\", users.get(i).get_lastname(), users.get(i).get_firstname()));\n\t\t}\n\t}",
"private void setPersonsInPool(ArrayList<Person> personsInPool) {\n this.personsInPool = personsInPool;\n }",
"private void addToArrayList(String getName) {\n\t\tUser newUser = new User(getName);\n\t\tmgUsr.arrList.add(newUser);\n\t\tobs = FXCollections.observableArrayList(mgUsr.arrList);\n\n\t\tsetOnListView();\n\t}",
"public static ArrayList < Student > uniquePersonalityConstraintApplicator(ArrayList < Student > teamCreator) {\n //To check if duplicate personalities are present and removing team. Creating a unique Personality Team\n for (int j = 0; j < teamCreator.size(); j++) {\n for (int k = j + 1; k < teamCreator.size(); k++) {\n if (teamCreator.get(j).getStudentPersonality() == teamCreator.get(k).getStudentPersonality()) {\n if (teamCreator.get(k).getGender() == 'm' || teamCreator.get(k).getGender() == 'M') {\n for (Student student: studentsNotInATeam) {\n if ((student.getStudentPersonality() != teamCreator.get(j).getStudentPersonality()) && (student.getGender() == 'm' || student.getGender() == 'M')) {\n teamCreator.add(student);\n studentsNotInATeam.add(teamCreator.get(k));\n teamCreator.remove(teamCreator.get(k));\n studentsNotInATeam.remove(student);\n break;\n }\n }\n }\n }\n }\n }\n return teamCreator;\n }",
"@Override\n\tpublic void onUserListCreation(User listOwner, UserList list) {\n\n\t}",
"private void saveStoreListChangesInDb() {\n if (currentUser != null) {\n final String userId = currentUser.getUid();\n firebaseDb.collection(userId)\n .document(shoppingListName)\n .update(\"stores\", storeList)\n .addOnFailureListener(e -> Toast.makeText(getApplicationContext(),\n R.string.Update_list_error_msg, Toast.LENGTH_SHORT)\n .show());\n }\n }",
"public void anonymize(ArrayList<double[]> data){\n\t\t// anonymize for all dimensions\n\t\tfor(int j = 0; j < numQI; j++){\n\t\t\n\t\t\tdouble midValue = findMedian(data, j);\n\t\t\tfor(int i = 0; i < data.size(); i++){\n\t\t\t\tdata.get(i)[j] = midValue;\n\t\t\t}\n\t\t}\n\t\t\n\t\tgetClusterSet().add(0, new ArrayList<double[]>());\n\t\t// returning the anonymized partitions\n\t\tfor(int i = 0; i < data.size(); i++){\n\t\t\tgetAnonymizedPartition().add(data.get(i));\n\t\t\tgetClusterSet().get(0).add(data.get(i));\n\t\t}\n\t}",
"void addPerson(Person person) throws UniquePersonList.DuplicatePersonException;",
"public boolean add(RegistrationPlate plate, String owner){\n if(this.registrationList.containsKey(plate)){\n return false;\n }\n else {\n this.registrationList.put(plate, owner);\n return true;\n }\n }",
"private void replenishAuthFolderList(List<Folder> authFolderList) throws BizfwServiceException {\n List<Folder> parentFolderList = new ArrayList<>();\n for (Folder folder : authFolderList) {\n List<Folder> tempParentFolderList = getParentFolders(folder);\n parentFolderList.addAll(tempParentFolderList);\n }\n for (Folder folder : parentFolderList) {\n if (!authFolderList.contains(folder)) {\n authFolderList.add(folder);\n }\n }\n }",
"public List<List<String>> accountsMerge(List<List<String>> accounts) {\n\n List<Account> accts = new ArrayList<>();\n Map<String, Account> mapMailToAccount = new HashMap<>();\n for (List<String> account : accounts) {\n String name = account.get(0);\n Account acct = new Account(name);\n accts.add(acct);\n for(int i=1;i<account.size();i++){\n String mail = account.get(i);\n Account mappedAcct = mapMailToAccount.get(mail);\n if (mappedAcct == null) {\n mapMailToAccount.put(mail, acct);\n acct.mails.add(mail);\n } else {\n union(acct, mappedAcct);\n }\n }\n }\n for (Account acct : accts) {\n if (acct.parent != acct) {\n acct.parent = find(acct);\n acct.parent.mails.addAll(acct.mails);\n }\n }\n List<List<String>> mergedAccounts = new ArrayList<>();\n for (Account acct : accts) {\n if (acct.parent == acct) {\n mergedAccounts.add(acct.convertToList());\n }\n }\n return mergedAccounts;\n}",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tList<Integer> nums = new ArrayList<>();\r\n\t\t\r\n\t\tnums.add(10);nums.add(10);nums.add(10);nums.add(8);\r\n\t\tnums.add(11);nums.add(10);nums.add(10);nums.add(10);\r\n\r\n\t\tSystem.out.println(nums);\r\n\t\t\r\n\t\tList<Integer> unique1 = new ArrayList<>(); \r\n\t\t\r\n\t\t\r\n\t\t // find unique NON DUPLICATE VALUES\r\n\t\tfor(Integer num: nums) {\r\n\t\t\tif(!unique1.contains(num)) { // if unique1 doesn't contains num add it\r\n\t\t\t\tunique1.add(num); //<<<<<======= adding to unique1 num one by one\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(unique1.toString());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t \r\n\t\t\r\n\t\tList<Integer> unique2 = new ArrayList<>();\r\n\t\t\r\n\t\tfor(int i =0; i<nums.size(); i++) { // find unique ( appearence once)\r\n\t\t\tint count=0;\r\n\t\t\t\r\n\t\t\tInteger value = nums.get(i);\r\n\t\t\tfor(int k =0; k<nums.size(); k++) {\r\n\t\t\t\tif(nums.get(k)== value && i != k) {\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(count == 0) {\r\n\t\t\t\tunique2.add(value);\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(unique2);\r\n\t\t\r\n\t}",
"void anonymizeEntries( List<Integer> listIdEntries, Timestamp dateCleanTo, Plugin plugin );",
"private void update() {\n for (ArrayList<String> pair: list) {\n String username = pair.get(0);\n String val = pair.get(1);\n ref.child(username).setValue(val);\n }\n }",
"public void addPerson(String name){\n Person newPerson = new Person(name,this.x1,this.x2);\n for(Person p : personList){\n if(p.equals(newPerson)){\n System.out.println(\"Error! The person already exists.\");\n }\n }\n personList.add(newPerson);\n }",
"@XmlElementWrapper(name = \"ownerLists\")\r\n\t@XmlElement(name = \"ownerList\")\r\n\tpublic Collection<OwnerModel> getOwnerList()\r\n\t{\r\n\t\treturn ownerList;\r\n\t}",
"@Override\n protected void set(java.util.Collection<org.tair.db.locusdetail.ILocusDetail> list) {\n loci = list;\n // Add the primary keys to the serialized key list if there are any.\n if (loci != null) {\n for (com.poesys.db.dto.IDbDto object : loci) {\n lociKeys.add(object.getPrimaryKey());\n }\n }\n }",
"@Override\n public boolean add(List<Buyer> buyers) {\n return false;\n }",
"public void addFriendList(FriendList list);",
"Map<UUID, Double> getOwners();"
] | [
"0.6049782",
"0.5878065",
"0.5613277",
"0.5512501",
"0.54950976",
"0.5407147",
"0.528551",
"0.52444434",
"0.51662934",
"0.51627034",
"0.51577324",
"0.5147139",
"0.5038",
"0.5031568",
"0.50169015",
"0.5016347",
"0.5002089",
"0.49741402",
"0.4948666",
"0.49109623",
"0.49068448",
"0.490264",
"0.48510087",
"0.4848254",
"0.4843159",
"0.48427814",
"0.48260245",
"0.48226497",
"0.48160866",
"0.48135632",
"0.48076016",
"0.48049727",
"0.47978255",
"0.4790803",
"0.47863847",
"0.47802475",
"0.4777214",
"0.477305",
"0.47661114",
"0.47633126",
"0.47609004",
"0.47501174",
"0.47489518",
"0.474706",
"0.47450802",
"0.47424525",
"0.47403643",
"0.47373337",
"0.47346976",
"0.47213307",
"0.47164568",
"0.47078505",
"0.47053728",
"0.46996313",
"0.46974853",
"0.46919444",
"0.4690681",
"0.4688468",
"0.46884224",
"0.46743685",
"0.46724835",
"0.4671477",
"0.4658512",
"0.4656841",
"0.46565917",
"0.4656299",
"0.46537533",
"0.46536303",
"0.4652993",
"0.46527997",
"0.46376312",
"0.46350864",
"0.46347344",
"0.46337155",
"0.46303892",
"0.46284467",
"0.46224594",
"0.46169496",
"0.46154547",
"0.4614166",
"0.46005806",
"0.45977738",
"0.45899263",
"0.45781574",
"0.4576958",
"0.45729545",
"0.4572552",
"0.45669946",
"0.45644996",
"0.45555973",
"0.4550809",
"0.45499134",
"0.4547745",
"0.45462188",
"0.45457506",
"0.45307207",
"0.4527138",
"0.4509916",
"0.45095396",
"0.4508531"
] | 0.5751105 | 2 |
Prints out all unique owners | private void printAllOwners(ArrayList<String> ownerList){
for(int i = 0; i < ownerList.size(); i++){
System.out.println(ownerList.get(i));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void printOwners(){\n ArrayList<String> ownerList = new ArrayList<String>();\n\n for(RegistrationPlate plates: this.registrationList.keySet()){\n if(!ownerList.contains(this.registrationList.get(plates)))\n ownerList.add(this.registrationList.get(plates));\n }\n\n printAllOwners(ownerList);\n }",
"@Override\n\tpublic int getAnnonymousOwners() {\n\t\treturn 0;\n\t}",
"protected int[] getOwners() {\n \t\treturn owners;\n \t}",
"public String toString() {\n\tString formattedString = \"Owner Name: \" + this.name + \"\\n\" + \"Listings: \";\n\tfor (Listing listing : listings) {\n\t\tformattedString += listing.getName() + \"\\n\";\n\t}\n\treturn formattedString;\n }",
"@Override\r\n\tpublic List<OwnerVO> ownerList() {\n\t\treturn adao.OwnerList();\r\n\t}",
"List<ManagementLockOwner> owners();",
"public void printByUser() {\r\n TUseStatus useStatus;\r\n\t for (int a=0; a < m_current_resources_count; a++)\r\n\t for (int b=0; b < m_current_users_count; b++) {\r\n\t useStatus = m_associations[a][b];\r\n\t if (useStatus!=null) System.out.println(useStatus.toString()); \r\n\t } \r\n }",
"public List<String> getListOfOwner() throws SQLException {\n\t\treturn adminService.listOfOwner();\n\t}",
"public List<String> getPropertyOwners();",
"java.lang.String getOwner();",
"java.lang.String getOwner();",
"@Override\n\tpublic void output() {\n\t\tfor(User u :list) {\n\t\t\tif(list.size() > MIN_USER) {\n\t\t\t\tSystem.out.println(\"이름 : \"+u.getName());\n\t\t\t\tSystem.out.println(\"나이 : \"+u.getAge());\n\t\t\t\tSystem.out.println(\"주소 : \"+u.getAddr());\n\t\t\t\tSystem.out.println(\"=======================\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"입력된 정보가 없습니다.\");\n\t\t}",
"public String getownerName() {\n\t return this.ownerName;\n\t}",
"private void ViewAccounts() {\n for (int k = 0; k < accountList.size(); k++) {\n\n System.out.print(k + \": \" + accountList.get(k) + \" || \");\n\n }\n }",
"public String getOwnerName() {\r\n return this.ownerName;\r\n }",
"public String getOwnerString() {\n return String.valueOf(enteredBy);\n }",
"@Override\n\tpublic String[] getOutsideOwners() {\n\t\treturn new String[0];\n\t}",
"public java.lang.String getNameOfShipOwners() {\n\t\treturn _tempNoTiceShipMessage.getNameOfShipOwners();\n\t}",
"public static void main(String[] argv) {\n Owner owner1 = new Owner(1, 111111, \"registered\", 14,\n \"https://www.gravatar.com/avatar/36cdb80d69e1f92ca429bdf69ccb05c6?s=128&d=identicon&r=PG&f=1\",\n \"Blake Lassiter\",\n \"http://stackoverflow.com/users/4805044/blake-lassiter\");\n\n Owner owner2 = new Owner(2, 222222, \"registered\", 14,\n \"https://www.gravatar.com/avatar/36cdb80d69e1f92ca429bdf69ccb05c6?s=128&d=identicon&r=PG&f=1\",\n \"Blake Lassiter\",\n \"http://stackoverflow.com/users/4805044/blake-lassiter\");\n\n Owner owner3 = new Owner(3, 333333, \"registered\", 14,\n \"https://www.gravatar.com/avatar/36cdb80d69e1f92ca429bdf69ccb05c6?s=128&d=identicon&r=PG&f=1\",\n \"Blake Lassiter\",\n \"http://stackoverflow.com/users/4805044/blake-lassiter\");\n\n String json = \"{\\n\" +\n \" \\\"items\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"tags\\\": [\\n\" +\n \" \\\"android\\\",\\n\" +\n \" \\\"android-manifest\\\"\\n\" +\n \" ],\\n\" +\n \" \\\"owner\\\": {\\n\" +\n \" \\\"reputation\\\": 23,\\n\" +\n \" \\\"user_id\\\": 4805044,\\n\" +\n \" \\\"user_type\\\": \\\"registered\\\",\\n\" +\n \" \\\"accept_rate\\\": 14,\\n\" +\n \" \\\"profile_image\\\": \\\"https://www.gravatar.com/avatar/36cdb80d69e1f92ca429bdf69ccb05c6?s=128&d=identicon&r=PG&f=1\\\",\\n\" +\n \" \\\"display_name\\\": \\\"Blake Lassiter\\\",\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/users/4805044/blake-lassiter\\\"\\n\" +\n \" },\\n\" +\n \" \\\"is_answered\\\": false,\\n\" +\n \" \\\"view_count\\\": 13,\\n\" +\n \" \\\"answer_count\\\": 0,\\n\" +\n \" \\\"score\\\": 0,\\n\" +\n \" \\\"last_activity_date\\\": 1462763611,\\n\" +\n \" \\\"creation_date\\\": 1462762986,\\n\" +\n \" \\\"last_edit_date\\\": 1462763611,\\n\" +\n \" \\\"question_id\\\": 37107214,\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/questions/37107214/set-title-to-hidden-on-android-app\\\",\\n\" +\n \" \\\"title\\\": \\\"Set Title To Hidden on Android App\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"tags\\\": [\\n\" +\n \" \\\"android\\\",\\n\" +\n \" \\\"c++\\\",\\n\" +\n \" \\\"windows\\\",\\n\" +\n \" \\\"bluetooth\\\"\\n\" +\n \" ],\\n\" +\n \" \\\"owner\\\": {\\n\" +\n \" \\\"reputation\\\": 937,\\n\" +\n \" \\\"user_id\\\": 1183804,\\n\" +\n \" \\\"user_type\\\": \\\"registered\\\",\\n\" +\n \" \\\"accept_rate\\\": 83,\\n\" +\n \" \\\"profile_image\\\": \\\"https://i.stack.imgur.com/Z5Lyl.jpg?s=128&g=1\\\",\\n\" +\n \" \\\"display_name\\\": \\\"Chris\\\",\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/users/1183804/chris\\\"\\n\" +\n \" },\\n\" +\n \" \\\"is_answered\\\": true,\\n\" +\n \" \\\"view_count\\\": 17,\\n\" +\n \" \\\"answer_count\\\": 1,\\n\" +\n \" \\\"score\\\": 3,\\n\" +\n \" \\\"last_activity_date\\\": 1462763542,\\n\" +\n \" \\\"creation_date\\\": 1462701554,\\n\" +\n \" \\\"last_edit_date\\\": 1462743555,\\n\" +\n \" \\\"question_id\\\": 37098557,\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/questions/37098557/c-winsock-bluetooth-connection-at-command-error-received\\\",\\n\" +\n \" \\\"title\\\": \\\"C++ WinSock Bluetooth Connection - AT Command - Error Received\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"tags\\\": [\\n\" +\n \" \\\"java\\\",\\n\" +\n \" \\\"android\\\",\\n\" +\n \" \\\"user-interface\\\",\\n\" +\n \" \\\"fragment\\\",\\n\" +\n \" \\\"android-orientation\\\"\\n\" +\n \" ],\\n\" +\n \" \\\"owner\\\": {\\n\" +\n \" \\\"reputation\\\": 4,\\n\" +\n \" \\\"user_id\\\": 4835349,\\n\" +\n \" \\\"user_type\\\": \\\"registered\\\",\\n\" +\n \" \\\"profile_image\\\": \\\"https://lh4.googleusercontent.com/-ZFmtDec26j4/AAAAAAAAAAI/AAAAAAAAAC4/RGi5zw-SFao/photo.jpg?sz=128\\\",\\n\" +\n \" \\\"display_name\\\": \\\"jl1992\\\",\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/users/4835349/jl1992\\\"\\n\" +\n \" },\\n\" +\n \" \\\"is_answered\\\": false,\\n\" +\n \" \\\"view_count\\\": 41,\\n\" +\n \" \\\"answer_count\\\": 2,\\n\" +\n \" \\\"score\\\": -1,\\n\" +\n \" \\\"last_activity_date\\\": 1462761445,\\n\" +\n \" \\\"creation_date\\\": 1462750768,\\n\" +\n \" \\\"question_id\\\": 37105990,\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/questions/37105990/android-how-do-i-prevent-class-variables-being-cleared-on-orientation-change\\\",\\n\" +\n \" \\\"title\\\": \\\"Android: how do I prevent class variables being cleared on orientation change\\\"\\n\" +\n \" }\\n\" +\n \" ],\\n\" +\n \" \\\"has_more\\\": true,\\n\" +\n \" \\\"quota_max\\\": 300,\\n\" +\n \" \\\"quota_remaining\\\": 298\\n\" +\n \"}\";\n Gson gson = new GsonBuilder().create();\n\n String jsonArray = \"[\\n\" +\n \" {\\n\" +\n \" \\\"tags\\\": [\\n\" +\n \" \\\"android\\\",\\n\" +\n \" \\\"android-manifest\\\"\\n\" +\n \" ],\\n\" +\n \" \\\"owner\\\": {\\n\" +\n \" \\\"reputation\\\": 23,\\n\" +\n \" \\\"user_id\\\": 4805044,\\n\" +\n \" \\\"user_type\\\": \\\"registered\\\",\\n\" +\n \" \\\"accept_rate\\\": 14,\\n\" +\n \" \\\"profile_image\\\": \\\"https://www.gravatar.com/avatar/36cdb80d69e1f92ca429bdf69ccb05c6?s=128&d=identicon&r=PG&f=1\\\",\\n\" +\n \" \\\"display_name\\\": \\\"Blake Lassiter\\\",\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/users/4805044/blake-lassiter\\\"\\n\" +\n \" },\\n\" +\n \" \\\"is_answered\\\": false,\\n\" +\n \" \\\"view_count\\\": 13,\\n\" +\n \" \\\"answer_count\\\": 0,\\n\" +\n \" \\\"score\\\": 0,\\n\" +\n \" \\\"last_activity_date\\\": 1462763611,\\n\" +\n \" \\\"creation_date\\\": 1462762986,\\n\" +\n \" \\\"last_edit_date\\\": 1462763611,\\n\" +\n \" \\\"question_id\\\": 37107214,\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/questions/37107214/set-title-to-hidden-on-android-app\\\",\\n\" +\n \" \\\"title\\\": \\\"Set Title To Hidden on Android App\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"tags\\\": [\\n\" +\n \" \\\"android\\\",\\n\" +\n \" \\\"c++\\\",\\n\" +\n \" \\\"windows\\\",\\n\" +\n \" \\\"bluetooth\\\"\\n\" +\n \" ],\\n\" +\n \" \\\"owner\\\": {\\n\" +\n \" \\\"reputation\\\": 937,\\n\" +\n \" \\\"user_id\\\": 1183804,\\n\" +\n \" \\\"user_type\\\": \\\"registered\\\",\\n\" +\n \" \\\"accept_rate\\\": 83,\\n\" +\n \" \\\"profile_image\\\": \\\"https://i.stack.imgur.com/Z5Lyl.jpg?s=128&g=1\\\",\\n\" +\n \" \\\"display_name\\\": \\\"Chris\\\",\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/users/1183804/chris\\\"\\n\" +\n \" },\\n\" +\n \" \\\"is_answered\\\": true,\\n\" +\n \" \\\"view_count\\\": 17,\\n\" +\n \" \\\"answer_count\\\": 1,\\n\" +\n \" \\\"score\\\": 3,\\n\" +\n \" \\\"last_activity_date\\\": 1462763542,\\n\" +\n \" \\\"creation_date\\\": 1462701554,\\n\" +\n \" \\\"last_edit_date\\\": 1462743555,\\n\" +\n \" \\\"question_id\\\": 37098557,\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/questions/37098557/c-winsock-bluetooth-connection-at-command-error-received\\\",\\n\" +\n \" \\\"title\\\": \\\"C++ WinSock Bluetooth Connection - AT Command - Error Received\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"tags\\\": [\\n\" +\n \" \\\"java\\\",\\n\" +\n \" \\\"android\\\",\\n\" +\n \" \\\"user-interface\\\",\\n\" +\n \" \\\"fragment\\\",\\n\" +\n \" \\\"android-orientation\\\"\\n\" +\n \" ],\\n\" +\n \" \\\"owner\\\": {\\n\" +\n \" \\\"reputation\\\": 4,\\n\" +\n \" \\\"user_id\\\": 4835349,\\n\" +\n \" \\\"user_type\\\": \\\"registered\\\",\\n\" +\n \" \\\"profile_image\\\": \\\"https://lh4.googleusercontent.com/-ZFmtDec26j4/AAAAAAAAAAI/AAAAAAAAAC4/RGi5zw-SFao/photo.jpg?sz=128\\\",\\n\" +\n \" \\\"display_name\\\": \\\"jl1992\\\",\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/users/4835349/jl1992\\\"\\n\" +\n \" },\\n\" +\n \" \\\"is_answered\\\": false,\\n\" +\n \" \\\"view_count\\\": 41,\\n\" +\n \" \\\"answer_count\\\": 2,\\n\" +\n \" \\\"score\\\": -1,\\n\" +\n \" \\\"last_activity_date\\\": 1462761445,\\n\" +\n \" \\\"creation_date\\\": 1462750768,\\n\" +\n \" \\\"question_id\\\": 37105990,\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/questions/37105990/android-how-do-i-prevent-class-variables-being-cleared-on-orientation-change\\\",\\n\" +\n \" \\\"title\\\": \\\"Android: how do I prevent class variables being cleared on orientation change\\\"\\n\" +\n \" }\\n\" +\n \" ]\";\n Type collectionType = new TypeToken<List<Item>>(){}.getType();\n List<Item> items = gson.fromJson(jsonArray, collectionType);\n System.out.println(items.size());\n for (int i = 0; i < items.size();i++) {\n System.out.println(items.get(i).questionId);\n }\n\n Item[] items2 = gson.fromJson(jsonArray, Item[].class);\n ArrayList<Item> items3 = new ArrayList<Item>(Arrays.asList(items2));\n for (int i = 0; i < items3.size();i++) {\n System.out.println(items3.get(i).questionId);\n }\n\n Result r = gson.fromJson(json, Result.class);\n for (int i = 0; i < r.items.size();i++) {\n System.out.println(r.items.get(i).questionId);\n }\n }",
"public int[] getClanOwners() {\n\t\t\treturn clanOwners;\n\t\t}",
"public String getOwner();",
"String getOwner();",
"String getOwner();",
"public String getOwner() {\r\n if (mOwner==null) {\r\n return \"n/a\";\r\n }\r\n return mOwner;\r\n }",
"@Override\n\t\tpublic String ownerName() {\n\t\t\treturn \"Cat Owner\";\n\t\t}",
"protected int[] getCollectionOwners() {\n \t\treturn null;\n \t}",
"public void displayUSerList(List<User> userList) {\n for (User currentUser : userList) {\n String userInfo = \"\"; \n \n userInfo = currentUser.getUserId()+\" \"+currentUser.getName();\n for(String s : currentUser.getBorrowedItem()){\n userInfo = userInfo + s; \n }\n \n\n\n\n io.print(userInfo);\n }\n io.readString(\"Please hit enter to continue.\");\n }",
"public String findCommitters() {\n\t\tSet<String> result = new HashSet<String>();\n\t\tfor (Cell cell : cells.values()) {\n\t\t\tfor (SimpleUser committer : cell.getCommitters()) {\n\t\t\t\tString cleanCommitterId = cleanString(committer.getId());\n\t\t\t\tresult.add(cleanCommitterId);\n\t\t\t\tString cleanCommitterName = cleanString(committer.getName());\n\t\t\t\tresult.add(cleanCommitterName);\n\t\t\t}\n\t\t}\n\t\treturn Util.join(result, \" \");\n\t}",
"default String getOwnerId()\n {\n return Long.toUnsignedString(getOwnerIdLong());\n }",
"@PreAuthorize(\"hasPermission('string', 'ALL', new org.jasig.portal.spring.security.evaluator.AuthorizableActivity('UP_PERMISSIONS', 'VIEW_PERMISSIONS'))\")\n @RequestMapping(value=\"/permissions/owners.json\", method = RequestMethod.GET)\n public ModelAndView getOwners(\n HttpServletRequest req, HttpServletResponse response)\n throws Exception {\n \n // get a list of all currently defined permission owners\n List<IPermissionOwner> owners = permissionOwnerDao.getAllPermissionOwners();\n \n ModelAndView mv = new ModelAndView();\n mv.addObject(\"owners\", owners);\n mv.setViewName(\"json\");\n \n return mv;\n }",
"@Override\n\tpublic Identifier[] getStrongOwners() {\n\t\treturn new Identifier[0];\n\t}",
"public String printAccounts() {\n StringBuilder result;\n result = new StringBuilder((\"--Listing accounts in the database--\\n\"));\n for (int i = 0; i < size; i++) {\n result.append(accounts[i].toString()).append(\"\\n\");\n }\n result.append(\"--end of listing--\");\n return result.toString();\n }",
"public List<IPermissionOwner> getAllPermissionOwners();",
"public void printAllUsers() {\n\t\tfor (User u : getUserSet()) {\n\t\t\tSystem.out.println(u);\n\t\t}\n\t}",
"public String toString() {\r\n String users = \"\";\r\n for (int i = 0; i < this.UserList.size(); i++) {\r\n User user = (User) this.UserList.get(i);\r\n users += \" \" + user.nick();\r\n }\r\n\r\n return users.substring(1, users.length());\r\n }",
"public String getOwnerName() {\r\n\t\treturn ownerName;\r\n\t}",
"public String getOwnerName() {\n\n return ownerName;\n }",
"public String getOwner() {\r\n return owner;\r\n }",
"public List getOwnerUsersList(Map map) {\n\t String currentUser = UserUtil.getCurrentPrincipalUser();\r\n\t\t List ls = (List)map.get(currentUser);\r\n//\t\t System.out.println(\"map.size()\"+currentUser) ;\r\n//\t\t System.out.println(map.size()) ;\r\n\t\treturn ls;\r\n\t}",
"public String getOwnerName() {\n\t\treturn ownerName;\n\t}",
"public String getOwner() {\r\n\t\treturn owner;\r\n\t}",
"public String getMembers() {\r\n \t\tString members = _creator;\r\n \t\tfor (String member : _otherMembersList) {\r\n \t\t\tmembers.concat(\", \" + member);\r\n \t\t}\r\n \t\treturn members;\r\n \t}",
"Map<UUID, Double> getOwners();",
"public String getOwner() {\n return owner;\n }",
"public String getOwner() {\n return owner;\n }",
"public String getOwner() {\n return owner;\n }",
"public String getOwner() {\n return owner;\n }",
"public String getOwner() {\n return owner;\n }",
"public String getOwner() {\n return owner;\n }",
"public java.lang.String getOwnerId() {\r\n return ownerId;\r\n }",
"@Override\n\tpublic List<Owner> findAll() {\n\t\treturn null;\n\t}",
"public String ListUsers(){\r\n StringBuilder listUsers = new StringBuilder();\r\n for (Utente u: utenti) { // crea la lista degli utenti registrati al servizio\r\n listUsers.append(u.getUsername()).append(\" \");\r\n \tlistUsers.append(u.getStatus()).append(\"\\n\");\r\n }\r\n return listUsers.toString(); \r\n }",
"public String getOwner() {\n\n return owner;\n\n }",
"public java.lang.String getOwnername() {\n\treturn ownername;\n}",
"public String ownerName() {\n\t\t\treturn null;\n\t\t}",
"public UUID getOwner() {\n return owner;\n }",
"public UUID getOwner() {\n return owner;\n }",
"public void printMembers() {\n\t\tthis.getListUsers().printList();\n\t}",
"@Nonnull\n List<ResourceOwner> getOwners(@Nonnull final Telegraf telegraf);",
"public String getOwner() { return owner; }",
"public String getOwner(){\n return owner;\r\n }",
"public void ShowAllUsers()\r\n {\r\n userList.forEach((s) -> { System.out.println(s); });\r\n }",
"void printUsers() {\n if (server.hasUsers()) {\n writer.println(\"Connected users: \" + server.getUserNames());\n } else {\n writer.println(\"No other users connected\");\n }\n }",
"public String showAllPersons() {\n String string = \"\";\n for(Person person: getPersons().values()){\n string += person.toString();\n }\n return string;\n }",
"public String getAllCommitteeMembers(){\r\n\t\tString allCommitteeMembers = \"\";\r\n\t\tfor(int index = 0; index < committeeMembers.size(); ++index){\r\n\t\t\tallCommitteeMembers += committeeMembers.get(index).returnNameInString() + \"\\n\\t\";\r\n\t\t}\r\n\t\treturn allCommitteeMembers;\r\n\t}",
"private List<String> convertWorkspaceUsers(\n\t\t\tfinal List<WorkspaceUser> owners) {\n\t\tfinal List<String> own = new ArrayList<String>();\n\t\tfor (final WorkspaceUser wu: owners) {\n\t\t\town.add(wu.getUser());\n\t\t}\n\t\treturn own;\n\t}",
"public String getOwner() {\n\n return Owner;\n }",
"public String owner() {\n return this.owner;\n }",
"@Transactional(readOnly=true)\r\n\tpublic List<Owner> getAllOwner() throws SQLException\r\n\t{\r\n\t\treturn ownerDaoImpl.getAllOwner();\r\n\t}",
"public com.google.protobuf.ByteString\n getOwnerBytes() {\n java.lang.Object ref = owner_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n owner_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getOwnerBytes() {\n java.lang.Object ref = owner_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n owner_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String printAccounts() { \n\t\t\n\t\tStringBuilder output = new StringBuilder(\"\");\n\t\t\n\t\tif(size > 0) {\n\t\t\t\n\t\t\toutput.append(\"--Listing accounts in the database--\\n\");\n\t\t\t//System.out.println(\"--Listing accounts in the database--\");\n\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\toutput.append(accounts[i].toString());\n\t\t\t\toutput.append(\"\\n\");\n\t\t\t\t//System.out.println(accounts[i].toString());\n\t\t\t}\n\t\t\t\n\t\t\toutput.append(\"--end of listing--\\n\");\n\t\t\t//System.out.println(\"--end of listing--\");\t\n\t\t\t\n\t\t}\n\n\t\telse {\n\t\t\toutput.append(\"Database is empty.\\n\");\n\t\t\t//System.out.println(\"Database is empty.\");\n\t\t}\n\t\t\n\t\treturn output.toString();\n\t}",
"public final UUID getOwnerUniqueId() {\n\t\treturn ownerUniqueId;\n\t}",
"public static ArrayList<Customer> getOwners(String aid) {\n \tArrayList<Customer> customers = new ArrayList<Customer>();\n \tStatement stmt = null;\n \tConnection conn = null;\n \tString sql = \"\";\n \n\t return customers;\n }",
"public String getOwnerId() {\n return ownerId;\n }",
"public synchronized static String getOwner() {\n return owner;\n }",
"@Override\n\t\tpublic String ownerName() {\n\t\t\treturn \"Dog Owner\";\n\t\t}",
"String getOnlineUsers(String senderName)\n {\n List<String> users = new ArrayList<>();\n for (CommunicationLink node : allNodes.values())\n {\n NodeInfo currentNodeInfo = node.getInfo();\n if (currentNodeInfo.getName().equals(senderName))\n {\n users.add(senderName);\n } else\n {\n node.sendMessage(new Message(\"Checking if you are alive\", currentNodeInfo, myInfo, NAME));\n try\n {\n users.add(node.readMessage().getContent());\n } catch (IOException e)\n {\n handleNodeDeath(currentNodeInfo);\n logger.error(\"Node \" + myInfo + \"\\n - \" + currentNodeInfo.getName() + \" disconnected unexpectedly.\");\n }\n }\n }\n users.add(0, myInfo.getName());\n return String.join(\", \", users);\n }",
"public void printAllUsers(Comparator comp) {\r\n System.out.println(\"Users:\");\r\n System.out.format(\"%-20s%-25s%-20s\", \"User Name\", \"Number of Followers\", \"Number Following\");\r\n System.out.println();\r\n Collections.sort(users, comp);\r\n for (int i = 0; i < users.size(); i++) {\r\n System.out.format(\"%-30s%-25d%-20d\", users.get(i).getUserName(), getAllFollowers(users.get(i)), getAllFollowing(users.get(i)));\r\n System.out.println();\r\n }\r\n System.out.println();\r\n }",
"private void printNonDuplicates( Collection< String > collection )\r\n {\r\n // create a HashSet \r\n Set< String > set = new HashSet< String >( collection ); \r\n\r\n System.out.println( \"\\nNonduplicates are: \" );\r\n\r\n for ( String s : set )\r\n System.out.printf( \"%s \", s );\r\n\r\n System.out.println();\r\n }",
"public static void main(String[] args) {\n printUnique();\n }",
"public String getUsuariosConectados() throws RemoteException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor(Object objeto : bbdd.getUsuariosConectados()){\n\t\t\tsb.append((String) objeto + \"\\n\");\n\t\t}\n\t\treturn sb.toString();\n\t\t\n\t}",
"public void outputNames(){\n System.out.printf(\"\\n%9s%11s\\n\",\"Last Name\",\"First Name\");\n pw.printf(\"\\n%9s%11s\",\"Last Name\",\"First Name\");\n ObjectListNode p=payroll.getFirstNode();\n while(p!=null){\n ((Employee)p.getInfo()).displayName(pw);\n p=p.getNext();\n }\n System.out.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n pw.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n }",
"public long getOwner() {\n\t\treturn owner;\n\t}",
"public static void main(String[] args) {\n\t\n\t\n\t\tSet<String> ids=new TreeSet<String>();\n\t\tAccount a=new Account();\n\t\tids.add(\"one\");\n\t\tids.add(\"two\");\n\t\tids.add(\"three\");\n\t\tids.add(\"one\");\n\t\n\t\t//System.out.println(ids);\n\t\t\n\t\tfor(String value:ids){\n\t\t\tSystem.out.println(value);\n\t\t}\n}",
"public void printUsers() {\n userAnya.printInfo();\n userRoma.printInfo();\n }",
"public void printList(){\n\t\tfor(User u : userList){\r\n\t\t\tSystem.out.println(\"Username: \" + u.getUsername() + \" | User ID: \" + u.getUserID() + \" | Hashcode: \" + u.getHashcode() + \" | Salt: \" + u.getSalt());\r\n\t\t}\r\n\t}",
"public String getOwner() {\n return mOwner;\n }",
"public List<String> allUsersInteractedWith(String owner)\n\t{\n\t\tSet<String> users = new HashSet<>();\n\t\tfor (Chat chat : db.findBySenderOrReceiver(owner, owner))\n\t\t{\n\t\t\t// if the receiver is the owner, the sender is someone else (the user)\n\t\t\t// and vice versa\n\t\t\tString receiver = chat.getReceiver();\n\t\t\tString sender = chat.getSender();\n\t\t\tusers.add(sender.equals(owner) ? receiver : sender);\n\t\t}\n\t\treturn new ArrayList<String>(users);\n\t}",
"public String getOwner(int id)\n\t{\n\t\tString returnValue = \"\";\n\t\ttry {\n\t\t\tstatement = conn.createStatement();\n\t\t\tres = statement.executeQuery(\"SELECT * FROM owner WHERE (owner_id = \" + id + \")\");\n\t\t\tif(res.next())\n\t\t\t{\n\t\t\t\treturnValue = \"Name: \"+res.getString(2)+\"\\nType: \" + res.getString(3)+ \"\\nAddress: \" + res.getString(4)+ \"\\nID OR Registration Num: \" + res.getString(5) + \"\\n\";\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn returnValue;\n\t}",
"public void setOwnerName(String name) {\r\n this.ownerName = name;\r\n }",
"private String getUsersToString()\n {\n ArrayList<String> list = new ArrayList<>();\n Iterator iterator = userList.entrySet().iterator();\n while (iterator.hasNext())\n {\n Map.Entry mapEntry = (Map.Entry) iterator.next();\n list.add(\"\" + mapEntry.getKey());\n }\n \n String returnString = \"\";\n if(list.size() > 0)\n {\n returnString = list.get(0);\n for(int i = 1; i < list.size(); i++)\n {\n returnString = returnString + \",\" + list.get(i);\n }\n }\n return returnString;\n }",
"public Set<Account> getAccountsForOwner(String username);",
"@Override\n\t\tpublic String ownerName() {\n\t\t\treturn \"Tiger Owner\";\n\t\t}",
"com.google.protobuf.ByteString\n getOwnerBytes();",
"com.google.protobuf.ByteString\n getOwnerBytes();",
"public String toString() {\n StringBuffer temp = new StringBuffer();\n for (int i = 0; i < CarerAccounts.size(); ++i) {\n\t\t\tif (i != CarerAccounts.size() - 1) {\n\t\t\t\ttemp.append(CarerAccounts.get(i).toString() + \"\\n\" );\n\t\t\t} else {\n\t\t\t\ttemp.append(CarerAccounts.get(i).toString());\n\t\t\t}\n }\n return temp.toString();\n }",
"@DISPID(33)\r\n\t// = 0x21. The runtime will prefer the VTID if present\r\n\t@VTID(38)\r\n\tjava.lang.String owner();",
"public java.lang.String getOwner() {\n java.lang.Object ref = owner_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n owner_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getOwner() {\n java.lang.Object ref = owner_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n owner_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }"
] | [
"0.7953477",
"0.6680996",
"0.6651351",
"0.6367799",
"0.63625026",
"0.62888306",
"0.6217204",
"0.619739",
"0.61909777",
"0.61285865",
"0.61285865",
"0.6066172",
"0.60347384",
"0.6007689",
"0.598002",
"0.59741354",
"0.592911",
"0.5913579",
"0.5887315",
"0.58827865",
"0.5851176",
"0.5828344",
"0.5828344",
"0.58211136",
"0.58210045",
"0.58095336",
"0.5802297",
"0.5789372",
"0.5786314",
"0.5780584",
"0.5765878",
"0.5745336",
"0.5728727",
"0.572827",
"0.5726406",
"0.572086",
"0.5720777",
"0.56716895",
"0.5667346",
"0.56604284",
"0.5656542",
"0.56527007",
"0.56485385",
"0.56385434",
"0.56385434",
"0.56385434",
"0.56385434",
"0.56385434",
"0.56385434",
"0.5633459",
"0.5632454",
"0.5623302",
"0.5616334",
"0.56131315",
"0.5611368",
"0.5608507",
"0.5608507",
"0.5605676",
"0.5604137",
"0.56036127",
"0.5601437",
"0.55842763",
"0.5581677",
"0.55696887",
"0.5566385",
"0.5562545",
"0.55611706",
"0.55604863",
"0.5555415",
"0.553245",
"0.553245",
"0.55210817",
"0.5520744",
"0.5518714",
"0.5518459",
"0.55166554",
"0.5498031",
"0.54899406",
"0.5473691",
"0.5470557",
"0.54698926",
"0.54686826",
"0.54642904",
"0.5464024",
"0.54576933",
"0.5454392",
"0.54505116",
"0.54489684",
"0.5442042",
"0.54385275",
"0.54269946",
"0.5415737",
"0.54153323",
"0.5408243",
"0.5398983",
"0.5398296",
"0.53972363",
"0.5395708",
"0.5391331",
"0.5391118"
] | 0.7301542 | 1 |
Creates an instance of the adapter factory. | public ComponentAdapterFactory()
{
if (modelPackage == null)
{
modelPackage = ComponentPackage.eINSTANCE;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public LibraryAdapterFactory() {\r\n\t}",
"public static TypeAdapterFactory create() {\n return new AutoValueGson_MyTypeAdapterFactory();\n }",
"Builder adapterFactory(TypeAdapterFactory factory);",
"public AdapterFactory getAdapterFactory()\n {\n return adapterFactory;\n }",
"public DeclarationAdapterFactory() {\n\t\t// Raise visibility\n\t}",
"public static JsonAdapter.Factory create() {\n return nullSafe(new AutoValueMoshi_AutoValueFactory());\n }",
"public static Factory factory() {\n return ext_accdt::new;\n }",
"public Adapter create( Argument[] arguments )\r\n throws UnrecognizedCriteria, InvalidCriteria, CreationException\r\n {\r\n return getFactory().create( arguments ).get_adapter();\r\n }",
"public static Factory factory() {\n return ext_dbf::new;\n }",
"public static Factory factory() {\n return ext_h::new;\n }",
"public static IngestHelperInterface create() {\n ClassLoader cl = SimpleDataTypeHelper.class.getClassLoader();\n return (IngestHelperInterface) Proxy.newProxyInstance(cl, new Class[] {IngestHelperInterface.class}, new SimpleDataTypeHelper());\n }",
"public Factory() {\n this(getInternalClient());\n }",
"public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }",
"public DataSourceFactory() {}",
"public DockerAdapterFactory() {\n\t\tif (modelPackage == null) {\n\t\t\tmodelPackage = DockerPackage.eINSTANCE;\n\t\t}\n\t}",
"public ClientRepositoryFactory() {\n this(new ClientAdapterFactory());\n }",
"public OpenapiAdapterFactory() {\n\t\tif (modelPackage == null) {\n\t\t\tmodelPackage = OpenapiPackage.eINSTANCE;\n\t\t}\n\t}",
"public AcapeAdapterFactory() {\n\t\tif (modelPackage == null) {\n\t\t\tmodelPackage = AcapePackage.eINSTANCE;\n\t\t}\n\t}",
"public SimulinkAdapterFactory() {\n\t\tif (modelPackage == null) {\n\t\t\tmodelPackage = SimulinkPackage.eINSTANCE;\n\t\t}\n\t}",
"@VisibleForTesting\n ElementAdapterFactory(AdapterFactory<CustomElementAdapter, CustomElement> customElementFactory,\n AdapterFactory<ChunkedTextElementAdapter, Element> chunkedTextElementFactory,\n AdapterFactory<ParameterizedTextElementAdapter, Element>\n parameterizedTextElementFactory,\n AdapterFactory<ImageElementAdapter, ImageElement> imageElementFactory,\n AdapterFactory<GridRowAdapter, GridRow> gridRowFactory,\n AdapterFactory<ElementListAdapter, ElementList> elementListFactory,\n AdapterFactory<ElementStackAdapter, ElementStack> elementStackFactory,\n KeyedRecyclerPool<ElementAdapter<? extends View, ?>> templateRecyclerPool) {\n this.mCustomElementFactory = customElementFactory;\n this.mChunkedTextElementFactory = chunkedTextElementFactory;\n this.mParameterizedTextElementFactory = parameterizedTextElementFactory;\n this.mImageElementFactory = imageElementFactory;\n this.mGridRowFactory = gridRowFactory;\n this.mElementListFactory = elementListFactory;\n this.mElementStackFactory = elementStackFactory;\n mFactories = Collections.unmodifiableList(Arrays.asList(customElementFactory,\n chunkedTextElementFactory, parameterizedTextElementFactory, imageElementFactory,\n gridRowFactory, elementListFactory, elementStackFactory));\n this.mTemplateRecyclerPool = templateRecyclerPool;\n }",
"public SiddhiAdapterFactory()\n {\n if (modelPackage == null)\n {\n modelPackage = SiddhiPackage.eINSTANCE;\n }\n }",
"public SpielfeldAdapterFactory() {\r\n if (modelPackage == null) {\r\n modelPackage = SpielfeldPackage.eINSTANCE;\r\n }\r\n }",
"public AndroidFactoryImpl() {\n\t\tsuper();\n\t}",
"public ExpressionsAdapterFactory()\r\n {\r\n if (modelPackage == null)\r\n {\r\n modelPackage = ExpressionsPackage.eINSTANCE;\r\n }\r\n }",
"public BookingAdapterFactory() {\n\t\tif (modelPackage == null) {\n\t\t\tmodelPackage = BookingPackage.eINSTANCE;\n\t\t}\n\t}",
"private PerfectoDriverFactory() {\n\n\t}",
"public static amlTreeAdapterFactory getInstance() {\r\n\t\treturn instance;\r\n\t}",
"public static StaticFactoryInsteadOfConstructors newInstance() {\n return new StaticFactoryInsteadOfConstructors();\n }",
"public Factory() {\n\t\tsuper();\n\t}",
"public RulesAdapterFactory()\n {\n if (modelPackage == null)\n {\n modelPackage = RulesPackage.eINSTANCE;\n }\n }",
"public CsvManagerAdapterFactory() {\n\t\tif (modelPackage == null) {\n\t\t\tmodelPackage = CsvManagerPackage.eINSTANCE;\n\t\t}\n\t}",
"public TypeAdapterFactory() {\n\t\tif (modelPackage == null) {\n\t\t\tmodelPackage = TypePackage.eINSTANCE;\n\t\t}\n\t}",
"public SuricateAdapterFactory()\r\n {\r\n if (modelPackage == null)\r\n {\r\n modelPackage = SuricatePackage.eINSTANCE;\r\n }\r\n }",
"public ExtensionsAdapterFactory() {\n\t\tif (modelPackage == null) {\n\t\t\tmodelPackage = ExtensionsPackage.eINSTANCE;\n\t\t}\n\t}",
"public NetworkDependencyItemProvider(AdapterFactory adapterFactory) {\n\t\tsuper(adapterFactory);\n\t}",
"public QuizAdapterFactory() {\n\t\tif (modelPackage == null) {\n\t\t\tmodelPackage = QuizPackage.eINSTANCE;\n\t\t}\n\t}",
"public static AndroidFactory init() {\n\t\ttry {\n\t\t\tAndroidFactory theAndroidFactory = (AndroidFactory)EPackage.Registry.INSTANCE.getEFactory(\"http://www.eyal.fr/android\"); \n\t\t\tif (theAndroidFactory != null) {\n\t\t\t\treturn theAndroidFactory;\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 AndroidFactoryImpl();\n\t}",
"public MSLAdapterFactory()\r\n {\r\n if (modelPackage == null)\r\n {\r\n modelPackage = MSLPackage.eINSTANCE;\r\n }\r\n }",
"public RailwayAdapterFactory() {\n\t\tif (modelPackage == null) {\n\t\t\tmodelPackage = RailwayPackage.eINSTANCE;\n\t\t}\n\t}",
"public ReflexAdapterFactory()\n {\n if (modelPackage == null)\n {\n modelPackage = ReflexPackage.eINSTANCE;\n }\n }",
"public NgtAdapterFactory()\n {\n if (modelPackage == null)\n {\n modelPackage = NgtPackage.eINSTANCE;\n }\n }",
"public static Factory factory() {\n return ext_xspf::new;\n }",
"public DaoFactory()\n\t{\n\n\t}",
"public AnalysisAdapterFactory() {\r\n\t\tif (modelPackage == null) {\r\n\t\t\tmodelPackage = AnalysisPackage.eINSTANCE;\r\n\t\t}\r\n\t}",
"public RppAdapterFactory()\r\n {\r\n if (modelPackage == null)\r\n {\r\n modelPackage = RppPackage.eINSTANCE;\r\n }\r\n }",
"public EdgeItemProvider(AdapterFactory adapterFactory) {\n\t\tsuper(adapterFactory);\n\t}",
"public interface SerializerFactory<T> {\n\t\n\t/** the method creates a new MessageSerializer.\n\t * \n\t * @return new object that implements the MessageSerializer interface. \n\t */\n MessageSerializer<T> create();\n}",
"default Factory<T> toFactory() {\n throw new UnsupportedOperationException();\n }",
"public SecuritySchemaItemProvider(AdapterFactory adapterFactory) {\n\t\tsuper(adapterFactory);\n\t}",
"public BeanItemProvider(AdapterFactory adapterFactory) {\n\t\tsuper(adapterFactory);\n\t}",
"public DataflowItemProviderAdapterFactory() {\n\t\tsupportedTypes.add(IEditingDomainItemProvider.class);\n\t\tsupportedTypes.add(IStructuredItemContentProvider.class);\n\t\tsupportedTypes.add(ITreeItemContentProvider.class);\n\t\tsupportedTypes.add(IItemLabelProvider.class);\n\t\tsupportedTypes.add(IItemPropertySource.class);\n\t}",
"protected abstract MultiTypeAdapter createAdapter();",
"public static HwDiagramFactory init() {\r\n\t\ttry {\r\n\t\t\tHwDiagramFactory theHwDiagramFactory = (HwDiagramFactory)EPackage.Registry.INSTANCE.getEFactory(HwDiagramPackage.eNS_URI);\r\n\t\t\tif (theHwDiagramFactory != null) {\r\n\t\t\t\treturn theHwDiagramFactory;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception exception) {\r\n\t\t\tEcorePlugin.INSTANCE.log(exception);\r\n\t\t}\r\n\t\treturn new HwDiagramFactoryImpl();\r\n\t}",
"public Adapter createEObjectAdapter()\n {\n return null;\n }",
"public Adapter createEObjectAdapter()\n {\n return null;\n }",
"public Adapter createEObjectAdapter()\n {\n return null;\n }",
"public Adapter createEObjectAdapter()\n {\n return null;\n }",
"public Adapter createEObjectAdapter()\n {\n return null;\n }",
"public Adapter createEObjectAdapter()\n {\n return null;\n }",
"public Adapter createEObjectAdapter()\n {\n return null;\n }",
"public Adapter createEObjectAdapter()\n {\n return null;\n }",
"public static Retrofit create() {\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n return retrofit;\n\n }",
"public void setAdapterFactory(AdapterFactory adapterFactory)\n {\n this.adapterFactory = adapterFactory;\n }",
"public PedidoFactoryImpl() {\n\t\tsuper();\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public MyDslAdapterFactory()\r\n {\r\n if (modelPackage == null)\r\n {\r\n modelPackage = MyDslPackage.eINSTANCE;\r\n }\r\n }",
"AndroidFactory getAndroidFactory();",
"IntStrategyFactory() {\n }",
"public static PedidoFactory init() {\n\t\ttry {\n\t\t\tPedidoFactory thePedidoFactory = (PedidoFactory) EPackage.Registry.INSTANCE\n\t\t\t\t\t.getEFactory(PedidoPackage.eNS_URI);\n\t\t\tif (thePedidoFactory != null) {\n\t\t\t\treturn thePedidoFactory;\n\t\t\t}\n\t\t} catch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new PedidoFactoryImpl();\n\t}",
"@Override\n\t\t\tprotected IAdapterFactory getDefaultAdapterFactory(Object type) {\n\t\t\t\treturn defaultAdapterFactory;\n\t\t\t}",
"public ResourceenvironmentAdapterFactory() {\n if (modelPackage == null) {\n modelPackage = ResourceenvironmentPackage.eINSTANCE;\n }\n }",
"private MultibinderFactory() { }",
"public SasDslAdapterFactory()\n {\n if (modelPackage == null)\n {\n modelPackage = SasDslPackage.eINSTANCE;\n }\n }",
"public Adapter createEObjectAdapter() {\r\n\t\treturn null;\r\n\t}",
"public Adapter createEObjectAdapter() {\r\n\t\treturn null;\r\n\t}",
"public Adapter createEObjectAdapter() {\r\n\t\treturn null;\r\n\t}"
] | [
"0.7249992",
"0.7110674",
"0.68894076",
"0.66034395",
"0.65651506",
"0.65610856",
"0.6485339",
"0.6399168",
"0.6395684",
"0.637993",
"0.6320026",
"0.61370915",
"0.6113887",
"0.60633504",
"0.5996924",
"0.5993408",
"0.5991259",
"0.59895295",
"0.5981399",
"0.59707326",
"0.59652317",
"0.5944561",
"0.58818877",
"0.5866798",
"0.5856655",
"0.5845606",
"0.5818945",
"0.5814011",
"0.5807176",
"0.5804127",
"0.5800406",
"0.57951146",
"0.5792803",
"0.5790568",
"0.5781534",
"0.5777697",
"0.5759546",
"0.575383",
"0.57386404",
"0.573207",
"0.5706987",
"0.57056355",
"0.57030845",
"0.5700905",
"0.568954",
"0.5678298",
"0.56723905",
"0.56655496",
"0.56576246",
"0.56551236",
"0.5650947",
"0.564881",
"0.56476074",
"0.5643739",
"0.5643739",
"0.5643739",
"0.5643739",
"0.5643739",
"0.5643739",
"0.5643739",
"0.5643739",
"0.5638099",
"0.56375366",
"0.5631069",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5615685",
"0.5614287",
"0.5607307",
"0.5601156",
"0.55931026",
"0.5590483",
"0.55868775",
"0.55864304",
"0.55862623",
"0.5576966",
"0.5576966",
"0.5576966"
] | 0.0 | -1 |
Returns whether this factory is applicable for the type of the object. This implementation returns true if the object is either the model's package or is an instance object of the model. | @Override
public boolean isFactoryForType(Object object)
{
if (object == modelPackage)
{
return true;
}
if (object instanceof EObject)
{
return ((EObject)object).eClass().getEPackage() == modelPackage;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean isFactoryForType(Object object) {\n if (object == modelPackage) {\n return true;\n }\n if (object instanceof EObject) {\n return ((EObject)object).eClass().getEPackage() == modelPackage;\n }\n return false;\n }",
"@Override\r\n public boolean isFactoryForType(Object object) {\r\n if (object == modelPackage) {\r\n return true;\r\n }\r\n if (object instanceof EObject) {\r\n return ((EObject)object).eClass().getEPackage() == modelPackage;\r\n }\r\n return false;\r\n }",
"@Override\n public boolean isFactoryForType(final Object object) {\n if (object == modelPackage) {\n return true;\n }\n if (object instanceof EObject) {\n return ((EObject) object).eClass().getEPackage() == modelPackage;\n }\n return false;\n }",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject) object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject) object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject) object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject) object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic boolean isFactoryForType(Object object) {\r\n\t\tif (object == modelPackage) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (object instanceof EObject) {\r\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean isFactoryForType(Object object) {\r\n\t\tif (object == modelPackage) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (object instanceof EObject) {\r\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean isFactoryForType(Object object) {\r\n\t\tif (object == modelPackage) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (object instanceof EObject) {\r\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean isFactoryForType(Object object) {\r\n\t\tif (object == modelPackage) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (object instanceof EObject) {\r\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean isFactoryForType(Object object) {\r\n\t\tif (object == modelPackage) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (object instanceof EObject) {\r\n\t\t\treturn ((EObject) object).eClass().getEPackage() == modelPackage;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean isFactoryForType(Object object) {\r\n\t\tif (object == modelPackage) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (object instanceof EObject) {\r\n\t\t\treturn ((EObject) object).eClass().getEPackage() == modelPackage;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\r\n public boolean isFactoryForType(Object object)\r\n {\r\n if (object == modelPackage)\r\n {\r\n return true;\r\n }\r\n if (object instanceof EObject)\r\n {\r\n return ((EObject)object).eClass().getEPackage() == modelPackage;\r\n }\r\n return false;\r\n }",
"@Override\r\n public boolean isFactoryForType(Object object)\r\n {\r\n if (object == modelPackage)\r\n {\r\n return true;\r\n }\r\n if (object instanceof EObject)\r\n {\r\n return ((EObject)object).eClass().getEPackage() == modelPackage;\r\n }\r\n return false;\r\n }",
"@Override\r\n public boolean isFactoryForType(Object object)\r\n {\r\n if (object == modelPackage)\r\n {\r\n return true;\r\n }\r\n if (object instanceof EObject)\r\n {\r\n return ((EObject)object).eClass().getEPackage() == modelPackage;\r\n }\r\n return false;\r\n }",
"@Override\r\n public boolean isFactoryForType(Object object)\r\n {\r\n if (object == modelPackage)\r\n {\r\n return true;\r\n }\r\n if (object instanceof EObject)\r\n {\r\n return ((EObject)object).eClass().getEPackage() == modelPackage;\r\n }\r\n return false;\r\n }",
"@Override\r\n public boolean isFactoryForType(Object object)\r\n {\r\n if (object == modelPackage)\r\n {\r\n return true;\r\n }\r\n if (object instanceof EObject)\r\n {\r\n return ((EObject)object).eClass().getEPackage() == modelPackage;\r\n }\r\n return false;\r\n }",
"@Override\r\n public boolean isFactoryForType(Object object)\r\n {\r\n if (object == modelPackage)\r\n {\r\n return true;\r\n }\r\n if (object instanceof EObject)\r\n {\r\n return ((EObject)object).eClass().getEPackage() == modelPackage;\r\n }\r\n return false;\r\n }",
"@Override\r\n public boolean isFactoryForType(Object object) {\r\n\t\tif (object == modelPackage) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (object instanceof EObject) {\r\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean isObject() {\n\t\t// Object is the class that has itself as superclass\n\t\treturn getSuperClass() == this;\n\t}",
"public boolean isSatisfiedBy(Object obj) {\n for (Class<?> klass : _klasses) {\n if (obj != null && klass.isAssignableFrom(obj.getClass())) {\n return true;\n }\n }\n return false;\n }",
"public boolean isMaybeObjectOrSymbol() {\n checkNotPolymorphicOrUnknown();\n return object_labels != null;\n }",
"public static boolean isModel(Class<?> type) {\n\t\treturn isSubclassOf(type, Model.class);\n\t}",
"boolean isApplicable(final T model);",
"@SuppressWarnings(\"unchecked\")\n \tpublic static boolean isCraftItemStack(final Object obj) {\n \t\treturn getCraftItemStackClass().isAssignableFrom(obj.getClass());\n \t}",
"public abstract boolean isObject(T type);",
"@Override\n\tpublic boolean isClassObject() {\n\t\treturn heldObj.isClassObject();\n\t}",
"private static boolean isDate(final Object obj) {\n return dateClass != null && dateClass.isAssignableFrom(obj.getClass());\n }",
"public boolean isInstanceOf(Class c);",
"public boolean isClass() {\n return operation == null;\n }",
"public boolean is( Type type ) {\n return this.type == type;\n }",
"protected boolean isObject() {\n long mark = 0;\n try {\n mark = this.createMark();\n boolean bl = this.getObject() != null;\n return bl;\n }\n catch (MathLinkException e) {\n this.clearError();\n boolean bl = false;\n return bl;\n }\n finally {\n if (mark != 0) {\n this.seekMark(mark);\n this.destroyMark(mark);\n }\n }\n }",
"public boolean isSetObject() {\n return this.object != null;\n }",
"public Boolean getObjectType() {\r\n\t\treturn objectType;\r\n\t}",
"public boolean isType() {\n return type;\n }",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();"
] | [
"0.75941044",
"0.7589447",
"0.7581897",
"0.75470054",
"0.75470054",
"0.75470054",
"0.75470054",
"0.75470054",
"0.75470054",
"0.75470054",
"0.75470054",
"0.75470054",
"0.75470054",
"0.75470054",
"0.75470054",
"0.75470054",
"0.75470054",
"0.75470054",
"0.75470054",
"0.75470054",
"0.75470054",
"0.75470054",
"0.75470054",
"0.75470054",
"0.754328",
"0.754328",
"0.754328",
"0.754328",
"0.7530546",
"0.7530546",
"0.7530546",
"0.7530546",
"0.75244564",
"0.75244564",
"0.752265",
"0.7446213",
"0.7446213",
"0.7446213",
"0.7446213",
"0.7446213",
"0.7446213",
"0.7385814",
"0.66623145",
"0.61531067",
"0.61361265",
"0.60214525",
"0.59982723",
"0.5985827",
"0.5935192",
"0.58529127",
"0.5817147",
"0.58162075",
"0.5775813",
"0.57608914",
"0.5760187",
"0.5758354",
"0.5752077",
"0.5736959",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543",
"0.56865543"
] | 0.7489246 | 42 |
Creates an adapter for the target. | @Override
public Adapter createAdapter(Notifier target)
{
return modelSwitch.doSwitch((EObject)target);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Adapter createAdapter(Notifier target) {\n\t\treturn (Adapter)modelSwitch.doSwitch((EObject)target);\n\t}",
"@Override\n public Adapter createAdapter(Notifier target) {\n return modelSwitch.doSwitch((EObject)target);\n }",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject)target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject)target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject)target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject)target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject)target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject)target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject)target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject)target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject)target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject)target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject)target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject)target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject)target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject)target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject)target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject)target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject)target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject)target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject)target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject)target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject)target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject) target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject) target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject) target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject) target);\n\t}",
"@Override\r\n\tpublic Adapter createAdapter(Notifier target) {\r\n\t\treturn modelSwitch.doSwitch((EObject)target);\r\n\t}",
"@Override\r\n\tpublic Adapter createAdapter(Notifier target) {\r\n\t\treturn modelSwitch.doSwitch((EObject)target);\r\n\t}",
"@Override\r\n\tpublic Adapter createAdapter(Notifier target) {\r\n\t\treturn modelSwitch.doSwitch((EObject)target);\r\n\t}",
"@Override\r\n\tpublic Adapter createAdapter(Notifier target) {\r\n\t\treturn modelSwitch.doSwitch((EObject)target);\r\n\t}",
"@Override\r\n public Adapter createAdapter(Notifier target) {\r\n return modelSwitch.doSwitch((EObject)target);\r\n }",
"@Override\r\n\tpublic Adapter createAdapter(Notifier target) {\r\n\t\treturn modelSwitch.doSwitch((EObject) target);\r\n\t}",
"@Override\r\n\tpublic Adapter createAdapter(Notifier target) {\r\n\t\treturn modelSwitch.doSwitch((EObject) target);\r\n\t}",
"@Override\n public Adapter createAdapter(final Notifier target) {\n return this.modelSwitch.doSwitch((EObject) target);\n }",
"@Override\r\n public Adapter createAdapter(Notifier target) {\r\n\t\treturn modelSwitch.doSwitch((EObject)target);\r\n\t}",
"@Override\r\n public Adapter createAdapter(Notifier target)\r\n {\r\n return modelSwitch.doSwitch((EObject)target);\r\n }",
"@Override\r\n public Adapter createAdapter(Notifier target)\r\n {\r\n return modelSwitch.doSwitch((EObject)target);\r\n }",
"@Override\r\n public Adapter createAdapter(Notifier target)\r\n {\r\n return modelSwitch.doSwitch((EObject)target);\r\n }",
"@Override\r\n public Adapter createAdapter(Notifier target)\r\n {\r\n return modelSwitch.doSwitch((EObject)target);\r\n }",
"@Override\r\n public Adapter createAdapter(Notifier target)\r\n {\r\n return modelSwitch.doSwitch((EObject)target);\r\n }",
"@Override\r\n public Adapter createAdapter(Notifier target)\r\n {\r\n return modelSwitch.doSwitch((EObject)target);\r\n }",
"Builder adapterFactory(TypeAdapterFactory factory);",
"private PropertyAdapter createLocalDMAdapter(InetSocketAddress local,\r\n\t\tInetSocketAddress host, Map options) throws KNXException\r\n\t{\r\n\t\treturn new KnIPDeviceMgmtAdapter(local, host, options.containsKey(\"nat\"),\r\n\t\t\tnew PropertyListener(), options.containsKey(\"emulatewrite\"));\r\n\t}",
"protected abstract MultiTypeAdapter createAdapter();",
"private PropertyAdapter create(Map options) throws KNXException\r\n\t{\r\n\t\t// add a log writer for the console (System.out), setting a\r\n\t\t// user log level, if specified\r\n\t\tLogManager.getManager().addWriter(null,\r\n\t\t\tnew ConsoleWriter(options.containsKey(\"verbose\")));\r\n\t\t// create local and remote socket address for use in adapter\r\n\t\tfinal InetSocketAddress local =\r\n\t\t\tcreateLocalSocket((InetAddress) options.get(\"localhost\"), (Integer) options\r\n\t\t\t\t.get(\"localport\"));\r\n\t\tfinal InetSocketAddress host =\r\n\t\t\tnew InetSocketAddress((InetAddress) options.get(\"host\"), ((Integer) options\r\n\t\t\t\t.get(\"port\")).intValue());\r\n\t\t// decide what type of adapter to create\r\n\t\tif (options.containsKey(\"localDM\"))\r\n\t\t\treturn createLocalDMAdapter(local, host, options);\r\n\t\treturn createRemoteAdapter(local, host, options);\r\n\t}",
"public void registerAdapters(IAdapterFactory factory, Class<?> adaptable);",
"public Adapter create( Argument[] arguments )\r\n throws UnrecognizedCriteria, InvalidCriteria, CreationException\r\n {\r\n return getFactory().create( arguments ).get_adapter();\r\n }",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter()\n {\n return null;\n }",
"public Adapter createEObjectAdapter()\n {\n return null;\n }",
"public Adapter createEObjectAdapter()\n {\n return null;\n }",
"public Adapter createEObjectAdapter()\n {\n return null;\n }",
"public Adapter createEObjectAdapter()\n {\n return null;\n }",
"public Adapter createEObjectAdapter()\n {\n return null;\n }",
"public Adapter createEObjectAdapter()\n {\n return null;\n }",
"public Adapter createEObjectAdapter()\n {\n return null;\n }",
"private PropertyAdapter createRemoteAdapter(InetSocketAddress local,\r\n\t\tInetSocketAddress host, Map options) throws KNXException\r\n\t{\r\n\t\tfinal KNXMediumSettings medium = (KNXMediumSettings) options.get(\"medium\");\r\n\t\tif (options.containsKey(\"serial\")) {\r\n\t\t\t// create FT1.2 network link\r\n\t\t\tfinal String p = (String) options.get(\"serial\");\r\n\t\t\ttry {\r\n\t\t\t\tlnk = new KNXNetworkLinkFT12(Integer.parseInt(p), medium);\r\n\t\t\t}\r\n\t\t\tcatch (final NumberFormatException e) {\r\n\t\t\t\tlnk = new KNXNetworkLinkFT12(p, medium);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tfinal int mode = options.containsKey(\"routing\") ? KNXNetworkLinkIP.ROUTER\r\n\t\t\t\t: KNXNetworkLinkIP.TUNNEL;\r\n\t\t\tlnk = new KNXNetworkLinkIP(mode, local, host, options.containsKey(\"nat\"),\r\n\t\t\t\tmedium);\r\n\t\t}\r\n\t\tfinal IndividualAddress remote = (IndividualAddress) options.get(\"remote\");\r\n\t\tfinal PropertyListener l = new PropertyListener();\r\n\t\t// if an authorization key was supplied, the adapter uses\r\n\t\t// connection oriented mode and tries to authenticate\r\n\t\tfinal byte[] authKey = (byte[]) options.get(\"authorize\");\r\n\t\tif (authKey != null)\r\n\t\t\treturn new RemotePropertyServiceAdapter(lnk, remote, l, authKey);\r\n\t\treturn new RemotePropertyServiceAdapter(lnk, remote, l,\r\n\t\t\toptions.containsKey(\"connect\"));\r\n\t}",
"abstract public void setUpAdapter();",
"public Adapter createEObjectAdapter() {\r\n\t\treturn null;\r\n\t}",
"public Adapter createEObjectAdapter() {\r\n\t\treturn null;\r\n\t}",
"public Adapter createEObjectAdapter() {\r\n\t\treturn null;\r\n\t}",
"public Adapter createEObjectAdapter() {\r\n\t\treturn null;\r\n\t}",
"public Adapter createEObjectAdapter() {\r\n\t\treturn null;\r\n\t}",
"public Adapter createEObjectAdapter() {\r\n\t\treturn null;\r\n\t}",
"public Adapter createEObjectAdapter() {\r\n\t\treturn null;\r\n\t}",
"public Adapter createEObjectAdapter()\r\n {\r\n return null;\r\n }",
"public Adapter createEObjectAdapter()\r\n {\r\n return null;\r\n }"
] | [
"0.7459274",
"0.68758494",
"0.67918706",
"0.67918706",
"0.67918706",
"0.67918706",
"0.67918706",
"0.67918706",
"0.67918706",
"0.67918706",
"0.67918706",
"0.67918706",
"0.67918706",
"0.67918706",
"0.67918706",
"0.67918706",
"0.67918706",
"0.67918706",
"0.67918706",
"0.67918706",
"0.67918706",
"0.67918706",
"0.67918706",
"0.6763314",
"0.6763314",
"0.6763314",
"0.6763314",
"0.67584866",
"0.67584866",
"0.67584866",
"0.67584866",
"0.6758065",
"0.6728556",
"0.6728556",
"0.67268217",
"0.6715917",
"0.662866",
"0.662866",
"0.662866",
"0.662866",
"0.662866",
"0.662866",
"0.6106307",
"0.5779574",
"0.56581825",
"0.5636982",
"0.55696285",
"0.5479496",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5466445",
"0.5439277",
"0.5439277",
"0.5439277",
"0.5439277",
"0.5439277",
"0.5439277",
"0.5439277",
"0.5439277",
"0.54266024",
"0.5412456",
"0.54111606",
"0.54111606",
"0.54111606",
"0.54111606",
"0.54111606",
"0.54111606",
"0.54111606",
"0.53101563",
"0.53101563"
] | 0.6761169 | 34 |
Creates a new adapter for the default case. This default implementation returns null. | public Adapter createEObjectAdapter()
{
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\tprotected IAdapterFactory getDefaultAdapterFactory(Object type) {\n\t\t\t\treturn defaultAdapterFactory;\n\t\t\t}",
"@Override\n\t\tpublic <T> T getAdapter(Class<T> adapter) {\n\t\t\treturn null;\n\t\t}",
"@Override\n\tpublic Object getAdapter(Class adapter) {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic Object getAdapter(Class adapter) {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic Object getAdapter(Class adapter) {\n\t\treturn null;\r\n\t}",
"public static synchronized JacksonAdapter createDefaultSerializerAdapter() {\n if (serializerAdapter == null) {\n serializerAdapter = new JacksonAdapter();\n }\n return serializerAdapter;\n }",
"public Adapter createEObjectAdapter()\r\n {\r\n return null;\r\n }",
"public Adapter createEObjectAdapter()\r\n {\r\n return null;\r\n }",
"public Adapter createEObjectAdapter()\r\n {\r\n return null;\r\n }",
"public Adapter createEObjectAdapter()\r\n {\r\n return null;\r\n }",
"public Adapter createEObjectAdapter()\r\n {\r\n return null;\r\n }",
"public Adapter createEObjectAdapter()\r\n {\r\n return null;\r\n }",
"public Adapter createEObjectAdapter() {\n return null;\n }",
"public Adapter createEObjectAdapter() {\n return null;\n }",
"public Adapter createEObjectAdapter() {\r\n return null;\r\n }",
"public Adapter createEObjectAdapter() {\r\n\t\treturn null;\r\n\t}",
"public Adapter createEObjectAdapter() {\r\n\t\treturn null;\r\n\t}",
"public Adapter createEObjectAdapter() {\r\n\t\treturn null;\r\n\t}",
"public Adapter createEObjectAdapter() {\r\n\t\treturn null;\r\n\t}",
"public Adapter createEObjectAdapter() {\r\n\t\treturn null;\r\n\t}",
"public Adapter createEObjectAdapter() {\r\n\t\treturn null;\r\n\t}",
"public Adapter createEObjectAdapter() {\r\n\t\treturn null;\r\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Adapter createEObjectAdapter() {\n\t\treturn null;\n\t}",
"public Object getAdapter(Class adapter) {\n\t\treturn null;\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic Object getAdapter(final Class adapter)\n\t{\n\n\t\treturn null;\n\t}",
"@Override\n\tpublic DmcAdapterIF getAdapter() {\n\t\treturn null;\n\t}",
"protected abstract MultiTypeAdapter createAdapter();",
"public String getAdapter() {\n return adapter;\n }",
"public static JsonAdapter.Factory create() {\n return nullSafe(new AutoValueMoshi_AutoValueFactory());\n }",
"public static GenericBootstrap byDefaultProvider() {\n return new GenericBootstrapImpl();\n }",
"protected abstract S createDefault();",
"private void initializeAdapter() {\n }",
"@SuppressWarnings(\"rawtypes\")\n @Override\n public Object getAdapter(Class adapter)\n {\n // Compare name as string to compile with RAP,\n // where the RCP IResource class is not available\n if (\"org.eclipse.core.resources.IResource\".equals(adapter.getName()))\n return null;\n return orig.getAdapter(adapter);\n }",
"public static IDatabaseAdapter get(String name) {\n HashMap<String,Object> config = ConfigManager.getInstance().getDatabaseAdapter(name);\n if (config==null || !config.containsKey(\"type\")) return null;\n IDatabaseAdapter result = null;\n switch (config.get(\"type\").toString()) {\n case \"mysql\":\n result = new MysqlDatabaseAdapter();\n break;\n case \"sqlite\":\n result = new SqliteDatabaseAdapter();\n break;\n case \"orientdb\":\n result = new OrientDBDatabaseAdapter();\n break;\n case \"mongodb\":\n result = new MongoDatabaseAdapter();\n }\n if (result != null) result.configure(config);\n return result;\n }",
"abstract public void setUpAdapter();",
"@Override\n\tprotected com.dachen.medicine.adapter.BaseCustomAdapter.BaseViewHolder getViewHolder() {\n\t\treturn new ViewHolder();\n\t}",
"private Default()\n {}",
"protected abstract MainNetworkAdapter<T> getMainAdapter(Context context);",
"public interface AdapterInterface {\n}",
"@Override\n\tpublic DataConfig createDefaultConfig() {\n\t\treturn new DataConfig();\n\t}",
"protected abstract SingleTypeAdapter<E> createAdapter( final List<E> items );",
"public DataAdapter() {\n }",
"Recycler.DefaultHandle<T> newHandle()\r\n/* 582: */ {\r\n/* 583:623 */ return new Recycler.DefaultHandle(this);\r\n/* 584: */ }",
"IEquipableItem createDefault();",
"public BreweriesAdapter() {\n }",
"public LibraryAdapterFactory() {\r\n\t}",
"public Adapter createAdapter(Notifier target) {\n\t\treturn (Adapter)modelSwitch.doSwitch((EObject)target);\n\t}",
"public AdapterFactory getAdapterFactory()\n {\n return adapterFactory;\n }",
"public OpenapiAdapterFactory() {\n\t\tif (modelPackage == null) {\n\t\t\tmodelPackage = OpenapiPackage.eINSTANCE;\n\t\t}\n\t}",
"@Override\n public Adapter createAdapter(Notifier target) {\n return modelSwitch.doSwitch((EObject)target);\n }",
"@Override\n public Adapter adapt(Notifier notifier, Object type)\n {\n return super.adapt(notifier, this);\n }",
"public SimulinkAdapterFactory() {\n\t\tif (modelPackage == null) {\n\t\t\tmodelPackage = SimulinkPackage.eINSTANCE;\n\t\t}\n\t}",
"public TanksTestAdapterExtended1() {\r\n\t\tsuper();\r\n\t}",
"@Override\n public Adapter createAdapter(Notifier target)\n {\n return modelSwitch.doSwitch((EObject)target);\n }",
"@Override\n public Adapter createAdapter(Notifier target)\n {\n return modelSwitch.doSwitch((EObject)target);\n }",
"@Override\n public Adapter createAdapter(Notifier target)\n {\n return modelSwitch.doSwitch((EObject)target);\n }",
"@Override\n public Adapter createAdapter(Notifier target)\n {\n return modelSwitch.doSwitch((EObject)target);\n }",
"@Override\n public Adapter createAdapter(Notifier target)\n {\n return modelSwitch.doSwitch((EObject)target);\n }",
"@Override\n public Adapter createAdapter(Notifier target)\n {\n return modelSwitch.doSwitch((EObject)target);\n }",
"@Override\n public Adapter createAdapter(Notifier target)\n {\n return modelSwitch.doSwitch((EObject)target);\n }",
"@Override\n public Adapter createAdapter(Notifier target)\n {\n return modelSwitch.doSwitch((EObject)target);\n }",
"@Override\r\n public Adapter createAdapter(Notifier target) {\r\n\t\treturn modelSwitch.doSwitch((EObject)target);\r\n\t}",
"final Truerandomness defaultInstance() {\n\n\t\ttry {\n\t\t\treturn newInstance();\n\t\t} catch (Throwable t) {\n\t\t\t// hide\n\t\t}\n\n\t\t// not supported\n\t\treturn null;\n\t}",
"@Override\n\tpublic BlobExportAdapter getBlobExportAdapter(Connection connection, BlobType type) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject) target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject) target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject) target);\n\t}",
"@Override\n\tpublic Adapter createAdapter(Notifier target) {\n\t\treturn modelSwitch.doSwitch((EObject) target);\n\t}"
] | [
"0.69044083",
"0.6790533",
"0.6787222",
"0.6748163",
"0.6748163",
"0.6607967",
"0.64543974",
"0.64543974",
"0.64543974",
"0.64543974",
"0.64543974",
"0.64543974",
"0.6427404",
"0.6427404",
"0.64170116",
"0.6408954",
"0.6408954",
"0.6408954",
"0.6408954",
"0.6408954",
"0.6408954",
"0.6408954",
"0.6407915",
"0.6407915",
"0.6407915",
"0.6407915",
"0.6407915",
"0.6407915",
"0.6407915",
"0.6407915",
"0.6407915",
"0.6407915",
"0.6407915",
"0.6407915",
"0.6407915",
"0.6407915",
"0.6407915",
"0.6407915",
"0.6407915",
"0.6407915",
"0.6407915",
"0.6407915",
"0.6407915",
"0.6407915",
"0.6407915",
"0.6407915",
"0.6407915",
"0.6407915",
"0.63197213",
"0.6175502",
"0.6075915",
"0.5871021",
"0.5781764",
"0.57197326",
"0.5710786",
"0.5691773",
"0.5661745",
"0.5654081",
"0.55826735",
"0.5573815",
"0.5545511",
"0.55211323",
"0.551234",
"0.5501426",
"0.5501269",
"0.54679966",
"0.545776",
"0.54344594",
"0.54282445",
"0.53997874",
"0.53929365",
"0.5391568",
"0.5380853",
"0.5364477",
"0.53426105",
"0.53394586",
"0.5333968",
"0.5330154",
"0.53136563",
"0.53136563",
"0.53136563",
"0.53136563",
"0.53136563",
"0.53136563",
"0.53136563",
"0.53136563",
"0.52891815",
"0.5284228",
"0.52726203",
"0.52711916",
"0.52711916",
"0.52711916",
"0.52711916"
] | 0.6458888 | 13 |
Creates a new instance of this class using the given parameters. | public SystemModel2FileFilter(final Configuration configuration, final IProjectContext projectContext) {
super(configuration, projectContext);
this.outputFnHTML = configuration.getPathProperty(CONFIG_PROPERTY_NAME_HTML_OUTPUT_FN);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Instantiation(){}",
"Reproducible newInstance();",
"Instance createInstance();",
"public Parameters() {\n\t}",
"public CMObject newInstance();",
"public ParameterizedInstantiateFactory() {\r\n super();\r\n }",
"public void create(){}",
"public T newInstance();",
"public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }",
"T newInstance(Object... args);",
"public Object createNew(String typename, Object... args) \n\t\tthrows \tIllegalAccessException, \n\t\t\tInstantiationException, \n\t\t\tClassNotFoundException,\n\t\t\tNoSuchMethodException,\n\t\t\tInvocationTargetException \n\t{\n\t\tswitch(args.length) \n\t\t{\n\t\tcase 1 : return Class.forName(typename).getConstructor(args[0].getClass()).newInstance(args[0]);\n\t\tcase 2 : return Class.forName(typename).getConstructor(args[0].getClass(), args[1].getClass()).\n\t\t\tnewInstance(args[0], args[1]);\n\t\t}\n\t\treturn null;\n\t}",
"public Factory(Class<? extends K> class1, Object... params) {\n\t\ttry {\n\t\t\tthis.params = params;\n\t\t\tif (params != null && params.length > 0) {\n\t\t\t\tClass<?>[] clazzes = new Class<?>[params.length];\n\t\t\t\tint i = 0;\n\t\t\t\tfor (Object param : params) {\n\t\t\t\t\tclazzes[i++] = param.getClass();\n\t\t\t\t}\n\t\t\t\tconstructor = class1.getConstructor(clazzes);\n\t\t\t} else {\n\t\t\t\tconstructor = class1.getConstructor();\n\t\t\t}\n\t\t} catch (Throwable e) {\n\t\t\tlog.error(\"Error initializing factory\", e);\n\t\t\tthrow new Error(\"Internal error initializing factory\", e);\n\t\t}\n\t}",
"protected abstract void construct();",
"public BaseParameters(){\r\n\t}",
"T create();",
"T create();",
"public Instance() {\n }",
"@Override\r\n\tpublic CMObject newInstance()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn this.getClass().getDeclaredConstructor().newInstance();\r\n\t\t}\r\n\t\tcatch(final Exception e)\r\n\t\t{\r\n\t\t\tLog.errOut(ID(),e);\r\n\t\t}\r\n\t\treturn new StdBehavior();\r\n\t}",
"private Params()\n {\n }",
"public void makeInstance() {\n\t\t// Create the attributes, class and text\n\t\tFastVector fvNominalVal = new FastVector(2);\n\t\tfvNominalVal.addElement(\"ad1\");\n\t\tfvNominalVal.addElement(\"ad2\");\n\t\tAttribute attribute1 = new Attribute(\"class\", fvNominalVal);\n\t\tAttribute attribute2 = new Attribute(\"text\",(FastVector) null);\n\t\t// Create list of instances with one element\n\t\tFastVector fvWekaAttributes = new FastVector(2);\n\t\tfvWekaAttributes.addElement(attribute1);\n\t\tfvWekaAttributes.addElement(attribute2);\n\t\tinstances = new Instances(\"Test relation\", fvWekaAttributes, 1); \n\t\t// Set class index\n\t\tinstances.setClassIndex(0);\n\t\t// Create and add the instance\n\t\tInstance instance = new Instance(2);\n\t\tinstance.setValue(attribute2, text);\n\t\t// Another way to do it:\n\t\t// instance.setValue((Attribute)fvWekaAttributes.elementAt(1), text);\n\t\tinstances.add(instance);\n \t\tSystem.out.println(\"===== Instance created with reference dataset =====\");\n\t\tSystem.out.println(instances);\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"private SceneGraphObject createNode( String className, Class[] parameterTypes, Object[] parameters ) {\n SceneGraphObject ret;\n Constructor constructor;\n\n try {\n Class state = Class.forName( className );\n constructor = state.getConstructor( parameterTypes );\n ret = (SceneGraphObject)constructor.newInstance( parameters );\n\t} catch(ClassNotFoundException e1) {\n if (control.useSuperClassIfNoChildClass())\n ret = createNodeFromSuper( className, parameterTypes, parameters );\n else\n throw new SGIORuntimeException( \"No State class for \"+\n\t\t\t\t\t\tclassName );\n\t} catch( IllegalAccessException e2 ) {\n\t throw new SGIORuntimeException( \"Broken State class for \"+\n\t\t\t\t\t\tclassName+\" - IllegalAccess\" );\n\t} catch( InstantiationException e3 ) {\n\t throw new SGIORuntimeException( \"Broken State class for \"+\n\t\t\t\t\t\tclassName );\n } catch( java.lang.reflect.InvocationTargetException e4 ) {\n\t throw new SGIORuntimeException( \"InvocationTargetException for \"+\n\t\t\t\t\t\tclassName );\n } catch( NoSuchMethodException e5 ) {\n for(int i=0; i<parameterTypes.length; i++)\n System.err.println( parameterTypes[i].getName() );\n System.err.println(\"------\");\n\t throw new SGIORuntimeException( \"Invalid constructor for \"+\n\t\t\t\t\t\tclassName );\n }\n\n return ret;\n }",
"private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}",
"FromValues createFromValues();",
"public Factory() {\n\t\tsuper();\n\t}",
"@Override\n\t\t\tpublic Student executor(Object... parameters) {\n\t\t\t\tStudent s=new Student();\n\t\t\t\ts.setId(Integer.parseInt(parameters[0].toString()));\n\t\t\t\ts.setName(parameters[1].toString());\n\t\t\t\treturn s;\n\t\t\t}",
"public Constructor(){\n\t\t\n\t}",
"public void create() {\n\t\t\n\t}",
"public MLetter(Parameters parametersObj) {\r\n\t\tsuper(parametersObj);\r\n\t}",
"public static Object createInstance(String className, Class<?>[] argumentTypes, Object[] arguments) \n {\n if(className == null) \n {\n throw new IllegalArgumentException(\"ClassName must be specified\");\n }\n if(argumentTypes == null) \n {\n throw new IllegalAnnotationException(\"ArgumentTypes must be specified. Use empty array if no arguments\");\n }\n if(arguments == null) \n {\n throw new IllegalAnnotationException(\"Arguments must be specified. Use empty array if no arguments\");\n }\n try \n {\n Class<?> implClass = loadClass(className); \n Constructor<?> constructor = findConstructor(implClass, argumentTypes);\n return constructor.newInstance(arguments);\n }\n catch (Exception e) \n {\n throw new RuntimeException(\n \"Could not create new instance of \" + className + \", missing package from classpath?\", e);\n } \n }",
"public static StaticFactoryInsteadOfConstructors getInstance(Object optionalParameters){\n return new StaticFactoryInsteadOfConstructors();\n }",
"public static Object create(String className, Class<?>[] argTypes, Object[] argValues)\r\n\t\t\tthrows CreateObjectException {\r\n\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tClass<?> clz = Class.forName(className);\r\n\t\t\tif (argTypes == null) {\r\n\t\t\t\treturn clz.newInstance();\r\n\r\n\t\t\t} else {\r\n\t\t\t\tConstructor<?> c = clz.getConstructor(argTypes);\r\n\t\t\t\treturn c.newInstance(argValues);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new CreateObjectException(e);\r\n\t\t}\r\n\t}",
"void createNewInstance(String filename)\n {\n iIncomingLobsFactory = new incomingLobsFactory();\n iIncomingLobsFactory.setPackageName(\"com.loadSample\");\n \n // include schemaLocation hint for validation\n iIncomingLobsFactory.setXSDFileName(\"LoadSample.xsd\");\n \n // encoding for output document\n iIncomingLobsFactory.setEncoding(\"UTF8\");\n \n // encoding tag for xml declaration\n iIncomingLobsFactory.setEncodingTag(\"UTF-8\");\n \n // Create the root element in the document using the specified root element name\n iIncomingLobs = (incomingLobs) iIncomingLobsFactory.createRoot(\"incomingLobs\");\n createincomingLobs();\n \n iIncomingLobsFactory.save(filename);\n }",
"public abstract void create();",
"public CustomEntitiesTaskParameters() {}",
"@Override\r\n\tpublic void create() {\n\t\t\r\n\t}",
"private InstantiateTransformer(Class[] paramTypes, Object[] args) {\n super();\n if (((paramTypes == null) && (args != null))\n || ((paramTypes != null) && (args == null))\n || ((paramTypes != null) && (args != null) && (paramTypes.length != args.length))) {\n throw new IllegalArgumentException(\"InstantiateTransformer: The parameter types must match the arguments\");\n }\n if ((paramTypes == null) && (args == null)) {\n iParamTypes = null;\n iArgs = null;\n } else {\n iParamTypes = (Class[]) paramTypes.clone();\n iArgs = (Object[]) args.clone();\n }\n }",
"@Test\n public void Constructor_ObjectValues_InstanceCreated() {\n\t\ttry {\n Position position = make_PositionWithIntegerPoints(xCoordinate, yCoordinate, direction);\n Surface surface = make_SurfaceWithGivenDimensions(xDimension, yDimension);\n\t\t\tRover rover = make_RoverWithObjectValues(position, surface);\n\t\t}\n\t\tcatch (AssertionError assErr) {\n\t\t\t// Test passed.\n\t\t\treturn;\n\t\t}\n }",
"public Account() {\n this(0, 0.0, \"Unknown name\"); // Invole the 2-param constructor\n }",
"@Import(ModelType.FEATURE_SELECTION)\n\tpublic static LinearDiscriminantAnalysis newInstance(Map<String, Object> params) {\n\t\tLinearDiscriminantAnalysis lda = new LinearDiscriminantAnalysis();\n\t\t\n\t\tlda.ldaMatrix = (double[][])params.get(\"lda\");\n\t\tlda.resultDimension = lda.ldaMatrix.length;\n\t\t\n\t\treturn lda;\n\t}",
"public CustomerNew () {\n\t\tsuper();\n\t}",
"@SuppressWarnings(\"unchecked\")\n public T newInstance()\n throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n if (constructor_ == null) {\n constructor_ = getRawClass().getConstructor();\n }\n\n return (T)constructor_.newInstance();\n }",
"public ClassTemplate() {\n\t}",
"public ParametersBuilder() {\n this(Parameters.DEFAULT);\n }",
"public Builder() {}",
"public Builder() {}",
"public Builder() {}",
"public GeneralParameters instantiate() {\n return instantiate(null);\n }",
"public Factory() {\n this(getInternalClient());\n }",
"public OAuthParameters createParameters() {\n OAuthParameters result = new OAuthParameters();\n result.consumerKey = this.consumerKey;\n result.signer = this.signer;\n return result;\n }",
"public ObjectFactory() {\n\t}",
"public Postoj() {}",
"private User createWithParameters(Map<String, String> userParameters) {\n User user = new User();\n String passHashed = BCrypt.hashpw(userParameters.get(PASSWORD_PARAMETER_NAME), BCrypt.gensalt());\n user.setUsername(userParameters.get(USERNAME_PARAMETER_NAME));\n user.setPassword(passHashed);\n user.setFirstName(userParameters.get(FIRST_NAME_PARAMETER_NAME));\n user.setLastName(userParameters.get(LAST_NAME_PARAMETER_NAME));\n user.setEmail(userParameters.get(EMAIL_PARAMETER_NAME));\n user.setPhone(userParameters.get(PHONE_PARAMETER_NAME));\n user.setAddress(userParameters.get(ADDRESS_PARAMETER_NAME));\n user.setAccount(BigDecimal.ZERO);\n user.setInitDate(LocalDate.now());\n user.setBlockedUntil(LocalDate.now());\n user.setRole(User.Role.USER);\n return user;\n }",
"public Trening() {\n }",
"private SceneGraphObject createNodeFromSuper( String className, Class[] parameterTypes, Object[] parameters ) {\n\tSceneGraphObject ret;\n\n String tmp = this.getClass().getName();\n String superClass = tmp.substring( tmp.indexOf(\"state\")+6, tmp.length()-5 );\n Constructor constructor;\n\n try {\n Class state = Class.forName( superClass );\n constructor = state.getConstructor( parameterTypes );\n ret = (SceneGraphObject)constructor.newInstance( parameters );\n\t} catch(ClassNotFoundException e1) {\n\t throw new SGIORuntimeException( \"No State class for \"+\n\t\t\t\t\t\tsuperClass );\n\t} catch( IllegalAccessException e2 ) {\n\t throw new SGIORuntimeException( \"Broken State class for \"+\n\t\t\t\t\t\tclassName+\" - IllegalAccess\" );\n\t} catch( InstantiationException e3 ) {\n\t throw new SGIORuntimeException( \"Broken State class for \"+\n\t\t\t\t\t\tclassName );\n } catch( java.lang.reflect.InvocationTargetException e4 ) {\n\t throw new SGIORuntimeException( \"InvocationTargetException for \"+\n\t\t\t\t\t\tclassName );\n } catch( NoSuchMethodException e5 ) {\n for(int i=0; i<parameterTypes.length; i++)\n System.err.println( parameterTypes[i].getName() );\n System.err.println(\"------\");\n\t throw new SGIORuntimeException( \"Invalid constructor for \"+\n\t\t\t\t\t\tclassName );\n }\n\n return ret;\n }",
"public ModuleParams() {\n }",
"public ParameterizedInstantiateFactory(Class<? extends T> classToInstantiate) {\r\n super();\r\n this.classToInstantiate = classToInstantiate;\r\n }",
"public T newInstance(Object... args) {\n Class<?>[] receivedParameterTypes = Arrays.stream(args).map(arg -> arg == null ? null : arg.getClass())\n .toArray(Class<?>[]::new);\n return createInstance(getProxyClass(), receivedParameterTypes, args);\n }",
"@Override\n\tpublic void create() {\n\n\t}",
"<T> T newInstance(URI description) throws EnvironmentException;",
"@Override\n\tpublic void create() {\n\t\t\n\t}",
"private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}",
"public ModuleParams()\n\t{\n\t}",
"protected IPCGCallDetailCreator()\r\n {\r\n // empty\r\n }",
"public ObjectFactory() {\r\n\t}",
"@Override\n\tpublic void create () {\n\n\t}",
"public ObjectFactory() {\n super(grammarInfo);\n }",
"public ApplicationCreator() {\n }",
"public PSRelation()\n {\n }",
"protected MoneyFactory() {\n\t}",
"public Contructor(int year, String name) {\n // constructor name must match class name and cannot have return type\n // all classes have constructor by default\n // f you do not create a class constructor yourself, Java creates one for you.\n // However, then you are not able to set initial values for object attributes.\n // constructor can also take parameters\n batchYear = year;\n studentName = name;\n }",
"@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public Product() {\n\t}",
"Weather create(WeatherInformation weatherInformation);",
"public Product() { }",
"public Product() { }",
"public Odontologo() {\n }",
"public XCanopusFactoryImpl()\r\n {\r\n super();\r\n }",
"public Implementor(){}",
"public Hello()\n {\n // initialise instance variables\n \n }",
"Object instantiate(Map<String, Object> arguments);",
"public GantBuilder ( ) { }",
"public Product() {}",
"For createFor();",
"private Builder(Class<T> clazz, Object... objects) {\n try {\n Stream<Constructor<?>> constructors = Stream.of(clazz.getDeclaredConstructors()).peek(constructor -> constructor.setAccessible(true));\n Optional<Constructor<?>> constructor;\n if (null == objects) {\n constructor = constructors.filter(cons -> cons.getParameterCount() == 0).findFirst();\n if (constructor.isPresent()) {\n instance = clazz.cast(constructor.get().newInstance());\n }\n } else {\n constructor = constructors.filter(cons -> cons.getParameterCount() == objects.length)\n .filter(cons -> {\n List<Class<?>> consClass = Arrays.asList(cons.getParameterTypes());\n List<Class<?>> paramsClass = Arrays.stream(objects).map(Object::getClass).collect(Collectors.toList());\n return consClass.stream()\n .allMatch(con -> paramsClass.stream()\n .anyMatch(param -> (con.isPrimitive() &&\n (Number.class.isAssignableFrom(param) ||\n Boolean.class.isAssignableFrom(param) ||\n Character.class.isAssignableFrom(param) ||\n Byte.class.isAssignableFrom(param))) ||\n param.equals(con) ||\n param.isAssignableFrom(con) ||\n con.isAssignableFrom(param)));\n })\n .findFirst();\n if (constructor.isPresent()) {\n instance = clazz.cast(constructor.get().newInstance(objects));\n }\n }\n } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {\n e.printStackTrace();\n }\n }",
"public Builder() {\n }",
"public Builder() {\n }",
"public Builder() {\n\t\t}",
"public void init(Object[] parameters) {\n\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic static <T> T construct(final ClassLoader loader,\n\t\tfinal String className, final Object... parameters)\n\t\tthrows SecurityException, NoSuchMethodException, IllegalArgumentException,\n\t\tIllegalAccessException, InvocationTargetException, ClassNotFoundException,\n\t\tInstantiationException\n\t{\n\t\tfinal Class<?> clazz = loader.loadClass(className);\n\t\tfor (final Constructor<?> constructor : clazz.getConstructors()) {\n\t\t\tif (doParametersMatch(constructor.getParameterTypes(), parameters)) {\n\t\t\t\treturn (T) constructor.newInstance(parameters);\n\t\t\t}\n\t\t}\n\t\tthrow new NoSuchMethodException(\"No matching method found\");\n\t}",
"public TerrainObject build() {\n\t\tfor(int i=0; i<paramsSet.length-3; i++)\n\t\t\tif(!paramsSet[i])\n\t\t\t\tthrow new IllegalArgumentException(\"Needed parameter (No. \"+i+\") for TerrainObject hasn't been set\");\n\t\treturn new TerrainObject(x, y, z, xW, yW, zW, scale, seed, noise);\n\t}",
"private PerksFactory() {\n\n\t}",
"Parameter createParameter();",
"public Product() {\n }",
"public Product() {\n }",
"public CMN() {\n\t}",
"VehicleClass() {}",
"public BrokerAlgo() {}",
"private Builder() {}",
"Param createParam();",
"Param createParam();"
] | [
"0.678845",
"0.67730236",
"0.6601447",
"0.6406006",
"0.6400361",
"0.63089955",
"0.6257244",
"0.61269534",
"0.6085336",
"0.60757774",
"0.6051267",
"0.60366774",
"0.603467",
"0.6005592",
"0.5934712",
"0.5934712",
"0.59226054",
"0.5921086",
"0.5895139",
"0.586138",
"0.58543855",
"0.5848024",
"0.58453494",
"0.5830241",
"0.58158827",
"0.5814479",
"0.5798223",
"0.579206",
"0.57881594",
"0.5787538",
"0.5750741",
"0.5749532",
"0.57468206",
"0.57415956",
"0.5734186",
"0.5705412",
"0.5693097",
"0.5679326",
"0.5679278",
"0.5670612",
"0.56633",
"0.565612",
"0.565533",
"0.5653518",
"0.56490636",
"0.56490636",
"0.56490636",
"0.56464994",
"0.5645343",
"0.56448543",
"0.56404376",
"0.5639523",
"0.5633975",
"0.5630503",
"0.5629465",
"0.56289464",
"0.56259996",
"0.56246513",
"0.562429",
"0.56222004",
"0.56177294",
"0.5614505",
"0.56090605",
"0.5597795",
"0.5596474",
"0.5595342",
"0.559249",
"0.5575353",
"0.556748",
"0.556671",
"0.5559162",
"0.5558798",
"0.555392",
"0.55488884",
"0.5545404",
"0.5545404",
"0.55428255",
"0.55410844",
"0.5540341",
"0.553597",
"0.55315447",
"0.5528133",
"0.5527088",
"0.55261296",
"0.5522388",
"0.55183965",
"0.55183965",
"0.55164456",
"0.55036366",
"0.5498878",
"0.5497479",
"0.5495852",
"0.54950994",
"0.5494503",
"0.5494503",
"0.549355",
"0.5492407",
"0.54840565",
"0.54819894",
"0.5472319",
"0.5472319"
] | 0.0 | -1 |
The method shows a login dialog for a given URI. The user field is taken from the URI if a user is present in the URI. In this case the user is not editable. | public static UserPasswordCredentials login(Shell parent, URIish uri) {
LoginDialog dialog = new LoginDialog(parent, uri);
if (dialog.open() == Window.OK) {
UserPasswordCredentials credentials = dialog.getCredentials();
if (credentials != null && dialog.getStoreInSecureStore())
SecureStoreUtils.storeCredentials(credentials, uri);
return credentials;
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void login(ActionEvent e) throws IOException {\r\n\t\t\r\n \tString username = loginuser.getText().trim();\r\n \t//if user is admin, change to userlist screen\r\n \tif (username.equals(\"admin\")) {\r\n \tPhotos.userlistscreen();\r\n \t} else {\r\n \t\tUser user = currentAdmin.findUser(username);\r\n \t\t//if user is found, log into that user and show the album view for that user specifically\r\n \t\tif (user!=null) {\r\n \t\t\tAlbumController.currentUser = (NonAdmin) user;\r\n \t\t\tCopyController.currentUser = (NonAdmin) user;\r\n \t\t\tMoveController.currentUser = (NonAdmin) user;\r\n \t\t\tPhotos.albumscreen(user);\r\n \t\t}\r\n \t\telse {\r\n \t\t\tAlert alert = new Alert(Alert.AlertType.ERROR);\r\n \t\t\talert.setTitle(\"Error\");\r\n \t\t\talert.setHeaderText(\"Invalid username\");\r\n \t\t\talert.setContentText(\"Please try again\");\r\n \t\t\talert.showAndWait();\r\n \t\t\tloginuser.setText(\"\");\r\n \t\t}\r\n \t}\r\n\t}",
"private void loginButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_loginButtonMouseClicked\n //Make a default user object and bind the input data\n User loginUser;\n loginUser = new User(emailField.getText(), new String(passwordField.getPassword()));\n //Check hashed credentials against database\n //JEncryption encrypter = new JEncryption();\n //loginUser.setPswd(new String(encrypter.encrypt(loginUser.getPswd())));\n try\n {\n if(loginUser.login())\n {\n //If successful load the view\n //System.out.println(loginUser.toString());\n View v = new View(loginUser.getRole(), loginUser.getUserId());\n v.setVisible(true);\n this.setVisible(false);\n }\n //If not, pop out a login failed message\n else\n {\n JOptionPane.showMessageDialog(null, \"No user with that e-mail/password combination found.\");\n }\n }\n catch(DLException d)\n {\n JOptionPane.showMessageDialog(null, \"Connection Error. Please contact an administrator if the problem persists.\");\n }\n }",
"private void logInBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_logInBtnActionPerformed\n User theUser = null;\n String[] options = {\"OK\"};\n String userName = userNameTF.getText();\n String password = passwordTF.getText();\n\n theUser = HF.findUser(userName);\n\n if (userNameTF.getText().equals(\"\") || passwordTF.getText().equals(\"\")){\n JOptionPane.showOptionDialog(this, \"Please fill in your username \"\n + \"and password!\",\n \"\", JOptionPane.ERROR_MESSAGE, JOptionPane.INFORMATION_MESSAGE,\n null, options, options[0] );\n }\n else if (theUser == null) {\n JOptionPane.showOptionDialog(this, \"No such username!\",\n \"\", JOptionPane.ERROR_MESSAGE, JOptionPane.INFORMATION_MESSAGE,\n null, options, options[0] );\n }\n else if (!theUser.getPassword().equals(password)) {\n JOptionPane.showOptionDialog(this, \"Invalid password!\",\n \"\", JOptionPane.ERROR_MESSAGE, JOptionPane.INFORMATION_MESSAGE,\n null, options, options[0] );\n }\n else {\n if (theUser instanceof Trainer){\n TrainerMenu tm = new TrainerMenu(this, (Trainer)theUser);\n tm.setVisible(true);\n this.setVisible(false);\n }\n else if (theUser instanceof Member){\n MemberMenu mm = new MemberMenu(this, (Member)theUser);\n mm.setVisible(true);\n this.setVisible(false);\n }\n userNameTF.setText(\"\");\n passwordTF.setText(\"\");\n }\n }",
"public Optional<Pair<String,String>> showLogin( final Pair<String,String> initialUserInfo, final Callback<Pair<String,String>, Void> authenticator ) {\n \t\n \tfinal CustomTextField txUserName = (CustomTextField) TextFields.createClearableTextField();\n \ttxUserName.setLeft(new ImageView( DialogResources.getImage(\"login.user.icon\")) ); //$NON-NLS-1$\n \t\n \tfinal CustomPasswordField txPassword = (CustomPasswordField) TextFields.createClearablePasswordField();\n \ttxPassword.setLeft(new ImageView( DialogResources.getImage(\"login.password.icon\"))); //$NON-NLS-1$\n\t\t\n\t\tfinal Label lbMessage= new Label(\"\"); //$NON-NLS-1$\n\t\tlbMessage.getStyleClass().addAll(\"message-banner\"); //$NON-NLS-1$\n\t\tlbMessage.setVisible(false);\n\t\tlbMessage.setManaged(false);\n\t\t\n\t\tfinal VBox content = new VBox(10);\n\t\tcontent.getChildren().add(new Label(\"User name\"));\n\t\tcontent.getChildren().add(txUserName);\n\t\tcontent.getChildren().add(txPassword);\n\t\t\n\t\tfinal Action actionLogin = new DialogAction(\"Connect\", null, false, false, true) { //$NON-NLS-1$\n\t\t\t{\n\t\t\t\tButtonBar.setType(this, ButtonType.OK_DONE);\n\t\t\t\tsetEventHandler(this::handleAction);\n\t\t\t}\n\t\t\t\n\t\t\tprotected void handleAction(ActionEvent ae) {\n\t\t\t\tDialog dlg = (Dialog) ae.getSource();\n\t\t\t\ttry {\n\t\t\t\t\tif ( authenticator != null ) {\n\t\t\t\t\t\tauthenticator.call(new Pair<>(txUserName.getText(), txPassword.getText()));\n\t\t\t\t\t}\n\t\t\t\t\tlbMessage.setVisible(false);\n\t\t\t\t\tlbMessage.setManaged(false);\n\t\t\t\t\tdlg.hide();\n\t\t\t\t\tdlg.setResult(this);\n\t\t\t\t} catch( Throwable ex ) {\n\t\t\t\t\tlbMessage.setVisible(true);\n\t\t\t\t\tlbMessage.setManaged(true);\n\t\t\t\t\tlbMessage.setText(ex.getMessage());\n\t\t\t\t\tdlg.sizeToScene();\n\t\t\t\t\tdlg.shake();\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override public String toString() {\n\t\t\t\treturn \"LOGIN\"; //$NON-NLS-1$\n\t\t\t};\n\t\t};\n\t\t\n\t\tfinal Dialog dlg = buildDialog(Type.LOGIN);\n dlg.setContent(content);\n \n dlg.setResizable(false);\n\t\tdlg.setIconifiable(false);\n\t\tif ( dlg.getGraphic() == null ) { \n\t\t\tdlg.setGraphic( new ImageView( DialogResources.getImage(\"login.icon\"))); //$NON-NLS-1$\n\t\t}\n\t\tdlg.getActions().setAll(actionLogin, ACTION_CANCEL);\n\t\tfinal String userNameCation = getString(\"login.dlg.user.caption\"); //$NON-NLS-1$\n\t\tfinal String passwordCaption = getString(\"login.dlg.pswd.caption\"); //$NON-NLS-1$\n\t\ttxUserName.setPromptText(userNameCation);\n\t\ttxUserName.setText( initialUserInfo.getKey());\n\t\ttxPassword.setPromptText(passwordCaption);\n\t\ttxPassword.setText(new String(initialUserInfo.getValue()));\n\n\t\tfinal ValidationSupport validationSupport = new ValidationSupport();\n\t\tPlatform.runLater(new Runnable()\n\t\t{\n\t\t@Override\n\t\tpublic void run()\n\t\t{\n\t\t\tString requiredFormat = \"'%s' is required\"; //$NON-NLS-1$\n\t\t\tvalidationSupport.registerValidator(txUserName, Validator.createEmptyValidator( String.format( requiredFormat, userNameCation )));\n\t\t\tactionLogin.disabledProperty().bind(validationSupport.invalidProperty());\n\t\t\ttxUserName.requestFocus();\t\t\t\n\t\t}});\n\n\t\tdlg.sizeToScene();\n \treturn Optional.ofNullable( \n \t\t\tdlg.show() == actionLogin? \n \t\t\t\t\tnew Pair<>(txUserName.getText(), txPassword.getText()): \n \t\t\t\t\tnull);\n }",
"public String login() {\r\n FacesContext context = FacesContext.getCurrentInstance();\r\n HttpServletRequest request = (HttpServletRequest) context.getExternalContext().getRequest();\r\n System.out.println(\"Username: \" + email);\r\n System.out.println(\"Password: \" + password);\r\n try {\r\n //this method will actually check in the realm for the provided credentials\r\n request.login(this.email, this.password);\r\n\r\n } catch (ServletException e) {\r\n context.addMessage(null, new FacesMessage(\"Login failed.\"));\r\n return \"error\";\r\n }\r\n return \"/faces/users/index.xhtml\";\r\n }",
"public void loginAsUser() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"user\");\n vinyardApp.fillPassord(\"123\");\n vinyardApp.clickSubmitButton();\n }",
"public void loginAlert() {\n\t\tDialog<Pair<String, String>> dialog = new Dialog<>();\n\t\tdialog.setTitle(\"Login Dialog\");\n\t\tdialog.setHeaderText(\"Look, a Custom Login Dialog\");\n\n\t\t// Set the icon (must be included in the project).\n\t\tdialog.setGraphic(new ImageView(this.getClass().getResource(\"file:src/vista/img/usuario.png\").toString()));\n\n\t\t// Set the button types.\n\t\tButtonType loginButtonType = new ButtonType(\"Login\", ButtonData.OK_DONE);\n\t\tdialog.getDialogPane().getButtonTypes().addAll(loginButtonType, ButtonType.CANCEL);\n\n\t\t// Create the username and password labels and fields.\n\t\tGridPane grid = new GridPane();\n\t\tgrid.setHgap(10);\n\t\tgrid.setVgap(10);\n\t\tgrid.setPadding(new Insets(20, 150, 10, 10));\n\n\t\tTextField username = new TextField();\n\t\tusername.setPromptText(\"Username\");\n\t\tPasswordField password = new PasswordField();\n\t\tpassword.setPromptText(\"Password\");\n\n\t\tgrid.add(new Label(\"Username:\"), 0, 0);\n\t\tgrid.add(username, 1, 0);\n\t\tgrid.add(new Label(\"Password:\"), 0, 1);\n\t\tgrid.add(password, 1, 1);\n\n\t\t// Enable/Disable login button depending on whether a username was entered.\n\t\tNode loginButton = dialog.getDialogPane().lookupButton(loginButtonType);\n\t\tloginButton.setDisable(true);\n\n\t\t// Do some validation (using the Java 8 lambda syntax).\n\t\tusername.textProperty().addListener((observable, oldValue, newValue) -> {\n\t\t loginButton.setDisable(newValue.trim().isEmpty());\n\t\t});\n\n\t\tdialog.getDialogPane().setContent(grid);\n\n\t\t// Request focus on the username field by default.\n\t\tPlatform.runLater(() -> username.requestFocus());\n\n\t\t// Convert the result to a username-password-pair when the login button is clicked.\n\t\tdialog.setResultConverter(dialogButton -> {\n\t\t if (dialogButton == loginButtonType) {\n\t\t return new Pair<>(username.getText(), password.getText());\n\t\t }\n\t\t return null;\n\t\t});\n\n\t\tOptional<Pair<String, String>> result = dialog.showAndWait();\n\n\t\tresult.ifPresent(usernamePassword -> {\n\t\t System.out.println(\"Username=\" + usernamePassword.getKey() + \", Password=\" + usernamePassword.getValue());\n\t\t});\n\t}",
"public void onLoginClick(View view) {\n dialog = initLoadingDialog();\n etUsername = findViewById(R.id.etUsername);\n etPassword = findViewById(R.id.etPassword);\n viewModel.login(etUsername.getText().toString().toLowerCase());\n }",
"private void login(JTextField user){\n\t\tString username1 = user.getText();\n\t\tuser.setText(null);\n\t\tuser.requestFocus();\n\n\t\t//Validate username\n\t\tif (username1.isEmpty()){\n\t\t\tJOptionPane.showMessageDialog(this,\"Empty values!\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t\telse if (!username1.matches(\"[a-zA-Z]+\")){\n\t\t\tJOptionPane.showMessageDialog(this,\"Improper Name!\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\n\t\telse {\n\t\t\tif (DBInit.connectDB(username1)){\n\t\t\t\tFrameController s = BudgieUI.getSwitcher();\n\t\t\t\tJFrame main = new MainUI(\"Budgie\", s);\n\t\t\t\tBudgieUI.setMain(main);\n\t\t\t\ts.setFrame(main);\n\t\t\t\tFrameController.switchFrames();\n\t\t\t} else{\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Host Does not exist\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\tusername.setText(null);\n\t\t\t\tusername.requestFocus();\n\t\t\t}\n\t\t}\n\n\t}",
"public static UserPasswordCredentials changeCredentials(Shell parent,\n URIish uri) {\n LoginDialog dialog = new LoginDialog(parent, uri);\n dialog.setChangeCredentials(true);\n UserPasswordCredentials oldCredentials = SecureStoreUtils\n .getCredentialsQuietly(uri);\n if (oldCredentials != null)\n dialog.setOldUser(oldCredentials.getUser());\n if (dialog.open() == Window.OK) {\n UserPasswordCredentials credentials = dialog.getCredentials();\n if (credentials != null)\n SecureStoreUtils.storeCredentials(credentials, uri);\n return credentials;\n }\n return null;\n }",
"public void login(ActionEvent event) throws IOException {\n\t\t//if user is admin, open admin screen\n\t\tif(username.getText().toLowerCase().equals(\"admin\")) {\n\t\t\t//open admin screen\n\t\t\tMain.changeScene(\"/view/admin.fxml\", \"Administrator Dashboard\");\t\t\t\n\t\t}\n\t\t//if user is blank, throw error\n\t\telse if(username.getText().isEmpty()){\n\t\t\tinvalidUserError.setVisible(true);\n\t\t}\n\t\t//otherwise make sure user exists and if they do set current user and change screen, if not throw error.\n\t\telse {\n\t\t\tfor(User user : UserState.getAllUsers()) {\n\t\t\t\tif(user.getUserName().toLowerCase().equals(username.getText().toLowerCase())) {\n\t\t\t\t\tUserState.setCurrentUser(user);\n\t\t\t\t\tMain.changeScene(\"/view/userhome.fxml\", \"User Home\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tinvalidUserError.setVisible(true);\n\t\t\tusername.setText(\"\");\n\t\t}\n\t}",
"public void login() {\n\t\tUser user = new User(\"admin\", \"12345678\", Role.ADMIN);\n\t\tuser.setEmail(\"[email protected]\");\n\t\t\n\t\tif(user != null) {\n\t\t\tuserBean.setLoggedInUser(user);\n\t\t\tFacesContext context = FacesContext.getCurrentInstance();\n\t\t\tHttpServletRequest req = (HttpServletRequest)context.getExternalContext().getRequest();\n\t\t\treq.getSession().setAttribute(ATTR_USER, user);\n\t\t}else{\n\t\t\tkeepDialogOpen();\n\t\t\tdisplayErrorMessageToUser(\"Wrong Username/Password. Try again\");\n\t\t}\n\t\t\n\t}",
"void AllowUserToLogin(String userName, String password) {\n\t\tParseUser.logInInBackground(userName, password, new LogInCallback() {\r\n\t\t\tpublic void done(ParseUser user, ParseException e) {\r\n\t\t\t\tif (user != null) {\r\n\t\t\t\t\t// If user exist and authenticated, send user to\r\n\t\t\t\t\t// Welcome.class\r\n\t\t\t\t\tIntent intent = new Intent(Register.this, ClientList.class);\r\n\t\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK\r\n\t\t\t\t\t\t\t| Intent.FLAG_ACTIVITY_CLEAR_TASK);\r\n\t\t\t\t\tstartActivity(intent);\r\n\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\t\t\"Successfully Logged in\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\tshowAlert(\"No such user exist, please signup\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"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 void serchUser() {\n if (!userNameTextField.getText().isEmpty() && !passwordPasswordField.getText().isEmpty()) {\n try {\n User user = UserController.searchUserByUserName(userNameTextField.getText());\n if (user != null) {\n if (passwordPasswordField.getText().equals(user.getPassword())) {\n closeFadeOut();\n Hi hi = new Hi();\n hi.setUser(user);\n hi.setVisible(true);\n dispose();\n } else {\n JOptionPane.showMessageDialog(this, \"Incorrect username or password !\");\n passwordPasswordField.setText(\"\");\n userNameTextField.requestFocus();\n userNameTextField.selectAll();\n }\n } else {\n JOptionPane.showMessageDialog(this, \"Incorrect username or password !\");\n passwordPasswordField.setText(\"\");\n userNameTextField.requestFocus();\n userNameTextField.selectAll();\n }\n\n } catch (ClassNotFoundException ex) {\n ex.printStackTrace();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n } else {\n JOptionPane.showMessageDialog(this, \"Please enter username and password\");\n passwordPasswordField.setText(\"\");\n userNameTextField.requestFocus();\n userNameTextField.selectAll();\n }\n\n }",
"public void onClick(DialogInterface dialog, int id) {\n prefs.edit().putBoolean(\"Islogin\", false).commit();\n prefs.edit().putString(\"role\", \"\").commit();\n item.setTitle(\"Login\");\n }",
"@FXML\n\tprivate void handleLogin() {\n\t \n\t\t\t\ttry {\n\t\t\t\t\tmain.showHomePageOverview(username.getText(),password.getText());\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\n\t}",
"public LoginPage openLoginPage() {\n\t\twebDriver.get(authorUrl);\n\t\tbobcatWait.withTimeout(Timeouts.MEDIUM).until(ExpectedConditions.visibilityOfElementLocated(By.id(\"login-box\")));\n\t\treturn this;\n\t}",
"public void login() {\n presenter.login(username.getText().toString(), password.getText().toString());\n }",
"public void login() {\n\n String username = usernameEditText.getText().toString();\n String password = passwordEditText.getText().toString();\n regPresenter.setHost(hostEditText.getText().toString());\n regPresenter.login(username, password);\n }",
"@FXML\n private void handleLoginAttempt() {\n\n if (isInputValid()) {\n String uname = userField.getText();\n if (Model.doesUsernameExist(uname)) {\n User user = Model.verifyLogin(uname, pwField.getText());\n\n if (user == null) {\n // uname exists but incorrect login\n user = UserInfoTable.getUserFromUserName(uname);\n _loginAuthenticated = false;\n user.setLockoutNum(user.getLockoutNum() + 1);\n Model.editUser(user);\n\n // increment incorrect login attempts, check if banned\n if (user.getLockoutNum() >= 3) {\n bannedAlert();\n return;\n }\n } else {\n // uname exists and correct login\n // check if banned\n if (user.getLockoutNum() >= 3) {\n bannedAlert();\n return;\n }\n user.setLockoutNum(0);\n Model.editUser(user);\n Model.setUser(user);\n _loginAuthenticated = true;\n app.showMainPage();\n return;\n }\n }\n // Show the error message if bad data\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.initOwner(_dialogStage);\n alert.setTitle(\"Please Correct Invalid Fields \");\n alert.setHeaderText(\"Incorrect password and/or username\");\n\n alert.showAndWait();\n }\n }",
"public String login() {\n try {\n HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();\n request.login(name, password);\n initUser();\n request.getSession().setAttribute(\"current_user\", this);\n return \"/index?faces-redirect=true\";\n } catch (ServletException e) {\n FacesContext context = FacesContext.getCurrentInstance();\n FacesMessage message = new FacesMessage(\"Wrong login or password\");\n message.setSeverity(FacesMessage.SEVERITY_ERROR);\n context.addMessage(\"login\", message);\n }\n return \"/pages/login.xhtml\";\n }",
"private Dialog<Pair<String, String>> getLoginDialog() {\n Dialog<Pair<String, String>> dialog = new Dialog<>();\n dialog.setTitle(\"Login\");\n dialog.setHeaderText(\"Look, a Custom Login Dialog\");\n\n ButtonType loginButtonType = new ButtonType(\"Login\", ButtonBar.ButtonData.OK_DONE);\n dialog.getDialogPane().getButtonTypes().addAll(loginButtonType, ButtonType.CANCEL);\n\n // Create the username and password labels and fields.\n GridPane grid = new GridPane();\n grid.setHgap(10);\n grid.setVgap(10);\n grid.setPadding(new Insets(20, 150, 10, 10));\n\n TextField username = new TextField();\n username.setPromptText(\"Username\");\n PasswordField password = new PasswordField();\n password.setPromptText(\"Password\");\n\n grid.add(new Label(\"Username:\"), 0, 0);\n grid.add(username, 1, 0);\n grid.add(new Label(\"Password:\"), 0, 1);\n grid.add(password, 1, 1);\n\n // Enable/Disable login button depending on whether a username was entered.\n Node loginButton = dialog.getDialogPane().lookupButton(loginButtonType);\n loginButton.setDisable(true);\n\n // Do some validation (using the Java 8 lambda syntax).\n username.textProperty().addListener((observable, oldValue, newValue) -> {\n loginButton.setDisable(newValue.trim().isEmpty());\n });\n\n dialog.getDialogPane().setContent(grid);\n\n // Request focus on the username field by default.\n Platform.runLater(username::requestFocus);\n\n // Convert the result to a username-password-pair when the login button is clicked.\n dialog.setResultConverter(dialogButton -> {\n if (dialogButton == loginButtonType) {\n return new Pair<>(username.getText(), password.getText());\n }\n return null;\n });\n return dialog;\n }",
"private void showLoginFrame(String user, String pass) {\n\t\tloginFrame = new LoginFrame(user,pass);\n\t\tloginFrame.addListener(new LoginFrame.Listener(){\n\n\t\t\t@Override\n\t\t\tpublic void submit(String user, String pass) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tsetUsername(user);\n\t\t\t\tsetPassword(pass);\n\t\t\t\tlogin();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void cancel() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t\n\t\t});\n\t}",
"protected boolean login() {\n\t\tString Id = id.getText();\n\t\tif (id.equals(\"\")){\n\t\t\tJOptionPane.showMessageDialog(null, \"请输入用户名!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tUserVO user = bl.findUser(Id);\n\t\tif (user == null){\n\t\t\tJOptionPane.showMessageDialog(null, \"该用户不存在!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (! user.getPassword().equals(String.valueOf(key.getPassword()))){\n\t\t\tSystem.out.println(user.getPassword());\n\t\t\tJOptionPane.showMessageDialog(null, \"密码错误!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tsimpleLoginPanel.this.setVisible(false);\n\t\tUserblService user2 = new Userbl(Id);\n\t\tReceiptsblService bl = new Receiptsbl(user2);\n\t\tClient.frame.add(new simpleMainPanel(user2,bl));\n\t\tClient.frame.repaint();\n\t\t\n\t\treturn true;\n\t\t\n\t}",
"public void login(ActionEvent e) throws IOException{\n\t\tString username = Username.getText().toLowerCase();\n\t\tString password = Password.getText();\n\t\tif(username.equalsIgnoreCase(\"admin\")){\n\t\t\tif (password.equals(PhotoAlbum.admin.getPassword())) {\n\t\t\t\tsegue(\"/view/Admin.fxml\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpasswrong.setStyle(\"-fx-opacity: 1;\");\n\t\t\t\tPassword.setStyle(\"-fx-text-box-border: red; -fx-focus-color: red;\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t} \n\t\t//search through list\n\t\tfor(int i = 0; i < PhotoAlbum.admin.getUserList().size(); i++){\n\t\t\tPhotoAlbum.regular_user = (NonAdminUser) PhotoAlbum.admin.getUserList().get(i);\n\t\t\tif(PhotoAlbum.regular_user.getUsername().equals(username)){\n\t\t\t\tif(PhotoAlbum.regular_user.getPassword().equals(password)){\n\t\t\t\t\tUsername.setStyle(\"-fx-text-box-border: white; -fx-focus-color: #008ED6;\");\n\t\t\t\t\tuserwrong.setStyle(\"-fx-opacity: 0;\");\n\t\t\t\t\tPassword.setStyle(\"-fx-text-box-border: white; -fx-focus-color: #008ED6;\");\n\t\t\t\t\tpasswrong.setStyle(\"-fx-opacity: 0;\");\n\t\t\t\t\tPhotoAlbum.logged_in = (NonAdminUser) PhotoAlbum.admin.getUserList().get(i);\n\t\t\t\t\tsegue(\"/view/Albums.fxml\");\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tpasswrong.setStyle(\"-fx-opacity: 1;\");\n\t\t\t\t\tPassword.setStyle(\"-fx-text-box-border: red; -fx-focus-color: red;\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//if not found\n\t\tuserwrong.setStyle(\"-fx-opacity: 1;\");\n\t\tUsername.setStyle(\"-fx-text-box-border: #e67e22; -fx-focus-color: #e67e22;\");\n\t\tPassword.setStyle(\"-fx-text-box-border: #e67e22; -fx-focus-color: #e67e22;\");\n\t}",
"private void openUri()\r\n {\r\n JOptionPane optionPane = new JOptionPane(new JLabel(\"URI:\"), \r\n JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION);\r\n optionPane.setWantsInput(true);\r\n JDialog dialog = optionPane.createDialog(frame, \"Enter URI\");\r\n dialog.setResizable(true);\r\n dialog.setVisible(true);\r\n Object value = optionPane.getValue();\r\n if (value == null)\r\n {\r\n return;\r\n }\r\n if (!value.equals(JOptionPane.OK_OPTION))\r\n {\r\n return;\r\n }\r\n String uriString = (String)optionPane.getInputValue();\r\n if (uriString == null || uriString.trim().isEmpty())\r\n {\r\n return;\r\n }\r\n URI uri = null;\r\n try\r\n {\r\n uri = new URI(uriString);\r\n } \r\n catch (URISyntaxException e)\r\n {\r\n JOptionPane.showMessageDialog(\r\n frame, \"Invalid URI: \"+e.getMessage(), \r\n \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return;\r\n }\r\n openUriInBackground(uri);\r\n }",
"public void authenticateUser(View view)\n {\n\n String username = userNameTextField.getText().toString().trim();\n String password = passwordTextField.getText().toString();\n if(username.equals(\"\") || password.equals(\"\"))\n {\n AlertDialog.Builder alt_bld = new AlertDialog.Builder(this);\n alt_bld.setMessage(\"Username and Password are required.\")\n .setCancelable(true);\n AlertDialog alert = alt_bld.create();\n alert.setButton(-1, \"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n } });\n alert.setTitle(\"Error\");\n alert.show();\n }\n else\n {\n\n progressDialog = ProgressDialog.show(LoginActivity.this,\n \"\", \"Please wait...\", true);\n isIMEIRequest = false;\n Thread thread = new Thread(this);\n thread.start();\n }\n }",
"public static void handleLoginGUI(UserLogin ul) {\n\n\t\tuserLogin = ul;\n\t\tOp logOp = new Op(Operations.LOGIN,userLogin);\n\t\tOperations oper;\n\t\t\n\t\ttry{\n\t\t\tclient = new ChatClient(userLogin.getHost(), userLogin.getPort());\n\t\t\tclient.handleMessageFromClientUI(logOp);\n\t\t\tlogOp = (Op) client.getMessage();\n\t\t\tcurrUser=(User) logOp.getEntity();\n\t\t\toper = logOp.getOp();\n\t\t\tif(oper == Operations.ALLOW_LOG)\n\t\t\t{\n\t\t\tlogOp = new Op(Operations.GET_UT,currUser);\n\t\t\tclient.handleMessageFromClientUI(logOp);\n\t\t\tlogOp = (Op) client.getMessage();\n\t\t\tcurrUser=(User) logOp.getEntity();\n\t\t\t}\n\t\t\thandleLogin(oper);\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void defaultLoginPressed(View view) {\n // initialize UI elements for default login fragment\n usernameDefaultLogin = (EditText) findViewById(R.id.usernameDefaultLoginFragment);\n passwordDefaultLogin = (EditText) findViewById(R.id.passwordDefaultLoginFragment);\n\n // fetch input and attempt login\n final String username = usernameDefaultLogin.getText().toString();\n final String password = passwordDefaultLogin.getText().toString();\n\n ParseQuery<TipperUser> query = ParseQuery.getQuery(\"TipperUser\");\n query.whereEqualTo(\"username\", username);\n query.findInBackground(new FindCallback<TipperUser>() {\n @Override\n public void done(List<TipperUser> list, ParseException e) {\n if(e == null) {\n if (!list.isEmpty()) {\n TipperUser user = list.get(0);\n if (BCrypt.checkpw(password, user.getPassword())) {\n app.setCurrentUser(user);\n user.pinInBackground();\n Intent intent = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(intent);\n } else {\n Toast.makeText(getApplicationContext(), \"Login failed: Wrong password or username.\", Toast.LENGTH_SHORT).show();\n }\n } else {\n Toast.makeText(getApplicationContext(), \"Login failed: Wrong password or username.\", Toast.LENGTH_SHORT).show();\n }\n } else {\n Log.e(ACTIVITY_ID, \"Parse error: \" + e.getMessage());\n e.printStackTrace();\n }\n }\n });\n }",
"@Override\n public void onLoginClicked(String username, String password) {\n loginView.showProgress();\n loginInteractor.authorize(username, password, this);\n }",
"@Override\r\n protected final String loginAsAutoUser(boolean launch) {\r\n \t//login(DDConstants.AUTO_USERNAME, DDConstants.AUTO_PASSWORD, launch);\r\n \tsuper.login(getAutoUserName(), getAutoPassword(), launch);\r\n\r\n \tchooseApp();\r\n\r\n \treturn getCurrentUser();\r\n }",
"void login() {\r\n\t\t// to show the window and the data input\r\n\t\td = new Dialog(f, true);\r\n\t\thost = new TextField(10);\r\n\t\ttf_name = new TextField(10);\r\n\t\td.setLayout(new GridLayout(3, 2));\r\n\t\td.add(new Label(\"host:\"));\r\n\t\td.add(host);\r\n\t\td.add(new Label(\"name:\"));\r\n\t\td.add(tf_name);\r\n\t\tButton b = new Button(\"OK\");\r\n\t\tb.addActionListener(new ActionListener() {\r\n\t\t\t// if the input is ended, then use the realLogin method to login the server\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\trealLogin(host.getText(), tf_name.getText());\r\n\t\t\t\td.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\td.add(b);\r\n\t\td.setResizable(true);\r\n\t\td.setSize(200, 150);\r\n\t\td.show();\r\n\t\t(new Thread(this)).start();\r\n\t}",
"public void loginUserMainActivity(View view) \n {\n // Initialize the intent to user's main activity\n Intent userMainIntent = new Intent(this, UserMainActivity.class);\n\n // Get the user name.\n String uname = unameEt.getText().toString();\n\n // Get the password.\n String pwd = pwdEt.getText().toString();\n\n if(!User.UserExists(uname, pwd, getApplicationContext())) \n { // The user credentials were invalid, do nothing\n Toast.makeText(getApplicationContext(), \"Invalid credentials.\", Toast.LENGTH_SHORT).show();\n } \n else \n { // The credentials were valid, open main menu, build the intent with the user id.\n \t//TODO encrypt the data first?\n userMainIntent.putExtra(\"un\", uname);\n userMainIntent.putExtra(\"pwd\", pwd);\n // Start the user's main activity.\n startActivity(userMainIntent);\n }\n }",
"Login(String strLogin)\n {\n \tsetLogin(strLogin);\n }",
"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 abstract boolean showLogin();",
"User browseUserByUsername(String username);",
"private void showLogin() {\n \t\tLogin.actionHandleLogin(this);\n \t}",
"public void setlogUserIn() {\n\t\tmenu1.setOnAction(event -> {\n\t\t\topenUserSettings();\n\t\t});\n\t\tmenu2.setOnAction(event -> {\n\t\t\tsetlogUserOut();\n\t\t});\n\t\tuserMenuButton.setText(controller.loggedIn());\n\t\tuserMenuButton.setStyle(\"-fx-font-size: 10pt; -fx-text-fill:black;\"); // MUOTOILU CSSSSSÄÄÄÄN\n\t\tuserMenuButton.getItems().addAll(menu1, menu2);\n\t\tloggedinuser.setVisible(true);\n\t\tloggedinuser.setText(bundle.getString(\"mVloggedin\"));\n\t\tloggedinuser.setGraphic(userMenuButton);\n\t\tloggedinuser.setContentDisplay(ContentDisplay.RIGHT);\n\t\tuserSettings.setVisible(true);\n\t\tloginoption.setVisible(false);\n\t}",
"@FXML\r\n\tpublic void handleLoginButton() throws IOException{\r\n\t\tString username = tfUsernameLogin.getText();\r\n\t\tString password = pfPasswordLogin.getText();\r\n\t\tuserCred = theController.isValidUser(username, password);\r\n\t\tif(userCred.equals(\"manager\")){\r\n\t\t\tloginSuccess = true;\r\n\t\t\tconsoleScreen.setDisable(false);\r\n\t\t\tactionItemsScreen.setDisable(false);\r\n\t\t\tmemberScreen.setDisable(false);\r\n\t\t\tteamScreen.setDisable(false);\r\n\t\t\thandleConsoleButton();\r\n\t\t}\r\n\t\telse if(userCred.equals(\"employee\")){\r\n\t\t\tloginSuccess = true;\r\n\t\t\tconsoleScreen.setDisable(false);\r\n\t\t\tactionItemsScreen.setDisable(false);\r\n\t\t\tmemberScreen.setDisable(true);\r\n\t\t\tteamScreen.setDisable(true);\r\n\t\t\thandleConsoleButton();\r\n\t\t}\r\n\t\telse{\r\n\t\t\tlbAlertLogin.setTextFill(Color.RED);\r\n\t\t\tlbAlertLogin.setText(userCred);\r\n\t\t}\r\n\t}",
"public void onLoginClick()\n {\n user.setEmail(email.getValue());\n user.setPassword(password.getValue());\n\n if(!user.isValidEmail())\n {\n Toast.makeText(context, \"Invalid Email\", Toast.LENGTH_SHORT).show();\n }\n\n else if(!user.isValidPassword())\n {\n Toast.makeText(context, \"Password Should be Minimum 6 Characters\", Toast.LENGTH_SHORT).show();\n }\n\n else if(user.isValidCredential())\n {\n getBusy().setValue(View.VISIBLE);\n\n doLogin(user.getEmail(),user.getPassword());\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run()\n {\n getBusy().setValue(View.GONE);\n\n // Toast.makeText(context, \"Login Successful\", Toast.LENGTH_SHORT).show();\n /* Intent intent = new Intent(context, NewsActivity.class);\n intent.putExtra(\"USER_OBJ\", user);\n context.startActivity(intent);\n */\n\n\n }\n }, 500);\n }\n\n else\n {\n Toast.makeText(context, \"Invalid Credentials\", Toast.LENGTH_SHORT).show();\n }\n }",
"private void loginButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loginButtonActionPerformed\n uL.setVisible(true);\n boolean isLoggedInNew = uL.isLoggedIn();\n boolean isLoggedIn = na.isLoggedIn();\n if (isLoggedInNew || isLoggedIn) {\n dm.messageMustLogOut();\n uL.dispose();\n }\n }",
"public void LogInOnAction(Event e) {\n\t \t\r\n\t \tif(BookGateway.getInstance().getAuthentication(this.userNameId.getText(), this.passwordId.getText())) {\r\n\t \t\tthis.whiteOutId.setVisible(false);\r\n\t \t\tthis.whiteOutId.setDisable(true);\r\n\t \t\t// TODO: Update label name in the corner.. \r\n\t \t\tthis.nameLabelId.setText(\"Hello, \" + BookGateway.currentUser.getFirstName());\r\n\t \t\r\n\t \t}else {\r\n\t \t\t// true\r\n\t \t\tmessAlert(\"Invalid\",\"Wrong Username or password\");\r\n\t \t\tthis.userNameId.setText(\"\");\r\n\t \t\tthis.passwordId.setText(\"\");\r\n\t \t\te.consume();\r\n\t \t}\r\n\t \t\r\n\t \t\r\n\t }",
"public void logins(){\n \n \n \n String username=txtUser.getText();\n String password=txtPass.getText();\n String sql;\n\n \n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n conn = (Connection) DriverManager.getConnection(\"jdbc:mysql://\"+host+\"/\"+db+\"?user=\"+user+\"&password=\"+pass);\n sql =\"Select * from user WHERE username ='\" +txtUser.getText() + \"'\";\n PreparedStatement st = (PreparedStatement) conn.prepareStatement(sql);\n ResultSet rs =st.executeQuery(); \n if(rs.next()) {\n String pasas = rs.getString(\"password\");\n if(password.equals(pasas)){\n JOptionPane.showMessageDialog(this, \"Login Berhasil\");\n \n Home tampil=new Home();\n tampil.setVisible(true);\n dispose();\n \n }else{\n JOptionPane.showMessageDialog(this, \"Username tidak terdaftar\");\n txtUser.requestFocus();\n }\n }else{\n JOptionPane.showMessageDialog(this, \"Username tidak terdaftar\");\n txtUser.requestFocus();\n }\n }catch (Exception e) {\n JOptionPane.showMessageDialog(this,e.getMessage());\n }\n \n }",
"@Override\n public void onClick(ClickEvent event) {\n String mobileNr = content.getLoginView().getMobilenrTxtBox().getText();\n String password = content.getLoginView().getPasswordTxtBox().getText();\n\n // RPC authenticating user method\n motionCBSTestService.authorizeUser(mobileNr, password, new AsyncCallback<User>() {\n\n @Override\n public void onFailure(Throwable caught) {\n Window.alert(\"Der skete en fejl\");\n }\n\n @Override\n public void onSuccess(User user) {\n\n // Failed to match input with User in database\n if (user == null) {\n Window.alert(\"Wrong password or mobile number!\");\n } else if (user.getIsApproved() != true) {\n Window.alert(\"User not approved!\");\n } else\n\n\n\n // Here we check the type and if they are type 1 we go to admin view and the other way around\n if (user.getType() == 1) {\n adminController.loadUser(user);\n content.changeView(content.getMainAdminView());\n } else if (user.getType() == 2) {\n userController.loadUser(user);\n content.changeView(content.getMainUserView());\n }\n\n // Clearing the text fields (mobileNr & password) from the login screen\n content.getLoginView().clearTextBoxFields();\n }\n });\n }",
"public void loginUser() {\n \tString username = usernameField.getText().toString();\n \tString password = passwordField.getText().toString();\n \n \t// Validation part.\n \tString empty = \"\";\n \t// Check if username is empty.\n \tif(username.isEmpty()) {\n \t\tToast toast = Toast.makeText(\n \t\t\tthis,\n \t\t\t\"Please enter a username.\",\n \t\t\tToast.LENGTH_LONG);\n \t\ttoast.show();\n \t\treturn;\n \t}\n \t// Check if username contains othe characters.\n \tif(! Pattern.matches(\"[a-zA-Z]+\", username)) {\n \t\tToast toast = Toast.makeText(\n \t\t\tthis,\n \t\t\t\"Username can only contain alphabets\",\n \t\t\tToast.LENGTH_LONG);\n \t\ttoast.show();\n \t\treturn;\n \t}\n \t\n \t// Check if password is empty.\n \tif(password.isEmpty()) {\n \t\tToast toast = Toast.makeText(\n \t\t\tthis,\n \t\t\t\"Please enter a password.\",\n \t\t\tToast.LENGTH_LONG);\n \t\ttoast.show();\n \t\treturn;\n \t}\n\n \t\n \tArrayList<NameValuePair> userData = new ArrayList<NameValuePair>();\n \tuserData.add(new BasicNameValuePair(\"username\", username));\n \tuserData.add(new BasicNameValuePair(\"password\", password));\n \t\n \t// Now send the data to the login user task to\n \t// check if they are correct.\n \tnew AuthenticateUserTask(this, userData).execute();\n \t\n }",
"@Override\n public void show()\n {\n boolean loginOK; // true if good user info was entered\n // multithreaded code does not execute properly in IDEs; true if IDE run detected\n boolean runningFromIDE = false;\n\n do // continue login process while user chooses to stay in login menu\n {\n loginOK = false;\n while(!loginOK) // do this while no good login info acquired, or user choose to bail.\n {\n System.out.println(splashStrings.LOGIN); // SPLASH WELCOME\n\n String userName = GET.getString(\"Indtast venligst bruger navn:\\n\\t|> \");\n\n char[] password;\n\n if(!runningFromIDE) // getPassword does not work in IDE\n {\n password = PasswordField.getPassword(System.in, \"Indtast venligst password:\\n\\t|> \");\n\n if(password == null)\n {\n // getPassword returns a null array reference, if no chars were captured, thus this.\n runningFromIDE = true;\n\n System.out.println(\"MELDING:\\nDet ser ud til at du kører programmet fra en IDE:\\t\" +\n \"Password masking slås fra.\" +\n \"\\nKør shorttest.jar, for at opnå den fulde bruger-oplevelse.\\n\");\n\n continue;\n }\n\n loginOK = checkCredentials(userName, new String(password));\n\n } else // option is chosen if IDE-execution detected\n {\n String passw = GET.getString(\"Indtast venligst password:\\n\\t|> \");\n loginOK = checkCredentials(userName, passw);\n }\n\n if(!loginOK) // if user input were no good, and ONLY if info were no good\n {\n System.out.println(\"De indtastede informationer fandtes ikke i systemet.\");\n if(GET.getConfirmation(\"Vil du prøve igen?\\n\\tja / nej\\n\\t|> \", \"nej\", \"ja\"))\n {\n System.out.println(\"Du valgte ikke at prøve igen, login afsluttes.\");\n break;\n }\n }\n }\n\n if(loginOK)\n {\n System.out.println(\"Login var en success. Fortsætter til første menu.\\n\");\n menuLoggedInto.show();\n }\n\n // when user returns from main menu, they get to choose if they want to log in again\n } while(GET.getConfirmation(\"Skal en anden logge ind?\\n\\t ja / nej\\n\\t|> \", \"ja\", \"nej\"));\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 }",
"@Override\n public void loginScreen() {\n logIn = new GUILogInScreen().getPanel();\n frame.setContentPane(logIn);\n ((JButton) logIn.getComponent(4)).addActionListener(e -> {\n setUsername();\n });\n }",
"final void loginAsDDUser() {\n\t\tPage_ viewContactPage = createPage(\"PAGE_VIEW_CONTACT_PROPERTIES_FILE\");\r\n\t\tcommonPage.clickAndWait(\"tabContacts\", \"newButton\");\r\n\t\tsearch(testProperties.getConstant(\"CONTACT_CSN\"));\r\n\t\t\r\n\t\t//We search the results on Account CSN to get the contact we want; we don't search on the contact name itself\r\n\t\t// because there are often duplicate names\r\n\r\n\t\t//commonPage.clickLinkInRelatedList(\"accountCsnInContactsRelatedList\", testProperties.getConstant(\"ACCOUNT_CSN\"), \"nameInContactsRelatedList\");\r\n\t\t//commonPage.clickLinkInRelatedList(\"accountCsnInReadOnlyContactsRelatedList\", testProperties.getConstant(\"ACCOUNT_CSN\"), \"nameInReadOnlyContactsRelatedList\");\r\n\t\tcommonPage.clickLinkInRelatedList(\"accountCsnInReadOnlyContactsRelatedList\", testProperties.getConstant(\"ACCOUNT_CSN\"), \"nameInReadOnlyContactsRelatedList\");\r\n\t\t//viewContactPage.waitForFieldPresent(\"loginAsPortalUserLink\");\r\n\t\tviewContactPage.waitForFieldPresent(\"contactDetailHeader\");\r\n\t}",
"private void login() {\n if (usrField.getText().equals(\"\") || passwordField.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(rootPane,\n \"YOU MUST ENTER USER AND PASSWORD\",\n \"ERROR\",\n JOptionPane.WARNING_MESSAGE);\n return;\n }\n\n //User.ID = userField.getText();\n User.ID = \"BPDB\";\n\n //User.password = passwordField.getText();\n\n User.password = \"BPDB\";\n\n\n //String sql = \"SELECT desig FROM BPDB.usr WHERE name = '\" + userField.getText() + \"',\"and\" +passwordField.getText() +\"'\";\n\n String sql = \"select desig from BPDB.usr where name='\" + usrField.getText()\n + \"' and password='\" + passwordField.getText() + \"'\";\n\n User.desig = Utility2.singleStOPQuery(login, sql);\n System.out.println(\"Designation : \" + User.desig);\n if (User.desig.isEmpty()) {\n\n\n JOptionPane.showMessageDialog(rootPane,\n \"YOU MUST ENTER USER AND PASSWORD\",\n \"ERROR\",\n JOptionPane.WARNING_MESSAGE);\n return;\n } else {\n\n sql = \"SELECT name FROM BPDB.usr WHERE name = '\" + usrField.getText() + \"'\";\n User.name = Utility2.singleStOPQuery(login, sql);\n\n if (User.desig.equalsIgnoreCase(\"BPDB\")) {\n setVisible(false);\n dispose();\n new HomeFrame().setVisible(true);\n\n } else if (User.desig.equalsIgnoreCase(\"DRAFT\")) {\n setVisible(false);\n dispose();\n new DRAFTFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"APPLY\")) {\n setVisible(false);\n dispose();\n new APPLYFrame().setVisible(true);\n\n } else if (User.desig.equalsIgnoreCase(\"HR\")) {\n setVisible(false);\n dispose();\n new HRFrame().setVisible(true);\n\n } else if (User.desig.equalsIgnoreCase(\"ADMIN\")) {\n setVisible(false);\n dispose();\n new ADMINFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"ACCOUNT\")) {\n setVisible(false);\n dispose();\n new ACCOUNTFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"SALARY\")) {\n setVisible(false);\n dispose();\n new SALARYFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"BILLING\")) {\n setVisible(false);\n dispose();\n new BILLINGFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"DISTRIBUTION\")) {\n setVisible(false);\n dispose();\n new DISTRIBUTIONFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"GENERATION\")) {\n setVisible(false);\n dispose();\n new GENERATIONFrame().setVisible(true);\n\n } else if (User.desig.equalsIgnoreCase(\"DHAKA\")) {\n setVisible(false);\n dispose();\n new DHAKAFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"KHULNA\")) {\n setVisible(false);\n dispose();\n new KHULNAFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"RAUJAN\")) {\n setVisible(false);\n dispose();\n new RAUJANFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"SHIDDERGANJ\")) {\n setVisible(false);\n dispose();\n new SHIDDERGANJFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"GRASHAL\")) {\n setVisible(false);\n dispose();\n new GRASHALFrame().setVisible(true);\n }\n }\n }",
"public void Login()throws Exception{\r\n if(eMailField.getText().equals(\"user\") && PasswordField.getText().equals(\"pass\")){\r\n displayMainMenu();\r\n }\r\n else{\r\n System.out.println(\"Username or Password Does not match\");\r\n }\r\n }",
"public void loginButton(View view) {\n EditText userNameInput = (EditText) findViewById(R.id.user_name);\n\n if (userNameInput.getText().toString().trim().length() != 0) {\n LinearLayout loginPage = (LinearLayout) findViewById(R.id.login_page);\n loginPage.setVisibility(View.GONE);\n TextView questionsPane = (TextView) findViewById(R.id.questions_pane);\n questionsPane.setVisibility(View.VISIBLE);\n LinearLayout nextAndSubmitButtons = (LinearLayout) findViewById(R.id.next_and_submit_buttons);\n nextAndSubmitButtons.setVisibility(View.VISIBLE);\n Button nextButton = (Button) findViewById(R.id.next_button);\n nextButton.setEnabled(false);\n userName = userNameInput.getText().toString();\n }\n\n //tells the user that he/she need to provides his/her name\n else {\n Toast userIdNeeded = Toast.makeText(getApplicationContext(), \"USERNAME REQUIRED\", Toast.LENGTH_SHORT);\n userIdNeeded.show();\n }\n }",
"@Given(\"^User should logged in to URL$\")\n\tpublic void user_should_logged_in_to_URL() throws Throwable {\n\t\thomepage.clickloginifdisplayed();\n\t\twait.WaitForElement(loginpage.getLoginemail(), 60);\n\t\tloginpage.ValidLogin();\n\t}",
"private void login(){\n\t\tprogress.toggleProgress(true, R.string.pagetext_signing_in);\n\t\tParseUser.logInInBackground(email.split(\"@\")[0], password, new LogInCallback() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void done(ParseUser user, ParseException e) {\n\t\t\t\tif (e == null) {\n\t\t\t\t\tprogress.toggleProgress(false);\n\t\t\t\t\tIntent intent = new Intent(context, MainActivity.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// else, incorrect password\n\t\t\t\t\tToast.makeText(context, \n\t\t\t\t\t\t\t\t getString(R.string.parse_login_fail, email), \n\t\t\t\t\t\t\t\t Toast.LENGTH_LONG).show();\t\t\t\t\t\n\t\t\t\t\tLog.e(\"Error Logging into Parse\", \"Details: \" + e.getMessage());\n\t\t\t\t}\n\t\t\t}\t\t\t\t\t\t\t\n\t\t});\n\t}",
"private void loginIn(String user, String pass, int message){\n writeTextIntoTextBox(R.id.username_text_input, user);\n writeTextIntoTextBox(R.id.password_text_input, pass);\n clickId(R.id.login_button);\n checkLoginMessage(message);\n clickId(R.id.alt_button);\n checkIfAtLogin();\n }",
"protected void submitAction() {\n\t\ttry {\n\t\t\tString username = userField.getText();\n\t\t\tAbstractAgent loggedClient = parent.getAgent().login(username, new String(passField.getPassword()));\n\t\t\tif (loggedClient instanceof AdminMS) {\n\t\t\t\tAdminUI adminUI = new AdminUI((AdminMS) loggedClient);\n\t\t\t\tparent.setVisible(false);\n\t\t\t\tadminUI.run();\n\t\t\t} else if (loggedClient instanceof IUser) {\n\t\t\t\tUserUI userUI = new UserUI((IUser) loggedClient);\n\t\t\t\tparent.setVisible(false);\n\t\t\t\tuserUI.run();\n\t\t\t}\n\t\t\tif (loggedClient != null)\n\t\t\t\tparent.dispose();\n\t\t} catch (LoginException e) {\n\t\t\tmessageLabel.setText(e.getMessage());\n\t\t} catch (RemoteException e) {\n\t\t\tJOptionPane.showMessageDialog(parent, e);\n\t\t}\n\t}",
"@Test\n\tpublic void loginWithValidCredentials(){\n\t\tapp.loginScreen().waitUntilLoaded();\n\t\tapp.loginScreen().logIn(Credentials.USER_VALID.username, Credentials.USER_VALID.password);\n\t\tassertTrue(app.userDashboardScreen().isActive());\n\t}",
"public boolean logincheck(String user, String pass) \r\n {\n \r\n try{\r\n Connection conn = DriverManager.getConnection(url, userName, password);\r\n String Sql = \"Select * from APP.MEMBER where email=? and password=?\";\r\n PreparedStatement pst = conn.prepareStatement(Sql);\r\n pst.setString(1,user);\r\n pst.setString(2,pass);\r\n ResultSet rs = pst.executeQuery();\r\n if (rs.next())\r\n {\r\n JOptionPane.showMessageDialog(null,\"Welcome user\");\r\n createEventsUI w = new createEventsUI();\r\n w.setVisible(true);\r\n }\r\n else\r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid username or password\", \"Access Denied\",JOptionPane.ERROR_MESSAGE);\r\n }\r\n }catch(Exception e) \r\n {\r\n JOptionPane.showMessageDialog(null, e);\r\n }\r\n return false;\r\n \r\n }",
"public void showJRAuthenticateDialog(final Context context, JRAuthenticateDelegate delegate, String title) {\n\t\t\n\t\tboolean isAlreadyExists = false;\n\t\tfor (JRAuthenticateDelegate delegate1 : delegates) {\n\t\t\tif (delegate1 == delegate) {\n\t\t\t\tisAlreadyExists = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!isAlreadyExists)\n\t\t\tdelegates.add(delegate);\n\t\t\n\t\tif (theBaseUrl == null) {\n\t\t\tstartGetBaseUrl();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (sessionData == null) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (sessionData.configedProviders == null) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (jrModalNavController == null)\n\t\t\tjrModalNavController = new JRModalNavController(sessionData);\n\t\t\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(context);\n\t\tbuilder.setTitle(title);\n\t\t\n\t\tbuilder.setAdapter(new AccountsAdapter(context, sessionData.configedProviders), \n\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t/* Let sessionData know which provider the user selected */\n\t\t\t\t\t\tString provider = sessionData.configedProviders[which];\n\t\t\t\t\t\tsessionData.setProvider(provider);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (sessionData.currentProvider.getProviderRequiresInput() || (sessionData.returningProvider != null && provider.equals(sessionData.returningProvider.getName()))) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//TODO: myUserLandingController\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tIntent intent = new Intent(context, JRWebViewActivity.class);\n\t\t\t\t\t\t\tintent.putExtra(\"provider\", provider);\n\t\t\t\t\t\t\t((Activity) context).startActivityForResult(intent, 0);\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\tbuilder.create().show();\n\t}",
"@Override\n public void onClick(View v) {\n final Dialog login = new Dialog(MainActivity.this);\n // Set GUI of login screen\n login.setContentView(R.layout.login_dialog);\n login.setTitle(\"Login to your Snap account\");\n\n // Init button of login GUI\n Button btnLogin = (Button) login.findViewById(R.id.btnLogin);\n Button btnCancel = (Button) login.findViewById(R.id.btnCancel);\n final EditText txtUsername = (EditText)login.findViewById(R.id.txtUsername);\n final EditText txtPassword = (EditText)login.findViewById(R.id.txtPassword);\n txtPassword.setTypeface(Typeface.SANS_SERIF);\n txtUsername.setTypeface(Typeface.SANS_SERIF);\n\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(MainActivity.this);\n //String strSavedMem1 = sharedPreferences.getString(\"username\",\"d\");\n txtUsername.setText( sharedPreferences.getString(\"username\",\"@walk.com\") );\n txtPassword.setText( sharedPreferences.getString(\"password\",\"password\"));\n\n\n\n // Attached listener for login GUI button\n btnLogin.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if(txtUsername.getText().toString().trim().length() > 0 && txtPassword.getText().toString().trim().length() > 0)\n {\n // Validate Your login credential here than display message\n checkCredentials(txtUsername.getText().toString().trim(),txtPassword.getText().toString().trim());\n login.dismiss();\n }\n else\n {\n Toast.makeText(getApplicationContext(),\n \"Please enter Username and Password\", Toast.LENGTH_LONG).show();\n }\n }\n });\n btnCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n login.dismiss();\n }\n });\n\n // Make dialog box visible.\n login.show();\n\n }",
"@FXML\n\tprivate void onLogin(ActionEvent event) throws IOException {\n\t\tif (!username.getText().equals(\"\") && !password.getText().equals(\"\")) {\n\t\t\tUserCommunication clientCom = new UserCommunication();\n\t\t\tSession client = clientCom.login(username.getText(), password.getText());\n\t\t\t\n\t\t\tif(client != null) { \n\t\t\t\t// login good\n\t\t\t\tparent.createSession(client);\n\t\t\t\tparent.populateProfileDatas();\n\t\t\t\tparent.goToHome();\n\t\t\t\tparent.changeContextualMenu(TypeMenu.CONNECTED);\n\t\t\t\tusername.clear();\n\t\t\t\tpassword.clear();\n\t\t\t\t\n\t\t\t\t// load favorites\n\t\t\t\tArrayList<SearchFavorite> sf = new SearchFavoriteDAO().findByUserId(client.getUser().getID());\n\t\t\t\tparent.setFavorites(sf);\n\t\t\t\tparent.populateSearcheScrollPane();\n\t\t\t\t\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t// login failed\n\t\t\t\tMessage.show(\"Erreur\", \"Authentification échouée\", AlertType.INFORMATION);\n\t\t\t}\n\t\t} else {\n\t\t\tMessage.show(\"Erreur au niveau du formulaire\", \"Veuillez remplir le formulaire convenablement.\", AlertType.WARNING);\n\t\t}\n\t}",
"public void login() {\n if (!areFull()) {\n return;\n }\n\n // Get the user login info\n loginInfo = getDBQuery(nameField.getText());\n if (loginInfo.equals(\"\")) {\n return;\n }\n\n // Get password and check if the entered password is true\n infoArray = loginInfo.split(\" \");\n String password = infoArray[1];\n if (!passField.getText().equals(password)) {\n errorLabel.setText(\"Wrong Password!\");\n return;\n }\n\n continueToNextPage();\n }",
"@Override\n public void onClick(View v) {\n loginUser(\"999999\");\n }",
"public String onLogin() {\n final HttpServletRequest request = (HttpServletRequest) getFacesContext()\n .getExternalContext().getRequest();\n try {\n request.login(getModel().getUsername(), getModel().getPassword());\n } catch (final ServletException e) {\n log.debug(\"Bad authentication for login \"\n + getModel().getUsername(), e);\n getFacesMessages().warn(AppMessageKey.VIEW_LOGIN_ERROR);\n return \"\";\n }\n IView viewId;\n if (getSecurityContext().isUserInSecurityRole(SecurityRole.ADMIN)) {\n viewId = View.ADMIN_ACCESS;\n } else if (getSecurityContext()\n .isUserInSecurityRole(SecurityRole.GUEST)) {\n viewId = View.GUEST_ACCESS;\n } else {\n viewId = View.INDEX;\n }\n // Fire login event.\n event.fire(new LoginEvent(new SecurityUser(getModel()\n .getUsername())));\n // Fire render view event.\n return fireEventRenderView(viewId).getId();\n }",
"@Override\n public void onClick(View arg) {\n mUsername = ((EditText) findViewById(R.id.username)).getText().toString();\n mPassword = ((EditText) findViewById(R.id.password)).getText().toString();\n // Validate the username and password for null or empty.\n if (!isValidInput()) {\n Toast.makeText(LoginScreenActivity.this, R.string.invalid_user_credentials, Toast.LENGTH_SHORT).show();\n return;\n }\n performOAuthLogin(arg);\n finish();\n\n }",
"public boolean loginUser();",
"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 }",
"public void switchToLogin() {\r\n\t\tlayout.show(this, \"loginPane\");\r\n\t\tloginPane.resetPassFields();\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}",
"public void openLogin(String message, boolean sameName) {\t\n\t\t\n\t\t//RegisterLoginPopup.disposeWindow();\n\t\tWindow[] windows = Window.getWindows();\n for (Window window : windows) {\n if (window instanceof JDialog) {\n JDialog dialog = (JDialog) window;\n if (dialog.getContentPane().getComponentCount() == 1\n && dialog.getContentPane().getComponent(0) instanceof JOptionPane){\n dialog.dispose(); \n }\n }\n }\n\t\t\n\t}",
"public void loginUser(String username, String password)\n {\n // check password and username entered\n if(StringUtils.isNotBlank(username) &&\n StringUtils.isNotBlank(password))\n {\n // username and password not blank: continue\n // check user exists\n UserEntry template = new UserEntry();\n template.setUsername(username);\n\n UserEntry existingUser =\n spaceSearcher.getUserByUsername(username);\n\n if(existingUser != null)\n {\n // user exists\n try\n {\n boolean correctPassword = CipherUtils.verifyPassword(password,\n existingUser.getPassword(), existingUser.getSalt());\n\n if(correctPassword)\n {\n // login successful\n JOptionPane.showMessageDialog(loginForm,\n \"Welcome Back \" + existingUser.getUsername()+ \"!\");\n\n loginForm.setVisible(false);\n loginForm.dispose();\n\n // create new main form\n new MainForm(existingUser);\n }\n else\n {\n JOptionPane.showMessageDialog(loginForm,\n \"Incorrect username or password!\");\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }\n else\n {\n JOptionPane.showMessageDialog(loginForm,\n \"User does not exist! Please register.\");\n }\n }\n else\n {\n JOptionPane.showMessageDialog(loginForm,\n \"Please enter a valid username and password.\");\n }\n }",
"public void login(View view) {\n \t\t\t\t\n \t\tString uname = ((EditText)findViewById(R.id.loginUsername)).getText().toString().toLowerCase();\n \t\tString pw = ((EditText)findViewById(R.id.loginPassword)).getText().toString();\n \n \t\tfinal Toast successToast = Toast.makeText(this, \"Login Successful\", Toast.LENGTH_SHORT);\n \t\tfinal Intent i = new Intent(this, Home.class);\n \t\t\n \t\tfinal Toast failureToast = Toast.makeText(this, \"Login failed\", Toast.LENGTH_SHORT);\n \t\t\n \t\tParseUser.logInInBackground(uname, pw, new LogInCallback() {\n \t\t public void done(ParseUser user, ParseException e) {\n \t\t if (user != null) {\n \t\t // Hooray! The user is logged in.\n \t\t \tsuccessToast.show();\n \t\t \t\tfinish();\n \t\t \t\tstartActivity(i);\n \t\t } else {\n \t\t // Signup failed. Look at the ParseException to see what happened.\n \t\t \tfailureToast.show();\n \t\t }\n \t\t }\n \t\t});\n \t\t\n \t}",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n // display logged user\r\n \r\n }",
"@FXML\n protected void viewLoginPage() {\n \tLoginVistaNavigator.loadVista(LoginVistaNavigator.LOGIN);\n }",
"private void logIn() {\n char[] password = jPasswordField1.getPassword();\n String userCode = jTextField1.getText();\n\n String txtpassword = \"\";\n for (char pw : password) {\n txtpassword += pw;\n }\n if (\"\".equals(txtpassword)) {\n JOptionPane.showMessageDialog(this, textBundle.getTextBundle().getString(\"enterPassword\"), \"No Password\", JOptionPane.WARNING_MESSAGE);\n } else if (txtpassword.equals(userData.get(0).toString())) {\n jPasswordField2.setEnabled(true);\n jPasswordField3.setEnabled(true);\n jPasswordField2.setEditable(true);\n jPasswordField3.setEditable(true);\n jPasswordField2.grabFocus();\n }\n }",
"private void login(){\n displayPane(loginP);\n }",
"public login(JFrame frame, Authenticator auth) {\n\t\tsetBackground(Color.GRAY);\n\t\t\n\t\tJLabel lblWelcomeToOpen = new JLabel(\"Welcome to the Open Journal Submission System\");\n\t\tlblWelcomeToOpen.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblWelcomeToOpen.setBounds(10, 55, 780, 30);\n\t\tlblWelcomeToOpen.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 24));\n\t\t\n\t\tJLabel lblUsername = new JLabel(\"Username:\");\n\t\tlblUsername.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblUsername.setBounds(233, 183, 92, 22);\n\t\tlblUsername.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 18));\n\t\t\n\t\tJLabel lblPassword = new JLabel(\"Password:\");\n\t\tlblPassword.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblPassword.setBounds(238, 253, 87, 22);\n\t\tlblPassword.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 18));\n\t\t\n\t\ttextUser = new JTextField();\n\t\ttextUser.setBounds(369, 178, 180, 32);\n\t\ttextUser.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 18));\n\t\ttextUser.setColumns(10);\n\t\t\n\t\tJButton loginbtn = new JButton(\"Login\");\n\t\tloginbtn.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 18));\n\t\tloginbtn.setBounds(449, 339, 100, 40);\n\t\tloginbtn.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tString user = textUser.getText();\n\t\t\t\tString pass = String.valueOf( textPass.getPassword());\n\t\t\t\t\t\t\t\n\t\t\t\tif ((user == null || user.isEmpty()) && (pass == null || pass.isEmpty())) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter username and password\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n //JOptionPane.showMessageDialog(null, \"Please enter username and password\", \"ERROR\", JOptionPane.INFORMATION_MESSAGE);\n } else if (user == null || user.isEmpty()){\n \tJOptionPane.showMessageDialog(null, \"Please enter username\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n } else if (pass == null || pass.isEmpty()){\n \tJOptionPane.showMessageDialog(null, \"Please enter password\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n }\n\t\t\t}\n\t\t});\n\t\tloginbtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString uname = textUser.getText();\n\t\t\t\tString pass = String.valueOf( textPass.getPassword());\n\t\t\t\t\n\t\t\t\tif (auth.login(uname, pass) != null) {\n\t\t\t\t\tif (auth.login(uname, pass).getAccountType() == \"Researcher\") {\n\t\t\t\t\t\tResearcher panel = new Researcher(frame, auth);\n\t\t\t\t\t\tframe.setContentPane(panel);\n\t\t\t\t\t\tframe.revalidate();\n\t\t\t\t\t} else if (auth.login(uname, pass).getAccountType() == \"Reviewer\") {\n\t\t\t\t\t\tSystem.out.println(uname);\n\t\t\t\t\t\tReviewer panel = new Reviewer(frame, auth,uname);\n\t\t\t\t\t\tframe.setContentPane(panel);\n\t\t\t\t\t\tframe.revalidate();\n\t\t\t\t\t} else if (auth.login(uname, pass).getAccountType() == \"Editor\") {\n\t\t\t\t\t\tEditor panel = new Editor(frame, auth,uname);\n\t\t\t\t\t\tframe.setContentPane(panel);\n\t\t\t\t\t\tframe.revalidate();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Account not found\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton btnRegister = new JButton(\"Register\");\n\t\tbtnRegister.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tregister panel = new register(frame, auth);\n\t\t\t\tframe.setContentPane(panel);\n\t\t\t\tframe.revalidate();\n\t\t\t}\n\t\t});\n\t\t\t\n\t\tbtnRegister.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 18));\n\t\tbtnRegister.setBounds(259, 339, 120, 40);\t\n\t\t\t\n\t\tsetLayout(null);\n\t\tadd(lblWelcomeToOpen);\n\t\tadd(lblPassword);\n\t\tadd(lblUsername);\n\t\tadd(textUser);\n\t\tadd(btnRegister);\n\t\tadd(loginbtn);\n\t\t\n\t\ttextPass = new JPasswordField();\n\t\ttextPass.setBounds(369, 251, 180, 32);\n\t\tadd(textPass);\n\n\t}",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n setInProgress();\n login(mUsername.getText().toString(),\n mPassword.getText().toString());\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 }",
"@FXML\n\tvoid login(ActionEvent event) throws IOException {\n\t\tMessage messageToServer = new Message();\n\t\tString userName = txtUserName.getText();\n\t\tString password = txtPassword.getText();\n\t\t// check that user put details\n\t\tif (userName.trim().isEmpty() || password.trim().isEmpty())\n\t\t\tlblErr.setText(\"User Name or Password is missing\");\n\t\telse {\n\t\t\tlblErr.setText(\"\");\n\t\t\t// create new Message object with the request\n\t\t\tmessageToServer.setMsg(userName + \" \" + password);\n\t\t\tmessageToServer.setOperation(\"isUserExists\");\n\t\t\tmessageToServer.setControllerName(\"UserController\");\n\t\t\t// the result User instance\n\t\t\tuser = (User) ClientUI.client.handleMessageFromClientUI(messageToServer);\n\t\t\t// user isn't exists in DB\n\t\t\tif (user == null) { // create pop up alert\n\t\t\t\tlblErr.setText(\"User Name or Password is incorrect\");\n\t\t\t}\n\t\t\t// user already log in\n\t\t\telse if (user.isLogedIN() == true) { // create pop up alert\n\t\t\t\tlblErr.setText(\"User already logged in\");\n\t\t\t} else { // user logged in successfully\n\t\t\t\tmessageToServer.setMsg(userName);\n\t\t\t\tmessageToServer.setOperation(\"updateConnectionStatus\");\n\t\t\t\tmessageToServer.setControllerName(\"UserController\");\n\t\t\t\t// update the user's connection status\n\t\t\t\tClientUI.client.handleMessageFromClientUI(messageToServer);\n\t\t\t\t// navigate user to the right home page, by his permission\n\t\t\t\tswitch (user.getUserType()) {\n\t\t\t\tcase STUDENT:\n\t\t\t\t\tNavigator.instance().navigate(\"StudentHomeForm\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase TEACHER:\n\t\t\t\t\tNavigator.instance().navigate(\"TeacherHomeForm\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase PRINCIPAL:\n\t\t\t\t\tNavigator.instance().navigate(\"PrincipalHomeForm\");\n\t\t\t\t\tbreak;\n\t\t\t\t} // end switch case\n\t\t\t}\n\t\t}\n\t}",
"public void createLoginPopUp(JButton loginButton) {\n\t\tJPanel loginPanel = new JPanel();\n\n\t\tHintTextField usernameEntry = new HintTextField(\"Username\");\n\t\tusernameEntry.setPreferredSize(new Dimension(150, 25));\n\n\t\tHintPasswordField passwordEntry = new HintPasswordField(\"Password\");\n\t\tpasswordEntry.setPreferredSize(new Dimension(150, 25));\n\n\t\tBox vBox = Box.createVerticalBox(); // Align components in one column\n\t\tvBox.add(usernameEntry);\n\t\tvBox.add(passwordEntry);\n\n\t\tloginPanel.add(vBox);\n\t\tObject options[] = { \"Login\", \"Cancel\" };\n\n\t\tint selection = JOptionPane.showOptionDialog(null, loginPanel, \"BTS Login\", JOptionPane.OK_CANCEL_OPTION,\n\t\t\t\tJOptionPane.PLAIN_MESSAGE, null, options, options[0]);\n\n\t\tif (selection == JOptionPane.OK_OPTION) {\n\t\t\tString username = usernameEntry.getText();\n\t\t\tString password = String.valueOf(passwordEntry.getPassword());\n\t\t\t// Call Login method in uicontroller and take action based on result\n\t\t\tEmployee logged_in_result = uiController_.login(username + \":\" + password);\n\t\t\tif (logged_in_result == null) {\n\t\t\t\t// Show login failed message\n\t\t\t\tJOptionPane.showMessageDialog(uiController_.getFrame(), \"Unrecognized Login Credentials\",\n\t\t\t\t\t\t\"Invalid Login\", JOptionPane.WARNING_MESSAGE);\n\t\t\t} else if (logged_in_result instanceof Manager) {\n\t\t\t\t// Get components\n\t\t\t\t((DefaultComboBoxModel<String>) pageSelector.getModel()).addElement(\"Assignment\");\n\t\t\t\tJPanel viewHolder = (JPanel) (uiController_.getFrame().getContentPane().getComponent(0));\n\t\t\t\tCardLayout layout = (CardLayout) viewHolder.getLayout();\n\t\t\t\tloginButton.setVisible(false);\n\n\t\t\t\t// Create new ManagerPanel if it doesn't exist\n\t\t\t\tif (!uiController_.checkPanelExists(\"ManagerPanel\", viewHolder)) {\n\t\t\t\t\tviewHolder.add(new ManagerPanel(uiController_).getPanel_(), \"ManagerPanel\");\n\t\t\t\t}\n\n\t\t\t\t// Change view to manager panel\n\t\t\t\tlayout.show(viewHolder, \"ManagerPanel\");\n\t\t\t} else if (logged_in_result instanceof Developer) {\n\t\t\t\t((DefaultComboBoxModel<String>) pageSelector.getModel()).addElement(\"Assignment\");\n\t\t\t\tpageSelector.addActionListener(new ActionListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\tif (pageSelector.getSelectedItem().equals(\"Assignment\")) {\n\t\t\t\t\t\t\t// Switch to Ordinary panel\n\t\t\t\t\t\t\tJPanel viewHolder = (JPanel) (uiController_.getFrame().getContentPane().getComponent(0));\n\t\t\t\t\t\t\tCardLayout layout = (CardLayout) viewHolder.getLayout();\n\t\t\t\t\t\t\tlayout.show(viewHolder, \"DeveloperPanel\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t\t// Get components\n\t\t\t\tJPanel viewHolder = (JPanel) (uiController_.getFrame().getContentPane().getComponent(0));\n\t\t\t\tCardLayout layout = (CardLayout) viewHolder.getLayout();\n\t\t\t\tloginButton.setVisible(false);\n\t\t\t\t// Create new DeveloperPanel if it doesn't exist\n\t\t\t\tif (!uiController_.checkPanelExists(\"DeveloperPanel\", viewHolder)) {\n\t\t\t\t\tviewHolder.add(new DeveloperPanel(uiController_).getPanel_(), \"DeveloperPanel\");\n\t\t\t\t}\n\n\t\t\t\t// Change view to developer panel\n\t\t\t\tlayout.show(viewHolder, \"DeveloperPanel\");\n\t\t\t}\n\t\t}\n\t}",
"private void login() {\r\n\r\n if (String.valueOf(login_usernameTextField.getText()).equals(\"\"))\r\n JOptionPane.showMessageDialog\r\n (null, \"Must Enter A Username\");\r\n\r\n else if (String.valueOf(login_passwordField.getPassword()).equals(\"\"))\r\n JOptionPane.showMessageDialog\r\n (null, \"Must Enter A Password\");\r\n\r\n else if (MainGUI.pimsSystem.staff_exists(login_usernameTextField.getText(), String.valueOf(login_passwordField.getPassword()))) {\r\n remove(loginPanel);\r\n add(tabbedPane);\r\n JOptionPane.showMessageDialog\r\n (null, \"Login Successful\");\r\n repaint();\r\n revalidate();\r\n\r\n // reset username and password fields\r\n login_usernameTextField.setText(\"\");\r\n login_passwordField.setText(\"\");\r\n\r\n } else\r\n JOptionPane.showMessageDialog\r\n (null, \"Invalid Password or Username\");\r\n }",
"public void login(View view)\n { \n String user= username.getText().toString();\n String pwd = password.getText().toString();\n \n //TODO: check the username and password list in the database and then fetch the profile based on the profileID\n ArrayList<String> columns = new ArrayList<String>();\n\t\tcolumns.add(\"userName\");\n\t\tcolumns.add(\"password\");\n ArrayList<ArrayList<Object>> data = db.getAllRowsAsArrays(\"user_accounts\",columns);\n boolean loginCheck = false;\n\t\tfor (int position=0; position < data.size(); position++)\n \t{\n \t\tArrayList<Object> row = data.get(position);\n \t\tif(user.equals(row.get(0).toString()) && pwd.equals(row.get(1).toString()))\n \t\t{\n \t\t\tloginCheck = true;\n \t\t\tbreak;\n \t\t}\n \t}\n\t\t\n if(loginCheck)\n {\n \t Toast.makeText(getApplicationContext(), \"Redirecting...\", \n\t Toast.LENGTH_SHORT).show();\n\t Intent i = new Intent(LoginView.this, PickPages.class);\n\t startActivity(i);\n\t }\t\n\t else{\n\t Toast.makeText(getApplicationContext(), \"Wrong Credentials\",\n\t Toast.LENGTH_SHORT).show();\n\t password.setText(\"\");\n\t //attempts.setBackgroundColor(Color.RED);\t\n\t //counter--;\n\t //attempts.setText(Integer.toString(counter));\n\t //if(counter==0){\n\t // login.setEnabled(false);\n\t //}\n\t }\n }",
"@Override\r\n\tpublic void actionPerformed(Object e) {\n\t\tif(e == loginButton) {\r\n\t\t\ttry {\r\n\t\t\t\t\r\n\t\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT * FROM users WHERE username LIKE ? AND password LIKE ?\");\r\n\t\t\t\tps.setString(1, usernameField.getText());\r\n\t\t\t\tps.setString(2, passField.getText());\r\n\t\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t\t\r\n\t\t\t\tif(!rs.next()) {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"invalid username/password\",\"error\",JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tint i = rs.getInt(\"UserId\");\r\n\t\t\t\t\tString name = rs.getString(\"Name\");\r\n\t\t\t\t\tBlob blob = rs.getBlob(\"ProfilePic\");\r\n\t\t\t\t\tUser user = User.getUser(i, name,usernameField.getText(), passField.getText(),blob);\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Login Successfull !\");\r\n\t\t\t\t\tsm.setNewPage(StateManager.HOME);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tSystem.out.println(\"ERROR\");\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public void validateCredentials(ObjLogin objLogin, Context mContext) {\n if (loginView != null) {\n loginView.showProgress();\n loginInteractor.login(objLogin, this, mContext);\n }\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 }",
"@Override\n public void onClick(View v) {\n loginUser(\"555555\");\n }",
"private void openUserManagementWindow() {\r\n\t\tnew JFrameUser();\r\n\t}",
"@UiHandler(\"go\")\n void connexion(ClickEvent e) {\n loginField.setFocus(false);\n passwordField.setFocus(false);\n domains.setFocus(false);\n\n String login = loginField.getText();\n String password = passwordField.getText();\n login(login, password, domains.getValue(domains.getSelectedIndex()));\n\n\n }",
"public String login(Benutzer b) {\n\n benutzer = b;\n try {\n FacesContext.getCurrentInstance().getExternalContext().redirect(\"list.xhtml\");\n return \"\";\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return \"\";\n }",
"public void actionPerformed(ActionEvent e){\n if (e.getSource() == login_var){\r\n String username_input = userInp.getText();\r\n login_username = username_input;\r\n \r\n String password_input = passInp.getText();\r\n status = systemssoftwareproject.Authentication.login.login(username_input, password_input);\r\n \r\n // If credentials are a match - login successfully\r\n if(status) {\r\n setVisible(false);\r\n }\r\n \r\n // Else - display error\r\n else{\r\n JOptionPane.showMessageDialog(c, \"Incorrect Credentials! Try again.\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }\r\n \r\n // Send user to SignupForm\r\n if (e.getSource() == signup){\r\n setVisible(false);\r\n SignupForm signupForm = new SignupForm();\r\n signupForm.getLoginInstance(this);\r\n }\r\n }",
"private void proseslogin() {\n String user = username.getText();\n char[] pass = password.getPassword();\n \n if (user.isEmpty()) {\n JOptionPane.showMessageDialog(this, \"Username Harus Diisi\");\n username.requestFocus();\n } else if (pass.length == 0){\n JOptionPane.showMessageDialog(this, \"Password Harus Diisi\");\n password.requestFocus();\n }else{\n String password = new String(pass);\n login.setEnabled(false);\n try {\n Connection conn = koneksi.sambungDB();\n Statement st = conn.createStatement();\n String n = \"SELECT * FROM tb_admin \"\n +\"WHERE admin_username='\"+user+\"' \"\n +\"AND admin_password=MD5('\"+password+\"')\" ;\n// System.out.println(q);\n ResultSet rs = st.executeQuery(n);\n if (rs.next()) {\n Data_perumahan h = new Data_perumahan();\n h.setExtendedState(Frame.MAXIMIZED_BOTH);\n this.setVisible(false);\n h.setVisible(true);\n }else{\n JOptionPane.showMessageDialog(this, \"Username dan Password Salah\");\n username.requestFocus();\n }\n login.setEnabled(true);\n } catch (HeadlessException | SQLException e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n }\n }",
"private boolean login()\n {\n System.out.print(\"Enter your username: \");\n String userName = keyboard.nextLine().toLowerCase();\n currentUser = fs.getUser(userName);\n System.out.println();\n\n return currentUser != null;\n }",
"public void actionPerformed(ActionEvent e){\n\t\tString command = e.getActionCommand();\n\t\tif(command == \"login\"){\n\t\t\tif(isUserValid(loginView.getUserNameTextField().getText(),\n\t\t\t\t\t\t loginView.getUserPasswordField().getPassword())){\n\t\t\t\tPosPiMenu posMenu = new PosPiMenu(this.dataConnection, this.dataUser, this.dataPassword);\n\t\t\t\tposMenu.showGUI();\n\t\t\t\tthis.loginView.getMainFrame().dispose();\n\t\t\t}\n\t\t}//end if\n\t}",
"public void authenticateUser() {\n\n String username = viewUsername.getText().toString();\n String password = viewPassword.getText().toString();\n\n Timber.v(\"authenticateUser called username: \" + username);\n activity.getOnboardingViewModel().authenticateUser(username, password);\n }",
"@Override\n public void onClick(View v) {\n loginUser(\"333333\");\n }",
"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 }",
"public ConsumersLOEPage signIn (User user) {\r\n clickEmailField(driver);\r\n clearEmailField();\r\n inputEmail(user.getEmail());\r\n //\r\n clickPasswordField(driver);\r\n clearPasswordField();\r\n inputPassword(user.getPassword());\r\n //\r\n getsignInButtonField().submit();\r\n //\r\n return new ConsumersLOEPage(driver, user);\r\n }",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\tString user = userInput.getText();\r\n\t\t\t\tString password = passwordInput.getText();\r\n\t\t\t\tnew controlador.Login().checkUser(user, password);\t\r\n\t\t\t\tdispose();\r\n\t\t\t\t//if (usr.checkUserAndPass(user, password)) { \r\n\t\t\t\t//Login atras1 = new Login(); \r\n\t\t\t\t//atras1.setVisible(true); \r\n\t\t\t\t//setVisible(false); \r\n//} else { \r\n\t//JOptionPane.showMessageDialog(null, \"Usuario no reconocido\"); }\r\n\t\t\t\t//new vista.ElegirEquipo().setVisible(true);\r\n\t\t\t\t\r\n\t\t\t}"
] | [
"0.6463621",
"0.63929445",
"0.6282286",
"0.60754555",
"0.60457337",
"0.601991",
"0.6017432",
"0.59937906",
"0.5970078",
"0.59588647",
"0.5957952",
"0.58972424",
"0.5884937",
"0.5859386",
"0.5855792",
"0.5852705",
"0.5834672",
"0.58320993",
"0.58209836",
"0.58016425",
"0.57936627",
"0.5774386",
"0.5771436",
"0.5763613",
"0.5760003",
"0.57367593",
"0.5735816",
"0.57306606",
"0.5718515",
"0.57179105",
"0.57126194",
"0.57116276",
"0.570249",
"0.56769127",
"0.5668767",
"0.5660735",
"0.56575596",
"0.56549954",
"0.56484324",
"0.56250393",
"0.5623293",
"0.5623063",
"0.56084484",
"0.56074965",
"0.5599836",
"0.5593638",
"0.5588931",
"0.5588914",
"0.55763674",
"0.5566033",
"0.55651665",
"0.555047",
"0.55488515",
"0.5548154",
"0.55442244",
"0.5531989",
"0.552712",
"0.55052173",
"0.55015564",
"0.5488446",
"0.5465626",
"0.54577655",
"0.54566675",
"0.54479283",
"0.5443157",
"0.54363585",
"0.5430427",
"0.54284346",
"0.5426534",
"0.54217565",
"0.5418681",
"0.5413996",
"0.5411113",
"0.54102445",
"0.54085773",
"0.5394145",
"0.53863144",
"0.537815",
"0.53772026",
"0.53718483",
"0.53683937",
"0.536641",
"0.5361737",
"0.5360177",
"0.53594995",
"0.53582716",
"0.535389",
"0.53433853",
"0.53347176",
"0.53301907",
"0.53301483",
"0.5327841",
"0.53259754",
"0.5323725",
"0.5319455",
"0.53174615",
"0.5316417",
"0.53158146",
"0.5314245",
"0.5310061"
] | 0.61004615 | 3 |
The method shows a change credentials dialog for a given URI. The user field is taken from the URI if a user is present in the URI. In this case the user is not editable. | public static UserPasswordCredentials changeCredentials(Shell parent,
URIish uri) {
LoginDialog dialog = new LoginDialog(parent, uri);
dialog.setChangeCredentials(true);
UserPasswordCredentials oldCredentials = SecureStoreUtils
.getCredentialsQuietly(uri);
if (oldCredentials != null)
dialog.setOldUser(oldCredentials.getUser());
if (dialog.open() == Window.OK) {
UserPasswordCredentials credentials = dialog.getCredentials();
if (credentials != null)
SecureStoreUtils.storeCredentials(credentials, uri);
return credentials;
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void newPasswordForService(URI serviceURI) {\n\t\t/*\n\t\t * As this method can be called from outside of Credential Manager UI,\n\t\t * e.g. from wsdl-activity-ui or rshell-activity-ui to pop up a dialog\n\t\t * to ask the user for username and password, we also want to make sure\n\t\t * the main Credential Manager UI Dialog is visible as it may be clearer\n\t\t * to the user what is going on\n\t\t */\n\t\tif (!isVisible() || getState() == ICONIFIED)\n\t\t\tsetVisible(true);\n\n\t\t// Make sure password tab is selected as this method may\n\t\t// be called from outside of Credential Manager UI.\n\t\tkeyStoreTabbedPane.setSelectedComponent(passwordsTab);\n\n\t\tString username = null; // username\n\t\tString password = null; // password\n\n\t\t// Loop until the user cancels or enters everything correctly\n\t\twhile (true) {\n\n//\t\t\tif(!this.isVisible()){ // if Cred Man UI is already showing but e.g. obscured by another window or minimised\n//\t\t\t\t// Do not bring it up!\n//\t\t\t} // actually we now want to show it as it makes it clearer to the user what is going on\n\n\t\t\t// Let the user insert a new password entry for the given service\n\t\t\t// URI (by specifying username and password)\n\t\t\tNewEditPasswordEntryDialog newPasswordDialog = new NewEditPasswordEntryDialog(\n\t\t\t\t\tthis, \"New username and password for a service\", true,\n\t\t\t\t\tserviceURI, username, password, credManager);\n\t\t\tnewPasswordDialog.setLocationRelativeTo(this);\n\t\t\tnewPasswordDialog.setVisible(true);\n\n\t\t\tserviceURI = newPasswordDialog.getServiceURI(); // get service URI\n\t\t\tusername = newPasswordDialog.getUsername(); // get username\n\t\t\tpassword = newPasswordDialog.getPassword(); // get password\n\n\t\t\tif (password == null) // user cancelled - any of the above three\n\t\t\t\t// fields is null\n\t\t\t\t// do nothing\n\t\t\t\treturn;\n\n\t\t\t/*\n\t\t\t * Check if a password entry with the given service URI already\n\t\t\t * exists in the Keystore. We ask this here as the user may wish to\n\t\t\t * overwrite the existing password entry. Checking for key pair\n\t\t\t * entries' URIs is done in the NewEditPasswordEntry dialog.\n\t\t\t */\n\n\t\t\t// Get list of service URIs for all the password entries in the\n\t\t\t// Keystore\n\t\t\tList<URI> serviceURIs = null;\n\t\t\ttry {\n\t\t\t\tserviceURIs = credManager\n\t\t\t\t\t\t.getServiceURIsForAllUsernameAndPasswordPairs();\n\t\t\t} catch (CMException cme) {\n\t\t\t\tshowMessageDialog(this, \"Failed to get service URIs for all username and password pairs \"\n\t\t\t\t\t\t+ \"to check if the entered service URI already exists\",\n\t\t\t\t\t\tERROR_TITLE, ERROR_MESSAGE);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (serviceURIs.contains(serviceURI)) { // if such a URI already\n\t\t\t\t// exists\n\t\t\t\t// Ask if the user wants to overwrite it\n\t\t\t\tint answer = showConfirmDialog(\n\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\"Credential Manager already contains a password entry with the same service URI.\\n\"\n\t\t\t\t\t\t\t\t+ \"Do you want to overwrite it?\", ALERT_TITLE,\n\t\t\t\t\t\tYES_NO_OPTION);\n\n\t\t\t\t// Add the new password entry in the Keystore\n\t\t\t\ttry {\n\t\t\t\t\tif (answer == YES_OPTION) {\n\t\t\t\t\t\tcredManager.addUsernameAndPasswordForService(\n\t\t\t\t\t\t\t\tnew UsernamePassword(username, password),\n\t\t\t\t\t\t\t\tserviceURI);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} catch (CMException cme) {\n\t\t\t\t\tString exMessage = \"Credential Manager failed to insert a new username and password pair\";\n\t\t\t\t\tshowMessageDialog(this, exMessage, ERROR_TITLE,\n\t\t\t\t\t\t\tERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t\t// Otherwise show the same window with the entered service\n\t\t\t\t// URI, username and password values\n\t\t\t} else\n\t\t\t\t// Add the new password entry in the Keystore\n\t\t\t\ttry {\n\t\t\t\t\tcredManager.addUsernameAndPasswordForService(new UsernamePassword(username,\n\t\t\t\t\t\t\tpassword), serviceURI);\n\t\t\t\t\tbreak;\n\t\t\t\t} catch (CMException cme) {\n\t\t\t\t\tshowMessageDialog(this, \"Credential Manager failed to insert a new username and password pair\",\n\t\t\t\t\t\t\tERROR_TITLE,\n\t\t\t\t\t\t\tERROR_MESSAGE);\n\t\t\t\t}\n\t\t}\n\t}",
"private void showUserPreferences() {\r\n MyAccount ma = state.getAccount();\r\n \r\n mOriginName.setValue(ma.getOriginName());\r\n SharedPreferencesUtil.showListPreference(this, MyAccount.Builder.KEY_ORIGIN_NAME, R.array.origin_system_entries, R.array.origin_system_entries, R.string.summary_preference_origin_system);\r\n \r\n mOriginName.setEnabled(!state.builder.isPersistent() && TextUtils.isEmpty(ma.getUsername()));\r\n \r\n if (mEditTextUsername.getText() == null\r\n || ma.getUsername().compareTo(mEditTextUsername.getText()) != 0) {\r\n mEditTextUsername.setText(ma.getUsername());\r\n }\r\n StringBuilder summary;\r\n if (ma.getUsername().length() > 0) {\r\n summary = new StringBuilder(ma.getUsername());\r\n } else {\r\n summary = new StringBuilder(this.getText(ma.alternativeTermForResourceId(R.string.summary_preference_username)));\r\n }\r\n mEditTextUsername.setDialogTitle(this.getText(ma.alternativeTermForResourceId(R.string.dialog_title_preference_username)));\r\n mEditTextUsername.setTitle(this.getText(ma.alternativeTermForResourceId(R.string.title_preference_username)));\r\n mEditTextUsername.setSummary(summary);\r\n mEditTextUsername.setEnabled(!state.builder.isPersistent() && !ma.isUsernameValidToStartAddingNewAccount());\r\n \r\n boolean isNeeded = ma.canChangeOAuth();\r\n if (ma.isOAuth() != mOAuth.isChecked()) {\r\n mOAuth.setChecked(ma.isOAuth());\r\n }\r\n // In fact, we should hide it if not enabled, but I couldn't find an easy way for this...\r\n mOAuth.setEnabled(isNeeded);\r\n if (isNeeded) {\r\n mOAuth.setTitle(R.string.title_preference_oauth);\r\n mOAuth.setSummary(ma.isOAuth() ? R.string.summary_preference_oauth_on : R.string.summary_preference_oauth_off);\r\n } else {\r\n mOAuth.setTitle(\"\");\r\n mOAuth.setSummary(\"\");\r\n }\r\n \r\n isNeeded = ma.getConnection().isPasswordNeeded();\r\n if (mEditTextPassword.getText() == null\r\n || ma.getPassword().compareTo(mEditTextPassword.getText()) != 0) {\r\n mEditTextPassword.setText(ma.getPassword());\r\n }\r\n if (isNeeded) {\r\n mEditTextPassword.setTitle(R.string.title_preference_password);\r\n summary = new StringBuilder(this.getText(R.string.summary_preference_password));\r\n if (TextUtils.isEmpty(ma.getPassword())) {\r\n summary.append(\": (\" + this.getText(R.string.not_set) + \")\");\r\n }\r\n } else {\r\n summary = null;\r\n mEditTextPassword.setTitle(\"\");\r\n }\r\n mEditTextPassword.setSummary(summary);\r\n mEditTextPassword.setEnabled(isNeeded);\r\n \r\n int titleResId;\r\n boolean addAccountOrVerifyCredentialsEnabled = ma.isOAuth() || ma.getCredentialsPresent();\r\n switch (ma.getCredentialsVerified()) {\r\n case SUCCEEDED:\r\n titleResId = R.string.title_preference_verify_credentials;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials));\r\n break;\r\n default:\r\n if (state.builder.isPersistent()) {\r\n titleResId = R.string.title_preference_verify_credentials_failed;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials_failed));\r\n } else {\r\n if (!ma.isUsernameValidToStartAddingNewAccount()) {\r\n addAccountOrVerifyCredentialsEnabled = false;\r\n }\r\n titleResId = R.string.title_preference_add_account;\r\n if (ma.isOAuth()) {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_oauth));\r\n } else {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_basic));\r\n }\r\n }\r\n break;\r\n }\r\n addAccountOrVerifyCredentials.setTitle(titleResId);\r\n addAccountOrVerifyCredentials.setSummary(summary);\r\n addAccountOrVerifyCredentials.setEnabled(addAccountOrVerifyCredentialsEnabled);\r\n }",
"private void editPassword() {\n\t\t// Which password entry has been selected?\n\t\tint iRow = passwordsTable.getSelectedRow();\n\t\tif (iRow == -1) { // no row currently selected\n\t\t\treturn;\n\t\t}\n\n\t\t// Get current values for service URI, username and password\n\t\tURI serviceURI = URI.create((String) passwordsTable.getValueAt(iRow, 1)); // current entry's service URI\n\n\t\tString username = (String) passwordsTable.getValueAt(iRow, 2); // current entry's username\n\n\t\t/*\n\t\t * Because the password column is not visible we call the getValueAt\n\t\t * method on the table model rather than at the JTable\n\t\t */\n\t\tString password = (String) passwordsTable.getModel()\n\t\t\t\t.getValueAt(iRow, 4); // current entry's password value\n\n\t\twhile (true) { // loop until user cancels or enters everything correctly\n\t\t\t// Let the user edit service URI, username or password of a password entry\n\t\t\tNewEditPasswordEntryDialog editPasswordDialog = new NewEditPasswordEntryDialog(\n\t\t\t\t\tthis, \"Edit username and password for a service\", true,\n\t\t\t\t\tserviceURI, username, password, credManager);\n\n\t\t\teditPasswordDialog.setLocationRelativeTo(this);\n\t\t\teditPasswordDialog.setVisible(true);\n\n\t\t\t// New values\n\t\t\tURI newServiceURI = editPasswordDialog.getServiceURI(); // get new service URI\n\t\t\tString newUsername = editPasswordDialog.getUsername(); // get new username\n\t\t\tString newPassword = editPasswordDialog.getPassword(); // get new password\n\n\t\t\tif (newPassword == null) // user cancelled - any of the above three\n\t\t\t\t// fields is null\n\t\t\t\t// do nothing\n\t\t\t\treturn;\n\n\t\t\t// Is anything actually modified?\n\t\t\tboolean isModified = !serviceURI.equals(newServiceURI)\n\t\t\t\t\t|| !username.equals(newUsername)\n\t\t\t\t\t|| !password.equals(newPassword);\n\n\t\t\tif (isModified) {\n\t\t\t\t/*\n\t\t\t\t * Check if a different password entry with the new URI (i.e.\n\t\t\t\t * alias) already exists in the Keystore We ask this here as the\n\t\t\t\t * user may wish to overwrite that other password entry.\n\t\t\t\t */\n\n\t\t\t\t// Get list of URIs for all passwords in the Keystore\n\t\t\t\tList<URI> serviceURIs = null;\n\t\t\t\ttry {\n\t\t\t\t\tserviceURIs = credManager\n\t\t\t\t\t\t\t.getServiceURIsForAllUsernameAndPasswordPairs();\n\t\t\t\t} catch (CMException cme) {\n\t\t\t\t\tshowMessageDialog(this, \"Failed to get service URIs for all username and password pairs \"\n\t\t\t\t\t\t\t+ \"to check if the modified entry already exists\",\n\t\t\t\t\t\t\tERROR_TITLE,\n\t\t\t\t\t\t\tERROR_MESSAGE);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// If the modified service URI already exists and is not the\n\t\t\t\t// currently selected one\n\t\t\t\tif (!newServiceURI.equals(serviceURI)\n\t\t\t\t\t\t&& serviceURIs.contains(newServiceURI)) {\n\t\t\t\t\tint answer = showConfirmDialog(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\"The Keystore already contains username and password pair for the entered service URI.\\n\"\n\t\t\t\t\t\t\t\t\t+ \"Do you want to overwrite it?\",\n\t\t\t\t\t\t\tALERT_TITLE, YES_NO_OPTION);\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (answer == YES_OPTION) {\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Overwrite that other entry entry and save the new\n\t\t\t\t\t\t\t * one in its place. Also remove the current one\n\t\t\t\t\t\t\t * that we are editing - as it is replacing the\n\t\t\t\t\t\t\t * other entry.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tcredManager\n\t\t\t\t\t\t\t\t\t.deleteUsernameAndPasswordForService(serviceURI);\n\t\t\t\t\t\t\tcredManager.addUsernameAndPasswordForService(\n\t\t\t\t\t\t\t\t\tnew UsernamePassword(newUsername,\n\t\t\t\t\t\t\t\t\t\t\tnewPassword), newServiceURI);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (CMException cme) {\n\t\t\t\t\t\tshowMessageDialog(\n\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\"Failed to update the username and password pair in the Keystore\",\n\t\t\t\t\t\t\t\tERROR_TITLE, ERROR_MESSAGE);\n\t\t\t\t\t}\n\t\t\t\t\t// Otherwise show the same window with the entered\n\t\t\t\t\t// service URI, username and password values\n\t\t\t\t} else\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (!newServiceURI.equals(serviceURI))\n\t\t\t\t\t\t\tcredManager\n\t\t\t\t\t\t\t\t\t.deleteUsernameAndPasswordForService(serviceURI);\n\t\t\t\t\t\tcredManager.addUsernameAndPasswordForService(\n\t\t\t\t\t\t\t\tnew UsernamePassword(newUsername, newPassword), newServiceURI);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} catch (CMException cme) {\n\t\t\t\t\t\tshowMessageDialog(\n\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\"Failed to update the username and password pair in the Keystore\",\n\t\t\t\t\t\t\t\tERROR_TITLE, ERROR_MESSAGE);\n\t\t\t\t\t}\n\t\t\t} else // nothing actually modified\n\t\t\t\tbreak;\n\t\t}\n\t}",
"private void newPassword() {\n\t\tURI serviceURI = null; // service URI\n\t\tString username = null; // username\n\t\tString password = null; // password\n\n\t\t// Loop until the user cancels or enters everything correctly\n\t\twhile (true) {\n\t\t\t/*\n\t\t\t * Let the user insert a new password entry (by specifying service\n\t\t\t * URI, username and password)\n\t\t\t */\n\t\t\tNewEditPasswordEntryDialog newPasswordDialog = new NewEditPasswordEntryDialog(\n\t\t\t\t\tthis, \"New username and password for a service\", true,\n\t\t\t\t\tserviceURI, username, password, credManager);\n\t\t\tnewPasswordDialog.setLocationRelativeTo(this);\n\t\t\tnewPasswordDialog.setVisible(true);\n\n\t\t\tserviceURI = newPasswordDialog.getServiceURI(); // get service URI\n\t\t\tusername = newPasswordDialog.getUsername(); // get username\n\t\t\tpassword = newPasswordDialog.getPassword(); // get password\n\n\t\t\tif (password == null) { // user cancelled - any of the above three\n\t\t\t\t// fields is null\n\t\t\t\t// do nothing\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Check if a password entry with the given service URI already\n\t\t\t * exists in the Keystore. We ask this here as the user may wish to\n\t\t\t * overwrite the existing password entry. Checking for key pair\n\t\t\t * entries' URIs is done in the NewEditPasswordEntry dialog.\n\t\t\t */\n\n\t\t\t/*\n\t\t\t * Get list of service URIs for all the password entries in the\n\t\t\t * Keystore\n\t\t\t */\n\t\t\tList<URI> serviceURIs = null;\n\t\t\ttry {\n\t\t\t\tserviceURIs = credManager\n\t\t\t\t\t\t.getServiceURIsForAllUsernameAndPasswordPairs();\n\t\t\t} catch (CMException cme) {\n\t\t\t\tshowMessageDialog(this, \"Failed to get service URIs for all username and password pairs \"\n\t\t\t\t\t\t+ \"to check if the entered service URI already exists\",\n\t\t\t\t\t\tERROR_TITLE, ERROR_MESSAGE);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (serviceURIs.contains(serviceURI)) { // if such a URI already\n\t\t\t\t// exists\n\t\t\t\t// Ask if the user wants to overwrite it\n\t\t\t\tint answer = showConfirmDialog(\n\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\"Credential Manager already contains a password entry with the same service URI.\\n\"\n\t\t\t\t\t\t\t\t\t\t+ \"Do you want to overwrite it?\",\n\t\t\t\t\t\t\t\tALERT_TITLE,\n\t\t\t\t\t\t\t\tYES_NO_OPTION);\n\n\t\t\t\t// Add the new password entry in the Keystore\n\t\t\t\ttry {\n\t\t\t\t\tif (answer == YES_OPTION) {\n\t\t\t\t\t\tcredManager.addUsernameAndPasswordForService(\n\t\t\t\t\t\t\t\tnew UsernamePassword(username, password),\n\t\t\t\t\t\t\t\tserviceURI);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} catch (CMException cme) {\n\t\t\t\t\tshowMessageDialog(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\"Credential Manager failed to insert a new username and password pair\",\n\t\t\t\t\t\t\tERROR_TITLE, ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t\t/*\n\t\t\t\t * Otherwise show the same window with the entered service URI,\n\t\t\t\t * username and password values\n\t\t\t\t */\n\t\t\t} else\n\t\t\t\t// Add the new password entry in the Keystore\n\t\t\t\ttry {\n\t\t\t\t\tcredManager.addUsernameAndPasswordForService(new UsernamePassword(username,\n\t\t\t\t\t\t\tpassword), serviceURI);\n\t\t\t\t\tbreak;\n\t\t\t\t} catch (CMException cme) {\n\t\t\t\t\tshowMessageDialog(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\"Credential Manager failed to insert a new username and password pair\",\n\t\t\t\t\t\t\tERROR_TITLE, ERROR_MESSAGE);\n\t\t\t\t}\n\t\t}\n\t}",
"private void viewPassword() {\n\t\t// Which username/password pair entry has been selected, if any?\n\t\tint iRow = passwordsTable.getSelectedRow();\n\t\tif (iRow == -1) // no row currently selected\n\t\t\treturn;\n\n\t\t// Get current values for service URI, username and password\n\t\tString serviceURI = (String) passwordsTable.getValueAt(iRow, 1); // current entry's service URI\n\n\t\tString username = (String) passwordsTable.getValueAt(iRow, 2); // current entry's username\n\n\t\t/*\n\t\t * Because the password column is not visible we call the getValueAt\n\t\t * method on the table model rather than at the JTable\n\t\t */\n\t\tString password = (String) passwordsTable.getModel()\n\t\t\t\t.getValueAt(iRow, 4); // current entry's password value\n\n\t\t// Let the user view service URI, username and password of the entry\n\t\tViewUsernamePasswordEntryDialog viewServicePassDialog = new ViewUsernamePasswordEntryDialog(\n\t\t\t\tthis, serviceURI, username, password);\n\n\t\tviewServicePassDialog.setLocationRelativeTo(this);\n\t\tviewServicePassDialog.setVisible(true);\n\t}",
"private void showUserPreferences() {\r\n MyAccount ma = state.getMyAccount();\r\n \r\n mOriginName.setValue(ma.getOriginName());\r\n SharedPreferencesUtil.showListPreference(this, MyAccount.Builder.KEY_ORIGIN_NAME, R.array.origin_system_entries, R.array.origin_system_entries, R.string.summary_preference_origin_system);\r\n mOriginName.setEnabled(!ma.isPersistent());\r\n \r\n if (mEditTextUsername.getText() == null\r\n || ma.getUsername().compareTo(mEditTextUsername.getText()) != 0) {\r\n mEditTextUsername.setText(ma.getUsername());\r\n }\r\n StringBuilder summary = new StringBuilder(this.getText(R.string.summary_preference_username));\r\n if (ma.getUsername().length() > 0) {\r\n summary.append(\": \" + ma.getUsername());\r\n } else {\r\n summary.append(\": (\" + this.getText(R.string.not_set) + \")\");\r\n }\r\n mEditTextUsername.setSummary(summary);\r\n mEditTextUsername.setEnabled(ma.canSetUsername());\r\n\r\n if (ma.isOAuth() != mOAuth.isChecked()) {\r\n mOAuth.setChecked(ma.isOAuth());\r\n }\r\n // In fact, we should hide it if not enabled, but I couldn't find an easy way for this...\r\n mOAuth.setEnabled(ma.canChangeOAuth());\r\n\r\n if (mEditTextPassword.getText() == null\r\n || ma.getPassword().compareTo(mEditTextPassword.getText()) != 0) {\r\n mEditTextPassword.setText(ma.getPassword());\r\n }\r\n summary = new StringBuilder(this.getText(R.string.summary_preference_password));\r\n if (TextUtils.isEmpty(ma.getPassword())) {\r\n summary.append(\": (\" + this.getText(R.string.not_set) + \")\");\r\n }\r\n mEditTextPassword.setSummary(summary);\r\n mEditTextPassword.setEnabled(ma.getConnection().isPasswordNeeded());\r\n\r\n int titleResId;\r\n switch (ma.getCredentialsVerified()) {\r\n case SUCCEEDED:\r\n titleResId = R.string.title_preference_verify_credentials;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials));\r\n break;\r\n default:\r\n if (ma.isPersistent()) {\r\n titleResId = R.string.title_preference_verify_credentials_failed;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials_failed));\r\n } else {\r\n titleResId = R.string.title_preference_add_account;\r\n if (ma.isOAuth()) {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_oauth));\r\n } else {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_basic));\r\n }\r\n }\r\n break;\r\n }\r\n mVerifyCredentials.setTitle(titleResId);\r\n mVerifyCredentials.setSummary(summary);\r\n mVerifyCredentials.setEnabled(ma.isOAuth() || ma.getCredentialsPresent());\r\n }",
"public EditAccount(java.awt.Frame parent, boolean modal, UserCredentials account) {\n super(parent, modal);\n \n this.account = account;\n \n initComponents();\n }",
"private void showPreference(){\r\n if(userPreferencesForm == null) {\r\n userPreferencesForm = new UserPreferencesForm(mdiForm,true);\r\n }\r\n userPreferencesForm.loadUserPreferences(mdiForm.getUserId());\r\n userPreferencesForm.setUserName(mdiForm.getUserName());\r\n userPreferencesForm.display();\r\n }",
"public void editUser(User user) {\n\t\t\n\t}",
"@FXML\n\tpublic void openUpdateMyUser(ActionEvent event) throws IOException {\n\t\tTextInputDialog dialog = new TextInputDialog();\n\t\tdialog.setTitle(\"Text Input Dialog\");\n\t\tdialog.setHeaderText(\"Look, a Text Input Dialog\");\n\t\tdialog.setContentText(\"Please enter your username:\");\n\t\tdialog.showAndWait();\n\n\t\tSystemUser user = restaurant.returnUser(dialog.getEditor().getText());\n\n\t\tif (user != null) {\n\t\t\tFXMLLoader updateUser = new FXMLLoader(getClass().getResource(\"Update-User.fxml\"));\n\t\t\tupdateUser.setController(this);\n\t\t\tParent rootIUpdateUser = updateUser.load();\n\t\t\tmainPane_OptionsWindow.getChildren().setAll(rootIUpdateUser);\n\n\t\t\tLabelSystemUserName.setText(user.getUserName());\n\n\t\t\ttxtSystemUserNewname.setText(user.getNames());\n\t\t\ttxtSystemUserNewLastname.setText(user.getSurNames());\n\t\t\ttxtSystemUserNewId.setText(user.getIdNumber());\n\t\t\ttxtSystemUserNewUsername.setText(user.getUserName());\n\n\t\t} else {\n\t\t\tDialog<String> dialog1 = createDialog();\n\t\t\tdialog1.setContentText(\"No existe ningun usuario con este nombre de usuario\");\n\t\t\tdialog1.setTitle(\"Error al cargar datos\");\n\t\t\tdialog1.show();\n\t\t}\n\n\t}",
"public static void ShowEditUser() {\n ToggleVisibility(UsersPage.window);\n }",
"@Inject\n\tChangeCredentialsController(final OptionPaneHelper optionPaneHelper,\n\t\t\t\t\t\t\t\tfinal UserAPI userAPI) {\n\t\tthis.optionPane = optionPaneHelper;\n\t\tthis.userAPI = userAPI;\n\t}",
"private void showPasswordChooserDialog(){\n if (getFragmentManager().findFragmentByTag(PASSWORD_FRAGMENT_TAG) != null){\n return;\n }\n PasswordDialogFragment fragment = PasswordDialogFragment.createFragment(R.string.box_sharesdk_password, R.string.box_sharesdk_set_password, R.string.box_sharesdk_ok, R.string.box_sharesdk_cancel );\n fragment.show(getFragmentManager(), PASSWORD_FRAGMENT_TAG);\n }",
"void editUser(String uid, User newUser);",
"private void setUserCredentials() {\n ((EditText) findViewById(R.id.username)).setText(\"harish\");\n ((EditText) findViewById(R.id.password)).setText(\"11111111\");\n PayPalHereSDK.setServerName(\"stage2pph10\");\n }",
"private void authentication(final int position) {\n AlertDialog.Builder mBuilder = new AlertDialog.Builder(activity);\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n View mView = inflater.inflate(R.layout.password_dialog, null);\n mBuilder.setView(mView);\n final AlertDialog dialog = mBuilder.create();\n /* PERSONALIZATION OF THE DIALOG (REUSABILITY) */\n final TextView add_title = (TextView) mView.findViewById(R.id.add_title);\n add_title.setText(\"Please Enter Your Password\"); // personalize the title of your dialog\n /* END OF PERSONALIZATION */\n\n //4 number pickers 0-9 to enter a PIN\n final NumberPicker pin1 = (NumberPicker) mView.findViewById(R.id.PINPicker1);\n pin1.setMaxValue(9);\n pin1.setMinValue(0);\n final NumberPicker pin2 = (NumberPicker) mView.findViewById(R.id.PINPicker2);\n pin2.setMaxValue(9);\n pin2.setMinValue(0);\n final NumberPicker pin3 = (NumberPicker) mView.findViewById(R.id.PINPicker3);\n pin3.setMaxValue(9);\n pin3.setMinValue(0);\n final NumberPicker pin4 = (NumberPicker) mView.findViewById(R.id.PINPicker4);\n pin4.setMaxValue(9);\n pin4.setMinValue(0);\n\n Button enter_btn = (Button) mView.findViewById(R.id.enter_btn);\n enter_btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n //if password is correct, call change user\n String num1 = Integer.toString(pin1.getValue());\n String num2 = Integer.toString(pin2.getValue());\n String num3 = Integer.toString(pin3.getValue());\n String num4 = Integer.toString(pin4.getValue());\n StringBuilder passBuilder = new StringBuilder();\n passBuilder.append(num1);\n passBuilder.append(num2);\n passBuilder.append(num3);\n passBuilder.append(num4);\n String password = passBuilder.toString();\n\n if(password.equals(selected_user.getPassword())) {\n changeUser(position);\n dialog.dismiss();\n } else {\n Toast.makeText(activity, \"Wrong password, you've entered : \" + password, Toast.LENGTH_SHORT).show();\n }\n }\n });\n Button cancel_btn = (Button) mView.findViewById(R.id.cancel_btn);\n cancel_btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.cancel();\n }\n });\n dialog.show();\n }",
"private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }",
"@Override\n\tpublic void credite() {\n\t\t\n\t}",
"@Override\n public void onClick(View view) {\n\n if(etName.getText().toString().isEmpty()){\n nameWrapper.setError(getResources().getString(R.string.nameEmpty));\n }else{\n if (etPass.getText().toString().matches(PASSWORD)){\n\n SharedPreferences preferencias = getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE);\n\n SharedPreferences.Editor editor = preferencias.edit();\n\n editor.putString(\"userName\", etName.getText().toString());\n editor.putBoolean(\"autenticado\", !preferencias.getBoolean(\"autenticado\", false));\n\n editor.commit();\n\n ComprobarCredenciales(preferencias);\n\n }else{\n etPass.setText(\"\");\n passwordWrapper.setError(getResources().getString(R.string.passError));\n }\n }\n\n getCurrentFocus().clearFocus();\n }",
"public editUserFrame(int IDUser ,int IDU0) {\n initComponents();\n userService = new UserService();\n user = userService.getUserByID(IDUser);\n u = userService.getUserByID(IDU0);\n\n IDEtextField.setText(String.valueOf(user.getIDUser()));\n fullNameTextField.setText(user.getFullName()); \n String b = user.getGender().replaceAll(\"\\\\s\",\"\"); \n if (b.equals(\"Nam\")) { \n genderComboBox.setSelectedIndex(0); \n }\n if (b.equals(\"Nữ\")) { \n genderComboBox.setSelectedItem(\"Nữ\"); \n }\n if (b.equals(\"Khác\")) {\n \n genderComboBox.setSelectedItem(\"Khác\");\n }\n if (user.getRole().equals(\"Admin\")) {\n AdminRadiobutton.setSelected(true);\n role = \"Admin\";\n }\n if(user.getRole().equals(\"Employee\")){\n EmployeeRadioButton.setSelected(true);\n role = \"Employee\";\n }\n \n DOBTextField.setText(user.getDob());\n addressTextField.setText(user.getAddress());\n phoneTextField.setText(user.getPhone());\n userNameTextField.setText(user.getUserName());\n passwordTextField.setText(user.getPassword());\n\n this.setLocationRelativeTo(null);\n }",
"private void changePassword() throws EditUserException {\n String userIDInput = userID.getText();\n String passwordInput = passwordChange.getText();\n try {\n Admin.changeUserPassword(userIDInput, passwordInput);\n JOptionPane.showMessageDialog(null, \"Change Password Success: \" + userIDInput + \" password successfully changed\");\n // Reset Values\n userID.setText(\"\");\n passwordChange.setText(\"\");\n } catch (EditUserException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n throw new EditUserException(e.getMessage());\n } catch (SQLException throwables) {\n throw new EditUserException(\"Change Password Error: Cannot Change\" + userIDInput + \" password\");\n } catch (NullPointerException e) {\n String msg = \"Change Password Error: User ID \" + userIDInput + \" is an invalid userID.\";\n JOptionPane.showMessageDialog(null, msg);\n throw new EditUserException(\"Change Password Error: User ID \" + userIDInput + \" is an invalid userID.\");\n }\n }",
"private void changePassword(){\n\t\tif (changeCancelButton.getText().equals(\"Anuluj\")){\n\t\t\thidePassword();\n\t\t\tchangeCancelButton.setText(\"Zmień hasło\");\n\t\t\tchangePassword = false;\n\t\t}\t\n\t\telse {\n\t\t\tif (usersTable.getSelectionModel().getSelectedIndex() > -1) {\n\t\t\t\tchangePassword = true;\n\t\t\t\tchangeCancelButton.setText(\"Anuluj\");\n\t\t\t\tuserPasswordField.setText(\"\");\n\t\t\t\tuserConfirmPasswordField.setText(\"\");\n\t\t\t\tlackUserPasswordLabel.setVisible(false);\n\t\t\t\tlackUserConfirmPasswordLabel.setVisible(false);\t\t\t\t\n\t\t\t\tshowPassword();\n\t\t\t}\n\t\t}\n\t}",
"public void onClick(DialogInterface dialog, int id) {\n prefs.edit().putBoolean(\"Islogin\", false).commit();\n prefs.edit().putString(\"role\", \"\").commit();\n item.setTitle(\"Login\");\n }",
"@Override\r\n\tpublic String editUserAccountQuery(String username, String field, String value) {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String editUserAccountQuery(String username, String field, String value) {\n\t\treturn null;\r\n\t}",
"private void logInBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_logInBtnActionPerformed\n User theUser = null;\n String[] options = {\"OK\"};\n String userName = userNameTF.getText();\n String password = passwordTF.getText();\n\n theUser = HF.findUser(userName);\n\n if (userNameTF.getText().equals(\"\") || passwordTF.getText().equals(\"\")){\n JOptionPane.showOptionDialog(this, \"Please fill in your username \"\n + \"and password!\",\n \"\", JOptionPane.ERROR_MESSAGE, JOptionPane.INFORMATION_MESSAGE,\n null, options, options[0] );\n }\n else if (theUser == null) {\n JOptionPane.showOptionDialog(this, \"No such username!\",\n \"\", JOptionPane.ERROR_MESSAGE, JOptionPane.INFORMATION_MESSAGE,\n null, options, options[0] );\n }\n else if (!theUser.getPassword().equals(password)) {\n JOptionPane.showOptionDialog(this, \"Invalid password!\",\n \"\", JOptionPane.ERROR_MESSAGE, JOptionPane.INFORMATION_MESSAGE,\n null, options, options[0] );\n }\n else {\n if (theUser instanceof Trainer){\n TrainerMenu tm = new TrainerMenu(this, (Trainer)theUser);\n tm.setVisible(true);\n this.setVisible(false);\n }\n else if (theUser instanceof Member){\n MemberMenu mm = new MemberMenu(this, (Member)theUser);\n mm.setVisible(true);\n this.setVisible(false);\n }\n userNameTF.setText(\"\");\n passwordTF.setText(\"\");\n }\n }",
"@Override\n\tpublic String editUserAccountQuery(String username, String field, String value) {\n\t\treturn null;\n\t}",
"public static UserPasswordCredentials login(Shell parent, URIish uri) {\n LoginDialog dialog = new LoginDialog(parent, uri);\n if (dialog.open() == Window.OK) {\n UserPasswordCredentials credentials = dialog.getCredentials();\n if (credentials != null && dialog.getStoreInSecureStore())\n SecureStoreUtils.storeCredentials(credentials, uri);\n return credentials;\n }\n return null;\n }",
"private void serchUser() {\n if (!userNameTextField.getText().isEmpty() && !passwordPasswordField.getText().isEmpty()) {\n try {\n User user = UserController.searchUserByUserName(userNameTextField.getText());\n if (user != null) {\n if (passwordPasswordField.getText().equals(user.getPassword())) {\n closeFadeOut();\n Hi hi = new Hi();\n hi.setUser(user);\n hi.setVisible(true);\n dispose();\n } else {\n JOptionPane.showMessageDialog(this, \"Incorrect username or password !\");\n passwordPasswordField.setText(\"\");\n userNameTextField.requestFocus();\n userNameTextField.selectAll();\n }\n } else {\n JOptionPane.showMessageDialog(this, \"Incorrect username or password !\");\n passwordPasswordField.setText(\"\");\n userNameTextField.requestFocus();\n userNameTextField.selectAll();\n }\n\n } catch (ClassNotFoundException ex) {\n ex.printStackTrace();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n } else {\n JOptionPane.showMessageDialog(this, \"Please enter username and password\");\n passwordPasswordField.setText(\"\");\n userNameTextField.requestFocus();\n userNameTextField.selectAll();\n }\n\n }",
"@Override\n public void setExisting(String login, String pasword) {\n loginEdit.setText(login);\n passwordEdit.setText(pasword);\n }",
"@Override\r\n public void onClick(View view) {\n showDialog(PASSWORD_DIALOG_ID);\r\n }",
"public void modifyUser() {\n\t\tUser selectedUser = null;\r\n\t\tselectedUser = tableUser.getSelectionModel().getSelectedItem();\r\n\t\tUser user = dataManager.findCurrentUser();\r\n\t\tif (user != null) {\r\n\t\t\tif (selectedUser != null) {\r\n\t\t\t\tframeManager.modifyUser(user, selectedUser);\r\n\t\t\t\tpesquisar();\r\n\t\t\t} else {\r\n\t\t\t\tAlertUtils.alertErroSelecionar(\"Para modificar um usuario é necessário selecionar um!\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tAlertUtils.alertSemPrivelegio();\r\n\t\t}\r\n\t}",
"public void showUserSwitchDialog(Pair<UserInfo, UserInfo> fromToUserPair) {\n this.mInjector.showUserSwitchingDialog((UserInfo) fromToUserPair.first, (UserInfo) fromToUserPair.second, getSwitchingFromSystemUserMessage(), getSwitchingToSystemUserMessage());\n }",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int button) {\n\t\t\t\tString newIdentityValue = edtName.getText().toString()\n\t\t\t\t.trim();\n\t\t\t\tif (newIdentityValue.length() > 0) {\n\t\t\t\t\tchangeIdentityValue(id, newIdentityValue);\n\t\t\t\t\trefreshIdentityList();\n\t\t\t\t} else {\n\t\t\t\t\tToast.makeText(getBaseContext(),\n\t\t\t\t\t\t\t\"Fail change identity value\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t\t.show();\n\t\t\t\t}\n\t\t\t}",
"public void setEditUser(User editUser)\r\n/* */ {\r\n/* 179 */ this.editUser = editUser;\r\n/* */ }",
"@Override\n public void onClick(ClickEvent event) {\n String mobileNr = content.getLoginView().getMobilenrTxtBox().getText();\n String password = content.getLoginView().getPasswordTxtBox().getText();\n\n // RPC authenticating user method\n motionCBSTestService.authorizeUser(mobileNr, password, new AsyncCallback<User>() {\n\n @Override\n public void onFailure(Throwable caught) {\n Window.alert(\"Der skete en fejl\");\n }\n\n @Override\n public void onSuccess(User user) {\n\n // Failed to match input with User in database\n if (user == null) {\n Window.alert(\"Wrong password or mobile number!\");\n } else if (user.getIsApproved() != true) {\n Window.alert(\"User not approved!\");\n } else\n\n\n\n // Here we check the type and if they are type 1 we go to admin view and the other way around\n if (user.getType() == 1) {\n adminController.loadUser(user);\n content.changeView(content.getMainAdminView());\n } else if (user.getType() == 2) {\n userController.loadUser(user);\n content.changeView(content.getMainUserView());\n }\n\n // Clearing the text fields (mobileNr & password) from the login screen\n content.getLoginView().clearTextBoxFields();\n }\n });\n }",
"@FXML private void setToNewUser(){\n\t\tshowPassword();\n\t\tclearFields();\n\t\thideLackMessages();\n\t\tchangeCancelButton.setText(\"Anuluj\");\n\t\tnewUser = true;\n\t}",
"private void ensureChangePasswd(String userid, String rslMsg)\n/* */ {\n/* 252 */ WebContext webContext = LfwRuntimeEnvironment.getWebContext();\n/* 253 */ HttpSession session = null;\n/* 254 */ String challlid = UUID.randomUUID().toString();\n/* 255 */ if (webContext != null) {\n/* 256 */ HttpServletRequest httpServRequest = webContext.getRequest();\n/* 257 */ if (httpServRequest != null) {\n/* 258 */ session = httpServRequest.getSession();\n/* 259 */ if (session != null) {\n/* 260 */ session.setAttribute(\"USER_SESSION_ID\", userid);\n/* */ }\n/* */ }\n/* */ }\n/* 264 */ StringBuffer urlBuf = new StringBuffer();\n/* 265 */ urlBuf.append(\"/portal/app/mockapp/passwordmng?model=nc.uap.portal.mng.pwdmng.PasswordManagerModel\");\n/* 266 */ urlBuf.append(\"&otherPageUniqueId=\" + LfwRuntimeEnvironment.getWebContext().getWebSession().getWebSessionId());\n/* 267 */ AppLifeCycleContext.current().getApplicationContext().popOuterWindow(urlBuf.toString(), rslMsg, \"480\", \"280\", \"TYPE_DIALOG\");\n/* */ }",
"public void propagateCredentials( User user, String password );",
"public void actionPerformed(ActionEvent e)\n {\n JButton sourceButton = (JButton) e.getSource();\n if (sourceButton.equals(okButton))\n {\n password\n = new String(\n currentPasswdField.getPassword());\n }\n // hide dialog and unblock application\n dialog.dispose();\n }",
"@Override\r\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tString resetUrl = \"#activateacc;uid=\" + user.getRefId();\r\n\t\t\t\tWindow.open(resetUrl, \"Password Reset\", \"\");\r\n\t\t\t}",
"void changeUser(){\n\t\tfinal FrameLayout fl = new FrameLayout(this);\n\n\t\tfinal EditText newUID = new EditText(this);\n\t\tfinal LinearLayout nameHolder = new LinearLayout(this);\n\t\tnameHolder.setOrientation(1);//Vertical\n//\t\tinputName.setGravity(Gravity.CENTER);\n//\t\tinputTitle.setGravity(Gravity.CENTER);\n\t\t//MAX 2 digits! HARDCODED\n\t\t//Limit them to a certain amount of digits\n\t\tInputFilter[] FilterArray = new InputFilter[1];\n\t\tFilterArray[0] = new InputFilter.LengthFilter(2);\n\t\tnewUID.setFilters(FilterArray);\n\t\t\n\t\tnameHolder.addView(newUID, new FrameLayout.LayoutParams(\n\t\t\t\tFrameLayout.LayoutParams.FILL_PARENT,\n\t\t\t\tFrameLayout.LayoutParams.WRAP_CONTENT));\n\t\t\n\t\tfl.addView(nameHolder, new FrameLayout.LayoutParams(\n\t\t\t\tFrameLayout.LayoutParams. FILL_PARENT,\n\t\t\t\tFrameLayout.LayoutParams.FILL_PARENT));\n\n\t\t// input.setText(\"Preset Text\");\n\t\tnewUID.setHint(\"NUMBER: 00-99\");\n\t\tnewUID.setInputType(InputType.TYPE_CLASS_NUMBER);\n\n\t\tAlertDialog newprojPopUp = new AlertDialog.Builder(this).create();\n\n\t\t//Show the keyboard automatically\n\t\tnewprojPopUp.setOnShowListener(new OnShowListener() {\n\n\t\t @Override\n\t\t public void onShow(DialogInterface dialog) {\n\t\t InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\t imm.showSoftInput(newUID, InputMethodManager.SHOW_FORCED);\n\t\t }\n\t\t});\n\t\t\n\t\tnewprojPopUp.setView(fl);\n\n\t\tnewprojPopUp.setTitle(\"Enter your USER ID (00-99)\");\n\n\t\t// Create Button\n\t\tnewprojPopUp.setButton(\"Enter\",\n\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\tpublic void onClick(\n\t\t\t\t\t\t\tfinal DialogInterface dMAIN,\n\t\t\t\t\t\t\tint which) {\n\n\t\t\t\t\t\tuserID=Integer.parseInt(newUID.getText().toString().trim());\n\t\t\t\t\t\tuserButton.setText(\"USER: \"+userIDformatter.format(userID));\n\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\"New User ID = \"+userID,\n\t\t\t\t\t\t\t\t1).show();\n\t\t\t\t\t\tmakeUser();\n\t\t\t\t\t\tloadUpAllPics();\n\n\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t// Cancel Button\n\t\tnewprojPopUp.setButton2(\"Cancel\",\n\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface d,\n\t\t\t\t\t\t\tint which) {\n\n\t\t\t\t\t\t d.dismiss();\n\n\t\t\t\t\t}\n\n\t\t\t\t});\n\n\t\tnewprojPopUp.show();\n\t\tnewUID.requestFocus();\n\t\tnewprojPopUp\n\t\t\t\t.getWindow()\n\t\t\t\t.setSoftInputMode(\n\t\t\t\t\t\tWindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n\n\n\t\t\n\t}",
"public void credentials(Object cred) {\n this.cred = cred;\n }",
"private void openUri()\r\n {\r\n JOptionPane optionPane = new JOptionPane(new JLabel(\"URI:\"), \r\n JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION);\r\n optionPane.setWantsInput(true);\r\n JDialog dialog = optionPane.createDialog(frame, \"Enter URI\");\r\n dialog.setResizable(true);\r\n dialog.setVisible(true);\r\n Object value = optionPane.getValue();\r\n if (value == null)\r\n {\r\n return;\r\n }\r\n if (!value.equals(JOptionPane.OK_OPTION))\r\n {\r\n return;\r\n }\r\n String uriString = (String)optionPane.getInputValue();\r\n if (uriString == null || uriString.trim().isEmpty())\r\n {\r\n return;\r\n }\r\n URI uri = null;\r\n try\r\n {\r\n uri = new URI(uriString);\r\n } \r\n catch (URISyntaxException e)\r\n {\r\n JOptionPane.showMessageDialog(\r\n frame, \"Invalid URI: \"+e.getMessage(), \r\n \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return;\r\n }\r\n openUriInBackground(uri);\r\n }",
"public void changePassword(ActionEvent actionEvent) {\n darkPane.setVisible(true);\n darkPane.setDisable(false);\n changePasswordPane.setVisible(true);\n changePasswordPane.setDisable(false);\n }",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tuser = txt_usr.getText();\n\t\t\t\tpass = txt_pass.getText();\n\t\t\t\t//check password or id is correct or not\n\t\t\t\tif(user.equals(\"test\") && pass.equals(\"12345\")) {\n\t\t\t\t\t//if both are correct user will be loged in\n\t\t\t\t\tAccountHome reg = new AccountHome();\n\t\t\t\t\treg.setVisible(true);\n\t\t\t\t\tdispose();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//if user input incorrect details he will get alert message to input correct details\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"Wrong Password / Username\");\n\t\t\t\t\ttxt_usr.setText(\"\");\n\t\t\t\t\ttxt_pass.setText(\"\");\n\t\t\t\t\ttxt_usr.requestFocus();\n\t\t\t\t}\n\t\t\t}",
"public void editAccount(ActionEvent actionEvent) throws SQLException, IOException {\n if (editAccountButton.getText().equals(\"Edit\")) {\n userNameField.setEditable(true);\n emailField.setEditable(true);\n datePicker.setEditable(true);\n changePhotoButton.setVisible(true);\n changePhotoButton.setDisable(false);\n userNameField.getStylesheets().add(\"/stylesheets/Active.css\");\n emailField.getStylesheets().add(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.setText(\"Save\");\n }\n else if (validInput()) {\n userNameField.setEditable(false);\n emailField.setEditable(false);\n datePicker.setEditable(false);\n changePhotoButton.setVisible(false);\n changePhotoButton.setDisable(true);\n userNameField.getStylesheets().remove(\"/stylesheets/Active.css\");\n emailField.getStylesheets().remove(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().remove(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().remove(\"/stylesheets/Active.css\");\n user.getUser().setName(userNameField.getText());\n user.getUser().setEmail(emailField.getText());\n user.getUser().setBirthday(datePicker.getValue());\n\n editAccountButton.setText(\"Edit\");\n userNameLabel.setText(user.getUser().getFirstName());\n if (userPhotoFile != null) {\n user.getUser().setProfilePhoto(accountPhoto);\n profileIcon.setImage(new Image(userPhotoFile.toURI().toString()));\n }\n DatabaseManager.updateUser(user, userPhotoFile);\n }\n }",
"public void valueChanged(TreeSelectionEvent e) {\n\t\t\tnew UserViewPanel((User)twitterService.searchUser(e.getPath().getLastPathComponent().toString()),twitterService);\n\t\t}",
"public void editProfile() {\n\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(account.getUser().toString());\n\n\t\taccount = userBo.handleProfileOption(account);\n\n\t\tif (userDAO.editProfile(account))\n\t\t\tSystem.out.println(\"User edited!\");\n\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}",
"@Override\n public void edit(User user) {\n }",
"public void changeUsername(String username)\n {\n controllerComponents.getAccount().setUsername(username);\n currentUsernameLabel.setText(username);\n }",
"public Optional<Pair<String,String>> showLogin( final Pair<String,String> initialUserInfo, final Callback<Pair<String,String>, Void> authenticator ) {\n \t\n \tfinal CustomTextField txUserName = (CustomTextField) TextFields.createClearableTextField();\n \ttxUserName.setLeft(new ImageView( DialogResources.getImage(\"login.user.icon\")) ); //$NON-NLS-1$\n \t\n \tfinal CustomPasswordField txPassword = (CustomPasswordField) TextFields.createClearablePasswordField();\n \ttxPassword.setLeft(new ImageView( DialogResources.getImage(\"login.password.icon\"))); //$NON-NLS-1$\n\t\t\n\t\tfinal Label lbMessage= new Label(\"\"); //$NON-NLS-1$\n\t\tlbMessage.getStyleClass().addAll(\"message-banner\"); //$NON-NLS-1$\n\t\tlbMessage.setVisible(false);\n\t\tlbMessage.setManaged(false);\n\t\t\n\t\tfinal VBox content = new VBox(10);\n\t\tcontent.getChildren().add(new Label(\"User name\"));\n\t\tcontent.getChildren().add(txUserName);\n\t\tcontent.getChildren().add(txPassword);\n\t\t\n\t\tfinal Action actionLogin = new DialogAction(\"Connect\", null, false, false, true) { //$NON-NLS-1$\n\t\t\t{\n\t\t\t\tButtonBar.setType(this, ButtonType.OK_DONE);\n\t\t\t\tsetEventHandler(this::handleAction);\n\t\t\t}\n\t\t\t\n\t\t\tprotected void handleAction(ActionEvent ae) {\n\t\t\t\tDialog dlg = (Dialog) ae.getSource();\n\t\t\t\ttry {\n\t\t\t\t\tif ( authenticator != null ) {\n\t\t\t\t\t\tauthenticator.call(new Pair<>(txUserName.getText(), txPassword.getText()));\n\t\t\t\t\t}\n\t\t\t\t\tlbMessage.setVisible(false);\n\t\t\t\t\tlbMessage.setManaged(false);\n\t\t\t\t\tdlg.hide();\n\t\t\t\t\tdlg.setResult(this);\n\t\t\t\t} catch( Throwable ex ) {\n\t\t\t\t\tlbMessage.setVisible(true);\n\t\t\t\t\tlbMessage.setManaged(true);\n\t\t\t\t\tlbMessage.setText(ex.getMessage());\n\t\t\t\t\tdlg.sizeToScene();\n\t\t\t\t\tdlg.shake();\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override public String toString() {\n\t\t\t\treturn \"LOGIN\"; //$NON-NLS-1$\n\t\t\t};\n\t\t};\n\t\t\n\t\tfinal Dialog dlg = buildDialog(Type.LOGIN);\n dlg.setContent(content);\n \n dlg.setResizable(false);\n\t\tdlg.setIconifiable(false);\n\t\tif ( dlg.getGraphic() == null ) { \n\t\t\tdlg.setGraphic( new ImageView( DialogResources.getImage(\"login.icon\"))); //$NON-NLS-1$\n\t\t}\n\t\tdlg.getActions().setAll(actionLogin, ACTION_CANCEL);\n\t\tfinal String userNameCation = getString(\"login.dlg.user.caption\"); //$NON-NLS-1$\n\t\tfinal String passwordCaption = getString(\"login.dlg.pswd.caption\"); //$NON-NLS-1$\n\t\ttxUserName.setPromptText(userNameCation);\n\t\ttxUserName.setText( initialUserInfo.getKey());\n\t\ttxPassword.setPromptText(passwordCaption);\n\t\ttxPassword.setText(new String(initialUserInfo.getValue()));\n\n\t\tfinal ValidationSupport validationSupport = new ValidationSupport();\n\t\tPlatform.runLater(new Runnable()\n\t\t{\n\t\t@Override\n\t\tpublic void run()\n\t\t{\n\t\t\tString requiredFormat = \"'%s' is required\"; //$NON-NLS-1$\n\t\t\tvalidationSupport.registerValidator(txUserName, Validator.createEmptyValidator( String.format( requiredFormat, userNameCation )));\n\t\t\tactionLogin.disabledProperty().bind(validationSupport.invalidProperty());\n\t\t\ttxUserName.requestFocus();\t\t\t\n\t\t}});\n\n\t\tdlg.sizeToScene();\n \treturn Optional.ofNullable( \n \t\t\tdlg.show() == actionLogin? \n \t\t\t\t\tnew Pair<>(txUserName.getText(), txPassword.getText()): \n \t\t\t\t\tnull);\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n etUser.setText(\"\");\n etPassword.setText(\"\");\n\n\n }",
"void setUserUsername(String username);",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tuser.setText(\"\");\n\t\t\t\tpwd.setText(\"\");\n\t\t\t\t\n\t\t\t}",
"private static void setCredentials(String nick, String passwd, String channel, String currency) {\r\n IRC.nick = nick.toLowerCase();\r\n IRC.passwd = passwd;\r\n \r\n if (channel.startsWith(\"#\")) {\r\n IRC.channel = channel;\r\n IRC.admin = capName(channel.substring(1));\r\n }\r\n else {\r\n IRC.channel = \"#\" + channel;\r\n IRC.admin = capName(channel);\r\n }\r\n IRC.currency = currency;\r\n }",
"@Override\n\t\t\t\t\t\t\tpublic void mouseClicked(java.awt.event.MouseEvent e) {\n\t\t\t\t\t\t\t\tsuper.mouseClicked(e);\n\t\t\t\t\t\t\t\toldPwdText.setText(\"\");\n\t\t\t\t\t\t\t\tnewPwdText.setText(\"\");\n\t\t\t\t\t\t\t}",
"@Override\n public void updateCredential(String userID, Object newCredential) throws IdentityStoreException {\n try (UnitOfWork unitOfWork = UnitOfWork.beginTransaction(dataSource.getConnection())) {\n\n NamedPreparedStatement updateCredentialPreparedStatement = new NamedPreparedStatement(\n unitOfWork.getConnection(),\n sqlStatements.get(ConnectorConstants.QueryTypes.SQL_QUERY_UPDATE_CREDENTIAL));\n updateCredentialPreparedStatement.setString(\"user_id\", userID);\n updateCredentialPreparedStatement.setString(\"credential\", (String) newCredential);\n int rowCount = updateCredentialPreparedStatement.getPreparedStatement().executeUpdate();\n\n if (rowCount < 1) {\n throw new IdentityStoreException(\"No credentials updated.\");\n }\n } catch (SQLException e) {\n throw new IdentityStoreException(\"Error occurred while updating credentials.\", e);\n }\n }",
"@Test\n @Order(1)\n public void editCredential() throws InterruptedException {\n // this user should currently have 2 credentials from the addCredential test\n List<WebElement> credentials = home.getCredentialItems();\n String url = \"udacity.com\";\n String username = \"me\";\n String password = \"just something strange\";\n\n int credentialPosition = new Random().nextInt(credentials.size() - 1);\n WebElement editCredentialButton = credentials.get(credentialPosition).findElement(By.id(\"editCredentialBtn\"));\n final String initialCredentialId = editCredentialButton.getAttribute(\"data-id\");\n editCredentialButton.click();\n Thread.sleep(500);\n\n home.setCredential(url, username, password);\n\n moveToCredentialsTab();\n\n boolean wasChanged =false;\n\n for (WebElement item : home.getCredentialItems()) {\n editCredentialButton = item.findElement(By.id(\"editCredentialBtn\"));\n wasChanged = initialCredentialId.equals(editCredentialButton.getAttribute(\"data-id\"))\n && url.equals(editCredentialButton.getAttribute(\"data-url\"))\n && username.equals(editCredentialButton.getAttribute(\"data-username\"))\n && password.equals(editCredentialButton.getAttribute(\"data-password\"));\n\n if(wasChanged) break;\n }\n\n assertTrue(wasChanged);\n\n home.logout();\n }",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tif(arg0.getActionCommand().equals(\"Login\")){\r\n\t\t\tif(UserNamePane.isEnabled()){\r\n\t\t\tUserNamePane.setEnabled(false);\r\n\t\t\tUserNamePane.setVisible(false);\r\n\t\t\tlblTips.setText(\"TIPS:Login\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t if(tryLogin())\r\n\t\t\t dlg.dispose();\r\n\t\t\t else{\r\n\t\t\t\t lblTips.setText(\"Login Error\");\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(arg0.getActionCommand().equals(\"Cancel\")){\r\n\t\t\t//serverinfo.port=-1;\r\n\t\t\t//serverinfo.OK=true;\r\n\t\t\tdlg.dispose();\r\n\t\t}\r\n\t\telse if(arg0.getActionCommand().equals(\"Register\")){\r\n\t\t\tif(UserNamePane.isEnabled()==false){\r\n\t\t\tUserNamePane.setEnabled(true);\r\n\t\t\tUserNamePane.setVisible(true);\r\n\t\t\tlblTips.setText(\"TIPS:Register\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tif(tryRegister()==false){\r\n\t\t\t\t\tUserNameText.setText(\"\");\r\n\t\t\t\t\tUserCodeText.setText(\"\");\r\n\t\t\t\t\tUserIDText.setText(\"\");\r\n\t\t\t\t\tlblTips.setText(\"Register error\");\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tlblTips.setText(\"Register successful->please try login\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"public void editProfile() {\n dialog = new Dialog(getContext());\n dialog.setContentView(R.layout.edit_profile);\n\n editUsername = dialog.findViewById(R.id.tv_uname);\n TextView editEmail = dialog.findViewById(R.id.tv_address);\n editImage = dialog.findViewById(R.id.imgUser);\n\n editUsername.setText(user.getUserID());\n editEmail.setText(user.getEmail());\n editEmail.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast.makeText(getContext(), \"Email cannot be changed.\", Toast.LENGTH_SHORT).show();\n }\n });\n decodeImage(user.getProfilePic(), editImage);\n editImage.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivityForResult(new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI), 3);\n }\n });\n\n TextView save = dialog.findViewById(R.id.save_edit);\n save.setOnClickListener(new View.OnClickListener() { // save changes\n @Override\n public void onClick(View v) {\n String username = editUsername.getText().toString();\n if(username.equals(\"\")) {\n Toast.makeText(getContext(), \"Username cannot be null\", Toast.LENGTH_SHORT).show();\n return;\n } else if (!checkUsername(username)) {\n Toast.makeText(getContext(), \"Username already exists\", Toast.LENGTH_SHORT).show();\n return;\n }\n user.setUserID(username);\n if(profilePicChanged) {\n user.setProfilePic(profilePic);\n profilePic = null;\n profilePicChanged = false;\n }\n docRef.set(user);\n dialog.dismiss();\n loadDataFromDB();\n }\n });\n\n TextView cancel = dialog.findViewById(R.id.cancel_edit);\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss(); // cancel changes\n }\n });\n\n dialog.show();\n dialog.getWindow().setLayout(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n }",
"User browseUserByUsername(String username);",
"@Override\n\t\t\tpublic void onClick(View v) \n\t\t\t{\n\t\t\t\t\n\t\t\t\tchange_pass(Singleton.user_id, old_pass.getText().toString(), new_pass.getText().toString(), \n\t\t\t\t\t\tnew_pass.getText().toString());\n\t\t\t\t\n\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tUser u = user;\r\n\t\t\t\t\t\tuser.setUser_password(NewPassword.getText());\r\n\t\t\t\t\t\tif (NewPassword.getText().equals(surePassword.getText())) {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tDAOFactory.getIUserDAOInstance().update(u);\r\n\t\t\t\t\t\t\t} catch (Exception e1) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(UserFrame.this, \"更改成功\", \"提示\", \r\n\t\t\t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(UserFrame.this, \"两次输入不同\", \"提示\", \r\n\t\t\t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}",
"@FXML\n\tpublic void updateMyUser(ActionEvent event) {\n\t\tSystemUser userToUpdate = restaurant.returnUser(LabelSystemUserName.getText());\n\t\tString name = txtSystemUserNewname.getText();\n\t\tString lastName = txtSystemUserNewLastname.getText();\n\t\tString id = txtSystemUserNewId.getText();\n\t\tString username = txtSystemUserNewUsername.getText();\n\n\t\tif (!name.equals(\"\") && !lastName.equals(\"\") && !id.equals(\"\") && !username.equals(\"\")) {\n\n\t\t\ttry {\n\t\t\t\tuserToUpdate.setNames(name);\n\t\t\t\tuserToUpdate.setSurNames(lastName);\n\t\t\t\tuserToUpdate.setIdNumber(id);\n\t\t\t\tuserToUpdate.setUsername(username);\n\t\t\t\tuserToUpdate.setPassword(passwordSystemUserNewPassword.getText());\n\t\t\t\trestaurant.saveUsersData();\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"Usuario actualizado satisfactoriamente\");\n\t\t\t\tdialog.setTitle(\"Proceso Satisfactorio\");\n\t\t\t\tdialog.show();\n\n\t\t\t\ttxtSystemUserNewname.setText(\"\");\n\t\t\t\ttxtSystemUserNewLastname.setText(\"\");\n\t\t\t\ttxtSystemUserNewId.setText(\"\");\n\t\t\t\ttxtSystemUserNewUsername.setText(\"\");\n\t\t\t\tpasswordSystemUserNewPassword.setText(\"\");\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"No se pudo guardar la actualización del usuario\");\n\t\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tFXMLLoader opWindow = new FXMLLoader(getClass().getResource(\"Options-window.fxml\"));\n\t\t\t\topWindow.setController(this);\n\t\t\t\tParent opPane = opWindow.load();\n\t\t\t\tmainPaneLogin.getChildren().setAll(opPane);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.show();\n\t\t}\n\t}",
"@Override\r\n\t\tpublic void onClick(View arg0) {\n\t\t\tString ac=account.getText().toString();\r\n\t\t\tString ppString=pwd.getText().toString();\r\n\t\t\tif (ac.equals(\"admin\") && ppString.equals(\"123456\")) {\r\n\t\t\t\teditor=preferences.edit();\r\n\t\t\t\tif (reBox.isChecked()) {\r\n\t\t\t\t\teditor.putBoolean(\"remeber\", true);\r\n\t\t\t\t\teditor.putString(\"account\", ac);\r\n\t\t\t\t\teditor.putString(\"pwd\", ppString);\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\teditor.clear();\r\n\t\t\t\t}\r\n\t\t\t\teditor.commit();\r\n\t\t\t\tIntent intent=new Intent(LoginActivity.this,MainActivity.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\tfinish();\r\n\t\t\t}else {\r\n\t\t\t\tToast.makeText(LoginActivity.this, \"²»ÕýÈ·\", 1).show();\r\n\t\t\t}\r\n\t\t}",
"@Override\r\n\tprotected void performAction(User user) {\r\n\t\tif(user != null)\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\tDatabaseOperation databaseOperation = new DatabaseOperation();\r\n\t\t\t\tint selection = JOptionPane.showConfirmDialog(this, \"Do you want to edit this user?\", \"Confirm action\", JOptionPane.YES_NO_CANCEL_OPTION);\r\n\t\t\t\tif(selection == JOptionPane.YES_OPTION)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(databaseOperation.updateInformation(user, this.user.getUsername()))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(this, \"User edited successfuly\", \"Error\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\t\tedited = true;\r\n\t\t\t\t\t\tclose();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(this, \"There was a problem editing this user. Try again.\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(selection == JOptionPane.NO_OPTION) {\r\n\t\t\t\t\tclose();\r\n\t\t\t\t}\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(this, \"It was not possible to stablish a connection with the database\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\tclose();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@FXML\n\tpublic void enableMyUser(ActionEvent event) {\n\t\tif (!txtDisableMyUser.getText().isEmpty()) {\n\t\t\tSystemUser user = restaurant.returnUser(txtDisableMyUser.getText());\n\n\t\t\tif (user != null) {\n\t\t\t\ttry {\n\t\t\t\t\tuser.setCondition(Condition.ACTIVE);\n\t\t\t\t\trestaurant.saveUsersData();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"Tu usuario ha sido habilitado\");\n\t\t\t\t\tdialog.setTitle(\"Usuario Deshabilitado\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t\ttxtDisableMyUser.setText(\"\");\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"No se ha podido guardar el nuevo estado del usuario\");\n\t\t\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"Este usuario no existe\");\n\t\t\t\tdialog.setTitle(\"Error, usuario inexistente\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben de ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.show();\n\t\t}\n\t}",
"private void updatePwd_click(ActionEvent e) {\n\t\tstatus.setText(\"修改密码\");\r\n\t\tStudentPwdFrm studentPwdFrm = new StudentPwdFrm();\r\n\t\tstudentPwdFrm.loginName = loginName;\r\n\t\tstudentPwdFrm.setVisible(true);\r\n\r\n\t}",
"public void dialogoEditarUsuario() {\n vEditarUsuario = new V_EditarUsuario(new JFrame(), true);\n vEditarUsuario.setVisible(true);\n }",
"@Override\n public void onChanged(LoginFields loginModel)\n {\n settingsViewModel.setCredentials(loginModel.getEmail(), loginModel.getPassword());\n }",
"@Override\n public void onClick(View v) {\n String num1 = Integer.toString(pin1.getValue());\n String num2 = Integer.toString(pin2.getValue());\n String num3 = Integer.toString(pin3.getValue());\n String num4 = Integer.toString(pin4.getValue());\n StringBuilder passBuilder = new StringBuilder();\n passBuilder.append(num1);\n passBuilder.append(num2);\n passBuilder.append(num3);\n passBuilder.append(num4);\n String password = passBuilder.toString();\n\n if(password.equals(selected_user.getPassword())) {\n changeUser(position);\n dialog.dismiss();\n } else {\n Toast.makeText(activity, \"Wrong password, you've entered : \" + password, Toast.LENGTH_SHORT).show();\n }\n }",
"public String modifyPassword(ActionEvent evt) {\r\n\r\n\t\tString v$navigation = null;\r\n\r\n\t\tString v$oldPwd = getDefaultVue().getOldPassword();\r\n\t\tString v$newPwd = getDefaultVue().getNewPassword();\r\n\t\tString v$confirmPwd = getDefaultVue().getConfirmNewPassword();\r\n\t\t\r\n\t\tif(v$newPwd == null || v$newPwd.isEmpty()){\r\n\t\t\tFacesUtil.addInfoMessage(\"\", \"Nouveau mot de passe vide\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tif(v$newPwd.length()>30){\r\n\t\t\tFacesUtil.addInfoMessage(\"\", \"Taille du nouveau mot de passe trés longue, moins de 30 caractéres\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tif(v$oldPwd.equals(v$newPwd)){\r\n\t\t\tFacesUtil.addInfoMessage(\"\", \"Ancien mot de passe identique au nouveau\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\tif (v$newPwd.equals(v$confirmPwd)) {\r\n\t\t\ttry {\r\n\r\n\t\t\t\tAdminSvcoDeleguate.getSvcoUsr().modifierPwd(getDefaultVue().getLogin(), v$oldPwd, v$newPwd, SysGehoToolBox.getInfoUser());\r\n\r\n\t\t\t\t getDefaultVue().setModified(true);\r\n\t\t\t\t FacesUtil.addInfoMessage(\"\", \"Modification de mot de passe réussie\");\r\n\t\t\t}\r\n\r\n\t\t\tcatch (SysGehoAppException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (ServiceLocatorException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tFacesUtil.addWarnMessage(\"\", \"Confirmation différente du nouveau mot de passe\");\r\n\t\t}\r\n\r\n\t\treturn v$navigation;\r\n\t}",
"@Override\n public void updateCredential(String userID, Object oldCredential, Object newCredential)\n throws IdentityStoreException {\n try (UnitOfWork unitOfWork = UnitOfWork.beginTransaction(dataSource.getConnection())) {\n\n NamedPreparedStatement updateCredentialPreparedStatement = new NamedPreparedStatement(\n unitOfWork.getConnection(),\n sqlStatements.get(ConnectorConstants.QueryTypes.SQL_QUERY_UPDATE_OLD_CREDENTIAL));\n updateCredentialPreparedStatement.setString(\"user_id\", userID);\n updateCredentialPreparedStatement.setString(\"old_credential\", (String) oldCredential);\n updateCredentialPreparedStatement.setString(\"credential\", (String) newCredential);\n int rowCount = updateCredentialPreparedStatement.getPreparedStatement().executeUpdate();\n\n if (rowCount < 1) {\n throw new IdentityStoreException(\"No credentials updated.\");\n }\n } catch (SQLException e) {\n throw new IdentityStoreException(\"Error occurred while updating credentials.\", e);\n }\n }",
"@Override\n public void onClick(View v) {\n String newPass=et_newPassword.getText().toString().trim();\n String oldPass=et_oldPassword.getText().toString().trim();\n String prefpass=SharedPrefManager.getInstance(getApplicationContext()).getPass();\n if(newPass.equals(\"\")||oldPass.equals(\"\"))\n {\n Toast.makeText(MainActivity.this, \"Enter All Fields\", Toast.LENGTH_SHORT).show();\n }\n else if(!prefpass.equals(oldPass))\n {\n Toast.makeText(MainActivity.this, \"Incorrect Old Password\", Toast.LENGTH_SHORT).show();\n }\n else\n {\n repo.updatePass(oldPass,newPass,\"User\");\n Toast.makeText(MainActivity.this, \"Password Successfully Changed\", Toast.LENGTH_SHORT).show();\n logout();\n dialog.dismiss();\n }\n }",
"@FXML\n\tpublic void disableMyUser(ActionEvent event) {\n\t\tif (!txtDisableMyUser.getText().isEmpty()) {\n\t\t\tSystemUser user = restaurant.returnUser(txtDisableMyUser.getText());\n\n\t\t\tif (user != null) {\n\t\t\t\ttry {\n\t\t\t\t\tuser.setCondition(Condition.INACTIVE);\n\t\t\t\t\trestaurant.saveUsersData();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"Tu usuario ha sido deshabilitado\");\n\t\t\t\t\tdialog.setTitle(\"Usuario Deshabilitado\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t\ttxtDisableMyUser.setText(\"\");\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"No se ha podido guardar el nuevo estado del usuario\");\n\t\t\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"Este usuario no existe\");\n\t\t\t\tdialog.setTitle(\"Error, usuario inexistente\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben de ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.show();\n\t\t}\n\t}",
"public User editUser(User user) {\n\t\treturn null;\r\n\t}",
"public static void ShowAdminPreferences() {\n if (Controller.permission.GetUserPermission(\"EditUser\")) {\n ToggleVisibility(UsersPage.adminWindow);\n } else {\n DialogWindow.NoAccessTo(\"Admin options\");\n }\n }",
"public EditUserInfoGUI(ClientManager man) {\n\t\tmanager = man;\n\t\tinitComponents();\n\t}",
"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 }",
"public void setlogUserIn() {\n\t\tmenu1.setOnAction(event -> {\n\t\t\topenUserSettings();\n\t\t});\n\t\tmenu2.setOnAction(event -> {\n\t\t\tsetlogUserOut();\n\t\t});\n\t\tuserMenuButton.setText(controller.loggedIn());\n\t\tuserMenuButton.setStyle(\"-fx-font-size: 10pt; -fx-text-fill:black;\"); // MUOTOILU CSSSSSÄÄÄÄN\n\t\tuserMenuButton.getItems().addAll(menu1, menu2);\n\t\tloggedinuser.setVisible(true);\n\t\tloggedinuser.setText(bundle.getString(\"mVloggedin\"));\n\t\tloggedinuser.setGraphic(userMenuButton);\n\t\tloggedinuser.setContentDisplay(ContentDisplay.RIGHT);\n\t\tuserSettings.setVisible(true);\n\t\tloginoption.setVisible(false);\n\t}",
"@Override\n public void onUpdate(User user) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n final AlertDialog dialog = builder.create();\n LayoutInflater layoutInflater = LayoutInflater.from(getContext());\n final CustomDialogUpdateBinding binding = DataBindingUtil.inflate(layoutInflater,\n R.layout.custom_dialog_update, null, false);\n dialog.setView(binding.getRoot());\n binding.edtUsername.setText(user.getUsername());\n binding.edtPassword.setText(user.getPassword());\n binding.edtPhone.setText(user.getPhone());\n dialog.show();\n\n // get profile and update\n binding.imgUpdate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n String UserName = binding.edtUsername.getText().toString().trim();\n String PassWord = binding.edtPassword.getText().toString().trim();\n String Phone = binding.edtPhone.getText().toString().trim();\n user.setUsername(UserName);\n user.setPassword(PassWord);\n user.setPhone(Phone);\n viewModel.update(user);\n dialog.dismiss();\n }\n });\n }",
"public static void editProfile(String form, String ly) {\n\t\tboolean layout;\n\t\tif(ly == null || ly.equalsIgnoreCase(\"yes\"))\n\t\t\tlayout = true;\n\t\telse\n\t\t\tlayout = false;\n\t\t\n\t\tUser user = UserService.getUserByUsername(session.get(\"username\"));\n\t\tUserProfile userprofile = null;\n\n\t\t// check if user object is null\n\t\tif (user != null)\n\t\t\tuserprofile = UserProfileService.getUserProfileByUserId(user.id);\n\n\t\t//set password into session\n\t\tsession.put(\"edit_password\", user.password);\n\t\t\n\t\tif(form == null)\n\t\t\tform = \"account\";\n\t\t\n\t\trender(user, userprofile, layout, form);\n\t}",
"@Override\n\tpublic void onClick(View v) {\n\t\tif(v.getId()==R.id.btn_login_changeinfo){\n\t\t\tcontroller.validateCredentials(et_phoneNum.getText().toString(),null,et_passwd.getText().toString(),\n\t\t\t\t\tapp.getServerIp(),\"changeinfologin\");\n\t\t}else{\n\t\t\tfinish();\n\t\t}\n\t}",
"private void changeUser(int position) {\n nameView.setText(selected_user.getFname());\n ptsView.setText(Integer.toString(selected_user.getAccumulatedPts()));\n\n //TODO fix this in master\n String resourceName = selected_user.getProfilePicResourceName();\n Resources resources = context.getResources();\n int resourceId = resources.getIdentifier(resourceName, \"drawable\", \"familytaskmanager.microso.com.familytaskmanager\");\n pic.setImageResource(resourceId);\n\n //Set the selected user as the current user in the database and family\n ((MainActivity) activity).requestSetCurrentUser(position);\n }",
"private void setCredentialView() {\n //get user information\n String name = currentUser.getDisplayName();\n String email = currentUser.getEmail();\n Uri photoUrl = currentUser.getPhotoUrl();\n\n //set text in header in navigation view\n userNameHandler.setText(name);\n emailHandler.setText(email);\n\n //Picasso turns photoUrl to bitmap\n //then changes the pic in header in navigation view\n Picasso.get().load(photoUrl).into(imgHandler);\n }",
"public void Name_Setter() {\n Dialog<Pair<String, String>> dialog = new Dialog<>();\n dialog.setTitle(\"Developer Login\");\n FontAwesomeIconView icon = new FontAwesomeIconView(FontAwesomeIcon.EXPEDITEDSSL);\n icon.setGlyphSize(40);\n icon.setGlyphStyle(\"-fx-fill:green;\");\n\n dialog.setGraphic(icon);\n dialog.setHeaderText(\"Only Developers Authorised..\");\n\n //set Button types\n ButtonType lbutton = new ButtonType(\"Open\", ButtonData.NO);\n dialog.getDialogPane().getButtonTypes().addAll(lbutton, ButtonType.CANCEL);\n\n //create the username and password labels and fields\n GridPane grid = new GridPane();\n grid.setHgap(10);\n grid.setVgap(10);\n grid.setPadding(new Insets(0, 20, 10, 10));\n\n JFXTextField fld = new JFXTextField();\n fld.setPromptText(\"Developer email\");\n fld.setMinWidth(200);\n\n JFXPasswordField pfld = new JFXPasswordField();\n pfld.setPromptText(\"Developer Password\");\n\n Label infor = new Label(\"Enter Email and Password\");\n\n grid.add(fld, 2, 2);\n grid.add(pfld, 2, 5);\n grid.add(infor, 4, 8);\n\n dialog.getDialogPane().setContent(grid);\n\n Optional<Pair<String, String>> result = dialog.showAndWait();\n\n String pass = pfld.getText();\n String uname = fld.getText();\n\n if (pass.equals(\"erickerickyaah\") && uname.equals(\"[email protected]\")) {\n\n reportgenthree.ReportGenThree.NameSetter();\n\n } else {\n\n infor.setText(\"Wrong Password..\");\n }\n\n }",
"public void editUser(User selectedUser,String fullName, String loginName, String password) throws IOException {\n userManager.editUser(selectedUser,fullName,loginName,password);\n userManager.emptyLists();\n userManager.fillLists();\n AdminMainViewController.emptyStaticLists();\n AdminMainViewController.adminsObservableList.addAll(userManager.getAdminsList());\n AdminMainViewController.usersObservableList.addAll(userManager.getUsersList());\n }",
"public void editUser()\r\n\t{\r\n\t\tsc.nextLine();\r\n\t\tint index=loginattempt();\r\n\t\tif(index==-1)\r\n\t\t{\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tString password=\"\",repassword=\"\";\r\n\t\t\tboolean flag=false;\r\n\t\t\twhile(!flag)\r\n\t\t\t{\r\n\t\t\t\tboolean validpassword=false;\r\n\t\t\t\twhile(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"Please enter your new password: \");\r\n\t\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\t\tif(!validpassword)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.print(\"Please re-enter your new password: \");\r\n\t\t\t\trepassword=sc.nextLine();\r\n\t\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\t\tif(!flag)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tString hash_password=hashfunction(password); \r\n\t\t\tSystem.out.print(\"Please enter your new full name: \");\r\n\t\t\tString fullname=sc.nextLine();\r\n\t\t\tSystem.out.print(\"Please enter your new email address: \");\r\n\t\t\tString email=sc.nextLine();\r\n\t\t\t((User)user_records.get(index)).set_hash_password(hash_password);\r\n\t\t\t((User)user_records.get(index)).set_fullname(fullname);\r\n\t\t\t((User)user_records.get(index)).set_email(email);\r\n\t\t\tSystem.out.println(\"Record update successfully!\");\r\n\t\t}\r\n\t}",
"@Override\r\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tswitch (requestCode) {\r\n\t\tcase R.id.settingsButton:\r\n\t\t\tif (resultCode == RESULT_OK) {\r\n\t\t\t\tBundle extras = data.getExtras();\r\n\t\t\t\thttpuser = extras.getString(\"httpuser\");\r\n\t\t\t\thttppassword = extras.getString(\"httppassword\");\r\n\t\t\t}\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tif (!edited) {\n\t\t\t\t\t\topenEdit();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcloseEdit();\n\t\t\t\t\t\tif (newly) {\n\t\t\t\t\t\t\tnewly = false;\n\t\t\t\t\t\t\tvo = getUserVO();\n\t\t\t\t\t\t\tUserController.add(vo);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tUserController.modify(vo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}",
"@Override\r\n public void onClick(View v) {\n String un = user_name.getText().toString();\r\n String pwd = pass_wrd.getText().toString();\r\n\r\n System.out.println(un + \" \" + pwd);\r\n if(db.validCredentials(un, pwd)){\r\n Intent secondActivity = new Intent(getApplicationContext(), UserAreaActivity.class);\r\n startActivity(secondActivity);\r\n } else{\r\n invalid.setVisibility(View.VISIBLE);\r\n }\r\n }",
"protected void editPassword(ActionEvent ae) {\n\t\tEditPasswordFrm editPasswordFrm = new EditPasswordFrm();\n\t\teditPasswordFrm.setVisible(true);\n\t\tdesktopPane.add(editPasswordFrm);\n\t}",
"protected void editPassword(ActionEvent ae) {\n\t\tEditPasswordFrm editPasswordFrm = new EditPasswordFrm();\n\t\teditPasswordFrm.setVisible(true);\n\t\tdesktopPane.add(editPasswordFrm);\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource()==this.btnNewButton)\n\t\t{\n\t\t\tString user = this.textField.getText();\n\t\t\tString oldPwd = new String(this.passwordField.getPassword());\n\t\t\tString newPwd = new String(this.passwordField_1.getPassword());\n\t\t\tString newPwd2 = new String(this.passwordField_2.getPassword());\n\t\t\ttry {\n\t\t\t\tBeanyonghuxinxi.currentLoginUser=yonghuUttil.yonghuManager.changePwd(user, oldPwd, newPwd, newPwd2);\n\t\t\t}catch (BaseException e1) {\n\t\t\t\tJOptionPane.showMessageDialog(null, e1.getMessage(), \"´يخَ\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\treturn;\n\t\t\t\t}\n\t\t\tthis.setVisible(false);\n\t\t}\n\t\telse if(e.getSource() == this.button)\n\t\t{\n\t\t\tFrmyonghujiemian wewe = new Frmyonghujiemian();\n\t\t\twewe.setVisible(true);\n\t\t\tthis.setVisible(false);\n\t\t}\n\t}",
"public IRCSocketManager setUser(String newUser)\n\t{\n\t\tif (newUser == null)\n\t\t{\n\t\t\tthrow new IllegalArgumentException(\"Name cannot be null.\");\n\t\t}\n\t\t\n\t\tthis._user = newUser;\n\t\treturn this;\n\t}",
"private void editAccountType() throws Exception, EditUserException {\n String userChange = userIDInput.getText();\n String accountTypeInput = accountTypeValueEdit;\n try {\n Admin.editAccountType(userChange, accountTypeInput);\n String msg = \"Change user \" + userChange + \" to \" + accountTypeInput + \" success!\";\n JOptionPane.showMessageDialog(null, msg);\n\n // Reset values\n userIDInput.setText(\"\");\n } catch (NullPointerException e) {\n String msg = \"Edit User Error: Empty values. Please try again.\";\n JOptionPane.showMessageDialog(null, msg);\n throw new NullPointerException(msg);\n } catch (SQLException e) {\n String msg = \"Edit User SQL Error: Could not add to database.\";\n JOptionPane.showMessageDialog(null, msg);\n throw new Exception(msg);\n } catch (EditUserException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }",
"@Override\r\n\tpublic void modifyPassword(String username, String password, String confirmPassword, String oldPassword) {\n\t}",
"@Override\n\tpublic void updateUser(UserInfo ui) {\n\n\t}",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n setUserInfo(user);\n }"
] | [
"0.6144896",
"0.5892288",
"0.5859414",
"0.55764157",
"0.5511585",
"0.5464661",
"0.5458301",
"0.5416133",
"0.5406961",
"0.539406",
"0.5378256",
"0.53369105",
"0.53346187",
"0.532736",
"0.52908516",
"0.5282328",
"0.5280629",
"0.52704936",
"0.52571875",
"0.5255841",
"0.5240812",
"0.51976323",
"0.5169256",
"0.51419014",
"0.51419014",
"0.51294696",
"0.5120722",
"0.51152307",
"0.51137686",
"0.5110303",
"0.50862265",
"0.50831217",
"0.50628936",
"0.50563455",
"0.50556695",
"0.50547445",
"0.5053782",
"0.5044289",
"0.5043615",
"0.50273204",
"0.50249946",
"0.5018259",
"0.5016441",
"0.5014432",
"0.50123984",
"0.5001955",
"0.49995017",
"0.49940684",
"0.49821514",
"0.4975496",
"0.49703538",
"0.49696594",
"0.4968138",
"0.49662143",
"0.49620724",
"0.49556866",
"0.49511683",
"0.49464327",
"0.49436513",
"0.4939695",
"0.49309927",
"0.49247345",
"0.49214527",
"0.49167618",
"0.49085304",
"0.49027443",
"0.48976517",
"0.48959255",
"0.48898536",
"0.48880067",
"0.488748",
"0.4887351",
"0.48869503",
"0.48851445",
"0.48823678",
"0.4882002",
"0.4878356",
"0.4876468",
"0.48722386",
"0.48692104",
"0.48681703",
"0.48528093",
"0.4849441",
"0.48477393",
"0.48473692",
"0.48466122",
"0.48439494",
"0.4839354",
"0.48382783",
"0.48303318",
"0.48273677",
"0.48260027",
"0.4816997",
"0.4816997",
"0.4816547",
"0.48164693",
"0.48164117",
"0.4816375",
"0.48155808",
"0.48154342"
] | 0.6768007 | 0 |
This is the interface through which the Manager will start and stop the NotificationCatcher. When the Manager is instantiated, it can in turn instantiate a named implementation of the NotificationCatcher. Since the NotificationCatcher holds on to system resources (i.e., network ports) for long periods of time, the NotificationCatcher should offer a shutdown() method that can be invoked by the Manager. Similarly, if the NotificationCatcher needs to perform initialization that must be done outside the constructor, the NotificationCatcher should offer a startup() method that can be invoked by the Manager. The device sends events (Notifications) to the NotificationCatcher. The NotificationCatcher collects them from the network, validates the device's certificate on the HTTPS transport used to deliver the notification, creates Notification objects from the raw message as obtained from the HTTPS transport, and places the Notification in the Manager's queue. The NotificationCatcher should maintain proper order of the Notifications. The NotificationCatcher sends acknowledgements to the device when it successfully receives a notification. The device uses this acknowledgement to guarantee delivery of all notifications to the NotificationCatcher. HTTPS will be used as the transport to deliver the notifications. The notifications will be in CBE format, and wrapped in a SOAP message for delivery over the transport. We need a way to guarantee event message integrity, meaning that the event came from a real device that we are managing, and is not an injection by a malicious 3rd party. If we did not have event integrity then the Manager could be vulnerable to a DoS attack, causing it to refetch a lot of data from the device that is not necessary. The integrity will be performed by using SSL for the transport. The device should present to the NotificationCatcher a certificate that is signed by a certificate authority that the NotificationCatcher trusts. The NotificationCatcher should have a default list of trusted CAs that work with the default certificates in DataPower devices. There should be a way for the customer to configure the NotificationCatcher to recognize a custom list of trusted CAs, which would match the CAs used to sign the device certificates. If the transport fails the integrity test, then the NotificationCatcher should discard the notification and optionally create a log entry. This should be an interface instead of a class because more than one implementation is expected. | public interface NotificationCatcher {
public static final String COPYRIGHT_2009_2010 = Constants.COPYRIGHT_2009_2010;
static final String SCM_REVISION = "$Revision: 1.2 $"; //$NON-NLS-1$
/**
* When the Manager is started, the Manager will invoke this method. The
* Manager needs a way to start the NotificationCatcher when the Manager
* starts. After that point, the NotificationCatcher can place Notifications
* on the Manager's queue. This method will allow the NotificationCatcher to
* do any initialization to receive events from devices (such as listening
* on a network socket) after it has been instantiated by the
* NotificationCatcherFactory.
*
* @see NotificationCatcherFactory
* @see Manager
*/
public void startup() throws AMPException;
/**
* When the Manager is shutdown, the Manager will invoke this method. For
* any resources that were obtained via the NotificationCatcher's
* constructor or {@link #startup()}, this method will allow those
* resources (such as network sockets) to be released when the Manager is
* shutdown.
*
* @see Manager
*/
public void shutdown();
/**
* Get the URL that this NotificationCatcher listens on so Devices know
* where to post Notifications. This URL is used when a subscription request (
* {@link Commands#subscribeToDevice(DeviceContext, String, StringCollection, URL)})
* is sent to a device so that the device knows where to send the
* notifications (events).
*
* @return the URL that this NotificationCatcher listens on so Devices know
* where to post Notifications. This value will be used when sending
* subscription requests to Devices. This may be an https or http
* url. Typically, the path part of the URL will not be relevant,
* the relevant parts are the protocol, hostname, and port.
*/
public URL getURL();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public NotificationService() {\n super(\"NotificationService\");\n }",
"public interface Notifier {\r\n\r\n public abstract void initialize();\r\n public abstract void sendNotification(Event event) throws NotifierException;\r\n public abstract SparrowNotifierConfig getConfig();\r\n public abstract void close();\r\n\r\n}",
"public NotificationService(String name) {\n super(name);\n }",
"public interface NotificationManager {\n\n\tvoid sendTicketCreateNotification(Ticket ticket);\n\n\tvoid sendTicketChangeNotification(TicketChange ticketChange);\n\n\tvoid sendCommentNotification(Comment comment);\n\n\tvoid sendAttachmentNotification(Attachment attachment);\n\n}",
"public NotificationReceiverService() {\n }",
"private static NotificationManagerProxy getNotificationManager() {\n return new NotificationManagerProxyImpl(ContextUtils.getApplicationContext());\n }",
"protected void initNotificationServiceStub() {\n notificationServiceStub =\n NotificationServiceGrpc.newBlockingStub(\n ManagedChannelBuilder.forTarget(\n StringUtils.isEmpty(currentUri) ? SERVER_URI : currentUri)\n .usePlaintext()\n .build());\n if (enableHa) {\n notificationServiceStub =\n wrapBlockingStub(\n notificationServiceStub,\n StringUtils.isEmpty(currentUri) ? SERVER_URI : currentUri,\n livingMembers,\n enableHa,\n retryIntervalMs,\n retryTimeoutMs);\n }\n }",
"private NotificationClient() { }",
"public interface INotificationFactory {\n\n /**\n * Implements a query to get user's device list, that is, mobile device unique ID value.\n *\n * @param idUser the ID of user\n * @param type the ID of notification type\n * @return the set of String,devices list\n */\n @Deprecated\n Set<NotificationMessageContainer> getUserDevice(long idUser, int type, EnumOperationSystem os);\n\n /**\n * Implements a query to get a user's follower mobile device ID to \"push notification\"\n *\n * @param idUser the ID of user\n * @param idChannel the ID of channel, if channel is private we get only the channel memberships device list\n * @param isPrivately define should device list generated for private push notification\n * @param type the type of notification activity\n * @return the set of String of devices\n */\n Set<NotificationMessageContainer> getUserMultiDevice(long idUser, long idChannel, boolean isPrivately, int type, EnumOperationSystem os);\n\n /**\n * Implements a query to get a user's follower mobile device ID to \"push LIVE notification\"\n *\n * @param idUserFrom the ID of user\n * @param idChannel the ID of channel, if channel is private we get only the channel memberships device list\n * @param key key for redis store\n * @param isPrivately define should device list generated for private push notification\n */\n Long setLiveNotificationUsers(long idUserFrom, long idChannel, long key, boolean isPrivately);\n}",
"public Notification()\n\t{\n\t\t// Start of user code constructor for Notification)\n\t\tsuper();\n\t\t// End of user code\n\t}",
"public interface IMessageService {\n\n /**\n * Notifies subscribed clients with the given message.\n *\n * @param m Message (e.g. object, status, warning)\n */\n void notify(Message m);\n\n /**\n * Notifies subscribed clients with the given message.\n *\n * @param m Message (e.g. object, status, warning)\n */\n void notify(PushMessage m);\n\n /**\n * Notifies subscribed clients with the given message and push-type (e.g. ALERT)\n * \n * @param data message which should be send to the client\n * @param type type of the notification (manual step, ...)\n */\n void notify(String data, PushType type);\n\n /**\n * Subscribes a client for push-notifications.\n *\n * @param id id of the client (address)\n */\n void subscribe(String id);\n\n /**\n * unsubscribes a client for push-notifications.\n *\n * @param id id of the client (address)\n */\n void unsubscribe(String id);\n\n /**\n * Informs all subscribed devices that something went wrong and the brewing process wasnt\n * successfull and could cause damage\n * \n * @param text message which should be shown to the user\n */\n void alarm(String text);\n}",
"public interface INotificationService {\n\n public boolean notifyForLeaseRequest(String userId, double duration, String reason, String nameOfTool);\n\n public boolean notifyForLeaseRequest(Lease lease);\n\n}",
"public INotification createNotification()\n throws OculusException;",
"private Notifier(){}",
"public interface NotificationProxy extends Remote {\n \n /**\n * Registers the calling client, allocating an auto-generate clientId through which \n * this server will reach the client in the future. \n * @param clientSocket \n * @return clientId - the auto-generated client id\n * @throws java.rmi.RemoteException\n */\n public String registerClient(String clientSocket) throws RemoteException;\n \n /**\n * Unregisters the client identified by the given client id\n * @param clientId \n * @throws java.rmi.RemoteException \n */\n public void unregisterClient(String clientId) throws RemoteException;\n \n \n /**\n * Subscribe the client to the specified topic.\n * If the topic does not exist, a new one is create\n * @param name the name of the topic\n * @param clientId\n * @throws Exception\n * @throws java.rmi.RemoteException\n */\n public void subscribe(String name, String clientId) throws Exception, RemoteException;\n \n /**\n * Unsubscribe the client from the specified topic.\n * If the topic does not exists, nothing happens\n * @param name the name of the topic\n * @param clientId\n * @throws java.rmi.RemoteException\n */\n public void unsubscribe(String name, String clientId) throws RemoteException;\n \n /**\n * Deletes the specified topic, without notifying the subscribers \n * that they were unsubscribed\n * @param nume the name of the topic\n * @throws java.rmi.RemoteException\n * @throws TopicDoesNotExistException - if the topic does not exist\n */\n public void deleteTopic(String nume) throws RemoteException;\n \n /**\n * Deletes the specified topic, and may be notifying all the subscribers \n * that they were unsubscribed\n * @param nume the name of the topic\n * @param notifySubscribers\n * @throws java.rmi.RemoteException\n * @throws TopicDoesNotExistException - if the topic does not exist\n */\n public void deleteTopic(String nume, boolean notifySubscribers) throws RemoteException;\n \n /**\n * Deletes the specified topic, notifying all the subscribers with the specified data\n * that they were unsubscribed\n * @param nume the name of the topic\n * @param data data for the subscribers\n * @throws java.rmi.RemoteException\n * @throws TopicDoesNotExistException - if the topic does not exist\n */\n public void deleteTopic(String nume, Object data) throws RemoteException;\n \n /**\n * Notifies all the subscribers of this topic that something happened\n * @param name - the name of the topic\n * @throws java.rmi.RemoteException\n * @throws TopicDoesNotExistException\n */\n public void notifyTopic(String name) throws RemoteException;\n \n /**\n * Send this data to all subscribers of specified topic\n * @param data - the data to be sent to the listeners\n * @param name - the name of the topic\n * @throws java.rmi.RemoteException\n * @throws TopicDoesNotExistException\n */\n public void dataNotifyTopic(Object data, String name) throws RemoteException;\n \n /**\n * Tests if the specified topic exists\n * @param topicName - the name of the topic\n * @return true - if the topic exists, false otherwise\n * @throws java.rmi.RemoteException\n */\n public boolean exists(String topicName) throws RemoteException;\n \n /**\n * \n * @param name - the name of the topic\n * @return the subscribers count of the specified topic\n * @throws java.rmi.RemoteException\n */\n public int getSubscribersCount(String name) throws RemoteException;\n \n}",
"NotificationQueueBase(final Clock clock, final String svcName, final String queueName, final NotificationQueueHandler handler, final NotificationConfig config) {\n this.clock = clock;\n this.svcName = svcName;\n this.queueName = queueName;\n this.handler = handler;\n this.config = config;\n this.hostname = Hostname.get();\n \n this.executor = Executors.newSingleThreadExecutor(new ThreadFactory() {\n @Override\n public Thread newThread(Runnable r) {\n Thread th = new Thread(r);\n th.setName(NOTIFICATION_THREAD_PREFIX + svcName + \"-\" + queueName);\n th.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {\n @Override\n public void uncaughtException(Thread t, Throwable e) {\n log.error(\"Uncaught exception for thread \" + t.getName(), e);\n }\n });\n return th;\n }\n });\n }",
"public Notification() {\n\n\t}",
"public Notification() {\r\n }",
"public Notification() {\r\n }",
"public Notification()\n\t{\n\t\t\n\t}",
"public FoodNotificationReceiver(Handler handler) {\n\t super(handler);\n\t }",
"public interface NotificationActionsService {\n\n void sendNotification(String event, String description);\n\n}",
"private void initNotification() {\n Notification.Builder notificationBuilder =\n new Notification.Builder(this).setSmallIcon(R.drawable.notification_anim)\n .setContentTitle(\"Streaming\")\n .setContentText(\"Display mode stream\")\n .setTicker(\"Stream in progress\");\n notificationBuilder.setAutoCancel(true);\n if (notificationManager != null)\n notificationManager.notify(12345, notificationBuilder.build());\n }",
"public interface INotificationHandler {\n public void handleNotification(Notification notification);\n}",
"public AmazonPushListenerService() {\n super(AmazonPushListenerService.class.getName());\n // Measure singleton\n if(MEASURE_ACTIVE) {\n getMeasureProcessing();\n }\n }",
"public DefaultDeviceDiscovererListener()\r\n {\r\n }",
"public interface IGcmNotification {\n\n\tint getId();\n\n\tvoid onGcmRecieve(Context context);\n\n\t/**\n\t * Enum mapping string name of notification to end class for instantiation\n\t */\n\tenum NotificationName {\n\t\tDELETE_NOTIF(\"delete_not\", DeleteNotification.class),\n\t\tURI(\"uri\", UriNotification.class),\n\t\tDEVICE_ADDED(\"sensor_add\", DeviceAddedNotification.class),\n\t\tDEVICE_LOW_BATTERY(\"sensor_bat\", DeviceLowBatteryNotification.class),\n\t\tDEVICE_LOW_SIGNAL(\"sensor_sig\", DeviceLowSignalNotification.class),\n\t\tGATE_ADDED(\"adapter_add\", GateAddedNotification.class),\n\t\tGATE_OFFLINE(\"adapter_off\", GateOfflineNotification.class);\n\n\t\tprivate final String mName;\n\t\tprivate final Class<? extends BaseNotification> mClass;\n\n\t\tNotificationName(String name, Class<? extends BaseNotification> baseClass) {\n\t\t\tmName = name;\n\t\t\tmClass = baseClass;\n\t\t}\n\n\t\tpublic static NotificationName fromValue(String value) {\n\t\t\tfor (NotificationName item : values()) {\n\t\t\t\tif (value.equalsIgnoreCase(item.getName()))\n\t\t\t\t\treturn item;\n\t\t\t}\n\t\t\tthrow new IllegalArgumentException(\"Invalid State value\");\n\t\t}\n\n\t\tpublic String getName() {\n\t\t\treturn mName;\n\t\t}\n\n\t\tpublic Class<? extends BaseNotification> getBaseClass() {\n\t\t\treturn mClass;\n\t\t}\n\t}\n\n\tenum NotificationType {\n\t\tINFO(\"info\", 300),\n\t\tADVERT(\"advert\", 200),\n\t\tALERT(\"alert\", 400),\n\t\tCONTROL(\"control\", 100);\n\n\t\tprivate final String mValue;\n\t\tprivate final int mLevel;\n\n\t\tNotificationType(String value, int level) {\n\t\t\tmValue = value;\n\t\t\tmLevel = level;\n\t\t}\n\n\t\tpublic static NotificationType fromValue(String value) throws IllegalArgumentException {\n\t\t\tfor (NotificationType item : values()) {\n\t\t\t\tif (value.equalsIgnoreCase(item.getName()))\n\t\t\t\t\treturn item;\n\t\t\t}\n\t\t\tthrow new IllegalArgumentException(\"Invalid State value\");\n\t\t}\n\n\t\tpublic static NotificationType fromValue(int value) throws IllegalArgumentException {\n\t\t\tfor (NotificationType item : values()) {\n\t\t\t\tif (value == item.getLevel())\n\t\t\t\t\treturn item;\n\t\t\t}\n\t\t\tthrow new IllegalArgumentException(\"Invalid State value\");\n\t\t}\n\n\t\tpublic String getName() {\n\t\t\treturn mValue;\n\t\t}\n\n\t\tpublic int getLevel() {\n\t\t\treturn mLevel;\n\t\t}\n\t}\n}",
"public NotificationInterceptor() {\n mIsReady = false;\n mOnStartCommands = 0;\n mOnCreates = 0;\n }",
"@Override\r\n\tpublic void run(String... args) throws Exception {\n\t\tSystem.out.println(\"Runner Run Method Started\");\r\n\t\tSystem.out.println(notification.getService());\r\n\t}",
"protected AbstractRemoteNotificationClientHandler(ConnectionNotificationEmitter emitter, HeartBeat heartbeat, Map environment)\n {\n this.emitter = emitter;\n this.heartbeat = heartbeat;\n this.fetcherThread = new NotificationFetcherThread(environment);\n this.delivererThread = new NotificationDelivererThread(environment);\n }",
"public RNPushNotificationRegistrationService() {\n super();\n s_instance = this;\n }",
"public NotificationHelper(Context base) {\n super(base);\n if(Build.VERSION.SDK_INT>= Build.VERSION_CODES.O) {\n createChannels();\n }\n }",
"public AutoSenderService() {\r\n\t\tsuper();\r\n\t}",
"public interface Notifier {\n\tpublic void notify(String message);\n}",
"private TelemetryMessageHandler(){\n super();\n messageList = new TelemetryMessageList();\n telemetryArrivalMap = new TelemetryArrivalMap();\n }",
"public interface NotificationService {\n\n void sendAsync(List<Notification> notifications, String CompanyName);\n\n void send(NotificationEvent notificationEvent);\n\n void send(Notification notification);\n\n void send(List<NotificationEvent> notificationEvents);\n}",
"public BaseNotificationBuilder() {\n this(new Notification());\n }",
"public void invokeNotification(){\r\n\t\tApplication application = eurekaClient.getApplication(\"NOTIFICATION-SERVICE\");\r\n\t InstanceInfo instanceInfo = application.getInstances().get(0);\r\n\t String url = \"http://\"+instanceInfo.getIPAddr()+ \":\"+instanceInfo.getPort()+\"/notification-service/notify\";\r\n\t System.out.println(\"URL\" + url); \r\n\t Notification notificationMockObject = new Notification();\r\n\t String notificationId = restTemplate.postForObject(url, notificationMockObject, String.class);\r\n\t System.out.println(\"RESPONSE \" + notificationId);\r\n\t}",
"public interface IDiscoveryListener {\r\n\t/**\r\n\t * Called when a device is discovered.\r\n\t * \r\n\t * @param _discoverer the discoverer that found the device\r\n\t * @param _device the device that was found\r\n\t */\r\n\tpublic void deviceDiscovered(IDiscoverer _discoverer, IDevice _device);\r\n}",
"public interface NotificationProcessingService {\n\n /**\n * Process notification\n *\n * @param notificationId\n */\n void processNotification(@Nonnull final Long notificationId, @Nonnull final Map<String, String> secureProperties);\n}",
"private Notification prepareNotification() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && mNotificationManager.getNotificationChannel(FOREGROUND_CHANNEL_ID) == null) {\n CharSequence name = getString(R.string.text_name_notification);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(FOREGROUND_CHANNEL_ID, name, importance);\n channel.enableVibration(false);\n mNotificationManager.createNotificationChannel(channel);\n }\n\n Intent notificationIntent = new Intent(this, MainUIActivity.class);\n notificationIntent.setAction(Constants.ACTION.MAIN_ACTION);\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n\n // if min sdk goes below honeycomb\n /*if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB) {\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n } else {\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n }*/\n\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // make a stop intent\n Intent stopIntent = new Intent(this, MyService.class);\n stopIntent.setAction(Constants.ACTION.STOP_ACTION);\n PendingIntent pendingStopIntent = PendingIntent.getService(this, 0, stopIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n RemoteViews remoteViews = new RemoteViews(getPackageName(), R.layout.service_notification);\n remoteViews.setOnClickPendingIntent(R.id.btn_stop, pendingStopIntent);\n\n // if it is connected\n switch (stateService) {\n case Constants.STATE_SERVICE.NOT_CONNECTED:\n remoteViews.setTextViewText(R.id.tv_state, \"Help Desk DISCONNECTED\");\n remoteViews.setTextColor(R.id.tv_state, getResources().getColor(android.R.color.holo_red_light));\n break;\n case Constants.STATE_SERVICE.CONNECTED:\n remoteViews.setTextColor(R.id.tv_state, getResources().getColor(android.R.color.black));\n remoteViews.setTextViewText(R.id.tv_state, \"Help Desk CONNECTED\");\n break;\n }\n\n // notification builder\n NotificationCompat.Builder notificationBuilder;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n notificationBuilder = new NotificationCompat.Builder(this, FOREGROUND_CHANNEL_ID);\n } else {\n notificationBuilder = new NotificationCompat.Builder(this);\n }\n notificationBuilder\n .setContent(remoteViews)\n .setSmallIcon(R.mipmap.ic_launcher)\n .setCategory(NotificationCompat.CATEGORY_SERVICE)\n .setOnlyAlertOnce(true)\n .setOngoing(true)\n .setAutoCancel(true)\n .setContentIntent(pendingIntent);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n notificationBuilder.setVisibility(Notification.VISIBILITY_SECRET);\n }\n\n return notificationBuilder.build();\n }",
"public NotificationStore(){}",
"public Notification() {\n\n }",
"public interface INotificationListener extends INotifyObject{\r\n\t\r\n\tvoid OnNotificationEvent(int notification, INotifyObject notificationData);\r\n}",
"@Override\n public void handleNotification(Notification ntfctn, Object o) {\n\n logger.debug(\"Received notification \" + ntfctn);\n\n discover();\n\n }",
"void init(Properties realTimeNotifierProperties, Properties persistentNotifierProperties);",
"public static LibnotifyMessageNotifier getInstance() {\n\t\tJavaGnome javaGnome = JavaGnome.getInstance();\n\t\tif (javaGnome.isDisabled()) {\n\t\t\tlogger.info(\"Skip java-gnome notify system\");\n\t\t\treturn null;\n\t\t} else if (Utility.getOstype() == Utility.OSType.OTHER) {\n\t\t\tClassLoader extraClassLoader = ClientConfiguration.getInstance().getExtraClassLoader();\n\t\t\tif (!javaGnome.isFound()) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tlogger.info(\"detected java-gnome. version:{}\", javaGnome.getVersion());\n\t\t\t\tClass<?> gtkClass = Class.forName(\"org.gnome.gtk.Gtk\", true, extraClassLoader);\n\t\t\t\tBoolean isGtkInitialized = (Boolean) gtkClass.getMethod(\"isInitialized\").invoke(null);\n\t\t\t\tif (!isGtkInitialized) { // if(!Gtk.isInitialized){\n\t\t\t\t\t// Gtk.init(new String[]{});\n\t\t\t\t\tgtkClass.getMethod(\"init\", String[].class).invoke(null, (Object) new String[]{});\n\t\t\t\t}\n\t\t\t\tClass<?> notifyClass = Class.forName(\"org.gnome.notify.Notify\", true, extraClassLoader);\n\t\t\t\tBoolean isNotifyInitialized = (Boolean) notifyClass.getMethod(\"isInitialized\").invoke(null);\n\t\t\t\tif (!isNotifyInitialized) { // if(!Notify.isInitialized){\n\t\t\t\t\t// Notify.init(ClientConfiguration.APPLICATION_NAME);\n\t\t\t\t\tnotifyClass.getMethod(\"init\", String.class).invoke(null, ClientConfiguration.APPLICATION_NAME);\n\t\t\t\t}\n\n\t\t\t\t// Object serverCapabilities = Notify.getServerCapabilities();\n\t\t\t\tObject serverCapabilities = notifyClass.getMethod(\"getServerCapabilities\").invoke(null);\n\t\t\t\tlogger.info(\"connected notification server. caps:{}\", serverCapabilities);\n\t\t\t\treturn new LibnotifyMessageNotifier();\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\tlogger.trace(\"java-gnome is partial found...\", e);\n\t\t\t} catch (InvocationTargetException e) {\n\t\t\t\tlogger.warn(\"#checkUsable\", e.getCause());\n\t\t\t} catch (ReflectiveOperationException e) {\n\t\t\t\tlogger.warn(\"#checkUsable\", e);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public void initialize() {\r\n\r\n\t\t/** URL of the ActiveMQ broker, prepended by transport protocol **/\r\n\t\tString brokerUrl = config.getConfig().getString(\"broker_url\");\r\n\r\n\t\t/** Topic to subscribe to for receiving access to all notifications **/\r\n\t\tString topicName = config.getConfig().getString(\"topic\");\r\n\r\n\t\t/** Username for authenticating with the ActiveMQ broker **/\r\n\t\tString userName = config.getConfig().getString(\"user\");\r\n\r\n\t\t/** The password corresponding to the username **/\r\n\t\tString password = config.getConfig().getString(\"password\");\r\n\r\n\t\t// Creates a connection\r\n\t\tActiveMQSslConnectionFactory connectionFactory = new ActiveMQSslConnectionFactory(\r\n\t\t\t\tbrokerUrl);\r\n\r\n\t\t// Setting the trust manager to the connection factory\r\n\t\tconnectionFactory.setKeyAndTrustManagers(null, trustedCerts,\r\n\t\t\t\tnew SecureRandom());\r\n\t\tconnectionFactory.setWatchTopicAdvisories(false);\r\n\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif (logger.isDebugEnabled()){\r\n\t\t\t\tlogger.debug(\"creating connection to \" + brokerUrl);\r\n\t\t\t}\r\n\t\t\t// Connect to the broker\r\n\t\t\tConnection connection = connectionFactory.createConnection(\r\n\t\t\t\t\tuserName, password);\r\n\r\n\t\t\t// Creating session for sending messages\r\n\t\t\tsession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);\r\n\t\t\tconnection.start();\r\n\r\n\t\t\t// Creating the topic (i.e. creating a link to the already existing\r\n\t\t\t// one on the broker)\r\n\t\t\tTopic topic = session.createTopic(topicName);\r\n\r\n\t\t\t// MessageConsumer is used for receiving (consuming) messages from\r\n\t\t\t// the topic (above given threshold)\r\n\t\t\tMessageConsumer consumer = session.createConsumer(topic);\r\n\t\t\tconsumer.setMessageListener(this);\r\n\r\n\t\t\tif (logger.isDebugEnabled()) {\r\n\t\t\t\tlogger.debug(\"Connection to Notification with Id \"\r\n\t\t\t\t\t\t+ connection.getClientID() + \" Listening for messages\");\r\n\t\t\t}\r\n\r\n\t\t} catch (JMSException e) {\r\n\t\t\tsession = null;\r\n\t\t\tlogger.error(\"[JMS Exception] \" + e.getMessage());\r\n\t\t}\r\n\t}",
"public Notifier(final EmailNotifierService notifierService, final SlackNotifierService slackNotifierService) {\n this.notifierService = notifierService;\n this.slackNotifierService = slackNotifierService;\n }",
"public interface NotificationCleanupListener {\n void onStarted();\n void onStopped();\n //void onDismiss();\n}",
"interface Callback {\n /**\n * Used to update the {@link Notification}.\n */\n void notify(\n int notificationId,\n int notificationType,\n @Nullable String notificationTag,\n @NonNull Notification notification);\n\n /**\n * Used to stop the {@link SystemForegroundService}.\n */\n void stop();\n }",
"public interface NotificationMessageContentService {\n /**\n * Parses a Notification request message into business objects. Performs syntactic and semantic validation. \n * This method takes an InputStream.\n * @param stream request message stream\n * @return Notification business object\n * @throws SAXException\n * @throws ParserConfigurationException\n * @throws IOException\n * @throws XmlException\n */\n public NotificationBo parseNotificationRequestMessage(InputStream stream) throws IOException, XmlException;\n \n /**\n * Parses a Notification request message into business objects. Performs syntactic and semantic validation. \n * This method takes a String of XML.\n * @param notificationMessageAsXml\n * @return\n * @throws IOException\n * @throws XmlException\n */\n public NotificationBo parseNotificationRequestMessage(String notificationMessageAsXml) throws IOException, XmlException;\n \n /**\n * Generates a Notification response message\n * @param response\n * @return String XML representation of a Notification response object\n */\n public String generateNotificationResponseMessage(NotificationResponseBo response);\n\n /**\n * This method is responsible for marshalling out the passed in Notification object in and XML representation. \n * @param notification\n * @return String of XML.\n */\n public String generateNotificationMessage(NotificationBo notification);\n \n /**\n * This method is responsible for marshalling out the passed in Notification object in and XML representation, with \n * the addition of adding the specific recipient to the recipients list and removing the others. \n * @param notification\n * @param userRecipientId\n * @return String of XML.\n */\n public String generateNotificationMessage(NotificationBo notification, String userRecipientId);\n \n /**\n * This method parses out the serialized XML version of Notification BO and populates a Notification BO with it.\n * @param xmlAsBytes\n * @return Notification\n * @throws Exception\n */\n public NotificationBo parseSerializedNotificationXml(byte[] xmlAsBytes) throws Exception;\n}",
"private Notifier getNotifier() {\r\n return getLocalFacade().getGlobalFacade().getNotifier();\r\n }",
"public interface ServiceListener {\r\n\t\tpublic void startService(String s);\r\n\r\n\t\tpublic void stopNotification();\r\n\t}",
"public NotificationResource() {\r\n }",
"public Notifications() {\n \n \t}",
"private void sendNotification() {\n }",
"public ServiceEvent() {\n // eventSenderID and eventSenderClass are initialized by the OperatingSystem! \n }",
"protected CommunicationsHandler(){}",
"public interface Manager {\n /**\n * Configuration with parameters. If there are background tasks, they\n * shouldn't be started yet. Wait for the start() call.\n * \n * @param name\n * The managers name.\n * @param params\n * Configuration parameters.\n * @return true if the configuration was successful, false otherwise.\n */\n public boolean configure(String name, Map<String, Object> params) throws ConfigurationException;\n\n /**\n * Start any background tasks.\n * \n * @return true if the tasks were started, false otherwise.\n */\n public boolean start();\n\n /**\n * Stop any background tasks.\n * \n * @return true background tasks were stopped, false otherwise.\n */\n public boolean stop();\n\n /**\n * Get the name of this manager.\n * \n * @return the name.\n */\n public String getName();\n}",
"public PrtNotificationVORowImpl() {\r\n }",
"public CertificationFactoryImpl() {\n\t\tsuper();\n\t}",
"public synchronized void startNotificationListener() {\n\t\tif ((notificationThread != null) && notificationThread.isAlive()) {\n\t\t\tthrow new IllegalStateException(\"The notification listener is already running.\");\n\t\t}\n\t\t\n\t\tif (smtpConfig != null) {\n\t\t\tnotificationThread = new Thread( new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlistenForNotificationEvents();\n\t\t\t\t}\n\t\t\t}, \"OTM_NotificationListener\" );\n\t\t\t\n\t\t\tshutdownRequested = false;\n\t\t\tnotificationThread.start();\n\t\t\trepositoryListener = new RepositoryNotificationListener( this, manager );\n\t\t\tmanager.addListener( repositoryListener );\n\t\t\t\n\t\t} else {\n\t\t\tlog.warn(\"SMTP configuration not initialized - notification listener not started.\");\n\t\t}\n\t}",
"private void launchNotificationsThread() {\n Thread t = new Thread(\"JMXNotificationThread for \" + BodyWrapper.this.objectName) {\n @Override\n public void run() {\n // first we wait for the creation of the body\n while (!BodyWrapper.this.body.isActive() && BodyWrapper.this.body.isAlive()) {\n try {\n Thread.sleep(updateFrequence);\n } catch (InterruptedException e) {\n logger.error(\"The JMX notifications sender thread was interrupted\", e);\n }\n }\n \n // and once the body is activated, we can forward the\n // notifications\n while (BodyWrapper.this.body.isActive()) {\n try {\n Thread.sleep(updateFrequence);\n sendNotifications();\n } catch (InterruptedException e) {\n logger.error(\"The JMX notifications sender thread was interrupted\", e);\n }\n }\n }\n };\n t.setDaemon(true);\n t.start();\n }",
"public static RcsNotification getInstance() {\n return INSTANCE;\n }",
"public Notification(AGateway gateway)\r\n/* 11: */ {\r\n/* 12:31 */ setGateway(gateway);\r\n/* 13: */ }",
"private NotificationManager getNotificationManager() {\n if (mNotificationManager == null) {\n mNotificationManager = (NotificationManager) mContext.getSystemService(\n Context.NOTIFICATION_SERVICE);\n }\n return mNotificationManager;\n }",
"public ExternalServiceLayerCIMFactoryImpl() {\n\t\tsuper();\n\t}",
"private NotificationPublisher() {\n subscribers = new ArrayList<>();\n }",
"public ServiceExampleWorker() {\n super(\"ServiceExampleWorker\");\n shouldExecute = true;\n messageBinder = new IMessageBinder.Stub() {\n private List<ISubscriber> subscriberList = new ArrayList<>();\n\n @Override\n public void addSubscriber(ISubscriber subscriber) throws RemoteException {\n subscriberList.add(subscriber);\n }\n\n @Override\n public void removeSubscriber(ISubscriber subscriber) throws RemoteException {\n subscriberList.remove(subscriber);\n }\n\n @Override\n public void sendUpdate(String data) throws RemoteException {\n for (ISubscriber subscriber : subscriberList) {\n subscriber.send(data);\n }\n }\n\n @Override\n public void basicTypes(int anInt, long aLong, boolean aBoolean, float aFloat, double aDouble, String aString) throws RemoteException {\n\n }\n };\n }",
"@Override\n public void onEvent(EMNotifierEvent event) {\n\n }",
"public interface MessagingService {\n\n /**\n * Checks whether message receivers are registered for this channel.\n * \n * @param ccid the channel id\n * @return <code>true</code> if there are message receivers on this channel,\n * <code>false</code> if not.\n */\n boolean hasMessageReceiver(String ccid);\n\n /**\n * Passes the message to the registered message receiver.\n * \n * @param ccid the channel to pass the message on\n * @param serializedMessage the message to send (serialized SMRF message)\n */\n void passMessageToReceiver(String ccid, byte[] serializedMessage);\n\n /**\n * Check whether the messaging component is responsible to send messages on\n * this channel.<br>\n * \n * In scenarios with only one messaging component, this will always return\n * <code>true</code>. In scenarios in which channels are assigned to several\n * messaging components, only the component that the channel was assigned\n * to, returns <code>true</code>.\n * \n * @param ccid\n * the channel ID or cluster controller ID, respectively.\n * @return <code>true</code> if the messaging component is responsible for\n * forwarding messages on this channel, <code>false</code>\n * otherwise.\n */\n boolean isAssignedForChannel(String ccid);\n\n /**\n * Check whether the messaging component was responsible before but the\n * channel has been assigned to a new messaging component in the mean time.\n * \n * @param ccid the channel id\n * @return <code>true</code> if the messaging component was responsible\n * before but isn't any more, <code>false</code> if it either never\n * was responsible or still is responsible.\n */\n boolean hasChannelAssignmentMoved(String ccid);\n}",
"public NotificationDAO(DatabaseSQLHelper databaseSQLHelper) {\n\n log = new DLog(\"ClientNotificationDAO\");\n this.databaseSQLHelper = databaseSQLHelper;\n }",
"public interface C44035d extends C1677a {\n C7358b addICoreServiceLifecycleCallback(C30032a c30032a);\n\n C7358b addNotifyReceiverCallback(C44034c c44034c);\n\n void setILightPushDelegate(C23228b c23228b);\n}",
"public com.ss.android.ugc.aweme.notification.bean.d call() throws Exception {\n if (PatchProxy.isSupport(new Object[0], this, f58105a, false, 63253, new Class[0], com.ss.android.ugc.aweme.notification.bean.d.class)) {\n return (com.ss.android.ugc.aweme.notification.bean.d) PatchProxy.accessDispatch(new Object[0], this, f58105a, false, 63253, new Class[0], com.ss.android.ugc.aweme.notification.bean.d.class);\n }\n try {\n return NoticeApiManager.a();\n } catch (ExecutionException e2) {\n a.this.f58097e = null;\n throw com.ss.android.ugc.aweme.app.api.m.a(e2);\n }\n }",
"public interface NettyProxyService {\n /**\n * 心跳\n *\n * @param msg\n * @throws Exception\n */\n void processHeartbeatMsg(HeartbeatMsg msg) throws Exception;\n\n /**\n * 上传位置\n *\n * @param msg\n * @throws Exception\n */\n void processLocationMsg(LocationMsg msg) throws Exception;\n\n /**\n * 离线\n *\n * @param deviceNumber\n */\n void processInactive(String deviceNumber);\n}",
"public EnergySchedulingFactoryImpl() {\n\t\tsuper();\n\t}",
"public interface SystemService {\n /**\n * Gets unique service identifier.\n *\n * @return unique String service identifier\n */\n public String getServiceID();\n\n /**\n * Starts service. Called when service is about to be\n * requested for the first time. Thus, services can be\n * initialized lazily, only when they are really needed.\n */\n public void start();\n\n /**\n * Shutdowns service.\n */\n public void stop();\n\n /**\n * Accepts connection. When client requests a service, first,\n * a connection between client and service is created, and then\n * it is passed to service via this method to accept it and\n * start doing its thing. Note: you shouldn't block in this\n * method.\n *\n * @param connection connection between client and service\n */\n public void acceptConnection(SystemServiceConnection connection);\n}",
"public PolicyServiceDelegate()\n {\n log.debug(\"\") ;\n log.debug(\"----\\\"----\") ;\n log.debug(\"PolicyServiceDelegate()\") ;\n try\n {\n service = getService(CommunityConfig.getServiceUrl());\n }\n catch(Exception e) {\n e.printStackTrace();\n service = null;\n }\n log.debug(\"----\\\"----\") ;\n log.debug(\"\") ;\n }",
"public interface OnMessagingServiceConnetcedListenner {\n void onServiceConnected();\n}",
"void notificationReceived(Notification notification);",
"public interface NotificationListener {\n void onReceivedNotification(Notification notification);\n void onRemovedNotification(Notification notification);\n}",
"INotificationTraveller getSender();",
"public interface ManageNotificationService {\r\n\r\n\t/**\r\n\t * This method provides the AlarmTypes list for Notification Over view\r\n\t * \r\n\t * \r\n\t * @return\r\n\t * @throws HibernateException\r\n\t * @throws JsonProcessingException\r\n\t */\r\n\tpublic String getAlarmTypes() throws JsonProcessingException,\r\n\t\t\tHibernateException;\r\n\r\n\t/**\r\n\t * This method provides the Notification Over View data\r\n\t * \r\n\t * @param notificationOverViewRequest\r\n\t * @return\r\n\t */\r\n\tpublic String getAlarmNotificationOverView(\r\n\t\t\tNotificationOverViewRequest notificationOverViewRequest)\r\n\t\t\tthrows JsonProcessingException, ParseException;\r\n\r\n\t/**\r\n\t * Get Alarms count for a given user Id to get alarms for indoor / outdoor\r\n\t * units and groups the result is then processed and converted to JSON\r\n\t * string\r\n\t * \r\n\t * @param userId\r\n\t * @return\r\n\t * @throws JsonProcessingException\r\n\t */\r\n\tString getNotificationCount(Long userId) throws JsonProcessingException;\r\n\r\n\t/**\r\n\t * Get the alarm data which includes alarm id, status, severity, error code,\r\n\t * description, counter Measure, unit it, unit type.\r\n\t * \r\n\t * @param request\r\n\t * @param userTimeZone\r\n\t * @return\r\n\t */\r\n\tpublic NotificationDetailList getNotificationDetails(\r\n\t\t\tNotificationRequestVO request, String userTimeZone);\r\n\r\n\t/**\r\n\t * This method provides the Notification Over View data for download\r\n\t * \r\n\t * @param notificationOverViewRequest\r\n\t * @return\r\n\t * @throws ParseException\r\n\t * @throws HibernateException\r\n\t * @throws JsonProcessingException\r\n\t */\r\n\tpublic List<NotificationOverViewVO> getAlarmNotificationOverViewForDownload(\r\n\t\t\tNotificationOverViewRequest notificationOverViewRequest)\r\n\t\t\tthrows HibernateException, ParseException, JsonProcessingException;\r\n\r\n\t/**\r\n\t * Generate excel report for Notification Overview\r\n\t * \r\n\t * @param notificationList\r\n\t * @param notificationOverViewRequest\r\n\t * @return\r\n\t * @throws Exception\r\n\t */\r\n\tpublic String generateNotificationOverViewExcelReport(\r\n\t\t\tList<NotificationOverViewVO> notificationList,\r\n\t\t\tNotificationOverViewRequest notificationOverViewRequest)\r\n\t\t\tthrows Exception;\r\n\r\n\t/**\r\n\t * Generate excel report for Notification Details\r\n\t * \r\n\t * @param notificationList\r\n\t * @param requestVO\r\n\t * @return\r\n\t * @throws Exception\r\n\t */\r\n\tpublic String generateNotificationDetailsExcelReport(\r\n\t\t\tSet<NotificationDetailsVO> notificationList,\r\n\t\t\tNotificationRequestVO requestVO) throws Exception;\r\n\r\n\t/**\r\n\t * Generate csv report for Notification Details\r\n\t * \r\n\t * @param notificationList\r\n\t * @param requestVO\r\n\t * @return\r\n\t * @throws Exception\r\n\t */\r\n\tpublic String generateNotificationDetailsCsvReport(\r\n\t\t\tSet<NotificationDetailsVO> notificationList,\r\n\t\t\tNotificationRequestVO requestVO) throws Exception;\r\n\r\n\tpublic List<NotificationDetailsVO> getNotificationDetailsDownloadData(\r\n\t\t\tList<Long> notificationIds);\r\n\r\n\tpublic String generateNotificationDetailsExcelReport(\r\n\t\t\tList<NotificationDetailsVO> notificationList,\r\n\t\t\tNotificationRequestDownloadVO notificationRequestVO)\r\n\t\t\tthrows Exception;\r\n\r\n\tpublic String generateNotificationDetailsCsvReport(\r\n\t\t\tList<NotificationDetailsVO> notificationList,\r\n\t\t\tNotificationRequestDownloadVO notificationRequestVO)\r\n\t\t\tthrows Exception;\r\n\r\n}",
"public SensorActuatorMachine() {\n this.agent = ExecutionComponentFeature.LOCAL.get();\n if (agent == null) {\n throw new IllegalStateException(\"Must be called on agent thread.\");\n }\n self = Environment.getInstance().createMachine(agent);\n template = new ServiceManager(self.getServiceManager());\n }",
"@Override\r\n\tpublic Notification createEmailNotification() {\n\t\treturn null;\r\n\t}",
"private void initializeNotificationChannels() {\n NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n createEmergencyChannel(notificationManager);\n createNormalChannel(notificationManager);\n createExtrasChannel(notificationManager);\n }",
"public interface WatchdogService {\r\n\t\r\n\t/**\r\n\t * Starts the hardware watchdog on the device. If a timeout value has not been\r\n\t * set, the watchdog will use its default timeout.<br>\r\n\t * This call is no longer used. The life-cycle of the watchdog is controlled\r\n\t * by the configuration parameters of the WatchdogSerivce. The API call\r\n\t * is retained for compatibility reasons.\r\n\t */\r\n @Deprecated\r\n\tpublic void startWatchdog();\r\n\t\r\n\t/**\r\n\t * Stops the hardware Watchdog on the device\r\n * This call is no longer used. The life-cycle of the watchdog is controlled\r\n * by the configuration parameters of the WatchdogSerivce. The API call\r\n * is retained for compatibility reasons.\r\n\t */\r\n @Deprecated\r\n\tpublic void stopWatchdog();\r\n\t\r\n\t/**\r\n\t * Returns the timeout value for the hardware watchdog in increments of milliseconds.\r\n\t * \r\n\t * @return\t\tAn int representing the hardware timeout value in milliseconds. \r\n\t */\r\n\tpublic int getHardwareTimeout();\r\n\t\r\n\t/**\r\n\t * Register a critical service with the Critical Service Check-in. \r\n\t * Once registered, the critical service must call the checkin() \r\n\t * method (at a frequency higher than 1/timeout) to prevent a system reboot.\r\n\t * \r\n\t * @param criticalService\tA <code>CriticalService</code> to be registered.\r\n\t * @param timeout\t\t\tA timeout value that the critical service cannot exceed\r\n\t * \t\t\t\t\t\t\tbetween updates without generating a system reboot. The\r\n\t * \t\t\t\t\t\t\ttime is expressed in seconds.\r\n\t */\r\n\t@Deprecated\r\n\tpublic void registerCriticalService(CriticalComponent criticalComponent);\r\n\t\r\n\t/**\r\n\t * Unregister a critical service with the Critical Service Check-in.\r\n\t * Once unregistered, the critical service will no longer call the \r\n\t * checkin() method.\r\n\t * \r\n\t * @param criticalService\tA <code>CriticalService</code> to be unregistered.\r\n\t */\r\n @Deprecated\r\n\tpublic void unregisterCriticalService(CriticalComponent criticalComponent);\r\n\t\r\n /**\r\n * Register a critical component with the WatchdogService Check-in. \r\n * Once registered, the critical component must call the checkin() \r\n * method (at a frequency higher than 1/timeout) to prevent a system reboot.\r\n * \r\n * @param CriticalComponent The CriticalComponent to be registered.\r\n * @param timeout A timeout value that the critical service cannot exceed\r\n * between updates without generating a system reboot. The\r\n * time is expressed in seconds.\r\n */\r\n public void registerCriticalComponent(CriticalComponent criticalComponent);\r\n \r\n /**\r\n * Unregister a critical component with the WatchdogService Check-in.\r\n * Once unregistered, the critical component will no longer call the \r\n * checkin() method.\r\n * \r\n * @param CriticalComponent The CriticalComponent to be unregistered.\r\n */\r\n public void unregisterCriticalComponent(CriticalComponent criticalComponent);\r\n\r\n /**\r\n\t * Returns the list of the currently registered CriticalComponents\r\n\t * \r\n\t * @return\tA List of CriticalComponents\r\n\t */\r\n\tpublic List<CriticalComponent> getCriticalComponents();\r\n\t\r\n\t/**\r\n\t * This method is used to notify the Watchdog Service that a critical service\r\n\t * has 'checked in' and the reboot timer should be reset.\r\n\t * \r\n\t * @param criticalComponent\tThe criticalComponent to be updated.\r\n\t */\r\n\tpublic void checkin(CriticalComponent criticalComponent);\r\n\t\r\n}",
"public interface Client extends ClientBase {\n\n\t/**\n\t * Adds a new listener for the client.<br>\n\t * <b>Note</b> that listeners should be added immediately when receiving the incoming notification.\n\t */\n\tpublic Client addListener(ClientListener listener);\n\n}",
"public interface ApnsNotification {\r\n\r\n /**\r\n * Returns the binary representation of the device token.\r\n */\r\n public byte[] getDeviceToken();\r\n\r\n /**\r\n * Returns the binary representation of the payload.\r\n *\r\n */\r\n public byte[] getPayload();\r\n\r\n /**\r\n * Returns the identifier of the current message. The\r\n * identifier is an application generated identifier.\r\n *\r\n * @return the notification identifier\r\n */\r\n public int getIdentifier();\r\n\r\n /**\r\n * Returns the expiry date of the notification, a fixed UNIX\r\n * epoch date expressed in seconds\r\n *\r\n * @return the expiry date of the notification\r\n */\r\n public int getExpiry();\r\n\r\n /**\r\n * Returns the binary representation of the message as expected by the\r\n * APNS server.\r\n *\r\n * The returned array can be used to sent directly to the APNS server\r\n * (on the wire/socket) without any modification.\r\n */\r\n public byte[] marshall();\r\n}",
"@Override\n\tpublic void onCreate() {\n\t\tnotifyServiceReceiver = new NotifyServiceReceiver();\n\t\tsuper.onCreate();\n\t}",
"@SuppressLint(\"WrongConstant\")\n private Notification prepareNotification() {\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O &&\n mNotificationManager.getNotificationChannel(FOREGROUND_CHANNEL_ID) == null) {\n CharSequence name = getString(R.string.text_name_notification);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(FOREGROUND_CHANNEL_ID, name, importance);\n channel.enableVibration(false);\n mNotificationManager.createNotificationChannel(channel);\n }\n\n Intent notificationIntent = new Intent(this, Principal.class);\n notificationIntent.setAction(Constants.ACTION.MAIN_ACTION);\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n\n // if min sdk goes below honeycomb\n /*if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB) {\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n } else {\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n }*/\n\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // make a stop intent\n Intent stopIntent = new Intent(this, Servicio_cargar_punto_google.class);\n stopIntent.setAction(Constants.ACTION.STOP_ACTION);\n PendingIntent pendingStopIntent = PendingIntent.getService(this, 0, stopIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n RemoteViews remoteViews = new RemoteViews(getPackageName(), R.layout.notification);\n //remoteViews.setOnClickPendingIntent(R.id.btn_stop, pendingStopIntent);\n remoteViews.setTextViewText(R.id.tv_fecha, fecha);\n\n // if it is connected\n switch (stateService) {\n case Constants.STATE_SERVICE.NOT_CONNECTED:\n remoteViews.setTextViewText(R.id.tv_estado, \"Sin conexión a internet . . .\");\n remoteViews.setImageViewResource(R.id.im_estado, R.drawable.ic_advertencia);\n break;\n case Constants.STATE_SERVICE.CONNECTED:\n remoteViews.setTextViewText(R.id.tv_estado, \"Traigo en camino\");\n remoteViews.setImageViewResource(R.id.im_estado, R.drawable.ic_carrito_verde);\n break;\n case Constants.STATE_SERVICE.GPS_INACTIVO:\n remoteViews.setTextViewText(R.id.tv_estado, \"GPS inactivo\");\n remoteViews.setImageViewResource(R.id.im_estado, R.drawable.ic_advertencia);\n break;\n case Constants.STATE_SERVICE.SIN_INTERNET:\n remoteViews.setTextViewText(R.id.tv_estado, \"Sin conexión a internet . .\");\n remoteViews.setImageViewResource(R.id.im_estado, R.drawable.ic_advertencia);\n break;\n }\n\n // notification builder\n NotificationCompat.Builder notificationBuilder;\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {\n notificationBuilder = new NotificationCompat.Builder(this, FOREGROUND_CHANNEL_ID);\n } else {\n notificationBuilder = new NotificationCompat.Builder(this);\n }\n notificationBuilder\n .setContent(remoteViews)\n .setSmallIcon(R.drawable.ic_carrito_verde)\n .setCategory(NotificationCompat.CATEGORY_SERVICE)\n .setOnlyAlertOnce(true)\n .setOngoing(true)\n .setAutoCancel(true)\n .setContentIntent(pendingIntent);\n\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {\n notificationBuilder.setVisibility(Notification.VISIBILITY_PUBLIC);\n }\n\n return notificationBuilder.build();\n }",
"public ServiceFactoryImpl() {\n\t\tsuper();\n\t}",
"public RecruitingAppManagementImpl() {\n }",
"public interface MnsService {\n\n void init();\n\n String pop();\n\n boolean sendMsg(BaseConsumer.Message entity);\n\n String getTopicName();\n\n void destroy();\n}",
"void startForegroundWrapper(Notification notification) {\n if (startForeground != null) {\n Object[] startForegroundArgs = new Object[]{\n Integer.valueOf(NotificationManager.PERSISTENT_NOTIFICATION_ID),\n notification};\n // Object[] startForegroundArgs = new Object[] { 1, null };\n try {\n startForeground.invoke(this, startForegroundArgs);\n } catch (InvocationTargetException e) {\n // Should not happen.\n LogManager.w(this, \"Unable to invoke startForeground\" + e);\n } catch (IllegalAccessException e) {\n // Should not happen.\n LogManager.w(this, \"Unable to invoke startForeground\" + e);\n }\n } else {\n stopForeground(true);\n try {\n Log.e(\"NNNNNNNN\", \" persistant notification from XabberService\");\n ((android.app.NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE))\n .notify(NotificationManager.PERSISTENT_NOTIFICATION_ID,\n notification);\n } catch (SecurityException e) {\n }\n }\n }",
"public interface IRemoteMessageService {\n\n void unsubscribeToMessage(UnSubscribeToMessage cmd);\n\n /**\n * Sets a message element to a specified value\n */\n void setElementValue(SetElementValue cmd);\n\n void zeroizeElement(ZeroizeElement cmd);\n\n /**\n * Notifies service to send message updates to the specified ip address\n */\n SubscriptionDetails subscribeToMessage(SubscribeToMessage cmd);\n\n Set<? extends DataType> getAvailablePhysicalTypes();\n\n boolean startRecording(RecordCommand cmd);\n\n InetSocketAddress getRecorderSocketAddress();\n\n InetSocketAddress getMsgUpdateSocketAddress();\n\n void stopRecording();\n\n void terminateService();\n\n void reset();\n\n void setupRecorder(IMessageEntryFactory factory);\n\n public Map<String, Throwable> getCancelledSubscriptions();\n}",
"public EPGUpdateService() {\n // Worker thread name which is only important for debugging\n super(\"EPGUpdateService\");\n }",
"public interface ILauncherInteractor extends IBaseRequestInteractor {\n void callInitialDevice(InitDeviceRequest initialDeviceRequest, OnInitialDeviceListener listener);\n\n void callShutdownDevice(ImeiRequest imei);\n\n void callSOS(OnSOSListener listener, ImeiRequest imei);\n\n void callUpdateInfoAndGetEventService(OnEventListener listener, LocationUpdateRequest locationInfo);\n\n void callSendNewLocationService(RefreshLocationRequest locationInfo);\n\n void callTimezoneChanged(TimezoneUpdateRequest timeZoneParam);\n}",
"public ESocketThreadNew() {\n ac = new FileSystemXmlApplicationContext(\"classpath*:applicationContext.xml\");\n if (ESocketThreadNew.service == null) {\n ESocketThreadNew.service = ac.getBean(VnsAuthorGETServiceNew.class);\n }\n if (ESocketThreadNew.resultService == null) {\n ESocketThreadNew.resultService = ac.getBean(VnsResultService.class);\n }\n if (ESocketThreadNew.vnsPulseService == null) {\n ESocketThreadNew.vnsPulseService = ac.getBean(VnsPulseService.class);\n }\n if (ESocketThreadNew.locationService == null) {\n ESocketThreadNew.locationService = ac.getBean(VnsLocationService.class);\n }\n }"
] | [
"0.666236",
"0.6551091",
"0.65102583",
"0.65018004",
"0.6292859",
"0.6226859",
"0.6151629",
"0.6111744",
"0.6009311",
"0.59682995",
"0.5854475",
"0.5847317",
"0.5809837",
"0.578947",
"0.5773947",
"0.5768769",
"0.5745486",
"0.5737327",
"0.5737327",
"0.57207125",
"0.57045794",
"0.56988",
"0.5633655",
"0.5624865",
"0.56243974",
"0.5618022",
"0.5616066",
"0.5592284",
"0.5590282",
"0.55825615",
"0.5576348",
"0.555126",
"0.5550886",
"0.55481964",
"0.5545376",
"0.553927",
"0.5534187",
"0.5528173",
"0.55155957",
"0.5514711",
"0.550736",
"0.5498598",
"0.5470168",
"0.54529",
"0.5441008",
"0.5438054",
"0.5430031",
"0.54251546",
"0.54237765",
"0.54073197",
"0.5405462",
"0.540351",
"0.5403208",
"0.539942",
"0.539836",
"0.5398206",
"0.5391236",
"0.5370541",
"0.5365482",
"0.5364417",
"0.5363945",
"0.5352445",
"0.53516203",
"0.534314",
"0.53430927",
"0.53292817",
"0.53230524",
"0.5320377",
"0.5298815",
"0.5287113",
"0.5269949",
"0.52697253",
"0.5246844",
"0.5242978",
"0.5238435",
"0.5225314",
"0.52191675",
"0.5218933",
"0.52174723",
"0.5212057",
"0.52111965",
"0.52075243",
"0.5199812",
"0.5193488",
"0.5182205",
"0.51775897",
"0.51768565",
"0.5176251",
"0.51726675",
"0.5170695",
"0.5169591",
"0.51676303",
"0.5167344",
"0.516441",
"0.5159348",
"0.5156159",
"0.51557326",
"0.51514184",
"0.5147656",
"0.51440454"
] | 0.80951303 | 0 |
$NONNLS1$ When the Manager is started, the Manager will invoke this method. The Manager needs a way to start the NotificationCatcher when the Manager starts. After that point, the NotificationCatcher can place Notifications on the Manager's queue. This method will allow the NotificationCatcher to do any initialization to receive events from devices (such as listening on a network socket) after it has been instantiated by the NotificationCatcherFactory. | public void startup() throws AMPException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized void startNotificationListener() {\n\t\tif ((notificationThread != null) && notificationThread.isAlive()) {\n\t\t\tthrow new IllegalStateException(\"The notification listener is already running.\");\n\t\t}\n\t\t\n\t\tif (smtpConfig != null) {\n\t\t\tnotificationThread = new Thread( new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlistenForNotificationEvents();\n\t\t\t\t}\n\t\t\t}, \"OTM_NotificationListener\" );\n\t\t\t\n\t\t\tshutdownRequested = false;\n\t\t\tnotificationThread.start();\n\t\t\trepositoryListener = new RepositoryNotificationListener( this, manager );\n\t\t\tmanager.addListener( repositoryListener );\n\t\t\t\n\t\t} else {\n\t\t\tlog.warn(\"SMTP configuration not initialized - notification listener not started.\");\n\t\t}\n\t}",
"public interface NotificationCatcher {\n public static final String COPYRIGHT_2009_2010 = Constants.COPYRIGHT_2009_2010;\n \n static final String SCM_REVISION = \"$Revision: 1.2 $\"; //$NON-NLS-1$\n\n /**\n * When the Manager is started, the Manager will invoke this method. The\n * Manager needs a way to start the NotificationCatcher when the Manager\n * starts. After that point, the NotificationCatcher can place Notifications\n * on the Manager's queue. This method will allow the NotificationCatcher to\n * do any initialization to receive events from devices (such as listening\n * on a network socket) after it has been instantiated by the\n * NotificationCatcherFactory.\n * \n * @see NotificationCatcherFactory\n * @see Manager\n */\n public void startup() throws AMPException;\n \n /**\n * When the Manager is shutdown, the Manager will invoke this method. For\n * any resources that were obtained via the NotificationCatcher's\n * constructor or {@link #startup()}, this method will allow those\n * resources (such as network sockets) to be released when the Manager is\n * shutdown.\n * \n * @see Manager\n */\n public void shutdown();\n \n /**\n * Get the URL that this NotificationCatcher listens on so Devices know\n * where to post Notifications. This URL is used when a subscription request (\n * {@link Commands#subscribeToDevice(DeviceContext, String, StringCollection, URL)})\n * is sent to a device so that the device knows where to send the\n * notifications (events).\n * \n * @return the URL that this NotificationCatcher listens on so Devices know\n * where to post Notifications. This value will be used when sending\n * subscription requests to Devices. This may be an https or http\n * url. Typically, the path part of the URL will not be relevant,\n * the relevant parts are the protocol, hostname, and port.\n */\n public URL getURL();\n}",
"private void initNotification() {\n Notification.Builder notificationBuilder =\n new Notification.Builder(this).setSmallIcon(R.drawable.notification_anim)\n .setContentTitle(\"Streaming\")\n .setContentText(\"Display mode stream\")\n .setTicker(\"Stream in progress\");\n notificationBuilder.setAutoCancel(true);\n if (notificationManager != null)\n notificationManager.notify(12345, notificationBuilder.build());\n }",
"@Override\n\tpublic void onCreate() {\n\t\tnotifyServiceReceiver = new NotifyServiceReceiver();\n\t\tsuper.onCreate();\n\t}",
"public static void localNotificationsInitializePlugin() {\n ThreadUtil.performOnMainThread(new Runnable() {\n @Override\n public void run() {\n if (_instance != null && _instance.localNotificationsInteractionLayer == null) {\n _instance.localNotificationsInteractionLayer = new LocalNotificationsInteractionLayer(_instance);\n AndroidNativeLocalNotifications_onLocalNotificationsInitialized();\n if (_instance.getIntent().hasExtra(\"NOTIFICATION_ID\")) {\n AndroidNativeLocalNotifications_onLocalNotificationsPress(_instance.getIntent().getIntExtra(\"NOTIFICATION_ID\", 0));\n }\n }\n }\n });\n }",
"protected void initNotificationServiceStub() {\n notificationServiceStub =\n NotificationServiceGrpc.newBlockingStub(\n ManagedChannelBuilder.forTarget(\n StringUtils.isEmpty(currentUri) ? SERVER_URI : currentUri)\n .usePlaintext()\n .build());\n if (enableHa) {\n notificationServiceStub =\n wrapBlockingStub(\n notificationServiceStub,\n StringUtils.isEmpty(currentUri) ? SERVER_URI : currentUri,\n livingMembers,\n enableHa,\n retryIntervalMs,\n retryTimeoutMs);\n }\n }",
"private void launchNotificationsThread() {\n Thread t = new Thread(\"JMXNotificationThread for \" + BodyWrapper.this.objectName) {\n @Override\n public void run() {\n // first we wait for the creation of the body\n while (!BodyWrapper.this.body.isActive() && BodyWrapper.this.body.isAlive()) {\n try {\n Thread.sleep(updateFrequence);\n } catch (InterruptedException e) {\n logger.error(\"The JMX notifications sender thread was interrupted\", e);\n }\n }\n \n // and once the body is activated, we can forward the\n // notifications\n while (BodyWrapper.this.body.isActive()) {\n try {\n Thread.sleep(updateFrequence);\n sendNotifications();\n } catch (InterruptedException e) {\n logger.error(\"The JMX notifications sender thread was interrupted\", e);\n }\n }\n }\n };\n t.setDaemon(true);\n t.start();\n }",
"public void InitListener()\n {\n Intent listener = new Intent(this, SmsListener.class);\n listener.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startService(listener);\n }",
"public void initialize() {\r\n\r\n\t\t/** URL of the ActiveMQ broker, prepended by transport protocol **/\r\n\t\tString brokerUrl = config.getConfig().getString(\"broker_url\");\r\n\r\n\t\t/** Topic to subscribe to for receiving access to all notifications **/\r\n\t\tString topicName = config.getConfig().getString(\"topic\");\r\n\r\n\t\t/** Username for authenticating with the ActiveMQ broker **/\r\n\t\tString userName = config.getConfig().getString(\"user\");\r\n\r\n\t\t/** The password corresponding to the username **/\r\n\t\tString password = config.getConfig().getString(\"password\");\r\n\r\n\t\t// Creates a connection\r\n\t\tActiveMQSslConnectionFactory connectionFactory = new ActiveMQSslConnectionFactory(\r\n\t\t\t\tbrokerUrl);\r\n\r\n\t\t// Setting the trust manager to the connection factory\r\n\t\tconnectionFactory.setKeyAndTrustManagers(null, trustedCerts,\r\n\t\t\t\tnew SecureRandom());\r\n\t\tconnectionFactory.setWatchTopicAdvisories(false);\r\n\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif (logger.isDebugEnabled()){\r\n\t\t\t\tlogger.debug(\"creating connection to \" + brokerUrl);\r\n\t\t\t}\r\n\t\t\t// Connect to the broker\r\n\t\t\tConnection connection = connectionFactory.createConnection(\r\n\t\t\t\t\tuserName, password);\r\n\r\n\t\t\t// Creating session for sending messages\r\n\t\t\tsession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);\r\n\t\t\tconnection.start();\r\n\r\n\t\t\t// Creating the topic (i.e. creating a link to the already existing\r\n\t\t\t// one on the broker)\r\n\t\t\tTopic topic = session.createTopic(topicName);\r\n\r\n\t\t\t// MessageConsumer is used for receiving (consuming) messages from\r\n\t\t\t// the topic (above given threshold)\r\n\t\t\tMessageConsumer consumer = session.createConsumer(topic);\r\n\t\t\tconsumer.setMessageListener(this);\r\n\r\n\t\t\tif (logger.isDebugEnabled()) {\r\n\t\t\t\tlogger.debug(\"Connection to Notification with Id \"\r\n\t\t\t\t\t\t+ connection.getClientID() + \" Listening for messages\");\r\n\t\t\t}\r\n\r\n\t\t} catch (JMSException e) {\r\n\t\t\tsession = null;\r\n\t\t\tlogger.error(\"[JMS Exception] \" + e.getMessage());\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tPowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);\n\t\twlock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, \"MeiLogger\");\n\t\twlock.acquire();\n\t\tmNM = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);\n\t\tshowNotification();\n\t\tsuper.onCreate();\n\t}",
"public void start() {\n if ( this.messageListenerContainer == null ) {\n logger.info( \"Listener container is still not assembled. Doing it now for topic {}\", this.topic );\n init();\n }\n logger.info( \"Starting listener: {}\", this.messageListenerContainer );\n this.messageListenerContainer.start();\n }",
"@Override\n public void onCreate() {\n HandlerThread thread = new HandlerThread(\"ServiceStartArguments\", THREAD_PRIORITY_BACKGROUND);\n thread.start();\n Log.d(\"LOG19\", \"DiscoveryService onCreate\");\n\n this.mLocalBroadCastManager = LocalBroadcastManager.getInstance(this);\n // Get the HandlerThread's Looper and use it for our Handler\n mServiceLooper = thread.getLooper();\n\n mServiceHandler = new ServiceHandler(mServiceLooper);\n }",
"@Override\n public void onCreate() {\n super.onCreate();\n\n Log.d(LOGTAG, \"NotificationInterceptor.onCreate() called\");\n mNotificationsSeen = new ArrayList<NotificationBundle>();\n mIsReady = true;\n mOnCreates++;\n\n // We'll need the broadcast receiver to communicate with the main activity/app.\n // The main app will also need one to receive messages from us.\n// mReceiver = new NotificationInterceptorReceiver();\n// IntentFilter filter = new IntentFilter();\n// filter.addAction(\"com.glasstowerstudios.stainedglass.notifications.NOTIFY_LED_BLINK\");\n// registerReceiver(mReceiver, filter);\n }",
"protected void serverStarting(final ComponentManager manager) {\n OpenGammaComponentServerMonitor.create(manager.getRepository());\n }",
"protected void notifyStart(\n )\n {\n for(IListener listener : listeners)\n {listener.onStart(this);}\n }",
"@Override\n public void onCreate() {\n if (messageServiceUtil == null)\n messageServiceUtil = new MessageServiceUtil();\n messageServiceUtil.startMessageService(this);\n keepService2();\n }",
"@Override\n public void startNotificationListener(DBMSSynchronizer dbmsSynchronizer) {\n Logger.getLogger(ThreadedHousekeeper.class.getName()).setLevel(Level.SEVERE);\n\n this.listener = new PostgresSQLNotificationListener(dbmsSynchronizer);\n\n PGDataSource dataSource = new PGDataSource();\n dataSource.setHost(connectionProperties.getHost());\n dataSource.setPort(connectionProperties.getPort());\n dataSource.setDatabase(connectionProperties.getDatabase());\n dataSource.setUser(connectionProperties.getUser());\n dataSource.setPassword(connectionProperties.getPassword());\n\n try {\n pgConnection = (PGConnection) dataSource.getConnection();\n pgConnection.createStatement().execute(\"LISTEN jabrefLiveUpdate\");\n // Do not use `new PostgresSQLNotificationListener(...)` as the object has to exist continuously!\n // Otherwise the listener is going to be deleted by GC.\n pgConnection.addNotificationListener(listener);\n } catch (SQLException e) {\n LOGGER.error(\"SQL Error: \", e);\n }\n }",
"@Override\r\n public boolean initialize() {\r\n try {\r\n uid = Double.parseDouble(getActiveAddressBean().getPredicateValueWithException(PushDelivery.NOTIFICATION_ID_KEY));\r\n structure = registerAndGetStructure();\r\n NotificationRegistry.getInstance().addNotification(uid, this);\r\n } catch (Exception e) {\r\n logger.error(e.getMessage(), e);\r\n NotificationRegistry.getInstance().removeNotification(uid);\r\n return false;\r\n }\r\n return true;\r\n }",
"public void notifyStartup();",
"public void init()\r\n {\r\n eventPublisher.publishEvent(new CachedContentCleanerCreatedEvent(this));\r\n }",
"public void onCreate() {\n super.onCreate();\n // An Android handler thread internally operates on a looper.\n mHandlerThread = new HandlerThread(\"HandlerThreadService.HandlerThread\", Process.THREAD_PRIORITY_BACKGROUND);\n mHandlerThread.start();\n // An Android service handler is a handler running on a specific background thread.\n mServiceHandler = new ServiceHandler(mHandlerThread.getLooper());\n\n // Get access to local broadcast manager\n mLocalBroadcastManager = LocalBroadcastManager.getInstance(this);\n }",
"public void starts(Class<? extends Notification> simulationStartedNotificationClass) {\n addExecuteStep(() -> simulationAPI.start(listener));\n simulationThen.notificationReceived(simulationStartedNotificationClass);\n }",
"protected void beforeStartManager(Manager manager) {\n }",
"public void start() {\n this.messenger.start();\n }",
"private void initializeNotificationChannels() {\n NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n createEmergencyChannel(notificationManager);\n createNormalChannel(notificationManager);\n createExtrasChannel(notificationManager);\n }",
"void init(Properties realTimeNotifierProperties, Properties persistentNotifierProperties);",
"private void initializeRecallServiceManager() {\n\n }",
"private synchronized void start()\n\t{\n\t\tregisterReceiver(\n\t\t\t\tmConnectivityReceiver,\n\t\t\t\tnew IntentFilter( ConnectivityManager.CONNECTIVITY_ACTION )\n\t\t);\n\n\t\ttry\n\t\t{\n\t\t\t// Show notification in status bar\n\t\t\tshowNotification();\n\t\t} catch ( Exception e ) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"private static NotificationManagerProxy getNotificationManager() {\n return new NotificationManagerProxyImpl(ContextUtils.getApplicationContext());\n }",
"private void startBroadcaster() {\n mHandler.post(mBroadcaster);\n }",
"private void listenForNotificationEvents() {\n\t\twhile (!shutdownRequested) {\n\t\t\ttry {\n\t\t\t\tNotificationJob job = notificationQueue.poll( 1000, TimeUnit.MILLISECONDS );\n\t\t\t\t\n\t\t\t\tif (job != null) {\n\t\t\t\t\tprocessNotificationJob( job );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// Ignore and continue looping until shutdown requested\n\t\t\t}\n\t\t}\n\t}",
"public void initializer() {\r\n runLater(() -> this.main = new ApplicationMain(handler));\r\n }",
"@Override\n\tpublic Service upstreamDeliverMsgPluginManagerServiceInit() {\n\t\treturn null;\n\t}",
"private void startHandler() {\n mHandler = new MessageHandler();\n }",
"public void init() {\n Set<JobNotification> existing = projectBean.getJobConfiguration().getNotifications();\n this.notifications = new ArrayList<JobNotification>();\n if (existing != null) {\n for (JobNotification n : existing) {\n n.initTransient();\n notifications.add(n);\n }\n }\n }",
"@Override\r\n\tpublic void startup()\r\n\t{\n\t\tif (LOG.isDebugEnabled())\r\n\t\t{\r\n\t\t\tLOG.debug(\"starting broker by plugging configured engines\");\r\n\t\t}\r\n\t\tconfigure(broker);\r\n\t\t\r\n\t\t// register this engine for handling new (Un)PlugEvents\r\n\t\tProcessingEngine processing = broker.getEngine(ProcessingEngine.class);\r\n\t\tif (processing == null)\r\n\t\t{\r\n\t\t\tLOG.error(\"no processing engine available for registering event \"\r\n\t\t\t\t\t+ \"handlers\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tprocessing.registerEventClass(PlugEvent.class, this);\r\n\t}",
"protected void onOSGiConnected() {\n osgiNotified = true;\n }",
"@Override\n\tpublic Service duplexstreamDeliverMsgPluginManagerServiceInit() {\n\t\treturn null;\n\t}",
"private void init() {\n mEventBus = new AsyncEventBus(new HandlerExecutor());\n mEventBus.register(this);\n }",
"public void addNotify() {\n\t\tsuper.addNotify();\n\t\tif (thread == null) {\n\t\t\tthread = new Thread(this);\n\t\t\tthread.start();\n\t\t}\n\t}",
"public NotificationReceiverService() {\n }",
"public void initReceiver() {\n }",
"void notifyStart();",
"@Override\r\n public void onCreate() {\n HandlerThread thread = new HandlerThread(\"ServiceStartArguments\",\r\n Process.THREAD_PRIORITY_BACKGROUND);\r\n thread.start();\r\n\r\n // Get the HandlerThread's Looper and use it for our Handler\r\n mServiceLooper = thread.getLooper();\r\n mServiceHandler = new ServiceHandler(mServiceLooper);\r\n }",
"public void startWithoutChecks() {\n service.enableMonitoring();\n for (ServiceNotifier serviceNotifier : serviceNotifiers) {\n serviceNotifier.onStart();\n }\n }",
"@Override\n\tpublic void onCreate() {\n\t\t\n\t\tHandlerThread thread = new HandlerThread(\"ServiceStartArguments\",\n\t\t\t\tProcess.THREAD_PRIORITY_BACKGROUND);\n\t\tthread.start();\n\t\t// Get the HandlerThread's Looper and use it for our Handler\n\t\tmServiceLooper = thread.getLooper();\n\t\tmServiceHandler = new ServiceHandler(mServiceLooper);\n\t}",
"@Override\n public void onCreate() {\n HandlerThread thread = new HandlerThread(\"ServiceStartArguments\");\n thread.start();\n\n // Get the HandlerThread's Looper and use it for our Handler\n mLooper = thread.getLooper();\n mServiceHandle = new ServiceHandle(mLooper);\n }",
"public NotificationService() {\n super(\"NotificationService\");\n }",
"@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t\ttry\n\t\t{\n\t\t\tregisterReceiver(mMessageReceiver, new IntentFilter(\"updateUnreadCount\"));\n\t\t\tinquiryUserMessage();\n\t\t}\n\t\tcatch( Exception ex )\n\t\t{\n\t\t\tcatchException(this, ex);\n\t\t}\n\t}",
"public final void init() throws Exception {\n // Get the Platform MBean Server\n mbs = MBeanServerFactory.createMBeanServer();\n\n // Construct the ObjectName for the Hello MBean\n name = new ObjectName(\n \"org.apache.harmony.test.func.api.javax.management:type=Hello\");\n\n // Create the Hello MBean\n hello = new Hello();\n\n // Register the Hello MBean\n mbs.registerMBean(hello, name);\n\n // Add notification listener\n mbs.addNotificationListener(name, this, null, \"handback\");\n\n // Wait until the notification is received.\n freeze(3000);\n\n // Invoke sayHello method\n mbs.invoke(name, \"sayHello\", new Object[0], new String[0]);\n }",
"public void startEventHandler() {\n Thread eventThread = new Thread(this, \"Nxt Event Handler\");\n eventThread.setDaemon(true);\n eventThread.start();\n }",
"@Override\n public void onCreate() {\n super.onCreate();\n\n init();\n\n if(DEBUG) {\n Log.i(TAG, \"onCreate(): mShow=\" + mShow);\n }\n\n IntentFilter myFilter = new IntentFilter(\n NotificationListener.MSG_NOTIFICATION_CHANGED);\n registerReceiver(mNotificationChangedReceiver, myFilter);\n\n mShow = false;\n createFloatView();\n\n //there is no notification, show default float view if needed.\n if(mNotificationPkg == null) {\n boolean permitFloatView = PreferenceUtil.getInstance(this).permitFloatView();\n boolean showDefaultFloatView = PreferenceUtil.getInstance(this).showDefaultFloatView();\n if(permitFloatView && showDefaultFloatView) {\n android.util.Log.i(TAG, \"onCreate() -> show default float view.\");\n showDefaultFloatView();\n }\n }\n }",
"@Override\n public void init() {\n UserThread.setExecutor(Platform::runLater);\n UserThread.setTimerClass(UITimer.class);\n\n shutDownHandler = this::stop;\n BisqApp.shutDownHandler = this::stop;\n CommonSetup.setup(this::showErrorPopup);\n CoreSetup.setup(bisqEnvironment);\n }",
"public static void start() {\n assert sListener == null;\n sListener = new ResourceListener();\n ResourceManager.getInstance().addListener(sListener);\n }",
"public void init() {\n ContainerProperties containerProperties = buildContainerProperties();\n this.messageListenerContainer = buildMessageListenerContainer( consumerFactory, containerProperties );\n }",
"private void init(Bundle savedInstanceState) {\n messageManager = new MessageManager();\n }",
"protected void fireLowTonerEvent()\n {\n // construct parameters and signatures\n Object[] parameter = new Object[ 1 ];\n parameter[ 0 ] = new Notification( \n \"PrinterEvent.LOW_TONER\", this, 0L );\n String[] signature = new String[ 1 ];\n signature[ 0 ] = \"javax.management.Notification\";\n \n // invoke notification\n try {\n mBeanServer.invoke( eventBroadcasterName,\n \"sendNotification\", parameter, signature ); \n } \n\n // handle exception when invoking method\n catch ( ReflectionException exception ) {\n exception.printStackTrace();\n }\n\n // handle exception communicating with MBean\n catch ( MBeanException exception ) {\n exception.printStackTrace();\n }\n\n // handle exception if MBean not found\n catch ( InstanceNotFoundException exception ) {\n exception.printStackTrace();\n } \n \n }",
"@Override\r\n public void onCreate() {\n HandlerThread thread = new HandlerThread(\"ServiceStartArguments\",\r\n 10);\r\n thread.start();\r\n\r\n // Get the HandlerThread's Looper and use it for our Handler\r\n serviceLooper = thread.getLooper();\r\n serviceHandler = new ServiceHandler(serviceLooper);\r\n }",
"@Override\n\tpublic void setup()\n\t{\n\t\tCoreNotifications.get().addListener(this, ICoreContextOperationListener.class);\n\t\tCoreNotifications.get().addListener(this, ICoreProcedureInputListener.class);\n\t\tCoreNotifications.get().addListener(this, ICoreProcedureRuntimeListener.class);\n\t\tCoreNotifications.get().addListener(this, ICoreProcedureOperationListener.class);\n\t}",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tSystem.out.println(\"onStart\");\n\t\t\t\tif(listener!=null) listener.onMessage(\"onStart\");\n\t\t\t\tisRun = true;\n\t\t\t}",
"@Override\n public void onCreate() {\n super.onCreate();\n handler = new Handler();\n BusProvider.register(this);\n }",
"@Override\n public void initialise() throws InitialisationException {\n if (metricRegistry == null) {\n throw new IllegalArgumentException(\"metricRegistry not set\");\n }\n // need to differentiate by app name\n if (reporter == null) {\n reporter = JmxReporter.forRegistry(metricRegistry).inDomain(\"Mule.\"+appName+\".metrics\").build();\n reporter.start();\n }\n }",
"public SubscriptionManager() {\n subscribers = new ArrayList<>();\n pendingUpdates = new ArrayBlockingQueue<>(1024);\n executionThread = null;\n\n System.out.println(\"SUBSCRIPTION MANAGER INITIALIZED!\");\n }",
"@Override\n\tprotected void initial() throws SiDCException, Exception {\n\t\tLogAction.getInstance().initial(logger, this.getClass().getCanonicalName());\n\t}",
"@RequiresApi(api = Build.VERSION_CODES.O)\n @Override\n public void onCreate() {\n super.onCreate();\n createVirtualEnvironment();\n createNotificationChannel();\n }",
"protected void setup() {\n\t\tSystem.out.println(\"Messenger agent \"+getAID().getName()+\" is ready.\");\r\n\t\tagentList = new ArrayList();\r\n\t\trefreshActiveAgents();\r\n\r\n\t\tmessageGUI = new MessageAgentGui(this);\r\n\t\tmessageGUI.displayGUI();\r\n\r\n\t\tDFAgentDescription dfd = new DFAgentDescription();\r\n\t\tdfd.setName(getAID());\r\n\t\tServiceDescription sd = new ServiceDescription();\r\n\t\tsd.setType(\"messenger-agent\");\r\n\t\tsd.setName(getLocalName()+\"-Messenger agent\");\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\t\taddBehaviour(new ReceiveMessage());\r\n\t}",
"public void addNotify()\n { \n super.addNotify(); // creates the peer\n startGame(); // start the thread\n }",
"@Override\r\n public void onCreate() {\r\n super.onCreate();\r\n Realm.init(getApplicationContext());\r\n\r\n// createNotificationChannel();\r\n\r\n }",
"@Override\n public void start() {\n checkDebug();\n\n agentConfig.validate();\n\n if (mBeanServer == null) {\n mBeanServer = MBeanUtils.start();\n }\n\n try {\n startHttpAdaptor();\n } catch (StartupException e) {\n loggingSession.stopSession();\n loggingSession.shutdown();\n throw e;\n }\n\n try {\n startRMIConnectorServer();\n } catch (StartupException e) {\n stopHttpAdaptor();\n loggingSession.stopSession();\n loggingSession.shutdown();\n throw e;\n }\n\n try {\n startSnmpAdaptor();\n } catch (StartupException e) {\n stopRMIConnectorServer();\n stopHttpAdaptor();\n loggingSession.stopSession();\n loggingSession.shutdown();\n throw e;\n }\n\n if (agentConfig.getAutoConnect()) {\n try {\n connectToSystem();\n /*\n * Call Agent.stop() if connectToSystem() fails. This should clean up agent-DS connection &\n * stop all the HTTP/RMI/SNMP adapters started earlier.\n */\n } catch (AdminException ex) {\n logger.error(\"auto connect failed: {}\",\n ex.getMessage());\n stop();\n throw new StartupException(ex);\n } catch (MalformedObjectNameException ex) {\n String autoConnectFailed = \"auto connect failed: {}\";\n logger.error(autoConnectFailed, ex.getMessage());\n stop();\n throw new StartupException(new AdminException(\n String.format(\"auto connect failed: %s\", ex.getMessage()), ex));\n }\n } // getAutoConnect\n\n logger.info(\"GemFire JMX Agent is running...\");\n\n if (memberInfoWithStatsMBean == null) {\n initializeHelperMbean();\n }\n }",
"@Override\n public void onCreate() {\n HandlerThread thread = new HandlerThread(\"ServiceStartArguments\", Process.THREAD_PRIORITY_BACKGROUND);\n thread.start();\n\n //Get the HandlerThread's Looper and use it for ur Handler\n mServiceLooper = thread.getLooper();\n mServiceHandler = new ServiceHandler(mServiceLooper);\n }",
"@Override\n\tpublic Service duplexstreamReceiveMsgPluginManagerServiceInit() {\n\t\treturn null;\n\t}",
"public void start()\n/* 354: */ {\n/* 355:434 */ onStartup();\n/* 356: */ }",
"public void start()\n throws Exception\n { \n log.info(\"Reading resource: \\\"\" + this.monitoredObjectsResName + \"\\\"\");\n \n // Organise the handle to the subscription definition resource\n InputStreamReader in = null;\n \n try {\n in = new InputStreamReader(\n this.getClass().getResourceAsStream(this.monitoredObjectsResName));\n }\n catch (Exception e) {\n log.error(\"Accessing resource \\\"\" + this.monitoredObjectsResName + \"\\\"\", e);\n throw e;\n }\n \n // Parse and read-in the resource file\n MonitoredObjList monitoredObjList = null;\n \n try {\n monitoredObjList = MonitoredObjList.unmarshal(in);\n }\n catch (Exception e) {\n log.error(\"Parsing resource \\\"\" + this.monitoredObjectsResName + \"\\\"\", e);\n throw e;\n }\n \n log.info(\"\\\"\" + this.monitoredObjectsResName + \"\\\" \" + \n (monitoredObjList.isValid() ? \"valid\" : \"invalid\") +\n \". Read \" + monitoredObjList.getMonitoredObjCount() + \n \" monitored objects\");\n \n log.info(\"Executing resource: \\\"\" + this.monitoredObjectsResName + \"\\\"\");\n \n // Organise enough space to store the subscribed object names\n this.monitoredObjectsCache =\n new ArrayList(monitoredObjList.getMonitoredObjCount());\n \n // Iterate over the read monitoredObjects and act upon them \n for (int i = 0; i < monitoredObjList.getMonitoredObjCount(); i++) {\n \n // Get monitored object\n MonitoredObj s = monitoredObjList.getMonitoredObj(i);\n \n // Get target object name\n String targetName = s.getObjectName();\n \n if (log.isDebugEnabled())\n log.debug(\"Object \" + i + \" target: \\\"\" + targetName + \"\\\"\");\n \n // Get event types that are of interest and fill in the notification\n // filter\n RegExpNotificationFilterSupport filter =\n new RegExpNotificationFilterSupport();\n \n for (int j = 0; j < s.getNotificationTypeCount(); j++) {\n String eventType = s.getNotificationType(j);\n \n try {\n filter.enableType(eventType);\n \n if (log.isDebugEnabled())\n log.debug(\"Event type \" + (j+1) + \": \\\"\" + eventType + \"\\\"\"); \n }\n catch (REException e) {\n log.warn(\"Error compiling monitored object #\" + i + \n \": Event type \\\"\" + eventType + \"\\\"\", e);\n } \n }\n \n try {\n // Subscribe the notification collector to the monitored object\n ObjectName targetObjectName = new ObjectName(targetName);\n \n server.addNotificationListener(\n targetObjectName, \n listener, \n filter, \n listener.toString());\n \n // Record the object that has been subscribed to \n this.monitoredObjectsCache.add(targetObjectName); \n } \n catch (Exception e) {\n log.warn(\"Error executing monitored object directive #\" + i, e);\n }\n }\n log.info(\"Subscription manager done\");\n }",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tmApplication = null;\n\t\tContext appCtx = getApplicationContext();\n\t\tif (appCtx instanceof DSCApplication) {\n\t\t\tmApplication = (DSCApplication) appCtx;\n\t\t}\n\t\tif (mApplication != null) {\n\t\t\tmApplication.initFolderObserverList(false);\n\t\t}\n\t}",
"public void onCreate() {\n super.onCreate();\n LogUtil.d(DownloadService.class, \"Service onCreate\");\n\n if (mSystemFacade == null) {\n mSystemFacade = new SystemFacade(this);\n }\n\n dao = DownloadInfoDao.getInstace(getApplication());\n\n mSystemFacade.cancelAllNotifications();\n\n mNetReceiver = new NetworkConnectionChangeReceiver();\n mNetReceiver.regist(this);\n\n updateFromProvider();\n }",
"public void onCreate() {\n Log.i(TAG, \"MinaClient create\");\r\n\r\n Thread thread = new Thread(this);\r\n thread.start();\r\n\r\n CommandHandle.getInstance().setContext(getApplicationContext());\r\n }",
"public void startFactory() {\n if (!isStarted) {\n logger.info(\"Starting SessionListenerFactory.\");\n APIEventBus.getInstance().subscribe(this);\n isStarted = true;\n }\n }",
"public static void start() {\n enableIncomingMessages(true);\n }",
"@PostConstruct\r\n public void init() {\r\n \t//registerNotificationCallback(null); //to register taskexecution engine as default\r\n ThreadFactory namedThreadFactory = new ThreadFactoryBuilder().setNameFormat(\"MARM-thread-%d\").build();\r\n \texecutor = Executors.newFixedThreadPool(10, namedThreadFactory);\r\n\r\n ThreadFactory brokerThreadFactory = new ThreadFactoryBuilder().setNameFormat(\"Broker-thread-%d\").build();\r\n brokerExecutor = Executors.newFixedThreadPool(10, brokerThreadFactory);\r\n\r\n ThreadFactory logThreadFactory = new ThreadFactoryBuilder().setNameFormat(\"LOG-thread-%d\").setPriority(Thread.MIN_PRIORITY).build();\r\n logExecutor = Executors.newFixedThreadPool(10, logThreadFactory);\r\n broker.registerInputListener(this);\r\n broker.registerControlListener(this);\r\n }",
"@Override\n\tpublic void onCreate() {\n\t\tif (smsReceiver != null) {\n\t\t\tactivity.registerReceiver(smsReceiver, new IntentFilter(\n\t\t\t\t\t\"android.provider.Telephony.SMS_RECEIVED\"));\n\t\t}\n\t\tasyncHttpClient = new AsyncHttpClient();\n\t\tSMSSDK.registerEventHandler(handler);\n\t\tcountDown();\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tLog.d(\"MyService\", \"OnCreat() get called\");\n\t\t\n\t\tIntent intent = new Intent(this, MainActivity.class);\n\t\tPendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);\n\t\t\n\t\tNotification.Builder builder = new Notification.Builder(this);\n\t\tbuilder.setSmallIcon(R.drawable.ic_launcher);\n\t\tbuilder.setTicker(\"This is ticker text\");\n\t\tbuilder.setContentTitle(\"This is notification title\");\n\t\tbuilder.setContentText(\"This is content body\");\n\t\tbuilder.setContentIntent(pendingIntent);\n\t\tbuilder.setAutoCancel(true);\n\t\tbuilder.setOngoing(false);\n\t\tbuilder.setSubText(\"This is subtext\");\n\t\tbuilder.setNumber(100);\n\t\tbuilder.setWhen(SystemClock.currentThreadTimeMillis());\n\t\tNotification notification = builder.build();\n\t\tstartForeground(1, notification);\n\t\tsuper.onCreate();\n\t}",
"public void start() {\n LOG.entering(CLASS_NAME, \"start\");\n if (state.compareAndSet(STOPPING, STARTED)) {\n // Keep same thread running if STOPPING\n }\n else if (state.compareAndSet(STOPPED, STARTED)) {\n new Thread(this, \"XoaEventProcessor\").start();\n }\n }",
"private void initSupportAggregate() {\n Intent intent = new Intent();\n intent.setClassName(\"com.miui.notification\", \"miui.notification.aggregation.NotificationListActivity\");\n boolean z = this.mContext.getPackageManager().resolveActivity(intent, 0) != null;\n sSupportAggregate = z;\n this.mBindTimes = 0;\n if (!z) {\n return;\n }\n if (!this.mHasBind || this.mNcService == null) {\n this.mHandler.removeMessages(10002);\n this.mHandler.sendEmptyMessage(10002);\n }\n }",
"public interface NotificationManager {\n\n\tvoid sendTicketCreateNotification(Ticket ticket);\n\n\tvoid sendTicketChangeNotification(TicketChange ticketChange);\n\n\tvoid sendCommentNotification(Comment comment);\n\n\tvoid sendAttachmentNotification(Attachment attachment);\n\n}",
"public void processStart(){\n initWorkerQueue();\n DataBean serverArgs = new DataBean();\n serverArgs.setValue(\"mode\",\"server\");\n serverArgs.setValue(\"messagekey\",\"72999\");\n serverArgs.setValue(\"user\",\"auth\");\n serverArgs.setValue(\"messagechannel\",\"/esb/system\");\n messageClient = new MessageClient(this,serverArgs);\n Helper.writeLog(1,\"starting message server\");\n messageClient.addHandler(this);\n \n }",
"public NotificationInterceptor() {\n mIsReady = false;\n mOnStartCommands = 0;\n mOnCreates = 0;\n }",
"@Override\n protected void preClientStart() {\n client.registerListener(new BuddycloudLocationChannelListener(\n getContentResolver()\n ));\n client.registerListener(new BuddycloudChannelMetadataListener(\n getContentResolver()\n ));\n BCConnectionAtomListener atomListener = new BCConnectionAtomListener(\n getContentResolver(), this);\n registerListener(atomListener);\n }",
"public void InitService() {\n\t\ttry {\r\n\t\t\tgetCommManager().register(this); \r\n\t\t} catch (CommunicationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private void initReceiver() {\n\t\tIntentFilter screenOnOffFilter = new IntentFilter(Intent.ACTION_SCREEN_OFF);\n\t\tscreenOnOffFilter.addAction(Intent.ACTION_SCREEN_ON);\n\t\tscreenOnOffFilter.addAction(Intent.ACTION_USER_PRESENT);\n\t\tscreenOnOffFilter.addAction(Intent.ACTION_PACKAGE_ADDED);\n\t\tscreenOnOffFilter.addAction(Intent.ACTION_PACKAGE_REMOVED);\n\t\tscreenOnOffFilter.addDataScheme(\"package\");\n\t\treceiver1 = new ScreenLockReceiver();\n\t\tmContext.registerReceiver(receiver1, screenOnOffFilter);\n\t}",
"private void initializeEvents() {\r\n\t}",
"void notifyStarted(MessageSnapshot snapshot);",
"protected void initialize(Watchdog watchdog, AndroidEvent event) {\n\t\t\t\n\t\t}",
"public void initialize(InfoflowManager manager);",
"@Override\n protected void init() {\n viewModel.setNavigator(this);\n setUp();\n subscribeToLiveData();\n\n setUpNotificationUi();\n setUpNotification();\n\n setUpAds();\n\n viewModel.start(getCurrentVersionOfApp());\n }",
"private synchronized void startEventThread() {\n if (eventThread == null) {\n eventThread = new EventHandlingThread(context);\n eventThread.setDaemon(true);\n eventThread.start();\n }\n }",
"@Override\n public void run()\n {\n Intent intent = new Intent(context, NotifyService.class);\n intent.putExtra(NotifyService.INTENT_NOTIFY, true);\n intent.putExtra(\"REMINDER\", showInfo);\n PendingIntent pendingIntent = PendingIntent.getService(context, 0, intent, 0);\n\n boolean alarmUp = (PendingIntent.getBroadcast(context, 0,\n new Intent(\"is.activites.scheduleActivites.INTENT_NOTIFY\"),\n PendingIntent.FLAG_NO_CREATE) != null);\n\n // Sets an alarm - note this alarm will be lost if the phone is turned off and on again\n if(!alarmUp) am.set(AlarmManager.RTC_WAKEUP, date.getTimeInMillis(), pendingIntent);\n }",
"@Override\n public void onCreate() {\n super.onCreate();\n\n // initialize helper class\n notificationHelper = new NotificationHelper(this);\n formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n }",
"public Notification()\n\t{\n\t\t// Start of user code constructor for Notification)\n\t\tsuper();\n\t\t// End of user code\n\t}",
"protected void onDiscoveryStarted() {\n logAndShowSnackbar(\"Subscription Started\");\n }",
"@Override\n\tprotected void start() {\n\t\tif (Cfg.DEBUG) {\n\t\t\tCheck.log(TAG + \" (actualStart)\");\n\t\t}\n\t\treadChatMessages();\n\t}",
"@Override\n\tpublic void onCreate(){\n\t\tmSmsListener = new SmsListener();\n\t\tIntentFilter filter = new IntentFilter();\n\t\tfilter.addAction(\"android.provider.Telephony.SMS_RECEIVED\");\n\t\tfilter.addAction(android.telephony.TelephonyManager.ACTION_PHONE_STATE_CHANGED);\n\t\tregisterReceiver(mSmsListener, filter);\n\t}"
] | [
"0.69507605",
"0.69491285",
"0.6528895",
"0.6392935",
"0.6326857",
"0.616864",
"0.615034",
"0.607628",
"0.6043532",
"0.60303766",
"0.6029723",
"0.59805137",
"0.592152",
"0.58750874",
"0.5867886",
"0.58652043",
"0.58424217",
"0.5821348",
"0.5815117",
"0.5792428",
"0.5771721",
"0.57607263",
"0.57400364",
"0.572993",
"0.57286435",
"0.57197464",
"0.57190686",
"0.5696513",
"0.56917703",
"0.5676655",
"0.5664126",
"0.5644795",
"0.5644192",
"0.5633726",
"0.56104475",
"0.5598927",
"0.55589324",
"0.55572003",
"0.55570483",
"0.5555081",
"0.5553673",
"0.55535096",
"0.5553057",
"0.5544279",
"0.55187154",
"0.5517434",
"0.551592",
"0.55114365",
"0.5502758",
"0.5492757",
"0.54869956",
"0.54793346",
"0.546571",
"0.5460262",
"0.54314935",
"0.5416965",
"0.54015326",
"0.53980756",
"0.53873134",
"0.5375521",
"0.5367623",
"0.536366",
"0.5331545",
"0.53285336",
"0.53242165",
"0.5323219",
"0.53147066",
"0.5312967",
"0.53123146",
"0.53034693",
"0.52991134",
"0.529306",
"0.5286591",
"0.52722275",
"0.5265746",
"0.5260891",
"0.5256212",
"0.5248122",
"0.5241244",
"0.52216196",
"0.5218673",
"0.5215392",
"0.52020055",
"0.5195297",
"0.51948124",
"0.5189233",
"0.5187661",
"0.5185852",
"0.51824546",
"0.5180852",
"0.5180671",
"0.51742435",
"0.51724565",
"0.5172386",
"0.51723015",
"0.51694167",
"0.51677704",
"0.5161503",
"0.5155075",
"0.5150399",
"0.51457185"
] | 0.0 | -1 |
crear vista y viewholder | @Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
LayoutInflater layoutInflater = LayoutInflater.from(context);
View viewCelda;
FragmentActivity unaActivity = (FragmentActivity) context;
FragmentManager fragmentManager = (FragmentManager) unaActivity.getSupportFragmentManager();
FragmentBusqueda fragmentBusqueda = (FragmentBusqueda) fragmentManager.findFragmentByTag("FragmentBuscador");
if (fragmentBusqueda != null && fragmentBusqueda.isVisible()) {
viewCelda = layoutInflater.inflate(R.layout.detalle_celda_busqueda, parent, false);
} else {
viewCelda = layoutInflater.inflate(R.layout.detalle_celda, parent, false);
}
FormatoViewHolder peliculasViewHolder = new FormatoViewHolder(viewCelda);
viewCelda.setOnClickListener(this);
return peliculasViewHolder;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ViewHolder(View itemView) {\n tvGrupo = (TextView) itemView.findViewById(R.id.tvGrupo);\n tvNCD = (TextView) itemView.findViewById(R.id.tvNCD);\n tvACD = (TextView) itemView.findViewById(R.id.tvACD);\n ivCD = (ImageView) itemView.findViewById(R.id.ivCD);\n }",
"public ItemHolder(@NonNull View itemView) {\n super(itemView);\n /*tvNombre=itemView.findViewById(R.id.tvNombre);\n tvCiudad=itemView.findViewById(R.id.etCiudad);\n btBorrar=itemView.findViewById(R.id.btBorrar);\n btEditar=itemView.findViewById(R.id.btEditar);\n cl = itemView.findViewById(R.id.cl);\n ivImagen = itemView.findViewById(R.id.ivImagen);*/\n }",
"@Override\n public void generarLinearLayoutV() {\n LinearLayoutManager llm = new LinearLayoutManager(getActivity());\n llm.setOrientation(LinearLayoutManager.VERTICAL);\n\n rvMascotas.setLayoutManager(llm);//le entrego el layout a mi lista\n\n }",
"public ViewHolder(@NonNull View itemView) {\n super(itemView);\n txvNombreMascotaDesparasitante = itemView.findViewById(R.id.txvNombreMascotaDesparasitante);\n txvNombreDesparasitante = itemView.findViewById(R.id.txvNombreDesparasitante);\n txvPesoDesparasitante = itemView.findViewById(R.id.txvPesoDesparasitante);\n txvFechaAplicacionDesparasitante = itemView.findViewById(R.id.txvFechaAplicacionDesparasitante);\n \n }",
"@NonNull\n @Override\n public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {\n\n View vista = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_desparasitante, parent, false);\n //RETORNAR INSTANCIA DE LA CLASE PERSONALIZADA PASANDO COMO ARGUMENTO LA VISTA CREADA\n return new ViewHolder(vista);\n }",
"private void genererListeView() {\n\n displayToast(\"Antall treff: \" + spisestedListe.size());\n\n //sorterer alfabetisk på navn\n Collections.sort(spisestedListe);\n\n spisestedAdapter = new SpisestedAdapter(this, spisestedListe);\n recyclerView.setAdapter(spisestedAdapter);\n\n //henter inn antall kolonner fra values, verdi 2 i landscape\n // https://stackoverflow.com/questions/29579811/changing-number-of-columns-with-gridlayoutmanager-and-recyclerview\n int columns = getResources().getInteger(R.integer.list_columns);\n recyclerView.setLayoutManager(new GridLayoutManager(this, columns));\n }",
"@Override\n\t public void onActivityCreated(Bundle state) {\n\t super.onActivityCreated(state);\n\t datos=listas.getListaconPlatillos();\n\t if(datos.isEmpty()){ // si ya no hay elementos u ordenes\n\t \t DetalleOrden Noelementos=new DetalleOrden();\n\t\t\t\tNoelementos.setmKeyOrden(\"0\");\n\t\t\t\tNoelementos.setmCantidad(\"\");\n\t\t\t\tNoelementos.setmKeyOrden(\"\");\n\t\t\t\tNoelementos.setmKeyPlatillo(\"\");\n\t\t\t\tNoelementos.setmNombrePlatillo(\"No hay más Ordenes\");\n\t\t\t\tNoelementos.setmNotaEspecial(\"\");\n\t\t\t\tNoelementos.setmNotaPromocion(\"\");\n\t\t\t\tdatos=new ArrayList<DetalleOrden>();\n\t\t datos.add(Noelementos);\n\t }\n\n\t \n\t ListaPlatillos = (ListView)getView().findViewById(R.id.Listado_Platillos); //Listado_Platillos es en el fragment_listado y hace referencia a ListaOrdenes\n\t \n\t // Al adapter personalizado le pasamos el contexto y la lista que contiene\t\n\t AdaptadorListaPlatillos adapter=new AdaptadorListaPlatillos(this,datos);\n\t // Añadimos el adapter al listview\n\t ListaPlatillos.setAdapter(adapter);//se ejecuta el montaje final ya con los datos\n \n\t \n\t }",
"private void crearVista() {\n\t\tVista vista = Vista.getInstancia();\n\t\tvista.addObservador(this);\n\n\t}",
"private View setupView(View v)\n {\n\n TextView item_name = (TextView)v.findViewById(R.id.item_name);\n TextView item_price = (TextView)v.findViewById(R.id.item_price);\n TextView item_description = (TextView)v.findViewById(R.id.item_description);\n\n add = (Button) v.findViewById(R.id.fabCart);\n add.setOnClickListener(this);\n mlike = (ImageView) v.findViewById(R.id.btnLike);\n mlike.setOnClickListener(this);\n\n if(mDescription != null) {\n item_name.setText(mDescription[Data.UzaData.NAME.ordinal()] + \" | \" + mDescription[Data.UzaData.SELLER.ordinal()]);\n item_price.setText(mDescription[Data.UzaData.PRICE.ordinal()]);\n item_description.setText(mDescription[Data.UzaData.DESCRIPTION.ordinal()]);\n }\n\n initPager(v);\n\n //TODO \"Show more pictures\" button\n //TODO \"Message\" button\n\n return v;\n }",
"public UsuariosHolder(View itemView) {\n super(itemView);\n respuesta = itemView.findViewById(R.id.respuestaaaa);\n }",
"public ViewHolder(View itemView) {\n super(itemView);\n tvNature = (TextView)itemView.findViewById(R.id.item_name);\n tvAmountNature = (TextView)itemView.findViewById(R.id.item_amount);\n }",
"public MyHolder(View itemView) {\n super(itemView);\n item = itemView.findViewById(R.id.item);\n noofpices = itemView.findViewById(R.id.noofpices);\n cost = itemView.findViewById(R.id.cost);\n amount = itemView.findViewById(R.id.total);\n plus = itemView.findViewById(R.id.plus);\n// minus = (ImageButton)itemView.findViewById(R.id.minus);\n delete = itemView.findViewById(R.id.del);\n\n // id= (TextView)itemView.findViewById(R.id.id);\n }",
"private void newGame() {\n //hashivneri zangvavnern enq inicializacnum\n hashiv_Zangvac_kom1 = new ArrayList<>();\n hashiv_Zangvac_kom2 = new ArrayList<>();\n\n//------------------------------ RecyvleView --------------------------\n// mer stexcac klas-i ekzemplyar enq stexcum\n recyclerViewItem_ArrayList = new ArrayList<>();\n//arajin toxn enq stanum hashivneri\n recyclerViewItem_ArrayList.add(new RecyclerViewItem(0, null));\n recyclerViewItem_ArrayList.add(new RecyclerViewItem(0, null));\n recyclerViewItem_ArrayList.add(new RecyclerViewItem(0, \"0\"));\n// ((LinearLayoutManager) recyclerView.getLayoutManager()).\n// scrollToPositionWithOffset(recyclerViewItem_ArrayList.size() - 1, 0);\n\n//tarmacnum enq adaptern, vor useri katarac popoxutyunnern erevan\n // adapter.notifyDataSetChanged();\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_list_resena, container, false);\n ButterKnife.inject(this, view);\n\n actionBarActivity = (AppCompatActivity) getActivity();// obtener actividad en q esta trabajando el fragment\n actionBarActivity.getSupportActionBar().setTitle(getResources().getString(R.string.app_name));// asignar\n actionBarActivity.getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n recyclerCercaDeMi.setHasFixedSize(true);\n RecyclerView.LayoutManager manager = new LinearLayoutManager(getActivity());\n recyclerCercaDeMi.setLayoutManager(manager);\n\n this.pos = vp.dataInformation();\n LOGI(\"ResenaRestaurantFragment POS\", Integer.toString(this.pos));\n LOGI(\" ResenaRestaurantFragment POS Array\", Integer.toString(UILApplication.ITEMS.get(this.pos).getId()));\n if (this.pos != -1) {\n LOGI(\"ResenaRestaurantFragment\", \"==NULL\");\n if (isAdded() && getActivity() != null) {\n if (!SQL.checkResena()) {\n if (Functions.isOnline()) {\n showView(true, mProgressView);\n LOGI(\"POS Array\", Integer.toString(UILApplication.ITEMS.get(this.pos).getId()));\n requestData(UILApplication.ITEMS.get(this.pos).getId());\n } else {\n showView(true, btnConexion);//agergar\n }\n } else {\n setDataAdapte(this.pos);\n }\n }\n }\n return view;\n }",
"public ViewHolder(View itemView) {\n // Stores the itemView in a public final member variable that can be used\n // to access the context from any ViewHolder instance.\n super(itemView);\n\n EmpirePortrait= (ImageView) itemView.findViewById(R.id.EmpirePortrait);\n nameTextView = (TextView) itemView.findViewById(R.id.EmpireName);\n deleteButton = (ImageButton) itemView.findViewById(R.id.EmpireDelete);\n FlagView = (ImageView) itemView.findViewById(R.id.EmpireFlag);\n ViewButton = (Button) itemView.findViewById(R.id.viewButton);\n }",
"@Override\n public void Create() {\n initView();\n initData();\n }",
"public EntrepriseHolder(@NonNull View itemView) {\n super(itemView);\n nom = itemView.findViewById(R.id.afficheNom);\n adresse = itemView.findViewById(R.id.afficheAdresse);\n ville = itemView.findViewById(R.id.afficheVille);\n nature = itemView.findViewById(R.id.afficheNature);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_puntos_de_venta, container, false);\n\n manager=new DataBaseManager(getActivity());\n lista=(ListView)view.findViewById(android.R.id.list);\n ednombre=(EditText) view.findViewById(R.id.e_nombre);\n\n String[] from = new String[]{manager.CN_NAME,manager.CN_LATITUD,manager.CN_LONGITUD};\n int[] to = new int[]{R.id.t_nombre,R.id.t_latitud,R.id.t_longitud};\n cursor = manager.cargarCursorSedes();\n adapter = new SimpleCursorAdapter(getActivity(),R.layout.items,cursor,from,to,0);\n lista.setAdapter(adapter);\n\n Button boton_buscar=(Button) view.findViewById(R.id.b_buscar);\n boton_buscar.setOnClickListener(this);\n Button boton_cargar=(Button) view.findViewById(R.id.b_cargar);\n boton_cargar.setOnClickListener(this);\n Button boton_almacenar=(Button) view.findViewById(R.id.b_almacenar);\n boton_almacenar.setOnClickListener(this);\n Button boton_eliminar=(Button) view.findViewById(R.id.b_eliminar);\n boton_eliminar.setOnClickListener(this);\n Button boton_actualizar=(Button) view.findViewById(R.id.b_actualizar);\n boton_actualizar.setOnClickListener(this);\n\n return view;\n }",
"public DependenciaViewHolder(View itemView) {\n super(itemView);\n\n //OnclickListener devolución de llamada que se invoca cuando se hace clic en una vista\n // dependencias..\n itemView.setOnClickListener(this);\n\n //el findViewById Encuentra el atributo id del XML que fue procesada en onCreate\n nombreDependencia = (TextView) itemView.findViewById(R.id.nombre_dependencia);\n numeroContactos= (TextView) itemView.findViewById(R.id.Cantidad_numeros);\n }",
"@Override\n public ListadoHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n //INFLATE A VIEW FROM XML\n View v= LayoutInflater.from(parent.getContext()).inflate(R.layout.listado_card_item,null);\n\n //HOLDER\n ListadoHolder holder=new ListadoHolder(v);\n\n return holder;\n }",
"@Override\n public void Create() {\n\n initView();\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_three, container, false);\n JudulMeme = new ArrayList<>();\n GambarMeme = new ArrayList<>();\n recyclerView = view.findViewById(R.id.recycler);\n DaftarItem();\n //Menggunakan Layout Manager, Dan Membuat List Secara Vertical\n layoutManager = new LinearLayoutManager(getContext());\n recyclerView.setLayoutManager(layoutManager);\n recyclerView.setHasFixedSize(true);\n recyclerView.setItemAnimator(new DefaultItemAnimator());\n adapter = new Adapte(JudulMeme, GambarMeme);\n //Memasang Adapter pada RecyclerView\n recyclerView.setAdapter(adapter);\n return view;\n }",
"@Override\n public Adaptador_Puntuaciones.ViewHolder onCreateViewHolder(ViewGroup parent,\n int viewType) {\n // create a new view\n View v = LayoutInflater.from(parent.getContext())\n .inflate(R.layout.activity_item_puntuaciones, parent, false);\n\n return new ViewHolder(v);\n }",
"@Override\n public void onEstadoCambiado() {\n fragment = new ListadoPeticionesRecibidasVista();\n getFragmentManager().beginTransaction().replace(R.id.content_main, fragment ).commit();\n\n }",
"private void setViews() {\n lv.setAdapter(adapter);\n\n dialog2 = new MiddleDialog2(INSTANCE, getResources().getString(R.string.title), getResources().getString(R.string.value), new MiddleDialog2.onBottonListener() {\n @Override\n public void onOk() {\n\n finish();\n }\n },R.style.registDialog);\n }",
"public ViewHolder(View itemView) {\n super(itemView);\n\n listName = (TextView) itemView.findViewById(R.id.listName);\n remainingItems = (TextView) itemView.findViewById(R.id.remainingItems);\n listButtonLayout = (LinearLayout) itemView.findViewById(R.id.listButtonLayout);\n btnView = (Button) listButtonLayout.findViewById(R.id.btnEditList);\n btnDeleteList = (Button) listButtonLayout.findViewById(R.id.btnDeleteList);\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_prefil, container, false);\n\n //ADAPTER\n //---------------------------------------------------------------------------------\n mascotas = new ArrayList<Mascota>();\n mascotas.add(new Mascota(\"\",10,R.drawable.perro1));\n mascotas.add(new Mascota(\"\",9,R.drawable.perro1));\n mascotas.add(new Mascota(\"\",8,R.drawable.perro1));\n mascotas.add(new Mascota(\"\",7,R.drawable.perro1));\n mascotas.add(new Mascota(\"\",6,R.drawable.perro1));\n mascotas.add(new Mascota(\"\",5,R.drawable.perro1));\n mascotas.add(new Mascota(\"\", 4, R.drawable.perro1));\n mascotas.add(new Mascota(\"\",3,R.drawable.perro1));\n mascotas.add(new Mascota(\"\", 0, R.drawable.perro1));\n\n\n rvPerfil = (RecyclerView) v.findViewById(R.id.rv_perfil);\n rvPerfil.setHasFixedSize(true);\n final GridLayoutManager glm= new GridLayoutManager(getActivity(),3,GridLayoutManager.VERTICAL,false);\n rvPerfil.setLayoutManager(glm);\n RVAdapter adapter = new RVAdapter(mascotas);\n rvPerfil.setAdapter(adapter);\n\n\n //FIN ADAPTER\n //-------------------------------------------------------------------------------------\n\n return v;\n }",
"public ViewDetalleVentas() {\n initComponents();\n }",
"@Override\n public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n View item = LayoutInflater.from(parent.getContext()).inflate(R.layout.item, parent, false);\n// Pasar la vista (item.xml) al ViewHolder\n ViewHolder viewHolder = new ViewHolder(item);\n return viewHolder;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View view = inflater.inflate(R.layout.fragment_nhiemvu, container, false);\n // set Context\n context = view.getContext();\n // get connect database\n conectDatabase = new ConectDatabase(context);\n\n arrayList = conectDatabase.getAllMission();\n\n // find ID\n btAdd = (Button) view.findViewById(R.id.btAdd);\n listMission = (ListView) view.findViewById(R.id.listViewMission);\n finishList = (ListView) view.findViewById(R.id.finistList);\n linearLayout = view.findViewById(R.id.formIPMission);\n btAddFinish = view.findViewById(R.id.btAddMission);\n edtIpMission = view.findViewById(R.id.edtIPMission);\n btTime = view.findViewById(R.id.btTime);\n bottomsheet = view.findViewById(R.id.bottom_sheet);\n sheetBehavior = BottomSheetBehavior.from((bottomsheet));\n //set Layout\n setLayout();\n // set Action;\n setAction();\n\n return view;\n }",
"@Override\n public MinhaViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n View v = layoutInflater.inflate(R.layout.lista_viagem, parent, false);\n MinhaViewHolder minhaViewHolder = new MinhaViewHolder(v);\n return minhaViewHolder;\n }",
"private void initLsitData() {\n\t\tlist = new ArrayList<View>();\n\n\t\tlist.add(new NewsMenupagerItem(Mactivity,TY).initView());\n\t\tlist.add(new NewsMenupagerItem(Mactivity,YL).initView());\n\t\tlist.add(new NewsMenupagerItem(Mactivity,QW).initView());\n\t\tlist.add(new NewsMenupagerItem(Mactivity,MV).initView());\n\n\n\t}",
"public SrvINFONEGOCIO(AgregarInfoNegocio view) {//C.P.M Tendremos un constructor con la vista de agregar informacion de negocio\r\n this.vista = view;//C.P.M Se la agregamos a la variable para tener acceso a la vista \r\n }",
"public NoticiaViewHolder(View itemView) {\n super(itemView);\n itemView.setOnClickListener(this);\n txtTitulo = (TextView) itemView.findViewById(R.id.titulo);\n\n\n }",
"@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle\n savedInstanceState) {\n View view = inflater.inflate(R.layout.frament_photo_preview, container, false);\n unbinder = ButterKnife.bind(this, view);\n if (savedInstanceState != null) {\n ArrayList<String> name = savedInstanceState.getStringArrayList(\"name\");\n ArrayList<String> time = savedInstanceState.getStringArrayList(\"time\");\n ArrayList<Integer> size = savedInstanceState.getIntegerArrayList(\"size\");\n photoLists = new ArrayList<>();\n int length = name.size();\n for (int i = 0; i < length; i++) {\n Model temp = new Model(name.get(i), time.get(i), size.get(i));\n photoLists.add(temp);\n }\n currentItem = (savedInstanceState.getInt(\"position\"));\n customDialogOR = savedInstanceState.getBoolean(\"customDialogOR\");\n }\n if (photoLists.size() != 0) {\n initData();\n }\n reload = true;\n return view;\n }",
"public ViewHolder (View view){\n super(view);\n jView = view;\n //tvJoin = (TextView) view.findViewById(R.id.tvGroup);\n tvGroupTitle = view.findViewById(R.id.tvGroupTitle);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_levante_detalle, container, false);\n\n activity = getActivity();\n\n idlenvate = getArguments() != null ? getArguments().getString(\"idanimal\") : \"000000\";\n\n init(view);\n iniciarFirebaseListLevante();\n cargarDetalleLevante(idlenvate);\n\n\n img_cancelar.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n openFragmentRecyclerLevante();\n\n }\n });\n\n\n img_editar.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n LevanteGestionarFragment.modo = 1;\n openFragmentLevanteGestionar(idlenvate);\n\n }\n });\n\n\n return view;\n }",
"public ViewHolder(View itemView) {\n // Stores the itemView in a public final member variable that can be used\n // to access the context from any ViewHolder instance.\n super(itemView);\n\n /* designation_txt = (TextView) itemView.findViewById(R.id.designation_txt);\n name_txt = (TextView) itemView.findViewById(R.id.name_txt);\n number_txt = (TextView) itemView.findViewById(R.id.number_txt);*/\n\n }",
"private void creerMethode() {\n if (estValide()) {\n methode = new Methode();\n methode.setNom(textFieldNom.getText());\n methode.setVisibilite(comboBoxVisibilite.getValue());\n methode.setType(comboBoxType.getValue());\n ArrayList<Parametre> temp = new ArrayList<>();\n for (Parametre parametre : parametreListView.getItems())\n temp.add(parametre);\n methode.setParametres(temp);\n close();\n }\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v= inflater.inflate(R.layout.fragment_recycler, container, false);\n\n v.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Toast.makeText(getActivity(), \"BOTON 1 PRESIONADO\", Toast.LENGTH_SHORT).show();\n }\n });\n\n\n recyclerView = v.findViewById(R.id.recyclerView);\n LinearLayoutManager llm = new LinearLayoutManager(getContext());\n llm.setOrientation(LinearLayoutManager.VERTICAL);\n\n recyclerView.setLayoutManager(llm);\n recyclerView.setAdapter(amigosAdapter);\n return v;\n }",
"@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.articulo_fragment_grande, container, false);\n\n mTitle = (TextView) v.findViewById(R.id.articulo_title);\n mTitle.setText(mArticulo.getNombre());\n\n mFecha=(TextView) v.findViewById(R.id.articulo_fecha);\n mFecha.setText((mArticulo.getFecha()));\n\n mGenero=(TextView) v.findViewById(R.id.articulo_genero);\n mGenero.setText(mArticulo.getGenero());\n\n mIdioma=(TextView) v.findViewById((R.id.articulo_idioma));\n mIdioma.setText(mArticulo.getIdioma());\n\n mPrecio=(TextView) v.findViewById(R.id.articulo_precio);\n mPrecio.setText(String.valueOf(mArticulo.getPrecio()));\n\n mSeleccionado=v.findViewById(R.id.icono_carrito);\n mSeleccionado.setImageResource(\n mArticulo.isEnListaCompra()?android.R.drawable.ic_delete:android.R.drawable.ic_input_add\n );\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_edit_bebida, container, false);\n\n reciclador =(RecyclerView)view.findViewById(R.id.reciclador);\n layout = new GridLayoutManager(getActivity(),2);\n reciclador.setLayoutManager(layout);\n adaptador = new AdaptadorEditBebida(getContext(),getArguments().getInt(\"TIPO\"));\n Principal ma = (Principal) getActivity();\n // 0 nombre de producto\n // 1 Precio del producto\n // 2 cantidad del producto\n // 3 imagen de producto\n Cursor c;\n if(getArguments().getInt(\"TIPO\")==1){\n c = ma.datos.getCursorQuery(\"SELECT producto.nombre, producto.precio, producto.cantidad,producto.imagen,producto.id \" +\n \"FROM producto\");\n }else if(getArguments().getInt(\"TIPO\")==2){\n c = ma.datos.getCursorQuery(\"SELECT insumo.nombre, insumo.cantidad,insumo.imagen,insumo.id \" +\n \"FROM insumo\");\n }else {\n c = null;\n }\n\n adaptador.swapCursor(c);\n reciclador.setAdapter(adaptador);\n return view;\n }",
"@NonNull\n @Override\n public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {\n ImageView imgCiudad;\n TextView txtTemp,txtDesc,txtCiudad;\n\n //identificar si la fila existe si no se debe de creear y si si se debe de rellenar\n View vwMifila = convertView;\n if(vwMifila == null){//la fila no existe de debe de crear\n //el inflar solo existe en una actividad que exista\n LayoutInflater liCrearLayout = ((Activity)cnContexto).getLayoutInflater();\n vwMifila = liCrearLayout.inflate(iMiLayout,parent,false);\n }else{//la fila existe se debe de llenar\n\n }\n // recuperar los componentes\n txtCiudad = (TextView) vwMifila.findViewById(R.id.txtCiudad);\n txtTemp = (TextView) vwMifila.findViewById(R.id.txtTem);\n txtDesc=(TextView)vwMifila.findViewById(R.id.txtDesc);\n imgCiudad=(ImageView) vwMifila.findViewById(R.id.imgClima);\n imgCiudad.setImageResource(datos[position].getImage());\n txtCiudad.setText(datos[position].getCiudad());\n txtTemp.setText(datos[position].getTem());\n txtDesc.setText(datos[position].getDesClima());\n return vwMifila;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_cistella, container, false);\n tvPreuTotal = view.findViewById(R.id.textview_fragment_cistella_preutotal);\n cistellaRecyclerViewAdapter = new CistellaRecyclerViewAdapter(comanda.getMapa(), comanda, tvPreuTotal);\n recyclerView = view.findViewById(R.id.recycler_fragment_cistella);\n recyclerView.setLayoutManager(new LinearLayoutManager(view.getContext()));\n recyclerView.setAdapter(cistellaRecyclerViewAdapter);\n cistellaRecyclerViewAdapter.notifyDataSetChanged();\n Button myButton = (Button) view.findViewById(R.id.button_fragment_cistella_enviar);\n myButton.setOnClickListener((View.OnClickListener) this);\n\n //Preu total de la comanda\n showPreuTotalComanda();\n\n return view;\n }",
"public ViewHolder(View itemView) {\n super(itemView);\n this.productName = itemView.findViewById(R.id.productName);\n// this.productDesc = itemView.findViewById(R.id.productDesc);\n// this.productPrice = itemView.findViewById(R.id.productPrice);\n// this.imageView = itemView.findViewById(R.id.productImage);\n itemView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n onClickListener.orderType(v, getAdapterPosition());\n }\n });\n }",
"@Override\n public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n View view = LayoutInflater.from(parent.getContext())\n .inflate(R.layout.list_avisos, null, false);\n view.setOnClickListener(this);\n return new ViewHolder(view);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_noches_jugadas, container, false);\n RecyclerView reciclerNochesJugadas = view.findViewById(R.id.reciclerNochesJugadas);\n data = new DataSQL(getContext());\n noches=data.getNochesJugadas();\n\n adaptadorNochesJugadas adaptadorNochesJugadas = new adaptadorNochesJugadas(noches,getActivity());\n reciclerNochesJugadas.setAdapter(adaptadorNochesJugadas);\n reciclerNochesJugadas.setLayoutManager(new LinearLayoutManager(getActivity()));\n reciclerNochesJugadas.setHasFixedSize(true);\n return view;\n }",
"private void addViews() {\n\t}",
"@NonNull\n @Override\n public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {\n //Infla una variable del tipo itemBT\n\n\n int layout = viewType == TYPE_VINCULADO?R.layout.itembt_vinculado:R.layout.itembt;\n View view = LayoutInflater.from(parent.getContext()).inflate(layout, parent,false);\n //retorna una instancia del tipo ViewHolder (clase estatica que hemos creado) :v\n //como parametro necesita una view, es decir la instancia que acabamos de inflar a partir del layout que le indicamos.\n //de la clase interna :v\n return new ViewHolder(view,leerClickedElement,viewType);\n }",
"public void inicializaVista (View v, final Heroe success){\r\n\t\tTextView textView = (TextView)v.findViewById(R.id.nombre);\r\n\t\ttextView.setText(success.getName());\r\n\t\t\r\n\t\tTextView subTitulo = (TextView)v.findViewById(R.id.subtitulo);\r\n\t\tsubTitulo.setText(success.getRol());\r\n\t\t\r\n\t\tImageView imagen = (ImageView) v.findViewById(R.id.icono);\r\n\t\tUri.Builder uriB = new Uri.Builder();\r\n\t uriB.path(Environment.getExternalStorageDirectory().getAbsolutePath() + \"/fotosDota2/\" +success.getPhoto()+\".png\");\r\n imagen.setImageURI(uriB.build());\r\n\t\t\r\n\t\tfinal ImageButton imageButton = (ImageButton) v.findViewById(R.id.botonBuscar);\r\n\t\tif (success.getGusta()==1)\r\n\t\t\timageButton.setImageResource(android.R.drawable.btn_star_big_on);\r\n\t\telse\r\n\t\t\timageButton.setImageResource(android.R.drawable.btn_star_big_off);\r\n\t\t\r\n\t\timageButton.setOnClickListener(new View.OnClickListener() {\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t\r\n\t\t\t\t BBDDHeroe bdHero = new BBDDHeroe(actividad);\r\n\t\t\t\t if (success.getGusta()==1)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t \tsuccess.setGusta(0);\r\n\t\t\t\t\t \tbdHero.update(success);\r\n\t\t\t\t\t \timageButton.setImageResource(android.R.drawable.btn_star_big_off);\r\n\t\t\t\t\t }\r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t\t success.setGusta(1);\r\n\t\t\t\t\t bdHero.update(success);\r\n\t\t\t\t\t imageButton.setImageResource(android.R.drawable.btn_star_big_on);\r\n\t\t\t\t }\r\n\t\t\t\t\t \r\n\t\t\t}\r\n\t\t});\r\n\t}",
"public ViewCreatePagamento() {\n initComponents();\n clientesDAO cDAO = DaoFactory.createClientesDao(); \n matriculaDAO mDAO = DaoFactory.createMatriculaDao();\n \n cmbIDClientes.addItem(null);\n cDAO.findAll().forEach((p) -> {\n cmbIDClientes.addItem(p.getNome());\n });\n \n \n txtDataAtual.setText(DateFormat.getDateInstance().format(new Date()));\n }",
"@SuppressLint(\"ResourceAsColor\")\r\n\tprivate void initView() {\n\t\tfriendOneBtn = (Button)getActivity().findViewById(R.id.friend_one_btn);\r\n\t\tfriendTwoBtn = (Button) getActivity().findViewById(R.id.friend_two_btn);\r\n\t\tcursorImage = (ImageView)getActivity().findViewById(R.id.cursor);\r\n\t\t// 进入添加好友页\r\n\t\tfriendOneBtn.setOnClickListener(listener);\r\n\t\tfriendTwoBtn.setOnClickListener(listener);\r\n\t\t\r\n\t\tunreadLabel = (TextView) getActivity().findViewById(R.id.unread_msg_number);\r\n unreadAddressLable = (TextView) getActivity().findViewById(R.id.unread_address_number);\r\n ImageView addContactView = (ImageView) getView().findViewById(R.id.iv_new_contact);\r\n\t\t// 进入添加好友页\r\n\t\taddContactView.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tstartActivity(new Intent(getActivity(), AddContactActivity.class));\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"public void viewHandler(View v) {\n LinearLayout vwParentRow = (LinearLayout)v.getParent();\n TextView id =(TextView) vwParentRow.findViewById(R.id._id);\n Intent intent = new Intent(Hates.this, Formulario.class);\n\n intent.putExtra(C_MODO, C_VISUALIZAR);\n intent.putExtra(mDbHelper.ID, Long.valueOf((String)id.getText()));\n\n\n this.startActivityForResult(intent, C_VISUALIZAR);\n }",
"private void createListView()\n {\n itens = new ArrayList<ItemListViewCarrossel>();\n ItemListViewCarrossel item1 = new ItemListViewCarrossel(\"Guilherme Biff\");\n ItemListViewCarrossel item2 = new ItemListViewCarrossel(\"Lucas Volgarini\");\n ItemListViewCarrossel item3 = new ItemListViewCarrossel(\"Eduardo Ricoldi\");\n\n\n ItemListViewCarrossel item4 = new ItemListViewCarrossel(\"Guilh\");\n ItemListViewCarrossel item5 = new ItemListViewCarrossel(\"Luc\");\n ItemListViewCarrossel item6 = new ItemListViewCarrossel(\"Edu\");\n ItemListViewCarrossel item7 = new ItemListViewCarrossel(\"Fe\");\n\n ItemListViewCarrossel item8 = new ItemListViewCarrossel(\"iff\");\n ItemListViewCarrossel item9 = new ItemListViewCarrossel(\"Lucini\");\n ItemListViewCarrossel item10 = new ItemListViewCarrossel(\"Educoldi\");\n ItemListViewCarrossel item11 = new ItemListViewCarrossel(\"Felgo\");\n\n itens.add(item1);\n itens.add(item2);\n itens.add(item3);\n itens.add(item4);\n\n itens.add(item5);\n itens.add(item6);\n itens.add(item7);\n itens.add(item8);\n\n itens.add(item9);\n itens.add(item10);\n itens.add(item11);\n\n //Cria o adapter\n adapterListView = new AdapterLsitView(this, itens);\n\n //Define o Adapter\n listView.setAdapter(adapterListView);\n //Cor quando a lista é selecionada para ralagem.\n listView.setCacheColorHint(Color.TRANSPARENT);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View r = inflater.inflate(R.layout.fragment_tin_tuc, container, false);\n gvmon_233 = r.findViewById(R.id.gv_mon);\n spadt_233 = new tintucAdapter(thongbao_list.this.getActivity(), R.layout.tintucitem);\n gvmon_233.setAdapter(spadt_233);\n registerForContextMenu(gvmon_233);\n fakeData();\n // addEvents();\n return r;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_recyclerview, container, false);\n\n rvMascotas = (RecyclerView) v.findViewById(R.id.rvMascotas);//ahora buscamos en esta vista\n\n //llamamos este metodo para poder ver las mascotas en nuestra pantalla\n presenter = new RecyclerViewFragmentPresentador(this,getContext());\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n HashMap<String, String> map = new HashMap<String, String>();\n //FILL\n for (int i = 0; i < players.length; i++) {\n map = new HashMap<String, String>();\n map.put(\"Player\", players[i]);\n map.put(\"Desc\", desc[i]);\n map.put(\"Image\", Integer.toString(images[i]));\n map.put(\"Imagemain\", Integer.toString(imagemain[i]));\n data.add(map);\n }\n //KEYS IN MAP\n String[] from = {\"Player\",\"Desc\", \"Image\"};\n //IDS OF VIEWS\n int[] to = {R.id.textView3, R.id.nameTxt, R.id.imageView1};\n//ADAPTER\n adapter = new SimpleAdapter(getActivity(), data, R.layout.model, from, to);\n setListAdapter(adapter);\n return super.onCreateView(inflater, container, savedInstanceState);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_info_recibir,container,false);\n recyclerComunicado = view.findViewById(R.id.id_recycler_comunicados);\n\n database = FirebaseDatabase.getInstance();\n databaseReference = database.getReference(\"comunicados\");\n\n adaptadorComunicado = new AdaptadorComunicados(getContext());\n linearLayoutManager = new LinearLayoutManager(getContext());\n\n return view;\n }",
"ViewHolder(View itemView) {\n super(itemView);\n //Initialize the views\n imageView = (NetworkImageView) itemView.findViewById(R.id.foto_ustad);\n nama = (TextView) itemView.findViewById(R.id.nama_list);\n alamat = (TextView) itemView.findViewById(R.id.alamat_list);\n bidang = (TextView) itemView.findViewById(R.id.bidang_list);\n harga = (TextView) itemView.findViewById(R.id.hargalist);\n itemView.setOnClickListener(this);\n }",
"public void nouveau(){\r\n try {\r\n viewEtudiantInscripEcheance = new ViewEtudiantInscriptionEcheance();\r\n echeance_etudiant = new EcoEcheanceEtudiant(); \r\n \r\n } catch (Exception e) {\r\n System.err.println(\"Erreur capturée : \"+e);\r\n }\r\n }",
"private void initVistas() {\n // La actividad responderá al pulsar el botón.\n Button btnSolicitar = (Button) this.findViewById(R.id.btnSolicitar);\n btnSolicitar.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n solicitarDatos();\n }\n });\n lblDatos = (TextView) this.findViewById(R.id.lblDatos);\n }",
"@Override\n public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {\n super.onViewCreated(view, savedInstanceState);\n\n idVentas = view.findViewById(R.id.txtIDVenta);\n ventas = view.findViewById(R.id.txtVentas);\n //nombre = view.findViewById(R.id.txtFirma);\n spinnerMes = view.findViewById(R.id.spinnerMes);\n spinnerAño = view.findViewById(R.id.spinnerAño);\n añadir = view.findViewById(R.id.btnAñadir);\n\n String[] arregloMeses = {\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"};\n ArrayAdapter adaptador = new ArrayAdapter(getActivity(), android.R.layout.simple_spinner_item, arregloMeses);\n\n ArrayList arrayListAños = new ArrayList();\n int thisYear = Calendar.getInstance().get(Calendar.YEAR);\n\n for (int i = 2000; i <= thisYear; i++) {\n arrayListAños.add(i);\n }\n ArrayAdapter adaptador2 = new ArrayAdapter(getActivity(), android.R.layout.simple_spinner_item, arrayListAños);\n\n spinnerMes.setAdapter(adaptador);\n spinnerAño.setAdapter(adaptador2);\n\n añadir.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n agregarVenta(v);\n }\n });\n\n }",
"@Override\n public void bind(@NonNull ViewHolder viewHolder, int position) {\n TextView nomePosto = viewHolder.itemView.findViewById(R.id.vl_nomeParceiroItem);\n TextView endereco = viewHolder.itemView.findViewById(R.id.vl_enderecoDenunciaItem);\n TextView bairro = viewHolder.itemView.findViewById(R.id.vl_bairroDenunciaItem);\n TextView cidade = viewHolder.itemView.findViewById(R.id.vc_cidadeDenunciaItem);\n ImageView bandeiraIcone = viewHolder.itemView.findViewById(R.id.im_bandeiraDenunciaItem);\n TextView cnpj = viewHolder.itemView.findViewById(R.id.vl_cnpjDenunciaItem);\n TextView reclacamacoes = viewHolder.itemView.findViewById(R.id.vl_totalReclamacoes);\n\n\n //CARREGANDO IMAGEM DAS BANDEIRAS TESTANDO PARA CADA UM DOS POSTOS\n if (posto.getBandeira().equalsIgnoreCase(\"PETROBRAS\")) {\n Picasso.get()\n .load(\"https://firebasestorage.googleapis.com/v0/b/kartel-59019.appspot.com/o/images%2FbandeiraPetrobras.jpg?alt=media&token=d53b4fee-d299-4422-a9e7-43d034613ec5\")\n .into(bandeiraIcone);\n }\n if (posto.getBandeira().equalsIgnoreCase(\"IPIRANGA\")) {\n Picasso.get()\n .load(\"https://firebasestorage.googleapis.com/v0/b/kartel-59019.appspot.com/o/images%2FbandeiraIpiranga.jpg?alt=media&token=b0c55805-61cc-45f2-886f-51be07bb0fed\")\n .into(bandeiraIcone);\n }\n if (posto.getBandeira().equalsIgnoreCase(\"SHELL\")) {\n Picasso.get()\n .load(\"https://firebasestorage.googleapis.com/v0/b/kartel-59019.appspot.com/o/images%2FbandeiraShell.jpg?alt=media&token=4874b289-f988-4dce-aa09-7011f0e1db9e\")\n .into(bandeiraIcone);\n }\n if (posto.getBandeira().equalsIgnoreCase(\"MEGAPETRO\")) {\n Picasso.get()\n .load(\"https://firebasestorage.googleapis.com/v0/b/kartel-59019.appspot.com/o/images%2FbandeiraMegapetro.jpg?alt=media&token=71eed8b5-05f4-4e81-9a40-e4081bcf8de6\")\n .into(bandeiraIcone);\n }\n if (posto.getBandeira().equalsIgnoreCase(\"BRANCA\")) {\n Picasso.get()\n .load(\"https://firebasestorage.googleapis.com/v0/b/kartel-59019.appspot.com/o/images%2FbandeiraBranca.jpg?alt=media&token=bee27663-f1a9-48bc-9243-6856f95929f7\")\n .into(bandeiraIcone);\n }\n\n //POPULANDO DADOS DO ITEM COM O RESTANTE DOS ATRIBUTOS\n nomePosto.setText(posto.getNome());\n endereco.setText(posto.getEndereco());\n bairro.setText(posto.getBairro());\n cidade.setText(posto.getCidade());\n cnpj.setText(posto.getCnpj());\n reclacamacoes.setText(\"\" + count);\n\n }",
"Vaisseau_positionner createVaisseau_positionner();",
"public ViewHolder(View itemView) {\n super(itemView);\n imageView = itemView.findViewById(R.id.ivSomeImage);\n textView = itemView.findViewById(R.id.tvSomeText);\n }",
"public void constructView(){\n\n int id = getResources().getIdentifier(\"ej\"+id_ejercicio, \"drawable\", getPackageName());\n Log.e(\"test\", \"Resource id: \"+id);\n if(id == 0 ){\n id = getResources().getIdentifier(\"gimsy\", \"drawable\", getPackageName());\n }\n imagen.setImageDrawable( getResources().getDrawable(id));\n\n data = \"id=\" + id_ejercicio;\n PostData post = new PostData(data, url); // Ejemplo de lo que devuelve: { \"msg\":\"Success\", \"data\":[{\"id\":\"1\", \"nombre\":\"Biceps con Mancuerna\", \"descripcion\":\"Aqui una explicacion de mierda sobre como hacer este ejercicio.\", \"repeticiones\":\"12\", \"secs\":\"40\" }] }\n String ejercicioJSON = post.postData();\n Log.e(\"test\", ejercicioJSON);\n\n try {\n JSONObject json = new JSONObject( ejercicioJSON);\n JSONArray arr = json.getJSONArray(\"data\");\n numTotalEjercicios=arr.length();\n\n JSONObject defDataJSON = arr.getJSONObject(0);\n repeticiones.setText(defDataJSON.getString(\"repeticiones\") + \" repeticiones\");\n descripcion.setText(defDataJSON.getString(\"descripcion\"));\n _musculo.setText(defDataJSON.getString(\"nombre\"));\n\n }catch(JSONException jsonEx){\n Log.e(\"test\", \"Failed to convert to JSON\");\n jsonEx.printStackTrace();\n }\n\n }",
"public void annuler(){\r\n try {\r\n viewEtudiantInscripEcheance = new ViewEtudiantInscriptionEcheance();\r\n echeance_etudiant = new EcoEcheanceEtudiant(); \r\n \r\n } catch (Exception e) {\r\n System.err.println(\"Erreur capturée : \"+e);\r\n }\r\n }",
"@Override\n public ProductosHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n View v= LayoutInflater.from(parent.getContext())\n .inflate(R.layout.item_producto,parent,false);\n return new ProductosHolder(v);\n }",
"@Override\n public view_holder onCreateViewHolder(ViewGroup parent, int viewType) {\n view_holder view = new view_holder(LayoutInflater.from(a).inflate(R.layout.cell,parent,false));\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_lista_prestaciones_bm, container, false);\n rvPrestacionesBM = view.findViewById(R.id.rvPrestacionBM);\n rvPrestacionesBM.setLayoutManager(new LinearLayoutManager(getContext()));\n\n vm = ViewModelProvider.AndroidViewModelFactory.getInstance(getActivity().getApplication()).create(ListaPrestacionesViewModel.class);\n\n vm.getListaPrestaciones().observe(getViewLifecycleOwner(), new Observer<ArrayList<Prestacion>>() {\n @Override\n public void onChanged(final ArrayList<Prestacion> prestacions) {\n AdaptadorPrestacion adaptador = new AdaptadorPrestacion(prestacions, getContext());\n\n adaptador.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Prestacion prestacion = prestacions.get(rvPrestacionesBM.getChildAdapterPosition(v));\n Bundle bundle=new Bundle();\n bundle.putSerializable(\"prestacion\", prestacion);\n Navigation.findNavController(v).navigate(R.id.nav_prestacionMB, bundle);\n }\n });\n\n rvPrestacionesBM.setAdapter(adaptador);\n }\n });\n\n vm.cargarDatos();\n\n return view;\n }",
"@Override\n public void initViews() {\n adapter = new PaymentAdapter(context, MainActivity.os.getPayments());\n ((ListView)views.get(\"LIST_VIEW\")).setAdapter(adapter);\n (views.get(\"ADD_BUTTON\")).setOnClickListener(this);\n }",
"public ViewHolder(View itemView) {\n // Stores the itemView in a public final member variable that can be used\n // to access the context from any ViewHolder instance.\n super(itemView);\n int position = getAdapterPosition();\n\n\n nameTextView = (TextView) itemView.findViewById(R.id.contact_name);\n messageButton = (Button) itemView.findViewById(R.id.message_button);\n messageButton.setOnClickListener(new ButtonClick(this));\n itemView.setOnClickListener(this);\n\n }",
"public void setUpViews(){\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\n @Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n // ListView Clicked item index\n Intent i = new Intent(getActivity(), MediaDetailActivity.class);\n Media media = lectures.get(position);\n i.putExtra(\"url\", media.getUrl());\n i.putExtra(\"type\", media.type);\n i.putExtra(\"author\", media.author);\n i.putExtra(\"author_image_url\", media.getImageUrl());\n i.putExtra(\"name\", media.getName());\n startActivity(i);\n }\n });\n }",
"private void fillData() {\n String[] from = new String[] {\n NOMBRE_OBJETO,\n DESCRIPCION,\n TEXTURA\n };\n // Campos de la interfaz a los que mapeamos\n int[] to = new int[] {\n R.id.txtNombreObjeto,\n R.id.txtDescripcion,\n R.id.imgIconoObjeto\n };\n getLoaderManager().initLoader(OBJETOS_LOADER, null, this);\n ListView lvObjetos = (ListView) findViewById(R.id.listaObjetos);\n adapter = new SimpleCursorAdapter(this, R.layout.activity_tiendaobjetos_filaobjeto, null, from, to, 0);\n lvObjetos.setAdapter(adapter);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tView v = inflater.inflate(R.layout.activity_menuutama_wp, null);\r\n\r\n\t\tsh = getActivity().getSharedPreferences(Parameter_Collections.SH_NAME, Context.MODE_PRIVATE);\r\n\r\n\t\trv = (RecyclerView)v.findViewById(R.id.recycler_view);\r\n\t\tlayoutManager = new GridLayoutManager(getActivity(), 1);\r\n\t\trv.setLayoutManager(layoutManager);\t\t\r\n\t\tadapter = new Olx_RecyclerAdapter_MenuUtama(getActivity(), getActivity());\r\n\t\trv.setAdapter(adapter);\r\n\t\t\r\n\t\treturn v;\r\n\t}",
"private void prepareView(){\n mAvatar = (ImageButton)findViewById(R.id.btnAvatar);\n mAvatar.setOnClickListener(this);\n\n mName = (TextView)findViewById(R.id.tvName);\n mEmail = (TextView)findViewById(R.id.tvEmail);\n mWelcome = (TextView)findViewById(R.id.tvSelectionTitle);\n\n mDesigner = (ImageButton)findViewById(R.id.btnDesigner);\n mDesigner.setOnClickListener(this);\n\n mDeveloper = (ImageButton)findViewById(R.id.btnDeveloper);\n mDeveloper.setOnClickListener(this);\n }",
"@NonNull\n @Override\n public ViewHolderMisFotos onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {\n View layoutDeCadaItem = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_layout_mis_fotos, parent, false);\n ViewHolderMisFotos viewHolder = new ViewHolderMisFotos(layoutDeCadaItem);\n viewHolder.seleccion = seleccionados;\n return viewHolder;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View Usulan = inflater.inflate(R.layout.fragment_usulan_semua_warga, container, false);\n\n mRecyclerView = (RecyclerView) Usulan.findViewById(R.id.recyclerTemp);\n modelDataList = new ArrayList<>();\n manager = new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false);\n mRecyclerView.setLayoutManager(manager);\n mAdapter = new AdapterDataUsulan(getActivity(), modelDataList);\n mRecyclerView.setAdapter(mAdapter);\n getUsulanSemua();\n\n return Usulan;\n }",
"public void carregarTableViewVendas() {\n\t\ttableColumnVendasCodigo.setCellValueFactory(new PropertyValueFactory<>(\"id_venda\"));\n\t\ttableColumnVendasData.setCellValueFactory(new PropertyValueFactory<>(\"data\"));\n\t\ttableColumnVendasVendedor.setCellValueFactory(new PropertyValueFactory<>(\"vendedor\"));\n\t\ttableColumnVendasTotal.setCellValueFactory(new PropertyValueFactory<>(\"total_venda\"));\n\n\t\tlistVendas = vendaDAO.listar();\n\n\t\tobservableListVendas = FXCollections.observableArrayList(listVendas);\n\t\ttableViewVendas.setItems(observableListVendas);\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_primeiro, container, false);\n\n initViews(view);\n\n botaoAndroid.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n SistemaOperacional sistemaOperacional = new SistemaOperacional(\"ANDROID\", R.drawable.android);\n\n comunicador.envioDadosSistemaOperaciona(sistemaOperacional);\n\n }\n });\n\n return view;\n }",
"ViewHolder(View itemView) {\n super(itemView);\n // Initialize the views.\n titleTemaText = itemView.findViewById(R.id.titleDetail);\n userTemaText = itemView.findViewById(R.id.userDetail);\n cuerpoTemaText = itemView.findViewById(R.id.cuerpoTema);\n userRespuestaText = itemView.findViewById(R.id.usuarioRespuesta);\n cuerpoRespuestaText = itemView.findViewById(R.id.cuerpoRespuesta);\n ctgBackground = itemView.findViewById(R.id.ctgBackground);\n fondoRespuesta = itemView.findViewById(R.id.fondoRespuesta);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view =inflater.inflate(R.layout.fragment_fragment_recycler_obras, container, false);\n i=0;\n artistas = new ArrayList<>();\n pinturas = new ArrayList<>();\n obras = new ArrayList<>();\n context = getContext();\n bundle = getArguments();\n recyclerView = view.findViewById(R.id.recyclerViewObras);\n obrasRecyclerViewAdapter= new ObrasRecyclerViewAdapter(obras,this, isOnline());\n recyclerView.setLayoutManager(new LinearLayoutManager(getContext(), RecyclerView.VERTICAL,false));\n recyclerView.setAdapter(obrasRecyclerViewAdapter);\n\n if(isOnline()) {\n getObrasOnline();\n }else{\n cargaOffline();\n }\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_detail_jadwal_dokter, container, false);\n initView();\n tampilDataDetail();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_temp, container, false);\n appData = this.getActivity().getSharedPreferences(\"appData\", MODE_PRIVATE); //설정값을 가지고 온다\n load();\n// change(); //이미 path가 존재하면\n// if(sharedCodiPath.equals(\"\")) { // path = coordyPath\n// loadCodi();\n// }\n getLike(); //좋아요한 정보 가져오기\n loadCodi(); //공유된 코디 가져오기\n init();\n\n tempAdapter = new TempGridAdater (getActivity(), R.layout.item_temp_gridview, coordyItemslist);\n gridView.setExpended(true);\n gridView.setAdapter(tempAdapter);\n\n return view;\n }",
"private void initView() {\n un = findViewById(R.id.un);\n deux = findViewById(R.id.deux);\n trois = findViewById(R.id.trois);\n quatre = findViewById(R.id.quatre);\n cinq = findViewById(R.id.cinq);\n six = findViewById(R.id.six);\n sept = findViewById(R.id.sept);\n huit = findViewById(R.id.huit);\n neuf = findViewById(R.id.neuf);\n zero = findViewById(R.id.zero);\n etoile = findViewById(R.id.etoile);\n diaize = findViewById(R.id.diaize);\n call_btn = findViewById(R.id.appeler);\n tableView = findViewById(R.id.ecran);\n edit_search = findViewById(R.id.edit_search);\n efface = findViewById(R.id.effacer);\n setComposer = findViewById(R.id.set_composer);\n paletteComposition = findViewById(R.id.palette_de_composition);\n\n if (is_search) {\n setComposer.setVisibility(View.GONE);\n paletteComposition.setVisibility(View.GONE);\n edit_search.setFocusable(true);\n }\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_keranjang, container, false);\n\n lv_item_keranjang = view.findViewById(R.id.lv_keranjang);\n\n tv_harga_total = view.findViewById(R.id.tv_harga_total);\n\n setItem();\n\n return view;\n }",
"@Override\n public void onViewCreate() {\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_rencana_latihan, container, false);\n rv_recentOpen = (RecyclerView) rootView.findViewById(R.id.rv_recentOpen);\n rv_list1 = (RecyclerView) rootView.findViewById(R.id.rv_list1);\n rv_list2 = (RecyclerView) rootView.findViewById(R.id.rv_list2);\n v_noRecent = (View) rootView.findViewById(R.id.v_noRencent);\n TextView tv_selengkapnya1 = (TextView) rootView.findViewById(R.id.tv_selengkapnya1);\n TextView tv_selengkapnya2 = (TextView) rootView.findViewById(R.id.tv_selengkapnya2);\n progress();\n rencanaPresenter = new RencanaPresenter(this, getContext());\n rencanaPresenter.getListRencana();\n mProgress.show();\n tv_selengkapnya1.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent data = new Intent(getActivity(), RencanaLatihanDetail.class);\n data.putExtra(\"judul\", \"list1\");\n getActivity().startActivity(data);\n }\n });\n\n tv_selengkapnya2.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent data = new Intent(getActivity(), RencanaLatihanDetail.class);\n data.putExtra(\"judul\", \"list2\");\n getActivity().startActivity(data);\n }\n });\n\n\n return rootView;\n }",
"public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_horario, container, false);\n //context=container.getContext();\n Castear();\n recycler2.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL,false));\n listReserva=new ArrayList<>();\n recycler2.setLayoutManager(new LinearLayoutManager(getActivity()));\n consultarLista();\n AdaptadorDatos adapter=new AdaptadorDatos(listReserva);\n recycler2.setAdapter(adapter);\n horario.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n recycler2.setVisibility(View.VISIBLE);\n }\n });\n\n return view;\n }",
"@Override\n public void onClick(View v) {\n ItemsModel item = itemsModelListFiltered.get(position);\n ItemViewF itemViewGirl = new ItemViewF();\n Bundle args = new Bundle();\n args.putSerializable(\"item\", item);\n itemViewGirl.setArguments(args);\n\n getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container,\n itemViewGirl).addToBackStack(null).commit();\n }",
"TaskukirjaListAdapter(Context context) { mInflater = LayoutInflater.from(context); }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n final EgitimKatilimci dItem = (EgitimKatilimci) this.faaliyet_detay_tablo_list.get(position);\n final EgitimKatilimciAdapter.DetayBilgiOzetItemHolder drawerHolder;\n view = convertView;\n\n\n if (view == null) {\n LayoutInflater inflater = ((Activity) context).getLayoutInflater();\n drawerHolder = new EgitimKatilimciAdapter.DetayBilgiOzetItemHolder();\n\n view = inflater.inflate(layoutResID, parent, false);\n drawerHolder.birinci_item = (TextView) view.findViewById(R.id.birinci_item);\n drawerHolder.ikinci_item = (TextView) view.findViewById(R.id.ikinci_item);\n drawerHolder.ucuncu_item = (TextView) view.findViewById(R.id.ucuncu_item);\n \n view.setTag(drawerHolder);\n\n } else {\n drawerHolder = (EgitimKatilimciAdapter.DetayBilgiOzetItemHolder) view.getTag();\n }\n\n\n if (dItem.getBirimAdi() != null)\n drawerHolder.birinci_item.setText(dItem.getBirimAdi().toString());\n else\n drawerHolder.birinci_item.setText(\"\");\n\n\n if (dItem.getEgitimTanim() != null)\n drawerHolder.ikinci_item.setText(dItem.getEgitimTanim().toString());\n else\n drawerHolder.ikinci_item.setText(\"\");\n\n\n if (dItem.getKatilimciAdi() != null)\n drawerHolder.ucuncu_item.setText(dItem.getKatilimciAdi().toString());\n else\n drawerHolder.ucuncu_item.setText(\"\");\n\n\n\n return view;\n }",
"private void inicializaListView(){\n }",
"@Override\n public AdapterJocuri4JucatoriInEchipa.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n Context context = parent.getContext();\n LayoutInflater inflater = LayoutInflater.from(context);\n\n // Inflate the custom layout\n View itemsMenuPatruJucatoriInEchipaView = inflater.inflate(R.layout.items_menu_partide_4_jucatori_in_echipa, parent, false);\n\n // Return a new holder instance\n AdapterJocuri4JucatoriInEchipa.ViewHolder viewHolder = new AdapterJocuri4JucatoriInEchipa.ViewHolder(itemsMenuPatruJucatoriInEchipaView);\n return viewHolder;\n }",
"private View creatView(ViewGroup parent) {\n\t\tView convertView;\n\t\tViewHolder vh = new ViewHolder();\n\t\tconvertView = LayoutInflater.from(mContext).inflate(R.layout.message_function_layout, parent, false);\n\t\tvh.mImageView = (ImageView)convertView.findViewById(R.id.message_function_btn);\n\t\tvh.mTextView = (TextView)convertView.findViewById(R.id.message_function_name);\n\t\tconvertView.setTag(vh);\n\t\treturn convertView;\n\t}",
"public ViewDetallesPagos () {\r\n\r\n }",
"private void creaPannelli() {\n /* variabili e costanti locali di lavoro */\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* pannello date */\n pan = this.creaPanDate();\n this.addPannello(pan);\n\n /* pannello coperti */\n PanCoperti panCoperti = new PanCoperti();\n this.setPanCoperti(panCoperti);\n this.addPannello(panCoperti);\n\n\n /* pannello placeholder per il Navigatore risultati */\n /* il navigatore vi viene inserito in fase di inizializzazione */\n pan = new PannelloFlusso(Layout.ORIENTAMENTO_ORIZZONTALE);\n this.setPanNavigatore(pan);\n this.addPannello(pan);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n }",
"@Override\n public NoticiaViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n\n //Se infla el view con el ImagenView y el TextView del layout resumen_de_noticia\n View itemView = LayoutInflater.from(parent.getContext())\n .inflate(R.layout.resumen_de_noticia, parent, false);\n\n\n //Se guarda en peliculaVH el view inflado para no tener que cargarlo despues\n NoticiaViewHolder noticiaVH = new NoticiaViewHolder(itemView);\n\n //Se retorna\n return noticiaVH;\n }",
"@Override\n public void mostrarMediosRecientesRv() {\n iPerfilFragmentView.inicializarAdaptadorRV(iPerfilFragmentView.crearAdaptador(mascotas));\n iPerfilFragmentView.generarGridLayout();// Luego se debe indicar que genere el GridLayout\n }",
"private void innit()\n {\n btn_seen = view.findViewById(R.id.btn_seen);\n list_thongbao = view.findViewById(R.id.listview_bacsi_thongbao);\n tv_none_notification = view.findViewById(R.id.tv_nonenoti);\n swipeRefreshLayout = view.findViewById(R.id.swipe_refresh_layout);\n Arr_listthongbao = new ArrayList<>();\n thongbaoadapter = new bacsi_thongbaolist_adapter(getActivity(),R.layout.bacsi_thongbao_customadapter,Arr_listthongbao);\n }"
] | [
"0.69834083",
"0.6978602",
"0.6905135",
"0.6837441",
"0.6671022",
"0.66662794",
"0.6660435",
"0.66389626",
"0.65238655",
"0.65183675",
"0.65144455",
"0.6495591",
"0.6489402",
"0.64833796",
"0.6472317",
"0.64536613",
"0.64507765",
"0.6435414",
"0.64271736",
"0.6424313",
"0.64232844",
"0.64065194",
"0.63904727",
"0.6388789",
"0.6385982",
"0.6381514",
"0.63808566",
"0.63764375",
"0.6357329",
"0.635455",
"0.634552",
"0.6340138",
"0.63390416",
"0.63271683",
"0.6327026",
"0.63214576",
"0.6300959",
"0.629294",
"0.6279558",
"0.6275863",
"0.6275359",
"0.6272756",
"0.62706363",
"0.6267517",
"0.6262262",
"0.625759",
"0.62533957",
"0.62478876",
"0.6241183",
"0.62402475",
"0.623884",
"0.62387747",
"0.62363696",
"0.62341124",
"0.62260634",
"0.6221325",
"0.6207019",
"0.6205753",
"0.6203205",
"0.6202765",
"0.6194056",
"0.61923134",
"0.61895776",
"0.61894315",
"0.61860687",
"0.61779946",
"0.61725056",
"0.61689717",
"0.6164238",
"0.61620045",
"0.6159665",
"0.61559284",
"0.61553377",
"0.6153739",
"0.6150923",
"0.6150234",
"0.61488765",
"0.6144575",
"0.61390877",
"0.61337054",
"0.6131647",
"0.61296546",
"0.61289704",
"0.6128066",
"0.6127504",
"0.6122957",
"0.61197525",
"0.6109662",
"0.61007303",
"0.6096949",
"0.60935134",
"0.6087407",
"0.6086897",
"0.6084881",
"0.608455",
"0.608296",
"0.6075458",
"0.60734975",
"0.606274",
"0.6056258",
"0.60547876"
] | 0.0 | -1 |
Gref = new Firebase(" | public void cekNotif(){
try{
Gref.addChildEventListener(new ChildEventListener() {
@Override
public void onChildAdded(DataSnapshot dataSnapshot, String s) {
String a = dataSnapshot.child("to_id").getValue().toString();
if (a.equals(BerandaActivity.id)){
Toast.makeText(context.getApplicationContext(),"Ada pesan komunitas baru",Toast.LENGTH_SHORT).show();
}
}
@Override
public void onChildChanged(DataSnapshot dataSnapshot, String s) {
}
@Override
public void onChildRemoved(DataSnapshot dataSnapshot) {
}
@Override
public void onChildMoved(DataSnapshot dataSnapshot, String s) {
}
@Override
public void onCancelled(FirebaseError firebaseError) {
}
});}
catch (Exception e){
Log.e("eror add child : ",""+e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void iniciarFirebase(){\n FirebaseApp.initializeApp(getApplicationContext());\n firebaseDatabase = FirebaseDatabase.getInstance();\n databaseReference = firebaseDatabase.getReference();\n }",
"private FirebaseUtil(){}",
"private void initFirebase() {\n //инициализируем наше приложение для Firebase согласно параметрам в google-services.json\n // (google-services.json - файл, с настройками для firebase, кот. мы получили во время регистрации)\n FirebaseApp.initializeApp(this);\n //получаем точку входа для базы данных\n database = FirebaseDatabase.getInstance();\n myRef = database.getReference();\n\n }",
"private void initFirebase() {\n database = FirebaseDatabase.getInstance();\n user = FirebaseAuth.getInstance().getCurrentUser();\n dRef = database.getReference(\"Trails\");\n }",
"private void initFirebase() {\n FirebaseApp.initializeApp(this);\n firebaseDatabase = FirebaseDatabase.getInstance();\n databaseReference = firebaseDatabase.getReference();\n storageReference = FirebaseStorage.getInstance().getReference();\n }",
"private void iniciarBaseDeDatos(){\n db_reference = FirebaseDatabase.getInstance().getReference();\n\n }",
"public static DatabaseReference getFirebaseDatabase(){\n\n if (firebase == null){\n firebase = FirebaseDatabase.getInstance().getReference();\n }\n return firebase;\n }",
"private FirebaseDAO() {}",
"private DataManager() {\n ref = FirebaseStorage.getInstance().getReference();\n }",
"public static DatabaseReference getFirebaseDataBase(){\n if(firebase==null){\n firebase = FirebaseDatabase.getInstance().getReference();\n }\n return firebase;\n }",
"private void setupFirebase(){\n FirebaseAuth firebaseAuth = FirebaseAuth.getInstance();\n FirebaseUser user = firebaseAuth.getCurrentUser();\n\n FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();\n if (user!=null){\n databaseReference = firebaseDatabase.getReference(\"Users\").child(user.getUid()).child(\"teacher\");\n }\n }",
"public static DatabaseReference getFirebaseDatabase() {\n if (referenciaFirebase == null) {\n referenciaFirebase = FirebaseDatabase.getInstance().getReference();\n }\n return referenciaFirebase;\n }",
"public static void setupFirebase(Context context) {\n // initialised Firebase\n com.firebase.client.Firebase.setAndroidContext(context);\n }",
"public AndroidInterfaceClass(){\n database = FirebaseDatabase.getInstance(\"https://brainstorming-1fa06-default-rtdb.europe-west1.firebasedatabase.app/\");\n }",
"private void sendGuideRegDataToFireBase(){\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n //Firebase.setAndroidContext(this);\n MainActivity.firebaseRef = FirebaseDatabase.getInstance().getReferenceFromUrl(MainActivity.FIREBASEREF);\n //setContentView(R.layout.activity_login);\n callLoginDialog();\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n email = (EditText) findViewById(R.id.etmail);\n password = (EditText) findViewById(R.id.etPassword);\n registr = (Button) findViewById(R.id.regsbtn);\n comment = (TextView) findViewById(R.id.textView);\n logbtn = (Button) findViewById(R.id.logbtn);\n\n Authinticate = FirebaseAuth.getInstance();\n registr.setOnClickListener(this);\n logbtn.setOnClickListener(this);\n // database = FirebaseDatabase.getInstance();\n //databaseReference = database.getReference();\n\n\n }",
"public interface FirebaseService {\n public void init();\n}",
"public static StorageReference getFirebaseStorage() {\n if (referenciaStorage == null) {\n referenciaStorage = FirebaseStorage.getInstance().getReference();\n }\n\n return referenciaStorage;\n }",
"@Override\r\n public void onCreate(Bundle savedInstanceState) {\r\n mFirebaseDatabase = FirebaseDatabase.getInstance();\r\n mFirebaseDatabaseReference = mFirebaseDatabase.getReference().child(\"room\");\r\n super.onCreate(savedInstanceState);\r\n }",
"public MyFirebaseMessagingService() {\n// mContext = this;\n }",
"private void setupFirebaseAuth(){\n Log.d(TAG, \"setupFirebaseAuth: setting up firebase auth.\");\n\n mAuth = FirebaseAuth.getInstance();\n mFirebaseDatabase = FirebaseDatabase.getInstance();\n myRef = mFirebaseDatabase.getReference();\n\n mAuthListener = new FirebaseAuth.AuthStateListener() {\n @Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n\n if (user != null) {\n // User is signed in\n Log.d(TAG, \"onAuthStateChanged:signed_in:\" + user.getUid());\n } else {\n // User is signed out\n Log.d(TAG, \"onAuthStateChanged:signed_out\");\n }\n // ...\n }\n };\n\n\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_storage);\n\n // [START storage_field_initialization]\n FirebaseStorage storage = FirebaseStorage.getInstance();\n // [END storage_field_initialization]\n\n includesForCreateReference();\n }",
"@Override\n public void onCancelled(FirebaseError firebaseError) {\n }",
"public static DatabaseReference getBase() {\n return FirebaseDatabase.getInstance().getReference();\n }",
"public void inicializarFirebaseAuth() {\n refAutenticacaofb = ConfiguracaoFirebase.metodoAutenticacaoFirebase();\n }",
"@Override\n public void onError(FirebaseError firebaseError) {\n }",
"public DatabaseReference open() {\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n myPokemonDbRef = database.getReference(PokemonDataTag);\n return myPokemonDbRef;\n }",
"public static DatabaseReference get_database_reference(String node) {\n DatabaseReference myRef = FirebaseDatabase.getInstance().getReference(node);\n return myRef;\n }",
"private void setupFirebase() {\r\n mFirebaseDatabase = FirebaseDatabase.getInstance();\r\n mFirebaseDatabaseReference = mFirebaseDatabase.getReference().child(Constants.ROOM_DATABASE_REFERENCE);\r\n mQuery = mFirebaseDatabaseReference.orderByChild(Constants.ROOM_INT_REFERENCE).startAt(Utils.convertHallStart(mHallStart)).endAt(Utils.convertHallEnd(mHallEnd));\r\n }",
"@Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"The read failed: \" + firebaseError.getMessage());\n }",
"@Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"The read failed: \" + firebaseError.getMessage());\n }",
"@Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"The read failed: \" + firebaseError.getMessage());\n }",
"@Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"The read failed: \" + firebaseError.getMessage());\n }",
"private void setFirebase() {\n auth = FirebaseAuth.getInstance();\n\n //get current user\n final FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n\n authListener = new FirebaseAuth.AuthStateListener() {\n @Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n if (user == null) {\n // user auth state is changed - user is null\n // launch login activity\n startActivity(new Intent(MainActivity.this, LoginActivity.class));\n finish();\n }\n }\n };\n }",
"public DatabaseConnector() {\n\n try {\n firebaseAuth = FirebaseAuth.getInstance();\n //Firebase Instance..\n authStateListener = new FirebaseAuth.AuthStateListener() {\n @Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n if(user !=null) {\n Log.d(TAG, \"onAuthStateChanged: ***********\" + user.getUid());\n } else Log.d(TAG, \"onAuthStateChanged: ______________\");\n }\n };\n firebaseAuth.addAuthStateListener(authStateListener);\n } catch (Exception e) {\n Log.d(\"DatabaseConnector\", \"DatabaseConnector: Constructor | Error: \" + e.getMessage());\n }\n\n }",
"private void uploadreferance(String myurl,String filename) {\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference myRef = database.getReference(\"Upload\");\n\n\n hashMap.put(\"url\",myurl);\n hashMap.put(\"filename\",filename);\n\n\n\n myRef.push().setValue(hashMap);\n\n\n }",
"@PostConstruct\r\n\tprivate void firebaseLogIn() {\n\t\ttry {\r\n\r\n\t\t\tInputStream serviceAccount = getClass()\r\n\t\t\t\t\t.getResourceAsStream(\"/avisosnick-firebase-adminsdk-ln9j6-55140aa5db.json\");\r\n\r\n//\t\t\t\t\tnew FileInputStream(\r\n//\t\t\t\t\t\"src/main/resources/avisosnick-firebase-adminsdk-ln9j6-55140aa5db.json\");\r\n\r\n\t\t\tFirebaseOptions options = FirebaseOptions.builder()\r\n\t\t\t\t\t.setCredentials(GoogleCredentials.fromStream(serviceAccount))\r\n\t\t\t\t\t.setDatabaseUrl(\"https://avisosnick.firebaseio.com\").build();\r\n\r\n\t\t\tFirebaseApp.initializeApp(options);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}",
"public static FirebaseDatabase getDatabase() {\n //Start Work here\n if (mFirebaseDatabase != null) {\n mFirebaseDatabase = FirebaseDatabase.getInstance();\n } else if (mFirebaseDatabase == null) {\n mFirebaseDatabase = FirebaseDatabase.getInstance();\n// mFirebaseDatabase.setPersistenceEnabled(true);\n }\n return mFirebaseDatabase;\n }",
"private void addMember(String firstName, String lastName, String emailId) {\n Log.e(\"AddMember\", \"Fn \" + firstName + \", Ln \" + lastName + \"eid \" + emailId);\n\n\n// myRef.setValue(\"Hello, World!\");\n String key = myRef.push().getKey();\n Log.e(\"AddMember\", \"key \" + key);\n\n CoreMember member = new CoreMember(firstName, lastName, emailId);\n myRef.child(key).setValue(member, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n if (databaseError != null) {\n System.out.println(\"Data could not be saved \" + databaseError.getMessage());\n } else {\n System.out.println(\"Data saved successfully.\" + databaseReference.toString());\n memberKey = databaseReference.getKey();\n hideInputForm(true);\n\n }\n }\n });\n }",
"public static void initialize() {\n //Get Firebase auth instance\n GlobalData.auth = FirebaseAuth.getInstance();\n\n GlobalData.u = new User();\n GlobalData.u.setId(\"Hh7qGadAgPeRUJYAEGjvRu845DC3\");//\n Thread t = new Thread(new Runnable() {\n @Override\n public void run() {\n /**\n * Start Firebase!\n */\n FirebaseCore.start();\n// User u = new User();\n// u.setId(\"6ZxSGeHS4DOoFHEE2McBcGH7XHP2\");\n//\n// try {\n// u = DUser.crud(u, true);\n// } catch (Exception e) {\n// e.printStackTrace();\n// }\n// Log.e(\"Test\", u.getEmail());\n//\n// Message m = new Message();\n// m.setMessage(\"Hello \" + System.currentTimeMillis());\n// m.setBlobname(null);\n// m.setBlob(null);\n// m.setTimestamp(System.currentTimeMillis());\n//\n// try {\n// m.setOrder(DAutoIncrement.order(DAutoIncrement.MESSAGE));\n//\n// m = DMessage.crud(m, false, false);\n// Message m2 = new Message();\n// m2.setId(m.getId());\n// m2 = DMessage.crud(m2, true, false);\n//// Log.w(\"Message\",m2.getId());\n// Message m3 = new Message();\n// m3.setId(m.getId());\n//// DMessage.crud(m3,false, true);\n//// Log.w(\"Message2\",m3.getId());\n// DMessageList.crd(u, u, m, false, false);\n//\n// final ArrayList<Message> messages = DMessageList.crd(u, u, null, true, false);\n// for (Message mes : messages\n// ) {\n// DMessage.crud(mes, true, false); // Fill the message with data\n//\n// }\n// // Sorting require all messages element to be filled, otherwise, it won't work\n// Collections.sort(messages);\n// for (Message mes : messages\n// ) {\n// Log.e(mes.getId(), mes.getMessage());\n//\n// }\n//\n// RunnableDataSnapshot rds = new RunnableDataSnapshot() {\n// @Override\n// public void run(DataSnapshot dataSnapshot, Object object) {\n// ArrayList<Message> messages2 = (ArrayList<Message>) object;\n// Collections.sort(messages2);\n// for (int i = messages.size(); i < messages2.size(); i++) {\n// Log.e(\"New Input\", messages2.get(i).getId());\n// messages.add(messages2.get(i));\n// }\n// Log.e(\"Data change\", \"Data is changing\");\n// }\n// };\n// DMessageList.nonblockRead(u, u, rds);\n// User u2 = new User();\n// u2.setId(\"Hh7qGadAgPeRUJYAEGjvRu845DC3\");\n// ArrayList<User> users = new ArrayList<User>();\n// users.add(u2);\n// HashMap<String, ArrayList<User>> hm = new HashMap<String, ArrayList<User>>();\n// hm.put(\"Group 1\", users);\n// DBroadcast.uBroadcastPushorDelete(u, hm, true);\n// ArrayList<User> users2 = new ArrayList<User>();\n// users2.add(u);\n// users2.add(u2); // it add itself which must be avoided!\n// HashMap<String, ArrayList<User>> hm2 = new HashMap<String, ArrayList<User>>();\n// hm.put(\"Group 2\", users2);\n// DBroadcast.uBroadcastPushorDelete(u2, hm2, true);\n// } catch (Exception e) {\n// e.printStackTrace();\n// }\n }\n });\n t.start();\n\n }",
"@Override\n public void onCreate() {\n super.onCreate();\n if(!FirebaseApp.getApps(this).isEmpty()) {\n FirebaseDatabase.getInstance().setPersistenceEnabled(true);\n }\n appInstance = this;\n\n\n\n }",
"private void setupFirebaseAuth(){\r\n Log.d(TAG, \"setupFirebaseAuth: setting up setupFirebaseAuth\");\r\n\r\n mAuth = FirebaseAuth.getInstance();\r\n mFirebaseDatabase = FirebaseDatabase.getInstance();\r\n myRef = mFirebaseDatabase.getReference();\r\n\r\n mAuthListener = new FirebaseAuth.AuthStateListener() {\r\n @Override\r\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\r\n FirebaseUser user = firebaseAuth.getCurrentUser();\r\n\r\n if (user != null) {\r\n // User is signed in\r\n Log.d(TAG, \"onAuthStateChanged:signed_in:\" + user.getUid());\r\n } else {\r\n // User is signed out\r\n Log.d(TAG, \"onAuthStateChanged:signed_out\");\r\n }\r\n // ...\r\n }\r\n };\r\n\r\n myRef.addValueEventListener(new ValueEventListener() {\r\n @Override\r\n public void onDataChange(DataSnapshot dataSnapshot) {\r\n\r\n // retrieve user info from database\r\n// setProfileWidgets(mFirebaseMethods.getUserSettings(dataSnapshot));\r\n\r\n // retrieve job Post info from database\r\n// setJobPost(mFirebaseMethods.getUserSettings(dataSnapshot));\r\n// mFirebaseMethods.addNewJobPost(job_date,job_description, job_title,user_name );\r\n\r\n //retrieve bids from database\r\n\r\n\r\n }\r\n\r\n @Override\r\n public void onCancelled(DatabaseError databaseError) {\r\n\r\n }\r\n });\r\n\r\n }",
"public void initConnection() {\n try {\n FileInputStream serviceAccount = new FileInputStream(\"serviceAccountKey.json\");\n\n FirebaseOptions options = new FirebaseOptions.Builder()\n .setCredentials(GoogleCredentials.fromStream(serviceAccount))\n .setDatabaseUrl(\"https://yieldcomparisontool.firebaseio.com\")\n .build();\n try {\n if (FirebaseApp.getInstance(FirebaseApp.DEFAULT_APP_NAME) == null) {\n FirebaseApp.initializeApp(options);\n }\n } catch (IllegalStateException e) {\n FirebaseApp.initializeApp(options);\n }\n } catch (IOException e) {\n System.out.println(\"ERROR Invalid Firebase Service account credentials.\");\n System.out.println(e);\n System.exit(1);\n }\n }",
"public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n @SuppressWarnings(\"VisibleForTests\")\n Uri downloadUrI = taskSnapshot.getDownloadUrl();\n FirebasePost firebasePost = new FirebasePost();\n firebasePost.imageUrl = downloadUrI.toString();\n myImage.child(\"home\").setValue(firebasePost);\n\n\n }",
"@Override\n public void onError(FirebaseError firebaseError) {\n Log.d(\"LOGIN\", \"Registration error\");\n }",
"@Override\n public void onCancelled(DatabaseError firebaseError) {\n }",
"@Override\n public View onCreateView ( LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState )\n {\n reff= FirebaseDatabase.getInstance(\"https://childhelpline-5e6f0-default-rtdb.firebaseio.com/\").getReference().child(\"clientinfo\");\n\n\n /* loginn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick ( View v ) {\n insertinfo();\n\n Intent intent = new Intent(getActivity().getBaseContext(), chat.class);\n startActivity(intent);\n\n }\n });\n*/\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment_repoter, container, false);\n }",
"public void onClick(View v) {\n EditText email = (EditText) findViewById(R.id.email);\n final String emailString = email.getText().toString();\n\n EditText pass = (EditText) findViewById(R.id.pass);\n final String passString = pass.getText().toString();\n Firebase ref = new Firebase(\"https://gymguy.firebaseio.com\");\n\n // Create a handler to handle the result of the authentication\n Firebase.AuthResultHandler authResultHandler = new Firebase.AuthResultHandler() {\n @Override\n public void onAuthenticated(AuthData authData) {\n // Authenticated successfully with payload authData\n\n Context context = getApplicationContext();\n CharSequence text = \"Logged in\";\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n //save uid\n //remove uid\n SharedPreferences sharedPref = getApplicationContext().getSharedPreferences(\n getString(R.string.preference_file_key), Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"uid\", authData.getUid().toString());\n editor.commit();\n\n Intent goToNextActivity = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(goToNextActivity);\n }\n\n @Override\n public void onAuthenticationError(FirebaseError firebaseError) {\n // Authenticated failed with error firebaseError\n Context context = getApplicationContext();\n// CharSequence text = firebaseError.getMessage() + \" : for \" + emailString + passString + firebaseError.getDetails();\n CharSequence text = firebaseError.getMessage() + \" : \" + firebaseError.getDetails();\n int duration = Toast.LENGTH_LONG;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }\n };\n\n // Authenticate users with a custom Firebase token\n// ref.authWithCustomToken(\"<token>\", authResultHandler);\n // Or with an email/password combination\n ref.authWithPassword(emailString, passString, authResultHandler);\n }",
"public void firebaseAdd(HashMap hashMap){\n DatabaseReference myref = FirebaseDatabase.getInstance().getReference(hashMap.get(\"CafeId\").toString()).child(\"Menu\").child(hashMap.get(\"MenuKatagori\").toString()).child(hashMap.get(\"KatagoriId\").toString());\n myref.child(\"Fiyat\").setValue(hashMap.get(\"YeniDeger\").toString());\n\n\n }",
"private void SaveUserToFirebase(FirebaseUser user)\n {\n\n }",
"@Override\n public void onError(FirebaseError firebaseError) {\n Log.d(TAG, \"New user creation Firebase error\");\n }",
"public static FirebaseAuth getFirebaseAutenticacao() {\n if (referenciaAutenticacao == null) {\n referenciaAutenticacao = FirebaseAuth.getInstance();\n }\n\n return referenciaAutenticacao;\n }",
"@Override\n public void onCreate(Bundle icicle) {\n //FirebaseApp.initializeApp(getApplicationContext());\n super.onCreate(icicle);\n setContentView(R.layout.activity_splash);\n prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n //FirebaseApp customApp = FirebaseApp.initializeApp(this);\n // FirebaseStorage storage = FirebaseStorage.getInstance(customApp);\n // reference1= FirebaseStorage.getInstance(\"gs://doctorlog-ac4d6.appspot.com\").getReference();\n // FirebaseStorage firebaseStorage1=FirebaseStorage.getInstance(app);\n //reference1=firebaseStorage1.getReference();\n firebaseOptions2=new FirebaseOptions.Builder()\n .setApplicationId(\"1:720142389475:android:920875d8334fb1c3\")\n .setApiKey(\"AIzaSyCTT78tupL7oOhSkIeHgNN6hyLWgxWMcs8 \")\n .setDatabaseUrl(\"https://doctorlog-ac4d6.firebaseio.com/\")\n .build();\n FirebaseApp.initializeApp(this,firebaseOptions2,\"third\");\n FirebaseApp app1=FirebaseApp.getInstance(\"third\");\n FirebaseDatabase firebaseDatabase=FirebaseDatabase.getInstance(app1);\n reference=firebaseDatabase.getReference(\"doctor\");\n mStorageRef = FirebaseStorage.getInstance().getReference();\n Uri uri = null;\n getWindow().getDecorView().setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);\n /* New Handler to start the Menu-Activity\n * and close this Splash-Screen after some seconds.*/\n new Handler().postDelayed(new Runnable(){\n @Override\n public void run() {\n /* Create an Intent that will start the Menu-Activity. */\n boolean previouslyStarted = prefs.getBoolean(\"isFirstRun\", false);\n read1(new Firebasecallback1() {\n @Override\n public void onCallback1(List<DummyItem> list) {\n\n Toast.makeText(splash.this,\"completed\" ,Toast.LENGTH_LONG ).show();\n }\n\n });\n\n if(!previouslyStarted) {\n SharedPreferences.Editor edit = prefs.edit();\n edit.putBoolean(\"isFirstRun\", Boolean.TRUE);\n edit.commit();\n Intent mainIntent = new Intent(splash.this,LoginActivity.class);\n splash.this.startActivity(mainIntent);\n splash.this.finish();\n }\n\n else\n { db= FirebaseDatabase.getInstance().getReference(\"patient\");\n SharedPreferences prefs1 = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n previously=prefs1.getString(\"key\",\"null\" );\n Toast.makeText(getBaseContext(),\"my \"+previously ,Toast.LENGTH_LONG ).show();\n read(new LoginActivity.Firebasecallback() {\n @Override\n public void onCallback(List<user> list) {\n // Toast.makeText(getActivity(), \"msg12\",Toast.LENGTH_LONG).show();\n for (user e:list)\n { // Toast.makeText(LoginActivity.this, \"list\",Toast.LENGTH_LONG).show();\n if(previously.equals(e.id))\n { Toast.makeText(splash.this, e.url,Toast.LENGTH_LONG).show();\n LoginActivity.userg=new user(e.id,e.username,e.mail,e.url,e.phn,e.lat,e.lng);\n LoginActivity.usname=e.username;\n LoginActivity.name=e.mail;\n if(e.url==null)\n LoginActivity.url=null;\n else\n LoginActivity.url=Uri.parse(e.url);\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n SharedPreferences.Editor edit = preferences.edit();\n edit.putString(\"key\",e.id);\n edit.commit();\n break;\n\n }\n }\n\n check=true;\n Intent mainIntent = new Intent(splash.this, MainActivity.class);\n splash.this.startActivity(mainIntent);\n splash.this.finish();\n // Toast.makeText(splash.this, \"mmmm\", Toast.LENGTH_SHORT).show();\n //LoginActivity.usname=null;\n\n\n }\n\n });\n }\n }\n }, SPLASH_DISPLAY_LENGTH);\n }",
"public void setfUser(FirebaseUser f){\n fUser = f;\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_video_call);\n mAuth = FirebaseAuth.getInstance();\n mUser = mAuth.getCurrentUser();\n mDatabase = FirebaseDatabase.getInstance().getReference();\n initUI();\n }",
"private void initializeInstanceVariables(){\n\n //Initialize Firebase variables\n firebaseAuth = FirebaseAuth.getInstance();\n currentUser = FirebaseAuth.getInstance().getCurrentUser();\n myDatabase = FirebaseDatabase.getInstance().getReference(firebaseAuth.getUid());\n\n //Initialize input variables\n newContactPhoneNumber = findViewById(R.id.addcontact_phonenumber);\n finishButton = findViewById(R.id.addcontact_finishbttn);\n backButton = findViewById(R.id.addContactScreenBackBttn);\n newContactFirstName = ((EditText) findViewById(R.id.addcontact_firstname));\n newContactLastName = ((EditText) findViewById(R.id.addcontact_lastname));\n newContactEmailAddress = ((EditText) findViewById(R.id.addcontact_email));\n }",
"private void RetrieveChildAddedEventWithURL(JSONArray data) {\n //\n \tString strURL = String.format(\"https://%s.firebaseio.com\", appName); // = \"https://%@.firebaseio.com\" + appName;\n\n if ( data.length() >= 1 )\n {\n \ttry {\n\t\t\t\tstrURL = data.getString(0);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"RetrieveChildAddedEventWithURL : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n\n Firebase myChildRef = new Firebase(strURL);\n if(isUsed != true)\n isUsed = true;\n // Retrieve new posts as they are added to the database\n myChildRef.addChildEventListener(new ChildEventListener() {\n\t\t\t@Override\n\t\t\tpublic void onChildAdded(DataSnapshot arg0, String arg1) {\n\t\t //[result setKeepCallback:[NSNumber numberWithBool:YES]];\n System.out.println(arg0.getValue());\n JSONObject resultObj;\n\t\t\t\ttry {\n\t\t\t\t\tresultObj = new JSONObject(arg0.getValue().toString());\n\t PluginResult pluginResult = new PluginResult(Status.OK, resultObj);\n\t //pluginResult.setKeepCallback(true);\n\t mCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onCancelled(FirebaseError arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildMoved(DataSnapshot arg0, String arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildRemoved(DataSnapshot arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildChanged(DataSnapshot arg0, String arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\t\t});\n }",
"public void initializeHashMap(DatabaseReference ref){\n ref.addChildEventListener(new ChildEventListener() {\n @Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n UserSign sign = dataSnapshot.getValue(UserSign.class);\n System.out.println(\"ADDED USER SIGN FROM LOCAL DECK \" + dataSnapshot.getValue(UserSign.class).getUrl());\n userSigns.put(sign.getUrl(), sign);\n }\n\n @Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onChildRemoved(DataSnapshot dataSnapshot) {\n //Updadte the deck if a sign was removed from the user's myDeck\n System.out.println(\"REMOVED USER SIGN FROM LOCAL DECK \" + dataSnapshot.getValue(UserSign.class).getUrl());\n userSigns.remove(dataSnapshot.getValue(UserSign.class).getUrl());\n }\n\n @Override\n public void onChildMoved(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }",
"private void id(){\n but = findViewById(R.id.googlBtn);\n image = findViewById(R.id.Logo_image);\n logoText = findViewById(R.id.logo_name);\n sloganText = findViewById(R.id.slogan_name);\n password = findViewById(R.id.password);\n login_btn = findViewById(R.id.login_btn);\n emailsignup = findViewById(R.id.emailsignup);\n phonesignup = findViewById(R.id.phonesignup);\n forgot=findViewById(R.id.forgot);\n //googlesignup = findViewById(R.id.googlesignup);\n email=findViewById(R.id.loginemail);\n scrollView=findViewById(R.id.scroll);\n firebaseAuth=FirebaseAuth.getInstance();\n firebaseDatabase=FirebaseDatabase.getInstance();\n }",
"private void testFirebase() {\n Intent launchIntent = new Intent(this, HomeActivity.class);\n launchIntent.putExtra(Constants.FIREBASE_ACTION, true);\n launchIntent.putExtra(Constants.FIREBASE_TITLE, \"Sample Title\");\n launchIntent.putExtra(Constants.FIREBASE_BODY, \"Sample Body\");\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */, launchIntent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n Bitmap rawBitmap = BitmapFactory.decodeResource(getResources(),\n R.mipmap.ic_launcher_round);\n NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.ic_stat_notif_icon_firebase_om)\n .setLargeIcon(rawBitmap)\n .setContentTitle(getResources().getString(R.string.app_name))\n .setContentText(\"Sample body\")\n .setAutoCancel(true)\n .setContentIntent(pendingIntent);\n\n NotificationManager notificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n Notification notification = notificationBuilder.build();\n notification.flags |= Notification.FLAG_NO_CLEAR;\n\n notificationManager.notify(0 /* ID of notification */, notification);\n }",
"public interface FirebaseActionListenerCallback {\n public void onSuccess();\n public void onError(Exception exception);\n public void onDatabaseError(DatabaseError error);\n}",
"void UploadToFirebase() {\n // This gives the path name for the storage\n StorageReference photoRef = mStorageRef.child(\"images\").child(selectedImageUri.getLastPathSegment());\n\n // This uploads it into firebase storage\n // Toast makes the little comment appear at the bottom of the screen\n photoRef.putFile(selectedImageUri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @SuppressLint(\"ShowToast\")\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast toast = Toast.makeText(getApplicationContext(), \"Uploaded\", Toast.LENGTH_SHORT);\n toast.show();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @SuppressLint(\"ShowToast\")\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast toast = Toast.makeText(getApplicationContext(), \"Upload failed\", Toast.LENGTH_SHORT);\n toast.show();\n }\n });\n }",
"void onUserCreated(FirebaseUser firebaseUser);",
"@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n progressDialog.dismiss();\n\n //displaying success toast\n // Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n\n // ba5odha fe string as url\n imageurl = taskSnapshot.getDownloadUrl().toString();\n\n DatabaseReference mDatabase;\n\n mDatabase = FirebaseDatabase.getInstance().getReference();\n\n String s = mDatabase.push().getKey();\n\n Admin a = new Admin(s, name.getText().toString(), email.getText().toString(), phone.getText().toString(), address.getText().toString(), imageurl);\n\n // b3ml save fel firebase lel object of admin\n mDatabase.child(\"admins\").child(s).setValue(a);\n\n Toast.makeText(RegisterAsAdmin.this, \"Registration successful\", Toast.LENGTH_LONG).show();\n FirebaseAuth.getInstance().signOut();\n Intent i = new Intent(RegisterAsAdmin.this, LoginAsAdmin.class);\n startActivity(i);\n finish();\n }",
"public void registerClicked(View view) {\n mDatabase = FirebaseDatabase.getInstance().getReference();\n\n\n //Creates local variable for user input on each field\n String name = ((EditText) findViewById(R.id.first_name)).getText().toString().trim();\n String lName = ((EditText) findViewById(R.id.last_name)).getText().toString().trim();\n String mail = ((EditText) findViewById(R.id.email_address)).getText().toString().trim();\n String pass = ((EditText) findViewById(R.id.confirm_password)).getText().toString().trim();\n\n HashMap<String, String> dataMap = new HashMap<String, String>();\n dataMap.put(\"Name\", name);\n dataMap.put(\"Last Name\", lName);\n dataMap.put(\"Email\", mail);\n dataMap.put(\"Password\", pass);\n\n //Push Hash Object to root of Database\n //The on-complete listener makes sure the information was pushed\n //successfully to the database.\n mDatabase.push().setValue(dataMap).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n Toast.makeText(LogIn.this, \"Registered!\", Toast.LENGTH_LONG).show();\n }else {\n Toast.makeText(LogIn.this, \"Try Again\", Toast.LENGTH_LONG).show();\n }\n }\n });\n setContentView(R.layout.activity_log_in);\n setTypeFace();\n }",
"public void triggerRoomsOnce() throws Exception{\n Firebase roomsNodeRef = fire_db.child(\"ChatRoomNode\");\n Firebase newNodeRef = null;\n if(acceptKey == null){\n newNodeRef = roomsNodeRef.push();\n acceptKey = newNodeRef.getKey();\n }else{\n newNodeRef = roomsNodeRef.child(acceptKey);\n }\n // Firebase newNodeRef = roomsNodeRef.push();\n try {\n newNodeRef.setValue(\"accept\",new Firebase.CompletionListener() {\n @Override\n public void onComplete(FirebaseError firebaseError, Firebase firebase) {\n if (firebaseError != null) {\n Log.d(\"triggerRoomsOnce\",\"onComplete Data could not be saved. \" + firebaseError.getMessage());\n } else {\n Log.d(\"triggerRoomsOnce\",\" onComplete Data saved successfully.\");\n }\n }\n });\n\n }catch (Exception exc){\n throw new Exception(\"Something failed.\", new Throwable(String.valueOf(Exception.class)));\n }\n\n\n /* triggerRoomsOnceRef.setValue(\"accepted\");*//*, new Firebase.CompletionListener() {\n @Override\n public void onComplete(FirebaseError firebaseError, Firebase firebase) {\n if (firebaseError != null) {\n triggerRoomsOnceRef.removeEventListener();\n System.out.println(\"Data could not be saved. \" + firebaseError.getMessage());\n } else {\n System.out.println(\"Data saved successfully.\");\n }\n }\n });*//*\n*/\n\n }",
"@Override\n public void onVerificationFailed(FirebaseException e) {\n // displaying error message with firebase exception.\n Toast.makeText(MainActivity.this, e.getMessage(), Toast.LENGTH_LONG).show();\n }",
"private void RetrieveChildChangedEventWithURL(JSONArray data) {\n //\n \tString strURL = String.format(\"https://%s.firebaseio.com\", appName); // = \"https://%@.firebaseio.com\" + appName;\n\n if ( data.length() >= 1 )\n {\n \ttry {\n\t\t\t\tstrURL = data.getString(0);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"RetrieveChildAddedEventWithURL : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n\n Firebase myChildRef = new Firebase(strURL);\n if(isUsed != true)\n isUsed = true;\n // Retrieve new posts as they are added to the database\n myChildRef.addChildEventListener(new ChildEventListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onChildChanged(DataSnapshot arg0, String arg1) {\n\t\t\t\t//[result setKeepCallback:[NSNumber numberWithBool:YES]];\n System.out.println(arg0.getValue());\n JSONObject resultObj;\n\t\t\t\ttry {\n\t\t\t\t\tresultObj = new JSONObject(arg0.getValue().toString());\n\t PluginResult pluginResult = new PluginResult(Status.OK, resultObj);\n\t //pluginResult.setKeepCallback(true);\n\t mCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onCancelled(FirebaseError arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildAdded(DataSnapshot arg0, String arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildMoved(DataSnapshot arg0, String arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildRemoved(DataSnapshot arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\t\t});\n }",
"static DatabaseReference getDBRef() {\n return mDBRef;\n }",
"public void basicReadWrite() {\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference myRef = database.getReference(\"message\");\n\n myRef.setValue(\"Hello, World!\");\n // [END write_message]\n\n // [START read_message]\n // Read from the database\n myRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // This method is called once with the initial value and again\n // whenever data at this location is updated.\n String value = dataSnapshot.getValue(String.class);\n Log.d(TAG, \"Value is: \" + value);\n }\n\n @Override\n public void onCancelled(DatabaseError error) {\n // Failed to read value\n Log.w(TAG, \"Failed to read value.\", error.toException());\n }\n });\n // [END read_message]\n }",
"public void basicReadWrite() {\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference myRef = database.getReference(\"message\");\n\n myRef.setValue(\"Hello, World!\");\n // [END write_message]\n\n // [START read_message]\n // Read from the database\n myRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // This method is called once with the initial value and again\n // whenever data at this location is updated.\n String value = dataSnapshot.getValue(String.class);\n Log.d(TAG, \"Value is: \" + value);\n }\n\n @Override\n public void onCancelled(DatabaseError error) {\n // Failed to read value\n Log.w(TAG, \"Failed to read value.\", error.toException());\n }\n });\n // [END read_message]\n }",
"@Override\n\tpublic void onCancelled(FirebaseError arg0) {\n\t\t\n\t}",
"private void addNewGroupToFireBase(Bundle guideData) {\n }",
"@Override\n public void onAuthenticationError(FirebaseError firebaseError) {\n Log.i(\"lt\",\"auth failed\");\n }",
"void pushToFirebase(Task task) {\n un_FirebaseRef_tasks.push().setValue(task);\n }",
"public DatabaseClient() {\n initConnection();\n dbClient = FirestoreClient.getFirestore();\n }",
"public static boolean FireBaseAddWord(String source,String target,String userId){\n\r\n FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();\r\n DatabaseReference root = firebaseDatabase.getReference(\"words\").child(userId); // Firebase database table path.\r\n\r\n Map wordMap = new HashMap(); // Set word information in map\r\n\r\n wordMap.put(\"source\",source);\r\n wordMap.put(\"target\",target);\r\n wordMap.put(\"time\",ServerValue.TIMESTAMP);\r\n\r\n root.push().updateChildren(wordMap).addOnCompleteListener(new OnCompleteListener() {\r\n @Override\r\n public void onComplete(@NonNull Task task) { // Update Database\r\n if(task.isSuccessful()){\r\n setAddWordIsSuccessful(true);\r\n }else {\r\n setAddWordIsSuccessful(false);\r\n }\r\n }\r\n });\r\n\r\n\r\n return addWordIsSuccessful;\r\n\r\n\r\n }",
"@Override\n public void onVerificationFailed(FirebaseException e) {\n\n Toast.makeText(MainActivity.this, e.getMessage(), Toast.LENGTH_LONG).show();\n }",
"public void onAccountCreate()\n {\n //Object ne=new Object();\n Log.d(\"stupid\", \"onAccountCreate: \");\n fName=firstName.getText().toString();\n lName=lastName.getText().toString();\n con=contact.getText().toString();\n addr=address.getText().toString();\n bGrp=bloodGroup.getText().toString();\n\n mRef2 = FirebaseDatabase.getInstance().getReference().child(\"donordata\").getRef();\n\n Map<String,Object> donorMap=new HashMap<String, Object>();\n Map<String,Object> x= new HashMap<String, Object>();\n\n\n String id= mRef2.push().getKey();\n Log.d(\"keyTAG\", \"onAccountCreate: \"+mRef2.push().getKey());\n x.put(\"id\",id);\n x.put(\"firstname\", fName);\n x.put(\"lastname\", lName);\n x.put(\"address\", addr);\n x.put(\"bloodgroup\", bGrp);\n x.put(\"contact\", con);\n\n\n\n donorMap.put(fName,x);\n\n mRef2.updateChildren(donorMap);\n Toast.makeText(BloodDonorsActivity.this,\"Your account has been successfully created. Thank you!\",Toast.LENGTH_LONG).show();\n Intent backToLogin=new Intent(BloodDonorsActivity.this,LoginActivity.class);\n startActivity(backToLogin);\n\n\n //mRef2.setValue(donorMap);\n\n\n\n //Toast.makeText(BloodDonorsActivity.this, \"Your details are not valid!\", Toast.LENGTH_LONG).show();\n\n\n\n }",
"@Override\n public void onAuthenticationError(FirebaseError firebaseError) {\n }",
"public FirebaseAuth getAuth() {\n return auth;\n }",
"FirebaseGetUserPreferences() {\n // set null or default listener or accept as argument to constructor\n this.listener = null;\n loadDataAsync();\n }",
"@Override\n protected void onCreate(@Nullable Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_register);\n\n mFirebaseAuth=FirebaseAuth.getInstance(); //initializing authentication\n mUserLab=new UserLab(RegistrationActivity.this);\n getLayoutReference();\n\n addViewListeners();\n\n\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n //mAuth = FirebaseAuth.getInstance();\n householdReference = FirebaseDatabase.getInstance().getReference(\"households\");\n //drawerLayout = (DrawerLayout) findViewById(R.id.create_household_layout);\n //navigationView = (NavigationView) findViewById(R.id.navigation_bar);\n //navigationView.setNavigationItemSelectedListener(this);\n button = (Button) findViewById(R.id.create_household_button);\n button.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n String name = ((EditText) findViewById(R.id.household_name_input)).toString();\n Household household = new Household(name);\n String id = householdReference.push().getKey();\n householdReference.child(id).setValue(household);\n startActivity(new Intent(CreateHousehold.this,ListHousehold.class));\n\n }\n });\n setContentView(R.layout.activity_create_household);\n /*mAuthListener = new FirebaseAuth.AuthStateListener() {\n @Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n if (firebaseAuth.getCurrentUser() != null){\n startActivity(new Intent(CreateHousehold.this,ListHousehold.class));\n }\n }\n };*/\n }",
"public interface DatabaseUtils {\n\n static boolean save(String path, Object object){\n FirebaseDatabase.getInstance()\n .getReference(path == null ? \"\" : path)\n .push()\n .setValue(object);\n return false;\n }\n\n boolean get();\n}",
"@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if(firebaseMethods.checkIfUsernameExists(username, dataSnapshot)){\n append = myRef.push().getKey().substring(0,7);\n }\n username = username + append;\n\n //add new user to the database\n firebaseMethods.addNewUser(\"notdone\",username,\"emp\",userID);\n Toast.makeText(mContext, \"Signup successful. Admin Verification \" +\n \"Left.\", Toast.LENGTH_SHORT).show();\n Intent i = new Intent(Register.this, Login.class);\n startActivity(i);\n finish();\n }",
"@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View root = inflater.inflate(R.layout.login_fragment, container, false);\n edtEmail = root.findViewById(R.id.edtEmail);\n edtPassword = root.findViewById(R.id.edtPassword);\n btnLogin = root.findViewById(R.id.btnLogin);\n //mDatabaseReference = mDatabase.getReference();\n btnLogin.setOnClickListener(v -> {\n getLogin();\n\n // startActivity(new Intent(getActivity(), AfterLoginActivity.class));\n });\n /* //database reference pointing to root of database\n rootRef = FirebaseDatabase.getInstance().getReference();\n //database reference pointing to demo node\n demoRef = rootRef.child(\"Testing\");\n */\n\n\n /*\n btnLogin.setOnClickListener(v -> {\n Log.d(TAG, \"onCreateView: \"+\">>>>>>>>>\"+demoRef);\n String value = edtEmail.getText().toString();\n demoRef.child(\"value\").setValue(value);\n //demoRef.push().setValue(value);\n Toast.makeText(getActivity(), value, Toast.LENGTH_SHORT).show();\n */\n\n\n /*if (isInternetConnected(getActivity())) {\n if (Validation()) {\n getLogin();\n } else {\n Toast.makeText(getActivity(), error_msg, Toast.LENGTH_SHORT).show();\n }\n } else {\n Toast.makeText(getActivity(), getResources().getString(R.string.oops_connect_your_internet), Toast.LENGTH_SHORT).show();\n }*//*\n */\n/* // Write a message to the database\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n Log.d(TAG, \"onCreateView: \" + \"database-------\" + database.toString());\n DatabaseReference myRef = database.getReference(\"message\");\n myRef.setValue(\"Welcome to first application\");\n*//*\n //startActivity(new Intent(getActivity(), AfterLoginActivity.class));\n });\n*/\n\n return root;\n }",
"void save_Online(String firebase_id){\n\n DatabaseReference records_ref =\n FirebaseDatabase.getInstance().getReference(getResources().getString(R.string.records_ref));\n DatabaseReference all_users_ref =\n FirebaseDatabase.getInstance().getReference(getResources().getString(R.string.all_users));\n\n User_Class klinuser = common.userBundle(registration_bundle);\n\n if (klinuser != null){\n String cell_number = \"0\"+String.valueOf(klinuser.getNumber());\n records_ref.child(cell_number).child(\"uid\").setValue(klinuser.getFirebaseID());\n\n //save user details to All_Users/Biography/Uid\n all_users_ref.child(firebase_id).setValue(klinuser);\n loadBioData_online(firebase_id);\n }\n\n\n }",
"@Override\r\n protected void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n setContentView(R.layout.activity_register);\r\n Email = findViewById(R.id.Email);\r\n Password = findViewById(R.id.Password);\r\n\r\n mAuth = FirebaseAuth.getInstance();\r\n\r\n findViewById(R.id.Signup).setOnClickListener(this);\r\n\r\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_sign_in);\n\n email_text = findViewById(R.id.email);\n password_text = findViewById(R.id.password);\n logIn = findViewById(R.id.log_in);\n mAuth = FirebaseAuth.getInstance();\n\n logIn.setOnClickListener(new View.OnClickListener(){\n public void onClick(View v){\n Intent intent = new Intent(getApplicationContext(), SignUp.class);\n startActivity(intent);\n }\n });\n }",
"private void cargarDatosFirebase(){\n dbRef = FirebaseDatabase.getInstance().getReference().child(\"jugadores\");\n\n //añadimos el evento que no va a devolver los valores\n valueEventListener = new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n listaJugadores.clear();\n for (DataSnapshot jugadoresDataSnapshot: dataSnapshot.getChildren()){\n cargarListView(jugadoresDataSnapshot);\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Log.e(\"ActivityParte2\", \"DATABASE ERROR\");\n }\n };\n //asignamos el evento para que sea a tiempo real\n dbRef.addValueEventListener(valueEventListener);\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n //Initialize the Firebase database reference\n mDatabase = FirebaseDatabase.getInstance().getReference();\n\n //get a reference to the Button and EditText Views using their ID's\n addTaskButton = (Button) findViewById(R.id.addTask_id);\n taskDescription = (EditText) findViewById(R.id.taskDescription_id);\n\n addTaskButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n writeNewTask();\n }\n });\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_login);\n\n dblogin = FirebaseDatabase.getInstance().getReference(\"users\");\n\n login = findViewById(R.id.buttonLogin);\n signUp = findViewById(R.id.buttonSignUp);\n email = findViewById(R.id.editTextEmail);\n password = findViewById(R.id.textPassword);\n\n //listener for login button press\n login.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n validDataCheck();\n }\n });\n //Listener for sign up button press\n signUp.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n checkUserExists();\n }\n });\n\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n register = (TextView) findViewById(R.id.register);\n register.setOnClickListener(this);\n\n login = (Button) findViewById(R.id.login);\n login.setOnClickListener(this);\n\n editTextEmailAddress = (EditText) findViewById(R.id.emailAddress);\n editTextPassword = (EditText) findViewById(R.id.password);\n progressBar = (ProgressBar) findViewById(R.id.progressBar);\n mAuth = FirebaseAuth.getInstance();\n\n //Initialising the sensor text views to the layout file\n textView = findViewById(R.id.text_accelerometer);\n sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n sensor = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);\n sensorManager.registerListener(MainActivity.this, sensor, sensorManager.SENSOR_DELAY_NORMAL);\n\n\n\n\n }",
"private void GetDataFromFirebase() {\n Query query = myRef.child(\"student\");\n\n query.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n ClearAll();\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\n Students student = new Students();\n if (snapshot.child(\"url\").getValue() == null) {\n student.setImageUrl(snapshot.child(\"imageUrl\").getValue().toString());\n } else {\n student.setImageUrl(snapshot.child(\"url\").getValue().toString());\n\n }\n student.setName(snapshot.child(\"name\").getValue().toString());\n students.add(student);\n }\n recyclerAdapter = new GradingRecyclerAdapter(getApplicationContext(), students);\n recyclerView.setAdapter(recyclerAdapter);\n recyclerAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }",
"private void setupFirebaseAuth(){\n Log.d(TAG, \"setupFirebaseAuth\");\n mAuth = FirebaseAuth.getInstance();\n fbaseDB = FirebaseDatabase.getInstance();\n dbRef = fbaseDB.getReference();\n\n mAuthListener = new FirebaseAuth.AuthStateListener() {\n @Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n\n if(user != null){\n //somebody signed in\n Log.d(TAG, \"onAuthStateChanged:signed_in\" + user.getUid());\n dbRef.addListenerForSingleValueEvent(\n new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if(checkUsernamExists(username.getText().toString(), dataSnapshot)){\n Toast.makeText(SignUp.this,\"Signup SUCCESSFUL\",Toast.LENGTH_SHORT).show();\n } else{\n\n mAuth.signOut();\n }\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n }\n );\n } else{\n //nobodys here\n Log.d(TAG, \"onAuthStateChanged:signed_out\");\n }\n }\n };\n }",
"private void createDependencies(){\n client = new FireStoreClient(this);\n authentication = new FirestoreAuthentication();\n }",
"public static CollectionReference getCollection(){\n return FirebaseFirestore.getInstance().collection(COLLECTION_NAME) ;\n }",
"@Override\n\t\t\tpublic void onCancelled(FirebaseError arg0) {\n\t\t\t\t\n\t\t\t}",
"private void saveing_data_firebase(String recodfile) {\r\n\r\n Uri uri = Uri.fromFile(new File(recodfile));\r\n Mprogress.setTitle(\"Please wait ...\");\r\n Mprogress.setMessage(\"wait for a moment your voice is uploading\");\r\n Mprogress.setCanceledOnTouchOutside(false);\r\n Mprogress.show();\r\n\r\n StorageReference filepath = audiofile.child(uri.getLastPathSegment());\r\n filepath.putFile(uri)\r\n .addOnCompleteListener(new OnCompleteListener<UploadTask.TaskSnapshot>() {\r\n @Override\r\n public void onComplete(@NonNull Task<UploadTask.TaskSnapshot> task) {\r\n if (task.isSuccessful()) {\r\n\r\n String audiouri = task.getResult().getDownloadUrl().toString();\r\n\r\n Calendar calendar_time = Calendar.getInstance();\r\n SimpleDateFormat simpleDateFormat_time = new SimpleDateFormat(DataManager.TimePattern);\r\n CurrentTime = simpleDateFormat_time.format(calendar_time.getTime());\r\n\r\n Calendar calendar_date = Calendar.getInstance();\r\n SimpleDateFormat simpleDateFormat_date = new SimpleDateFormat(DataManager.DatePattern);\r\n CurrentDate = simpleDateFormat_date.format(calendar_date.getTime());\r\n\r\n DatabaseReference NewNode = FirebaseDatabase.getInstance().getReference().child(\"GlobalChat\").push();\r\n\r\n String push_id = NewNode.getKey();\r\n\r\n\r\n Map<String, Object> globalmap = new HashMap<String, Object>();\r\n globalmap.put(\"message\", audiouri);\r\n globalmap.put(\"name\", Currentuser_name);\r\n globalmap.put(\"time\", CurrentTime);\r\n globalmap.put(\"date\", CurrentDate);\r\n globalmap.put(\"type\", \"Audio\");\r\n globalmap.put(\"MessageKey\", push_id);\r\n globalmap.put(\"MyID\", FirebaseAuth.getInstance().getCurrentUser().getUid());\r\n globalmap.put(\"Uri\", current_image_uri);\r\n globalmap.put(DataManager.UserNameSerach, Currentuser_name.toLowerCase());\r\n\r\n NewNode.updateChildren(globalmap)\r\n .addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n if (task.isSuccessful()) {\r\n\r\n fine_user_send_audio_notifaction();\r\n Mprogress.dismiss();\r\n } else {\r\n Mprogress.dismiss();\r\n Toast.makeText(getActivity(), task.getException().getMessage(), Toast.LENGTH_SHORT).show();\r\n }\r\n }\r\n })\r\n .addOnFailureListener(new OnFailureListener() {\r\n @Override\r\n public void onFailure(@NonNull Exception e) {\r\n Mprogress.dismiss();\r\n Toast.makeText(getActivity(), e.getMessage().toString(), Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n\r\n } else {\r\n\r\n Mprogress.dismiss();\r\n }\r\n }\r\n })\r\n .addOnFailureListener(new OnFailureListener() {\r\n @Override\r\n public void onFailure(@NonNull Exception e) {\r\n\r\n Mprogress.dismiss();\r\n }\r\n });\r\n }"
] | [
"0.76502347",
"0.74678916",
"0.7361463",
"0.73327595",
"0.72958595",
"0.7293901",
"0.6987904",
"0.6890367",
"0.6879775",
"0.6720616",
"0.66303587",
"0.65445375",
"0.6525206",
"0.6454002",
"0.6434519",
"0.64095503",
"0.632037",
"0.6273643",
"0.6210153",
"0.61488974",
"0.6074997",
"0.60742116",
"0.60647684",
"0.60557824",
"0.60223955",
"0.60050166",
"0.59911525",
"0.5985569",
"0.5978158",
"0.597157",
"0.59063524",
"0.59063524",
"0.59063524",
"0.59063524",
"0.5894705",
"0.58847153",
"0.5879002",
"0.58652884",
"0.58631843",
"0.58527076",
"0.5822593",
"0.58208376",
"0.5819509",
"0.58160007",
"0.5786353",
"0.5716212",
"0.57135886",
"0.5690424",
"0.5674726",
"0.56610066",
"0.56431425",
"0.56393623",
"0.5619494",
"0.561626",
"0.561461",
"0.560149",
"0.5576153",
"0.5573326",
"0.5569144",
"0.5562973",
"0.5551664",
"0.5531797",
"0.55287755",
"0.55276144",
"0.54950655",
"0.5489602",
"0.5476915",
"0.5474795",
"0.5453141",
"0.54517126",
"0.5447746",
"0.5447746",
"0.54354495",
"0.5425047",
"0.5419822",
"0.5410011",
"0.540056",
"0.53916055",
"0.538919",
"0.5383056",
"0.53811145",
"0.53529644",
"0.5352399",
"0.5322789",
"0.5320466",
"0.53173685",
"0.5309531",
"0.5308214",
"0.52998954",
"0.52992505",
"0.5282175",
"0.52790266",
"0.52738017",
"0.5267735",
"0.52644986",
"0.5252793",
"0.5248426",
"0.5248351",
"0.5230175",
"0.5228532",
"0.52275753"
] | 0.0 | -1 |
Inflate the layout for this fragment | @Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_wallpaper, container, false);
folderTitle = view.findViewById(R.id.folder_title);
isFavorite = view.findViewById(R.id.is_favorite);
wallpaperGrid = view.findViewById(R.id.grid_view);
addWallpaperButton = view.findViewById(R.id.add_wallpaper);
//We take arguments passed to the fragment and set wallpaperDirectory Object for this fragment
//and set title to whatever wallpaper Directory title is
wallpaperDirectory = new WallpaperDirectory();
wallpaperDirectory.Title = getArguments().getString(FOLDER_TITLE);
wallpaperDirectory.PreviewUrl = getArguments().getString(FOLDER_PREVIEW);
folderTitle.setText(wallpaperDirectory.Title);
//we get sharedPreference Object for both settings and favorites
sharedPreferences =getActivity().getSharedPreferences(PrefsKeys.SETTINGS,Context.MODE_PRIVATE);
SharedPreferences favPreferences = getActivity().getSharedPreferences(PrefsKeys.FAVORITES,Context.MODE_PRIVATE);
//we check if current folder is favorited then we set isFavorite to checked
isFavorite.setChecked(favPreferences.contains(wallpaperDirectory.Title));
isFavorite.setOnCheckedChangeListener((buttonView, isChecked) -> {
isFavorite.setEnabled(false);
//we update the value whether or not isFavorite is checked
if(isChecked){
favPreferences.edit().putString(wallpaperDirectory.Title,wallpaperDirectory.PreviewUrl).apply();
}else{
favPreferences.edit().remove(wallpaperDirectory.Title).apply();
}
isFavorite.setEnabled(true);
});
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 Autogenerated method stub | protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.update);
setContentView(R.layout.new_activity);
et_title=(EditText) findViewById(R.id.et_title);
et_content=(EditText) findViewById(R.id.et_content);
tiem=(TextView) findViewById(R.id.tiem);
tv_tiem=(TextView) findViewById(R.id.tv_tiem);
but_set=(Button) findViewById(R.id.but_set);
final Calendar c=Calendar.getInstance();
calendar=Calendar.getInstance();
helper = new MyDBHelper(Update_Activity.this,Globle.DB_NAME, null,Globle.VERSION);
set_date=new SimpleDateFormat("yyyy/MM/dd hh:mm").format(new Date());
tiem.setText(set_date);
//查詢 獲取時間段
but_set.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
DatePickerDialog dialog=new DatePickerDialog(Update_Activity.this,new OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int monthOfYear,
int dayOfMonth) {
// TODO Auto-generated method stub
//把用户设置的时间存储
calendar.set(Calendar.YEAR,year);
calendar.set(Calendar.MONTH,monthOfYear);
calendar.set(Calendar.DAY_OF_MONTH,dayOfMonth);
date=year+"/"+monthOfYear+"/"+dayOfMonth;
TimePickerDialog time_dialog=new TimePickerDialog(Update_Activity.this,new OnTimeSetListener() {
@Override
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
// TODO Auto-generated method stub
calendar.set(Calendar.HOUR_OF_DAY,hourOfDay);
calendar.set(Calendar.MINUTE,minute);
calendar.set(Calendar.SECOND,0);
date=new SimpleDateFormat("yyyy/MM/dd hh:mm").format(calendar.getTimeInMillis());
tv_tiem.setText(date);
}
},c.get(Calendar.HOUR_OF_DAY),c.get(Calendar.MINUTE),true);
time_dialog.show();
}
}, c.get(Calendar.YEAR),c.get(Calendar.MONTH),c.get(Calendar.DATE));
dialog.show();
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
DatePickerDialog dialog=new DatePickerDialog(Update_Activity.this,new OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int monthOfYear,
int dayOfMonth) {
// TODO Auto-generated method stub
//把用户设置的时间存储
calendar.set(Calendar.YEAR,year);
calendar.set(Calendar.MONTH,monthOfYear);
calendar.set(Calendar.DAY_OF_MONTH,dayOfMonth);
date=year+"/"+monthOfYear+"/"+dayOfMonth;
TimePickerDialog time_dialog=new TimePickerDialog(Update_Activity.this,new OnTimeSetListener() {
@Override
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
// TODO Auto-generated method stub
calendar.set(Calendar.HOUR_OF_DAY,hourOfDay);
calendar.set(Calendar.MINUTE,minute);
calendar.set(Calendar.SECOND,0);
date=new SimpleDateFormat("yyyy/MM/dd hh:mm").format(calendar.getTimeInMillis());
tv_tiem.setText(date);
}
},c.get(Calendar.HOUR_OF_DAY),c.get(Calendar.MINUTE),true);
time_dialog.show();
}
}, c.get(Calendar.YEAR),c.get(Calendar.MONTH),c.get(Calendar.DATE));
dialog.show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
calendar.set(Calendar.HOUR_OF_DAY,hourOfDay);
calendar.set(Calendar.MINUTE,minute);
calendar.set(Calendar.SECOND,0);
date=new SimpleDateFormat("yyyy/MM/dd hh:mm").format(calendar.getTimeInMillis());
tv_tiem.setText(date);
} | {
"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 onCreateOptionsMenu(Menu menu) {
MenuItem item1=menu.add("保存");
MenuItem item2=menu.add("取消");
item1.setIcon(R.drawable.png_0044);
item2.setIcon(R.drawable.png_0652);
item1.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
// TODO Auto-generated method stub
SQLiteDatabase db = helper.getWritableDatabase();
ContentValues values = new ContentValues();
values.put(Globle.TITLE,et_title.getText().toString());
values.put(Globle.CONTENT,et_content.getText().toString());
values.put(Globle.SET_ITEM,set_date);
values.put(Globle.ATTACK_TIEM,date);
String where=Globle._ID+"="+_id;
int i=DBUtil.update(db, Globle.TABLE_NAME,values, where);
if(i>=1){
Toast.makeText(Update_Activity.this,"修改成功 ",Toast.LENGTH_SHORT).show();
//
AlarmManager alarmManager=(AlarmManager) getSystemService(ALARM_SERVICE);
Intent intent=new Intent(Update_Activity.this,Ring_Activity.class);
intent.putExtra("text",et_content.getText().toString());
count++;
System.out.println(""+count);
PendingIntent p_intent=PendingIntent.getActivity(Update_Activity.this,count,intent,PendingIntent.FLAG_UPDATE_CURRENT);
alarmManager.set(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis(),p_intent);
Intent intent1=new Intent(Update_Activity.this,MainActivity.class);
startActivity(intent1);
}else{
Toast.makeText(Update_Activity.this,"修改失败",Toast.LENGTH_SHORT).show();
Intent intent1=new Intent(Update_Activity.this,MainActivity.class);
startActivity(intent1);
}
return false;
}
});
return super.onCreateOptionsMenu(menu);
} | {
"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 onMenuItemClick(MenuItem item) {
SQLiteDatabase db = helper.getWritableDatabase();
ContentValues values = new ContentValues();
values.put(Globle.TITLE,et_title.getText().toString());
values.put(Globle.CONTENT,et_content.getText().toString());
values.put(Globle.SET_ITEM,set_date);
values.put(Globle.ATTACK_TIEM,date);
String where=Globle._ID+"="+_id;
int i=DBUtil.update(db, Globle.TABLE_NAME,values, where);
if(i>=1){
Toast.makeText(Update_Activity.this,"修改成功 ",Toast.LENGTH_SHORT).show();
//
AlarmManager alarmManager=(AlarmManager) getSystemService(ALARM_SERVICE);
Intent intent=new Intent(Update_Activity.this,Ring_Activity.class);
intent.putExtra("text",et_content.getText().toString());
count++;
System.out.println(""+count);
PendingIntent p_intent=PendingIntent.getActivity(Update_Activity.this,count,intent,PendingIntent.FLAG_UPDATE_CURRENT);
alarmManager.set(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis(),p_intent);
Intent intent1=new Intent(Update_Activity.this,MainActivity.class);
startActivity(intent1);
}else{
Toast.makeText(Update_Activity.this,"修改失败",Toast.LENGTH_SHORT).show();
Intent intent1=new Intent(Update_Activity.this,MainActivity.class);
startActivity(intent1);
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
protected void onResume() {
_id=getIntent().getLongExtra(Globle._ID,0);
System.out.println(""+_id);
loadData(_id);
super.onResume();
} | {
"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 |
Passing valid cell phone number | @org.junit.Test
public void testPositiveScenario() {
boolean result = Validation.validateSAPhoneNumber("+27712612199");// function should return true
assertEquals(true, result);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void validateMobileNumber(){\n /*\n Checking For Mobile number\n The Accepted Types Are +00 000000000 ; +00 0000000000 ;+000 0000000000; 0 0000000000 ; 00 0000000000\n */\n Boolean mobileNumber = Pattern.matches(\"^[0]?([+][0-9]{2,3})?[-][6-9]+[0-9]{9}\",getMobileNumber());\n System.out.println(mobileNumberResult(mobileNumber));\n }",
"private boolean is_phonenumber(String nr)\n\t{\n\t\t// if the string is not null, length is between 0 and 16, starts with \"00\" and all the characters in the sttring are numbers\n\t\t// then it's valid\n\t\tif(nr != null && nr.length() > 0 && nr.length() < 16 && nr.substring(0, 2).equals(\"00\") && valid_numbers(nr))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"void validateMobileNumber(String stringToBeValidated,String name);",
"public String validarTelefono(String tel) {\n int lon = tel.length();\n if (lon == 9) {\n if (isNumeric(tel)) {\n return tel;\n } else {\n return \"\";\n }\n } else if (lon == 8) {\n return \"0\" + tel;\n } else if (lon == 7) {\n return \"07\" + tel;\n } else if (lon == 6) {\n return \"072\" + tel;\n } else {\n return \"\";\n }\n }",
"private boolean isPhoneValid(String phoneno) {\n return phoneno.length() > 9;\n }",
"void formatPhoneNumber(String phoneNumber) throws PhoneNumberFormatException;",
"java.lang.String getPhonenumber();",
"private boolean validatePhone(String phone) {\n if (phone.matches(\"\\\\d{10}\")) {\n return true;\n } //validating phone number with -, . or spaces\n else if (phone.matches(\"\\\\d{3}[-\\\\.\\\\s]\\\\d{3}[-\\\\.\\\\s]\\\\d{4}\")) {\n return true;\n } //validating phone number where area code is in braces ()\n else if (phone.matches(\"\\\\(\\\\d{3}\\\\)-\\\\d{3}-\\\\d{4}\")) {\n return true;\n } //return false if nothing matches the input\n else {\n return false;\n }\n }",
"@Override\n public boolean isValid(PhoneNumber phoneNumber) {\n String number = phoneNumber.getNumber();\n return isPhoneNumber(number) && number.startsWith(\"+380\") && number.length() == 13;\n }",
"public static boolean checkPhoneNumber(String phone){\n String regex = \"\\\\d{9}\"; \n if (phone.matches(regex))\n return true;\n else\n return false;\n }",
"private boolean isPhoneValid(String phone){\n try{\n Long.parseLong(phone.replace(\"-\", \"\").replace(\"(\", \"\")\n .replace(\")\", \"\"));\n return true;\n } catch (Exception e){\n return false;\n }\n }",
"java.lang.String getPhoneNumber();",
"java.lang.String getPhoneNumber();",
"java.lang.String getPhoneNumber();",
"private static boolean validatePhoneNumber(String phoneNo) {\n if (phoneNo.matches(\"\\\\d{10}\")) return true;\n //validating phone number with -, . or spaces\n else if(phoneNo.matches(\"\\\\d{3}[-\\\\.\\\\s]\\\\d{3}[-\\\\.\\\\s]\\\\d{4}\")) return true;\n //validating phone number with extension length from 3 to 5\n else if(phoneNo.matches(\"\\\\d{3}-\\\\d{3}-\\\\d{4}\\\\s(x|(ext))\\\\d{3,5}\")) return true;\n //validating phone number where area code is in braces ()\n else if(phoneNo.matches(\"\\\\(\\\\d{3}\\\\)-\\\\d{3}-\\\\d{4}\")) return true;\n //return false if nothing matches the input\n else return false;\n\n }",
"java.lang.String getUserPhone();",
"private boolean isPhoneValid(String phone) {\n return !phone.contains(\" \");\r\n }",
"public long getPhoneNumber() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t// getter method initialized\t\t\t\t \r\n Scanner scanner = new Scanner(System.in);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t// Initialize the scanner to get input from User\r\n System.out.print(\"Enter Phone Number : \");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // This will print the argument at the end of the line\r\n phoneNumber = scanner.nextLong();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Read long input from the User\r\n String inputPhoneNumber = Long.toString(phoneNumber);\t\t\t\t\t\t\t\t\t\t // convert Long to string.\r\n Pattern pattern = Pattern.compile(\"\\\\d{10}\");\t\t\t\t\t\t\t\t\t\t\t // The Pattern class represents a compiled regular expression.\r\n Matcher matcher = pattern.matcher(inputPhoneNumber );\t\t\t\t\t\t\t\t\t\t\t\t\t // The resulting Pattern object is used to obtain a Matcher instance.\r\n if (matcher.matches());\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // if loop ..to check input from the User\r\n else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// else loop started\r\n System.out.println(\"Invalid Phone Number - Please enter the Phone number again\");}\t\t \t// This will print the argument at the end of the line\t\r\n return phoneNumber;}",
"abstract void telephoneValidity();",
"private boolean checkPhoneNum() {\n\t\tphoneNum = et_phone.getText().toString().trim();\r\n\t\tif(isMobileNO(phoneNum)){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"private boolean validate(){\n\n String MobilePattern = \"[0-9]{10}\";\n String name = String.valueOf(userName.getText());\n String number = String.valueOf(userNumber.getText());\n\n\n if(name.length() > 25){\n Toast.makeText(getApplicationContext(), \"pls enter less the 25 characher in user name\",\n Toast.LENGTH_SHORT).show();\n return true;\n }\n\n\n\n else if(name.length() == 0 || number.length() == 0 ){\n Toast.makeText(getApplicationContext(), \"pls fill the empty fields\",\n Toast.LENGTH_SHORT).show();\n return false;\n }\n\n\n\n else if(number.matches(MobilePattern))\n {\n\n return true;\n }\n else if(!number.matches(MobilePattern))\n {\n Toast.makeText(getApplicationContext(), \"Please enter valid 10\" +\n \"digit phone number\", Toast.LENGTH_SHORT).show();\n\n\n return false;\n }\n\n return false;\n\n }",
"public final boolean checkPhoneNum() {\n EditText editText = (EditText) _$_findCachedViewById(R.id.etPhoneNum);\n Intrinsics.checkExpressionValueIsNotNull(editText, \"etPhoneNum\");\n CharSequence text = editText.getText();\n if (text == null || text.length() == 0) {\n showMsg(\"请输入手机号\");\n return false;\n }\n EditText editText2 = (EditText) _$_findCachedViewById(R.id.etPhoneNum);\n Intrinsics.checkExpressionValueIsNotNull(editText2, \"etPhoneNum\");\n if (editText2.getText().length() == 11) {\n return true;\n }\n showMsg(\"请输入正确的手机号\");\n return false;\n }",
"@Test\n public void invalidCaleeNumber(){\n PhoneCall call = new PhoneCall(\"503-449-7833\", \"ABCD\", \"01/01/2020\", \"1:00 am\", \"01/01/2020\", \"1:00 am\");\n assertThat(call.getCallee(), not(nullValue()));\n }",
"String formatPhoneNumber(String phoneNumber);",
"boolean hasPhoneNumber();",
"public void setCellPhoneNumber(String cellPhoneNumber) {\n this.cellPhoneNumber = cellPhoneNumber;\n }",
"void telephoneValidity(M person) {\n // Valid data\n assignValidData(person);\n assertDoesNotThrow(person::checkDataValidity);\n person.setTelephone(\"+391111111111\");\n assertDoesNotThrow(person::checkDataValidity);\n person.setTelephone(\"1111111111\");\n assertDoesNotThrow(person::checkDataValidity);\n person.setTelephone(\"111 1111111\");\n assertDoesNotThrow(person::checkDataValidity);\n\n // Invalid data\n person.setTelephone(\"AAA\");\n assertThrows(InvalidFieldException.class, person::checkDataValidity);\n }",
"public void setCellphone(String cellphone) {\n this.cellphone = cellphone;\n }",
"private void txtphnoFocusLost(java.awt.event.FocusEvent evt) {\n String ph=txtphno.getText();\n char[]ch=ph.toCharArray();\n int j=0;\n if(ph.length()!=10)\n {\n JOptionPane.showMessageDialog(this, \"You Entered Wrong phone number\");\n }\n \n for(int i=0; i<ph.length(); i++)\n {\n if(ch[i]<48 || ch[i]>57)\n {\n j++;\n }\n }\n \n if(j!=0)\n {\n JOptionPane.showMessageDialog(this, \"Only Numerical Values should be Entered\");\n\n }\n }",
"private boolean isPhoneValid(String password) {\n return password.length() == 10;\r\n }",
"public static boolean isValidPhoneNo(String userInput) {\n return Pattern.matches(Constants.PHONENO_VALIDATION, userInput);\n }",
"void setPhone(String phone) throws IllegalArgumentException;",
"@Test\n public void testIsValidPhonenumber() {\n System.out.println(\"isValidPhonenumber\");\n String phonenumber = \"gd566666666666666666666666666666666666666\";\n boolean expResult = false;\n boolean result = ValidVariables.isValidPhonenumber(phonenumber);\n assertEquals(expResult, result);\n }",
"public static boolean isValidPhoneNumber(String number) {\n\n if(number.length()==10 && isValidNumber(number)){\n System.out.print(\"Is \" + number + \" a valid phone number : \");\n return true;\n }\n\n else{\n System.out.print(\"Is \" + number + \" a valid phone number : \");\n return false;\n }\n \n }",
"public static String validPhone(String message){\n boolean success = false;\n String line = \"\";\n do {\n line = readLine(message).trim();\n success = checkPhoneNumber(line);\n if (!success)\n System.out.println(\"Debes introducir un número de teléfono válido... \");\n } while(!success);\n return line;\n }",
"java.lang.String getPhone();",
"private boolean isValidNumber() {\n String mobileNumber = ((EditText) findViewById(\n R.id.account_mobile_number_edit_text)).getText().toString();\n\n return PhoneNumberUtils.isValidMobileNumber(PhoneNumberUtils.formatMobileNumber(mobileNumber));\n }",
"@Override\n public String getphoneNumber() {\n return ((EditText)findViewById(R.id.phoneNumberUserPage)).getText().toString().trim();\n }",
"private void formatPhoneNum() {\n\t\tthis.phoneNum = \"(\" + this.phoneNum.substring(0, 3) + \") \" + this.phoneNum.substring(3, 6) + \" \"\n\t\t\t\t+ this.phoneNum.substring(6);\n\t}",
"void setPhone(String ph){ // SETTER METHOD\n\t\tif(ph.length()>10 && ph.length()<=13){\n\t\t\tphone = ph; // writing the data based on some rules\n\t\t}else{\n\t\t\tphone = \"NA\";\n\t\t\tSystem.out.println(\"Please Enter Correct Phone Number\");\n\t\t}\n\t}",
"public static boolean isValidMobileNo(String str) {\n Pattern ptrn = Pattern.compile(\"(0/91)?[7-9][0-9]{9}\"); \r\n //the matcher() method creates a matcher that will match the given input against this pattern \r\n Matcher match = ptrn.matcher(str); \r\n //returns a boolean value \r\n return (match.find() && match.group().equals(str)); \r\n }",
"public void setPhoneNumber(java.lang.CharSequence value) {\n this.phone_number = value;\n }",
"@Override\n public void verifyHasPhone() {\n }",
"public boolean validatePhoneNumber(String input){\n\t\tif (input.matches(\"\\\\d{10}\")) return true;\n\t\t//validating phone number with -, . or spaces\n\t\telse if(input.matches(\"\\\\d{3}[-\\\\.\\\\s]\\\\d{3}[-\\\\.\\\\s]\\\\d{4}\")) return true;\n\t\t//validating phone number with extension length from 3 to 5\n\t\telse if(input.matches(\"\\\\d{3}-\\\\d{3}-\\\\d{4}\\\\s(x|(ext))\\\\d{3,5}\")) return true;\n\t\t//validating phone number where area code is in braces ()\n\t\telse if(input.matches(\"\\\\(\\\\d{3}\\\\)-\\\\d{3}-\\\\d{4}\")) return true;\n\t\t//return false if nothing matches the input\n\t\telse return false;\n\t}",
"public static String validPhoneNumber(String input) throws IllegalArgumentException {\n\t\tif (input == null || input.length() == 0) {\n\t\t throw new IllegalArgumentException(\"PhoneNumber is not present.\");\n\t\t}\n\t\t\n\t\tString phoneNumberRegex = \"^\\\\+?[0-9 -]{3,20}$\";\n\t\t\n\t\tinput = input.trim();\n\t\t\n\t\tPattern pattern = Pattern.compile(phoneNumberRegex);\n\t\tboolean matchesPattern = pattern.matcher(input).matches();\n\t\t\n\t\tinput = input.trim().replaceAll(\"[- ]+\",\"\");\n\t\t\n\t\tif(!matchesPattern || input.length() < 3){\n\t\t\tthrow new IllegalArgumentException(\"PhoneNumber is not valid.\");\n\t\t}\n\t\t\n\t\treturn input;\n\t}",
"@RequestMapping(value = \"/user/validate\")\n @Service\n public @ResponseBody ValidateResult validatePhoneNumberAPI(@RequestParam(value = \"phoneNumber\", required = true) String phoneNumber) {\n \tValidateResult result = new ValidateResult();\n \t\n \tresult.setResult(phoneNumber.substring(0, Math.min(phoneNumber.length(), 10)));\n \t\n \treturn result;\n }",
"@Test\n public void contactNumber_WhenValid_ShouldReturnTrue(){\n RegexTest valid = new RegexTest();\n boolean result = valid.contactNumber( \"91 1234567890\");\n Assert.assertEquals(true,result);\n }",
"public String inputPhoneNumber() {\n String phoneNumber = editTextPhoneNumber.getText().toString();\n return phoneNumber;\n }",
"public void enterPhoneNumber() throws IOException {\n\t\tLoginSignupCompanyPage sp = new LoginSignupCompanyPage(driver);\n\t\tlog.info(\"Verifying the Phone Number is available or not\");\n\t\tAssert.assertTrue(enterPhoneNumber.isDisplayed());\n\t\tenterPhoneNumber.sendKeys(BasePage.getCellData(xlsxName, sheetName, 9, 0));\n\n\t}",
"public static boolean validatePhone(String number) {\n if (number.length() == 8) {\n for (int i = 0; i < number.length(); i++) {\n if (!Character.isDigit(number.charAt(i))) {\n return false;\n }\n } return true;\n } return false;\n }",
"public static final String number2show(String phoneNumber) throws Exception {\n\t\tif (phoneNumber == null || phoneNumber.length() == 0) {\n\t\t\treturn phoneNumber;\n\t\t}\n\n\t\tboolean isIpCall = false;\n\n\t\tint lth = phoneNumber.length();\n\t\tif(lth >= CHINA_MOBILE_LDC.length()){\n\t\t\tif (phoneNumber.substring(0, 5).equals(CHINA_MOBILE_LDC)) {\n\t\t\t\tisIpCall = true;\n\n\t\t\t\tphoneNumber = phoneNumber.substring(5);\n\t\t\t}\n\t\t}\n\t\t//phone not encrypt yet, like 10086/955555 etc, it is not a cipher text\n\t\tif (phoneNumber.length() != CIPHER_FIXED_LENGTH) {\n\t\t\t//with '+'\n\t\t\tif (phoneNumber.length() != 22) {\n\t\t\t\tif (isIpCall) {\n\t\t\t\t\treturn CHINA_MOBILE_LDC + phoneNumber;\n\t\t\t\t}\n\t\t\t\treturn phoneNumber;\n\t\t\t} else {\n\t\t\t\t// with '+' maybe\n\t\t\t\t//TODO: strange here\n\t\t\t\tchar first = phoneNumber.charAt(0);\n\t\t\t\tif (first != '+') {\n\t\t\t\t\tif (isIpCall) {\n\t\t\t\t\t\treturn CHINA_MOBILE_LDC + phoneNumber;\n\t\t\t\t\t}\n\t\t\t\t\treturn phoneNumber;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn phoneNumber;\n\t\t}\n\t\tif (phoneNumber.charAt(0) == '+') {\n\t\t\tphoneNumber = phoneNumber.substring(1);\n\t\t}\n\t\t\n\t\t//TODO when input length is 21, can not know it is a \n\t\t//plain text or encrypt text\n\t\t//check the last two bit, if more than 19, return \n\t\tint length = phoneNumber.length();\n\t\tString twobitString = phoneNumber.substring(length - 2);\n\t\tint twobitInt = 0;\n\t\ttry{\n\t\t\ttwobitInt = Integer.parseInt(twobitString);\n\t\t}catch(Exception e){\n\t\t\treturn phoneNumber;\n\t\t}\n\t\t\n\t\tif(twobitInt > CIPHER_FIXED_LENGTH - LAST_TWO_BITS_INDICATOR){\n\t\t\treturn phoneNumber;\n\t\t}\n\t\t//do the real work, it is must the valid encrypt phone\n\t\tString body = unpadding(phoneNumber);\n\n\t\tString realPhone = show(body, TIMES);\n\t\tif (!isEmpty(realPhone) || realPhone.length() >= 2) {\n\t\t\tString with86 = realPhone.substring(0, 2);\n\n\t\t\tif (with86.equals(\"86\")) {\n\t\t\t\trealPhone = realPhone.substring(2);\n\t\t\t}\n\t\t}\n\n\t\tif (isIpCall) {\n\t\t\treturn CHINA_MOBILE_LDC + realPhone;\n\t\t}\n\t\treturn realPhone;\n\t}",
"public static String validatePhoneInput(Context context, TextInputEditText editText) {\n // store input\n String rawPhone = editText.getText().toString().trim();\n\n if (TextUtils.isEmpty(rawPhone)) {\n editText.setError(context.getResources().getString(R.string.editor_edt_empty_input));\n return null;\n }\n\n if (!Patterns.PHONE.matcher(rawPhone).matches()) {\n editText.setError(context.getResources().getString(R.string.editor_edt_invalid_input));\n return null;\n }\n\n return rawPhone;\n }",
"public String cleanPhoneNumber(String string) {\n\t\tstring = string.replaceAll(\"\\\\s\", \"\");\n\t\tif (!string.matches(\n\t\t\t\t\"(\\\\+?1{1})?([\\\\.\\\\,\\\\-]?)(\\\\(?[2-9]{1}[0-9]{2}\\\\)?)([\\\\.\\\\,\\\\-]?)(\\\\(?[2-9]{1}[0-9]{2}\\\\)?)([\\\\.\\\\,\\\\-]?)([0-9]{4})\"))\n\t\t\tthrow new IllegalArgumentException();\n\t\treturn string.replaceAll(\"(^\\\\+?1)?(\\\\W)+\", \"\");\n\t}",
"public static void main(String[] args) {\nString filename= \"C:\\\\Users\\\\aadm199\\\\Documents\\\\Personal\\\\javatraining\\\\phonebook.txt\";\nFile file = new File(filename);\nString phoneNumber=null;\ntry {\n\tBufferedReader br = new BufferedReader(new FileReader(file));\n phoneNumber = br.readLine();\nSystem.out.println(phoneNumber);\nbr.close();\n} catch (FileNotFoundException e) {\n\t// TODO Auto-generated catch block\n\te.printStackTrace();\n} catch (IOException e) {\n\t// TODO Auto-generated catch block\n\te.printStackTrace();\n}\ntry {\n\n\tif (phoneNumber.length()!=9) {\n\t\tthrow new NineDigitsException(phoneNumber);\n\t}\n\tif (phoneNumber.substring(0, 1).equals(\"4\")) {\n\t\tthrow new AreacodeException(phoneNumber);\n\t\t}\n\tif(phoneNumber.substring(0,2).equals(\"0\")){\n\t\tthrow new NumberzeroException(phoneNumber);\n\t\t}\n//\tSystem.out.println(phoneNumber.substring(2));\n//\tSystem.out.println(phoneNumber.substring(0, 1));\n//\tSystem.out.println(phoneNumber.subSequence(0, 3));\n//\tSystem.out.println(phoneNumber.length());\n//\tfor (int i=0;i<phoneNumber.length();i++) {\n//\t\tSystem.out.println(\"Printing Phonenumber loop\");\n//\t\tSystem.out.print(\"Phone number at position\"+ i + \"is \"+(phoneNumber.substring(i,i+1)));\n//\t}\n\tfor (int n=0;n<=phoneNumber.length()-2;n++) {\n\t\tif (phoneNumber.substring(n,n+1).equals(\"0\")){\n\t\t\tif ((phoneNumber.substring(n+1,n+2).equals(\"0\"))&&(phoneNumber.substring(n+2,n+3).equals(\"0\"))) {\n\t\t\t\tthrow new EmergencyNumberException(phoneNumber);\n\t\t\t}\n\t\t}\n\n\n\t}\n\n\n}catch (NineDigitsException e) {\n\tSystem.out.println(\"Error:Phone number is not 9 digits\");\n\tSystem.out.println(e.toString());\n}catch (AreacodeException e) {\n\tSystem.out.println(\"Error:Phone number is not having correct area code\");\n\tSystem.out.println(e.toString());\n}catch (EmergencyNumberException e) {\n\tSystem.out.println(\"Error:Phone number is 000 in it\");\n\tSystem.out.println(e.toString());\n}catch (NumberzeroException e){\n\tSystem.out.println(\"Second digit should not be 0\");\n\tSystem.out.println(e.toString());\n}\n\n\n\n\n\n\t}",
"@And(\"^I enter the plenti phone number using mobile website$\")\n public void I_enter_the_plenti_phone_number_using_mobile_website() throws Throwable {\n TextBoxes.typeTextbox(Elements.element(\"plenti_enroll.phone_number\"), TestUsers.getuslCustomer(null).getUser().getProfileAddress().getBestPhone());\n }",
"@Test\n public void invalidCallerNumber(){\n PhoneCall call = new PhoneCall(\"ABCD\", \"345-876-3456\", \"\", \"1:00 am\", \"01/01/2020\", \"1:00 am\");\n assertThat(call.getCaller(), not(nullValue()));\n }",
"private boolean isPhoneNumberValid(String phoneNumber){\n boolean isValid = false;\n\n String expression = \"^\\\\(?(\\\\d{3})\\\\)?[- ]?(\\\\d{3})[- ]?(\\\\d{4})$\";\n CharSequence inputStr = phoneNumber;\n Pattern pattern = Pattern.compile(expression);\n Matcher matcher = pattern.matcher(inputStr);\n if(matcher.matches()){\n isValid = true;\n }\n return isValid;\n }",
"public boolean phoneValidate(final String phone) {\n\n\t\ttry {\n\t\t\tif (empHomePhone.equals(employeeHomePhone.getText().toString()))\n\t\t\t\treturn true;\n\t\t\tint pNumber = Integer.parseInt(phone);\n\t\t\tif ((pNumber < Integer.MAX_VALUE) && (pNumber > 999999))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\n\t\t} catch (NumberFormatException e) {\n\t\t\tLog.e(\"Phone length is null\", \"Please fill the phone field\");\n\t\t\tToast.makeText(this, \"Phone Field is Empty\", Toast.LENGTH_SHORT)\n\t\t\t\t\t.show();\n\t\t\treturn false;\n\t\t}\n\n\t}",
"public void getPhoneNumber(ArrayList<String> document) {\r\n String line = \"\";\r\n for(int i = 0; i < document.size(); i++)\r\n {\r\n if(document.get(i).contains(\"Fax:\"))\r\n {\r\n continue;\r\n }\r\n if(document.get(i).contains(\"(\") || document.get(i).contains(\"-\"))\r\n {\r\n line = document.get(i);\r\n break;\r\n }\r\n }\r\n number = line.replaceAll(\"[^\\\\d]\", \"\");\r\n }",
"public static boolean validateMobile(String phone){\n int k=0;\n k=phone.length();\n if(k==10){\n return true;\n }\n return false;\n }",
"@Override\r\n\tpublic void formatPhoneNumber(String phoneNumber) throws PhoneNumberFormatException {\r\n\t\tboolean print = true;\r\n\r\n\t\tif (phoneNumber.charAt(0) != '(') {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(1))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(2))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(3))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (phoneNumber.charAt(4) != ')') {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (phoneNumber.charAt(5) != '-') {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(6))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(7))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(8))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (phoneNumber.charAt(9) != '-') {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(10))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(11))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(12))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(13))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\r\n\t\tif (print == true) {\r\n\t\t\tSystem.out.println(phoneNumber);\r\n\t\t}\r\n\r\n\t}",
"public static boolean checkPhoneNumber (String phoneNumber) throws UserRegistrationException{\n check = Pattern.compile(\"^[0-9]{1,3} [0-9]{10}$\").matcher(phoneNumber).matches();\n if (check) {\n return true;\n } else {\n throw new UserRegistrationException(\"Enter a valid Phone number\");\n }\n }",
"private boolean validatePhone(String phone_value) {\n \tboolean result;\n \t\n \tif (phone_value == null)\n \t{\n \t\tresult = false;\n \t}\n \telse\n \t{\n \t\tif ( phone_value.equals(\"\") )\n \t\t\tresult = true;\n \t\telse\n \t\t\tresult = android.util.Patterns.PHONE.matcher(phone_value).matches();\n \t}\n \t\n \treturn result;\n }",
"private boolean CheckPhoneNumber() {\n\t\tString phoneNumber = Phone_textBox.getText();\n\n\t\t// if field is empty\n\t\tif (phoneNumber.equals(\"\")) {\n\t\t\tif (!Phone_textBox.getStyleClass().contains(\"error\"))\n\t\t\t\tPhone_textBox.getStyleClass().add(\"error\");\n\t\t\tPhoneNote.setText(\"* Enter Number\");\n\t\t\treturn false;\n\t\t}\n\n\t\t// if field contains a character that is not a digit\n\t\tif (!phoneNumber.matches(\"([0-9])+\")) {\n\t\t\tif (!Phone_textBox.getStyleClass().contains(\"error\"))\n\t\t\t\tPhone_textBox.getStyleClass().add(\"error\");\n\t\t\tPhoneNote.setText(\"* Worng Format(?)\");\n\t\t\tTooltip.install(PhoneNote, new Tooltip(\"Phone Number can only contain digits\"));\n\t\t\treturn false;\n\t\t}\n\n\t\t// if field contains more or less than 10 digits\n\t\tif (phoneNumber.length() != 10) {\n\t\t\tif (!Phone_textBox.getStyleClass().contains(\"error\"))\n\t\t\t\tPhone_textBox.getStyleClass().add(\"error\");\n\t\t\tPhoneNote.setText(\"* Worng Format(?)\");\n\t\t\tTooltip.install(PhoneNote, new Tooltip(\"Phone Number must be 10 digits long\"));\n\t\t\treturn false;\n\t\t}\n\n\t\tPhone_textBox.getStyleClass().remove(\"error\");\n\t\tPhoneNote.setText(\"*\");\n\t\tTooltip.uninstall(PhoneNote, new Tooltip(\"Phone Number can only contain digits\"));\n\t\tTooltip.uninstall(PhoneNote, new Tooltip(\"Phone Number must be 10 digits long\"));\n\t\treturn true;\n\t}",
"public String cleanPhoneNumber(String string) {\n\t\tString newNumber = \"\"; \n\t\tfor(int i =0; i < string.length(); i++) {\n\t\t\tif(Character.isDigit(string.charAt(i))) {\n\t\t\t\tnewNumber = newNumber + string.charAt(i);\n\t\t\t}\n\t\t}\n\t\t//System.out.println(newNumber);\n\t\tif(newNumber.length() == 10) {\n\t\t\treturn newNumber;\n\t\t}\n\t\telse {\n\t\t\tthrow new IllegalArgumentException(\"number must contain only 10 digits\");\n\t\t}\n\t\t\n\t\t\n\t}",
"public boolean isValidPhone(TextInputLayout tiPhone, EditText etPhone) {\n String phone = etPhone.getText().toString().trim();\n boolean result = false;\n\n if (phone.length() == 0)\n tiPhone.setError(c.getString(R.string.required));\n else if (phone.length() != PHONE_SIZE)\n tiPhone.setError(c.getString(R.string.specificLength, Integer.toString(PHONE_SIZE)));\n else if (!phone.matches(\"\\\\d{10}\"))\n tiPhone.setError(c.getString(R.string.onlyNumbers));\n else {\n result = true;\n tiPhone.setError(null);\n }\n return result;\n }",
"public Optional<String> validatePhoneNumber(String number) {\n\n String regexStr = \"^[0-9]{11}$\";\n if (number.matches(regexStr) && number.substring(0, 1).equals(\"0\")) {\n return Optional.of(formatPhoneNumber(number));\n }\n return Optional.absent();\n }",
"private boolean isValidMobile(String phone) {\n if (!Pattern.matches(\"[a-zA-Z]+\", phone)) {\n return phone.length() == 10;\n }\n return false;\n }",
"public boolean isPhoneValid(String phone) {\n return phone.length() < 11;\n }",
"@Test\n public void testProcessPhoneNumbers() {\n StdInputPhoneNumberProcessor processor = new StdInputPhoneNumberProcessor(scanner, matcher);\n processor.processPhoneNumbers();\n }",
"private boolean isValidMobileNumber(String number) {\n return Patterns.PHONE.matcher(number).matches() && (number.length() > 10);\n }",
"String getPhone(int type);",
"public static boolean checkphnum(String phonenum) {\n\n if (phonenum.matches(\"\\\\d\\\\d\\\\d-\\\\d\\\\d\\\\d-\\\\d\\\\d\\\\d\\\\d\"))\n return true;\n else\n return false;\n\n\n }",
"public String cleanPhoneNumber(String string) {\n\t\t\n\t\t//Start by trimming the whitespace from the input\n\t\tstring = string.trim();\n\t\t//Create an array of valid numbers to test against the input\n\t\tInteger[] phoneNumberValues = new Integer[] {0,1,2,3,4,5,6,7,8,9};\n\t\t//Create an array of invalid input characters to throw exceptions against\n\t\tString[] invalidCharacters = new String[] {\"a\",\"b\",\"c\",\"@\",\"&\",\"!\",\":\"};\n\n\t\tfor (int i=0; i<string.length(); i++) {\n\t\t\t//Create a temporary value to store the character we're checking as a String\n\t\t\tString tempString = \"\";\n\t\t\t//Create an integer variable with the numeric value of the character from the phone number string\n\t\t\tint temp = Character.getNumericValue(string.charAt(i));\n\t\t\t/*\n\t\t\t * If the integer value associated with the ith index of the phone number isn't a number, remove it\n\t\t\t */\n\t\t\tif (!Arrays.asList(phoneNumberValues).contains(temp)){\n\t\t\t\ttempString = tempString + string.charAt(i);\n\t\t\t\t/*\n\t\t\t\t * If the ith index of the phone number is within our array of invalid characters, throw an illegal argument exception\n\t\t\t\t */\n\t\t\t\tif (Arrays.asList(invalidCharacters).contains(tempString)) {\n\t\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t\t}\n\t\t\t\tstring = string.replace(tempString ,\"\");\n\t\t\t\ti--;\n\n\t\t\t}\n\t\t}\n\t\t//Final check to make sure the phone number is the right length. Otherwise, throw an illegal argument exception\n\t\tif(string.length()>10) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\treturn string;\n\t\t/*\n\t\t * FOR FUTURE REFERENCE: It would probably be easier and more efficient to compare ascii values. I don't think we would need\n\t\t * to use both an Integer array and String Array. Less conditionals, as well. \n\t\t */\n\t}",
"public void phone_validate(View v1) {\n Intent A2Intent = new Intent (v1.getContext(), Main2Activity.class);\n EditText phone = (EditText) findViewById(R.id.editText);\n // pass the entered phone number to the next activity\n //A2Intent.putExtra(\"phoneNumber\", tv2.getText());\n String ph = phone.getText().toString();\n A2Intent.putExtra(\"phoneNumber\", ph);\n\n // start the next activity/page\n startActivity(A2Intent);\n\n\n }",
"@Override\n\tpublic Phone parse(String completePhonenumber, Locale locale) throws ParseException {\n\t\t\n\t\tSystem.out.println(\"inside parse method of phonenumber formatter\");\n\t\t\n\t\t\n\t\tPhone phone=new Phone();\n\t\t//split the string received from the user\n\t\t\t\tString[] phoneNumberArray = completePhonenumber.split(\"-\");\n\t\t//wheather number consist of \"-\"\n\t\tint index = completePhonenumber.indexOf('-');\n\t\t\n\t\tif(index == -1) {\n\t\t\t\n\t\t}\n\t\t\n\t\t//if the \"-\" is not found add 91 as a default country code\n\t\t\n\t\t//exract the country code and set it to phone class coun try code property\n\t\tphone.setCountrycode(\"91\");\n\t\tphone.setUsernumber(phoneNumberArray[1]);\n\t\t\n\t\t\n\t\t\t//extract the country code and set it to phone class country code property\n\t\t\n\t\treturn phone;\n\t\t\n\t}",
"public static void isValidPhoneNum(String str) {\n\tisValid(str);\n\t//validate that it is a valid phone number\n\tif(!str.matches(\"^(?:(?:\\\\+?1\\\\s*(?:[.-]\\\\s*)?)?(?:\\\\(\\\\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\\\\s*\\\\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\\\\s*(?:[.-]\\\\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\\\\s*(?:[.-]\\\\s*)?([0-9]{4})(?:\\\\s*(?:#|x\\\\.?|ext\\\\.?|extension)\\\\s*(\\\\d+))?$\"))\n\t throw new IllegalArgumentException();\n }",
"public String checkPhone() {\n String phone = \"\"; // Create phone\n boolean isOK = true; // Condition loop\n\n while (isOK) {\n phone = checkEmpty(\"Phone\"); // Call method to check input of phone\n String phoneRegex = \"\\\\d{10,11}\"; // Pattern for phone number\n boolean isContinue = true; // Condition loop\n\n while (isContinue) {\n // If pattern not match, the print out error\n if (!Pattern.matches(phoneRegex, phone)) {\n System.out.println(\"Phone number must be 10 or 11 number!\");\n System.out.print(\"Try anthor phone: \");\n phone = checkEmpty(\"Phone\");\n } else {\n isContinue = false;\n }\n }\n\n boolean isExist = false; // Check exist phone\n for (Account acc : accounts) {\n if (phone.equals(acc.getPhone())) {\n // Check phone if exist print out error\n System.out.println(\"This phone has already existed!\");\n System.out.print(\"Try another phone: \");\n isExist = true;\n }\n }\n\n // If phone not exist then return phone\n if (!isExist) {\n return phone;\n }\n }\n return phone; // Return phone\n }",
"public static boolean isValidEgyptianMobileNumber(String number) {\n if (number.length() != 11) {\n return false;\n } else if (!number.startsWith(\"01\")) {\n return false;\n } else {\n char operatorDifferentiator = number.charAt(2);\n\n if (operatorDifferentiator != '0' && operatorDifferentiator != '1' && operatorDifferentiator != '2') {\n return false;\n } else {\n try {\n long l = Long.parseLong(number);\n } catch (NumberFormatException ex) {\n return false;\n }\n }\n }\n return true;\n }",
"public boolean validatePhoneNumber(String phoneNumber) {\n\t\t// TODO: your work\n\t\tif (phoneNumber.length() != 10) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!phoneNumber.startsWith(\"0\")) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\tInteger.parseInt(phoneNumber);\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"public void setPhoneNum(String phoneNum) {\n this.phoneNum = phoneNum;\n }",
"private static boolean isContactNumberValid(String contactNumber) {\n return contactNumber.matches(\"\\\\d{10}\");\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tboolean isRegularPhoneNumber = phoneEditView.getText()\n\t\t\t\t\t\t.toString().matches(\"[0-9]{10}\");\n\t\t\t\tphoneCheckRes(isRegularPhoneNumber);\n\t\t\t}",
"static boolean isValidPhoneNumber(String phoneNumber) {\n return phoneNumber != null && Pattern.matches(\"\\\\d\\\\d\\\\d-\\\\d\\\\d\\\\d-\\\\d\\\\d\\\\d\\\\d\", phoneNumber);\n }",
"boolean hasPhone();",
"public void setTelphone(String telphone) {\n this.telphone = telphone;\n }",
"public void setTelphone(String telphone) {\n this.telphone = telphone;\n }",
"public void SetCheckoutRegistrationPhonecode_number(String phoneno){\r\n\r\n\t\tString Phoneno = getValue(phoneno);\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:- Registration Phone code and number should be entered as , \"+Phoneno);\r\n\t\ttry{\r\n\r\n\r\n\t\t\tsendKeys(locator_split(\"txtcheckoutregistrationPhonenumber\"),Phoneno);\r\n\t\t\tSystem.out.println(\"Registration Phone code and number is entered as , \"+Phoneno);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Registration Phone code and number is entered as , \"+Phoneno);\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Registration Phone number is not entered\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"checkoutregistrationPhonenumber\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" / \"+elementProperties.getProperty(\"checkoutregistrationPhonenumber\").toString().replace(\"By.\", \" \")+\r\n\t\t\t\t\t\" not found\");\r\n\t\t}\r\n\r\n\t}",
"public String standardizePhoneNumber() {\r\n StringBuilder phoneNumber = new StringBuilder();\r\n\r\n //retrieves all the digits from the string\r\n for (int i = 0; i < string.length(); i++) {\r\n char temp = string.charAt(i);\r\n if (Character.isDigit(temp)) {\r\n phoneNumber.append(temp);\r\n }\r\n }\r\n if (phoneNumber.length() != 10) {\r\n return \"This WackyString is not a phone number.\";\r\n }\r\n else {\r\n return \"(\" + phoneNumber.substring(0,3) + \") \" + phoneNumber.substring(3,6) + \"-\" + phoneNumber.substring(6);\r\n }\r\n }",
"boolean hasUserPhone();",
"public void checkNumberPhone(){\n PhoneBook phoneBook = new PhoneBook();\n System.out.println(\"Mời nhập số điện thoại mới \");\n String newnumberPhone;\n do {\n newnumberPhone = sc.next();\n if(!checknumberPhoneSake( newnumberPhone))\n System.out.println(\"Số điên thoai đã tồn tại mời nhập lai\");\n }while (!checknumberPhoneSake( newnumberPhone));\n phoneBook.setNumberphone(newnumberPhone);\n }",
"public void setTelNo(String telNo) {\n this.telNo = telNo;\n }",
"void showAlertForInvalidNumber();",
"private boolean isValidPhoneNumber(String phoneNumber) {\r\n System.out.println(\"Inside a valid phone number and number is\" + phoneNumber);\r\n return Pattern.matches(phoneNumberRegex, phoneNumber);\r\n }",
"@GET(\"numbervalidation\")\n Call<ResponseBody> numbervalidation(@Query(\"mobile_number\") String mobile_number, @Query(\"country_code\") String country_code, @Query(\"user_type\") String user_type, @Query(\"language\") String language, @Query(\"forgotpassword\") String forgotpassword);",
"private void verifyPhoneNumber() {\n showSnackbar(\"Verifying Phone Number\");\n\n //Remove Social Sign-ins\n// disableViews(mBinding.imageButtonFacebook, mBinding.imageButtonGoogle);\n //Remove Login Button\n disableViews(mBinding.buttonLogin);\n\n mPhoneNumber = getTextFromTextInputLayout(mBinding.textPhoneNumber);\n PhoneAuthOptions authOptions = PhoneAuthOptions.newBuilder(mFirebaseAuth)\n .setPhoneNumber(getString(R.string.country_code) + mPhoneNumber)\n .setTimeout(60L, TimeUnit.SECONDS).setActivity(this).setCallbacks(mCallBacks).build();\n\n PhoneAuthProvider.verifyPhoneNumber(authOptions);\n }",
"public void setphoneNum(String phoneNum) {\n\t\t_phoneNum = phoneNum;\n\t}",
"public boolean Validate() \r\n {\n return phoneNumber.matcher(getText()).matches();\r\n }",
"public static String beautifyPhone(String phone) {\r\n\t\tif (isNullOrEmpty(phone)) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\tif (phone.startsWith(\"84\")) {\r\n\t\t\treturn \"0\" + phone.substring(2);\r\n\t\t}\r\n\t\tif (phone.startsWith(\"+84\")) {\r\n\t\t\treturn \"0\" + phone.substring(3);\r\n\t\t}\r\n\t\treturn phone;\r\n\t}",
"private String isValid(String number)\n {\n\tif(number.matches(\"\\\\d+\")) return number;\n\treturn null;\n }",
"public GoldenContactBuilder phone(String value) {\n phone = value;\n return this;\n }"
] | [
"0.70040077",
"0.6886959",
"0.68506455",
"0.6724417",
"0.6696143",
"0.66611564",
"0.6616211",
"0.66057235",
"0.65191174",
"0.65173656",
"0.65089726",
"0.6491702",
"0.6491702",
"0.6491702",
"0.64861053",
"0.64701706",
"0.643656",
"0.6428982",
"0.6328045",
"0.6306943",
"0.6289468",
"0.628831",
"0.6283982",
"0.6269161",
"0.6262822",
"0.624871",
"0.62253857",
"0.6207572",
"0.61921525",
"0.6189106",
"0.6184905",
"0.6166465",
"0.6158822",
"0.61577445",
"0.6115424",
"0.61116785",
"0.60988975",
"0.6093588",
"0.6092545",
"0.6070236",
"0.60636353",
"0.60582125",
"0.60471535",
"0.6040866",
"0.60407615",
"0.6027984",
"0.6015557",
"0.6013585",
"0.6011135",
"0.6000388",
"0.59995574",
"0.5996589",
"0.5986354",
"0.59862083",
"0.59825146",
"0.5965147",
"0.5938652",
"0.5926921",
"0.59061474",
"0.59022135",
"0.58843505",
"0.5882906",
"0.58648103",
"0.5862694",
"0.58615494",
"0.5859014",
"0.58587575",
"0.5857348",
"0.5841756",
"0.5840005",
"0.5838637",
"0.583381",
"0.58272225",
"0.58160454",
"0.5809426",
"0.5804781",
"0.5804144",
"0.57989615",
"0.5798802",
"0.5796878",
"0.5796796",
"0.57953405",
"0.57908154",
"0.57906324",
"0.5785959",
"0.5781049",
"0.5781049",
"0.5777843",
"0.57776886",
"0.5777342",
"0.5773847",
"0.57688",
"0.5767677",
"0.576102",
"0.5759365",
"0.57484365",
"0.5747009",
"0.5742511",
"0.5741892",
"0.57160896",
"0.5715362"
] | 0.0 | -1 |
Passing invalid cell phone number | @org.junit.Test
public void testNegativeScenario() {
boolean result = Validation.validateSAPhoneNumber("071261219");// function should return false
assertEquals(false, result);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void validateMobileNumber(){\n /*\n Checking For Mobile number\n The Accepted Types Are +00 000000000 ; +00 0000000000 ;+000 0000000000; 0 0000000000 ; 00 0000000000\n */\n Boolean mobileNumber = Pattern.matches(\"^[0]?([+][0-9]{2,3})?[-][6-9]+[0-9]{9}\",getMobileNumber());\n System.out.println(mobileNumberResult(mobileNumber));\n }",
"void formatPhoneNumber(String phoneNumber) throws PhoneNumberFormatException;",
"private boolean isPhoneValid(String phoneno) {\n return phoneno.length() > 9;\n }",
"@Test\n public void invalidCaleeNumber(){\n PhoneCall call = new PhoneCall(\"503-449-7833\", \"ABCD\", \"01/01/2020\", \"1:00 am\", \"01/01/2020\", \"1:00 am\");\n assertThat(call.getCallee(), not(nullValue()));\n }",
"void validateMobileNumber(String stringToBeValidated,String name);",
"public String validarTelefono(String tel) {\n int lon = tel.length();\n if (lon == 9) {\n if (isNumeric(tel)) {\n return tel;\n } else {\n return \"\";\n }\n } else if (lon == 8) {\n return \"0\" + tel;\n } else if (lon == 7) {\n return \"07\" + tel;\n } else if (lon == 6) {\n return \"072\" + tel;\n } else {\n return \"\";\n }\n }",
"private boolean is_phonenumber(String nr)\n\t{\n\t\t// if the string is not null, length is between 0 and 16, starts with \"00\" and all the characters in the sttring are numbers\n\t\t// then it's valid\n\t\tif(nr != null && nr.length() > 0 && nr.length() < 16 && nr.substring(0, 2).equals(\"00\") && valid_numbers(nr))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"void showAlertForInvalidNumber();",
"private void txtphnoFocusLost(java.awt.event.FocusEvent evt) {\n String ph=txtphno.getText();\n char[]ch=ph.toCharArray();\n int j=0;\n if(ph.length()!=10)\n {\n JOptionPane.showMessageDialog(this, \"You Entered Wrong phone number\");\n }\n \n for(int i=0; i<ph.length(); i++)\n {\n if(ch[i]<48 || ch[i]>57)\n {\n j++;\n }\n }\n \n if(j!=0)\n {\n JOptionPane.showMessageDialog(this, \"Only Numerical Values should be Entered\");\n\n }\n }",
"private boolean isPhoneValid(String phone) {\n return !phone.contains(\" \");\r\n }",
"void setPhone(String phone) throws IllegalArgumentException;",
"private boolean validatePhone(String phone) {\n if (phone.matches(\"\\\\d{10}\")) {\n return true;\n } //validating phone number with -, . or spaces\n else if (phone.matches(\"\\\\d{3}[-\\\\.\\\\s]\\\\d{3}[-\\\\.\\\\s]\\\\d{4}\")) {\n return true;\n } //validating phone number where area code is in braces ()\n else if (phone.matches(\"\\\\(\\\\d{3}\\\\)-\\\\d{3}-\\\\d{4}\")) {\n return true;\n } //return false if nothing matches the input\n else {\n return false;\n }\n }",
"private boolean isPhoneValid(String phone){\n try{\n Long.parseLong(phone.replace(\"-\", \"\").replace(\"(\", \"\")\n .replace(\")\", \"\"));\n return true;\n } catch (Exception e){\n return false;\n }\n }",
"private static boolean validatePhoneNumber(String phoneNo) {\n if (phoneNo.matches(\"\\\\d{10}\")) return true;\n //validating phone number with -, . or spaces\n else if(phoneNo.matches(\"\\\\d{3}[-\\\\.\\\\s]\\\\d{3}[-\\\\.\\\\s]\\\\d{4}\")) return true;\n //validating phone number with extension length from 3 to 5\n else if(phoneNo.matches(\"\\\\d{3}-\\\\d{3}-\\\\d{4}\\\\s(x|(ext))\\\\d{3,5}\")) return true;\n //validating phone number where area code is in braces ()\n else if(phoneNo.matches(\"\\\\(\\\\d{3}\\\\)-\\\\d{3}-\\\\d{4}\")) return true;\n //return false if nothing matches the input\n else return false;\n\n }",
"void telephoneValidity(M person) {\n // Valid data\n assignValidData(person);\n assertDoesNotThrow(person::checkDataValidity);\n person.setTelephone(\"+391111111111\");\n assertDoesNotThrow(person::checkDataValidity);\n person.setTelephone(\"1111111111\");\n assertDoesNotThrow(person::checkDataValidity);\n person.setTelephone(\"111 1111111\");\n assertDoesNotThrow(person::checkDataValidity);\n\n // Invalid data\n person.setTelephone(\"AAA\");\n assertThrows(InvalidFieldException.class, person::checkDataValidity);\n }",
"private boolean validate(){\n\n String MobilePattern = \"[0-9]{10}\";\n String name = String.valueOf(userName.getText());\n String number = String.valueOf(userNumber.getText());\n\n\n if(name.length() > 25){\n Toast.makeText(getApplicationContext(), \"pls enter less the 25 characher in user name\",\n Toast.LENGTH_SHORT).show();\n return true;\n }\n\n\n\n else if(name.length() == 0 || number.length() == 0 ){\n Toast.makeText(getApplicationContext(), \"pls fill the empty fields\",\n Toast.LENGTH_SHORT).show();\n return false;\n }\n\n\n\n else if(number.matches(MobilePattern))\n {\n\n return true;\n }\n else if(!number.matches(MobilePattern))\n {\n Toast.makeText(getApplicationContext(), \"Please enter valid 10\" +\n \"digit phone number\", Toast.LENGTH_SHORT).show();\n\n\n return false;\n }\n\n return false;\n\n }",
"abstract void telephoneValidity();",
"@Test\n public void invalidCallerNumber(){\n PhoneCall call = new PhoneCall(\"ABCD\", \"345-876-3456\", \"\", \"1:00 am\", \"01/01/2020\", \"1:00 am\");\n assertThat(call.getCaller(), not(nullValue()));\n }",
"public static void notValidNumberErr(){\n printLine();\n System.out.println(\" Oops! Please enter a valid task number\");\n printLine();\n }",
"public void setCellPhoneNumber(String cellPhoneNumber) {\n this.cellPhoneNumber = cellPhoneNumber;\n }",
"public static boolean checkPhoneNumber(String phone){\n String regex = \"\\\\d{9}\"; \n if (phone.matches(regex))\n return true;\n else\n return false;\n }",
"private boolean checkPhoneNum() {\n\t\tphoneNum = et_phone.getText().toString().trim();\r\n\t\tif(isMobileNO(phoneNum)){\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 void testInvalidNumber() {\n\t\t// Arrange\n\t\tString exceptionNumb = null;\n\t\tPhoneNumberDTO dto = new PhoneNumberDTO(INVALID_NUMBER);\n\t\tGetLastMadeCommunicationService service\n\t\t\t= new GetLastMadeCommunicationService(dto);\n\t\t\n\t\t// Act\n\t\ttry {\n\t\t\tservice.execute();\n\t\t\tfail(\"Should have thrown PhoneNumberNotValid\");\n\t\t} catch(PhoneNumberNotValid pnnv) {\n\t\t\texceptionNumb = pnnv.getNumber();\n\t\t}\n\t\t\n\t\t// Assert\n\t\tassertEquals(\"The number in the exception should be \"\n\t\t\t\t+ INVALID_NUMBER + \" but it was \" + exceptionNumb,\n\t\t\t\tINVALID_NUMBER, exceptionNumb);\n\t}",
"@Override\n public boolean isValid(PhoneNumber phoneNumber) {\n String number = phoneNumber.getNumber();\n return isPhoneNumber(number) && number.startsWith(\"+380\") && number.length() == 13;\n }",
"public static boolean isValidPhoneNo(String userInput) {\n return Pattern.matches(Constants.PHONENO_VALIDATION, userInput);\n }",
"public final boolean checkPhoneNum() {\n EditText editText = (EditText) _$_findCachedViewById(R.id.etPhoneNum);\n Intrinsics.checkExpressionValueIsNotNull(editText, \"etPhoneNum\");\n CharSequence text = editText.getText();\n if (text == null || text.length() == 0) {\n showMsg(\"请输入手机号\");\n return false;\n }\n EditText editText2 = (EditText) _$_findCachedViewById(R.id.etPhoneNum);\n Intrinsics.checkExpressionValueIsNotNull(editText2, \"etPhoneNum\");\n if (editText2.getText().length() == 11) {\n return true;\n }\n showMsg(\"请输入正确的手机号\");\n return false;\n }",
"public static String validPhone(String message){\n boolean success = false;\n String line = \"\";\n do {\n line = readLine(message).trim();\n success = checkPhoneNumber(line);\n if (!success)\n System.out.println(\"Debes introducir un número de teléfono válido... \");\n } while(!success);\n return line;\n }",
"public static String validatePhoneInput(Context context, TextInputEditText editText) {\n // store input\n String rawPhone = editText.getText().toString().trim();\n\n if (TextUtils.isEmpty(rawPhone)) {\n editText.setError(context.getResources().getString(R.string.editor_edt_empty_input));\n return null;\n }\n\n if (!Patterns.PHONE.matcher(rawPhone).matches()) {\n editText.setError(context.getResources().getString(R.string.editor_edt_invalid_input));\n return null;\n }\n\n return rawPhone;\n }",
"public void setCellphone(String cellphone) {\n this.cellphone = cellphone;\n }",
"public static String validPhoneNumber(String input) throws IllegalArgumentException {\n\t\tif (input == null || input.length() == 0) {\n\t\t throw new IllegalArgumentException(\"PhoneNumber is not present.\");\n\t\t}\n\t\t\n\t\tString phoneNumberRegex = \"^\\\\+?[0-9 -]{3,20}$\";\n\t\t\n\t\tinput = input.trim();\n\t\t\n\t\tPattern pattern = Pattern.compile(phoneNumberRegex);\n\t\tboolean matchesPattern = pattern.matcher(input).matches();\n\t\t\n\t\tinput = input.trim().replaceAll(\"[- ]+\",\"\");\n\t\t\n\t\tif(!matchesPattern || input.length() < 3){\n\t\t\tthrow new IllegalArgumentException(\"PhoneNumber is not valid.\");\n\t\t}\n\t\t\n\t\treturn input;\n\t}",
"public String cleanPhoneNumber(String string) {\n\t\tstring = string.replaceAll(\"\\\\s\", \"\");\n\t\tif (!string.matches(\n\t\t\t\t\"(\\\\+?1{1})?([\\\\.\\\\,\\\\-]?)(\\\\(?[2-9]{1}[0-9]{2}\\\\)?)([\\\\.\\\\,\\\\-]?)(\\\\(?[2-9]{1}[0-9]{2}\\\\)?)([\\\\.\\\\,\\\\-]?)([0-9]{4})\"))\n\t\t\tthrow new IllegalArgumentException();\n\t\treturn string.replaceAll(\"(^\\\\+?1)?(\\\\W)+\", \"\");\n\t}",
"public String cleanPhoneNumber(String string) {\n\t\t\n\t\t//Start by trimming the whitespace from the input\n\t\tstring = string.trim();\n\t\t//Create an array of valid numbers to test against the input\n\t\tInteger[] phoneNumberValues = new Integer[] {0,1,2,3,4,5,6,7,8,9};\n\t\t//Create an array of invalid input characters to throw exceptions against\n\t\tString[] invalidCharacters = new String[] {\"a\",\"b\",\"c\",\"@\",\"&\",\"!\",\":\"};\n\n\t\tfor (int i=0; i<string.length(); i++) {\n\t\t\t//Create a temporary value to store the character we're checking as a String\n\t\t\tString tempString = \"\";\n\t\t\t//Create an integer variable with the numeric value of the character from the phone number string\n\t\t\tint temp = Character.getNumericValue(string.charAt(i));\n\t\t\t/*\n\t\t\t * If the integer value associated with the ith index of the phone number isn't a number, remove it\n\t\t\t */\n\t\t\tif (!Arrays.asList(phoneNumberValues).contains(temp)){\n\t\t\t\ttempString = tempString + string.charAt(i);\n\t\t\t\t/*\n\t\t\t\t * If the ith index of the phone number is within our array of invalid characters, throw an illegal argument exception\n\t\t\t\t */\n\t\t\t\tif (Arrays.asList(invalidCharacters).contains(tempString)) {\n\t\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t\t}\n\t\t\t\tstring = string.replace(tempString ,\"\");\n\t\t\t\ti--;\n\n\t\t\t}\n\t\t}\n\t\t//Final check to make sure the phone number is the right length. Otherwise, throw an illegal argument exception\n\t\tif(string.length()>10) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\treturn string;\n\t\t/*\n\t\t * FOR FUTURE REFERENCE: It would probably be easier and more efficient to compare ascii values. I don't think we would need\n\t\t * to use both an Integer array and String Array. Less conditionals, as well. \n\t\t */\n\t}",
"void setPhone(String ph){ // SETTER METHOD\n\t\tif(ph.length()>10 && ph.length()<=13){\n\t\t\tphone = ph; // writing the data based on some rules\n\t\t}else{\n\t\t\tphone = \"NA\";\n\t\t\tSystem.out.println(\"Please Enter Correct Phone Number\");\n\t\t}\n\t}",
"public long getPhoneNumber() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t// getter method initialized\t\t\t\t \r\n Scanner scanner = new Scanner(System.in);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t// Initialize the scanner to get input from User\r\n System.out.print(\"Enter Phone Number : \");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // This will print the argument at the end of the line\r\n phoneNumber = scanner.nextLong();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Read long input from the User\r\n String inputPhoneNumber = Long.toString(phoneNumber);\t\t\t\t\t\t\t\t\t\t // convert Long to string.\r\n Pattern pattern = Pattern.compile(\"\\\\d{10}\");\t\t\t\t\t\t\t\t\t\t\t // The Pattern class represents a compiled regular expression.\r\n Matcher matcher = pattern.matcher(inputPhoneNumber );\t\t\t\t\t\t\t\t\t\t\t\t\t // The resulting Pattern object is used to obtain a Matcher instance.\r\n if (matcher.matches());\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // if loop ..to check input from the User\r\n else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// else loop started\r\n System.out.println(\"Invalid Phone Number - Please enter the Phone number again\");}\t\t \t// This will print the argument at the end of the line\t\r\n return phoneNumber;}",
"public static void main(String[] args) {\nString filename= \"C:\\\\Users\\\\aadm199\\\\Documents\\\\Personal\\\\javatraining\\\\phonebook.txt\";\nFile file = new File(filename);\nString phoneNumber=null;\ntry {\n\tBufferedReader br = new BufferedReader(new FileReader(file));\n phoneNumber = br.readLine();\nSystem.out.println(phoneNumber);\nbr.close();\n} catch (FileNotFoundException e) {\n\t// TODO Auto-generated catch block\n\te.printStackTrace();\n} catch (IOException e) {\n\t// TODO Auto-generated catch block\n\te.printStackTrace();\n}\ntry {\n\n\tif (phoneNumber.length()!=9) {\n\t\tthrow new NineDigitsException(phoneNumber);\n\t}\n\tif (phoneNumber.substring(0, 1).equals(\"4\")) {\n\t\tthrow new AreacodeException(phoneNumber);\n\t\t}\n\tif(phoneNumber.substring(0,2).equals(\"0\")){\n\t\tthrow new NumberzeroException(phoneNumber);\n\t\t}\n//\tSystem.out.println(phoneNumber.substring(2));\n//\tSystem.out.println(phoneNumber.substring(0, 1));\n//\tSystem.out.println(phoneNumber.subSequence(0, 3));\n//\tSystem.out.println(phoneNumber.length());\n//\tfor (int i=0;i<phoneNumber.length();i++) {\n//\t\tSystem.out.println(\"Printing Phonenumber loop\");\n//\t\tSystem.out.print(\"Phone number at position\"+ i + \"is \"+(phoneNumber.substring(i,i+1)));\n//\t}\n\tfor (int n=0;n<=phoneNumber.length()-2;n++) {\n\t\tif (phoneNumber.substring(n,n+1).equals(\"0\")){\n\t\t\tif ((phoneNumber.substring(n+1,n+2).equals(\"0\"))&&(phoneNumber.substring(n+2,n+3).equals(\"0\"))) {\n\t\t\t\tthrow new EmergencyNumberException(phoneNumber);\n\t\t\t}\n\t\t}\n\n\n\t}\n\n\n}catch (NineDigitsException e) {\n\tSystem.out.println(\"Error:Phone number is not 9 digits\");\n\tSystem.out.println(e.toString());\n}catch (AreacodeException e) {\n\tSystem.out.println(\"Error:Phone number is not having correct area code\");\n\tSystem.out.println(e.toString());\n}catch (EmergencyNumberException e) {\n\tSystem.out.println(\"Error:Phone number is 000 in it\");\n\tSystem.out.println(e.toString());\n}catch (NumberzeroException e){\n\tSystem.out.println(\"Second digit should not be 0\");\n\tSystem.out.println(e.toString());\n}\n\n\n\n\n\n\t}",
"java.lang.String getPhonenumber();",
"@Override\n public void failure(DigitsException exception) {\n Toast.makeText(ForgotPassword.this, \"Couldn't verify phone number\", Toast.LENGTH_SHORT).show();\n finish();\n }",
"private boolean isPhoneValid(String password) {\n return password.length() == 10;\r\n }",
"public void InvalidFormat();",
"public boolean isValidPhone(TextInputLayout tiPhone, EditText etPhone) {\n String phone = etPhone.getText().toString().trim();\n boolean result = false;\n\n if (phone.length() == 0)\n tiPhone.setError(c.getString(R.string.required));\n else if (phone.length() != PHONE_SIZE)\n tiPhone.setError(c.getString(R.string.specificLength, Integer.toString(PHONE_SIZE)));\n else if (!phone.matches(\"\\\\d{10}\"))\n tiPhone.setError(c.getString(R.string.onlyNumbers));\n else {\n result = true;\n tiPhone.setError(null);\n }\n return result;\n }",
"java.lang.String getPhoneNumber();",
"java.lang.String getPhoneNumber();",
"java.lang.String getPhoneNumber();",
"private boolean isValidNumber() {\n String mobileNumber = ((EditText) findViewById(\n R.id.account_mobile_number_edit_text)).getText().toString();\n\n return PhoneNumberUtils.isValidMobileNumber(PhoneNumberUtils.formatMobileNumber(mobileNumber));\n }",
"public String cleanPhoneNumber(String string) {\n\t\tString newNumber = \"\"; \n\t\tfor(int i =0; i < string.length(); i++) {\n\t\t\tif(Character.isDigit(string.charAt(i))) {\n\t\t\t\tnewNumber = newNumber + string.charAt(i);\n\t\t\t}\n\t\t}\n\t\t//System.out.println(newNumber);\n\t\tif(newNumber.length() == 10) {\n\t\t\treturn newNumber;\n\t\t}\n\t\telse {\n\t\t\tthrow new IllegalArgumentException(\"number must contain only 10 digits\");\n\t\t}\n\t\t\n\t\t\n\t}",
"public void setPhoneNumber(java.lang.CharSequence value) {\n this.phone_number = value;\n }",
"public static boolean isValidPhoneNumber(String number) {\n\n if(number.length()==10 && isValidNumber(number)){\n System.out.print(\"Is \" + number + \" a valid phone number : \");\n return true;\n }\n\n else{\n System.out.print(\"Is \" + number + \" a valid phone number : \");\n return false;\n }\n \n }",
"public boolean phoneValidate(final String phone) {\n\n\t\ttry {\n\t\t\tif (empHomePhone.equals(employeeHomePhone.getText().toString()))\n\t\t\t\treturn true;\n\t\t\tint pNumber = Integer.parseInt(phone);\n\t\t\tif ((pNumber < Integer.MAX_VALUE) && (pNumber > 999999))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\n\t\t} catch (NumberFormatException e) {\n\t\t\tLog.e(\"Phone length is null\", \"Please fill the phone field\");\n\t\t\tToast.makeText(this, \"Phone Field is Empty\", Toast.LENGTH_SHORT)\n\t\t\t\t\t.show();\n\t\t\treturn false;\n\t\t}\n\n\t}",
"private static String validateNumber(String number) {\r\n\r\n\t\t/*Checking if the number is null, or if its length is not equals to 16\r\n\t\t * or if the first two digits are not between 51 and 55.\r\n\t\t * If one of the following is not respected, an Illegal Argument\r\n\t\t * Exception with an appropriate message will be thrown.\r\n\t \t */\r\n\t\ttry{\r\n\t\t\tif (number == null \r\n\t\t\t\t\t|| number.length() != 16 \r\n\t\t\t\t\t|| Integer.parseInt(number.substring(0, 2)) < 51\r\n\t\t\t\t\t|| Integer.parseInt(number.substring(0, 2)) > 55)\r\n\t\t\tthrow new IllegalArgumentException(\"The Master card given does not respect the validation.\");\r\n\t\t}catch(NumberFormatException npe){\r\n\t\t\tthrow new IllegalArgumentException(\"The Master card given does not respect the validation.\");\r\n\t\t} \r\n\t\treturn number;\r\n\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tboolean isRegularPhoneNumber = phoneEditView.getText()\n\t\t\t\t\t\t.toString().matches(\"[0-9]{10}\");\n\t\t\t\tphoneCheckRes(isRegularPhoneNumber);\n\t\t\t}",
"public static boolean validatePhone(String number) {\n if (number.length() == 8) {\n for (int i = 0; i < number.length(); i++) {\n if (!Character.isDigit(number.charAt(i))) {\n return false;\n }\n } return true;\n } return false;\n }",
"public void setTelNo(String telNo) {\n this.telNo = telNo;\n }",
"public boolean isPhoneValid(String phone) {\n return phone.length() < 11;\n }",
"java.lang.String getUserPhone();",
"@Override\r\n\tpublic void formatPhoneNumber(String phoneNumber) throws PhoneNumberFormatException {\r\n\t\tboolean print = true;\r\n\r\n\t\tif (phoneNumber.charAt(0) != '(') {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(1))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(2))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(3))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (phoneNumber.charAt(4) != ')') {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (phoneNumber.charAt(5) != '-') {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(6))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(7))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(8))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (phoneNumber.charAt(9) != '-') {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(10))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(11))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(12))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(13))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\r\n\t\tif (print == true) {\r\n\t\t\tSystem.out.println(phoneNumber);\r\n\t\t}\r\n\r\n\t}",
"private void formatPhoneNum() {\n\t\tthis.phoneNum = \"(\" + this.phoneNum.substring(0, 3) + \") \" + this.phoneNum.substring(3, 6) + \" \"\n\t\t\t\t+ this.phoneNum.substring(6);\n\t}",
"public static boolean isValidEgyptianMobileNumber(String number) {\n if (number.length() != 11) {\n return false;\n } else if (!number.startsWith(\"01\")) {\n return false;\n } else {\n char operatorDifferentiator = number.charAt(2);\n\n if (operatorDifferentiator != '0' && operatorDifferentiator != '1' && operatorDifferentiator != '2') {\n return false;\n } else {\n try {\n long l = Long.parseLong(number);\n } catch (NumberFormatException ex) {\n return false;\n }\n }\n }\n return true;\n }",
"private boolean isPhoneNumberValid(String phoneNumber){\n boolean isValid = false;\n\n String expression = \"^\\\\(?(\\\\d{3})\\\\)?[- ]?(\\\\d{3})[- ]?(\\\\d{4})$\";\n CharSequence inputStr = phoneNumber;\n Pattern pattern = Pattern.compile(expression);\n Matcher matcher = pattern.matcher(inputStr);\n if(matcher.matches()){\n isValid = true;\n }\n return isValid;\n }",
"@Override\r\n\tpublic boolean validate(String num) {\n\t\treturn false;\r\n\t}",
"public void setTelNo(String telNo) {\n this.telNo = telNo;\n }",
"private static boolean isContactNumberValid(String contactNumber) {\n return contactNumber.matches(\"\\\\d{10}\");\n }",
"@Nullable\n/* */ protected String getInputNotNumericText(@NotNull ConversationContext context, @NotNull String invalidInput) {\n/* 74 */ return null;\n/* */ }",
"@Override\n public String getphoneNumber() {\n return ((EditText)findViewById(R.id.phoneNumberUserPage)).getText().toString().trim();\n }",
"String formatPhoneNumber(String phoneNumber);",
"private boolean validatePhone(String phone_value) {\n \tboolean result;\n \t\n \tif (phone_value == null)\n \t{\n \t\tresult = false;\n \t}\n \telse\n \t{\n \t\tif ( phone_value.equals(\"\") )\n \t\t\tresult = true;\n \t\telse\n \t\t\tresult = android.util.Patterns.PHONE.matcher(phone_value).matches();\n \t}\n \t\n \treturn result;\n }",
"private boolean isValidMobileNumber(String number) {\n return Patterns.PHONE.matcher(number).matches() && (number.length() > 10);\n }",
"@RequestMapping(value = \"/user/validate\")\n @Service\n public @ResponseBody ValidateResult validatePhoneNumberAPI(@RequestParam(value = \"phoneNumber\", required = true) String phoneNumber) {\n \tValidateResult result = new ValidateResult();\n \t\n \tresult.setResult(phoneNumber.substring(0, Math.min(phoneNumber.length(), 10)));\n \t\n \treturn result;\n }",
"private boolean isValidMobile(String phone) {\n if (!Pattern.matches(\"[a-zA-Z]+\", phone)) {\n return phone.length() == 10;\n }\n return false;\n }",
"@GET(\"numbervalidation\")\n Call<ResponseBody> numbervalidation(@Query(\"mobile_number\") String mobile_number, @Query(\"country_code\") String country_code, @Query(\"user_type\") String user_type, @Query(\"language\") String language, @Query(\"forgotpassword\") String forgotpassword);",
"@Test\n public void testIsValidPhonenumber() {\n System.out.println(\"isValidPhonenumber\");\n String phonenumber = \"gd566666666666666666666666666666666666666\";\n boolean expResult = false;\n boolean result = ValidVariables.isValidPhonenumber(phonenumber);\n assertEquals(expResult, result);\n }",
"public Optional<String> validatePhoneNumber(String number) {\n\n String regexStr = \"^[0-9]{11}$\";\n if (number.matches(regexStr) && number.substring(0, 1).equals(\"0\")) {\n return Optional.of(formatPhoneNumber(number));\n }\n return Optional.absent();\n }",
"public boolean validatePhoneNumber(String input){\n\t\tif (input.matches(\"\\\\d{10}\")) return true;\n\t\t//validating phone number with -, . or spaces\n\t\telse if(input.matches(\"\\\\d{3}[-\\\\.\\\\s]\\\\d{3}[-\\\\.\\\\s]\\\\d{4}\")) return true;\n\t\t//validating phone number with extension length from 3 to 5\n\t\telse if(input.matches(\"\\\\d{3}-\\\\d{3}-\\\\d{4}\\\\s(x|(ext))\\\\d{3,5}\")) return true;\n\t\t//validating phone number where area code is in braces ()\n\t\telse if(input.matches(\"\\\\(\\\\d{3}\\\\)-\\\\d{3}-\\\\d{4}\")) return true;\n\t\t//return false if nothing matches the input\n\t\telse return false;\n\t}",
"@Override\n public void verifyHasPhone() {\n }",
"public static final String number2show(String phoneNumber) throws Exception {\n\t\tif (phoneNumber == null || phoneNumber.length() == 0) {\n\t\t\treturn phoneNumber;\n\t\t}\n\n\t\tboolean isIpCall = false;\n\n\t\tint lth = phoneNumber.length();\n\t\tif(lth >= CHINA_MOBILE_LDC.length()){\n\t\t\tif (phoneNumber.substring(0, 5).equals(CHINA_MOBILE_LDC)) {\n\t\t\t\tisIpCall = true;\n\n\t\t\t\tphoneNumber = phoneNumber.substring(5);\n\t\t\t}\n\t\t}\n\t\t//phone not encrypt yet, like 10086/955555 etc, it is not a cipher text\n\t\tif (phoneNumber.length() != CIPHER_FIXED_LENGTH) {\n\t\t\t//with '+'\n\t\t\tif (phoneNumber.length() != 22) {\n\t\t\t\tif (isIpCall) {\n\t\t\t\t\treturn CHINA_MOBILE_LDC + phoneNumber;\n\t\t\t\t}\n\t\t\t\treturn phoneNumber;\n\t\t\t} else {\n\t\t\t\t// with '+' maybe\n\t\t\t\t//TODO: strange here\n\t\t\t\tchar first = phoneNumber.charAt(0);\n\t\t\t\tif (first != '+') {\n\t\t\t\t\tif (isIpCall) {\n\t\t\t\t\t\treturn CHINA_MOBILE_LDC + phoneNumber;\n\t\t\t\t\t}\n\t\t\t\t\treturn phoneNumber;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn phoneNumber;\n\t\t}\n\t\tif (phoneNumber.charAt(0) == '+') {\n\t\t\tphoneNumber = phoneNumber.substring(1);\n\t\t}\n\t\t\n\t\t//TODO when input length is 21, can not know it is a \n\t\t//plain text or encrypt text\n\t\t//check the last two bit, if more than 19, return \n\t\tint length = phoneNumber.length();\n\t\tString twobitString = phoneNumber.substring(length - 2);\n\t\tint twobitInt = 0;\n\t\ttry{\n\t\t\ttwobitInt = Integer.parseInt(twobitString);\n\t\t}catch(Exception e){\n\t\t\treturn phoneNumber;\n\t\t}\n\t\t\n\t\tif(twobitInt > CIPHER_FIXED_LENGTH - LAST_TWO_BITS_INDICATOR){\n\t\t\treturn phoneNumber;\n\t\t}\n\t\t//do the real work, it is must the valid encrypt phone\n\t\tString body = unpadding(phoneNumber);\n\n\t\tString realPhone = show(body, TIMES);\n\t\tif (!isEmpty(realPhone) || realPhone.length() >= 2) {\n\t\t\tString with86 = realPhone.substring(0, 2);\n\n\t\t\tif (with86.equals(\"86\")) {\n\t\t\t\trealPhone = realPhone.substring(2);\n\t\t\t}\n\t\t}\n\n\t\tif (isIpCall) {\n\t\t\treturn CHINA_MOBILE_LDC + realPhone;\n\t\t}\n\t\treturn realPhone;\n\t}",
"public void setTelNo(String telNo)\r\n\t{\r\n\t\tthis.telNo = telNo;\r\n\t}",
"int isValidNumber(String typedNumber){\n for(int i = 0; i<numContacts; ++i){\n Contact contact = ValidContactsArray[i];\n String number = contact.getContactNumber();\n if(typedNumber.equals(number)){\n return i;\n }\n }\n //if the contact is not found, return -1\n return -1;\n\n }",
"public static boolean validateMobile(String phone){\n int k=0;\n k=phone.length();\n if(k==10){\n return true;\n }\n return false;\n }",
"@And(\"^I enter the plenti phone number using mobile website$\")\n public void I_enter_the_plenti_phone_number_using_mobile_website() throws Throwable {\n TextBoxes.typeTextbox(Elements.element(\"plenti_enroll.phone_number\"), TestUsers.getuslCustomer(null).getUser().getProfileAddress().getBestPhone());\n }",
"public boolean validatePhoneNumber(String phoneNumber) {\n\t\t// TODO: your work\n\t\tif (phoneNumber.length() != 10) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!phoneNumber.startsWith(\"0\")) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\tInteger.parseInt(phoneNumber);\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"private String isValid(String number)\n {\n\tif(number.matches(\"\\\\d+\")) return number;\n\treturn null;\n }",
"public void enterPhoneNumber() throws IOException {\n\t\tLoginSignupCompanyPage sp = new LoginSignupCompanyPage(driver);\n\t\tlog.info(\"Verifying the Phone Number is available or not\");\n\t\tAssert.assertTrue(enterPhoneNumber.isDisplayed());\n\t\tenterPhoneNumber.sendKeys(BasePage.getCellData(xlsxName, sheetName, 9, 0));\n\n\t}",
"private boolean CheckPhoneNumber() {\n\t\tString phoneNumber = Phone_textBox.getText();\n\n\t\t// if field is empty\n\t\tif (phoneNumber.equals(\"\")) {\n\t\t\tif (!Phone_textBox.getStyleClass().contains(\"error\"))\n\t\t\t\tPhone_textBox.getStyleClass().add(\"error\");\n\t\t\tPhoneNote.setText(\"* Enter Number\");\n\t\t\treturn false;\n\t\t}\n\n\t\t// if field contains a character that is not a digit\n\t\tif (!phoneNumber.matches(\"([0-9])+\")) {\n\t\t\tif (!Phone_textBox.getStyleClass().contains(\"error\"))\n\t\t\t\tPhone_textBox.getStyleClass().add(\"error\");\n\t\t\tPhoneNote.setText(\"* Worng Format(?)\");\n\t\t\tTooltip.install(PhoneNote, new Tooltip(\"Phone Number can only contain digits\"));\n\t\t\treturn false;\n\t\t}\n\n\t\t// if field contains more or less than 10 digits\n\t\tif (phoneNumber.length() != 10) {\n\t\t\tif (!Phone_textBox.getStyleClass().contains(\"error\"))\n\t\t\t\tPhone_textBox.getStyleClass().add(\"error\");\n\t\t\tPhoneNote.setText(\"* Worng Format(?)\");\n\t\t\tTooltip.install(PhoneNote, new Tooltip(\"Phone Number must be 10 digits long\"));\n\t\t\treturn false;\n\t\t}\n\n\t\tPhone_textBox.getStyleClass().remove(\"error\");\n\t\tPhoneNote.setText(\"*\");\n\t\tTooltip.uninstall(PhoneNote, new Tooltip(\"Phone Number can only contain digits\"));\n\t\tTooltip.uninstall(PhoneNote, new Tooltip(\"Phone Number must be 10 digits long\"));\n\t\treturn true;\n\t}",
"public void setPhoneNum(String phoneNum) {\n this.phoneNum = phoneNum;\n }",
"public static boolean isValidMobileNo(String str) {\n Pattern ptrn = Pattern.compile(\"(0/91)?[7-9][0-9]{9}\"); \r\n //the matcher() method creates a matcher that will match the given input against this pattern \r\n Matcher match = ptrn.matcher(str); \r\n //returns a boolean value \r\n return (match.find() && match.group().equals(str)); \r\n }",
"static boolean isValidPhoneNumber(String phoneNumber) {\n return phoneNumber != null && Pattern.matches(\"\\\\d\\\\d\\\\d-\\\\d\\\\d\\\\d-\\\\d\\\\d\\\\d\\\\d\", phoneNumber);\n }",
"public void startMobileWithOnlyNumber92(final EditText et_email)\n {\n\n et_email.addTextChangedListener(new TextWatcher()\n {\n public void afterTextChanged(Editable s)\n {\n String x = s.toString();\n\n\n if (x.startsWith(\"1\")){\n\n Toast.makeText(LoginActivity.this, \"Pleae enter number starting with 03\", Toast.LENGTH_SHORT).show();\n et_email.setText(\"\");\n }\n if (x.startsWith(\"2\")){\n\n Toast.makeText(LoginActivity.this, \"Pleae enter number starting with 03\", Toast.LENGTH_SHORT).show();\n et_email.setText(\"\");\n }\n if (x.startsWith(\"3\")){\n\n Toast.makeText(LoginActivity.this, \"Pleae enter number starting with 03\", Toast.LENGTH_SHORT).show();\n et_email.setText(\"\");\n }\n\n if (x.startsWith(\"4\")){\n\n Toast.makeText(LoginActivity.this, \"Pleae enter number starting with 03\", Toast.LENGTH_SHORT).show();\n et_email.setText(\"\");\n }\n if (x.startsWith(\"5\")){\n\n Toast.makeText(LoginActivity.this, \"Pleae enter number starting with 03\", Toast.LENGTH_SHORT).show();\n et_email.setText(\"\");\n }\n if (x.startsWith(\"6\")){\n\n Toast.makeText(LoginActivity.this, \"Pleae enter number starting with 03\", Toast.LENGTH_SHORT).show();\n et_email.setText(\"\");\n }\n if (x.startsWith(\"7\")){\n\n Toast.makeText(LoginActivity.this, \"Pleae enter number starting with 03\", Toast.LENGTH_SHORT).show();\n et_email.setText(\"\");\n }\n if (x.startsWith(\"8\")){\n\n Toast.makeText(LoginActivity.this, \"Pleae enter number starting with 03\", Toast.LENGTH_SHORT).show();\n et_email.setText(\"\");\n }\n if (x.startsWith(\"9\")){\n\n Toast.makeText(LoginActivity.this, \"Pleae enter number starting with 03\", Toast.LENGTH_SHORT).show();\n et_email.setText(\"\");\n }\n\n if (x.startsWith(\"0\")){\n if (x.length()==11){\n //doctorSignInEmail.setText(x);\n et_email.setFilters(new InputFilter[] {new InputFilter.LengthFilter(11)});\n\n }\n }\n else {\n et_email.setFilters(new InputFilter[] {new InputFilter.LengthFilter(120)});\n }\n\n }\n public void beforeTextChanged(CharSequence s, int start, int count, int after)\n {\n\n }\n public void onTextChanged(CharSequence s, int start, int before, int count)\n {\n\n }\n });//end for login editText\n\n }",
"public static boolean checkPhoneNumber (String phoneNumber) throws UserRegistrationException{\n check = Pattern.compile(\"^[0-9]{1,3} [0-9]{10}$\").matcher(phoneNumber).matches();\n if (check) {\n return true;\n } else {\n throw new UserRegistrationException(\"Enter a valid Phone number\");\n }\n }",
"public void getPhoneNumber(ArrayList<String> document) {\r\n String line = \"\";\r\n for(int i = 0; i < document.size(); i++)\r\n {\r\n if(document.get(i).contains(\"Fax:\"))\r\n {\r\n continue;\r\n }\r\n if(document.get(i).contains(\"(\") || document.get(i).contains(\"-\"))\r\n {\r\n line = document.get(i);\r\n break;\r\n }\r\n }\r\n number = line.replaceAll(\"[^\\\\d]\", \"\");\r\n }",
"public static void isValidPhoneNum(String str) {\n\tisValid(str);\n\t//validate that it is a valid phone number\n\tif(!str.matches(\"^(?:(?:\\\\+?1\\\\s*(?:[.-]\\\\s*)?)?(?:\\\\(\\\\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\\\\s*\\\\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\\\\s*(?:[.-]\\\\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\\\\s*(?:[.-]\\\\s*)?([0-9]{4})(?:\\\\s*(?:#|x\\\\.?|ext\\\\.?|extension)\\\\s*(\\\\d+))?$\"))\n\t throw new IllegalArgumentException();\n }",
"private void processCallGarage(String phone) {\n if (phone != null && phone.length() > 0){\n phone = phone.replaceAll(\"\\\\s+\",\"\");\n this.mPhone = phone;\n\n if (ContextCompat.checkSelfPermission(GarageListActivity.this, android.Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(GarageListActivity.this, new String[]{Manifest.permission.CALL_PHONE}, REQUEST_PHONE_CALL);\n } else {\n Intent callSupport = new Intent(Intent.ACTION_CALL, Uri\n .parse(\"tel:\" + mPhone));\n startActivity(callSupport);\n }\n }else {\n showMessage(\"Garage này chưa cập nhật số điện thoại!\");\n }\n\n }",
"@Override\r\n\tpublic void setPhone(String phone) {\n\t\tif (phone == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"Null argument is not allowed\");\r\n\t\t}\r\n\t\tif (phone.equals(\"\")) {\r\n\t\t\tthrow new IllegalArgumentException(\"Empty argument is not allowed\");\r\n\t\t}\r\n\t\tthis.phone = phone;\r\n\t}",
"public void setTelphone(String telphone) {\n this.telphone = telphone;\n }",
"public void setTelphone(String telphone) {\n this.telphone = telphone;\n }",
"java.lang.String getPhone();",
"public String isGoodNumberInput(String s, String g) {\n boolean isBadInput = true;\n while (isBadInput) {\n g = scanner.nextLine();\n if (s.equals(\"changePhone\") || s.equals(\"phoneNumber\")) {\n if (!isNumeric(g)) {\n System.out.println(\"That is not a number, please enter a number\");\n } else if (g.length() >= 11) {\n System.out.println(\"I'm sorry that number is too large, place try again.\");\n } else if (g.length() < 10) {\n System.out.println(\"I'm sorry, that is too small please use 10 digits\");\n } else {\n isBadInput = false;\n }\n } else if (s.equals(\"changeStreet\") || s.equals(\"streetNumber\")) {\n if (!isNumeric(g)) {\n System.out.println(\"That is not a number, please enter a number\");\n } else if (g.length() < 0) {\n System.out.println(\"It seems you have not entered an address number. Please try again .\");\n } else if (g.length() > 10) {\n System.out.println(\"It seems like that is a little too long for an address number. Why don't you try again.\");\n } else {\n isBadInput = false;\n }\n } else if (s.equals(\"changeAptNum\") || s.equals(\"aptNum\")) {\n if (g.equalsIgnoreCase(\"n/a\")) {\n isBadInput = false;\n } else if (!isNumeric(g)) {\n System.out.println(\"That is not a number, please try again\");\n } else if (g.length() >= 6) {\n System.out.println(\"It seems like that is a little too long for an apartment number. Why don't you try again.\");\n } else {\n isBadInput = false;\n }\n } else if (s.equals(\"changeZip\") || s.equals(\"zip\")) {\n if (!isNumeric(g)) {\n System.out.println(\"That is not a number, please enter a number.\");\n } else if (g.length() < 0) {\n System.out.println(\"You have not entered a zip code, please try again.\");\n } else if (g.length() > 6) {\n System.out.println(\"That is too long for a zip code, please try again.\");\n } else {\n isBadInput = false;\n }\n\n } else {\n System.out.println(\"There is no option for that, please try again\");\n }\n }\n\n return g;\n }",
"public boolean isSpecialEmergencyNumber(String dialString) {\n return (dialString.equals(\"110\") || dialString.equals(\"119\")\n || dialString.equals(\"000\") || dialString.equals(\"08\")\n || dialString.equals(\"118\") || dialString.equals(\"999\")\n || dialString.equals(\"120\"));\n }",
"public String checkPhone() {\n String phone = \"\"; // Create phone\n boolean isOK = true; // Condition loop\n\n while (isOK) {\n phone = checkEmpty(\"Phone\"); // Call method to check input of phone\n String phoneRegex = \"\\\\d{10,11}\"; // Pattern for phone number\n boolean isContinue = true; // Condition loop\n\n while (isContinue) {\n // If pattern not match, the print out error\n if (!Pattern.matches(phoneRegex, phone)) {\n System.out.println(\"Phone number must be 10 or 11 number!\");\n System.out.print(\"Try anthor phone: \");\n phone = checkEmpty(\"Phone\");\n } else {\n isContinue = false;\n }\n }\n\n boolean isExist = false; // Check exist phone\n for (Account acc : accounts) {\n if (phone.equals(acc.getPhone())) {\n // Check phone if exist print out error\n System.out.println(\"This phone has already existed!\");\n System.out.print(\"Try another phone: \");\n isExist = true;\n }\n }\n\n // If phone not exist then return phone\n if (!isExist) {\n return phone;\n }\n }\n return phone; // Return phone\n }",
"public void phone_validate(View v1) {\n Intent A2Intent = new Intent (v1.getContext(), Main2Activity.class);\n EditText phone = (EditText) findViewById(R.id.editText);\n // pass the entered phone number to the next activity\n //A2Intent.putExtra(\"phoneNumber\", tv2.getText());\n String ph = phone.getText().toString();\n A2Intent.putExtra(\"phoneNumber\", ph);\n\n // start the next activity/page\n startActivity(A2Intent);\n\n\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}",
"public void setphoneNum(String phoneNum) {\n\t\t_phoneNum = phoneNum;\n\t}",
"private void setMobileNum(String mobileNum) {\n this.mobileNum = StringExtension.nullFilter(mobileNum);\n }"
] | [
"0.67350286",
"0.6622877",
"0.65375185",
"0.6524412",
"0.6508565",
"0.6435042",
"0.6426342",
"0.63960224",
"0.63548183",
"0.6342933",
"0.6330115",
"0.6327387",
"0.6304209",
"0.6270749",
"0.6233482",
"0.61416906",
"0.61229545",
"0.6109883",
"0.60648006",
"0.605951",
"0.6032104",
"0.602832",
"0.601552",
"0.6005157",
"0.5996981",
"0.5964379",
"0.5963396",
"0.5938737",
"0.5920739",
"0.591922",
"0.59048176",
"0.59034336",
"0.58972824",
"0.58852875",
"0.5872177",
"0.58719397",
"0.5847257",
"0.58184344",
"0.5793566",
"0.5790574",
"0.57827514",
"0.57827514",
"0.57827514",
"0.57819986",
"0.57789975",
"0.5778784",
"0.577495",
"0.5766979",
"0.57616603",
"0.5750462",
"0.57419115",
"0.57350737",
"0.57275856",
"0.57251763",
"0.5721376",
"0.5720611",
"0.571282",
"0.5712782",
"0.56774575",
"0.5676457",
"0.5659796",
"0.56593996",
"0.56562823",
"0.5654841",
"0.5632832",
"0.5630676",
"0.56271416",
"0.56255585",
"0.56214327",
"0.56158125",
"0.561313",
"0.56071645",
"0.5603196",
"0.56020844",
"0.5595447",
"0.5594287",
"0.55884665",
"0.5588054",
"0.5573487",
"0.5571672",
"0.5567859",
"0.5565425",
"0.55514485",
"0.5548711",
"0.55404824",
"0.55171525",
"0.5516156",
"0.55141044",
"0.5507017",
"0.5502825",
"0.5498491",
"0.5497784",
"0.5497784",
"0.5494909",
"0.54860777",
"0.5468108",
"0.5465877",
"0.54624575",
"0.5460766",
"0.545641",
"0.54439944"
] | 0.0 | -1 |
create an elevator object?? | abstract void move_elevator(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Elevator() {\n\t\t\n \tsuper(\"Elevator\", RobotConstants.ELEVATOR_P, RobotConstants.ELEVATOR_I, RobotConstants.ELEVATOR_D);\n \t\t\n\t\t// TODO Auto-generated constructor stub\n\t}",
"Elevator() {\n _currentFloor = Floor.FIRST;\n _passengersOnboard = 0;\n _directionOfTravel = DirectionOfTravel.UP;\n\n }",
"public Elevator() {\n currentFloor = 1;\n elevatorState = IDLE;\n request = null;\n }",
"public Elevator() {\n\t\tthis.motor = new Motor(this);\n\t\tthis.door = new Door(false);\n\t\tthis.elevatorButtons = new HashMap<Integer, ElevatorButton>();\n\t\t\n\t\tgenerateElevatorButtons();\n\n\t\tstate = new ElevatorState(Floor.MINIMUM_FLOOR_NUM, Direction.STATIONARY, Floor.MINIMUM_FLOOR_NUM);\n\t}",
"public Elevator(final int id) {\n this.id = id;\n }",
"public Elevator(int elevatorID) {\n this.elevatorID = elevatorID;\n currentFloor = 0;\n }",
"public interface Elevator {\n public static final int UP = 1, LEVEL = 0, DOWN = -1, ERROR = -2;\n /** Returns the minimal floor number to which this Elevator can reach(often a negative value).\n * This is the same value as the lowest floor in the building - this elevator belongs to. */\n public int getMinFloor();\n /** Returns the maximal floor number to which this Elevator can reach.\n * This is the same value as the highest floor in the building - this elevator belongs to. */\n public int getMaxFloor();\n /** Returns the time (in seconds it takes the Elevator to open its doors. */\n public double getTimeForOpen();\n /** Returns the time (in seconds it takes the Elevator to close its doors */\n public double getTimeForClose();\n /** Returns the Elavator's current state: {UP, DOWN, LEVEL, ERROR} the state \"LEVEL\" mark that the elevator has reached the floor -\n * and is now ready to load / unload and get new orders. */\n public int getState(); // UP, DOWN, LEVEL, ERROR\n /** Returns the Elevator's current position (floor) as an Integer. */\n public int getPos();\n /** Moves the elevator form the current position to the destination floor. */\n public boolean goTo(int floor);\n /** Allows the elevator to stop in an intermidiate floor between src and dest, assumeing the elevator has not yer pass the desired floor in which it needs to stop. */\n public boolean stop(int floor);\n /** Returns the speed (in floor per second), e.g. if the Elevator speed is 0.4 - it takes it 2.5 seconds to pass a single floor. */\n public double getSpeed();\n /** Return the time in seconds that it takes the elevator to start moving in full speed (assumed to be a fixed value). */\n public double getStartTime();\n /** Return the time in seconds that it takes the elevator to stop moving in full speed (assumed to be a fixed value).*/\n public double getStopTime();\n /**\n * @return the id of this elevator (simple index as in the building).\n * Note: this index should be the same as in the elevator allocation algorithm.\n */\n public int getID();\n}",
"public\tElevator(){\t\t\t\t\t\t\n\t\tcurrentFloor = 1;\n\t\tcurrentDirection = \"UP\";\n\t\ttotalPassengers = 0;\n\t\ttotalPassDestFloor = new int[8];\n\t\tdestRequest = new char[8];\n\t\t \n\t}",
"public Elevator() {\n boolean elevatorInvert = false;\n boolean elevatorPhase = false;\n spx = new SpectrumVictorSPX(Constants.ELEVATOR_SPX);\n srx = new LeaderTalonSRX(Constants.ELEVATOR_SRX, spx);\n srx.setNeutralMode(NeutralMode.Brake);\n srx.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative);\n srx.setSensorPhase(elevatorPhase);\n srx.setInverted(elevatorInvert);\n\n // Enable Soft Limits\n srx.configForwardSoftLimitEnable(false);\n srx.configForwardSoftLimitThreshold(posUpLimit);\n srx.configForwardLimitSwitchSource(LimitSwitchSource.FeedbackConnector, LimitSwitchNormal.NormallyOpen);\n \n srx.configReverseSoftLimitEnable(false);\n srx.configReverseSoftLimitThreshold(posDownLimit);\n srx.configReverseLimitSwitchSource(LimitSwitchSource.FeedbackConnector, LimitSwitchNormal.NormallyOpen);\n\n srx.setStatusFramePeriod(StatusFrameEnhanced.Status_13_Base_PIDF0, 10);\n srx.setStatusFramePeriod(StatusFrameEnhanced.Status_10_MotionMagic, 10);\n\n // Set Ramp Rate and voltage compensation\n srx.configClosedloopRamp(0.25);\n srx.configVoltageCompSaturation(11.5);\n srx.enableVoltageCompensation(true);\n setMotionMagicParams();\n }",
"Elevage createElevage();",
"private void initializeElevatorMotor()\n {\n Rectangle base = new Rectangle(shaftWidth*.3, location, shaftWidth*.4, floorHeight*.8);\n Rectangle latch = new Rectangle(shaftWidth*.45, location-5, shaftWidth*.1, floorHeight*.2);\n\n elevator = Shape.union(base, latch);\n elevator.setFill(Color.valueOf(\"#C0C0C0\"));\n\n elevatorTranslate = 0;\n elevatorOffset = 0;\n elevatorSpeed = 20;\n\n motorTimeline = new Timeline(new KeyFrame(Duration.millis(elevatorSpeed), e -> {\n if(location+elevatorOffset <= shaftHeight-60 && location+elevatorOffset >= 10) {\n if(location <= destination && location >= destination-10)\n {\n// System.out.println(location + \" OF \" + (destination) + \" / \" + (destination-10) + \" \" + (10 - destination/floorHeight));\n// System.out.println(\"EARLY STOP\");\n motorTimeline.pause();\n }\n\n elevatorTranslate += elevatorOffset;\n location += elevatorOffset;\n\n elevator.setTranslateY(elevatorTranslate);\n frame.setTranslateY(elevatorTranslate);\n leftDoor.setTranslateY(elevatorTranslate);\n rightDoor.setTranslateY(elevatorTranslate);\n }\n else motorTimeline.pause();\n }));\n motorTimeline.setCycleCount(Animation.INDEFINITE);\n }",
"public Person(ElevatorController elevatorController){\n this.id = idGenerator.getAndIncrement();\n this.arrivalTime = setArrivalTime();\n this.arrivalFloor = setArrivalFloor();\n\t\t this.destinationFloor = setDestinationFloor();\n this.baggageWeight = setLuggageWeight();\n this.personWeight = setPassengerWeight();\n this.random = new Random();\n this.elevatorController = elevatorController;\n }",
"public void Elevator() {\n // Use these to get going:\n // setSetpoint() - Sets where the PID controller should move the system\n // to\n // enable() - Enables the PID controller.\n \t\n }",
"public Person(ElevatorControllerGUI elevatorController){\n this.id = idGenerator.getAndIncrement();\n this.arrivalTime = random.nextInt((30-1)+1)+1; \n this.arrivalFloor = random.nextInt((4-2)+1)+2; \n\t\t this.destinationFloor = random.nextInt((10-5)+1)+5; \n\t\t this.baggageWeight = setLuggageWeight();\n this.personWeight = setPassengerWeight();\n this.random = new Random();\n this.elevatorControllerGUI = elevatorController;\n }",
"public ElevatorTask(Elevator elevator, int floorId, ElevatorRequestType type) {\n\t\tthis.elevator = elevator;\n\t\tthis.floorId = floorId;\n\t\tthis.type = type;\n\t}",
"@RequestMapping(value = \"getElevatorObject/{principal}\", method = RequestMethod.GET)\n @ResponseBody public Elevator getElevatorObject(@PathVariable String principal, \n \t\t\t\t\t\t\t\t\t\t\t @RequestParam String elevatorID,\n \t\t\t\t\t\t\t\t\t\t\t @RequestParam String elevatorName) {\n Elevator elevator = new Elevator(Long.valueOf(elevatorID), elevatorName, principal);\n \n logger.info(\"------genarate elevator : \" + elevator.toString() + \"------\");\n return elevator;\n }",
"public Elevator(ElevatorSpecs spec, int[] floors, float currentFloor) {\n specs = spec;\n this.floors = floors;\n currentPassengers = new LinkedList<Passenger>();\n queue = new LinkedList<ElevatorQueueObject>();\n waitingTime = 0;\n this.currentFloor = currentFloor;\n distancePerFloor = (float)specs.getBuildingHeight() / (float)specs.getFloors();\n totalWaitTime = new BigInteger(\"0\");\n totalTravelTime = new BigInteger(\"0\");\n totalTravelDistance = new BigDecimal(\"0\");\n passengersServed = new BigInteger(\"0\"); \n zonedFloors = floors; \n }",
"public static Elevator getInstance() {\n if (mInstance == null) {\n mInstance = new Elevator();\n return mInstance;\n } else\n return mInstance;\n }",
"protected ElevatorController(Elevator elevator) {\n\t\tthis.elevator = elevator;\n\t}",
"public Elevator request(int floor, Direction dir) {\r\n\t\treturn null;\r\n\t}",
"public ElevatorScene() {\t\t\n\t\tif(exitedCount == null) {\n\t\t\texitedCount = new ArrayList<Integer>();\n\t\t} else {\n\t\t\texitedCount.clear();\n\t\t}\n\t\t\n\t\televators = new ArrayList<Elevator>();\n\t\tpersonCount = new ArrayList<Integer>();\n\t\t\n\t\texitedCountMutex = new Semaphore(1);\n\t\tsem = new Semaphore(6);\n\t\t\n\t\t\n\t\tnumberOfPeopleWaiting = 0;\n\t}",
"private Elevator(ElevatorSpecs s, int[] f, int[] z, LinkedList<ElevatorQueueObject> q, \n LinkedList<Passenger> c, int w, float cf, BigInteger twt, BigInteger ttt,\n BigDecimal ttd, BigInteger ps) {\n specs = s;\n floors = f;\n queue = q;\n currentPassengers = c;\n waitingTime = w;\n currentFloor = cf;\n distancePerFloor = (float)specs.getBuildingHeight() / (float)specs.getFloors();\n totalWaitTime = twt;\n totalTravelTime = ttt;\n totalTravelDistance = ttd;\n passengersServed = ps;\n zonedFloors = z;\n }",
"public static void main(String[] args) {\n Elevator theElevator = new Elevator();\n\n theElevator.boardPassenger(2);\n theElevator.boardPassenger(2);\n theElevator.boardPassenger(3);\n\n System.out.println(theElevator);\n\n for(int i=1;i<21;i++){\n theElevator.move();\n }\n \n\n \n\n }",
"public interface ElevatorSelectionStrategy {\n\tElevator getElevatorFor(Passenger passenger, Floor departureFloor, Environment env);\n}",
"public ElevatorEvent(int elevatorId, int sourceFloor, int destiniationFloor, String time, UserPriority priority) {\n\t\tthis.elevatorId = elevatorId;\n\t\tthis.sourceFloor = sourceFloor;\n\t\tthis.destiniationFloor = destiniationFloor;\n\t\tthis.time = time;\n\t}",
"public static Elevator getInstance() {\r\n return instance;\r\n }",
"public PIDElevator() {\n \tsuper(\"PIDElevator\", Kp, Ki, Kd);\n \tenco = new Encoder(RobotMap.ENCODER_A_CHANNEL, RobotMap.ENCODER_B_CHANNEL, true);\n enco.reset();\n \n //outputOne = new DigitalOutput(RobotMap.ARDUINO_PIN_ONE);\n //outputTwo = new DigitalOutput(RobotMap.ARDUINO_PIN_TWO);\n //outputThree = new DigitalOutput(RobotMap.ARDUINO_PIN_THREE);\n\n \t\n \tsetAbsoluteTolerance(10);\n \tgetPIDController().setContinuous(false);\n // Use these to get going:\n // setSetpoint() - Sets where the PID controller should move the system\n // to\n // enable() - Enables the PID controller.\n \televMotor = new CANTalon(RobotMap.ELEV_TALON);\n \t\n //button = new DigitalInput(0); \n \tbottom_hallEffect = new DigitalInput(RobotMap.HALL_EFFECT_PORT);\n \ttop_limitSwitch = new DigitalInput(RobotMap.TOP_LIMIT_SWITCH);\n \t\n \t//wire = new I2C(Port.kOnboard, 4);\n \t\n \tBrakeEngaged = new Solenoid(1, RobotMap.BRAKE_IN);\n \tBrakeDisengaged = new Solenoid(1, RobotMap.BRAKE_OUT);\n \tenable();\n }",
"public ElevatorSimulation(){ \n for (int onFloor = 0; onFloor< 5; onFloor++){\n passengerArrivals.add(new ArrayList<PassengerArrival>());\n }\n \n parseFile();\n\n for (int i = 0; i < a; i++){\n elevatorArray[i] = new Elevator(i+1, aBuildingManager);\n threadArray[i] = new Thread(elevatorArray[i]);\n\n }\n writeToConsoleLock = new ReentrantLock();\n \n }",
"public Elevator(int id, int maximumLoad, int currentFloorId) {\n\t\tthis.id = id;\n\t\tthis.currentFloorId = currentFloorId;\n\t\tthis.doorStatus = ElevatorDoorStatus.CLOSED;\n\t\tthis.currentDirection = ElevatorStatus.STATIONARY;\n\t}",
"Lehrkraft createLehrkraft();",
"public WaiterAgent(String name, RestaurantGui gui, AStarTraversal aStar,\n\t\t Restaurant restaurant, Table[] tables) {\n\tsuper();\n\tthis.gui = gui;//main gui\n\tthis.name = name;\n\tthis.aStar = aStar;\n\tthis.restaurant = restaurant;//the layout for astar\n\twaiter = new Waiter(name.substring(0,2), new Color(255, 0, 0), restaurant);\n\t//currentPosition = new Position(3,13);\n\tcurrentPosition = new Position(waiter.getX(), waiter.getY());\n\tcurrentPosition.moveInto(aStar.getGrid());\n\toriginalPosition = currentPosition;//save this for moving into\n\tthis.tables = tables;\n\n\tString query =\n \"1 (?person)(and (person ?person)(hasname ?person \\\"\" + name+\"\\\"))\";\n loomInstance = PowerloomHelper.retrieve1(query);\n if (loomInstance!=null){\n PowerloomHelper.getloomMap().put(loomInstance, this);\n System.out.println(\"Found person in knowledge base: \" + loomInstance);\n }\n else {\n System.out.println(\"No waiter found. Instantiating...\");\n loomInstance = PowerloomHelper.instantiate(\"person\",this);//puts it in map\n\n String h = PowerloomHelper.instantiate(\"home\",null);\n query = \"(and (workingWaiter \" + loomInstance + \")\"\n +\"(haslocation \" +h+\" \"+gui.getneighborhoodInstance()\n +\") (lives \"+ loomInstance+\" \"+h+\")(hasname \"\n + loomInstance+\" \\\"\"+name+\"\\\"))\";\n print(\"asserting facts about new instance:\"+query);\n PLI.sAssertProposition(query, PowerloomHelper.getWorkingModule(), null);\n }\n\n }",
"public Elevator(int floorCnt) {\n\t\tthis.floorCnt = floorCnt;\n\t\tinitialize();\n\t}",
"public Elevator(ElevatorSpecs spec, int[] floors, int zonedFloors[], float currentFloor) {\n specs = spec;\n this.floors = floors;\n currentPassengers = new LinkedList<Passenger>();\n queue = new LinkedList<ElevatorQueueObject>();\n waitingTime = 0;\n this.currentFloor = currentFloor;\n distancePerFloor = (float)specs.getBuildingHeight() / (float)specs.getFloors();\n totalWaitTime = new BigInteger(\"0\");\n totalTravelTime = new BigInteger(\"0\");\n totalTravelDistance = new BigDecimal(\"0\");\n passengersServed = new BigInteger(\"0\"); \n this.zonedFloors = zonedFloors;\n }",
"@Override\r\n\t\tpublic Elevator checkElevator(String id){\n\t\t\tElevator Elevator = mongoTemplate.findById(id, Elevator.class, \"ElevatorCollection\");\r\n\t\t\treturn Elevator;\r\n\t\t}",
"private void createRooms()//refactored\n {\n currentRoom = RoomCreator.buildCurrentRooms();//new\n }",
"@Override\n protected void createLocationCLI() {\n /*The rooms in the hallway01 location are created---------------------*/\n \n /*Hallway-------------------------------------------------------------*/\n Room hallway = new Room(\"Hallway 01\", \"This hallway connects the Personal, Laser and Net\");\n super.addRoom(hallway);\n }",
"void enterElevator(final ElevatorCar ec){\n elevatorX=ec.xPos;\r\n Double speed= Math.random()*3+1.5;\r\n riderAni.setImage(image);\r\n TranslateTransition tt = new TranslateTransition();\r\n tt.setNode(riderAni);\r\n //tt.setFromX(boundsInScene.getMaxX());\r\n tt.setToX(ec.xPos-ec.getStandingRoom());\r\n tt.setDuration(Duration.seconds(speed));\r\n TranslateTransition fl = new TranslateTransition();\r\n fl.setNode(floorLabel);\r\n fl.setToX(ec.xPos-ec.getStandingRoom()-5);\r\n fl.setDuration(Duration.seconds(speed));\r\n TranslateTransition tl = new TranslateTransition();\r\n tl.setNode(timerLabel);\r\n tl.setToX(ec.xPos-ec.getStandingRoom()-5);\r\n tl.setDuration(Duration.seconds(speed));\r\n ParallelTransition pt = new ParallelTransition(tt,fl,tl);\r\n pt.play();\r\n pt.onFinishedProperty().set(new EventHandler<ActionEvent>() {\r\n public void handle(ActionEvent event) {\r\n riderAni.setOpacity(.5);\r\n riderAni.setImage(image3);\r\n }\r\n });\r\n\r\n }",
"public Elevator getElevator(int index)\n\t{\n\t\tElevator lift = null;\n\t\tif (index >= 0 && index < this.getElevatorCount())\n\t\t\tlift = this.elevators[index];\n\t\treturn lift;\n\t}",
"public ElevatorUI() {\n initComponents();\n }",
"public com.paulesson.elevator.db.entities.Elevator toDBEntity(){\n com.paulesson.elevator.db.entities.Elevator entity = new com.paulesson.elevator.db.entities.Elevator();\n entity.setId(dbId);\n entity.setName(name);\n entity.setLoad(load.get());\n entity.setStatus(direction.get());\n entity.setCurrentFloor(currentFloor.get());\n return entity;\n }",
"@Test\n\tpublic void returnNullWhenNoneIdel() {\n\t\t\n\t\twhen(elevatorRepository.getElevators()).thenReturn(elevators);\n\t\tElevator elevator = elevatorAllocateService.requestElevator(task);\n\t\tassertNull(elevator);\n\t}",
"private UserInteraction() {\n\t\tthis.elevatorManager = ElevatorManager.getInstance();\n\t}",
"public void setElevatorDestination(int level) {\n if (this.levels[level] == null) {\n this.levels[level] = new MineLevel.Builder(level).buildLevel(this);\n }\n this.elevator.setDestinationArea(this.levels[level]);\n this.elevator.setDestinationGateway(this.levels[level].getEntranceGateway());\n }",
"public RailRoad() {}",
"private void createEnemyHelicopter()\n\t {\n\t \t\tRandNum = 0 + (int)(Math.random()*700);\n\t\t \t\tint xCoordinate = 1400;\n\t int yCoordinate = RandNum; \n\t eh = new Enemy(xCoordinate,yCoordinate);\n\t \n\t // Add created enemy to the list of enemies.\n\t EnemyList.add(eh);\n\t \n\t }",
"public SetElevatorSetpoint(Constants.OIMap.Setpoint setpoint, Elevator elevator)\n {\n requires(elevator);\n logger = LoggerFactory.createNewLogger(this.getClass());\n this.setpoint = setpoint;\n this.elevator = elevator;\n }",
"public void registerElevator(Integer elevatorID, int startFloor) {\n if (elevatorControllers.size() == ELEVATORS_LIMIT || elevatorControllers.containsKey(elevatorID)) {\n System.err.println(\"Failed to register elevator with ID: \" + elevatorID.toString());\n return;\n }\n Elevator elevator = new Elevator(elevatorID, startFloor);\n ElevatorController controller = new ElevatorController(elevator);\n elevatorControllers.put(elevatorID, controller);\n }",
"public ElevatorBank(double x, double y, int lifts, int floors, int capacity)\n\t{\n\t\tsuper(x,y);\n\t\t// initialize all the elevators\n\t\tthis.elevators = new Elevator[lifts];\n\t\t\n\t\t//set strategy\n\t\tElevatorBank.strategy = STRATEGY.GROUP;\n\t\t\n\t\tfor (int i = 0; i < lifts; i++)\n\t\t{\n\t\t\tint start = 0;\n\t\t\t// for the GROUP_3 strategy we will start with half of the elevators at the top and half\n\t\t\t// at the bottom\n\t\t\tif( ElevatorBank.strategy == STRATEGY.GROUP_2){\n\t\t\t\t\n\t\t\t\tif( i < lifts/2){\n\t\t\t\t\tstart = 0;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tstart = floors-1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.elevators[i] = new Elevator(this, capacity, start);\n\t\t}\n\t\t\n\t\t// initialize all the queues on each floor\n\t\tthis.upQueues = new Queue[floors];\n\t\tthis.downQueues = new Queue[floors];\n\t\tfor (int i = 0; i < floors; i++)\n\t\t{\n\t\t\t//changed to ElevatorQueues\n\t\t\tthis.upQueues[i] = new ElevatorQueue(i,Elevator.Direction.UP);\n\t\t\tthis.downQueues[i] = new ElevatorQueue(i,Elevator.Direction.DOWN);\n\t\t}\n\t\t\n\t\t\n\t}",
"public void addPersonToElevator(int floorId, IElevator elevator) throws InvalidArgumentException {\n \tIFloor floor = getFloor(floorId);\n \tArrayList<IPerson> personList = floor.getWaitingPersons();\n \tfor(int i=0;i<personList.size();i++) {\n \t\tIPerson p = personList.get(i);\n \t\tif(elevator.addPerson(p)) {\n \t\t\tfloor.personGetIn(p,elevator.getElevatorID());\n \t\t}else {\n \t\t\tbreak;\n \t\t}\n \t}\n }",
"public ScaleImpl(int elevatorNumber) throws RemoteException {\n super();\n number = elevatorNumber;\n }",
"public MineArea(String name,\n int width, int height,\n Point startingGateway,\n Point levelExitGateway,\n Point elevatorGateway) {\n super(name, width, height);\n this.levels = new MineLevel[MineArea.NUM_LEVELS];\n\n this.elevatorLevelsUnlocked = 0;\n\n this.startingGateway = new Gateway((int)(startingGateway.x),\n (int)(startingGateway.y),\n Gateway.OMNIDIRECTIONAL,\n true);\n this.addGateway(this.startingGateway);\n this.levelExitGateway = new Gateway((int)(levelExitGateway.x),\n (int)(levelExitGateway.y),\n Gateway.ONE_WAY, true);\n this.elevator = new ElevatorGateway((int)(elevatorGateway.x),\n (int)(elevatorGateway.y));\n this.addGateway(elevator);\n }",
"public ClassicElevator(String name, int bottomfloor, int topfloor, int origin) // same constructor\n {\n super(name, bottomfloor, topfloor, origin);\n for (int i = bottomfloor; i < topfloor; i++ ) { // but with buttons\n Button b = new Button(i);\n buttons.add(b);\n }\n if (bottomfloor != origin) { \n Button b = new Button(origin);\n buttons.add(b);\n }\n }",
"public int chooseElevator() {\n\t\tPair<Integer,Direction> eleLoc;\n\t\tHashMap<Integer, Pair<Integer, Direction>> mapClone = map.getElevatorsData(); //get map of up to date elevator locations\n\t\tint distance;\n\t\tint minDist=9999;\n\t\tint choice = -1;\n\t\t//iterate over all elevators in the system\n\t\tfor(int i = 1;i<=Constants.elevator;i++) {\n\t\t\teleLoc = mapClone.get(i);//get elevators current system\n\t\t\tdistance =calculateDistance(eleLoc);\n\t\t\t//System.out.println(\"Elevator \" + i + \" is \" + distance + \" away from next job\");\n\t\t\t//if distance is optimal\n\t\t\tif(distance >=0 && distance <minDist) {\n\t\t\t\tchoice = i;\n\t\t\t\tminDist = distance;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn choice;\n\t}",
"public MilfordAuton(DriveSubsystem drive, Shooter shooter, ShooterAngle angle, Elevator elevator, double direction) {\n /*\n 1. Set angle to 45\n 2. Tune angle for 1 second\n 3. Rev shooter at 6000 RPM for 1 second\n 4. Shoot at 6000 for 4 seconds\n 5. Wait for 0.5 seconds\n 6. Drive forward for 3 seconds\n */\n super(new SetAngle(angle, 45), new HoldAngle(angle).withTimeout(1), new ShootAt(shooter).withTimeout(1),\n (new ShootAt(shooter).alongWith((new Elevate(elevator)))).withTimeout(4),\n (new NOP().withTimeout(0.5)).andThen(new DriveToWall(drive, direction).withTimeout(3)));\n }",
"public ElevatorSlider (Elevator e, int name) {\n elevator = e;\n getInfo ();\n // Create the slider and adjust its properties\n slider = new JSlider (JSlider.VERTICAL, 0, numFloors, 0);\n slider.setMajorTickSpacing (MAJOR_TICK_SPACING);\n slider.setMinorTickSpacing (MINOR_TICK_SPACING);\n slider.setPaintTicks (true);\n slider.setPaintLabels (true);\n // Calculate the dimensions for the sliders\n int width = SLIDER_WIDTH;\n int height = HEIGHT_PER_FLOOR * numFloors;\n int heightResize = 1 + (numFloors / FLOOR_LIMIT);\n height /= heightResize;\n slider.setPreferredSize (new Dimension (width, height));\n \n // Add the slider\n this.add (slider);\n this.update (e, name);\n // Add the label to the panel\n this.add (stateLabel);\n this.add (capLabel);\n this.add (floorLabel);\n // Set the layout\n this.setLayout (new BoxLayout (this, BoxLayout.Y_AXIS));\n \n }",
"public RegElevator(int _elevatorNum, int _maxFloors, int _doorOpenTime, int _speed, int _maxIdleTime, int _maxOccup) {\n\n\t\televatorNum = _elevatorNum + 1;\n\t\tcurrFloor = DEFAULT;\n\t\tthis.setState(IDLING);\n\t\t\n\t\t\tif (_doorOpenTime < 0) throw new IllegalArgumentException(\"doorOpenTime cannot be a negative value: \" + doorOpenTime);\n\t\t\telse\n\t\t\t\tthis.setdoorOpenTime(_doorOpenTime);\n\t\t\n\t\t\tif (_speed <= 0) throw new IllegalArgumentException(\"Speed requires a value greater than 0: \" + speed);\n\t\t\telse\n\t\t\t\tthis.setSpeed(_speed);\n\t\t\t\n\t\t\tif (maxIdleTime < 0) throw new IllegalArgumentException(\"maxIdleTime cannot be a negative value: \" + maxIdleTime);\n\t\t\telse\n\t\t\t\tthis.setMaxIdleTime(_maxIdleTime);\n\n\t\t\tif (_maxFloors < 0) throw new IllegalArgumentException(\"maxFloors cannot be a negative value: \" + maxFloors);\n\t\t\telse\n\t\t\t\tthis.setMaxFloors(_maxFloors);\n\n\t\t\tif (_maxOccup < 0) throw new IllegalArgumentException(\"maxFloors cannot be a negative value: \" + maxFloors);\n\t\t\telse\n\t\t\t\tthis.setMaxOccup(_maxOccup);\n\t}",
"public Elevator duplicate() {\n //Duplicate queue\n LinkedList<ElevatorQueueObject> newQueue = new LinkedList<ElevatorQueueObject>();\n for (int i = 0; i < queue.size(); i++) {\n newQueue.add(i, queue.get(i));\n }\n \n //Duplicate currentPassengers\n LinkedList<Passenger> lcp = new LinkedList<Passenger>();\n for (int i = 0; i < currentPassengers.size(); i++) {\n lcp.add(i, currentPassengers.get(i));\n }\n \n return new Elevator(specs, floors, zonedFloors, newQueue, lcp, waitingTime, \n currentFloor, BigInteger.ZERO, BigInteger.ZERO, BigDecimal.ZERO, BigInteger.ZERO);\n }",
"public Investigator() {}",
"public Eleve() {\r\n\t\tsuper();\r\n\t}",
"public static void main(String args[]){\n\t\tElevator E1 = new Elevator();\n\t\tE1.F[3].setPassengersWaiting(4);\n\t\tE1.F[5].setPassengersWaiting(3);\n\t\tE1.F[6].setPassengersWaiting(4);\n\t\t\n\t\ttry {E1.boardPassengers(2,2,3);}\n\t\tcatch (ElevatorFullException exc){\n\t\t\tSystem.out.println(\"ELEVATOR IS AT ITS FULL CAPACITY\");\n\t\t\t}\n\t\tE1.registerRequest();\n\n\t\tE1.move();\n\t\tSystem.out.println(\"------------------------------------------------------------------------\");\n\t\tE1.move();\n\t\tSystem.out.println(\"------------------------------------------------------------------------\");\n\t\tE1.move();\n\t\tSystem.out.println(\"------------------------------------------------------------------------\");\n\t\tE1.move();\n\t}",
"public void requestElevatorToDestination(int floorId, UserPriority priority, Elevator elevator) {\n\t\televatorManager.requestDestination(new ElevatorManagerDestinationRequest(floorId, priority, elevator));\n\t}",
"private void createFloor2Connections(IndoorVertex stairs, IndoorVertex elevator)\n {\n armesConnectionNorth = new IndoorVertex(building, new XYPos(1000, 151.19), 2);\n armesConnectionSouth = new IndoorVertex(building, new XYPos(1000, 158.75), 2);\n IndoorVertex rm239_fac_science = new IndoorVertex(building, new XYPos(1030.24, 97.11), 2);\n IndoorVertex _30_151 = new IndoorVertex(building, new XYPos(1030.24, 151.19), 2);\n IndoorVertex _30_179 = new IndoorVertex(building, new XYPos(1030.24, 179.65), 2);\n exit = new IndoorVertex(building, new XYPos(1030.24, 188.41), 2);\n IndoorVertex rm211_library = new IndoorVertex(building, new XYPos(1080.25, 173.29), 2);\n IndoorVertex _44_160 = new IndoorVertex(building, new XYPos(1044.19, 160.49), 2);\n IndoorVertex _44_173 = new IndoorVertex(building, new XYPos(1044.19, 173.29), 2);\n IndoorVertex _30_173 = new IndoorVertex(building, new XYPos(1030.24, 173.29), 2);\n IndoorVertex _30_158 = new IndoorVertex(building, new XYPos(1030.24, 158.75), 2);\n IndoorVertex _44_154 = new IndoorVertex(building, new XYPos(1044.19, 154.1), 2);\n IndoorVertex _30_154 = new IndoorVertex(building, new XYPos(1030.24, 154.1), 2);\n\n //Rooms\n ArrayList<IndoorVertex> rm211 = new ArrayList<>();\n rm211.add(rm211_library);\n\n rooms.put(\"211\", rm211);\n\n ArrayList<IndoorVertex> rm239 = new ArrayList<>();\n rm239.add(rm239_fac_science);\n\n rooms.put(\"239\", rm239);\n\n //Connections to other points\n connectVertex(armesConnectionSouth, _30_158);\n connectVertex(armesConnectionNorth, _30_151);\n connectVertex(_30_151, rm239_fac_science);\n connectVertex(_30_151, _30_154);\n connectVertex(_30_154, _44_154);\n connectVertex(_30_154, _30_158);\n connectVertex(_30_158, _44_154);\n connectVertex(_30_158, _44_160);\n connectVertex(_30_158, _30_173);\n connectVertex(_30_173, _44_173);\n connectVertex(_30_173, _30_179);\n connectVertex(_30_179, exit);\n connectVertex(_44_154, elevator);\n connectVertex(_44_154, _44_160);\n connectVertex(_44_160, stairs);\n connectVertex(_44_160, _44_173);\n connectVertex(_44_173, rm211_library);\n\n }",
"Oracion createOracion();",
"public CampLease( ) {}",
"private void delayElevator() {\n try {\n Thread.sleep(MOVEMENT_DELAY);\n } catch (InterruptedException ex) {\n Logger.getLogger(Elevator.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void run() {\n\t\ttry {\n\t\t\tif (floorId >= elevator.getCurrentFloorId()) {\n\t\t\t\televator.setCurrentDirection(ElevatorStatus.UP);\n\t\t\t\tSystem.out.print(\"\\nElevator \" + elevator.getId() + \" is going up from floor \" + elevator.getCurrentFloorId() + \" to floor \" + floorId + \"\\n\");\n\t\t\t\twhile(floorId > elevator.getCurrentFloorId() && !elevator.shouldBeStopped) {\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t\televator.setCurrentFloorId(elevator.getCurrentFloorId() + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\televator.setCurrentDirection(ElevatorStatus.DOWN);\n\t\t\t\tSystem.out.print(\"\\nElevator \" + elevator.getId() + \" is going down from floor \" + elevator.getCurrentFloorId() + \" to floor \" + floorId + \"\\n\");\n\t\t\t\twhile(floorId < elevator.getCurrentFloorId() && !elevator.shouldBeStopped) {\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t\televator.setCurrentFloorId(elevator.getCurrentFloorId() - 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (type == ElevatorRequestType.PICKUP) {\n\t\t\t\televator.setCurrentDirection(ElevatorStatus.HANDLING_REQUEST);\n\t\t\t} else {\n\t\t\t\televator.setCurrentDirection(ElevatorStatus.STATIONARY);\n\t\t\t\televator.isBusy = false;\n\t\t\t}\n\t\t\tif(elevator.shouldBeStopped) {\n\t\t\t\televator.shouldBeStopped=false;\n\t\t\t\tSystem.out.println(\"Elevator is stopped\");\n\t\t\t} else {\n\t\t\t\televator.notifyObservers();\n\t\t\t}\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n }",
"public void setElevatorState(int elevatorState) {\n this.elevatorState = elevatorState;\n }",
"@RequestMapping(value = \"getElevatorString/{principal}\", method = RequestMethod.POST)\n @ResponseBody public String getElevatorString(@PathVariable String principal, \n \t\t\t\t\t\t\t\t\t\t\t @RequestParam String elevatorID,\n \t\t\t\t\t\t\t\t\t\t\t @RequestParam String elevatorName) {\n Elevator elevator = new Elevator(Long.valueOf(elevatorID), elevatorName, principal);\n logger.info(\"------genarate elevator : \" + elevator.toString() + \"------\");\n return elevator.toString();\n }",
"@Override\n protected void initialize() {\n System.out.println(\"elevator down initialized\");\n }",
"public void createHallway(int len) {\n createRoom(len, 0, 0);\n }",
"@RequestMapping(value = \"getElevatorObjectList/{principal}\", method = RequestMethod.GET)\n @ResponseBody public List<Elevator> getElevatorObjectList(@PathVariable String principal, \n \t\t\t\t\t\t\t\t\t\t\t @RequestParam String elevatorID,\n \t\t\t\t\t\t\t\t\t\t\t @RequestParam String elevatorName) {\n Elevator elevator1 = new Elevator(Long.valueOf(elevatorID), elevatorName, principal);\n Elevator elevator2 = new Elevator(Long.valueOf(elevatorID) + 1L, elevatorName + \"2\", principal);\n List<Elevator> elevatorList = new ArrayList<Elevator>();\n elevatorList.add(elevator1); \n elevatorList.add(elevator2);\n logger.info(\"------genarate elevatorList : \" + elevatorList.toString() + \"------\");\n return elevatorList;\n }",
"public void initialStatus()\r\n\t{\r\n\t\tSystem.out.println(\"--------- The Current Status of Each Elevator ------\");\t\r\n\t\t\r\n\t\tfor(int i =0;i<numberOfElevators; i++)\r\n\t\t{\r\n\t\t\tElevator temp = new Elevator();\r\n\t\t\ttemp.setElevatorNumber(i);\r\n\t\t\tinitialElevatorFloor = (int)(Math.random()*((55-0)+1)); \r\n\t\t\ttemp.setCurrentFloor(initialElevatorFloor);\r\n\t\t\tavailableElevadors.add(temp);\r\n\t\t\tSystem.out.println(\" Elevator no.\" + temp.getElevatorNumber()+\" The current Floor \" + temp.getCurrentFloor());\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}",
"public abstract LivingObject createLife(Cell locat);",
"public ElevatorController getElevator(int number) {\n \treturn elevatorControllerList.get(number);\n }",
"private Road()\n\t{\n\t\t\n\t}",
"@Override\n public void requestPickup(int floor, int direction) {\n // Pick an elevator at rest\n for (Elevator elevator : elevators) {\n if (elevator.getDirection() == 0) {\n elevator.getRequests().offer(floor);\n return;\n }\n }\n\n // Pick an elevator with least load\n Elevator minElevator = elevators.get(0);\n for (Elevator elevator : elevators) {\n if (elevator.getRequests().size() < minElevator.getRequests().size()) {\n minElevator = elevator;\n }\n }\n // add request\n minElevator.getRequests().offer(floor);\n }",
"private ArrowPoint create(double xBeg, double yBeg, double xEnd, double yEnd){\n ArrowPoint b = new ArrowPoint(xBeg, yBeg);\n ArrowPoint e = new ArrowPoint(xEnd, yEnd);\n ArrowLine l = new ArrowLine(b, e);\n e.rotateProperty().bind(l.rotateProperty());\n a.addLine(b, e, l);\n return e;\n }",
"private static void createRooms() {\n// Room airport, beach, jungle, mountain, cave, camp, raft, seaBottom;\n\n airport = new Room(\"airport\");\n beach = new Room(\"beach\");\n jungle = new Room(\"jungle\");\n mountain = new Room(\"mountain\");\n cave = new Room(\"cave\");\n camp = new Room(\"camp\");\n seaBottom = new Room(\"seabottom\");\n\n //Setting the the exits in different rooms\n beach.setExit(\"north\", jungle);\n beach.setExit(\"south\", seaBottom);\n beach.setExit(\"west\", camp);\n\n jungle.setExit(\"north\", mountain);\n jungle.setExit(\"east\", cave);\n jungle.setExit(\"south\", beach);\n\n mountain.setExit(\"south\", jungle);\n\n cave.setExit(\"west\", jungle);\n\n camp.setExit(\"east\", beach);\n\n seaBottom.setExit(\"north\", beach);\n\n // Starting room\n currentRoom = airport;\n }",
"public void ascend() {\n \t\n elevator1.set(0.9);\n elevator2.set(0.9); \n }",
"public Door()\n {\n // initialize instance variables\n this.id = 0;\n this.room = new Room();\n this.isLocked = false;\n }",
"RentalAgency createRentalAgency();",
"@Override\n public void gotoFloor(int elevatorId, int floor) {\n if (elevatorId > elevators.size() - 1) {\n System.out.println(\"Incorrect request. Elevator = \" + elevatorId + \" is not a valid elevator\");\n }\n elevators.get(elevatorId).getRequests().offer(floor);\n }",
"private void createRooms()\n {\n Room outside, garden, kitchen, frontyard, garage, livingroom,\n upperhallway, downhallway, bedroom1, bedroom2, toilet,teleporter;\n\n // create the rooms\n outside = new Room(\"outside the house\",\"Outside\");\n garden = new Room(\"in the Garden\", \"Garden\");\n kitchen = new Room(\"in the Kitchen\",\"Kitchen\");\n frontyard = new Room(\"in the Frontyard of the house\", \"Frontyard\");\n garage = new Room(\"in the Garage\", \"Garage\");\n livingroom = new Room(\"in the Living room\", \"Living Room\");\n upperhallway = new Room(\"in the Upstairs Hallway\",\"Upstairs Hallway\");\n downhallway = new Room(\"in the Downstairs Hallway\", \"Downstairs Hallway\");\n bedroom1 = new Room(\"in one of the Bedrooms\", \"Bedroom\");\n bedroom2 = new Room(\"in the other Bedroom\", \"Bedroom\");\n toilet = new Room(\"in the Toilet upstairs\",\"Toilet\");\n teleporter = new Room(\"in the Warp Pipe\", \"Warp Pipe\");\n\n // initialise room exits\n outside.setExit(\"north\", garden);\n outside.setExit(\"east\", frontyard);\n\n garden.setExit(\"south\", outside);\n garden.setExit(\"east\", kitchen);\n\n kitchen.setExit(\"west\", garden);\n kitchen.setExit(\"north\", livingroom);\n kitchen.setExit(\"south\", downhallway);\n\n frontyard.setExit(\"west\", outside);\n frontyard.setExit(\"north\", downhallway);\n frontyard.setExit(\"east\", garage);\n\n garage.setExit(\"west\", frontyard);\n garage.setExit(\"north\", downhallway);\n\n livingroom.setExit(\"west\", kitchen);\n\n downhallway.setExit(\"north\",kitchen);\n downhallway.setExit(\"west\",frontyard);\n downhallway.setExit(\"south\",garage);\n downhallway.setExit(\"east\",upperhallway);\n\n upperhallway.setExit(\"north\", bedroom2);\n upperhallway.setExit(\"east\", bedroom1);\n upperhallway.setExit(\"south\", toilet);\n upperhallway.setExit(\"west\", downhallway);\n\n toilet.setExit(\"north\", upperhallway);\n\n bedroom1.setExit(\"west\",upperhallway);\n\n bedroom2.setExit(\"south\", upperhallway);\n\n rooms.add(outside);\n rooms.add(garden);\n rooms.add(kitchen);\n rooms.add(frontyard);\n rooms.add(garage);\n rooms.add(livingroom);\n rooms.add(upperhallway);\n rooms.add(downhallway);\n rooms.add(bedroom1);\n rooms.add(bedroom2);\n rooms.add(toilet);\n }",
"private void createRooms()\n {\n Room outside, theatre, pub, lab, office , hallway, backyard,chickenshop;\n \n // create the rooms\n outside = new Room(\"outside the main entrance of the university\");\n theatre = new Room(\"in a lecture theatre\");\n pub = new Room(\"in the campus pub\");\n lab = new Room(\"in a computing lab\");\n office = new Room(\"in the computing admin office\");\n hallway=new Room (\"in the hallway of the university\");\n backyard= new Room( \"in the backyard of the university\");\n chickenshop= new Room(\"in the chicken shop\");\n \n \n \n // initialise room exits\n outside.setExit(\"east\", theatre);\n outside.setExit(\"south\", lab);\n outside.setExit(\"west\", pub);\n\n theatre.setExit(\"west\", outside);\n theatre.setExit(\"north\", backyard);\n\n pub.setExit(\"east\", outside);\n\n lab.setExit(\"north\", outside);\n lab.setExit(\"east\", office);\n \n office.setExit(\"south\", hallway);\n office.setExit(\"west\", lab);\n \n chickenshop.setExit(\"west\", lab);\n\n currentRoom = outside; // start game outside\n \n }",
"public void setElevator(CargoHeights height) {\n setElevator(toTicks(height));\n }",
"@Test\n public void testAllElevatorsOnLevel1() {\n final ElevatorUserCommand command = new ElevatorUserCommand(1, 5, 1);\n final ElevatorMovingCommand movingStrategy = calculator.getMovingStrategy(command);\n assertEquals(elevatorA.getId(), movingStrategy.getElevatorId());\n }",
"public static void main(String args[])\n\t{\n\t\t// initialize an elevator bank\n\t\tElevatorBank bank = new ElevatorBank(0, 0, 3, 5, 8);\n\t\tSystem.out.println(\"Init => \" + bank);\n\t\t\n\t\t// fill the bank with some passengers\n\t\tfor (int i = 0; i < bank.getFloorCount(); i++)\n\t\t{\n\t\t\tif (i % 2 == 0)\n\t\t\t\tbank.addPassenger(new Passenger(i, i - 1));\n\t\t\telse\n\t\t\t\tbank.addPassenger(new Passenger(i, i + 1));\n\t\t}\n\t\tSystem.out.println(\"Adds => \" + bank);\n\t\t\n\t\t// get an elevator\n\t\tElevator lift = bank.elevators[0];\n\t\t\n\t\t// see who the elevator would get going up\n\t\tlift.setTargetDirection(Elevator.Direction.UP);\n\t\tfor (int i = 0; i < bank.getFloorCount(); i++)\n\t\t{\n\t\t\tlift.setCurrentFloor(i);\n\t\t\tSystem.out.println(lift + \" => \" + bank.getNearestPassenger(lift));\n\t\t\tSystem.out.println(\"\\tqueue => \" + bank.getFloorQueue(lift));\n\t\t}\n\t\t\n\t\t// see who the elevator would get going down\n\t\tlift.setTargetDirection(Elevator.Direction.DOWN);\n\t\tfor (int i = bank.getFloorCount()-1; i >= 0; i--)\n\t\t{\n\t\t\tlift.setCurrentFloor(i);\n\t\t\tSystem.out.println(lift + \" => \" + bank.getNearestPassenger(lift));\n\t\t\tSystem.out.println(\"\\tqueue => \" + bank.getFloorQueue(lift));\n\t\t}\n\t}",
"Obligacion createObligacion();",
"public Case(int posX, int posY, LivingBeing lb){\n\t\tthis.posX=posX; \n\t\tthis.posY=posY;\n\t\tthis.lb=lb; \n\t}",
"public interface ElevatorControl {\n /**\n *Задать место назначения\n * @param destination этаж\n */\n void addNewDestination(Integer destination);\n}",
"Vehicle createVehicle();",
"Vehicle createVehicle();",
"public Room(String description) \n {\n exits = new HashMap<>();\n objects = new HashMap<>();\n this.description = description;\n this.requiredOutfit = null;\n this.locked = false;\n }",
"Reservation createReservation();",
"public void update(IFloorModel floor, IElevatorModel elevator) {\n\t\tif(floor == null || elevator == null) {\n\t\t\tthrow new NullPointerException(\"MainGuiController.update() NullPointerException\");\n\t\t}\n\t\t\n\t\t//if there are no elevators, do nothing on update. Nothing should or can be updated\n\t\tif(listview_elevators.getItems().isEmpty()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//get current selected elevator\n\t\t//getSelectedIndex() returned -1 if no line is selected\n\t\tif(selectedElevator < 0) {\n\t\t\tthrow new IllegalStateException(\"MainGuiController.update() listview_elevators no line selected!\");\n\t\t}\n\t\t//check if the selected elevator is in manual or automatic mode -> set checkbox and button to right state.\n\t\tif(autoModeAlgo.checkIfInAutoMode(selectedElevator)) {\n\t\t\tcheckbox_manual_mode.setSelected(false);\n\t\t\tbutton_send_to_floor.setDisable(true);\n\t\t}\n\t\telse {\n\t\t\tcheckbox_manual_mode.setSelected(true);\n\t\t\tbutton_send_to_floor.setDisable(false);\n\t\t}\n\t\t\n\t\t//update gui with new values from the given elevator\n\t\t//elevator data\n\t\tPlatform.runLater(() -> {\n\t\t\tInteger targetReranged = elevator.getTarget() + 1;\n\t\t\tlabel_target_text.setText(targetReranged.toString());\n\t\t\tInteger positionReranged = elevator.getPosition() + 1;\n\t\t\tlabel_position_text.setText(positionReranged.toString());\n\t\t\t\n\t\t\tString direction = elevator.getDirection().toString();\n\t\t\tdirection = direction.substring(direction.lastIndexOf('_') + 1);\n\t\t\tdirection = direction.substring(0,1).toUpperCase() + direction.substring(1).toLowerCase();\n\t\t\tlabel_direction_text.setText(direction);\n\t\t\t\n\t\t\tlabel_payload_text.setText(elevator.getPayload().toString());\n\t\t\tInteger speedAbs = Math.abs(elevator.getSpeed());\n\t\t\tlabel_speed_text.setText(speedAbs.toString());\n\t\t\t\n\t\t\tString doorsState = elevator.getDoors().toString();\n\t\t\tdoorsState = doorsState.substring(doorsState.lastIndexOf('_') + 1); \t//get the last part of the enum, this contains the state.\n\t\t\tdoorsState = doorsState.substring(0,1).toUpperCase() + doorsState.substring(1).toLowerCase();\t//all to lower, except the first character\n\t\t\tlabel_doors_text.setText(doorsState);\n\t\t});\n\t\t\n\t\tString floorListViewPrefix = \"Floor \";\n\t\t//stops\n\t\tList<Integer> stops = elevator.getStopsList();\n\t\tif (stops == null) {\n\t\t\tthrow new NullPointerException(\"MainGuiController.update() stops\");\n\t\t}\n\t\tObservableList<String> stopsOl = FXCollections.observableArrayList();\n\t\tfor (Integer e : stops) {\n\t\t\tstopsOl.add(floorListViewPrefix + (e+1));\n\t\t}\n\t\tPlatform.runLater(() -> listview_stops.getItems().setAll(stopsOl));\n\t\t\n\t\t//not serviced floors\n\t\tList<Integer> ignoredFloors = elevator.getIgnoredFloorsList();\n\t\tif (ignoredFloors == null) {\n\t\t\tthrow new NullPointerException(\"MainGuiController.register() ignoredFloors\");\n\t\t}\n\t\tObservableList<String> ignoredFloorsOl = FXCollections.observableArrayList();\n\t\tfor (Integer e : ignoredFloors) {\n\t\t\tignoredFloorsOl.add(floorListViewPrefix + (e+1));\n\t\t}\n\t\tPlatform.runLater(() -> listview_no_service.getItems().setAll(ignoredFloorsOl));\n\t\t\n\t\t//calls\n\t\tList<Integer> callsUp = floor.getUpButtonsList();\n\t\tif (callsUp == null) {\n\t\t\tthrow new NullPointerException(\"MainGuiController.update() callsUp\");\n\t\t}\n\t\tObservableList<String> callsUpOl = FXCollections.observableArrayList();\n\t\tfor (Integer e : callsUp) {\n\t\t\tcallsUpOl.add(floorListViewPrefix + (e+1));\n\t\t}\n\t\tPlatform.runLater(() -> listview_calls_up.getItems().setAll(callsUpOl));\n\t\t\n\t\tList<Integer> callsDown = floor.getDownButtonsList();\n\t\tif (callsDown == null) {\n\t\t\tthrow new NullPointerException(\"MainGuiController.update() callsDown\");\n\t\t}\n\t\tObservableList<String> callsDownOl = FXCollections.observableArrayList();\n\t\tfor (Integer e : callsDown) {\n\t\t\tcallsDownOl.add(floorListViewPrefix + (e+1));\n\t\t}\n\t\tPlatform.runLater(() -> listview_calls_down.getItems().setAll(callsDownOl));\n\t}",
"TradeRoute(String aStartPoint, String anEndPoint, int anId){\n startPoint = aStartPoint;\n endPoint = anEndPoint;\n id = anId;\n }",
"public void createLevel() {\n room = 1;\n currentLevelFinish = false;\n createRoom();\n }",
"public Program7()\n { \n _tc = new TravelingCreature( 200, 200 );\n }",
"CurrentReservation createCurrentReservation();",
"public int getCurrentFloorForElevator(int elevator) {\t\t\n\t\treturn elevators.get(elevator).getCurrentFloor();\n\t}"
] | [
"0.77969235",
"0.7479101",
"0.7475624",
"0.7423554",
"0.7353566",
"0.72347474",
"0.7213207",
"0.7056723",
"0.69009465",
"0.68263984",
"0.67846864",
"0.6729509",
"0.6596746",
"0.6468195",
"0.6412168",
"0.6409725",
"0.64042073",
"0.6391987",
"0.63160807",
"0.6237688",
"0.62230563",
"0.620622",
"0.6193816",
"0.61625504",
"0.61471915",
"0.6075006",
"0.59982777",
"0.59251237",
"0.5911903",
"0.59041584",
"0.5889983",
"0.58766973",
"0.5855753",
"0.57967335",
"0.57647514",
"0.5763661",
"0.5756639",
"0.575324",
"0.5745574",
"0.5733861",
"0.5713669",
"0.5705618",
"0.56894",
"0.56862754",
"0.56766546",
"0.5623629",
"0.56023455",
"0.5578682",
"0.555527",
"0.5553453",
"0.55474186",
"0.554438",
"0.55312175",
"0.5527873",
"0.55267483",
"0.55112505",
"0.5501602",
"0.54740715",
"0.54730266",
"0.54595166",
"0.5448055",
"0.544383",
"0.53758794",
"0.53686845",
"0.5368566",
"0.5362853",
"0.5349464",
"0.53490996",
"0.5342419",
"0.5336633",
"0.5332021",
"0.53173745",
"0.53137845",
"0.5307027",
"0.53052694",
"0.5302065",
"0.5301595",
"0.5297762",
"0.52904576",
"0.5287954",
"0.52860284",
"0.52835864",
"0.5276055",
"0.5268327",
"0.5267514",
"0.526741",
"0.52626157",
"0.5248399",
"0.52425134",
"0.52279687",
"0.52239156",
"0.52239156",
"0.52131474",
"0.52045774",
"0.52043086",
"0.5201657",
"0.52001184",
"0.5195108",
"0.51947016",
"0.5192196"
] | 0.5804266 | 33 |
move up or down depending on its current direction. Given an integer k and an array arr[] representing the destination floors for N people waiting currently at the ground floor and k is the capacity of the elevator i.e. maximum number of people it can hold at the same time. It takes 1 unit time for the elevator to reach any consecutive floor from the current floor. The task is to schedule the elevator in a way to minimize the total time taken to get all the people to their destination floor and then return back to the ground floor. | public void move_elevator() {
// Sort in descending order
int temp;
int n = passengers.size();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void siftDown( int k) \r\n {\r\n int v, j;\r\n \r\n v = h[k];\r\n while(k <= N/2)\r\n {\r\n j = 2k;\r\n if(j>N && dist[h[j]] > dist[h[j+1]])//If the node is > left child\r\n {\r\n ++j;//Increment child \r\n }\r\n if(dist[v] <= dist[h[j]])//If the parent is greater than the child\r\n {\r\n break;//Stop the system\r\n }\r\n h[k] = h[j];//If the parent is greater than the child, child is given parent pos\r\n\t\t\thPos[h[k]] = k;//Update pos of last child\r\n k=j;//Assign a new vertex pos\r\n }\r\n h[k] = v; //assign vertex for heap \r\n hPos[v] = k;//Update the vertex in hPos\r\n\t\t\r\n // code yourself --\r\n // must use hPos[] and dist[] arrays\r\n }",
"static int eggDropDP(int n, int k) {\r\n int[][] eggFloor = new int[n + 1][k + 1];\r\n int res;\r\n int i, j, x;\r\n\r\n //we need one trial for one floor and 0 trial for 0 floor\r\n for(i = 1; i <= n; i++) {\r\n eggFloor[i][1] = 1;\r\n // eggFloor[i][0] = 0;\r\n }\r\n\r\n //we always need j trials for one egg and j floors\r\n for(j = 1; j <= k; j++) {\r\n eggFloor[1][j] = j;\r\n }\r\n\r\n //fill rest of the entries in table using optimal substructure\r\n for(i = 2; i <= n; i++) { //eggs //n\r\n for(j = 2; j <= k; j++) { //floor //k\r\n eggFloor[i][j] = Integer.MAX_VALUE; \r\n for(x = 1; x <= j; x++) { //e\r\n res = 1 + Math.max(eggFloor[i - 1][x - 1], eggFloor[i][j - x]);\r\n if(res < eggFloor[i][j]) {\r\n eggFloor[i][j] = res;\r\n }\r\n }\r\n }\r\n }\r\n\r\n //eggfloor[n][k] holds the result\r\n return eggFloor[n][k];\r\n }",
"private static boolean move(int k) {\n\t\tSystem.out.println(sn.arr.size());\n\t\tint nr = sn.arr.getLast().r + dx[k];\n\t\tint nc = sn.arr.getLast().c + dy[k];\n\t\tif(nr<0||nr>=map.length||nc<0||nc>=map.length)\n\t\t\treturn false;\n\t\t\n\t\tif (map[nr][nc] == 1) {\n\t\t\tappleCnt--;\n\t\t\tsn.arr.add(new node(nr, nc));\n\t\t\tsn.size++;\n\t\t\tmap[nr][nc] = 2;\n\t\t} else if (map[nr][nc] == 0) {\n\t\t\tsn.arr.add(new node(nr, nc));\n\t\t\tmap[nr][nc]=2;\n\t\t\tmap[sn.arr.getFirst().r][sn.arr.getFirst().c] = 0;\n\t\t\tsn.arr.removeFirst();\n\t\t\t\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private void PuzzleSolve(int k, ArrayList<Integer> S, ArrayList<Integer> U) {\n // for every integer value in the array passed in U we will add it to the empty array and remove it from the\n // new array made called list.\n for (Integer s : U) {\n ArrayList<Integer> list = new ArrayList<>(U);\n S.add(s);\n list.remove(s);\n // If we have removed all numbers in the list and S is now full, check the evaluation.\n if (k == 1) {\n Equals(S);\n }\n // else we keep calling this method until U is empty.\n else {\n PuzzleSolve(k - 1, S, list);\n }\n // remove the value from s and then add it back to the list to test a new variation at the end.\n S.remove(s);\n list.add(s);\n }\n }",
"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 void move(){\n\t\tif (currentFloor == TOTALFLOORS) currentDirection = \"DOWN\"; else currentDirection =\"UP\";\t\t//sets inital direction for the elevator.\n\t\tfor (int x = 1; x <= TOTALFLOORS; x++){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//This loop will move the elevator through each floor. \n\t\t\tif (getTotalPassDestFloor()[currentFloor] >0 || destRequest[currentFloor] == 'Y')this.stop(); \t//Checks for the destined passengers or registered request for the current floor.\n\t\t\tif (currentDirection == \"UP\") currentFloor++; else currentFloor--;\t\t\t\t\t\t\t//Moves the elevator up/down based on the direction\n\t\t}\n\t\tif (currentFloor == 8) currentFloor--;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Adjusts currentfloor value when elevator-\n\t\tif (currentFloor == 0) currentFloor++;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//-is at first or top most floor\n\t}",
"static long journey(int[] path, int k) {\n calculateSumRecursive(path,k,0,0);\n return maxSum;\n }",
"protected void sink(int k) {\n\n while (2*k <= N) {\n int j = 2*k;\n\n if (j < N && less(j, j+1)) j++;\n if (!less(k, j)) break;\n exchange(k, j);\n k = j;\n }\n }",
"private void siftDown(int k, T x) {\n int half = size >>> 1;\n while (k < half) {\n int child = (k << 1) + 1;\n Object c = heap[child];\n int right = child + 1;\n if (right < size &&\n comparator.compare((T) c, (T) heap[right]) > 0)\n c = heap[child = right];\n if (comparator.compare(x, (T) c) <= 0)\n break;\n heap[k] = c;\n k = child;\n }\n heap[k] = x;\n }",
"private static void findStrongestMMAFighter(int[] arr, int k)\n\t{\n\n\t\tDeque<Integer> dq = new LinkedList<Integer>();\n\t\t// Dequeue first element will be the largest one always\n\t\tint i = 0;\n\t\t// We have to process first k elements separately\n\t\tfor (; i < k; i++)\n\t\t{\n\t\t\twhile (!dq.isEmpty() && arr[i] >= arr[dq.peekLast()])\n\t\t\t{\n\t\t\t\tdq.removeLast();\n\t\t\t}\n\t\t\tdq.addLast(i);\n\n\t\t}\n\t\tfor (; i < arr.length; i++)\n\t\t{\n\n\t\t\t// First element will always be larger\n\t\t\tSystem.out.print(arr[dq.peekFirst()] + \" \");\n\n\t\t\t// remove elements which are not in current window\n\t\t\twhile (!dq.isEmpty() && dq.peekFirst() <= i - k)\n\t\t\t{\n\t\t\t\tdq.removeFirst();\n\t\t\t}\n\t\t\t// Remove unwanted elements\n\t\t\twhile (!dq.isEmpty() && arr[i] > arr[dq.peekLast()])\n\t\t\t{\n\t\t\t\tdq.removeLast();\n\t\t\t}\n\t\t\tdq.addLast(i);\n\t\t}\n\t\tif (!dq.isEmpty())\n\t\t\tSystem.out.print(arr[dq.peek()] + \" \");\n\n\t}",
"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 }",
"private static void findKClosestNumbers(int[] arr, int key, int k) {\n\n\t\tPriorityQueue<Integer> pq;\n\t\tint max = findMaxInArr(arr);\n\t\tint min = findMinInArr(arr);\n\n\t\tint maxDiff = Math.abs(key - max);\n\t\tint minDiff = Math.abs(key - min);\n\n\t\tif (maxDiff <= minDiff) {\n\t\t\tpq = new PriorityQueue<>(Collections.reverseOrder());\n\t\t} else {\n\t\t\tpq = new PriorityQueue<>();\n\t\t}\n\n\t\tfor (int e : arr) {\n\t\t\tpq.add(e);\n\t\t}\n\n\t\tint c = 0;\n\n\t\twhile (c < k) {\n\t\t\tSystem.out.println(pq.remove());\n\t\t\tc++;\n\t\t}\n\n\t}",
"public void rotate2(int[] nums, int k) {\n int start = 0, n = nums.length;\n k %= n;\n while (n > 0 && k > 0) {\n // Swap the last k elements with the first k elements.\n // The last k elements will be in the correct positions\n // but we need to rotate the remaining (n - k) elements\n // to the right by k steps.\n for (int i = 0; i < k; i++) {\n swap(nums, i + start, n - k + i + start);\n }\n n -= k;\n start += k;\n k %= n;\n }\n }",
"public void move(){\n\t\tint y, z;\n\t\t\n\t\tif(queueArrayGetValue(1) == null && (queueArrayGetValue(2) == null || queueArrayGetValue(3) == null)){\n\t\t\tif(queueArrayGetValue(2) == null && queueArrayGetValue(3) != null){\n\t\t\t\tqueueArraySetKeyValue(1, queueArrayGetKey(3), queueArrayGetValue(3));\n\t\t\t\tqueueArraySetKeyValue(3, null, null);\n\t\t\t}else if(queueArrayGetValue(2) != null && queueArrayGetValue(3) == null){\n\t\t\t\tqueueArraySetKeyValue(1, queueArrayGetKey(2), queueArrayGetValue(2));\n\t\t\t\tqueueArraySetKeyValue(2, null, null);\n\t\t\t}\n\t\t}else{\n\t\t\touterloop:\n\t\t\tfor(int i = 1; i < queueArrayLength(); i++){\n\t\t\t\tif(queueArrayGetValue(i) == null){\n\t\t\t\t\ty = i * 2;\n\t\t\t\t\tz = i * 2 + 1;\n\t\t\t\t\tif(y >= queueArrayLength()){\n\t\t\t\t\t\tbreak outerloop;\n\t\t\t\t\t}else if(z >= queueArrayLength()){\n\t\t\t\t\t\tqueueArraySetKeyValue(i, queueArrayGetKey(y), queueArrayGetValue(y));\n\t\t\t\t\t\tqueueArraySetKeyValue(y, null, null);\n\t\t\t\t\t\tbreak outerloop;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(lessThan(y,z)){\n\t\t\t\t\t\t\tqueueArraySetKeyValue(i, queueArrayGetKey(y), queueArrayGetValue(y));\n\t\t\t\t\t\t\tqueueArraySetKeyValue(y, null, null);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tqueueArraySetKeyValue(i, queueArrayGetKey(z), queueArrayGetValue(z));\n\t\t\t\t\t\t\tqueueArraySetKeyValue(z, null, null);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void move() {\n\n if (_currentFloor == Floor.FIRST) {\n _directionOfTravel = DirectionOfTravel.UP;\n }\n if (_currentFloor == Floor.SEVENTH) {\n _directionOfTravel = DirectionOfTravel.DOWN;\n }\n\n\n if (_directionOfTravel == DirectionOfTravel.UP) {\n _currentFloor = _currentFloor.nextFloorUp();\n } else if (_directionOfTravel == DirectionOfTravel.DOWN) {\n _currentFloor = _currentFloor.nextFloorDown();\n }\n\n if(_currentFloor.hasDestinationRequests()){\n stop();\n } \n\n }",
"public void rotate(int[] nums, int k) {\n\t\tif(nums == null || nums.length == 0 || k <= 0){\n\t\t\treturn;\n\t\t}\n\t\tint n = nums.length, count = 0;\n\t\tk %= n;\n\t\tfor(int start = 0; count < n; start++){\n\t\t\tint cur = start;\n\t\t\tint prev = nums[start];\n\t\t\tdo{\n\t\t\t\tint next = (cur + k) % n;\n\t\t\t\tint temp = nums[next];\n\t\t\t\tnums[next] = prev;\n\t\t\t\tcur = next;\n\t\t\t\tprev = temp;\n\t\t\t\tcount++;\n\t\t\t}while(start != cur);\n\t\t}\n\t}",
"public static void rotateAntiClockWise(int[] arr, int k)\r\n {\r\n\t for(int i=0; i< k; i++)\r\n\t {\r\n\t\t for(int j=0; j<arr.length-1; j++)\r\n\t\t {\r\n\t\t\t int temp = arr[j+1];\r\n\t\t\t arr[j+1] = arr[j];\r\n\t\t\t arr[j] = temp;\r\n\t\t\t\r\n\t\t }\r\n\t }\r\n }",
"private static void rightRotate(int[] nums, int k) {\r\n\t if (nums.length == 0) return;\r\n\t \r\n\t k %= nums.length;\r\n\t \r\n\t if (k == 0) return;\r\n\t \r\n\t int left=0, right=nums.length-1, tmp;\r\n\t \r\n\t while(left < right) {\r\n\t tmp = nums[left];\r\n\t nums[left] = nums[right];\r\n\t nums[right] = tmp;\r\n\t \r\n\t left++;\r\n\t right--;\r\n\t }\r\n\t \r\n\t left=0;\r\n\t right=k-1;\r\n\t \r\n\t while(left < right) {\r\n\t \ttmp = nums[left];\r\n\t \tnums[left] = nums[right];\r\n\t \tnums[right] = tmp;\r\n\t \t \r\n\t \tleft++;\r\n\t \tright--;\r\n\t }\r\n\t \r\n\t left=k;\r\n\t right=nums.length-1;\r\n\t \r\n\t while(left < right) {\r\n\t \ttmp = nums[left];\r\n\t \tnums[left] = nums[right];\r\n\t \tnums[right] = tmp;\r\n\t \t \r\n\t \tleft++;\r\n\t \tright--;\r\n\t }\r\n\t }",
"private static int solution1(int[] arr, int k) {\n\t\tif ( arr == null || arr.length < k ) {\n\t\t\treturn Integer.MIN_VALUE;\n\t\t}\n\t\t\n\t\tint[] a = Arrays.copyOfRange( arr, 0, arr.length );\n\t\tdisplayArray(a);\n\t\tArrays.sort(a);\n\t\tdisplayArray(a);\n\t\t\n\t\treturn a[a.length - k];\n\t}",
"k value.\nFor 2nd tallest group (and the rest), insert each one of them into (S) by k value. So on and so forth.\n\npublic class Solution {\n public int[][] reconstructQueue(int[][] people) {\n Arrays.sort(people,new Comparator<int[]>() {\n @Override\n public int compare(int[] o1, int[] o2){\n return o1[0] != o2[0]? -o1[0] + o2[0]: o1[1] - o2[1];\n }\n });\n\n List<int[]> res = new ArrayList<>();\n for (int[] cur : people) {\n res.add(cur[1], cur); \n }\n return res.toArray(new int[people.length][]);\n }",
"public void move(){\n \n currentFloor = currentFloor + ( 1 * this.direction);\n //if we're at the bottom or top after move, flip the bit\n if(Elevator.MIN_FLOOR == currentFloor \n || currentFloor == Elevator.MAX_FLOOR)\n this.direction *= -1;\n \n if(destinedPassengers[ currentFloor ] > 0)\n elevatorStop( currentFloor, true );\n \n if(building.floor(currentFloor).passengersWaiting() > 0)\n elevatorStop(currentFloor, false);\n \n }",
"public int woodCut(int[] L, int k) {\n int max = 0;\n for (int l : L) {\n max = Math.max(max, l);\n }\n\n int start = 1;\n int end = max;\n\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (count(L, mid) >= k) {//if we can have more than k pieces of woods of length mid, we can increase length\n start = mid;\n } else {//if we can have fewer than k pieces of woods of length mid, we should decrease length\n end = mid;\n }\n }\n\n /**\n * we want max length, so check end first.\n */\n if (count(L, end) >= k) {\n return end;\n }\n\n if (count(L, start) >= k) {\n return start;\n }\n\n return 0;//!!!\n }",
"static int minStepToReachTarget(int knightPos[], int targetPos[], int N) {\n // x and y direction, where a knight can move\n int dx[] = {-2, -1, 1, 2, -2, -1, 1, 2};\n int dy[] = {-1, -2, -2, -1, 1, 2, 2, 1};\n\n // queue for storing states of knight in board\n Queue<Cell> q = new LinkedList<>();\n\n // push starting position of knight with 0 distance\n q.add(new Cell(knightPos[0], knightPos[1], 0));\n\n Cell t;\n int x, y;\n boolean[][] visit = new boolean[N + 1][N + 1];\n\n // loop untill we have one element in queue\n while (!q.isEmpty()) {\n t = q.poll();\n if (visit[t.x][t.y]) \n continue;\n visit[t.x][t.y] = true;\n\n // if current cell is equal to target cell,\n // return its distance\n if (t.x == targetPos[0] && t.y == targetPos[1]) {\n return t.dis;\n }\n\n // loop for all reahable states\n for (int i = 0; i < 8; i++) {\n x = t.x + dx[i];\n y = t.y + dy[i];\n\n // If rechable state is not yet visited and\n // inside board, push that state into queue\n if (isInside(x, y, N) && !visit[x][y]) {\n q.add(new Cell(x, y, t.dis + 1));\n }\n }\n }\n return 0;\n }",
"public static boolean moveking() //returns false if valid move is there\n{ System.out.println(\"IN FUNCTION MOVE KING.....\");\n flag=0;\n int kx,ky;\n if(q==2)\n {\n kx=p2.ka.kbx; //WHITE KING....\n ky=p2.ka.kby;\n } \nelse\n {\n kx=p1.ka.kax; //BLACK KING....\n\tky=p1.ka.kay;\n }\n//CHECKS WHETHER KING CAN MOVE TO THE 8 adjacent places...\n if(kx-1>=0)\n {\n move2(kx,ky,kx-1,ky);\n \n if(flag==1)\n {\n revert(kx,ky,kx-1,ky);\n return false;\n }\n }\n //r\n if(kx+1<=7)\n { move2(kx,ky,kx+1,ky);\n if(flag==1)\n {revert(kx,ky,kx+1,ky);\n return false;\n \n }\n }\n \n //u\n if(ky-1>=0)\n {\n move2(kx,ky,kx,ky-1);\n \n if(flag==1)\n {revert(kx,ky,kx,ky-1);\n return false;\n \n }\n }\n //d\n if(ky+1<=7)\n {\n move2(kx,ky,kx,ky+1);\n \n if(flag==1)\n { revert(kx,ky,kx,ky+1);\n return false;\n \n }\n }\n //lu\n if(kx-1>=0&&ky-1>=0)\n {\n move2(kx,ky,kx-1,ky-1);\n \n if(flag==1)\n {revert(kx,ky,kx-1,ky-1);\n return false;\n \n }\n }\n //ld\n if(kx-1>=0&&ky+1<=7)\n {\n move2(kx,ky,kx-1,ky+1);\n \n if(flag==1)\n {revert(kx,ky,kx-1,ky+1);\n return false;\n \n }\n }\n //ru\n if(kx+1<=7&&ky-1>=0)\n {\n move2(kx,ky,kx+1,ky-1);\n \n if(flag==1)\n {revert(kx,ky,kx+1,ky-1);\n return false;\n \n }\n }\n //rd\n if(kx+1<=7&&ky+1<=7)\n {\n move2(kx,ky,kx+1,ky+1);\n \n if(flag==1)\n {revert(kx,ky,kx+1,ky+1);\n return false;\n \n }\n }\n return true; \n }",
"public static void rotateAntiClockBetter(int[] arr, int k)\r\n {\r\n\t int[] arr2 = arr.clone();\r\n\t for(int i =0; i< arr.length; i++)\r\n\t {\r\n\t\t arr2[i] = arr[(i+k)%arr.length];\r\n\t }\r\n\t System.out.println(Arrays.toString(arr2));\r\n }",
"private void goKnight(Board B, Graph G) {\n\n int start = B.knight;\n int end = B.gold;\n\n Queue<Integer> q = new Queue<Integer>();\n for (int v = 0; v < G.V(); v++)\n distTo[v] = INFINITY;\n\n int v = -1;\n distTo[start] = 0;\n marked[start] = true;\n q.enqueue(start);\n\n while (!q.isEmpty() && end != v) {\n v = q.dequeue();\n\n\n int tl_dest_R = (v / B.width);\n int tl_dest_C = (v % B.width);\n\n ArrayList<Integer> destinations = new ArrayList<Integer>();\n\n for (Move M : G.moves) {\n\n\n if (validateMove(M, v, G, B)) {\n\n if (true) {\n\n //System.out.println(thereispath(M, B.a.get(tl_dest_R).get(tl_dest_C), newDestination(M, v, G, B), G, B));\n\n if (!marked[newDestination(M, v, G, B)]) {\n\n\n q.enqueue(newDestination(M, v, G, B));\n marked[newDestination(M, v, G, B)] = true;\n edgeTo[newDestination(M, v, G, B)] = v;\n distTo[newDestination(M, v, G, B)] = distTo[v] + 1;\n\n // System.out.println(newDestination(M, v, G, B) + \" \" + edgeTo[newDestination(M, v, G, B)]);\n\n }\n\n\n }\n\n // System.out.println();\n\n }\n\n }\n\n\n //break;\n }\n\n System.out.println();\n\n Stack<Integer> reverse = new Stack<Integer>();\n\n\n int temp = end;\n reverse.push(temp);\n\n while (true) {\n\n\n temp = edgeTo[temp];\n reverse.push(temp);\n\n if (temp == start)\n break;\n }\n\n int last = 0;\n\n int temp_row = 0, temp_column = 0;\n\n String te = \"\";\n\n while (!reverse.isEmpty()) {\n\n if (last != 0) {\n te += \" -> \";\n }\n\n\n last = reverse.pop();\n\n\n temp_row = last / B.width;\n temp_column = last % B.width;\n\n\n te += B.a.get(temp_row).get(temp_column).toT();\n\n\n }\n\n if (distTo[last] == INFINITY) {\n System.out.println(\"No path to the target.\");\n } else {\n\n int a = 0, b = 0;\n\n a = B.gold / B.width;\n b = B.gold % B.width;\n int c = 0, d = 0;\n\n c = B.knight / B.width;\n d = B.knight % B.width;\n\n System.out.println(distTo[last] + \" steps\");\n System.out.println(B.a.get(c).get(d).toT() + \" to \" + B.a.get(a).get(b).toT() + \": \" + te);\n\n }\n\n\n }",
"public static void rotate(int[] nums, int k) {\n // get the kth index from the end to rotate\n\t\tint n = nums.length;\n\t\tk = k % n ;\n\t\tif(k == 0) return ;\n\t\tint prev = 0, tmp = 0;\n\t\tfor(int i = 0 ; i < k ; i++) {\n\t\t\tprev = nums[n - 1];\n\t\t\tfor(int j = 0 ; j < nums.length ; j++) {\n\t\t\t\ttmp = nums[j];\n\t\t\t\tnums[j] = prev;\n\t\t\t\tprev = tmp;\n\t\t\t}\n\t\t}\n }",
"public int kEmptySlots(int[] flowers, int k) {\n int[] days = new int[flowers.length];\n // 按照slot作为index,days[]的数值是bloom date\n for(int i=0; i<flowers.length; i++)days[flowers[i] - 1] = i + 1;\n // 初始化left, right\n int left = 0, right = k + 1, res = Integer.MAX_VALUE;\n for(int i = 0; right < days.length; i++){ //注意这个地方的跳出条件是right < days.length,跟i无关\n if(days[i] < days[left] || days[i] <= days[right]){ //如果改slot夹在中间开\n if(i == right)res = Math.min(res, Math.max(days[left], days[right])); //we get a valid subarray\n left = i;\n right = k + 1 + i;\n }\n }\n return (res == Integer.MAX_VALUE)?-1:res;\n }",
"private void BuildUp(int towerToBuild, int towerTarget, int bottomSize) {\n\t\t\n\t\tint notTowerTarget = getOtherTower(towerToBuild,towerTarget);\n\n\t\twhile( towerSet.TopBlock(towerToBuild) > 1 ) {\n\t\t\tif(towerSet.TopBlock(towerTarget) == towerSet.TopBlock(towerToBuild) - 1) {\n\t\t\t\ttowerSet.MoveBlock(towerTarget,towerToBuild);\n\t\t\t\tturnNumber++;\n\t\t\t\tSystem.out.println(this.toString());\n\t\t\t}\n\t\t\telse if(towerSet.TopBlock(notTowerTarget) == towerSet.TopBlock(towerToBuild) - 1) {\n\t\t\t\ttowerSet.MoveBlock(notTowerTarget,towerToBuild);\n\t\t\t\tturnNumber++;\n\t\t\t\tSystem.out.println(this.toString());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(towerSet.TopBlock(towerTarget) == 1 ) {\n\t\t\t\t\tthis.BreakDown(towerTarget, towerToBuild, towerSet.TopBlock(towerToBuild) - 1);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.BreakDown(notTowerTarget, towerToBuild, towerSet.TopBlock(towerToBuild) - 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"void walkToQueue(LinkedList<Rider> startFloorQueue){\n riderAni.setImage(image);\r\n final int beginningQueueSize = startFloorQueue.size();\r\n TranslateTransition tt = new TranslateTransition();\r\n tt.setNode(riderAni);\r\n tt.setToX(250-Controller.queueOffsets.get(startFloor-1));\r\n tt.setDuration(Duration.seconds(4));\r\n TranslateTransition fl = new TranslateTransition();\r\n fl.setNode(floorLabel);\r\n fl.setToX(245-Controller.queueOffsets.get(startFloor-1));\r\n fl.setDuration(Duration.seconds(4));\r\n TranslateTransition tl = new TranslateTransition();\r\n tl.setNode(timerLabel);\r\n tl.setToX(245-Controller.queueOffsets.get(startFloor-1));\r\n tl.setDuration(Duration.seconds(4));\r\n ParallelTransition pt = new ParallelTransition(tt,fl,tl);\r\n pt.play();\r\n final int offset= Controller.queueOffsets.get(startFloor-1);\r\n\r\n pt.onFinishedProperty().set(new EventHandler<ActionEvent>() {\r\n public void handle(ActionEvent event) {\r\n //fires once person stops walking\r\n if (timer==null){\r\n startTimer();\r\n }\r\n riderAni.setImage(image2);\r\n if (beginningQueueSize==1 || offset==0||(! Controller.floorDirectionCalled.get(startFloor-1).equals(direction)&&!Controller.floorDirectionCalled.get(startFloor-1).equals(\"BOTH\"))){\r\n Controller.getElevator(startFloor,direction);\r\n }\r\n }\r\n });\r\n }",
"public void update()\n\t{\n\t\tif(pList.size()==0)\n\t\t\treturn;\n\t\tfor(int i = 0; i < pList.size(); i++)\n\t\t{\n\t\t\tPerson p = pList.get(i);\n\t\t\tif(p.destination.floorNumber>this.floorNumber)\n\t\t\t{\n\t\t\t\tup = true;\n\t\t\t}\n\t\t\telse if(p.destination.floorNumber<this.floorNumber)\n\t\t\t{\n\t\t\t\tdown = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpList.remove(i);\n\t\t\t}\n\t\t}\n\t\tif(up)\n\t\t{\n\t\t\tevent.id = ElevatorEvent.UPPRESSED;\n\t\t\tevent.token.attr[0]=this.floorNumber;\n\t\t\tSim.schedule(event,0);\n\t\t}\n\t\tif(down)\n\t\t{\n\t\t\tevent.id = ElevatorEvent.DOWNPRESSED;\n\t\t\tevent.token.attr[0]=this.floorNumber;\n\t\t\tSim.schedule(event, 0);\n\t\t}\n\t}",
"static int hurdleRace(int k, int[] height) {\n\t\tint huddleSum = IntStream.of(height).filter(v -> v > k).max().orElse(k) - k;\n\t\treturn huddleSum;\n\t}",
"public void compareLeaf(int k){\n\t\twhile(k > 1 && lessThan(k, k/2)){\n\t\t\tString tempKey = queueArray[k/2][0];\n\t\t\tString tempVal = queueArray[k/2][1];\n\t\t\tqueueArray[k/2][0] = queueArray[k][0];\n\t\t\tqueueArray[k/2][1] = queueArray[k][1];\n\t\t\tqueueArray[k][0] = tempKey;\n\t\t\tqueueArray[k][1] = tempVal;\n\t\t\tk = k/2;\n\t\t}\n\t}",
"public void rotateNoSpace(int[] nums, int k){\n //in case k is greater than the length\n k = k % nums.length;\n \n for(int i = 0; i < k; i++){\n int last = nums[nums.length-1];\n for(int j = nums.length - 1; j >= 1; j--){\n nums[j] = nums[j-1];\n }\n nums[0] = last;\n }\n }",
"private static void rotateArray(int[] arr, int gcd, int k) {\n\t\t// gcd is the set length for which the rotation will happen\n\t\tint len = arr.length;\n\t\tfor (int i = 0; i < gcd; i++) {\n\t\t\tint temp = arr[i];\n\t\t\tint j = i;\n\t\t\tint l = -1;\n\t\t\twhile (true) {\n\t\t\t\tl = ((j + k) % len);\n\t\t\t\tif (l == i) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tarr[j] = arr[l];\n\t\t\t\tj = l;\n\t\t\t}\n\t\t\tarr[j] = temp;\n\t\t}\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tSystem.out.print(arr[i] + \" \");\n\t\t}\n\t}",
"public void snakeUp(){\r\n\t\tspeedUp();\r\n\t\tpoints += 100;\r\n\t}",
"void moveUp(double speed, double destination)\n {\n this.destination = shaftHeight-(destination*floorHeight);\n if(speed == 1.75) speed = 1.25; //1.2175;\n else if(speed == 0.875) speed = 0.6; //0.5875;\n\n elevatorOffset = -1*speed;\n motorTimeline.play();\n }",
"public int transferPeople(Elevator e)\n\t{\n\t\tint transfered = e.pList.size();\n\t\tfor(int i = 0; i < e.pList.size(); i++)\n\t\t{\n\t\t\tPerson p = e.pList.get(i);\n\t\t\tif(p.destination.floorNumber == this.floorNumber)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"person leaving elevator \" + e.id + \" on floor \" + this.floorNumber);\n\t\t\t\te.pList.get(i).exit();\n\t\t\t\te.pList.remove(i);\n\t\t\t\te.getCurrentState().capacityState=ElevatorState.CapacityState.NOTFULL;\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t\ttransfered-=e.pList.size();\n\t\ttransfered+=this.pList.size();\n\t\tint available = e.getTotalCapacity()-e.getCurrentCapacity();\n\t\tif(e.getCurrentState().directionState == ElevatorState.DirectionState.IDLE)\n\t\t{\n\t\t\tif(pList.size()!=0&&pList.get(0).destination.floorNumber>this.floorNumber)\n\t\t\t{\n\t\t\t\tSystem.out.println(e.id + \" Now going up\");\n\t\t\t\te.getCurrentState().directionState = ElevatorState.DirectionState.GOINGUP;\n\t\t\t}\n\t\t\telse if(pList.size()!=0&&pList.get(0).destination.floorNumber<this.floorNumber)\n\t\t\t{\n\t\t\t\tSystem.out.println(e.id + \" Now going down\");\n\t\t\t\te.getCurrentState().directionState = ElevatorState.DirectionState.GOINGDOWN;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tfor(int i = 0; i < pList.size(); i++)\n\t\t{\n\t\t\t\n\t\t\tPerson p = pList.get(i);\n\t\t\tif(e.getCurrentState().directionState == ElevatorState.DirectionState.GOINGUP)\n\t\t\t{\n\t\t\t\tif(p.destination.floorNumber > this.floorNumber)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"person entering elevator \" + e.id + \" from floor \" + this.floorNumber + \n\t\t\t\t\t\t\t\" destination is \" + p.destination.floorNumber);\n\t\t\t\t\tpList.remove(p);\n\t\t\t\t\tp.enter();\n\t\t\t\t\ti--;\n\t\t\t\t\tp.current=e;\n\t\t\t\t\tp.state = Person.ELEVATOR;\n\t\t\t\t\te.pList.add(p);\n\t\t\t\t\tif(!e.getFloorsRequested().contains(p.destination))\n\t\t\t\t\t{\n\t\t\t\t\t\te.getFloorsRequested().add(p.destination);\n\t\t\t\t\t}\n\t\t\t\t\tavailable--;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(e.getCurrentState().directionState == ElevatorState.DirectionState.GOINGDOWN)\n\t\t\t{\n\t\t\t\tif(p.destination.floorNumber < this.floorNumber)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"person entering elevator \" + e.id + \" from floor \" + this.floorNumber + \n\t\t\t\t\t\t\t\" destination is \" + p.destination.floorNumber);\n\t\t\t\t\tpList.remove(p);\n\t\t\t\t\tp.enter();\n\t\t\t\t\ti--;\n\t\t\t\t\tp.current=e;\n\t\t\t\t\tp.state = Person.ELEVATOR;\n\t\t\t\t\te.pList.add(p);\n\t\t\t\t\tif(!e.getFloorsRequested().contains(p.destination))\n\t\t\t\t\t{\n\t\t\t\t\t\te.getFloorsRequested().add(p.destination);\n\t\t\t\t\t}\n\t\t\t\t\tavailable--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(available==0)\n\t\t\t{\n\t\t\t\te.getCurrentState().capacityState=ElevatorState.CapacityState.FULL;\n\t\t\t\tSystem.out.println(\"Elevator \" + e.id + \" is now full\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\ttransfered-=this.pList.size();\n\t\tSystem.out.println(\"transfered \" + transfered + \" on floor \" + this.floorNumber + \" number of people still on floor is \" + pList.size());\n\t\treturn transfered;\n\t}",
"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 int minJumps(int[] arr) {\n int n = arr.length;\n if (n == 1) {\n return 0;\n }\n\n //map to hold the values in the array and the indexes where they are located in\n Map<Integer, List<Integer>> map = new HashMap<>();\n\n for (int i = 0; i < arr.length; i++) {\n /*\n method checks if arr[i] exists in the map, if so, we add the current index to the list of indexes where\n arr[i] is present, otherwise we make a new entry for arr[i]\n */\n map.computeIfAbsent(arr[i], v -> new ArrayList<>()).add(i);\n }\n\n //Queue to hold the indexes j we can jump to starting from 0\n Queue<Integer> queue = new LinkedList<>();\n queue.add(0); //add the first index into the queue\n int steps = 0;\n\n while (!queue.isEmpty()) {\n steps++;\n int size = queue.size();\n\n for (int i = 0; i < size; i++) {\n int j = queue.remove(); //the current index\n\n //jump to j + 1\n if (j + 1 < n && map.containsKey(arr[j + 1])) {\n if (j + 1 == n - 1) {\n return steps;\n }\n queue.add(j + 1);\n }\n\n //jump to j - 1\n if (j - 1 >= 0 && map.containsKey(arr[j - 1])) {\n queue.add(j - 1);\n }\n\n //jump to index k --> arr[j] == arr[k]\n if (map.containsKey(arr[j])) {\n //search through the list of indexes where arr[j] is present\n for (int k : map.get(arr[j])) {\n if (k != j) {\n //if one of the indexes is the last index, we've gotten to the end, otherwise we add the index to the queue\n if (k == n - 1) {\n return steps;\n }\n queue.add(k);\n }\n }\n }\n //remove the value of arr[j] from the map to avoid overlap\n map.remove(arr[j]);\n }\n }\n return steps;\n }",
"public void rotate(int[] nums, int k) {\n \n k = k % nums.length;\n reverse(nums, 0, nums.length-1);\n reverse(nums, 0, k-1);\n reverse(nums, k, nums.length-1);\n }",
"@Override\n protected void downHeap(int k)\n {\n while (2 * k <= this.count)\n {\n //identify which of the 2 children are smaller\n int j = 2 * k;\n if (j < this.count && this.isGreater(j, j + 1))\n {\n j++;\n }\n //if the current value is < the smaller child, we're done\n if (!this.isGreater(k, j))\n {\n break;\n }\n //if not, swap and continue testing\n this.swap(k, j);\n k = j;\n }\n \tthis.elementsToArrayIndex.put(elements[k], k);\n }",
"private static int solution2( int[] arr, int k) {\n\t\tif ( arr == null || arr.length < k ) {\n\t\t\treturn Integer.MIN_VALUE;\n\t\t}\n\t\t\n\t\tint[] a = Arrays.copyOfRange( arr, 0, arr.length );\n\t\t\n\t\tfor ( int i = 1; i <= k; ++i ) {\n\t\t\tfor ( int j = 0; j < a.length - i; ++j ) {\n\t\t\t\tif ( a[j] > a[j+1] ) {\n\t\t\t\t\tint tmp = a[j];\n\t\t\t\t\ta[j] = a[j+1];\n\t\t\t\t\ta[j+1] = tmp;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//displayArray(a);\n\t\t}\n\t\t\n\t\treturn a[a.length-k];\n\t}",
"public ListNode SolveByMovingPointers(ListNode head, int k)\n {\n // Edge cases\n if (head == null)\n return null;\n if (k == 0)\n return head;\n\n // Calculate list length + actual number of rotations\n int listLength = FindLength(head);\n int numberOfRotations = k >= listLength? k % listLength : k;\n\n // Another edge case - may not need to rotate at all\n if (listLength == 1 || numberOfRotations == 0)\n return head;\n\n // Iterate to the node before the node with number that needs to be rotated to beginning...\n ListNode oldHeadIterator = head;\n int counter = listLength - numberOfRotations - 1;\n while (counter != 0)\n {\n counter -= 1;\n oldHeadIterator = oldHeadIterator.next;\n }\n\n // ... Then make the following node be the beginning of new head + nullify tail of old head\n ListNode newHead = oldHeadIterator.next;\n oldHeadIterator.next = null;\n\n // Iterate to end of the new head, then simply add the old head contents to the tail\n ListNode newHeadIterator = newHead;\n while (newHeadIterator.next != null)\n newHeadIterator = newHeadIterator.next;\n newHeadIterator.next = head;\n\n return newHead;\n }",
"protected void moveUp(Position<Entry<E>> p)\r\n\t{\n\t\tint count = key(p);\r\n\t\tPosition<Entry<E>> walk = p;\r\n\r\n\t\twhile(walk != fList.first() && key(fList.before(walk)) < count)\r\n\t\t\twalk = fList.before(walk);\r\n\t\tif(walk != p)\r\n\t\t\tfList.addBefore(walk, fList.remove(p));\r\n\t}",
"void easy_ride_from_70kmh_down (double min_lift) { \n double start_speed = 70; // kmh\n double pitch = 0;\n double min_drag = 10000.0;\n double step = -10;\n velocity = start_speed;\n for (int count = 0; count < 10000; count++) {\n trace(\"velocity: \" + velocity + \" step: \" + step);\n steady_flight_at_given_speed(5, 0);\n double total_drag = total_drag();\n double foil_lift = foil_lift();\n if (Math.abs(step) < 0.01) break;\n if ((step < 0 && velocity+step <= 0) ||\n // (step > 0 && velocity >= 70) ||\n foil_lift < load ||\n total_drag > min_drag) { // can't pivot because of local max of drag before taking off.... \n velocity -= step;\n step *= 0.5;\n } else {\n velocity += step;\n min_drag = total_drag;\n }\n }\n make_cruising_info(min_lift, min_drag, velocity); \n System.out.println(\"\\nDone!\\n----------------\\n\" + cruising_info);\n }",
"public void rotateLeftWithReverse(int arr[], int n, int k) {\n reverse(arr, 0, k-1);\n\n //reverse last k elements\n reverse(arr, n-k-1, n-1);\n\n //reverse all array\n reverse(arr, 0, n-1);\n printArray(arr);\n\n /*\n * Time Complexity : O(n) loop ran for k times\n * Space Complexity : O(1)\n */\n }",
"private void swim(int k) {\n if (k > 1 && aHeap.get(parent(k)).compareTo(aHeap.get(k)) > 0) {\n swap(k, parent(k));\n swim(parent(k));\n }\n }",
"private void calculateNextStepPressureCell(int i, int j, int k) {\n // Retrieve the velocity components and pressure of the neighboring cells\n double uEast = u[i + 1][j][k];\n double uWest = u[i - 1][j][k];\n double vNorth = v[i][j + 1][k];\n double vSouth = v[i][j - 1][k];\n double wUp = w[i][j][k + 1];\n double wDown = w[i][j][k - 1];\n // double pCenter = p[i][j][k]; // not used\n double pEast = p[i + 1][j][k];\n double pWest = p[i - 1][j][k];\n double pNorth = p[i][j + 1][k];\n double pSouth = p[i][j - 1][k];\n double pUp = p[i][j][k + 1];\n double pDown = p[i][j][k - 1];\n\n double currentDepth = depth[k];\n double deltaZPlus = (depth[k + 1] - currentDepth) / 2.0;\n double deltaZMinus = (currentDepth - depth[k - 1]) / 2.0;\n double deltaZ = deltaZPlus + deltaZMinus;\n\n // Compute the next-step pressure using the Poisson equation\n double next_p = ((pEast + pWest) / Math.pow(deltaX, 2) + (pNorth + pSouth) / Math.pow(deltaY, 2)\n + (pUp + pDown) / Math.pow(deltaZ, 2)\n - ((uEast - uWest) / deltaX + (vNorth - vSouth) / deltaY + (wUp - wDown) / deltaZ) / timeStep)\n / (2 / (Math.pow(deltaX, 2)) + 2 / (Math.pow(deltaY, 2)) + 2 / (Math.pow(deltaZ, 2)));\n\n // Update the pressure of the cell\n pNext[i][j][k] = next_p;\n }",
"public void rotateold2(int[] a, int k) {\n\n\t\tif (a == null || a.length == 0)\n\t\t\treturn;\n\n\t\tint jump = 0, len = a.length, cur = a[0], next, count = 0;\n\n\t\tk %= len; \n\t\tif (k == 0) return;\n\n\t\tif (len % k != 0 || k == 1)\n\t\t{ \n\t\t\tint i = 0;\n\t\t\twhile (i < len)\n\t\t\t{\n\t\t\t\tjump = (jump + k) % len;\n\t\t\t\tnext = a[jump];\n\t\t\t\ta[jump] = cur;\n\t\t\t\tcur = next;\n\t\t\t\ti++;\n\t\t\t} \n\t\t} \n\t\telse\n\t\t{\n\t\t\tfor (int i = 0; i <= len/k; i ++)\n\t\t\t{\n\t\t\t\tint start = 0;\n\t\t\t\tjump = i;\n\t\t\t\tnext = a[jump];\n\t\t\t\tcur = a[i];\n\t\t\t\twhile (start <= len/k)\n\t\t\t\t{\n\t\t\t\t\tjump = (jump + k) % len;\n\t\t\t\t\tnext = a[jump];\n\t\t\t\t\ta[jump] = cur;\n\t\t\t\t\tcur = next;\n\t\t\t\t\tstart++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void runMovingTest() {\n long now;\n int count, search;\n elapsedTime.clear();\n expandedCells.clear();\n GraphPath<Integer,DefaultWeightedEdge> agentPath=null;\n GraphPath<Integer,DefaultWeightedEdge> targetPath=null;\n //Integer agentNode, targetNode;\n List<Integer> pathToFollow = null;\n for(Point[] p : points){\n pathfinder = new LazyMovingTargetAdaptiveAStarShortestPath<Integer, DefaultWeightedEdge>(map);\n count=0;\n search=0;\n agentNode = p[0].toNode();\n targetNode = p[1].toNode();\n LinkedList<Integer> movingExpCell = new LinkedList<>();\n LinkedList<Long> movingElapsTime = new LinkedList<>();\n targetThread r = new targetThread();\n evadeThread = new Thread(r);\n evadeThread.start();\n while(!agentNode.equals(targetNode)){\n if(pathToFollow==null || !agentPath.getEndVertex().equals(targetNode)) {\n agentPath = pathfinder.getShortestPath(agentNode, targetNode, new OctileDistance());\n if(pathfinder.getElapsedTime() > Long.valueOf(1900))\n continue;\n movingElapsTime.add(pathfinder.getElapsedTime());\n movingExpCell.add(pathfinder.getNumberOfExpandedNodes());\n search++;\n }\n Integer targetNext = null;\n Integer agentNext = null;\n if(count%2==0) {\n /*targetPath = new Trailmax<Integer,DefaultWeightedEdge>(map).getShortestPath(agentNode,targetNode,null);\n pathToFollow = Graphs.getPathVertexList(targetPath);\n if (!pathToFollow.isEmpty()) targetNext = pathToFollow.remove(0);\n if (targetNext.equals(targetNode) && !pathToFollow.isEmpty()) targetNext = pathToFollow.remove(0);\n targetNode = targetNext;*/\n synchronized(moveTarget) {\n moveTarget = new Boolean(true);\n }\n\n try {\n Thread.sleep(12);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n pathToFollow=Graphs.getPathVertexList(agentPath);\n if(!pathToFollow.isEmpty()){\n int i = pathToFollow.lastIndexOf(agentNode);\n agentNext=pathToFollow.remove(i+1);\n }\n agentNode = agentNext;\n count++;\n //System.out.println(agentNode+\",\"+targetNode);\n\n }\n\n r.terminate();\n try {\n evadeThread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n pathToFollow=null;\n movingElapsedTime.put(p, movingElapsTime);\n movingExpandedCells.put(p, movingExpCell);\n movesMap.put(p, count);\n searchesMap.put(p, search);\n if(verbose) {\n Long totElaps = Long.valueOf(0);\n Integer totExp = 0;\n for (Long l : movingElapsTime) totElaps += l;\n for (Integer i : movingExpCell) totExp += i;\n System.out.println(\"total elapsed: \" + totElaps + \" total expanded \" + totExp);\n }\n }\n }",
"private void move(boolean aller, Road[][] BoarderRoad){\n \n int q=(int)((hour*60+minute)/5)-1;//je pense que le int prend l'arrondi et pas la partie entière\n Iterator iter= this.allInhabDeparture.get(q).iterator();\n while (iter.hasNext()){\n Inhabitant curin = (Inhabitant)iter.next();\n this.onTheRoadAgain.add(curin);\n curin.testChemin(aller);\n }\n Iterator it = this.onTheRoadAgain.iterator();\n while (it.hasNext()) {\n Inhabitant curin = (Inhabitant)it.next();\n if(curin.MovingPath(boardRoad.BoardRoad)==true){\n onTheRoadAgain.remove(curin);\n }\n \n\n }\n }",
"public static void KswapPermutation(int arr[], int n, int k) {\n\t\tint[] pos = new int[n + 1];\r\n\r\n\t\tfor (int i = 0; i < n; ++i)\r\n\t\t\tpos[arr[i]] = i;\r\n\r\n\t\tfor (int i = 0; i < n && k > 0; ++i) {\r\n\t\t\t// If element is already i'th largest,\r\n\t\t\t// then no need to swap\r\n\t\t\tif (arr[i] == n - i)\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\t// Find position of i'th largest value, n-i\r\n\t\t\tint temp = pos[n - i];\r\n\r\n\t\t\t// Swap the elements position\r\n\t\t\tpos[arr[i]] = pos[n - i];\r\n\t\t\tpos[n - i] = i;\r\n\r\n\t\t\t// Swap the ith largest value with the\r\n\t\t\t// current value at ith place\r\n\t\t\tswap(arr, temp, i);\r\n\r\n\t\t\t// decrement number of swaps\r\n\t\t\t--k;\r\n\t\t}\r\n\t}",
"private static <Key extends Comparable<Key>> void swim(Key[] pq, int k, int n) {\n while(k/2 > 1 && less(pq, k/2, k)) { // parent is smaller\n exch(pq, k, k/2);\n k = k/2;\n }\n }",
"public void moveUp() {\n\t\tstate.updateFloor(state.getFloor()+1);\n\t}",
"static int eggDrop(int n, int k) {\r\n if(k == 0 || k == 1) {\r\n return k;\r\n }\r\n\r\n // We need k trials for one egg \r\n // and k floors \r\n if(n == 1) {\r\n return k;\r\n }\r\n \r\n int min = Integer.MAX_VALUE;\r\n int i, res;\r\n // Consider all droppings from \r\n //1st floor to kth floor and \r\n // return the minimum of these \r\n // values plus 1.\r\n for(i = 1; i <= k; i++) { // Mistake 1 : Start for loop from 1 instead of 0\r\n res = Math.max(eggDrop(n-1, i-1), eggDrop(n, k-i));\r\n if(res < min) {\r\n min = res;\r\n }\r\n }\r\n\r\n return min + 1;\r\n }",
"private static int solution3( int[] arr, int k) {\n\t\tif ( arr == null || arr.length < k ) {\n\t\t\treturn Integer.MIN_VALUE;\n\t\t}\n\t\t\n\t\t// Store the first k elements in a temporary array\n\t\tint[] tmp = Arrays.copyOfRange( arr, 0, k);\n\t\tint[] a = Arrays.copyOfRange( arr, 0, arr.length);\n\t\tint res = Integer.MAX_VALUE;\n\t\t\n\t\t\n\t\t// Loop for n-k times: each times for element in a[k] to a[n-1], find the largest to switch with tmp[j] for j = 0 to k-1\n\t\tfor ( int i = 0; i < k; ++i ) {\n\t\t\tint max = tmp[i];\n\t\t\tint index = i;\n\t\t\t\n\t\t\tfor ( int j = k; j < a.length; ++j ) {\n\t\t\t\tif ( a[j] > max ) {\n\t\t\t\t\tmax = a[j];\n\t\t\t\t\tindex = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( index != i ) {\n\t\t\t\ta[index] = tmp[i];\n\t\t\t\ttmp[i] = max;\n\t\t\t}\n\t\t\t\n\t\t\tres = Math.min(res, tmp[i]);\n\t\t}\n\t\t\n\t\t\n\t\treturn res;\n\t}",
"private void getJumps(ArrayList<Move> moves, int k) {\n if (!jumpPossible(k)) {\n return;\n }\n\n for (int i = -2; i <= 2; i += 2) {\n for (int j = -2; j <= 2; j += 2) {\n char nextCol = (char) (col(k) + i);\n char nextRow = (char) (row(k) + j);\n if (validSquare(nextCol, nextRow)) {\n Move rec = Move.move(col(k),\n row(k), nextCol, nextRow);\n if (checkJump(rec, true)) {\n PieceColor middle = get(nextCol, nextRow);\n set(nextCol, nextRow, get(k));\n ArrayList<Move> record = new ArrayList<>();\n getJumps(record, index(nextCol, nextRow));\n if (record.size() == 0) {\n record.add(null);\n }\n set(nextCol, nextRow, middle);\n for (Move mov : record) {\n Move jump = Move.move(rec, mov);\n moves.add(jump);\n }\n }\n }\n }\n }\n }",
"public boolean moveUp()\n {\n\tboolean update;\n\tboolean action = false;\n\t\n\tdo\n\t{\n update = false;\n\t\t\t\n for (int y=0; y<cases.length-1; y++)\n {\n\t\tfor (int x=0; x<cases[y].length; x++)\n {\n boolean merge;\n boolean move;\n\t\t\t\t\t\n do\n {\n\t\t\tmerge = merge(cases[y+1][x],cases[y][x]);\n\t\t\tmove = move(cases[y+1][x],cases[y][x]);\n\t\t\tupdate = (update || merge || move);\n if(!action && update)\n {\n action = update; \n }\n } while (merge || move);\n\t\t}\n }\n } while (update);\n \n return action;\n }",
"public int kSum(int[] A, int k, int target) {\n\t\tint res=0;\r\n\t\t//考虑k=1的情况\r\n//\t\tif (k==1) {\r\n//\t\t\tfor(int i=0;i<A.length;i++) {\r\n//\t\t\t\tif (A[i]==target) {\r\n//\t\t\t\t\tres++;\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n//\t\t\treturn res;\r\n//\t\t}\r\n//\t\tint sum_k_1=0;\r\n//\t\tint sum=target-sum_k_1;\r\n//\t\tif (k>1 && k<A.length) {\r\n//\t\t\tfor(int i=0;i<A.length-1;i++) {\r\n//\t\t\t\tfor(int j=i+1;j<A.length;j++) {\r\n//\t\t\t\t\t\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n//\t\t}\r\n\t\t//动态规划\r\n\t\tint n=A.length;\r\n\t\tint[][][] f=new int[n+1][k+1][target+1];\r\n\t\tfor(int i=0;i<n+1;i++) {\r\n\t\t\tf[i][0][0]=1;\r\n\t\t}\r\n\t\tfor(int i=1;i<=n;i++) {\r\n\t\t\tfor(int j=1;j<=k && j<=i;j++) {\r\n\t\t\t\tfor(int t=1;t<=target;t++) {\r\n\t\t\t\t\tf[i][j][t]=0;\r\n\t\t\t\t\tif (t>=A[i-1]) {\r\n\t\t\t\t\t\tf[i][j][t]=f[i-1][j-1][t-A[i-1]];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tf[i][j][t]+=f[i-1][j][t];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn f[n][k][target];\r\n }",
"public int[] rotate(int[] arr, int k) {\n\t\tif (k > arr.length)// if k>n or (steps rotated)>(num of elts)\n\t\t\tk = k % arr.length;// then k is changed to k mod n\n\n\t\t// Create a new array of the same length\n\t\tint[] result = new int[arr.length];\n\n\t\tfor (int i = 0; i < k; i++)\n\t\t\tresult[i] = arr[arr.length - k + i];\n\n\t\tint j = 0;\n\t\tfor (int i = k; i < arr.length; i++) {\n\t\t\tresult[i] = arr[j];\n\t\t\tj++;\n\t\t}\n\n\t\t// Copy the shifted array into the original\n\t\tSystem.arraycopy(result, 0, arr, 0, arr.length);\n\t\treturn arr;\n\n\t}",
"public synchronized void moveDown(){\n if (!this.isAtBottom()){\n for (int j = 1; j < 25; j++){\n for (int i = 1; i < 13; i++){\n if (this.movable[i][j]){\n this.map[i][j - 1] = this.map[i][j];\n this.movable[i][j - 1] = this.movable[i][j];\n this.colors[i][j - 1] = this.colors[i][j];\n\n this.map[i][j] = false;\n this.movable[i][j] = false;\n this.colors[i][j] = null;\n\n }\n }\n }\n }\n this.piecePositionY--;\n repaint();\n }",
"private void goUpWall() {\n\t\t// TODO Auto-generated method stub\n\t\tthis.turnLeft();\n\t\tthis.move(2);\n\t\tthis.turnRight();\n\t}",
"private void emptyRule(boolean[] emptyElevators, int emptyCount){\n\t\t// create a new QueueSorter which will tell us where the largest Queue of waiting passengers is\n\t\tQueueSorter qs = new QueueSorter(this.upQueues.length*2+1);\n\t\tfor( int k = 0 ; k < this.upQueues.length ; k++){\n\t\t\t// add both directions\n\t\t\tqs.add( (ElevatorQueue)this.upQueues[k]);\n\t\t\tqs.add( (ElevatorQueue)this.downQueues[k]);\n\t\t}\n\t\t\n\t\t// For each elevator in the bank\n\t\tfor (int i = 0 ; i < this.elevators.length ; i++ ){\n\t\t\t// if the elevator is empty and does not already have a targetFloor assigned\n\t\t\tif( emptyElevators[i] == true && this.elevators[i].getTargetFloor() <= 0 ){\n\t\t\t\t//get the largest Queue from our list\n\t\t\t\tElevatorQueue eq = qs.remove();\n\t\t\t\t// if this queue size is 0 then there are no waiting passengers and no elevators will be\n\t\t\t\t// assigned to move that are empty\n\t\t\t\tif( eq.size() == 0 ){\n\t\t\t\t\t// all of the remaining queues are empty\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// floor of this queue\n\t\t\t\tint floor = eq.getFloor();\n\t\t\t\tElevator.Direction d = eq.getDirectionQueue();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// this checks to see if another elevator is headed to the target floor\n\t\t\t\tboolean check = false;\n\t\t\t\t//for each elevator\n\t\t\t\tfor( int j = 0; j < this.elevators.length ; j++ ){\n\t\t\t\t\t\n\t\t\t\t\t// if another elevator is headed to this target floor, that is not the same\n\t\t\t\t\t// elevator as the one being assigned this targetFloor. Also make sure it is in the same direction\n\t\t\t\t\tif( this.elevators[j].getTargetFloor() == floor &&\n\t\t\t\t\t\t\ti != j && this.elevators[j].getTargetDirection() == d){\n\t\t\t\t\t\tcheck = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// if there is another elevator, continue on\n\t\t\t\tif( check == true){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//otherwise set the targetfloor and direction\n\t\t\t\tthis.elevators[i].setTargetFloor(floor);\n\t\t\t\tthis.elevators[i].setTargetDirection(d);\n\t\t\t\t//set direction to get to floor\n\t\t\t\tif( this.elevators[i].getCurrentFloor() < floor){\n\t\t\t\t\tthis.elevators[i].setDirection(Elevator.Direction.UP);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.elevators[i].setDirection(Elevator.Direction.DOWN);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// we have no assigned this elevator to a targetFloor, remove it from out list of emtpyElevators\n\t\t\t\temptyElevators[i] = false;\n\t\t\t\t\n\t\t\t}\n\t\t\t// if we have an elevator that is Empty but is still heading toward it's targetFloor, check to see \n\t\t\t// that there are still waiting passengers at the targetFloor\n\t\t\telse if( emptyElevators[i] == true ){\n\t\t\t\tElevatorQueue temp = null;\n\t\t\t\t//check to see if anybody has picked up the passengers it was going to, find the correct Queue on\n\t\t\t\t// the correct floor\n\t\t\t\tif( this.elevators[i].getTargetDirection() == Elevator.Direction.DOWN){\n\t\t\t\t\ttemp = ( ElevatorQueue ) this.downQueues[this.elevators[i].getTargetFloor()];\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttemp = (ElevatorQueue) this.upQueues[this.elevators[i].getTargetFloor()];\n\t\t\t\t}\n\t\t\t\t// somebody picked up the passengers, reset\n\t\t\t\tif( temp.size() == 0 ){\n\t\t\t\t\tthis.elevators[i].setTargetFloor(-1);\n\t\t\t\t\tthis.elevators[i].setTargetDirection(null);\n\t\t\t\t\t// repeat so that it will find a floor to go to\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}",
"private static void findKClosestNumbersOtherApproach(int[] arr, int key, int k) {\n\n\t\tPriorityQueue<Pair<Integer, Integer>> pq = new PriorityQueue<>();\n\t\tint len = arr.length;\n\t\tint absDiff[] = new int[len];\n\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tabsDiff[i] = Math.abs(arr[i] - key);\n\t\t\tPair p = new Pair<>(absDiff[i], arr[i]);\n\t\t\tpq.add(p);\n\n\t\t}\n\n\t\tint c = 0;\n\t\tSystem.out.println(\"closest numbers\");\n\t\twhile (!pq.isEmpty() && c < k) {\n\t\t\tint k1 = (int) pq.peek().getValue(0);\n\t\t\tint v = (int) pq.peek().getValue(1);\n\n\t\t\tpq.remove();\n\t\t\tc++;\n\t\t\tSystem.out.println( v);\n\t\t}\n\n\t}",
"private void changeState() {\n if (jobs.contains(this.currentFloor)){\n throw new AssertionError(\"Changing state of elevator no \" + ElevatorID + \" on destination floor\");\n }\n\n // empty job set -> going to IDLE state\n if (jobs.size() == 0) {\n this.currentState = IDLE;\n return;\n }\n\n Integer closestFloorDownwards = jobs.floor(this.currentFloor);\n Integer closestFloorUpwards = jobs.ceiling(this.currentFloor);\n\n switch (this.currentState) {\n // if elevator is in idle state then we need to go to the closest job possible\n case IDLE -> {\n Integer closestFloor =\n findClosestFloor(this.currentFloor, closestFloorUpwards, closestFloorDownwards);\n\n if (closestFloor < this.currentFloor) {\n this.currentState = DOWN;\n } else {\n this.currentState = UP;\n }\n }\n case DOWN -> {\n if (closestFloorDownwards != null) { // if there exists a predecessor in `jobs`\n this.currentState = DOWN; // let's continue going down\n } else {\n this.currentState = UP; // otherwise we need to go up\n }\n }\n case UP -> {\n if (closestFloorUpwards != null) { // if there exists a successor in `jobs`\n this.currentState = UP; // let's continue going up\n } else {\n this.currentState = DOWN; // otherwise we need to go down\n }\n }\n }\n }",
"protected int moveUpFloor() {\n delayElevator();\n return currentFloor.incrementAndGet();\n }",
"public static void main(String[] args) {\n // size of square board\n int N = 6;\n int[] knightPos= {4, 5};\n int[] targetPos= {1, 1};\n System.out.println(minStepToReachTarget(knightPos, targetPos, N));\n \n N = 201;\n knightPos = new int[] {200, 200};\n targetPos = new int[] {0, 0};\n System.out.println(minStepToReachTarget(knightPos, targetPos, N));\n }",
"public void moveUp()\n\t{\n\t\tthis.grid.moveUp();\n\t}",
"public static void mergeKSortedArrays(int[][] arr, int k) {\n\t\tNode[] hArr = new Node[k];\n\t\tint resultSize = 0;\n\n\n\t\tfor(int i=0;i<arr.length;i++) {\n\n\t\t\tNode node = new Node(arr[i][0],i,1);\n\t\t\thArr[i] = node;\n\t\t\tresultSize += arr[i].length;\n\t\t}\n \n\t\tMinHeap mh = new MinHeap(hArr);\n\n\t\tint[] result = new int[resultSize];\n \n\t\tfor(int i=0;i<resultSize;i++) {\n\t\t\tNode root = mh.getMin();\n\t\t\tresult[i] = root.element;\n\t\t\t\n\t\t\tif(root.j < arr[root.i].length)\n\t\t\t\troot.element = arr[root.i][root.j++];\n\t\t\telse\n\t\t\troot.element = Integer.MAX_VALUE;\n\t\t\t\tmh.replaceMin(root);\n\t\t}\n \n\t\tfor(int i : result)\n\t\t\tSystem.out.print(i + \" \");\n\t\tSystem.out.println();\n \n\t}",
"private void calculateNextStepVelocityCell(int i, int j, int k, double currentTime) {\n\n // Retrieve the velocity components and depth of the cell\n double ui = u[i][j][k];\n double vi = v[i][j][k];\n double wi = w[i][j][k];\n double currentDepth = depth[k];\n\n // Calculate the grid\n // spacing in the depth dimension\n double deltaZPlus = (depth[k + 1] - currentDepth) / 2.0;\n double deltaZMinus = (currentDepth - depth[k - 1]) / 2.0;\n\n // Compute the gradients of velocity in each direction using central difference\n // scheme\n double du_dx = (u[i + 1][j][k] - u[i - 1][j][k]) / 2.0;\n double dv_dy = (v[i][j + 1][k] - v[i][j - 1][k]) / 2.0;\n double dw_dz = (w[i][j][k + 1] - w[i][j][k - 1]) / (deltaZPlus + deltaZMinus);\n\n // Compute the Laplacian of velocity in each direction using central difference\n // scheme\n double d2u_dx2 = (u[i + 1][j][k] - 2 * ui + u[i - 1][j][k]) / Math.pow((deltaX), 2);\n double d2v_dy2 = (v[i][j + 1][k] - 2 * vi + v[i][j - 1][k]) / Math.pow((deltaY), 2);\n double d2w_dz2 = (w[i][j][k + 1] - 2 * wi + w[i][j][k - 1])\n / (Math.pow(deltaZPlus, 2) + Math.pow(deltaZMinus, 2));\n\n // Retrieve the tidal forcing values at the current time step\n double tidalForcingX = this.tidalForcingX.get(i, j, k, currentTime);\n double tidalForcingY = this.tidalForcingY.get(i, j, k, currentTime);\n\n // Compute the next-step velocities using the Navier-Stokes equations with tidal\n // forcing\n double next_u = ui\n - (timeStep * (ui * du_dx + vi * dv_dy + wi * dw_dz) - (timeStep / fluidDensity) * du_dx * d2u_dx2)\n + tidalForcingX;\n double next_v = vi\n - (timeStep * (ui * du_dx + vi * dv_dy + wi * dw_dz) - (timeStep / fluidDensity) * dv_dy * d2v_dy2)\n + tidalForcingY;\n double next_w = wi\n - (timeStep * (ui * du_dx + vi * dv_dy + wi * dw_dz) - (timeStep / fluidDensity) * dw_dz * d2w_dz2);\n\n // Update the velocity components of the cell\n uNext[i][j][k] = next_u;\n vNext[i][j][k] = next_v;\n wNext[i][j][k] = next_w;\n }",
"private void emptyRule2(boolean[] emptyElevators, int emptyCount){\n\t\t//create a sorted list of all of the floors based on the number of people waiting either to go up or down\n\t\tQueueSorter qs = new QueueSorter(this.upQueues.length*2+1);\n\t\tfor(int i = 0; i < this.upQueues.length ; i++){\n\t\t\t//add both the queue of people waiting to go up and down\n\t\t\tqs.add(( ElevatorQueue )this.upQueues[i] );\n\t\t\tqs.add(( ElevatorQueue )this.downQueues[i]);\n\t\t}\n\t\t\n\t\t// for every empty elevator\n\t\tfor( int i = 0 ; i < emptyCount; i++ ){\n\t\t\t// get the fullest floor Queue\n\t\t\tElevatorQueue tempQueue = qs.remove();\n\t\t\t//floor this queue is on\n\t\t\tint floor = tempQueue.getFloor();\n\t\t\t// do nothing if there is nobody in the queue (less non empty queues than elevators), no non empty queue's left, break from for loop\n\t\t\tif( tempQueue.size() == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// this checks to see if another elevator is headed to the target floor\n\t\t\tboolean check = false;\n\t\t\t//for each elevator\n\t\t\tfor( int j = 0; j < this.elevators.length ; j++ ){\n\t\t\t\t// if another elevator is headed to this target floor\n\t\t\t\tif( this.elevators[j].getTargetFloor() == floor &&\n\t\t\t\t\t this.elevators[j].getTargetDirection() == tempQueue.getDirectionQueue()){\n\t\t\t\t\tcheck = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// if another elevator is already headed to this queue, continue to next biggest Queue\n\t\t\tif( check == true){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// initial values, will always be overwritten\n\t\t\tint tempIndex = -1;\n\t\t\tint tempDistance = -9999;\n\t\t\t// this will get the closest empty elevator, with no targetFloor set that is also empty\n\t\t\tfor( int j = 0 ; j < emptyElevators.length ; j++){\n\t\t\t\tif( emptyElevators[j] == true && this.elevators[j].getTargetFloor() < 0){\n\t\t\t\t\t//get the distance the elevator is from the Queue\n\t\t\t\t\t\n\t\t\t\t\tint distance = Math.abs(this.elevators[j].getCurrentFloor() - floor);\n\t\t\t\t\t// if this is the first empty Elevator checked, set it's values as the default\n\t\t\t\t\tif( tempDistance < 0 ){\n\t\t\t\t\t\ttempDistance = distance;\n\t\t\t\t\t\ttempIndex = j;\n\t\t\t\t\t}\n\t\t\t\t\t// if this elevator is closest elevator to the Queue checked so far\n\t\t\t\t\telse if( distance < tempDistance ){\n\t\t\t\t\t\t// set the new minimum distance\n\t\t\t\t\t\ttempDistance = distance;\n\t\t\t\t\t\t// index of this elevator\n\t\t\t\t\t\ttempIndex = j;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// If there is an elevator that is empty (should always be if it gets this far). set the target information\n\t\t\t// for this elevator to head toward the Queue\n\t\t\tif( tempIndex >= 0){\n\t\t\t\tElevator.Direction d = tempQueue.getDirectionQueue();\n\t\t\t\t//set targetfloor / target direction\n\t\t\t\tthis.elevators[tempIndex].setTargetFloor(floor);\n\t\t\t\tthis.elevators[tempIndex].setTargetDirection(d);\n\t\t\t\t\n\t\t\t\t// this elevator has been assigned to a direction/ place to go, so we don't \n\t\t\t\t// want to consider it for future Queue's\n\t\t\t\temptyElevators[tempIndex] = false;\n\t\t\t\t\n\t\t\t\t// Set the direction that the elevator needs to go in to make it to the targetFloor\n\t\t\t\tif( this.elevators[tempIndex].getCurrentFloor() < floor){\n\t\t\t\t\tthis.elevators[tempIndex].setDirection(Elevator.Direction.UP);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.elevators[tempIndex].setDirection(Elevator.Direction.DOWN);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t// This is for any remaining empty elevators that were not assigned a targetFloor (i.e. if there\n\t\t// are more empty elevators than queues with passengers waiting.\n\t\tfor( int i = 0 ; i < this.elevators.length ; i++){\n\t\t\tif( emptyElevators[i] == true){\n\t\t\t\t// half of the elevators will wait at the top and half will wait at the bottom\n\t\t\t\tif( i < this.elevators.length/2){\n\t\t\t\t\tthis.elevators[i].setDirection(Elevator.Direction.DOWN);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.elevators[i].setDirection(Elevator.Direction.UP);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"private void playerMoveUp()\n {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(false);\n this.setCurrentY(this.getCurrentY() - 1);\n if (this.getCurrentY() > -1) {\n if (!nextIsWall()) {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } else {\n this.setCurrentY(this.getCurrentY() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n } else// hit edge redo setlocation\n {\n this.setCurrentY(this.getCurrentY() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } \n }",
"public void rotate1(int[] nums, int k) {\n k %= nums.length;\n reverse(nums, 0, nums.length - 1);\n reverse(nums, 0, k - 1);\n reverse(nums, k, nums.length - 1);\n }",
"public static long solve(long[] data, long k) {\n int n = data.length;\n\n Buffer<Interval> buffer = new Buffer<>(Interval::new, x -> {}, n * 2);\n\n Randomized.shuffle(data);\n Arrays.sort(data);\n\n List<Interval> lastLevel = new ArrayList<>(n);\n List<Interval> curLevel = new ArrayList<>(n);\n lastLevel.add(newInterval(buffer, 0, n - 1));\n int level = Log2.floorLog(data[n - 1]);\n long mask = 0;\n for (; level >= 0; level--) {\n curLevel.clear();\n for (Interval interval : lastLevel) {\n int l = interval.l;\n int r = interval.r;\n int m = r;\n while (m >= l && Bits.get(data[m], level) == 1) {\n m--;\n }\n interval.m = m;\n }\n long total = 0;\n for (Interval interval : lastLevel) {\n total += (long) (interval.m - interval.l + 1) * (interval.relative.m - interval.relative.l + 1);\n total += (long) (interval.r - interval.m) * (interval.relative.r - interval.relative.m);\n }\n if (total < k) {\n k -= total;\n mask = Bits.set(mask, level, true);\n for (Interval interval : lastLevel) {\n if (interval.relative == interval) {\n if (interval.l <= interval.m && interval.m < interval.r) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n Interval b = newInterval(buffer, interval.m + 1, interval.r);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n } else if (interval.r >= interval.relative.r) {\n if (interval.l <= interval.m && interval.relative.r > interval.relative.m) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n Interval b = newInterval(buffer, interval.relative.m + 1, interval.relative.r);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n if (interval.m < interval.r && interval.relative.m >= interval.relative.l) {\n Interval a = newInterval(buffer, interval.m + 1, interval.r);\n Interval b = newInterval(buffer, interval.relative.l, interval.relative.m);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n }\n }\n } else {\n for (Interval interval : lastLevel) {\n if (interval.relative == interval) {\n if (interval.l <= interval.m) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n a.relative = a;\n curLevel.add(a);\n }\n if (interval.m < interval.r) {\n Interval a = newInterval(buffer, interval.m + 1, interval.r);\n a.relative = a;\n curLevel.add(a);\n }\n } else if (interval.r >= interval.relative.r) {\n if (interval.l <= interval.m && interval.relative.l <= interval.relative.m) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n Interval b = newInterval(buffer, interval.relative.l, interval.relative.m);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n if (interval.m < interval.r && interval.relative.m < interval.relative.r) {\n Interval a = newInterval(buffer, interval.m + 1, interval.r);\n Interval b = newInterval(buffer, interval.relative.m + 1, interval.relative.r);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n }\n }\n }\n\n for (Interval interval : lastLevel) {\n buffer.release(interval);\n }\n\n List<Interval> tmp = curLevel;\n curLevel = lastLevel;\n lastLevel = tmp;\n }\n\n return mask;\n }",
"public int moveCount(int[][] boards, int i, int j, int k){\n if (i < 0 || i >= boards.length || j < 0 || j >= boards[0].length\n || getDigitSum(i) + getDigitSum(j) > k || boards[i][j] == 1) return 0;\n int temp = boards[i][j];\n boards[i][j] = 1;\n visitd[i][j] = true;\n int res = 1 + moveCount(boards, i + 1, j, k) +\n moveCount(boards, i - 1, j, k) +\n moveCount(boards, i, j + 1, k) +\n moveCount(boards, i, j - 1, k);\n // boards[i][j] = temp; 无须恢复现场因为是一次调用,他的调用结果无须给下一次循环做准备\n return res;\n }",
"public void rotate(int [] a, int k)\n\t{\n\t\tif (a == null || k == 0)\n\t\t\treturn;\n\n\t\tint [] b = new int[a.length];\n\t\tfor (int i = 0; i < a.length; i++)\n\t\t{\n\t\t\tint jump = (i + k) % a.length;\n\t\t\tb[jump] = a[i];\n\t\t}\n\t\tfor (int i = 0; i <a.length;i++)\n\t\t{\n\t\t\ta[i] = b[i];\n\t\t}\n\t}",
"public void rotateReverse(int[] nums, int k){\n int n = nums.length;\n \n //in case k is greater than the length\n k = k % n;\n \n reverse(nums, 0, n-1);\n reverse(nums, 0, k-1);\n reverse(nums, k, n-1);\n }",
"public void rotate(int[] nums, int k) {\n int[] tmp = new int[nums.length];\n for (int i = 0; i < nums.length; ++i) {\n tmp[(i + k) % nums.length] = nums[i];\n }\n\n for (int i = 0; i < nums.length; ++i) {\n nums[i] = tmp[i];\n }\n }",
"public List<Location> cheapestKDaysDestinationByActivity(String activity, int k) {\n\t\tList<Location> locs = locations.values().parallelStream()\n\t\t\t\t.filter(location->location.containsActivity(activity)).collect(Collectors.toList());\n\t\t\n\t\tCollections.sort(locs, new Comparator<Location>() {\n\t\t\tpublic int compare(Location l1, Location l2) {\n\t\t\t\treturn (int) l2.totalCostForKDays(k) -\n\t\t\t\t\t\t(int) l1.totalCostForKDays(k);\n\t\t\t}\n\t\t});\n\t\t\n\t\tlocs.sort((Location l1, Location l2)->(int) l1.totalCostForKDays(k) - (int) l2.totalCostForKDays(k));\n\t\t\n\t\tList<Location> ret = new ArrayList<Location>();\n\t\tret.add(locs.get(0));\n\t\t\n\t\tFloat minCost = locs.get(0).totalCostForKDays(k);\n\t\tfor (int i = 1; i < locs.size(); i++) {\n\t\t\tif (locs.get(i).totalCostForKDays(k) == minCost) {\n\t\t\t\tret.add(locs.get(i));\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ret;\n\t}",
"private boolean moveUP() {\r\n\t\tint i,j,k;\r\n\t\tboolean flag = false;\r\n\t\tfor(i = 0 ; i < rows_size; i++) {\r\n\t\t\tfor( j = 0; j < columns_size; j++) {\r\n\t\t\t\tif( !isEmpty(i,j) ) {\r\n\t\t\t\t\tfor(k = i; k >= 0 && isEmpty(k-1,j); k--);\r\n\t\t\t\t\t\tif(k == 0) {\r\n\t\t\t\t\t\t\tif(k != i) {\r\n\t\t\t\t\t\t\tgame[k][j] = new Cell2048(game[i][j]);\r\n\t\t\t\t\t\t\tgame[i][j].setValue(0);\r\n\t\t\t\t\t\t\tflag = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif(game[i][j].isEqual(game[k-1][j]) && game[k-1][j].getFlag() == false) {\r\n\t\t\t\t\t\t\t\tgame[k-1][j].setValue(game[k-1][j].getValue()*2);\r\n\t\t\t\t\t\t\t\tgame[k-1][j].setFlag(true);\r\n\t\t\t\t\t\t\t\tgame[i][j].setValue(0);\r\n\t\t\t\t\t\t\t\tscore += game[k-1][j].getValue();\r\n\t\t\t\t\t\t\t\t--takenCells;\r\n\t\t\t\t\t\t\t\t++freeCells;\r\n\t\t\t\t\t\t\t\tflag = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tif(k != i) {\r\n\t\t\t\t\t\t\t\tgame[k][j] = new Cell2048 (game[i][j]);\r\n\t\t\t\t\t\t\t\tgame[i][j].setValue(0);\r\n\t\t\t\t\t\t\t\tflag = true;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\tFalseFlag();\r\n\t\treturn flag;\r\n\t}",
"public Node floor(K k){\n int floorRank = rank(k);\n Node res = select(floorRank);\n if(res.k.compareTo(k)>0) floorRank = floorRank - 1;\n return select(floorRank);\n }",
"void scheduleNextDestination(Passenger passenger, Floor currentFloor);",
"private void sink(int k) {\n int smallerKid = smallerChild(k);\n if (aHeap.get(smallerKid).compareTo(aHeap.get(k)) < 0) {\n swap(k, smallerKid);\n sink(smallerKid);\n }\n }",
"public boolean updateElevator() { \n \t//If no people are waiting, do nothing\n if (queue.isEmpty()){\n \t\treturn true;\n \t}\n \n //Update total wait time\n for (int i = 0; i < queue.size(); i++) {\n if (queue.get(i).getActionType() == ElevatorAction.PICKUP) {\n totalWaitTime = totalWaitTime.add(BigInteger.ONE);\n queue.get(i).getPassenger().tempwT += 1;\n }\n }\n \n //Update total travel time\n totalTravelTime = totalTravelTime.add(BigInteger.valueOf((long)currentPassengers.size()));\n for (int i = 0; i < currentPassengers.size(); i++) {\n currentPassengers.get(i).temptT += 1;\n }\n \n //Passengers boarding, no movement\n if (waitingTime > 0) {\n waitingTime -= 1;\n return true;\n }\n \n ElevatorQueueObject q = queue.getFirst();\n \n //If the elevator is full, fetch the next passenger who can disembark successfully\n int index = 1;\n while (currentPassengers.size() == specs.getCarryCapacity() \n && (q.getActionType() == ElevatorAction.PICKUP ||\n !currentPassengers.contains(q.getPassenger()))) {\n q = queue.get(index);\n index += 1;\n }\n \n //Fetch next destination\n int dest = 0;\n if (q.getActionType() == ElevatorAction.PICKUP) {\n dest = q.getPassenger().getOrigin();\n } else {\n dest = q.getPassenger().getDestination();\n }\n \n //Check destination is valid\n if (!containsFloor(floors, dest)) {\n return false;\n }\n \n //Update Elevator Position\n float tempFloor = currentFloor;\n float newFloor = currentFloor;\n \n if (dest > currentFloor) { //Going up\n newFloor += (specs.getCarSpeed() / distancePerFloor);\n if (dest <= newFloor) { //Reached destination\n currentFloor = dest;\n //Set waiting time for embarking/disembarking\n waitingTime = specs.getFloorDelay();\n } else {\n currentFloor = newFloor;\n }\n } else if (dest < currentFloor) { //Going down\n newFloor -= (specs.getCarSpeed() / distancePerFloor);\n if (dest >= newFloor) { //Reached destination?\n currentFloor = dest;\n //Set waiting time for embarking/disembarking\n waitingTime = specs.getFloorDelay();\n } else {\n currentFloor = newFloor;\n }\n }\n\n //Update travel distance \n totalTravelDistance = totalTravelDistance.add(\n BigDecimal.valueOf(Math.abs(tempFloor - currentFloor) * distancePerFloor)\n );\n \n //Everything okay\n return true;\n }",
"public void boardPassenger(int floor){\n _passengersOnboard +=1;\n switch(floor){\n case 1: Floor.FIRST.makeDestinationRequest();\n Floor.FIRST.addQueuedPassenger();\n break;\n case 2: Floor.SECOND.makeDestinationRequest();\n Floor.SECOND.addQueuedPassenger();\n break;\n case 3: Floor.THIRD.makeDestinationRequest();\n Floor.THIRD.addQueuedPassenger();\n break;\n case 4: Floor.FOURTH.makeDestinationRequest();\n Floor.FOURTH.addQueuedPassenger();\n break;\n case 5: Floor.FIFTH.makeDestinationRequest();\n Floor.FIFTH.addQueuedPassenger();\n break;\n case 6: Floor.SIXTH.makeDestinationRequest();\n Floor.SIXTH.addQueuedPassenger();\n break;\n case 7: Floor.SEVENTH.makeDestinationRequest();\n Floor.SEVENTH.addQueuedPassenger();\n break;\n }\n }",
"private void BreakDown(int towerFrom, int towerTo, int bottomSize) {\n\n\t\tint notTowerTo = getOtherTower(towerFrom,towerTo);\n\n\t\twhile(towerSet.TopBlock(towerFrom) <= bottomSize) {\n\t\t\tint isOddBlock = (bottomSize - towerSet.TopBlock(towerFrom))%2;\n\t\t\tif(isOddBlock==1) {\n\t\t\t\tif(towerSet.TopBlock(towerFrom) < towerSet.TopBlock(notTowerTo)) {\n\t\t\t\t\ttowerSet.MoveBlock(towerFrom,notTowerTo);\n\t\t\t\t\tturnNumber++;\n\t\t\t\t\tSystem.out.println(this.toString());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.BuildUp(towerTo, towerFrom, towerSet.TopBlock(towerFrom)-1);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(towerSet.TopBlock(towerFrom) < towerSet.TopBlock(towerTo)) {\n\t\t\t\t\ttowerSet.MoveBlock(towerFrom,towerTo);\n\t\t\t\t\tturnNumber++;\n\t\t\t\t\tSystem.out.println(this.toString());\n\t\t\t\t}\t\n\t\t\t\telse {\n\t\t\t\t\tthis.BuildUp(notTowerTo, towerFrom, towerSet.TopBlock(towerFrom)-1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) {\n Scanner sc =new Scanner(System.in);\r\n \r\n System.out.println(\"Enter number of testcases\");\r\n \r\n int n=sc.nextInt();\r\n for(int i=0;i<6;i++){\r\n System.out.println(\"Initialize the \" + (i+1) + \" lift position.\");\r\n arr[i]=sc.nextInt();\r\n }\r\n \r\n while(n!=0){\r\n System.out.println(\"Enter your floor number\");\r\n int req=sc.nextInt(); \r\n nearestLift(req);\r\n n--;\r\n }\r\n }",
"protected void levelUp() {\n\t\tlevel++;\n\t\t// set up floors for next level\n\t\tint[] nextFloors = floors[level];\n\t\tint[] nextFurnishing = furnishings[level];\n\t\tfor(int i = 0; i < nextFloors.length; i++) {\n\t\t\tFloor newFloor = game.getFloorByKey(nextFloors[i]);\n\t\t\ttiles[i].setFloor(newFloor);\n\t\t\tif(nextFurnishing[i] != 0) {\n\t\t\t\tFurnishingDirectory newFurn = game.getFurnishingByKey(nextFurnishing[i]);\n\t\t\t\tnew Furnishing(newFurn, tiles[i]);\n\t\t\t}\n\t\t}\n\t}",
"public static void printKLevelsDown(Node node, int k){\n Queue<Node> q = new ArrayDeque<>();\n q.add(node);\n if( k == 0)\n {\n System.out.println(node.data);\n }\n \n \n \n else{\n while(k>0)\n {\n Queue<Node> qc = new ArrayDeque<>();\n \n \n while( q.size() > 0)\n {\n node = q.element();\n if(node.left != null)\n {\n qc.add(node.left);\n }\n if(node.right != null)\n {\n qc.add(node.right);\n }\n q.remove();\n }\n \n q = qc;\n k--;\n }\n while( q.size() > 0)\n {\n node = q.remove();\n System.out.println(node.data);\n }\n }\n }",
"@Override\n\tprotected boolean checkFeasible(int r, int c, int v, int k, int dept) {\n\t\tboolean ok = super.checkFeasible(r, c, v, k, dept);\n\t\tif(!ok) return false;\n\t\t\n\t\tJuryInfo J = jury.get(r);\n\t\t\n\t\tfor(int rid = 1; rid <= rooms.size(); rid++) if(rid != v){\n\t\t\tint[] p = J.getJuryMemberIDs();\n\t\t\tfor(int j = 0; j < p.length; j++){\n\t\t\t\t\n\t\t\t\tif(p[j] > 0){\n\t\t\t\t\t//System.out.println(\"PartitionJuriesToRoomsTeacherNotMove::checkFeasible(\" + r + \",\" + c + \n\t\t\t\t\t\t\t\t//\",\" + v + \", occTeacherRoom[\" + rid + \"].get(\" + p[j] + \") = \" + occTeacherRoom[rid].get(p[j]));\n\t\t\t\t\tif(occTeacherRoom[rid].get(p[j]) > 0) return false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t// check if the number of hust, nonHust assigned to room v exceed the upperbound\n\t\tint var_idx = 7*r+c;\n\t\tint nbHust = 0;\n\t\tint nbNonHust = 0;\n\t\tfor(int p = 0; p < 5; p++){\n\t\t\tif(x[r*7+p] > 0){\n\t\t\t\tint tid = x[r*7+p];\n\t\t\t\tif(p == 0 || p == 4){\n\t\t\t\t\tif(!nonHustOfRoom[v].contains(tid)) nbNonHust++;\n\t\t\t\t}else{\n\t\t\t\t\tif(!hustOfRoom[v].contains(tid)) nbHust++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(hustOfRoom[v].size() + nbHust > maxHustOfRoom.get(v)) ok = false;\n\t\t//if(!ok && k >= dept) System.out.println(\"TRY(\" + k + \"), var_idx = \" + var_idx + \", r = \" + r + \", c = \" + c + \", v = \" + v + \n\t\t\t\t//\", FALSE hustOfRoom[\" + v + \"].sz = \" + hustOfRoom[v].size() + \", nbHust = \" + nbHust);\n\t\tif(nonHustOfRoom[v].size() + nbNonHust > maxNonHustOfRoom.get(v)) ok = false;\n\t\t//if(!ok && k >= dept) System.out.println(\"TRY(\" + k + \"), var_idx = \" + var_idx + \", r = \" + r + \", c = \" + c + \", v = \" + v + \n\t\t\t\t//\", FALSE nonHustOfRoom[\" + v + \"].sz = \" + nonHustOfRoom[v].size() + \", nbNonHust = \" + nbNonHust);\n\t\t\n\t\treturn ok;\n\t}",
"private void moveSnake()\r\n\r\n\t{\r\n\r\n\t\t//Get the lower & upper limit for the last row of the board. \r\n\t\t// e.g. for a 20x20 board, these values would be 380 & 400 respectively\r\n\t\tint lowerLimitOfLastRow = numOfBoardRows*numOfBoardCols-numOfBoardCols;\r\n\t\tint upperLimitOfLastRow = numOfBoardRows*numOfBoardCols;\r\n\r\n\t\t//Loop through all snakes to update their location\r\n\t\tfor(Snake s: snakes)\r\n\t\t{\r\n\t\t\t//Do nothing if snake is not alive\r\n\t\t\tif(!s.isSnakeAlive())\r\n\t\t\t\tcontinue;\r\n\t\t\t//Move the snake number of cells depending on its current speed. i.e. \r\n\t\t\t// snake with minimum/default speed will move only one cell while with maximum speed will move 4 cells during the same time. \r\n\t\t\tfor(int i=s.getSnakeSpeed().getValue(); i<= SnakeSpeed.DEFAULT.getValue(); i=i*2)\r\n\t\t\t{\r\n\t\t\t\tint lastCellLocation = -1;\r\n\t\t\t\tSnakeDirection sd = s.getSnakeDirection();\r\n\t\t\t\tArrayList<Integer> scells = s.getSnakeCells();\r\n\r\n\t\t\t\tif(s.getSnakeIndex() == snakeIndex)\r\n\t\t\t\t{\r\n\t\t\t\t\tlastCellLocation = scells.get(scells.size()-1);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t//Move the cells forward except the first one\r\n\t\t\t\tfor(int j=scells.size()-1;j>0;j--)\r\n\t\t\t\t{\r\n\t\t\t\t\tscells.set(j, scells.get(j-1)); \r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Update the first cell based on the current direction of the snake\r\n\t\t\t\tif(sd == SnakeDirection.DOWN)\r\n\t\t\t\t{\r\n\t\t\t\t\t//Set the value of first cell as the cell in the same column but first row when the current cell is in the last row \r\n\t\t\t\t\tif(scells.get(0) >= lowerLimitOfLastRow && scells.get(0) < upperLimitOfLastRow)\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) - lowerLimitOfLastRow);\r\n\t\t\t\t\t//Else, Set the value of first cell as the cell under the current cell in the next row \r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) + numOfBoardCols);\r\n\t\t\t\t}\r\n\t\t\t\telse if(sd == SnakeDirection.UP)\r\n\t\t\t\t{\r\n\t\t\t\t\t//Set the value of first cell as the cell in the same column but last row when the current cell is in the first row \r\n\t\t\t\t\tif(scells.get(0) >= 0 && scells.get(0) < numOfBoardCols)\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) + lowerLimitOfLastRow);\r\n\t\t\t\t\t//Else, Set the value of first cell as the cell above the current cell in the next row \r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) - numOfBoardCols);\r\n\t\t\t\t}\r\n\t\t\t\telse if(sd == SnakeDirection.RIGHT)\r\n\t\t\t\t{\r\n\t\t\t\t\t//Set the value of first cell as the current cell value minus the number of columns when the current cell is in the last column \r\n\t\t\t\t\tif(scells.get(0)%numOfBoardCols == numOfBoardCols - 1)\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) - (numOfBoardCols - 1));\r\n\t\t\t\t\t//Else, Set the value of first cell as the current value incremented by one \r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) + 1);\r\n\t\t\t\t}\r\n\t\t\t\telse if(sd == SnakeDirection.LEFT)\r\n\t\t\t\t{\r\n\t\t\t\t\t//Set the value of first cell as the current cell value plus the number of columns when the current cell is in the first column \r\n\t\t\t\t\tif(scells.get(0)%numOfBoardCols == 0)\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) + numOfBoardCols -1);\r\n\t\t\t\t\t//Else, Set the value of first cell as the current value decremented by one \r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) - 1);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t//Update snake length & food cells if its the current player's snake and there's a food item at the same location as snake's head\r\n\t\t\t\tif(s.getSnakeIndex() == snakeIndex) \r\n\t\t\t\t{\r\n\t\t\t\t\tif(foodCells.contains(scells.get(0)))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tscells.add(lastCellLocation);\r\n\t\t\t\t\t\tfoodCells.remove(scells.get(0));\r\n\t\t\t\t\t} \r\n\t\t\t\t}\r\n\t\t\t\ts.setSnakeCells(scells);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\t//refresh the board to send/receive latest snakeProtocol object between client/server and also update the board\r\n\t\trefreshBoard();\r\n\t}",
"public void enemymoveGarret(){\n\t\tint YEG = 0;\n\t\tint XEG = 0;\n\t\tint[] turns = new int[]{0,0,0,0,0,2,1,1,1,1,1,3};//dependign on the placement garret will move a certain way\n\t\tfor(int i = 0 ; i < this.Garret.length;i++){//this grabs garrets current locations\n\t\t\tfor(int p = 0; p < this.Garret.length;p++){\n\t\t\t\tif(this.Garret[i][p] == 1){\n\t\t\t\t\tYEG = i;\n\t\t\t\t\tXEG = p;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tint move = turns[count];\n\t\tswitch(move){//first block is up and down second block is left and right\n\t\t\tcase 0:\n\t\t\t\tif(this.area[YEG][XEG-1] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG][XEG-1] = 1;//to turn left\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tif(this.area[YEG][XEG+1] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG][XEG+1] = 1;//to turn right\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tif(this.area[YEG-1][XEG] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG-1][XEG] = 1;//to turn up\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tif(this.area[YEG+1][XEG] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG+1][XEG] = 1;//to turn down\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}//end of switch\t\n\t}",
"public void nextRound() {\n\n k += 1;\n\n BigInteger[] arr2 = new BigInteger[arr.length];\n int j = 0;\n for(int i = 0; i < arr.length; i++) {\n if(arr[i] == null)\n continue;\n\n arr2[j++] = arr[i].shiftLeft(1);\n arr2[j++] = arr[i].shiftLeft(1).setBit(0);\n\n }\n // We should have exactly arr.length places filled (no nulls left!)\n assert(j == arr.length) : \"Backing array not completely filled in!\";\n arr = arr2;\n\n }",
"public static void makeEnemyMove() { //all players after index 1 are enemies\n if (gameMode == EARTH_INVADERS) {//find leftmost and rightmost vehicle columns to see if we need to move down\n int leftMost = board[0].length;\n int rightMost = 0;\n int lowest = 0;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {//find left-most, right-most and lowest most vehicles (non aircraft/train) to determine how formation should move\n Player curr = players[i];\n if (curr == null)\n continue;\n String name = curr.getName();\n if (name.equals(\"NONE\") || curr.isFlying() || name.startsWith(\"TRAIN\") || (curr instanceof Monster))\n continue;\n if (curr.getCol() < leftMost)\n leftMost = curr.getCol();\n if (curr.getCol() > rightMost)\n rightMost = curr.getCol();\n if (curr.getRow() > lowest)\n lowest = curr.getRow();\n curr.setHeadDirection(DOWN);\n }\n for (int i = FIRST_VEHICLE; i < players.length; i++) {//***move aircraft and trains\n Player curr = players[i];\n if (curr == null)\n continue;\n String name = curr.getName();\n if (name.equals(\"NONE\") || curr.isFlying() || name.startsWith(\"TRAIN\") || (curr instanceof Monster)) {\n if (curr.isMoving())\n continue;\n ArrayList<Integer> dirs = new ArrayList(); //array of preferred directions - everything but the reverse of their body position\n int bodyDir = curr.getBodyDirection();\n curr.clearDirections();\n int r = curr.getRow();\n int c = curr.getCol();\n if (bodyDir == UP) {\n if (isValidMove(curr, r - 1, c))\n dirs.add(UP);\n if (isValidMove(curr, r, c + 1))\n dirs.add(RIGHT);\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c - 1))\n dirs.add(LEFT);\n }\n } else if (bodyDir == RIGHT) {\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r - 1, c))\n dirs.add(UP);\n }\n if (isValidMove(curr, r, c + 1))\n dirs.add(RIGHT);\n if (isValidMove(curr, r + 1, c))\n dirs.add(DOWN);\n } else if (bodyDir == DOWN) {\n if (isValidMove(curr, r + 1, c))\n dirs.add(DOWN);\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c + 1))\n dirs.add(RIGHT);\n }\n if (isValidMove(curr, r, c - 1))\n dirs.add(LEFT);\n } else //if(curr.getBodyDirection()==LEFT)\n {\n if (isValidMove(curr, r - 1, c))\n dirs.add(UP);\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r + 1, c))\n dirs.add(DOWN);\n }\n if (isValidMove(curr, r, c - 1))\n dirs.add(LEFT);\n }\n int rand = 0;\n if (dirs.size() > 0)\n rand = dirs.get((int) (Math.random() * dirs.size()));\n if (curr.isFlying()) { //if aircraft is flying in the visible board, don't change direction\n if (r == 1 && (c == 0 || c == board[0].length - 1)) //we are in the first row but behind a border\n { //we only want aircraft to appear in row 1 in EARTH INVADERS (like the UFO in space invaders)\n if (bodyDir == LEFT || bodyDir == RIGHT) {\n rand = UP;\n if (Math.random() < .5)\n rand = DOWN;\n } else if (c == 0)\n rand = RIGHT;\n else if (c == board[0].length - 1)\n rand = LEFT;\n else\n //if(dirs.contains(bodyDir))\n rand = bodyDir;\n } else if (r == 0 || c == 0 || r == board.length - 1 || c == board[0].length - 1) {\n rand = bodyDir;\n if (r == 0 && c == 0) {\n rand = RIGHT;\n if (Math.random() < .5)\n rand = DOWN;\n } else if (r == 0 && c == board[0].length - 1) {\n rand = LEFT;\n if (Math.random() < .5)\n rand = DOWN;\n } else if (r == board.length - 1 && c == 0) {\n rand = RIGHT;\n if (Math.random() < .5)\n rand = UP;\n } else if (r == board.length - 1 && c == board[0].length - 1) {\n rand = LEFT;\n if (Math.random() < .5)\n rand = UP;\n }\n } else if (/*dirs.contains(bodyDir) && */(r > 0 && c > 0 && r < board.length - 1 && c < board[0].length - 1))\n rand = bodyDir; //make it so aircraft prefer to keep going the same direciton\n\n } else if (name.startsWith(\"TRAIN\")) {//make it so trains prefer to follow the right wall\n for (int j = 0; j < dirs.size(); j++)\n if (dirs.get(j) != bodyDir) {\n rand = dirs.get(j);\n break;\n }\n }\n curr.setDirection(rand);\n curr.setBodyDirection(rand);\n }\n }//***end aircraft/train movement\n if (leftMost == 1) //move vehicles down and start them moving right\n {\n if (EI_moving == LEFT) {\n EI_moving = DOWN;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (lowest < board.length - 3 && !curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setRow(curr.getRow() + 1);\n }\n } else if (EI_moving == DOWN) {\n EI_moving = RIGHT;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\")) {\n curr.setDirection(RIGHT);\n curr.setBodyDirection(RIGHT);\n }\n }\n } else if (EI_moving == RIGHT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(RIGHT);\n }\n }//***end leftmost is first col\n else if (rightMost == board[0].length - 2) //move vehicles down and start them moving left\n {\n if (EI_moving == RIGHT) {\n EI_moving = DOWN;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (lowest < board.length - 3 && !curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setRow(curr.getRow() + 1);\n }\n } else if (EI_moving == DOWN) {\n EI_moving = LEFT;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\")) {\n curr.setDirection(LEFT);\n curr.setBodyDirection(LEFT);\n }\n }\n } else if (EI_moving == LEFT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(LEFT);\n }\n }//***end rightmost is last col\n else if (EI_moving == LEFT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(LEFT);\n }\n else if (EI_moving == RIGHT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(RIGHT);\n }\n return;\n }//***end EARTH INVADERS enemy movements\n for (int i = 2; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n String name = curr.getName();\n int r = curr.getRow();\n int c = curr.getCol();\n if (r > 0 && c > 0 && r < board.length - 1 && c < board[0].length - 1 && (curr instanceof Vehicle))\n ((Vehicle) (curr)).setOnField(true);\n\n if (curr.isFlying() && webs[panel].size() > 0) {\n int x = curr.findX(cellSize);\n int y = curr.findY(cellSize);\n for (int p = 0; p < webs[panel].size(); p++) {\n int[] ray = webs[panel].get(p);\n if (Utilities.isPointOnRay(x, y, ray[0], ray[1], ray[2], ray[3])) {\n explosions.add(new Explosion(\"BIG\", x, y, explosionImages, animation_delay));\n Ordinance.radiusDamage(-1, x, y, 25, panel, .5);\n Spawner.resetEnemy(i);\n webs[panel].remove(p);\n p--;\n Structure str1 = structures[ray[4]][ray[5]][panel];\n Structure str2 = structures[ray[6]][ray[7]][panel];\n if (str1 != null)\n str1.setWebValue(0);\n if (str2 != null)\n str2.setWebValue(0);\n Utilities.updateKillStats(curr);\n break;\n }\n }\n }\n //reset any ground vehicle that ended up in the water\n //reset any train not on tracks - we need this because a player might change panels as a vehicle spawns\n if (name.startsWith(\"TRAIN\")) {\n Structure str = structures[r][c][panel];\n if (str != null && str.getName().equals(\"hole\") && str.getHealth() != 0) {\n explosions.add(new Explosion(\"BIG\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Utilities.updateKillStats(curr);\n Spawner.resetEnemy(i);\n continue;\n } else if (board[r][c][panel].startsWith(\"~\")) {\n explosions.add(new Explosion(\"BIG\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n } else if (!board[r][c][panel].startsWith(\"T\")) {\n explosions.add(new Explosion(\"SMALL\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n }\n } else //ground vehicles\n if (!curr.isFlying() && !curr.getName().startsWith(\"BOAT\") && (curr instanceof Vehicle)) {\n\n if (((Vehicle) (curr)).getStunTime() > numFrames) //ground unit might be stunned by WoeMantis shriek\n continue;\n if (board[r][c][panel].startsWith(\"~\")) {\n explosions.add(new Explosion(\"SMALL\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n }\n } else //reset any water vehicle that ended up on land\n if (name.startsWith(\"BOAT\")) {\n if (!board[r][c][panel].startsWith(\"~\")) {\n explosions.add(new Explosion(\"SMALL\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n }\n } else if (curr.getHealth() <= 0) {\n Spawner.resetEnemy(i);\n continue;\n }\n\n //if a ground unit has been on the playable field and leaves it, respawn them\n if (!curr.isFlying() && !name.startsWith(\"TRAIN\") && (curr instanceof Vehicle)) {\n if ((r == 0 || c == 0 || r == board.length - 1 || c == board[0].length - 1) && ((Vehicle) (curr)).getOnField()) {\n ((Vehicle) (curr)).setOnField(false);\n Spawner.resetEnemy(i);\n continue;\n }\n }\n if (name.endsWith(\"nukebomber\")) {//for the nukebomber, set the detonation coordinates so nuke fires when the plane exits the field\n int dr = curr.getDetRow();\n int dc = curr.getDetCol();\n int bd = curr.getBodyDirection();\n int dd = curr.getDetDir();\n if (bd == dd && (((bd == LEFT || bd == RIGHT) && c == dc) || (bd == UP || bd == DOWN) && r == dr)) {\n Ordinance.nuke();\n curr.setDetRow(-1);\n curr.setDetCol(-1);\n }\n }\n\n if (curr.isMoving())\n continue;\n int bodyDir = curr.getBodyDirection();\n curr.clearDirections();\n int[] target = isMonsterInSight(curr);\n int mDir = target[0]; //direction of the monster, -1 if none\n int monsterIndex = target[1]; //index of the monster in the players array, -1 if none\n ArrayList<Integer> dirs = new ArrayList(); //array of preferred directions - everything but the reverse of their body position\n if (bodyDir == UP) {\n if (isValidMove(curr, r - 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == UP) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(UP);\n }\n if (isValidMove(curr, r, c + 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == RIGHT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(RIGHT);\n }\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c - 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == LEFT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(LEFT);\n }\n }\n } else if (bodyDir == RIGHT) {\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r - 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == UP) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(UP);\n }\n }\n if (isValidMove(curr, r, c + 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == RIGHT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(RIGHT);\n }\n if (isValidMove(curr, r + 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == DOWN) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(DOWN);\n }\n } else if (bodyDir == DOWN) {\n if (isValidMove(curr, r + 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == DOWN) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(DOWN);\n }\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c + 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == RIGHT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(RIGHT);\n }\n }\n if (isValidMove(curr, r, c - 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == LEFT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(LEFT);\n }\n } else //if(curr.getBodyDirection()==LEFT)\n {\n\n if (isValidMove(curr, r - 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == UP) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(UP);\n }\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r + 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == DOWN) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(DOWN);\n }\n }\n if (isValidMove(curr, r, c - 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == LEFT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(LEFT);\n }\n }\n\n if (dirs.size() > 0) {\n if (curr instanceof Monster) {//***MONSTER AI*******************\n double headTurnProb = 0.25;\n double stompProb = 0.5;\n int vDir = isVehicleInSight(curr);\n if (vDir >= 0) {\n boolean airShot = false;\n int vD = vDir;\n if (vD >= 10) {\n airShot = true;\n vD -= 10;\n }\n if (curr.head360() || !Utilities.oppositeDirections(vD, curr.getHeadDirection())) {\n curr.setHeadDirection(vD);\n if ((curr.getName().startsWith(\"Gob\") || curr.getName().startsWith(\"Boo\")) && numFrames >= curr.getLastShotTime() + curr.getReloadTime()) {\n Bullet temp = null;\n if (curr.getName().startsWith(\"Boo\")) {\n temp = new Bullet(curr.getName() + vD, curr.getX(), curr.getY(), 50, beamImages, SPEED, \"BEAM\", SPEED * 10, airShot, i, -1, -1);\n } else if (curr.getName().startsWith(\"Gob\")) {\n temp = new Bullet(\"flame\" + vD, curr.getX(), curr.getY(), 15, monsterFireImages, SPEED, \"FIRE\", SPEED * 4, airShot, i, -1, -1);\n }\n if (temp != null) {\n temp.setDirection(vD);\n bullets.add(temp);\n curr.setLastShotTime(numFrames);\n continue;\n }\n }\n }\n } else if (Math.random() < headTurnProb) {\n String hd = \"right\";\n if (Math.random() < .5)\n hd = \"left\";\n Utilities.turnHead(curr, hd);\n }\n Structure str = structures[r][c][panel];\n if (str != null && str.getHealth() > 0 && str.isDestroyable() && !str.getName().startsWith(\"FUEL\") && Math.random() < stompProb)\n playerMove(KeyEvent.VK_SPACE, i);\n else {\n int dir = dirs.get((int) (Math.random() * dirs.size()));\n if (dir == UP) {\n if (curr.getBodyDirection() != UP) {\n curr.setBodyDirection(UP);\n curr.setHeadDirection(UP);\n } else {\n if (!curr.isSwimmer() && board[r - 1][c][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (r - 1 >= 1) {\n str = structures[r - 1][c][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_UP, i);\n }\n } else if (dir == DOWN) {\n if (curr.getBodyDirection() != DOWN) {\n curr.setBodyDirection(DOWN);\n curr.setHeadDirection(DOWN);\n } else {\n if (!curr.isSwimmer() && board[r + 1][c][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (r + 1 <= structures.length - 1) {\n str = structures[r + 1][c][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_DOWN, i);\n }\n } else if (dir == LEFT) {\n if (curr.getBodyDirection() != LEFT) {\n curr.setBodyDirection(LEFT);\n curr.setHeadDirection(LEFT);\n } else {\n if (!curr.isSwimmer() && board[r][c - 1][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (c - 1 >= 1) {\n str = structures[r][c - 1][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_LEFT, i);\n }\n } else if (dir == RIGHT) {\n if (curr.getBodyDirection() != RIGHT) {\n curr.setBodyDirection(RIGHT);\n curr.setHeadDirection(RIGHT);\n } else {\n if (!curr.isSwimmer() && board[r][c + 1][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (c + 1 <= board[0].length - 1) {\n str = structures[r][c + 1][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_RIGHT, i);\n }\n }\n }\n continue;\n }//end monster AI movement\n else //shoot at a target\n if (name.endsWith(\"troops\") || name.endsWith(\"jeep\") || name.endsWith(\"police\") || name.startsWith(\"TANK\") || name.endsWith(\"coastguard\") || name.endsWith(\"destroyer\") || name.endsWith(\"fighter\") || name.equals(\"AIR bomber\")) {\n boolean airShot = false;\n if (gameMode == EARTH_INVADERS) //we don't want vehicles to shoot each other\n {\n airShot = true;\n curr.setHeadDirection(DOWN);\n }\n if (monsterIndex >= 0 && monsterIndex < players.length && players[monsterIndex].isFlying())\n airShot = true;\n if (curr.getName().endsWith(\"fighter\"))\n curr.setDirection(bodyDir); //keep moving while shooting\n if (mDir != -1 && curr.getRow() > 0 && curr.getCol() > 0 && curr.getRow() < board.length - 1 && curr.getCol() < board[0].length - 1) { //don't shoot from off the visible board\n if ((mDir == bodyDir || ((curr.getName().startsWith(\"TANK\") || curr.getName().endsWith(\"jeep\") || name.equals(\"AIR bomber\")) && (mDir == curr.getHeadDirection() || name.equals(\"AIR bomber\")))) && numFrames >= curr.getLastShotTime() + curr.getReloadTime()) { //AIR bomber needs to be able to drop bombs if they see the monster in front of them or behind them, so we need to check the name in two conditions\n Bullet temp;\n if (name.endsWith(\"jeep\") || name.endsWith(\"coastguard\")) {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 65, (int) (Math.random() * 10) + 30);\n temp = new Bullet(\"jeep\" + mDir, curr.getX(), curr.getY(), 5, machBulletImages, SPEED, \"BULLET\", SPEED * 6, airShot, i, -1, -1);\n } else if (name.endsWith(\"troops\") || name.endsWith(\"police\")) {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 70, (int) (Math.random() * 10) + 20);\n temp = new Bullet(\"troops\" + mDir, curr.getX(), curr.getY(), 3, bulletImages, SPEED, \"BULLET\", SPEED * 6, airShot, i, -1, -1);\n } else if (name.endsWith(\"destroyer\") || name.endsWith(\"artillery\")) {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 45, (int) (Math.random() * 10) + 85);\n temp = new Bullet(\"destroyer\" + mDir, curr.getX(), curr.getY(), 15, shellImages, SPEED, \"SHELL\", SPEED * 3, true, i, players[monsterIndex].findX(cellSize), players[monsterIndex].findY(cellSize));\n } else if (name.endsWith(\"fighter\")) {\n channels[0].programChange(instr[TAIKO].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 10) + 5, (int) (Math.random() * 10) + 40);\n temp = new Bullet(\"fighter\" + mDir, curr.getX(), curr.getY(), 30, rocketImages, SPEED, \"SHELL\", SPEED * 8, true, i, players[monsterIndex].findX(cellSize), players[monsterIndex].findY(cellSize));\n } else if (name.endsWith(\"missile\")) {\n temp = new Bullet(\"missile\" + mDir, curr.getX(), curr.getY(), 50, rocketImages, SPEED, \"SHELL\", SPEED * 3, true, i, players[monsterIndex].findX(cellSize), players[monsterIndex].findY(cellSize));\n channels[0].programChange(instr[TAIKO].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 10) + 5, (int) (Math.random() * 10) + 40);\n } else if (name.endsWith(\"flame\")) {\n temp = new Bullet(\"flame\" + mDir, curr.getX(), curr.getY(), 15, monsterFireImages, SPEED, \"FIRE\", SPEED * 4, airShot, i, -1, -1);\n channels[0].programChange(instr[TAIKO].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 10) + 5, (int) (Math.random() * 10) + 40);\n } else if (name.equals(\"AIR bomber\")) {\n temp = null;\n if (!DISABLE_BOMBERS) {\n int mR = players[PLAYER1].getRow(); //main player row & col\n int mC = players[PLAYER1].getCol();\n int mR2 = -99; //possible 2nd monster row & col\n int mC2 = -99;\n if (p1partner) {\n mR2 = players[PLAYER2].getRow();\n mC2 = players[PLAYER2].getCol();\n }\n if (players[PLAYER1].getHealth() > 0 && (Math.abs(r - mR) <= 2 || Math.abs(c - mC) <= 2 || Math.abs(r - mR2) <= 2 || Math.abs(c - mC2) <= 2)) {//our bomber is in the same row & col as a monster + or - 1\n if (bodyDir == UP && r < board.length - 1) {\n Ordinance.bigExplosion(curr.getX(), curr.getY() + (cellSize * 2), panel);\n Ordinance.radiusDamage(-1, curr.getX(), curr.getY() + (cellSize * 2), 50, panel, .25);\n } else if (bodyDir == DOWN && r > 1) {\n Ordinance.bigExplosion(curr.getX(), curr.getY() - (cellSize * 2), panel);\n Ordinance.radiusDamage(-1, curr.getX(), curr.getY() - (cellSize * 2), 50, panel, .25);\n } else if (bodyDir == RIGHT && c < board[0].length - 1) {\n Ordinance.bigExplosion(curr.getX() - (cellSize * 2), curr.getY(), panel);\n Ordinance.radiusDamage(-1, curr.getX() - (cellSize * 2), curr.getY(), 50, panel, .25);\n } else if (bodyDir == LEFT && c > 1) {\n Ordinance.bigExplosion(curr.getX() + (cellSize * 2), curr.getY(), panel);\n Ordinance.radiusDamage(-1, curr.getX() + (cellSize * 2), curr.getY(), 50, panel, .25);\n }\n }\n }\n } else {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 45, (int) (Math.random() * 10) + 85);\n temp = new Bullet(\"\" + mDir, curr.getX(), curr.getY(), 15, shellImages, SPEED, \"SHELL\", SPEED * 5, airShot, i, -1, -1);\n }\n if (temp != null)\n temp.setDirection(mDir);\n\n if (name.endsWith(\"troops\") || name.endsWith(\"police\") && Math.random() < .5) //make the police move towards the monster half the time\n {\n if (mDir == UP && isValidMove(curr, curr.getRow() - 1, curr.getCol()))\n curr.setDirection(UP);\n else if (mDir == DOWN && isValidMove(curr, curr.getRow() + 1, curr.getCol()))\n curr.setDirection(DOWN);\n else if (mDir == LEFT && isValidMove(curr, curr.getRow(), curr.getCol() - 1))\n curr.setDirection(LEFT);\n else if (mDir == RIGHT && isValidMove(curr, curr.getRow(), curr.getCol() + 1))\n curr.setDirection(RIGHT);\n else\n curr.setDirection(-1);\n }\n if (temp != null && players[PLAYER1].getHealth() > 0) {\n if (gameMode == EARTH_INVADERS && !curr.isFlying()) {\n } else {\n if (numFrames >= ceaseFireTime + ceaseFireDuration || gameMode == EARTH_INVADERS) {\n bullets.add(temp);\n curr.setLastShotTime(numFrames);\n continue;\n }\n }\n }\n } else //change to face the monster to line up a shot\n {\n if (name.endsWith(\"troops\") || name.endsWith(\"police\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.endsWith(\"artillery\")) {\n curr.setDirection(-1); //stop to shoot\n curr.setBodyDirection(mDir);\n } else if (curr.getName().startsWith(\"TANK\") || curr.getName().endsWith(\"jeep\"))\n curr.setHeadDirection(mDir);\n continue;\n }\n }\n }\n int rand = dirs.get((int) (Math.random() * dirs.size()));\n if (curr.isFlying() && (r > 0 && c > 0 && r < board.length - 1 && c < board[0].length - 1)) {\n rand = bodyDir; //make it so aircraft prefer to keep going the same direciton\n } else if (name.startsWith(\"TRAIN\")) {//make it so trains prefer to follow the right wall\n for (int j = 0; j < dirs.size(); j++)\n if (dirs.get(j) != bodyDir) {\n rand = dirs.get(j);\n break;\n }\n }\n curr.setDirection(rand);\n curr.setBodyDirection(rand);\n\n continue;\n }\n //if no preferred direction, include the option to turn around\n //civilians should prefer to turn around rather than approach the monster\n if (name.endsWith(\"civilian\") || name.endsWith(\"bus\")) {\n if (bodyDir == mDir) //if we are facing the same direction as the monster, turn around\n {\n if (bodyDir == UP && isValidMove(curr, curr.getRow() + 1, curr.getCol())) {\n curr.setDirection(DOWN);\n curr.setBodyDirection(DOWN);\n continue;\n } else if (bodyDir == DOWN && isValidMove(curr, curr.getRow() - 1, curr.getCol())) {\n curr.setDirection(UP);\n curr.setBodyDirection(UP);\n continue;\n } else if (bodyDir == LEFT && isValidMove(curr, curr.getRow(), curr.getCol() + 1)) {\n curr.setDirection(RIGHT);\n curr.setBodyDirection(RIGHT);\n continue;\n } else if (bodyDir == RIGHT && isValidMove(curr, curr.getRow(), curr.getCol() - 1)) {\n curr.setDirection(LEFT);\n curr.setBodyDirection(LEFT);\n continue;\n }\n }\n }\n int rand = (int) (Math.random() * 4);\n if (rand == UP && isValidMove(curr, curr.getRow() - 1, curr.getCol())) {\n curr.setDirection(UP);\n curr.setBodyDirection(UP);\n continue;\n }\n if (rand == DOWN && isValidMove(curr, curr.getRow() + 1, curr.getCol())) {\n curr.setDirection(DOWN);\n curr.setBodyDirection(DOWN);\n continue;\n }\n if (rand == LEFT && isValidMove(curr, curr.getRow(), curr.getCol() - 1)) {\n curr.setDirection(LEFT);\n curr.setBodyDirection(LEFT);\n continue;\n }\n if (rand == RIGHT && isValidMove(curr, curr.getRow(), curr.getCol() + 1)) {\n curr.setDirection(RIGHT);\n curr.setBodyDirection(RIGHT);\n continue;\n }\n\n }\n }",
"private void getMoves(ArrayList<Move> moves, int k) {\n for (int i = -1; i <= 1; i += 1) {\n for (int j = -1; j <= 1; j += 1) {\n char nextCol = (char) (col(k) + i);\n char nextRow = (char) (row(k) + j);\n if (validSquare(nextCol, nextRow)) {\n Move rec = Move.move(col(k),\n row(k), nextCol, nextRow);\n if (legalMove(rec)) {\n moves.add(rec);\n }\n }\n }\n }\n }",
"private static int solution( int[] arr, int k) {\n\t\tif ( arr == null || arr.length < k ) {\n\t\t\treturn Integer.MIN_VALUE;\n\t\t}\n\t\t\n\t\tint res = -1;\n\t\t\n\t\treturn res;\n\t\t\n\t}",
"public static void rotateArray(final int[] nums, final int k) {\n final var rot = k % nums.length;\n\n int temp, previous;\n for (int i = 0; i < rot; i++) {\n previous = nums[nums.length - 1];\n for (int j = 0; j < nums.length; j++) {\n temp = nums[j];\n nums[j] = previous;\n previous = temp;\n }\n }\n }",
"public Point[] kClosest(Point[] points, Point origin, int k) {\n globalOrigin = origin;\n Queue<Point> pq = new PriorityQueue<>(k, new Comparator<Point>() {\n @Override\n public int compare(Point p1, Point p2) {\n int diff = getDistance(globalOrigin, p2) - getDistance(globalOrigin, p1);\n if (diff == 0) {\n diff = p2.x - p1.x;\n }\n if (diff == 0) {\n diff = p2.y - p1.y;\n }\n return diff;\n }\n });\n\n for (int i = 0; i < points.length; i++) {\n pq.offer(points[i]);\n if (pq.size() > k) {\n pq.poll();\n }\n }\n int size = pq.size();\n Point[] results = new Point[size];\n for (int j = size - 1; j >= 0; j--) {\n results[j] = pq.poll();\n }\n return results;\n }",
"private static <Key extends Comparable<Key>> void sink(Key[] pq, int k, int n) {\n while(2*k <= n){\n int j = 2*k; //left child index\n if(j < n && less(pq, j, j+1)) j++; // right child is bigger\n if(!less(pq,k,j)) break; // there is no need for more sink\n exch(pq, k, j);\n k = j; // continue down\n }\n }"
] | [
"0.56670624",
"0.5502196",
"0.5493072",
"0.5485768",
"0.54629034",
"0.54601085",
"0.54569376",
"0.5425082",
"0.5379927",
"0.53044313",
"0.52742255",
"0.5252179",
"0.5236943",
"0.5207891",
"0.519288",
"0.5190546",
"0.51818365",
"0.5158599",
"0.5152826",
"0.5146945",
"0.51181877",
"0.5114034",
"0.51083815",
"0.5104534",
"0.5103522",
"0.5049802",
"0.5043438",
"0.50393534",
"0.50392634",
"0.5037113",
"0.5029874",
"0.5021353",
"0.50152105",
"0.5010191",
"0.50099605",
"0.50091666",
"0.5007656",
"0.49993807",
"0.49971393",
"0.4968177",
"0.49593893",
"0.49591509",
"0.49531925",
"0.49442255",
"0.49406666",
"0.49322084",
"0.49266207",
"0.49242973",
"0.49240467",
"0.4918257",
"0.49134293",
"0.49113375",
"0.49084514",
"0.49029216",
"0.4895048",
"0.4892435",
"0.4886419",
"0.4884911",
"0.48831207",
"0.48772302",
"0.4877222",
"0.4872337",
"0.4856494",
"0.48561403",
"0.4852741",
"0.48498935",
"0.48453498",
"0.4838656",
"0.4836447",
"0.48281828",
"0.482636",
"0.48223302",
"0.48143142",
"0.48135778",
"0.48107275",
"0.48090446",
"0.48007932",
"0.47912744",
"0.47837806",
"0.47805783",
"0.4777369",
"0.4775357",
"0.47700754",
"0.47688434",
"0.47598466",
"0.47582093",
"0.475437",
"0.474954",
"0.47450268",
"0.4742793",
"0.4741657",
"0.47269344",
"0.47231874",
"0.47145343",
"0.47107744",
"0.47103992",
"0.47081447",
"0.47047296",
"0.4696543",
"0.46871576"
] | 0.46996865 | 98 |
Creates new form MenuTIK | public MenuTIK() {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
}
initComponents();
setResizable(false);
Dimension windowSize = getSize();
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
Point centerPoint = ge.getCenterPoint();
int dx = centerPoint.x - windowSize.width / 2;
int dy = centerPoint.y - windowSize.height / 2;
setLocation(dx, dy);
LoadTabelDataTIK();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createMenu() {\n deleteMenuGroupError = false;\n createMenuGroupError = true;\n if (menu.createMenu()) {\n updateMenuError = false;\n deleteMenuError = false;\n createMenuError = true;\n } else {\n createMenuError = false;\n }\n }",
"@Override\r\n\tpublic void createMenu(Menu menu) {\n\r\n\t}",
"private void createMenu(){\n\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n JMenu Opcje = new JMenu(\"Opcje\");\n mbar.add(Opcje);\n JMenuItem Ustawienia = new JMenuItem(\"Ustawienia\");\n /** Obsluga zdarzen wcisniecia przycisku ustawien w menu */\n Ustawienia.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(Justawienia==null)\n Justawienia =new JUstawienia();\n Justawienia.setVisible(true);\n if (controller.timer!=null)\n controller.timer.stop();\n }\n });\n Opcje.add(Ustawienia);\n Opcje.addSeparator();\n JMenuItem Info = new JMenuItem(\"Info\");\n /** Obsluga zdarzen wcisniecia przycisku info w menu */\n Info.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n controller.WyswietlInfo();\n }\n });\n Opcje.add(Info);\n }",
"public FormMenu() {\n initComponents();\n menuController = new MenuController(this);\n menuController.nonAktif();\n }",
"public int create(Esysmeudef menu);",
"public Menu createToolsMenu();",
"public void ajouterNouveauMenu(int idLigneprecedente, Menu nouveauMenu);",
"public String chooseMenu() {\n String input = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"menu_id\");\n setName(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"name\"));\n setType(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"type\"));\n setMenu_id(Integer.parseInt(input));\n return \"EditMenu\";\n\n }",
"IFormManager createFormManagerForMenu(IForm menu);",
"public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }",
"public menuAddStasiun() {\n initComponents();\n }",
"@Test\n public void testMenuFactoryCreate() {\n Menu menuController = menuFactory.getMenu();\n menuController.addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n assertEquals(1, menuController.getMenu().size());\n }",
"public FormFuncionario(FormMenu telaPai) {\n initComponents();\n this.telaPai = telaPai;\n\n txtNome.setText(\"Nome\");\n lblNome.setVisible(false);\n txtSobrenome.setText(\"Sobrenome\");\n lblSobrenome.setVisible(false);\n campoMensagem.setVisible(false);\n lblMensagem.setVisible(false);\n\n }",
"public Menu createViewMenu();",
"public Menu createFileMenu();",
"FORM createFORM();",
"public void generateMenu(){\n menuBar = new JMenuBar();\n\n JMenu file = new JMenu(\"Datei\");\n JMenu tools = new JMenu(\"Werkzeuge\");\n JMenu help = new JMenu(\"Hilfe\");\n\n JMenuItem open = new JMenuItem(\"Öffnen \");\n JMenuItem save = new JMenuItem(\"Speichern \");\n JMenuItem exit = new JMenuItem(\"Beenden \");\n JMenuItem preferences = new JMenuItem(\"Einstellungen \");\n JMenuItem about = new JMenuItem(\"Über das Projekt \");\n\n\n file.add(open);\n file.add(save);\n file.addSeparator();\n file.add(exit);\n tools.add(preferences);\n help.add(about);\n\n menuBar.add(file);\n menuBar.add(tools);\n menuBar.add(help);\n }",
"private void createMenu(){\n \n menuBar = new JMenuBar();\n \n game = new JMenu(\"Rummy\");\n game.setMnemonic('R');\n \n newGame = new JMenuItem(\"New Game\");\n newGame.setMnemonic('N');\n newGame.addActionListener(menuListener);\n \n \n \n exit = new JMenuItem(\"Exit\");\n exit.setMnemonic('E');\n exit.addActionListener(menuListener); \n \n \n \n }",
"void create(MenuTO menuTO, List<Integer> itemsIDList) throws DAOException;",
"@Override\r\n public void actionPerformed(ActionEvent e) {\n Menu_Produtos m2= new Menu_Produtos();\r\n \r\n }",
"@Override\r\n public void actionPerformed(ActionEvent e) {\n Menu_Empregados m1= new Menu_Empregados();\r\n \r\n }",
"UIFormMenu toUIFormMenu(String heading);",
"@Override\n public void create(SwipeMenu menu) {\n switch (menu.getViewType()) {\n case 0:\n createMenu1(menu);\n break;\n case 1:\n createMenu2(menu);\n break;\n case 2:\n createMenu3(menu);\n break;\n }\n }",
"public FrmGestion(FrmMenu menu) {\n this.menu=menu;\n initComponents();\n ConstruyeTablaGestion();\n }",
"private void makePOSMenu() {\r\n\t\tJMenu POSMnu = new JMenu(\"Punto de Venta\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Cotizaciones\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Cotizaciones\", \r\n\t\t\t\t\timageLoader.getImage(\"quote.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 't',\r\n\t\t\t\t\t\"Ver el listado de cotizaciones\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F4, 0), Quote.class);\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Compra\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Compras\", \r\n\t\t\t\t\timageLoader.getImage(\"purchase.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'c',\r\n\t\t\t\t\t\"Ver el listado de facturas\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F5, 0), Purchase.class);\r\n\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Facturacion\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Facturacion\", \r\n\t\t\t\t\timageLoader.getImage(\"invoice.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'f',\r\n\t\t\t\t\t\"Ver el listado de facturas\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F6, 0), Invoice.class);\r\n\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\tPOSMnu.setMnemonic('p');\r\n\t\t\tadd(POSMnu);\r\n\t\t}\r\n\t}",
"public void clickCreate() {\n\t\tbtnCreate.click();\n\t}",
"@Override\r\n public void actionPerformed(ActionEvent e) {\n Menu_Contabilidade m3= new Menu_Contabilidade();\r\n \r\n }",
"public JMTMenuBar createMenu() {\r\n \t\tJMTMenuBar menu = new JMTMenuBar(JMTImageLoader.getImageLoader());\r\n \t\t// File menu\r\n \t\tMenuAction action = new MenuAction(\"File\", new AbstractJmodelAction[] { newModel, openModel, saveModel, saveModelAs, closeModel, null, exit });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\t// Edit menu\r\n \t\taction = new MenuAction(\"Edit\", new AbstractJmodelAction[] {\r\n \t\t// editUndo, editRedo, null\r\n \t\t\t\tactionCut, actionCopy, actionPaste, actionDelete, null, takeScreenShot });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\t// Define menu\r\n \t\taction = new MenuAction(\"Define\",\r\n \t\t\t\tnew AbstractJmodelAction[] { editUserClasses, editMeasures, editSimParams, editPAParams, null, editDefaults });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\t// Solve menu\r\n \t\taction = new MenuAction(\"Solve\", new AbstractJmodelAction[] { simulate, pauseSimulation, stopSimulation, null, switchToExactSolver, null,\r\n \t\t\t\tshowResults });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\t// Help menu\r\n \t\taction = new MenuAction(\"Help\", new AbstractJmodelAction[] { openHelp, null, about });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\treturn menu;\r\n \t}",
"@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tmenu.add(0,context_class_test_menu1, 0, \"newmenu\"+Math.random());\r\n\t\t\t\tLog.e(\"test\", \"完成添加\");\r\n\r\n\t\t\t}",
"private void createMenu() {\n\t\tJMenuBar mb = new JMenuBar();\n\t\tsetJMenuBar(mb);\n\t\tmb.setVisible(true);\n\t\t\n\t\tJMenu menu = new JMenu(\"File\");\n\t\tmb.add(menu);\n\t\t//mb.getComponent();\n\t\tmenu.add(new JMenuItem(\"Exit\"));\n\t\t\n\t\t\n\t}",
"private MenuItem getNewMenuItem() {\r\n\t\tif (newMenuItem == null) {\r\n\t\t\tnewMenuItem = new MenuItem(\"Creat new DB\");\r\n\t\t\tnewMenuItem.addActionListener(new ActionListener() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\tfinal String dbname = JOptionPane.showInputDialog(\"New database name:\");\r\n\t\t\t\t\tif (dbname == null)\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\tMenuItem item = new MenuItem(dbname);\r\n\t\t\t\t\titem.addActionListener(new ActionListener() {\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\t\t\tstopDB();\r\n\t\t\t\t\t\t\tstartDB(dbname);\r\n\t\t\t\t\t\t\tgetStopMenuItem().setEnabled(true);\r\n\t\t\t\t\t\t\tgetNewMenuItem().setEnabled(false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\tstartMenuItem.add(item);\r\n\t\t\t\t\tstartDB(dbname);\r\n\t\t\t\t\tgetNewMenuItem().setEnabled(false);\r\n\t\t\t\t\tgetStartMenuItem().setEnabled(true);\r\n\t\t\t\t\tgetStopMenuItem().setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn newMenuItem;\r\n\t}",
"public static void create(Formulario form){\n daoFormulario.create(form);\n }",
"public Menu() {\r\n \r\n ingresaVehiculo (); \r\n }",
"@Override\n public void create(SwipeMenu menu) {\n switch (menu.getViewType()) {\n case VIEW_TYPE_1:\n createMenu1(menu);\n break;\n case VIEW_TYPE_2:\n createMenu2(menu);\n break;\n case VIEW_TYPE_3:\n createMenu3(menu);\n break;\n }\n }",
"public TextController createMenu(ControllerCore genCode) {\n\t\tmenuTXT = new TextController(\"menu\", getParentController(controlItemSCSCLC), genCode) {\n\t\t\t@Override\n\t\t\tpublic void initialize() {\n\t\t\t\tsetLinkedController(menu$1LBL);\n\t\t\t\tsetProperty(\"menu\");\n\t\t\t\tsuper.initialize();\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tif (null != fieldBindManager)\n\t\t\t\t\t\tfieldBindManager = new XjcFieldBindingManager(this);\n\t\t\t\t\tgetControl().addFocusListener(new XjcFocusListener(this));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\treturn menuTXT;\n\t}",
"private void voltarMenu() {\n\t\tmenu = new TelaMenu();\r\n\t\tmenu.setVisible(true);\r\n\t\tthis.dispose();\r\n\t}",
"@Override\n public void create(SwipeMenu menu) {\n switch (menu.getViewType()) {\n case 0:\n createMenu1(menu);\n break;\n case 1:\n createMenu2(menu);\n break;\n\n }\n }",
"private void makeMenu() {\r\n int i = 0;\r\n int j = 0;\r\n final JMenuBar bar = new JMenuBar();\r\n final Action[] menuActions = {new NewItemAction(MENU_ITEM_STRINGS[i++]),\r\n new ExitAction(MENU_ITEM_STRINGS[i++], myFrame),\r\n new AboutAction(MENU_ITEM_STRINGS[i++], myFrame)};\r\n i = 0;\r\n\r\n final JMenu fileMenu = new JMenu(MENU_STRINGS[j++]);\r\n fileMenu.setMnemonic(KeyEvent.VK_F);\r\n fileMenu.add(menuActions[i++]);\r\n fileMenu.addSeparator();\r\n fileMenu.add(menuActions[i++]);\r\n\r\n final JMenu optionsMenu = new JMenu(MENU_STRINGS[j++]);\r\n optionsMenu.setMnemonic(KeyEvent.VK_O);\r\n\r\n final JMenu helpMenu = new JMenu(MENU_STRINGS[j++]);\r\n helpMenu.setMnemonic(KeyEvent.VK_H);\r\n helpMenu.add(menuActions[i++]);\r\n\r\n bar.add(fileMenu);\r\n bar.add(optionsMenu);\r\n bar.add(helpMenu);\r\n\r\n myFrame.setJMenuBar(bar);\r\n }",
"public void buildAndShowMenuForm() {\n SimpleForm.Builder builder =\n SimpleForm.builder()\n .translator(MinecraftLocale::getLocaleString, session.locale())\n .title(\"gui.advancements\");\n\n List<String> rootAdvancementIds = new ArrayList<>();\n for (Map.Entry<String, GeyserAdvancement> advancement : storedAdvancements.entrySet()) {\n if (advancement.getValue().getParentId() == null) { // No parent means this is a root advancement\n builder.button(MessageTranslator.convertMessage(advancement.getValue().getDisplayData().getTitle(), session.locale()));\n rootAdvancementIds.add(advancement.getKey());\n }\n }\n\n if (rootAdvancementIds.isEmpty()) {\n builder.content(\"advancements.empty\");\n }\n\n builder.validResultHandler((response) -> {\n String id = rootAdvancementIds.get(response.clickedButtonId());\n if (!id.equals(\"\")) {\n if (id.equals(currentAdvancementCategoryId)) {\n // The server thinks we are already on this tab\n buildAndShowListForm();\n } else {\n // Send a packet indicating that we intend to open this particular advancement window\n ServerboundSeenAdvancementsPacket packet = new ServerboundSeenAdvancementsPacket(id);\n session.sendDownstreamPacket(packet);\n // Wait for a response there\n }\n }\n });\n\n session.sendForm(builder);\n }",
"public MenuTamu() {\n initComponents();\n \n }",
"private void createMenu()\n\t{\n\t\tfileMenu = new JMenu(\"File\");\n\t\thelpMenu = new JMenu(\"Help\");\n\t\ttoolsMenu = new JMenu(\"Tools\");\n\t\t\n\t\tmenuBar = new JMenuBar();\n\t\t\n\t\texit = new JMenuItem(\"Exit\");\t\t\n\t\treadme = new JMenuItem(\"Readme\");\n\t\tabout = new JMenuItem(\"About\");\n\t\tsettings = new JMenuItem(\"Settings\");\n\t\t\t\t\n\t\tfileMenu.add (exit);\n\t\t\n\t\thelpMenu.add (readme);\n\t\thelpMenu.add (about);\t\n\t\t\n\t\ttoolsMenu.add (settings);\n\t\t\n\t\tmenuBar.add(fileMenu);\n\t\tmenuBar.add(toolsMenu);\n\t\tmenuBar.add(helpMenu);\t\t\n\t\t\t\t\n\t\tdefaultMenuBackground = menuBar.getBackground();\n\t\tdefaultMenuForeground = fileMenu.getForeground();\n\t\t\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.expense_add_new, menu);\r\n\t\treturn true;\r\n\t}",
"public NewAction() {\n\t\tsuper(\"New...\", null);\n\t\tputValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_N, MAIN_MENU_MASK));\n\t}",
"public MenuGroupForm() {\n this(new MenuGroup());\n }",
"public static void main(String[] args) {\r\n form_menu form_menu1 = new form_menu();\r\n }",
"public void createItem(View view) {\n \t\n String[] temp = getCurrentItemTypes();\n \n Intent intent = new Intent(this, CreateItem.class);\n intent.putExtra(EDIT, \"no\");\n intent.putExtra(TYPES, temp);\n startActivityForResult(intent, 1);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add_new, menu);\r\n\t\treturn true;\r\n\t}",
"protected void createContextMenu() {\n\t\t// TODO : XML Editor 에서 Query Editor 관련 Action 삭제~~\n\t\tMenuManager contextMenu = new MenuManager(\"#PopUp\"); //$NON-NLS-1$\n\t\tcontextMenu.add(new Separator(\"additions\")); //$NON-NLS-1$\n\t\tcontextMenu.setRemoveAllWhenShown(true);\n\t\tcontextMenu.addMenuListener(new NodeActionMenuListener());\n\t\tMenu menu = contextMenu.createContextMenu(getControl());\n\t\tgetControl().setMenu(menu);\n\t\t// makeActions();\n\t\t// hookSingleClickAction();\n\n\t}",
"public Menu()\n {\n \n }",
"public FrmMenu() {\n initComponents();\n }",
"public int menuCreate(MenuVO menuVO) {\n\t\treturn mapper.menuCreate(menuVO);\r\n\t}",
"private static JMenuBar createMenu() {\r\n JMenuBar mb = new JMenuBar();\r\n JMenu menu = new JMenu(\"File\");\r\n JMenuItem item = new JMenuItem(\"Save\");\r\n item.addActionListener((ActionEvent evt) -> {\r\n saveActionPerformed();\r\n });\r\n menu.add(item);\r\n mb.add(menu);\r\n\r\n menu = new JMenu(\"Help\");\r\n item = new JMenuItem(\"Show how-to\");\r\n item.addActionListener((ActionEvent evt) -> {\r\n showHelp();\r\n });\r\n menu.add(item);\r\n\r\n mb.add(menu);\r\n\r\n return mb;\r\n }",
"private void addMenu(){\n //Where the GUI is created:\n \n Menu menu = new Menu(\"Menu\");\n MenuItem menuItem1 = new MenuItem(\"Lista de Libros\");\n MenuItem menuItem2 = new MenuItem(\"Nuevo\");\n\n menu.getItems().add(menuItem1);\n menu.getItems().add(menuItem2);\n \n menuItem1.setOnAction(new EventHandler<ActionEvent>() { \n @Override\n public void handle(ActionEvent event) {\n gridPane.getChildren().clear();\n cargarListaGeneradores( 2, biblioteca.getBiblioteca());\n }\n });\n \n menuItem2.setOnAction(new EventHandler<ActionEvent>() { \n @Override\n public void handle(ActionEvent event) {\n gridPane.getChildren().clear();\n addUIControls() ;\n }\n });\n \n menuBar.getMenus().add(menu);\n }",
"@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}",
"public void createMenu() {\n\t\tmenuBar.add(createGameMenuColumn());\n\t\tmenuBar.add(createTestsMenuColumn());\n\t\tmenuBar.add(createCheatsMenuColumn());\n\n\t\tparentMainView.setJMenuBar(menuBar);\n\t}",
"public Menu() {\r\n\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_create, menu);\n return true;\n }",
"@Override\n\tpublic void create() {\n\t\tAssets.load();\n\t\t\n\t\t//creo pantallas y cargo por defecto menuPrincipal\n\t\tscreenJuego = new JuegoScreen(this);\n\t\tmenuPrincipal = new MenuPrincipal(this);\n\t\tsetScreen(menuPrincipal);\n\t}",
"public CrearGrupoDeContactosMenuActionListener() {\n }",
"@Override\n public String createMenu(Menu parMenu) {\n try {\n this.connect();\n String sql = \"INSERT INTO Menu(MenuId, MenuNombre, MenuFechaVisualizacion VALUES (?,?,?)\";\n try (PreparedStatement pstmt = conn.prepareStatement(sql)) {\n pstmt.setString(1, parMenu.getMenuId());\n pstmt.setString(2, parMenu.getMenuNom());\n pstmt.setDate(3, (Date) parMenu.getMenuFecVi());\n\n pstmt.executeUpdate();\n }\n this.disconnect();\n } catch (SQLException ex) {\n Logger.getLogger(IOrderRepository.class.getName()).log(Level.SEVERE, \"Error al insertar el registro\", ex);\n }\n return (parMenu.getMenuId());\n }",
"public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n String cmd = (String)e.getActionCommand();\n\n String newMenu = menuName.getText();\n String newRecipe = recipeName.getText();\n String newQuantity = quantityName.getText();\n String newStep = stepName.getText();\n\n if (cmd.equals(\"Show Book\"))\n ta.append(mb.toString());\n\n if (cmd.equals(\"Create Menu\")) {\n if (breakfast.isSelected())\n {\n menuList.insertItemAt(newMenu,0);\n menuList.setSelectedIndex(0);\n mb.add(new FoodMenu(newMenu, MenuType.BREAKFAST));\n ta.append(\"\\nMenu: \" + newMenu + \" has been added to the Menu Book\\n\");\n }\n if (lunch.isSelected())\n {\n menuList.insertItemAt(newMenu,0);\n menuList.setSelectedIndex(0);\n mb.add(new FoodMenu(newMenu, MenuType.LUNCH));\n ta.append(\"\\nMenu: \" + newMenu + \" has been added to the Menu Book\\n\");\n }\n if (dinner.isSelected())\n {\n menuList.insertItemAt(newMenu,0);\n menuList.setSelectedIndex(0);\n mb.add(new FoodMenu(newMenu, MenuType.DINNER));\n ta.append(\"\\nMenu: \" + newMenu + \" has been added to the Menu Book\\n\");\n }\n }\n\n if (cmd.equals(\"Show Menu\")) {\n ta.append(FoodMenu.hashMap.get(menuList.getSelectedItem().toString()).toString());\n }\n\n if (cmd.equals(\"Remove Menu\")) {\n ta.append(\"\\nMenu: \" + menuList.getSelectedItem().toString() + \" has been removed from the Menu Book\\n\");\n mb.remove(FoodMenu.hashMap.get(menuList.getSelectedItem().toString()));\n FoodMenu.hashMap.remove(menuList.getSelectedItem().toString());\n menuList.removeItem(menuList.getSelectedItem());\n }\n\n if (cmd.equals(\"Create Recipe\")) {\n recipeList.insertItemAt(newRecipe,0);\n recipeList.setSelectedIndex(0);\n Recipe.hashMap.put(newRecipe, new Recipe(newRecipe));\n ta.append(\"\\nRecipe: \" + recipeList.getSelectedItem().toString() + \" has been added to the Recipe List\\n\");\n }\n\n if (cmd.equals(\"Show Recipe\")) {\n ta.append(Recipe.hashMap.get(recipeList.getSelectedItem().toString()).toString());\n }\n\n if (cmd.equals(\"Add Recipe\")) {\n Recipe RecipeObj = Recipe.hashMap.get(recipeList.getSelectedItem().toString());\n FoodMenu MenuObj = FoodMenu.hashMap.get(menuList.getSelectedItem().toString());\n MenuObj.add(RecipeObj);\n ta.append(\"\\nRecipe: \" + recipeList.getSelectedItem().toString() + \" has been added to the menu \" + menuList.getSelectedItem().toString() + \"\\n\");\n }\n\n if (cmd.equals(\"Remove Recipe\")) {\n ta.append(\"\\nRecipe: \" + recipeList.getSelectedItem().toString() + \" has been removed from menu \" + menuList.getSelectedItem().toString() + \"\\n\");\n FoodMenu slctdMenu = FoodMenu.hashMap.get(menuList.getSelectedItem().toString());\n slctdMenu.remove(Recipe.hashMap.get(recipeList.getSelectedItem().toString()));\n Recipe.hashMap.remove(recipeList.getSelectedItem().toString());\n recipeList.removeItem(recipeList.getSelectedItem().toString());\n }\n\n if (cmd.equals(\"Add Ingredient\")) {\n ta.append(\"\\n\" + newQuantity + \" \" + unitList.getSelectedItem().toString() + \" of \" + itemList.getSelectedItem().toString() + \" has been added to the recipe \" + recipeList.getSelectedItem().toString() + \"\\n\");\n Recipe getRecipe = Recipe.hashMap.get(recipeList.getSelectedItem().toString());\n Item getItem = Item.hashMap.get(itemList.getSelectedItem().toString());\n Unit getUnit = Unit.hashMap.get(unitList.getSelectedItem().toString());\n double qty = Double.parseDouble(newQuantity);\n Ingredient getIngredient = new Ingredient(getItem, qty, getUnit);\n getRecipe.add(getIngredient);\n }\n\n if (cmd.equals(\"Add Step\")) {\n Recipe RecStep = Recipe.hashMap.get(recipeList.getSelectedItem().toString());\n Step addedStep = new Step(newStep);\n RecStep.add(addedStep);\n ta.append(\"\\nStep: '\" + addedStep + \"' has been added to the recipe \" + recipeList.getSelectedItem().toString() + \"\\n\");\n }\n }",
"private void azzeraInsertForm() {\n\t\tviewInserimento.getCmbbxTipologia().setSelectedIndex(-1);\n\t\tviewInserimento.getTxtFieldDataI().setText(\"\");\n\t\tviewInserimento.getTxtFieldValore().setText(\"\");\n\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t}",
"private void nuevaLiga() {\r\n\t\tif(Gestion.isModificado()){\r\n\t\t\tint opcion = JOptionPane.showOptionDialog(null, \"¿Desea guardar los cambios?\", \"Nueva Liga\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null,null, null);\r\n\t\t\tswitch(opcion){\r\n\t\t\tcase JOptionPane.YES_OPTION:\r\n\t\t\t\tguardar();\r\n\t\t\t\tbreak;\r\n\t\t\tcase JOptionPane.NO_OPTION:\r\n\t\t\t\tGestion.reset();\r\n\t\t\t\tbreak;\r\n\t\t\tcase JOptionPane.CANCEL_OPTION:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tGestion.reset();\r\n\t\tfrmLigaDeFtbol.setTitle(\"Liga de Fútbol\");\r\n\t}",
"ReturnCode createMenus(MmtConfig cfg, String menuJson);",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add_template, menu);\n\t\treturn true;\n\t}",
"void createOrderGui(Client_H client, ProductController_H menu) throws OrderLineFullListException;",
"private void createContextMenu(){\r\n\t\tmenu = new JMenuBar();\r\n\t\tint ctrl;\r\n\t\tif(MAC)\r\n\t\t\tctrl = ActionEvent.META_MASK;\r\n\t\telse\r\n\t\t\tctrl = ActionEvent.CTRL_MASK;\r\n\r\n\t\tJMenu fileMenu = new JMenu(\"File\");\r\n\t\tnewMenu = new JMenuItem(\"New\");\r\n\t\tnewMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ctrl));\r\n\t\tnewMenu.addActionListener(this);\r\n\t\topenMenu = new JMenuItem(\"Open\");\r\n\t\topenMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, ctrl));\r\n\t\topenMenu.addActionListener(this);\r\n\t\trecentMenu = new JMenu(\"Open Recent\");\r\n\t\tpopulateRecentMenu();\r\n\t\tsaveMenu = new JMenuItem(\"Save\");\r\n\t\tsaveMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, ctrl));\r\n\t\tsaveMenu.addActionListener(this);\r\n\t\tsaveAsMenu = new JMenuItem(\"Save As...\");\r\n\t\tsaveAsMenu.addActionListener(this);\r\n\t\tfileMenu.add(newMenu);\r\n\t\tfileMenu.add(openMenu);\r\n\t\tfileMenu.add(recentMenu);\r\n\t\tfileMenu.add(saveMenu);\r\n\t\tfileMenu.add(saveAsMenu);\r\n\r\n\t\tmenu.add(fileMenu);\r\n\r\n\t\tJMenu editMenu = new JMenu(\"Edit\");\r\n\t\tpreferencesMenu = new JMenuItem(\"Preferences\");\r\n\t\tpreferencesMenu.addActionListener(this);\r\n\t\teditMenu.add(preferencesMenu);\r\n\r\n\t\tmenu.add(editMenu);\r\n\r\n\t\tif(!MAC){\r\n\t\t\tJMenu helpMenu = new JMenu(\"Help\");\r\n\t\t\tJMenuItem aboutMenuI = new JMenuItem(\"About\");\r\n\r\n\t\t\taboutMenuI.addActionListener(new ActionListener(){\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\tshowAboutMenu();\r\n\t\t\t\t}\t\t\r\n\t\t\t});\r\n\t\t\thelpMenu.add(aboutMenuI);\r\n\t\t\tmenu.add(helpMenu);\r\n\t\t}\r\n\t}",
"private void newTodo() {\r\n String myTodoName = \"Unknown\";\r\n for (Component component : panelSelectFile.getComponents()) {\r\n if (component instanceof JTextField) {\r\n if (component.getName().equals(\"Name\")) {\r\n JTextField textFieldName = (JTextField) component;\r\n myTodoName = textFieldName.getText();\r\n }\r\n }\r\n }\r\n if (myTodoName == null || myTodoName.isEmpty()) {\r\n JOptionPane.showMessageDialog(null, \"New Todo List name not entered!\");\r\n return;\r\n }\r\n myTodo = new MyTodoList(myTodoName);\r\n int reply = JOptionPane.showConfirmDialog(null, \"Do you want to save this todoList?\",\r\n \"Save New Todolist\", JOptionPane.YES_NO_OPTION);\r\n if (reply == JOptionPane.YES_OPTION) {\r\n saveTodo();\r\n }\r\n fileName = null;\r\n todoListGui();\r\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.form, menu);\n\t\treturn true;\n\t}",
"private JMenuItem createMenuItem(JMenu parent, String text, int mnemonic, String keyStrokeText, String tooltip) {\n\t\tJMenuItem item = new JMenuItem();\n\t\t\n\t\titem.setText(text);\n\t\tif (mnemonic != -1) {\n\t\t\titem.setMnemonic(mnemonic);\n\t\t}\n\t\tif (keyStrokeText != null) {\n\t\t\tKeyStroke accelerator = KeyStroke.getKeyStroke(keyStrokeText);\n\t\t\titem.setAccelerator(accelerator);\n\t\t}\n\t\tif (tooltip != null) {\n\t\t\titem.setToolTipText(tooltip);\n\t\t}\n\t\t\n\t\tparent.add(item);\n\t\treturn item;\n\t}",
"public void createMenus()\n {\n EventQueueUtilities.runOnEDT(this::createMenusNow);\n }",
"public Menu() {\n\n\t}",
"private void createBtnActionPerformed(java.awt.event.ActionEvent evt) {\n\n staff.setName(regName.getText());\n staff.setID(regID.getText());\n staff.setPassword(regPwd.getText());\n staff.setPosition(regPos.getSelectedItem().toString());\n staff.setGender(regGender.getSelectedItem().toString());\n staff.setEmail(regEmail.getText());\n staff.setPhoneNo(regPhone.getText());\n staff.addStaff();\n if (staff.getPosition().equals(\"Vet\")) {\n Vet vet = new Vet();\n vet.setExpertise(regExp.getSelectedItem().toString());\n vet.setExpertise_2(regExp2.getSelectedItem().toString());\n vet.addExpertise(staff.getID());\n }\n JOptionPane.showMessageDialog(null, \"User added to database\");\n updateJTable();\n }",
"private MenuBar.MenuItem createMenuItem(View vista, String menuAddress, Resource menuIcon) {\n MenuBar.MenuItem menuItem;\n MenuCommand cmd = new MenuCommand(menuBar, vista);\n menuItem = menuBar.addItem(menuAddress, menuIcon, cmd);\n menuItem.setStyleName(AMenuBar.MENU_DISABILITATO);\n\n return menuItem;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.add_new_notice_menu, menu);\n return true;\n }",
"public void CrearNew(ActionEvent e) {\n List<Pensum> R = ejbFacade.existePensumID(super.getSelected().getIdpensum());\n if(R.isEmpty()){\n super.saveNew(e);\n }else{\n new Auxiliares().setMsj(3,\"PENSUM ID YA EXISTE\");\n }\n }",
"public Menu() {\n }",
"private void makeToolsMenu() {\r\n\t\tJMenu toolsMnu = new JMenu(\"Herramientas\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Usuarios\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Manejo de Usuarios\",\r\n\t\t\t\t\timageLoader.getImage(\"users.png\"));\r\n\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'm',\r\n\t\t\t\t\t\"Manejar los usuarios del sistema\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F7, 0), Users.class);\r\n\r\n\t\t\ttoolsMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"FacturacionManual\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Facturacion Manual\",\r\n\t\t\t\t\timageLoader.getImage(\"kwrite.png\"));\r\n\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'f',\r\n\t\t\t\t\t\"Manejar la Facturacion Manual\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F3, 0), ManualInvoice.class);\r\n\r\n\t\t\ttoolsMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\ttoolsMnu.setMnemonic('h');\r\n\t\t\tadd(toolsMnu);\r\n\t\t}\r\n\t}",
"private void makeStockMenu() {\r\n\t\tJMenu stockMnu = new JMenu(\"Inventario\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Inventario\")) {\r\n\t\t\tisAccesible = true;\r\n\r\n\t\t\tif (StoreCore.getAccess(\"AgregarInventario\")) {\r\n\t\t\t\tJMenuItem addItem = new JMenuItem(\"Agregar Articulo\");\r\n\t\t\t\taddItem.setMnemonic('a');\r\n\t\t\t\taddItem.setToolTipText(\"Agregar rapidamente un nuevo articulo\");\r\n\t\t\t\taddItem.addActionListener(new ActionListener() {\r\n\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\t\tnew AddStockItem(\"\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\t\t\tstockMnu.add(addItem);\r\n\t\t\t}\r\n\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Listar Inventario\",\r\n\t\t\t\t\timageLoader.getImage(\"world.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'v', \"Ver el inventario\",\r\n\t\t\t\t\tKeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), Stock.class);\r\n\t\t\tstockMnu.add(menuItem);\r\n\t\t\tstockMnu.addSeparator();\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Kardex\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Ver Kardex\", \r\n\t\t\t\t\timageLoader.getImage(\"kardexSingle.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'k', \"Ver el kardex\", null,\r\n\t\t\t\t\tKardex.class);\r\n\t\t\tstockMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\tstockMnu.setMnemonic('i');\r\n\t\t\tadd(stockMnu);\r\n\t\t}\r\n\t}",
"public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_inserir_desejos , menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.add_cliente_fornecedor, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.add_new_entry, menu);\n return true;\n }",
"@GetMapping(value = \"/create\") // https://localhost:8080/etiquetasTipoDisenio/create\n\tpublic String create(Model model) {\n\t\tetiquetasTipoDisenio etiquetasTipoDisenio = new etiquetasTipoDisenio();\n\t\tmodel.addAttribute(\"title\", \"Registro de una nuev entrega\");\n\t\tmodel.addAttribute(\"etiquetasTipoDisenio\", etiquetasTipoDisenio); // similar al ViewBag\n\t\treturn \"etiquetasTipoDisenio/form\"; // la ubicacion de la vista\n\t}",
"private void CreateMenu() {\n\t\topcionesMenu = getResources().getStringArray(\r\n\t\t\t\tR.array.devoluciones_lista_options);\r\n\r\n\t\tdrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);\r\n\t\t// Buscamos nuestro menu lateral\r\n\t\tdrawerList = (ListView) findViewById(R.id.left_drawer);\r\n\r\n\t\tdrawerList.setAdapter(new ArrayAdapter<String>(getSupportActionBar()\r\n\t\t\t\t.getThemedContext(), android.R.layout.simple_list_item_1,\r\n\t\t\t\topcionesMenu));\r\n\r\n\t\t// Añadimos Funciones al menú laterak\r\n\t\tdrawerList.setOnItemClickListener(new OnItemClickListener() {\r\n\r\n\t\t\t@SuppressLint(\"NewApi\")\r\n\t\t\t@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\tint position, long id) {\r\n\r\n\t\t\t\tdrawerList.setItemChecked(position, true);\r\n\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\ttituloSeccion = opcionesMenu[position];\r\n\t\t\t\tgetSupportActionBar().setTitle(tituloSeccion);\r\n\r\n\t\t\t\t// SELECCIONAR LA POSICION DEL RECIBO SELECCIONADO ACTUALMENTE\r\n\t\t\t\tpositioncache = customArrayAdapter.getSelectedPosition();\r\n\t\t\t\t// int pos = customArrayAdapter.getSelectedPosition();\r\n\t\t\t\t// OBTENER EL RECIBO DE LA LISTA DE RECIBOS DEL ADAPTADOR\r\n\t\t\t\titem_selected = (vmDevolucion) customArrayAdapter\r\n\t\t\t\t\t\t.getItem(positioncache);\r\n\t\t\t\tif(fragmentActive== FragmentActive.LIST){\r\n\t\t\t\t\r\n\t\t\t\t\tswitch (position) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcase NUEVO_DEVOLUCION:\r\n\t\t\t\t\t\t\tintent = new Intent(ViewDevoluciones.this,\r\n\t\t\t\t\t\t\t\t\tViewDevolucionEdit.class);\r\n\t\t\t\t\t\t\tintent.putExtra(\"requestcode\", NUEVO_DEVOLUCION);\r\n\t\t\t\t\t\t\tstartActivityForResult(intent, NUEVO_DEVOLUCION);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase ABRIR_DEVOLUCION:\r\n\t\t\t\t\t\t\tabrirDevolucion();\r\n\t\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase BORRAR_DEVOLUCION:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\tif (!item_selected.getEstado().equals(\"REGISTRADA\")) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"El registro no se puede borrar en estado \"+ item_selected.getItemEstado()+\" .\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tMessage msg = new Message();\r\n\t\t\t\t\t\t\tBundle b = new Bundle();\r\n\t\t\t\t\t\t\tb.putInt(\"id\", (int) item_selected.getId());\r\n\t\t\t\t\t\t\tmsg.setData(b);\r\n\t\t\t\t\t\t\tmsg.what = ControllerProtocol.DELETE_DATA_FROM_LOCALHOST;\r\n\t\t\t\t\t\t\tNMApp.getController().getInboxHandler().sendMessage(msg);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase ENVIAR_DEVOLUCION:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tenviarDevolucion(ControllerProtocol.GETOBSERVACIONDEV);\r\n\t\t\t\t\t\t\t//BDevolucionM.beforeSend(item_selected.getId());\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase IMPRIMIR_COMPROBANTE:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tdevolucion = ModelDevolucion.getDevolucionbyID(item_selected.getId());\r\n\t\t\t\t\t\t\tif (devolucion.getNumeroCentral() == 0)\r\n\t\t\t\t\t\t\t\tenviarDevolucion(ControllerProtocol.GETOBSERVACIONDEV);\r\n\t\t\t\t\t\t\telse {\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tenviarImprimirDevolucion(\r\n\t\t\t\t\t\t\t\t\t\t\"Se mandara a imprimir el comprobante de la Devolución\",\r\n\t\t\t\t\t\t\t\t\t\tdevolucion);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\t * BDevolucionM.ImprimirDevolucion(item_selected.getId(),\r\n\t\t\t\t\t\t\t * false);\r\n\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase BORRAR_ENVIADAS:\r\n\t\t\t\t\t\t\tif (item_selected == null) \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\t\t\tMessage msg2 = new Message();\r\n\t\t\t\t\t\t\tBundle b2 = new Bundle();\r\n\t\t\t\t\t\t\tb2.putInt(\"id\", -1);\r\n\t\t\t\t\t\t\tmsg2.setData(b2);\r\n\t\t\t\t\t\t\tmsg2.what = ControllerProtocol.DELETE_DATA_FROM_LOCALHOST;\r\n\t\t\t\t\t\t\tNMApp.getController().getInboxHandler().sendMessage(msg2);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase FICHA_DEL_CLIENTE:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\t\t\tif (NMNetWork.isPhoneConnected(NMApp.getContext())\r\n\t\t\t\t\t\t\t\t\t&& NMNetWork.CheckConnection(NMApp.getController())) {\r\n\t\t\t\t\t\t\t\tfragmentActive = FragmentActive.FICHACLIENTE;\r\n\t\t\t\t\t\t\t\tShowCustomerDetails();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase CUENTAS_POR_COBRAR:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (NMNetWork.isPhoneConnected(NMApp.getContext())\r\n\t\t\t\t\t\t\t\t\t&& NMNetWork.CheckConnection(NMApp.getController())) {\r\n\t\t\t\t\t\t\t\tfragmentActive = FragmentActive.CONSULTAR_CUENTA_COBRAR;\r\n\t\t\t\t\t\t\t\tLOAD_CUENTASXPAGAR();\r\n\t\t\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase CERRAR:\r\n\t\t\t\t\t\t\tfinish();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(fragmentActive == FragmentActive.CONSULTAR_CUENTA_COBRAR){\r\n\t\t\t\t\t\r\n\t\t\t\t\tswitch (position) {\r\n\t\t\t\t\tcase MOSTRAR_FACTURAS:\r\n\t\t\t\t\t\tcuentasPorCobrar.cargarFacturasCliente();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MOSTRAR_NOTAS_DEBITO: \r\n\t\t\t\t\t\tcuentasPorCobrar.cargarNotasDebito(); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MOSTRAR_NOTAS_CREDITO: \r\n\t\t\t\t\t\tcuentasPorCobrar.cargarNotasCredito(); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MOSTRAR_PEDIDOS: \r\n\t\t\t\t\t\tcuentasPorCobrar.cargarPedidos();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MOSTRAR_RECIBOS: \r\n\t\t\t\t\t\tcuentasPorCobrar.cargarRecibosColector(); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\ttituloSeccion = getTitle();\r\n\t\ttituloApp = getTitle();\r\n\r\n\t\tdrawerToggle = new ActionBarDrawerToggle(this, drawerLayout,\r\n\t\t\t\tR.drawable.ic_navigation_drawer, R.string.drawer_open,\r\n\t\t\t\tR.string.drawer_close) {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onDrawerClosed(View view) {\r\n\t\t\t\tgetSupportActionBar().setTitle(tituloSeccion);\r\n\t\t\t\tActivityCompat.invalidateOptionsMenu(ViewDevoluciones.this);\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onDrawerOpened(View drawerView) {\r\n\t\t\t\tgetSupportActionBar().setTitle(tituloApp);\r\n\t\t\t\tActivityCompat.invalidateOptionsMenu(ViewDevoluciones.this);\r\n\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// establecemos el listener para el dragable ....\r\n\t\tdrawerLayout.setDrawerListener(drawerToggle);\r\n\r\n\t\tgetSupportActionBar().setDisplayHomeAsUpEnabled(true);\r\n\t\tgetSupportActionBar().setHomeButtonEnabled(true);\r\n\r\n\t}",
"private JMenu createLanguageMenu() {\n\t\tAction nestoAction = new AbstractAction() {\n\n\t\t\t/** The generated serial user ID */\n\t\t\tprivate static final long serialVersionUID = -4439263551767223123L;\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJMenuItem src = (JMenuItem) e.getSource();\n\t\t\t\tString arg = src.getText();\n\t\t\t\tLocalizationProvider.getInstance().setLanguage(arg);\n\t\t\t\tLocalizationProvider.getInstance().fire();\n\t\t\t}\n\t\t};\n\n\t\titemHR = new JMenuItem(nestoAction);\n\t\titemHR.setText(\"hr\");\n\t\titemEN = new JMenuItem(nestoAction);\n\t\titemEN.setText(\"en\");\n\t\titemDE = new JMenuItem(nestoAction);\n\t\titemDE.setText(\"de\");\n\n\t\tlangMenu = new JMenu(flp.getString(\"lang\"));\n\n\t\tlangMenu.add(itemHR);\n\t\tlangMenu.add(itemEN);\n\t\tlangMenu.add(itemDE);\n\n\t\treturn langMenu;\n\t}",
"private void makeHelpMenu() {\r\n\t\tJMenu helpMnu = new JMenu(\"Ayuda\");\r\n\r\n\t\tJMenuItem tipMenuItem = new JMenuItem(\"Tips...\");\r\n\t\ttipMenuItem.setMnemonic('t');\r\n\t\ttipMenuItem.setToolTipText(\"Muestra los consejos de Store\");\r\n\t\ttipMenuItem.addActionListener(new ActionListener() {\r\n\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tnew StoreTip();\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\t\thelpMnu.add(tipMenuItem);\r\n\t\thelpMnu.setMnemonic('y');\r\n\t\tadd(helpMnu);\r\n\t}",
"private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {\n Seleccion_Insertar insert = new Seleccion_Insertar();\n insert.setVisible(true);\n this.setVisible(false);\n }",
"public void generateMenu () \n {\n mCoffeeList = mbdb.getCoffeeMenu();\n for(int i =0;i<mCoffeeList.size();i++){\n coffeeTypeCombo.addItem(mCoffeeList.get(i).toString());\n }\n mWaffleList = mbdb.getWaffleMenu();\n for(int j =0;j<mWaffleList.size();j++){\n waffleTypeCombo.addItem(mWaffleList.get(j).toString());\n }\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.new_menu, menu);\n\n return true;\n }",
"void ajouterMenu(){\r\n\t\t\tJMenuBar menubar = new JMenuBar();\r\n\t \r\n\t JMenu file = new JMenu(\"File\");\r\n\t file.setMnemonic(KeyEvent.VK_F);\r\n\t \r\n\t JMenuItem eMenuItemNew = new JMenuItem(\"Nouvelle Partie\");\r\n\t eMenuItemNew.addActionListener(new ActionListener() {\r\n\t @Override\r\n\t public void actionPerformed(ActionEvent event) {\r\n\t \t\r\n\t \t\t\r\n\t \t\t\r\n\t \tnew NouvellePartie();\r\n\t }\r\n\t });\r\n\t file.add(eMenuItemNew);\r\n\t \r\n\t JMenuItem eMenuItemFermer = new JMenuItem(\"Fermer\");\r\n\t eMenuItemFermer.setMnemonic(KeyEvent.VK_E);\r\n\t eMenuItemFermer.setToolTipText(\"Fermer l'application\");\r\n\t \r\n\t eMenuItemFermer.addActionListener(new ActionListener() {\r\n\t @Override\r\n\t public void actionPerformed(ActionEvent event) {\r\n\t System.exit(0);\r\n\t }\r\n\t });\r\n\r\n\t file.add(eMenuItemFermer);\r\n\r\n\t menubar.add(file);\r\n\t \r\n\t JMenu aide = new JMenu(\"?\");\r\n\t JMenuItem eMenuItemRegle = new JMenuItem(\"Règles\");\r\n\t aide.add(eMenuItemRegle);\r\n\t menubar.add(aide);\r\n\r\n\t final String regles=\"<html><p>Le but est de récupérer les 4 objets Graal puis de retourner au château.</p>\"\t\r\n\t +\"<p>Après avoir récupéré un objet, chaque déplacement vous enlève autant de vie que le poids de l'objet</p></html>\";\r\n\t eMenuItemRegle.addActionListener(new ActionListener() {\r\n\t @Override\r\n\t public void actionPerformed(ActionEvent event) {\r\n\t \t//default title and icon\r\n\t \t\t\tJOptionPane.showMessageDialog(gameFrame,\r\n\t \t\t\t regles,\"Règles du jeu\", JOptionPane.INFORMATION_MESSAGE);\r\n\t \t\t\t\r\n\t }\r\n\t });\r\n\t \t\r\n\t\t\t\r\n\t this.setJMenuBar(menubar);\t\r\n\t\t}",
"@Override\n public void insertMenu(MenuDto menuDto)\n {\n Menu menu = new Menu();\n BeanUtils.copyProperties(menuDto, menu);\n menu.setCreateTime(new Date());\n menu.setStat(DataStatus.ENABLED);\n menuDao.insertMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_creatuser, menu);\n return true;\n }",
"private void createMenus() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\tfileMenu = new JMenu(flp.getString(\"file\"));\n\t\tmenuBar.add(fileMenu);\n\n\t\tfileMenu.add(new JMenuItem(new ActionNewDocument(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionOpen(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionSave(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionSaveAs(flp, this)));\n\t\tfileMenu.addSeparator();\n\t\tfileMenu.add(new JMenuItem(new ActionExit(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionStatistics(flp, this)));\n\n\t\teditMenu = new JMenu(flp.getString(\"edit\"));\n\n\t\teditMenu.add(new JMenuItem(new ActionCut(flp, this)));\n\t\teditMenu.add(new JMenuItem(new ActionCopy(flp, this)));\n\t\teditMenu.add(new JMenuItem(new ActionPaste(flp, this)));\n\n\t\ttoolsMenu = new JMenu(flp.getString(\"tools\"));\n\n\t\titemInvert = new JMenuItem(new ActionInvertCase(flp, this));\n\t\titemInvert.setEnabled(false);\n\t\ttoolsMenu.add(itemInvert);\n\n\t\titemLower = new JMenuItem(new ActionLowerCase(flp, this));\n\t\titemLower.setEnabled(false);\n\t\ttoolsMenu.add(itemLower);\n\n\t\titemUpper = new JMenuItem(new ActionUpperCase(flp, this));\n\t\titemUpper.setEnabled(false);\n\t\ttoolsMenu.add(itemUpper);\n\n\t\tsortMenu = new JMenu(flp.getString(\"sort\"));\n\t\tsortMenu.add(new JMenuItem(new ActionSortAscending(flp, this)));\n\t\tsortMenu.add(new JMenuItem(new ActionSortDescending(flp, this)));\n\n\t\tmenuBar.add(editMenu);\n\t\tmenuBar.add(createLanguageMenu());\n\t\tmenuBar.add(toolsMenu);\n\t\tmenuBar.add(sortMenu);\n\n\t\tthis.setJMenuBar(menuBar);\n\t}",
"int insert(UmsMenu record);",
"private MenuManager createEditMenu() {\n\t\tMenuManager menu = new MenuManager(\"&Edition\", Messages.getString(\"IU.Strings.40\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tmenu.add(new GroupMarker(Messages.getString(\"IU.Strings.41\"))); //$NON-NLS-1$\n\n\t\tmenu.add(getAction(ActionFactory.UNDO.getId()));\n\t\tmenu.add(getAction(ActionFactory.REDO.getId()));;\n\n\t\tmenu.add(new GroupMarker(IWorkbenchActionConstants.UNDO_EXT));\n\t\tmenu.add(new Separator());\n\t\tmenu.add(getAction(ActionFactory.CUT.getId()));\n\t\tmenu.add(getAction(ActionFactory.COPY.getId()));\n\t\tmenu.add(getAction(ActionFactory.PASTE.getId()));\n\t\tmenu.add(new GroupMarker(IWorkbenchActionConstants.CUT_EXT));\n\t\tmenu.add(new Separator());\n\t\tmenu.add(getAction(ActionFactory.DELETE.getId()));\n\t\tmenu.add(getAction(ActionFactory.SELECT_ALL.getId()));\n\t\tmenu.add(getAction(ActionFactory.FIND.getId()));\n\t\tmenu.add(new Separator());\n\t\tmenu.add(getAction(ActionFactory.PREFERENCES.getId()));\n\t\treturn menu;\n\t}",
"public void setUpEditMenu() {\n add(editMenu);\n\n //editMenu.add(cutItem);\n //editMenu.add(copyItem);\n //editMenu.add(pasteItem);\n //editMenu.addSeparator();\n clearAllItems.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n world.deleteAllEntities();\n }\n });\n editMenu.add(clearAllItems);\n editMenu.addSeparator();\n JMenuItem loadVectors = new JMenuItem(\"Load stimulus vectors...\");\n loadVectors.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n SFileChooser chooser = new SFileChooser(\".\", \"Load vectors\");\n File theFile = chooser.showOpenDialog();\n if (theFile != null) {\n double[][] vecs = Utils.getDoubleMatrix(theFile);\n world.loadStimulusVectors(vecs);\n }\n }\n });\n editMenu.add(loadVectors);\n\n }",
"@Test\n public void testSetMenuFactoryAddSetMenuItem() {\n SetMenu setMenuController = setMenuFactory.getSetMenu();\n Menu menuController = menuFactory.getMenu();\n menuController.addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n ArrayList<MenuItem> menuItems = new ArrayList<>();\n menuItems.add(menuController.getMenuItem(1));\n setMenuController.addSetItem(\"Test Set\", 5.0, 1, menuItems);\n assertEquals(1, setMenuController.getSetMenu().size());\n }",
"public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_dbcreate, menu);\n return true;\n }"
] | [
"0.6965987",
"0.68075514",
"0.67703",
"0.6673377",
"0.6660199",
"0.6564256",
"0.6537275",
"0.64376354",
"0.6366956",
"0.63090175",
"0.6284427",
"0.6283258",
"0.62344325",
"0.62252456",
"0.6191138",
"0.6157892",
"0.6157868",
"0.6088007",
"0.60869586",
"0.6072285",
"0.60653806",
"0.60622895",
"0.6036684",
"0.60276026",
"0.6019641",
"0.6014138",
"0.6012076",
"0.5995021",
"0.5992359",
"0.5992136",
"0.5986107",
"0.5956638",
"0.59519625",
"0.5950749",
"0.593014",
"0.592361",
"0.59231216",
"0.5920067",
"0.59082884",
"0.5884171",
"0.58825916",
"0.5865881",
"0.58588094",
"0.5848164",
"0.5847183",
"0.5845475",
"0.584393",
"0.58246005",
"0.5824372",
"0.58184326",
"0.58160025",
"0.5809475",
"0.57997316",
"0.579766",
"0.5793629",
"0.5791948",
"0.5786281",
"0.5773486",
"0.57596767",
"0.5758055",
"0.5756713",
"0.5750397",
"0.5747846",
"0.574667",
"0.5735829",
"0.57280326",
"0.57203555",
"0.5717685",
"0.57154727",
"0.5709865",
"0.5709626",
"0.570692",
"0.57042813",
"0.57025975",
"0.5701815",
"0.5701504",
"0.5695604",
"0.5693069",
"0.56824577",
"0.5672199",
"0.56707007",
"0.5668636",
"0.5667316",
"0.56610733",
"0.56606954",
"0.56421846",
"0.5641248",
"0.564073",
"0.5639008",
"0.5638368",
"0.56367064",
"0.5634613",
"0.5632999",
"0.56277007",
"0.5625961",
"0.5622637",
"0.5617137",
"0.5614475",
"0.5607472",
"0.5603097",
"0.5602923"
] | 0.0 | -1 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
btnTambah = new javax.swing.JButton();
btnUbah = new javax.swing.JButton();
btnHapus = new javax.swing.JButton();
btnKeluar = new javax.swing.JButton();
btnRefresh = new javax.swing.JButton();
jScrollPane1 = new javax.swing.JScrollPane();
tabelTIK = new javax.swing.JTable();
setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
btnTambah.setFont(new java.awt.Font("Arial", 0, 18)); // NOI18N
btnTambah.setText("Tambah Data");
btnTambah.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnTambahActionPerformed(evt);
}
});
btnUbah.setFont(new java.awt.Font("Arial", 0, 18)); // NOI18N
btnUbah.setText("Ubah Data");
btnUbah.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnUbahActionPerformed(evt);
}
});
btnHapus.setFont(new java.awt.Font("Arial", 0, 18)); // NOI18N
btnHapus.setText("Hapus Data");
btnHapus.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnHapusActionPerformed(evt);
}
});
btnKeluar.setText("Keluar");
btnKeluar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnKeluarActionPerformed(evt);
}
});
btnRefresh.setText("Perbarui Data");
btnRefresh.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnRefreshActionPerformed(evt);
}
});
tabelTIK.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{"Erwin Kurniawan Adidharma", "Erwin", "3578241911950001", "Konghucu", "11-11-1111", null},
{null, null, null, null, null, null},
{null, null, null, null, null, null},
{null, null, null, null, null, null}
},
new String [] {
"Nama Lengkap", "Alias", "No. KTP", "Agama", "Tgl. Lahir", "Tempat Lahir"
}
) {
boolean[] canEdit = new boolean [] {
false, false, false, false, false, false
};
public boolean isCellEditable(int rowIndex, int columnIndex) {
return canEdit [columnIndex];
}
});
jScrollPane1.setViewportView(tabelTIK);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(btnTambah, javax.swing.GroupLayout.PREFERRED_SIZE, 243, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(btnUbah, javax.swing.GroupLayout.DEFAULT_SIZE, 257, Short.MAX_VALUE)
.addGap(18, 18, 18)
.addComponent(btnHapus, javax.swing.GroupLayout.PREFERRED_SIZE, 243, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(btnRefresh, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(btnKeluar, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jScrollPane1))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btnTambah, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btnUbah, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btnHapus, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 386, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btnKeluar)
.addComponent(btnRefresh))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
pack();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n initComponents();\n }",
"public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }",
"public FormListRemarking() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n \n }",
"public FormPemilihan() {\n initComponents();\n }",
"public GUIForm() { \n initComponents();\n }",
"public FrameForm() {\n initComponents();\n }",
"public TorneoForm() {\n initComponents();\n }",
"public FormCompra() {\n initComponents();\n }",
"public muveletek() {\n initComponents();\n }",
"public Interfax_D() {\n initComponents();\n }",
"public quanlixe_form() {\n initComponents();\n }",
"public SettingsForm() {\n initComponents();\n }",
"public Soru1() {\n initComponents();\n }",
"public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }",
"public soal2GUI() {\n initComponents();\n }",
"public EindopdrachtGUI() {\n initComponents();\n }",
"public MechanicForm() {\n initComponents();\n }",
"public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }",
"public quotaGUI() {\n initComponents();\n }",
"public BloodDonationGUI() {\n initComponents();\n }",
"public PatientUI() {\n initComponents();\n }",
"public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }",
"public Oddeven() {\n initComponents();\n }",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public Magasin() {\n initComponents();\n }",
"public intrebarea() {\n initComponents();\n }",
"public RadioUI()\n {\n initComponents();\n }",
"public NewCustomerGUI() {\n initComponents();\n }",
"public ZobrazUdalost() {\n initComponents();\n }",
"public FormUtama() {\n initComponents();\n }",
"public p0() {\n initComponents();\n }",
"public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }",
"public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }",
"public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }",
"public form2() {\n initComponents();\n }",
"public kunde() {\n initComponents();\n }",
"public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}",
"public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"public MusteriEkle() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }",
"public frmMain() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public DESHBORDPANAL() {\n initComponents();\n }",
"public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }",
"public frmVenda() {\n initComponents();\n }",
"public Botonera() {\n initComponents();\n }",
"public FrmMenu() {\n initComponents();\n }",
"public OffertoryGUI() {\n initComponents();\n setTypes();\n }",
"public JFFornecedores() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public EnterDetailsGUI() {\n initComponents();\n }",
"public vpemesanan1() {\n initComponents();\n }",
"public Kost() {\n initComponents();\n }",
"public UploadForm() {\n initComponents();\n }",
"public frmacceso() {\n initComponents();\n }",
"public FormHorarioSSE() {\n initComponents();\n }",
"public HW3() {\n initComponents();\n }",
"public Managing_Staff_Main_Form() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }",
"public sinavlar2() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"public P0405() {\n initComponents();\n }",
"public MiFrame2() {\n initComponents();\n }",
"public IssueBookForm() {\n initComponents();\n }",
"public Choose1() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }",
"public GUI_StudentInfo() {\n initComponents();\n }",
"public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }",
"public JFrmPrincipal() {\n initComponents();\n }",
"public bt526() {\n initComponents();\n }",
"public Pemilihan_Dokter() {\n initComponents();\n }",
"public Ablak() {\n initComponents();\n }",
"@Override\n\tprotected void initUi() {\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}",
"public Pregunta23() {\n initComponents();\n }",
"public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }",
"public AvtekOkno() {\n initComponents();\n }",
"public busdet() {\n initComponents();\n }",
"public ViewPrescriptionForm() {\n initComponents();\n }",
"public Ventaform() {\n initComponents();\n }",
"public Kuis2() {\n initComponents();\n }",
"public POS1() {\n initComponents();\n }",
"public CreateAccount_GUI() {\n initComponents();\n }",
"public Carrera() {\n initComponents();\n }",
"public EqGUI() {\n initComponents();\n }",
"public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }",
"public nokno() {\n initComponents();\n }",
"public dokter() {\n initComponents();\n }",
"public ConverterGUI() {\n initComponents();\n }",
"public hitungan() {\n initComponents();\n }",
"public Modify() {\n initComponents();\n }",
"public frmAddIncidencias() {\n initComponents();\n }",
"public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }"
] | [
"0.73195183",
"0.7290407",
"0.7290407",
"0.7290407",
"0.72855854",
"0.7248445",
"0.7213232",
"0.72084314",
"0.7195551",
"0.71902007",
"0.71835697",
"0.7158979",
"0.71473545",
"0.70928645",
"0.70807934",
"0.70575565",
"0.6987147",
"0.6976941",
"0.69544566",
"0.69541115",
"0.6943778",
"0.6942792",
"0.6935224",
"0.6931817",
"0.6928287",
"0.69246083",
"0.6924253",
"0.69117594",
"0.6910518",
"0.68936557",
"0.68927425",
"0.6891522",
"0.68911785",
"0.6889459",
"0.68826854",
"0.68823767",
"0.6880858",
"0.6878632",
"0.68753785",
"0.68741786",
"0.68710285",
"0.68593234",
"0.6856001",
"0.6855885",
"0.685485",
"0.68537056",
"0.68532616",
"0.68519884",
"0.68519884",
"0.6843908",
"0.6836617",
"0.68361354",
"0.68289286",
"0.68281245",
"0.6826939",
"0.682426",
"0.68220174",
"0.68170464",
"0.6816829",
"0.68109316",
"0.6808785",
"0.6808737",
"0.6808307",
"0.6807784",
"0.6801649",
"0.67936075",
"0.67933095",
"0.67924714",
"0.67911524",
"0.67894745",
"0.67889065",
"0.6787865",
"0.6781763",
"0.6766413",
"0.67660075",
"0.6765137",
"0.6756547",
"0.6756297",
"0.67528564",
"0.6752207",
"0.67416096",
"0.67398196",
"0.6737052",
"0.6736384",
"0.6734045",
"0.67276424",
"0.6726131",
"0.6721189",
"0.6715488",
"0.671506",
"0.67148006",
"0.6708023",
"0.67061347",
"0.67027885",
"0.6701509",
"0.670121",
"0.6699335",
"0.66989076",
"0.6694664",
"0.6690946",
"0.6688705"
] | 0.0 | -1 |
1 = insert , 2 = update , 3 = liat data full dari form Pencarian | private void btnTambahActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTambahActionPerformed
tambahUbah = 1;
TambahUbahTIK t = new TambahUbahTIK();
t.setVisible(true);
this.dispose();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int save(Periode p){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection();\n //melakukan query database\n PreparedStatement ps=con.prepareStatement( \n \"insert into periode(tahun, awal, akhir) values(?,?,?)\"); \n ps.setString(1,p.getTahun()); \n ps.setString(2,p.getAwal()); \n ps.setString(3,p.getAkhir()); \n status=ps.executeUpdate(); \n }catch(Exception e){\n System.out.println(e);\n } \n return status; \n }",
"private void addOrUpdate() {\n try {\n Stokdigudang s = new Stokdigudang();\n if (!tableStok.getSelectionModel().isSelectionEmpty()) {\n s.setIDBarang(listStok.get(row).getIDBarang());\n }\n s.setNamaBarang(tfNama.getText());\n s.setHarga(new Integer(tfHarga.getText()));\n s.setStok((int) spJumlah.getValue());\n s.setBrand(tfBrand.getText());\n s.setIDKategori((Kategorimotor) cbKategori.getSelectedItem());\n s.setIDSupplier((Supplier) cbSupplier.getSelectedItem());\n s.setTanggalDidapat(dateChooser.getDate());\n\n daoStok.addOrUpdateStok(s);\n JOptionPane.showMessageDialog(this, \"Data berhasil disimpan!\");\n showAllDataStok();\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Data gagal disimpan!\");\n }\n }",
"public static int update(Periode p){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection();\n //melakukan query database untuk merubah data berdasarkan id atau primary key\n PreparedStatement ps=con.prepareStatement( \n \"update periode set tahun=?, awal=?, akhir=?, status=? where id=?\"); \n ps.setString(1,p.getTahun()); \n ps.setString(2,p.getAwal()); \n ps.setString(3,p.getAkhir()); \n ps.setString(4,p.getStatus()); \n ps.setInt(5,p.getId()); \n status=ps.executeUpdate(); \n }catch(Exception e){System.out.println(e);} \n return status; \n }",
"public void simpanDataBuku(){\n String sql = (\"INSERT INTO buku (judulBuku, pengarang, penerbit, tahun, stok)\" \n + \"VALUES ('\"+getJudulBuku()+\"', '\"+getPengarang()+\"', '\"+getPenerbit()+\"'\"\n + \", '\"+getTahun()+\"', '\"+getStok()+\"')\");\n \n try {\n //inisialisasi preparedstatmen\n PreparedStatement eksekusi = koneksi. getKoneksi().prepareStatement(sql);\n eksekusi.execute();\n \n //pemberitahuan jika data berhasil di simpan\n JOptionPane.showMessageDialog(null,\"Data Berhasil Disimpan\");\n } catch (SQLException ex) {\n //Logger.getLogger(modelPelanggan.class.getName()).log(Level.SEVERE, null, ex);\n JOptionPane.showMessageDialog(null, \"Data Gagal Disimpan \\n\"+ex);\n }\n }",
"private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ServicioEntity entity = factory.manufacturePojo(ServicioEntity.class);\n em.persist(entity);\n dataServicio.add(entity);\n }\n for (int i = 0; i < 3; i++) {\n QuejaEntity entity = factory.manufacturePojo(QuejaEntity.class);\n if (i == 0) {\n entity.setServicio(dataServicio.get(0));\n }\n em.persist(entity);\n data.add(entity);\n }\n }",
"private void insertData() {\r\n PodamFactory factory = new PodamFactoryImpl();\r\n for (int i = 0; i < 3; i++) {\r\n UsuarioEntity entity = factory.manufacturePojo(UsuarioEntity.class);\r\n em.persist(entity);\r\n dataUsuario.add(entity);\r\n }\r\n for (int i = 0; i < 3; i++) {\r\n CarritoDeComprasEntity entity = factory.manufacturePojo(CarritoDeComprasEntity.class);\r\n if (i == 0 ){\r\n entity.setUsuario(dataUsuario.get(0));\r\n }\r\n em.persist(entity);\r\n data.add(entity);\r\n }\r\n }",
"public void simpanDataProduk(){\n loadDataProduk();\n \n //uji koneksi dan eksekusi perintah\n try{\n //test koneksi\n Statement stat = (Statement) koneksi.getKoneksi().createStatement();\n \n //perintah sql untuk simpan data\n String sql = \"INSERT INTO barang(kode_barang, nama_barang, merk_barang, jumlah_stok, harga)\"\n + \"VALUES('\"+ kode_barang +\"','\"+ nama_barang +\"','\"+ merk_barang +\"','\"+ jumlah_stok +\"','\"+ harga +\"')\";\n PreparedStatement p = (PreparedStatement) koneksi.getKoneksi().prepareStatement(sql);\n p.executeUpdate();\n \n //ambil data\n getDataProduk();\n }catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage());\n }\n }",
"public void rubahDataProduk(){\n loadDataProduk();\n \n //uji koneksi dan eksekusi perintah\n try{\n //test koneksi\n Statement stat = (Statement) koneksi.getKoneksi().createStatement();\n \n //perintah sql untuk simpan data\n String sql = \"UPDATE barang SET nama_barang = '\"+ nama_barang +\"',\"\n + \"merk_barang = '\"+ merk_barang +\"',\"\n + \"jumlah_stok = '\"+ jumlah_stok +\"',\"\n + \"harga = '\"+ harga +\"'\" \n + \"WHERE kode_barang = '\" + kode_barang +\"'\";\n PreparedStatement p = (PreparedStatement) koneksi.getKoneksi().prepareStatement(sql);\n p.executeUpdate();\n \n //ambil data\n getDataProduk();\n }catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage());\n }\n }",
"private void TambahData(String judul,String penulis,String harga){\n try{ // memanipulasi kesalahan\n String sql = \"INSERT INTO buku VALUES(NULL,'\"+judul+\"','\"+penulis+\"',\"+harga+\")\"; // menambahkan data dengan mengkonekan dari php\n stt = con.createStatement(); // membuat statement baru dengan mengkonekan ke database\n stt.executeUpdate(sql); \n model.addRow(new Object[]{judul,penulis,harga}); // datanya akan tertambah dibaris baru di tabel model\n \n }catch(SQLException e){ // memanipulasi kesalahan\n System.out.println(\"ini error\"); // menampilkan pesan ini error\n }\n }",
"private void insertData() {\r\n \r\n TeatroEntity teatro = factory.manufacturePojo(TeatroEntity.class);\r\n em.persist(teatro);\r\n FuncionEntity funcion = factory.manufacturePojo(FuncionEntity.class);\r\n List<FuncionEntity> lista = new ArrayList();\r\n lista.add(funcion);\r\n em.persist(funcion);\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n sala.setFuncion(lista);\r\n em.persist(sala);\r\n data.add(sala);\r\n }\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n em.persist(sala);\r\n sfdata.add(sala);\r\n }\r\n \r\n }",
"public void insert() {\n SiswaModel m = new SiswaModel();\n m.setNisn(view.getTxtNis().getText());\n m.setNik(view.getTxtNik().getText());\n m.setNamaSiswa(view.getTxtNama().getText());\n m.setTempatLahir(view.getTxtTempatLahir().getText());\n \n //save date format\n String date = view.getDatePickerLahir().getText();\n DateFormat df = new SimpleDateFormat(\"MM/dd/yyyy\"); \n Date d = null;\n try {\n d = df.parse(date);\n } catch (ParseException ex) {\n System.out.println(\"Error : \"+ex.getMessage());\n }\n m.setTanggalLahir(d);\n \n //Save Jenis kelamin\n if(view.getRadioLaki().isSelected()){\n m.setJenisKelamin(JenisKelaminEnum.Pria);\n }else{\n m.setJenisKelamin(JenisKelaminEnum.Wanita);\n }\n \n m.setAsalSekolah(view.getTxtAsalSekolah().getText());\n m.setHobby(view.getTxtHoby().getText());\n m.setCita(view.getTxtCita2().getText());\n m.setJumlahSaudara(Integer.valueOf(view.getTxtNis().getText()));\n m.setAyah(view.getTxtNamaAyah().getText());\n m.setAlamat(view.getTxtAlamat().getText());\n \n if(view.getRadioLkkAda().isSelected()){\n m.setLkk(LkkEnum.ada);\n }else{\n m.setLkk(LkkEnum.tidak_ada);\n }\n \n //save agama\n m.setAgama(view.getComboAgama().getSelectedItem().toString());\n \n dao.save(m);\n clean();\n }",
"public void simpanDataKategori(){\n loadDataKategori();\n \n //uji koneksi dan eksekusi perintah\n try{\n //test koneksi\n Statement stat = (Statement) koneksiDB.getKoneksi().createStatement();\n \n //perintah sql untuk simpan data\n String sql = \"INSERT INTO tbl_kembali(nm_kategori, ala_kategori, no_kategori, kame_kategori, kd_kategori, sewa_kategori, kembali_kategori, lambat_kategori)\" + \"VALUES('\"+ nmKategori +\"','\"+ alaKategori +\"','\"+ noKategori +\"','\"+ kameKategori +\"','\"+ kdKategori +\"','\"+ sewaKategori +\"','\"+ lamKategori +\"','\"+ lambatKategori +\"')\";\n PreparedStatement p = (PreparedStatement) koneksiDB.getKoneksi().prepareStatement(sql);\n p.executeUpdate();\n \n //ambil data\n getDataKategori();\n }catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage());\n }\n }",
"@Override\r\npublic int update(Detalle_pedido d) {\n\treturn detalle_pedidoDao.update(d);\r\n}",
"private void insertData() {\n\n cliente = factory.manufacturePojo(ClienteEntity.class);\n em.persist(cliente);\n for (int i = 0; i < 3; i++) {\n FormaPagoEntity formaPagoEntity = factory.manufacturePojo(FormaPagoEntity.class);\n formaPagoEntity.setCliente(cliente);\n em.persist(formaPagoEntity);\n data.add(formaPagoEntity);\n }\n }",
"public void updateDataBuku(){\n String sql = \"UPDATE buku SET judulBuku = '\"+getJudulBuku()+\"'\"\n + \",pengarang = '\"+getPengarang()+\"'\"\n + \",penerbit = '\"+getPenerbit()+\"'\"\n + \",tahun = '\"+getTahun()+\"'\"\n + \",stok = '\"+getStok()+\"' WHERE idBuku = '\"+getIdBuku()+\"'\";\n \n try {\n //inisialisasi preparedstatmen\n PreparedStatement eksekusi = koneksi. getKoneksi().prepareStatement(sql);\n eksekusi.execute();\n \n //pemberitahuan jika data berhasil di simpan\n JOptionPane.showMessageDialog(null,\"Data Berhasil Disimpan\");\n } catch (SQLException ex) {\n //Logger.getLogger(modelPelanggan.class.getName()).log(Level.SEVERE, null, ex);\n JOptionPane.showMessageDialog(null, \"Data Gagal Disimpan \\n\"+ex);\n }\n }",
"public void perbaruiDataKategori(){\n loadDataKategori();\n \n //uji koneksi dan eksekusi perintah\n try{\n //test koneksi\n Statement stat = (Statement) koneksiDB.getKoneksi().createStatement();\n \n //perintah sql untuk simpan data\n String sql = \"UPDATE tbl_kembali SET nm_kategori = '\"+ nmKategori +\"',\"\n + \"ala_kategori = '\"+ alaKategori +\"',\"\n + \"no_kategori = '\"+ noKategori +\"',\"\n + \"kame_kategori = '\"+ kameKategori +\"',\"\n + \"kd_kategori = '\"+ kdKategori +\"',\"\n + \"sewa_kategori = '\"+ sewaKategori +\"',\"\n + \"kembali_kategori = '\"+ lamKategori +\"'\"\n + \"WHERE lambat_kategori = '\" + lambatKategori +\"'\";\n PreparedStatement p = (PreparedStatement) koneksiDB.getKoneksi().prepareStatement(sql);\n p.executeUpdate();\n \n //ambil data\n getDataKategori();\n }catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage());\n }\n }",
"@Override\n\tpublic void ativar(EntidadeDominio entidade) throws SQLException {\n\t\t\t\tPreparedStatement pst=null;\n\t\t\t\tLivro livro = (Livro)entidade;\t\t\n\t\t\t\ttry {\n\t\t\t\t\topenConnection();\n\t\t\t\t\tconnection.setAutoCommit(false);\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\tStringBuilder sql = new StringBuilder();\t\t\t\n\t\t\t\t\tsql.append(\"UPDATE livro SET livStatus=?\");\n\t\t\t\t\tsql.append(\"WHERE idlivro=?\");\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\tpst = connection.prepareStatement(sql.toString());\n\t\t\t\t\tpst.setString(1, \"ATIVADO\");\n\t\t\t\t\tpst.setInt(2, livro.getId());\n\t\t\t\t\tpst.executeUpdate();\t\t\t\n\t\t\t\t\tconnection.commit();\t\n\t\t\t\t\t\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconnection.rollback();\n\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\te.printStackTrace();\t\t\t\n\t\t\t\t}finally{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpst.close();\n\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//SEGUNDA PARTE\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\topenConnection();\n\t\t\t\t\t\t\tconnection.setAutoCommit(false);\t\t\t\n\t\t\t\t\t\t\t//FALTA COLOCAR EDITORA\t\t\n\t\t\t\t\t\t\tStringBuilder sql = new StringBuilder();\n\t\t\t\t\t\t\tSystem.out.println(livro.getId());\n\t\t\t\t\t\t\tSystem.out.println(livro.getJustificativa());\n\t\t\t\t\t\t\tSystem.out.println(livro.getIdCatJustificativa());\n\t\t\t\t\t\t\tsql.append(\"INSERT INTO justificativaativar (id_livro , justificativa, id_Ativar) VALUES (?,?,?)\");\t\t\n\t\t\t\t\t\t\tpst = connection.prepareStatement(sql.toString());\n\t\t\t\t\t\t\tpst.setInt(1, livro.getId());\n\t\t\t\t\t\t\tpst.setString(2,livro.getJustificativa());\n\t\t\t\t\t\t\tpst.setInt(3,livro.getIdCatJustificativa());\n\t\t\t\t\t\t\tpst.executeUpdate();\n\t\t\t\t\t\t\tconnection.commit();\t\t\n\t\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconnection.rollback();\n\t\t\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\te.printStackTrace();\t\t\t\n\t\t\t\t\t\t}finally{\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tpst.close();\n\t\t\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t}",
"public RespuestaBD modificarRegistro(int codigoFlujo, int secuencia, int servicioInicio, int accion, int codigoEstado, int servicioDestino, String nombreProcedimiento, String correoDestino, String enviar, String mismoProveedor, String mismomismoCliente, String estado, int caracteristica, int caracteristicaValor, int caracteristicaCorreo, String metodoSeleccionProveedor, String indCorreoCliente, String indHermana, String indHermanaCerrada, String indfuncionario, String usuarioModificacion) {\n/* 437 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* */ try {\n/* 440 */ String s = \"update wkf_detalle set servicio_inicio=\" + servicioInicio + \",\" + \" accion=\" + accion + \",\" + \" codigo_estado=\" + codigoEstado + \",\" + \" servicio_destino=\" + ((servicioDestino == 0) ? \"null\" : Integer.valueOf(servicioDestino)) + \",\" + \" nombre_procedimiento='\" + nombreProcedimiento + \"',\" + \" correo_destino='\" + correoDestino + \"',\" + \" enviar_solicitud='\" + enviar + \"',\" + \" ind_mismo_proveedor='\" + mismoProveedor + \"',\" + \" ind_mismo_cliente='\" + mismomismoCliente + \"',\" + \" estado='\" + estado + \"',\" + \" caracteristica=\" + ((caracteristica == 0) ? \"null\" : (\"\" + caracteristica)) + \",\" + \" valor_caracteristica=\" + ((caracteristicaValor == 0) ? \"null\" : (\"\" + caracteristicaValor)) + \",\" + \" caracteristica_correo=\" + ((caracteristicaCorreo == 0) ? \"null\" : (\"\" + caracteristicaCorreo)) + \",\" + \" metodo_seleccion_proveedor=\" + ((metodoSeleccionProveedor.length() == 0) ? \"null\" : (\"'\" + metodoSeleccionProveedor + \"'\")) + \",\" + \" ind_correo_clientes=\" + ((indCorreoCliente.length() == 0) ? \"null\" : (\"'\" + indCorreoCliente + \"'\")) + \",\" + \" enviar_hermana=\" + ((indHermana.length() == 0) ? \"null\" : (\"'\" + indHermana + \"'\")) + \",\" + \" enviar_si_hermana_cerrada=\" + ((indHermanaCerrada.length() == 0) ? \"null\" : (\"'\" + indHermanaCerrada + \"'\")) + \",\" + \" ind_cliente_inicial=\" + ((indfuncionario.length() == 0) ? \"null\" : (\"'\" + indfuncionario + \"'\")) + \",\" + \" usuario_modificacion='\" + usuarioModificacion + \"',\" + \" fecha_modificacion=\" + Utilidades.getFechaBD() + \"\" + \" where\" + \" codigo_flujo=\" + codigoFlujo + \" and secuencia=\" + secuencia + \"\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 465 */ rta = this.dat.executeUpdate2(s);\n/* */ }\n/* 467 */ catch (Exception e) {\n/* 468 */ e.printStackTrace();\n/* 469 */ Utilidades.writeError(\"FlujoDetalleDAO:modificarRegistro \", e);\n/* 470 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 472 */ return rta;\n/* */ }",
"int insert(Tipologia record);",
"public void editarData(){\n\t\talunoTurmaService.inserirAlterar(alunoTurmaAltera);\n\t\t\n\t\t\n\t\tmovimentacao.setDataMovimentacao(alunoTurmaAltera.getDataMudanca());\n\t\tmovimentacaoService.inserirAlterar(movimentacao);\n\t\t\n\t\tFecharDialog.fecharDialogDATAAluno();\n\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\talunoTurmaAltera = new AlunoTurma();\n\t\tmovimentacao = new Movimentacao();\n\t\t\n\t\tatualizarListas();\n\t}",
"public void insertConsultoraNivel1(ConsultoraNivel1 consultoraNivel1);",
"public void processInsertar() {\n }",
"private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n VueltasConDemoraEnOficinaEntity entity = factory.manufacturePojo(VueltasConDemoraEnOficinaEntity.class);\n \n em.persist(entity);\n data.add(entity);\n }\n }",
"@Override\r\n\tpublic void atualizar(Tipo tipo) {\n String sql = \"update tipos_servicos set nome = ? \"\r\n + \"where id = ?\";\r\n try {\r\n stmt = conn.prepareStatement(sql);\r\n \r\n stmt.setString(1, tipo.getNome());\r\n \r\n \r\n stmt.setInt(3, tipo.getId());\r\n \r\n stmt.executeUpdate();\r\n \r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n }\r\n\t}",
"@PostMapping(\"/demande\")\n public Demande addDemande(@RequestBody Demande demande)\n {\n try\n {\n \n /* ajout traitement spécial :\n * setDateCreate setCreatedBy\n * */\n demande.setDateOp(LocalDateTime.now());\n demande.setUtil(\"admin\");\n demande.setOp(\"A\"); // D,E\n demande= demandeRepository.save(demande);\n }\n catch(Exception e)\n {\n \n }\n return demande;\n }",
"@Override\n\tpublic void updatePanierMerge(Panier p) {\n\t\tSessionFactory factory = DBConnexion.getSessionFactory();\n\t\tSession session = factory.getCurrentSession();\n\t\ttry {\n\t\t\tsession.beginTransaction();\n\t\t\tPanier p1 = (Panier) session.merge(p);\n\t\t\tsession.getTransaction().commit();\n\t\t} finally {\n\t\t\tfactory.close();\n\t\t}\n\t}",
"int insertSelective(Tipologia record);",
"private void insertData() {\n compra = factory.manufacturePojo(CompraVentaEntity.class);\n compra.setId(1L);\n compra.setQuejasReclamos(new ArrayList<>());\n em.persist(compra);\n\n for (int i = 0; i < 3; i++) {\n QuejasReclamosEntity entity = factory.manufacturePojo(QuejasReclamosEntity.class);\n entity.setCompraVenta(compra);\n em.persist(entity);\n data.add(entity);\n compra.getQuejasReclamos().add(entity);\n }\n }",
"public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }",
"private void insertData() {\n \n for (int i = 0; i < 3; i++) {\n ClienteEntity editorial = factory.manufacturePojo(ClienteEntity.class);\n em.persist(editorial);\n ClienteData.add(editorial);\n }\n \n for (int i = 0; i < 3; i++) {\n ContratoPaseoEntity paseo = factory.manufacturePojo(ContratoPaseoEntity.class);\n em.persist(paseo);\n contratoPaseoData.add(paseo);\n }\n \n for (int i = 0; i < 3; i++) {\n ContratoHotelEntity editorial = factory.manufacturePojo(ContratoHotelEntity.class);\n em.persist(editorial);\n contratoHotelData.add(editorial);\n }\n \n for (int i = 0; i < 3; i++) {\n PerroEntity perro = factory.manufacturePojo(PerroEntity.class);\n //perro.setCliente(ClienteData.get(0));\n //perro.setEstadias((List<ContratoHotelEntity>) contratoHotelData.get(0));\n //perro.setPaseos((List<ContratoPaseoEntity>) contratoPaseoData.get(0));\n em.persist(perro);\n Perrodata.add(perro);\n }\n\n }",
"private void insertData() \n {\n for (int i = 0; i < 3; i++) {\n TarjetaPrepagoEntity entity = factory.manufacturePojo(TarjetaPrepagoEntity.class);\n em.persist(entity);\n data.add(entity);\n }\n for(int i = 0; i < 3; i++)\n {\n PagoEntity pagos = factory.manufacturePojo(PagoEntity.class);\n em.persist(pagos);\n pagosData.add(pagos);\n\n }\n \n data.get(2).setSaldo(0.0);\n data.get(2).setPuntos(0.0);\n \n double valor = (Math.random()+1) *100;\n data.get(0).setSaldo(valor);\n data.get(0).setPuntos(valor); \n data.get(1).setSaldo(valor);\n data.get(1).setPuntos(valor);\n \n }",
"public void actualizar(Dia dia) {\n Session session = sessionFactory.openSession();\n //la transaccion a relizar\n Transaction tx = null;\n try {\n tx = session.beginTransaction();\n //actualizar el Dia\n session.update(dia);\n \n tx.commit();\n }\n catch (Exception e) {\n //Se regresa a un estado consistente \n if (tx!=null){ \n tx.rollback();\n }\n e.printStackTrace(); \n }\n finally {\n //cerramos siempre la sesion\n session.close();\n }\n}",
"public boolean ModificarProducto(int id,String nom,String fab,int cant,int precio,String desc,int sucursal) {\n boolean status=false;\n int res =0;\n try {\n conectar(); \n res=state.executeUpdate(\"update producto set nombreproducto='\"+nom+\"', fabricante='\"+fab+\"',cantidad=\"+cant+\",precio=\"+precio+\",descripcion='\"+desc+\"',idsucursal=\"+sucursal+\" where idproducto=\"+id+\";\");\n if(res>=1)\n {\n status=true;\n }\n con.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return status;\n }",
"public static void Enitityinsert (int id,String name,String FQN, String container,int potincy,String directtype,String table )\n { \n \n \ttry \n { \n Statement stmt=null; \n ResultSet res=null; \n Class.forName(\"com.mysql.jdbc.Driver\"); \n Connection conn = DriverManager.getConnection(sqldatabase,mysqluser,mysqlpassword); \n stmt = (Statement)conn.createStatement(); \n res= stmt.executeQuery(\"SELECT * from entity \"); \n\n\n // 增加数据\n Statement stm = (Statement) conn.createStatement();// 提交查巡\n String sql = \"select * from entity\";\n ResultSet rs = stm.executeQuery(sql);// 取得查巡結果\n// sql = \"insert into entity (id,name,FQN,container) values ('6','AccountType','Example2.O2.AccountType','Example2.O10')\";\n \n int n = stm.executeUpdate(\"insert into \"+table+\"(id,FQN,name,container,potincy,direct_type) values (\"+\"'\"+id+\"'\"+\",\"+\"'\"+FQN+\"'\"+\",\"+\"'\"+name+\"'\"+\",\"+\"'\"+container+\"'\"+\",\"+\"'\"+potincy+\"'\"+\",\"+\"'\"+directtype+\"'\"+\")\"); // 增加数据 \n if (n > 0) {\n// JOptionPane.showMessageDialog(null, \"成功\");\n \n \n } else {\n// JOptionPane.showMessageDialog(null, \"失败\");\n }\n //增加数据结束\n\n while (res.next()) \n { \n\n } \n } \n \n catch(Exception ex) \n { \n ex.printStackTrace(); \n } \n}",
"int insert(Kaiwa record);",
"private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ViajeroEntity entity = factory.manufacturePojo(ViajeroEntity.class);\n\n em.persist(entity);\n data.add(entity);\n }\n }",
"@Transactional\n DataRistorante insert(DataRistorante risto);",
"@Override\n public CerereDePrietenie save(CerereDePrietenie entity) {\n\n String SQL = \"INSERT INTO cereredeprietenie(id, id_1,id_2,status,datac) VALUES(?,?,?,?,?)\";\n\n long id = 0;\n\n\n try (Connection conn = connect();\n PreparedStatement pstmt = conn.prepareStatement(SQL,\n Statement.RETURN_GENERATED_KEYS)) {\n\n\n pstmt.setInt(1, Math.toIntExact(entity.getId()));\n pstmt.setInt(2, Math.toIntExact(entity.getTrimite().getId()));\n pstmt.setInt(3, Math.toIntExact(entity.getPrimeste().getId()));\n pstmt.setString(4, entity.getStatus());\n pstmt.setObject(5, entity.getData());\n\n\n int affectedRows = pstmt.executeUpdate();\n // check the affected rows\n if (affectedRows > 0) {\n // get the ID back\n try (ResultSet rs = pstmt.getGeneratedKeys()) {\n if (rs.next()) {\n id = rs.getLong(1);\n }\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n }\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n\n\n return entity;\n\n }",
"public boolean insertarItem53(Mgestion_resul dts) {\n \n Item53 = \"update item set cumple=?, justifi=?, aplica=? where idItem=53\";\n Ver84 = \"update verificacion set cumplimiento=? where idverificacion=84\";\n \n \n try {\n\n PreparedStatement pst = cn.prepareStatement(Item53);\n PreparedStatement pst2 = cn.prepareStatement(Ver84);\n \n \n\n pst.setString(1, dts.getI531());\n pst.setString(2, dts.getJ531());\n pst.setString(3, dts.getA531());\n \n pst2.setString(1, dts.getV531());\n \n \n int n = pst.executeUpdate();\n\n if (n != 0) {\n int n2 = pst2.executeUpdate();\n\n if (n2 != 0) {\n return true; \n\n } else {\n return false;\n }\n\n } else {\n return false;\n }\n\n } catch (Exception e) {\n JOptionPane.showConfirmDialog(null, e);\n return false;\n }\n \n}",
"public void performTambah() {\n\n dialogEntry.postInit();\n dialogEntry.clearFields();\n dialogEntry.setRowToBeEdited(-1);\n //dialogEntry.clearFields ();\n dialogEntry.show(true); // -- modal dialog ya, jd harus menunggu..\n //if (isDirty()) {\n loadTable();\n // TODO : select last item added\n //}\n }",
"int insertSelective(ParUsuarios record);",
"int insertSelective(GoodsPo record);",
"int insertSelective(Prueba record);",
"@Override\n\tpublic void inativar(EntidadeDominio entidade) {\n\t\tPreparedStatement pst=null;\n\t\tLivro livro = (Livro)entidade;\t\t\n\t\ttry {\n\t\t\topenConnection();\n\t\t\tconnection.setAutoCommit(false);\t\t\t\n\t\t\t\t\t\n\t\t\tStringBuilder sql = new StringBuilder();\t\t\t\n\t\t\tsql.append(\"UPDATE livro SET livStatus=?\");\n\t\t\tsql.append(\"WHERE idlivro=?\");\t\t\n\t\t\t\n\t\t\t\t\t\n\t\t\tpst = connection.prepareStatement(sql.toString());\n\t\t\tpst.setString(1, \"INATIVADO\");\n\t\t\tpst.setInt(2, livro.getId());\n\t\t\tpst.executeUpdate();\t\t\t\n\t\t\tconnection.commit();\t\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\ttry {\n\t\t\t\tconnection.rollback();\n\t\t\t} catch (SQLException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\te.printStackTrace();\t\t\t\n\t\t}finally{\n\t\t\ttry {\n\t\t\t\tpst.close();\n\t\t\t\tconnection.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//SEGUNDA PARTE\n\t\t\t\ttry {\n\t\t\t\t\topenConnection();\n\t\t\t\t\tconnection.setAutoCommit(false);\t\t\t\n\t\t\t\t\t//FALTA COLOCAR EDITORA\t\t\n\t\t\t\t\tStringBuilder sql = new StringBuilder();\n\t\t\t\t\tSystem.out.println(livro.getId());\n\t\t\t\t\tSystem.out.println(livro.getJustificativa());\n\t\t\t\t\tSystem.out.println(livro.getIdCatJustificativa());\n\t\t\t\t\tsql.append(\"INSERT INTO justificativainativar (id_livro , justificativa, id_Inativar) VALUES (?,?,?)\");\t\t\n\t\t\t\t\tpst = connection.prepareStatement(sql.toString());\n\t\t\t\t\tpst.setInt(1, livro.getId());\n\t\t\t\t\tpst.setString(2,livro.getJustificativa());\n\t\t\t\t\tpst.setInt(3,livro.getIdCatJustificativa());\n\t\t\t\t\tpst.executeUpdate();\n\t\t\t\t\tconnection.commit();\t\t\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconnection.rollback();\n\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\te.printStackTrace();\t\t\t\n\t\t\t\t}finally{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpst.close();\n\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\n\t}",
"@Dao\npublic interface sekolahDAO {\n\n @Query(\"SELECT * FROM Sekolah\")\n List<Sekolah>getAll();\n\n// @Query(\"SELECT * FROM Sekolah WHERE NPSN LIKE :NPSN AND nama_sekolah LIKE :nama_dusun AND bentuk_pendidikan LIKE :bentuk_pendidikan AND status_lembaga LIKE :status_lembaga AND sk_izin_operasional LIKE :sk_izin_operasional AND tanggal_sk_izin_operasional LIKE :tanggal_sk_izin_operasional\")\n// Sekolah findByName(Integer NPSN, String nama_sekolah, String bentuk_pendidikan, String status_lembaga, String sk_izin_operasional, Date tanggal_sk_izin_operasional);\n\n @Query(\"SELECT COUNT (NPSN) FROM Sekolah\")\n int getAllCount();\n\n @Query(\"UPDATE Sekolah SET alamat = :alamat, nama_dusun = :nama_dusun, provinsi = :provinsi, kecamatan = :kecamatan, kabupaten = :kabupaten, nomor_telpon = :nomor_telpon, email = :email\")\n void update(String alamat,String nama_dusun, String provinsi, String kecamatan, String kabupaten, Integer nomor_telpon, String email);\n\n @Insert\n void insertAll(Sekolah sekolah);\n\n @Delete\n public void deleteSekolah(Sekolah NPSN);\n\n @Update\n public void update(Sekolah sekolah);\n\n @Delete\n public void deleteAll(Sekolah user1, Sekolah user2);\n\n\n}",
"int insert(countrylanguage record);",
"int insertSelective(Kaiwa record);",
"@Override\r\n\tpublic void save(TrDetailPenjualan trDetailPenjualan) {\n\t\tString query = \"insert into TR_DETAIL_PENJUALAN\"\r\n\t\t\t\t+ \"(KODE_DETAIL,QTY,SUBTOTAL,DISKON,HARGA_SATUAN,KODE_BARANG,NO_NOTA)\"\r\n\t\t\t\t+ \"values(?,?,?,?,?,?,?)\";\r\n\t\tConnection con = null;\r\n\t\tPreparedStatement ps = null;\r\n\t\ttry {\r\n\t\t\tcon = dataSource.getConnection();\r\n\t\t\tps = con.prepareStatement(query);\r\n\t\t\tps.setString(1, trDetailPenjualan.getKodeDetail());\r\n\t\t\tps.setInt(2, trDetailPenjualan.getQty());\r\n\t\t\tps.setInt(3, trDetailPenjualan.getSubtotal());\r\n\t\t\tps.setInt(4, trDetailPenjualan.getDiskon());\r\n\t\t\tps.setInt(5, trDetailPenjualan.getHargaSatuan());\r\n\t\t\tps.setString(6, trDetailPenjualan.getKodeBarang().getKodeBarang());\r\n\t\t\tps.setString(7, trDetailPenjualan.getNoNota().getNoNota());\r\n\r\n\t\t\tint out = ps.executeUpdate();\r\n\t\t\tif (out != 0) {\r\n\t\t\t\tSystem.out.println(\"sukses\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"failed\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tps.close();\r\n\t\t\t\tcon.close();\r\n\t\t\t} catch (SQLException 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}\r\n\t}",
"@Override\n\tpublic void update(Iscrizioni o)\n\t\t\tthrows ClassNotFoundException, SQLException, NotHandledTypeException, NamingException, ParseException {\n\t\tem.merge(o);\n//\t\tObject[] campi = { o.getIdDipendente(), o.getIdDocente(), o.getIdCorso(), o.getIdIscrizione() };\n//\t\tString sql = \"UPDATE `iscrizioni` SET `idDipendente`=?,`idDocente`=?,`idCorso`=? WHERE `idIscrizione`=?\";\n//\t\tDBHandler dbHandler = new DBHandler();\n//\t\tdbHandler.sql(sql, campi);\n\t}",
"private void insertData() {\r\n PodamFactory factory = new PodamFactoryImpl();\r\n for (int i = 0; i < 3; i++) {\r\n MonitoriaEntity entity = factory.manufacturePojo(MonitoriaEntity.class);\r\n\r\n em.persist(entity);\r\n data.add(entity);\r\n }\r\n }",
"public String inserter(String FKprofile,Map formData){\n id=formData.get(\"username\").toString();\r\n username=formData.get(\"username\").toString();\r\n password=formData.get(\"password\").toString();\r\n loginkey=formData.get(\"loginkey\").toString();\r\n strprofileid=formData.get(\"profileid\").toString();\r\n strstatusid=formData.get(\"statusid\").toString();\r\n \r\n //CONVERT ALL THE IDS FROM STRING TO INTEGER\r\n statusid=Integer.valueOf(strstatusid);\r\n profileid=Integer.valueOf(strprofileid);\r\n \r\n factory= SessionFactoryHelper.getsysDBUserSessionFactory(); \r\n Session session = factory.openSession();\r\n Transaction tx = null;\r\n Integer recordID = null;\r\n\r\n try{\r\n factory = new Configuration().configure().buildSessionFactory();\r\n }catch (Throwable ex) { \r\n feedback=\"Error\";\r\n }\r\n try{\r\n tx = session.beginTransaction();\r\n\r\n ConAuth dataModel = new ConAuth(); \r\n dataModel.setUsername(username);\r\n dataModel.setPassword(password);\r\n dataModel.setLoginKey(loginkey); \r\n ConProfiles profileRec = (ConProfiles)session.get(ConProfiles.class,profileid); \r\n dataModel.setConProfiles(profileRec);\r\n AllStatus statusRec = (AllStatus)session.get(AllStatus.class,statusid); \r\n dataModel.setAllStatus(statusRec);\r\n ConUser userRec=(ConUser)session.get(ConUser.class,1);\r\n dataModel.setConUserByUserId(userRec);\r\n ConUser writebyRec=(ConUser)session.get(ConUser.class,1);\r\n dataModel.setConUserByWritebyId(writebyRec);\r\n ConUser createbyRec=(ConUser)session.get(ConUser.class,1);\r\n dataModel.setConUserByCreatebyId(createbyRec); \r\n ConCompany companyRec=(ConCompany)session.get(ConCompany.class,1);\r\n dataModel.setConCompany(companyRec);\r\n ConLife lifeRec = (ConLife)session.get(ConLife.class,1); \r\n dataModel.setConLife(lifeRec); \r\n \r\n \r\n feedback=\"Saving Succesful\";\r\n recordID = (Integer) session.save(dataModel); \r\n tx.commit();\r\n\r\n }catch (HibernateException e) {\r\n if (tx!=null) tx.rollback();\r\n // feedback=e.toString();\r\n feedback=\"Saving Failed\"+e.toString(); \r\n }finally {\r\n session.close(); \r\n }\r\n\r\n \r\n return feedback;\r\n }",
"int insert(Prueba record);",
"int insert(ParUsuarios record);",
"@Test\n public void updateTest8() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCanoa(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isCanoa() ,\"Should return true if update Servizio\");\n }",
"private void insertData() {\n for (int i = 0; i < 3; i++) {\n PodamFactory factory = new PodamFactoryImpl();\n VisitaEntity entity = factory.manufacturePojo(VisitaEntity.class);\n em.persist(entity);\n data.add(entity);\n }\n }",
"private void inseredados() {\n // Insert Funcionários\n\n FuncionarioDAO daoF = new FuncionarioDAO();\n Funcionario func1 = new Funcionario();\n func1.setCpf(\"08654683970\");\n func1.setDataNasc(new Date(\"27/04/1992\"));\n func1.setEstadoCivil(\"Solteiro\");\n func1.setFuncao(\"Garcom\");\n func1.setNome(\"Eduardo Kempf\");\n func1.setRg(\"10.538.191-3\");\n func1.setSalario(1000);\n daoF.persisteObjeto(func1);\n\n Funcionario func2 = new Funcionario();\n func2.setCpf(\"08731628974\");\n func2.setDataNasc(new Date(\"21/08/1992\"));\n func2.setEstadoCivil(\"Solteira\");\n func2.setFuncao(\"Caixa\");\n func2.setNome(\"Juliana Iora\");\n func2.setRg(\"10.550.749-6\");\n func2.setSalario(1200);\n daoF.persisteObjeto(func2);\n\n Funcionario func3 = new Funcionario();\n func3.setCpf(\"08731628974\");\n func3.setDataNasc(new Date(\"03/05/1989\"));\n func3.setEstadoCivil(\"Solteiro\");\n func3.setFuncao(\"Gerente\");\n func3.setNome(\"joão da Silva\");\n func3.setRg(\"05.480.749-2\");\n func3.setSalario(3000);\n daoF.persisteObjeto(func3);\n\n Funcionario func4 = new Funcionario();\n func4.setCpf(\"01048437990\");\n func4.setDataNasc(new Date(\"13/04/1988\"));\n func4.setEstadoCivil(\"Solteiro\");\n func4.setFuncao(\"Garçon\");\n func4.setNome(\"Luiz Fernandodos Santos\");\n func4.setRg(\"9.777.688-1\");\n func4.setSalario(1000);\n daoF.persisteObjeto(func4);\n\n TransactionManager.beginTransaction();\n Funcionario func5 = new Funcionario();\n func5.setCpf(\"01048437990\");\n func5.setDataNasc(new Date(\"13/04/1978\"));\n func5.setEstadoCivil(\"Casada\");\n func5.setFuncao(\"Cozinheira\");\n func5.setNome(\"Sofia Gomes\");\n func5.setRg(\"3.757.688-8\");\n func5.setSalario(1500);\n daoF.persisteObjeto(func5);\n\n // Insert Bebidas\n BebidaDAO daoB = new BebidaDAO();\n Bebida bebi1 = new Bebida();\n bebi1.setNome(\"Coca Cola\");\n bebi1.setPreco(3.25);\n bebi1.setQtde(1000);\n bebi1.setTipo(\"Refrigerante\");\n bebi1.setDataValidade(new Date(\"27/04/2014\"));\n daoB.persisteObjeto(bebi1);\n\n Bebida bebi2 = new Bebida();\n bebi2.setNome(\"Cerveja\");\n bebi2.setPreco(4.80);\n bebi2.setQtde(1000);\n bebi2.setTipo(\"Alcoolica\");\n bebi2.setDataValidade(new Date(\"27/11/2013\"));\n daoB.persisteObjeto(bebi2);\n\n Bebida bebi3 = new Bebida();\n bebi3.setNome(\"Guaraná Antatica\");\n bebi3.setPreco(3.25);\n bebi3.setQtde(800);\n bebi3.setTipo(\"Refrigerante\");\n bebi3.setDataValidade(new Date(\"27/02/2014\"));\n daoB.persisteObjeto(bebi3);\n\n Bebida bebi4 = new Bebida();\n bebi4.setNome(\"Água com gás\");\n bebi4.setPreco(2.75);\n bebi4.setQtde(500);\n bebi4.setTipo(\"Refrigerante\");\n bebi4.setDataValidade(new Date(\"27/08/2013\"));\n daoB.persisteObjeto(bebi4);\n\n Bebida bebi5 = new Bebida();\n bebi5.setNome(\"Whisky\");\n bebi5.setPreco(3.25);\n bebi5.setQtde(1000);\n bebi5.setTipo(\"Alcoolica\");\n bebi5.setDataValidade(new Date(\"03/05/2016\"));\n daoB.persisteObjeto(bebi5);\n\n // Insert Comidas\n ComidaDAO daoC = new ComidaDAO();\n Comida comi1 = new Comida();\n comi1.setNome(\"Batata\");\n comi1.setQuantidade(30);\n comi1.setTipo(\"Kilograma\");\n comi1.setDataValidade(new Date(\"27/04/2013\"));\n daoC.persisteObjeto(comi1);\n\n Comida comi2 = new Comida();\n comi2.setNome(\"Frango\");\n comi2.setQuantidade(15);\n comi2.setTipo(\"Kilograma\");\n comi2.setDataValidade(new Date(\"22/04/2013\"));\n daoC.persisteObjeto(comi2);\n\n Comida comi3 = new Comida();\n comi3.setNome(\"Mussarela\");\n comi3.setQuantidade(15000);\n comi3.setTipo(\"Grama\");\n comi3.setDataValidade(new Date(\"18/04/2013\"));\n daoC.persisteObjeto(comi3);\n\n Comida comi4 = new Comida();\n comi4.setNome(\"Presunto\");\n comi4.setQuantidade(10000);\n comi4.setTipo(\"Grama\");\n comi4.setDataValidade(new Date(\"18/04/2013\"));\n daoC.persisteObjeto(comi4);\n\n Comida comi5 = new Comida();\n comi5.setNome(\"Bife\");\n comi5.setQuantidade(25);\n comi5.setTipo(\"Kilograma\");\n comi5.setDataValidade(new Date(\"22/04/2013\"));\n daoC.persisteObjeto(comi5);\n\n\n // Insert Mesas\n MesaDAO daoM = new MesaDAO();\n Mesa mes1 = new Mesa();\n mes1.setCapacidade(4);\n mes1.setStatus(true);\n daoM.persisteObjeto(mes1);\n\n Mesa mes2 = new Mesa();\n mes2.setCapacidade(4);\n mes2.setStatus(true);\n daoM.persisteObjeto(mes2);\n\n Mesa mes3 = new Mesa();\n mes3.setCapacidade(6);\n mes3.setStatus(true);\n daoM.persisteObjeto(mes3);\n\n Mesa mes4 = new Mesa();\n mes4.setCapacidade(6);\n mes4.setStatus(true);\n daoM.persisteObjeto(mes4);\n\n Mesa mes5 = new Mesa();\n mes5.setCapacidade(8);\n mes5.setStatus(true);\n daoM.persisteObjeto(mes5);\n\n // Insert Pratos\n PratoDAO daoPr = new PratoDAO();\n Prato prat1 = new Prato();\n List<Comida> comI = new ArrayList<Comida>();\n comI.add(comi1);\n prat1.setNome(\"Porção de Batata\");\n prat1.setIngredientes(comI);\n prat1.setQuantidadePorcoes(3);\n prat1.setPreco(13.00);\n daoPr.persisteObjeto(prat1);\n\n Prato prat2 = new Prato();\n List<Comida> comII = new ArrayList<Comida>();\n comII.add(comi2);\n prat2.setNome(\"Porção de Frango\");\n prat2.setIngredientes(comII);\n prat2.setQuantidadePorcoes(5);\n prat2.setPreco(16.00);\n daoPr.persisteObjeto(prat2);\n\n Prato prat3 = new Prato();\n List<Comida> comIII = new ArrayList<Comida>();\n comIII.add(comi1);\n comIII.add(comi3);\n comIII.add(comi4);\n prat3.setNome(\"Batata Recheada\");\n prat3.setIngredientes(comIII);\n prat3.setQuantidadePorcoes(3);\n prat3.setPreco(13.00);\n daoPr.persisteObjeto(prat3);\n\n Prato prat4 = new Prato();\n List<Comida> comIV = new ArrayList<Comida>();\n comIV.add(comi2);\n comIV.add(comi3);\n comIV.add(comi4);\n prat4.setNome(\"Lanche\");\n prat4.setIngredientes(comIV);\n prat4.setQuantidadePorcoes(3);\n prat4.setPreco(13.00);\n daoPr.persisteObjeto(prat4);\n\n Prato prat5 = new Prato();\n prat5.setNome(\"Porção especial\");\n List<Comida> comV = new ArrayList<Comida>();\n comV.add(comi1);\n comV.add(comi3);\n comV.add(comi4);\n prat5.setIngredientes(comV);\n prat5.setQuantidadePorcoes(3);\n prat5.setPreco(13.00);\n daoPr.persisteObjeto(prat5);\n\n // Insert Pedidos Bebidas\n PedidoBebidaDAO daoPB = new PedidoBebidaDAO();\n PedidoBebida pb1 = new PedidoBebida();\n pb1.setPago(false);\n List<Bebida> bebI = new ArrayList<Bebida>();\n bebI.add(bebi1);\n bebI.add(bebi2);\n pb1.setBebidas(bebI);\n pb1.setIdFuncionario(func5);\n pb1.setIdMesa(mes5);\n daoPB.persisteObjeto(pb1);\n\n PedidoBebida pb2 = new PedidoBebida();\n pb2.setPago(false);\n List<Bebida> bebII = new ArrayList<Bebida>();\n bebII.add(bebi1);\n bebII.add(bebi4);\n pb2.setBebidas(bebII);\n pb2.setIdFuncionario(func4);\n pb2.setIdMesa(mes4);\n daoPB.persisteObjeto(pb2);\n\n TransactionManager.beginTransaction();\n PedidoBebida pb3 = new PedidoBebida();\n pb3.setPago(false);\n List<Bebida> bebIII = new ArrayList<Bebida>();\n bebIII.add(bebi2);\n bebIII.add(bebi3);\n pb3.setBebidas(bebIII);\n pb3.setIdFuncionario(func2);\n pb3.setIdMesa(mes2);\n daoPB.persisteObjeto(pb3);\n\n PedidoBebida pb4 = new PedidoBebida();\n pb4.setPago(false);\n List<Bebida> bebIV = new ArrayList<Bebida>();\n bebIV.add(bebi2);\n bebIV.add(bebi5);\n pb4.setBebidas(bebIV);\n pb4.setIdFuncionario(func3);\n pb4.setIdMesa(mes3);\n daoPB.persisteObjeto(pb4);\n\n PedidoBebida pb5 = new PedidoBebida();\n pb5.setPago(false);\n List<Bebida> bebV = new ArrayList<Bebida>();\n bebV.add(bebi1);\n bebV.add(bebi2);\n bebV.add(bebi3);\n pb5.setBebidas(bebV);\n pb5.setIdFuncionario(func1);\n pb5.setIdMesa(mes5);\n daoPB.persisteObjeto(pb5);\n\n // Insert Pedidos Pratos\n PedidoPratoDAO daoPP = new PedidoPratoDAO();\n PedidoPrato pp1 = new PedidoPrato();\n pp1.setPago(false);\n List<Prato> praI = new ArrayList<Prato>();\n praI.add(prat1);\n praI.add(prat2);\n praI.add(prat3);\n pp1.setPratos(praI);\n pp1.setIdFuncionario(func5);\n pp1.setIdMesa(mes5);\n daoPP.persisteObjeto(pp1);\n\n PedidoPrato pp2 = new PedidoPrato();\n pp2.setPago(false);\n List<Prato> praII = new ArrayList<Prato>();\n praII.add(prat1);\n praII.add(prat3);\n pp2.setPratos(praII);\n pp2.setIdFuncionario(func4);\n pp2.setIdMesa(mes4);\n daoPP.persisteObjeto(pp2);\n\n PedidoPrato pp3 = new PedidoPrato();\n pp3.setPago(false);\n List<Prato> praIII = new ArrayList<Prato>();\n praIII.add(prat1);\n praIII.add(prat2);\n pp3.setPratos(praIII);\n pp3.setIdFuncionario(func2);\n pp3.setIdMesa(mes2);\n daoPP.persisteObjeto(pp3);\n\n PedidoPrato pp4 = new PedidoPrato();\n pp4.setPago(false);\n List<Prato> praIV = new ArrayList<Prato>();\n praIV.add(prat1);\n praIV.add(prat3);\n pp4.setPratos(praIV);\n pp4.setIdFuncionario(func3);\n pp4.setIdMesa(mes3);\n daoPP.persisteObjeto(pp4);\n\n PedidoPrato pp5 = new PedidoPrato();\n pp5.setPago(false);\n List<Prato> praV = new ArrayList<Prato>();\n praV.add(prat1);\n praV.add(prat2);\n praV.add(prat3);\n praV.add(prat4);\n pp5.setPratos(praV);\n pp5.setIdFuncionario(func1);\n pp5.setIdMesa(mes5);\n daoPP.persisteObjeto(pp5);\n\n }",
"int updateByPrimaryKey(Tipologia record);",
"@RequestMapping(value = \"/update\", method = RequestMethod.POST) \n public RedirectView saveUpdate(@RequestParam(required = true) Long id, String isbn, String judul, String penulis, String penerbit, \n String tahun_terbit, String jenis_cover, String jml_hal, String bahasa, String deskripsi, String gambar, \n int harga, int stok, Long category){ //RequestParam disini kita tulis name inputannnya dan type datanya apa.\n \n //Buku buku1 = new Buku(id, isbn, judul, penulis, penerbit, tahun_terbit, jenis_cover,\n //jml_hal, bahasa, deskripsi, gambar, harga, stok, new Category(category));\n //this.bukuService.update(buku1);\n //atao\n this.bukuService.update(new Buku(id, isbn, judul, penulis, penerbit, tahun_terbit, jenis_cover,\n jml_hal, bahasa, deskripsi, gambar, harga, stok, new Category(category)));\n return new RedirectView(\"/admin/buku/list\", true); \n }",
"int insertSelective(Movimiento record);",
"public static void Binaryconnectioninsert(int id,String FQN,String name, String container,int potency,String directtype,String label ,String particpant1,\n\t\t\t \t\tString particpant2, String roleName1 ,String roleName2,String lower1, String lower2 ,\tString upper1 ,String upper2 , \n\t\t\t \t\tString navigalbeTo1, String navigableTo2,String table )\n\t\t\t { \n\t\t\t \n\t\t\t \ttry \n\t\t\t { \n\t\t\t Statement stmt=null; \n\t\t\t ResultSet res=null; \n\t\t\t Class.forName(\"com.mysql.jdbc.Driver\"); \n\t\t\t Connection conn = DriverManager.getConnection(sqldatabase,mysqluser,mysqlpassword); \n\t\t\t stmt = (Statement)conn.createStatement(); \n\t\t\t res= stmt.executeQuery(\"SELECT * from binaryconnection\"); \n\n\n\t\t\t // 增加数据\n\t\t\t Statement stm = (Statement) conn.createStatement();// 提交查巡\n\t\t\t String sql = \"select * from binaryconnection\";\n\t\t\t ResultSet rs = stm.executeQuery(sql);// 取得查巡結果\n//\t\t\t sql = \"insert into entity (id,name,FQN,container) values ('6','AccountType','Example2.O2.AccountType','Example2.O10')\";\n\t\t\t \n\t\t\t int n = stm.executeUpdate(\"insert into \"+table+\"(id,FQN,name, container,potency,direct_type,label ,particpant1, particpant2, roleName1 ,roleName2, lower1, lower2 ,upper1 ,upper2 ,navigalbeTo1, navigableTo2) values (\"\n\t\t\t +\"'\"+id+\"'\"+\",\"+\"'\"+FQN+\"'\"+\",\"+\"'\"+name+\"'\"+\",\"+\"'\"+container+\"'\"+\",\"+\"'\"+potency+\"'\"+\",\"+\"'\"+directtype+\"'\"+\",\"+\"'\"+label+\"'\"+\",\"+\"'\"+particpant1+\"'\"+\",\"+\"'\"+particpant2+\"'\"+\",\"+\"'\"+roleName1+\"'\"+\",\"+\"'\"+roleName2+\"'\"+\",\"+\"'\"+lower1+\"'\"+\",\"+\"'\"+lower2+\"'\"+\",\"+\"'\"+upper1+\"'\"+\",\"+\"'\"+upper2+\"'\"+\",\"+\"'\"+navigalbeTo1+\"'\"+\",\"+\"'\"+navigableTo2+\"'\"+\")\"); // 增加数据 \n\t\t\t if (n > 0) {\n//\t\t\t JOptionPane.showMessageDialog(null, \"成功\");\n\t\t\t \n\t\t\t \n\t\t\t } else {\n//\t\t\t JOptionPane.showMessageDialog(null, \"失败\");\n\t\t\t }\n\t\t\t //增加数据结束\n\n\t\t\t while (res.next()) \n\t\t\t { \n\t\n\t\t\t } \n\t\t\t } \n\t\t\t \n\t\t\t catch(Exception ex) \n\t\t\t { \n\t\t\t ex.printStackTrace(); \n\t\t\t } \n\t\t\t}",
"@Test\r\n public void testUpdate() throws Exception {\r\n System.out.println(\"update\");\r\n Bureau obj = new Bureau(0,\"Test\",\"000000000\",\"\");\r\n BureauDAO instance = new BureauDAO();\r\n instance.setConnection(dbConnect);\r\n obj = instance.create(obj);\r\n obj.setSigle(\"Test2\");\r\n //etc\r\n obj.setTel(\"000000001\");\r\n //etc\r\n Bureau expResult=obj;\r\n Bureau result = instance.update(obj);\r\n assertEquals(expResult.getSigle(), result.getSigle());\r\n //etc\r\n assertEquals(expResult.getTel(), result.getTel());\r\n //etc\r\n instance.delete(obj);\r\n //TODO verifier que si met à jour vers un doublé sigle-tel déjà existant, on a une exception\r\n }",
"public void save()throws Exception{\n if(!pname1.getText().isEmpty() && !qty1.getText().isEmpty() && !prc1.getText().isEmpty() && !rsp1.getText().isEmpty() ){\r\n s_notif1.setId(\"hide\");\r\n ArrayList<Product> ar = new ArrayList<>();\r\n com.mysql.jdbc.Connection conn = db.getConnection();\r\n Statement stm = conn.createStatement();\r\n int rs = stm.executeUpdate(\"UPDATE products SET \"\r\n + \"name='\"+pname1.getText()+\"', \"\r\n + \"qty='\"+qty1.getText()+\"', \"\r\n + \"price='\"+prc1.getText()+\"',\"\r\n + \"re_stock_point='\"+rsp1.getText()+\"' WHERE ID ='\"+S_ID+\"';\");\r\n if(rs > 0){\r\n s_notif1.setId(\"show\");\r\n }\r\n }\r\n loadData();\r\n }",
"boolean agregarIngreso(Ingreso i) {\n boolean hecho = false;\n try {\n operacion = ayudar.beginTransaction();\n ayudar.save(i);\n operacion.commit();\n } catch (Exception e) {\n operacion.rollback();\n System.out.println(e);\n }\n return hecho;\n }",
"int insert(GoodsPo record);",
"int insert(DashboardGoods record);",
"int insert(Movimiento record);",
"@Override\n public int update(DataDict stu)\n {\n int rtn = 0;\n try\n {\n String sql = \"update data_dict set \" + \" dict_parent_id =\" + stu.getSuperId() + \", \" + \" dict_index = \"\n + stu.getIndex() + \", \" + \" dict_name = '\" + stu.getName() + \"', \" + \" dict_value = '\"\n + stu.getValue() + \"' \";\n\n sql += \" where dict_id = \" + stu.getId();\n DBUtil db = new DBUtil();\n db.openConnection();\n rtn = db.execCommand(sql);\n db.close();\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n return rtn;\n }",
"@Override\r\n public boolean insert(Anggota anggota) {\r\n// boolean flag = false;\r\n// try {\r\n//\r\n// CallableStatement cs = connection.prepareCall(\"{ CALL insAngs(?,?) }\");\r\n// cs.setString(1, angsuranPinjam.getKdAngsuran());\r\n// cs.setString(2, angsuranPinjam.getKdAnggotaP());\r\n// cs.executeUpdate();\r\n// flag = true;\r\n// } catch (SQLException ex) {\r\n// Logger.getLogger(AnggotaDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n//\r\n// }\r\n//\r\n// return flag;\r\n\r\n boolean flag = false;\r\n try {\r\n CallableStatement cs = connection.prepareCall(\"{ CALL getAutoKDAgt(?,?,?) }\");\r\n cs.setString(1, anggota.getNmAnggota());\r\n cs.setString(2, anggota.getTelepon());\r\n cs.setString(3, anggota.getAlamat());\r\n cs.executeUpdate();\r\n flag = true;\r\n } catch (SQLException ex) {\r\n Logger.getLogger(AnggotaDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return flag;\r\n }",
"public boolean modificarRegistro(int codigoCiclo, int codigoPlan, int codigoMeta, int codigoObjetivo, String descripcion, String justificacion, double valorMeta, double valorMinimo, double valorMaximo, String tipoMedicion, String estado, String fuenteDato, String aplicaEn, String unidadMedida, String tipoGrafica, String mes01, String mes02, String mes03, String mes04, String mes05, String mes06, String mes07, String mes08, String mes09, String mes10, String mes11, String mes12, Collection arrResponsables, Collection arrRecursos, String usuarioModificacion) {\n/* */ try {\n/* 810 */ String s = \"update cal_plan_metas set codigo_objetivo=\" + codigoObjetivo + \",\" + \" descripcion='\" + descripcion + \"',\" + \" justificacion='\" + justificacion + \"',\" + \" valor_meta=\" + valorMeta + \",\" + \" valor_minimo=\" + valorMinimo + \",\" + \" valor_maximo=\" + valorMaximo + \",\" + \" tipo_medicion='\" + tipoMedicion + \"',\" + \" estado='\" + estado + \"',\" + \" fuente_dato='\" + fuenteDato + \"',\" + \" aplica_en='\" + aplicaEn + \"',\" + \" unidad_medida='\" + unidadMedida + \"',\" + \" tipo_grafica='\" + tipoGrafica + \"',\" + \" mes01='\" + mes01 + \"',\" + \" mes02='\" + mes02 + \"',\" + \" mes03='\" + mes03 + \"',\" + \" mes04='\" + mes04 + \"',\" + \" mes05='\" + mes05 + \"',\" + \" mes06='\" + mes06 + \"',\" + \" mes07='\" + mes07 + \"',\" + \" mes08='\" + mes08 + \"',\" + \" mes09='\" + mes09 + \"',\" + \" mes10='\" + mes10 + \"',\" + \" mes11='\" + mes11 + \"',\" + \" mes12='\" + mes12 + \"',\" + \" fecha_modificacion=\" + Utilidades.getFechaBD() + \",\" + \" usuario_modificacion='\" + usuarioModificacion + \"'\" + \" where\" + \" codigo_meta=\" + codigoMeta + \" and codigo_ciclo=\" + codigoCiclo + \" and codigo_plan=\" + codigoPlan;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 842 */ boolean rta = this.dat.executeUpdate(s);\n/* */ \n/* */ \n/* */ \n/* 846 */ if (rta) {\n/* */ \n/* 848 */ s = \"update cal_plan_recursos_meta set estado='X', fecha_modificacion=\" + Utilidades.getFechaBD() + \",\" + \" usuario_modificacion='\" + usuarioModificacion + \"'\" + \" where\" + \" codigo_ciclo=\" + codigoCiclo + \" and codigo_plan=\" + codigoPlan + \" and codigo_meta=\" + codigoMeta;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 857 */ this.dat.executeUpdate(s);\n/* 858 */ Iterator iterator = arrRecursos.iterator();\n/* 859 */ while (iterator.hasNext()) {\n/* 860 */ Integer codigo = (Integer)iterator.next();\n/* 861 */ crearRecurso(codigoCiclo, codigoPlan, codigoMeta, codigo.intValue(), \"A\", usuarioModificacion);\n/* */ } \n/* */ \n/* 864 */ s = \"delete from cal_plan_recursos_meta where codigo_ciclo=\" + codigoCiclo + \" and codigo_plan=\" + codigoPlan + \" and codigo_meta=\" + codigoMeta + \" and estado='X'\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 870 */ this.dat.executeUpdate(s);\n/* */ \n/* 872 */ s = \"update cal_plan_responsables_meta set estado='X', fecha_modificacion=\" + Utilidades.getFechaBD() + \",\" + \" usuario_modificacion='\" + usuarioModificacion + \"'\" + \" where codigo_ciclo=\" + codigoCiclo + \" and codigo_plan=\" + codigoPlan + \" and codigo_meta=\" + codigoMeta;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 880 */ this.dat.executeUpdate(s);\n/* */ \n/* 882 */ Iterator iterator2 = arrResponsables.iterator();\n/* 883 */ while (iterator2.hasNext()) {\n/* 884 */ Integer codigo = (Integer)iterator2.next();\n/* 885 */ crearResponsable(codigoCiclo, codigoPlan, codigoMeta, codigo.intValue(), \"A\", usuarioModificacion);\n/* */ } \n/* */ \n/* 888 */ s = \"delete from cal_plan_responsables_meta where codigo_ciclo=\" + codigoCiclo + \" and codigo_plan=\" + codigoPlan + \" and codigo_meta=\" + codigoMeta + \" and estado='X'\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 895 */ this.dat.executeUpdate(s);\n/* */ } \n/* */ \n/* */ \n/* 899 */ return rta;\n/* */ }\n/* 901 */ catch (Exception e) {\n/* 902 */ e.printStackTrace();\n/* 903 */ Utilidades.writeError(\"CalMetasDAO:modificarRegistro \", e);\n/* */ \n/* 905 */ return false;\n/* */ } \n/* */ }",
"public interface GradeMapper {\n @Select(\"select * from grade\")\n public List<Grade> getByGradeNm();\n\n @Insert(\"insert into grade(grade_nm,teacher_id) values(#{gradeNm},#{teacherId})\")\n @Options(useGeneratedKeys=true,keyColumn=\"id\",keyProperty=\"id\")//设置id自增长\n public void save(Grade grade);\n}",
"private boolean crearResponsable(int codigoCiclo, int codigoPlan, int codigoMeta, int codigoResponsable, String estado, String usuarioInsercion) {\n/* */ try {\n/* 578 */ String s = \"select estado from cal_plan_responsables_meta r where r.codigo_ciclo=\" + codigoCiclo + \" and r.codigo_plan=\" + codigoPlan + \" and r.codigo_meta=\" + codigoMeta + \" and r.codigo_responsable=\" + codigoResponsable;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 585 */ this.dat.parseSql(s);\n/* 586 */ this.rs = this.dat.getResultSet();\n/* 587 */ if (this.rs.next()) {\n/* 588 */ s = \"update cal_plan_responsables_meta set estado='\" + estado + \"',\" + \" fecha_modificacion=\" + Utilidades.getFechaBD() + \",\" + \" usuario_modificacion='\" + usuarioInsercion + \"'\" + \" where codigo_ciclo=\" + codigoCiclo + \" and codigo_plan=\" + codigoPlan + \" and codigo_meta=\" + codigoMeta + \" and codigo_responsable=\" + codigoResponsable;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* */ \n/* */ \n/* */ \n/* 599 */ s = \"insert into cal_plan_responsables_meta (codigo_ciclo,codigo_plan,codigo_meta,codigo_responsable,estado,fecha_insercion,usuario_insercion) values (\" + codigoCiclo + \",\" + \"\" + codigoPlan + \",\" + \"\" + codigoMeta + \",\" + \"\" + codigoResponsable + \",\" + \"'\" + estado + \"',\" + \"\" + Utilidades.getFechaBD() + \",\" + \"'\" + usuarioInsercion + \"'\" + \")\";\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 617 */ return this.dat.executeUpdate(s);\n/* */ \n/* */ }\n/* 620 */ catch (Exception e) {\n/* 621 */ e.printStackTrace();\n/* 622 */ Utilidades.writeError(\"CalResponsablesMetaFactory:crearRegistro\", e);\n/* */ \n/* 624 */ return false;\n/* */ } \n/* */ }",
"@Override\n\tpublic int create(Prod_Unidadmed P) {\n\t\treturn jdbcTemplate.update(\"call PKG_ALM_CRUD_PRODUNIDADMED.pa_mat_produnidadmed_ins(?,?,?)\",P.getNombrelargo(),P.getNombrecorto(),P.getEstado());\n\t}",
"int insert(Orderall record);",
"@Override\r\n public boolean update(Pontuacao pontuacao) {\r\n Connection conexao = mysql.getConnection();\r\n try {\r\n PreparedStatement stm = conexao.prepareStatement(updateSQL);\r\n\r\n stm.setString(1, pontuacao.getData());\r\n stm.setInt(2, pontuacao.getP_rodada());\r\n stm.setInt(3, pontuacao.getS_rodada());\r\n stm.setInt(4, pontuacao.getT_rodada());\r\n stm.setInt(5, pontuacao.getTotal());\r\n stm.setInt(6, pontuacao.getIdcodigo());\r\n\r\n int registros = stm.executeUpdate();\r\n\r\n return registros > 0 ? true : false;\r\n\r\n } catch (final SQLException ex) {\r\n System.out.println(\"Falha de conexão com a base de dados!\");\r\n ex.printStackTrace();\r\n } catch (final Exception ex) {\r\n ex.printStackTrace();\r\n } finally {\r\n try {\r\n conexao.close();\r\n } catch (final Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n return false;\r\n }",
"public int updateDataMahasiswa(Uang uang) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(COLUMN_PEMASUKAN, uang.getPemasukan());\n values.put(COLUMN_PENGELUARAN, uang.getPengeluaran());\n return db.update(TABLE_NAME, values, COLUMN_ID + \" = ?\",\n new String[]{String.valueOf(uang.getId())});\n }",
"private void insertData() \n {\n for(int i = 0; i < 2; i++){\n RazaEntity razaEntity = factory.manufacturePojo(RazaEntity.class);\n em.persist(razaEntity);\n razaData.add(razaEntity);\n }\n for (int i = 0; i < 3; i++) {\n EspecieEntity especieEntity = factory.manufacturePojo(EspecieEntity.class);\n if(i == 0)\n {\n especieEntity.setRazas(razaData);\n }\n em.persist(especieEntity);\n especieData.add(especieEntity);\n }\n }",
"@Test\n public void updateTest9() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCabina(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isCabina() ,\"Should return true if update Servizio\");\n }",
"public int agregar(Persona p) {\n\t\tint r=0;\n\t\t\n\t\t\n\t\t String query = \"INSERT INTO TABLA (Id, nombre) values (?, ?)\";\n\t\ttry {\n\t\t\t\n\t\t\tcon= c.conectar();\n\t\t\tps=con.prepareStatement(query);\n\t\t\t\n\t\t\tps.setString(1, p.getId());\n\t\t\tps.setString(2, p.getNom());\n\t\t\tr=ps.executeUpdate();\n\t\t\tif(r==1) {\n\t\t\t\tr=1;\n\t\t\t}else {\n\t\t\t\tr=0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\t\n\t\t}\n\t\treturn r;\n\t\t\n\t\t\n\t\t\n\t}",
"public String insertarOficial() {\r\n\t\tlog.info(\"LISTA DE DESHABILITADO--> \"+ TelefonoDeshabilitado.size()); \r\n\t\tlog.info(\"insertarOficial() \" + \"Id-Cliente-->\"+\" \"+ objClienteSie.getIdcliente() + \" \"+\"Nombre de Cliente\"+\" \"+ objClienteSie.getNombrecliente());\r\n\t\tString paginaretorno=\"\";\r\n\t\ttry {\r\n\t\t\tif (log.isInfoEnabled()) {\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlog.info(\"busca el Id-DNI\");\r\n\t\t\tobjClienteSie.setTbTipoDocumentoIdentidad(objTipoDocService.buscarTipoDocumento(TipoDocumento));\r\n\t\t\t\r\n\t\t\tlog.info(\"busca el Id-Ubigeo\");\r\n\t\t\tobjDomicilio.setTbUbigeo(objUbigeoService.findUbigeo(Integer.parseInt(idUbigeo1)));\r\n\t\t\t\r\n\t\t\tlog.info(\"*******AQUI ESTA SI HAY UN VALOR DENTRO DE LA LISTA TELEFONOS PARA ELIMINAR*******\");\r\n\t\t\tlog.info(\"Tel-FISICO--------->\"+ \" \"+ TelefonoDeshabilitado.size());\r\n\t\t\tlog.info(\"Tel-TEMPORAL------->\"+ \"\t\"+ TelefonoPersonaList.size());\r\n\t\t\t\r\n\t\t\tlog.info(\"*******AQUI ESTA SI HAY UN VALOR DENTRO DE LA LISTA DOMICILIO PARA ELIMINAR*******\");\r\n\t\t\tlog.info(\"Domicilio-FISICO--------->\"+ \" \"+ DomicilioPersonaDeshabilitado.size());\r\n\t\t\tlog.info(\"Domicilio-TEMPORAL------->\"+ \"\t\"+ DomicilioPersonaList.size());\r\n\t\t\tobjClienteService.updateCliente(objClienteSie,objDomicilio,idUbigeo1, idUbigeo, tipo, Tipocasanuevo,TelefonoPersona,TelefonoPersonaList, TelefonoDeshabilitado, DomicilioPersonaList, DomicilioPersonaDeshabilitado);\r\n\t\t\t\r\n\t\t\tmensaje = Constants.MESSAGE_ACTUALIZO_TITULO;\r\n\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_INFO,\r\n\t\t\tConstants.MESSAGE_INFO_TITULO, mensaje);\r\n\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tmensaje = e.getMessage();\r\n\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_FATAL,\r\n\t\t\tConstants.MESSAGE_ERROR_FATAL_TITULO, mensaje);\r\n\t\t\tlog.error(e.getMessage());\r\n\t}\r\n\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\r\n\t\treturn getViewList();\r\n\t}",
"int insertSelective(cskaoyan_mall_order_goods record);",
"int insertSelective(DashboardGoods record);",
"@Override\n\tpublic void update() {\n\t\tSystem.out.println(\"Mysql DB 서버에 접속해서 수정을 하다.\");\n\t}",
"public void save(int type, Map<CountKeys,CountValues> map) {\n\n\t\tfor(Iterator<Entry<CountKeys,CountValues>> it = map.entrySet().iterator();it.hasNext();) {\n\t\t\tEntry<CountKeys,CountValues> entry = it.next();\n//\t\t\tString sql = CountSQL.create(entry.getKey(), entry.getValue());\n\n\t\t\tCountKeys key = entry.getKey();\n\t\t\tString[] fileds = key.getFileds();\n\n\t\t\tif(\"hour\".equals(fileds[4])){\n\t\t\t\tSystem.out.println(\"[-- 插入cpc_hour开始 --]\");\n\t\t\t\tCpcHour cpc_hour = getCpcHour(entry.getKey(),entry.getValue());\n\t\t\t\tint insert = cpcHourMapper.insert(cpc_hour);\n\t\t\t\tif(insert<=0){\n\t\t\t\t\tLOG.error(\"insert fail result data is \"+insert);\n\t\t\t\t}else{\n\t\t\t\t\tLOG.info(\"insert cpc_hour success , result data is \"+ insert);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"[-- 插入cpc_hour结束 --]\");\n\t\t\t}else if(\"adplanid\".equals(fileds[12])){\n\t\t\t\tStringBuffer tablename = getCallbackTablename();\n\t\t\t\tSystem.out.println(\"[-- 插入\"+tablename+\"开始 --]\");\n\t\t\t\tCallbackTableDemo callback = getCallBackInstance(entry.getKey(),entry.getValue());\n\t\t\t\tint insert = callbackTableMapper.insert(tablename, callback);\n\t\t\t\tif(insert<=0){\n\t\t\t\t\tLOG.error(\"insert fail result data is \"+insert);\n\t\t\t\t}else{\n\t\t\t\t\tLOG.info(\"insert \"+tablename+\" success , result data is \"+ insert);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"[-- 插入\"+tablename+\"结束 --]\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"[-- 插入cpc_day开始 --]\");\n\t\t\t\tCpcDay cpc_day = getCpcDay(entry.getKey(),entry.getValue());\n\t\t\t\tint insert = cpcDayMapper.insert(cpc_day);\n\t\t\t\tif(insert<=0){\n\t\t\t\t\tLOG.error(\"insert fail result data is \"+insert);\n\t\t\t\t}else{\n\t\t\t\t\tLOG.info(\"insert cpc_day success , result data is \"+ insert);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"[-- 插入cpc_day结束 --]\");\n\t\t\t}\n\n//\t\t\tsaveSQL(dbname, sql);\n//\t\t\tint result = conn.update(sql, null);\n//\t\t\tif(result <= 0) {\n//\t\t\t\tsaveError(dbname, sql);\n//\t\t\t}\n//\t\t\tLOG.debug(\"report to database result : \"+result+\" sql : \" + sql);\n\n//\t\t\tif(keys == null){\n//\t\t\t\tkeys = entry.getKey();\n//\t\t\t}\n\t\t}\n//\t\tconn.close();\n\n//\t\tif(keys instanceof DetailHourKeys) {\n//\t\t\treportAdsHour(type, map);\n//\t\t\treportMediaHour(type, map);\n//\t\t\treportDetailDay(type, map);\n//\t\t\treportSumHour(type, map);\n//\t\t} else if(keys instanceof AdsHourKeys) {\n//\t\t\treportAdsDay(type, map);\n//\t\t} else if(keys instanceof MediaHourKeys) {\n//\t\t\treportMediaDay(type, map);\n//\t\t} else if(keys instanceof SumHourKeys) {\n//\t\t\treportSumDay(type, map);\n//\t\t}\n\t}",
"public int persisteInformacionInsertSelect(String queryInserSelect, String idProceso) throws Exception;",
"@Override\r\n\tpublic int insertCode(Map<String, String[]> map) throws SQLException {\n\t\t\r\n\t\tConnection conn = dataSource.getConnection();\r\n\t\tString insertSQL = \"\";\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tint result = 0; \r\n\t\t\r\n\t\tString type = map.get(\"gbn\")[0];\r\n\t\t\r\n\t\t//type 0 : 상위코드, 1 : 하위코드\r\n\t\tif(type.equals(\"upr\")) {\r\n\t\t\tinsertSQL = \"INSERT INTO tb_code (cd, upr_cd, cd_nm, comment, sort, useyn) VALUES(?, '*', ?, ?, ?, 1)\";\r\n\t\t\tpstmt = conn.prepareStatement(insertSQL);\r\n\t\t\tpstmt.setString(1, map.get(\"cd\")[0]);\r\n\t\t\tpstmt.setString(2, map.get(\"cd_nm\")[0]);\r\n\t\t\tpstmt.setString(3, map.get(\"comment\")[0]);\r\n\t\t\tpstmt.setInt(4, Integer.parseInt(map.get(\"sort\")[0]));\r\n\t\t\tresult = pstmt.executeUpdate();\r\n\t\t} else {\r\n\t\t\tinsertSQL = \"INSERT INTO tb_code (cd, upr_cd, cd_nm, comment, sort, useyn) VALUES(?, ?, ?, ?, ?, 1)\";\r\n\t\t\tpstmt = conn.prepareStatement(insertSQL);\r\n\t\t\tpstmt.setString(1, map.get(\"cd\")[0]);\r\n\t\t\tpstmt.setString(2, map.get(\"upr_cd\")[0]);\r\n\t\t\tpstmt.setString(3, map.get(\"cd_nm\")[0]);\r\n\t\t\tpstmt.setString(4, map.get(\"comment\")[0]);\r\n\t\t\tpstmt.setInt(5, Integer.parseInt(map.get(\"sort\")[0]));\r\n\t\t\tresult = pstmt.executeUpdate();\r\n\t\t}\r\n\r\n\t\tpstmt.close();\r\n\t\tconn.close();\r\n\t\t\r\n\t\treturn result;\r\n\t}",
"public boolean inputdata(AddData list) {\n ContentValues values = new ContentValues();\n values.put(kolom_1, list.getTodo());\n values.put(kolom_2, list.getDesc());\n values.put(kolom_3, list.getPrior());\n long hasil = db.insert(nama_tabel, null, values);\n //kondisi\n if (hasil==-1) {\n return false;\n }else {\n return true;\n }\n }",
"public void insert1(login uv) {\n\t\ttry\n {\n SessionFactory sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory();\n \t\n Session session = sessionFactory.openSession();\n \n Transaction transaction=session.beginTransaction();\n \n session.save(uv);\n \n transaction.commit();\n \n session.close();\n }\n catch(Exception ex)\n {\n ex.printStackTrace();\n }\n\t\t\n\t}",
"@Override\n public boolean insert(Transaksi transaksi) {\n try {\n String query = \"INSERT INTO transaksi (id, tgl_transaksi) VALUES (?, ?)\";\n\n PreparedStatement ps = Koneksi().prepareStatement(query);\n ps.setString(1, transaksi.getId());\n ps.setString(2, transaksi.getTglTransaksi());\n\n if (ps.executeUpdate() > 0) {\n return true;\n }\n } catch (SQLException se) {\n se.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return false;\n }",
"@Test\r\n public void updateCarritoDeComprasTest() {\r\n System.out.println(\"up voy\"+data);\r\n CarritoDeComprasEntity entity = data.get(0);\r\n PodamFactory factory = new PodamFactoryImpl();\r\n CarritoDeComprasEntity newEntity = factory.manufacturePojo(CarritoDeComprasEntity.class);\r\n\r\n newEntity.setId(entity.getId());\r\n\r\n carritoDeComprasPersistence.update(newEntity);\r\n\r\n CarritoDeComprasEntity resp = em.find(CarritoDeComprasEntity.class, entity.getId());\r\n\r\n Assert.assertEquals(newEntity.getTotalCostDeCarritoCompras(), resp.getTotalCostDeCarritoCompras());\r\n \r\n }",
"@Test\n public void updateTest7() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCanoa(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isCanoa() ,\"Should return true if update Servizio\");\n }",
"@Test\n public void updateTest1() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCabina(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isCabina() ,\"Should return true if update Servizio\");\n }",
"@Override\n public boolean update(Transaksi transaksi) {\n try {\n String query = \"UPDATE transaksi SET tgl_transaksi=? WHERE id=?\";\n\n PreparedStatement ps = Koneksi().prepareStatement(query);\n ps.setString(1, transaksi.getTglTransaksi());\n ps.setString(2, transaksi.getId());\n\n if (ps.executeUpdate() > 0) {\n return true;\n }\n } catch (SQLException se) {\n se.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return false;\n }",
"public void addPreqData(Object[] tableData) {\n\t\tlogger.info(\"addCreditData\");\r\n\t\tString qury=\" SELECT HRMS_EMP_PERQUISITE.PERQ_AMT FROM HRMS_EMP_PERQUISITE WHERE HRMS_EMP_PERQUISITE.PERQ_CODE=\"+ tableData[0]+\" AND \" +\r\n\t\t\t\t\" HRMS_EMP_PERQUISITE.EMP_ID =\"+ tableData[2];\r\n\t\t\t\tObject amt[][]=getSqlModel().getSingleResult(qury);\r\n\t\t\t\tlogger.info(\"FIRING QUERY\");\r\n\t\t\t\t/*PERQ_CODE,DEBIT_APPLICABLE,DEBIT_AMT,EMP_ID*/\r\n\t\t\t\tlogger.info(\"*********************************before\"+tableData[2]);\r\n\t\t\t\tif(amt.length==0)\r\n\t\t\t\t{\r\n\t\t\t\tObject[][] bean = new Object[1][3];\r\n\r\n\t\t\t\tbean[0][0] = tableData[0];//code\r\n\t\t\t\t\r\n\t\t\t\tbean[0][1] = tableData[1];//amt\r\n\t\t\t\tbean[0][2] = tableData[2];//empid\r\n logger.info(\"insert query...!!\");\r\n\t\t\t\tboolean result = getSqlModel().singleExecute(getQuery(7), bean);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tString upd=\" UPDATE HRMS_EMP_PERQUISITE SET PERQ_AMT=\"+tableData[1]+\" WHERE PERQ_CODE=\"+tableData[0]+\" AND EMP_ID=\"+tableData[2];\r\n\t\t\t\t\tlogger.info(upd);\r\n\t\t\t\t\tboolean result = getSqlModel().singleExecute(upd);\t\r\n\t\t\t\t\tlogger.info(upd);\r\n\t\t\t\t\tlogger.info(\"*********************************before\"+tableData[2]);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}",
"int updateByPrimaryKey(Prueba record);",
"int insertSelective(countrylanguage record);",
"private void saveData() {\n try {\n String query;\n query = \"INSERT INTO limit_hd (kode_limit, grup, produk, masa_limit, jumlah_limit, status, pesan_gagal, tgl_mulai_event, tgl_akhir_event, date_create, date_update) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n Connection conn = (Connection) DatabaseConnection.getConnection(dbName2);\n PreparedStatement pst = conn.prepareStatement(query);\n getMaxKodeLimit();\n maxKodeLimit += 1;\n grupColumn = cmbGrup.getSelectedItem().toString();\n produkColumn = cmbProduk.getSelectedItem().toString();\n masaLimitColumn = cmbTransactionPeriod.getSelectedItem().toString();\n jumlahLimitColumn = Integer.parseInt(txtTransactionLimit.getText());\n errorMessageColumn = txaErrorMessage.getText();\n startDate = dtpStartDateEvent.getText();\n endDate = dtpEndDateEvent.getText();\n isStatusColumn = true;\n\n SimpleDateFormat dateFormatter = new SimpleDateFormat(\"dd-MMM-yyyy\");\n\n Date sqlDate1 = (Date) dateFormatter.parse(startDate);\n Date sqlDate2 = (Date) dateFormatter.parse(endDate);\n\n java.sql.Date startEventDate = new java.sql.Date(sqlDate1.getTime());\n java.sql.Date endEventDate = new java.sql.Date(sqlDate2.getTime());\n\n pst.setInt(1, maxKodeLimit);\n pst.setString(2, grupColumn);\n pst.setString(3, produkColumn);\n pst.setString(4, masaLimitColumn);\n pst.setInt(5, jumlahLimitColumn);\n pst.setBoolean(6, isStatusColumn);\n pst.setString(7, errorMessageColumn);\n pst.setDate(8, startEventDate);\n pst.setDate(9, endEventDate);\n pst.setDate(10, java.sql.Date.valueOf(java.time.LocalDate.now()));\n pst.setDate(11, java.sql.Date.valueOf(java.time.LocalDate.now()));\n pst.executeUpdate();\n showLimitHeader();\n defaultSetVariable();\n JOptionPane.showMessageDialog(null, \"Data telah berhasil di simpan\");\n } catch (HeadlessException | SQLException e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n } catch (Exception ex) {\n Logger.getLogger(LimitAddOn.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void insertInfo(editUserSetGet eu);",
"@Test\n public void updateComentarioTest(){\n ComentarioEntity entity = data.get(0);\n PodamFactory factory = new PodamFactoryImpl();\n ComentarioEntity newEntity = factory.manufacturePojo(ComentarioEntity.class);\n newEntity.setId(entity.getId());\n comentarioPersistence.update(newEntity);\n \n ComentarioEntity respuesta = em.find(ComentarioEntity.class,entity.getId());\n \n Assert.assertEquals(respuesta.getNombreUsuario(), newEntity.getNombreUsuario());\n \n \n }",
"public static void Inrinsert(int id,String FQN,String name, String container,String disjoint,String complete,String table)\n\t\t\t { \n\t\t\t \n\t\t\t \ttry \n\t\t\t { \n\t\t\t Statement stmt=null; \n\t\t\t ResultSet res=null; \n\t\t\t Class.forName(\"com.mysql.jdbc.Driver\"); \n\t\t\t Connection conn = DriverManager.getConnection(sqldatabase,mysqluser,mysqlpassword); \n\t\t\t stmt = (Statement)conn.createStatement(); \n\t\t\t res= stmt.executeQuery(\"SELECT * from inheritancerelationship\"); \n\n\n\t\t\t // 增加数据\n\t\t\t Statement stm = (Statement) conn.createStatement();// 提交查巡\n\t\t\t String sql = \"select * from inheritancerelationship\";\n\t\t\t ResultSet rs = stm.executeQuery(sql);// 取得查巡結果\n//\t\t\t sql = \"insert into entity (id,name,FQN,container) values ('6','AccountType','Example2.O2.AccountType','Example2.O10')\";\n\t\t\t \n\t\t\t int n = stm.executeUpdate(\"insert into \"+table+\"(id,FQN,name,container,disjoint,complete) values (\"+\"'\"+id+\"'\"+\",\"+\"'\"+FQN+\"'\"+\",\"+\"'\"+name+\"'\"+\",\"+\"'\"+container+\"'\"+\",\"+\"'\"+disjoint+\"'\"+\",\"+\"'\"+complete+\"'\"+\")\"); // 增加数据 \n\t\t\t if (n > 0) {\n//\t\t\t JOptionPane.showMessageDialog(null, \"成功\");\n\t\t\t \n\t\t\t \n\t\t\t } else {\n//\t\t\t JOptionPane.showMessageDialog(null, \"失败\");\n\t\t\t }\n\t\t\t //增加数据结束\n\n\t\t\t while (res.next()) \n\t\t\t { \n\t\t\t \n\t\t\t } \n\t\t\t } \n\t\t\t \n\t\t\t catch(Exception ex) \n\t\t\t { \n\t\t\t ex.printStackTrace(); \n\t\t\t } \n\t\t\t}",
"@Override\r\n\tpublic boolean update(Viaggio viaggio) {\r\n\t\tboolean result = false;\r\n\t\tif ( viaggio == null ) {\r\n\t\t\tSystem.out.println( \"update(): failed to update a null entry\");\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tPreparedStatement prep_stmt = conn.prepareStatement(update);\r\n\t\t\tprep_stmt.clearParameters();\r\n\t\t\tprep_stmt.setInt(1, viaggio.getCreatore().getId());\r\n\t\t\tprep_stmt.setString(2, viaggio.getTitolo());\r\n\t\t\tprep_stmt.setString(3, viaggio.getDestinazione());\r\n\t\t\tprep_stmt.setString(4, viaggio.getDescrizione());\r\n\t\t\tprep_stmt.setString(5, viaggio.getLingua());\r\n\t\t\tprep_stmt.setInt(6, viaggio.getBudget());\r\n\t\t\tprep_stmt.setString(7, viaggio.getLuogopartenza());\r\n\t\t\tprep_stmt.setInt(8, viaggio.getStato().ordinal());\r\n\t\t\tprep_stmt.setDate(9, viaggio.getDatainizio());\r\n\t\t\tprep_stmt.setDate(10, viaggio.getDatafine());\r\n\t\t\tprep_stmt.setString(11, viaggio.getImmaginiProfilo());\t\t\t\r\n\t\t\tprep_stmt.setInt(12, viaggio.getIdViaggio());\r\n\t\t\tint esito;\r\n\t\t\tesito=prep_stmt.executeUpdate();\r\n\t\t\tprep_stmt.close();\r\n\t\t\tif(esito>=0) {\r\n\t\t\t\tSystem.out.println(\"Ho aggiornato il viaggio con id \"+ viaggio.getIdViaggio());\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"ERRORE: non ho potuto aggiornare il viaggio con id \"+ viaggio.getIdViaggio());\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tSystem.out.println(\"insert(): failed to update entry: \"+e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\ttry {\r\n\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"int insertSelective(NjProductTaticsRelation record);"
] | [
"0.65636194",
"0.6562729",
"0.65265477",
"0.6406882",
"0.6406794",
"0.638193",
"0.63772",
"0.6364841",
"0.6245045",
"0.62175655",
"0.6217545",
"0.62164336",
"0.62035197",
"0.6150095",
"0.6142371",
"0.6140854",
"0.61362696",
"0.61136085",
"0.6107918",
"0.60423946",
"0.6035021",
"0.6033549",
"0.6028309",
"0.6018417",
"0.60147667",
"0.6005884",
"0.5993556",
"0.5968193",
"0.59640115",
"0.59624887",
"0.5961604",
"0.59467804",
"0.59429747",
"0.5938799",
"0.59257853",
"0.59164315",
"0.59116024",
"0.5906381",
"0.5906149",
"0.5905205",
"0.5904471",
"0.59007967",
"0.590032",
"0.58981544",
"0.5892137",
"0.58905053",
"0.58847135",
"0.58779424",
"0.5875484",
"0.5875072",
"0.58718437",
"0.58714515",
"0.5855581",
"0.5855244",
"0.5852038",
"0.5849832",
"0.58446866",
"0.5831763",
"0.5829449",
"0.58165365",
"0.5814211",
"0.58066916",
"0.58038557",
"0.579906",
"0.57945806",
"0.5787568",
"0.57859284",
"0.5782764",
"0.57785124",
"0.577013",
"0.5768116",
"0.5767212",
"0.5761463",
"0.5759775",
"0.5756132",
"0.57536167",
"0.57434404",
"0.57392055",
"0.5724151",
"0.57133746",
"0.5712197",
"0.57093924",
"0.5708287",
"0.57056826",
"0.57048446",
"0.5695918",
"0.5695436",
"0.5692054",
"0.56853366",
"0.568307",
"0.5682052",
"0.5681856",
"0.56784934",
"0.56771123",
"0.56756824",
"0.5672927",
"0.5671585",
"0.56703424",
"0.56698465",
"0.56665546",
"0.56661695"
] | 0.0 | -1 |
Instantiates a new ufficio tecnico DB. With default connection manager | public UfficioTecnicoDB() {
this(ConnectionManager.getInstance());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public EtiquetaDao() {\n //subiendola en modo Embedded\n this.sql2o = new Sql2o(\"jdbc:h2:~/demojdbc\", \"sa\", \"\");\n createTable();\n //cargaDemo();\n }",
"public DatabaseManager() {\n try {\n con = DriverManager.getConnection(DB_URL, \"root\", \"marko\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"public DBManager(){\r\n connect(DBConstant.driver,DBConstant.connetionstring);\r\n }",
"private Database() throws SQLException, ClassNotFoundException {\r\n Class.forName(\"org.postgresql.Driver\");\r\n con = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/postgres\", \"postgres\", \"kuka\");\r\n }",
"public AdminDAO()\n {\n con = DataBase.getConnection();//crear una conexión al crear un objeto AdminDAO\n }",
"public ConexionDB() {\n\n\t\tconn = null;\n\n\t}",
"public void connect() {\n\n DatabaseGlobalAccess.getInstance().setEmf(Persistence.createEntityManagerFactory(\"PU_dashboarddb\"));\n DatabaseGlobalAccess.getInstance().setEm(DatabaseGlobalAccess.getInstance().getEmf().createEntityManager());\n DatabaseGlobalAccess.getInstance().getDatabaseData();\n DatabaseGlobalAccess.getInstance().setDbReachable(true);\n }",
"public DataHandlerDBMS() {\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tDBMS = DriverManager.getConnection(url);\n\t\t\tSystem.out.println(\"DBSM inizializzato\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Errore apertura DBMS\");\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tSystem.out.println(\"Assenza driver mySQL\");\n\t\t}\n\t}",
"private Conexao() {\r\n\t\ttry {\r\n\t\t\tconnection = DriverManager.getConnection(\"jdbc:hsqldb:mem:.\", \"sa\", \"\");\r\n\t\t\tnew LoadTables().creatScherma(connection);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Erro ao conectar com o banco: \"+e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public DatabaseConnector() {\n HikariConfig config = new HikariConfig();\n config.setJdbcUrl(\"jdbc:postgresql://localhost:5547/go_it_homework\");\n config.setUsername(\"postgres\");\n config.setPassword(\"Sam@64hd!+4\");\n this.ds = new HikariDataSource(config);\n ds.setMaximumPoolSize(5);\n }",
"public OnibusDAO() {}",
"private void apriConnessione() throws SQLException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException, ClassNotFoundException {\n\t\tString password, user;\n\t\tDatabaseProps dbConf = config.getDb();\n\n\t\tClass.forName(dbConf.getDriver()).getDeclaredConstructor().newInstance();\n\n\t\tuser = dbConf.getUsername();\n\t\tpassword = dbConf.getPassword();\n\n\t\tString uri = String.format(\"jdbc:%s://%s:%d/%s\", dbConf.getDbms(), dbConf.getHost(), dbConf.getPort(), dbConf.getName());\n\n\t\tconnessioneDB = DriverManager.getConnection(uri, user, password);\n\t}",
"public DataConnection() {\n\t\ttry {\n\t\t\tString dbClass = \"com.mysql.jdbc.Driver\";\n\t\t\tClass.forName(dbClass).newInstance();\n\t\t\tConnection con = DriverManager.getConnection(DIR_DB, USER_DB, PASS_DB);\n\t\t\tstatement = con.createStatement();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void makeSQLConn() {\n\t\ttry {\n\t\t\tmyDB = new MySQLAccess();\n\t\t} catch (Exception e) { e.printStackTrace(); }\n\t}",
"private DatabaseConnectionService() {\n ds = new HikariDataSource();\n ds.setMaximumPoolSize(20);\n ConfigProperties configProperties = ConfigurationLoader.load();\n if (configProperties == null) {\n throw new RuntimeException(\"Unable to read the config.properties.\");\n }\n ds.setDriverClassName(configProperties.getDatabaseDriverClassName());\n ds.setJdbcUrl(configProperties.getDatabaseConnectionUrl());\n ds.addDataSourceProperty(\"user\", configProperties.getDatabaseUsername());\n ds.addDataSourceProperty(\"password\", configProperties.getDatabasePassword());\n ds.setAutoCommit(false);\n }",
"public TelefoneDao() {\n\t\tconnection = SingleConnection.getConnection();\n\t}",
"DataBase createDataBase();",
"public UnidadDAO() {\n this.setCon(cs.getConection());\n \n }",
"Database createDatabase();",
"public ProtocoloDAO() {\n }",
"public GosplPopulationInDatabase() {\n\t\ttry {\n\t\t\tthis.connection = DriverManager.getConnection(\n\t\t\t\t\t\"jdbc:hsqldb:mem:\"+mySqlDBname+\";shutdown=true\", \"SA\", \"\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\"error while trying to initialize the HDSQL database engine in memory: \"+e.getMessage(), e);\n\t\t}\n\t}",
"private void criarConexao(){\n try{\n testeOpenHelper = new TesteOpenHelper(this);\n conexao = testeOpenHelper.getWritableDatabase();\n Toast.makeText(this,\"Conexao executada com sucesso\", Toast.LENGTH_SHORT).show();\n produtoRepositorio = new ProdutoRepositorio(conexao);\n }catch(SQLException e){\n AlertDialog.Builder dlg = new AlertDialog.Builder(this);\n dlg.setTitle(\"Erro\");\n dlg.setMessage(e.getMessage());\n dlg.setNeutralButton(\"Ok\", null);\n dlg.show();\n Toast.makeText(this,\"ERRO na conexao\", Toast.LENGTH_LONG).show();\n }\n }",
"public DepartmentsDAO() {\r\n\t\tconn = DBConnector.getConnection();\r\n\t}",
"public Database(Context context) { \n\t\tsuper( context, database_MEF, null, 2); \n\t}",
"protected abstract ODatabaseInternal<?> newDatabase();",
"public TermDAOImpl(){\n connexion= new Connexion();\n }",
"private Database() throws SQLException {\n con = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:MusicAlbums\", \"c##dba\", \"sql\");\n }",
"DatabaseController() {\n\n\t\tloadDriver();\n\t\tconnection = getConnection(connection);\n\t}",
"public UserDAO() {\n\t\tthis.emf = Persistence.createEntityManagerFactory(\"feedr_v3\");\n\t\tthis.em = this.emf.createEntityManager();\n\t\tthis.et = this.em.getTransaction();\n\t}",
"public static Connection createConnection() {\n\t\treturn new FabricaDeConexoes().getConnection();\n\t}",
"public DB() {\r\n\t\r\n\t}",
"public Database() {\n\t\tconn = null;\n\t}",
"private createSingletonDatabase()\n\t{\n\t\tConnection conn = createDatabase();\n\t\tcreateTable();\n\t\tString filename = \"Summer expereince survey 2016 for oliver.csv\"; \n\t\timportData(conn, filename);\n\t}",
"@Override\n\tpublic ColegioDAO getColegioDAO() {\n\t\treturn new MySqlColegioDAO();\n\t}",
"public AppointmentDAOImpl() {\n this.conn = DBConnector.getConnection();\n }",
"public DatabaseController()\n\t{\n\t\tconnectionString = \"jdbc:mysql://localhost/?user=root\";\n\t\tcheckDriver();\n\t\tsetupConnection();\n\t}",
"public UtentiDB(){\r\n this.utenti = new LinkedList<Utente>();\r\n }",
"public paciente()\n {\n con = new bdconexion(); //instancia la clase bdconexion\n }",
"@Before\n public void createDatabase() {\n dbService.getDdlInitializer()\n .initDB();\n kicCrud = new KicCrud();\n }",
"public EmpleadoService() {\n super();\n emf = Persistence.createEntityManagerFactory(\"up_h2\");\n empDAO = new EmpleadoDAO(emf);\n }",
"private DatabaseHandler(){\n createConnection();\n }",
"public ProduktRepositoryImpl() {\n this.conn = DatabaseConnectionManager.getDatabaseConnection();\n }",
"public CustomerModelDS(String nomeDb, String activity) {\r\n\t\ttry {\r\n\t\t\tContext initCtx = new InitialContext();\r\n\t\t\tContext envCtx = (Context) initCtx.lookup(\"java:comp/env\");\r\n\t\t\tds = (DataSource) envCtx.lookup(\"jdbc/\"+nomeDb);\r\n\t\t\tconnection = ds.getConnection();\r\n\t\t\tthis.tableName = activity.toLowerCase()+table;\r\n\t\t } catch (NamingException | SQLException e) {\r\n\t\t\ttry {\r\n\t\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\t\tconnection = DriverManager.getConnection(\"jdbc:mysql://localhost/\"+nomeDb, \"root\", \"\");\r\n\t\t\t\tconnection.setAutoCommit(false);\r\n\t\t\t} catch (SQLException | ClassNotFoundException ex) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t }\r\n\t}",
"public BeneficiaireDAO() {\n\t\t// chargement du pilote de bases de donn闂佹唶\n\t\t\n\t\ttry {\n\t\t\t Class.forName( \"com.mysql.jdbc.Driver\" );\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tSystem.err\n\t\t\t\t\t.println(\"Impossible de charger le pilote de BDD, ne pas oublier d'importer le fichier .jar dans le projet\");\n\t\t}\n\n\t}",
"private Db() {\n super(Ke.getDatabase(), null);\n }",
"public DBManager() {\n\t\t\n\t}",
"public JPersonelGiris() {\n initComponents();\n try {\n con = DriverManager.getConnection(\"jdbc:derby://localhost:1527/sample\", \"app\", \"app\");\n } catch (SQLException ex) {\n Logger.getLogger(JPersonelGiris.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public RequisicaoDAO() {\n em = JPAUtil.initConnection();\n }",
"public DatabaseAdaptor() {\n\t\ttry {\n\t\t\tdatabase = new MyDatabase(DB_NAME);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public DaoConnection() {\n\t\t\n\t}",
"public Persistence() {\n\t\tconn = dbConnection();\n\t}",
"public PisoDAO createPisoDAO() {\n\n if (pisoDAO == null) {\n pisoDAO = new PisoDAO();\n }\n return pisoDAO;\n }",
"public Database(Context context) {\n super(context, nome_db, null, versao_db);\n }",
"public static Connection CrearConexion(){\n String clave=\"inacap\";\r\n String usuario=\"inacap\";\r\n String url=\"jdbc:derby://localhost:1527/aereopuerto\";\r\n \r\n //crear conexion a la Base de datos\r\n \r\n try{\r\n Connection conn=DriverManager.getConnection(url,usuario,clave);\r\n return conn;\r\n }\r\n catch(SQLException e){\r\n System.out.println(\"Excepcion de sql:\"+e);\r\n return null;\r\n }\r\n \r\n \r\n }",
"public Database()\r\n\t{\r\n\t\tinitializeDatabase();\r\n\t\t\r\n\t}",
"public RentalManager() {\n DataAccess da = new DataAccess();\n try {\n conn = DriverManager.getConnection(da.getCONN_STR(), da.getUSER(), da.getPASS());\n } catch (SQLException ex) {\n Logger.getLogger(RentalManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public GastoDAO(Context context){\n dbHelper = new MyDatabaseHelper(context);\n database = dbHelper.getWritableDatabase();\n }",
"private void initDB() {\n dataBaseHelper = new DataBaseHelper(this);\n }",
"public DBController() {\n System.out.println(\"[\" + this.getClass() + \" : consctructor]\");\n this.listeObservers = new ArrayList<>();\n this.url = \"/Users/nico/Desktop/testSquirell.db\";\n //this.listeMorceau=new ArrayList<Morceau>();\n //this.initDB();\n addTableMorceau();\n System.out.println(\"[end constructor \" + this.getClass() + \"]\");\n }",
"private DBManager() throws Exception {\n file = new File(\"pdfLibraryDB.mv.db\");\n if (!file.exists()) {\n conn = connect();\n stmt = conn.createStatement();\n query = \"CREATE TABLE user(username VARCHAR(30) PRIMARY KEY, password VARCHAR(32));\" +\n \"CREATE TABLE category(id VARCHAR(30) PRIMARY KEY, name VARCHAR(30), username VARCHAR(30), FOREIGN KEY(username) REFERENCES user(username) ON UPDATE CASCADE ON DELETE CASCADE);\"+\n \"CREATE TABLE favorite(id VARCHAR(30) PRIMARY KEY, path VARCHAR(500), keyword VARCHAR(200), searchType VARCHAR(10), category VARCHAR(30),username VARCHAR(30), FOREIGN KEY(username) REFERENCES user(username) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY(category) REFERENCES category(id) ON UPDATE CASCADE ON DELETE CASCADE);\" +\n \"CREATE TABLE history(id VARCHAR(30) PRIMARY KEY, keyword VARCHAR(200), type VARCHAR(10), directory VARCHAR(500), username VARCHAR(30), FOREIGN KEY(username) REFERENCES user(username) ON UPDATE CASCADE ON DELETE CASCADE);\";\n stmt.executeUpdate(query);\n stmt.close();\n conn.close();\n System.out.println(\"DB created!\");\n }\n }",
"private DatabaseRepository() {\n try {\n // connect to database\n\n DB_URL = \"jdbc:sqlite:\"\n + this.getClass().getProtectionDomain()\n .getCodeSource()\n .getLocation()\n .toURI()\n .getPath().replaceAll(\"[/\\\\\\\\]\\\\w*\\\\.jar\", \"/\")\n + \"lib/GM-SIS.db\";\n connection = DriverManager.getConnection(DB_URL);\n mapper = ObjectRelationalMapper.getInstance();\n mapper.initialize(this);\n }\n catch (SQLException | URISyntaxException e) {\n System.out.println(e.toString());\n }\n }",
"public Database() {\r\n\t\ttry {\t\r\n\t\t\tSystem.out.println(\"Database: Connected\");\r\n\t\t\tconn = DriverManager.getConnection(DB_URL,USER,PASS);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Unable to connect to database\");\r\n\t\t}\r\n\t}",
"public Database() {\n if (init) {\n\n //creating Transaction data\n Transaction transactionOne\n = new Transaction(1, \"Debit\", \"Spar Grocery\", 54.68,1);\n\n transactionDB.add(transactionOne);\n\n // Creating an Account data\n Account accountOne = new Account(1, 445, 111111111, \"Savings\",\n 1250.24, transactionDB);\n\n accountDB.add(accountOne);\n\n //creating withdrawal data\n Withdrawal withdrawalOne = new Withdrawal(1, 64422545, 600.89);\n withdrawalDB.add(withdrawalOne);\n\n //creating transfer data\n Transfer transferOne = new Transfer(1, 25252525, 521.23);\n transferDB.add(transferOne);\n\n //creating lodgement data\n Lodgement lodgementOne = new Lodgement(1, 67766666, 521.23);\n lodgementDB.add(lodgementOne);\n\n //add Customer data \n Customer customerOne\n = new Customer(1, \"Darth Vader\", \"[email protected]\",\n \"Level 5, Suit Dark\", \"darkSideIsGoodStuff\",\n accountDB, withdrawalDB, transferDB, lodgementDB);\n\n customerDB.add(customerOne);\n\n init = false;\n }\n }",
"private void criarConexao(){\n\n try {\n\n clientOpenHelper = new ClientOpenHelper(this);\n\n conexao = clientOpenHelper.getWritableDatabase();\n\n Snackbar.make(layoutMain, R.string.Aviso, Snackbar.LENGTH_SHORT)\n .setAction(R.string.ok,null)\n .show();\n clienteRepositorio = new ClienteRepositorio(conexao);\n }catch (SQLException ex){\n AlertDialog.Builder dlg = new AlertDialog.Builder(this);\n dlg.setTitle(\"Error\");\n dlg.setMessage(ex.getMessage());\n dlg.setNeutralButton(\"OK\",null);\n dlg.show();\n }\n }",
"public DBConnection() {\n this(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST, DB_PORT);\n }",
"public void conectionSql(){\n conection = connectSql.connectDataBase(dataBase);\n }",
"public ServiceDAO(){\n\t\t\n\t\tString[] tables = new String[]{\"CUSTOMERS\",\"PRODUCTS\"};\n\t\tfor(String table:tables){\n\t\t\tif(!checkIfDBExists(table)){\n\t\t\t\ttry{\n\t\t\t\t\tnew DerbyDataLoader().loadDataFor(table);\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\tlogger.error(\"Error Loading the Data into the Derby\");\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public SQLCommunicator() {\n logger.info(\"Inside SQLConstructor\");\n try {\n //Connect to the database\n connectionUrl = \"jdbc:derby://localhost:1527/DribbleDerbyDB\";\n\n con = DriverManager.getConnection(connectionUrl, \"APP\", \"dribble\");\n logger.info(\"Connected to Glassfish database\");\n DatabaseMetaData md = con.getMetaData();\n //Check if the table exists in the database\n ResultSet rs = md.getTables(null, \"APP\", \"%\", null);\n //Add a table if the table does not exist\n if (rs.next() == false) {\n Statement stmt = con.createStatement();\n logger.info(\"No table in database. Creating main table...\");\n stmt.execute(\"CREATE TABLE DRIBBLE_SYSTEM_SUBJECTS\"\n + \"(NAME VARCHAR(20),\"\n + \"ID INTEGER NOT NULL,\"\n + \"LATITUDE BIGINT,\"\n + \"LONGITUDE BIGINT,\"\n + \"VIEWS INTEGER default 0,\"\n + \"POSTS INTEGER default 0,\"\n + \"POPULARITY BIGINT default 0,\"\n + \"CURRENTIME BIGINT\"\n + \")\");\n } else {\n logger.info(\"Table exists in database\");\n }\n\n\n } catch (SQLException e) {\n logger.severe(\"SQLexception: \" + e.toString());\n }\n\n logger.info(\"Constructed SQLCommunicator\");\n\n }",
"public ConnexioBD() {\n try {\n Class.forName(driver);\n connection = DriverManager.getConnection(url, user, password);\n\n\n } catch (ClassNotFoundException | SQLException e) {\n System.out.println(\"Error al connectar amb la base de dades:\" + e);\n }\n }",
"public DBHandler() {\n\n driverName = \"com.mysql.jdbc.Driver\";\n url = \"jdbc:mysql://us-cdbr-azure-southcentral-e.cloudapp.net/newsstand\";\n userId = (String) \"ba7e286a39ae9e\";\n password = (String) \"d89b6d9b\";\n \n }",
"public ContextDaoImpl() {\n Set<Commissioner> commissionerSet = new HashSet<>();\n List<String> logins = new ArrayList<>();\n commissionerSet.add(new Commissioner(\"victor.net\", \"25345Qw&&\", true));\n commissionerSet.add(new Commissioner(\"egor.net\", \"3456eR&21\", false));\n commissionerSet.add(new Commissioner(\"igor.net\", \"77??SDSw23\", false));\n logins.add(\"[email protected]\");\n logins.add(\"[email protected]\");\n logins.add(\"[email protected]\");\n Database.setCandidateSet(new HashSet<>());\n Database.setVoterSet(new HashSet<>());\n Database.setLogins(logins);\n Database.setCommissionerSet(commissionerSet);\n }",
"public SPManager() {\n \tmyCon = new DBManager();\n }",
"public PujaDAO() {\n con = null;\n st = null;\n rs = null;\n }",
"private DAOOfferta() {\r\n\t\ttry {\r\n\t\t\tClass.forName(driverName);\r\n\r\n\t\t\tconn = getConnection(usr, pass);\r\n\r\n\t\t\tps = conn.prepareStatement(createQuery);\r\n\r\n\t\t\tps.executeUpdate();\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (ConnectionException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*closeResource()*/;\r\n\t\t}\r\n\t}",
"private DBConnection() \n {\n initConnection();\n }",
"public static DbConnector getInstancia() {\r\n\t\tif (instancia == null) {\r\n\t\t\tinstancia = new DbConnector();\r\n\t\t}\r\n\t\treturn instancia;\r\n\t}",
"private TexeraDb() {\n super(\"texera_db\", null);\n }",
"public Database(Context context)\n\t{\n\t\t/* Instanciation de l'openHelper */\n\t\tDBOpenHelper helper = new DBOpenHelper(context);\n\t\t\n\t\t/* Load de la database */\n\t\t//TODO passer en asynchrone pour les perfs\n\t\tmainDatabase = helper.getWritableDatabase();\n\t\t\n\t\t/* DEBUG PRINT */\n\t\tLog.i(\"info\", \"Database Loading Suceeded\");\n\t}",
"private void setupDB(){\n try {\n Class.forName(\"oracle.jdbc.driver.OracleDriver\");\n String url = \"jdbc:oracle:thin:@localhost:1521:orcl\";\n String username = \"sys as sysdba\"; //Provide username for your database\n String password = \"oracle\"; //provide password for your database\n\n con = DriverManager.getConnection(url, username, password);\n }\n catch(Exception e){\n System.out.println(e);\n }\n }",
"private void setupDatabase() {\r\n\t\tDatabaseHelperFactory.init(this);\r\n\t\tdatabase = DatabaseHelperFactory.getInstance();\r\n\t}",
"public libroBean() throws SQLException\r\n {\r\n variables = new VariablesConexion();\r\n variables.iniciarConexion();\r\n conexion=variables.getConexion();\r\n \r\n }",
"public sqlDatabase() {\n }",
"public MenuDAO() {\n\t\t\n\t\tconnection = ConnectDatabase.connectDatabase();\n\t\t\n\t}",
"public ConnectDB(){\r\n\r\n\t}",
"public DatabaseConnection newConnection();",
"public void initConnection() throws SQLException{\n\t\tuserCon = new UserDBHandler(\"jdbc:mysql://127.0.0.1:3306/users\", \"admin\", \"admin\");\n\t\tproductCon = new ProductDBHandler(\"jdbc:mysql://127.0.0.1:3306/products\", \"admin\", \"admin\");\n\t}",
"public static void initConnection() throws SQLException, InstantiationException, IllegalAccessException, ClassNotFoundException{\r\n\t\t//create database connection only once\r\n\t\tif(dbCon == null){\t\r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\tdbCon = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/wip?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC\",\"root\",\"\");\r\n\t\t}\r\n\t}",
"public DataManager() {\n\t\tthis(PUnit == null ? \"eElectionsDB\" : PUnit);\n\t}",
"public DBMS(Context context) {\n super(context, DBName, null, DBVersion);\n Log.e(\"DBMS=>\", \"yes Db bna d ha\");\n }",
"public MySqlDaoFactory() {\n creators = new HashMap<>();\n creators.put(Bank.class, new DaoCreator<Connection>() {\n @Override\n public GenericDAO create(Connection connection) {\n return new MySqlBankDao(connection);\n }\n });\n\n creators.put(Deposit.class, new DaoCreator<Connection>() {\n @Override\n public GenericDAO create(Connection connection) {\n return new MySqlDepositDao(connection);\n }\n });\n\n }",
"public DatabaseConnector() {\n String dbname = \"jdbc/jobs\";\n\n try {\n ds = (DataSource) new InitialContext().lookup(\"java:comp/env/\" + dbname);\n } catch (NamingException e) {\n System.err.println(dbname + \" is missing: \" + e.toString());\n }\n }",
"public DatabaseHelper(Context context) {\n super(context, \"caballoscocheros.db\", null);\n\n db = getWritableDatabase();\n DaoMaster daoMaster = new DaoMaster(db);\n daoSession = daoMaster.newSession();\n }",
"public Descripcion() {\n cnx= new ConexionDB();\n }",
"public BLFacadeImplementation() {\t\t\r\n\t\tSystem.out.println(\"Creating BLFacadeImplementation instance\");\r\n\t\tConfigXML c=ConfigXML.getInstance();\r\n\t\t\r\n\t\tif (c.getDataBaseOpenMode().equals(\"initialize\")) {\r\n\t\t\tDataAccess dbManager=new DataAccess(c.getDataBaseOpenMode().equals(\"initialize\"));\r\n\t\t\tdbManager.initializeDB();\r\n\t\t\tdbManager.close();\r\n\t\t\t}\r\n\t\t\r\n\t}",
"public EstadosSql() {\r\n }",
"@Override\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void start() {\n\t\tinitLogger();\n\n\t\tif (!databaseEnabled) {\n\t\t\tlog.info(\"DB not enabled.\");\n\t\t\treturn;\n\t\t}\n\n\t\tlog.info(\"DB start ----------\");\n\n\t\tfinal PetiteContainer petiteContainer = joyPetiteSupplier.get().getPetiteContainer();\n\n\t\t// connection pool\n\t\tconnectionProvider = createConnectionProviderIfNotSupplied();\n\n\t\tpetiteContainer.addBean(beanNamePrefix() + \"pool\", connectionProvider);\n\n\t\tif (connectionProvider instanceof CoreConnectionPool) {\n\t\t\tfinal CoreConnectionPool pool = (CoreConnectionPool) connectionProvider;\n\t\t\tif (pool.getDriver() == null) {\n\t\t\t\tdatabaseEnabled = false;\n\t\t\t\tlog.warn(\"DB configuration not set (\" + beanNamePrefix() + \"pool.*). DB will be disabled.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tconnectionProvider.init();\n\n\t\tcheckConnectionProvider();\n\n\t\t// transactions manager\n\t\tjtxManager = createJtxTransactionManager(connectionProvider);\n\t\tjtxManager.setValidateExistingTransaction(true);\n\n\t\tfinal AnnotationTxAdviceManager annTxAdviceManager = new AnnotationTxAdviceManager(new LeanJtxWorker(jtxManager), jtxScopePattern);\n\t\tAnnotationTxAdviceSupport.manager = annTxAdviceManager;\n\n\t\t// create proxy\n\t\tjoyProxettaSupplier.get().getProxetta().withAspect(createTxProxyAspects(annTxAdviceManager.getAnnotations()));\n\n\t\tfinal DbSessionProvider sessionProvider = new DbJtxSessionProvider(jtxManager);\n\n\t\t// querymap\n\t\tfinal long startTime = System.currentTimeMillis();\n\n\t\tfinal QueryMap queryMap = new DbPropsQueryMap();\n\n\t\tlog.debug(\"Queries loaded in \" + (System.currentTimeMillis() - startTime) + \"ms.\");\n\t\tlog.debug(\"Total queries: \" + queryMap.size());\n\n\t\t// dboom\n\t\tdbOom = DbOom.create()\n\t\t\t.withConnectionProvider(connectionProvider)\n\t\t\t.withSessionProvider(sessionProvider)\n\t\t\t.withQueryMap(queryMap)\n\t\t\t.get();\n\n\t\tdbOom.connect();\n\n\t\tfinal DbEntityManager dbEntityManager = dbOom.entityManager();\n\t\tdbEntityManager.reset();\n\n\t\tpetiteContainer.addBean(beanNamePrefix() + \"query\", dbOom.queryConfig());\n\t\tpetiteContainer.addBean(beanNamePrefix() + \"oom\", dbOom.config());\n\n\t\t// automatic configuration\n\t\tif (autoConfiguration) {\n\t\t\tfinal AutomagicDbOomConfigurator automagicDbOomConfigurator =\n\t\t\t\tnew AutomagicDbOomConfigurator(dbEntityManager, true);\n\n\t\t\tautomagicDbOomConfigurator.configure();\n\t\t}\n\n\t\tdbEntityManagerConsumers.accept(dbEntityManager);\n\n\t\tlog.info(\"DB OK!\");\n\t}",
"@Override\n\tpublic void construct() {\n\t\tSystem.out.println(\"Getting a MySQL Database Connection\");\n\n\t}",
"private void initDb() {\n\t\tif (dbHelper == null) {\n\t\t\tdbHelper = new DatabaseOpenHelper(this);\n\t\t}\n\t\tif (dbAccess == null) {\n\t\t\tdbAccess = new DatabaseAccess(dbHelper.getWritableDatabase());\n\t\t}\n\t}",
"public static Connection getInstance (){\n\tString url =\"jdbc:informix-sqli://192.168.10.18:4526/teun0020:informixserver=aix2;DB_LOCALE=zh_tw.utf8;CLIENT_LOCALE=zh_tw.utf8;GL_USEGLU=1\";\r\n\tString username = \"srismapp\";\r\n\tString password =\"ris31123\";\r\n\tString driver = \"com.informix.jdbc.IfxDriver\";\t\r\n\tConnection conn=null;\r\n\ttry {\r\n\t Class.forName(driver);\r\n\t conn = DriverManager.getConnection(url, username, password);\r\n\t} catch (SQLException e) {\r\n\t e.printStackTrace();\r\n\t} catch (ClassNotFoundException e) {\r\n\t e.printStackTrace();\r\n\t}\r\n\treturn conn;\r\n }",
"public DBConnection()\n {\n\n }"
] | [
"0.6992907",
"0.6901351",
"0.6833162",
"0.6829978",
"0.68128395",
"0.67881733",
"0.6742413",
"0.6726153",
"0.6665906",
"0.65839034",
"0.65787405",
"0.6573315",
"0.6568859",
"0.65479",
"0.65357316",
"0.65353566",
"0.65293443",
"0.65175635",
"0.6505596",
"0.6498219",
"0.64977336",
"0.64964014",
"0.6482969",
"0.64734674",
"0.64601594",
"0.6454799",
"0.64351976",
"0.64336294",
"0.6413316",
"0.6410287",
"0.6410006",
"0.64042634",
"0.63904166",
"0.6389815",
"0.6378656",
"0.6375749",
"0.6373047",
"0.6357381",
"0.63422567",
"0.6340291",
"0.6338579",
"0.63302475",
"0.6325809",
"0.6323299",
"0.6318192",
"0.63072616",
"0.6301504",
"0.6287909",
"0.62868154",
"0.62811357",
"0.62769336",
"0.62684315",
"0.62628865",
"0.6260435",
"0.6260222",
"0.6256047",
"0.62378836",
"0.6233038",
"0.6220525",
"0.62204945",
"0.621455",
"0.6206631",
"0.6197467",
"0.6195891",
"0.6193139",
"0.61927384",
"0.6186418",
"0.61838907",
"0.6178277",
"0.61763036",
"0.61735815",
"0.6173326",
"0.6166079",
"0.6165877",
"0.6163269",
"0.6161287",
"0.6152753",
"0.6149427",
"0.61359507",
"0.6133369",
"0.6123245",
"0.61065954",
"0.61044854",
"0.60882866",
"0.60864174",
"0.60854924",
"0.60830003",
"0.60826385",
"0.60825163",
"0.60747695",
"0.6074072",
"0.60734427",
"0.60680145",
"0.6064114",
"0.60609984",
"0.60592324",
"0.60520285",
"0.60494244",
"0.6043314",
"0.6042477"
] | 0.83369774 | 0 |
This method inserts a technical office in the database. | @Override
public synchronized int insert(final UfficioTecnico uff)
throws SQLException {
final Connection connection = connectionManager.getConnection();
try {
final PreparedStatement preparedStatement = connection
.prepareStatement(INSERT_UFFICIO_TECNICO);
int i = 1;
preparedStatement.setString(i++, uff.getNome());
preparedStatement.setString(i++, uff.getTel());
preparedStatement.setString(i++, uff.getEmail());
preparedStatement.setString(i, uff.getUbicazione());
return preparedStatement.executeUpdate();
} finally {
connectionManager.freeConnection(connection);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic boolean insertOffice(Map<String, Object> params) {\n\t\treturn false;\n\t}",
"public void saveOffice(Office office) {\n\t\t\n\t}",
"@Override\n\tpublic void insertIPODetail(IPODetail ipo) throws SQLException {\n\t\t\n\t}",
"public void insert(TdiaryArticle obj) throws SQLException {\n\r\n\t}",
"int insert(InspectionAgency record);",
"public void insert1(DocumentDetails docDetails) {\n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n try {\n tx = session.beginTransaction();\n session.save(docDetails);\n tx.commit();\n } catch (RuntimeException e) {\n \n tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n }",
"int insert(NeeqCompanyAccountingFirmOnline record);",
"public void AddInDB(Word newWord) throws SQLException {\n String insertQuery = \"INSERT INTO tbltest(word,pronunciation,define) VALUES(?,?,?)\";\r\n ps = con.prepareStatement(insertQuery);\r\n ps.setString(1, newWord.getWord());\r\n ps.setString(2, newWord.getPronunciation());\r\n ps.setString(3, newWord.getDefine());\r\n\r\n ps.executeUpdate();\r\n }",
"public static void buildOfficeTable() {\n\t\tif (TableExists(\"office\"))\n\t\t\treturn;// if office table has been built, no need to build again\n\t\tConnect connectLocal = new Connect(\"local\", localDatabase);\n\t\tConnection localConnection = connectLocal.getConnection();\n\t\tConnect connectServer = new Connect(\"server\", serverDatabase);\n\t\tConnection serverConnection = connectServer.getConnection();\n\t\tResultSet rs;\n\t\tList<String> emails = new ArrayList<>();\n\t\ttry {\n\t\t\tStatement stmtserver = serverConnection.createStatement();\n\t\t\trs = stmtserver.executeQuery(\n\t\t\t\t\tString.format(\"select email from USER where office is not null and email is not null\"));\n\t\t\twhile (rs.next()) {\n\t\t\t\temails.add(rs.getString(1));\n\t\t\t}\n\t\t\tStatement stmtlocal = localConnection.createStatement();\n\t\t\t//System.out.println(emails.size());\n\t\t\tfor (int i = 0; i < emails.size(); i++) {\n\t\t\t\trs = stmtserver.executeQuery(String.format(\n\t\t\t\t\t\t\"select INFRASTRUCTURE.name from USER, INFRASTRUCTURE\"\n\t\t\t\t\t\t\t\t+ \" where USER.office=INFRASTRUCTURE.SEMANTIC_ENTITY_ID and USER.email='%s'\",\n\t\t\t\t\t\temails.get(i)));\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tstmtlocal.executeUpdate(String.format(\"insert into office(email,office) value('%s','%s')\",\n\t\t\t\t\t\t\temails.get(i), rs.getString(1)));\n\t\t\t\t}\n\t\t\t}\n\t\t\trs.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tconnectLocal.close();\n\t\tconnectServer.close();\n\t}",
"int insert(CompanyExtend record);",
"public void insert2(AccessionRegister docDetails) {\n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n try {\n tx = session.beginTransaction();\n session.save(docDetails);\n tx.commit();\n } catch (RuntimeException e) {\n \n tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n }",
"int insertSelective(NeeqCompanyAccountingFirmOnline record);",
"com.soa.SolicitarServicioDocument.SolicitarServicio addNewSolicitarServicio();",
"public void insert(BibliographicDetails bibDetails) {\n\n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n try {\n tx = session.beginTransaction();\n session.save(bibDetails);\n tx.commit();\n } catch (RuntimeException e) {\n \n tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n }",
"public void insert(ZyCorporation record) {\r\n getSqlMapClientTemplate().insert(\"zy_corporation.insertcorporation\", record);\r\n }",
"@RequestMapping (value=\"/offices\",\n\t\t\t\t\tmethod=RequestMethod.POST,\n\t\t\t\t\tproduces=MediaType.APPLICATION_JSON_VALUE)\n\tpublic Office create (@RequestBody Office newOffice) {\n\t\tfinal Office createdOffice = officeServices.create(newOffice);\n\t\treturn createdOffice;\n\t}",
"int insert(FinancialManagement record);",
"public void insert(Teacher o) throws SQLException {\n\t\t\r\n\t}",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.BusinessIndustryLicense insertNewBusinessIndustryLicenses(int i);",
"public void insertBooking(Booking booking) throws SQLException, Exception;",
"int insertSelective(InspectionAgency record);",
"public void insert() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.save(this);\n\t\tsession.getTransaction().commit();\n\t}",
"@Override\r\n\tpublic void insert(Object obj) throws DAOException {\n\t\tOfferta offerta;\r\n\t\ttry {\r\n\t\t\tofferta = (Offerta) obj;\r\n\r\n\t\t\tconn = getConnection(usr, pass);\r\n\r\n\t\t\tps = conn.prepareStatement(insertQuery);\r\n\r\n\t\t\tSystem.out.println(\"Inserimento dell'offerta nel db.\");\r\n\t\t\tofferta.print();\r\n\r\n\t\t\tps.setInt(1, offerta.getIdOfferta());\r\n\t\t\tps.setInt(2, offerta.getIdTratta());\r\n\t\t\tps.setInt(3, offerta.getData().getGiorno());\r\n\t\t\tps.setInt(4, offerta.getData().getMese());\r\n\t\t\tps.setInt(5, offerta.getData().getAnno());\r\n\t\t\tps.setInt(6, offerta.getOraPartenza().getOra());\r\n\t\t\tps.setInt(7, offerta.getOraPartenza().getMinuti());\r\n\t\t\tps.setInt(8, offerta.getOraArrivo().getOra());\r\n\t\t\tps.setInt(9, offerta.getOraArrivo().getMinuti());\r\n\t\t\tps.setInt(10, offerta.getPosti());\r\n\t\t\tps.setInt(11, offerta.getDataInserimento().getGiorno());\r\n\t\t\tps.setInt(12, offerta.getDataInserimento().getMese());\r\n\t\t\tps.setInt(13, offerta.getDataInserimento().getAnno());\r\n\r\n\t\t\tps.executeUpdate();\r\n\r\n\t\t} catch (ClassCastException e) {\r\n\t\t\tthrow new DAOException(\"Errore in insert ClassCastException.\");\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new DAOException(\"Errore in insert SQLException.\");\r\n\t\t}\r\n\r\n\t}",
"public void saveFiAvailableInvoice(FiAvailableInvoice fiAvailableInvoice);",
"public void insert() throws SQLException {\n Statement stmtIn = DatabaseConnector.getInstance().getStatementIn();\n\n int check = BusinessFacade.getInstance().checkIDinDB(this.productRelation.getID(),\n this.post.getID(), \"goods\", \"product_type_id\", \"post_id\");\n if (check == -1){\n stmtIn.executeUpdate(\"INSERT INTO ngaccount.goods (goods_id , product_type_id, post_id) \" +\n \"VALUES ('\" + this.goodID + \"', '\" + this.productRelation.getID() +\n \"', '\" + this.post.getID() + \"');\");\n }\n }",
"public void insert() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry { myData.record.save(background.getClient()); }\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}",
"public void insere(Pessoa pessoa){\n\t\tdb.save(pessoa);\n\t}",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData addNewCompanyBaseData();",
"int insert(EquipmentOrder record);",
"public long insert(EvaluetingListDO evaluetingList) throws DataAccessException;",
"int insert(SrHotelRoomInfo record);",
"void insert(TResearchTeach record);",
"public static void inserttea() {\n\t\ttry {\n\t\t\tps = conn.prepareStatement(\"insert into teacher values ('\"+teaid+\"','\"+teaname+\"','\"+teabirth+\"','\"+protitle+\"','\"+cno+\"')\");\n\t\t\tSystem.out.println(\"cno:\"+cno);\n\t\t\tps.executeUpdate();\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"教师记录添加成功!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}catch (Exception e){\n\t\t\t// TODO Auto-generated catch block\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"数据添加异常!\", \"提示消息\", JOptionPane.ERROR_MESSAGE);\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"x0401.oecdStandardAuditFileTaxPT1.ProductDocument.Product addNewProduct();",
"public void insertItem(Evaluation evaluation) throws FileNotFoundException, IOException, SQLException {\n DataStore dataStore = DataStoreManager.getDataStore();\n dataStore.setAutoCommit(false);\n // The last evaluation is deleted\n dataStore.execute(new StatementReader(\"sql/evaluation.xml\").getStatement(\"deleteLastEvaluation\"), evaluation);\n dataStore.execute(new StatementReader(\"sql/evaluation.xml\").getStatement(\"insertEvaluation\"), evaluation);\n dataStore.commit();\n }",
"int insert(ProSchoolWare record);",
"void insertBooking(detailDTO detail) throws DataAccessException;",
"int insert(BasicEquipment record);",
"int insert(AoD5e466WorkingDay record);",
"int insert(HotelType record);",
"@Override\n\tpublic void addLecture(Lecture l) {\n\t\tSession session = this.sessionFactory.getCurrentSession();\n\t\tsession.persist(l);\n\t}",
"public void insert() throws SQLException {\n String sql = \"INSERT INTO course (courseDept, courseNum, courseName, credit, info) \"\n + \" values ('\"\n + this.courseDept + \"', '\"\n + this.courseNum + \"', '\"\n + this.courseName + \"', \"\n + this.credit + \", '\"\n + this.info + \"')\";\n\n DatabaseConnector.updateQuery(sql);\n }",
"int insert(EcsSupplierRebate record);",
"public void insertEmp(Emp emp) {\n\t\t\n\t}",
"private void insertFields()\n {\n RideDetails details=new RideDetails();\n details.setStartPt(editStartingPt.getText().toString());\n details.setEndPt(editEndingPt.getText().toString());\n\n try {\n details.setTravelDate(dateFormatter.parse(editDate.getText().toString()));\n\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n details.setNoSpot(Integer.parseInt(editNoSpot.getText().toString()));\n\n\n dbOperations(details);\n\n }",
"private void addSomeItemsToDB () throws Exception {\n/*\n Position pos;\n Course course;\n Ingredient ing;\n\n PositionDAO posdao = new PositionDAO();\n CourseDAO coursedao = new CourseDAO();\n IngredientDAO ingdao = new IngredientDAO();\n\n ing = new Ingredient(\"Mozzarella\", 10,30);\n ingdao.insert(ing);\n\n // Salads, Desserts, Main course, Drinks\n pos = new Position(\"Pizza\");\n posdao.insert(pos);\n\n course = new Course(\"Salads\", \"Greek\", \"Cucumber\", \"Tomato\", \"Feta\");\n coursedao.insert(course);\n\n ing = new Ingredient(\"-\", 0,0);\n ingdao.insert(ing);\n */\n }",
"void insert(organize_infoBean record);",
"public void insert() throws SQLException;",
"public static void insert(Allergy iAllergy, Context iContext) throws MapperException\n {\n try\n {\n \n ArrayList<String> values = new ArrayList<String>(10);\n values.add(iAllergy.getID().toString());\n values.add(String.valueOf(iAllergy.getAllergic()));\n values.add(String.valueOf(iAllergy.getReaction()));\n values.add(String.valueOf(iAllergy.getSeverity()));\n\n AllergiesTDG.insert(values, iContext);\n } \n catch (PersistenceException e)\n {\n throw new MapperException(\n \"The mapper failed to complete an operation because the persistence \"\n + \"layer returned the following error: \"\n + e.getMessage());\n } \n catch (Exception e)\n {\n throw new MapperException(\n \"The mapper failed to complete an operation for the following \"\n + \"unforeseen reason: \"\n + e.getMessage());\n }\n }",
"private void addArticle() {\n\t\tAdminComposite.display(\"\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\tQuotationDetailsDTO detail = new QuotationDetailsDTO();\n\t\ttry {\n\t\t\tdetail = createQuotationDetail(detail);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tif (validateMandatoryParameters(detail)) {\n\t\t\taddToArticleTable(detail);\n\t\t}\n\t}",
"private void insertPerform(){\n \tif(!verify()){\n \t\treturn;\n \t}\n \tString val=new String(\"\");\n \tval=val+\"'\"+jTextField1.getText()+\"', \"; // poNo\n \tval=val+\"'\"+\n \t\tinventorycontroller.util.DateUtil.getRawFormat(\n \t\t\t(java.util.Date)jXDatePicker1.getValue()\n \t\t)\n \t\t+\"', \"; // poDate\n \tval=val+\"'\"+vndList[jTextField2.getSelectedIndex()-1]+\"', \"; // vndNo\n \tval=val+\"'\"+jTextField3.getText()+\"', \"; // qtnNo\n \tval=val+\"'\"+\n \t\tinventorycontroller.util.DateUtil.getRawFormat(\n \t\t\t(java.util.Date)jXDatePicker2.getValue()\n \t\t)\n \t\t+\"', \"; // qtnDate\n \tval=val+\"'\"+poAmount+\"', \"; // poTotal\n \tval=val+\"'pending', \"; // poStatus\n \tval=val+\"'\"+jEditorPane1.getText()+\"' \"; // remark\n \t\n \ttry{\n \t\tdbInterface1.cmdInsert(\"poMaster\", val);\n \t\tinsertPoBomDesc();\n \t\tinsertPoDesc();\n\t \tupdateBOM();\n \t}\n \tcatch(java.sql.SQLException ex){\n \t\tSystem.out.println (ex);\n \t}\n \tresetPerform();\n }",
"void insertFlightseat(AirFlightseat dRef);",
"int insert(CmIndustryConfig record);",
"@Override\n\tpublic void insert(String descrizione) throws SQLException {\n\t\tPreparedStatement ps=conn.prepareStatement(\"INSERT INTO categoria(descrizione) VALUES (?)\");\n\t\tps.setString(1, descrizione);\n\t\tps.executeUpdate();\n\t\t\n\t}",
"int insert(FctWorkguide record);",
"int insertSelective(CompanyExtend record);",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData addNewAuditingCompany();",
"org.landxml.schema.landXML11.RoadsideDocument.Roadside insertNewRoadside(int i);",
"int insert(GoodsPo record);",
"int insertSelective(ProSchoolWare record);",
"public void insert(SessionFactory factory, EihApps input) {\n\n\t}",
"public void addTrainingInitialAdmin(TrainingInitialAdmin ti) {\n Integer id = null;\n\n Session session = ConnectionFactory.getInstance().getSession();\n\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n\n session.saveOrUpdate(ti);\n tx.commit();\n\n\n } catch (HibernateException e) {\n try {\n tx.rollback(); //error\n } catch (HibernateException he) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n\n }",
"@Override\n\tpublic void insert(UploadDF entity) {\n\t\tSession session = factory.openSession();\n\t\ttry{\n\t\t\tsession.beginTransaction();\n\t\t\tsession.save(entity);\n\t\t\tsession.getTransaction().commit();\n\t\t}catch(HibernateException exception){\n\t\t\tsession.getTransaction().rollback();\n\t\t\tthrow exception;\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t}",
"int insert(R_dept_trade record);",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.BusinessIndustryLicense addNewBusinessIndustryLicenses();",
"public boolean createPersonalDetails(Integer staffID, String surname, String name, Date dob, String address, String town, String county,\n String postCode, String telNo, String mobileNo, String emergencyContact, String emergencyContactNo){\n\n\n hrDB.addPDRecord(staffID, surname, name, dob, address, town, county,\n postCode, telNo, mobileNo, emergencyContact, emergencyContactNo);\n return true;\n\n\n }",
"@POST\n @Consumes(MediaType.APPLICATION_JSON)\n public void inserirOfficer(Officer officer) {\n officerDao.inserir(officer);\n }",
"public void insertPersonnelUnit(PersonnelUnit personnelUnit) throws SQLException {\n PreparedStatement preparedStatement = null;\n MysqlDbManager mysqlDb = MysqlDbManager.getInstance();\n try {\n if (personnelUnit.getClass() == Employee.class) {\n Employee employee = (Employee) personnelUnit;\n String SQL = \"INSERT INTO employees (surname, name, gender, marital_status, salary, dob) VALUES (?, ?, ?, ?, ?, ?)\";\n mysqlDb.getNewConnection();\n preparedStatement = mysqlDb.getConnection().prepareStatement(SQL);\n preparedStatement.setString(1, employee.getSurname());\n preparedStatement.setString(2, employee.getName());\n preparedStatement.setString(3, employee.getGender());\n preparedStatement.setString(4, employee.getMaritalStatus());\n preparedStatement.setInt(5, employee.getSalary());\n preparedStatement.setDate(6, new Date(employee.getDob().getTime()));\n mysqlDb.executePreparedUpdate(preparedStatement);\n LOGGER.log(Level.WARNING, \"The new employee was added to a database!\");\n }\n\n if (personnelUnit.getClass() == Technology.class) {\n Technology technology = (Technology) personnelUnit;\n String SQL = \"INSERT INTO technologies (name, description, rate) VALUES (?, ?, ?)\";\n mysqlDb.getNewConnection();\n preparedStatement = mysqlDb.getConnection().prepareStatement(SQL);\n preparedStatement.setString(1, technology.getName());\n preparedStatement.setString(2, technology.getDescription());\n preparedStatement.setInt(3, technology.getRate());\n mysqlDb.executePreparedUpdate(preparedStatement);\n LOGGER.log(Level.WARNING, \"The new technology was added to a database!\");\n }\n\n if (personnelUnit.getClass() == Affair.class) {\n Affair affair = (Affair) personnelUnit;\n String SQL = \"INSERT INTO affair (idEmployee, idTechnology) VALUES (?, ?)\";\n mysqlDb.getNewConnection();\n preparedStatement = mysqlDb.getConnection().prepareStatement(SQL);\n preparedStatement.setInt(1, affair.getEmployee().getId());\n preparedStatement.setInt(2, affair.getTechnology().getId());\n mysqlDb.executePreparedUpdate(preparedStatement);\n LOGGER.log(Level.WARNING, \"The new affair was added to a database!\");\n }\n } catch (ClassCastException e) {\n LOGGER.log(Level.SEVERE, \"ClassCastException: \" + e.toString());\n } catch (NullPointerException e) {\n LOGGER.log(Level.SEVERE, \"There is no access to the mysql database: \" + e.toString());\n } catch (SQLException e) {\n LOGGER.log(Level.SEVERE, \"SQLException\" + e.toString());\n } finally {\n try {\n if (preparedStatement != null) {\n preparedStatement.close();\n }\n if (!mysqlDb.getConnection().isClosed()) {\n mysqlDb.getConnection().close();\n }\n } catch (SQLException e) {\n LOGGER.log(Level.SEVERE, \"SQLException\" + e.toString());\n }\n }\n }",
"int insertSelective(SrHotelRoomInfo record);",
"void insert(Disproduct record);",
"int insert(WstatTeachingClasshourTeacher record);",
"int insert(ReEducation record);",
"public void saveNew() {\r\n String name, compName;\r\n double price;\r\n int id, inv, max, min, machId;\r\n //Gets the ID of the last part in the inventory and adds 1 to it \r\n id = Inventory.getAllParts().get(Inventory.getAllParts().size() - 1).getId() + 1;\r\n name = nameField.getText();\r\n inv = Integer.parseInt(invField.getText());\r\n price = Double.parseDouble(priceField.getText());\r\n max = Integer.parseInt(maxField.getText());\r\n min = Integer.parseInt(minField.getText());\r\n\r\n if (inHouseSelected) {\r\n machId = Integer.parseInt(machineOrCompanyField.getText());\r\n Part newPart = new InHouse(id, name, price, inv, min, max, machId);\r\n Inventory.addPart(newPart);\r\n } else {\r\n compName = machineOrCompanyField.getText();\r\n Part newPart = new Outsourced(id, name, price, inv, min, max, compName);\r\n Inventory.addPart(newPart);\r\n }\r\n\r\n }",
"stockFilePT102.StockDocument.Stock insertNewStock(int i);",
"@Override\r\n public void save(BuyTicketModel value) {\n String sql = \"insert into buyticket values(?,?,?,?,?,?,?,?,?,?,?,?) \";\r\n \r\n try {\r\n PreparedStatement pstm = database.getCon().prepareStatement(sql);\r\n pstm.setString(1, value.getSlno());\r\n pstm.setString(2, value.getCustomername());\r\n pstm.setString(10,value.getContact());\r\n pstm.setString(3, value.getDestination());\r\n pstm.setString(4, value.getTime());\r\n pstm.setString(5, value.getFare());\r\n pstm.setString(6, value.getComment());\r\n pstm.setString(7, value.getDate());\r\n pstm.setString(8, value.getPayment());\r\n pstm.setString(9, value.getSeat());\r\n pstm.setString(11, value.getType());\r\n pstm.setString(12, value.getBusname());\r\n \r\n \r\n pstm.executeUpdate();\r\n pstm.close();\r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(BuyTicketImpl.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n }",
"@Override\n\tpublic void insert(RaceZipTbVo vo) throws SQLException {\n\t\t\n\t}",
"public void addAnzeige(Anzeige anzeigeToAdd) throws StoreException {\n \r\n \t try {\r\n PreparedStatement preparedStatement = connection\r\n .prepareStatement(\"insert into Dbp71.Anzeige (titel, text, preis, ersteller, status) values (?,?,?,?,?)\");\r\n \t\t\r\n //preparedStatement.setInt(1, anzeigeToAdd.getId_Anzeige());\r\n preparedStatement.setString(1, anzeigeToAdd.getTitel());\r\n preparedStatement.setString(2, anzeigeToAdd.getText());\r\n preparedStatement.setBigDecimal(3, BigDecimal.valueOf(anzeigeToAdd.getPreis()));\r\n // preparedStatement.setString(5, anzeigeToAdd.getErsteller());\r\n preparedStatement.setString(4, anzeigeToAdd.getErsteller());\r\n preparedStatement.setString(5, anzeigeToAdd.getStatus());\r\n System.out.println(anzeigeToAdd.getTitel()+ anzeigeToAdd.getText()+ BigDecimal.valueOf(anzeigeToAdd.getPreis())\r\n + anzeigeToAdd.getErsteller()+ anzeigeToAdd.getErsteller()+ anzeigeToAdd.getStatus());\r\n preparedStatement.executeUpdate();\r\n \r\n \r\n }\r\n catch (SQLException e) {\r\n throw new StoreException(e);\r\n }\r\n }",
"void insert(OrderPreferential record) throws SQLException;",
"Hotel saveHotel(Hotel hotel);",
"int insert(WordSchool record);",
"int insert(CxBasStaff record);",
"public void insert(registration ris) {\n\n try {\n\t\t\tSessionFactory sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory();\n\t\t\t\t\n\t\t\tSession session = sessionFactory.openSession();\n\t\t\t\n\t\t\tTransaction transaction=session.beginTransaction();\n\t\t\t\n\t\t\tsession.save(ris);\n\t\t\t\n\t\t\ttransaction.commit();\n\t\t\t\n\t\t\tsession.close();\n\t\t} catch (HibernateException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }",
"int insert(TbFreightTemplate record);",
"void insertfacultydata(Faculty fac_insert);",
"public void insert(){\r\n\t\tString query = \"INSERT INTO liveStock(name, eyeColor, sex, type, breed, \"\r\n\t\t\t\t+ \"height, weight, age, furColor, vetNumber) \"\r\n\t\t\t\t+ \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) \";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement prepareStatement = conn.prepareStatement(query);\r\n\t\t\t\r\n\t\t\tprepareStatement.setString(1, liveStock.getName());\r\n\t\t\tprepareStatement.setString(2, liveStock.getEyeColor());\r\n\t\t\tprepareStatement.setString(3, liveStock.getSex());\r\n\t\t\tprepareStatement.setString(4, liveStock.getAnimalType());\r\n\t\t\tprepareStatement.setString(5, liveStock.getAnimalBreed());\r\n\t\t\tprepareStatement.setString(6, liveStock.getHeight());\r\n\t\t\tprepareStatement.setString(7, liveStock.getWeight());\r\n\t\t\tprepareStatement.setInt(8, liveStock.getAge());\r\n\t\t\tprepareStatement.setString(9, liveStock.getFurColor());\r\n\t\t\tprepareStatement.setInt(10, liveStock.getVetNumber());\r\n\t\t\t\r\n\t\t\tprepareStatement.execute();\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"int insertSelective(EquipmentOrder record);",
"public void insertBooking(){\n \n Validator v = new Validator();\n if (createBookingType.getValue() == null)\n {\n \n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Set Booking Type!\")\n .showInformation();\n \n return;\n \n }\n if (createBookingType.getValue().toString().equals(\"Repair\"))\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Go to Diagnosis and Repair tab for creating Repair Bookings!\")\n .showInformation();\n \n \n if(v.checkBookingDate(parseToDate(createBookingDate.getValue(),createBookingTimeStart.localTimeProperty().getValue()),\n parseToDate(createBookingDate.getValue(),createBookingTimeEnd.localTimeProperty().getValue()))\n && customerSet)\n \n { \n \n int mID = GLOBAL.getMechanicID();\n \n try {\n mID = Integer.parseInt(createBookingMechanic.getSelectionModel().getSelectedItem().toString().substring(0,1));\n } catch (Exception ex) {\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Set Mechanic!\")\n .showInformation();\n return;\n }\n \n if (mID != GLOBAL.getMechanicID())\n if (!getAuth(mID)) return;\n \n createBookingClass();\n dbH.insertBooking(booking);\n booking.setID(dbH.getLastBookingID());\n appointment = createAppointment(booking);\n closeWindow();\n \n }\n else\n {\n String extra = \"\";\n if (!customerSet) extra = \" Customer and/or Vehicle is not set!\";\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Errors with booking:\"+v.getError()+extra)\n .showInformation();\n }\n \n }",
"int insert(Depart record);",
"public static void insertLutenicaRecordToDB(LocalDateTime date, int quantity, String babaName){\n try {\n dbDAO.getInstance().createLutenicaRecord(date, quantity, babaName);\n System.out.println(\"Lutenica record was added to db\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"int insert(Nutrition record);",
"@Override\n\tpublic void insert(Seller obj) {\n\t\tPreparedStatement st = null;\n\t\ttry {\n\t\t\tst = conn.prepareStatement(\n\t\t\t\t\t\"INSERT INTO seller\\r\\n\" +\n\t\t\t\t\t\"(Name, Email, BirthDate,BaseSalary,DepartmentId)\\r\\n\" +\n\t\t\t\t\t\"VALUES\\r\\n\"+ \n\t\t\t\t\t\"(?,?,?,?,?);\", Statement.RETURN_GENERATED_KEYS);\n\t\t\tst.setString(1, obj.getName());\n\t\t\tst.setString(2, obj.getEmail());\n\t\t\tst.setDate(3, new java.sql.Date(obj.getBirthDate().getTime()));\n\t\t\tst.setDouble(4, obj.getBaseSalary());\n\t\t\tst.setInt(5, obj.getDepartment().getId());\n\t\t\tint rowsAffected = st.executeUpdate();\n\t\t\tif(rowsAffected > 0) {\n\t\t\t\tResultSet rst = st.getGeneratedKeys();\n\t\t\t\tif(rst.next()) obj.setId(rst.getInt(1));\n\t\t\t\trst.close();\n\t\t\t}\n\t\t}catch(SQLException e) {\n\t\t\tthrow new DbException(e.getMessage());\n\t\t}finally {\n\t\t\tDb.closeStatement(st);\n\t\t}\n\t}",
"int insert(ItoProduct record);",
"public void insert(Service servico){\n Database.servico.add(servico);\n }",
"public void insertProblema() {\n \n \n java.util.Date d = new java.util.Date();\n java.sql.Date fecha = new java.sql.Date(d.getTime());\n \n this.equipo.setEstado(true);\n this.prob = new ReporteProblema(equipo, this.problema, true,fecha);\n f.registrarReporte(this.prob);\n \n }",
"public EvaluationsDegreePk insert(EvaluationsDegree dto) throws EvaluationsDegreeDaoException;",
"public void insertOffer(Offer o);",
"void insertSelective(CTipoComprobante record) throws SQLException;",
"private void insertData() {\r\n \r\n TeatroEntity teatro = factory.manufacturePojo(TeatroEntity.class);\r\n em.persist(teatro);\r\n FuncionEntity funcion = factory.manufacturePojo(FuncionEntity.class);\r\n List<FuncionEntity> lista = new ArrayList();\r\n lista.add(funcion);\r\n em.persist(funcion);\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n sala.setFuncion(lista);\r\n em.persist(sala);\r\n data.add(sala);\r\n }\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n em.persist(sala);\r\n sfdata.add(sala);\r\n }\r\n \r\n }",
"int insert(TbInvCategory record);",
"public abstract void addInExpenditure(Transaction expenditure, Ui ui, String bankType) throws BankException;"
] | [
"0.6370209",
"0.6216741",
"0.5982635",
"0.59812796",
"0.59205294",
"0.5913184",
"0.58676666",
"0.5842587",
"0.5768284",
"0.5730432",
"0.5726654",
"0.5694819",
"0.5692381",
"0.5683116",
"0.5662404",
"0.56598103",
"0.5641161",
"0.56386024",
"0.5629044",
"0.5612701",
"0.5608267",
"0.56064224",
"0.5599854",
"0.55696416",
"0.555112",
"0.55500335",
"0.5543333",
"0.55335647",
"0.5494606",
"0.54939544",
"0.54881394",
"0.54856443",
"0.5465453",
"0.54495406",
"0.54458195",
"0.54394263",
"0.5437667",
"0.54305524",
"0.5426574",
"0.54244167",
"0.5418869",
"0.5413138",
"0.54093325",
"0.54002637",
"0.539999",
"0.5396236",
"0.5392569",
"0.53924286",
"0.53870106",
"0.5385944",
"0.5385673",
"0.5383162",
"0.53772205",
"0.5369974",
"0.53679323",
"0.5360574",
"0.5357676",
"0.5355993",
"0.5355303",
"0.5354979",
"0.5350319",
"0.53486633",
"0.5339725",
"0.533274",
"0.53303653",
"0.5325262",
"0.5323233",
"0.5323078",
"0.5312219",
"0.53109205",
"0.53094935",
"0.530464",
"0.5304559",
"0.52956355",
"0.52947176",
"0.529071",
"0.52896637",
"0.5286654",
"0.5282772",
"0.5281154",
"0.527093",
"0.5267924",
"0.5267127",
"0.52650183",
"0.5262617",
"0.5261392",
"0.5259924",
"0.52588207",
"0.52558833",
"0.525273",
"0.52518624",
"0.5249955",
"0.52491605",
"0.5246544",
"0.52430415",
"0.5239672",
"0.52371436",
"0.52360713",
"0.5235138",
"0.52345085"
] | 0.5354141 | 60 |
This method allows everyone to get information from the database registered technical offices. | @Override
public List<UfficioTecnico> getAll() throws SQLException {
final Connection connection = connectionManager.getConnection();
try {
final PreparedStatement preparedStatement = connection
.prepareStatement(SELECT_ALL);
final ResultSet rs = preparedStatement.executeQuery();
final List<UfficioTecnico> uffici = new ArrayList<UfficioTecnico>();
while (rs.next()) {
final UfficioTecnico uff = new UfficioTecnico();
uff.setId(rs.getInt("Id"));
uff.setNome(rs.getString("nome"));
uff.setTel(rs.getString("tel"));
uff.setEmail(rs.getString("email"));
uff.setUbicazione(rs.getString("ubicazione"));
uffici.add(uff);
}
return uffici;
} finally {
connectionManager.freeConnection(connection);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public List<Officer> getOfficer() {\n return officerDao.listar(); \n }",
"public ReturnData queryEncounterForinfo(){\n ReturnData returnData = new ReturnData();\n String [] jsids = {\"03034a63-e8d6-49a4-8e71-58a544b8fca3\",\n \"1ae3709f-d8c2-4db8-9f38-1a60fb0d2e61\",\n \"7340479a-28fc-44b6-bf18-374f037d5f03\",\n \"e1e5f378-b16f-441e-b673-0f0d2544d108\"};\n try {\n returnData.setData(jueseMapper.selectByPrimaryKey(jsids[MyUuid.getRandomInt(jsids.length)-1]));\n }catch (Exception e){\n returnData.setCode(-1);\n returnData.setData(e.getMessage());\n }finally {\n return returnData;\n }\n }",
"@Transactional(readOnly = true)\r\n\t@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Office> getOffices() {\r\n\t\treturn em.createQuery(\"select o from Office o order by o.idOffice\").getResultList();\r\n\t}",
"void fetchHolidayRentalHousesData();",
"public List<Office> getAllOffices(){\n String sql = \"select * from offices\";\n return jdbcTemplate.query(sql, new OfficeRowMapper());\n }",
"public void getEventDetails() {\r\n\t\t// Query DB to get specific event information based on EventID.\r\n\t}",
"public interface FitnessCentre {\r\n\r\n\t/**\r\n\t * Retrieve all <code>Room</code>s from the data store.\r\n\t * @return a <code>Collection</code> of <code>Room</code>s\r\n\t */\r\n\tCollection<Room> getRooms() throws DataAccessException;\r\n\t\r\n\t/**\r\n\t * Retrieve all <code>ActivityType</code>s from the data store.\r\n\t * @return a <code>Collection</code> of <code>ActivityType</code>s\r\n\t */\r\n\tCollection<ActivityType> getActivityTypes() throws DataAccessException;\r\n\t\r\n\t/**\r\n\t * Retrieve all <code>User</code>s from the data store.\r\n\t * @return a <code>Collection</code> of <code>User</code>s\r\n\t */\r\n\tCollection<User> getUsers() throws DataAccessException;\r\n\t\r\n\t/**\r\n\t * Retrieve all <code>instructor</code>s from the data store.\r\n\t * @return a <code>Collection</code> of <code>instructor</code>s\r\n\t */\r\n\tCollection<User> getInstructors() throws DataAccessException;\r\n\t\r\n\t/**\r\n\t * Retrieve all <code>staff</code>s from the data store.\r\n\t * @return a <code>Collection</code> of <code>staff</code>s\r\n\t */\r\n\tCollection<User> getStaffs() throws DataAccessException;\r\n\t\r\n\t/**\r\n\t * Retrieve all <code>Lesson</code>s from the data store.\r\n\t * @return a <code>Collection</code> of <code>Lesson</code>s\r\n\t */\r\n\tCollection<Lesson> getLessons() throws DataAccessException;\r\n\t\r\n\t/**\r\n\t * Retrieve all active <code>Lesson</code>s from the data store.\r\n\t * @return a <code>Collection</code> of active <code>Lesson</code>s\r\n\t */\r\n\tCollection<Lesson> getActiveLessons() throws DataAccessException;\r\n\t\r\n\t/**\r\n\t * Retrieve all <code>Reservation</code>s from the data store.\r\n\t * @return a <code>Collection</code> of <code>Reservation</code>s\r\n\t */\r\n\tCollection<Reservation> getReservations() throws DataAccessException;\r\n\t\r\n\t/**\r\n\t * Vrátí Místnost z data store podle id.\r\n\t * @param id id místnosti, kterou hledám\r\n\t * @return požadovaná Místnost, pokud byla nalezena\r\n\t * @throws DataAccessException\r\n\t */\r\n\tRoom loadRoom(int id) throws DataAccessException;\r\n\t\r\n\t/**\r\n\t * Vrati Aktivitu z data store podle id.\r\n\t */\r\n\tActivityType loadActivityType(int id) throws DataAccessException;\r\n\t\r\n\t/**\r\n\t * Vrati Uzivatelskou roli z data store dle zadaneho id.\r\n\t */\r\n\tUserRole loadUserRole(int id) throws DataAccessException;\r\n\t\r\n\t/**\r\n\t * Vrati Uzivatele z data store dle zadaneho id.\r\n\t */\r\n\tUser loadUser(int id) throws DataAccessException;\r\n\t\r\n\t/**\r\n\t * Vrati Lekci z data store podle id.\r\n\t */\r\n\tLesson loadLesson(int id) throws DataAccessException;\r\n\t\r\n\t/**\r\n\t * Vrati Rezervaci z data store podle id.\r\n\t */\r\n\tReservation loadReservation(int id) throws DataAccessException;\r\n\r\n\t/**\r\n\t * Uloží místnost do data store, ať už insertovanou nebo updatovanou.\r\n\t * @param room místnost, kterou chci uložit\r\n\t * @throws DataAccessException\r\n\t */\r\n\tvoid storeRoom(Room room) throws DataAccessException;\r\n\t\r\n\t/**\r\n\t * Ulozi druh aktivity do data store, at uz insertovanou nebo updatovanou.\r\n\t * @param activityType\r\n\t * @throws DataAccessException\r\n\t */\r\n\tvoid storeActivityType(ActivityType activityType) throws DataAccessException;\r\n\t\r\n\t/**\r\n\t * Ulozi uzivatele do data store, at uz insertovaneho nebo updatovaneho.\r\n\t * @param user\r\n\t * @throws DataAccessException\r\n\t */\r\n\tvoid storeUser(User user) throws DataAccessException;\r\n\t\r\n\t/**\r\n\t * Ulozi Lekci do data store, at uz insertovaneho nebo updatovaneho.\r\n\t * @param lesson\r\n\t * @throws DataAccessException\r\n\t */\r\n\tvoid storeLesson(Lesson lesson) throws DataAccessException;\r\n\t\r\n\t/**\r\n\t * Ulozi Rezervaci do data store, at uz insertovanou nebo updatovanou.\r\n\t * @param reservation\r\n\t * @throws DataAccessException\r\n\t */\r\n\tvoid storeReservation(Reservation reservation) throws DataAccessException;\r\n\r\n\t/**\r\n\t * Deletes a <code>Room</code> from the data store.\r\n\t */\r\n\tvoid deleteRoom(int id) throws DataAccessException;\r\n\t\t\r\n\t/**\r\n\t * Deletes a <code>ActivityType</code> from the data store.\r\n\t */\r\n\tvoid deleteActivityType(int id) throws DataAccessException;\r\n\t\r\n\t/**\r\n\t * Deletes a <code>User</code> from the data store.\r\n\t */\r\n\tvoid deleteUser(int id) throws DataAccessException;\r\n\t\r\n\t/**\r\n\t * Deletes a <code>Reservation</code> from the data store.\r\n\t */\r\n\tvoid deleteReservation(int id) throws DataAccessException;\r\n\t\r\n\t/**\r\n\t * Deletes a <code>Lesson</code> from the data store.\r\n\t */\r\n\tvoid deleteLesson(int id) throws DataAccessException;\r\n\r\n}",
"private static void getTheData()\n {\n try\n {\n ITEMS = getSalesOrderSets();\n }\n catch (OnlineODataStoreException e)\n {\n Log.e(TAG, \"caught OnlineODataStoreException\");\n }\n }",
"private void doGetExercises() {\n if (getMobileClientService() == null) {\n Log.w(TAG, \"Service is still not bound\");\n gettingAllExercisesOperationResult(false, \"Not bound to the service\", null);\n return;\n }\n\n try {\n boolean isGetting = getMobileClientService().getAllExercises();\n if (!isGetting) {\n gettingAllExercisesOperationResult(false, \"No Network Connection\", null);\n }\n } catch (RemoteException e) {\n e.printStackTrace();\n gettingAllExercisesOperationResult(false, \"Error sending message\", null);\n }\n }",
"@Override\r\n\tpublic List<Employee> getdetails() {\n\t\treturn empdao.findAll();\r\n\t}",
"@GetMapping(\"applicants\")\n public List<Applicant> readAll() {\n return applicantService.getAll();\n }",
"private void getVoices() throws Exception{\r\n\r\n\t\tFestival f = new Festival(\"\",\"1\");\r\n\t\t_voices = f.listOfVoices();\r\n\r\n\t}",
"public List<ProductDetails> retrieveOffers() throws MISPException {\n\n\t\tlogger.entering(\"retrieveOffers\");\n\n\t\tList<ProductDetails> productsList = null;\n\n\t\ttry {\n\n\t\t\tproductsList = this.offerDetailsMgr.retrieveOffers();\n\n\t\t} catch (DBException exception) {\n\n\t\t\tlogger.error(\n\t\t\t\t\t\"An exception occured while retrieving offer details.\",\n\t\t\t\t\texception);\n\t\t\tthrow new MISPException(exception);\n\t\t}\n\n\t\tlogger.exiting(\"retrieveOffers\", productsList);\n\n\t\treturn productsList;\n\n\t}",
"public List<Office> getNearbyOffices() {\n return nearbyOffices;\n }",
"void fetchForSaleHousesData();",
"@Test\n\tpublic void testSuppServices() {\n\t\tList<SuppServices> suppServices = suppServicesService.selectList();\n\n\t\tfor (SuppServices supp : suppServices) {\n\n\t\t\tSystem.out.println(supp);\n\t\t}\n\t}",
"@Override\n\tpublic List<BookshelfinfoEntity> queryAllBookshelfinfo() {\n\t\treturn this.sqlSessionTemplate.selectList(\"bookshelfinfo.select\");\n\t}",
"@Override\n public List<Appeal> getAllAppeals(AuthContext context) throws DSException {\n\n isContextValidFor(context, roleId -> { if(roleId == -1) throw new DSAuthException(\"Invalid Context\"); }, 1,3);\n List<Appeal> appeals = new ArrayList<>();\n try {\n //List<Map<String,Object>> data = get(\"SELECT * FROM TblAppeals\");\n List<Map<String,Object>> data = get(\"SELECT TblAppeals.*, TblDefendants.*, TblOfficerReport.* \" +\n \"FROM TblDefendants INNER JOIN (TblAppeals INNER JOIN TblOfficerReport ON TblAppeals.serialNum = TblOfficerReport.appeal) ON TblDefendants.ID = TblOfficerReport.defendant\");\n for(Map<String,Object> map: data) {\n Appeal appeal = new Appeal(map);\n Defendant defendant = new Defendant(map);\n Report report = new Report(map);\n\n appeal.setReport(report);\n appeal.setDefendant(defendant);\n\n appeals.add(appeal);\n }\n return appeals;\n } catch (SQLException e) {\n throw new DSFormatException(e.getMessage());\n }\n }",
"private void getData() {\n ApiInterface apiInterface = ServiceGenerator.createService(ApiInterface.class);\n Call<TermsConditionApi> call = apiInterface.getTermsCondition();\n call.enqueue(new Callback<TermsConditionApi>() {\n @Override\n public void onResponse(Call<TermsConditionApi> call, Response<TermsConditionApi> response) {\n if (response.isSuccessful()) {\n if (response.body().getStatus().equals(200)) {\n data = response.body().getData();\n } else {\n }\n } else {\n\n }\n }\n\n @Override\n public void onFailure(Call<TermsConditionApi> call, Throwable t) {\n// Toast.makeText(HomeActivity.this, \"\" + t.getMessage(), Toast.LENGTH_LONG).show();\n }\n });\n }",
"@Override\n\tpublic List<Entrust> select() {\n\t\treturn entrustServiceImpl.select();\n\t}",
"public void testgetOfficerHistory() {\n \n Collection OfficerData = affOfficerBean.getOfficerHistory(AFF_PK);\n if (OfficerData == null) {\n fail(\"No officer history records found\");\n }\n else { \n System.out.println(\"Officer titles returned: \" + OfficerData.size());\n }\n \n }",
"public List<Appointment> getAllDetailsRecp();",
"void fetchCountryInformation();",
"public static void loadIndustrys(){\n //Try to connect to the database\n try {\n\n //Create Database Connection\n Class.forName(Main.database.DRIVER);\n Connection con = DriverManager.getConnection(Main.database.SERVER, Main.database.USERNAME, Main.database.PASSWORD);\n\n String sql = \"SELECT * FROM Industry\";\n\n //Create the java statement\n Statement statement = con.createStatement();\n\n //Execute the query and get the result\n ResultSet row = statement.executeQuery(sql);\n\n //Iterate through the results\n while (row.next()) {\n industrys.addItem(makeItem(row.getString(\"Name\")));\n }\n\n } catch (Exception ex) {\n\n //We got an Exception\n System.err.println(ex.getMessage());\n\n //Alert Error\n JOptionPane.showMessageDialog(Main.frame, \" Error Connecting to Database!\");\n }\n }",
"@Override\n public List<Information> findAllInfo() {\n return infoDao.findAll();\n }",
"public String[] getDetailsAboutThisMachine() throws StoreFactoryException;",
"public List<PrimaryTechnician> getPrimaryTechnicianData() {\n\t\tlogger.debug(\"Inside getPrimaryTechnicianDummyData of PrimaryTechnicianDummyData\");\n\t\tList<PrimaryTechnician> primaryTechnicians = new ArrayList<PrimaryTechnician>();\n\t\tPrimaryTechnician primaryTechnician = new PrimaryTechnician(\"601\", \"Software\", \"David\");\n\t\tprimaryTechnicians.add(primaryTechnician);\n\t\tprimaryTechnician = new PrimaryTechnician(\"602\", \"Infra\", \"John\");\n\t\tprimaryTechnicians.add(primaryTechnician);\n\t\tprimaryTechnician = new PrimaryTechnician(\"603\", \"Software\", \"David\");\n\t\tprimaryTechnicians.add(primaryTechnician);\n\t\tprimaryTechnician = new PrimaryTechnician(\"604\", \"Hardware\", \"David\");\n\t\tprimaryTechnicians.add(primaryTechnician);\n\t\tprimaryTechnician = new PrimaryTechnician(\"605\", \"Software\", \"David\");\n\t\tprimaryTechnicians.add(primaryTechnician);\n\t\treturn primaryTechnicians;\n\t}",
"public List<PrimaryTechnician> getAllPrimaryTechnician() throws PrimaryTechnicianNotFoundException {\n\t\tList<PrimaryTechnician> resultPrimaryTechnicians = getPrimaryTechnicianData(); \n\t\tif(resultPrimaryTechnicians.isEmpty()) {\n\t\t\tlogger.debug(prop.getProperty(ErrorCodeConstant.PRIMARY_TECHNICIAN_ERROR_CODE));\n\t\t\tthrow new PrimaryTechnicianNotFoundException(\"Error Code:\" + ErrorCodeConstant.PRIMARY_TECHNICIAN_ERROR_CODE + \", \" + prop.getProperty(ErrorCodeConstant.PRIMARY_TECHNICIAN_ERROR_CODE));\n\t\t}\n\t\treturn resultPrimaryTechnicians;\n\t}",
"public List <AccessOffice> getAccessOfficeById(String idOffice);",
"public ResultSet getAllInterDetails(){\n ResultSet rst = null;\n\n\n try {\n String select = \"SELECT * FROM interruption\";\n Statement selectstmt = conn.createStatement();\n rst = selectstmt.executeQuery(select);\n\n\n }catch (Exception e){\n System.out.println(e);\n }\n return rst;\n }",
"public java.lang.String getTechnicalDetails () {\n\t\treturn technicalDetails;\n\t}",
"public IJustHaveALook giveConsult();",
"DataProviders retrieveProviders() throws RepoxException;",
"DataProviders retrieveProviders() throws RepoxException;",
"public List<EmployeeDetails> getEmployeeDetails();",
"@Override\r\n\tpublic TechnicalInformation getTechnicalInformation() {\n\t\treturn null;\r\n\t}",
"private void getPatientInfo(String patientId){\n mFirestore.collection(\"users\")\n .document(patientId)\n .addSnapshotListener(new EventListener<DocumentSnapshot>() {\n @Override\n public void onEvent(@Nullable DocumentSnapshot snapshot,\n @Nullable FirebaseFirestoreException e) {\n if (e != null) {\n Log.w(TAG, \"Listen failed.\", e);\n return;\n }\n\n String source = snapshot != null && snapshot.getMetadata().hasPendingWrites()\n ? \"Local\" : \"Server\";\n\n if (snapshot != null && snapshot.exists()) {\n Log.d(TAG, source + \" data: \" + snapshot.getData());\n\n User existingPatient = localUser.getPatientById(snapshot.getId());\n if(existingPatient!=null){\n localUser.changeExistingPatient(existingPatient, setPatientData(snapshot));\n } else {\n localUser.addPatient(setPatientData(snapshot));\n }\n\n // TODO add PatientChangeListener\n //localUser.getIUserDataChangeListener().onUserDataChanged(null);\n\n } else {\n Log.d(TAG, source + \" data: null\");\n }\n }\n });\n }",
"@Override\n\tpublic List<SupplierView> getAllSupplierInfo() {\n\t\tString sql=\"SELECT s.supplier_id, s.supplier_name, s.supplier_type, s.permanent_address, s.temporary_address,h.quantity,h.supplier_unique_id ,h.cost,h.buy_date,h.username,i.product_id, i.product_name FROM supplier s INNER JOIN supplier_product h on s.supplier_id=h.supplier_supplier_id INNER JOIN product i on h.product_product_id=i.product_id\";\n\t\tRowMapper<SupplierView> rowmapper=new BeanPropertyRowMapper<SupplierView> (SupplierView.class);\n\t\treturn this.getJdbcTemplate().query(sql,rowmapper);\n\t}",
"@RequestMapping (value=\"/offices/{id}\",\n\t\t\t\t\tmethod=RequestMethod.GET,\n\t\t\t\t\tproduces=MediaType.APPLICATION_JSON_VALUE)\n\tpublic Office getById (@PathVariable (\"id\") Long id) {\n\t\treturn officeServices.getById(id);\n\t\t\n\t}",
"public List getEpSupplier() {\n\t\treturn getHibernateTemplate().find(\" from JSupplierNh \");\n\t}",
"@Override\r\n\tpublic void adminSelectRead() {\n\t\t\r\n\t}",
"public List getAFDetails()\r\n\t{\n\t\treturn AffiliateDAOUtil.getAFDetails();\r\n\t}",
"@RequestMapping(value = \"/retrieveInfo\", method = RequestMethod.GET)\n\tpublic ModelAndView retrievePatientsInfo() {\n\t\t\n\t\t\n\t\n\t\t\n\t\tlogger.info(\"Retrieve 1 :\");\n\t\t\n\t\t patientDetailsProcessor.retrieveInfoByEmailId();\n\t\t\n\t\treturn new ModelAndView(\"success\");\n\t}",
"void getPersonQrData(String storeCode);",
"@Override\r\n\t\r\n\tpublic List<Employee> getAllDetails()\r\n\t{\r\n\t\t\r\n\t\tList<Employee> empList =hibernateTemplate.loadAll(Employee.class);\r\n\t\t\r\n\t\treturn empList;\r\n\t}",
"public ArrayList<HeadOffice> getHeadOffices(String sid) {\n\t \n\t\ttry {\n\t\t\tdao.getHeadOffices();\n\t\t\t\n\t\t\t/*store id is stored as a string in MongoDB but stored as an int in\n\t\t\t * MySQL Database need to compare correctly*/ \n\t\t\tint idExists = Integer.parseInt(sid);\n\t\t\t \n\t\t\t if(idExists == s.getStoreId())\n\t\t\t {\n\t\t\t } \n\t\t\t \n\t\t\t \n\t\t} catch (Exception e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\treturn headOffices;\n\t\t//more to go here\n\t\t\n\t}",
"@GET\n\t\t\t@Path(\"/{id}/record\")\n\t\t\t@Produces({\"application/xml\"})\n\t\t\tpublic Rows getEquipserviceRecord() {\n\t\t\t\tRows rows = null;\n\t\t\t\ttry {\n\t\t\t\t\trows=new EquipserviceDao(uriInfo,header).getEquipserviceRows();\n\t\t\t\t} catch (AuthenticationException e) {\n\t\t\t\t\t rows=new TemplateUtility().getFailedMessage(e.getMessage());\n\t\t\t\t\t e.printStackTrace();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t logger.info( \"Error calling getEquipserviceRecord()\"+ ex.getMessage());\n\t\t\t\t\t ex.printStackTrace();\n\t\t\t\t}\n\t\t\t\treturn rows;\n\t\t\t}",
"public interface EquipmentService {\r\n\r\n /**\r\n * 通过日期查询设备明细集合\r\n * @param documentNumber 单据号\r\n * @return 设备明细集合\r\n */\r\n List<EquipmentDate> getEquipment(String documentNumber);\r\n\r\n /**\r\n * 查询设备按日期生成的列表\r\n * @return 设备列表\r\n */\r\n List<EquipmentDate> listEquipment();\r\n\r\n /**\r\n * 新增设备\r\n */\r\n void addEquipment(EquipmentDate equipmentDate);\r\n\r\n /**\r\n * 查找最新单据号\r\n */\r\n List<String> getNewestId();\r\n\r\n /**\r\n * 插入设备明细\r\n */\r\n void addEquipmentItem(EquipmentItem equipmentItem);\r\n\r\n /**\r\n * 更新设备明细\r\n * @param equipmentItemList 设备明细条目\r\n */\r\n void updateEquipmentItem(List<EquipmentItem> equipmentItemList);\r\n\r\n /**\r\n * 设置下拉框数据\r\n */\r\n List<Equipment> getEquipmentNameList(Equipment equipment);\r\n\r\n /**\r\n * 查询设备\r\n */\r\n List<EquipmentDate> search(EquipmentDate equipmentDate);\r\n\r\n /**\r\n * 根据日期查询设备\r\n */\r\n List<EquipmentItem> getEquipmentDataByDate(Date dayTime,Date editTime);\r\n\r\n /**\r\n * 分页\r\n * @param page\r\n * @return Equipment列表\r\n */\r\n List<EquipmentDate> equipmentListPage(Page page);\r\n\r\n /**\r\n * 获取设备数量\r\n * @return 设备数量\r\n */\r\n int count();\r\n\r\n /**\r\n * 查询数量\r\n * @return 查询数量\r\n */\r\n int searchCount(Equipment equipment);\r\n\r\n /**\r\n * 删除设备\r\n */\r\n void deleteEquipment(String documentNumber);\r\n\r\n /**\r\n * 获取编号\r\n * @return 编号\r\n */\r\n String getDocumentNumber();\r\n\r\n Equipment getEquipmentByDocumentNumber(String documentNumber);\r\n\r\n EquipmentDate getEquipmentDateByDocumentNumber(String documentNumber);\r\n}",
"@Override\r\n\tpublic Object getQuestionear() throws DataAccessException,SQLException {\n\t\tlogger.info(\"start : getQuestionear UsersMngDaoImpl \");\r\n\t\tObject obj = questionRepository.findAll();\r\n\t\tlogger.info(\"End : getQuestionear UsersMngDaoImpl \");\r\n\t\treturn obj;\r\n\t}",
"public List<ProductDetails> retrieveOffersWithOfferType()\n\t\t\tthrows MISPException {\n\n\t\tlogger.entering(\"retrieveOffersWithOfferType\");\n\n\t\tList<ProductDetails> productsList = null;\n\n\t\ttry {\n\n\t\t\tproductsList = this.offerDetailsMgr.retrieveOffersWithOfferType();\n\n\t\t} catch (DBException exception) {\n\n\t\t\tlogger.error(\n\t\t\t\t\t\"An exception occured while retrieving offer Details.\",\n\t\t\t\t\texception);\n\t\t\tthrow new MISPException(exception);\n\t\t}\n\n\t\tlogger.exiting(\"retrieveOffersWithOfferType\", productsList);\n\n\t\treturn productsList;\n\n\t}",
"@Override\n\tpublic TechnicalInformation getTechnicalInformation() {\n\t\treturn null;\n\t}",
"protected ResultSet selectStaff() {\r\n\t\tResultSet rs = sqlSelect( \"*\", \"Staff\", \"\");\r\n\t\treturn rs;\r\n\t}",
"@Override\r\n\tpublic List<Object[]> searchPlantDetails() {\n\t\tList<Object[]> list = null;\r\n\t\ttry {\r\n\t\t\tsql = \"select p.plantId ,p.plantName,p.add1,p.add2,p.add3,p.city,p.state,p.phone,p.fax,p.mobile,p.organization,p.countrysList from Plant p\";\r\n\t\t\tlist = getHibernateTemplate().find(sql);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn list;\r\n\t}",
"@Override\r\n\tpublic List<Industry1> listAllIndustry() {\n\t\treturn dao.listAllIndustry();\r\n\t}",
"public void showHealthCarePersonaledata(){\n }",
"@Test\n public void getSecurityPriceTechnicalsFiTest() throws ApiException, NoSuchMethodException {\n String identifier = null;\n String startDate = null;\n String endDate = null;\n Integer pageSize = null;\n String nextPage = null;\n ApiResponseSecurityForceIndex response = api.getSecurityPriceTechnicalsFi(identifier, startDate, endDate, pageSize, nextPage);\n\n // TODO: test validations\n }",
"private void getScholsFromDatabase() {\n schols = new Select().all().from(Scholarship.class).execute();\n }",
"BaseResponse getDetail(long holidayID, int companyID);",
"public static void main_getApplicant(){\n System.out.println(\"Enter Applicant Name: \");\n String name = input.nextLine();\n try {\n Applicant temp = table.getApplicant(name);\n System.out.println(temp.toString());\n System.out.println();\n } catch (ApplicantNotFoundException ex){\n System.out.println(\"Applicant not found.\");\n main_menu();\n }\n }",
"@Override\r\n\tpublic List<Admin> getAdminDetails() {\n\t\tList<Admin> admin =dao.getAdminDetails();\r\n return admin;\r\n\t}",
"public List<ErpBookInfo> selData();",
"public interface IEmployerService {\n\n List<Employer> selectByRealName(String username);\n\n List<Employer> selectByMobile(String username);\n\n EmployerVO selectEmployerAndPermissions(String mobile);\n}",
"@Test\n public void getSecurityPriceTechnicalsAoTest() throws ApiException, NoSuchMethodException {\n String identifier = null;\n Integer shortPeriod = null;\n Integer longPeriod = null;\n String startDate = null;\n String endDate = null;\n Integer pageSize = null;\n String nextPage = null;\n ApiResponseSecurityAwesomeOscillator response = api.getSecurityPriceTechnicalsAo(identifier, shortPeriod, longPeriod, startDate, endDate, pageSize, nextPage);\n\n // TODO: test validations\n }",
"public void show() {\r\n List<Benefit> listBeneficio = service.findAll();\r\n if(listBeneficio!=null && !listBeneficio.isEmpty()){\r\n for(Benefit c: listBeneficio){\r\n LOGGER.info(c.toString());\r\n }\r\n }\r\n }",
"public find() {\n initComponents();\n loadTBL(\"select * from before_production order by date\");\n loadSupp();\n }",
"List<EquipmentCategory> getAllEquipment() throws PersistenceException;",
"protected abstract void retrievedata();",
"@SuppressWarnings(\"finally\")\n\t@Override\n\tpublic Response showSystem() {\n\t\tBaseResponse<NotifyTemplate> br = new BaseResponse<NotifyTemplate>();\n\t\ttry\n\t\t{\n\t\tList<NotifyTemplate> systemList;\n\t\tjdbcTemplate.setDataSource(dataSourceProvider.getDataSource(FiinfraConstants.BU_DEFAULT));\n\t\tsystemList=jdbcTemplate.query(FiinfraConstants.SP_GET_SYSTEM_RECEPIENT_CHANNEL,new Object[]{FiinfraConstants.NOTIFYTYPE_ID} ,new BeanPropertyRowMapper<NotifyTemplate>(NotifyTemplate.class));\n\t\tbr.setResponseListObject(systemList); \n\t\tresponse=FiinfraResponseBuilder.getSuccessResponse(br, null);\n\t\t}\n\t\tcatch (DataAccessException e) {\n\t\t\tresponse = FiinfraResponseBuilder.getErrorResponse(e.getMessage().toString());\n\t\t}\n\t\tfinally\n\t\t{ \n\t\t\treturn response;\n\t\t\t\t} \n\t}",
"Collection<User> getStaffs() throws DataAccessException;",
"public interface CountyServices {\n List<County> queryCountyByFK(County county);\n}",
"public interface IndustryViewService {\n\n /**\n * 获取一个行业的基本数据统计信息\n *\n * @param industryName 行业名称\n * @param period 时间间隔\n * @return 行业基本数据VO包\n */\n IndustryVO getBasicIndustryInfo(String industryName, IndustryPeriodEnum period) throws NotFoundException;\n\n /**\n * 获取一个行业一段时间内的价格统计信息(折线图)\n *\n * @param industryName 行业名称\n * @param period 时间间隔\n * @return 行业基本数据VO包\n */\n LinearChartVO getIndustryPrice(String industryName, IndustryPeriodEnum period) throws NotFoundException;\n\n /**\n * 获取一个行业一段时间内的涨跌幅与大盘涨跌幅对比(折线图)\n *\n * @param industryName 行业名称\n * @param period 时间\n * @return\n * @throws BadInputException\n * @throws NotFoundException\n */\n LinearChartVO getCompareLinearChartVO(String industryName, IndustryPeriodEnum period) throws BadInputException, NotFoundException;\n\n /**\n * 获取一个行业一段时间内的资金流向统计信息(柱状图)\n *\n * @param industryName 行业名称\n * @param period 时间间隔\n * @return 行业基本数据VO包\n */\n VolumeVO getIndustryVolume(String industryName, IndustryPeriodEnum period) throws NotFoundException;\n\n /**\n * 获取所有行业涨跌幅排行榜\n *\n * @return 按照涨到跌排序的行业\n */\n List<RiseAndFallVO> getRiseAndFallList();\n}",
"@Test\n public void getSecurityPriceTechnicalsAdiTest() throws ApiException, NoSuchMethodException {\n String identifier = null;\n String startDate = null;\n String endDate = null;\n Integer pageSize = null;\n String nextPage = null;\n ApiResponseSecurityAccumulationDistributionIndex response = api.getSecurityPriceTechnicalsAdi(identifier, startDate, endDate, pageSize, nextPage);\n\n // TODO: test validations\n }",
"List<BasicEquipment> selectAll();",
"@Override\r\n\tpublic List<Food> queryFoods() {\n\t\tString sql=\"select * from food\";\r\n\t\tList<Food> list=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn list;\r\n\t}",
"@Override\r\n\tpublic List<Warehouse_itemInformation> selectWarehouseOrder_itemInformation() {\n\t\treturn who_iif.selectWarehouse_itemInformation();\r\n\t}",
"private void getDataFromApi() throws IOException {\n DateTime now = new DateTime(System.currentTimeMillis());\n Events events = mService.events().list(\"primary\")\n .setTimeMin(now)\n .setOrderBy(\"startTime\")\n .setSingleEvents(true)\n .execute();\n List<Event> items = events.getItems();\n ScheduledEvents scheduledEvents;\n EventsList.clear();\n for (Event event : items) {\n DateTime start = event.getStart().getDateTime();\n if (start == null) {\n start = event.getStart().getDate();\n }\n DateTime end = event.getEnd().getDateTime();\n if (end == null) {\n end = event.getStart().getDate();\n }\n scheduledEvents = new ScheduledEvents();\n scheduledEvents.setEventId(event.getId());\n scheduledEvents.setDescription(event.getDescription());\n scheduledEvents.setEventSummery(event.getSummary());\n scheduledEvents.setLocation(event.getLocation());\n scheduledEvents.setStartDate(dateTimeToString(start));\n scheduledEvents.setEndDate(dateTimeToString(end));\n StringBuffer stringBuffer = new StringBuffer();\n if(event.getAttendees()!=null) {\n for (EventAttendee eventAttendee : event.getAttendees()) {\n if(eventAttendee.getEmail()!=null)\n stringBuffer.append(eventAttendee.getEmail() + \" \");\n }\n scheduledEvents.setAttendees(stringBuffer.toString());\n }\n else{\n scheduledEvents.setAttendees(\"\");\n }\n EventsList.add(scheduledEvents);\n }\n }",
"public static List<SqlRow> findAll() {\n\n try{\n List<SqlRow> queryFindAll = Ebean.createSqlQuery(\"SELECT * FROM pub_infoapi;\")\n .findList();\n return queryFindAll;\n }catch(Exception e){\n e.printStackTrace();\n return null;\n }\n }",
"@Override\n public void showDiaryFromDB() {\n diaryPresenter.showDiaryFromDB();\n }",
"void getEmergencyContact();",
"public abstract StoreInfo getInfo();",
"@SystemAPI\n\tPatient getPatient();",
"@Override\n\t\tpublic oep_ResponseInfo getfacultylistforreport() {\n\t\t\tString facultyquery=\"SELECT a.faculty_id, CONCAT(a.`username`,' - ',a.`email`) faculty_firstname FROM `faculty_master` a \"\n\t\t\t\t\t+ \" JOIN `course_master` c ON a.`main_subject`=c.`course_id` JOIN `course_scheduling` d ON d.`program_name`=c.`course_id` \"\n\t\t\t\t\t+ \" JOIN `test_schedule` e ON e.`batch`=d.`cs_id` GROUP BY a.`faculty_id`\";\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tList<Object> facultyList = jdbcTemplate.query(facultyquery, new RowMapper() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic Object mapRow(ResultSet rs, int arg1) throws SQLException {\n\t\t\t\t\n\t\t\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\t\tmap.put(\"facultyid\", rs.getString(\"faculty_id\"));\n\t\t\t\t\tmap.put(\"facultyname\", rs.getString(\"faculty_firstname\"));\n\t\t\t\t \n\t\t\t\t\treturn map;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tresponse.setResponseType(\"S\");\n\t\t\tresponse.setResponseObj(facultyList);\n\t\t\tresponseInfo.setInventoryResponse(response);\n\t\t\treturn responseInfo;\n\t\t}",
"@GetMapping\n public ResponseEntity<List<TechnicianDTO>> findAll () {\n List<TechnicianDTO> listDTO = technicianService.findAll().stream()\n .map(obj -> new TechnicianDTO(obj)).collect(Collectors.toList());\n\n return ResponseEntity.ok().body(listDTO);\n }",
"private ApiInfo metadata() {\n\t\treturn new ApiInfoBuilder().title(\"# Online Home Decor Store #\")\n\t\t\t\t.description(\"Suppliers and Categories operations are present\").build();\t\n\t}",
"@Test\r\n\tpublic void getAllIncidents() {\n\t\tRestAssured.baseURI = \"https://dev49243.service-now.com/api/now/table/incident\";\r\n\t\t\r\n\t\t// Step 2: Authentication (basic)\r\n\t\tRestAssured.authentication = RestAssured.basic(\"admin\", \"Tuna@123\");\r\n\t\t\r\n\t\t// Step 3: Request type - Get -> Response\r\n\t\tResponse response = RestAssured.get();\r\n\t\t\r\n\t\t// Step 4: Validate (Response -> Status Code : 200)\r\n\t\tSystem.out.println(response.getStatusCode());\r\n\t\t\r\n\t\t// Print the response time as well \r\n\t\t\r\n\t\t// Check what is the response format\r\n\t\tSystem.out.println(response.getContentType());\r\n\t\t\r\n\t\t// print the response\r\n\t\tresponse.prettyPrint();\r\n\t\t\r\n\t}",
"@Override\n\tpublic DataTablesResponseInfo getSupplier() {\n\t\tDataTablesResponseInfo info = new DataTablesResponseInfo();\n\t\tinfo.setData(purchaseDao.getSupplier());\n\t\treturn info;\n\t}",
"@GetMapping(value=\"/employes\")\n\tpublic List<Employee> getEmployeeDetails(){\n\t\t\n\t\tList<Employee> employeeList = employeeService.fetchEmployeeDetails();\n\t\treturn employeeList;\t\t\t\t\t\t\n\t}",
"private void getTradeDetail() {\n\t\t\tsendData(\"<get></get>\");\n\t}",
"@Override\n\tpublic ArrayList<Teacher> fetchDetails() throws myException {\n\t\tConnection con = GetConnection.getConnection();\n\t\tResultSet rs = null;\n\t\tString query = \"select * from teacher\";\n\t\tStatement st = null;\n\t\ttry {\n\t\t\tst = con.createStatement();\n\t\t\trs = st.executeQuery(query);\n\t\t} catch (Exception e) {\n\t\t\tthrow new myException(e.getMessage());\n\t\t}\n\t\tArrayList<Teacher> ls3 = new ArrayList<Teacher>();\n\t\ttry {\n\t\t\twhile (rs.next()) {\n\t\t\t\t// Teacher teacher = new Teacher();\n\t\t\t\tString name = rs.getString(\"teacherName\");\n\t\t\t\tShort id = rs.getShort(\"teacherId\");\n\t\t\t\tShort yoe = rs.getShort(\"yOE\");\n\t\t\t\tSubject[] subject = null;// getSubjects(name);\n\t\t\t\tTeacher teacher = new Teacher(name, id, yoe, subject);\n\t\t\t\tls3.add(teacher);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tthrow new myException(e.getMessage());\n\t\t}\n\t\treturn ls3;\n\t}",
"Information getInfo();",
"@RequestMapping(value=\"/Infrastrecture\",method=RequestMethod.GET)\n\tpublic List<Infrastrecture> getInfrastrecture(){\n\t\treturn infrastrectureRepository.findAll();\n\t}",
"@Test\n\tvoid findAllForMyCompany() {\n\t\tinitSpringSecurityContext(\"assist\");\n\t\tfinal TableItem<UserOrgVo> tableItem = resource.findAll(null, null, null, newUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(9, tableItem.getRecordsTotal());\n\t\tAssertions.assertEquals(9, tableItem.getRecordsFiltered());\n\t\tAssertions.assertEquals(9, tableItem.getData().size());\n\n\t\t// Check the users\n\t\tAssertions.assertEquals(\"fdoe2\", tableItem.getData().get(0).getId());\n\t\tAssertions.assertTrue(tableItem.getData().get(0).isCanWrite());\n\n\t\t// Check the groups\n\t\tAssertions.assertEquals(0, tableItem.getData().get(0).getGroups().size());\n\t}",
"@GET\n @Path(\"listvenues/{ipp}\")\n @Produces(\"application/json\")\n public List<Venue> findVenuePatient(@PathParam(\"ipp\") int IPP){\n Patient pat= serv.getPatientByIPP(IPP);\n return serv.getVenuePatient(pat);\n }",
"private List<AdhocCustomer> getSearchUniverseSearchAdhocCustomerDataSet() {\n // The initialization of the result list must be done here\n //\n //\n return AdhocCustomer.findAll().collect(Collectors.toList());\n }",
"public List<Hotel> getAvailableHotels(){\n return databaseManager.findAvailableHotels();\n }",
"@Override\n\tpublic Document queryPartnerDetails(\n\t\t\tPartnerConfiguration partnerConfiguration,\n\t\t\tDocumentBadge document, PartnerdataLogger logger)\n\t\t\tthrows IOException {\n\t\treturn null;\n\t}",
"public String getDatabaseProduct();",
"public ResultSet selectInfoAuto() {\n\t\tPreparedStatement prst;\n\t\ttry {\n\t\t\tprst = connection.prepareStatement(DbManagerUtils.SELECT_INFO_AUTO);\n\n\t\t\treturn prst.executeQuery();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n public List<ReporteAccidente> getAll() {\n return (List<ReporteAccidente>) repr.findAll();\n }",
"@Override\n\tpublic List<Solicitud> obtenerSolicitudes() throws DAOException {\n\t\tSession session = null;\n\t\tList<Solicitud> solicitudes= null;\n\t\ttry{\n\t\t\tsession = getSession();\t\n\t\t\tCriteria criteria = session.createCriteria(Solicitud.class);\n\t\t\tsolicitudes = criteria.list();\n\t\t}catch(HibernateException e){\n\t\t\tthrow new DAOException(e);\n\t\t}\n\t\treturn solicitudes;\n\t}",
"public List<ServiceAffinities> selectServiceAffinities() {\n\n\t\tList<ServiceAffinities> customers = new ArrayList<ServiceAffinities>();\n\t\tConnection connection = null;\n\t\tPreparedStatement preparedStatement = null;\n\t\tResultSet resultSet = null;\n\n\t\ttry {\n\n\t\t\tconnection = (Connection) DBConnection.getConnection();\n\t\t\tString sql = \"select * from service_affinities\";\n\t\t\tpreparedStatement = (PreparedStatement) connection.prepareStatement(sql);\n\t\t\tresultSet = preparedStatement.executeQuery();\n\n\t\t\tServiceAffinities customer = null;\n\t\t\twhile (resultSet.next()) {\n\n\t\t\t\tcustomer = new ServiceAffinities();\n\t\t\t\tcustomer.setApplication(resultSet.getString(1));\n\t\t\t\tcustomer.setServices(resultSet.getString(2));\n\t\t\t\tcustomer.setEnvironment_types(resultSet.getString(3));\n\t\t\t\tcustomer.setAffinity(resultSet.getString(4));\n\n\t\t\t\tcustomers.add(customer);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.error(e.getMessage());\n\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tresultSet.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\tLOGGER.error(e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\treturn customers;\n\t}"
] | [
"0.5689077",
"0.5666572",
"0.54943705",
"0.5467836",
"0.5447199",
"0.54344136",
"0.5387761",
"0.5369641",
"0.5335903",
"0.53311527",
"0.5308171",
"0.5287695",
"0.52717173",
"0.52623135",
"0.5259285",
"0.5248221",
"0.5243422",
"0.5231266",
"0.52115256",
"0.52041626",
"0.5203321",
"0.5196015",
"0.5191428",
"0.5161475",
"0.51613927",
"0.5149021",
"0.50991416",
"0.507864",
"0.507128",
"0.50696003",
"0.50647247",
"0.5059858",
"0.50587255",
"0.50587255",
"0.50548255",
"0.504513",
"0.5043129",
"0.5042422",
"0.50410897",
"0.5040407",
"0.50382715",
"0.5031121",
"0.50242597",
"0.5011285",
"0.5010746",
"0.49982345",
"0.4998196",
"0.4994985",
"0.49916792",
"0.4986659",
"0.49862283",
"0.49831888",
"0.49751863",
"0.4970325",
"0.4969872",
"0.4968672",
"0.4960202",
"0.49601978",
"0.49590158",
"0.49511316",
"0.49467853",
"0.49459785",
"0.49432683",
"0.49357575",
"0.49308768",
"0.49273893",
"0.49270973",
"0.49263552",
"0.4919577",
"0.49193528",
"0.49165946",
"0.49141884",
"0.49124232",
"0.4908245",
"0.49024945",
"0.4898736",
"0.48966888",
"0.48958513",
"0.48935324",
"0.4892119",
"0.48920614",
"0.48915553",
"0.48914948",
"0.48904985",
"0.48859504",
"0.48854294",
"0.48808298",
"0.48752266",
"0.48730657",
"0.4870247",
"0.48694208",
"0.4869408",
"0.48679787",
"0.48576155",
"0.48571002",
"0.48508695",
"0.48468328",
"0.4845724",
"0.48413482",
"0.48406655",
"0.4838285"
] | 0.0 | -1 |
This method select the UfficioTecnico by a id from the database given all dates of UfficioTecnico. | @Override
public UfficioTecnico getById(final int aId) throws SQLException {
final Connection connection = connectionManager.getConnection();
UfficioTecnico uff = null;
try {
final PreparedStatement preparedStatement = connection
.prepareStatement(GET_BY_ID);
preparedStatement.setInt(1, aId);
final ResultSet rs = preparedStatement.executeQuery();
if (rs.next()) {
uff = new UfficioTecnico();
uff.setId(rs.getInt("Id"));
uff.setNome(rs.getString("nome"));
uff.setTel(rs.getString("tel"));
uff.setEmail(rs.getString("email"));
uff.setUbicazione(rs.getString("ubicazione"));
}
return uff;
} finally {
connectionManager.freeConnection(connection);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public List<UfficioTecnico> getAll() throws SQLException {\n final Connection connection = connectionManager.getConnection();\n try {\n final PreparedStatement preparedStatement = connection\n .prepareStatement(SELECT_ALL);\n final ResultSet rs = preparedStatement.executeQuery();\n final List<UfficioTecnico> uffici = new ArrayList<UfficioTecnico>();\n while (rs.next()) {\n final UfficioTecnico uff = new UfficioTecnico();\n uff.setId(rs.getInt(\"Id\"));\n uff.setNome(rs.getString(\"nome\"));\n uff.setTel(rs.getString(\"tel\"));\n uff.setEmail(rs.getString(\"email\"));\n uff.setUbicazione(rs.getString(\"ubicazione\"));\n uffici.add(uff);\n }\n return uffici;\n } finally {\n connectionManager.freeConnection(connection);\n }\n }",
"public Treatment consultarTratamiento(int id){\n Treatment tratamiento = null;\n String[] campos = {\"_id\",\"fecha\",\"tipoTratamiento\",\"hora\"};\n String[] args = {Integer.toString(id)};\n Cursor c = db.query(\"tratamiento\",campos,\"_id=?\",args,null,null,null);\n if(c.moveToFirst()){\n\n do{\n tratamiento = new Treatment(c.getInt(0),c.getString(1),c.getString(2));\n tratamiento.setHora(c.getString(3));\n }while(c.moveToNext());\n\n }\n return tratamiento;\n }",
"public ArrayList<oferta> listadoOfertaxComercio(int idComercio) {\n ArrayList<oferta> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n PreparedStatement st = conn.prepareStatement(\"select o.nombre, o.cantidad, o.precio , c.id_comercio, id_oferta, descripcion, fecha, o.ruta, o.estado\\n\"\n + \"from Comercios c \\n\"\n + \"join Ofertas o on c.id_comercio = o.id_comercio \\n\"\n + \"where c.id_comercio = ?\");\n st.setInt(1, idComercio);\n ResultSet rs = st.executeQuery();\n\n while (rs.next()) {\n String nombreO = rs.getString(1);\n int cantidad = rs.getInt(2);\n Float precio = rs.getFloat(3);\n int id = rs.getInt(4);\n int ido = rs.getInt(5);\n String descripcion = rs.getString(6);\n String fecha = rs.getString(7);\n String ruta = rs.getString(8);\n boolean estado = rs.getBoolean(9);\n\n rubro rf = new rubro(0, \"\", true, \"\", \"\");\n comercio c = new comercio(\"\", \"\", \"\", id, true, \"\", \"\", rf, \"\");\n oferta o = new oferta(ido, nombreO, cantidad, precio, c, estado, descripcion, fecha,ruta );\n\n lista.add(o);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }",
"public EstacionServicio getListadoPorId(int id) throws Exception {\n\t\t\t\t\n\t\t\t\tConnection conn = ds.getConnection();\n\t\t\t\tEstacionServicio idLista = null;\n\t\t\t\tPreparedStatement stmt = conn.prepareStatement(\"SELECT * FROM ESTACION_SERVICIO WHERE id = ?\");\n\t\t\t\tstmt.setInt(1, id);\n\t\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\t\tif (rs.next()){\n\t\t\t\t\tidLista = new EstacionServicio(rs.getInt(1),rs.getString(2),rs.getDate(3),rs.getFloat(4),rs.getFloat(5),rs.getString(6));\n\t\t\t\t}\n\t\t\t\tif (rs != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\trs.close();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (stmt != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tstmt.close();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\treturn idLista;\n\t\t\t\n\t\t\t}",
"public Collection findTrasllatsByEstablimentOrigenEntreDates(Date dataInici, Date dataFi, Long estId) throws InfrastructureException {\r\n\t\tCollection col;\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\t\tString di = sdf.format(dataInici);\r\n\t\tString df = sdf.format(dataFi);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tlogger.debug(\"findTrasllatsByEstablimentEntreDates ini\");\r\n\t\t\tcol = getHibernateTemplate().find(\" from Trasllat tdi where \" +\r\n\t\t\t\t\t\"tdi.dataAlta >= '\" + di + \"' and tdi.dataAlta <= '\" + df + \"' \" +\r\n\t\t\t\t\t\"and tdi.establimentByTdiCodeor = \"+ estId + \" \" +\r\n\t\t\t\t\t\"and tdi.valid = true\");\r\n\t\t\t\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tlogger.error(\"findTrasllatsByEstablimentEntreDates failed\", ex);\r\n\t\t\tthrow new InfrastructureException(ex);\r\n\t\t}\r\n\t\tlogger.debug(\"findTrasllatsByEstablimentEntreDates fin\");\r\n\t\treturn col;\r\n\t}",
"public void findbyid() throws Exception {\n try {\n Ume_unidade_medidaDAO ume_unidade_medidaDAO = getUme_unidade_medidaDAO();\n List<Ume_unidade_medidaT> listTemp = ume_unidade_medidaDAO.getByPK( ume_unidade_medidaT);\t \n\n ume_unidade_medidaT= listTemp.size()>0?listTemp.get(0):new Ume_unidade_medidaT();\n \n } catch (Exception e) {\n e.printStackTrace();\n setMsg(\"Falha ao realizar consulta!\");\t\n } finally {\n\tclose();\n }\n }",
"public void findbyid() throws Exception {\n try {\n Con_contadorDAO con_contadorDAO = getCon_contadorDAO();\n List<Con_contadorT> listTemp = con_contadorDAO.getByPK( con_contadorT);\n\n con_contadorT= listTemp.size()>0?listTemp.get(0):new Con_contadorT();\n \n } catch (Exception e) {\n e.printStackTrace();\n setMsg(\"Falha ao realizar consulta!\");\t\n } finally {\n\tclose();\n }\n }",
"public AnuncioDTO ObtenerAnuncioID(int id){\n AnuncioDTO anuncioDTO=null;\n try{\n Connection conect = getConection();\n Properties sqlProp = new Properties();\n InputStream is = new FileInputStream(sqlPropertiesPath);\n sqlProp.load(is);\n PreparedStatement ps = conect.prepareStatement(sqlProp.getProperty(\"getById.Anuncio\"));\n ps.setInt(1, id);\n ResultSet rs = ps.executeQuery();\n while(rs.next()){\n \n TipoAnuncio tipoAnuncio = TipoAnuncio.valueOf(rs.getString(2));\n String titulo = rs.getString(3);\n String cuerpo = rs.getString(4);\n Date fechaPublicacion = new Date(rs.getDate(5).getTime());\n Date fechaFin=null;\n if(tipoAnuncio.equals(TipoAnuncio.Flash)){\n fechaFin = new Date(rs.getDate(6).getTime());\n }\n String emailPropietario = rs.getString(7);\n EstadoAnuncio estadoAnuncio = EstadoAnuncio.valueOf(rs.getString(8));\n \n ArrayList<String>temas = null;\n if(tipoAnuncio.equals(TipoAnuncio.Tematico))\n temas=new ArrayList<String>(Arrays.asList(rs.getString(9).split(\",\")));\n\n ArrayList<String>destinatarios = ObtenerDestinatariosAnuncio(id);\n anuncioDTO= new AnuncioDTO(id, tipoAnuncio, titulo, cuerpo, fechaPublicacion, fechaFin, emailPropietario, estadoAnuncio, temas, destinatarios);\n }\n }catch(Exception e){\n e.printStackTrace();\n }\n return anuncioDTO;\n }",
"public static ArrayList<TechnicianBean> getTechnician(int id) {\r\n\r\n\t\tResultSet rs = null;\r\n\r\n\t\tTechnicianBean bean = null;\r\n\t\tArrayList<TechnicianBean> list = new ArrayList<>();\r\n\t\tint techId, doId;\r\n\t\tdouble salary;\r\n\t\tString name, address, phoneNo, cnic;\r\n\t\tDate joiningDate = null;\r\n\t\ttry (Connection con = Connect.getConnection()) {\r\n\r\n\t\t\tString query = \"SELECT technician_id, do_id, technican_name, technican_phone, technican_cnic, technican_address, technican_salary, created FROM technician where do_id=\"\r\n\t\t\t\t\t+ id + \";\";\r\n\t\t\tPreparedStatement stmt = (PreparedStatement) con\r\n\t\t\t\t\t.prepareStatement(query);\r\n\t\t\trs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\ttechId = rs.getInt(1);\r\n\t\t\t\tdoId = rs.getInt(2);\r\n\t\t\t\tname = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tcnic = rs.getString(5);\r\n\t\t\t\taddress = rs.getString(6);\r\n\t\t\t\tsalary = rs.getDouble(7);\r\n\t\t\t\tjoiningDate = rs.getDate(8);\r\n\t\t\t\tbean = new TechnicianBean();\r\n\t\t\t\tbean.setId(techId);\r\n\t\t\t\tbean.setName(name);\r\n\t\t\t\tbean.setCnic(cnic);\r\n\t\t\t\tbean.setAddress(address);\r\n\t\t\t\tbean.setSalary(salary);\r\n\t\t\t\tbean.setJoiningDate(joiningDate);\r\n\t\t\t\tbean.setPhone(phoneNo);\r\n\t\t\t\tbean.setDoId(doId);\r\n\t\t\t\tlist.add(bean);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn list;\r\n\t}",
"public CalendarioFecha obtenerPorEvento(int id) throws Exception { \n\t \n\t\t CalendarioFecha datos = new CalendarioFecha(); \n\t\t Session em = sesionPostgres.getSessionFactory().openSession(); \t\n\t try { \t\n\t\t datos = (CalendarioFecha) em.get(CalendarioFecha.class, id); \n\t } catch (Exception e) { \n\t \n\t throw new Exception(e.getMessage(),e.getCause());\n\t } finally { \n\t em.close(); \n\t } \n\t \n\t return datos; \n\t}",
"@Override\n public Curso findByIdCurso(int id) throws Exception {\n Curso retValue = null;\n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"SELECT c.idcurso, c.idprofesor, p.nombre as nombreprofesor, c.nombrecurso, c.claveprofesor,\"\n + \" c.clavealumno from curso c, persona p\\n\" +\n \"where c.idprofesor = p.id and idcurso = ?\");\n pstmt.setInt(1, id);\n rs = pstmt.executeQuery();\n if (rs.next()) {\n retValue = new Curso(rs.getInt(\"idcurso\"), rs.getString(\"nombrecurso\"), rs.getInt(\"idprofesor\"), rs.getString(\"nombreprofesor\"),rs.getString(\"claveprofesor\"), rs.getString(\"clavealumno\"));\n } else {\n retValue = new Curso(0,\" \",0,\"\",\" \",\" \");\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (rs != null) {\n rs.close();\n }\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return retValue;\n }",
"public RecursosVO getDatosRecurso(int idEquipo) {\n\n\t\tRecursosVO recurso = null;\n\n\t\tString query = \"SELECT ID, TITULO, LATITUD, LONGITUD FROM RECURSO WHERE ID = \"\n\t\t\t\t+ idEquipo;\n\n\t\tStatement st = null;\n\t\tResultSet rs = null;\n\n\t\ttry {\n\n\t\t\tthis.abrirConexion();\n\n\t\t\tst = connection.createStatement();\n\t\t\trs = st.executeQuery(query);\n\t\t\t// rs = connection.createStatement().executeQuery(query);\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tint id = rs.getInt(1);\n\t\t\t\tString titulo = rs.getString(2);\n\t\t\t\tfloat latitud = rs.getFloat(3);\n\t\t\t\tfloat longitud = rs.getFloat(4);\n\n\t\t\t\t// RecursosVO recurso = new RecursosVO(id, titulo, latitud,\n\t\t\t\t// longitud);\n\t\t\t\t// recursos.add(recurso);\n\t\t\t\trecurso = new RecursosVO(id, latitud, longitud, null, null,\n\t\t\t\t\t\tnull, null, null, null, null, null, null, null, null,\n\t\t\t\t\t\tnull, null, null);\n\t\t\t}\n\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tlogger.log(Level.SEVERE,\n\t\t\t\t\t\"ClassNotFoundException : \" + e.getMessage());\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tlogger.log(Level.SEVERE, \"SQLException : \" + e.getMessage());\n\t\t} finally {\n\t\t\tif (rs != null) {\n\t\t\t\ttry {\n\t\t\t\t\trs.close();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (st != null) {\n\t\t\t\ttry {\n\t\t\t\t\tst.close();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.cerrarConexion();\n\n\t\treturn recurso;\n\n\t}",
"public Collection getSalidaTrasladosEntreDiasoTemporadas(Long temporadaId, Date dataInici, Date dataFin) throws InfrastructureException {\r\n\t\tCollection col;\r\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\t\ttry {\r\n\t\t\tlogger.debug(\"getSalidaTrasladosEntreDiasoTemporadas ini\");\r\n\t\t\tString q = \"from Trasllat tdi where tdi.acceptatTrasllat = true \"; \r\n\t\t\tq += \" and tdi.traslladant = true and tdi.valid = true \";\r\n\r\n\t\t\tif(dataInici!= null || dataFin != null){\r\n\t\t\t\tif(dataInici != null){\r\n\t\t\t\t\tString fi = df.format(dataInici);\r\n\t\t\t\t\tq = q+ \" and tdi.data >= '\"+fi+\"' \";\r\n\t\t\t\t}\r\n\t\t\t\tif(dataFin != null){\r\n\t\t\t\t\tString ff = df.format(dataFin);\r\n\t\t\t\t\tq = q+ \" and tdi.data <= '\"+ff+\"' \";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tq = q+\" and tdi.establimentByTdiCodeor.campanya.id= (select max(cam.id) from Campanya cam)\";\r\n\r\n\t\t\t}else{\r\n\t\t\t\tq = q+ \" and tdi.establimentByTdiCodeor.campanya.id=\"+temporadaId;\r\n\t\t\t}\r\n\r\n\t\t\tcol = getHibernateTemplate().find(q);\t\t\t\r\n\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tlogger.error(\"getSalidaTrasladosEntreDiasoTemporadas failed\", ex);\r\n\t\t\tthrow new InfrastructureException(ex);\r\n\t\t}\r\n\t\tlogger.debug(\"getSalidaTrasladosEntreDiasoTemporadas fin\");\r\n\t\treturn col;\r\n\t}",
"public static String obtenerFechaInicio(int id){\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n String query = \"SELECT * FROM Actividades WHERE id=?\";\n String fechaInicio = null;\n try {\n ps = connection.prepareStatement(query);\n ps.setInt(1, id);\n rs = ps.executeQuery();\n while (rs.next()) {\n fechaInicio = String.format(\"%02d/%02d/%04d\", rs.getInt(6), rs.getInt(7), rs.getInt(8));\n }\n rs.close();\n ps.close();\n pool.freeConnection(connection);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return fechaInicio;\n }",
"public void selecteazaComanda()\n {\n for(String[] comanda : date) {\n if (comanda[0].compareTo(\"insert client\") == 0)\n clientBll.insert(idClient++, comanda[1], comanda[2]);\n else if (comanda[0].compareTo(\"insert product\") == 0)\n {\n Product p = productBll.findProductByName(comanda[1]);\n if(p!=null)//daca produsul exista deja\n productBll.prelucreaza(p.getId(), comanda[1], Float.parseFloat(comanda[2]), Float.parseFloat(comanda[3]));\n else\n productBll.prelucreaza(idProduct++, comanda[1], Float.parseFloat(comanda[2]), Float.parseFloat(comanda[3]));\n\n }\n else if (comanda[0].contains(\"delete client\"))\n clientBll.sterge(comanda[1]);\n else if (comanda[0].contains(\"delete product\"))\n productBll.sterge(comanda[1]);\n else if (comanda[0].compareTo(\"order\")==0)\n order(comanda);\n else if (comanda[0].contains(\"report\"))\n report(comanda[0]);\n }\n }",
"public synchronized Collection<Inventario> getInventario(String idUtente) throws SQLException {\r\n\t\tConnection connection = null;\r\n\t\tPreparedStatement preparedStatement = null;\r\n\r\n\t\tCollection<Inventario> inventario = new ArrayList<Inventario>();\r\n\r\n\t\tString selectSQL = \"SELECT inventario.id_utente, item.id, item.nome, item.tipo, item.quantita FROM acagreen_db.item JOIN acagreen_db.inventario WHERE id_utente=? and item.id=inventario.id_item;\";\r\n\t\t\r\n\t\r\n\t\t\r\n\t\ttry {\r\n\t\t\tconnection = DriverManagerConnectionPool.getDbConnection();\r\n\t\t\tpreparedStatement = connection.prepareStatement(selectSQL);\r\n\t\t\tpreparedStatement.setString(1, idUtente);\r\n\r\n\t\t\tResultSet rs = preparedStatement.executeQuery();\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tInventario bean = new Inventario();\r\n\t\t\t\t\r\n\t\t\t\tbean.setIdUtente(rs.getString(\"id_utente\"));\r\n\t\t\t\tbean.setIdItem(rs.getString(\"id\"));\r\n\t\t\t\tbean.setNome(rs.getString(\"nome\"));\r\n\t\t\t\tbean.setTipo(rs.getString(\"tipo\"));\r\n\t\t\t\tbean.setQuantita(rs.getString(\"quantita\"));\r\n\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(bean!=null) {\t\r\n\t\t\t\t\tinventario.add(bean);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (preparedStatement != null)\r\n\t\t\t\t\tpreparedStatement.close();\r\n\t\t\t} finally {\r\n\t\t\t\tDriverManagerConnectionPool.releaseConnection(connection);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn inventario;\r\n\t}",
"public Collection getEntradaTrasladosEntreDiasoTemporadas(Long temporadaId, Date dataInici, Date dataFin) throws InfrastructureException {\r\n\t\tCollection col;\r\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\t\ttry {\r\n\t\t\tlogger.debug(\"getEntradaTrasladosEntreDiasoTemporadas ini\");\r\n\t\t\tString q = \"from Trasllat tdi where tdi.retornatEstablimentOrigen = true \";\r\n\r\n\t\t\tif(dataInici!= null || dataFin != null){\r\n\t\t\t\tLong campanyaActualId = (Long)getHibernateTemplate().find(\"select max(cam.id) from Campanya cam\").get(0);\r\n\t\t\t\tif(dataInici != null){\r\n\t\t\t\t\tString fi = df.format(dataInici);\r\n\t\t\t\t\tq = q+ \" and tdi.data >= '\"+fi+\"' \";\r\n\t\t\t\t}\r\n\t\t\t\tif(dataFin != null){\r\n\t\t\t\t\tString ff = df.format(dataFin);\r\n\t\t\t\t\tq = q+ \" and tdi.data <= '\"+ff+\"' \";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tq = q+\" and tdi.establimentByTdiCodede.campanya.id=\"+campanyaActualId;\r\n\r\n\t\t\t}else{\r\n\t\t\t\tq = q+ \" and tdi.establimentByTdiCodede.campanya.id=\"+temporadaId;\r\n\t\t\t}\r\n\r\n\t\t\tcol = getHibernateTemplate().find(q);\t\t\t\r\n\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tlogger.error(\"getEntradaTrasladosEntreDiasoTemporadas failed\", ex);\r\n\t\t\tthrow new InfrastructureException(ex);\r\n\t\t}\r\n\t\tlogger.debug(\"getEntradaTrasladosEntreDiasoTemporadas fin\");\r\n\t\treturn col;\r\n\t}",
"public comercio portalComercioDatos(int idcomer) {\n comercio o = null;\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n PreparedStatement st = conn.prepareStatement(\"select nombre, Informacion, direccion, telefono, redSocial, id_comercio, ruta, id_rubro\\n\"\n + \"from Comercios \\n\"\n + \"where id_comercio = ?\");\n st.setInt(1, idcomer);\n ResultSet rs = st.executeQuery();\n\n if (rs.next()) {\n\n String nombre = rs.getString(1);\n String Informacion = rs.getString(2);\n String direccion = rs.getString(3);\n String telefono = rs.getString(4);\n String redsocial = rs.getString(5);\n int id = rs.getInt(6);\n String imagen= rs.getString(7);\n int idr = rs.getInt(8);\n rubro r = new rubro(idr, \"\", true, \"\", \"\");\n o = new comercio(nombre, direccion, telefono, id, true, Informacion, redsocial, r, imagen);\n\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n return o;\n }",
"@Override\n\tpublic List<VisitaTecnica> listaVisitaTecnicaXUsuarioYEstados(String idusuario) {\n\t\treturn null;\n\t}",
"public Coche consultarUno(int id) {\n Coche coche =cochedao.consultarUno(id);\r\n \r\n return coche;\r\n }",
"public Citas getCita(int id) {\n Citas c = new Citas();\n try {\n PreparedStatement pstm = null;\n ResultSet rs = null;\n String query = \"SELECT *FROM paciente WHERE id_paciente=?\";\n pstm = con.prepareStatement(query);\n pstm.setInt(1, id);\n rs = pstm.executeQuery();\n while (rs.next()) {\n c.setId(rs.getInt(\"id_paciente\"));\n c.setName(rs.getString(\"name\"));\n c.setDoctor(rs.getString(\"doctor\"));\n c.setFecha(rs.getString(\"fecha\"));\n c.setHora(rs.getString(\"hora\"));\n c.setTel(rs.getString(\"tel\"));\n c.setCorreo(rs.getString(\"correo\"));\n c.setGenero(rs.getString(\"genero\"));\n c.setMotivo(rs.getString(\"motivo\"));\n c.setSintomas(rs.getString(\"sintomas\"));\n } \n }catch (SQLException ex) {\n ex.printStackTrace();\n }\n return c;\n }",
"@Override\n public Venta BuscarporID(int ID) {\n DAOUsuarios dao_e = new DAOUsuarios();\n try {\n sql = \"SELECT * FROM VENTA WHERE idventa=\"+ID;\n conex=getConexion();\n pstm=conex.prepareStatement(sql);\n rsset=pstm.executeQuery();\n \n Usuario ne;\n Venta ven = null;\n \n while(rsset.next()){\n int numventa = rsset.getInt(1);\n String fechaE = rsset.getString(4);\n ne = dao_e.BuscarporID(rsset.getInt(2));\n \n List<DET_Venta> compras = Ver_DET_VENTAS(numventa);\n ven = new Venta(rsset.getString(1),rsset.getDouble(5), fechaE, ne,null,compras); \n }\n return ven;\n } catch (SQLException | ClassNotFoundException ex) {\n Logger.getLogger(DAOVentas.class.getName()).log(Level.SEVERE, null, ex);\n }finally{\n try {\n conex.close();\n pstm.close();\n rsset.close();\n } catch (SQLException ex) {\n Logger.getLogger(DAOVentas.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return null;\n }",
"UvStatDay selectByPrimaryKey(Long id);",
"@Override\n\tpublic List<VisitaTecnica> listaVisitaTecnicaXUsuario(String idusuario) {\n\t\treturn null;\n\t}",
"public Estetica(java.awt.Frame parent, boolean modal, String id,String idservicio) {\n super(parent, modal);\n initComponents();\n idserv=idservicio;\n this.setLocationRelativeTo(null); \n idpaciente=id;\n try {\n String consulta=\"SELECT nombrepaciente,sexo,observaciones,color,idrcliente, timestampdiff(month,fecha_nacimiento,curdate()) as edad,raza,telefono,referencia FROM tc_mascotas where Idmascota=\"+id;\n System.out.println(consulta);\n conex con=new conex();\n Statement st = con.getConnection().createStatement();\n ResultSet rs=st.executeQuery(consulta); \n String idcliente=\"0\";\n while (rs.next())\n { \n txtpaciente.setText(rs.getString(\"nombrepaciente\"));\n txtsexo.setText(rs.getString(\"sexo\")); \n txtraza.setText(rs.getString(\"raza\")); \n txtcontacto.setText(rs.getString(\"color\")); \n txttelcontacto.setText(rs.getString(\"telefono\")); \n txtreferencia.setText(rs.getString(\"referencia\")); \n txtgeneralidades.setText(rs.getString(\"observaciones\")); \n idcliente=rs.getString(\"idrcliente\");\n }\n consulta=\"SELECT nombre_completo,telefono,noext,MetodoPago,calle,colonia,municipio,cp,estado FROM tc_clientes where idcliente=\"+idcliente;\n rs=st.executeQuery(consulta); \n while (rs.next())\n { \n txtpropietario.setText(rs.getString(\"nombre_completo\"));\n txttelefono.setText(rs.getString(\"telefono\")); \n txtmetodopago.setText(rs.getString(\"MetodoPago\")); \n //txtraza.setText(rs.getString(\"calle\")+\" #\"+rs.getString(\"noext\")+\" Col. \"+rs.getString(\"colonia\")+\", \"+rs.getString(\"municipio\")+\" CP\"+rs.getString(\"cp\")+\" CP\"+rs.getString(\"estado\")); \n }\n rs.close();\n st.close();\n con.desconectar(); \n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"No se pudo obtener la informacion de la mascota \"+ex, \"Error sql\", JOptionPane.ERROR_MESSAGE);\n }\n \n \n }",
"public Objet getObjetById(int id){\n \n Objet ob=null;\n String query=\" select * from objet where id_objet=\"+id;\n \n try { \n Statement state = Connect.getInstance().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n ResultSet res = state.executeQuery(query);\n while(res.next()) ob=new Objet(res.getInt(\"id_objet\"),res.getInt(\"id_user\"),res.getInt(\"qte\"),res.getString(\"types\"),res.getString(\"description\"));\n res.close();\n state.close();\n \n } catch (SQLException e) {\n e.printStackTrace();\n }\n \n return ob;\n }",
"Object getDados(long id);",
"public void findbyid() throws Exception {\n try {\n IPi_per_intDAO pi_per_intDAO = getPi_per_intDAO();\n List<Pi_per_intT> listTemp = pi_per_intDAO.getByPK(pi_per_intT);\n\n pi_per_intT = listTemp.size() > 0 ? listTemp.get(0) : new Pi_per_intT();\n\n } catch (Exception e) {\n easyLogger.error(e.getMessage(), e);\n setMsg(ERROR, \"Falha ao realizar consulta!\");\n } finally {\n close();\n }\n }",
"public RecepcionSero getSerologiaById(String id)throws Exception{\n Session session = sessionFactory.getCurrentSession();\n Query query = session.createQuery(\"from RecepcionSero s where s.id= :id \");\n query.setParameter(\"id\", id);\n return (RecepcionSero) query.uniqueResult();\n }",
"List<Venta1> consultarVentaPorFecha(Date desde, Date hasta, Persona cliente) throws Exception;",
"public ArrayList<Equipamento> buscarTodosUsuario(Long id) {\r\n\t\t\tArrayList<Equipamento> al = new ArrayList<>();\r\n\t\t\tthis.conexao.abrirConexao();\r\n\t\t\tString sqlBuscarPorId = \"SELECT * FROM equipamentos WHERE id_usuario=?\";\r\n\t\t\tEquipamento eq = null;\r\n\t\t\ttry {\r\n\t\t\t\tPreparedStatement statement = (PreparedStatement) this.conexao.getConexao().prepareStatement(sqlBuscarPorId);\r\n\t\t\t\tstatement.setLong(1, id);\r\n\t\t\t\tResultSet rs = statement.executeQuery();\r\n\t\t\t\t// CONVERTER O RESULTSET EM UM OBJETO USUARIO\r\n\t \t\t\twhile(rs.next()) {\r\n\t\t\t\t\teq = new Equipamento();\r\n\t\t\t\t\teq.setId(rs.getLong(\"id_equipamentos\"));\r\n\t\t\t\t\teq.setDescricao(rs.getString(\"descricao\"));\r\n\t\t\t\t\teq.setNome(rs.getString(\"nome\"));\r\n\t\t\t\t\teq.setUsuario(usuDAO.buscarPorId(rs.getLong(\"id_usuario\")));\r\n\t\t\t\t\tal.add(eq);\r\n\t\t\t\t}\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tthis.conexao.fecharConexao();\r\n\t\t\t}\t\t\r\n\t\t\treturn al;\r\n\t\t}",
"public ArrayList<DTOcomentarioRta> listadoComentarioxComercio(int idComercio) {\n ArrayList<DTOcomentarioRta> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n PreparedStatement st = conn.prepareStatement(\" select co.id_comercio, c.id_comentario, c.nombreUsuario, c.descripcion, c.valoracion, c.fecha, co.nombre , r.descripcion, r.fecha, r.id_rta, co.id_rubro\\n\"\n + \" from Comentarios c join Comercios co on c.id_comercio = co.id_comercio\\n\"\n + \" left join Respuestas r on r.id_comentario = c.id_comentario\\n\"\n + \" where co.id_comercio = ?\");\n st.setInt(1, idComercio);\n ResultSet rs = st.executeQuery();\n\n while (rs.next()) {\n int id = rs.getInt(1);\n int idcomentario = rs.getInt(2);\n String nombreU = rs.getString(3);\n String descripC = rs.getString(4);\n int valoracion = rs.getInt(5);\n String fechaC = rs.getString(6);\n String nombrecomercio = rs.getString(7);\n String descripcionR = rs.getString(8);\n String fechaR = rs.getString(9);\n int idR = rs.getInt(10);\n int rubro = rs.getInt(11);\n\n rubro rf = new rubro(rubro, \"\", true, \"\", \"\");\n comercio come = new comercio(nombrecomercio, \"\", \"\", id, true, \"\", \"\", rf, \"\");\n Comentario c = new Comentario(idcomentario, descripC, valoracion, nombreU, fechaC, come);\n respuestas r = new respuestas(idR, descripcionR, c, fechaR);\n DTOcomentarioRta cr = new DTOcomentarioRta(c, r);\n\n lista.add(cr);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }",
"public ArrayList<Cource> getAllCourceDeUser(int idUser) {\n SQLiteDatabase db = this.getReadableDatabase(); // On veut lire dans la BD\n ArrayList<Cource> cources = new ArrayList<Cource>();\n String selectQuery = \"SELECT * FROM \" + TABLE_COURCE;\n\n Log.e(DB_NAME, selectQuery);\n Cursor cursor = db.rawQuery(selectQuery, null);\n if (cursor != null) {\n cursor.moveToFirst();\n do {\n if(cursor.getInt(1) == idUser) {\n cources.add(new Cource(cursor.getInt(0), cursor.getInt(1), cursor.getInt(2),\n cursor.getDouble(3), cursor.getString(4), cursor.getString(5),\n cursor.getString(6), cursor.getString(7)));\n }\n\n } while (cursor.moveToNext());\n }\n db.close(); // Fermer la connexion\n return (cources);\n }",
"public UfficioTecnicoDB() {\n this(ConnectionManager.getInstance());\n }",
"public List<UsuarioxLibro> todoPorUsuario(int idUsuario) {\r\n Connection con = Conexion.getConnection();\r\n PreparedStatement ps;\r\n ResultSet rs;\r\n List<UsuarioxLibro> uxl = new ArrayList<>();\r\n String sql = \"select * from usuarioxlibro where idusuario =\" + idUsuario;\r\n UsuarioxLibro usli;\r\n try {\r\n ps = con.prepareStatement(sql);\r\n rs = ps.executeQuery();\r\n while (rs.next()) {\r\n usli = new UsuarioxLibro(idUsuario, rs.getInt(\"idlibro\"), rs.getDouble(\"nota\"), rs.getBoolean(\"evaluacion\"), rs.getDouble(\"puntuacion\"));\r\n uxl.add(usli);\r\n }\r\n ps.close();\r\n rs.close();\r\n con.close();\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n return uxl;\r\n }",
"@Override\n public ResultSet getByID(String id) throws SQLException {\n return db.getConnection().createStatement().executeQuery(\"select * from comic where idcomic=\"+id);\n }",
"public List<SiteNoticia> listarPorUsuario(TbUsersystem id) {\n List<SiteNoticia> result = new ArrayList<SiteNoticia>();\n EntityManager em1 = getEM();\n em1.getTransaction().begin();\n CriteriaBuilder builder = em1.getCriteriaBuilder();\n CriteriaQuery query = builder.createQuery(SiteNoticia.class);\n EntityType type = em1.getMetamodel().entity(SiteNoticia.class);\n Root root = query.from(SiteNoticia.class);\n query.where(builder.equal(root.get(type.getDeclaredSingularAttribute(\"usuarioId\", TbUsersystem.class)), id));\n query.orderBy(builder.desc(root.get(\"hora2\")));\n result = em1.createQuery(query).getResultList();\n em1.close();\n return result;\n }",
"public String resultado(String id){\n try{\n Cursor cursor = database.rawQuery(\"select calificacion from calificacion where _id = ?\",new String[]{id});\n cursor.moveToFirst();\n resultado = cursor.getString(0);\n }catch (Exception e){\n Log.i(\"El error \", e.toString());\n }\n return resultado;\n }",
"public Double getTotalOliDOdeEnvasadoresEntreDates(Long temporadaId, Date dataInici, Date dataFi, Integer idAutorizada) throws InfrastructureException {\r\n\t\tlogger.debug(\"getTotalOliDOdeEnvasadoresEntreDates ini\");\r\n//\t\tCollection listaTrasllat = getEntradaTrasladosEntreDiasoTemporadas(temporadaId, dataInici, dataFi);\r\n\t\tCollection listaTrasllat = null;\r\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\t\tdouble litros = 0;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tString q = \"from Trasllat tdi where tdi.retornatEstablimentOrigen = true \";\r\n\t\t\tif(dataInici != null){\r\n\t\t\t\tString fi = df.format(dataInici);\r\n\t\t\t\tq = q+ \" and tdi.data >= '\"+fi+\"' \";\r\n\t\t\t}\r\n\t\t\tif(dataFi != null){\r\n\t\t\t\tString ff = df.format(dataFi);\r\n\t\t\t\tq = q+ \" and tdi.data <= '\"+ff+\"' \";\r\n\t\t\t}\r\n\t\t\tlistaTrasllat = getHibernateTemplate().find(q);\t\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tlogger.error(\"getTotalOliDOdeEnvasadoresEntreDates failed\", ex);\r\n\t\t\tthrow new InfrastructureException(ex);\r\n\t\t}\r\n\t\t\r\n\t\t//Para cada uno de lor registro Trasllat separamos los depositos y devolvemos un objeto rasllatDipositCommand\r\n\t\tif (listaTrasllat != null){\r\n\t\t\tfor(Iterator it=listaTrasllat.iterator();it.hasNext();){\r\n\t\t\t\tTrasllat trasllat = (Trasllat)it.next();\r\n\t\t\t\tif(trasllat.getDiposits()!= null){\r\n\t\t\t\t\tfor(Iterator itDip=trasllat.getDiposits().iterator();itDip.hasNext();){\r\n\t\t\t\t\t\tDiposit diposit = (Diposit)itDip.next();\r\n\t\t\t\t\t\tif(idAutorizada!= null && diposit.getPartidaOli() != null && diposit.getPartidaOli().getCategoriaOli() !=null && diposit.getPartidaOli().getCategoriaOli()!= null){\r\n\t\t\t\t\t\t\tif(diposit.getPartidaOli().getCategoriaOli().getId().intValue() == idAutorizada.intValue() && diposit.getVolumActual()!= null){\r\n\t\t\t\t\t\t\t\tlitros+= diposit.getVolumActual().doubleValue();\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tlogger.debug(\"getTotalOliDOdeEnvasadoresEntreDates fin\");\r\n\t\treturn Double.valueOf(String.valueOf(litros));\r\n\t}",
"int getIdRondaCancion(Cancion cancion,Date fecha) throws ExceptionDao;",
"@Override\r\n\tpublic List<Municipio> getMunicipioByDeptoInatec(Integer idDepto) {\r\n\t\tList<Municipio> muni = null;\r\n\t\ttry{\r\n\t\t\tObject [] params = new Object [] {idDepto};\r\n\t\t\tmuni = jdbcTemplate.query(SQL_SELECT_MunicipioByDpto_INATEC,\r\n\t\t\t\t\t\t\t\t\t params, \r\n\t\t\t\t\t\t\t\t\t new RowMapper<Municipio>() {\r\n\t\t\t\t\t\t\t\t\t\t\tpublic Municipio mapRow(ResultSet rs, int rowNum) throws SQLException {\r\n\t\t\t\t\t\t\t\t\t\t\t\tMunicipio munic = new Municipio();\r\n\t\t\t\t\t\t\t\t\t\t\t\tmunic.setMunicipio_id(rs.getInt(\"municipio_id\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\tmunic.setMunicipio_dpto_id(rs.getInt(\"municipio_dpto_id\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\tmunic.setMunicipio_nombre(rs.getString(\"municipio_nombre\"));\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\treturn munic;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t});\t\r\n\t\t} catch(EmptyResultDataAccessException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\tmuni = null;\r\n\t\t}\r\n\t\treturn muni;\r\n\t}",
"public ctCurso get_ctPuesto(int id) throws RunTime4GLException,\r\n\tSystemErrorException, Open4GLException, IOException, SQLException {\n\t\t\r\n\t\t\r\n\t\tBooleanHolder oplResultado = new BooleanHolder();\r\n\t\tStringHolder opcTexto = new StringHolder();\r\n\r\n\t\tResultSetHolder tt_ctCurso = new ResultSetHolder();\r\n\t\tConnection conexion = DBConexion.getConnection();\r\n\t\tAppServer app = new AppServer(conexion);\r\n\t\tctCurso obj = new ctCurso();\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tapp.as_ctCurso_get(\"SISIMB\", id, tt_ctCurso, oplResultado, opcTexto);\r\n\t\t\t\r\n\t\t\tResultSet rs_tt_ctCurso = tt_ctCurso.getResultSetValue();\r\n\r\n\t\t\twhile (rs_tt_ctCurso.next()) {\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tobj.setiIdCurso(rs_tt_ctCurso.getInt(\"iIdCurso\"));\r\n\t\t\t\tobj.setcNombre(rs_tt_ctCurso.getString(\"cNombre\"));\r\n\t\t\t\tobj.setiMinCup(rs_tt_ctCurso.getInt(\"iMinCup\"));\r\n\t\t\t\tobj.setiMaxCup(rs_tt_ctCurso.getInt(\"iMaxCup\"));\r\n\t\t\t\tobj.setDePrecio(rs_tt_ctCurso.getBigDecimal(\"dePrecio\"));\r\n\t\t\t\tobj.setDeIva(rs_tt_ctCurso.getBigDecimal(\"deIva\"));\r\n\t\t\t\tobj.setDeTotal(rs_tt_ctCurso.getBigDecimal(\"deTotal\"));\r\n\t\t\t\tobj.setId(rs_tt_ctCurso.getBytes(\"id\"));\r\n\t\t\t\t\r\n\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (Exception ex) {\r\n\t\t\tSystem.err.println(ex);\r\n\r\n\t\t\t\r\n\t\t} finally {\r\n\t\t\tapp._release();\r\n\t\t\tDBConexion.closeConnection(conexion);\r\n\t\t}\r\n\t\t\r\n\t\treturn obj;\r\n\t}",
"List<Asistencia> listarAsistencia(Integer id, Date inicio, Date fin, Integer crrId);",
"public Cource getCource(int id) {\n Cource cource = null;\n SQLiteDatabase db = this.getReadableDatabase(); // On veut lire dans la BD\n Cursor cursor = db.query(TABLE_COURCE, new String[]{COURCE_ID,\n COURCE_ID_USER, COURCE_PAS, COURCE_CALORIES, COURCE_TEMPS, COURCE_DISTANCE,\n COURCE_TYPE, COURCE_DATE}, COURCE_ID + \"=?\",\n new String[]{String.valueOf(id)}, null, null, null, null);\n if (cursor != null && cursor.getCount()>0) {\n cursor.moveToFirst();\n cource = new Cource(cursor.getInt(0), cursor.getInt(1), cursor.getInt(2),\n cursor.getDouble(3), cursor.getString(4), cursor.getString(5),\n cursor.getString(6), cursor.getString(7));\n }\n cursor.close();\n db.close(); // Fermer la connexion\n// Retourner l'cource\n return cource;\n }",
"@Override\n\tpublic Dates find(int id) {\n\t\tDates date = new Dates();\n\t\tString query = \"SELECT * FROM dates WHERE ID = ? \";\n\t\ttry {\n\t\t\tjava.sql.PreparedStatement statement = this.connect.prepareStatement(query);\n\t\t\tstatement.setInt(1, id);\n\t\t\tResultSet result = statement.executeQuery();\n\n\t\t\tif (result.first()) {\n\t\t\t\t\n\t\t\t\tdate = new Dates(id, result.getString(\"Dates\"));\n\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn date;\n\t}",
"@Override\n public CerereDePrietenie findOne(Long aLong) {\n// String SQL = \"SELECT id,id_1,id_2,status,datac\"\n// + \"FROM cereredeprietenie \"\n// + \"WHERE id = ?\";\n//\n// try (Connection conn = connect();\n// PreparedStatement pstmt = conn.prepareStatement(SQL)) {\n//\n// pstmt.setInt(1, Math.toIntExact(aLong));\n// ResultSet rs = pstmt.executeQuery();\n//\n// while(rs.next()) {\n// Long id = rs.getLong(\"id\");\n// Long id_1 = rs.getLong(\"id_1\");\n// Long id_2 = rs.getLong(\"id_2\");\n//\n// String status = rs.getString(\"status\");\n// LocalDateTime data = rs.getObject( 5,LocalDateTime.class);\n//\n// Utilizator u1=repository.findOne(id_1);\n// Utilizator u2=repository.findOne(id_2);\n//\n// CerereDePrietenie u =new CerereDePrietenie(u1,u2);\n// u.setId(id);\n// u.setStatus(status);\n// u.setData(data);\n// return u;\n// }\n//\n//\n// } catch (SQLException ex) {\n// System.out.println(ex.getMessage());\n// }\n//\n// return null;\n List<CerereDePrietenie> list=new ArrayList<>();\n findAll().forEach(list::add);\n for(CerereDePrietenie cerere: list){\n if(cerere.getId() == aLong)\n return cerere;\n }\n return null;\n }",
"public static ArrayList<Actividad> selectActividadesProyecto(int idProyecto) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n String query = \"SELECT * FROM Actividades a, Fases f, Proyectos p WHERE a.idFase=f.id AND f.idProyecto=p.id AND f.id=? ORDER BY a.anoInicio, a.mesInicio, a.diaInicio ASC\";\n ArrayList<Actividad> actividades = new ArrayList<Actividad>();\n try {\n ps = connection.prepareStatement(query);\n ps.setInt(1, idProyecto);\n rs = ps.executeQuery();\n while (rs.next()) {\n String fechaInicio = String.format(\"%02d/%02d/%04d\", rs.getInt(6), rs.getInt(7), rs.getInt(8));\n String fechaFin = String.format(\"%02d/%02d/%04d\", rs.getInt(9), rs.getInt(10), rs.getInt(11));\n Actividad a = new Actividad(rs.getInt(1), rs.getString(2), rs.getString(3), rs.getString(4), rs.getInt(5), fechaInicio, fechaFin, rs.getInt(12), rs.getString(13).charAt(0), rs.getInt(14));\n actividades.add(a);\n }\n rs.close();\n ps.close();\n pool.freeConnection(connection);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return actividades;\n }",
"@Override\n public List<Transaksi> getAll() {\n List<Transaksi> listTransaksi = new ArrayList<>();\n\n try {\n String query = \"SELECT id, date_format(tgl_transaksi, '%d-%m-%Y') AS tgl_transaksi FROM transaksi\";\n\n PreparedStatement ps = Koneksi().prepareStatement(query);\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n Transaksi transaksi = new Transaksi();\n\n transaksi.setId(rs.getString(\"id\"));\n transaksi.setTglTransaksi(rs.getString(\"tgl_transaksi\"));\n\n listTransaksi.add(transaksi);\n }\n } catch (SQLException se) {\n se.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return listTransaksi;\n }",
"public Imovel consultarImovelDadosCadastrais(Integer idImovel) throws ControladorException {\r\n\r\n\t\tImovel imovel = null;\r\n\t\tCollection colecaoImovel = null;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tcolecaoImovel = this.repositorioImovel.consultarImovelDadosCadastrais(idImovel);\r\n\r\n\t\t} catch (ErroRepositorioException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\tthrow new ControladorException(\"erro.sistema\", ex);\r\n\t\t}\r\n\r\n\t\tif (colecaoImovel != null && !colecaoImovel.isEmpty()) {\r\n\r\n\t\t\timovel = new Imovel();\r\n\r\n\t\t\timovel.setId(idImovel);\r\n\r\n\t\t\tQuadra quadra = new Quadra();\r\n\r\n\t\t\tIterator imovelIterator = colecaoImovel.iterator();\r\n\r\n\t\t\tObject[] arrayImovel = (Object[]) imovelIterator.next();\r\n\r\n\t\t\tLigacaoAguaSituacao ligacaoAguaSituacao = null;\r\n\t\t\t// id ligacaoAguaSituacao - 0\r\n\t\t\tif (arrayImovel[0] != null) {\r\n\t\t\t\tligacaoAguaSituacao = new LigacaoAguaSituacao();\r\n\r\n\t\t\t\tligacaoAguaSituacao.setDescricao((String) arrayImovel[0]);\r\n\t\t\t\timovel.setLigacaoAguaSituacao(ligacaoAguaSituacao);\r\n\t\t\t}\r\n\r\n\t\t\tLigacaoEsgotoSituacao ligacaoEsgotoSituacao = null;\r\n\t\t\t// id ligacaoEsgotoSituacao - 1\r\n\t\t\tif (arrayImovel[1] != null) {\r\n\t\t\t\tligacaoEsgotoSituacao = new LigacaoEsgotoSituacao();\r\n\r\n\t\t\t\tligacaoEsgotoSituacao.setDescricao((String) arrayImovel[1]);\r\n\t\t\t\timovel.setLigacaoEsgotoSituacao(ligacaoEsgotoSituacao);\r\n\t\t\t}\r\n\r\n\t\t\tImovelPerfil imovelPerfil = null;\r\n\t\t\t// descricao imovelPerfil - 2\r\n\t\t\tif (arrayImovel[2] != null) {\r\n\t\t\t\timovelPerfil = new ImovelPerfil();\r\n\r\n\t\t\t\timovelPerfil.setDescricao((String) arrayImovel[2]);\r\n\t\t\t\timovel.setImovelPerfil(imovelPerfil);\r\n\t\t\t}\r\n\r\n\t\t\tDespejo despejo = null;\r\n\t\t\t// descricao despejo - 3\r\n\t\t\tif (arrayImovel[3] != null) {\r\n\t\t\t\tdespejo = new Despejo();\r\n\r\n\t\t\t\tdespejo.setDescricao((String) arrayImovel[3]);\r\n\t\t\t\timovel.setDespejo(despejo);\r\n\t\t\t}\r\n\r\n\t\t\t// area construida - 4\r\n\t\t\tif (arrayImovel[4] != null) {\r\n\t\t\t\timovel.setAreaConstruida((BigDecimal) arrayImovel[4]);\r\n\t\t\t}\r\n\r\n\t\t\t// area construida faixa - menor 5\r\n\t\t\tAreaConstruidaFaixa areaConstruidaFaixa = null;\r\n\t\t\tif (arrayImovel[5] != null) {\r\n\t\t\t\tareaConstruidaFaixa = new AreaConstruidaFaixa();\r\n\t\t\t\tareaConstruidaFaixa.setMenorFaixa((Integer) arrayImovel[5]);\r\n\t\t\t}\r\n\r\n\t\t\t// area construida faixa - maior 6\r\n\t\t\tif (arrayImovel[6] != null) {\r\n\t\t\t\tif (areaConstruidaFaixa == null) {\r\n\t\t\t\t\tareaConstruidaFaixa = new AreaConstruidaFaixa();\r\n\t\t\t\t}\r\n\t\t\t\tareaConstruidaFaixa.setMaiorFaixa((Integer) arrayImovel[6]);\r\n\t\t\t}\r\n\r\n\t\t\timovel.setAreaConstruidaFaixa(areaConstruidaFaixa);\r\n\r\n\t\t\t// testada do lote - 7\r\n\t\t\tif (arrayImovel[7] != null) {\r\n\t\t\t\timovel.setTestadaLote((Short) arrayImovel[7]);\r\n\t\t\t}\r\n\r\n\t\t\t// volumente reservatorio inferior 8\r\n\t\t\tif (arrayImovel[8] != null) {\r\n\t\t\t\timovel.setVolumeReservatorioInferior((BigDecimal) arrayImovel[8]);\r\n\t\t\t}\r\n\r\n\t\t\t// Volume Reservatorio Inferior - menor 9\r\n\t\t\tReservatorioVolumeFaixa reservatorioVolumeFaixaInferior = null;\r\n\t\t\tif (arrayImovel[9] != null) {\r\n\t\t\t\treservatorioVolumeFaixaInferior = new ReservatorioVolumeFaixa();\r\n\t\t\t\treservatorioVolumeFaixaInferior.setVolumeMenorFaixa((BigDecimal) arrayImovel[9]);\r\n\t\t\t}\r\n\r\n\t\t\t// Volume Reservatorio Inferior - maior 10\r\n\t\t\tif (arrayImovel[10] != null) {\r\n\t\t\t\tif (reservatorioVolumeFaixaInferior == null) {\r\n\t\t\t\t\treservatorioVolumeFaixaInferior = new ReservatorioVolumeFaixa();\r\n\t\t\t\t}\r\n\t\t\t\treservatorioVolumeFaixaInferior.setVolumeMaiorFaixa((BigDecimal) arrayImovel[10]);\r\n\t\t\t}\r\n\r\n\t\t\timovel.setReservatorioVolumeFaixaInferior(reservatorioVolumeFaixaInferior);\r\n\r\n\t\t\t// volumente reservatorio superior 11\r\n\t\t\tif (arrayImovel[11] != null) {\r\n\t\t\t\timovel.setVolumeReservatorioSuperior((BigDecimal) arrayImovel[11]);\r\n\t\t\t}\r\n\r\n\t\t\t// Volume Reservatorio Superior - menor 12\r\n\t\t\tReservatorioVolumeFaixa reservatorioVolumeFaixaSuperior = null;\r\n\t\t\tif (arrayImovel[12] != null) {\r\n\t\t\t\treservatorioVolumeFaixaSuperior = new ReservatorioVolumeFaixa();\r\n\t\t\t\treservatorioVolumeFaixaSuperior.setVolumeMenorFaixa((BigDecimal) arrayImovel[12]);\r\n\t\t\t}\r\n\r\n\t\t\t// Volume Reservatorio Superior - maior 13\r\n\t\t\tif (arrayImovel[13] != null) {\r\n\t\t\t\tif (reservatorioVolumeFaixaSuperior == null) {\r\n\t\t\t\t\treservatorioVolumeFaixaSuperior = new ReservatorioVolumeFaixa();\r\n\t\t\t\t}\r\n\t\t\t\treservatorioVolumeFaixaSuperior.setVolumeMaiorFaixa((BigDecimal) arrayImovel[13]);\r\n\t\t\t}\r\n\r\n\t\t\timovel.setReservatorioVolumeFaixaSuperior(reservatorioVolumeFaixaSuperior);\r\n\r\n\t\t\t// Volume Piscina - 14\r\n\t\t\tif (arrayImovel[14] != null) {\r\n\t\t\t\timovel.setVolumePiscina((BigDecimal) arrayImovel[14]);\r\n\t\t\t}\r\n\r\n\t\t\t// Volume Piscina - menor 15\r\n\t\t\tPiscinaVolumeFaixa piscinaVolumeFaixa = null;\r\n\t\t\tif (arrayImovel[15] != null) {\r\n\t\t\t\tpiscinaVolumeFaixa = new PiscinaVolumeFaixa();\r\n\t\t\t\tpiscinaVolumeFaixa.setVolumeMenorFaixa((BigDecimal) arrayImovel[15]);\r\n\t\t\t}\r\n\r\n\t\t\t// Volume Piscina - maior 16\r\n\t\t\tif (arrayImovel[16] != null) {\r\n\t\t\t\tif (piscinaVolumeFaixa == null) {\r\n\t\t\t\t\tpiscinaVolumeFaixa = new PiscinaVolumeFaixa();\r\n\t\t\t\t}\r\n\t\t\t\tpiscinaVolumeFaixa.setVolumeMaiorFaixa((BigDecimal) arrayImovel[16]);\r\n\t\t\t}\r\n\r\n\t\t\timovel.setPiscinaVolumeFaixa(piscinaVolumeFaixa);\r\n\r\n\t\t\t// Fonte Abastecimento- 17\r\n\t\t\tFonteAbastecimento fonteAbastecimento = null;\r\n\t\t\tif (arrayImovel[17] != null) {\r\n\t\t\t\tfonteAbastecimento = new FonteAbastecimento();\r\n\t\t\t\tfonteAbastecimento.setDescricao((String) arrayImovel[17]);\r\n\t\t\t\timovel.setFonteAbastecimento(fonteAbastecimento);\r\n\t\t\t}\r\n\r\n\t\t\t// Poco Tipo- 18\r\n\t\t\tPocoTipo pocoTipo = null;\r\n\t\t\tif (arrayImovel[18] != null) {\r\n\t\t\t\tpocoTipo = new PocoTipo();\r\n\t\t\t\tpocoTipo.setDescricao((String) arrayImovel[18]);\r\n\t\t\t\timovel.setPocoTipo(pocoTipo);\r\n\t\t\t}\r\n\r\n\t\t\t// Distrito Operacional- 19\r\n\t\t\tDistritoOperacional distritoOperacional = null;\r\n\t\t\tif (arrayImovel[19] != null) {\r\n\t\t\t\tdistritoOperacional = new DistritoOperacional();\r\n\t\t\t\tdistritoOperacional.setDescricao((String) arrayImovel[19]);\r\n\r\n\t\t\t\tquadra.setDistritoOperacional(distritoOperacional);\r\n\t\t\t}\r\n\r\n\t\t\t// Pavimento Rua- 20\r\n\t\t\tPavimentoRua pavimentoRua = null;\r\n\t\t\tif (arrayImovel[20] != null) {\r\n\t\t\t\tpavimentoRua = new PavimentoRua();\r\n\t\t\t\tpavimentoRua.setDescricao((String) arrayImovel[20]);\r\n\t\t\t\timovel.setPavimentoRua(pavimentoRua);\r\n\t\t\t}\r\n\r\n\t\t\t// Pavimento Cal�ada- 21\r\n\t\t\tPavimentoCalcada pavimentoCalcada = null;\r\n\t\t\tif (arrayImovel[21] != null) {\r\n\t\t\t\tpavimentoCalcada = new PavimentoCalcada();\r\n\t\t\t\tpavimentoCalcada.setDescricao((String) arrayImovel[21]);\r\n\t\t\t\timovel.setPavimentoCalcada(pavimentoCalcada);\r\n\t\t\t}\r\n\r\n\t\t\t// Numero IPTU- 22\r\n\t\t\tif (arrayImovel[22] != null) {\r\n\t\t\t\timovel.setNumeroIptu((String) arrayImovel[22]);\r\n\t\t\t}\r\n\r\n\t\t\t// Numero CELPE- 23\r\n\t\t\tif (arrayImovel[23] != null) {\r\n\t\t\t\timovel.setNumeroCelpe((Long) arrayImovel[23]);\r\n\t\t\t}\r\n\r\n\t\t\t// Coordenada X- 24\r\n\t\t\tif (arrayImovel[24] != null) {\r\n\t\t\t\timovel.setCoordenadaX((String) arrayImovel[24]);\r\n\t\t\t}\r\n\t\t\t// Coordenada Y- 25\r\n\t\t\tif (arrayImovel[25] != null) {\r\n\t\t\t\timovel.setCoordenadaY((String) arrayImovel[25]);\r\n\t\t\t}\r\n\r\n\t\t\t// Cadastro Ocorrencia- 26\r\n\t\t\tCadastroOcorrencia cadastroOcorrencia = null;\r\n\t\t\tif (arrayImovel[26] != null) {\r\n\t\t\t\tcadastroOcorrencia = new CadastroOcorrencia();\r\n\t\t\t\tcadastroOcorrencia.setDescricao((String) arrayImovel[26]);\r\n\t\t\t\timovel.setCadastroOcorrencia(cadastroOcorrencia);\r\n\t\t\t}\r\n\t\t\t// Elo Anormalidade- 27\r\n\t\t\tEloAnormalidade eloAnormalidade = null;\r\n\t\t\tif (arrayImovel[27] != null) {\r\n\t\t\t\teloAnormalidade = new EloAnormalidade();\r\n\t\t\t\teloAnormalidade.setDescricao((String) arrayImovel[27]);\r\n\t\t\t\timovel.setEloAnormalidade(eloAnormalidade);\r\n\t\t\t}\r\n\r\n\t\t\t// Indicador Imovel Condominio- 28\r\n\t\t\tif (arrayImovel[28] != null) {\r\n\t\t\t\timovel.setIndicadorImovelCondominio((Short) arrayImovel[28]);\r\n\t\t\t}\r\n\r\n\t\t\t// Imovel Condominio- 29\r\n\t\t\tImovel imovelCondominio = null;\r\n\t\t\tif (arrayImovel[29] != null) {\r\n\t\t\t\timovelCondominio = new Imovel();\r\n\t\t\t\timovelCondominio.setId((Integer) arrayImovel[29]);\r\n\t\t\t\timovel.setImovelCondominio(imovelCondominio);\r\n\t\t\t}\r\n\r\n\t\t\t// Imovel Principal- 30\r\n\t\t\tImovel imovelPrincipal = null;\r\n\t\t\tif (arrayImovel[30] != null) {\r\n\t\t\t\timovelPrincipal = new Imovel();\r\n\t\t\t\timovelPrincipal.setId((Integer) arrayImovel[30]);\r\n\t\t\t\timovel.setImovelPrincipal(imovelPrincipal);\r\n\t\t\t}\r\n\r\n\t\t\t// Numero Pontos Utilizacao- 31\r\n\t\t\tif (arrayImovel[31] != null) {\r\n\t\t\t\timovel.setNumeroPontosUtilizacao((Short) arrayImovel[31]);\r\n\t\t\t}\r\n\r\n\t\t\t// Numero Moradores- 32\r\n\t\t\tif (arrayImovel[32] != null) {\r\n\t\t\t\timovel.setNumeroMorador((Short) arrayImovel[32]);\r\n\t\t\t}\r\n\r\n\t\t\t// Jardim- 33\r\n\t\t\tif (arrayImovel[33] != null) {\r\n\t\t\t\timovel.setIndicadorJardim((Short) arrayImovel[33]);\r\n\t\t\t}\r\n\r\n\t\t\t// Divis�o de Esgoto- 34\r\n\t\t\tBacia bacia = null;\r\n\t\t\tif (arrayImovel[34] != null) {\r\n\t\t\t\tbacia = new Bacia();\r\n\t\t\t\tbacia.setDescricao((String) arrayImovel[34]);\r\n\r\n\t\t\t\t// Divis�o de Esgoto\r\n\t\t\t\tif (arrayImovel[36] != null) {\r\n\t\t\t\t\tSistemaEsgoto sistemaEsgoto = new SistemaEsgoto();\r\n\t\t\t\t\tDivisaoEsgoto divisaoEsgoto = new DivisaoEsgoto();\r\n\r\n\t\t\t\t\tdivisaoEsgoto.setDescricao((String) arrayImovel[36]);\r\n\r\n\t\t\t\t\tsistemaEsgoto.setDivisaoEsgoto(divisaoEsgoto);\r\n\t\t\t\t\tbacia.setSistemaEsgoto(sistemaEsgoto);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tquadra.setBacia(bacia);\r\n\t\t\t}\r\n\t\t\timovel.setQuadra(quadra);\r\n\r\n\t\t\t// Tipo Habita��o - 37\r\n\t\t\tif (arrayImovel[37] != null) {\r\n\t\t\t\tImovelTipoHabitacao imovelTipoHabitacao = new ImovelTipoHabitacao();\r\n\t\t\t\timovelTipoHabitacao.setDescricao((String) arrayImovel[37]);\r\n\t\t\t\timovel.setImovelTipoHabitacao(imovelTipoHabitacao);\r\n\t\t\t}\r\n\r\n\t\t\t// Tipo Propriedade - 38\r\n\t\t\tif (arrayImovel[38] != null) {\r\n\t\t\t\tImovelTipoPropriedade imovelTipoPropriedade = new ImovelTipoPropriedade();\r\n\t\t\t\timovelTipoPropriedade.setDescricao((String) arrayImovel[38]);\r\n\t\t\t\timovel.setImovelTipoPropriedade(imovelTipoPropriedade);\r\n\t\t\t}\r\n\r\n\t\t\t// Tipo Contrucao - 39\r\n\t\t\tif (arrayImovel[39] != null) {\r\n\t\t\t\tImovelTipoConstrucao imovelTipoConstrucao = new ImovelTipoConstrucao();\r\n\t\t\t\timovelTipoConstrucao.setDescricao((String) arrayImovel[39]);\r\n\t\t\t\timovel.setImovelTipoConstrucao(imovelTipoConstrucao);\r\n\t\t\t}\r\n\r\n\t\t\t// Tipo Cobertura - 40\r\n\t\t\tif (arrayImovel[40] != null) {\r\n\t\t\t\tImovelTipoCobertura imovelTipoCobertura = new ImovelTipoCobertura();\r\n\t\t\t\timovelTipoCobertura.setDescricao((String) arrayImovel[40]);\r\n\t\t\t\timovel.setImovelTipoCobertura(imovelTipoCobertura);\r\n\t\t\t}\r\n\r\n\t\t\t// Indicador Exclus�o - 41\r\n\t\t\tif (arrayImovel[41] != null) {\r\n\t\t\t\timovel.setIndicadorExclusao((Short) arrayImovel[41]);\r\n\t\t\t}\r\n\r\n\t\t\t// Nome Imovel - 42\r\n\t\t\tif (arrayImovel[42] != null) {\r\n\t\t\t\timovel.setNomeImovel((String) arrayImovel[42]);\r\n\t\t\t}\r\n\r\n\t\t\t// Municipio - 43\r\n\t\t\tif (arrayImovel[43] != null) {\r\n\t\t\t\tLocalidade localidade = new Localidade();\r\n\t\t\t\tMunicipio municipio = (Municipio) arrayImovel[43];\r\n\t\t\t\tlocalidade.setMunicipio(municipio);\r\n\t\t\t\timovel.setLocalidade(localidade);\r\n\t\t\t}\r\n\t\t\t// Indicador Exclus�o - 44\r\n\t\t\tif (arrayImovel[41] != null) {\r\n\t\t\t\timovel.setIndicadorNivelInstalacaoEsgoto((Short) arrayImovel[44]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn imovel;\r\n\t}",
"public org.oep.cmon.dao.dvc.model.ThuTuc2GiayTo fetchByPrimaryKey(long id)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"@Override\r\n\tpublic Temi select(Integer temiid) {\n\t\treturn temiMapper.select(temiid);\r\n\t}",
"public static Actividad selectActividad(int idActividad) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n String query = \"SELECT * FROM Actividades WHERE id=?\";\n Actividad a = null;\n try {\n ps = connection.prepareStatement(query);\n ps.setInt(1, idActividad);\n rs = ps.executeQuery();\n if (rs.next()) {\n String fechaInicio = String.format(\"%02d/%02d/%04d\", rs.getInt(7), rs.getInt(6), rs.getInt(8));\n String fechaFin = String.format(\"%02d/%02d/%04d\", rs.getInt(10), rs.getInt(9), rs.getInt(11));\n a = new Actividad(idActividad, rs.getString(2), rs.getString(3), rs.getString(4), rs.getInt(5), fechaInicio, fechaFin, rs.getInt(12), rs.getString(13).charAt(0), rs.getInt(14));\n }\n rs.close();\n ps.close();\n pool.freeConnection(connection);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return a;\n }",
"public List<PrestationCDI> listingContratCDIEnCours(Date d,Date deux)\n\t\t\tthrows DAOException {\n\t\tArrayList<PrestationCDI> liste = new ArrayList<PrestationCDI>();\n\t\tPrestationCDI prestation=null;\t\t\n\t\tTachesSAP tache=null;\n\t\tEmployeur employeur = null;\n\t\tIdentite identite=null;\n\t\tStatement st = null;\n\t\tResultSet res = null;\n\t\tString req = \" SELECT distinct(id_prestationcontrat) as c,\"\n\t\t\t\t+ DAOConstants.t_sapprestation\n\t\t\t\t+\".id_identite,id_employeur,id_tache,heuresminimois_pr, \"\n\t\t\t\t+ \"salairehor_pr,facsalairehor_pr,panier_pr,deplacement_pr, \"\n\t\t\t\t+ \"commentaire_pr,datedebut_pr,heurescontratsalarie FROM \" \n\t\t\t\t+ DAOConstants.t_sapprestation\n\t\t\t\t+\" inner join \"\n\t\t\t\t+DAOConstants.t_identite\n\t\t\t\t+\" on \"\n\t\t\t\t+ DAOConstants.t_sapprestation\n\t\t\t\t+\".id_identite=\"\n\t\t\t\t+DAOConstants.t_identite\n\t\t\t\t+\".id_identite\"\n\t\t\t\t+ \" where (datefin_pr is null or datefin_pr >'\"+d\n\t\t\t\t+\"') and datedebut_pr <='\"+deux\n\t\t\t\t+\"' order by nom_identite asc\";\n\n\t\ttry {\n\t\t\tst = connect.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n\t\t\t\t\tResultSet.CONCUR_READ_ONLY);\n\t\t\tres = st.executeQuery(req);\n\t\t\twhile (res.next()) {\n\t\t\t\tTachesSAPDAO serdao=new TachesSAPDAO();\n\t\t\t\ttache=serdao.findByID(res.getInt(4));\n\t\t\t\tEmployeurDAO empdao = new EmployeurDAO();\n\t\t\t\temployeur = empdao.findByID(res.getInt(3));\n\t\t\t\tIdentiteDAO idao=new IdentiteDAO();\n\t\t\t\t identite=idao.findByID(res.getInt(2));\n\t\t\t\t\n\n\t\t\t\t prestation = new PrestationCDI(res.getInt(1),identite,employeur,tache,res.getInt(5),\n\t\t\t\t\t\tres.getFloat(6),res.getFloat(7),res.getFloat(8),res.getFloat(9),res.getString(10),\n\t\t\t\t\t\tres.getDate(11),res.getInt(12));\n\t\t\t\tliste.add(prestation);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\n\t\t\te.printStackTrace();\n\n\t\t} finally {\n\t\t\t// Fermeture du resultset\n\t\t\tDAOUtil.closeResultSet(res);\n\n\t\t\t// Fermeture du statement\n\t\t\tDAOUtil.closeStatement(st);\n\t\t}\n\n\t\treturn liste;\n\n\t}",
"public List<AtendimentoJuridicoDTO> consultarAtendimentoJuridico(String idCedente, String idSacado, Integer idTitulo) {\n\t\tList<AtendimentoJuridicoDTO> listAtendimentoJuridicoDTO = new ArrayList<>();\n\t\ttry {\n\t\t\tList<AtendimentoJuridicoEntity> listaAtendimentoJuridicoEntity = atendimentoJuridicoRepository.consultarAtendimentoJuridico(idCedente, idSacado, idTitulo);\n\t\t\tlistaAtendimentoJuridicoEntity.forEach(entity -> listAtendimentoJuridicoDTO.add(toDTO(entity)));\n\t\t}catch (AtendimentoCobrancaRepositoryException e) {\n\t\t\tthrow e;\n\t\t}catch (Exception e) {\n\t\t\tthrow new AtendimentoCobrancaServiceException(new StringBuilder(Mensagens.SERVICE_CONSULTAR_ATENDIMENTO_JURIDICO)\n\t\t\t\t\t.append(e.getMessage()).toString(), CobrancaOperacaoError.ERROR_COBRANCA_SERVICE, e);\n\t\t}\n\t\treturn listAtendimentoJuridicoDTO;\n\t}",
"public Collection recuperarAtividadeServicoTipoConsulta(Integer idServicoTipoAtividade) throws ErroRepositorioException{\n\n\t\tCollection retornoConsulta = null;\n\t\tCollection retorno = null;\n\n\t\tSession session = HibernateUtil.getSession();\n\n\t\tString consulta = \"\";\n\n\t\ttry{\n\t\t\tif(idServicoTipoAtividade != null){\n\t\t\t\tconsulta = \"SELECT at.descricao,\" + \"svtpat.numeroExecucao \" + \"FROM ServicoTipoAtividade svtpat \"\n\t\t\t\t\t\t\t\t+ \"LEFT JOIN svtpat.atividade at \" + \"WHERE svtpat.comp_id.idServicoTipo = :idServicoTipoAtividade\";\n\n\t\t\t\tretornoConsulta = (Collection) session.createQuery(consulta).setInteger(\"idServicoTipoAtividade\", idServicoTipoAtividade)\n\t\t\t\t\t\t\t\t.list();\n\n\t\t\t\tif(retornoConsulta.size() > 0){\n\n\t\t\t\t\tretorno = new ArrayList();\n\n\t\t\t\t\tServicoTipoAtividade servicoTipoAtividade = null;\n\t\t\t\t\tAtividade atividade = null;\n\n\t\t\t\t\tfor(Iterator iter = retornoConsulta.iterator(); iter.hasNext();){\n\n\t\t\t\t\t\tObject[] element = (Object[]) iter.next();\n\n\t\t\t\t\t\tservicoTipoAtividade = new ServicoTipoAtividade();\n\t\t\t\t\t\tservicoTipoAtividade.setNumeroExecucao((Short) element[1]);\n\n\t\t\t\t\t\tatividade = new Atividade();\n\t\t\t\t\t\tatividade.setDescricao((String) element[0]);\n\n\t\t\t\t\t\tservicoTipoAtividade.setAtividade(atividade);\n\n\t\t\t\t\t\tretorno.add(servicoTipoAtividade);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tthrow new ErroRepositorioException(e, \"Erro no Hibernate\");\n\t\t}finally{\n\t\t\tHibernateUtil.closeSession(session);\n\t\t}\n\n\t\treturn retorno;\n\t}",
"@SuppressWarnings(\"rawtypes\")\r\n\tpublic Double getTotalOliDOaEnvasadoresEntreDates(Date dataInici, Date dataFi, Integer idAutorizada) throws InfrastructureException {\r\n\t\tlogger.debug(\"getTotalOliDOaEnvasadoresEntreDates ini\");\r\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\t\tdouble litros = 0;\r\n\t\ttry {\r\n\t\t\tString fi = null;\r\n\t\t\tString ff = null;\r\n\t\t\tif (dataInici != null) fi = df.format(dataInici);\r\n\t\t\tif (dataFi != null) ff = df.format(dataFi);\r\n\t\t\tString q =\" from Trasllat tdi where \" +\r\n\t\t\t\t\t\"\t (tdi.dataAcceptarEnviament is not null \" +\r\n\t\t\t\t\t\"\t\tand tdi.quantitatEnviament is not null \";\r\n\t\t\tif (fi != null) \r\n\t\t\t\tq +=\"\t\tand tdi.dataAcceptarEnviament >= '\"+fi+\"' \";\r\n\t\t\tif (ff != null)\r\n\t\t\t\tq +=\"\t\tand tdi.dataAcceptarEnviament <= '\"+ff+\"' \";\r\n\t\t\tq +=\t\"\t\tand tdi.quantitatEnviament > 0 ) or \" +\r\n\t\t\t\t\t\"\t (tdi.dataAcceptarRetorn is not null \" +\r\n\t\t\t\t\t\"\t\tand tdi.quantitatRetorn is not null \";\r\n\t\t\tif (fi != null)\r\n\t\t\t\tq +=\"\t\tand tdi.dataAcceptarRetorn >= '\"+fi+\"' \";\r\n\t\t\tif (ff != null)\r\n\t\t\t\tq +=\"\t\tand tdi.dataAcceptarRetorn <= '\"+ff+\"' \";\r\n\t\t\tq +=\t\"\t\tand tdi.quantitatRetorn > 0) \" +\r\n\t\t\t\t\t\"and tdi.valid = true \" +\r\n\t\t\t\t\t\"order by tdi.data desc\";\r\n\t\t\t\r\n\t\t\tCollection listaTrasllat = getHibernateTemplate().find(q);\r\n\t\t\t//Para cada uno de lor registro Trasllat separamos los depositos y devolvemos un objeto trasllatDipositCommand\r\n\t\t\t\r\n\t\t\tfor(Iterator it=listaTrasllat.iterator();it.hasNext();){\r\n\t\t\t\tTrasllat trasllat = (Trasllat)it.next();\r\n\t\t\t\tfor(Iterator itTra=trasllat.getTraza().getTrazasForTtrCodtrafill().iterator();itTra.hasNext();){\r\n\t\t\t\t\t\tTraza traza = (Traza)itTra.next();\r\n\t\t\t\t\t\tif (traza.getTipus().intValue() == Constants.CODI_TRAZA_TIPUS_ENTRADA_DIPOSIT){\r\n\t\t\t\t\t\t\tString query = \"select distinct edi from EntradaDiposit as edi where edi.traza.id=\" + traza.getId() + \" and edi.valid = true \";\r\n\t\t\t\t\t\t\tList entDip = getHibernateTemplate().find(query);\r\n\t\t\t\t\t\t\tif(entDip.size()>0){\r\n\t\t\t\t\t\t\t\tEntradaDiposit edi = (EntradaDiposit)entDip.get(0);\r\n\t\t\t\t\t\t\t\t//EntradaDiposit edi = this.entradaDipositAmbTraza(traza.getId());\r\n\t\t\t\t\t\t\t\tif(idAutorizada!= null && edi.getCategoriaOli()!= null && edi.getCategoriaOli().getId().intValue() == idAutorizada.intValue()){\r\n\t\t\t\t\t\t\t\t\tlitros += edi.getLitres();\r\n\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tlogger.error(\"getTotalOliDOaEnvasadoresEntreDates failed\", ex);\r\n\t\t\tthrow new InfrastructureException(ex);\r\n\t\t}\t\r\n\t\tlogger.debug(\"getTotalOliDOaEnvasadoresEntreDates fin\");\r\n\t\treturn Double.valueOf(String.valueOf(litros)); \r\n\t}",
"@GetMapping(value = CLIENTE + ID + ESTAFECHA)\r\n\tList<MedidaAntropometrica> getMedidasPorClienteYDesdeFecha(@PathVariable Integer id, @PathVariable Date estafecha){\n\t\tCliente cli = daoCliente.findById(id).get();\r\n\t\treturn dao.findByClienteIdAndFechaAfter(cli, estafecha);\r\n\t}",
"public Tblproductos findById(Integer idSucursal){\n em = getEntityManager();\n return em.find(Tblproductos.class, idSucursal);\n }",
"List<CalificacionRestauranteModel> buscarCalificacionPorRestaurante(Long idRestaurante);",
"@Override\n public Asesor getAsesorId(int idUsuarioSistema){\n Asesor asesor = null;\n ConexionSQL conexionSql = new ConexionSQL();\n Connection conexion = conexionSql.getConexion();\n try{\n PreparedStatement orden = conexion.prepareStatement(\"select * from asesor where idUsuarioSistema =?\");\n orden.setInt(1, idUsuarioSistema);\n ResultSet resultadoConsulta = orden.executeQuery();\n if(resultadoConsulta.first()){\n String nombre;\n String idioma;\n String correo;\n String telefono;\n String numeroPersonal;\n nombre = resultadoConsulta.getString(4) +\" \"+ resultadoConsulta.getString(6) +\" \"+ resultadoConsulta.getString(5);\n idioma = resultadoConsulta.getString(2);\n telefono = resultadoConsulta.getString(8);\n correo = resultadoConsulta.getString(7);\n numeroPersonal = resultadoConsulta.getString(1);\n asesor = new Asesor(numeroPersonal, nombre, idioma,telefono,correo);\n }else{\n Logger logger = Logger.getLogger(\"Logger\");\n logger.log(Level.WARNING, \"No se encuentra el asesor\");\n }\n }catch(SQLException | NullPointerException excepcion){\n Logger logger = Logger.getLogger(\"Logger\");\n logger.log(Level.WARNING, \"La conexión podría ser nula | la sentencia SQL esta mal\");\n }\n return asesor;\n }",
"public Setor buscar(Integer id) {\n\t\tString sql = \" SELECT s.id, s.descricao FROM setor s WHERE id = \" + id + \"; \";\n\n\t\tSetor setor = new Setor();\n\n\t\ttry (Statement sttm = con.createStatement(); ResultSet rs = sttm.executeQuery(sql);) {\n\t\t\tif (rs.next()) {\n\t\t\t\tsetor.setId(id);\n\t\t\t\tsetor.setDescricao(rs.getString(\"descricao\"));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn setor;\n\t}",
"@Override\n\tpublic ArrayList<Feedback> selectFeedbackPerCorso(int idCorso) throws SQLException {\n\t\tPreparedStatement ps=conn.prepareStatement(\"select f.id_feedback,\"\n\t\t\t\t+ \"f.id_edizione,f.id_utente,f.descrizione,f.voto from feedback f \"\n\t\t\t\t+ \"inner join calendario c on f.id_edizione=c.id_edizione\" \n\t\t\t\t+ \" where c.id_corso=?\");\n\n\t\tps.setInt(1, idCorso);\n\n\t\tResultSet rs = ps.executeQuery();\n\t\tArrayList<Feedback> feedbacks= new ArrayList<Feedback>(); \n\t\twhile(rs.next()){\n\t\t\tString descrizione= rs.getString(\"descrizione\");\n\t\t\tInteger voto = rs.getInt(\"voto\");\n\t\t\tInteger idFeedback = rs.getInt(\"id_feedback\");\n\t\t\tString idUtente = rs.getString(\"id_utente\");\n\t\t\tInteger idEdizione = rs.getInt(\"id_edizione\");\n\t\t\tFeedback feedback = new Feedback(idFeedback,idEdizione, idUtente, descrizione, voto);\n\t\t\tfeedbacks.add(feedback);\n\t\t}\n\n\t\treturn feedbacks;\n\t\n\t}",
"public Vector obtenerListaCagoBuscarIdCargo(int idCargo) throws SQLException {\n Vector listaCargo = new Vector();\n String sql = \"Select idCargo, idDocumento, numeroDocumento, Documento, \"\n + \"Fecha FechaCargo, Hora HoraCargo, Area AreaCargo, Asunto, Institucion, Recepcionista, estadoCargo From vCargoDocumento Where idCargo = \"+ idCargo;\n st = con.createStatement();\n ResultSet rs = st.executeQuery(sql);\n while (rs.next()) {\n Vector ovCargo = new Vector();\n ovCargo.add(rs.getInt(1));\n ovCargo.add(rs.getInt(2));\n ovCargo.add(rs.getString(3));\n ovCargo.add(rs.getString(4));\n ovCargo.add(rs.getString(5));\n ovCargo.add(rs.getString(6));\n ovCargo.add(rs.getString(7));\n ovCargo.add(rs.getString(8));\n ovCargo.add(rs.getString(9));\n ovCargo.add(rs.getString(10));\n ovCargo.add(rs.getInt(11));\n// System.out.println(rs.getInt(1));\n// System.out.println(rs.getInt(2));\n// System.out.println(rs.getInt(3));\n// System.out.println(rs.getInt(4));\n// System.out.println(rs.getInt(5));\n// System.out.println(rs.getInt(6));\n// System.out.println(rs.getInt(7));\n// System.out.println(rs.getInt(8));\n// System.out.println(rs.getInt(9));\n// System.out.println(rs.getInt(10));\n// System.out.println(rs.getInt(11));\n listaCargo.add(ovCargo);\n }\n return listaCargo;\n }",
"@GetMapping(\"/charts-current-patients-vo/{id}\")\n @Timed\n public List<ChartVO> getAllChartsCurrentPatientsVO(@PathVariable Long id) {\n log.debug(\"REST request to get all ChartsVO By Facility\");\n ZonedDateTime now = ZonedDateTime.now();\n return chartService.findAllByFacilityWaitingRoomFalseAndDischargeDateVO(id, now);\n }",
"@Override\n\tpublic Solicitud obtenerSolicitud(int id) throws DAOException {\n\t\tSession session = null;\n\t\tSolicitud solicitud= null;\n\t\ttry{\n\t\t\tsession = getSession();\t\n\t\t\tsolicitud = (Solicitud) session.get(Solicitud.class, id);\n\t\t}catch(HibernateException e){\n\t\t\tthrow new DAOException(e);\n\t\t}\n\t\treturn solicitud;\n\t}",
"public List<Map<String, Object>> LISTA_HIJOS(String id) {\r\n sql = \"select ID_DATOS_HIJOS_TRABAJADOR, ID_TRABAJADOR,\"\r\n + \"AP_PATERNO,AP_MATERNO,NO_HIJO_TRABAJADOR,\"\r\n + \"TO_CHAR(FE_NACIMIENTO,'yyyy-mm-dd') AS FE_NACIMIENTO, \"\r\n + \"ES_SEXO, ES_TIPO_DOC, NU_DOC, ES_PRESENTA_DOCUMENTO, \"\r\n + \"ES_INSCRIPCION_VIG_ESSALUD, ES_ESTUDIO_NIV_SUPERIOR, \"\r\n + \"US_CREACION,FE_CREACION,US_MODIF,FE_MODIF,IP_USUARIO,\"\r\n + \"ES_DATOS_HIJO_TRABAJADOR from \"\r\n + \"RHTD_DATOS_HIJO_TRABAJADOR where ID_TRABAJADOR=?\";\r\n return jt.queryForList(sql, id);\r\n }",
"public ArrayList<Info_laboral> findAll(){\n ConexionBD con = new ConexionBD();\n Connection c = con.conOracle();\n\n ArrayList<Info_laboral> eeg = new ArrayList();\n\n try{\n ResultSet gs = con.ejecutaCon(\" Select * from Info_laboral\"); \n while(gs.next()){\n \n Estudios_Egresado ee=new Estudios_Egresado();\n Info_laboral i =new Info_laboral();\n Egresado eg = new Egresado();\n Estudios es = new Estudios();\n \n i.setId(gs.getInt(1));\n i.setJefe(gs.getString(2));\n i.setCargo(gs.getString(3));\n i.setFuncion(gs.getString(4));\n i.setFecha_ini(gs.getDate(5));\n i.setFecha_fin(gs.getDate(6));\n i.setMotivo_retiro(gs.getString(7));\n eg.setId(gs.getLong(8));\n i.setId_egresado(eg);\n i.setPerfil(gs.getString(9));\n \n eeg.add(i);\n }\n }catch(SQLException e){\n System.out.println(\"error \"+e);\n return null;\n }\n return eeg;\n }",
"Movimiento selectByPrimaryKey(Integer idMovCta);",
"public ArrayList<clsPago> consultaDataPagosCuotaInicial(int codigoCli)\n { \n ArrayList<clsPago> data = new ArrayList<clsPago>(); \n try{\n bd.conectarBaseDeDatos();\n sql = \" SELECT a.id_pagos_recibo idPago, a.id_usuario, b.name name_usuario, \"\n + \" a.referencia referencia, \"\n + \" a.fecha_pago fecha_pago, a.estado, \"\n + \" a.valor valor_pago, a.id_caja_operacion, e.name_completo nombre_cliente, \"\n + \" a.fecha_pago fecha_registro\"\n + \" FROM ck_pagos_recibo AS a\"\n + \" JOIN ck_usuario AS b ON a.id_usuario = b.id_usuario\"\n + \" JOIN ck_cliente AS e ON a.codigo = e.codigo\"\n + \" WHERE a.estado = 'A'\"\n + \" AND a.cuota_inicial = 'S'\"\n + \" AND a.estado_asignado = 'N'\"\n + \" AND a.codigo = \" + codigoCli; \n \n System.out.println(sql);\n bd.resultado = bd.sentencia.executeQuery(sql);\n \n if(bd.resultado.next())\n { \n do \n { \n clsPago oListaTemporal = new clsPago();\n \n oListaTemporal.setReferencia(bd.resultado.getString(\"referencia\"));\n oListaTemporal.setFechaPago(bd.resultado.getString(\"fecha_pago\"));\n oListaTemporal.setNombreUsuario(bd.resultado.getString(\"name_usuario\"));\n oListaTemporal.setNombreCliente(bd.resultado.getString(\"nombre_cliente\"));\n oListaTemporal.setValor(bd.resultado.getDouble(\"valor_pago\"));\n oListaTemporal.setFechaRegistro(bd.resultado.getString(\"fecha_registro\"));\n oListaTemporal.setIdPago(bd.resultado.getInt(\"idPago\"));\n data.add(oListaTemporal);\n }\n while(bd.resultado.next()); \n //return data;\n }\n else\n { \n data = null;\n } \n }\n catch(Exception ex)\n {\n System.out.print(ex);\n data = null;\n } \n bd.desconectarBaseDeDatos();\n return data;\n }",
"public void getAllCursosAvanzado() {\n String query = \"\";\n Conexion db = new Conexion();\n\n try {\n query = \"SELECT id_curso, nombre_curso, familia.nombre_familia as familia, id_profesor FROM curso \"\n + \"INNER JOIN familia ON curso.id_familia = familia.id_familia;\";\n Statement stm = db.conectar().createStatement();\n ResultSet rs = stm.executeQuery(query);\n \n\n while (rs.next()) {\n \n int id = rs.getInt(\"id_curso\");\n String nombre = rs.getString(\"nombre_curso\");\n String familia = rs.getString(\"familia\");\n String profesor = rs.getString(\"id_profesor\");\n\n // Imprimir los resultados.\n \n System.out.format(\"%d,%s,%s,%s\\n\", id, nombre, familia, profesor);\n\n }\n\n stm.close();\n db.conexion.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }",
"public Funcionario buscaPorId(Integer id) throws Exception {\n\t\topenDatabase();\n\t\tSQL = \"SELECT tb_funcionario.idfuncionario, tb_funcionario.nome, tb_funcionario.email, tb_funcionario.tel, tb_dependente.iddependente, tb_dependente.nome, tb_dependente.parentesco \" + \n\t\t\t\t\"FROM tb_funcionario \" + \n\t\t\t\t\"INNER JOIN tb_dependente ON tb_funcionario.idfuncionario = tb_dependente.funcionario_id \" +\n\t\t\t\t\"WHERE tb_funcionario.idfuncionario = ?\";\n\t\tps = con.prepareStatement(SQL);\n\t\tps.setInt(1, id);\n\t\trs = ps.executeQuery();\n\t\t\n\t\tFuncionario funcionario = new Funcionario();\n\t\tList<Dependente> listaDependentes = new ArrayList<Dependente>();\n\t\tfuncionario.setDependentes(new ArrayList<Dependente>());\n\t\t\n\t\twhile (rs.next()) {\n\t\t\tfuncionario.setId(rs.getInt(\"tb_funcionario.idfuncionario\"));\n\t\t\tfuncionario.setNome(rs.getString(\"tb_funcionario.nome\"));\n\t\t\tfuncionario.setEmail(rs.getString(\"tb_funcionario.email\"));\n\t\t\tfuncionario.setTelefone(rs.getString(\"tb_funcionario.tel\"));\n\n\t\t\t\tDependente dependente = new Dependente();\n\t\t\t\tdependente.setId(rs.getInt(\"tb_dependente.iddependente\"));\n\t\t\t\tdependente.setNome(rs.getString(\"tb_dependente.nome\"));\n\t\t\t\tdependente.setParentesco(rs.getString(\"tb_dependente.parentesco\"));\n\n\t\t\tlistaDependentes.add(dependente);\n\n\t\t}\n\n\t\tfuncionario.setDependentes(listaDependentes);\n\t\t\n\t\tcloseDatabase();\n\t\treturn funcionario;\n\t}",
"public Buku findById(Integer idBuku) throws SQLException {\n\r\n KoneksiDatabase koneksiDB = new KoneksiDatabase();\r\n DataSource dataSource = koneksiDB.getDataSource();\r\n Connection koneksi = dataSource.getConnection();\r\n\r\n String sql = \"select id,judul_buku,tahun_terbit,pengarang,jumlah_buku from perpus.buku where id = ?\";\r\n PreparedStatement statement = koneksi.prepareStatement(sql);\r\n statement.setInt(1, idBuku);\r\n ResultSet resultSet = statement.executeQuery();\r\n Buku buku = new Buku();\r\n\r\n if (resultSet.next()) {\r\n// System.out.println(resultSet.getInt(\"id\"));\r\n //mengambil data dari database\r\n\r\n buku.setId(resultSet.getInt(\"id\"));\r\n buku.setJudulBuku(resultSet.getString(\"judul_buku\"));\r\n buku.setTahunTerbit(resultSet.getInt(\"tahun_terbit\"));\r\n buku.setPengarang(resultSet.getString(\"pengarang\"));\r\n buku.setJumlahBuku(resultSet.getInt(\"jumlah_buku\"));\r\n\r\n// listBuku.add(buku); //menyimpan ke variabel listBuku\r\n }\r\n\r\n resultSet.close();\r\n statement.close();\r\n koneksi.close();\r\n\r\n return buku;\r\n }",
"public DTOSalida obtenerAccesosPlantilla(DTOOID dto) throws MareException\n { \n UtilidadesLog.info(\"DAOGestionComisiones.obtenerAccesosPlantilla(DTOOID dto): Entrada\"); \n StringBuffer query = new StringBuffer();\n RecordSet rs = new RecordSet(); \n DTOSalida dtos = new DTOSalida();\n BelcorpService bs = UtilidadesEJB.getBelcorpService(); \n query.append(\" SELECT DISTINCT A.ACCE_OID_ACCE OID, B.VAL_I18N DESCRIPCION \");\n query.append(\" FROM COM_PLANT_COMIS_ACCES A, V_GEN_I18N_SICC B, COM_PLANT_COMIS C \"); \n query.append(\" WHERE \");\n if(dto.getOid() != null) {\n query.append(\" A.PLCO_OID_PLAN_COMI = \" + dto.getOid() + \" AND \");\n }\n query.append(\" A.PLCO_OID_PLAN_COMI = C.OID_PLAN_COMI AND \"); \n query.append(\" C.CEST_OID_ESTA = \" + ConstantesCOM.ESTADO_ACTIVO + \" AND \"); \n \n query.append(\" B.ATTR_ENTI = 'SEG_ACCES' AND \"); \n query.append(\" B.ATTR_NUM_ATRI = 1 AND \");\n query.append(\" B.IDIO_OID_IDIO = \" + dto.getOidIdioma() + \" AND \");\n query.append(\" B.VAL_OID = A.ACCE_OID_ACCE \");\n query.append(\" ORDER BY DESCRIPCION \"); \n UtilidadesLog.debug(query.toString()); \n try {\n rs = bs.dbService.executeStaticQuery(query.toString());\n if(rs != null)\n dtos.setResultado(rs);\n }catch (Exception e) {\n UtilidadesLog.error(e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS));\n } \n UtilidadesLog.info(\"DAOGestionComisiones.obtenerAccesosPlantilla(DTOOID dto): Salida\"); \n return dtos;\n }",
"DetalleVenta buscarDetalleVentaPorId(Long id) throws Exception;",
"public static Comentario buscar(Integer id)\n {\n String idComentario = id.toString();\n Session sessionRecheio;\n sessionRecheio = HibernateUtil.getSession();\n Transaction tr = sessionRecheio.beginTransaction();\n String hql = \"from Comentario where u.id='\"+idComentario+\"'\";\n Comentario comentario = (Comentario)sessionRecheio.createQuery(hql).uniqueResult();\n tr.commit();\n return comentario;\n }",
"public Usuario getUsuario(Usuario creador, int id){\r\n Usuario u=null;\r\n if (creador.isAdmin() || creador.getId()==id){\r\n try {\r\n String sql= \"Select * from sistemasEM.usuarios where id=\"+id;\r\n Statement s= connection.createStatement();\r\n ResultSet rs = s.executeQuery(sql);\r\n while(rs.next()){\r\n TipoDescuento td = this.getTipoDescuento(rs.getInt(\"permisosDescuento\"));\r\n TipoPersonal tp = this.getTipoPersonal(rs.getInt(\"permisosPersonal\"));\r\n u= new Usuario(rs.getInt(\"id\"), rs.getString(\"nombre\"), rs.getString(\"mostrar\"),rs.getBoolean(\"admin\"),tp,td,rs.getBoolean(\"notas\"),rs.getBoolean(\"habilitacion\"),rs.getBoolean(\"profesor\"),rs.getInt(\"ciProfesor\"),rs.getBoolean(\"cambiarContra\"));\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ManejadorCodigoBD.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n return u;\r\n }",
"public Collection<OsAtividadePeriodoExecucao> obterOsAtividadePeriodoExecucaoPorEquipe(Integer idEquipe, Date dataRoteiro)\n\t\t\t\t\tthrows ErroRepositorioException{\n\n\t\tCollection<Object[]> retornoConsulta = null;\n\t\tCollection<OsAtividadePeriodoExecucao> colecaoOsPeriodo = new ArrayList();\n\n\t\tSession session = HibernateUtil.getSession();\n\t\tString consulta = \"\";\n\t\ttry{\n\n\t\t\tconsulta = \"SELECT DISTINCT osAtividadePeriodoExecucao.id, \" // 0\n\t\t\t\t\t\t\t+ \"osAtividadePeriodoExecucao.dataInicio, \" // 1\n\t\t\t\t\t\t\t+ \"osAtividadePeriodoExecucao.dataFim \" // 2\n\t\t\t\t\t\t\t+ \"FROM OsExecucaoEquipe osExecucaoEquipe \"\n\t\t\t\t\t\t\t// + \"INNER JOIN osExecucaoEquipe.equipe equipe \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osExecucaoEquipe.osAtividadePeriodoExecucao osAtividadePeriodoExecucao \"\n\t\t\t\t\t\t\t// +\n\t\t\t\t\t\t\t// \"INNER JOIN osAtividadePeriodoExecucao.ordemServicoAtividade ordemServicoAtividade \"\n\t\t\t\t\t\t\t+ \"WHERE osExecucaoEquipe.equipe.id = :idEquipe \"\n\t\t\t\t\t\t\t+ \"AND osAtividadePeriodoExecucao.ordemServicoAtividade.id IS NOT NULL \"\n\t\t\t\t\t\t\t+ \"AND day(osAtividadePeriodoExecucao.dataFim) = day(cast(:dataRoteiro as date)) \"\n\t\t\t\t\t\t\t+ \"AND month(osAtividadePeriodoExecucao.dataFim) = month(cast(:dataRoteiro as date)) \"\n\t\t\t\t\t\t\t+ \"AND year(osAtividadePeriodoExecucao.dataFim) = year(cast(:dataRoteiro as date)) \"\n\t\t\t\t\t\t\t+ \"ORDER BY osAtividadePeriodoExecucao.id \";\n\n\t\t\tretornoConsulta = (Collection<Object[]>) session.createQuery(consulta).setInteger(\"idEquipe\", idEquipe)\n\t\t\t\t\t\t\t.setDate(\"dataRoteiro\", dataRoteiro).list();\n\n\t\t\tif(retornoConsulta != null && !retornoConsulta.isEmpty()){\n\n\t\t\t\tOsAtividadePeriodoExecucao osAtividadePeriodoExecucao = null;\n\n\t\t\t\tfor(Object[] periodo : retornoConsulta){\n\n\t\t\t\t\tosAtividadePeriodoExecucao = new OsAtividadePeriodoExecucao();\n\n\t\t\t\t\tosAtividadePeriodoExecucao.setId((Integer) periodo[0]);\n\t\t\t\t\tosAtividadePeriodoExecucao.setDataInicio((Date) periodo[1]);\n\t\t\t\t\tosAtividadePeriodoExecucao.setDataFim((Date) periodo[2]);\n\n\t\t\t\t\tcolecaoOsPeriodo.add(osAtividadePeriodoExecucao);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tthrow new ErroRepositorioException(e, \"Erro no Hibernate\");\n\t\t}finally{\n\t\t\tHibernateUtil.closeSession(session);\n\t\t}\n\t\treturn colecaoOsPeriodo;\n\t}",
"public Matricula find(int idAluno, int idCurso){\n\t\tString sql = \"select mat_cur_id, mat_alu_id, mat_data, cur_desc, alu_nome, alu_rg, alu_cpf from matricula \"\n\t\t\t\t+ \"inner join curso on mat_cur_id = cur_id \"\n\t\t\t\t+ \"inner join aluno on mat_alu_id = alu_id \"\n\t\t\t\t+ \"where mat_alu_id = ? and mat_cur_id = ?\";\n\t\tPreparedStatement stmt;\n\t\tResultSet res;\n\t\tMatricula matricula = null;\n\t\t\n\t\ttry {\n\t\t\tstmt = this.connection.prepareStatement(sql);\n\t\t\tstmt.setInt(1, idAluno);\n\t\t\tstmt.setInt(2, idCurso);\n\t\t\tres = stmt.executeQuery();\n\t\t\twhile(res.next()){\t\t\t\t\n\t\t\t\tAluno aluno = new Aluno();\n\t\t\t\tCurso curso = new Curso();\n\t\t\t\t\n\t\t\t\tcurso.setId(res.getInt(1));\n\t\t\t\taluno.setId(res.getInt(2));\n\t\t\t\t\n\t\t\t\tcurso.setDescricao(res.getString(4));\n\t\t\t\t\n\t\t\t\taluno.setNome(res.getString(5));\n\t\t\t\taluno.setRg(res.getString(6));\n\t\t\t\taluno.setCpf(res.getInt(7));\n\t\t\t\t\n\t\t\t\tmatricula = new Matricula();\n\t\t\t\t\n\t\t\t\tmatricula.setAluno(aluno);\n\t\t\t\tmatricula.setCurso(curso);\n\t\t\t\tmatricula.setDtMatricula(res.getTimestamp(3));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tthis.endConnection();\n\t\t}\n\t\t\n\t\treturn matricula;\n\t}",
"UsuarioDetalle cargaDetalle(int id);",
"public void buscarEstudiante(String codEstudiante){\n estudianteModificar=new Estudiante();\n estudianteGradoModificar=new EstudianteGrado();\n StringBuilder query=new StringBuilder();\n query.append(\"select e.idestudiante,e.nombre,e.apellido,e.ci,e.cod_est,e.idgrado,e.idcurso,g.grado,c.nombre_curso \" );\n query.append(\" from estudiante e \");\n query.append(\" inner join grado g on e.idgrado=g.idgrado \");\n query.append(\" inner join cursos c on e.idcurso=c.idcurso \");\n query.append(\" where idestudiante=? \");\n try {\n PreparedStatement pst=connection.prepareStatement(query.toString());\n pst.setInt(1, Integer.parseInt(codEstudiante));\n ResultSet resultado=pst.executeQuery();\n //utilizamos una condicion porque la busqueda nos devuelve 1 registro\n if(resultado.next()){\n //cargando la informacion a nuestro objeto categoriaModificarde tipo categoria\n estudianteModificar.setCodEstudiante(resultado.getInt(1));\n estudianteModificar.setNomEstudiante(resultado.getString(2));\n estudianteModificar.setApEstudiante(resultado.getString(3));\n estudianteModificar.setCiEstudiante(resultado.getInt(4));\n estudianteModificar.setCodigoEstudiante(resultado.getString(5));\n estudianteModificar.setIdgradoEstudiante(resultado.getInt(6));\n estudianteModificar.setIdCursoEstudiante(resultado.getInt(7));\n estudianteGradoModificar.setNomGrado(resultado.getString(8));\n estudianteGradoModificar.setNomCurso(resultado.getString(9));\n }\n } catch (SQLException e) {\n System.out.println(\"Error de conexion\");\n e.printStackTrace();\n }\n }",
"public Cliente carregarPorId(int id) throws Exception {\n \n Cliente c = new Cliente();\n String sql = \"SELECT * FROM cliente WHERE idCliente = ?\";\n PreparedStatement pst = conn.prepareStatement(sql);\n pst.setInt(1, id);\n ResultSet rs = pst.executeQuery();\n if (rs.next()) {\n c.setIdCliente(rs.getInt(\"idCliente\"));\n c.setEndereco(rs.getString(\"endereco\"));\n c.setCidade(rs.getString(\"cidade\"));\n c.setDdd(rs.getInt(\"ddd\"));\n c.setNome(rs.getString(\"nome\"));\n c.setUf(rs.getString(\"uf\"));\n c.setTelefone(rs.getString(\"telefone\"));\n Empresa e = new Empresa();\n EmpresaDAO ePB = new EmpresaDAO();\n ePB.conectar();\n e = ePB.carregarPorCnpj(rs.getString(\"Empresa_cnpj\"));\n ePB.desconectar();\n Usuario p = new Usuario();\n UsuarioDAO pPB = new UsuarioDAO();\n pPB.conectar();\n p = pPB.carregarPorId(rs.getInt(\"Usuario_idUsuario\"));\n pPB.desconectar();\n c.setEmpresa(e);\n c.setUsuario(p);\n }\n return c;\n }",
"CounselorBiographyTemp findById( Integer id ) ;",
"@SuppressWarnings(\"unchecked\")\n public void consultarCoactivosXLS() throws CirculemosNegocioException {\n\n // consulta la tabla temporal de los 6000 coactivos\n StringBuilder sql = new StringBuilder();\n\n sql.append(\"select [TIPO DOC], [NUMERO DE IDENTIFICACIÓN], [valor multas], [titulo valor], proceso \");\n sql.append(\"from coactivos_xls \");\n sql.append(\"where id_tramite is null and numero_axis is null AND archivo is not null \");\n sql.append(\"AND [titulo valor] IN ('2186721','2187250','2187580','2186845')\");\n\n Query query = em.createNativeQuery(sql.toString());\n\n List<Object[]> listaResultados = Utilidades.safeList(query.getResultList());\n\n Date fechaCoactivo = UtilFecha.buildCalendar().getTime();\n CoactivoDTO coactivoDTOs;\n TipoIdentificacionPersonaDTO tipoIdentificacion;\n List<ObligacionCoactivoDTO> obligacionesCoactivoDTO;\n PersonaDTO personaDTO;\n ProcesoDTO proceso;\n // persiste los resultados en coactivoDTO\n for (Object[] coactivo : listaResultados) {\n coactivoDTOs = new CoactivoDTO();\n // persiste el tipo de indetificacion en TipoIdentificacionPersonaDTO\n personaDTO = new PersonaDTO();\n proceso = new ProcesoDTO();\n tipoIdentificacion = new TipoIdentificacionPersonaDTO();\n obligacionesCoactivoDTO = new ArrayList<>();\n\n tipoIdentificacion.setCodigo((String) coactivo[0]);\n personaDTO.setTipoIdentificacion(tipoIdentificacion);\n coactivoDTOs.setPersona(personaDTO);\n coactivoDTOs.getPersona().setNumeroIdentificacion((String) coactivo[1]);\n\n proceso.setFechaInicio(fechaCoactivo);\n coactivoDTOs.setProceso(proceso);\n coactivoDTOs.setValorTotalObligaciones(BigDecimal\n .valueOf(Double.valueOf(coactivo[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n coactivoDTOs.setValorTotalCostasProcesales(\n coactivoDTOs.getValorTotalObligaciones().multiply(BigDecimal.valueOf(0.05)));\n coactivoDTOs.getProceso().setObservacion(\"COACTIVO\");\n String[] numeroFactura = coactivo[3].toString().split(\",\");\n // separa los numeros de factura cuando viene mas de uno.\n for (String nFactura : numeroFactura) {\n // consulta por numero de factura el el saldo a capital por cada factura\n sql = new StringBuilder();\n sql.append(\"select nombre, saldo_capital, saldo_interes \");\n sql.append(\"from cartera_coactivos_xls \");\n sql.append(\"where nombre = :nFactura\");\n\n Query quer = em.createNativeQuery(sql.toString());\n\n quer.setParameter(\"nFactura\", nFactura);\n\n List<Object[]> result = Utilidades.safeList(quer.getResultList());\n // persiste las obligaciones consultadas y las inserta en ObligacionCoactivoDTO\n ObligacionCoactivoDTO obligaciones;\n for (Object[] obligacion : result) {\n obligaciones = new ObligacionCoactivoDTO();\n obligaciones.setNumeroObligacion((String) obligacion[0]);\n obligaciones.setValorObligacion(BigDecimal.valueOf(\n Double.valueOf(obligacion[1].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n obligaciones.setValorInteresMoratorios(BigDecimal.valueOf(\n Double.valueOf(obligacion[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n // Adiciona las obligaciones a una lista\n obligacionesCoactivoDTO.add(obligaciones);\n }\n\n }\n coactivoDTOs.setObligacionCoactivos(obligacionesCoactivoDTO);\n try {\n iLCoactivo.registrarCoactivoAxis(coactivoDTOs, coactivo[4].toString());\n } catch (Exception e) {\n logger.error(\"Error al registrar coactivo 6000 :\", e);\n }\n }\n }",
"@Override\r\n\t@Transactional\r\n\tpublic FmtEstado list(Long id){\r\n\t\ttry{\r\n\t\t\tString sql = \"select \"+FmtEstado.getColumnNames()\r\n\t\t\t\t\t + \"from FMT_ESTADO \"\r\n\t\t\t\t\t + \"where estacons = :id \";\r\n\t\t\t\t\t\t\r\n\t\t\tQuery query = getSession().createSQLQuery(sql)\r\n\t\t\t\t\t\t .addEntity(FmtEstado.class)\t\t\t\t\t\r\n\t\t\t\t\t .setParameter(\"id\", id);\r\n\t\t\treturn (FmtEstado)query.uniqueResult();\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"public CalMetasDTO cargarRegistro(int codigoCiclo, int codigoPlan, int codigoMeta) {\n/* */ try {\n/* 416 */ String s = \"select m.*,\";\n/* 417 */ s = s + \"tm.descripcion as nombreTipoMedicion,\";\n/* 418 */ s = s + \"est.descripcion as nombreEstado,\";\n/* 419 */ s = s + \"Um.Descripcion as nombre_unidad_medida\";\n/* 420 */ s = s + \" from cal_plan_metas m,sis_multivalores tm,sis_multivalores est,Sis_Multivalores Um\";\n/* 421 */ s = s + \" where \";\n/* 422 */ s = s + \" m.tipo_medicion =tm.valor\";\n/* 423 */ s = s + \" and tm.tabla='CAL_TIPO_MEDICION'\";\n/* 424 */ s = s + \" and m.estado =est.valor\";\n/* 425 */ s = s + \" and est.tabla='CAL_ESTADO_META'\";\n/* 426 */ s = s + \" and m.Unidad_Medida = Um.Valor\";\n/* 427 */ s = s + \" and Um.Tabla = 'CAL_UNIDAD_MEDIDA_META'\";\n/* 428 */ s = s + \" and m.codigo_ciclo=\" + codigoCiclo;\n/* 429 */ s = s + \" and m.codigo_plan=\" + codigoPlan;\n/* 430 */ s = s + \" and m.codigo_meta=\" + codigoMeta;\n/* 431 */ boolean rtaDB = this.dat.parseSql(s);\n/* 432 */ if (!rtaDB) {\n/* 433 */ return null;\n/* */ }\n/* */ \n/* 436 */ this.rs = this.dat.getResultSet();\n/* 437 */ if (this.rs.next()) {\n/* 438 */ return leerRegistro();\n/* */ }\n/* */ }\n/* 441 */ catch (Exception e) {\n/* 442 */ e.printStackTrace();\n/* 443 */ Utilidades.writeError(\"CalPlanMetasFactory:cargarCalMetas \", e);\n/* */ } \n/* 445 */ return null;\n/* */ }",
"public List<Usuario> getAll(){\n String sql = \"SELECT * FROM usuarios \" +\n \" INNER JOIN ciudades ON ciudades.id = usuarios.id_ciudad\" +\n \" INNER JOIN provincias ON provincias.id = usuarios.id_provincia\" +\n \" INNER JOIN paises ON paises.id = usuarios.id_pais\";\n try {\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(sql);\n List<Usuario> usuarios = new ArrayList<Usuario>();\n while (rs.next()){\n Ciudad ciudad = new Ciudad(rs.getInt(\"ciudades.id\"),rs.getString(\"ciudades.nombre\"));\n\n Provincia provincia = new Provincia(rs.getInt(\"provincias.id\"),rs.getString(\"provincias.nombre\"));\n\n Pais pais = new Pais(rs.getInt(\"paises.id\"),rs.getString(\"paises.nombre\"));\n\n Usuario usuario = new Usuario(rs.getString(\"nombre\"),rs.getString(\"apellido\"),\n rs.getString(\"direccion\"), rs.getString(\"telefono\"),\n ciudad, provincia, pais, rs.getString(\"email\"),\n rs.getString(\"username\"), rs.getString(\"contrasena\"));\n usuario.setId(rs.getInt(\"usuarios.id\"));\n usuarios.add(usuario);\n }\n return usuarios;\n }catch (SQLException e){\n e.printStackTrace();\n }\n return null;\n }",
"public java.sql.ResultSet consultaporfecha(String fecha){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where phm.fechas='\"+fecha+\"' and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporfecha \"+ex);\r\n }\t\r\n return rs;\r\n }",
"public String getDenumireUtilizare(String id) {\n c = db.rawQuery(\"select denumire from utilizare where id='\" + id + \"'\", new String[]{});\n StringBuffer buffer = new StringBuffer();\n while (c.moveToNext()) {\n String denumire = c.getString(0);\n buffer.append(\"\" + denumire);\n }\n return buffer.toString();\n }",
"Prueba selectByPrimaryKey(Integer id);",
"@Override\n public DycpCompensacionDTO encontrar(String numControl) throws SIATException {\n try {\n String query =\n \" SELECT C.*, S.*, TT.*, SI.*, PER.*, CON.*, IMP.*, CON.DESCRIPCION, PER.DESCRIPCION as DESCRIPCION_PERIODO, IMP.DESCRIPCION as DESCRIPCION_IMPUESTO \"\n + \"FROM DYCP_COMPENSACION C, DYCP_SERVICIO S, DYCC_TIPOTRAMITE TT, DYCT_SALDOICEP SI, \"\n + \"DYCC_PERIODO PER, DYCC_CONCEPTO CON, DYCC_IMPUESTO IMP \"\n + \"WHERE C.NUMCONTROL = S.NUMCONTROL \"\n + \"AND TT.IDTIPOTRAMITE = S.IDTIPOTRAMITE AND SI.IDSALDOICEP = C.IDSALDOICEPORIGEN \"\n + \"AND PER.IDPERIODO = SI.IDPERIODO AND CON.IDCONCEPTO = SI.IDCONCEPTO AND IMP.IDIMPUESTO = CON.IDIMPUESTO \" \n + \"AND C.NUMCONTROL = ? ORDER BY C.IDSALDOICEPDESTINO DESC\";\n TipoTramiteMapper mapperTipoTramite = new TipoTramiteMapper();\n DycpServicioMapper mapperServicio = new DycpServicioMapper();\n mapperServicio.setMapperTipoTramite(mapperTipoTramite);\n CompensacionMapper mapper = new CompensacionMapper();\n DyctSaldoIcepMapper mapperSaldoIcep = new DyctSaldoIcepMapper();\n PeriodoMapper mapperPeriodo = new PeriodoMapper();\n ConceptoMapper mapperConcepto = new ConceptoMapper();\n ImpuestoMapper mapperImpuesto = new ImpuestoMapper();\n mapperSaldoIcep.setMapperPeriodo(mapperPeriodo);\n mapperConcepto.setMapperImpuesto(mapperImpuesto);\n mapperSaldoIcep.setMapperConcepto(mapperConcepto);\n mapper.setMapperServicio(mapperServicio);\n mapper.setMapperSaldoIcepOrigen(mapperSaldoIcep);\n return jdbcTemplateDYC.queryForObject(query, new Object[] { numControl }, mapper);\n } catch (DataAccessException dae) {\n log.error(ConstantesDyC1.TEXTO_1_ERROR_DAO + dae.getMessage() + ConstantesDyC1.TEXTO_2_ERROR_DAO +\n SQLOracleDyC.CONSULTA_DYCP_COMPENSACION + ConstantesDyC1.TEXTO_3_ERROR_DAO + \"numcontrol\" + numControl +\n ConstantesDyC1.TEXTO_8_CAUSAS + dae.getCause());\n throw new SIATException(dae);\n }\n }",
"public List<Reporte> select(Long fechaInicio, Long fechaFin , int tipoReporte) {\r\n long startTime = System.currentTimeMillis(); //todo: reeplazar System.currentTimeMillis() por SystemClock.uptimeMillis()\r\n\r\n SQLiteDatabase db = sqLiteService.getWritableDatabase();\r\n\r\n Cursor resourse = db.rawQuery(\"\",null); // FIXME\r\n\r\n switch(tipoReporte){\r\n\r\n case 1:\r\n Log.w(\"Reporte\",\"Los mas vendidos\");\r\n resourse = db.rawQuery(\"SELECT * , (Productos.Venta - (VA.precio_compra * Productos.Vendidos)) AS Ganancia \" +\r\n \" FROM ViewArticulo AS VA, \" +\r\n \" (Select id_articulo,sum(importe_total) AS Venta,sum(cantidad) AS Vendidos \" +\r\n \" from items_ticket \" +\r\n \" WHERE timestamp BETWEEN \"+ fechaInicio +\" AND \"+ fechaFin +\r\n \" group by id_articulo \" +\r\n \" order by Vendidos DESC LIMIT 0,10) AS Productos \" +\r\n \"WHERE VA.id_articulo = Productos.id_articulo\", null);\r\n break;\r\n\r\n case 2:\r\n Log.w(\"Reporte\",\"Los menos vendidos\");\r\n resourse = db.rawQuery(\"SELECT * , (Productos.Venta - (VA.precio_compra * Productos.Vendidos)) AS Ganancia \" +\r\n \" FROM ViewArticulo AS VA, \" +\r\n \" (Select id_articulo,sum(importe_total) AS Venta,sum(cantidad) AS Vendidos \" +\r\n \" from items_ticket \" +\r\n \" WHERE timestamp BETWEEN \"+ fechaInicio +\" AND \"+ fechaFin +\r\n \" group by id_articulo \" +\r\n \" order by Vendidos ASC LIMIT 0,10) AS Productos \" +\r\n \"WHERE VA.id_articulo = Productos.id_articulo\", null);\r\n break;\r\n\r\n case 3:\r\n\r\n Log.w(\"Reporte\",\"Ganancias\");\r\n\r\n resourse = db.rawQuery(\"SELECT * \" +\r\n \" FROM ViewArticulo AS VA, \" +\r\n \" (SELECT it.id_articulo, SUM(importe_total) AS Venta,SUM(cantidad) AS Vendidos ,SUM((it.importe_total - (it.cantidad * it.precio_compra))) AS Ganancia, it.precio_compra AS PrecioCompra \" +\r\n \" FROM Items_Ticket AS it INNER JOIN Tickets AS t ON it.id_ticket = t.id_ticket \" +\r\n \" WHERE t.id_tipo_ticket = 1 AND t.timestamp BETWEEN \"+ fechaInicio +\" AND \"+ fechaFin +\r\n \" GROUP BY it.id_articulo , it.precio_compra\" +\r\n \" ORDER BY Vendidos DESC ) AS Calculo \" +\r\n \" WHERE VA.id_articulo = Calculo.id_articulo\",null);\r\n /*/////////////////////////////Old reporte ganancias/////////////////////////////////\r\n resourse = db.rawQuery(\"SELECT * , (Productos.Venta - (VA.precio_compra * Productos.Vendidos)) AS Ganancia \" +\r\n \" FROM ViewArticulo AS VA, \" +\r\n \" (Select id_articulo,sum(importe_total) AS Venta,sum(cantidad) AS Vendidos \" +\r\n \" from items_ticket \" +\r\n \" WHERE timestamp BETWEEN \"+ fechaInicio +\" AND \"+ fechaFin +\r\n \" group by id_articulo \" +\r\n \" order by Vendidos DESC ) AS Productos \" +\r\n \"WHERE VA.id_articulo = Productos.id_articulo\", null);\r\n *////////////////////////////////////////////////////////////////////////////////////\r\n break;\r\n\r\n case 4:\r\n Log.w(\"Reporte\",\"Garnel top mas vendidos\");\r\n resourse = db.rawQuery(\"SELECT * , (Productos.Venta - (VA.precio_compra * Productos.Vendidos)) AS Ganancia \" +\r\n \" FROM ViewArticulo AS VA, \" +\r\n \" (Select id_articulo,sum(importe_total) AS Venta,sum(cantidad) AS Vendidos \" +\r\n \" from items_ticket \" +\r\n \" group by id_articulo \" +\r\n \" order by Vendidos ASC ) AS Productos \" +\r\n \" WHERE VA.id_articulo = Productos.id_articulo\" +\r\n \" AND granel = 1\", null);\r\n break;\r\n\r\n case 5:\r\n Log.w(\"Reporte\", \"Cash Closing\");\r\n final String sql = \"Select * From\\n\" +\r\n \"\\n\" +\r\n \" (Select strftime('%d-%m-%Y', datetime(a.timestamp, 'unixepoch', 'localtime')) As Fecha,\\n\" +\r\n \"\\n\" +\r\n \" a.id_usuario, b.nombre As Nombre_Usuario, 'Saldo Inicial' As Concepto, a.importe_real As Cantidad, strftime('%H:%M:%S', a.fecha_apertura) As Hora, 1 As Orden\\n\" +\r\n \"\\n\" +\r\n \" From Registro_apertura a\\n\" +\r\n \"\\n\" +\r\n \" Left Join Usuarios b On a.id_usuario = b.id_usuario\\n\" +\r\n \"\\n\" +\r\n \" LIMIT 1) a\\n\" +\r\n \"\\n\" +\r\n \"Union\\n\" +\r\n \"\\n\" +\r\n \"Select * From\\n\" +\r\n \"\\n\" +\r\n \" (Select strftime('%d-%m-%Y', datetime(a.timestamp, 'unixepoch', 'localtime')) As Fecha, a.id_usuario, b.nombre As Nombre_Usuario, 'Entradas de dinero' As Concepto,\\n\" +\r\n \"\\n\" +\r\n \" a.importe_neto As Cantidad, 'NA' As Hora, 2 As Orden\\n\" +\r\n \"\\n\" +\r\n \" From Tickets a\\n\" +\r\n \"\\n\" +\r\n \" Left Join Usuarios b On a.id_usuario = b.id_usuario\\n\" +\r\n \"\\n\" +\r\n \" LIMIT 1) b\\n\" +\r\n \"\\n\" +\r\n \"Union \\n\" +\r\n \"\\n\" +\r\n \"Select * From\\n\" +\r\n \"\\n\" +\r\n \" (Select strftime('%d-%m-%Y', datetime(a.timestamp, 'unixepoch', 'localtime')) As Fecha, a.id_usuario, b.nombre As Nombre_Usuario, 'Salidas de dinero' As Concepto,\\n\" +\r\n \"\\n\" +\r\n \" a.importe_neto As Cantidad, 'NA' As Hora, 3 As Orden\\n\" +\r\n \"\\n\" +\r\n \" From Tickets a\\n\" +\r\n \"\\n\" +\r\n \" Left Join Usuarios b On a.id_usuario = b.id_usuario\\n\" +\r\n \"\\n\" +\r\n \" LIMIT 1) c\\n\" +\r\n \"\\n\" +\r\n \"Union \\n\" +\r\n \"\\n\" +\r\n \"Select * From\\n\" +\r\n \"\\n\" +\r\n \" (Select strftime('%d-%m-%Y', datetime(a.timestamp, 'unixepoch', 'localtime')) As Fecha, a.id_usuario, b.nombre As Nombre_Usuario, 'Ventas en efectivo' As Concepto,\\n\" +\r\n \"\\n\" +\r\n \" a.importe_neto As Cantidad, 'NA' As Hora, 4 As Orden\\n\" +\r\n \"\\n\" +\r\n \" From Tickets a\\n\" +\r\n \"\\n\" +\r\n \" Left Join Usuarios b On a.id_usuario = b.id_usuario\\n\" +\r\n \"\\n\" +\r\n \" LIMIT 1) d \\n\" +\r\n \"\\n\" +\r\n \"Union\\n\" +\r\n \"\\n\" +\r\n \"Select * From\\n\" +\r\n \"\\n\" +\r\n \" (Select strftime('%d-%m-%Y', datetime(a.fecha_cierre, 'unixepoch', 'localtime')) As Fecha,\\n\" +\r\n \"\\n\" +\r\n \" a.id_usuario, b.nombre As Nombre_Usuario, 'Total en caja al cierre' As Concepto, 10.0 As Cantidad, '06:00 PM' As Hora, 5 As Orden\\n\" +\r\n \"\\n\" +\r\n \" From Registro_cierre a\\n\" +\r\n \"\\n\" +\r\n \" Left Join Usuarios b On a.id_usuario = b.id_usuario\\n\" +\r\n \"\\n\" +\r\n \" LIMIT 1) e\\n\" +\r\n \"\\n\" +\r\n \"Order By Orden asc\";\r\n resourse = db.rawQuery(sql, null);\r\n\r\n break;\r\n// case 6:String sql = Log.w(\"Reporte\", \"Specific row report\");\r\n// final String sql = \"\"\r\n\r\n }\r\n\r\n List<Reporte> reportes = new ArrayList<>();\r\n Reporte reporte ;\r\n\r\n if(tipoReporte == 5) {\r\n while(resourse.moveToNext()){\r\n reporte = new Reporte();\r\n reporte.setFecha(resourse.getString(0));\r\n reporte.setIdUsuario(resourse.getInt(1));\r\n reporte.setNombreUsuario(resourse.getString(2));\r\n reporte.setConcepto(resourse.getString(3));\r\n reporte.setCantidad(resourse.getString(4));\r\n reporte.setHora(resourse.getString(5));\r\n reporte.setOrden(resourse.getInt(6));\r\n Log.w(\"REPORTE\", Utils.pojoToString(reporte));\r\n reportes.add(reporte);\r\n }\r\n\r\n } else {\r\n while(resourse.moveToNext()){\r\n reporte = new Reporte();\r\n\r\n reporte.setIdArticulo(resourse.getInt(0));\r\n reporte.setIdCentral(resourse.getInt(1));\r\n reporte.setPrecioBase(resourse.getDouble(2));\r\n if(tipoReporte != 3) {\r\n reporte.setPrecioCompra(resourse.getDouble(3));\r\n }else{\r\n reporte.setPrecioCompra(resourse.getDouble(15));\r\n }\r\n reporte.setCodigoBarras(resourse.getString(4));\r\n reporte.setNombreArticulo(resourse.getString(5));\r\n reporte.setNombreMarca(resourse.getString(6));\r\n reporte.setPresentacion(resourse.getString(7));\r\n reporte.setContenido(resourse.getInt(8));\r\n reporte.setUnidad(resourse.getString(9));\r\n reporte.setGranel(resourse.getInt(10) != 0);\r\n reporte.setVenta(resourse.getDouble(12));\r\n reporte.setVendidos(resourse.getDouble(13));\r\n reporte.setGanancia(resourse.getDouble(14));\r\n Log.w(\"REPORTE\", Utils.pojoToString(reporte));\r\n reportes.add(reporte);\r\n }\r\n\r\n }\r\n\r\n resourse.close();\r\n db.close();\r\n\r\n executionTime = System.currentTimeMillis() - startTime;\r\n\r\n if (reportes.size() <= 0){\r\n return null;\r\n }\r\n\r\n return reportes;\r\n }",
"Tipologia selectByPrimaryKey(BigDecimal id);",
"AoD5e466WorkingDay selectByPrimaryKey(Integer id);",
"public Collection<FlujoDetalleDTO> cargarTodos(int codigoFlujo) {\n/* 138 */ Collection<FlujoDetalleDTO> resultados = new ArrayList<FlujoDetalleDTO>();\n/* */ try {\n/* 140 */ String s = \"select t.codigo_flujo,t.secuencia,t.servicio_inicio,r1.descripcion as nombre_servicio_inicio,t.accion,t.codigo_estado,r3.descripcion as nombre_codigo_estado,t.servicio_destino,r4.descripcion as nombre_servicio_destino,t.nombre_procedimiento,t.correo_destino,t.enviar_solicitud,t.ind_mismo_proveedor,t.ind_mismo_cliente,t.estado,t.caracteristica,t.valor_caracteristica,t.caracteristica_correo,m5.descripcion as nombre_estado,c.DESCRIPCION nombre_caracteristica,cv.DESCRIPCION descripcion_valor,t.metodo_seleccion_proveedor,t.ind_correo_clientes,t.usuario_insercion,t.fecha_insercion,t.usuario_modificacion,t.fecha_modificacion from wkf_detalle t left join SERVICIOS r1 on (r1.CODIGO=t.servicio_inicio) left join ESTADOS r3 on (r3.codigo=t.codigo_estado) left join SERVICIOS r4 on (r4.CODIGO=t.servicio_destino) left join sis_multivalores m5 on (m5.tabla='ESTADO_REGISTRO' and m5.valor=t.estado) LEFT JOIN CARACTERISTICAS c ON (t.Caracteristica = c.CODIGO) LEFT JOIN CARACTERISTICAS_VALOR cv ON (t.CARACTERISTICA=cv.CARACTERISTICA AND t.VALOR_CARACTERISTICA = cv.VALOR) where t.codigo_flujo=\" + codigoFlujo + \" order by t.secuencia\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 178 */ boolean rtaDB = this.dat.parseSql(s);\n/* 179 */ if (!rtaDB) {\n/* 180 */ return resultados;\n/* */ }\n/* 182 */ this.rs = this.dat.getResultSet();\n/* 183 */ while (this.rs.next()) {\n/* 184 */ resultados.add(leerRegistro());\n/* */ }\n/* */ }\n/* 187 */ catch (Exception e) {\n/* 188 */ e.printStackTrace();\n/* 189 */ Utilidades.writeError(\"FlujoDetalleDAO:cargarTodos \", e);\n/* */ } \n/* 191 */ return resultados;\n/* */ }",
"public DatosCurriculumVO buscarDatosCurriculum(long idCandidato)throws SQLException {\n\t\tCONSULTA_PERFIL_CANDIDATO = \"DATOS_CURRICULUM\";\n\t\tObject[] parametros = { idCandidato };\n\t\tCachedRowSet cachedRowSet = executeQuery(parametros);\n\n\t\tDatosCurriculumVO datosVO = new DatosCurriculumVO();\n\t\ttry {\n\t\t\twhile (cachedRowSet.next()) {\n\t\t\t\tdatosVO.setTituloCV(cachedRowSet.getString(\"TITULO_CV\"));\n\t\t\t\tdatosVO.setObjetivoProfesional(cachedRowSet.getString(\"OBJETIVOS\"));\n\t\t\t\tdatosVO.setResumenProfesional(cachedRowSet.getString(\"RESUMEN_PROFESIONAL\"));\n\t\t\t\tdatosVO.setRedesSociales(new RedesSocialesVO());\n\t\t\t\tdatosVO.getRedesSociales().setFacebook(cachedRowSet.getString(\"FACEBOOK\"));\n\t\t\t\tdatosVO.getRedesSociales().setTwitter(cachedRowSet.getString(\"TWITTER\"));\n\t\t\t\tdatosVO.getRedesSociales().setLinkedin(cachedRowSet.getString(\"LINKEDIN\"));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(e);\n\t\t\tthrow new SQLException(e);\n\t\t}\n\t\treturn datosVO;\n\t}",
"@Override\n public Collection<resumenSemestre> resumenSemestre(int idCurso, int mesApertura, int mesCierre) throws Exception {\n Collection<resumenSemestre> retValue = new ArrayList();\n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"select ma.nombremateria, p.idcuestionario as test, \"\n + \"round(avg(p.puntaje),2) as promedio, cue.fechainicio, MONTH(cue.fechacierre) as mes \"\n + \"from puntuaciones p, cuestionario cue, curso cu, materia ma \"\n + \"where cu.idcurso = ma.idcurso and ma.idmateria = cue.idmateria \"\n + \"and cue.idcuestionario = p.idcuestionario and cu.idcurso = ? \"\n + \"and MONTH(cue.fechacierre) >= ? AND MONTH(cue.fechacierre) <= ? and YEAR(cue.fechacierre) = YEAR(NOW())\"\n + \"GROUP by ma.nombremateria, MONTH(cue.fechacierre) ORDER BY ma.nombremateria\");\n pstmt.setInt(1, idCurso );\n pstmt.setInt(2, mesApertura);\n pstmt.setInt(3, mesCierre);\n rs = pstmt.executeQuery();\n while (rs.next()) { \n retValue.add(new resumenSemestre(rs.getString(\"nombremateria\"), rs.getInt(\"test\"), rs.getInt(\"promedio\"), rs.getInt(\"mes\")));\n }\n return retValue;\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (rs != null) {\n rs.close();\n }\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return retValue;\n\n\n }",
"@Select({ \"select\", \"id_sistema, ds_sistema\", \"from public.tb_sistema\",\n\t\t\t\"where id_sistema = #{idSistema,jdbcType=INTEGER}\" })\n\t@Results({ @Result(column = \"id_sistema\", property = \"idSistema\", jdbcType = JdbcType.INTEGER, id = true),\n\t\t\t@Result(column = \"ds_sistema\", property = \"dsSistema\", jdbcType = JdbcType.VARCHAR) })\n\tSistema selectByPrimaryKey(Integer idSistema);",
"ParUsuarios selectByPrimaryKey(Integer id);",
"@GetMapping(\"/costo-servicios/general/{id}\")\n @Timed\n public List<CostoServicioDTO> getAllCostosGeneralById(@PathVariable Long id) {\n log.debug(\"REST request to get a page of Expedientes\");\n List<CostoServicioDTO> ls = costoServicioService.findByTramite_general_id(id);\n// HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(1, \"/api/expedientes/user\");\n // return new ResponseEntity<>(ls, HeaderUtil.createAlert(\"ok\", \"\"), HttpStatus.OK); \n return ls;\n }",
"public Producto BuscarProducto(int id) {\n Producto nuevo = new Producto();\n try {\n conectar();\n ResultSet result = state.executeQuery(\"select * from producto where idproducto=\"+id+\";\");\n while(result.next()) {\n \n nuevo.setIdProducto((int)result.getObject(1));\n nuevo.setNombreProducto((String)result.getObject(2));\n nuevo.setFabricante((String)result.getObject(3));\n nuevo.setCantidad((int)result.getObject(4));\n nuevo.setPrecio((int)result.getObject(5));\n nuevo.setDescripcion((String)result.getObject(6));\n nuevo.setSucursal((int)result.getObject(7));\n }\n con.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return nuevo;\n }"
] | [
"0.64369947",
"0.631722",
"0.6166344",
"0.61662704",
"0.6139583",
"0.6118616",
"0.60933125",
"0.60572106",
"0.6056366",
"0.603877",
"0.60337114",
"0.60049015",
"0.59866756",
"0.5986531",
"0.59339285",
"0.5929441",
"0.5893701",
"0.58911926",
"0.5880412",
"0.58768743",
"0.5864456",
"0.5861864",
"0.58614963",
"0.58561987",
"0.58233434",
"0.5815623",
"0.5808589",
"0.5803681",
"0.5759079",
"0.5756483",
"0.5742991",
"0.57360756",
"0.5715662",
"0.57137537",
"0.5709643",
"0.5706293",
"0.57032645",
"0.569082",
"0.56866884",
"0.56771433",
"0.5663905",
"0.5662171",
"0.5660757",
"0.56475186",
"0.56463975",
"0.56433266",
"0.56359965",
"0.5626557",
"0.56133604",
"0.5607639",
"0.560072",
"0.5600439",
"0.5598221",
"0.55948216",
"0.55911285",
"0.5588545",
"0.5582787",
"0.5580711",
"0.55803835",
"0.5577891",
"0.55749124",
"0.55716527",
"0.55630773",
"0.5552112",
"0.55462855",
"0.55459386",
"0.553808",
"0.55371183",
"0.5534215",
"0.55284846",
"0.5522364",
"0.55219275",
"0.55194736",
"0.55069906",
"0.55011415",
"0.55002403",
"0.54998946",
"0.5499718",
"0.5498307",
"0.5496074",
"0.54952216",
"0.5490342",
"0.54851884",
"0.5482822",
"0.5482811",
"0.5482276",
"0.54808956",
"0.547389",
"0.54704475",
"0.546916",
"0.5469054",
"0.5467816",
"0.54669946",
"0.5461797",
"0.54615843",
"0.54526377",
"0.54524785",
"0.5444354",
"0.54396445",
"0.5437843"
] | 0.6826575 | 0 |
INTERNAL: Obtain and return the JTA TransactionManager on this platform. This will be called once when the controller is initialized. | protected TransactionManager acquireTransactionManager() throws Exception {
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
try{
Class clazz = (Class) AccessController.doPrivileged(new PrivilegedClassForName(TX_MANAGER_FACTORY_CLASS));
Method method = (Method)AccessController.doPrivileged(new PrivilegedGetMethod(clazz, TX_MANAGER_FACTORY_METHOD, null, false));
return (TransactionManager) AccessController.doPrivileged(new PrivilegedMethodInvoker(method, null, null));
}catch (PrivilegedActionException ex){
if (ex.getCause() instanceof ClassNotFoundException){
throw (ClassNotFoundException)ex.getCause();
}
if (ex.getCause() instanceof NoSuchMethodException){
throw (NoSuchMethodException)ex.getCause();
}
if (ex.getCause() instanceof IllegalAccessException){
throw (IllegalAccessException)ex.getCause();
}
if (ex.getCause() instanceof InvocationTargetException){
throw (InvocationTargetException)ex.getCause();
}
throw (RuntimeException) ex.getCause();
}
}else{
Class clazz = PrivilegedAccessHelper.getClassForName(TX_MANAGER_FACTORY_CLASS);
Method method = PrivilegedAccessHelper.getMethod(clazz, TX_MANAGER_FACTORY_METHOD, null, false);
return (TransactionManager)PrivilegedAccessHelper.invokeMethod(method, null, null);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private TransactionManager obtainTransactionManager()\n {\n TransactionManager tm = ec.getNucleusContext().getJtaTransactionManager();\n if (tm == null)\n {\n throw new NucleusTransactionException(LOCALISER.msg(\"015030\"));\n }\n else\n {\n return tm;\n }\n }",
"protected TransactionManager getTransactionManager()\n {\n if (getTransactionIntegration() != null)\n return getTransactionIntegration().getTransactionManager();\n\n return null;\n }",
"public Object getTransactionManager()\n\t{\n\t\treturn transactionManager;\n\t}",
"public PlatformTransactionManager getTransactionManager() {\n return _transactionTemplate.getTransactionManager();\n }",
"TransactionManager getTransactionManager();",
"public JtxTransactionManager getJtxManager() {\n\t\treturn requireStarted(jtxManager);\n\t}",
"MIBTransactionManager getTransactionManager();",
"public Object getObject()\n\t{\n\t\treturn transactionManager;\n\t}",
"public TransactionManagerLookup transactionManagerLookup() {\n return transactionManagerLookup;\n }",
"@Override\n public SimpleTransaction getTransaction() throws SystemException {\n SimpleTransaction txn = txns.get();\n if (txn == null) {\n txn = new SimpleTransaction();\n txn.setStatus(Status.STATUS_ACTIVE);\n txns.set(txn);\n }\n return txn;\n }",
"@Bean\r\n public JpaTransactionManager transactionManager() {\r\n String message = messageSource.getMessage(\"begin\", null, \"locale not found\", Locale.getDefault())\r\n + \" \" + messageSource.getMessage(\"config.data.transaction\", null, \"locale not found\", Locale.getDefault());\r\n logger.info(message);\r\n JpaTransactionManager transactionManager = new JpaTransactionManager();\r\n transactionManager.setEntityManagerFactory(entityManagerFactory().getObject());\r\n message = messageSource.getMessage(\"end\", null, \"locale not found\", Locale.getDefault())\r\n + \" \" + messageSource.getMessage(\"config.data.transaction\", null, \"locale not found\", Locale.getDefault());\r\n logger.info(message);\r\n return transactionManager;\r\n }",
"@Override\r\n\tpublic Transaction getTransaction() throws SystemException {\r\n\t\tif (threadTransaction.get()==null)\r\n\t\t\tsetNewTransaction();\r\n\t\treturn threadTransaction.get();\r\n\t}",
"@Bean\r\n public PlatformTransactionManager transactionManager() {\r\n return new DataSourceTransactionManager(dynamicDataSource());\r\n }",
"public void setTransactionManager(TransactionManager tm)\n {\n _tm = tm;\n }",
"@Bean\n\tpublic JpaTransactionManager transactionManager() {\n\t\tJpaTransactionManager transactionManager = new JpaTransactionManager();\n\t\ttransactionManager.setEntityManagerFactory(entityManagerFactory().getObject());\n\t\treturn transactionManager;\n\t}",
"@Bean\n\tpublic PlatformTransactionManager transactionManager() {\n\t\tEntityManagerFactory factory = this.entityManagerFactory().getObject();\n\t\treturn new JpaTransactionManager(factory);\n\t}",
"public static Transaction getThreadLocalTransaction() {\n return threadlocal.get();\n }",
"public void setTransactionManager(Object transactionManager)\n\t{\n\t\tthis.transactionManager = transactionManager;\n\t}",
"@Bean\n public PlatformTransactionManager transactionManager() {\n JpaTransactionManager manager = new JpaTransactionManager();\n manager.setEntityManagerFactory(entityManagerFactory());\n\n return manager;\n }",
"public void setTransactionManager(\n\t\t\tPlatformTransactionManager transactionManager) {\n\t\tthis.transactionManager = transactionManager;\n\t}",
"public interface TransactionService {\n\n /**\n * @return TransactionManager\n */\n TransactionManager getTransactionManager();\n\n /**\n * @return UserTransaction\n */\n UserTransaction getUserTransaction();\n\n /**\n * @return default timeout in seconds\n */\n int getDefaultTimeout();\n\n /**\n * Sets timeout in seconds,\n * \n * @param seconds int\n * @throws SystemException\n */\n void setTransactionTimeout(int seconds) throws SystemException;\n\n /**\n * Enlists XA resource in transaction manager.\n * \n * @param xares XAResource\n * @throws RollbackException\n * @throws SystemException\n */\n void enlistResource(ExoResource xares) throws RollbackException, SystemException;\n\n /**\n * Delists XA resource from transaction manager.\n * \n * @param xares XAResource\n * @throws RollbackException\n * @throws SystemException\n */\n void delistResource(ExoResource xares) throws RollbackException, SystemException;\n\n /**\n * Creates unique XA transaction identifier.\n * \n * @return Xid\n */\n Xid createXid();\n\n}",
"@Bean\n public ResourcelessTransactionManager transactionManager() {\n return new ResourcelessTransactionManager();\n }",
"@Autowired\n\t@Bean(name=\"transactionManager\")\n\tpublic HibernateTransactionManager getTransactionManager(SessionFactory sessionFactory) {\n\t\tHibernateTransactionManager transactionManager = new HibernateTransactionManager(sessionFactory);\n\t\t\n\t\treturn transactionManager;\n\t}",
"public interface TransactionManager {\n\n\t/**\n\t * Start a new read only transaction.\n\t */\n\n\tStableView view();\n\n\t/**\n\t * Start a transaction for mutation.\n\t */\n\n\tMutableView begin();\n\n\t/**\n\t * Commit a previously prepared transaction for a two phase commit.\n\t *\n\t * @param tpcid\n\t * The client supplied two phase commit identifier.\n\t */\n\n\tvoid commit(String tpcid);\n\n}",
"@Bean\n public PlatformTransactionManager transactionManager() {\n DataSourceTransactionManager transactionManager = new DataSourceTransactionManager();\n transactionManager.setDataSource(dataSource());\n return transactionManager;\n }",
"@Override\n public GenericManager<TraitementCourrier, Long> getManager() {\n return manager;\n }",
"public final static EntityManager getEntityManager() {\r\n\t\treturn entityManager;\r\n\t}",
"public Connection getTransactionConnection(){\n try {\n return rawDataSource.getConnection();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public final T getManager() {\n return this.manager;\n }",
"public final void mT__189() throws RecognitionException {\r\n try {\r\n int _type = T__189;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // InternalSpringConfigDsl.g:190:8: ( 'transaction-manager=' )\r\n // InternalSpringConfigDsl.g:190:10: 'transaction-manager='\r\n {\r\n match(\"transaction-manager=\"); \r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n }\r\n }",
"public static EntityManager getEntityManager() {\n EntityManager em = tl.get();\n return em;\n }",
"@Primary\n @Bean\n public PlatformTransactionManager ildaTransactionManager() {\n final JpaTransactionManager txManager = new JpaTransactionManager();\n txManager.setEntityManagerFactory(ildaEntityManagerFactory().getObject());\n return txManager;\n }",
"protected JtxTransactionManager createJtxTransactionManager(final ConnectionProvider connectionProvider) {\n\t\treturn new DbJtxTransactionManager(connectionProvider);\n\t}",
"public DataSourceTransactionManager() {\r\n\t\tthis.transactionClass = DataSourceTransaction.class;\r\n\t}",
"public void setTransactionManager(Object txnMgr) {\r\n \r\n // RB: At this stage not exposing TransactionManager to \r\n // the public API and hence the Object type and casting here\r\n \r\n this.transactionManager = (TransactionManager) txnMgr;\r\n this.dataSource = transactionManager.getDataSource();\r\n this.serverName = transactionManager.getServerName();\r\n }",
"@Bean\n JpaTransactionManager jpaTransactionManagerProvider(EntityManagerFactory emf) {\n JpaTransactionManager transactionManager = new JpaTransactionManager(emf);\n return transactionManager;\n }",
"@Bean\n\tpublic PlatformTransactionManager transactionManager(DataSource dataSource) {\n\t\treturn new DataSourceTransactionManager(dataSource);\n\t}",
"@Primary\n @Bean\n JpaTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) {\n JpaTransactionManager transactionManager = new JpaTransactionManager();\n transactionManager.setEntityManagerFactory(entityManagerFactory);\n return transactionManager;\n }",
"String resolveTransactionManager(Transactional transactional);",
"public EntityManager getEntityManager() {\n\t\treturn entityManager;\n\t}",
"public EntityManager getEntityManager() {\n\t\treturn entityManager;\n\t}",
"public EntityManager getEntityManager() {\n\t\treturn entityManager;\n\t}",
"public EntityManager getEntityManager() {\n\t\treturn entityManager;\n\t}",
"protected TransactionSynchronizationRegistry getTransactionSynchronizationRegistry()\n {\n if (getTransactionIntegration() != null)\n return getTransactionIntegration().getTransactionSynchronizationRegistry();\n\n return null;\n }",
"static EntityManager getEntityManager(){\n return ENTITY_MANAGER_FACTORY.createEntityManager();\n }",
"public EntityManager getEntityManager() {\r\n return entityManager;\r\n }",
"@Bean\r\n\tpublic HibernateTransactionManager getTransactionManager(SessionFactory sessionFactory) {\r\n\t\treturn new HibernateTransactionManager(sessionFactory);\r\n\t}",
"public EntityManager getEntityManager() {\r\n\t\treturn entityManager;\r\n\t}",
"public EntityManager getEntityManager() {\r\n\t\treturn entityManager;\r\n\t}",
"public EntityManager getEntityManager() {\r\n\t\treturn entityManager;\r\n\t}",
"TransactionalRepositoryManager getTransactionalRepositoryManager() throws DaoException;",
"public MessageService(PlatformTransactionManager transactionManager) {\n this.transactionTemplate = new TransactionTemplate(transactionManager);\n }",
"public TransactionPool getTransactionPool() {\n // still can not figure out why there can be just one global TransactionPool\n return txPool;\n }",
"public static Transaction getRequiredThreadLocalTransaction() {\n Transaction tx = threadlocal.get();\n\n if (tx == null) {\n throw new NoTransactionFoundException(\"No transaction is found on the ThreadLocalTransaction\");\n }\n\n return tx;\n }",
"Manager getManager() {\n return Manager.getInstance();\n }",
"Manager getManager() {\n return Manager.getInstance();\n }",
"Manager getManager() {\n return Manager.getInstance();\n }",
"public final static Transaction getCurrentTransaction() {\n return (Transaction) transactionTable.get();\n }",
"Transaction getCurrentTransaction();",
"protected abstract Object getTransactionObject() throws TransactionInfrastructureException;",
"@Override\n public EntityManager getEntityManager() {\n return entityManager;\n }",
"@Bean\n @Autowired\n public JpaTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) {\n\n JpaTransactionManager txManager = new JpaTransactionManager();\n txManager.setEntityManagerFactory(entityManagerFactory);\n\n return txManager;\n }",
"protected EntityManager getEntityManager() {\n return emf.createEntityManager();\n }",
"public HibernateTransactionTemplate getHibernateTransactionTemplate() {\n return new HibernateTransactionTemplate();\n }",
"public Object getCurrentTransaction() {\r\n\r\n // Get the current Spring ConnectionHolder associated to the current spring managed transaction\r\n ConnectionHolder holder = (ConnectionHolder) TransactionSynchronizationManager.getResource(dataSource);\r\n\r\n if (holder == null || !holder.isSynchronizedWithTransaction()) {\r\n // no current Spring transaction\r\n SpiTransaction currentEbeanTransaction = DefaultTransactionThreadLocal.get(serverName);\r\n if (currentEbeanTransaction != null){\r\n // NOT expecting this so log WARNING\r\n String msg = \"SpringTransaction - no current spring txn BUT using current Ebean one \"+currentEbeanTransaction.getId();\r\n logger.log(Level.WARNING, msg);\r\n \r\n } else if (logger.isLoggable(Level.FINEST)) {\r\n logger.log(Level.FINEST, \"Spring Txn - no current transaction \");\r\n }\r\n return currentEbeanTransaction;\r\n }\r\n \r\n SpringTxnListener springTxnLister = getSpringTxnListener();\r\n \r\n if (springTxnLister != null){\r\n // we have already seen this transaction \r\n return springTxnLister.getTransaction();\r\n \r\n } else {\r\n // This is a new spring transaction that we have not seen before.\r\n // \"wrap\" it in a SpringJdbcTransaction for use with Ebean \r\n SpringJdbcTransaction newTrans = new SpringJdbcTransaction(holder, transactionManager);\r\n \r\n // Create and register a Spring TransactionSynchronization for this transaction\r\n springTxnLister = createSpringTxnListener(newTrans);\r\n TransactionSynchronizationManager.registerSynchronization(springTxnLister);\r\n \r\n // also put in Ebean ThreadLocal\r\n DefaultTransactionThreadLocal.set(serverName, newTrans);\r\n return newTrans;\r\n }\r\n }",
"protected Transaction getTransaction() {\n return sessionFactory.getCurrentSession().getTransaction();\n }",
"public Transaction getTransaction() throws RuntimeException{\n\t\tif(tr == null)\n\t\t\tthrow new RuntimeException(\"The transaction has not been started\");\n\t\treturn tr;\n\t}",
"private TaskTransaction tx() {\n if (this.taskTx == null) {\n /*\n * NOTE: don't synchronized(this) due to scheduler thread hold\n * this lock through scheduleTasks(), then query tasks and wait\n * for db-worker thread after call(), the tx may not be initialized\n * but can't catch this lock, then cause dead lock.\n * We just use this.eventListener as a monitor here\n */\n synchronized (this.eventListener) {\n if (this.taskTx == null) {\n BackendStore store = this.graph.loadSystemStore();\n TaskTransaction tx = new TaskTransaction(this.graph, store);\n assert this.taskTx == null; // may be reentrant?\n this.taskTx = tx;\n }\n }\n }\n assert this.taskTx != null;\n return this.taskTx;\n }",
"public SpringJdbcTransaction getTransaction() {\r\n return transaction;\r\n }",
"public VehicleManager getVehicleManager() {\n\t\tif (vehicleManager == null) {\n\t\t\tIVehicleDAO vehicleDAO = new VehicleDAOSqlite(dbHelper);\n\t\t\tvehicleManager = new VehicleManager(vehicleDAO);\n\t\t\tvehicleManager.setManagerHolder(this);\n\t\t}\n\t\treturn vehicleManager;\n\t}",
"public ExecutionManager getManager() {\n return manager;\n }",
"@Override\n\tprotected EntityManager getEntityManager() {\n\t\treturn entityManager;\n\t}",
"public GlobalTransaction getCurrentTransaction()\n {\n return getCurrentTransaction(true);\n }",
"public TManagerImp() {\n transactions = new ConcurrentHashMap<>();\n }",
"Transaction getTransaction() { \r\n return tx;\r\n }",
"@Bean\n public PlatformTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) {\n JpaTransactionManager transactionManager = new JpaTransactionManager();\n transactionManager.setEntityManagerFactory(entityManagerFactory);\n\n return transactionManager;\n }",
"private EntityManager getEM() {\n\t\tif (emf == null || !emf.isOpen())\n\t\t\temf = Persistence.createEntityManagerFactory(PUnit);\n\t\tEntityManager em = threadLocal.get();\n\t\tif (em == null || !em.isOpen()) {\n\t\t\tem = emf.createEntityManager();\n\t\t\tthreadLocal.set(em);\n\t\t}\n\t\treturn em;\n\t}",
"public Transaction startTransaction() {\n Transaction transaction = THREADED_TRANSACTION.get();\n if (transaction == null) {\n transaction = openOrRetrieveSessionForThread().beginTransaction();\n THREADED_TRANSACTION.set(transaction);\n }\n return transaction;\n }",
"public T getUserManager() {\n\t\treturn userManager;\n\t}",
"Transaction createTransaction();",
"public TranslatorManager getManager();",
"OBasicTransaction getMicroOrRegularTransaction();",
"public EntityManager getEntityManager() {\n return getFactory().createEntityManager();\n }",
"public javax.resource.spi.LocalTransaction getLocalTransaction()\n throws ResourceException {\n throw new NotSupportedException(resource.getString(\"NO_TRANSACTION\"));\n }",
"public MapJobRepositoryFactoryBean(PlatformTransactionManager transactionManager) {\n\t\tsetTransactionManager(transactionManager);\n\t}",
"interface TransactionSupport {\n\n\n /*\n * Static fields.\n */\n\n\n /**\n * Equal in value and meaning to {@link\n * jakarta.transaction.Status#STATUS_ACTIVE}.\n */\n int STATUS_ACTIVE = 0;\n\n /**\n * Equal in value and meaning to {@link\n * jakarta.transaction.Status#STATUS_MARKED_ROLLBACK}.\n */\n int STATUS_MARKED_ROLLBACK = 1;\n\n /**\n * Equal in value and meaning to {@link\n * jakarta.transaction.Status#STATUS_PREPARED}.\n */\n int STATUS_PREPARED = 2;\n\n /**\n * Equal in value and meaning to {@link\n * jakarta.transaction.Status#STATUS_COMMITTED}.\n */\n int STATUS_COMMITTED = 3;\n\n /**\n * Equal in value and meaning to {@link\n * jakarta.transaction.Status#STATUS_ROLLEDBACK}.\n */\n int STATUS_ROLLEDBACK = 4;\n\n /**\n * Equal in value and meaning to {@link\n * jakarta.transaction.Status#STATUS_UNKNOWN}.\n */\n int STATUS_UNKNOWN = 5;\n\n /**\n * Equal in value and meaning to {@link\n * jakarta.transaction.Status#STATUS_NO_TRANSACTION}.\n */\n int STATUS_NO_TRANSACTION = 6;\n\n /**\n * Equal in value and meaning to {@link\n * jakarta.transaction.Status#STATUS_PREPARING}.\n */\n int STATUS_PREPARING = 7;\n\n /**\n * Equal in value and meaning to {@link\n * jakarta.transaction.Status#STATUS_COMMITTING}.\n */\n int STATUS_COMMITTING = 8;\n\n /**\n * Equal in value and meaning to {@link\n * jakarta.transaction.Status#STATUS_ROLLING_BACK}.\n */\n int STATUS_ROLLING_BACK = 9;\n\n\n /*\n * Method signatures.\n */\n\n\n /**\n * Returns {@code true} if JTA facilities are available.\n *\n * @return {@code true} if JTA facilities are available; {@code\n * false} otherwise\n */\n boolean isEnabled();\n\n /**\n * Returns the {@linkplain Context#isActive() active} {@link\n * Context}, if any, that supports JTA facilities at the moment of\n * invocation, or {@code null}.\n *\n * <p>Implementations of this method may, and often do, return\n * {@code null}.</p>\n *\n * <p>The {@link Context} returned by implementations of this\n * method may become active or inactive at any moment.</p>\n *\n * @return the {@link Context}, if any, that supports JTA\n * facilities, or {@code null}\n *\n * @see Context#isActive()\n */\n Context getContext();\n\n /**\n * Returns a constant indicating the current transaction status.\n *\n * <p>Implementations of this method must return {@link\n * #STATUS_NO_TRANSACTION} ({@code 6}) if JTA is not supported.</p>\n *\n * @return a JTA {@link jakarta.transaction.Status} constant\n * indicating the current transaction status\n */\n int getStatus();\n\n}",
"public SpringAwareJdbcTransactionManager() {\r\n }",
"protected EntityManager getEntityManager() {\n return this.entityManager;\n }",
"protected abstract EntityManager getEntityManager();",
"public EntityManager getEntityManager() {\n return this.em;\n }",
"public long getTransactionTimeout()\n {\n return _transactionTimeout;\n }",
"@Override\r\n public GenericManager<TraitSalaire, Long> getManager() {\r\n return manager;\r\n }",
"public EntityManager getEntityManager() {\n\t\treturn this.entityManager;\n\t}",
"public Manager getManager() {\n return this.manager;\n }",
"private PersistenceManager getPersistenceManager() {\n if(pmf==null) {\n getFacetHolder().getServiceInjector().injectServicesInto(this);\n }\n return pmf.getPersistenceManagerFactory().getPersistenceManager();\n }",
"public Transaction currentTransaction() {\r\n\t\treturn threadTransaction.get();\r\n\t}",
"public HazelcastMQTransactionManager(HazelcastMQInstance hzMQInstance) {\n this();\n\n setHazelcastMQInstance(hzMQInstance);\n afterPropertiesSet();\n }",
"@Override\n\tprotected AmbWorkflowManagerBase<Entrust> getAmbWorkflowBaseManager() {\n\t\treturn entrustManager;\n\t}",
"protected EntityManager getEntityManager() {\n return em;\n }",
"public SettlementBean() {\r\n entitymanagerbean = new EntityManagerBean();\r\n }"
] | [
"0.7530958",
"0.7450226",
"0.73039025",
"0.72317743",
"0.6914171",
"0.68788517",
"0.6736421",
"0.6719863",
"0.6472154",
"0.6137429",
"0.61198187",
"0.6006335",
"0.59173685",
"0.5915105",
"0.58963746",
"0.58195543",
"0.57669175",
"0.57387614",
"0.5731604",
"0.5708728",
"0.568983",
"0.56889105",
"0.5688283",
"0.56878716",
"0.5675029",
"0.5620125",
"0.5605106",
"0.5593752",
"0.5585752",
"0.5577768",
"0.55696315",
"0.5519071",
"0.5510057",
"0.549772",
"0.5494294",
"0.54773647",
"0.5468871",
"0.5443631",
"0.5427491",
"0.542638",
"0.542638",
"0.542638",
"0.542638",
"0.5420473",
"0.5413804",
"0.54056585",
"0.53876126",
"0.538418",
"0.538418",
"0.538418",
"0.5376597",
"0.53757024",
"0.5369963",
"0.53345954",
"0.5316611",
"0.5316611",
"0.5316611",
"0.5300172",
"0.5291741",
"0.52776206",
"0.5230152",
"0.521724",
"0.5214311",
"0.5186731",
"0.5183739",
"0.51542217",
"0.51505435",
"0.51464313",
"0.51287913",
"0.5128304",
"0.5126541",
"0.5122059",
"0.51187813",
"0.5095541",
"0.5093418",
"0.50925326",
"0.50889224",
"0.50880176",
"0.50601214",
"0.5044786",
"0.50414664",
"0.50303656",
"0.50285035",
"0.5025949",
"0.5025842",
"0.5022283",
"0.5010157",
"0.5005361",
"0.49875978",
"0.49851933",
"0.4985117",
"0.49788287",
"0.4977736",
"0.49701276",
"0.4957849",
"0.49393222",
"0.4924041",
"0.49163997",
"0.49110922",
"0.49099267"
] | 0.6745351 | 6 |
/ xxxCommand() methods: they will be called from main() where xxx is arg[2] | private static void statusCommand() {
String lineFormat = "%-8s | %-15s | %s\n";
List<Job> neededJobs = fetchNeededJobs();
// table header
if (neededJobs.size() < 2) {
System.out.printf(lineFormat, "STATE", "START TIME", "JOB DIRECTORY");
for (int i = 0; i < 78; i++) {
System.out.print(((9 == i || 27 == i) ? "+" : "-"));
}
System.out.println();
}
// table rows
ObjectCounter<JobState> counter = new ObjectCounter<JobState>();
for (Job job : neededJobs) {
Date startDate = job.getStartDate();
JobState state = job.getState();
counter.add(state);
String startDateStr = (null == startDate) ? "N/A" : new SimpleDateFormat("yyyyMMdd HHmmss").format(startDate);
System.out.printf(lineFormat, state.toString(), startDateStr, job.getDir());
}
// table footer
System.out.println();
String sumFormat = "%6d %s\n";
System.out.printf(sumFormat, heritrix.getJobs().size(), "TOTAL JOBS");
for (JobState state : JobState.values()) {
if (counter.getMap().keySet().contains(state)) {
System.out.printf(sumFormat, counter.get(state), state.toString());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void exec(CommandSender sender, String[] args);",
"public abstract boolean commandExecution(CommandSender sender, String label, String[] args);",
"void main(CommandLine cmd);",
"@Override\n public void execute(String[] args) {\n\n }",
"public abstract void execute(CommandSender sender, String[] args);",
"public static void main(String[] args) {\r\n\t\tCommandLine top = new CommandLine(new Main());\r\n\t\tif (args.length == 0) {\r\n\t\t\ttop.usage(System.out);\r\n\t\t}\r\n\t\t\r\n\t\tList<CommandLine> parsedCommands;\r\n\t\ttry {\r\n\t\t parsedCommands = top.parse(args);\r\n\t\t} catch (ParameterException ex) { // incorrect user input for one of the subcommands\r\n\t\t LOG.severe(\"Error parsing command line: \" + ex.getMessage());\r\n\t\t ex.getCommandLine().usage(System.out); // get the offended subcommand from the exception\r\n\t\t return;\r\n\t\t}\r\n\t\t\r\n\t\tfor (CommandLine parsed : parsedCommands) {\r\n\t\t if (parsed.isUsageHelpRequested()) {\r\n\t\t parsed.usage(System.out);\r\n\t\t return;\r\n\t\t } else if (parsed.isVersionHelpRequested()) {\r\n\t\t parsed.printVersionHelp(System.out);\r\n\t\t return;\r\n\t\t }\r\n\t\t}\r\n\t\tObject last = parsedCommands.get(parsedCommands.size() - 1).getCommand();\r\n\t\tif (last instanceof Runnable) {\r\n\t\t ((Runnable) last).run();\r\n\t\t return;\r\n\t\t}\r\n\t}",
"interface OneArgCommand {\n void doCommand(String a);\n }",
"public static void commandHelper(String[] args) {\n String command = args[0];\n int numOperands = args.length - 1;\n if (numOperands == 0) {\n switch (command) {\n case \"log\":\n Gitlet.log();\n break;\n case \"global-log\":\n Gitlet.globalLog();\n break;\n case \"status\":\n Gitlet.status();\n break;\n default:\n System.out.print(\"Incorrect operands.\");\n System.exit(0);\n }\n } else if (numOperands == 1) {\n String operand = args[1];\n if (operand == null) {\n System.out.print(\"Incorrect operands.\");\n System.exit(0);\n }\n if (_oneArgCommands.keySet().contains(command)) {\n try {\n _oneArgCommands.get(command).doCommand(operand);\n } catch (GitletException e) {\n System.out.print(e.getMessage());\n }\n } else {\n System.out.print(\"Incorrect operands.\");\n System.exit(0);\n }\n } else if (numOperands == 2) {\n String operand = args[2];\n if (command.equals(\"checkout\") && args[1].equals(\"--\")) {\n try {\n Gitlet.checkoutFile(operand);\n } catch (GitletException e) {\n System.out.print(e.getMessage());\n }\n } else {\n System.out.print(\"Incorrect operands.\");\n System.exit(0);\n }\n } else if (numOperands == 3) {\n String commitID = args[1];\n String fileName = args[3];\n if (args[0].equals(\"checkout\") && args[2].equals(\"--\")) {\n try {\n Gitlet.checkoutFileFromCommit(commitID, fileName);\n } catch (GitletException e) {\n System.out.print(e.getMessage());\n }\n } else {\n System.out.print(\"Incorrect operands.\");\n System.exit(0);\n }\n }\n }",
"void legalCommand();",
"public static void main(String[] args){\n cmd = args;\r\n init(cmd);\r\n }",
"public static void main(String[] args) {\n\t\t\tmeth(args);\r\n\t\t\targument_test:meth(args);\r\n\t}",
"public abstract String run(String args);",
"public abstract CommandResponse onCommand(CommandSender sender, String label, String[] args);",
"Result command(@NotNull CommandSender sender, List<String> args);",
"private static void process(String... args) throws Exception {\n Deque<String> params = new LinkedList<>(Arrays.asList(args));\n String command = params.pop().toUpperCase(Locale.ROOT);\n valueOf(command).run(params);\n }",
"void excuteCommand(Command commandToExecute, String [] params);",
"public static void main(String arg[]) {\n\n }",
"public static void main(String[] args) {\n if(args==null||args.length == 0 || args[0] == null)\n {\n notRecognized();\n return;\n }\n else\n {\n if(args[0].equals(\"update\"))\n {\n update();\n return;\n }\n else if(args[0].equals(\"help\")) \n {\n help();\n return;\n }\n else if(args[0].equals(\"access\")&&args.length>=2)\n {\n access(args[1]);\n return;\n }\n else\n {\n notRecognized();\n }\n }\n }",
"public abstract void doCommand(String command);",
"protected abstract void go(CommandLine line) throws Exception;",
"private static Object command(String userCommandLine[]) {\n\t\tint size = userCommandLine.length;\n\n\t\tswitch(userCommandLine[0].trim().toUpperCase()) {\n\n\t\t/*\n\t\t * INFORMATION\n\t\t *\n\t\t * Add executecommand on each case\n\t\t * but if it dosn't yet implemented\n\t\t * comment the command allow to user\n\t\t * on the variable string[] commands\n\t\t *\n\t\t */\n\t\t\n\t\t/* ************************************\n\t\t * standard commands\n\t\t *************************************/\n\t\tcase \"QUIT\": return ExecuteCommand.exit();\n\t\tcase \"EXIT\": return ExecuteCommand.exit();\n\t\tcase \"HELP\": help( (size > 1) ? userCommandLine[1].trim() : \"\"); break;\n\t\tcase \"VAR\": ExecuteCommand.showVar(); break;\n\t\tcase \"DEL\" : ExecuteCommand.delVar(Arrays.copyOfRange(userCommandLine, 1, size)); break;\n\t\tcase \"RENAME\": ExecuteCommand.renameVar(Arrays.copyOfRange(userCommandLine, 1, size)); break;\n\t\tcase \"STARTSPARK\": ExecuteCommand.startSpark(); break;\n\t\tcase \"STOPSPARK\": ExecuteCommand.stopSpark(); break;\n\t\t\n\t\t/* ************************************\n\t\t * database\n\t\t *************************************/ \n\t\t\n\t\t/* open database(name: String, filesystem: FileSystem, conf: Config) */\n\t\tcase \"OPEN\" : ExecuteCommand.openDB(Arrays.copyOfRange(userCommandLine, 1, size)); break;\n\t\t/* close database */\n\t\tcase \"CLOSE\" : ExecuteCommand.closeDB(); break;\n\t\t/* restart database */\n\t\tcase \"RESTART\" : ExecuteCommand.restartDB(); break;\n\t\t/* show list of TimeSeries */\n\t\tcase \"SHOW\" : ExecuteCommand.showTS(); break;\n\t\t/* drop a timeSeries */\n\t\tcase \"DROP\" : ExecuteCommand.dropTS(Arrays.copyOfRange(userCommandLine, 1, size)); break;\n\t\t/* exist a timeSeries with name ... */\n\t\tcase \"EXIST\" : ExecuteCommand.existTS(Arrays.copyOfRange(userCommandLine, 1, size)); break;\n\t\t/* get a timeSeries */\n\t\tcase \"GET\" : ExecuteCommand.getTS(Arrays.copyOfRange(userCommandLine, 1, size)); break;\n\t\t/* create a timeSeries */\n\t\tcase \"CREATE\" : ExecuteCommand.createTS2DB(Arrays.copyOfRange(userCommandLine, 1, size)); break;\n\t\t\n\t\t\n\t\t/* ************************************\n\t\t * Time Series\n\t\t *************************************/\n\t\t\n\t\t/* create the timeSerie schema */\n\t\tcase \"CREATE_SCHEMA\" : ExecuteCommand.createSchema(Arrays.copyOfRange(userCommandLine, 1, size)); break;\n\t\t/* show the schema of the timeSerie */\n\t\tcase \"SHOW_SCHEMA\" : ExecuteCommand.showSchema(Arrays.copyOfRange(userCommandLine, 1, size)); break;\n\t\t/* get the schema of the timeSerie*/\n\t\tcase \"GET_SCHEMA\" : ExecuteCommand.getSchema(Arrays.copyOfRange(userCommandLine, 1, size)); break;\n\t\t/* insert data at a certain file */\n\t\tcase \"INSERT\" : ExecuteCommand.insertDataFromFile(Arrays.copyOfRange(userCommandLine, 1, size)); break;\n\t\t/* select timeSerie Range from timeStart to timeEnd */\n\t\tcase \"SELECT_RANGE\": break;\n\t\t/* select a column of a timeserie */\n\t\tcase \"SELECT\": ExecuteCommand.selectColumn(Arrays.copyOfRange(userCommandLine, 1, size)); break;\n\t\t/* find max value of timeSerie */\n\t\tcase \"MAX_VALUE\" : ExecuteCommand.maxValue(Arrays.copyOfRange(userCommandLine, 1, size)); break;\n\t\t/* find min value of timeSerie */\n\t\tcase \"MIN_VALUE\" : ExecuteCommand.minValue(Arrays.copyOfRange(userCommandLine, 1, size)); break;\n\t\t/* print first five values */\n\t\tcase \"PRINT\" : ExecuteCommand.printHead(Arrays.copyOfRange(userCommandLine, 1, size)); break;\n\t\t\t\t\n\t\t\n\t\t/* ************************************\n\t\t * Transformations\n\t\t *************************************/\n\t\t\n\t\t/* power transformation of timeSerie: square root */\n\t\tcase \"SQRT_TRANSFORM\" : break;\n\t\t/* power transformation of timeSerie: logarithm */\n\t\tcase \"LOG_TRANSFORM\" : break;\n\t\t/* average of timeSerie */\n\t\tcase \"MEAN\" : break;\n\t\t/* shifting timeSerie with coefficient */\n\t\tcase \"SHIFT\" : break;\n\t\t/* scaling timeSerie with coefficient */\n\t\tcase \"SCALE\" : break;\n\t\t/* standard deviation of timeSeries */\n\t\tcase \"STD_DEVIATION\" : break;\n\t\t/* normalize the TimeSerie */\n\t\tcase \"NORMALIZE\" : break;\n\t\t/* search the first time occurs */\n\t\tcase \"SEARCH\" : break;\n\t\t/* moving average */\n\t\tcase \"MOVING_AVERAGE\" : break;\n\t\t/* DFT of timeSerie */\n\t\tcase \"DFT\" : break;\n\t\t/* DTW of 2 timeSerie (similarity between two timeseries) */\n\t\tcase \"DTW\" : break;\n\t\t\n\t\t/* ************************************\n\t\t * Compression \n\t\t *************************************/\n\n\t\t/* compress a timeserie */\n\t\tcase \"COMPRESSION\" : ExecuteCommand.compression(Arrays.copyOfRange(userCommandLine, 1, size)); break;\n\t\t/* decompress a timeserie */\n\t\tcase \"DECOMPRESSION\" : break;\n\n\t\t/* ************************************\n\t\t * indexing \n\t\t *************************************/\n\t\t\n\t\t/* create index for many ts */\n\t\tcase \"CREATE_INDEX\" : ExecuteCommand.createIndex(Arrays.copyOfRange(userCommandLine, 1, size)); break;\n\t\t/* return neighbors of a ts from the create index */\n\t\tcase \"NEIGHBORS\" : break;\n\t\t/* ************************************\n\t\t * clustering \n\t\t *************************************/\n\t\t\n\t\t/* ************************************\n\t\t * Application \n\t\t *************************************/\n\t\tcase \"CREATE_DNA\" : break;\n\t\tcase \"DNA_SIMILARITY\" : ExecuteCommand.dnApplication(Arrays.copyOfRange(userCommandLine, 1, size)); break;\n\t\t\n\t\t\t\t\n\t\tdefault: System.out.println(\"oups it may have a code error\");\n\t\t}\n\n\t\treturn true;\n\t}",
"public interface CommandExecutor {\n /**\n * This method parse a commands from string and call it\n *\n * @param sender ource of the commands\n * @param connectionCommand commands\n * @return true if a valid commands, otherwise false\n */\n default boolean onCommand(CommandSender sender, ConnectionCommand connectionCommand) {\n String[] split = connectionCommand.getCommand().split(\" \");\n\n return onCommand(sender, split[0], Arrays.copyOfRange(split, 1, split.length), connectionCommand.getArgs());\n }\n\n /**\n * Executes the given commands, returning its success\n *\n * @param sender ource of the commands\n * @param command Command which was executed\n * @param args Passed commands arguments\n * @param objects Objects\n * @return true if a valid commands, otherwise false\n */\n boolean onCommand(CommandSender sender, String command, String[] args, Object... objects);\n\n}",
"public static void main(String... args) {\n if (args.length == 0) {\n System.out.println(\"Please enter a command.\");\n System.exit(0);\n }\n String command = args[0];\n if (!_commands.contains(command)) {\n System.out.println(\"No command with that name exists.\");\n System.exit(0);\n } else if (command.equals(\"init\")) {\n if (args.length != 1) {\n System.out.println(\"Incorrect operands.\");\n System.exit(0);\n } else {\n try {\n new Gitlet().init();\n } catch (GitletException e) {\n System.out.print(e.getMessage());\n }\n }\n } else {\n File gitlet = (new File(\".gitlet\"));\n if (!gitlet.exists()) {\n System.out.println(\"Not in an initialized gitlet directory.\");\n return;\n } else {\n commandHelper(args);\n }\n }\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"What task: \");\r\n\t\tint option = scan.nextInt();\r\n\t\tswitch (option) {\r\n\t\tcase 1:\r\n\t\t\tpositionalNumbers();\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tpassword();\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tmean();\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tbase();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"public void commandEntered(String cmd)\n {\n String cleaned = StringUtils.cleanWhiteSpace(cmd.trim());\n String args[] = cleaned.split(\" \");\n \tString c = args[0];\n \n Runnable cb = new Runnable() { public void run() { cbEmptyResponse(); } };\n \n \tif (c.equals(\"name\"))\n cb = new Runnable() { public void run() { cbName(); } };\n else if (c.equals(\"version\")) \n cb = new Runnable() { public void run() { cbVersion(); } };\n else if (c.equals(\"genmove\")) \n cb = new Runnable() { public void run() { cbGenMove(); } };\n else if (c.equals(\"all_legal_moves\")) \n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n else if (c.equals(\"get_absorb_group\"))\n cb = new Runnable() { public void run() { cbGetAbsorbGroup(); } };\n \n \telse if (c.equals(\"shortest_paths\")) \n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n \telse if (c.equals(\"shortest_vc_paths\")) \n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n \n else if (c.equals(\"compute_dead_cells\"))\n cb = new Runnable() { public void run() { cbComputeDeadCells(); } };\n else if (c.equals(\"vc-build\"))\n cb = new Runnable() { public void run() { cbComputeDeadCells(); } };\n else if (c.equals(\"vc-build-incremental\"))\n cb = new Runnable() { public void run() { cbComputeDeadCells(); } };\n \n \n else if (c.equals(\"solver-find-winning\"))\n cb = new Runnable() { public void run() { cbDisplayPointList(); } }; \n \n else if (c.equals(\"find_sealed\")) \n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n else if (c.equals(\"strengthen_vcs\")) \n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n \n \n else if (c.equals(\"book-depths\")) \n cb = new Runnable() { public void run() { cbDisplayPointText(); } };\n else if (c.equals(\"book-sizes\")) \n cb = new Runnable() { public void run() { cbDisplayPointText(); } };\n else if (c.equals(\"book-scores\"))\n cb = new Runnable() { public void run() { cbDisplayPointText(); } };\n \telse if (c.equals(\"book-priorities\"))\n cb = new Runnable() { public void run() { cbDisplayPointText(); } };\n \n else if (c.equals(\"db-get\")) \n cb = new Runnable() { public void run() { cbDBGet(); } };\n \n else if (c.equals(\"vc-connected-to\")) \n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n else if (c.equals(\"vc-between-cells\"))\n cb = new Runnable() { public void run() { cbBetweenCells(); } };\n else if (c.equals(\"vc-get-mustplay\"))\n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n else if (c.equals(\"vc-intersection\"))\n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n else if (c.equals(\"vc-union\"))\n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n \n else if (c.equals(\"eval_twod\")) \n cb = new Runnable() { public void run() { cbDisplayPointText(); } };\n else if (c.equals(\"eval_resist\")) \n cb = new Runnable() { public void run() { cbEvalResist(); } };\n else if (c.equals(\"eval_resist_delta\")) \n cb = new Runnable() { public void run() { cbEvalResistDelta(); } };\n \telse if (c.equals(\"eval_influence\"))\n cb = new Runnable() { public void run() { cbDisplayPointText(); } };\n \n else if (c.equals(\"mohex-show-rollout\")) \n cb = new Runnable() { public void run() { cbMohexShowRollout(); } };\n else if (c.equals(\"quit\")) \n cb = new Runnable() { public void run() { cbEmptyResponse(); } };\n \n sendCommand(cmd, cb);\n }",
"private Main(String... arguments) {\n this.operations = new ArrayDeque<>(List.of(arguments));\n }",
"public interface Command {\n int run(String[] args) throws IllegalArgumentException;\n}",
"public static void main(String[] args) {\n switch (args[0]) {\r\n case \"-createUser\" -> createUser(args);\r\n case \"-showAllUsers\" -> showAllUsers();\r\n case \"-addTask\" -> addTask(args);\r\n case \"-showTasks\" -> showTasks();\r\n default -> {\r\n try {\r\n throw new IncorrectCommandFormatException();\r\n } catch (IncorrectCommandFormatException exception) {\r\n exception.printStackTrace();\r\n }\r\n }\r\n }\r\n }",
"public void handleCommand(String command, String args[], Player player){\n\t}",
"@NotNull\n CommandResult onConsoleCommand(@NotNull ConsoleCommandSender console,\n @NotNull String[] params);",
"void exec(ICommandConsole console, List<String> options);",
"public static void main(String[] args) {\n /*if (args.length < 1)\n error(\"No output method given\");\n else if (args.length > 1)\n error(\"Expected 1 argument, received \" + args.length);\n else if (args[0].toLowerCase().equals(\"cli\"))*/\n new CLI().main();\n /*else if (args[0].toLowerCase().equals(\"gui\"))\n new GUI().main();*/\n /*else\n error(args[0] + \" is not a valid argument\");*/\n }",
"@Override\n\tpublic void implementionEight(String[] args) throws Exception {\n\n\t}",
"@Override\n\tpublic void run(String... args) {\n\t}",
"public void noSuchCommand() {\n }",
"boolean commandUse(CommandSender sender, String[] args);",
"private static String viewCommand(String[] commandLineArguments) {\n \t\t// TODO Auto-generated method stub\n \t\treturn null;\n \t}",
"public boolean execute(String[] args);",
"public static void main(String[] args) {\n\t\tdoOperation(\"Ramya\", \"Add\");\r\n\t\tdoOperation(\"Ramya\", \"Replace\");\r\n\t\tdoOperation(\"Ramya\", \"Remove\");\r\n\t\tdoOperation(\"ramya\", \"Change\");\r\n\r\n\t}",
"public static void main(String[] args) {\n ICommand[] commandRegister = {\n new LeagueCmd(),\n new TeamCmd(),\n new MatchCmd(),\n new LoadCmd(),\n new SaveCmd()\n };\n if (Utils.initSaveFileLocation()) {\n final CommandHandler cmdHandler = new CommandHandler(commandRegister);\n Scanner scanner = new Scanner(System.in);\n boolean isExited = false;\n String userInput;\n String[] exitCmd = {\"exit\", \"quit\", \"close\"};\n\n System.out.println(\"# CompetitionManager.\\nAfin d'afficher la liste des commandes, entrez \\\"help\\\".\");\n Utils.displayBasePath();\n\n while (!isExited) {\n // Boucle de lecture des commandes\n System.out.printf(\"%s> \", renderSelected());\n userInput = scanner.nextLine();\n if (Arrays.asList(exitCmd).contains(userInput)) isExited = true;\n else cmdHandler.handleMessage(userInput);\n }\n } else {\n System.out.println(\"Une erreur est survenue lors de l'initialisation de l'application.\");\n }\n }",
"private void commandProgramBasic(String command)\n {\n String[] array = command.split(\" \");\n\n if(array[0].equals(\"init\"))\n {\n System.out.println(\"The program will now read the file.\");\n input.readFile();\n } else if(array[0].equals(\"run\"))\n {\n int runTime = Integer.parseInt(array[1]);\n System.out.println(\"Please wait while the data is stored.\");\n System.out.println(\"The filled data containers will be printed shortly.\");\n input.runProgram(runTime);\n } else if(array[0].equals(\"clear\"))\n {\n System.out.println(\"The data containers will now be cleared.\");\n input.clear();\n } else if(array[0].equals(\"exit\"))\n {\n scanner.close();\n } \n\n askUser();\n }",
"java.lang.String getArg();",
"public static void main(String[] args) {\n\t\tReceiver re = new Receiver();\r\n\t\tCommand cmd = new MyCommend(re);\r\n\t\tInvoker inv = new Invoker(cmd);\r\n\t\tinv.action();\r\n\t}",
"public void handleCommand(String command);",
"public void processCommand(Object\tsource,\n\t\t\t\t\t\t\t String\tcommandOriginal,\n\t\t\t\t\t\t\t String\tp1,\n\t\t\t\t\t\t\t String\tp2,\n\t\t\t\t\t\t\t String\tp3,\n\t\t\t\t\t\t\t String\tp4,\n\t\t\t\t\t\t\t String\tp5,\n\t\t\t\t\t\t\t String\tp6,\n\t\t\t\t\t\t\t String\tp7,\n\t\t\t\t\t\t\t String\tp8,\n\t\t\t\t\t\t\t String\tp9,\n\t\t\t\t\t\t\t String\tp10)\n\t{\n\t\tXml xml;\n\t\tString command = commandOriginal.trim().toLowerCase();\n\t\tif (command.isEmpty())\n\t\t\treturn;\t// Nothing to do\n\n//////////\n// Quit\n\t\tif (command.equals(\"quit\")) {\n\t\t\t// Exiting the system\n\t\t\tSystem.exit(0);\n\n\n//////////\n// Back\n\t\t} else if (command.equals(\"back\")) {\n\t\t\t// Navigating back through chain\n\t\t\tm_opbm.navigateBack();\n\t\t\t// Note: For rawedits and edits, use the rawedit_* and edit_* commands below\n\n\n//////////\n// Home\n\t\t} else if (command.equals(\"home\")) {\n\t\t\t// Navigating back through chain\n\t\t\tm_opbm.navigateHome();\n\n\n//////////\n// LeftPanel\n\t\t} else if (command.equals(\"leftpanel\")) {\n\t\t\t// Navigating to a leftpanel\n\t\t\tm_opbm.navigateToLeftPanel(m_opbm.expandMacros(p1));\n\n\n//////////\n// Raw Edit related\n\t\t} else if (command.equals(\"rawedit\")) {\n\t\t\t// Raw editing (full-page edit box) of whatever file is specified\n\t\t\tm_opbm.rawedit(m_opbm.expandMacros(p1));\n\n\t\t} else if (command.equals(\"rawedit_save\")) {\n\t\t\t// Saving the current contents of the active rawedit\n\t\t\tm_opbm.rawEditSave();\n\n\t\t} else if (command.equals(\"rawedit_save_and_close\")) {\n\t\t\t// Saving the current contents of the active rawedit, and returning to the previous panel\n\t\t\tm_opbm.rawEditSaveAndClose();\n\t\t\tm_opbm.navigateBack();\n\n\t\t} else if (command.equals(\"rawedit_close\") || command.equals(\"rawedit_back\")) {\n\t\t\t// Saving the current contents of the active rawedit, and returning to the previous panel\n\t\t\tm_opbm.rawEditClose();\n\t\t\tm_opbm.navigateBack();\n\n\t\t} else if (command.equals(\"rawedit_home\")) {\n\t\t\t// Navigating back through chain\n\t\t\tm_opbm.rawEditClose();\n\t\t\tm_opbm.navigateHome();\n\n\n//////////\n// Edit related\n\t\t} else if (command.equals(\"edit\")) {\n\t\t\t// Raw editing (full-page edit box) of whatever file is specified\n\t\t\tm_opbm.edit(m_opbm.expandMacros(p1));\n\n\t\t} else if (command.equals(\"edit_save\")) {\n\t\t\t// Saving the current contents of the active rawedit\n\t\t\tm_opbm.editSave();\n\n\t\t} else if (command.equals(\"edit_save_and_close\")) {\n\t\t\t// Saving the current contents of the active rawedit, and returning to the previous panel\n\t\t\tm_opbm.editSave();\n\t\t\tm_opbm.editClose();\n\t\t\tm_opbm.navigateBack();\n\n\t\t} else if (command.equals(\"edit_close\") || command.equals(\"edit_back\")) {\n\t\t\t// Saving the current contents of the active rawedit, and returning to the previous panel\n\t\t\tm_opbm.editClose();\n\t\t\tm_opbm.navigateBack();\n\n\t\t} else if (command.equals(\"edit_home\")) {\n\t\t\t// Navigating back through chain\n\t\t\tm_opbm.editClose();\n\t\t\tm_opbm.navigateHome();\n\n\n//////////\n// LISTBOX BUTTONS\n\t\t} else if (command.equals(\"listbox_add\")) {\n\t\t\t// User clicked on the \"add\" listbox button on the flow control input\n\t\t\tm_opbm.listBoxAddCommand();\n\n\t\t} else if (command.equals(\"listbox_delete\")) {\n\t\t\t// User clicked on the \"delete\" listbox button on the flow control input\n\t\t\tm_opbm.listBoxDeleteCommand();\n\n\t\t} else if (command.equals(\"listbox_clone\")) {\n\t\t\t// User clicked on the \"clone\" listbox button on the flow control input\n\t\t\tm_opbm.listBoxCloneCommand();\n\n\t\t} else if (command.equals(\"listbox_move_up\")) {\n\t\t\t// User clicked on the \"Up\" listbox button\n\t\t\tm_opbm.listBoxCommand(\"up\", (PanelRightListbox)source);\n\n\t\t} else if (command.equals(\"listbox_move_down\")) {\n\t\t\t// User clicked on the \"Down\" listbox button\n\t\t\tm_opbm.listBoxCommand(\"down\", (PanelRightListbox)source);\n\n\n//////////\n// LOOKUPBOX BUTTONS\n\t\t} else if (command.equals(\"lookupbox_add\")) {\n\t\t\t// User clicked on the \"add\" listbox button on the flow control input\n\t\t\t// p1 = whereTo\n\t\t\t// p2 = after\n\t\t\t// p3 = whereFrom\n\t\t\t// p4 = allow customs?\n\t\t\tm_opbm.lookupboxAddCommand((PanelRightLookupbox)source, p1, p2, p3, Utils.interpretBooleanAsYesNo(p4, true).equalsIgnoreCase(\"yes\"));\n\n\t\t} else if (command.equals(\"lookupbox_subtract\")) {\n\t\t\t// User clicked on the \"subtract\" listbox button\n\t\t\tm_opbm.lookupboxCommand(\"subtract\", (PanelRightLookupbox)source);\n\n\t\t} else if (command.equals(\"lookupbox_move_up\")) {\n\t\t\t// User clicked on the \"Up\" listbox button\n\t\t\tm_opbm.lookupboxCommand(\"up\", (PanelRightLookupbox)source);\n\n\t\t} else if (command.equals(\"lookupbox_move_down\")) {\n\t\t\t// User clicked on the \"Down\" listbox button\n\t\t\tm_opbm.lookupboxCommand(\"down\", (PanelRightLookupbox)source);\n\n\t\t} else if (command.equals(\"lookupbox_zoom\")) {\n\t\t\t// User clicked on the \"zoom\" listbox button\n\t\t\t// p1 = name of edit to use for display\n\t\t\t// p2 = reference in \"zoom\" field in edit to only show those fields which contain that portion\n\t\t\t// p3 = override for data source (if present)\n\t\t\tp3 = \"\";\n\t\t\tif (p1.equalsIgnoreCase(\"relativeto\"))\n\t\t\t{\n\t\t\t\t// The name isn't a hard-coded name, because it is one of a list.\n\t\t\t\t// We have to find out which name belongs here based on whatever\n\t\t\t\t// one of the list is currently selected.\n\t\t\t\txml = m_opbm.getListboxOrLookupboxSelectedItem((PanelRightLookupbox)source);\n\t\t\t\tif (xml == null)\n\t\t\t\t{ // Cannot execut the command because nothing is selected, or there is no data\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tp1 = m_macroMaster.parseMacros(((PanelRightLookupbox)source).getEditForXml(xml.getName()));\n\t\t\t\tif (p1.contains(\":\"))\n\t\t\t\t{\n\t\t\t\t\t// We have to separate out the edit from the location where the data source is specified\n\t\t\t\t\tp3 = p1.substring(p1.indexOf(\":\") + 1);\n\t\t\t\t\tp1 = p1.substring(0, p1.indexOf(\":\"));\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tp1 = m_macroMaster.parseMacros(p1);\n\n\t\t\t}\n\n\t\t\tif (!p1.isEmpty()) {\n\t\t\t\tm_opbm.lookupboxZoomCommand((PanelRightLookupbox)source, p1, p2, p3);\n\n\t\t\t} else {\n\t\t\t\t// An error, we need an edit to display content\n\t\t\t\tif (p2.isEmpty())\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"No p1 or edits parameter was found for lookupbox_zoom \\\"\" + ((PanelRightLookupbox)source).getName() + \"\\\"\");\n\t\t\t\telse\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"No p1 or edits was found for lookupbox_zoom(\" + p2 +\") \\\"\" + ((PanelRightLookupbox)source).getName() + \"\\\"\");\n\t\t\t}\n\n\t\t} else if (command.equals(\"save_custom\")) {\n\t\t\t// User clicked on the \"zoom\" listbox button on the flow control input\n\t\t\t// p1 = uuid of tupel containing everything to update\n\t\t\tm_opbm.saveCustomCommand(p1);\n\n\t\t} else if (command.equals(\"cancel_custom\")) {\n\t\t\t// User clicked on the \"zoom\" listbox button on the flow control input\n\t\t\t// p1 = uuid of tupel containing everything to update\n\t\t\tm_opbm.cancelCustomCommand(p1);\n\n\n//////////\n// LOOKUPBOX UPDATE\n\t\t} else if (command.equals(\"lookupbox_update\")) {\n\t\t\t// User clicked on a listbox that's related to a lookupbox that needs\n\t\t\t// to have its information updated after the change in entry\n\t\t\tm_opbm.lookupboxUpdateCommand(p1);\n\n\n//////////\n// WEB_BROWSER\n\t\t} else if (command.equals(\"web_browser\")) {\n\t\t\t// Wants to link to the specified web browser address\n\t\t\tm_opbm.webBrowser(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);\n\n//////////\n// BENCHMARKS\n\t\t} else if (command.equals(\"run_atom_benchmark\")) {\n\t\t\tm_opbm.benchmarkRunAtom(null, 1, true, (PanelRightItem)source, m_opbm, m_macroMaster, m_settingsMaster, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);\n\n//////////\n// RESULTS VIEWER\n\t\t} else if (command.equals(\"run_results_viewer_sample\")) {\n\t\t\tm_opbm.createAndShowResultsViewer(\"results_sample.xml\");\n\t\t} else if (command.equals(\"run_results_viewer\")) {\n\t\t\tm_opbm.createAndShowResultsViewer(\"output.xml\");\n\n\n//////////\n// CLOSING BRACE\n\t\t}\n\n\n\t}",
"public static void main(String[] args) {\r\n\t\tTaskResultAnalysis analysis = extractArguments(args);\r\n\t\tif (analysis == null)\r\n\t\t\tdie(USAGE);\r\n\t\t// determine tool mode, invoke proper action\r\n\t\tif (analysis.directory != null)\r\n\t\t\tsearch(analysis);\r\n\t\telse analyze(analysis);\r\n\t}",
"@NotNull\n CommandResult onCommand(@NotNull Player player, @NotNull String[] params);",
"public void initDefaultCommand() \n {\n }",
"@Override\n public boolean onCommand(final CommandSender sender, final Command cmd, final String label, final String[] args) {\n\n // If the sender is a PLAYER\n if (sender instanceof Player) {\n final Player p = (Player) sender;\n\n // If there are arguments and not the main command alone\n if (args.length > 0) {\n boolean cont = false;\n CmdProperties cmdClass = null;\n\n // Assign all commands to their name in the hashmap\n for (final Map.Entry<String, CmdProperties> entry : commandClasses.entrySet()) {\n if (!cont) {\n if (entry.getKey().equalsIgnoreCase(args[0])) {\n cont = true;\n cmdClass = entry.getValue();\n }\n }\n }\n\n // check for permission i think? idk whats entirely going on here, review later\n if (cont) {\n final int argsNeeded = cmdClass.getLength();\n if (args.length - 1 >= argsNeeded) {\n if (p.hasPermission(cmdClass.getPermission())) {\n if (args[argsNeeded] == null) {\n args[argsNeeded] = \"Nothing\";\n }\n final StringBuilder sb = new StringBuilder();\n for (int i = argsNeeded; i < args.length; i++) {\n sb.append(args[i]).append(\" \");\n }\n\n final String allArgs = sb.toString().trim();\n if (cmdClass.isAlias())\n cmdClass.getAlias().perform(p, allArgs, args);\n else\n cmdClass.perform(p, allArgs, args);\n return true;\n } else {\n // D: no permission!\n MsgUtils.error (sender, \"(no permission)\");\n return true;\n }\n } else {\n // Not the right amount of arguments for the command. Maybe put something like cmdClass.getUsage() here to show the player how to use the command\n MsgUtils.error (sender, cmdClass.getUsage());\n return true;\n }\n } else {\n // The argument doesn't exist.\n MsgUtils.error (sender, \"/ca \" + MsgUtils.Colors.VARIABLE + args[0] + MsgUtils.Colors.ERROR + \" is not a command\");\n return true;\n }\n } else {\n // Not enough arguments (show help here)\n MsgUtils.raw(p, \"&e-=-=-=- &7Availible &bClanArena &7Commands: &e-=-=-=-\");\n for (final Map.Entry<String, CmdProperties> entry : commandClasses.entrySet()) {\n if (p.hasPermission(entry.getValue().getPermission())) {\n MsgUtils.sendMessage(p, \"/ca \" + MsgUtils.Colors.VARIABLE + entry.getKey() + MsgUtils.Colors.INFO + \": \" + entry.getValue().getHelpMessage());\n }\n }\n return true;\n }\n } else {\n // Sender isn't a player\n MsgUtils.error (sender, \"Sorry! No console commands are available yet :(\");\n return true;\n }\n }",
"protected abstract String executeCommandAndModifyOutput(List<String> args, String originalInput);",
"public static void main(String[] args) {\n Receiver receiver = new Receiver();\n\n // Calling the concrete commands\n UndoCommand undoCommand = new UndoCommand(receiver);\n RedoCommand redoCommand = new RedoCommand(receiver);\n\n // Initiates the invoker class\n Invoker invoker = new Invoker();\n\n invoker.undoComamnd(undoCommand); // undo\n invoker.undoComamnd(undoCommand); // undo\n invoker.undoComamnd(undoCommand); // undo\n invoker.undoComamnd(undoCommand); // undo\n invoker.undoComamnd(undoCommand); // undo\n\n invoker.redoComamnd(redoCommand); // Redo\n invoker.redoComamnd(redoCommand); // Redo\n\n invoker.undoComamnd(undoCommand); // undo\n invoker.undoComamnd(undoCommand); // undo\n\n invoker.redoComamnd(redoCommand); // Redo\n invoker.redoComamnd(redoCommand); // Redo\n invoker.redoComamnd(redoCommand); // Redo\n\n //invoker.addCommand(undoCommand); // undo -> can still undo even if the is nothing to undo :(\n //invoker.addCommand(undoCommand); // undo\n //invoker.addCommand(undoCommand); // undo\n\n invoker.executeUndoCommand(); // Execute undo actions\n invoker.executeRedoCommand(); // Execute redo actions\n }",
"public interface Command\n{\n void doCommand(List<String> args) throws Exception;\n}",
"public static void main(String[] args) {\n\t\t\tCC c=new CC();\r\n\t\t\tc.callme();\r\n\t\t\tc.callmetoo();\r\n\t\t\t\r\n\t\t\t\r\n}",
"public Main(String[] commandLineArgs) {\n\t\tint claLength = commandLineArgs.length;\n\t\tif (claLength == 0) {\n\t\t\thelp();\n\t\t} else {\n\t\t\tcommand = commandLineArgs[0];\n\t\t\tif (claLength >= 2) {\n\t\t\t\targuments = Arrays.asList(commandLineArgs).subList(1, commandLineArgs.length - 1);\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) {\n \targuments = args;\n launch(args);\n }",
"@Override\n public Command parseCommand(String commandText, ViewController viewController, Cli cli) throws InvalidCommandException {\n\n String prefix = \"\";\n String suffix = \"\";\n\n for (int i = 0;i<commandText.length();i++){\n if (commandText.charAt(i) != ' '){\n prefix = prefix + commandText.charAt(i);\n } else {\n for (i++;i<commandText.length();i++)\n suffix = suffix + commandText.charAt(i);\n }\n }\n\n\n if (prefix.equals(\"\"))\n throw new InvalidCommandException();\n\n switch(prefix){\n case \"exit\" : {\n return new ExitCommand();\n }\n case \"help\" : {\n return new HelpCommand();\n }\n case \"showGameboard\" : {\n return new ShowGameBoardCommand(cli);\n }\n case \"showMarket\" : {\n return new ShowMarketCommand(cli);\n }\n case \"showPlayer\" : {\n\n int n = 0;\n int temp;\n boolean found = false;\n\n for (int i = 0; i < suffix.length() && !found; i++) {\n if ( suffix.charAt(i) != ' '){\n temp = suffix.charAt(i) -'0';\n if (temp < 0 || temp > 9)\n throw new InvalidCommandException();\n n = temp;\n found = true;\n }\n\n }\n if (n < 1 || n > 4)\n throw new InvalidCommandException();\n return new ShowPlayerCommand(n, viewController);\n\n }\n case \"showProductionDecks\" : {\n return new ShowProductionDeckCommand(cli);\n }\n case \"showReserve\" : {\n return new ShowReserveCommand(cli);\n }\n default: {\n throw new InvalidCommandException();\n }\n }\n\n }",
"public static void main(String Args[]) {\r\n\t\r\n\t}",
"boolean onCommand(CommandSender sender, String command, String[] args, Object... objects);",
"int getCommand();",
"@Override\n\tpublic int execute(String args) {\n\t\treturn 0;\n\t}",
"void setup(CommandLine cmd);",
"public static void main(String[] args) {\n\r\n // action\r\n // - nothing\r\n\r\n // check\r\n // - nothing\r\n }",
"public static void main(String[] args) {\n System.out.println(testLibraryParseCardBarCode());\n System.out.println(testLibraryParseRunLibrarianCheckoutBookCommand());\n System.out.println(testLibraryParseRunSubscriberReturnBookCommand());\n System.out.println(testparseBookId());\n System.out.println(testparseRunSubscriberCheckoutBookCommand());\n }",
"public static void main(String[] args) {\n\t\tMethodCall mc = new MethodCall();\n\t\tmc.hey(2);\n\t}",
"public abstract void onInvoked(CommandSender sender, String[] args);",
"String getCommand();",
"public static void main(String... args) {\n\n if (args.length == 0){\n System.out.println(\"Please enter a command\");\n return;\n }\n\n // load commit-tree if .gitlet initialized\n Main program = new Main();\n program.setTree_(program.loadTree());\n\n if (program.getTree_() == null && !args[0].equals(\"init\")){\n System.out.println(\"Not in an initialized gitlet directory.\");\n return;\n }\n\n String command = args[0];\n switch (command){\n\n case \"init\":\n\n checkNumArgs(1, args);\n boolean created = program.createGitletDirectory();\n if (created){\n program.setTree_(CommitTree.initCommitTree());\n }\n break;\n\n case \"add\":\n\n checkNumArgs(2, args);\n program.getTree_().add(args[1]);\n break;\n\n case \"commit\":\n\n checkNumArgs(2, args);\n program.getTree_().commit(args[1]);\n break;\n\n case \"rm\":\n\n checkNumArgs(2, args);\n program.getTree_().removeFile(args[1]);\n break;\n\n case \"log\":\n\n checkNumArgs(1, args);\n program.getTree_().log();\n break;\n\n case \"global-log\":\n\n checkNumArgs(1, args);\n program.getTree_().globalLog();\n break;\n\n case \"find\":\n\n checkNumArgs(2, args);\n program.getTree_().find(args[1]);\n break;\n\n case \"status\":\n\n checkNumArgs(1, args);\n program.getTree_().status();\n break;\n\n case \"checkout\":\n\n // check arguments and invoke specific checkout command\n program.checkoutArgs(args);\n break;\n\n case \"branch\":\n\n checkNumArgs(2, args);\n program.getTree_().branch(args[1]);\n break;\n\n case \"rm-branch\":\n\n checkNumArgs(2, args);\n program.getTree_().removeBranch(args[1]);\n break;\n\n case \"reset\":\n\n checkNumArgs(2, args);\n program.getTree_().reset(args[1]);\n break;\n\n case \"merge\":\n\n checkNumArgs(2, args);\n program.getTree_().merge(args[1]);\n break;\n\n default:\n\n System.out.println(\"No command with that name exists.\");\n break;\n }\n\n // save commit-tree to disk\n program.SaveTree();\n }",
"public abstract String getCommand();",
"@Override\r\n public String doCommand(String... parametry) {\n if (parametry.length > 0) {\r\n return \"Show what? I don't understand, why there's another word after this command.\";\r\n }\r\n else {\r\n return this.plan.getCurrentRoom().listingOfExits();\r\n }\r\n }",
"public static void main(String[] args) {\nSystem.out.println(\"you passed...\"+args.length);\r\nfor(int i=0;i<args.length;i++)\r\n{\r\n\tSystem.out.println(\"data is\"+args[i]);\r\n}\r\n\t}",
"Object[] args();",
"public void mainCommands() {\n\t\tint inputId = taskController.getInt(\"Please input the number of your option: \", \"You must input an integer!\");\n\t\tswitch (inputId) {\n\t\tcase 1:\n\t\t\tthis.taskController.showTaskByTime();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tthis.taskController.filterAProject();\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tthis.taskController.addTask();\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tthis.taskController.EditTask();\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tthis.taskController.removeTask();\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tthis.taskController.saveTaskList();\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tSystem.out.println(\"Thank you for coming, Bye!\");\n\t\t\tthis.exit = true;\n\t\t\t// save the task list before exit all the time.\n\t\t\tthis.taskController.saveTaskList();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"This is not a valid option, please input 1 ~ 7.\");\n\t\t\tbreak;\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"Welcome to Recursive&Loop System\");\r\n\t\tSystem.out.println(\"If you need help. Please input !help\");\r\n\t\tSystem.out.println(\"I will show you all the commands\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Please input some command\");\r\n\t\t\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tCommand cmd = new Command();\r\n\t\tcmd.getCommand(sc);\r\n\t}",
"public CommandArguments parse(String[] args) {\n ErrorSupport command = new ErrorSupport();\n command.checkLength(args);\n\n //parsing arguments\n CommandArguments arguments = new CommandArguments();\n for (int i = 0; i < args.length; i++) {\n if ((i == args.length - 1) && !args[i].equals(\"--help\")) {\n throw new IllegalArgumentException(\"Incorrect argument, --help for more information about app syntax\");\n }\n switch (args[i]) {\n case (\"--help\"):\n System.out.println(\"\\nHELP MENU \\nAvailable options and arguments: \\n \\t--latitude x \\t-enter latitude coordinate \\n \\t--longitude x\\t-enter longitude coordinate \\n \\t--sensorid x \\t-enter sensor's Id \\n \\t--apikey x \\t\\t-enter API key \\n \\t--history x \\t-enter number of hours to display from history data\\n\");\n System.exit(0);\n case (\"--latitude\"):\n i++;\n arguments.setLatitude(command.checkIsDouble(args[i]));\n break;\n case (\"--longitude\"):\n i++;\n arguments.setLongitude(command.checkIsDouble(args[i]));\n break;\n case (\"--sensorid\"):\n i++;\n arguments.setSensorId(command.checkIsInt(args[i]));\n break;\n case (\"--apikey\"):\n i++;\n arguments.setApiKey(command.checkApiKey(args[i]));\n break;\n case (\"--history\"):\n i++;\n arguments.setHistory(command.checkIsInt(args[i]));\n break;\n default:\n throw new IllegalArgumentException(\"Incorrect option, --help for more information about app syntax\");\n }\n }\n\n //checking environment API_KEY if there was no apikey in command line entered\n if (!arguments.hasApiKey() && System.getenv(\"API_KEY\") == null) {\n throw new IllegalArgumentException(\"No API Key found, check if you have entered the correct key or if there is a suitable environment variable ( API_KEY ), --help for more information about app syntax\");\n } else if (!arguments.hasApiKey()) {\n arguments.setApiKey(command.checkApiKey(System.getenv(\"API_KEY\")));\n }\n return arguments;\n }",
"public static void main( String[] args ) {\n \tclArgs = new CommandLineArgs();\n \tJCommander jc = new JCommander(clArgs);\n \tfinal IDefaultProvider DEFAULT_PROVIDER = new DefaultCommandLineArgsProvider();\n \t\n \t// Set provider for default values of command line arguments \n \tjc.setDefaultProvider(DEFAULT_PROVIDER);\n \tjc.setColumnSize(100);\n \t\n \ttry {\n \t\t// Try to parse the arguments\n \t\tjc.parse(args);\n \t} catch (ParameterException e) {\n \t\t// Print error message, jc.usage() is called automatically\n \t\tLOG.error(\"{}. Refer to the available options and their explanation below.\", e.getMessage());\n \t}\n \t\n \tif (clArgs.preprocess) {\n \t\t// Go into the preprocessing phase\n \t\tpreprocess();\n \t}\n \telse if (clArgs.spDetection) {\n \t\t// Go into the detection of stay points\n \t\tdetectStayPoints();\n \t}\n \telse if (clArgs.clustering) {\n \t\t// Go into the clustering task\n \t\tclustering();\n \t}\n \telse if (clArgs.buildFramework) {\n \t\t// Create shared framework based on clustering results\n \t\tbuildFramework();\n \t}\n \telse if (clArgs.buildUserGraphs) {\n \t\t// Create hierarchical graph for each user\n \t\tbuildHierarchicalGraphs();\n \t}\n \telse if (clArgs.calcSimilarity) {\n \t\t// Calculate spatial similarity between users\n \t\tcalculateSimilarity();\n \t}\n \telse if (clArgs.evaluation && !clArgs.automation) {\n \t\t// Evaluation only works with a run of similarity measurement beforehand\n \t\tLOG.info(\"The evaluation can only be performed in connection with the similarity measurement. Run this program with the command line switch {} or {} to get more information on how to run the similarity measurement.\",\n \t\t\t\tCommandLineArgs.HELP, CommandLineArgs.HELP_LONG);\n \t\treturn;\n \t}\n \telse if (clArgs.automation) {\n \t\tif (clArgs.evaluation) {\n \t\t\t// Start the automation\n \t\t\tautomate();\n \t\t} else {\n \t\t\t// The automation task needs the evaluation switch\n \t\tLOG.info(\"The automation requires the evaluation. The evaluation can be enabled with the {} or {} command line switch. Run this program with the command line switch {} or {} to get more information on how to run the automation.\",\n \t\t\t\tnew Object[] { CommandLineArgs.EVALUATION, CommandLineArgs.EVALUATION_LONG, CommandLineArgs.HELP, CommandLineArgs.HELP_LONG });\n \t\t\n \t\t// Ask the user if the evaluation should be enabled and the automation should run\n \t System.out.print(\"Do you want the system to enable the evaluation (y/n)? \");\n\n \t // Open standard input stream\n \t BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \t\t\n \t\tString runAutomationWithEvaluation = null;\n \t\ttry {\n \t\t\trunAutomationWithEvaluation = br.readLine();\n \t\t} catch (IOException ioe) {\n \t\t\tLOG.error(\"An error occurred while reading your input: {}\", ioe);\n \t\t}\n \t\t\n \t\t// User decided to start automation with evaluation\n \t\tif (runAutomationWithEvaluation.equals(\"y\") || runAutomationWithEvaluation.equals(\"Y\")) {\n \t\t\tLOG.debug(\"The evaluation is enabled by the system. Starting automation task.\");\n \t\t\tautomate();\n \t\t}\n \t\t// User decided to end the program\n \t\telse {\n \t\t\tLOG.debug(\"Automation aborted by the user.\");\n \t\t\treturn;\n \t\t}\n \t\t}\n \t}\n \telse {\n \t\t// Print a help text\n \t\tjc.usage();\n \t}\n }",
"public String c(ICommandSender paramae)\r\n/* 12: */ {\r\n/* 13:17 */ return \"commands.publish.usage\";\r\n/* 14: */ }",
"@Override\n\tpublic boolean execute(RPGEssentials plugin, CommandSender sender, String... args) {\n String base = (args.length > 0 ? args[0] : \"\");\n String last = (args.length > 0 ? args[args.length - 1] : \"\");\n \n // If there's no base argument, show a helpful message.\n if (base.equals(\"\")) {\n Messenger.sendMessage(sender, \"/karma help|?\");\n return true;\n }\n \n // The help command is a little special\n if (base.equals(\"?\") || base.equalsIgnoreCase(\"help\")) {\n showHelp(sender);\n return true;\n }\n \n // Get all commands that match the base.\n List<Command> matches = getMatchingCommands(base);\n \n // If there's more than one match, display them.\n if (matches.size() > 1) {\n Messenger.sendMessage(sender, \"Multiple command matches\");\n for (Command cmd : matches) {\n showUsage(cmd, sender, false);\n }\n return true;\n }\n \n // If there are no matches at all, notify.\n if (matches.size() == 0 && args.length > 0) {\n \tif(sender instanceof Player) {\n \t\tplugin.getKarma();\n\t\t\t\tMessenger.sendMessage(sender, ChatColor.GRAY+\"Karma von \"+sender.getName()+\": \"+ChatColor.WHITE+Karma.getPlayerHandler().getKarma(sender.getName()));\n \t} else\n \t\tMessenger.sendMessage(sender, \"Command not found\");\n \treturn true;\n }\n \n // Grab the only match.\n Command command = matches.get(0);\n CommandInfo info = command.getClass().getAnnotation(CommandInfo.class);\n \n // First check if the sender has permission.\n if (!PermHandler.hasPerm(sender, info.permission())) {\n \tMessenger.sendMessage(sender, \"No Permission\");\n return true;\n }\n \n // Check if the last argument is a ?, in which case, display usage and description\n if (last.equals(\"?\") || last.equals(\"help\")) {\n showUsage(command, sender, true);\n return true;\n }\n \n // Otherwise, execute the command!\n String[] params = trimFirstArg(args);\n if (!command.execute(plugin, sender, params)) {\n showUsage(command, sender, true);\n }\n return true;\n }",
"public interface ICommand {\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return long description of the command\r\n\t */\r\n\tString description();\r\n\r\n\t/**\r\n\t * \r\n\t * @return name of the command\r\n\t */\r\n\tString name();\r\n\r\n\t/**\r\n\t * Get called when the comma\r\n\t * @param console callback for output\r\n\t * @param options of the command invocation\r\n\t */\r\n\tvoid exec(ICommandConsole console, List<String> options);\r\n\r\n\t/**\r\n\t * \r\n\t * @return usage of the command\r\n\t */\r\n\tString usage();\r\n}",
"public static void main(String[] args) {\n\t\tread_setLgSubParamCmd();\n//\t\tread_setLgSubParamCmd2();//常设模式\n//\t\tread_setLgSubParamCmd3();//广播模式\n//\t\tread_reportchannelDetectResult();\n//\t\tread_setManagedElement();\n//\t\tread_setLgSubWorkCmd();\n\t}",
"private void runDemo(String command) {\n boolean choseMergeSort = command.equals(\"1\");\n boolean choseHeapSort = command.equals(\"2\");\n boolean choseQuicksort = command.equals(\"3\");\n\n if (choseMergeSort) {\n } else if (choseHeapSort) {\n } else if (choseQuicksort) {\n }\n }",
"public static boolean handle(String arguments) {\n String[] args = arguments.split(\" \");\n if (args.length == 0 || arguments.length() == 0) {\n System.out.println(\"No commands are given.\");\n return false;\n }\n switch (args[0]) {\n case \"C\":\n if (args.length != 2) {\n System.out.println(\"Wrong usage for C <Name>.\");\n return false;\n }\n CCommand(args[1]);\n return true;\n case \"S\":\n if (args.length <= 2) {\n System.out.println(\"Wrong usage for S <Name> <Song>.\");\n return false;\n }\n SCommand(args[1], arguments.replace(args[0] + \" \" + args[1] + \" \", \"\"));\n return true;\n case \"E\":\n if (args.length <= 2) {\n System.out.println(\"Wrong usage for E <Name> <Song>.\");\n return false;\n }\n ECommand(args[1], arguments.replace(args[0] + \" \" + args[1] + \" \", \"\"));\n return true;\n case \"L\":\n if (args.length != 2) {\n System.out.println(\"Wrong usage for L <Name>.\");\n return false;\n }\n LCommand(args[1]);\n return true;\n case \"N\":\n if (args.length != 1) {\n System.out.println(\"Wrong usage for N.\");\n return false;\n }\n NCommand();\n return true;\n case \"M\":\n if (args.length != 1) {\n System.out.println(\"Wrong usage for M.\");\n return false;\n }\n MCommand();\n return true;\n case \"R\":\n if (args.length != 1) {\n System.out.println(\"Wrong usage for R.\");\n return false;\n }\n RCommand();\n return true;\n default:\n System.out.println(\"Given argument is not suitable.\");\n return false;\n }\n }",
"java.lang.String getCommand();",
"@Override\n\tpublic void implementionNine(String[] args) throws Exception {\n\n\t}",
"public static void main(String[] args) {\n\t\tMain _Main = new Main();\n\t\t_Main.xxx();\n\t\t\n\t}",
"public void initDefaultCommand()\n {\n }",
"public static void main(String[] args) {\r\n\t\tSystem.exit(createCommandLine().execute(args));\r\n\t}",
"public static void main(String[] args) {\n\t\tStringOperation.task_12();\n\t}",
"public static void main(String[] argv){\n\t}",
"public static void main(String[] args) throws IOException {\n Validate.command(args);\n\n String firstArg = args[0];\n switch(firstArg) {\n /** 1. Calls the repository set up initializing method which creates a .gitlet directory */\n case \"init\":\n Validate.numArgs(args, 1);\n Validate.reInit();\n Repository.init();\n break;\n case \"add\":\n Validate.numArgs(args, 2);\n Validate.initialization();\n String filename = args[1];\n Repository.add(filename);\n break;\n case \"commit\":\n Validate.noCommitMessage(args);\n Validate.initialization();\n String message = args[1];\n Repository.commit(message);\n break;\n case \"rm\":\n Validate.numArgs(args, 2);\n Validate.initialization();\n filename = args[1];\n Repository.rm(filename);\n break;\n case \"log\":\n Validate.numArgs(args, 1);\n Validate.initialization();\n Repository.log();\n break;\n case \"global-log\":\n Validate.numArgs(args, 1);\n Validate.initialization();\n Repository.globalLog();\n break;\n case \"find\":\n Validate.numArgs(args, 2);\n Validate.initialization();\n message = args[1];\n Repository.find(message);\n break;\n case \"status\":\n Validate.numArgs(args, 1);\n Validate.initialization();\n Repository.status();\n break;\n case \"checkout\":\n Validate.numArgs(args, 2,4);\n Validate.initialization();\n Repository.checkout(args);\n break;\n case \"branch\":\n Validate.numArgs(args, 2);\n Validate.initialization();\n String name = args[1];\n Repository.branch(name);\n break;\n case \"rm-branch\":\n Validate.numArgs(args, 2);\n Validate.initialization();\n name = args[1];\n Repository.rmBranch(name);\n break;\n case \"reset\":\n Validate.numArgs(args, 2);\n Validate.initialization();\n name = args[1];\n Repository.reset(name);\n break;\n case \"merge\":\n Validate.numArgs(args, 2);\n Validate.initialization();\n name = args[1];\n Repository.merge(name);\n break;\n default:\n Validate.noExistingCmd();\n }\n }",
"@Override\n\tpublic void onCommand(CommandSender sender, String[] args) {\n\t\t\n\t}",
"@Override\n\tpublic void onCommand(CommandSender sender, String[] args) {\n\t\t\n\t}",
"public void initDefaultCommand() {\n \n }",
"public String executeCommand(String arguments) {\r\n\t\ttry {\r\n\t\tString[] text = arguments.split(\" \");\r\n\t\tif (getEnteredCommand(text[0]) == null) {\r\n\t\t\treturn \"This is not possible.\";\r\n\t\t}\r\n\t\telse if(this.inBattle()) {\r\n\t\t\tswitch(text[0]) {\r\n\t\t\tcase \"attack\": return this.attack(); \t\t\t// ALSO TRIGGERS ENEMY ATTACK\r\n\t\t\tcase \"escape\": return this.exit();\r\n\t\t\tcase \"help\": return this.help();\r\n\t\t\tdefault: return \"You cannot do that.\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(this.isLooting()) {\r\n\t\t\tswitch(text[0]) {\r\n\t\t\tcase \"take\": return this.takeChestItem(text[1]);\r\n\t\t\tcase \"place\": return this.placeItemInChest(text[1]);\r\n\t\t\tcase \"look\": return this.look();\r\n\t\t\tcase \"equip\": return this.equipItem(text[1]);\r\n\t\t\tcase \"unequip\": return this.unequipItem(text[1]);\r\n\t\t\tcase \"inventory\": return this.printPlayerInventory();\r\n\t\t\tcase \"equipment\": return this.printPlayerEquipment();\r\n\t\t\tcase \"drink\": return this.drink(text[1]);\r\n\t\t\tcase \"exit\": return this.exit();\r\n\t\t\tcase \"help\": return this.help();\r\n\t\t\tdefault: return \"You cannot do that.\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(this.isTrading()) {\r\n\t\t\tswitch(text[0]) {\r\n\t\t\tcase \"look\": return this.look();\r\n\t\t\tcase \"exit\": return this.exit();\r\n\t\t\tcase \"buy\": return this.buy(text[1]);\r\n\t\t\tcase \"sell\": return this.sell(text[1]);\r\n\t\t\tcase \"inventory\": return this.printPlayerInventory();\r\n\t\t\tdefault: return \"You cannot do that\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tswitch(text[0]) {\r\n\t\t\tcase \"move\": return this.moveTo(text[1]);\t\t// 20% PROBABILITY OF SPAWNING A BANDIT AT NEW LOCATION\r\n\t\t\tcase \"drink\": return this.drink(text[1]);\r\n\t\t\tcase \"take\": return this.takeItem(text[1]);\r\n\t\t\tcase \"drop\": return this.dropItem(text[1]);\r\n\t\t\tcase \"equip\": return this.equipItem(text[1]);\r\n\t\t\tcase \"unequip\": return this.unequipItem(text[1]);\r\n\t\t\tcase \"read\": return this.read(text[1]);\r\n\t\t\tcase \"trade\": return this.trade(text[1]);\r\n\t\t\tcase \"look\": return this.look();\r\n\t\t\tcase \"quest\": return this.printQuestStatus();\r\n\t\t\tcase \"inventory\": return this.printPlayerInventory();\r\n\t\t\tcase \"equipment\": return this.printPlayerEquipment();\r\n\t\t\tcase \"help\": return this.help();\r\n\t\t\tcase \"loot\": return this.loot(text[1]);\r\n\t\t\tcase \"attack\": return this.engageEnemy(text[1]);\r\n\t\t\tcase \"talk\": return this.talk(text[1]);\r\n\t\t\tdefault: return \"You cannot do that.\";\r\n\t\t}\r\n\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\treturn \"Specify a valid command or an argument.\";\r\n\r\n\t\t}}",
"public static void main(String[] args) throws IOException{\r\n\t\tparseOption(args);\r\n\t\trun(args);\r\n\t}",
"public static void main(String[] args) {\n\t\tList<String> cars = new ArrayList<String>();\n\t\t// Get categories\n\t\tarrayCategories = Categories.makeCategories();\n\n\t\t//get keys\n\t\tkeys = (List<String>) SimpleRunner.getKeys();\n\n\t\t// Loop over arguments to find parameters of cars, categories, and maximum output\n\t\tfor(String option : args) {\n\t\t\tfor (List<String> category : arrayCategories) { \n\t\t\t\tfor(String subcategory : category)\n\t\t\t\t\tif(subcategory.equals(option))\n\t\t\t\t\t\tchosenCategories.add(option);\n\t\t\t}\n\t\t\tif(keys.contains(option.toLowerCase()) || SimpleRunner.trimKeys(keys).contains(option))\n\t\t\t\tcars.add(option);\n\t\t\tif(isNumeric(option)) {\n\t\t\t\tif(Integer.parseInt(option) <= 10 && Integer.parseInt(option) >= 0)\n\t\t\t\t\tmaxOutput = Integer.parseInt(option);\n\t\t\t}\n\t\t}\n\t\t\n\t\tBoolean noOptionSelected = true; // If neither gui or api is specified\n\t\tfor(String option : args) {\n\t\t\tswitch(option.toLowerCase()) {\n\t\t\tcase \"gui\":\n\t\t\t\tnoOptionSelected = false;\n\t\t\t\tnew GUI(chosenCategories);\n\t\t\t\tbreak;\n\t\t\tcase \"api\":\n\t\t\t\tnoOptionSelected = false;\n\t\t\t\tnew API(chosenCategories, cars);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Run gui by default\n\t\tif(noOptionSelected) {\n\t\t\tnew GUI(chosenCategories);\n\t\t}\n\t}",
"public static void main(String[] arg) throws Exception{\n\t\t\n\t}",
"public static void main(String[] args) {\n\n\t SalesforceDesignTest solution = new SalesforceDesignTest();\n\t try(Scanner sc = new Scanner(System.in))\n\t {\n\t int n = sc.nextInt();\n\t for(int t = 0; t < n; t++) {\n\t String command = sc.nextLine();\n\t while (command.trim().isEmpty())\n\t {\n\t \tcommand = sc.nextLine();\n\t }\n\t \n\t solution.executeTask(command); \n\t }\t\n\t }\n}",
"@Override\n public Command parseCommand(String commandText, ViewController viewController, Cli cli) throws InvalidCommandException {\n\n System.out.println(this+\": \"+commandText);\n String word = \"\";\n Resource resource;\n String prefix = \"\";\n String suffix = \"\";\n boolean found = false;\n ArrayList<Resource> resources = new ArrayList<>();\n\n if (commandText.length() == 0)\n throw new InvalidCommandException();\n\n commandText = Command.deleteInitSpaces(commandText);\n\n for (int i = 0;i<commandText.length();i++){\n if (commandText.charAt(i) != ' '){\n prefix = prefix + commandText.charAt(i);\n } else {\n for (i++;i<commandText.length();i++)\n suffix = suffix + commandText.charAt(i);\n }\n }\n\n if (prefix.equals(\"coin\") || prefix.equals(\"rock\") || prefix.equals(\"shield\") || prefix.equals(\"servant\")){\n\n resource = Command.fromStringToResource(prefix);\n resources.add(resource);\n\n for (int i = 0;i<suffix.length();i++){\n if (suffix.charAt(i) != ' '){\n word = word + suffix.charAt(i);\n } else {\n resource = Command.fromStringToResource(word);\n if(resource != null )\n for(Resource r : possibleResources)\n if (r == resource)\n resources.add(resource);\n word = \"\";\n }\n }\n resource = Command.fromStringToResource(word);\n if(resource != null )\n for(Resource r : possibleResources)\n if (r == resource)\n resources.add(resource);\n\n if (resources.size() != numberOfWhiteMarbles){\n throw new InvalidCommandException();\n }\n return new WhiteMarbleCommand(resources,cli);\n } else {\n switch (prefix) {\n case \"exit\": {\n return new ExitCommand();\n }\n case \"help\": {\n return new HelpCommand();\n }\n case \"showGameboard\": {\n return new ShowGameBoardCommand(cli);\n }\n case \"showMarket\": {\n return new ShowMarketCommand(cli);\n }\n case \"showPlayer\": {\n\n int n = 0;\n int temp;\n found = false;\n\n for (int i = 0; i < suffix.length() && !found; i++) {\n if (suffix.charAt(i) != ' ') {\n temp = suffix.charAt(i) - '0';\n if (temp < 0 || temp > 9)\n throw new InvalidCommandException();\n n = temp;\n found = true;\n }\n\n }\n if (n < 1 || n > 4)\n throw new InvalidCommandException();\n return new ShowPlayerCommand(n, viewController);\n\n }\n case \"showProductionDecks\": {\n return new ShowProductionDeckCommand(cli);\n }\n case \"showReserve\": {\n return new ShowReserveCommand(cli);\n }\n default: {\n throw new InvalidCommandException();\n }\n }\n }\n }",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n List<String> inputs = new InputsReader().read(scanner);\n\n List<Command> commands = new CommandsFactory().build(inputs);\n\n new CommandsProcessor().execute(commands);\n }",
"Optional<String> execute(String command, List<String> args);",
"public static void main(String[] args, String value) {\n }"
] | [
"0.72506326",
"0.7044847",
"0.70265967",
"0.69460297",
"0.6931439",
"0.6770707",
"0.6729649",
"0.67262137",
"0.67253464",
"0.6696168",
"0.66832155",
"0.66293985",
"0.6580743",
"0.65511245",
"0.65373015",
"0.65362644",
"0.6527994",
"0.65067536",
"0.64933866",
"0.64633083",
"0.64329505",
"0.643276",
"0.6431658",
"0.6430975",
"0.6399893",
"0.63944167",
"0.63656867",
"0.6356567",
"0.6353867",
"0.63051116",
"0.6296502",
"0.62877065",
"0.62840986",
"0.6275872",
"0.62691146",
"0.626225",
"0.62532735",
"0.6243893",
"0.62386537",
"0.6232807",
"0.6219221",
"0.62165314",
"0.621483",
"0.6214169",
"0.6197737",
"0.6177108",
"0.61547077",
"0.61543363",
"0.61517376",
"0.6150295",
"0.6147531",
"0.61472374",
"0.61459607",
"0.6138364",
"0.6125791",
"0.6125159",
"0.6121489",
"0.61214507",
"0.61096007",
"0.60907644",
"0.6080177",
"0.60757715",
"0.6074063",
"0.60709214",
"0.6070481",
"0.6045636",
"0.60436153",
"0.60414946",
"0.603959",
"0.6031925",
"0.60310274",
"0.6028567",
"0.60280687",
"0.600582",
"0.59974664",
"0.59961206",
"0.5989612",
"0.5987233",
"0.5984812",
"0.59846085",
"0.59810644",
"0.59804386",
"0.5976546",
"0.597561",
"0.59747225",
"0.59680766",
"0.5967251",
"0.5963191",
"0.5946035",
"0.5942908",
"0.5942908",
"0.5941907",
"0.5933344",
"0.5930304",
"0.5928212",
"0.59279215",
"0.5926674",
"0.5925732",
"0.59242773",
"0.5916551",
"0.59149915"
] | 0.0 | -1 |
Gets the value of the containerTemperature1 property. | public double getContainerTemperature1() {
return containerTemperature1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getContainerTemperature2() {\r\n return containerTemperature2;\r\n }",
"public void setContainerTemperature1(double value) {\r\n this.containerTemperature1 = value;\r\n }",
"public double getContainerTemperature3() {\r\n return containerTemperature3;\r\n }",
"public float getTemp1() {\n\t\treturn temp1;\n\t}",
"public IntegerProperty getTemp() {\n\t\treturn temperature;\n\t}",
"public String getTemperature() {\r\n\t\treturn temperature;\r\n\t}",
"public String getTemperature() {\n\t\treturn temperature;\n\t}",
"public String getTemperature() {\n return temperature;\n }",
"public void setContainerTemperature2(double value) {\r\n this.containerTemperature2 = value;\r\n }",
"public int getTemperature() {\n return temperature;\n }",
"public Getter reqGetTemperatureSetting1() {\n\t\t\treqGetProperty(EPC_TEMPERATURE_SETTING1);\n\t\t\treturn this;\n\t\t}",
"public int getTemperature() {\n\t\treturn temperature;\n\t}",
"public int getTemperature() {\n return temperature;\n }",
"public Float getTemperature () {\n return temperature;\n }",
"public void setContainerTemperature3(double value) {\r\n this.containerTemperature3 = value;\r\n }",
"public double getTemperature() {return temperature;}",
"float getTemperature();",
"public HLAfloat32BE getTemperature() { return this.temperature; }",
"public float getTemperature() {\n\t\treturn (float) getRawTemperature() / 100f;\n\t}",
"public double getExternalTemperature() {\r\n return externalTemperature;\r\n }",
"public float getTempCelsius() {\n float tempC = 0;\n if (readings.size() > 0) {\n tempC = readings.get(readings.size() - 1).temperature;\n }\n return tempC;\n }",
"public java.lang.String getTemperature() {\n java.lang.Object ref = temperature_;\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 temperature_ = s;\n return s;\n }\n }",
"public double getTemperatureCelsius() {\n return temperatureCelsius;\n }",
"public java.lang.String getTemperature() {\n java.lang.Object ref = temperature_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n temperature_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public AlarmTemperature getTemperature() {\n\t\treturn this.temperature;\n\t}",
"public double getCurrentTemperature() {\n return this.currentTemperature;\n }",
"public int getTemperature() {\n return VirtualHardwareManager.getInstance().getTemperature();\n }",
"@Override \n public double getTemperature() { \n return pin.getValue();\n }",
"public byte getTemperature_unit() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readByte(__io__address + 11);\n\t\t} else {\n\t\t\treturn __io__block.readByte(__io__address + 11);\n\t\t}\n\t}",
"public double getHumidityTemperature() {\r\n return humidityTemperature;\r\n }",
"public java.lang.String getMinTemperatureC()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MINTEMPERATUREC$10, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public com.google.protobuf.ByteString\n getTemperatureBytes() {\n java.lang.Object ref = temperature_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n temperature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public float getTemp3() {\n\t\treturn temp3;\n\t}",
"public double getParcelTemperature() {\r\n return parcelTemperature;\r\n }",
"public Double getThermistorCelsiusTemperature()\n {\n return finchController.getThermistorCelsiusTemperature();\n }",
"public String getTempInCelsius() {\n\t\treturn tempInCelsius;\n\t}",
"@JsonIgnore\n\tpublic DecimalMeasure<Temperature> getTemperatureAsMeasure()\n\t{\n\t\treturn this.temperatureAsMeasure;\n\t}",
"public com.google.protobuf.ByteString\n getTemperatureBytes() {\n java.lang.Object ref = temperature_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n temperature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@JsonProperty(\"frontPanelTemperature\")\r\n public Double getFrontPanelTemperature() {\r\n return frontPanelTemperature;\r\n }",
"@Override\r\n public int getTemperature(){\r\n return 10;\r\n }",
"public float getTemperatureMin() {\n return temperatureMin;\n }",
"public Double getIndoorTemperature() {\n return indoorTemperature;\n }",
"public double GetMashTemperature() {\n\t\treturn msc.GetMashTemperature();\n\t}",
"public static int getTemperature() {\n\t\t\n\t\tSystem.out.println(\"Enter temperature value : \");\n\t\tint inputValue = sc.nextInt();\n\t\treturn inputValue;\n\t}",
"public double ThermodynamicTemperature() {\n return OCCwrapJavaJNI.Units_Dimensions_ThermodynamicTemperature(swigCPtr, this);\n }",
"public Object getAirTemperature() {\n\t\treturn null;\n\t}",
"public Getter reqGetTemperatureSetting2() {\n\t\t\treqGetProperty(EPC_TEMPERATURE_SETTING2);\n\t\t\treturn this;\n\t\t}",
"public String getTemperature(JSONObject j) throws JSONException{\n return roundTwoDecimals(Utilities.convertTemp(tempUnits,j.getDouble(\"day\"))) + \"\";\n }",
"public float getTemp2() {\n\t\treturn temp2;\n\t}",
"public Double getOutdoorTemperature() {\n return outdoorTemperature;\n }",
"@Override\n\tpublic int getTemperature() throws emException, TException {\n\t\treturn 0;\n\t}",
"public Informer reqInformTemperatureSetting1() {\n\t\t\treqInformProperty(EPC_TEMPERATURE_SETTING1);\n\t\t\treturn this;\n\t\t}",
"public int getBodyTemperature() {\n return this.bodyTemperature;\n }",
"public Getter reqGetMeasuredRoomTemperature() {\n\t\t\treqGetProperty(EPC_MEASURED_ROOM_TEMPERATURE);\n\t\t\treturn this;\n\t\t}",
"public double getInputTemperature() throws NumberFormatException {\n\t\treturn inputPanel.getTemperature();\n\t}",
"public double getTemp() {\n\t\treturn currentTemp;\n\t}",
"public java.lang.String getMinTemperatureF()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MINTEMPERATUREF$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public double getTemp(){\n return currentTemp;\n }",
"public String getTemperatura() {\r\n return temperatura;\r\n }",
"public float getCurrentTemp(){\n return currentTemp;\n }",
"public float getTemps() {\n\t\treturn temps;\n\t}",
"@NonNull\n public Integer getMinTemp() {\n return minTemp;\n }",
"public java.lang.String getValue1() {\n return this.value1;\n }",
"public float getminTemp() {\n Reading minTempReading = null;\n float minTemp = 0;\n if (readings.size() >= 1) {\n minTemp = readings.get(0).temperature;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).temperature < minTemp) {\n minTemp = readings.get(i).temperature;\n }\n }\n } else {\n minTemp = 0;\n }\n return minTemp;\n }",
"public Float getT1B11D1() {\r\n return t1B11D1;\r\n }",
"public float getTemperature(Point3d position){\r\n\t\tBlockPos pos = new BlockPos(position.x, position.y, position.z);\r\n\t\treturn world.getBiome(pos).getTemperature(pos);\r\n\t}",
"double getTempo();",
"public java.lang.String getMaxTemperatureC()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAXTEMPERATUREC$8, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"private double measureTemp() {\n try {\n analog0 = blueTooth.sensor(0);\n analog1 = blueTooth.sensor(1);\n return ((analog0 - analog1) * 5 * 100) / 1024.0;\n } catch (TimeoutException ex) {\n Logger.getLogger(TempMeasure.class.getName()).log(Level.SEVERE, null, ex);\n }\n return ((analog0 - analog1) * 5 * 100) / 1024.0;\n }",
"public float getTempFarenheit() {\n float tempF = 0;\n float tempC;\n if (readings.size() > 0) {\n tempC = readings.get(readings.size() - 1).temperature;\n tempF = (float) ((tempC * 1.8) + 32);\n\n }\n return tempF;\n }",
"public Integer getTempo() {\n return this.tempoSpeed;\n }",
"public T getData1() {\n return this.data1;\n }",
"public V getValue1() {\n return v;\n }",
"public int getRain1() {\n\t\treturn rain1;\n\t}",
"public double getHumidity()\n {\n return humidity;\n }",
"public double getHumidityValue() {\r\n return humidityValue;\r\n }",
"public void setTemperature(int value) {\n this.temperature = value;\n }",
"public double getC1() {\n return c1;\n }",
"public Float getE1() {\r\n return e1;\r\n }",
"private void getTemperature() {\r\n \t\r\n \t//Get the date from the DateService class\r\n \tDate theDate = theDateService.getDate(); \r\n \t\r\n \t//Increment the number of readings\r\n \tlngNumberOfReadings ++;\r\n \tdouble temp = 0.0;\r\n \tString rep = \"\";\r\n \t\r\n \t//Assume that the TMP36 is connected to AIN4\r\n \trep = this.theTemperatureService.readTemperature(\"4\");\r\n \tpl(rep);\r\n \ttemp = this.theTemperatureService.getTheTemperature();\r\n \t\r\n \t//All details necessary to send this reading are present so create a new TemperatureReading object\r\n \tTemperatureReading theReading = new TemperatureReading(temp, theDate, lngNumberOfReadings);\r\n \tthis.send(theReading);\r\n \t\r\n }",
"private void readRealTemp() {\n YCBTClient.getRealTemp(new BleDataResponse() {\n @Override\n public void onDataResponse(int i, float v, HashMap hashMap) {\n if (i == 0) {\n String temp = (String) hashMap.get(\"tempValue\");\n }\n }\n });\n }",
"public String getFeelsLikeTempInCelsius() {\n\t\treturn feelsLikeTempInCelsius;\n\t}",
"public float getTemperatureInFahrenheit() {\n\t\tif(this.metric==Metric.CELSIUS) {\n\t\t\treturn(this.temperature*(9/5)+32);\n\t\t}else if(this.metric==Metric.KELVIN) {\n\t\t\treturn (9*(this.temperature - 273)/5 + 32);\n\t\t}\n\t\treturn this.temperature;\n\t\t\n\t}",
"public int getTempoMili() {\n return tempoMili;\n }",
"public Float getT1B11H1() {\r\n return t1B11H1;\r\n }",
"public double getDoubleValue1() {\n return doubleValue1_;\n }",
"public double getDoubleValue1() {\n return doubleValue1_;\n }",
"public String getTemperatureInCelcius(float temp)\n {\n\n temp = ((temp - 32) * 5) / 9;\n\n return Float.toString(temp);\n }",
"public Float getHumidity () {\n return humidity;\n }",
"FloatResource temperatureCoefficient();",
"public int getTempCoolDown() {\n return tempCoolDown;\n }",
"public java.lang.Integer getVar1() {\n return var1;\n }",
"public java.lang.Integer getVar1() {\n return var1;\n }",
"@RequestMapping(\"/temperature\")\n public TemperatureResponse temperature() {\n LOG.info(\"Reading temperature\");\n TemperatureResponse response = new TemperatureResponse();\n response.setHost(getHostname());\n response.setTemperature(getTemperature());\n return response;\n }",
"public org.apache.xmlbeans.XmlString xgetMinTemperatureC()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(MINTEMPERATUREC$10, 0);\n return target;\n }\n }",
"public static float getCpuTemperature() throws IOException, InterruptedException, NumberFormatException {\n \treturn pi4jSystemInfoConnector.getCpuTemperature();\r\n }",
"public String getCurrentTempInVancouver() throws IOException, JSONException {\n JSONObject json = readJsonFromUrl(theURL);\n JSONObject main = (JSONObject) json.get(\"main\");\n double kelvinD = 987654;\n int kelvinI = 987654;\n double c;\n try {\n kelvinD = (Double) main.get(\"temp\");\n } catch (ClassCastException e) {\n kelvinI = (Integer) main.get(\"temp\");\n }\n if (kelvinD != 987654) {\n c = kelvinD - 273.15;\n } else {\n c = kelvinI - 273.15;\n }\n double ccOneDecimal = Math.round(c * 10) / 10.0;\n return ccOneDecimal + \"°C\";\n }",
"public CP getTPValueTechnicalPart() { \r\n\t\tCP retVal = this.getTypedField(40, 0);\r\n\t\treturn retVal;\r\n }",
"public void setTemperature(Float temperature) {\n this.temperature = temperature;\n }",
"public Getter reqGetMeasuredFloorTemperature() {\n\t\t\treqGetProperty(EPC_MEASURED_FLOOR_TEMPERATURE);\n\t\t\treturn this;\n\t\t}"
] | [
"0.7999662",
"0.78022057",
"0.7763666",
"0.7272052",
"0.7233709",
"0.7103762",
"0.7095187",
"0.7084443",
"0.7066574",
"0.70318675",
"0.7028706",
"0.7001498",
"0.69923264",
"0.69393295",
"0.68462706",
"0.6833363",
"0.67164415",
"0.6678624",
"0.6655878",
"0.6585385",
"0.65804523",
"0.657577",
"0.65638834",
"0.654585",
"0.6528603",
"0.64515406",
"0.63573915",
"0.63265115",
"0.6318423",
"0.62569386",
"0.62107813",
"0.61954397",
"0.6177328",
"0.61698973",
"0.6169409",
"0.616539",
"0.6131162",
"0.6121335",
"0.611413",
"0.609269",
"0.60924286",
"0.6069735",
"0.6058644",
"0.60535115",
"0.6025594",
"0.6021848",
"0.60099953",
"0.599437",
"0.59908855",
"0.5979045",
"0.5965042",
"0.5960365",
"0.59240466",
"0.5920447",
"0.59129894",
"0.590586",
"0.58832246",
"0.583416",
"0.5824844",
"0.5778929",
"0.57772356",
"0.5769615",
"0.5766097",
"0.5753033",
"0.57470477",
"0.57336766",
"0.5721035",
"0.5696769",
"0.56937516",
"0.5622946",
"0.5604111",
"0.5603762",
"0.55973107",
"0.55894625",
"0.5586382",
"0.55682987",
"0.55665475",
"0.55612797",
"0.55557126",
"0.55415493",
"0.5540626",
"0.5539054",
"0.55291057",
"0.55167013",
"0.5508924",
"0.55061203",
"0.54917026",
"0.548879",
"0.54855174",
"0.54831916",
"0.547959",
"0.5477609",
"0.5461483",
"0.5450449",
"0.5443597",
"0.5441599",
"0.5438815",
"0.5432075",
"0.5430421",
"0.54289097"
] | 0.87562007 | 0 |
Sets the value of the containerTemperature1 property. | public void setContainerTemperature1(double value) {
this.containerTemperature1 = value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setContainerTemperature2(double value) {\r\n this.containerTemperature2 = value;\r\n }",
"public void setContainerTemperature3(double value) {\r\n this.containerTemperature3 = value;\r\n }",
"public double getContainerTemperature1() {\r\n return containerTemperature1;\r\n }",
"public void setTemperature(int value) {\n this.temperature = value;\n }",
"public double getContainerTemperature2() {\r\n return containerTemperature2;\r\n }",
"public void setTemperature(Float temperature) {\n this.temperature = temperature;\n }",
"public void setTemperature(int value) {\n\t\tthis.temperature = value;\n\t}",
"private void setTemp(int temperature) {\n\t\tthis.temperature.setValue(temperature);\n\t}",
"public double getContainerTemperature3() {\r\n return containerTemperature3;\r\n }",
"public void setTemperature(String temperature) {\n this.temperature = temperature;\n }",
"public void setTemp(int temp) {\n \tthis.temperature = temp;\n }",
"public void setTemperature_unit(byte temperature_unit) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeByte(__io__address + 11, temperature_unit);\n\t\t} else {\n\t\t\t__io__block.writeByte(__io__address + 11, temperature_unit);\n\t\t}\n\t}",
"public Getter reqGetTemperatureSetting1() {\n\t\t\treqGetProperty(EPC_TEMPERATURE_SETTING1);\n\t\t\treturn this;\n\t\t}",
"public Setter reqSetTemperatureSetting1(byte[] edt) {\n\t\t\treqSetProperty(EPC_TEMPERATURE_SETTING1, edt);\n\t\t\treturn this;\n\t\t}",
"public Informer reqInformTemperatureSetting1() {\n\t\t\treqInformProperty(EPC_TEMPERATURE_SETTING1);\n\t\t\treturn this;\n\t\t}",
"public float getTemp1() {\n\t\treturn temp1;\n\t}",
"public void setExternalTemperature(double value) {\r\n this.externalTemperature = value;\r\n }",
"public void setTemperature(int temperature) {\n if (status) {\n this.temperature = temperature;\n } else System.out.println(\"dispozitivul este oprit\");\n }",
"public void setHumidityTemperature(double value) {\r\n this.humidityTemperature = value;\r\n }",
"public void setTemperatureNeededToCookAt(double t) {\r\n temp = t;\r\n }",
"public void setStartingTemperature(final double temperature) {\r\n\t\tthis.setTemperature(temperature);\r\n\t}",
"protected void onSetTemperatureSetting1(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"public void setKota1(String tempatKerja) {\n\t\t\n\t}",
"protected void setTemperatureSingle(final ProviderName providerName, final String id, final int temperature) {\n Preconditions.checkNotNull(providerName);\n Preconditions.checkNotNull(id);\n try {\n providers.get(providerName).setTemperature(id, temperature);\n } catch (final Exception e) {\n final String message = String.format(\"Failed to update temperature for %s:%s\",\n providerName.getName(), id);\n LOGGER.error(message, e);\n throw new RuntimeException(message, e);\n }\n }",
"public void setParcelTemperature(double value) {\r\n this.parcelTemperature = value;\r\n }",
"public void setTemperature(double temp){tempval.setText(Double.toString(temp));}",
"public Builder setTemperature(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n temperature_ = value;\n onChanged();\n return this;\n }",
"public IntegerProperty getTemp() {\n\t\treturn temperature;\n\t}",
"public void setTemperatureCelsius(final double temperatureCelsius) {\n if (temperatureCelsius >= MINIMUM_POOL_TEMP_CELSIUS\n && temperatureCelsius <= MAXIMUM_POOL_TEMP_CELSIUS) {\n this.temperatureCelsius = temperatureCelsius;\n }\n }",
"public Float getTemperature () {\n return temperature;\n }",
"public double getTemperature() {return temperature;}",
"protected void onSetTemperatureSetting2(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"public String getTemperature() {\r\n\t\treturn temperature;\r\n\t}",
"@JsonIgnore\n\tpublic void setTemperatureAsMeasure(DecimalMeasure<Temperature> temperature)\n\t{\n\t\tthis.temperatureAsMeasure = temperature;\n\t}",
"protected BiomeGenBase setTemperatureRainfall(float par1, float par2)\n {\n if (par1 > 0.1F && par1 < 0.2F)\n {\n throw new IllegalArgumentException(\"Please avoid temperatures in the range 0.1 - 0.2 because of snow\");\n }\n else\n {\n this.temperature = par1;\n this.rainfall = par2;\n return this;\n }\n }",
"public String getTemperature() {\n return temperature;\n }",
"public String getTemperature() {\n\t\treturn temperature;\n\t}",
"@Override\n public void skinTemperature(int value, int timestamp) {\n }",
"public void setMinTemperatureC(java.lang.String minTemperatureC)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MINTEMPERATUREC$10, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MINTEMPERATUREC$10);\n }\n target.setStringValue(minTemperatureC);\n }\n }",
"public void setE1(Float e1) {\r\n this.e1 = e1;\r\n }",
"@Test\n\tpublic void testSetTemp_1()\n\t\tthrows Exception {\n\t\tSaveScenarioAction fixture = SaveScenarioActionFactory.createInstance();\n\t\tfloat temp = 1.0f;\n\n\t\tfixture.setTemp(temp);\n\n\t\t// add additional test code here\n\t}",
"public int getTemperature() {\n return temperature;\n }",
"public Temperature() {\n\t\tsuper();\n\t}",
"public HLAfloat32BE getTemperature() { return this.temperature; }",
"private void updateTemperatureValue(float temperature) {\n \t\t\n \t\tString mValue = null;\n \t\t\n \t\tif(temperatureFormat.equals(\"c\")) {\n \t\t\tmValue = String.format(celsiusFormat, temperature);\n \t\t} else if(temperatureFormat.equals(\"f\")) {\n \t\t\tmValue = String.format(fahrenheitFormat, \n \t\t\t\t\tUnitConversionUtils.comvertTemperature(temperature, UnitConversionUtils.CELSIUS, UnitConversionUtils.FAHRENHEIT));\n \t\t} else {\n \t\t\tmValue = String.format(kelvinFormat, \n \t\t\t\t\tUnitConversionUtils.comvertTemperature(temperature, UnitConversionUtils.CELSIUS, UnitConversionUtils.KELVIN));\n \t\t}\n \t\t\n temperatureValueView.setText(mValue);\n \t}",
"public int getTemperature() {\n\t\treturn temperature;\n\t}",
"float getTemperature();",
"public int getTemperature() {\n return temperature;\n }",
"@JsonProperty(\"frontPanelTemperature\")\r\n public void setFrontPanelTemperature(Double frontPanelTemperature) {\r\n this.frontPanelTemperature = frontPanelTemperature;\r\n }",
"public void setMinTemperatureF(java.lang.String minTemperatureF)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MINTEMPERATUREF$6, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MINTEMPERATUREF$6);\n }\n target.setStringValue(minTemperatureF);\n }\n }",
"@AutoGUIAnnotation(\r\n\tDescriptionForUser = \"Sets the SetPoint temperature.\",\r\n\tParameterNames = {\"Temperature [K]\"},\r\n\tDefaultValues= {\"295\"},\r\n\tToolTips = {\"Define tool-tips here\"})\r\n @iC_Annotation(MethodChecksSyntax = true )\r\n public void setTemp(float SetPoint)\r\n throws IOException, DataFormatException {\r\n\r\n\t// perform Syntax-check\r\n\tif (SetPoint < 0 || SetPoint > 500)\r\n\t\tthrow new DataFormatException(\"Set point out of range.\");\r\n\r\n\t// exit if in Syntax-check mode\r\n\tif ( inSyntaxCheckMode() )\r\n\t\treturn;\r\n\r\n // build the GPIB command string\r\n\tString str = \"SETP 1,\" + SetPoint;\r\n\r\n\t// send to the Instrument\r\n\tSendToInstrument(str);\r\n\r\n\t// wait until setpoint is reached\r\n float T;\r\n\tdo {\r\n // it is recommended to check if scripting has been paused\r\n isPaused(true);\r\n\r\n // get current temperature\r\n str = QueryInstrument(\"KRDG? A\");\r\n\r\n // convert to a float value\r\n //T = getFloat(str); // this is the recommended way of converting\r\n T = Float.parseFloat(str);\r\n\t} while ( Math.abs(T-SetPoint) > 0.1 &&\r\n m_StopScripting == false);\r\n }",
"public Temperature toCelsius(){\n\t\tif (scale==\"F\"){\n\t\t\tdegrees=(degrees-32)*5/9;\n\t\t\tscale=\"C\";}\n\t\t\treturn this;\n\t}",
"@Override\r\n\tpublic void TemperatureUpdated(Temperature temperature) {\n\t\t\r\n\t\twhile (form == null);\r\n\t\tform.UpdateTemperature(temperature.getValue());\r\n\t}",
"@Override\r\n public int getTemperature(){\r\n return 10;\r\n }",
"void setTemp(String name, Object value);",
"public double getTemperatureCelsius() {\n return temperatureCelsius;\n }",
"public void setIndoorTemperature(Double indoorTemperature) {\n this.indoorTemperature = indoorTemperature;\n }",
"private void updateTemperatureImage(float temperature) {\n \t\t\n \t\t//determine which drawable to use\n \t\tif(temperature < maxColdTemp) {\n \t\t\tif(coldTempDrawable == null) {\n \t\t\t\tcoldTempDrawable = getResources().getDrawable(R.drawable.temperature_cold);\n \t\t\t}\n \t\t\ttemperatureImgView.setImageDrawable(coldTempDrawable);\n \t\t} else if(temperature > minHotTemp) {\n \t\t\tif(hotTempDrawable == null) {\n \t\t\t\thotTempDrawable = getResources().getDrawable(R.drawable.temperature_hot);\n \t\t\t}\n \t\t\ttemperatureImgView.setImageDrawable(hotTempDrawable);\n \t\t} else {\n \t\t\tif(warmTempDrawable == null) {\n \t\t\t\twarmTempDrawable = getResources().getDrawable(R.drawable.temperature_warm);\n \t\t\t}\n \t\t\ttemperatureImgView.setImageDrawable(warmTempDrawable);\n \t\t}\n \t}",
"public void setMinTemp(@NonNull Integer minTemp) {\n this.minTemp = minTemp;\n }",
"public Temperature(double tempDegrees, String tempScale) {\n\t\tdegrees = tempDegrees; scale = tempScale;}",
"public double autoMaintain(double temperature) {\n\t\tthis.temperature = 3.0;\n\t\treturn temperature;\n\t}",
"private void setHeatTemp(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_setHeatTemp\n\n String tempStr = this.heatTempTextField.getText();\n if (Double.parseDouble(tempStr) < 60.0 || Double.parseDouble(tempStr) > 80.0 ){\n\n System.out.println(\"Error. Please set a temperature between 60.0 - 80.0\");\n }else{\n // turn on heat and transmit the temp\n this.setTemp = Double.parseDouble(tempStr);\n this.turnOnHeat(Double.parseDouble(tempStr));\n }\n }",
"public void changeTemperature(final double delta) {\n if (getTemperatureCelsius() + delta > MAXIMUM_POOL_TEMP_CELSIUS) {\n setTemperatureCelsius(MAXIMUM_POOL_TEMP_CELSIUS);\n } else {\n setTemperatureCelsius(Math.max(getTemperatureCelsius() + delta,\n MINIMUM_POOL_TEMP_CELSIUS));\n }\n }",
"public Thermometer(Person person){\r\n super(person);\r\n temperature = new MeasureUnit(\"Celsius\",\"º C\", 1);\r\n }",
"protected abstract boolean setTemperatureSetting1(byte[] edt);",
"public void setW1 (float value) {\r\n w1 = value;\r\n }",
"public Builder setTemperatureBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n temperature_ = value;\n onChanged();\n return this;\n }",
"public void setBodyTemperature(int bodyTemperature) {\n this.bodyTemperature = bodyTemperature;\n }",
"protected void setTemperatureAll(final int temperature) {\n for (final Map.Entry<ProviderName, Provider<?, ?>> entry : providers.entrySet()) {\n try {\n for (final Light light : entry.getValue().getLights()) {\n try {\n entry.getValue().setTemperature(light.getId(), temperature);\n } catch (final Exception e) {\n final String message = String.format(\"Failed to update temperature for %s\",\n entry.getValue().getClass().getSimpleName());\n LOGGER.error(message, e);\n throw new RuntimeException(message, e);\n }\n }\n } catch (final Exception e) {\n final String message = String.format(\"Failed to fetch information for %s\",\n entry.getValue().getClass().getSimpleName());\n LOGGER.error(message, e);\n throw new RuntimeException(message, e);\n }\n }\n }",
"public void displayTemperature(double temperature) {\n\t\toutputPanel.displayTemperature(temperature);\n\t}",
"public void setT1B11D1(Float t1B11D1) {\r\n this.t1B11D1 = t1B11D1;\r\n }",
"public void setHeat1(int x, int y, int z)\n\t{\n\t\tif (!(x < 0 || y < 0 || x >= distance.length || y >= distance[0].length))\n\t\tdistance[x][y][1] = z;\n\t\t\n\t}",
"public Informer reqInformTemperatureSetting2() {\n\t\t\treqInformProperty(EPC_TEMPERATURE_SETTING2);\n\t\t\treturn this;\n\t\t}",
"public double getExternalTemperature() {\r\n return externalTemperature;\r\n }",
"public void setPoint1(Point3D point1) {\r\n this.point1 = point1;\r\n }",
"@Test\n\tpublic void testchangeUnits1(){\t\t//Celcius to Kelvin\n\t\tTemperature data = new Temperature (0, Temperature.Units.CELCIUS);\n\t\tdata.changeUnits(Temperature.Units.KELVIN);\n\t\tassertEquals(data.getUnits() , Temperature.Units.KELVIN);\n\t\tassertTrue(data.getValue() == 273.15);\n\t}",
"@JsonProperty(\"frontPanelTemperature\")\r\n public Double getFrontPanelTemperature() {\r\n return frontPanelTemperature;\r\n }",
"public void setTempCoolDown(int tempCoolDown) {\n this.tempCoolDown = tempCoolDown;\n }",
"public void setLowUnit(TempUnit lowUnit) {\n this.lowUnit = lowUnit;\n }",
"protected void onGetTemperatureSetting1(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"private void setTemperatureMinError (float temperatureMin, Exception e, int error) {\n this.temperatureMin = temperatureMin;\n temperatureMinErrorMessage = e.toString();\n temperatureMinError = error;\n }",
"public Setter reqSetTemperatureSetting2(byte[] edt) {\n\t\t\treqSetProperty(EPC_TEMPERATURE_SETTING2, edt);\n\t\t\treturn this;\n\t\t}",
"private synchronized void setInTemp(String temp)\n {\n Platform.runLater(() -> this.inTemp.setText(temp + \"°\"));\n }",
"void setTempo(int tempo);",
"public void setOutdoorTemperature(Double outdoorTemperature) {\n this.outdoorTemperature = outdoorTemperature;\n }",
"public Getter reqGetTemperatureSetting2() {\n\t\t\treqGetProperty(EPC_TEMPERATURE_SETTING2);\n\t\t\treturn this;\n\t\t}",
"public void setReadingTemperature(String text) {\n\t\ttextReadingTemperature.setText(text);\n\t}",
"public void setHighUnit(TempUnit highUnit) {\n this.highUnit = highUnit;\n }",
"public void setInsideTemperatureFunction(JTextField in, SHSGui frame, Console console, SHSController controller) {\n\t\t// get text value\n\t\tString insideTempStrValue = in.getText();\n\t\t// change str to int\n\t\tint insideTempIntValue = Integer.parseInt(insideTempStrValue);\n\t\t// call set method\n\t\tsetInsideTemp(insideTempIntValue);\n\t\tframe.getIndoorHouseTempValue().setText(insideTempStrValue + \"\\u00B0C\");\n\t\tconsole.msg(\"The temperature for the inside of the house has been set at \" + insideTemp + \"\\u00B0C\");\n\t\tcontroller.appendToLog(\"The temperature for the inside of the house has been set at \" + insideTemp + \"\\u00B0C\");\n\t}",
"public void setValue1(final java.lang.String value1) {\n this.value1 = value1;\n }",
"public void setTemperatura(String temperatura) {\r\n this.temperatura = temperatura;\r\n }",
"public void xsetMinTemperatureC(org.apache.xmlbeans.XmlString minTemperatureC)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(MINTEMPERATUREC$10, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(MINTEMPERATUREC$10);\n }\n target.set(minTemperatureC);\n }\n }",
"public AlarmTemperature getTemperature() {\n\t\treturn this.temperature;\n\t}",
"public void setT1B11H1(Float t1B11H1) {\r\n this.t1B11H1 = t1B11H1;\r\n }",
"public void setMon603a1(double mon603a1) {\r\n\t\tthis.mon603a1 = mon603a1;\r\n\t}",
"public void setVar1(java.lang.Integer value) {\n this.var1 = value;\n }",
"public void updateCelcius(){\n tempInC = ( (tempInF - 32)/9 ) * 5;\n }",
"@Override\n public void setTempo(int tempo) {\n }",
"public void setHumidityValue(double value) {\r\n this.humidityValue = value;\r\n }",
"public float getTemperature() {\n\t\treturn (float) getRawTemperature() / 100f;\n\t}"
] | [
"0.77878654",
"0.7450925",
"0.73944503",
"0.66917384",
"0.65356576",
"0.65303504",
"0.65275687",
"0.64384276",
"0.63072973",
"0.6217388",
"0.6195689",
"0.60024405",
"0.59502506",
"0.59486663",
"0.5943269",
"0.5941811",
"0.59281963",
"0.59238654",
"0.578334",
"0.57160205",
"0.568989",
"0.5683493",
"0.56586206",
"0.5560689",
"0.55458105",
"0.5537392",
"0.55245876",
"0.54875404",
"0.5463375",
"0.54116553",
"0.53901875",
"0.53670233",
"0.53526914",
"0.53442085",
"0.5328344",
"0.5318028",
"0.53161144",
"0.5310149",
"0.52846783",
"0.5251296",
"0.5249255",
"0.5241328",
"0.5217777",
"0.5213592",
"0.5195654",
"0.51773214",
"0.51649815",
"0.51588595",
"0.51555353",
"0.5142128",
"0.5124087",
"0.51076615",
"0.507607",
"0.5075515",
"0.507303",
"0.50702906",
"0.5059736",
"0.5054735",
"0.5044047",
"0.50036526",
"0.5000272",
"0.4994663",
"0.49939847",
"0.49876398",
"0.4979296",
"0.49724844",
"0.49649614",
"0.49629924",
"0.49599153",
"0.49565944",
"0.4954753",
"0.49466708",
"0.4943249",
"0.49408066",
"0.49311674",
"0.4930925",
"0.49259287",
"0.49254876",
"0.4893642",
"0.48858827",
"0.48825023",
"0.4881642",
"0.4874278",
"0.48708618",
"0.4859588",
"0.4857445",
"0.48499277",
"0.48370892",
"0.48313937",
"0.48288748",
"0.48191833",
"0.48114032",
"0.47997358",
"0.47903493",
"0.47893766",
"0.47752967",
"0.47639537",
"0.47613925",
"0.47562414",
"0.47552398"
] | 0.8696229 | 0 |
Gets the value of the containerTemperature2 property. | public double getContainerTemperature2() {
return containerTemperature2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getContainerTemperature1() {\r\n return containerTemperature1;\r\n }",
"public void setContainerTemperature2(double value) {\r\n this.containerTemperature2 = value;\r\n }",
"public double getContainerTemperature3() {\r\n return containerTemperature3;\r\n }",
"public float getTemp2() {\n\t\treturn temp2;\n\t}",
"public void setContainerTemperature1(double value) {\r\n this.containerTemperature1 = value;\r\n }",
"public IntegerProperty getTemp() {\n\t\treturn temperature;\n\t}",
"public Getter reqGetTemperatureSetting2() {\n\t\t\treqGetProperty(EPC_TEMPERATURE_SETTING2);\n\t\t\treturn this;\n\t\t}",
"public String getTemperature() {\n return temperature;\n }",
"public int getTemperature() {\n return temperature;\n }",
"public String getTemperature() {\r\n\t\treturn temperature;\r\n\t}",
"public int getTemperature() {\n return temperature;\n }",
"public String getTemperature() {\n\t\treturn temperature;\n\t}",
"public double getTemperature() {return temperature;}",
"public Float getTemperature () {\n return temperature;\n }",
"public int getTemperature() {\n\t\treturn temperature;\n\t}",
"public void setContainerTemperature3(double value) {\r\n this.containerTemperature3 = value;\r\n }",
"float getTemperature();",
"public float getTemp1() {\n\t\treturn temp1;\n\t}",
"public double getExternalTemperature() {\r\n return externalTemperature;\r\n }",
"public HLAfloat32BE getTemperature() { return this.temperature; }",
"public double getTemperatureCelsius() {\n return temperatureCelsius;\n }",
"public java.lang.String getTemperature() {\n java.lang.Object ref = temperature_;\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 temperature_ = s;\n return s;\n }\n }",
"public float getTemperature() {\n\t\treturn (float) getRawTemperature() / 100f;\n\t}",
"public byte getTemperature_unit() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readByte(__io__address + 11);\n\t\t} else {\n\t\t\treturn __io__block.readByte(__io__address + 11);\n\t\t}\n\t}",
"public java.lang.String getTemperature() {\n java.lang.Object ref = temperature_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n temperature_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public Double getOutdoorTemperature() {\n return outdoorTemperature;\n }",
"public float getTempCelsius() {\n float tempC = 0;\n if (readings.size() > 0) {\n tempC = readings.get(readings.size() - 1).temperature;\n }\n return tempC;\n }",
"public double getHumidityTemperature() {\r\n return humidityTemperature;\r\n }",
"@Override \n public double getTemperature() { \n return pin.getValue();\n }",
"public double getCurrentTemperature() {\n return this.currentTemperature;\n }",
"public AlarmTemperature getTemperature() {\n\t\treturn this.temperature;\n\t}",
"public float getTemp3() {\n\t\treturn temp3;\n\t}",
"public Double getThermistorCelsiusTemperature()\n {\n return finchController.getThermistorCelsiusTemperature();\n }",
"public int getTemperature() {\n return VirtualHardwareManager.getInstance().getTemperature();\n }",
"public double ThermodynamicTemperature() {\n return OCCwrapJavaJNI.Units_Dimensions_ThermodynamicTemperature(swigCPtr, this);\n }",
"@JsonIgnore\n\tpublic DecimalMeasure<Temperature> getTemperatureAsMeasure()\n\t{\n\t\treturn this.temperatureAsMeasure;\n\t}",
"public Getter reqGetTemperatureSetting1() {\n\t\t\treqGetProperty(EPC_TEMPERATURE_SETTING1);\n\t\t\treturn this;\n\t\t}",
"public double getParcelTemperature() {\r\n return parcelTemperature;\r\n }",
"public Double getIndoorTemperature() {\n return indoorTemperature;\n }",
"@Override\r\n public int getTemperature(){\r\n return 10;\r\n }",
"public double GetMashTemperature() {\n\t\treturn msc.GetMashTemperature();\n\t}",
"public String getTempInCelsius() {\n\t\treturn tempInCelsius;\n\t}",
"public java.lang.String getMaxTemperatureC()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAXTEMPERATUREC$8, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public com.google.protobuf.ByteString\n getTemperatureBytes() {\n java.lang.Object ref = temperature_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n temperature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public Object getAirTemperature() {\n\t\treturn null;\n\t}",
"public Informer reqInformTemperatureSetting2() {\n\t\t\treqInformProperty(EPC_TEMPERATURE_SETTING2);\n\t\t\treturn this;\n\t\t}",
"public String getTemperature(JSONObject j) throws JSONException{\n return roundTwoDecimals(Utilities.convertTemp(tempUnits,j.getDouble(\"day\"))) + \"\";\n }",
"public static int getTemperature() {\n\t\t\n\t\tSystem.out.println(\"Enter temperature value : \");\n\t\tint inputValue = sc.nextInt();\n\t\treturn inputValue;\n\t}",
"public com.google.protobuf.ByteString\n getTemperatureBytes() {\n java.lang.Object ref = temperature_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n temperature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@JsonProperty(\"frontPanelTemperature\")\r\n public Double getFrontPanelTemperature() {\r\n return frontPanelTemperature;\r\n }",
"public double getTemp() {\n\t\treturn currentTemp;\n\t}",
"public double getTemp(){\n return currentTemp;\n }",
"public Getter reqGetMeasuredRoomTemperature() {\n\t\t\treqGetProperty(EPC_MEASURED_ROOM_TEMPERATURE);\n\t\t\treturn this;\n\t\t}",
"public java.lang.String getValue2() {\n return this.value2;\n }",
"@Override\n\tpublic int getTemperature() throws emException, TException {\n\t\treturn 0;\n\t}",
"public java.lang.String getMinTemperatureC()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MINTEMPERATUREC$10, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public int getBodyTemperature() {\n return this.bodyTemperature;\n }",
"private double measureTemp() {\n try {\n analog0 = blueTooth.sensor(0);\n analog1 = blueTooth.sensor(1);\n return ((analog0 - analog1) * 5 * 100) / 1024.0;\n } catch (TimeoutException ex) {\n Logger.getLogger(TempMeasure.class.getName()).log(Level.SEVERE, null, ex);\n }\n return ((analog0 - analog1) * 5 * 100) / 1024.0;\n }",
"public Integer getTempo() {\n return this.tempoSpeed;\n }",
"public int getRain2() {\n\t\treturn rain2;\n\t}",
"public T2 getSecond() {\n\t\treturn second;\n\t}",
"double getTempo();",
"public int getTempoSec() {\n return tempoSec;\n }",
"public double getHumidity()\n {\n return humidity;\n }",
"public double getHumidityValue() {\r\n return humidityValue;\r\n }",
"public float getCurrentTemp(){\n return currentTemp;\n }",
"public Object getValue2() { return this.value2; }",
"public double getDoubleValue2() {\n return doubleValue2_;\n }",
"public float getTemps() {\n\t\treturn temps;\n\t}",
"public float getTemperatureMax() {\n return temperatureMax;\n }",
"private void readRealTemp() {\n YCBTClient.getRealTemp(new BleDataResponse() {\n @Override\n public void onDataResponse(int i, float v, HashMap hashMap) {\n if (i == 0) {\n String temp = (String) hashMap.get(\"tempValue\");\n }\n }\n });\n }",
"@JsonProperty(\"ioModuleTemperature\")\r\n public Double getIoModuleTemperature() {\r\n return ioModuleTemperature;\r\n }",
"public Float getT1B11Co2() {\r\n return t1B11Co2;\r\n }",
"public double getDoubleValue2() {\n return doubleValue2_;\n }",
"protected abstract byte[] getTemperatureSetting2();",
"public Integer getSecond(){\n return this.second;\n }",
"public int getTempCoolDown() {\n return tempCoolDown;\n }",
"Long getTemperatureForLastHour();",
"public String getFeelsLikeTempInCelsius() {\n\t\treturn feelsLikeTempInCelsius;\n\t}",
"public TempUnit getHighUnit() {\n return highUnit;\n }",
"public Float getHumidity () {\n return humidity;\n }",
"public double getInputTemperature() throws NumberFormatException {\n\t\treturn inputPanel.getTemperature();\n\t}",
"public float getTemperature(Point3d position){\r\n\t\tBlockPos pos = new BlockPos(position.x, position.y, position.z);\r\n\t\treturn world.getBiome(pos).getTemperature(pos);\r\n\t}",
"public Float getT1B11H2() {\r\n return t1B11H2;\r\n }",
"public Float getT1B11Co2Sd() {\r\n return t1B11Co2Sd;\r\n }",
"public float getTemperatureMin() {\n return temperatureMin;\n }",
"public String getTemperatura() {\r\n return temperatura;\r\n }",
"public org.apache.xmlbeans.XmlString xgetMaxTemperatureC()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(MAXTEMPERATUREC$8, 0);\n return target;\n }\n }",
"public T getSecond() {\n return second;\n }",
"FloatResource temperatureCoefficient();",
"public java.lang.String getMaxTemperatureF()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAXTEMPERATUREF$4, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public U getSecond() {\n return u;\n }",
"public T getSecond() {\n\t\t\treturn t;\n\t\t}",
"public String getConstProperty2() {\n return this.constProperty2;\n }",
"public String getCurrentTempInVancouver() throws IOException, JSONException {\n JSONObject json = readJsonFromUrl(theURL);\n JSONObject main = (JSONObject) json.get(\"main\");\n double kelvinD = 987654;\n int kelvinI = 987654;\n double c;\n try {\n kelvinD = (Double) main.get(\"temp\");\n } catch (ClassCastException e) {\n kelvinI = (Integer) main.get(\"temp\");\n }\n if (kelvinD != 987654) {\n c = kelvinD - 273.15;\n } else {\n c = kelvinI - 273.15;\n }\n double ccOneDecimal = Math.round(c * 10) / 10.0;\n return ccOneDecimal + \"°C\";\n }",
"public V getSecond() {\r\n\t\treturn second;\r\n\t}",
"public java.lang.String getMinTemperatureF()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MINTEMPERATUREF$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public int getTempoMili() {\n return tempoMili;\n }",
"protected byte[] getMeasuredRoomTemperature() {return null;}",
"public float getTempFarenheit() {\n float tempF = 0;\n float tempC;\n if (readings.size() > 0) {\n tempC = readings.get(readings.size() - 1).temperature;\n tempF = (float) ((tempC * 1.8) + 32);\n\n }\n return tempF;\n }"
] | [
"0.8324069",
"0.79197097",
"0.77583045",
"0.73014",
"0.7213975",
"0.70756185",
"0.6980861",
"0.694693",
"0.6942522",
"0.6924695",
"0.69122905",
"0.6892608",
"0.6873116",
"0.6853915",
"0.6839456",
"0.67571974",
"0.6684461",
"0.66818833",
"0.6632255",
"0.65218055",
"0.6515896",
"0.6483697",
"0.6474829",
"0.64649904",
"0.64474493",
"0.64401704",
"0.6431414",
"0.6393242",
"0.63852483",
"0.63795054",
"0.6371222",
"0.63091534",
"0.63071835",
"0.6264865",
"0.6200871",
"0.6184768",
"0.6127375",
"0.6118131",
"0.60916877",
"0.60884064",
"0.60439783",
"0.600333",
"0.5992437",
"0.59846777",
"0.59497553",
"0.59388685",
"0.5919432",
"0.5917264",
"0.5911078",
"0.5903231",
"0.5896195",
"0.5881729",
"0.5857463",
"0.58565104",
"0.58390516",
"0.5836094",
"0.5822791",
"0.5816164",
"0.57985324",
"0.57959044",
"0.5771609",
"0.5756794",
"0.57502633",
"0.5749602",
"0.5735451",
"0.57254547",
"0.5708495",
"0.57076323",
"0.57009804",
"0.5700859",
"0.569719",
"0.5684547",
"0.5662574",
"0.56590205",
"0.5641567",
"0.564128",
"0.5640605",
"0.5629256",
"0.56227547",
"0.5607222",
"0.56009954",
"0.55960256",
"0.55864036",
"0.55849874",
"0.55671406",
"0.5555092",
"0.55508626",
"0.554915",
"0.5544899",
"0.5526523",
"0.5526311",
"0.5516576",
"0.5513007",
"0.55092686",
"0.5495434",
"0.5491095",
"0.5474727",
"0.5470436",
"0.54684573",
"0.54653126"
] | 0.8840983 | 0 |
Sets the value of the containerTemperature2 property. | public void setContainerTemperature2(double value) {
this.containerTemperature2 = value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setContainerTemperature1(double value) {\r\n this.containerTemperature1 = value;\r\n }",
"public double getContainerTemperature2() {\r\n return containerTemperature2;\r\n }",
"public void setContainerTemperature3(double value) {\r\n this.containerTemperature3 = value;\r\n }",
"public double getContainerTemperature1() {\r\n return containerTemperature1;\r\n }",
"public void setTemperature(int value) {\n this.temperature = value;\n }",
"public void setTemperature(Float temperature) {\n this.temperature = temperature;\n }",
"public double getContainerTemperature3() {\r\n return containerTemperature3;\r\n }",
"private void setTemp(int temperature) {\n\t\tthis.temperature.setValue(temperature);\n\t}",
"public void setTemperature(int value) {\n\t\tthis.temperature = value;\n\t}",
"public Setter reqSetTemperatureSetting2(byte[] edt) {\n\t\t\treqSetProperty(EPC_TEMPERATURE_SETTING2, edt);\n\t\t\treturn this;\n\t\t}",
"public void setTemp(int temp) {\n \tthis.temperature = temp;\n }",
"public void setTemperature_unit(byte temperature_unit) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeByte(__io__address + 11, temperature_unit);\n\t\t} else {\n\t\t\t__io__block.writeByte(__io__address + 11, temperature_unit);\n\t\t}\n\t}",
"public void setTemperature(String temperature) {\n this.temperature = temperature;\n }",
"public Getter reqGetTemperatureSetting2() {\n\t\t\treqGetProperty(EPC_TEMPERATURE_SETTING2);\n\t\t\treturn this;\n\t\t}",
"public Informer reqInformTemperatureSetting2() {\n\t\t\treqInformProperty(EPC_TEMPERATURE_SETTING2);\n\t\t\treturn this;\n\t\t}",
"public void setExternalTemperature(double value) {\r\n this.externalTemperature = value;\r\n }",
"public float getTemp2() {\n\t\treturn temp2;\n\t}",
"public void setHumidityTemperature(double value) {\r\n this.humidityTemperature = value;\r\n }",
"public void setOutdoorTemperature(Double outdoorTemperature) {\n this.outdoorTemperature = outdoorTemperature;\n }",
"public void setTemperatureNeededToCookAt(double t) {\r\n temp = t;\r\n }",
"protected void onSetTemperatureSetting2(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"public void setTemperature(int temperature) {\n if (status) {\n this.temperature = temperature;\n } else System.out.println(\"dispozitivul este oprit\");\n }",
"@JsonIgnore\n\tpublic void setTemperatureAsMeasure(DecimalMeasure<Temperature> temperature)\n\t{\n\t\tthis.temperatureAsMeasure = temperature;\n\t}",
"public void setTemperature(double temp){tempval.setText(Double.toString(temp));}",
"public double getTemperature() {return temperature;}",
"public void setParcelTemperature(double value) {\r\n this.parcelTemperature = value;\r\n }",
"protected BiomeGenBase setTemperatureRainfall(float par1, float par2)\n {\n if (par1 > 0.1F && par1 < 0.2F)\n {\n throw new IllegalArgumentException(\"Please avoid temperatures in the range 0.1 - 0.2 because of snow\");\n }\n else\n {\n this.temperature = par1;\n this.rainfall = par2;\n return this;\n }\n }",
"public void setTemperatureCelsius(final double temperatureCelsius) {\n if (temperatureCelsius >= MINIMUM_POOL_TEMP_CELSIUS\n && temperatureCelsius <= MAXIMUM_POOL_TEMP_CELSIUS) {\n this.temperatureCelsius = temperatureCelsius;\n }\n }",
"protected void onSetTemperatureSetting1(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"public IntegerProperty getTemp() {\n\t\treturn temperature;\n\t}",
"public Float getTemperature () {\n return temperature;\n }",
"public void setSecond(T tt) {\n\t\t\tthis.t = tt;\n\t\t}",
"private void updateTemperatureValue(float temperature) {\n \t\t\n \t\tString mValue = null;\n \t\t\n \t\tif(temperatureFormat.equals(\"c\")) {\n \t\t\tmValue = String.format(celsiusFormat, temperature);\n \t\t} else if(temperatureFormat.equals(\"f\")) {\n \t\t\tmValue = String.format(fahrenheitFormat, \n \t\t\t\t\tUnitConversionUtils.comvertTemperature(temperature, UnitConversionUtils.CELSIUS, UnitConversionUtils.FAHRENHEIT));\n \t\t} else {\n \t\t\tmValue = String.format(kelvinFormat, \n \t\t\t\t\tUnitConversionUtils.comvertTemperature(temperature, UnitConversionUtils.CELSIUS, UnitConversionUtils.KELVIN));\n \t\t}\n \t\t\n temperatureValueView.setText(mValue);\n \t}",
"private void updateTemperatureImage(float temperature) {\n \t\t\n \t\t//determine which drawable to use\n \t\tif(temperature < maxColdTemp) {\n \t\t\tif(coldTempDrawable == null) {\n \t\t\t\tcoldTempDrawable = getResources().getDrawable(R.drawable.temperature_cold);\n \t\t\t}\n \t\t\ttemperatureImgView.setImageDrawable(coldTempDrawable);\n \t\t} else if(temperature > minHotTemp) {\n \t\t\tif(hotTempDrawable == null) {\n \t\t\t\thotTempDrawable = getResources().getDrawable(R.drawable.temperature_hot);\n \t\t\t}\n \t\t\ttemperatureImgView.setImageDrawable(hotTempDrawable);\n \t\t} else {\n \t\t\tif(warmTempDrawable == null) {\n \t\t\t\twarmTempDrawable = getResources().getDrawable(R.drawable.temperature_warm);\n \t\t\t}\n \t\t\ttemperatureImgView.setImageDrawable(warmTempDrawable);\n \t\t}\n \t}",
"public float getTemp1() {\n\t\treturn temp1;\n\t}",
"public String getTemperature() {\n return temperature;\n }",
"public int getTemperature() {\n return temperature;\n }",
"public Setter reqSetTemperatureSetting1(byte[] edt) {\n\t\t\treqSetProperty(EPC_TEMPERATURE_SETTING1, edt);\n\t\t\treturn this;\n\t\t}",
"public void setHighUnit(TempUnit highUnit) {\n this.highUnit = highUnit;\n }",
"public String getTemperature() {\r\n\t\treturn temperature;\r\n\t}",
"@Override\n public void skinTemperature(int value, int timestamp) {\n }",
"float getTemperature();",
"public void setSecond(double value) {\n this.second = value;\n }",
"public int getTemperature() {\n return temperature;\n }",
"public String getTemperature() {\n\t\treturn temperature;\n\t}",
"@Override\r\n public int getTemperature(){\r\n return 10;\r\n }",
"public void setKota1(String tempatKerja) {\n\t\t\n\t}",
"public Builder setTemperature(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n temperature_ = value;\n onChanged();\n return this;\n }",
"public Temperature() {\n\t\tsuper();\n\t}",
"public double getTemperatureCelsius() {\n return temperatureCelsius;\n }",
"public int getTemperature() {\n\t\treturn temperature;\n\t}",
"public void setTempCoolDown(int tempCoolDown) {\n this.tempCoolDown = tempCoolDown;\n }",
"public void setValue2(Object value2) { this.value2 = value2; }",
"public HLAfloat32BE getTemperature() { return this.temperature; }",
"public double getExternalTemperature() {\r\n return externalTemperature;\r\n }",
"public Getter reqGetTemperatureSetting1() {\n\t\t\treqGetProperty(EPC_TEMPERATURE_SETTING1);\n\t\t\treturn this;\n\t\t}",
"public Temperature toCelsius(){\n\t\tif (scale==\"F\"){\n\t\t\tdegrees=(degrees-32)*5/9;\n\t\t\tscale=\"C\";}\n\t\t\treturn this;\n\t}",
"public void updateCelcius(){\n tempInC = ( (tempInF - 32)/9 ) * 5;\n }",
"@Override\r\n\tpublic void TemperatureUpdated(Temperature temperature) {\n\t\t\r\n\t\twhile (form == null);\r\n\t\tform.UpdateTemperature(temperature.getValue());\r\n\t}",
"public void setIndoorTemperature(Double indoorTemperature) {\n this.indoorTemperature = indoorTemperature;\n }",
"public void setStartingTemperature(final double temperature) {\r\n\t\tthis.setTemperature(temperature);\r\n\t}",
"public Informer reqInformTemperatureSetting1() {\n\t\t\treqInformProperty(EPC_TEMPERATURE_SETTING1);\n\t\t\treturn this;\n\t\t}",
"protected void setTemperatureAll(final int temperature) {\n for (final Map.Entry<ProviderName, Provider<?, ?>> entry : providers.entrySet()) {\n try {\n for (final Light light : entry.getValue().getLights()) {\n try {\n entry.getValue().setTemperature(light.getId(), temperature);\n } catch (final Exception e) {\n final String message = String.format(\"Failed to update temperature for %s\",\n entry.getValue().getClass().getSimpleName());\n LOGGER.error(message, e);\n throw new RuntimeException(message, e);\n }\n }\n } catch (final Exception e) {\n final String message = String.format(\"Failed to fetch information for %s\",\n entry.getValue().getClass().getSimpleName());\n LOGGER.error(message, e);\n throw new RuntimeException(message, e);\n }\n }\n }",
"public void changeTemperature(final double delta) {\n if (getTemperatureCelsius() + delta > MAXIMUM_POOL_TEMP_CELSIUS) {\n setTemperatureCelsius(MAXIMUM_POOL_TEMP_CELSIUS);\n } else {\n setTemperatureCelsius(Math.max(getTemperatureCelsius() + delta,\n MINIMUM_POOL_TEMP_CELSIUS));\n }\n }",
"@JsonProperty(\"frontPanelTemperature\")\r\n public void setFrontPanelTemperature(Double frontPanelTemperature) {\r\n this.frontPanelTemperature = frontPanelTemperature;\r\n }",
"public Thermometer(Person person){\r\n super(person);\r\n temperature = new MeasureUnit(\"Celsius\",\"º C\", 1);\r\n }",
"protected void onGetTemperatureSetting2(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"public void setSecond(V second) {\r\n\t\tthis.second = second;\r\n\t}",
"protected abstract boolean setTemperatureSetting2(byte[] edt);",
"public Double getOutdoorTemperature() {\n return outdoorTemperature;\n }",
"public void setTempoVolta() {\n LocalDateTime aux;\n aux = this.tempoFinal.minusHours(this.tempoInit.getHour()).minusMinutes(this.tempoInit.getMinute()).minusSeconds(this.tempoInit.getSecond()).minusNanos(this.tempoInit.getNano());\n int mili = aux.getNano()/1000000;\n this.setTempoMili(mili);\n if(this.tempoMili<10){\n this.tempoVolta = aux.getMinute() + \":\" + aux.getSecond() + \".00\" + mili;\n } else if(this.tempoMili<100){\n this.tempoVolta = aux.getMinute() + \":\" + aux.getSecond() + \".0\" + mili;\n }else{\n this.tempoVolta = aux.getMinute() + \":\" + aux.getSecond() + \".\" + mili;\n }\n this.setTempoSec((aux.getMinute()*60)+aux.getSecond());\n if(this.melhorSec == 0 && this.melhorMili == 0){\n this.melhorSec = this.tempoSec;\n this.melhorMili = this.tempoMili;\n } else {\n if(this.tempoSec<this.melhorSec){\n this.melhorSec = this.tempoSec;\n this.melhorMili = this.tempoMili;\n } else if(this.tempoSec==this.melhorSec && this.melhorMili>this.tempoMili){\n this.melhorMili = this.tempoMili;\n } \n }\n }",
"public void setPoint2(Point3D point2) {\r\n this.point2 = point2;\r\n }",
"@JsonProperty(\"ioModuleTemperature\")\r\n public void setIoModuleTemperature(Double ioModuleTemperature) {\r\n this.ioModuleTemperature = ioModuleTemperature;\r\n }",
"public void setBodyTemperature(int bodyTemperature) {\n this.bodyTemperature = bodyTemperature;\n }",
"protected abstract byte[] getTemperatureSetting2();",
"public float getTemp3() {\n\t\treturn temp3;\n\t}",
"public void somaTempo(Tempo tempo2) {\n\t\tint tempo1EmSec = this.horas*3600 + this.minutos*60 + this.segundos;\n\t\tint tempo2EmSec = tempo2.horas*3600 + tempo2.minutos*60 + tempo2.segundos; \n\t\tint resultado = tempo1EmSec + tempo2EmSec;\n\t\t\n\t\t//Atribuindo o resultado da soma dos tempos em horas, minutos e segundos.\n\t\tthis.horas = resultado / 3600;\n\t\tint aux = resultado % 3600;\n\t\tthis.minutos = aux / 60;\n\t\tthis.segundos = aux % 60;\n\t}",
"public void displayTemperature(double temperature) {\n\t\toutputPanel.displayTemperature(temperature);\n\t}",
"public double autoMaintain(double temperature) {\n\t\tthis.temperature = 3.0;\n\t\treturn temperature;\n\t}",
"@Override \n public double getTemperature() { \n return pin.getValue();\n }",
"private void setHeatTemp(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_setHeatTemp\n\n String tempStr = this.heatTempTextField.getText();\n if (Double.parseDouble(tempStr) < 60.0 || Double.parseDouble(tempStr) > 80.0 ){\n\n System.out.println(\"Error. Please set a temperature between 60.0 - 80.0\");\n }else{\n // turn on heat and transmit the temp\n this.setTemp = Double.parseDouble(tempStr);\n this.turnOnHeat(Double.parseDouble(tempStr));\n }\n }",
"void setTemp(String name, Object value);",
"protected abstract boolean setTemperatureSetting1(byte[] edt);",
"public Double getThermistorCelsiusTemperature()\n {\n return finchController.getThermistorCelsiusTemperature();\n }",
"public void setCategory2(String category2) {\n this.category2 = category2;\n }",
"protected void setTemperatureSingle(final ProviderName providerName, final String id, final int temperature) {\n Preconditions.checkNotNull(providerName);\n Preconditions.checkNotNull(id);\n try {\n providers.get(providerName).setTemperature(id, temperature);\n } catch (final Exception e) {\n final String message = String.format(\"Failed to update temperature for %s:%s\",\n providerName.getName(), id);\n LOGGER.error(message, e);\n throw new RuntimeException(message, e);\n }\n }",
"public void setMon603r2(double mon603r2) {\r\n\t\tthis.mon603r2 = mon603r2;\r\n\t}",
"public double getHumidityTemperature() {\r\n return humidityTemperature;\r\n }",
"public final void setTemp(com.mendix.systemwideinterfaces.core.IContext context, java.math.BigDecimal temp)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.Temp.toString(), temp);\n\t}",
"public void setMaxTemperatureC(java.lang.String maxTemperatureC)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAXTEMPERATUREC$8, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MAXTEMPERATUREC$8);\n }\n target.setStringValue(maxTemperatureC);\n }\n }",
"public void setValue2(final java.lang.String value2) {\n this.value2 = value2;\n }",
"public void setHumidityValue(double value) {\r\n this.humidityValue = value;\r\n }",
"@Test\n\tpublic void testSetTemp_1()\n\t\tthrows Exception {\n\t\tSaveScenarioAction fixture = SaveScenarioActionFactory.createInstance();\n\t\tfloat temp = 1.0f;\n\n\t\tfixture.setTemp(temp);\n\n\t\t// add additional test code here\n\t}",
"@JsonProperty(\"frontPanelTemperature\")\r\n public Double getFrontPanelTemperature() {\r\n return frontPanelTemperature;\r\n }",
"@Test\n\tpublic void testchangeUnits1(){\t\t//Celcius to Kelvin\n\t\tTemperature data = new Temperature (0, Temperature.Units.CELCIUS);\n\t\tdata.changeUnits(Temperature.Units.KELVIN);\n\t\tassertEquals(data.getUnits() , Temperature.Units.KELVIN);\n\t\tassertTrue(data.getValue() == 273.15);\n\t}",
"public void setOutsideTemperatureFunction(JTextField out, SHSGui frame, Console console, SHSController controller) {\n\t\t// get text value\n\t\tString outsideTempStrValue = out.getText();\n\t\t// change str to int\n\t\tint outsideTempIntValue = Integer.parseInt(outsideTempStrValue);\n\t\t// call set method\n\t\tsetOutsideTemp(outsideTempIntValue);\n\t\tframe.getOutdoorTemperatureValue().setText(outsideTempStrValue + \"\\u00B0C\");\n\t\tconsole.msg(\"The temperature for the outside of the house has been set at \" + outsideTemp + \"\\u00B0C\");\n\t\tcontroller\n\t\t\t\t.appendToLog(\"The temperature for the outside of the house has been set at \" + outsideTemp + \"\\u00B0C\");\n\t}",
"public void setX2(Double x2) {\n\t\tthis.x2 = x2;\n\t}",
"public void setT1B11Co2(Float t1B11Co2) {\r\n this.t1B11Co2 = t1B11Co2;\r\n }",
"public java.lang.String getTemperature() {\n java.lang.Object ref = temperature_;\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 temperature_ = s;\n return s;\n }\n }",
"public Builder setTemperatureBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n temperature_ = value;\n onChanged();\n return this;\n }"
] | [
"0.79886454",
"0.7435535",
"0.736634",
"0.6890101",
"0.64106786",
"0.63375103",
"0.6331823",
"0.62511134",
"0.62261295",
"0.61535835",
"0.605788",
"0.60258234",
"0.59980035",
"0.5994971",
"0.5965043",
"0.59610933",
"0.5871542",
"0.5760039",
"0.5738554",
"0.5624614",
"0.5624565",
"0.5577431",
"0.55122083",
"0.5507898",
"0.5451672",
"0.5451529",
"0.5402559",
"0.5371789",
"0.53543943",
"0.53421414",
"0.5341923",
"0.52593154",
"0.52533376",
"0.5231821",
"0.5222451",
"0.5193584",
"0.51841235",
"0.51770264",
"0.51759255",
"0.5173559",
"0.5163306",
"0.5125625",
"0.5125191",
"0.51201355",
"0.51127875",
"0.50839794",
"0.5072053",
"0.5059506",
"0.5048488",
"0.50412065",
"0.5032011",
"0.5026819",
"0.5021754",
"0.5019467",
"0.5016687",
"0.5002968",
"0.49997523",
"0.49858314",
"0.49840885",
"0.49729773",
"0.4960803",
"0.49540415",
"0.49531326",
"0.49492508",
"0.493547",
"0.4930444",
"0.49199343",
"0.49111396",
"0.48997256",
"0.48904902",
"0.48802087",
"0.48773894",
"0.48472133",
"0.48273414",
"0.48243013",
"0.48215663",
"0.48201612",
"0.48088405",
"0.48053133",
"0.480448",
"0.4803211",
"0.48024175",
"0.47939277",
"0.47920743",
"0.47834316",
"0.47782615",
"0.4776746",
"0.47664833",
"0.47555074",
"0.47553018",
"0.47468695",
"0.47466826",
"0.47309572",
"0.47186732",
"0.4715765",
"0.47052878",
"0.47039205",
"0.46984386",
"0.4682949",
"0.46822882"
] | 0.8696171 | 0 |
Gets the value of the containerTemperature3 property. | public double getContainerTemperature3() {
return containerTemperature3;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setContainerTemperature3(double value) {\r\n this.containerTemperature3 = value;\r\n }",
"public float getTemp3() {\n\t\treturn temp3;\n\t}",
"public double getContainerTemperature1() {\r\n return containerTemperature1;\r\n }",
"public double getContainerTemperature2() {\r\n return containerTemperature2;\r\n }",
"public java.lang.Double getVar3() {\n return var3;\n }",
"public java.lang.Double getVar3() {\n return var3;\n }",
"public IntegerProperty getTemp() {\n\t\treturn temperature;\n\t}",
"public HLAfloat32BE getTemperature() { return this.temperature; }",
"public void setContainerTemperature1(double value) {\r\n this.containerTemperature1 = value;\r\n }",
"public int getTemperature() {\n\t\treturn temperature;\n\t}",
"public Float getT1B11T3() {\r\n return t1B11T3;\r\n }",
"public int getTemperature() {\n return temperature;\n }",
"public Float getTemperature () {\n return temperature;\n }",
"public String getTemperature() {\r\n\t\treturn temperature;\r\n\t}",
"public String getTemperature() {\n\t\treturn temperature;\n\t}",
"public int getTemperature() {\n return temperature;\n }",
"public String getTemperature() {\n return temperature;\n }",
"public Float getT1B11D3() {\r\n return t1B11D3;\r\n }",
"public String getValue3() { return this.value3; }",
"public float getTemperature(Point3d position){\r\n\t\tBlockPos pos = new BlockPos(position.x, position.y, position.z);\r\n\t\treturn world.getBiome(pos).getTemperature(pos);\r\n\t}",
"public double getDoubleValue3() {\n return doubleValue3_;\n }",
"public float getTemperature() {\n\t\treturn (float) getRawTemperature() / 100f;\n\t}",
"public double getExternalTemperature() {\r\n return externalTemperature;\r\n }",
"public double getDoubleValue3() {\n return doubleValue3_;\n }",
"public void setContainerTemperature2(double value) {\r\n this.containerTemperature2 = value;\r\n }",
"float getTemperature();",
"public double getTemperature() {return temperature;}",
"public float getTempCelsius() {\n float tempC = 0;\n if (readings.size() > 0) {\n tempC = readings.get(readings.size() - 1).temperature;\n }\n return tempC;\n }",
"public Float getT1B11S3() {\r\n return t1B11S3;\r\n }",
"@java.lang.Override\n public godot.wire.Wire.Vector3 getVector3Value() {\n if (typeCase_ == 8) {\n return (godot.wire.Wire.Vector3) type_;\n }\n return godot.wire.Wire.Vector3.getDefaultInstance();\n }",
"public double getTemperatureCelsius() {\n return temperatureCelsius;\n }",
"public String getCol3value() {\n return col3value;\n }",
"@JsonProperty(\"frontPanelTemperature\")\r\n public Double getFrontPanelTemperature() {\r\n return frontPanelTemperature;\r\n }",
"public Float getT1B11P3() {\r\n return t1B11P3;\r\n }",
"public int getTemperature() {\n return VirtualHardwareManager.getInstance().getTemperature();\n }",
"public int getRain3() {\n\t\treturn rain3;\n\t}",
"public java.lang.String getTemperature() {\n java.lang.Object ref = temperature_;\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 temperature_ = s;\n return s;\n }\n }",
"public AlarmTemperature getTemperature() {\n\t\treturn this.temperature;\n\t}",
"public T3 _3() {\n return _3;\n }",
"public java.lang.String getTemperature() {\n java.lang.Object ref = temperature_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n temperature_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public double getField3() {\n return field3_;\n }",
"public float getTemp1() {\n\t\treturn temp1;\n\t}",
"public byte getTemperature_unit() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readByte(__io__address + 11);\n\t\t} else {\n\t\t\treturn __io__block.readByte(__io__address + 11);\n\t\t}\n\t}",
"public double getField3() {\n return field3_;\n }",
"public double getCurrentTemperature() {\n return this.currentTemperature;\n }",
"@java.lang.Override\n public godot.wire.Wire.Vector3 getVector3Value() {\n if (vector3ValueBuilder_ == null) {\n if (typeCase_ == 8) {\n return (godot.wire.Wire.Vector3) type_;\n }\n return godot.wire.Wire.Vector3.getDefaultInstance();\n } else {\n if (typeCase_ == 8) {\n return vector3ValueBuilder_.getMessage();\n }\n return godot.wire.Wire.Vector3.getDefaultInstance();\n }\n }",
"public java.lang.Number getComponent3AsNumber() {\n\t\treturn SwiftFormatUtils.getNumber(getComponent(3));\n\t}",
"public float getW3 () {\r\n return w3;\r\n }",
"public java.lang.Long getC3()\n {\n return this.c3;\n }",
"@Override \n public double getTemperature() { \n return pin.getValue();\n }",
"public double getParcelTemperature() {\r\n return parcelTemperature;\r\n }",
"public Getter reqGetTemperatureSetting1() {\n\t\t\treqGetProperty(EPC_TEMPERATURE_SETTING1);\n\t\t\treturn this;\n\t\t}",
"public Vector3 getValue() {\n\t\treturn this.value;\n\t}",
"public double GetMashTemperature() {\n\t\treturn msc.GetMashTemperature();\n\t}",
"public String getThirdNumber() {\n return thirdNumber;\n }",
"@JsonIgnore\n\tpublic DecimalMeasure<Temperature> getTemperatureAsMeasure()\n\t{\n\t\treturn this.temperatureAsMeasure;\n\t}",
"public double ThermodynamicTemperature() {\n return OCCwrapJavaJNI.Units_Dimensions_ThermodynamicTemperature(swigCPtr, this);\n }",
"public java.lang.String getMinTemperatureC()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MINTEMPERATUREC$10, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public java.lang.Float getVar23() {\n return var23;\n }",
"public Double getThermistorCelsiusTemperature()\n {\n return finchController.getThermistorCelsiusTemperature();\n }",
"public static int getTemperature() {\n\t\t\n\t\tSystem.out.println(\"Enter temperature value : \");\n\t\tint inputValue = sc.nextInt();\n\t\treturn inputValue;\n\t}",
"public double getSide3() {\r\n\t\treturn side3;\r\n\t}",
"public java.lang.Float getVar23() {\n return var23;\n }",
"public Object getAirTemperature() {\n\t\treturn null;\n\t}",
"public T third() {\n return this.third;\n }",
"public double getMon603a3() {\r\n\t\treturn mon603a3;\r\n\t}",
"public double getHumidityTemperature() {\r\n return humidityTemperature;\r\n }",
"public Double getMouse3()\n {\n return this.mouse3;\n }",
"public double getQuiz3()\n\t{\n\t\treturn this.quiz3;\n\t}",
"@Override\r\n public int getTemperature(){\r\n return 10;\r\n }",
"public double getBlockAmbientTemperature(int x, int y, int z) {\n World world = asBukkit();\n if (world == null) return 0;\n Block block = world.getBlockAt(x, y, z);\n double temp = getAmbientTemperature(5, 15, x, y, z);\n\n // Apply modifier if block has sunlight.\n if (block.getLightFromSky() > 0) {\n double directSunAmplifier = TEMPERATURES.getDirectSunAmplifier() - 1;\n byte skyLight = block.getLightFromSky();\n double percent = skyLight / 15D;\n temp *= directSunAmplifier * percent + 1;\n }\n\n // Apply modifier if block is in a \"cave\"\n if (((block.getLightFromSky() <= 6 && block.getLightLevel() < 6)\n || block.getType() == Material.CAVE_AIR)\n && block.getLightLevel() != 15) {\n double amp = TEMPERATURES.getCaveModifier() - 1;\n byte light = block.getLightLevel();\n double percent = (15D - light) / 15D;\n temp *= amp * percent + 1;\n }\n return temp;\n }",
"public java.lang.String getMaxTemperatureC()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAXTEMPERATUREC$8, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public String getTempInCelsius() {\n\t\treturn tempInCelsius;\n\t}",
"public Getter reqGetTemperatureSetting2() {\n\t\t\treqGetProperty(EPC_TEMPERATURE_SETTING2);\n\t\t\treturn this;\n\t\t}",
"godot.wire.Wire.Vector3 getVector3Value();",
"public double getMon603r3() {\r\n\t\treturn mon603r3;\r\n\t}",
"public Getter reqGetMeasuredRoomTemperature() {\n\t\t\treqGetProperty(EPC_MEASURED_ROOM_TEMPERATURE);\n\t\t\treturn this;\n\t\t}",
"public float getTemperatureMin() {\n return temperatureMin;\n }",
"public com.google.protobuf.ByteString\n getTemperatureBytes() {\n java.lang.Object ref = temperature_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n temperature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@java.lang.Override\n public godot.wire.Wire.Vector3OrBuilder getVector3ValueOrBuilder() {\n if (typeCase_ == 8) {\n return (godot.wire.Wire.Vector3) type_;\n }\n return godot.wire.Wire.Vector3.getDefaultInstance();\n }",
"public double getInputTemperature() throws NumberFormatException {\n\t\treturn inputPanel.getTemperature();\n\t}",
"public Point getP3(){\n return this.p3;\n }",
"public String getSpare3() {\r\n return spare3;\r\n }",
"public double getTemp() {\n\t\treturn currentTemp;\n\t}",
"@Override\n\tpublic int getTemperature() throws emException, TException {\n\t\treturn 0;\n\t}",
"public Getter reqGetBathWaterVolumeSetting3() {\n\t\t\taddProperty(EPC_BATH_WATER_VOLUME_SETTING3);\n\t\t\treturn this;\n\t\t}",
"public final float getFloatTemperature(int p_150564_1_, int p_150564_2_, int p_150564_3_)\n {\n if (p_150564_2_ > 64)\n {\n float var4 = (float)field_150605_ac.func_151601_a((double)p_150564_1_ * 1.0D / 8.0D, (double)p_150564_3_ * 1.0D / 8.0D) * 4.0F;\n return this.temperature - (var4 + (float)p_150564_2_ - 64.0F) * 0.05F / 30.0F;\n }\n else\n {\n return this.temperature;\n }\n }",
"public FloatColumn getVolume3() {\n return (FloatColumn) (isText ? textFields.computeIfAbsent(\"volume3\", FloatColumn::new) :\n getBinaryColumn(\"volume3\"));\n }",
"public float getTemps() {\n\t\treturn temps;\n\t}",
"public Double getOutdoorTemperature() {\n return outdoorTemperature;\n }",
"public float getTempFarenheit() {\n float tempF = 0;\n float tempC;\n if (readings.size() > 0) {\n tempC = readings.get(readings.size() - 1).temperature;\n tempF = (float) ((tempC * 1.8) + 32);\n\n }\n return tempF;\n }",
"public Boolean getC3() {\n\t\treturn c3;\n\t}",
"public int getStateValue3() {\n return stateValue3_;\n }",
"public int getValue() {\n\t\treturn 3;\n\t}",
"public com.google.protobuf.ByteString\n getTemperatureBytes() {\n java.lang.Object ref = temperature_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n temperature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String getX3RealStr() {\n this.polySolve();\n return this.x3real;\n }",
"public Double getIndoorTemperature() {\n return indoorTemperature;\n }",
"public int getXD3 ()\n\t{\n\t\treturn xDimension3;\n\t}",
"public float getTemp2() {\n\t\treturn temp2;\n\t}",
"public int getStateValue3() {\n return stateValue3_;\n }"
] | [
"0.81357086",
"0.79319537",
"0.7719091",
"0.7397239",
"0.6956967",
"0.69003826",
"0.6874303",
"0.67264086",
"0.6720815",
"0.6711745",
"0.67093176",
"0.66925687",
"0.66708195",
"0.6661842",
"0.66537416",
"0.6610163",
"0.6558505",
"0.6548452",
"0.6543761",
"0.6534174",
"0.65078443",
"0.6503423",
"0.6503211",
"0.6503208",
"0.64793855",
"0.64314705",
"0.64071524",
"0.6362457",
"0.6357045",
"0.63518524",
"0.63245225",
"0.632232",
"0.62783635",
"0.62635374",
"0.62017745",
"0.62002015",
"0.6192809",
"0.61741376",
"0.6155683",
"0.61400586",
"0.61126447",
"0.6099102",
"0.6086057",
"0.60793895",
"0.6058562",
"0.6053682",
"0.60451156",
"0.60286224",
"0.6004566",
"0.59859973",
"0.59850377",
"0.5964489",
"0.5954058",
"0.591293",
"0.5906657",
"0.58835524",
"0.5882702",
"0.5866656",
"0.5864062",
"0.5863053",
"0.58523345",
"0.5839876",
"0.58381045",
"0.5832224",
"0.5831677",
"0.5814643",
"0.58039445",
"0.57954997",
"0.57938796",
"0.57801807",
"0.57753193",
"0.5771794",
"0.5767325",
"0.5765309",
"0.575472",
"0.57377803",
"0.57180333",
"0.5702985",
"0.56981957",
"0.56936747",
"0.5682445",
"0.5665238",
"0.5656062",
"0.5655188",
"0.56448644",
"0.56430936",
"0.5640563",
"0.5634886",
"0.56309605",
"0.5629869",
"0.56250817",
"0.56219184",
"0.56176424",
"0.5612757",
"0.56089246",
"0.56050014",
"0.5600995",
"0.56008476",
"0.55892426",
"0.55829304"
] | 0.8898245 | 0 |
Sets the value of the containerTemperature3 property. | public void setContainerTemperature3(double value) {
this.containerTemperature3 = value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getContainerTemperature3() {\r\n return containerTemperature3;\r\n }",
"public void setContainerTemperature1(double value) {\r\n this.containerTemperature1 = value;\r\n }",
"public void setContainerTemperature2(double value) {\r\n this.containerTemperature2 = value;\r\n }",
"public float getTemp3() {\n\t\treturn temp3;\n\t}",
"public double getContainerTemperature1() {\r\n return containerTemperature1;\r\n }",
"public void setVar3(java.lang.Double value) {\n this.var3 = value;\n }",
"public void setTemperature(int value) {\n this.temperature = value;\n }",
"public void setTemperature(Float temperature) {\n this.temperature = temperature;\n }",
"public void setTemperature(int value) {\n\t\tthis.temperature = value;\n\t}",
"public com.dj.model.avro.LargeObjectAvro.Builder setVar3(java.lang.Double value) {\n validate(fields()[4], value);\n this.var3 = value;\n fieldSetFlags()[4] = true;\n return this;\n }",
"private void setTemp(int temperature) {\n\t\tthis.temperature.setValue(temperature);\n\t}",
"public void setTemperature_unit(byte temperature_unit) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeByte(__io__address + 11, temperature_unit);\n\t\t} else {\n\t\t\t__io__block.writeByte(__io__address + 11, temperature_unit);\n\t\t}\n\t}",
"public double getContainerTemperature2() {\r\n return containerTemperature2;\r\n }",
"public void setW3 (float value) {\r\n w3 = value;\r\n }",
"public void setValue3(String value3) { this.value3 = value3; }",
"public void setTemp(int temp) {\n \tthis.temperature = temp;\n }",
"public void setExternalTemperature(double value) {\r\n this.externalTemperature = value;\r\n }",
"public void setC3(Boolean c3) {\n\t\tthis.c3 = c3;\n\t}",
"public void setTemperature(String temperature) {\n this.temperature = temperature;\n }",
"public void setTemperatureNeededToCookAt(double t) {\r\n temp = t;\r\n }",
"private void setP3( Point p3 ){\n this.p3=p3;\n }",
"public void setMon603a3(double mon603a3) {\r\n\t\tthis.mon603a3 = mon603a3;\r\n\t}",
"public void setXYZ3(double[] xyz3) throws RuntimeException {\r\n if (xyz3.length != 3) {\r\n throw new RuntimeException(\"xyz3 must be of length 3; found: \"\r\n + xyz3.length);\r\n }\r\n this.setXMLContent(xyz3);\r\n }",
"public void setC3(java.lang.Long c3)\n {\n this.c3 = c3;\n }",
"public void setMon603r3(double mon603r3) {\r\n\t\tthis.mon603r3 = mon603r3;\r\n\t}",
"public void setT1B11T3(Float t1B11T3) {\r\n this.t1B11T3 = t1B11T3;\r\n }",
"@JsonProperty(\"frontPanelTemperature\")\r\n public void setFrontPanelTemperature(Double frontPanelTemperature) {\r\n this.frontPanelTemperature = frontPanelTemperature;\r\n }",
"public void setT1B11D3(Float t1B11D3) {\r\n this.t1B11D3 = t1B11D3;\r\n }",
"@Override\n\tpublic void setNode_3(java.lang.String node_3) {\n\t\t_dictData.setNode_3(node_3);\n\t}",
"public void setSide3(double side3) {\r\n\t\tthis.side3 = side3;\r\n\t}",
"protected void onSetTemperatureSetting1(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"public Builder setField3(double value) {\n bitField0_ |= 0x00000008;\n field3_ = value;\n onChanged();\n return this;\n }",
"public Builder setC3(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n c3_ = value;\n onChanged();\n return this;\n }",
"public com.dj.model.avro.LargeObjectAvro.Builder setVar23(java.lang.Float value) {\n validate(fields()[24], value);\n this.var23 = value;\n fieldSetFlags()[24] = true;\n return this;\n }",
"public void setText3(String text3) {\n this.text3 = text3 == null ? null : text3.trim();\n }",
"protected void onSetTemperatureSetting2(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"public java.lang.Double getVar3() {\n return var3;\n }",
"public Float getT1B11T3() {\r\n return t1B11T3;\r\n }",
"public void setAttribute3(String value) {\n setAttributeInternal(ATTRIBUTE3, value);\n }",
"public void setAttribute3(String value) {\n setAttributeInternal(ATTRIBUTE3, value);\n }",
"public void setAttribute3(String value) {\n setAttributeInternal(ATTRIBUTE3, value);\n }",
"public void setAttribute3(String value) {\n setAttributeInternal(ATTRIBUTE3, value);\n }",
"public void setAttribute3(String value) {\n setAttributeInternal(ATTRIBUTE3, value);\n }",
"public void setAttribute3(String value) {\n setAttributeInternal(ATTRIBUTE3, value);\n }",
"public void setAttribute3(String value)\n {\n setAttributeInternal(ATTRIBUTE3, value);\n }",
"public void setTaxNumber3(\n @Nullable\n final String taxNumber3) {\n rememberChangedField(\"TaxNumber3\", this.taxNumber3);\n this.taxNumber3 = taxNumber3;\n }",
"public HLAfloat32BE getTemperature() { return this.temperature; }",
"public void setParcelTemperature(double value) {\r\n this.parcelTemperature = value;\r\n }",
"public void setTemperatureCelsius(final double temperatureCelsius) {\n if (temperatureCelsius >= MINIMUM_POOL_TEMP_CELSIUS\n && temperatureCelsius <= MAXIMUM_POOL_TEMP_CELSIUS) {\n this.temperatureCelsius = temperatureCelsius;\n }\n }",
"public java.lang.Double getVar3() {\n return var3;\n }",
"public double autoMaintain(double temperature) {\n\t\tthis.temperature = 3.0;\n\t\treturn temperature;\n\t}",
"public void setSpare3(String spare3) {\r\n this.spare3 = spare3;\r\n }",
"public void setTemperature(int temperature) {\n if (status) {\n this.temperature = temperature;\n } else System.out.println(\"dispozitivul este oprit\");\n }",
"@Override\n\tpublic void setField3(int field3) {\n\t\t_employee.setField3(field3);\n\t}",
"@JsonIgnore\n\tpublic void setTemperatureAsMeasure(DecimalMeasure<Temperature> temperature)\n\t{\n\t\tthis.temperatureAsMeasure = temperature;\n\t}",
"public void setThirdSSN(float num3){\n\t\t ThirdSSN = ((num3>0 && num3<=9999)?num3:0);\n\t\t }",
"public IntegerProperty getTemp() {\n\t\treturn temperature;\n\t}",
"public void setInput3(final String input3) {\n this.input3 = input3;\n }",
"@JsonProperty(\"frontPanelTemperature\")\r\n public Double getFrontPanelTemperature() {\r\n return frontPanelTemperature;\r\n }",
"public Float getTemperature () {\n return temperature;\n }",
"public void setT1B11S3(Float t1B11S3) {\r\n this.t1B11S3 = t1B11S3;\r\n }",
"public Builder setVector3Value(godot.wire.Wire.Vector3 value) {\n if (vector3ValueBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n type_ = value;\n onChanged();\n } else {\n vector3ValueBuilder_.setMessage(value);\n }\n typeCase_ = 8;\n return this;\n }",
"public void setFlop3(Card flop3){\n\t\tthis.flop3 = flop3;\n\t\trepaint();\n\t}",
"public final void set(Matrix3d m1) {\n\tm00 = (float)m1.m00; m01 = (float)m1.m01; m02 = (float)m1.m02;\n\tm10 = (float)m1.m10; m11 = (float)m1.m11; m12 = (float)m1.m12;\n\tm20 = (float)m1.m20; m21 = (float)m1.m21; m22 = (float)m1.m22;\n }",
"public Setter reqSetBathWaterVolumeSetting3(byte[] edt) {\n\t\t\taddProperty(EPC_BATH_WATER_VOLUME_SETTING3, edt);\n\t\t\treturn this;\n\t\t}",
"@Override\n\tpublic void setField3(int field3) {\n\t\t_second.setField3(field3);\n\t}",
"public void setTemperature(double temp){tempval.setText(Double.toString(temp));}",
"public Builder setC3Bytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n c3_ = value;\n onChanged();\n return this;\n }",
"public void setHumidityTemperature(double value) {\r\n this.humidityTemperature = value;\r\n }",
"public void setT1B11P3(Float t1B11P3) {\r\n this.t1B11P3 = t1B11P3;\r\n }",
"public T3 _3() {\n return _3;\n }",
"public Getter reqGetBathWaterVolumeSetting3() {\n\t\t\taddProperty(EPC_BATH_WATER_VOLUME_SETTING3);\n\t\t\treturn this;\n\t\t}",
"public Informer reqInformBathWaterVolumeSetting3() {\n\t\t\taddProperty(EPC_BATH_WATER_VOLUME_SETTING3);\n\t\t\treturn this;\n\t\t}",
"public void setVar23(java.lang.Float value) {\n this.var23 = value;\n }",
"private void updateTemperatureValue(float temperature) {\n \t\t\n \t\tString mValue = null;\n \t\t\n \t\tif(temperatureFormat.equals(\"c\")) {\n \t\t\tmValue = String.format(celsiusFormat, temperature);\n \t\t} else if(temperatureFormat.equals(\"f\")) {\n \t\t\tmValue = String.format(fahrenheitFormat, \n \t\t\t\t\tUnitConversionUtils.comvertTemperature(temperature, UnitConversionUtils.CELSIUS, UnitConversionUtils.FAHRENHEIT));\n \t\t} else {\n \t\t\tmValue = String.format(kelvinFormat, \n \t\t\t\t\tUnitConversionUtils.comvertTemperature(temperature, UnitConversionUtils.CELSIUS, UnitConversionUtils.KELVIN));\n \t\t}\n \t\t\n temperatureValueView.setText(mValue);\n \t}",
"public void setCol3value(String col3value) {\n this.col3value = col3value == null ? null : col3value.trim();\n }",
"public double getDoubleValue3() {\n return doubleValue3_;\n }",
"public void set(float x, float y, float z);",
"public Float getT1B11S3() {\r\n return t1B11S3;\r\n }",
"public void setM3u8Settings(M3u8Settings m3u8Settings) {\n this.m3u8Settings = m3u8Settings;\n }",
"public double getDoubleValue3() {\n return doubleValue3_;\n }",
"public float getTemperature(Point3d position){\r\n\t\tBlockPos pos = new BlockPos(position.x, position.y, position.z);\r\n\t\treturn world.getBiome(pos).getTemperature(pos);\r\n\t}",
"public final void set(Matrix3f m1) {\n\tm00 = m1.m00; m01 = m1.m01; m02 = m1.m02;\n\tm10 = m1.m10; m11 = m1.m11; m12 = m1.m12;\n\tm20 = m1.m20; m21 = m1.m21; m22 = m1.m22;\n }",
"public void setReserve3(java.lang.String reserve3) {\n this.reserve3 = reserve3;\n }",
"public void setStar3Count(Integer star3Count) {\n this.star3Count = star3Count;\n }",
"public void setQtyPeriod3 (java.math.BigDecimal QtyPeriod3)\r\n {\r\n set_Value (\"QtyPeriod3\", QtyPeriod3);\r\n \r\n }",
"@Test\n\tpublic void testSetTemp_1()\n\t\tthrows Exception {\n\t\tSaveScenarioAction fixture = SaveScenarioActionFactory.createInstance();\n\t\tfloat temp = 1.0f;\n\n\t\tfixture.setTemp(temp);\n\n\t\t// add additional test code here\n\t}",
"public double getTemperature() {return temperature;}",
"public void setTesuryo03(Long tesuryo03) {\r\n this.tesuryo03 = tesuryo03;\r\n }",
"public Float getT1B11D3() {\r\n return t1B11D3;\r\n }",
"public void setThirdNumber(String thirdNumber) {\n this.thirdNumber = thirdNumber == null ? null : thirdNumber.trim();\n }",
"public void set(AffineTransform3D T) {\r\n\t\tthis.M11 = T.M11;\r\n\t\tthis.M12 = T.M12;\r\n\t\tthis.M13 = T.M13;\r\n\t\tthis.M14 = T.M14;\r\n\t\tthis.M21 = T.M21;\r\n\t\tthis.M22 = T.M22;\r\n\t\tthis.M23 = T.M23;\r\n\t\tthis.M24 = T.M24;\r\n\t\tthis.M31 = T.M31;\r\n\t\tthis.M32 = T.M32;\r\n\t\tthis.M33 = T.M33;\r\n\t\tthis.M34 = T.M34;\r\n\t\tthis.M41 = T.M41;\r\n\t\tthis.M42 = T.M42;\r\n\t\tthis.M43 = T.M43;\r\n\t\tthis.M44 = T.M44;\r\n\t}",
"@Override\n public void skinTemperature(int value, int timestamp) {\n }",
"public String getTemperature() {\r\n\t\treturn temperature;\r\n\t}",
"public void set(Point3 p) {\r\n\t\tx = p.x;\r\n\t\ty = p.y;\r\n\t\tz = p.z;\r\n\t}",
"public void setObj3 (String value) {\r\n Obj3 = value;\r\n }",
"public double getExternalTemperature() {\r\n return externalTemperature;\r\n }",
"public int getTemperature() {\n return temperature;\n }",
"@java.lang.Override\n public godot.wire.Wire.Vector3 getVector3Value() {\n if (typeCase_ == 8) {\n return (godot.wire.Wire.Vector3) type_;\n }\n return godot.wire.Wire.Vector3.getDefaultInstance();\n }",
"public String getTemperature() {\n\t\treturn temperature;\n\t}"
] | [
"0.76092446",
"0.7399833",
"0.7027071",
"0.65550274",
"0.6302711",
"0.6205349",
"0.6178216",
"0.6152165",
"0.601045",
"0.5994928",
"0.59848315",
"0.59225464",
"0.5900823",
"0.5836716",
"0.5811363",
"0.58042526",
"0.5784053",
"0.5702672",
"0.56975335",
"0.5677823",
"0.5553197",
"0.5551193",
"0.5535995",
"0.5528621",
"0.5504856",
"0.55004925",
"0.54923725",
"0.5468236",
"0.54522955",
"0.5444536",
"0.5432303",
"0.54137826",
"0.5376442",
"0.5371491",
"0.5350146",
"0.5326897",
"0.5320637",
"0.5310284",
"0.5299263",
"0.5299263",
"0.5299263",
"0.5299263",
"0.5299263",
"0.5299263",
"0.52953017",
"0.52738297",
"0.5262467",
"0.5255422",
"0.525134",
"0.52488256",
"0.52459055",
"0.52027273",
"0.5192915",
"0.5190556",
"0.5180782",
"0.51765406",
"0.5166741",
"0.5164386",
"0.5159193",
"0.5159167",
"0.51531816",
"0.51462644",
"0.51356506",
"0.51196164",
"0.5099113",
"0.50961083",
"0.509489",
"0.5075807",
"0.50659984",
"0.5064935",
"0.5049826",
"0.50428694",
"0.50267017",
"0.50189674",
"0.5016639",
"0.5010987",
"0.50076914",
"0.4999678",
"0.49936014",
"0.49840152",
"0.4980197",
"0.4976449",
"0.49736908",
"0.49735922",
"0.49686968",
"0.49582282",
"0.49536324",
"0.49486065",
"0.49465144",
"0.49400508",
"0.49387032",
"0.49384353",
"0.49382436",
"0.49361694",
"0.49214703",
"0.49189547",
"0.49182245",
"0.49160323",
"0.49158105",
"0.49081868"
] | 0.88267016 | 0 |
Gets the value of the humidityValue property. | public double getHumidityValue() {
return humidityValue;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getHumidity() {\n\t\treturn humidity;\n\t}",
"public String getHumidity() {\n\t\treturn humidity;\n\t}",
"public double getHumidity()\n {\n return humidity;\n }",
"public Float getHumidity () {\n return humidity;\n }",
"public int getHumidity(){\n return VirtualHardwareManager.getInstance().getHumidity();\n }",
"public double getHumidityTemperature() {\r\n return humidityTemperature;\r\n }",
"public double getHumidity() {\n\t\treturn (int)(Math.random()*101);//模拟一个随机湿度\n\t}",
"public void setHumidityValue(double value) {\r\n this.humidityValue = value;\r\n }",
"public double getValue() {\n\t\treturn sensorval;\n\t}",
"public float getValue() {\n return value;\n }",
"public float getValue() {\n return value_;\n }",
"public final float getValue() {\r\n\t\treturn value;\r\n\t}",
"public float getValue() {\n\t\treturn value;\n\t}",
"public void setHumidityTemperature(double value) {\r\n this.humidityTemperature = value;\r\n }",
"public float getTemperature() {\n\t\treturn (float) getRawTemperature() / 100f;\n\t}",
"public float getValue()\n\t{\n\t\treturn this.value;\n\t}",
"public double getValue() {\n return value_;\n }",
"public double getValue() {\n return value;\n }",
"public double getValue() {\n return value;\n }",
"public double getValue() {\n return value;\n }",
"public float getValue() {\n return value_;\n }",
"public double getValue() {\n return value_;\n }",
"public double getValue() {\n\t\treturn(value);\n\t}",
"public double getValue() {\n return this.value;\n }",
"public double getValue() {\n return this.value;\n }",
"public double getValue() {\n return this._value;\n }",
"public double getValue()\n {\n return this.value;\n }",
"public double getValue() {\n\t\treturn value;\n\t}",
"public double getValue() {\n\t\treturn value;\n\t}",
"public double getValue() {\n\t\treturn value;\n\t}",
"public double getValue()\r\n\t{\r\n\t\treturn (double) value;\r\n\t}",
"public double getValue() {\r\n return this.value;\r\n }",
"public Float getValue() {\n\t\treturn value;\n\t}",
"public Float getValue() {\n\t\treturn value;\n\t}",
"public double getValue() {\n\t\treturn this.value; \n\t}",
"public double getValue() {\r\n\t\treturn value;\r\n\t}",
"public int getTemperature() {\n return VirtualHardwareManager.getInstance().getTemperature();\n }",
"public void setHumidity(Float humidity) {\n this.humidity = humidity;\n }",
"public double getValue() {\n\t\treturn this.value;\n\t}",
"public Double getValue() {\n return value;\n }",
"public Double getValue() {\n return value;\n }",
"public Number getValue() {\n return (Number) getAttributeInternal(VALUE);\n }",
"public Integer getValue() {\n return _value ;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public double getValue() {\n\t\treturn m_dValue;\n\t}",
"public int getValue()\n {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\r\n return value;\r\n }",
"public int getValue() {\n return value_;\n }",
"public int getValue() {\n return mValue;\n }",
"public int getValue() {\n return intValue;\n }",
"public int getValue() {\n return intValue;\n }",
"@Override\n\tpublic double getValue() {\n\t\treturn value;\n\t}",
"public int getValue()\r\n {\r\n return value;\r\n }",
"public double getValue(){\n return value;\n }",
"public int getValue() {\n return value_;\n }",
"public int getValue() {\n return value_;\n }",
"public int getValue()\n {\n return value;\n }",
"public int getTemperature() {\n return temperature;\n }",
"public int getHPValue() {\n return hPValue_;\n }",
"public int getValue ()\r\n\t{\r\n\t\treturn (m_value);\r\n\t}",
"public int getTemperature() {\n return temperature;\n }",
"public int getValue () {\n return value;\n }",
"public int getValue() {\n return _value;\n }",
"public final int getValue() {\n return mValue;\n }",
"double getValue() {\n return mValue;\n }",
"public int getValue() {\n return mValue;\n }",
"public int getValue() {\n return this.value;\n }",
"public int getValue() {\n return this.value;\n }",
"public int getValue() {\n return this.value;\n }",
"public int getValue() {\n return this.value;\n }",
"public int getValue() {\n\t\t\treturn value;\n\t\t}",
"public Integer getVal() {\n return this.value;\n }",
"@Override\n public V getValue() {\n return m_value;\n }",
"public int getValue() \n {\n return value;\n }",
"public int getValue() {\r\n return value;\r\n }",
"public int getHPValue() {\n return hPValue_;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return this.value;\n }",
"public V getValue() {\n return value;\n }"
] | [
"0.80100715",
"0.80100715",
"0.799465",
"0.780267",
"0.7802065",
"0.7712235",
"0.7194963",
"0.69081026",
"0.66909254",
"0.6515009",
"0.64928275",
"0.64863086",
"0.64527977",
"0.6444452",
"0.6441571",
"0.6439433",
"0.6432736",
"0.6412895",
"0.6412895",
"0.6412895",
"0.6388432",
"0.6372339",
"0.6349726",
"0.6348138",
"0.6348138",
"0.6332785",
"0.6324839",
"0.63241214",
"0.63241214",
"0.63241214",
"0.6321256",
"0.6313508",
"0.6306266",
"0.6306266",
"0.63028115",
"0.63027143",
"0.6280536",
"0.6270391",
"0.62687695",
"0.62641835",
"0.62641835",
"0.62174475",
"0.62173545",
"0.62081194",
"0.62081194",
"0.62081194",
"0.62081194",
"0.62081194",
"0.62081194",
"0.62081194",
"0.62081194",
"0.62081194",
"0.62081194",
"0.62081194",
"0.62081194",
"0.62081194",
"0.62081194",
"0.62081194",
"0.61892045",
"0.6184144",
"0.6179623",
"0.6179623",
"0.6172701",
"0.6172621",
"0.616937",
"0.61664087",
"0.61664087",
"0.61659193",
"0.6165374",
"0.6164961",
"0.61621994",
"0.61621994",
"0.616193",
"0.6161801",
"0.6161398",
"0.6161324",
"0.61585814",
"0.6156946",
"0.6153798",
"0.61462927",
"0.6140437",
"0.6138721",
"0.6132509",
"0.6132509",
"0.6132509",
"0.6132509",
"0.61282337",
"0.6124967",
"0.6123881",
"0.6122779",
"0.61146754",
"0.61076707",
"0.61059487",
"0.61059487",
"0.61059487",
"0.61059487",
"0.61059487",
"0.61059487",
"0.6104485",
"0.6102236"
] | 0.8661238 | 0 |
Sets the value of the humidityValue property. | public void setHumidityValue(double value) {
this.humidityValue = value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setHumidityTemperature(double value) {\r\n this.humidityTemperature = value;\r\n }",
"public void setHumidity(Float humidity) {\n this.humidity = humidity;\n }",
"public double getHumidityValue() {\r\n return humidityValue;\r\n }",
"private void updateHumidityValue(float humidity) {\n \t\thumidityValueView.setText(String.format(humidityFormat, humidity));\n \t}",
"public void setHumidityCompensation(short humidity) {\n\t\tcommand(CMD_SET_ABSOLUTE_HUMIDITY, 0, CMD_SET_ABSOLUTE_HUMIDITY_DELAY_MS, humidity);\n\t}",
"public String getHumidity() {\n\t\treturn humidity;\n\t}",
"public String getHumidity() {\n\t\treturn humidity;\n\t}",
"private void updateHumidityValues(BluetoothGattCharacteristic characteristic) {\n double humidity = SensorTagData.extractHumidity(characteristic);\n\n mHumidity.setText(String.format(\"%.0f%%\", humidity));\n }",
"public double getHumidity()\n {\n return humidity;\n }",
"public Float getHumidity () {\n return humidity;\n }",
"public void setTemperature(int value) {\n this.temperature = value;\n }",
"public void setSensorValue (float value) {\n this.currentSensorValue = value;\n }",
"public void setTemperature(int value) {\n\t\tthis.temperature = value;\n\t}",
"public void adaugH(Double humidity) {\r\n\t\tsetH.add(humidity); \r\n\t}",
"public double getHumidityTemperature() {\r\n return humidityTemperature;\r\n }",
"public void setAirHumidity(double airhum){humidityval.setText(Double.toString(airhum));}",
"public void setHigh(double value) {\n this.high = value;\n }",
"public void setValue(Value value) {\n this.value = value;\n }",
"public void setHbarValue(double value) {\n setHbarValue(value, 0);\n }",
"public int getHumidity(){\n return VirtualHardwareManager.getInstance().getHumidity();\n }",
"public void setValue(double value) {\n this.value = value;\n }",
"public void setValue(double value) {\n this.value = value;\n }",
"public void setValue(double value) {\n this.value = value;\n }",
"public void set(T pValue) {\n mValue = pValue;\n }",
"public void setValue(float value) {\n this.value = value;\n }",
"public void setValue(double value) {\n this.value = value; \n }",
"public void setH(double value) {\n this.h = value;\n }",
"public void setValue(double value) {\r\n\t\tthis.value = value;\r\n\t}",
"private void setValue(double value) {\n this.value = value;\n }",
"public void setValue (double value) {\n\t\tthis.value = value;\n\t}",
"public void setHvacStateValue(double value) {\r\n this.hvacStateValue = value;\r\n }",
"public void setValue(double value) {\n\t\tthis.value = value;\n\t}",
"public void setHighUnit(TempUnit highUnit) {\n this.highUnit = highUnit;\n }",
"public void setHealth(double h){\n health = h;\n }",
"public void setHealth(double Health){\r\n health = Health;\r\n }",
"public Builder setHPValue(int value) {\n bitField0_ |= 0x00000002;\n hPValue_ = value;\n onChanged();\n return this;\n }",
"public void setHealth(int h) {\n setStat(h, health);\n }",
"public void setValue(float value) {\n\t\tthis.value = value;\n\t\tthis.rawValue=Float.toString(value);\n\t}",
"public void set(V value) {\n Rules.checkAttributeValue(value);\n checkType(value);\n this.value = value;\n isSleeping = false;\n notifyObservers();\n }",
"public void setValue(Float value) {\n\t\tthis.value = value;\n\t}",
"public final void setValue(final float value) {\r\n\t\tthis.value = value;\r\n\t}",
"public void setValue(T value) {\n\t\tthis.value = value;\n\t}",
"public void setValue(T value) {\n\t\tthis.value = value;\n\t}",
"public double getHumidity() {\n\t\treturn (int)(Math.random()*101);//模拟一个随机湿度\n\t}",
"public void set_value(int value) {\n\t\tthis.value = value;\n\t}",
"public void setValue(T value) {\n this.value = value;\n }",
"public void updateSensorValue(String deviceId, int value) {\n\t\tTransferData data = transferData.get(deviceId);\n\t\tdata.setSignal(value);\n\t\tdata.setValue(Integer.toString(value));\n\t\ttransferData.put(deviceId, data);\n\t}",
"private void setTemp(int temperature) {\n\t\tthis.temperature.setValue(temperature);\n\t}",
"public void setValue(Integer value) {\n _value = value ;\n }",
"public void setHigh(double value){high = value;}",
"public void setValue(final V value) {\n this.value = value;\n }",
"@Override\n public void set(double value)\n {\n final String funcName = \"set\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"value=%f\", value);\n }\n\n if (!TrcUtil.inRange(value, -1.0, 1.0))\n {\n throw new IllegalArgumentException(\"Value must be in the range of -1.0 to 1.0.\");\n }\n\n if (softLowerLimitEnabled && value < 0.0 && getPosition() <= softLowerLimit\n || softUpperLimitEnabled && value > 0.0 && getPosition() >= softUpperLimit)\n {\n value = 0.0;\n }\n\n if (maxVelocity == 0.0)\n {\n currPower = value;\n }\n // else\n // {\n // controlMode = ControlMode.Velocity;\n // value *= maxVelocity;\n // value = TrcUtil.round(value); // Velocity mode is in sensor units/100ms, and sensor units are in integers.\n // }\n motor.set(value);\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"! (value=%f)\", value);\n }\n }",
"public void setSaturation ( float value ) {\n\t\texecute ( handle -> handle.setSaturation ( value ) );\n\t}",
"public void setValue(T value) \n\t{\n\t\tthis.value = value;\n\t}",
"public void setValue(Integer value) {\n\t\tthis.value = value;\n\t}",
"public void setValue(Number value) {\n this.value = value;\n }",
"void setValue(T value)\n\t\t{\n\t\t\tthis.value = value;\n\t\t}",
"public void setWaterMeterTypeEnumValue(Integer waterMeterTypeEnumValue)\r\n\t{\r\n\t\twaterMeterTypeEnum = WaterMeterTypeEnum.enumForValue(waterMeterTypeEnumValue);\r\n\t}",
"void setToValue(int val);",
"public void setValue(float value)\n {\n \tPixelVal = value;\n }",
"public static void changeHealth(int _value){\n healthLabel -= _value;\n healthHUD.setText(String.format(Locale.getDefault(),\"%03d\", healthLabel));\n }",
"public void setValue(short value) {\n this.value = value;\n }",
"public void setValue(float val)\n\t{\n\t\tthis.value = val;\n\t}",
"public void set(int value) {\n\t\ttem = value;\n\t\tSystem.out.println(\"\\tAir conditioner is set to \" + tem +\" degrees\");\n\t}",
"public ProgressBar setValue(double value) {\n if (value >= 0 && value <= maxValue) {\n this.value = value;\n updateWidth();\n }\n return this;\n }",
"public void setValue(short value) {\n this.value = value;\n }",
"public void setValue(int value) {\n this.value = value;\n }",
"public void setValue(int value) {\n this.value = value;\n }",
"public void setTemp(int temp) {\n \tthis.temperature = temp;\n }",
"public void setValue(int value) {\n m_value = value;\n }",
"public void setValue(int value) {\r\n this.value = value;\r\n }",
"@Override\n\tpublic void setValue(int value) {\n\t\tif (!(value >= 0 && value <= this.maxValue)) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"DawsonBallotItem Error - value must be >= 0 and <= to maxValue.\" + \" Invalid value = \" + value);\n\t\t}\n\t\tthis.value = value;\n\n\t}",
"public void setTemperature(int temperature) {\n if (status) {\n this.temperature = temperature;\n } else System.out.println(\"dispozitivul este oprit\");\n }",
"public void set(final V value) {\n\t\tthis.value = value;\n\t}",
"public void setParcelTemperature(double value) {\r\n this.parcelTemperature = value;\r\n }",
"public void setValue(int value) {\n this.value = value;\n }",
"public void setValue(int value) {\n this.value = value;\n }",
"public void setValue(int value) {\n this.value = value;\n }",
"public void setValue(int value)\n {\n this.value = value;\n }",
"public void SetHealth(int h)\n{\n\thealth=h;\n}",
"public void setValue(int value)\n {\n // we have assumed value 1 for X and 10 for O\n this.value = value;\n }",
"public void setContainerTemperature1(double value) {\r\n this.containerTemperature1 = value;\r\n }",
"public void setDmaValue(int value);",
"public void setValue(int value) {\n\t\tm_value = value;\n\t}",
"public void setValue(Integer value) {\n\n if (value != null) {\n if (value < 1 || value > 9) {\n System.out.println(\"Valeur incorrect !\");\n\n } else if (this.value == value) {\n System.out.println(\"Valeur déjà initialisé\");\n } else {\n this.value = value;\n }\n }\n\n }",
"public void setValue(int value) {\r\n\t\tthis.value = value;\r\n\t}",
"public void setValue(int value) {\r\n\t\tthis.value = value;\r\n\t}",
"public void setValue(int value) {\r\n\t\tthis.value = value;\r\n\t}",
"public void setValue(int value) {\r\n\t\tthis.value = value;\r\n\t}",
"public void setValue(int value) {\r\n\t\tthis.value = value;\r\n\t}",
"public void setTemperature(Float temperature) {\n this.temperature = temperature;\n }",
"public void setValue(int value) {\n\t\tif (value < 0)\n\t\t\tthrow new InvalidValueException(value);\n\n\t\tthis.value = value;\n\t}",
"protected void setValue(T value) {\r\n this.value = value;\r\n }",
"public baconhep.TTau.Builder setHpsDisc(double value) {\n validate(fields()[23], value);\n this.hpsDisc = value;\n fieldSetFlags()[23] = true;\n return this; \n }",
"public void setValue(int value) {\n\t\tthis._value = value;\n\t}",
"void setValue(double value);",
"public void setValue(T value) {\n this.mValue = value;\n if (mDependency == null)\n mDependency = new ReactorDependency();\n\n mDependency.changed();\n }",
"public void setValue(int value) {\n\t\tthis.value = value;\n\t}",
"public void setValue(int value) {\n\t\tthis.value = value;\n\t}",
"public void setValue(Object value) {\n this.value = value;\n }"
] | [
"0.7908354",
"0.74230486",
"0.708647",
"0.68533105",
"0.65164447",
"0.62507814",
"0.62507814",
"0.6215269",
"0.6201233",
"0.6144284",
"0.61043894",
"0.61026645",
"0.6013679",
"0.5925997",
"0.59146243",
"0.5760156",
"0.57116896",
"0.5683089",
"0.56787914",
"0.5666641",
"0.5618843",
"0.5618843",
"0.5618843",
"0.5594675",
"0.55937636",
"0.5569058",
"0.5561611",
"0.55332106",
"0.55196095",
"0.55055875",
"0.5491162",
"0.54813105",
"0.5475744",
"0.5444926",
"0.54122037",
"0.5391414",
"0.53888124",
"0.537651",
"0.5358535",
"0.53567463",
"0.53495204",
"0.5338081",
"0.5338081",
"0.5337269",
"0.5335036",
"0.5332973",
"0.53319085",
"0.53272367",
"0.53131944",
"0.53095686",
"0.530848",
"0.5283034",
"0.5281865",
"0.52785623",
"0.52719724",
"0.5265662",
"0.5265453",
"0.52533376",
"0.5252784",
"0.5250326",
"0.52487576",
"0.5243246",
"0.5224983",
"0.5220425",
"0.51979977",
"0.51726556",
"0.5172037",
"0.5172037",
"0.5169153",
"0.51659185",
"0.51369405",
"0.51352984",
"0.5134907",
"0.5130431",
"0.51291764",
"0.5124138",
"0.5124138",
"0.5124138",
"0.5106602",
"0.5099945",
"0.5095568",
"0.50942415",
"0.50918925",
"0.5090685",
"0.5087546",
"0.508715",
"0.508715",
"0.508715",
"0.508715",
"0.508715",
"0.5087084",
"0.50772554",
"0.5074593",
"0.5072905",
"0.5056954",
"0.50514984",
"0.50338024",
"0.5033709",
"0.5033709",
"0.5031889"
] | 0.8510519 | 0 |
Gets the value of the humidityTemperature property. | public double getHumidityTemperature() {
return humidityTemperature;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getHumidityValue() {\r\n return humidityValue;\r\n }",
"public String getHumidity() {\n\t\treturn humidity;\n\t}",
"public String getHumidity() {\n\t\treturn humidity;\n\t}",
"public double getHumidity()\n {\n return humidity;\n }",
"public Float getHumidity () {\n return humidity;\n }",
"public float getTemperature() {\n\t\treturn (float) getRawTemperature() / 100f;\n\t}",
"public int getTemperature() {\n\t\treturn temperature;\n\t}",
"public int getTemperature() {\n return temperature;\n }",
"public int getHumidity(){\n return VirtualHardwareManager.getInstance().getHumidity();\n }",
"public String getTemperature() {\r\n\t\treturn temperature;\r\n\t}",
"public int getTemperature() {\n return temperature;\n }",
"public String getTemperature() {\n\t\treturn temperature;\n\t}",
"public HLAfloat32BE getTemperature() { return this.temperature; }",
"public IntegerProperty getTemp() {\n\t\treturn temperature;\n\t}",
"public String getTemperature() {\n return temperature;\n }",
"public AlarmTemperature getTemperature() {\n\t\treturn this.temperature;\n\t}",
"public int getTemperature() {\n return VirtualHardwareManager.getInstance().getTemperature();\n }",
"public double getTemperature() {return temperature;}",
"public Float getTemperature () {\n return temperature;\n }",
"float getTemperature();",
"public java.lang.String getTemperature() {\n java.lang.Object ref = temperature_;\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 temperature_ = s;\n return s;\n }\n }",
"public Double getThermistorCelsiusTemperature()\n {\n return finchController.getThermistorCelsiusTemperature();\n }",
"public java.lang.String getTemperature() {\n java.lang.Object ref = temperature_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n temperature_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public void setHumidityTemperature(double value) {\r\n this.humidityTemperature = value;\r\n }",
"public double getHumidity() {\n\t\treturn (int)(Math.random()*101);//模拟一个随机湿度\n\t}",
"public double ThermodynamicTemperature() {\n return OCCwrapJavaJNI.Units_Dimensions_ThermodynamicTemperature(swigCPtr, this);\n }",
"public double getExternalTemperature() {\r\n return externalTemperature;\r\n }",
"public com.google.protobuf.ByteString\n getTemperatureBytes() {\n java.lang.Object ref = temperature_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n temperature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public double getCurrentTemperature() {\n return this.currentTemperature;\n }",
"public com.google.protobuf.ByteString\n getTemperatureBytes() {\n java.lang.Object ref = temperature_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n temperature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public double getTemperatureCelsius() {\n return temperatureCelsius;\n }",
"public double GetMashTemperature() {\n\t\treturn msc.GetMashTemperature();\n\t}",
"public byte getTemperature_unit() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readByte(__io__address + 11);\n\t\t} else {\n\t\t\treturn __io__block.readByte(__io__address + 11);\n\t\t}\n\t}",
"@Override\n\tpublic int getTemperature() throws emException, TException {\n\t\treturn 0;\n\t}",
"public double getParcelTemperature() {\r\n return parcelTemperature;\r\n }",
"public float getTempCelsius() {\n float tempC = 0;\n if (readings.size() > 0) {\n tempC = readings.get(readings.size() - 1).temperature;\n }\n return tempC;\n }",
"public static int getTemperature() {\n\t\t\n\t\tSystem.out.println(\"Enter temperature value : \");\n\t\tint inputValue = sc.nextInt();\n\t\treturn inputValue;\n\t}",
"public void setHumidity(Float humidity) {\n this.humidity = humidity;\n }",
"public int getBodyTemperature() {\n return this.bodyTemperature;\n }",
"@JsonIgnore\n\tpublic DecimalMeasure<Temperature> getTemperatureAsMeasure()\n\t{\n\t\treturn this.temperatureAsMeasure;\n\t}",
"private void getTemperatureAndHumidity() {\n // Get Temp and Humid sensors only at PM10 locations, otherwise\n // the connection takes too long to load all\n for (Sensor pm10sensor : this.sensorsPm10) {\n this.sensorsTempHumid.addAll(\n this.getSensors(\n this.readHTML(\n this.buildURLTempHumid(\n pm10sensor.getLatLng()))));\n }\n }",
"@Override \n public double getTemperature() { \n return pin.getValue();\n }",
"Long getTemperatureForLastHour();",
"public Double getOutdoorTemperature() {\n return outdoorTemperature;\n }",
"@Override\r\n public int getTemperature(){\r\n return 10;\r\n }",
"public Double getIndoorTemperature() {\n return indoorTemperature;\n }",
"public float getTemperatureMax() {\n return temperatureMax;\n }",
"public void setHumidityValue(double value) {\r\n this.humidityValue = value;\r\n }",
"public float getTemperatureInFahrenheit() {\n\t\tif(this.metric==Metric.CELSIUS) {\n\t\t\treturn(this.temperature*(9/5)+32);\n\t\t}else if(this.metric==Metric.KELVIN) {\n\t\t\treturn (9*(this.temperature - 273)/5 + 32);\n\t\t}\n\t\treturn this.temperature;\n\t\t\n\t}",
"public Getter reqGetMeasuredRoomTemperature() {\n\t\t\treqGetProperty(EPC_MEASURED_ROOM_TEMPERATURE);\n\t\t\treturn this;\n\t\t}",
"public String getTempInCelsius() {\n\t\treturn tempInCelsius;\n\t}",
"public double getInputTemperature() throws NumberFormatException {\n\t\treturn inputPanel.getTemperature();\n\t}",
"public RandomForestRegressionModel getHumidityModel() {\n\t\treturn humidityModel;\n\t}",
"public float getTemperatureMin() {\n return temperatureMin;\n }",
"public float getTempFarenheit() {\n float tempF = 0;\n float tempC;\n if (readings.size() > 0) {\n tempC = readings.get(readings.size() - 1).temperature;\n tempF = (float) ((tempC * 1.8) + 32);\n\n }\n return tempF;\n }",
"public TempUnit getHighUnit() {\n return highUnit;\n }",
"public static int getModemTemperature() {\n\t\treturn 0;\n\t}",
"private double measureTemp() {\n try {\n analog0 = blueTooth.sensor(0);\n analog1 = blueTooth.sensor(1);\n return ((analog0 - analog1) * 5 * 100) / 1024.0;\n } catch (TimeoutException ex) {\n Logger.getLogger(TempMeasure.class.getName()).log(Level.SEVERE, null, ex);\n }\n return ((analog0 - analog1) * 5 * 100) / 1024.0;\n }",
"public double getTemp() {\n\t\treturn currentTemp;\n\t}",
"public void setTemperature(int value) {\n this.temperature = value;\n }",
"public Getter reqGetMeasuredFloorTemperature() {\n\t\t\treqGetProperty(EPC_MEASURED_FLOOR_TEMPERATURE);\n\t\t\treturn this;\n\t\t}",
"@JsonProperty(\"ioModuleTemperature\")\r\n public Double getIoModuleTemperature() {\r\n return ioModuleTemperature;\r\n }",
"private String HumidityConversion() {\n int reading = ((raw[21] & 0xFC) >> 2) + ((raw[22] & 0x0F) << 6);\n\n // double fixed = (161.29 * (0.000967742 * reading - 0.16)) / (1.0546 - 0.00216 * Double.parseDouble(TemperatureConversion()));\n\n double fixed = (0.204036 * reading - 25.8065) / (1.0546 - 0.00216 * Double.parseDouble(TemperatureConversion())) + 6;\n\n return Double.valueOf(threeDForm.format(fixed)) + \"\";\n }",
"public float getTemps() {\n\t\treturn temps;\n\t}",
"@RequestMapping(\"/temperature\")\n public TemperatureResponse temperature() {\n LOG.info(\"Reading temperature\");\n TemperatureResponse response = new TemperatureResponse();\n response.setHost(getHostname());\n response.setTemperature(getTemperature());\n return response;\n }",
"private void getTemperature() {\r\n \t\r\n \t//Get the date from the DateService class\r\n \tDate theDate = theDateService.getDate(); \r\n \t\r\n \t//Increment the number of readings\r\n \tlngNumberOfReadings ++;\r\n \tdouble temp = 0.0;\r\n \tString rep = \"\";\r\n \t\r\n \t//Assume that the TMP36 is connected to AIN4\r\n \trep = this.theTemperatureService.readTemperature(\"4\");\r\n \tpl(rep);\r\n \ttemp = this.theTemperatureService.getTheTemperature();\r\n \t\r\n \t//All details necessary to send this reading are present so create a new TemperatureReading object\r\n \tTemperatureReading theReading = new TemperatureReading(temp, theDate, lngNumberOfReadings);\r\n \tthis.send(theReading);\r\n \t\r\n }",
"public double getContainerTemperature1() {\r\n return containerTemperature1;\r\n }",
"public String getTemperature(JSONObject j) throws JSONException{\n return roundTwoDecimals(Utilities.convertTemp(tempUnits,j.getDouble(\"day\"))) + \"\";\n }",
"public void setTemperature(Float temperature) {\n this.temperature = temperature;\n }",
"public Object getAirTemperature() {\n\t\treturn null;\n\t}",
"@JsonProperty(\"frontPanelTemperature\")\r\n public Double getFrontPanelTemperature() {\r\n return frontPanelTemperature;\r\n }",
"@Nullable\n Heat getHeat();",
"public float getCurrentTemp(){\n return currentTemp;\n }",
"public String getCpuTemperature_huawei(){\n\n String maxTemp = \"\";\n try {\n RandomAccessFile reader = new RandomAccessFile( \"/sys/class/thermal/thermal_zone1/temp\", \"r\" );\n\n boolean done = false;\n while ( ! done ) {\n String line = reader.readLine();\n if ( null == line ) {\n done = true;\n break;\n }\n maxTemp =line;\n }\n\n } catch ( IOException ex ) {\n ex.printStackTrace();\n }\n return String.valueOf(Double.parseDouble(maxTemp) / 1000);\n }",
"public int getTempCoolDown() {\n return tempCoolDown;\n }",
"public void setTemperature(int value) {\n\t\tthis.temperature = value;\n\t}",
"public double getTemp(){\n return currentTemp;\n }",
"@Override\n public double getBaseTempHeat(Integer thermostatId) {\n\n String ql = \"SELECT te FROM PartitionedThermostatEvent te WHERE te.thermostatId = :thermostatId ORDER BY te.id.eventSysTime DESC\";\n Map<String, Object> paramVals = new HashMap<String, Object>();\n paramVals.put(\"thermostatId\", thermostatId);\n PartitionedThermostatEvent thEvent = findByQuery(ql, paramVals);\n double deltaEE = thEvent.getDeltaEE();\n double baseTemp = thEvent.getNewSetting();\n\n // deltaEE for heat = new setting + base temperature\n // deltaEE is greater than zero or less than zero\n if (deltaEE != 0) {\n baseTemp = baseTemp + deltaEE;\n }\n\n return baseTemp;\n }",
"public int getTempDmg(){\r\n return tDmg;\r\n }",
"public float getmaxTemp() {\n Reading maxTempReading = null;\n float maxTemp = 0;\n if (readings.size() >= 1) {\n maxTemp = readings.get(0).temperature;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).temperature > maxTemp) {\n maxTemp = readings.get(i).temperature;\n }\n }\n } else {\n maxTemp = 0;\n }\n return maxTemp;\n }",
"public static float getCpuTemperature() throws IOException, InterruptedException, NumberFormatException {\n \treturn pi4jSystemInfoConnector.getCpuTemperature();\r\n }",
"public java.lang.String getMaxTemperatureC()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAXTEMPERATUREC$8, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public void setTemp(int temp) {\n \tthis.temperature = temp;\n }",
"public void setTemperature(String temperature) {\n this.temperature = temperature;\n }",
"public double getContainerTemperature2() {\r\n return containerTemperature2;\r\n }",
"public float getTemperature(Point3d position){\r\n\t\tBlockPos pos = new BlockPos(position.x, position.y, position.z);\r\n\t\treturn world.getBiome(pos).getTemperature(pos);\r\n\t}",
"private void readRealTemp() {\n YCBTClient.getRealTemp(new BleDataResponse() {\n @Override\n public void onDataResponse(int i, float v, HashMap hashMap) {\n if (i == 0) {\n String temp = (String) hashMap.get(\"tempValue\");\n }\n }\n });\n }",
"public int[] getTempSensorData()\n {\n return tempSensorData;\n }",
"public double getContainerTemperature3() {\r\n return containerTemperature3;\r\n }",
"public int getTemp(){\n return temp;\n }",
"@JsonProperty(\"exitAirTemperature\")\r\n public Double getExitAirTemperature() {\r\n return exitAirTemperature;\r\n }",
"public Integer getTempo() {\n return this.tempoSpeed;\n }",
"public String getTemperatureInCelcius(float temp)\n {\n\n temp = ((temp - 32) * 5) / 9;\n\n return Float.toString(temp);\n }",
"public java.lang.String getMaxTemperatureF()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAXTEMPERATUREF$4, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"protected byte[] getMeasuredRoomTemperature() {return null;}",
"@NonNull\n public Integer getMaxTemp() {\n return maxTemp;\n }",
"FloatResource temperatureCoefficient();",
"public float getMeilleurTemps() {\n\t\treturn meilleurTemps;\n\t}",
"protected byte[] getMeasuredFloorTemperature() {return null;}",
"public Informer reqInformMeasuredRoomTemperature() {\n\t\t\treqInformProperty(EPC_MEASURED_ROOM_TEMPERATURE);\n\t\t\treturn this;\n\t\t}"
] | [
"0.832581",
"0.81935996",
"0.81935996",
"0.81141484",
"0.7900706",
"0.7868341",
"0.7849709",
"0.7781932",
"0.7749276",
"0.77217007",
"0.7706005",
"0.7688794",
"0.765404",
"0.760532",
"0.7586838",
"0.7582667",
"0.75660676",
"0.749987",
"0.74794066",
"0.7417123",
"0.7326216",
"0.7257442",
"0.7253454",
"0.7243342",
"0.72094846",
"0.7124116",
"0.71135646",
"0.707057",
"0.70691127",
"0.70217806",
"0.70028096",
"0.6952332",
"0.69315505",
"0.69225127",
"0.68445545",
"0.6843852",
"0.6823489",
"0.6797172",
"0.67921126",
"0.67788434",
"0.6770692",
"0.67670596",
"0.67523724",
"0.6686354",
"0.6678801",
"0.65987974",
"0.6586693",
"0.6439969",
"0.6438801",
"0.6429538",
"0.6426117",
"0.6377168",
"0.63699985",
"0.6360997",
"0.6331538",
"0.63132244",
"0.6304227",
"0.6301029",
"0.6241047",
"0.62328845",
"0.62100637",
"0.61979866",
"0.616985",
"0.61489683",
"0.6145752",
"0.6125773",
"0.61082137",
"0.6098707",
"0.6097935",
"0.6080105",
"0.60793924",
"0.60776454",
"0.6064157",
"0.60622525",
"0.60560536",
"0.6054093",
"0.60440105",
"0.6027918",
"0.6006201",
"0.59928584",
"0.59708554",
"0.5968192",
"0.59672403",
"0.59611",
"0.59566647",
"0.5876794",
"0.58742034",
"0.5851623",
"0.5846618",
"0.58393824",
"0.58390874",
"0.58213943",
"0.5818513",
"0.58129203",
"0.58128166",
"0.5811574",
"0.57981855",
"0.5787064",
"0.578207",
"0.57753146"
] | 0.8778658 | 0 |
Sets the value of the humidityTemperature property. | public void setHumidityTemperature(double value) {
this.humidityTemperature = value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setHumidity(Float humidity) {\n this.humidity = humidity;\n }",
"public void setHumidityValue(double value) {\r\n this.humidityValue = value;\r\n }",
"private void setTemp(int temperature) {\n\t\tthis.temperature.setValue(temperature);\n\t}",
"public void setTemperature(int value) {\n this.temperature = value;\n }",
"public void setTemperature(Float temperature) {\n this.temperature = temperature;\n }",
"public void setTemperature(int value) {\n\t\tthis.temperature = value;\n\t}",
"public void setTemp(int temp) {\n \tthis.temperature = temp;\n }",
"public void setTemperature(String temperature) {\n this.temperature = temperature;\n }",
"public double getHumidityTemperature() {\r\n return humidityTemperature;\r\n }",
"public void setTemperature(int temperature) {\n if (status) {\n this.temperature = temperature;\n } else System.out.println(\"dispozitivul este oprit\");\n }",
"public void setHumidityCompensation(short humidity) {\n\t\tcommand(CMD_SET_ABSOLUTE_HUMIDITY, 0, CMD_SET_ABSOLUTE_HUMIDITY_DELAY_MS, humidity);\n\t}",
"public void setTemperature_unit(byte temperature_unit) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeByte(__io__address + 11, temperature_unit);\n\t\t} else {\n\t\t\t__io__block.writeByte(__io__address + 11, temperature_unit);\n\t\t}\n\t}",
"public double getHumidityValue() {\r\n return humidityValue;\r\n }",
"private void updateHumidityValues(BluetoothGattCharacteristic characteristic) {\n double humidity = SensorTagData.extractHumidity(characteristic);\n\n mHumidity.setText(String.format(\"%.0f%%\", humidity));\n }",
"private void updateHumidityValue(float humidity) {\n \t\thumidityValueView.setText(String.format(humidityFormat, humidity));\n \t}",
"public String getHumidity() {\n\t\treturn humidity;\n\t}",
"public String getHumidity() {\n\t\treturn humidity;\n\t}",
"public double getHumidity()\n {\n return humidity;\n }",
"public static void setModemTemperature(String temperature) {\n\t\t\n\t}",
"public Float getHumidity () {\n return humidity;\n }",
"public void adaugH(Double humidity) {\r\n\t\tsetH.add(humidity); \r\n\t}",
"public void setTemperatureCelsius(final double temperatureCelsius) {\n if (temperatureCelsius >= MINIMUM_POOL_TEMP_CELSIUS\n && temperatureCelsius <= MAXIMUM_POOL_TEMP_CELSIUS) {\n this.temperatureCelsius = temperatureCelsius;\n }\n }",
"public void setTemperatureNeededToCookAt(double t) {\r\n temp = t;\r\n }",
"public void setHighUnit(TempUnit highUnit) {\n this.highUnit = highUnit;\n }",
"public void setParcelTemperature(double value) {\r\n this.parcelTemperature = value;\r\n }",
"public void setExternalTemperature(double value) {\r\n this.externalTemperature = value;\r\n }",
"@Override\n\tpublic void Update(float temperature, float humidity, float pressure) {\n\t\ttemperatureSum += temperature;\n\t\tnumReadings++;\n\t\t\n\t\tif (temperature > maxTemp) {\n\t\t\tmaxTemp = temperature;\n\t\t}\n\t\t\n\t\tif (temperature < minTemp) {\n\t\t\tminTemp = temperature;\n\t\t}\n\t}",
"public Builder setTemperature(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n temperature_ = value;\n onChanged();\n return this;\n }",
"private void getTemperatureAndHumidity() {\n // Get Temp and Humid sensors only at PM10 locations, otherwise\n // the connection takes too long to load all\n for (Sensor pm10sensor : this.sensorsPm10) {\n this.sensorsTempHumid.addAll(\n this.getSensors(\n this.readHTML(\n this.buildURLTempHumid(\n pm10sensor.getLatLng()))));\n }\n }",
"public void setBodyTemperature(int bodyTemperature) {\n this.bodyTemperature = bodyTemperature;\n }",
"private void setHeatTemp(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_setHeatTemp\n\n String tempStr = this.heatTempTextField.getText();\n if (Double.parseDouble(tempStr) < 60.0 || Double.parseDouble(tempStr) > 80.0 ){\n\n System.out.println(\"Error. Please set a temperature between 60.0 - 80.0\");\n }else{\n // turn on heat and transmit the temp\n this.setTemp = Double.parseDouble(tempStr);\n this.turnOnHeat(Double.parseDouble(tempStr));\n }\n }",
"private void updateTemperatureValue(float temperature) {\n \t\t\n \t\tString mValue = null;\n \t\t\n \t\tif(temperatureFormat.equals(\"c\")) {\n \t\t\tmValue = String.format(celsiusFormat, temperature);\n \t\t} else if(temperatureFormat.equals(\"f\")) {\n \t\t\tmValue = String.format(fahrenheitFormat, \n \t\t\t\t\tUnitConversionUtils.comvertTemperature(temperature, UnitConversionUtils.CELSIUS, UnitConversionUtils.FAHRENHEIT));\n \t\t} else {\n \t\t\tmValue = String.format(kelvinFormat, \n \t\t\t\t\tUnitConversionUtils.comvertTemperature(temperature, UnitConversionUtils.CELSIUS, UnitConversionUtils.KELVIN));\n \t\t}\n \t\t\n temperatureValueView.setText(mValue);\n \t}",
"public HLAfloat32BE getTemperature() { return this.temperature; }",
"@JsonIgnore\n\tpublic void setTemperatureAsMeasure(DecimalMeasure<Temperature> temperature)\n\t{\n\t\tthis.temperatureAsMeasure = temperature;\n\t}",
"public String getTemperature() {\r\n\t\treturn temperature;\r\n\t}",
"public void setIndoorTemperature(Double indoorTemperature) {\n this.indoorTemperature = indoorTemperature;\n }",
"public int getTemperature() {\n\t\treturn temperature;\n\t}",
"public double getTemperature() {return temperature;}",
"public String getTemperature() {\n\t\treturn temperature;\n\t}",
"public void setTemperature(double temp){tempval.setText(Double.toString(temp));}",
"public void setStartingTemperature(final double temperature) {\r\n\t\tthis.setTemperature(temperature);\r\n\t}",
"public int getTemperature() {\n return temperature;\n }",
"public void setOutdoorTemperature(Double outdoorTemperature) {\n this.outdoorTemperature = outdoorTemperature;\n }",
"protected void setTemperatureSingle(final ProviderName providerName, final String id, final int temperature) {\n Preconditions.checkNotNull(providerName);\n Preconditions.checkNotNull(id);\n try {\n providers.get(providerName).setTemperature(id, temperature);\n } catch (final Exception e) {\n final String message = String.format(\"Failed to update temperature for %s:%s\",\n providerName.getName(), id);\n LOGGER.error(message, e);\n throw new RuntimeException(message, e);\n }\n }",
"public Float getTemperature () {\n return temperature;\n }",
"public String getTemperature() {\n return temperature;\n }",
"public float getTemperature() {\n\t\treturn (float) getRawTemperature() / 100f;\n\t}",
"public void setContainerTemperature1(double value) {\r\n this.containerTemperature1 = value;\r\n }",
"void update(double temperature, double maxTemperature, double minTemperature, int humidity);",
"public void setHealth(int h) {\n setStat(h, health);\n }",
"public void setTempCoolDown(int tempCoolDown) {\n this.tempCoolDown = tempCoolDown;\n }",
"public int getTemperature() {\n return temperature;\n }",
"public int getHumidity(){\n return VirtualHardwareManager.getInstance().getHumidity();\n }",
"public IntegerProperty getTemp() {\n\t\treturn temperature;\n\t}",
"@Override\r\n\tpublic void TemperatureUpdated(Temperature temperature) {\n\t\t\r\n\t\twhile (form == null);\r\n\t\tform.UpdateTemperature(temperature.getValue());\r\n\t}",
"public void setAirHumidity(double airhum){humidityval.setText(Double.toString(airhum));}",
"public AlarmTemperature getTemperature() {\n\t\treturn this.temperature;\n\t}",
"@JsonProperty(\"ioModuleTemperature\")\r\n public void setIoModuleTemperature(Double ioModuleTemperature) {\r\n this.ioModuleTemperature = ioModuleTemperature;\r\n }",
"protected void setTemperatureAll(final int temperature) {\n for (final Map.Entry<ProviderName, Provider<?, ?>> entry : providers.entrySet()) {\n try {\n for (final Light light : entry.getValue().getLights()) {\n try {\n entry.getValue().setTemperature(light.getId(), temperature);\n } catch (final Exception e) {\n final String message = String.format(\"Failed to update temperature for %s\",\n entry.getValue().getClass().getSimpleName());\n LOGGER.error(message, e);\n throw new RuntimeException(message, e);\n }\n }\n } catch (final Exception e) {\n final String message = String.format(\"Failed to fetch information for %s\",\n entry.getValue().getClass().getSimpleName());\n LOGGER.error(message, e);\n throw new RuntimeException(message, e);\n }\n }\n }",
"public void setTempLvl(int tempLvl)\n {\n if (tempLvl >= 45 & tempLvl <= 70) {\n this.tempLvl = tempLvl;\n }\n else {\n throw new IllegalArgumentException(\"Temperature level must be a number between 45 and 70\");\n }\n }",
"protected void onSetTemperatureSetting1(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"public void displayTemperature(double temperature) {\n\t\toutputPanel.displayTemperature(temperature);\n\t}",
"public void setReadingTemperature(String text) {\n\t\ttextReadingTemperature.setText(text);\n\t}",
"float getTemperature();",
"public void setHealth(double h){\n health = h;\n }",
"protected void onSetTemperatureSetting2(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"public com.google.protobuf.ByteString\n getTemperatureBytes() {\n java.lang.Object ref = temperature_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n temperature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public Builder setTemperatureBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n temperature_ = value;\n onChanged();\n return this;\n }",
"public Double getThermistorCelsiusTemperature()\n {\n return finchController.getThermistorCelsiusTemperature();\n }",
"public com.google.protobuf.ByteString\n getTemperatureBytes() {\n java.lang.Object ref = temperature_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n temperature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"private void updateTemperatureImage(float temperature) {\n \t\t\n \t\t//determine which drawable to use\n \t\tif(temperature < maxColdTemp) {\n \t\t\tif(coldTempDrawable == null) {\n \t\t\t\tcoldTempDrawable = getResources().getDrawable(R.drawable.temperature_cold);\n \t\t\t}\n \t\t\ttemperatureImgView.setImageDrawable(coldTempDrawable);\n \t\t} else if(temperature > minHotTemp) {\n \t\t\tif(hotTempDrawable == null) {\n \t\t\t\thotTempDrawable = getResources().getDrawable(R.drawable.temperature_hot);\n \t\t\t}\n \t\t\ttemperatureImgView.setImageDrawable(hotTempDrawable);\n \t\t} else {\n \t\t\tif(warmTempDrawable == null) {\n \t\t\t\twarmTempDrawable = getResources().getDrawable(R.drawable.temperature_warm);\n \t\t\t}\n \t\t\ttemperatureImgView.setImageDrawable(warmTempDrawable);\n \t\t}\n \t}",
"@Override\r\n public int getTemperature(){\r\n return 10;\r\n }",
"public void turnOnHeat(Double temp){\n\n this.selectedTrain.setHeat(1); // turn on heat\n this.selectedTrain.setAC(0); // turn off heat\n\n if (temp == null){ this.selectedTrain.setThermostat(60.0); } // set to default heat\n else{ this.selectedTrain.setThermostat(temp); }\n\n this.operatingLogbook.add(\"Heat Set: \" + temp.toString());\n this.printOperatingLogs();\n }",
"public Temperature(double tempDegrees, String tempScale) {\n\t\tdegrees = tempDegrees; scale = tempScale;}",
"public void setContainerTemperature2(double value) {\r\n this.containerTemperature2 = value;\r\n }",
"public void setThermalTreatment(ThermalTreatment thermalTreatment) {\r\n\t\tthis.thermalTreatment = thermalTreatment;\r\n\t}",
"public int setTemperatureMin(Float temperatureMin) {\n try {\n setTemperatureMin(temperatureMin.floatValue());\n } catch (Exception e) {\n setTemperatureMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return temperatureMinError;\n }",
"@JsonProperty(\"frontPanelTemperature\")\r\n public void setFrontPanelTemperature(Double frontPanelTemperature) {\r\n this.frontPanelTemperature = frontPanelTemperature;\r\n }",
"public Temperature() {\n\t\tsuper();\n\t}",
"public double getHumidity() {\n\t\treturn (int)(Math.random()*101);//模拟一个随机湿度\n\t}",
"public java.lang.String getTemperature() {\n java.lang.Object ref = temperature_;\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 temperature_ = s;\n return s;\n }\n }",
"public void setTemp(double currentTemp) {\n\t\tthis.currentTemp = currentTemp;\n\t}",
"public void setHealth(double Health){\r\n health = Health;\r\n }",
"public void perferredTemperature(double mintemp, double maxtemp) {\n\t\tSystem.out.println(\"Preferredtemperature method\");\n\t\tminTemperature = mintemp;\n\t\tmaxTemperature = maxtemp;\n\t\t\n\t}",
"public int setTemperatureMin(Integer temperatureMin) {\n try {\n setTemperatureMin(temperatureMin.floatValue());\n } catch (Exception e) {\n setTemperatureMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return temperatureMinError;\n }",
"public int getTemperature() {\n return VirtualHardwareManager.getInstance().getTemperature();\n }",
"public void setLowUnit(TempUnit lowUnit) {\n this.lowUnit = lowUnit;\n }",
"public static void setModemTemperatureTimestamp(long time) {\n\t\t\n\t}",
"public Room (Float temperature, Float humidity, Float illumination) {\n this.temperature = temperature;\n this.humidity = humidity;\n this.illumination = illumination;\n }",
"public void setTempAvgDaily(Double tempAvgDaily) {\r\n\t\tthis.tempAvgDaily = tempAvgDaily;\r\n\t}",
"public int setTemperatureMin(String temperatureMin) {\n try {\n setTemperatureMin(new Float(temperatureMin).floatValue());\n } catch (Exception e) {\n setTemperatureMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return temperatureMinError;\n }",
"public double getTemperatureCelsius() {\n return temperatureCelsius;\n }",
"public static void resetModemTemperature() {\n\t\t\n\t}",
"public boolean isHighHumidity()\n {\n return this.rainfall > 0.85F;\n }",
"private void updateHumidityImage(float humidity) {\n \t\t\n \t\t// determine which drawable to use\n \t\tif(humidity < 25) {\n \t\t\tif(humidity25Drawable == null) {\n \t\t\t\thumidity25Drawable = getResources().getDrawable(R.drawable.humidity_25);\n \t\t\t}\n \t\t\thumidityImgView.setImageDrawable(humidity25Drawable);\n \t\t} else if(humidity < 50) {\n \t\t\tif(humidity50Drawable == null) {\n \t\t\t\thumidity50Drawable = getResources().getDrawable(R.drawable.humidity_50);\n \t\t\t}\n \t\t\thumidityImgView.setImageDrawable(humidity50Drawable);\n \t\t} else if(humidity < 75) {\n \t\t\tif(humidity75Drawable == null) {\n \t\t\t\thumidity75Drawable = getResources().getDrawable(R.drawable.humidity_75);\n \t\t\t}\n \t\t\thumidityImgView.setImageDrawable(humidity75Drawable);\n \t\t} else {\n \t\t\tif(humidity100Drawable == null) {\n \t\t\t\thumidity100Drawable = getResources().getDrawable(R.drawable.humidity_100);\n \t\t\t}\n \t\t\thumidityImgView.setImageDrawable(humidity100Drawable);\n \t\t}\n \t}",
"@Override\n public void skinTemperature(int value, int timestamp) {\n }",
"public int setTemperatureMax(Float temperatureMax) {\n try {\n setTemperatureMax(temperatureMax.floatValue());\n } catch (Exception e) {\n setTemperatureMaxError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return temperatureMaxError;\n }",
"public double getExternalTemperature() {\r\n return externalTemperature;\r\n }",
"public java.lang.String getTemperature() {\n java.lang.Object ref = temperature_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n temperature_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@Override\n\tpublic void update(float temp, float humidity, float pressure) {\n\n\t}"
] | [
"0.8010704",
"0.749619",
"0.73966885",
"0.73718035",
"0.7341304",
"0.7279891",
"0.7174402",
"0.7010306",
"0.6985636",
"0.69727176",
"0.67644864",
"0.6621816",
"0.6572174",
"0.6490509",
"0.64781916",
"0.64450747",
"0.64450747",
"0.6273547",
"0.62484044",
"0.62011296",
"0.61191326",
"0.611651",
"0.60930324",
"0.6073293",
"0.60614884",
"0.60533834",
"0.6041338",
"0.6034835",
"0.59877837",
"0.5978461",
"0.5959599",
"0.5952562",
"0.5902421",
"0.5859706",
"0.58447754",
"0.5830887",
"0.5798274",
"0.57948285",
"0.5786565",
"0.5779076",
"0.5776647",
"0.57619107",
"0.57210124",
"0.57117844",
"0.5684205",
"0.56808805",
"0.5653577",
"0.56513333",
"0.5645839",
"0.56424356",
"0.56423134",
"0.56328845",
"0.56291187",
"0.56264806",
"0.56216496",
"0.5619827",
"0.5595694",
"0.55837506",
"0.55729985",
"0.55701214",
"0.5560174",
"0.55588",
"0.5553565",
"0.55403835",
"0.55381775",
"0.5531926",
"0.55250436",
"0.5493262",
"0.54802686",
"0.5446191",
"0.5438647",
"0.54345983",
"0.541197",
"0.53840524",
"0.538378",
"0.5375273",
"0.5355529",
"0.5343941",
"0.533077",
"0.53307503",
"0.53183323",
"0.5314084",
"0.53073275",
"0.52994466",
"0.5297402",
"0.5288811",
"0.5273832",
"0.5268162",
"0.5254547",
"0.5244444",
"0.52355844",
"0.52351606",
"0.5212204",
"0.52077216",
"0.51969445",
"0.5195988",
"0.5194638",
"0.5193322",
"0.51912487",
"0.51903176"
] | 0.84119326 | 0 |
Gets the value of the hvacStateOn property. | public boolean isHvacStateOn() {
return hvacStateOn;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setHvacStateOn(boolean value) {\r\n this.hvacStateOn = value;\r\n }",
"public double getHvacStateValue() {\r\n return hvacStateValue;\r\n }",
"public boolean isOn(){\n return state;\n }",
"public boolean isOn() {\n return onFlag;\n }",
"BooleanProperty getOn();",
"public boolean isOn() {\n return on;\n }",
"public void setHvacStateValue(double value) {\r\n this.hvacStateValue = value;\r\n }",
"protected boolean isOn() {\r\n\t\treturn this.isOn;\r\n\t}",
"@java.lang.Override public int getVehicleStateValue() {\n return vehicleState_;\n }",
"@java.lang.Override public int getVehicleStateValue() {\n return vehicleState_;\n }",
"public boolean isApplianceOn() {\n\n return isOn;\n }",
"public Integer getVoucherState() {\n\t\treturn voucherState;\n\t}",
"public Integer getVehicleState() {\n return vehicleState;\n }",
"public State getInHospital() {\n\t\treturn inHospital;\n\t}",
"public boolean getAtmStatus();",
"public String getOnHoldFlag()\n {\n return (String)getAttributeInternal(ONHOLDFLAG);\n }",
"public Boolean getIsHot() {\n return isHot;\n }",
"public String getAtmState();",
"public String getServicingEventLogInstanceStatus() {\n return servicingEventLogInstanceStatus;\n }",
"public boolean isOn() {\n\t\treturn false;\n\t}",
"public NetworkAdapterDhcpStatus dhcpStatus() {\n return this.dhcpStatus;\n }",
"@Override\r\n public boolean isSwitchOn() {\r\n return isOn;\r\n }",
"public HanaInstancePowerStateEnum powerState() {\n return this.powerState;\n }",
"public String getHousestatus() {\r\n\t\treturn housestatus;\r\n\t}",
"int getDeploymentStateValue();",
"public boolean isOn()\n {\n // Check the pin state\n return ledPin.isHigh();\n }",
"void setOnStatus(Boolean on) {\n this.on = on;\n }",
"public boolean getStatus(){\n return activestatus;\n }",
"public boolean status() {\n return hatchkicker.get();\n }",
"public boolean isActiveAttackState() {\n return this.activeAttackState;\n }",
"public String getOptInStatus() {\n return optInStatus;\n }",
"public String getEventWatchingGoingStatus() {\n\t\treturn eventWatchingGoingStatus;\n\t}",
"public UpnpState getUpnpState();",
"@java.lang.Override public int getCombatStateValue() {\n return combatState_;\n }",
"@java.lang.Override public int getCombatStateValue() {\n return combatState_;\n }",
"public EnumVar getStatus() {\n return status;\n }",
"public String getIfhot() {\n return ifhot;\n }",
"public VpnState getVpnState() {\n return vpnState;\n }",
"public boolean getHIPPAWaiver(){return this.HIPPAWaiver;}",
"public boolean getHasVacuum(){return this.hasVacuum;}",
"public boolean isAlive() {\n\t\treturn aliveStatus;\n\t}",
"public HanaProvisioningStatesEnum provisioningState() {\n return this.provisioningState;\n }",
"public boolean getAlive() {\n return alive_;\n }",
"public boolean isThisThingOn(){\r\n return isActive;\r\n }",
"public boolean isTransactionVATstatus() {\r\n return transactionVATstatus;\r\n }",
"public boolean adsAreOn() {\n return (mAdsOn);\n }",
"public Integer getPhysicalstate() {\r\n return physicalstate;\r\n }",
"public boolean getStatus() {\n\treturn status;\n }",
"public String getSupervisorStatus() {\n\t\treturn supervisorStatus;\n\t}",
"public boolean isOn() throws Exception;",
"public boolean getStatus(){\r\n\t\treturn status;\r\n\t}",
"public boolean isHitState() {\n return hitState;\n }",
"@Override\n\tpublic VehicleStatus getStatus() {\n\t\treturn status;\n\t}",
"public Integer getaState() {\n return aState;\n }",
"@java.lang.Override\n public google.maps.fleetengine.v1.VehicleState getVehicleState() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.VehicleState result = google.maps.fleetengine.v1.VehicleState.valueOf(vehicleState_);\n return result == null ? google.maps.fleetengine.v1.VehicleState.UNRECOGNIZED : result;\n }",
"public boolean getOnBattery()\n\t{\n\t\treturn getBooleanIOValue(\"OnBattery\", false);\n\t}",
"ReadOnlyObjectProperty<VitalModel.State> modelStateTransitionConditionProperty();",
"public Boolean getStatus() {\n return status;\n }",
"public Boolean getStatus() {\n return status;\n }",
"public Boolean getStatus() {\n return status;\n }",
"public String getHomeState()\n {\n return homeState;\n}",
"public int getElevatorState() {\n return elevatorState;\n }",
"public Boolean getState() {\n return state;\n }",
"@java.lang.Override public google.maps.fleetengine.v1.VehicleState getVehicleState() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.VehicleState result = google.maps.fleetengine.v1.VehicleState.valueOf(vehicleState_);\n return result == null ? google.maps.fleetengine.v1.VehicleState.UNRECOGNIZED : result;\n }",
"public boolean vacio(){\n\t\treturn esVacio;\n\t}",
"public boolean getVisualizerOn()\n {\n DsLog.log1(LOG_TAG, \"getVisualizerOn\");\n boolean enabled = false;\n int count = 0;\n\n //\n // Send EFFECT_CMD_GET_PARAM\n // EFFECT_PARAM_VISUALIZER_ENABLE\n //\n byte[] baValue = new byte[4];\n count = getParameter(EFFECT_PARAM_VISUALIZER_ENABLE, baValue);\n if (count != 4)\n {\n Log.e(LOG_TAG, \"getVisualizerOn: Error in getting the visualizer on/off state!\");\n }\n else\n {\n int on = byteArrayToInt32(baValue);\n enabled = (on == DsAkSettings.AK_DS1_FEATURE_ON) ? true : false;\n }\n\n return enabled;\n }",
"boolean getCheckState();",
"public boolean getStatus() {\n return status_;\n }",
"public boolean getStatus() {\n return status_;\n }",
"public boolean getStatus() {\n return status_;\n }",
"public boolean getStatus() {\n\t\treturn status;\n\t}",
"public boolean getStatus() {\n return status_;\n }",
"public boolean getStatus() {\n return status_;\n }",
"public boolean getStatus() {\n return status_;\n }",
"public boolean isUpState() {\n return upState;\n }",
"public boolean getGearState() {\n return shifter.get();\n }",
"public java.lang.Boolean getNicHotPlug() {\r\n return nicHotPlug;\r\n }",
"public synchronized Status getStatus(){\n return state;\n }",
"public String getStatus() {\n return getProperty(Property.STATUS);\n }",
"public boolean getStatus()\n\t{\n\t\treturn getBooleanIOValue(\"Status\", false);\n\t}",
"public boolean getEstado() {\r\n return estado;\r\n }",
"boolean getStatus();",
"boolean getStatus();",
"boolean getStatus();",
"public String getGameStatus() {\n return gameStatus;\n }",
"public Integer getAdmState() {\n return admState;\n }",
"int getMqttEnabledStateValue();",
"public Boolean getStatus() {return status;}",
"public boolean getVIP();",
"public boolean status() {\n return status;\n }",
"public Integer getHousestatusid() {\r\n\t\treturn housestatusid;\r\n\t}",
"public GameStatus getGameStatus() {\n return gameStatus;\n }",
"public b ho(boolean z) {\n return this.fHV.hp(z);\n }",
"public int getServerState() {\n return serverState_;\n }",
"public int getHappiness() {\n \t\treturn happiness;\n \t}",
"public boolean getIsAlive() {\n return isAlive;\n }",
"public boolean getPowerState() {\n\t\tSharedPreferences settings = parentContext.getSharedPreferences(PREFERENCE_FILE,\n\t\t\t\tContext.MODE_PRIVATE);\n\t\treturn settings.getBoolean(TOGGLE_KEY, true);\n\t}",
"public short getStatus()\r\n {\r\n return statusObj.getValue();\r\n }",
"boolean hasState();",
"boolean hasState();"
] | [
"0.81264824",
"0.7535029",
"0.63062656",
"0.6092794",
"0.598566",
"0.59536654",
"0.5860806",
"0.5795082",
"0.57529783",
"0.57185024",
"0.56899184",
"0.56854033",
"0.568108",
"0.5654127",
"0.56527",
"0.56252253",
"0.5491733",
"0.5454812",
"0.5391448",
"0.53739554",
"0.5359428",
"0.53471994",
"0.53342074",
"0.5329835",
"0.5324602",
"0.53133184",
"0.52838707",
"0.5271593",
"0.52458817",
"0.5227627",
"0.5214659",
"0.521244",
"0.520466",
"0.51929456",
"0.5191886",
"0.51587903",
"0.51571566",
"0.51349926",
"0.5121547",
"0.51151556",
"0.5073001",
"0.5071969",
"0.50596756",
"0.5052992",
"0.50461274",
"0.504376",
"0.5033252",
"0.5032988",
"0.50213915",
"0.5013724",
"0.50048476",
"0.5001875",
"0.49989724",
"0.49983898",
"0.49870318",
"0.49827775",
"0.49780875",
"0.49709377",
"0.49709377",
"0.49709377",
"0.49701852",
"0.49639595",
"0.49617463",
"0.4958663",
"0.49499094",
"0.49486783",
"0.49455625",
"0.4942996",
"0.4942996",
"0.4942996",
"0.49419874",
"0.49372828",
"0.49372828",
"0.49372828",
"0.4935358",
"0.49290085",
"0.49266768",
"0.4924191",
"0.4919379",
"0.49093932",
"0.49030006",
"0.4899625",
"0.4899625",
"0.4899625",
"0.48903665",
"0.48895395",
"0.48872235",
"0.4880456",
"0.48748493",
"0.48653886",
"0.4861096",
"0.486072",
"0.4859044",
"0.48588738",
"0.4858113",
"0.4855675",
"0.48526856",
"0.4851473",
"0.48503825",
"0.48503825"
] | 0.86555237 | 0 |
Sets the value of the hvacStateOn property. | public void setHvacStateOn(boolean value) {
this.hvacStateOn = value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isHvacStateOn() {\r\n return hvacStateOn;\r\n }",
"public void setHvacStateValue(double value) {\r\n this.hvacStateValue = value;\r\n }",
"void setOnStatus(Boolean on) {\n this.on = on;\n }",
"public double getHvacStateValue() {\r\n return hvacStateValue;\r\n }",
"public void setOn(){\n state = true;\n //System.out.println(\"Se detecto un requerimiento!\");\n\n }",
"public void setOn(boolean on) {\n\t\tthis.on = on;\n\t}",
"public void setAlive(final Boolean state) {\n this.alive = state;\n this.newState = state;\n }",
"public void turnOn() {\n\t\tOn = true;\n\t}",
"public void turnOn() {\n\t\tisOn = true;\n\t}",
"public void turn_on () {\n this.on = true;\n }",
"public void setOn(boolean arg) {\n isOn = arg;\n }",
"@Override\r\n public void turnOn(){\r\n isOn = true;\r\n Reporter.report(this, Reporter.Msg.SWITCHING_ON);\r\n if (isOn){\r\n engageLoads();\r\n }\r\n }",
"public void setOn(boolean isOn) {\n\t\tisOn = isOn;\n\t}",
"void set(boolean on);",
"public void setAlive(boolean state) {\n alive = state;\n setColor();\n }",
"public void setOn(int on) {\r\n\t\tonkey = on;\r\n\t}",
"public void setAlive(boolean state) {\n\t\talive = state;\n\t}",
"void setAlive(boolean isAlive);",
"public void setIsOn(boolean isOn) {\n synchronized (this) {\n mIsOn = isOn;\n\n GradientDrawable temperatureBall\n = (GradientDrawable) mTemperatureBar.getBackground();\n if (mIsOn) {\n mFloatingText.setVisibility(VISIBLE);\n mOffText.setVisibility(GONE);\n temperatureBall.setColor(getTemperatureColor(mTemperature));\n setAlpha(1.0f);\n } else {\n mOffText.setVisibility(VISIBLE);\n mFloatingText.setVisibility(GONE);\n temperatureBall.setColor(mOffColor);\n setAlpha(.2f);\n }\n }\n }",
"public void setAlive() {\n\t\tif (this.alive == true) {\n\t\t\tthis.alive = false;\n\t\t} else {\n\t\t\tthis.alive = true;\n\t\t}\n\t}",
"public void setAlive(boolean x){\n \talive = x;\r\n }",
"public void turnOn() {\n this.status = true;\n update(this.redValue, this.greenValue, this.blueValue);\n }",
"private void setAlive(boolean value) {\n \n alive_ = value;\n }",
"public void turnOn ()\n\t{\n\t\tthis.powerState = true;\n\t}",
"public void setHasVacuum(boolean value){this.hasVacuum = value;}",
"public void setH(boolean h) {\n\tthis.h = h;\n }",
"public void setSwitchOn() throws UnavailableDeviceException, ClosedDeviceException, IOException{\n\t\tswitch1.setValue(false);\n\t\tthis.switchState = true; \n\t}",
"private void setScreenProperty(boolean on) throws DeviceNotAvailableException {\n CLog.d(\"set svc power stay on \" + on);\n mTestDevice.executeShellCommand(\"svc power stayon \" + on);\n }",
"public void setIsHot(Boolean isHot) {\n this.isHot = isHot;\n }",
"public synchronized void set() {\n this.currentState = EventState.UP;\n notify();\n }",
"void setInvoiced(boolean invoiced);",
"public void switchOn() throws RemoteHomeConnectionException {\n m.sendCommand(parseDeviceIdForMultipleDevice(getRealDeviceId()), \"l\"+getSubDeviceNumber()+\"o\");\n setCurrentState(true);\n }",
"public void set_state(boolean etat) {\r\n this.etat = etat;\r\n }",
"public void setAlive() {\n\t\tif(alive)\n\t\t\talive = false;\n\t\telse\n\t\t\talive = true;\n\t}",
"public void setV(boolean v) {\n\tthis.v = v;\n }",
"public void setTransactionVATstatus(boolean value) {\r\n this.transactionVATstatus = value;\r\n }",
"public void setEnable (boolean state) {\n impl.setEnable (state);\n }",
"public void setOn(final boolean ON) {\n on = ON;\n init(getInnerBounds().width, getInnerBounds().height);\n repaint(getInnerBounds());\n }",
"private void SetState(VehicleState state) {\n this.state = state;\n }",
"public void setShowHBar(Boolean aValue)\n {\n if (aValue==_showHBar) return;\n firePropChange(ShowHBar_Prop, _showHBar, _showHBar=aValue);\n }",
"public void setVIP(boolean VIP);",
"public void servoOn() throws DeviceException {\n \t\ttry {\n \t\t\tcontroller.caput(svonChannel, 1, 2.0);\n \t\t} catch (Throwable e) {\n \t\t\tthrow new DeviceException(\"failed to turn servos on\", e);\n \t\t}\n \t}",
"@Override\n public void set(boolean state) {\n if (isInverted) {\n super.set(!state);\n } else {\n super.set(state);\n }\n }",
"public void setAlive(boolean alive)\n {\n this.alive = alive;\n }",
"public void setStatus(Status vmStatus) {\n this.vmStatus = vmStatus;\n }",
"@objid (\"b47d48ab-22b9-48c5-87ec-5f1f114e042d\")\n void setIsEvent(boolean value);",
"public void setVoucherState(Integer voucherState) {\n\t\tthis.voucherState = voucherState;\n\t}",
"protected void setIsAlive(boolean newValue) {\n\t\tisAlive = newValue;\n\t}",
"public void setOnline() {\n if (this.shutdownButton.isSelected() == false) {\n this.online = true;\n this.statusLed.setStatus(\"ok\");\n this.updateOscilloscopeData();\n }\n }",
"void setShutterLEDState(boolean on);",
"public void setStatus( boolean avtive ){\r\n\t\tthis.activ = avtive;\r\n\t}",
"public void setBreakStatus(boolean state){\n\tonBreak = state;\n\tstateChanged();\n }",
"public void setAlive(boolean alive){\r\n\t\tthis.alive = alive;\r\n\t}",
"public void set_videotoggle_on_off(View view)\n\t{\n\t\tif(VideoModule.isVideoThreadStarted())\n\t\t{\n\t\t\tVideoModule.stopVideoServer();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tVideoModule.startVideoServer();\n\t\t}\n\t\tvideo_toggle_OnOff.setChecked(VideoModule.isVideoThreadStarted());\n\t}",
"@Override\n public void update(float tpf) {\n super.update(tpf);\n\n updateTurn(tpf);\n updateBrakeAndAccelerate();\n\n SignalMode signalMode = getState(SignalMode.class);\n SignalTracker signalTracker = signalMode.getSignalTracker();\n boolean requested = signalTracker.test(SignalMode.F_HORN1.getId());\n MavDemo1.getVehicle().setHornStatus(requested);\n }",
"public void setVehicleState(Integer vehicleState) {\n this.vehicleState = vehicleState;\n }",
"public boolean isOn(){\n return state;\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsiv_intercep.changeSwitchStatus();\n\t\t\t\tboolean status = siv_intercep.getSwitchStatus();\n\t\t\t\tIntent intent = new Intent(SettingActivity.this,\n\t\t\t\t\t\tMgInCallStateService.class);\n\t\t\t\tif (status) {\n\t\t\t\t\tstartService(intent);\n\t\t\t\t} else {\n\t\t\t\t\tstopService(intent);\n\t\t\t\t}\n\t\t\t}",
"void setHappiness(int happiness);",
"public void setAlive(boolean aliveStatus) {\n\t\t\n\t\tthis.aliveStatus = aliveStatus;\n\t}",
"public void setStatus(boolean value) {\n this.status = value;\n }",
"public void setStatus(boolean value) {\n this.status = value;\n }",
"public void setDefilade(int defiladeState);",
"public void turnOn(){\n Logger.getGlobal().log(Level.INFO,\" Turning On..\");\n vendingMachine = new VendingMachine();\n inventoryPopulation();\n idle();\n }",
"public void setShowVBar(Boolean aValue)\n {\n if (aValue==_showVBar) return;\n firePropChange(ShowVBar_Prop, _showVBar, _showVBar=aValue);\n }",
"public void status(boolean b) {\n status = b;\n }",
"public void setStatus(final boolean statusConta) {\r\n this.status = statusConta;\r\n }",
"public void turnOn() {\n Appearance appearance = appearances.get(currentAppearance);\r\n if (appearance.hasAlternativeAppearance()) {\r\n appearance.setSelectedName(appearance.getOnName());\r\n }\r\n }",
"public void setIsOnCondition (boolean IsOnCondition)\n\t{\n\t\tset_Value (COLUMNNAME_IsOnCondition, Boolean.valueOf(IsOnCondition));\n\t}",
"public void noteOn()\n\t{\n\t\ttimeFromOn = 0f;\n\t\tisTurnedOn = true;\n\t\t\n\t\t// ddf: reset these so that the envelope can be retriggered\n\t\ttimeFromOff = -1.f;\n\t\tisTurnedOff = false;\n\t}",
"public void setVpnState(VpnState vpnState) {\n this.vpnState = vpnState;\n }",
"protected void setOnWhenMovementDetected(boolean onWhenMovementDetected) {\n this.onWhenMovementDetected = onWhenMovementDetected;\n }",
"public Builder setVehicleStateValue(int value) {\n \n vehicleState_ = value;\n onChanged();\n return this;\n }",
"@Override\r\n public boolean isSwitchOn() {\r\n return isOn;\r\n }",
"public void setAlive(boolean alive) {\r\n\t\tthis.alive = alive;\r\n\t}",
"public void check_always_true_condition(boolean on){\r\n this.e_always_true_condition = on;\r\n }",
"void setState(boolean state);",
"@Override\n public void powerOn() {\n if(isOn)System.out.println(\"The Projector is already ON!\");\n else{\n System.out.println(\"The Projector is now ON!\");\n isOn = true;\n }\n }",
"public static void bgfx_set_condition(@NativeType(\"bgfx_occlusion_query_handle_t\") short _handle, @NativeType(\"bool\") boolean _visible) {\n long __functionAddress = Functions.set_condition;\n invokeCV(_handle, _visible, __functionAddress);\n }",
"public HomeState(TV tv) {\n this.tv = tv;\n }",
"public synchronized void setMyGameStatus(boolean status)\n {\n \tgameStatus=status;\n }",
"@Override\n\tpublic void setStatus(VehicleStatus status) {\n\t\tthis.status = status;\n\t}",
"public void turnOn() {\n // set the flag\n onFlag = true;\n \n // set the image\n setIcon(Utilities.resizeImageIcon(getWidth(), getHeight(), onImageIcon));\n }",
"public void setRayonH(int rayon){\r\n\t\trayonH = rayon;\r\n\t}",
"public void setBooleanProperty(@PropertyId int propertyId, int area, boolean val)\n throws CarNotConnectedException {\n if (mHvacPropertyIds.contains(propertyId)) {\n mCarPropertyMgr.setBooleanProperty(propertyId, area, val);\n }\n }",
"void setVisivel(boolean visivel);",
"public void configureSwitchOnWhenMovement(boolean onWhenMovementDetected) throws RemoteHomeConnectionException, RemoteHomeManagerException {\n if (onWhenMovementDetected) {\n m.sendCommand(getDeviceId(), \"l1cd\");\n } else {\n m.sendCommand(getDeviceId(), \"l1cc\"); \n }\n setOnWhenMovementDetected(onWhenMovementDetected);\n }",
"public void setStatus(Boolean s){ status = s;}",
"public abstract void setBlinking(boolean status);",
"BooleanProperty getOn();",
"public void setForward(boolean fwdVal) {\n\t\tRelay.Value currentValue = this.get(),\n\t\t\t\t newValue = currentValue;\n\t\t\n\t\tif(currentValue == Relay.Value.kForward) {\n\t\t\tif(!fwdVal)\n\t\t\t\tnewValue = Relay.Value.kOff;\n\t\t} else if(currentValue == Relay.Value.kOff) {\n\t\t\tif(fwdVal)\n\t\t\t\tnewValue = Relay.Value.kForward;\n\t\t} else if(currentValue == Relay.Value.kOn) {\n\t\t\tif(!fwdVal)\n\t\t\t\tnewValue = Relay.Value.kReverse;\n\t\t} else if(currentValue == Relay.Value.kReverse) {\n\t\t\tif(fwdVal)\n\t\t\t\tnewValue = Relay.Value.kOn;\n\t\t}\n\t\t\n\t\tthis.set(newValue);\n\t}",
"public void setVirtualHost(Boolean virtualHostIn) {\n virtualHost = virtualHostIn;\n }",
"public void turnOn(boolean truth) {\r\n setEnabled(truth);\r\n }",
"public void setLaneChange(java.lang.Boolean value);",
"public void setHdbEnabled(boolean isEnable) {\n }",
"public void updateOn(boolean on) {\r\n\t\toutString = \"O\" + on + \"\\n\";\r\n\t\tmyPort.write(outString);\r\n\t\tSystem.out.println(outString);\r\n\t}",
"public boolean isOn() {\n return on;\n }",
"public void setAlive(boolean alive) {\n\t\tthis.alive = alive;\n\t}",
"public void setAlive(boolean alive) {\n\t\tthis.alive = alive;\n\t}",
"public void toggleAlive() {\n\t\tthis.isAlive = !isAlive;\n\t}"
] | [
"0.75395334",
"0.6563858",
"0.6000567",
"0.58157504",
"0.56955844",
"0.5658368",
"0.5631747",
"0.5611537",
"0.5585016",
"0.5573153",
"0.54924846",
"0.5465635",
"0.54577893",
"0.5450115",
"0.5426339",
"0.5394191",
"0.53924614",
"0.5308762",
"0.52858967",
"0.5278176",
"0.5265645",
"0.5264925",
"0.52593654",
"0.5253633",
"0.5238393",
"0.5237417",
"0.51670843",
"0.51544154",
"0.5141559",
"0.51400656",
"0.5134339",
"0.51231545",
"0.51088977",
"0.51011103",
"0.5090542",
"0.5069471",
"0.50658906",
"0.5054332",
"0.5030025",
"0.50262743",
"0.50100213",
"0.5008663",
"0.49732828",
"0.4968728",
"0.4968543",
"0.49682796",
"0.49461144",
"0.4929737",
"0.49276334",
"0.492669",
"0.49238682",
"0.4923258",
"0.4915714",
"0.49118415",
"0.49054012",
"0.49040687",
"0.48965982",
"0.48891124",
"0.48787922",
"0.4858075",
"0.48200846",
"0.48200846",
"0.4812302",
"0.48039532",
"0.479835",
"0.4793231",
"0.47850546",
"0.47836846",
"0.47776",
"0.477643",
"0.4766298",
"0.4763655",
"0.47632983",
"0.47605342",
"0.4758824",
"0.47528002",
"0.47504604",
"0.47495708",
"0.4746223",
"0.4740555",
"0.47354898",
"0.47328898",
"0.47316664",
"0.47299603",
"0.47275537",
"0.4727285",
"0.47236836",
"0.47192124",
"0.47168353",
"0.47163412",
"0.47149563",
"0.4709109",
"0.4703597",
"0.4701418",
"0.46822035",
"0.46819603",
"0.46787912",
"0.4671375",
"0.4671375",
"0.46651864"
] | 0.8950799 | 0 |
Gets the value of the hvacStateValue property. | public double getHvacStateValue() {
return hvacStateValue;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setHvacStateValue(double value) {\r\n this.hvacStateValue = value;\r\n }",
"@java.lang.Override public int getVehicleStateValue() {\n return vehicleState_;\n }",
"@java.lang.Override public int getVehicleStateValue() {\n return vehicleState_;\n }",
"public boolean isHvacStateOn() {\r\n return hvacStateOn;\r\n }",
"int getDeploymentStateValue();",
"public Integer getVoucherState() {\n\t\treturn voucherState;\n\t}",
"@java.lang.Override public int getStateValue() {\n return state_;\n }",
"int getStateValue();",
"int getStateValue();",
"int getStateValue();",
"public void setHvacStateOn(boolean value) {\r\n this.hvacStateOn = value;\r\n }",
"@java.lang.Override public int getStateValue() {\n return state_;\n }",
"@java.lang.Override\n public int getStateValue() {\n return state_;\n }",
"@java.lang.Override\n public int getStateValue() {\n return state_;\n }",
"@java.lang.Override\n public int getStateValue() {\n return state_;\n }",
"public Integer getVehicleState() {\n return vehicleState;\n }",
"int getExecutionStageStateValue();",
"@java.lang.Override\n public int getStateValue() {\n return state_;\n }",
"@java.lang.Override\n public int getStateValue() {\n return state_;\n }",
"@java.lang.Override\n public int getStateValue() {\n return state_;\n }",
"@java.lang.Override public int getCombatStateValue() {\n return combatState_;\n }",
"@java.lang.Override public int getCombatStateValue() {\n return combatState_;\n }",
"@java.lang.Override public google.maps.fleetengine.v1.VehicleState getVehicleState() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.VehicleState result = google.maps.fleetengine.v1.VehicleState.valueOf(vehicleState_);\n return result == null ? google.maps.fleetengine.v1.VehicleState.UNRECOGNIZED : result;\n }",
"@java.lang.Override\n public google.maps.fleetengine.v1.VehicleState getVehicleState() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.VehicleState result = google.maps.fleetengine.v1.VehicleState.valueOf(vehicleState_);\n return result == null ? google.maps.fleetengine.v1.VehicleState.UNRECOGNIZED : result;\n }",
"public VpnState getVpnState() {\n return vpnState;\n }",
"public V value()\n\t\t{\n\t\t\treturn _value;\n\t\t}",
"public Integer getaState() {\n return aState;\n }",
"public int getTransactionStateValue(int index) {\n return transactionState_.get(index);\n }",
"int getStateValue2();",
"@Override\n public V getValue() {\n return m_value;\n }",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"public int getStatusValue() {\n return status_;\n }",
"public int getStatusValue() {\n return status_;\n }",
"public int getStatusValue() {\n return status_;\n }",
"public int getStatusValue() {\n return status_;\n }",
"public int getStateValue1() {\n return stateValue1_;\n }",
"@java.lang.Override\n public int getTransactionStateValue(int index) {\n return transactionState_.get(index);\n }",
"public V getValue() {\n\t\treturn value;\n\t}",
"public V getValue() {\n\t\treturn value;\n\t}",
"public int getStateValue1() {\n return stateValue1_;\n }",
"public int getStatusValue() {\n return status_;\n }",
"public int getStatusValue() {\n return status_;\n }",
"public int getStatusValue() {\n return status_;\n }",
"public int getStatusValue() {\n return status_;\n }",
"public int getStatusValue() {\n return status_;\n }",
"public int getStatusValue() {\n return status_;\n }",
"public int getStatusValue() {\n return status_;\n }",
"public V getValue() {\r\n\t\treturn value;\r\n\t}",
"protected V getValue() {\n return this.value;\n }",
"public V getValue()\r\n\t\t{\r\n\t\t\treturn val;\r\n\t\t}",
"public String get_svrstate() throws Exception {\n\t\treturn this.svrstate;\n\t}",
"public int getStatusValue() {\n return status_;\n }",
"public int getStatusValue() {\n return status_;\n }",
"public int getStatusValue() {\n return status_;\n }",
"public V getValue() {\n return value;\n }",
"public V getValue() {\n return value;\n }",
"public V getValue() {\n return value;\n }",
"public V getValue() {\n return value;\n }",
"public V getValue() {\n return value;\n }",
"public V getValue() {\n return value;\n }",
"@java.lang.Override public int getStatusValue() {\n return status_;\n }",
"@java.lang.Override public int getStatusValue() {\n return status_;\n }",
"@java.lang.Override public int getStatusValue() {\n return status_;\n }",
"@java.lang.Override public int getStatusValue() {\n return status_;\n }",
"@java.lang.Override public int getStatusValue() {\n return status_;\n }",
"@java.lang.Override public int getStatusValue() {\n return status_;\n }",
"@java.lang.Override public int getStatusValue() {\n return status_;\n }",
"@java.lang.Override public int getStatusValue() {\n return status_;\n }",
"@java.lang.Override public int getStatusValue() {\n return status_;\n }",
"@java.lang.Override public int getStatusValue() {\n return status_;\n }",
"int getStateValue3();",
"@java.lang.Override public int getStatusValue() {\n return status_;\n }",
"public int getHPValue() {\n return hPValue_;\n }",
"@java.lang.Override public int getStatusValue() {\n return status_;\n }",
"@java.lang.Override public int getStatusValue() {\n return status_;\n }",
"@java.lang.Override public int getStatusValue() {\n return status_;\n }",
"@java.lang.Override public int getStatusValue() {\n return status_;\n }",
"@java.lang.Override public int getStatusValue() {\n return status_;\n }",
"@java.lang.Override public int getStatusValue() {\n return status_;\n }",
"@java.lang.Override public int getStatusValue() {\n return status_;\n }",
"@java.lang.Override public int getStatusValue() {\n return status_;\n }"
] | [
"0.6844658",
"0.6694851",
"0.66116977",
"0.64903986",
"0.63612294",
"0.61679375",
"0.6124196",
"0.6112105",
"0.6112105",
"0.6112105",
"0.6078525",
"0.6069734",
"0.60579",
"0.60579",
"0.60579",
"0.60387254",
"0.6009159",
"0.5936763",
"0.5936763",
"0.5936763",
"0.5923115",
"0.58798087",
"0.5647597",
"0.56363636",
"0.56270593",
"0.5608825",
"0.5589526",
"0.55687624",
"0.5538018",
"0.55360234",
"0.55300903",
"0.55300903",
"0.55300903",
"0.55300903",
"0.55300903",
"0.55300903",
"0.55300903",
"0.55300903",
"0.55300903",
"0.55300903",
"0.55300903",
"0.55300903",
"0.55300903",
"0.55300903",
"0.55300903",
"0.55300903",
"0.55300903",
"0.55300903",
"0.55300903",
"0.55300903",
"0.5528179",
"0.5528179",
"0.5528179",
"0.5528179",
"0.55212754",
"0.54921794",
"0.549171",
"0.549171",
"0.548147",
"0.5478503",
"0.5478503",
"0.5478503",
"0.5478503",
"0.5478503",
"0.5478503",
"0.5478503",
"0.5448776",
"0.5442669",
"0.5431607",
"0.5430522",
"0.54285073",
"0.54285073",
"0.54285073",
"0.54278666",
"0.54278666",
"0.54278666",
"0.54278666",
"0.5389289",
"0.5389289",
"0.5386547",
"0.5386547",
"0.5386547",
"0.5386547",
"0.5386547",
"0.5386547",
"0.5386547",
"0.5386547",
"0.53853697",
"0.53853697",
"0.5377506",
"0.5374282",
"0.53508556",
"0.53477234",
"0.53477234",
"0.53477234",
"0.5347249",
"0.5347249",
"0.5347249",
"0.5347249",
"0.5347249"
] | 0.8602321 | 0 |
Sets the value of the hvacStateValue property. | public void setHvacStateValue(double value) {
this.hvacStateValue = value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setHvacStateOn(boolean value) {\r\n this.hvacStateOn = value;\r\n }",
"public double getHvacStateValue() {\r\n return hvacStateValue;\r\n }",
"public Builder setVehicleStateValue(int value) {\n \n vehicleState_ = value;\n onChanged();\n return this;\n }",
"public void setValue(final V value) {\n this.value = value;\n }",
"public void set(final V value) {\n\t\tthis.value = value;\n\t}",
"public void set(V value) {\n Rules.checkAttributeValue(value);\n checkType(value);\n this.value = value;\n isSleeping = false;\n notifyObservers();\n }",
"void setValue(V value);",
"public void setValue (V v) {\n value = v;\n }",
"public void setState(com.trg.fms.api.TripState value) {\n this.state = value;\n }",
"public Builder setStateValue(int value) {\n state_ = value;\n bitField0_ |= 0x00000002;\n onChanged();\n return this;\n }",
"public Builder setStateValue(int value) {\n state_ = value;\n bitField0_ |= 0x00000800;\n onChanged();\n return this;\n }",
"public boolean isHvacStateOn() {\r\n return hvacStateOn;\r\n }",
"protected void setState(int value) {\r\n\t\tdState = value;\r\n\t\tstateChanged();\r\n\t\t\r\n\t\t// System debug\r\n\t\tSystem.out.println(\"State changed: \" + STATUS[dState]);\r\n\t}",
"public Builder setStateValue(int value) {\n state_ = value;\n bitField0_ |= 0x00000004;\n onChanged();\n return this;\n }",
"public void setVoucherState(Integer voucherState) {\n\t\tthis.voucherState = voucherState;\n\t}",
"protected abstract void setValue(V value);",
"@objid (\"dec04375-0805-4a30-ba61-5edb1bdcf44a\")\n void setDataState(BpmnDataState value);",
"public void setCValue(V value);",
"public Builder setCombatStateValue(int value) {\n \n combatState_ = value;\n onChanged();\n return this;\n }",
"private void SetState(VehicleState state) {\n this.state = state;\n }",
"public Builder setVehicleState(google.maps.fleetengine.v1.VehicleState value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n vehicleState_ = value.getNumber();\n onChanged();\n return this;\n }",
"public V setValue(V value);",
"public Builder setHPValue(int value) {\n bitField0_ |= 0x00000002;\n hPValue_ = value;\n onChanged();\n return this;\n }",
"public Builder setStateValue(int value) {\n \n state_ = value;\n onChanged();\n return this;\n }",
"public void setValue(Value value) {\n this.value = value;\n }",
"public boolean setValue (\n\t\t\tfinal V value)\n\t\t{\n\t\t\t_value = value;\n\t\t\treturn true;\n\t\t}",
"public void setVehicleState(Integer vehicleState) {\n this.vehicleState = vehicleState;\n }",
"public void setValue(int v) {\n if (!frozen) {\n //if (v > 0 || v <= numSides) {\n if (0 < v && v <= numSides) {\n value = v;\n getValue();\n } else {\n value = v;\n System.out.println(\"Attempted to set value to \" + value + \" , assumed 1.\");\n this.value = 1;\n getValue();\n }\n }\n }",
"public void setStatusValue(Integer statusValue)\r\n\t{\r\n\t\tstatus = WaterGasMeterStatusEnum.enumForValue(statusValue);\r\n\t}",
"public void setState(StateEnum val) {\n state = val;\n }",
"public void setOSState(final String oSStateValue) {\n this.oSState = oSStateValue;\n }",
"public abstract void setState(String sValue);",
"public void setVpnState(VpnState vpnState) {\n this.vpnState = vpnState;\n }",
"public Builder setState(com.google.cloud.datafusion.v1beta1.Instance.State value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000800;\n state_ = value.getNumber();\n onChanged();\n return this;\n }",
"public Builder setState(int value) {\n bitField0_ |= 0x00000008;\n state_ = value;\n onChanged();\n return this;\n }",
"public Builder setState(int value) {\n bitField0_ |= 0x00000008;\n state_ = value;\n onChanged();\n return this;\n }",
"public Builder setState(int value) {\n bitField0_ |= 0x00000008;\n state_ = value;\n onChanged();\n return this;\n }",
"public void setaState(Integer aState) {\n this.aState = aState;\n }",
"public void setValue(AXValue value) {\n this.value = value;\n }",
"public Builder setStatusValue(int value) {\n status_ = value;\n onChanged();\n return this;\n }",
"public Builder setStatusValue(int value) {\n status_ = value;\n onChanged();\n return this;\n }",
"public Builder setStatusValue(int value) {\n status_ = value;\n onChanged();\n return this;\n }",
"public Builder setStatusValue(int value) {\n status_ = value;\n onChanged();\n return this;\n }",
"public Builder setStatusValue(int value) {\n status_ = value;\n onChanged();\n return this;\n }",
"public Builder setStatusValue(int value) {\n status_ = value;\n onChanged();\n return this;\n }",
"public Builder setStatusValue(int value) {\n status_ = value;\n onChanged();\n return this;\n }",
"public void set_value(int value) {\n\t\tthis.value = value;\n\t}",
"public V setValue(V v)\r\n\t\t{\r\n\t\t\tV oldVal = val;\r\n\t\t\tval = v;\r\n\t\t\treturn oldVal;\r\n\t\t}",
"public Builder setStatusValue(int value) {\n \n status_ = value;\n onChanged();\n return this;\n }",
"@IcalProperty(pindex = PropertyInfoIndex.SCHEDULE_STATE,\n jname = \"scheduleState\",\n eventProperty = true,\n todoProperty = true)\n public void setScheduleState(final int val) {\n if ((val != scheduleStateNotProcessed) &&\n (val != scheduleStateProcessed) &&\n (val != scheduleStateExternalDone)) {\n throw new RuntimeException(\"org.bedework.badvalue\");\n }\n\n scheduleState = val;\n }",
"public Builder setState(int value) {\n bitField0_ |= 0x00000010;\n state_ = value;\n onChanged();\n return this;\n }",
"public Builder setState(int value) {\n bitField0_ |= 0x00000010;\n state_ = value;\n onChanged();\n return this;\n }",
"public Builder setStatusValue(int value) {\n\n status_ = value;\n onChanged();\n return this;\n }",
"public Builder setStatusValue(int value) {\n\n status_ = value;\n onChanged();\n return this;\n }",
"public Builder setStatusValue(int value) {\n\n status_ = value;\n onChanged();\n return this;\n }",
"public Builder setStatusValue(int value) {\n\n status_ = value;\n onChanged();\n return this;\n }",
"public Builder setStatusValue(int value) {\n\n status_ = value;\n onChanged();\n return this;\n }",
"public Builder setStatusValue(int value) {\n\n status_ = value;\n onChanged();\n return this;\n }",
"public Builder setStatusValue(int value) {\n\n status_ = value;\n onChanged();\n return this;\n }",
"public Builder setStatusValue(int value) {\n\n status_ = value;\n onChanged();\n return this;\n }",
"public Builder setStatusValue(int value) {\n\n status_ = value;\n onChanged();\n return this;\n }",
"public Builder setStatusValue(int value) {\n\n status_ = value;\n onChanged();\n return this;\n }",
"public void setStateValue(final String variableName, final Object value) {\n //Preconditions\n assert variableName != null : \"variableName must not be null\";\n assert !variableName.isEmpty() : \"variableName must not be empty\";\n\n synchronized (stateVariableDictionary) {\n if (stateVariableDictionary.isEmpty() && !stateValueBindings.isEmpty()) {\n // lazy population of the state value dictionary from the persistent state value bindings\n stateValueBindings.stream().forEach((stateValueBinding) -> {\n stateVariableDictionary.put(stateValueBinding.getVariableName(), stateValueBinding);\n });\n }\n StateValueBinding stateValueBinding = stateVariableDictionary.get(variableName);\n if (stateValueBinding == null) {\n stateValueBinding = new StateValueBinding(variableName, value);\n stateVariableDictionary.put(variableName, stateValueBinding);\n stateValueBindings.add(stateValueBinding);\n } else {\n stateValueBinding.setValue(value);\n }\n }\n }",
"public Builder setServerState(int value) {\n bitField0_ |= 0x00000010;\n serverState_ = value;\n onChanged();\n return this;\n }",
"public BooleanStateValue( boolean value, boolean isImmortal) {\n\t\tsuper( isImmortal);\n\t\t_storage = value;\n\t}",
"@Generated\n @Selector(\"setState:\")\n public native void setState(@NInt long value);",
"public void setValue(IveObject val){\r\n\tvalue = val;\r\n\tnotifyFromAttr();\r\n }",
"public void setState(Integer state) {\r\n this.state = state;\r\n }",
"public void setState(Integer state) {\r\n this.state = state;\r\n }",
"public void setState(java.lang.CharSequence value) {\n this.state = value;\n }",
"public Builder setState(starnamed.x.escrow.v1beta1.Types.EscrowState value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n state_ = value.getNumber();\n onChanged();\n return this;\n }",
"public void setShowVBar(Boolean aValue)\n {\n if (aValue==_showVBar) return;\n firePropChange(ShowVBar_Prop, _showVBar, _showVBar=aValue);\n }",
"public void setStateValue(final State state, final double value) {\r\n getProperties(state).setValue(value);\r\n }",
"public void setState(Integer state) {\n this.state = state;\n }",
"public void setState(Integer state) {\n this.state = state;\n }",
"public void setState(Integer state) {\n this.state = state;\n }",
"public void setState(Integer state) {\n this.state = state;\n }",
"public void setState(Integer state) {\n this.state = state;\n }",
"public void setState(Integer state) {\n this.state = state;\n }",
"public Builder setTransactionStateValue(\n int index, int value) {\n ensureTransactionStateIsMutable();\n transactionState_.set(index, value);\n onChanged();\n return this;\n }",
"public void setValue(boolean value) {\n this.value = value;\n }",
"@java.lang.Override public int getVehicleStateValue() {\n return vehicleState_;\n }",
"public void setValue(Object value) {\n\t\tthis.value = value;\n\t\tsetValueAction(value);\n\t}",
"public void setValue(int value) {\n\t\tthis._value = value;\n\t}",
"public void setValue(boolean value) {\n this.value = value;\n }",
"public void setValue(final Object value) { _value = value; }",
"public com.trg.fms.api.Trip.Builder setState(com.trg.fms.api.TripState value) {\n validate(fields()[3], value);\n this.state = value;\n fieldSetFlags()[3] = true;\n return this;\n }",
"public void set(T pValue) {\n mValue = pValue;\n }",
"private void setValue(int value) {\n final boolean changed = mValue != value;\n if (changed || !mValueSet) {\n mValue = value;\n mValueSet = true;\n persistInt(value);\n if (changed) {\n notifyChanged();\n }\n }\n }",
"public void setAlive(final Boolean state) {\n this.alive = state;\n this.newState = state;\n }",
"@java.lang.Override public int getVehicleStateValue() {\n return vehicleState_;\n }",
"public void setPVValue(String pvPropId, Object value){\n fireSetPVValue(pvPropId, value);\n final IPV pv = pvMap.get(pvPropId);\n if(pv != null){\n try {\n if(pvPropId.equals(controlPVPropId) && controlPVValuePropId != null && getUpdateSuppressTime() >0){ //activate suppress timer\n synchronized (this) {\n if(updateSuppressTimer == null || timerTask == null)\n initUpdateSuppressTimer();\n if(!updateSuppressTimer.isDue())\n updateSuppressTimer.reset();\n else\n startUpdateSuppressTimer();\n }\n\n }\n pv.setValue(value);\n } catch (final Exception e) {\n UIBundlingThread.getInstance().addRunnable(new Runnable(){\n public void run() {\n String message =\n \"Failed to write PV:\" + pv.getName();\n ErrorHandlerUtil.handleError(message, e);\n }\n });\n }\n }\n }",
"public void setValue(int value) {\n\t\tm_value = value;\n\t}",
"public void setValue(int value) {\r\n\t\tthis.value = value;\r\n\t}",
"public void setValue(int value) {\r\n\t\tthis.value = value;\r\n\t}",
"public void setValue(int value) {\r\n\t\tthis.value = value;\r\n\t}",
"public void setValue(int value) {\r\n\t\tthis.value = value;\r\n\t}",
"public void setValue(int value) {\r\n\t\tthis.value = value;\r\n\t}",
"public void setValue(int value) {\n this.value = value;\n }",
"public void setValue(int value) {\n this.value = value;\n }"
] | [
"0.73292476",
"0.6929527",
"0.61864036",
"0.59155285",
"0.5754152",
"0.5674077",
"0.5657478",
"0.5643497",
"0.5642843",
"0.56192166",
"0.5618418",
"0.56170017",
"0.56161267",
"0.55919033",
"0.5570602",
"0.5533912",
"0.5511229",
"0.54078233",
"0.53974146",
"0.53915316",
"0.5371935",
"0.5350609",
"0.53490514",
"0.5337443",
"0.5288776",
"0.52740383",
"0.52541345",
"0.5252846",
"0.5236085",
"0.5214894",
"0.52137476",
"0.51512",
"0.5131065",
"0.5102248",
"0.51013905",
"0.5100997",
"0.5100997",
"0.50951874",
"0.50934947",
"0.50899464",
"0.50899464",
"0.50899464",
"0.5089125",
"0.5089125",
"0.5089125",
"0.5089125",
"0.5084427",
"0.50783855",
"0.5070953",
"0.50704926",
"0.50668955",
"0.50665545",
"0.50657254",
"0.50657254",
"0.50657254",
"0.50657254",
"0.50657254",
"0.50657254",
"0.50657254",
"0.50653833",
"0.50653833",
"0.50653833",
"0.5020573",
"0.50174284",
"0.4996399",
"0.4971466",
"0.49701944",
"0.49652666",
"0.49652666",
"0.49612677",
"0.49471423",
"0.4944468",
"0.49409774",
"0.49324262",
"0.49324262",
"0.49324262",
"0.49324262",
"0.49324262",
"0.49324262",
"0.49298626",
"0.4928997",
"0.49272004",
"0.49267074",
"0.49242622",
"0.4919717",
"0.49178532",
"0.49156848",
"0.49141014",
"0.49093807",
"0.4903438",
"0.48981747",
"0.48960948",
"0.4893267",
"0.48883954",
"0.48883954",
"0.48883954",
"0.48883954",
"0.48883954",
"0.48825353",
"0.48825353"
] | 0.8208204 | 0 |
Gets the value of the currentClampValue property. | public double getCurrentClampValue() {
return currentClampValue;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setCurrentClampValue(double value) {\r\n this.currentClampValue = value;\r\n }",
"public float getCurrentValue() {\n return currentValue;\n }",
"public Number getValue() {\n return currentVal;\n }",
"public float _getValue()\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n return (getValue() / max);\r\n } else\r\n {\r\n return getValue();\r\n }\r\n }",
"synchronized public long getValue() {\n\n if (limitReached) {\n throw Error.error(ErrorCode.X_2200H);\n }\n\n long nextValue;\n\n if (increment > 0) {\n if (currValue > maxValue - increment) {\n if (isCycle) {\n nextValue = minValue;\n } else {\n limitReached = true;\n nextValue = minValue;\n }\n } else {\n nextValue = currValue + increment;\n }\n } else {\n if (currValue < minValue - increment) {\n if (isCycle) {\n nextValue = maxValue;\n } else {\n limitReached = true;\n nextValue = minValue;\n }\n } else {\n nextValue = currValue + increment;\n }\n }\n\n long result = currValue;\n\n currValue = nextValue;\n\n return result;\n }",
"public int getCurrentValue() {\n\t\treturn this.currentValue;\n\t}",
"public com.google.protobuf.Int32Value getLimit() {\n return instance.getLimit();\n }",
"public float getValue() {\n return value_;\n }",
"private int getCurrentValue()\n {\n return\n // Overall wait time...\n _countdownValue -\n // ...minus the time we waited so far.\n (int)(_clock.currentTime() - _startWait);\n }",
"private int getScrollVal() {\n return Math.abs((int)scrollBar.getValue());\n }",
"public Integer getCurrentValue() {\n return currentValue;\n }",
"public Integer getCurrentValue() {\n return currentValue;\n }",
"public float getValue() {\n return value;\n }",
"public final float getValue() {\r\n\t\treturn value;\r\n\t}",
"public double getMaxVal() {\n return maxVal;\n }",
"public float getValue() {\n\t\treturn value;\n\t}",
"public float getValue()\n\t{\n\t\treturn this.value;\n\t}",
"public float getValue() {\n return value_;\n }",
"public Float getValue() {\n\t\treturn value;\n\t}",
"public Float getValue() {\n\t\treturn value;\n\t}",
"public float getClipMax() {\n return _clips.getClipMax();\n }",
"public double getCurrentValue()\r\n\t{\r\n\t\tcurrentValue=(2*border+24)/2;\r\n\t\treturn currentValue;\r\n\t}",
"@Override\r\n public float floatValue() {\r\n return (float) this.m_current;\r\n }",
"public float _getMax()\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n return (getMaximum() / max);\r\n } else\r\n {\r\n return getMaximum();\r\n }\r\n }",
"public int getValue() {\n\t\t// Precondition -- The value is a non-negative integer.\n\t\tassert(value >= 0);\n\t\t\n\t\treturn value;\n\t}",
"private long getAbsMax() {\n return Math.max(Math.abs(Visualizer.getLowerBound().get()),\n Visualizer.getUpperBound().get());\n }",
"public T getAbsoluteCriticalValue() {\n return absoluteCriticalValue;\n }",
"public Vector3 getValue() {\n\t\treturn this.value;\n\t}",
"public int getVal(){\n\t\treturn pointVal;\n\t}",
"public com.google.protobuf.Int32Value getLimit() {\n return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_;\n }",
"public float getLastValue() {\n // ensure float division\n return ((float)(mLastData - mLow))/mStep;\n }",
"public long maxValue() {\n return 0;\n }",
"public float getCurrentDimValue() {\n\t\treturn currentDimValue;\n\t}",
"public Integer getVal() {\n return this.value;\n }",
"public float getPollData() {\r\n // FIXME getDeadZone ??\r\n if (jinputComponent != null) {\r\n // value = jinputComponent.getPollData(); <- heh - this borked everything\r\n // ! :) cuz abs(value - component.value) :P\r\n return jinputComponent.getPollData();\r\n } // else\r\n // FIXME - handle virtual input\r\n return virtualValue;\r\n }",
"public float getMaxValue();",
"public float getClipMin() {\n return _clips.getClipMin();\n }",
"@SuppressWarnings(\"unchecked\")\n public PropertyValue<Float> getLineMiterLimit() {\n return (PropertyValue<Float>) new PropertyValue(nativeGetLineMiterLimit());\n }",
"public float getLimit() {\n return limit;\n }",
"public float getValue()\r\n {\r\n return getSemanticObject().getFloatProperty(swps_floatValue);\r\n }",
"public int getOptimumSensorValue(int currentValue) {\n\t\tthis.highReadInValue = Math.max(this.highReadInValue, currentValue);\n\t\tthis.lowReadInValue = Math.min(this.lowReadInValue, currentValue);\n\t\tdouble diff = this.highReadInValue - this.lowReadInValue;\n\t\treturn (int) (this.lowReadInValue + optimumShift * diff);\n\t}",
"public int getValue() {\n int tmp = value;\n value = -1;\n return tmp;\n }",
"public int getMinimumValue() {\n return -s.getMaximumValue();\n }",
"float limit(float powerValue, double currentPos, double lowerLimit, double upperLimit)\n {\n if (currentPos > upperLimit)\n {\n if (powerValue > 0)\n {\n powerValue = 0;\n }\n }\n\n if (currentPos < lowerLimit)\n {\n if (powerValue < 0)\n {\n powerValue = 0;\n }\n }\n\n return powerValue;\n }",
"public float getChlorophyllMax() {\n return chlorophyllMax;\n }",
"public long getValue() {\n return value_;\n }",
"public float getFloatValue() {\n if (getValueIndex() <= 0)\n return 0F;\n return ((FloatEntry) getPool().getEntry(getValueIndex())).getValue();\n }",
"public Number getValue() {\n return (Number) getAttributeInternal(VALUE);\n }",
"public final int getValue() {\n return mValue;\n }",
"public double maxValue() {\n return 1;\r\n }",
"public double getValue(){\n\t\treturn slider.getValue() ;\n\t}",
"private String getCriterionMaxValueValue()\n {\n return getConvertedValue(myCriterionMaxValue.get());\n }",
"public double getValue(){\n value*=100;\n value = Math.floor(value);\n value/=100;//returns to hundredths place\n return value;\n }",
"public double getValue() {\n return value_;\n }",
"public Float getValue () {\r\n\t\treturn (Float) getStateHelper().eval(PropertyKeys.value);\r\n\t}",
"double getMax() {\n\t\t\treturn value_max;\n\t\t}",
"float getValue();",
"float getValue();",
"float getValue();",
"public float floatValue() {\n return this.value;\n }",
"public int getBestValue() {\n return bestValue;\n }",
"public Double getMaximumValue () {\r\n\t\treturn (maxValue);\r\n\t}",
"public int getVal()\r\n\t{\r\n\t\treturn value;\r\n\t}",
"public int getValue() {\n return mValue;\n }",
"public int getValue() {\n return value_;\n }",
"public double getCurrentPercentageError() {\n\t\tdouble returnValue = 0.0;\n\t\tint currentValue = this.readSensorValue();\n\t\tint optimum = getOptimumSensorValue(currentValue);\n\t\tif (currentValue > optimum) {\n\t\t\treturnValue = (double) (currentValue - optimum)\n\t\t\t\t\t/ (double) (this.highReadInValue - optimum);\n\t\t} else if (currentValue < optimum) {\n\t\t\treturnValue = -((double) (optimum - currentValue) / (double) (optimum - this.lowReadInValue));\n\t\t}\n\t\treturn returnValue;\n\t}",
"public double getMaxValue() {\r\n\t\treturn maxValue;\r\n\t}",
"public long getValue() {\n return value_;\n }",
"public long getValue() {\n\t\treturn this._value;\n\t}",
"public float getUpperBound()\n {\n return fUpperBound;\n }",
"public int getValue() {\n return mValue;\n }",
"public float getUsedLimit() {\n return usedLimit;\n }",
"public abstract float getMaxValue();",
"public double getMaximumValue() { return this.maximumValue; }",
"public long getMaxIfShift() {\n return localMaxIfShift;\n }",
"public int hValue() {\r\n if (value != GameParameters.draw) {\r\n if (Math.abs(value) > xWin) {\r\n return value > 0 ? xWin : oWin;\r\n }\r\n return value;\r\n }\r\n return GameParameters.draw;\r\n }",
"@Override\r\n public long longValue() {\r\n return (long) this.m_current;\r\n }",
"@Override\n\tpublic float value() {\n\t\treturn currnet().value();\n\t}",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getMax() {\n\t\treturn getMax(0.0f);\n\t}",
"public double getValue() {\n return value;\n }",
"public double getValue() {\n return value;\n }",
"public double getValue() {\n return value;\n }",
"public double getValue() {\n return this.value;\n }",
"public double getValue() {\n return this.value;\n }",
"public long getValue()\n {\n return itsValue;\n }",
"public double getValue() {\n return value_;\n }",
"public double getMaximum() {\n return (max);\n }",
"public float getRawValue() { return rawValue; }",
"@javax.annotation.Nullable\n @ApiModelProperty(example = \"7\", value = \"Current position of the call in the queue.\")\n @JsonProperty(JSON_PROPERTY_CURRENT_POSITION)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public Integer getCurrentPosition() {\n return currentPosition;\n }",
"public int getValue() {\n\t\treturn mValue;\n\t}",
"public int getValue() {\n\t\t\treturn value;\n\t\t}",
"public double getValue() {\r\n return this.value;\r\n }",
"public int getValue() {\n return value_;\n }",
"public int getValue() {\n return value_;\n }",
"public int getValue() {\n return this.value;\n }",
"public int getValue() {\r\n Object subjectValue = subject.getValue();\r\n return subjectValue == null\r\n ? getMinimum()\r\n : ((Integer) subjectValue).intValue();\r\n }",
"public double getValue() {\n\t\treturn sensorval;\n\t}",
"public int getValue ()\r\n\t{\r\n\t\treturn (m_value);\r\n\t}"
] | [
"0.6642062",
"0.63439393",
"0.6342303",
"0.62491167",
"0.6057394",
"0.60486597",
"0.59004116",
"0.5811433",
"0.5811275",
"0.5765055",
"0.5750855",
"0.5750855",
"0.57323396",
"0.57275194",
"0.57062024",
"0.5700915",
"0.5695836",
"0.5677815",
"0.5676346",
"0.5676346",
"0.56594527",
"0.56575865",
"0.5655882",
"0.5587695",
"0.5571944",
"0.55692816",
"0.5547531",
"0.5534142",
"0.5510338",
"0.5482781",
"0.54766107",
"0.5473858",
"0.5424779",
"0.5420054",
"0.5406447",
"0.5399596",
"0.53804046",
"0.5380279",
"0.5378276",
"0.536926",
"0.5368166",
"0.5362887",
"0.53468496",
"0.5336822",
"0.53336024",
"0.5332055",
"0.5322944",
"0.53120506",
"0.5302",
"0.52954173",
"0.52915716",
"0.52787435",
"0.52785176",
"0.527041",
"0.5267436",
"0.5266914",
"0.5264075",
"0.5264075",
"0.5264075",
"0.5261767",
"0.5253412",
"0.52469426",
"0.52459025",
"0.52455276",
"0.5244135",
"0.5238484",
"0.5238256",
"0.5230337",
"0.52201015",
"0.52170444",
"0.5215343",
"0.52146333",
"0.52142966",
"0.52062523",
"0.5204854",
"0.5204025",
"0.52037656",
"0.5196705",
"0.5196702",
"0.5196702",
"0.51961225",
"0.518507",
"0.518507",
"0.518507",
"0.51831424",
"0.51831424",
"0.51805735",
"0.51784134",
"0.5160955",
"0.5160932",
"0.51592076",
"0.51542974",
"0.5148483",
"0.5146575",
"0.51445913",
"0.51445913",
"0.51445097",
"0.5143509",
"0.5138729",
"0.5138249"
] | 0.9040615 | 0 |
Sets the value of the currentClampValue property. | public void setCurrentClampValue(double value) {
this.currentClampValue = value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getCurrentClampValue() {\r\n return currentClampValue;\r\n }",
"public void setCurrentValue(float currentValue) {\n this.currentValue = currentValue;\n }",
"public void setLimit(float value) {\n this.limit = value;\n }",
"@Override public void setMinMax(float minValue, float maxValue) {\n this.valueTrack.min = minValue; this.valueTrack.max = maxValue;\n }",
"public ProgressBar setValue(double value) {\n if (value >= 0 && value <= maxValue) {\n this.value = value;\n updateWidth();\n }\n return this;\n }",
"public void setCurrentValue(int currentValue_) {\n\t\tif (currentValue_ > 0 && currentValue_ <= this.numSides) {\n\t\t\tthis.currentValue = currentValue_;\n\t\t} else {\n\t\t\tSystem.out.println(\"ERROR: New value must be greater than 1 and less than or equal the number of sides on the die.\");\n\t\t}\n\t}",
"@Override\n public void setValue(int value) {\n int oldValue = getValue();\n if (oldValue == value) {\n return;\n }\n\n // Compute new value and extent to maintain upper value.\n int oldExtent = getExtent();\n int newValue = Math.min(Math.max(getMinimum(), value), oldValue + oldExtent);\n int newExtent = oldExtent + oldValue - newValue;\n\n // Set new value and extent, and fire a single change event.\n getModel().setRangeProperties(newValue, newExtent, getMinimum(), \n getMaximum(), getValueIsAdjusting());\n }",
"private void setLimit(com.google.protobuf.Int32Value value) {\n if (value == null) {\n throw new NullPointerException();\n }\n limit_ = value;\n \n }",
"private int clamp(int val, int min, int max){\n\t\tif(val > max){\n\t\t\tval = max;\n\t\t}\n\t\telse if(val < min){\n\t\t\tval = min;\n\t\t}\n\t\treturn val;\n\t}",
"public void setValue(float value)\n {\n \tPixelVal = value;\n }",
"float limit(float powerValue, double currentPos, double lowerLimit, double upperLimit)\n {\n if (currentPos > upperLimit)\n {\n if (powerValue > 0)\n {\n powerValue = 0;\n }\n }\n\n if (currentPos < lowerLimit)\n {\n if (powerValue < 0)\n {\n powerValue = 0;\n }\n }\n\n return powerValue;\n }",
"private int clamp(int value, int min, int max) {\n return Math.max(min, Math.min(value, max));\n }",
"public void setValue(float val)\n\t{\n\t\tthis.value = val;\n\t}",
"public void SetMaxVal(int max_val);",
"public static float clamp(float min, float max, float val) {\n return (val < min) ? min : (val > max) ? max : val;\n }",
"public void _setValue(float val)\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n setValue((int) (val * 100));\r\n } else\r\n {\r\n setValue((int) val);\r\n }\r\n }",
"public void setMaximum( final int value ) {\n checkWidget();\n if( 0 <= minimum && minimum < value ) {\n maximum = value;\n if( selection > maximum - thumb ) {\n selection = maximum - thumb;\n }\n }\n if( thumb >= maximum - minimum ) {\n thumb = maximum - minimum;\n selection = minimum;\n }\n }",
"public void setNumericalLimit(double value) {\n\tif (value < 0) {\n\t String msg = errorMsg(\"lessThanZero\", value);\n\t throw new IllegalArgumentException(msg);\n\t}\n\tNUMERICAL_LIMIT = value;\n }",
"private void setLimit(\n com.google.protobuf.Int32Value.Builder builderForValue) {\n limit_ = builderForValue.build();\n \n }",
"public void setPoll(float value) {\n this.poll = value;\n }",
"public void setCurrentValueOverride(int currentValue_) {\n\t\tthis.currentValue = currentValue_;\n\t}",
"public void setCurrentValue(Integer currentValue) {\n this.currentValue = currentValue;\n }",
"public void setCurrentValue(Integer currentValue) {\n this.currentValue = currentValue;\n }",
"public void setSensorValue (float value) {\n this.currentSensorValue = value;\n }",
"public void setClamp(TextureBorder xBorder, TextureBorder yBorder) {\n if (mBorderX != xBorder) {\n mBorderX = xBorder;\n setUpdate(CONCEPT_CLAMP_X);\n }\n if (mBorderY != yBorder) {\n mBorderY = yBorder;\n setUpdate(CONCEPT_CLAMP_Y);\n }\n }",
"public Builder setLimit(com.google.protobuf.Int32Value value) {\n copyOnWrite();\n instance.setLimit(value);\n return this;\n }",
"public float setValue(float newValue) {\n\t\tif (newValue > max) {\n\t\t\tnewValue = max;\n\t\t}\n\t\tif (newValue < min) {\n\t\t\tnewValue = min;\n\t\t}\n\t\tvalue = newValue;\n\t\teditText.setText(String.valueOf(value));\n\t\teditText.invalidate();\n\n\t\tif (changeListener != null) {\n\t\t\tchangeListener.onValueChange(this, value);\n\t\t}\n\n\t\treturn value;\n\t}",
"public static int clamp(int min, int max, int val) {\n return (val < min) ? min : (val > max) ? max : val;\n }",
"public void setValue(float value) {\n this.value = value;\n }",
"public JTensor clamp(JType minValue, JType maxValue) {\n JTensor r = new JTensor();\n TH.THTensor_(clamp)(r, this, minValue, maxValue);\n return r;\n }",
"public void setSurfaceValue(float value)\n throws VisADException, RemoteException {\n boolean change = !Util.isApproximatelyEqual(surfaceValue, value);\n surfaceValue = value;\n if (change) {\n changeControl(true);\n }\n }",
"void setToValue(int val);",
"public void clamp() //TODO: implement\n {\n System.out.println(\"clamp was called!\"); //DEBUGG: check if called, delete if i know when\n /*\n IntegerVectorSpecies _species = (IntegerVectorSpecies)species;\n for (int i = 0; i < genomeLength(); i++)\n {\n int minGene = (int)_species.minGene(i);\n if (genome[i].getValue() < minGene)\n genome[i].setValue(minGene); //what do do for the TraceID?\n else\n {\n int maxGene = (int)_species.maxGene(i);\n if (genome[i].getValue() > maxGene)\n genome[i] = maxGene;\n }\n }\n\n */\n }",
"public static int clamp(int iValue, int min, int max) {\n int result;\n if (iValue < min) {\n result = min;\n } else if (iValue > max) {\n result = max;\n } else {\n result = iValue;\n }\n\n return result;\n }",
"@Override\r\n public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\r\n progressValue = progress;\r\n resultsTextView.setText(\"Range: 0-\" + seekBar.getProgress());\r\n //Toast.makeText(MainActivity.this, \"Changing max value!\", Toast.LENGTH_SHORT).show();\r\n }",
"private double clamp(double v, double min, double max) { return (v < min ? min : (v > max ? max : v)); }",
"public void setValue(Float value) {\n\t\tthis.value = value;\n\t}",
"public void updateValue(float value) {\n\t\tcurrentValue = value;\n\t\tsliderButton.position = buttonPosition();\n\t}",
"@Override\n\tpublic void setValue(int value) {\n\t\tif (!(value >= 0 && value <= this.maxValue)) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"DawsonBallotItem Error - value must be >= 0 and <= to maxValue.\" + \" Invalid value = \" + value);\n\t\t}\n\t\tthis.value = value;\n\n\t}",
"public static int clamp(int value, int min, int max)\n {\n return value < min ? min : value > max ? max : value;\n }",
"public void setCurrent(int current) {\n\tif(current >= 0 && current <= ceiling) {\n\t this.current = current;\n\t}\n }",
"public void setVal(int value) {\n this.val = value;\n }",
"public void SetMinVal(int min_val);",
"@Override\n public void set(double value)\n {\n final String funcName = \"set\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"value=%f\", value);\n }\n\n if (!TrcUtil.inRange(value, -1.0, 1.0))\n {\n throw new IllegalArgumentException(\"Value must be in the range of -1.0 to 1.0.\");\n }\n\n if (softLowerLimitEnabled && value < 0.0 && getPosition() <= softLowerLimit\n || softUpperLimitEnabled && value > 0.0 && getPosition() >= softUpperLimit)\n {\n value = 0.0;\n }\n\n if (maxVelocity == 0.0)\n {\n currPower = value;\n }\n // else\n // {\n // controlMode = ControlMode.Velocity;\n // value *= maxVelocity;\n // value = TrcUtil.round(value); // Velocity mode is in sensor units/100ms, and sensor units are in integers.\n // }\n motor.set(value);\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"! (value=%f)\", value);\n }\n }",
"public void setSetpointValue(float targetSetPointValue) {\r\n\t\t//setpoint clamp\r\n\t\ttargetSetPointValue = MathHelper.clamp(targetSetPointValue, restrictSetpointFrom, restrictSetpointTo);\r\n\r\n\t\tthis.setpointValue = targetSetPointValue;\r\n\t}",
"public final void setValue(final float value) {\r\n\t\tthis.value = value;\r\n\t}",
"synchronized public void reset(long value) {\n\n if (value < minValue || value > maxValue) {\n throw Error.error(ErrorCode.X_42597);\n }\n\n startValue = currValue = lastValue = value;\n }",
"public void setFloatValue(float value) {\n setValueIndex(getPool().findFloatEntry(value, true));\n }",
"public void setMiterLimit(float limit);",
"public void setValue(int n) {\r\n Throwable t = new Throwable();\r\n t.printStackTrace();\r\n int newValue = Math.max(n, min);\r\n if (newValue + getExtent() > max) {\r\n newValue = max - getExtent();\r\n }\r\n\r\n setRangeProperties(newValue, getExtent(), min, max, isAdjusting);\r\n }",
"private void setValueInternal(int current, boolean notifyChange) {\n\t\tif (mValue == current) {\n\t\t\treturn;\n\t\t}\n\t\t// Wrap around the values if we go past the start or end\n\t\tif (mWrapSelectorWheel) {\n\t\t\tcurrent = getWrappedSelectorIndex(current);\n\t\t} else {\n\t\t\tcurrent = Math.max(current, mMinValue);\n\t\t\tcurrent = Math.min(current, mMaxValue);\n\t\t}\n\t\t// int previous = mValue;\n\t\tmValue = current;\n\t\tupdateInputTextView();\n\t\tif (notifyChange) {\n\t\t\t// notifyChange(previous, current);\n\t\t}\n\t\tinitializeSelectorWheelIndices();\n\t\tinvalidate();\n\t}",
"public Builder setLimit(\n com.google.protobuf.Int32Value.Builder builderForValue) {\n copyOnWrite();\n instance.setLimit(builderForValue);\n return this;\n }",
"public void setMaxX(int value) {\n this.maxX = value;\n }",
"public void setValue(double value) {\n\t\tif (value > getScaleEnd()) {\n\t\t\tm_dValue = getScaleEnd();\n\t\t\treturn;\n\t\t}\n\n\t\tif (value < getScaleStart()) {\n\t\t\tm_dValue = getScaleStart();\n\t\t\treturn;\n\t\t}\n\n\t\tm_dValue = value;\n\t}",
"private double applyLimitBounds(double value) {\n if(value > 1.0) {\n value = 1.0;\n }\n if(value < -1.0) {\n value = -1.0;\n }\n\n // Absolute limits:\n if(lifter.getBottomLimit() && lifter.getUpperLimit()) {\n if(value < 0) {\n value = 0; // Can't go down from the bottom;\n }\n }\n\n if((lifter.getUpperLimit() && lifter.getUpperWarning()) && lifter.getUpperSmallPieceDetector()) {\n if(value > 0) {\n value = 0; // Can't go up from the top\n }\n }\n\n // Slow speed zones\n if(lifter.getBottomWarning()) {\n if(value < -0.3) {\n value = -0.3;\n }\n }\n\n if(lifter.getUpperWarning()) {\n if(value > 0.7) {\n value = 0.7;\n }\n }\n\n printLimits();\n\n return value;\n }",
"void setMaxValue();",
"public void setSpeedLimit(int speedLim) {\n \tthis.currentSpeedLimit = trkMdl.getBlock(this.lineColor,this.currentBlock).getSpeedLimit();\n }",
"public void setValue(double value) {\n if(value<=0){\n mDrange = 0;\n pb.setProgress(0);\n ProgressDragLayout.this.requestLayout();\n ProgressDragLayout.this.invalidate();\n return;\n }\n progressAdd = 0;\n mDrange = 0;\n drange_1=0;\n int progress = (int) (value * 100);\n size = progress;\n double drange = (int) (value * viewWidth);\n drange_1 = drange / size;\n Log.e(\"size-------\", size +\"\");\n mhander.sendEmptyMessageDelayed(view_top.hashCode(),20);\n }",
"public void setCurrentLengthOverMin(double newLengthOverMinInMeters) {\n if (newLengthOverMinInMeters >= 0 && newLengthOverMinInMeters <= maxLengthOverMin)\n this.currentLengthOverMin = newLengthOverMinInMeters;\n else if (newLengthOverMinInMeters < 0)\n this.currentLengthOverMin = 0;\n else\n this.currentLengthOverMin = maxLengthOverMin;\n }",
"protected void setSliderValue(WebElement sliderElement, int newValue)\n {\n int currentValue = getSliderCurrentValue(sliderElement);\n int xChangeAmount, minAllowedValue, maxAllowedValue;\n WebElement sliderThumb = sliderElement.findElement(By.className(\"x4-slider-thumb\"));\n\n minAllowedValue = Integer.parseInt(sliderElement.getAttribute(\"aria-valuemin\"));\n maxAllowedValue = Integer.parseInt(sliderElement.getAttribute(\"aria-valuemax\"));\n\n // Protect against bad inputs.\n if(newValue > maxAllowedValue)\n newValue = maxAllowedValue;\n if(newValue < minAllowedValue)\n newValue = minAllowedValue;\n\n if(currentValue == newValue)\n return;\n\n if(currentValue > newValue)\n {\n xChangeAmount = -10;\n while(getSliderCurrentValue(sliderElement) > newValue)\n getWrapper().dragAndDrop(sliderThumb, xChangeAmount, 0);\n }\n else\n {\n xChangeAmount = 10;\n while(getSliderCurrentValue(sliderElement) < newValue)\n getWrapper().dragAndDrop(sliderThumb, xChangeAmount, 0);\n }\n\n }",
"public void setVal(float val) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeFloat(__io__address + 8, val);\n\t\t} else {\n\t\t\t__io__block.writeFloat(__io__address + 8, val);\n\t\t}\n\t}",
"public void param_value_max_SET(float src)\n { set_bytes(Float.floatToIntBits(src) & -1L, 4, data, 17); }",
"public static double limitRange( double val )\n {\n if( val > 1.0 )//If number is greater than 1.0, it becomes 1.0.\n {\n val = 1.0; \n }\n else if( val < -1.0 )//Else if number is less than -1.0, it becomes -1.0.\n {\n val = -1.0;\n }\n \n //Returns the limited number\n return val;\n }",
"public void setUpperValue(int value) {\n // Compute new extent.\n int lowerValue = getValue();\n int newExtent = Math.min(Math.max(0, value - lowerValue), getMaximum() - lowerValue);\n \n // Set extent to set upper value.\n setExtent(newExtent);\n }",
"public static void clampStencilValue(\n int maximumValue\n ) {\n GL11.glStencilFunc(GL_LESS, maximumValue, 0xFF);\n \n //if stencil test passed, encode the stencil value\n GL11.glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE);\n \n //do not manipulate the depth packetBuffer\n GL11.glDepthMask(false);\n \n //do not manipulate the color packetBuffer\n GL11.glColorMask(false, false, false, false);\n \n GlStateManager.disableDepthTest();\n \n MyRenderHelper.renderScreenTriangle();\n \n GL11.glDepthMask(true);\n \n GL11.glColorMask(true, true, true, true);\n \n GlStateManager.enableDepthTest();\n }",
"public final void adjustLimits(int max) {\n this.invalid = false;\n if (this.value < 1) {\n this.value = 1;\n this.invalid = true;\n }\n if (max > 0) {\n if (this.value > max) {\n this.value = max;\n this.invalid = true;\n }\n }\n }",
"public\t\tvoid\t\tsetNormalizedValue(double value)\n\t\t{\n\t\tif (value > 1.0)\n\t\t\tvalue = 1.0;\n\t\telse if (value < 0.0)\n\t\t\tvalue = 0.0;\n\n\t\tthis.value = value;\n\t\taddNormalizedTick(value);\n\t\tsetValueDisplay(\"\" + (minimumValue + value * (maximumValue - minimumValue)));\n\t\tdispatchAction(Mi_VALUE_CHANGED_ACTION);\n\t\t}",
"public void setInputValue(int inputValue) {\n\t\tif (inputValue < 0) {\n\t\t\tthis.setError(1);\n\t\t\tthis.setProcessable(false);\n\t\t} else {\n\t\t\tthis.inputValue = inputValue;\n\n\t\t}\n\n\t}",
"public void setPanning(float value) {\r\n\t\tleft.lvl.set(0.50f - value / 2);\r\n\t\tright.lvl.set(0.50f + value / 2);\r\n\t}",
"public void setProgressValue(float value) {\n\t\tprogress_.setValue(value);\n\t}",
"public void setUsedLimit(float value) {\n this.usedLimit = value;\n }",
"public void setfVal(float value){\n this.fVal = value;\n }",
"public void setMaximum() {\n getReel().setMaxValue(getVerticalScrollBar().getMaximum());\n }",
"public void setEffectiveRange(int value) {\n this.effectiveRange = value;\n }",
"public void setValue(int v) {\n if (!frozen) {\n //if (v > 0 || v <= numSides) {\n if (0 < v && v <= numSides) {\n value = v;\n getValue();\n } else {\n value = v;\n System.out.println(\"Attempted to set value to \" + value + \" , assumed 1.\");\n this.value = 1;\n getValue();\n }\n }\n }",
"void setValue(int value) {\n if (isPowerOfTwo(value)) {\n this.value = value;\n } else {\n throw new IllegalArgumentException(\"Value has to be a power of 2\");\n }\n }",
"public static float clamp(float fValue, float maxMagnitude) {\n assert Validate.nonNegative(maxMagnitude, \"limit\");\n float result = FastMath.clamp(fValue, -maxMagnitude, maxMagnitude);\n\n assert result >= -maxMagnitude : result;\n assert result <= maxMagnitude : result;\n return result;\n }",
"public void setPropertyPenalty(float value) {\n this.propertyPenalty = value;\n }",
"public void setMaxValue(int x) {\r\n\t\tmaxValue = x;\r\n\t}",
"public void setValue(Number value) {\n this.value = value;\n }",
"public void setTimeLimit(long value) {\n\t\ttimeLimit = value;\n\t}",
"public void setMaximumValue(double maximumValue)\n {\n this.maximumValue = maximumValue;\n }",
"public void setMaxValue(int maxValue) {\n this.maxValue = maxValue;\n }",
"public void SetTimeRemaining(int value) {\n Timer = value;\n if (Timer > TimerMax)\n {\n Timer = TimerMax;\n }\n }",
"public static double clamp(double min, double max, double val) {\n return (val < min) ? min : (val > max) ? max : val;\n }",
"void clamp() {\r\n\t\tif (x > 1) {\r\n\t\t\tx = 1;\r\n\t\t}\r\n\t\tif (y > 1) {\r\n\t\t\ty = 1;\r\n\t\t}\r\n\t\tif (z > 1) {\r\n\t\t\tz = 1;\r\n\t\t}\r\n\t\tif (a > 1) {\r\n\t\t\ta = 1;\r\n\t\t}\r\n\r\n\t\tif (x < 0) {\r\n\t\t\tx = 0;\r\n\t\t}\r\n\t\tif (y < 0) {\r\n\t\t\ty = 0;\r\n\t\t}\r\n\t\tif (z < 0) {\r\n\t\t\tz = 0;\r\n\t\t}\r\n\t\tif (a < 0) {\r\n\t\t\ta = 0;\r\n\t\t}\r\n\t}",
"public ProgressBar setMaxValue(double maxValue) {\n this.maxValue = maxValue;\n setValue(this.value);\n return this;\n }",
"public void setMaxVal(double maxVal) {\n this.maxVal = maxVal;\n }",
"public void setgVal(float value){\n this.gVal = value;\n }",
"public void setMaxValue(double x) {\r\n\t\tmaxValue = x;\r\n\t}",
"@JSProperty(\"maxRange\")\n void setMaxRange(double value);",
"public void setExhaustion ( float value ) {\n\t\texecute ( handle -> handle.setExhaustion ( value ) );\n\t}",
"public void setIncrement( final int value ) {\n checkWidget();\n if( value >= 1 && value <= maximum - minimum ) {\n increment = value;\n }\n }",
"public boolean setPropertyVolumeLimit(long aValue)\n {\n return setPropertyUint(iPropertyVolumeLimit, aValue);\n }",
"public void setValue(int newValue) {\n if (mValue != newValue) {\n mValue = newValue;\n setUpdate(CONCEPT_VALUE);\n }\n }",
"public void setValue(int val)\r\n {\r\n value = val;\r\n }",
"public void setValue(float value) {\n\t\tthis.value = value;\n\t\tthis.rawValue=Float.toString(value);\n\t}",
"private void adjustFloatControl(FloatControl control, float value) {\n \t\tif (value < control.getMaximum() && value > control.getMinimum())\n \t\t\tcontrol.setValue(value);\n \t\telse if (value > control.getMaximum()) {\n \t\t\tcontrol.setValue(control.getMaximum());\n \t\t} else if (value < control.getMinimum()) {\n \t\t\tcontrol.setValue(control.getMinimum());\n \t\t}\n \t}",
"public static double clamp(double value, double min, double max)\n {\n return value < min ? min : value > max ? max : value;\n }",
"public void SetLimit(long FaceBoundaries) {\n OCCwrapJavaJNI.BRepAlgo_NormalProjection_SetLimit__SWIG_0(swigCPtr, this, FaceBoundaries);\n }"
] | [
"0.71582097",
"0.57305264",
"0.5693314",
"0.56623584",
"0.5631227",
"0.551577",
"0.5514996",
"0.54669917",
"0.5421954",
"0.54153633",
"0.5399517",
"0.5384485",
"0.53473973",
"0.5275869",
"0.5241291",
"0.5223096",
"0.5190736",
"0.517201",
"0.5171213",
"0.5165257",
"0.5141105",
"0.51396734",
"0.51396734",
"0.512882",
"0.51269054",
"0.5120638",
"0.51182777",
"0.5085663",
"0.5080366",
"0.50762296",
"0.5071816",
"0.5067725",
"0.5066611",
"0.50608474",
"0.50592196",
"0.5054562",
"0.50537914",
"0.5049326",
"0.50458586",
"0.50417274",
"0.50388813",
"0.5029511",
"0.50271004",
"0.5025732",
"0.49953097",
"0.49794644",
"0.49713865",
"0.4950064",
"0.49398094",
"0.4924745",
"0.4921421",
"0.49086228",
"0.49042094",
"0.48879424",
"0.48824912",
"0.48795336",
"0.4867818",
"0.48573166",
"0.48551506",
"0.48362675",
"0.48352292",
"0.48159552",
"0.48158476",
"0.4815642",
"0.48077554",
"0.47913072",
"0.47907254",
"0.47890478",
"0.47815016",
"0.47760436",
"0.47688302",
"0.47622082",
"0.47607356",
"0.47533938",
"0.47445363",
"0.47428918",
"0.47428626",
"0.47428387",
"0.47395808",
"0.47197342",
"0.47085786",
"0.47079188",
"0.47017848",
"0.46993896",
"0.46931654",
"0.46918607",
"0.46911108",
"0.46875638",
"0.46862736",
"0.46735796",
"0.46715653",
"0.46701044",
"0.4661999",
"0.46559578",
"0.46556163",
"0.4654894",
"0.4650586",
"0.46491042",
"0.46477738",
"0.46340308"
] | 0.8679921 | 0 |
Gets the value of the externalTemperature property. | public double getExternalTemperature() {
return externalTemperature;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public HLAfloat32BE getTemperature() { return this.temperature; }",
"public AlarmTemperature getTemperature() {\n\t\treturn this.temperature;\n\t}",
"public String getTemperature() {\r\n\t\treturn temperature;\r\n\t}",
"public String getTemperature() {\n\t\treturn temperature;\n\t}",
"public void setExternalTemperature(double value) {\r\n this.externalTemperature = value;\r\n }",
"public int getTemperature() {\n return VirtualHardwareManager.getInstance().getTemperature();\n }",
"public int getTemperature() {\n\t\treturn temperature;\n\t}",
"public String getTemperature() {\n return temperature;\n }",
"public int getTemperature() {\n return temperature;\n }",
"public double getTemperature() {return temperature;}",
"public float getTemperature() {\n\t\treturn (float) getRawTemperature() / 100f;\n\t}",
"public IntegerProperty getTemp() {\n\t\treturn temperature;\n\t}",
"public int getTemperature() {\n return temperature;\n }",
"public java.lang.String getTemperature() {\n java.lang.Object ref = temperature_;\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 temperature_ = s;\n return s;\n }\n }",
"float getTemperature();",
"public java.lang.String getTemperature() {\n java.lang.Object ref = temperature_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n temperature_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public double getCurrentTemperature() {\n return this.currentTemperature;\n }",
"public Float getTemperature () {\n return temperature;\n }",
"public double getTemperatureCelsius() {\n return temperatureCelsius;\n }",
"public double ThermodynamicTemperature() {\n return OCCwrapJavaJNI.Units_Dimensions_ThermodynamicTemperature(swigCPtr, this);\n }",
"@Override \n public double getTemperature() { \n return pin.getValue();\n }",
"public double getParcelTemperature() {\r\n return parcelTemperature;\r\n }",
"public Double getIndoorTemperature() {\n return indoorTemperature;\n }",
"public float getTempCelsius() {\n float tempC = 0;\n if (readings.size() > 0) {\n tempC = readings.get(readings.size() - 1).temperature;\n }\n return tempC;\n }",
"public Double getThermistorCelsiusTemperature()\n {\n return finchController.getThermistorCelsiusTemperature();\n }",
"public Object getAirTemperature() {\n\t\treturn null;\n\t}",
"public static int getTemperature() {\n\t\t\n\t\tSystem.out.println(\"Enter temperature value : \");\n\t\tint inputValue = sc.nextInt();\n\t\treturn inputValue;\n\t}",
"public com.google.protobuf.ByteString\n getTemperatureBytes() {\n java.lang.Object ref = temperature_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n temperature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@Override\n\tpublic int getTemperature() throws emException, TException {\n\t\treturn 0;\n\t}",
"public double getHumidityTemperature() {\r\n return humidityTemperature;\r\n }",
"public double GetMashTemperature() {\n\t\treturn msc.GetMashTemperature();\n\t}",
"public Getter reqGetMeasuredRoomTemperature() {\n\t\t\treqGetProperty(EPC_MEASURED_ROOM_TEMPERATURE);\n\t\t\treturn this;\n\t\t}",
"public com.google.protobuf.ByteString\n getTemperatureBytes() {\n java.lang.Object ref = temperature_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n temperature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@JsonIgnore\n\tpublic DecimalMeasure<Temperature> getTemperatureAsMeasure()\n\t{\n\t\treturn this.temperatureAsMeasure;\n\t}",
"public String getTempInCelsius() {\n\t\treturn tempInCelsius;\n\t}",
"public Double getOutdoorTemperature() {\n return outdoorTemperature;\n }",
"@JsonProperty(\"frontPanelTemperature\")\r\n public Double getFrontPanelTemperature() {\r\n return frontPanelTemperature;\r\n }",
"public double getInputTemperature() throws NumberFormatException {\n\t\treturn inputPanel.getTemperature();\n\t}",
"public java.lang.String getMinTemperatureC()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MINTEMPERATUREC$10, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"@Override\r\n public int getTemperature(){\r\n return 10;\r\n }",
"public double getTemp() {\n\t\treturn currentTemp;\n\t}",
"private void getTemperature() {\r\n \t\r\n \t//Get the date from the DateService class\r\n \tDate theDate = theDateService.getDate(); \r\n \t\r\n \t//Increment the number of readings\r\n \tlngNumberOfReadings ++;\r\n \tdouble temp = 0.0;\r\n \tString rep = \"\";\r\n \t\r\n \t//Assume that the TMP36 is connected to AIN4\r\n \trep = this.theTemperatureService.readTemperature(\"4\");\r\n \tpl(rep);\r\n \ttemp = this.theTemperatureService.getTheTemperature();\r\n \t\r\n \t//All details necessary to send this reading are present so create a new TemperatureReading object\r\n \tTemperatureReading theReading = new TemperatureReading(temp, theDate, lngNumberOfReadings);\r\n \tthis.send(theReading);\r\n \t\r\n }",
"public byte getTemperature_unit() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readByte(__io__address + 11);\n\t\t} else {\n\t\t\treturn __io__block.readByte(__io__address + 11);\n\t\t}\n\t}",
"public float getTemperatureMin() {\n return temperatureMin;\n }",
"public Getter reqGetMeasuredFloorTemperature() {\n\t\t\treqGetProperty(EPC_MEASURED_FLOOR_TEMPERATURE);\n\t\t\treturn this;\n\t\t}",
"public java.lang.String getMinTemperatureF()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MINTEMPERATUREF$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public double getContainerTemperature3() {\r\n return containerTemperature3;\r\n }",
"public double getTemp(){\n return currentTemp;\n }",
"public java.lang.String getMaxTemperatureC()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAXTEMPERATUREC$8, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public double getContainerTemperature1() {\r\n return containerTemperature1;\r\n }",
"Long getTemperatureForLastHour();",
"private double measureTemp() {\n try {\n analog0 = blueTooth.sensor(0);\n analog1 = blueTooth.sensor(1);\n return ((analog0 - analog1) * 5 * 100) / 1024.0;\n } catch (TimeoutException ex) {\n Logger.getLogger(TempMeasure.class.getName()).log(Level.SEVERE, null, ex);\n }\n return ((analog0 - analog1) * 5 * 100) / 1024.0;\n }",
"public float getTemperatureMax() {\n return temperatureMax;\n }",
"public Getter reqGetTemperatureSetting1() {\n\t\t\treqGetProperty(EPC_TEMPERATURE_SETTING1);\n\t\t\treturn this;\n\t\t}",
"public double get_thermal_reading() {\n\t\t\n\t\treturn 0;\n\t}",
"public float getCurrentTemp(){\n return currentTemp;\n }",
"public static float getCpuTemperature() throws IOException, InterruptedException, NumberFormatException {\n \treturn pi4jSystemInfoConnector.getCpuTemperature();\r\n }",
"public double externalTemperature(double t0, double min, double max)\n {\n double left = t0 - min;\n double right = max - t0;\n int sign = Math.random() * (left + right) > left ? 1 : -1;\n t0 += sign * Math.random();\n return t0;\n }",
"FloatResource temperatureCoefficient();",
"public org.apache.xmlbeans.XmlString xgetMaxTemperatureC()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(MAXTEMPERATUREC$8, 0);\n return target;\n }\n }",
"public float getminTemp() {\n Reading minTempReading = null;\n float minTemp = 0;\n if (readings.size() >= 1) {\n minTemp = readings.get(0).temperature;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).temperature < minTemp) {\n minTemp = readings.get(i).temperature;\n }\n }\n } else {\n minTemp = 0;\n }\n return minTemp;\n }",
"public org.apache.xmlbeans.XmlString xgetMinTemperatureF()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(MINTEMPERATUREF$6, 0);\n return target;\n }\n }",
"public int getBodyTemperature() {\n return this.bodyTemperature;\n }",
"public org.apache.xmlbeans.XmlString xgetMinTemperatureC()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(MINTEMPERATUREC$10, 0);\n return target;\n }\n }",
"public String getTemperature(JSONObject j) throws JSONException{\n return roundTwoDecimals(Utilities.convertTemp(tempUnits,j.getDouble(\"day\"))) + \"\";\n }",
"public double getContainerTemperature2() {\r\n return containerTemperature2;\r\n }",
"public static Object eventModemTemperature() {\n\t\treturn null;\n\t}",
"public Informer reqInformMeasuredRoomTemperature() {\n\t\t\treqInformProperty(EPC_MEASURED_ROOM_TEMPERATURE);\n\t\t\treturn this;\n\t\t}",
"public float getTempFarenheit() {\n float tempF = 0;\n float tempC;\n if (readings.size() > 0) {\n tempC = readings.get(readings.size() - 1).temperature;\n tempF = (float) ((tempC * 1.8) + 32);\n\n }\n return tempF;\n }",
"private void readRealTemp() {\n YCBTClient.getRealTemp(new BleDataResponse() {\n @Override\n public void onDataResponse(int i, float v, HashMap hashMap) {\n if (i == 0) {\n String temp = (String) hashMap.get(\"tempValue\");\n }\n }\n });\n }",
"protected byte[] getMeasuredRoomTemperature() {return null;}",
"public Double getTemperature(Double latitude, Double elevation,\r\n\t\t\tString timeStamp) {\r\n\r\n\t\tDouble timeFactor = getTimeFactor(timeStamp);\r\n\r\n\t\tDouble temperature = seaLevelTemp + (tempPerElevation1 * elevation)\r\n\t\t\t\t+ (tempPerLatitude * latitude) + timeFactor;\r\n\r\n\t\t/*\r\n\t\t * Double temperature = seaLevelTemp + timeFactor + (tempPerElevation1 *\r\n\t\t * elevation) - (tempPerLatitude * latitude);\r\n\t\t */\r\n\r\n\t\tif (temperature < -50)\r\n\t\t\ttemperature = -50.00;\r\n\r\n\t\treturn temperature;\r\n\r\n\t}",
"public void setTemperature(int value) {\n this.temperature = value;\n }",
"public float getmaxTemp() {\n Reading maxTempReading = null;\n float maxTemp = 0;\n if (readings.size() >= 1) {\n maxTemp = readings.get(0).temperature;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).temperature > maxTemp) {\n maxTemp = readings.get(i).temperature;\n }\n }\n } else {\n maxTemp = 0;\n }\n return maxTemp;\n }",
"public void setTemperature(String temperature) {\n this.temperature = temperature;\n }",
"public java.lang.String getMaxTemperatureF()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAXTEMPERATUREF$4, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"protected void onGetMeasuredRoomTemperature(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"public static int getModemTemperature() {\n\t\treturn 0;\n\t}",
"public Getter reqGetTemperatureSetting2() {\n\t\t\treqGetProperty(EPC_TEMPERATURE_SETTING2);\n\t\t\treturn this;\n\t\t}",
"@JsonProperty(\"ioModuleTemperature\")\r\n public Double getIoModuleTemperature() {\r\n return ioModuleTemperature;\r\n }",
"public float getTemp3() {\n\t\treturn temp3;\n\t}",
"@RequestMapping(\"/temperature\")\n public TemperatureResponse temperature() {\n LOG.info(\"Reading temperature\");\n TemperatureResponse response = new TemperatureResponse();\n response.setHost(getHostname());\n response.setTemperature(getTemperature());\n return response;\n }",
"public double getHumidityValue() {\r\n return humidityValue;\r\n }",
"public void setTemperature(Float temperature) {\n this.temperature = temperature;\n }",
"public String getCurrentTempInVancouver() throws IOException, JSONException {\n JSONObject json = readJsonFromUrl(theURL);\n JSONObject main = (JSONObject) json.get(\"main\");\n double kelvinD = 987654;\n int kelvinI = 987654;\n double c;\n try {\n kelvinD = (Double) main.get(\"temp\");\n } catch (ClassCastException e) {\n kelvinI = (Integer) main.get(\"temp\");\n }\n if (kelvinD != 987654) {\n c = kelvinD - 273.15;\n } else {\n c = kelvinI - 273.15;\n }\n double ccOneDecimal = Math.round(c * 10) / 10.0;\n return ccOneDecimal + \"°C\";\n }",
"public double getHumidity()\n {\n return humidity;\n }",
"int surfaceTemperature(C config);",
"public org.apache.xmlbeans.XmlString xgetMaxTemperatureF()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(MAXTEMPERATUREF$4, 0);\n return target;\n }\n }",
"public String getCpuTemperature_huawei(){\n\n String maxTemp = \"\";\n try {\n RandomAccessFile reader = new RandomAccessFile( \"/sys/class/thermal/thermal_zone1/temp\", \"r\" );\n\n boolean done = false;\n while ( ! done ) {\n String line = reader.readLine();\n if ( null == line ) {\n done = true;\n break;\n }\n maxTemp =line;\n }\n\n } catch ( IOException ex ) {\n ex.printStackTrace();\n }\n return String.valueOf(Double.parseDouble(maxTemp) / 1000);\n }",
"public float getTemps() {\n\t\treturn temps;\n\t}",
"protected byte[] getMeasuredFloorTemperature() {return null;}",
"@NonNull\n public Integer getMinTemp() {\n return minTemp;\n }",
"public double getValue() {\n\t\treturn sensorval;\n\t}",
"public String getTemperatureInCelcius(float temp)\n {\n\n temp = ((temp - 32) * 5) / 9;\n\n return Float.toString(temp);\n }",
"public CP getTPValueTechnicalPart() { \r\n\t\tCP retVal = this.getTypedField(40, 0);\r\n\t\treturn retVal;\r\n }",
"public float getTemperature(Point3d position){\r\n\t\tBlockPos pos = new BlockPos(position.x, position.y, position.z);\r\n\t\treturn world.getBiome(pos).getTemperature(pos);\r\n\t}",
"public float getTemperatureInFahrenheit() {\n\t\tif(this.metric==Metric.CELSIUS) {\n\t\t\treturn(this.temperature*(9/5)+32);\n\t\t}else if(this.metric==Metric.KELVIN) {\n\t\t\treturn (9*(this.temperature - 273)/5 + 32);\n\t\t}\n\t\treturn this.temperature;\n\t\t\n\t}",
"public void setTemperature(int value) {\n\t\tthis.temperature = value;\n\t}",
"@JsonProperty(\"exitAirTemperature\")\r\n public Double getExitAirTemperature() {\r\n return exitAirTemperature;\r\n }",
"public double getBlockAmbientTemperature(int x, int y, int z) {\n World world = asBukkit();\n if (world == null) return 0;\n Block block = world.getBlockAt(x, y, z);\n double temp = getAmbientTemperature(5, 15, x, y, z);\n\n // Apply modifier if block has sunlight.\n if (block.getLightFromSky() > 0) {\n double directSunAmplifier = TEMPERATURES.getDirectSunAmplifier() - 1;\n byte skyLight = block.getLightFromSky();\n double percent = skyLight / 15D;\n temp *= directSunAmplifier * percent + 1;\n }\n\n // Apply modifier if block is in a \"cave\"\n if (((block.getLightFromSky() <= 6 && block.getLightLevel() < 6)\n || block.getType() == Material.CAVE_AIR)\n && block.getLightLevel() != 15) {\n double amp = TEMPERATURES.getCaveModifier() - 1;\n byte light = block.getLightLevel();\n double percent = (15D - light) / 15D;\n temp *= amp * percent + 1;\n }\n return temp;\n }"
] | [
"0.7755546",
"0.76459664",
"0.7625731",
"0.7623033",
"0.75555164",
"0.7527008",
"0.7506011",
"0.748971",
"0.7446183",
"0.74107474",
"0.73967963",
"0.73932093",
"0.73705864",
"0.7313887",
"0.7249364",
"0.7222441",
"0.72033334",
"0.7195759",
"0.7141576",
"0.69569343",
"0.69150126",
"0.6898744",
"0.68924606",
"0.6892259",
"0.68885905",
"0.68832767",
"0.67638767",
"0.6728298",
"0.67246324",
"0.6723869",
"0.6705334",
"0.66911244",
"0.6627908",
"0.6608317",
"0.6582667",
"0.65564287",
"0.65523845",
"0.6536189",
"0.6464787",
"0.64612967",
"0.64032537",
"0.6383204",
"0.63594806",
"0.630237",
"0.62401867",
"0.6234963",
"0.62259346",
"0.61802113",
"0.61766315",
"0.6158979",
"0.61483896",
"0.6145928",
"0.61054736",
"0.6101291",
"0.6098077",
"0.608746",
"0.6050515",
"0.6038285",
"0.6031472",
"0.60289043",
"0.60045046",
"0.5962568",
"0.5957114",
"0.59505343",
"0.59447557",
"0.5943785",
"0.5932885",
"0.5932819",
"0.5917304",
"0.59113157",
"0.5910858",
"0.5897394",
"0.5891656",
"0.5871563",
"0.58709824",
"0.58707476",
"0.58687764",
"0.5860979",
"0.5860411",
"0.5859936",
"0.58528054",
"0.5826788",
"0.5824091",
"0.57941514",
"0.5764357",
"0.57610494",
"0.5757574",
"0.57525074",
"0.5750277",
"0.574965",
"0.57445115",
"0.5742929",
"0.573528",
"0.5735228",
"0.5729142",
"0.57001656",
"0.5691802",
"0.5675104",
"0.56744915",
"0.5670973"
] | 0.8903679 | 0 |
Sets the value of the externalTemperature property. | public void setExternalTemperature(double value) {
this.externalTemperature = value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getExternalTemperature() {\r\n return externalTemperature;\r\n }",
"private void setTemp(int temperature) {\n\t\tthis.temperature.setValue(temperature);\n\t}",
"public void setTemperature(int value) {\n this.temperature = value;\n }",
"public void setTemperature(Float temperature) {\n this.temperature = temperature;\n }",
"public void setTemperature(String temperature) {\n this.temperature = temperature;\n }",
"public void setTemperature(int value) {\n\t\tthis.temperature = value;\n\t}",
"public void setTemp(int temp) {\n \tthis.temperature = temp;\n }",
"public void setTemperature(int temperature) {\n if (status) {\n this.temperature = temperature;\n } else System.out.println(\"dispozitivul este oprit\");\n }",
"public void setTemperatureNeededToCookAt(double t) {\r\n temp = t;\r\n }",
"public void setTemperatureCelsius(final double temperatureCelsius) {\n if (temperatureCelsius >= MINIMUM_POOL_TEMP_CELSIUS\n && temperatureCelsius <= MAXIMUM_POOL_TEMP_CELSIUS) {\n this.temperatureCelsius = temperatureCelsius;\n }\n }",
"public void setParcelTemperature(double value) {\r\n this.parcelTemperature = value;\r\n }",
"public void setReadingTemperature(String text) {\n\t\ttextReadingTemperature.setText(text);\n\t}",
"public void setTemperature_unit(byte temperature_unit) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeByte(__io__address + 11, temperature_unit);\n\t\t} else {\n\t\t\t__io__block.writeByte(__io__address + 11, temperature_unit);\n\t\t}\n\t}",
"protected void setTemperatureSingle(final ProviderName providerName, final String id, final int temperature) {\n Preconditions.checkNotNull(providerName);\n Preconditions.checkNotNull(id);\n try {\n providers.get(providerName).setTemperature(id, temperature);\n } catch (final Exception e) {\n final String message = String.format(\"Failed to update temperature for %s:%s\",\n providerName.getName(), id);\n LOGGER.error(message, e);\n throw new RuntimeException(message, e);\n }\n }",
"public void setHumidityTemperature(double value) {\r\n this.humidityTemperature = value;\r\n }",
"public void setStartingTemperature(final double temperature) {\r\n\t\tthis.setTemperature(temperature);\r\n\t}",
"@JsonProperty(\"frontPanelTemperature\")\r\n public void setFrontPanelTemperature(Double frontPanelTemperature) {\r\n this.frontPanelTemperature = frontPanelTemperature;\r\n }",
"public void setIndoorTemperature(Double indoorTemperature) {\n this.indoorTemperature = indoorTemperature;\n }",
"@JsonIgnore\n\tpublic void setTemperatureAsMeasure(DecimalMeasure<Temperature> temperature)\n\t{\n\t\tthis.temperatureAsMeasure = temperature;\n\t}",
"public HLAfloat32BE getTemperature() { return this.temperature; }",
"public void setContainerTemperature1(double value) {\r\n this.containerTemperature1 = value;\r\n }",
"protected void onSetTemperatureSetting1(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"public Builder setTemperature(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n temperature_ = value;\n onChanged();\n return this;\n }",
"public static void setModemTemperature(String temperature) {\n\t\t\n\t}",
"protected void onSetTemperatureSetting2(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"protected void setTemperatureAll(final int temperature) {\n for (final Map.Entry<ProviderName, Provider<?, ?>> entry : providers.entrySet()) {\n try {\n for (final Light light : entry.getValue().getLights()) {\n try {\n entry.getValue().setTemperature(light.getId(), temperature);\n } catch (final Exception e) {\n final String message = String.format(\"Failed to update temperature for %s\",\n entry.getValue().getClass().getSimpleName());\n LOGGER.error(message, e);\n throw new RuntimeException(message, e);\n }\n }\n } catch (final Exception e) {\n final String message = String.format(\"Failed to fetch information for %s\",\n entry.getValue().getClass().getSimpleName());\n LOGGER.error(message, e);\n throw new RuntimeException(message, e);\n }\n }\n }",
"public void setTemperature(double temp){tempval.setText(Double.toString(temp));}",
"public void setContainerTemperature3(double value) {\r\n this.containerTemperature3 = value;\r\n }",
"public double getTemperature() {return temperature;}",
"public Setter reqSetTemperatureSetting1(byte[] edt) {\n\t\t\treqSetProperty(EPC_TEMPERATURE_SETTING1, edt);\n\t\t\treturn this;\n\t\t}",
"public String getTemperature() {\r\n\t\treturn temperature;\r\n\t}",
"public void setMinTemperatureC(java.lang.String minTemperatureC)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MINTEMPERATUREC$10, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MINTEMPERATUREC$10);\n }\n target.setStringValue(minTemperatureC);\n }\n }",
"public void setOutdoorTemperature(Double outdoorTemperature) {\n this.outdoorTemperature = outdoorTemperature;\n }",
"public void setTemp(double currentTemp) {\n\t\tthis.currentTemp = currentTemp;\n\t}",
"public String getTemperature() {\n\t\treturn temperature;\n\t}",
"public AlarmTemperature getTemperature() {\n\t\treturn this.temperature;\n\t}",
"public void setExternalTransaction(ExternalTransaction externalTransaction) {\n this.externalTransaction = externalTransaction;\n }",
"public void setThermalTreatment(ThermalTreatment thermalTreatment) {\r\n\t\tthis.thermalTreatment = thermalTreatment;\r\n\t}",
"public void setContainerTemperature2(double value) {\r\n this.containerTemperature2 = value;\r\n }",
"public String getTemperature() {\n return temperature;\n }",
"public double externalTemperature(double t0, double min, double max)\n {\n double left = t0 - min;\n double right = max - t0;\n int sign = Math.random() * (left + right) > left ? 1 : -1;\n t0 += sign * Math.random();\n return t0;\n }",
"private void openRealTemp() {\n YCBTClient.appTemperatureMeasure(0x01, new BleDataResponse() {\n @Override\n public void onDataResponse(int i, float v, HashMap hashMap) {\n if (i == 0) {\n //success\n }\n }\n });\n }",
"public static void setModemTemperatureTimestamp(long time) {\n\t\t\n\t}",
"private void setHeatTemp(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_setHeatTemp\n\n String tempStr = this.heatTempTextField.getText();\n if (Double.parseDouble(tempStr) < 60.0 || Double.parseDouble(tempStr) > 80.0 ){\n\n System.out.println(\"Error. Please set a temperature between 60.0 - 80.0\");\n }else{\n // turn on heat and transmit the temp\n this.setTemp = Double.parseDouble(tempStr);\n this.turnOnHeat(Double.parseDouble(tempStr));\n }\n }",
"public void setMinTemperatureF(java.lang.String minTemperatureF)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MINTEMPERATUREF$6, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MINTEMPERATUREF$6);\n }\n target.setStringValue(minTemperatureF);\n }\n }",
"public void setLowUnit(TempUnit lowUnit) {\n this.lowUnit = lowUnit;\n }",
"public void displayTemperature(double temperature) {\n\t\toutputPanel.displayTemperature(temperature);\n\t}",
"public double getTemperatureCelsius() {\n return temperatureCelsius;\n }",
"public int getTemperature() {\n\t\treturn temperature;\n\t}",
"public Builder setTemperatureBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n temperature_ = value;\n onChanged();\n return this;\n }",
"public IntegerProperty getTemp() {\n\t\treturn temperature;\n\t}",
"public Temperature(double tempDegrees, String tempScale) {\n\t\tdegrees = tempDegrees; scale = tempScale;}",
"@Override\n public void updateLowerTemperature(final LowerTemperature lowerTemperature) {\n lowerTemperatureRepository.save(lowerTemperature);\n }",
"public int getTemperature() {\n return temperature;\n }",
"private void updateTemperatureValue(float temperature) {\n \t\t\n \t\tString mValue = null;\n \t\t\n \t\tif(temperatureFormat.equals(\"c\")) {\n \t\t\tmValue = String.format(celsiusFormat, temperature);\n \t\t} else if(temperatureFormat.equals(\"f\")) {\n \t\t\tmValue = String.format(fahrenheitFormat, \n \t\t\t\t\tUnitConversionUtils.comvertTemperature(temperature, UnitConversionUtils.CELSIUS, UnitConversionUtils.FAHRENHEIT));\n \t\t} else {\n \t\t\tmValue = String.format(kelvinFormat, \n \t\t\t\t\tUnitConversionUtils.comvertTemperature(temperature, UnitConversionUtils.CELSIUS, UnitConversionUtils.KELVIN));\n \t\t}\n \t\t\n temperatureValueView.setText(mValue);\n \t}",
"public Setter reqSetTemperatureSetting2(byte[] edt) {\n\t\t\treqSetProperty(EPC_TEMPERATURE_SETTING2, edt);\n\t\t\treturn this;\n\t\t}",
"public double autoMaintain(double temperature) {\n\t\tthis.temperature = 3.0;\n\t\treturn temperature;\n\t}",
"public Float getTemperature () {\n return temperature;\n }",
"private void setTemperatureMinError (float temperatureMin, Exception e, int error) {\n this.temperatureMin = temperatureMin;\n temperatureMinErrorMessage = e.toString();\n temperatureMinError = error;\n }",
"float getTemperature();",
"public Temperature() {\n\t\tsuper();\n\t}",
"public java.lang.String getTemperature() {\n java.lang.Object ref = temperature_;\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 temperature_ = s;\n return s;\n }\n }",
"public void perferredTemperature(double mintemp, double maxtemp) {\n\t\tSystem.out.println(\"Preferredtemperature method\");\n\t\tminTemperature = mintemp;\n\t\tmaxTemperature = maxtemp;\n\t\t\n\t}",
"public int getTemperature() {\n return VirtualHardwareManager.getInstance().getTemperature();\n }",
"public int getTemperature() {\n return temperature;\n }",
"protected abstract boolean setTemperatureSetting1(byte[] edt);",
"public void xsetMinTemperatureC(org.apache.xmlbeans.XmlString minTemperatureC)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(MINTEMPERATUREC$10, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(MINTEMPERATUREC$10);\n }\n target.set(minTemperatureC);\n }\n }",
"public void setHighUnit(TempUnit highUnit) {\n this.highUnit = highUnit;\n }",
"private void updateAmbientTempTextView() {\n mAmbientTempText.setText(String.format(Locale.CANADA, DEG_C, mThermostat.getAmbientTemperatureC()));\n }",
"protected abstract boolean setTemperatureSetting2(byte[] edt);",
"@JsonProperty(\"frontPanelTemperature\")\r\n public Double getFrontPanelTemperature() {\r\n return frontPanelTemperature;\r\n }",
"@Override\r\n public int getTemperature(){\r\n return 10;\r\n }",
"public void setTempLvl(int tempLvl)\n {\n if (tempLvl >= 45 & tempLvl <= 70) {\n this.tempLvl = tempLvl;\n }\n else {\n throw new IllegalArgumentException(\"Temperature level must be a number between 45 and 70\");\n }\n }",
"private synchronized void setInTemp(String temp)\n {\n Platform.runLater(() -> this.inTemp.setText(temp + \"°\"));\n }",
"public void setMaxTemperatureC(java.lang.String maxTemperatureC)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAXTEMPERATUREC$8, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MAXTEMPERATUREC$8);\n }\n target.setStringValue(maxTemperatureC);\n }\n }",
"public Object getAirTemperature() {\n\t\treturn null;\n\t}",
"public void setMATERIAL_EXTERNAL(java.lang.String MATERIAL_EXTERNAL) {\r\n this.MATERIAL_EXTERNAL = MATERIAL_EXTERNAL;\r\n }",
"@Override\n public void skinTemperature(int value, int timestamp) {\n }",
"@JsonProperty(\"ioModuleTemperature\")\r\n public void setIoModuleTemperature(Double ioModuleTemperature) {\r\n this.ioModuleTemperature = ioModuleTemperature;\r\n }",
"public java.lang.String getTemperature() {\n java.lang.Object ref = temperature_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n temperature_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public float getTemperature() {\n\t\treturn (float) getRawTemperature() / 100f;\n\t}",
"public com.google.protobuf.ByteString\n getTemperatureBytes() {\n java.lang.Object ref = temperature_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n temperature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"protected void onGetTemperatureSetting1(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"public void turnOnHeat(Double temp){\n\n this.selectedTrain.setHeat(1); // turn on heat\n this.selectedTrain.setAC(0); // turn off heat\n\n if (temp == null){ this.selectedTrain.setThermostat(60.0); } // set to default heat\n else{ this.selectedTrain.setThermostat(temp); }\n\n this.operatingLogbook.add(\"Heat Set: \" + temp.toString());\n this.printOperatingLogs();\n }",
"public Double getThermistorCelsiusTemperature()\n {\n return finchController.getThermistorCelsiusTemperature();\n }",
"public Thermometer(Person person){\r\n super(person);\r\n temperature = new MeasureUnit(\"Celsius\",\"º C\", 1);\r\n }",
"public double getCurrentTemperature() {\n return this.currentTemperature;\n }",
"protected void onGetTemperatureSetting2(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"public void xsetMinTemperatureF(org.apache.xmlbeans.XmlString minTemperatureF)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(MINTEMPERATUREF$6, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(MINTEMPERATUREF$6);\n }\n target.set(minTemperatureF);\n }\n }",
"public boolean isValidTemperature() {\n\t\treturn false;\n\t}",
"public Informer reqInformTemperatureSetting1() {\n\t\t\treqInformProperty(EPC_TEMPERATURE_SETTING1);\n\t\t\treturn this;\n\t\t}",
"public void addAmbientTemperatureListener(AmbientTemperatureListener listener) {\n\t\tlistenerAmbientTemperature.add(listener);\n\t}",
"public void xsetMaxTemperatureC(org.apache.xmlbeans.XmlString maxTemperatureC)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(MAXTEMPERATUREC$8, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(MAXTEMPERATUREC$8);\n }\n target.set(maxTemperatureC);\n }\n }",
"public void setExternalTransId(String externalTransId) {\n\t\tmExternalTransId = StringUtils.left(externalTransId, 255);\n\t}",
"@Override \n public double getTemperature() { \n return pin.getValue();\n }",
"public com.google.protobuf.ByteString\n getTemperatureBytes() {\n java.lang.Object ref = temperature_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n temperature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"void setTemp(String name, Object value);",
"public Builder clearTemperature() {\n \n temperature_ = getDefaultInstance().getTemperature();\n onChanged();\n return this;\n }",
"public void setMinTemp(@NonNull Integer minTemp) {\n this.minTemp = minTemp;\n }",
"private void setTemperatureMaxError (float temperatureMax, Exception e, int error) {\n this.temperatureMax = temperatureMax;\n temperatureMaxErrorMessage = e.toString();\n temperatureMaxError = error;\n }"
] | [
"0.71892786",
"0.70085925",
"0.70024264",
"0.696696",
"0.69083667",
"0.68637776",
"0.67798865",
"0.6603896",
"0.6592485",
"0.63422495",
"0.63014174",
"0.62181",
"0.620914",
"0.6204994",
"0.6188286",
"0.6092177",
"0.6040147",
"0.60246074",
"0.59802127",
"0.59640944",
"0.5921717",
"0.59003156",
"0.58859456",
"0.58620363",
"0.5837818",
"0.5811443",
"0.5773444",
"0.5748576",
"0.5733327",
"0.57225066",
"0.5718262",
"0.57041574",
"0.57023096",
"0.56915",
"0.5686688",
"0.5670094",
"0.56606245",
"0.56467044",
"0.56386626",
"0.5553206",
"0.5528257",
"0.54902667",
"0.546743",
"0.546719",
"0.5464928",
"0.544454",
"0.5441587",
"0.5440036",
"0.543543",
"0.5428933",
"0.5421842",
"0.5418676",
"0.5406228",
"0.53998476",
"0.5394197",
"0.5390129",
"0.5375459",
"0.53748786",
"0.5350355",
"0.53266656",
"0.53145874",
"0.5298485",
"0.52980363",
"0.5296179",
"0.52768224",
"0.52767867",
"0.52723396",
"0.52584285",
"0.52472025",
"0.52371377",
"0.52298665",
"0.52182156",
"0.52081066",
"0.5183339",
"0.51636165",
"0.51572067",
"0.51567763",
"0.515451",
"0.5152545",
"0.51497394",
"0.5148392",
"0.5148208",
"0.51371557",
"0.5126807",
"0.51216334",
"0.51190764",
"0.5094627",
"0.5094519",
"0.5092878",
"0.5066288",
"0.50615627",
"0.5043275",
"0.5030693",
"0.5021234",
"0.50190574",
"0.5011865",
"0.5009164",
"0.50005966",
"0.49978942",
"0.49891692"
] | 0.86162484 | 0 |
Gets the value of the parcelTemperature property. | public double getParcelTemperature() {
return parcelTemperature;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public IntegerProperty getTemp() {\n\t\treturn temperature;\n\t}",
"public int getTemperature() {\n\t\treturn temperature;\n\t}",
"public String getTemperature() {\r\n\t\treturn temperature;\r\n\t}",
"public String getTemperature() {\n\t\treturn temperature;\n\t}",
"public int getTemperature() {\n return temperature;\n }",
"public double getTemperatureCelsius() {\n return temperatureCelsius;\n }",
"public float getTemperature() {\n\t\treturn (float) getRawTemperature() / 100f;\n\t}",
"public String getTemperature() {\n return temperature;\n }",
"public int getTemperature() {\n return temperature;\n }",
"public double getTemperature() {return temperature;}",
"public int getTemperature() {\n return VirtualHardwareManager.getInstance().getTemperature();\n }",
"public double getExternalTemperature() {\r\n return externalTemperature;\r\n }",
"public double getCurrentTemperature() {\n return this.currentTemperature;\n }",
"public Float getTemperature () {\n return temperature;\n }",
"@Override \n public double getTemperature() { \n return pin.getValue();\n }",
"public HLAfloat32BE getTemperature() { return this.temperature; }",
"float getTemperature();",
"public AlarmTemperature getTemperature() {\n\t\treturn this.temperature;\n\t}",
"public Double getThermistorCelsiusTemperature()\n {\n return finchController.getThermistorCelsiusTemperature();\n }",
"public float getTempCelsius() {\n float tempC = 0;\n if (readings.size() > 0) {\n tempC = readings.get(readings.size() - 1).temperature;\n }\n return tempC;\n }",
"public String getTempInCelsius() {\n\t\treturn tempInCelsius;\n\t}",
"public java.lang.String getTemperature() {\n java.lang.Object ref = temperature_;\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 temperature_ = s;\n return s;\n }\n }",
"public void setParcelTemperature(double value) {\r\n this.parcelTemperature = value;\r\n }",
"public java.lang.String getTemperature() {\n java.lang.Object ref = temperature_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n temperature_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public double getHumidityTemperature() {\r\n return humidityTemperature;\r\n }",
"@Override\n\tpublic int getTemperature() throws emException, TException {\n\t\treturn 0;\n\t}",
"public double getInputTemperature() throws NumberFormatException {\n\t\treturn inputPanel.getTemperature();\n\t}",
"public double getTemp() {\n\t\treturn currentTemp;\n\t}",
"@Override\r\n public int getTemperature(){\r\n return 10;\r\n }",
"public int getBodyTemperature() {\n return this.bodyTemperature;\n }",
"public double GetMashTemperature() {\n\t\treturn msc.GetMashTemperature();\n\t}",
"public Getter reqGetMeasuredRoomTemperature() {\n\t\t\treqGetProperty(EPC_MEASURED_ROOM_TEMPERATURE);\n\t\t\treturn this;\n\t\t}",
"public static int getTemperature() {\n\t\t\n\t\tSystem.out.println(\"Enter temperature value : \");\n\t\tint inputValue = sc.nextInt();\n\t\treturn inputValue;\n\t}",
"public Double getIndoorTemperature() {\n return indoorTemperature;\n }",
"public double ThermodynamicTemperature() {\n return OCCwrapJavaJNI.Units_Dimensions_ThermodynamicTemperature(swigCPtr, this);\n }",
"public com.google.protobuf.ByteString\n getTemperatureBytes() {\n java.lang.Object ref = temperature_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n temperature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public Object getAirTemperature() {\n\t\treturn null;\n\t}",
"public static float getCpuTemperature() throws IOException, InterruptedException, NumberFormatException {\n \treturn pi4jSystemInfoConnector.getCpuTemperature();\r\n }",
"public double getTemp(){\n return currentTemp;\n }",
"public byte getTemperature_unit() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readByte(__io__address + 11);\n\t\t} else {\n\t\t\treturn __io__block.readByte(__io__address + 11);\n\t\t}\n\t}",
"public float getTemperature(Point3d position){\r\n\t\tBlockPos pos = new BlockPos(position.x, position.y, position.z);\r\n\t\treturn world.getBiome(pos).getTemperature(pos);\r\n\t}",
"public float getTemperatureMin() {\n return temperatureMin;\n }",
"public com.google.protobuf.ByteString\n getTemperatureBytes() {\n java.lang.Object ref = temperature_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n temperature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public float getCurrentTemp(){\n return currentTemp;\n }",
"public Double getOutdoorTemperature() {\n return outdoorTemperature;\n }",
"public String getFeelsLikeTempInCelsius() {\n\t\treturn feelsLikeTempInCelsius;\n\t}",
"public Getter reqGetMeasuredFloorTemperature() {\n\t\t\treqGetProperty(EPC_MEASURED_FLOOR_TEMPERATURE);\n\t\t\treturn this;\n\t\t}",
"public float getTemps() {\n\t\treturn temps;\n\t}",
"public float getTemperatureMax() {\n return temperatureMax;\n }",
"FloatResource temperatureCoefficient();",
"public static int getModemTemperature() {\n\t\treturn 0;\n\t}",
"public double getContainerTemperature1() {\r\n return containerTemperature1;\r\n }",
"public double getContainerTemperature3() {\r\n return containerTemperature3;\r\n }",
"public Integer getTempo() {\n return this.tempoSpeed;\n }",
"@JsonProperty(\"frontPanelTemperature\")\r\n public Double getFrontPanelTemperature() {\r\n return frontPanelTemperature;\r\n }",
"@JsonIgnore\n\tpublic DecimalMeasure<Temperature> getTemperatureAsMeasure()\n\t{\n\t\treturn this.temperatureAsMeasure;\n\t}",
"public float getPressure() {\n pressure = calculatePressure();\n return pressure;\n }",
"public void setTemperature(Float temperature) {\n this.temperature = temperature;\n }",
"public float getTempFarenheit() {\n float tempF = 0;\n float tempC;\n if (readings.size() > 0) {\n tempC = readings.get(readings.size() - 1).temperature;\n tempF = (float) ((tempC * 1.8) + 32);\n\n }\n return tempF;\n }",
"public float getPressure() {\n return pm.pen.getLevelValue(PLevel.Type.PRESSURE);\n }",
"public float getTemp3() {\n\t\treturn temp3;\n\t}",
"public float getTemperatureInFahrenheit() {\n\t\tif(this.metric==Metric.CELSIUS) {\n\t\t\treturn(this.temperature*(9/5)+32);\n\t\t}else if(this.metric==Metric.KELVIN) {\n\t\t\treturn (9*(this.temperature - 273)/5 + 32);\n\t\t}\n\t\treturn this.temperature;\n\t\t\n\t}",
"public void setTemp(int temp) {\n \tthis.temperature = temp;\n }",
"public String getTemperatureInCelcius(float temp)\n {\n\n temp = ((temp - 32) * 5) / 9;\n\n return Float.toString(temp);\n }",
"public void setTemperature(int value) {\n this.temperature = value;\n }",
"public double getHumidityValue() {\r\n return humidityValue;\r\n }",
"public Informer reqInformMeasuredRoomTemperature() {\n\t\t\treqInformProperty(EPC_MEASURED_ROOM_TEMPERATURE);\n\t\t\treturn this;\n\t\t}",
"@JsonProperty(\"ioModuleTemperature\")\r\n public Double getIoModuleTemperature() {\r\n return ioModuleTemperature;\r\n }",
"public float getPressure() {\n\t\treturn (float) getRawPressure() / 100f;\n\t}",
"public void setTemperature(String temperature) {\n this.temperature = temperature;\n }",
"public double getHumidity()\n {\n return humidity;\n }",
"public double getPetroleumIntensityOfElectricityProduction() {\r\n\t\treturn petroleumIntensityOfElectricityProduction;\r\n\t}",
"public float getMeilleurTemps() {\n\t\treturn meilleurTemps;\n\t}",
"double getPressure();",
"double getTempo();",
"@NonNull\n public Integer getMinTemp() {\n return minTemp;\n }",
"public float getTemp1() {\n\t\treturn temp1;\n\t}",
"public float getminTemp() {\n Reading minTempReading = null;\n float minTemp = 0;\n if (readings.size() >= 1) {\n minTemp = readings.get(0).temperature;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).temperature < minTemp) {\n minTemp = readings.get(i).temperature;\n }\n }\n } else {\n minTemp = 0;\n }\n return minTemp;\n }",
"private void getTemperature() {\r\n \t\r\n \t//Get the date from the DateService class\r\n \tDate theDate = theDateService.getDate(); \r\n \t\r\n \t//Increment the number of readings\r\n \tlngNumberOfReadings ++;\r\n \tdouble temp = 0.0;\r\n \tString rep = \"\";\r\n \t\r\n \t//Assume that the TMP36 is connected to AIN4\r\n \trep = this.theTemperatureService.readTemperature(\"4\");\r\n \tpl(rep);\r\n \ttemp = this.theTemperatureService.getTheTemperature();\r\n \t\r\n \t//All details necessary to send this reading are present so create a new TemperatureReading object\r\n \tTemperatureReading theReading = new TemperatureReading(temp, theDate, lngNumberOfReadings);\r\n \tthis.send(theReading);\r\n \t\r\n }",
"protected byte[] getMeasuredRoomTemperature() {return null;}",
"public int getTemp(){\n return temp;\n }",
"public CP getTPValueTechnicalPart() { \r\n\t\tCP retVal = this.getTypedField(40, 0);\r\n\t\treturn retVal;\r\n }",
"private double measureTemp() {\n try {\n analog0 = blueTooth.sensor(0);\n analog1 = blueTooth.sensor(1);\n return ((analog0 - analog1) * 5 * 100) / 1024.0;\n } catch (TimeoutException ex) {\n Logger.getLogger(TempMeasure.class.getName()).log(Level.SEVERE, null, ex);\n }\n return ((analog0 - analog1) * 5 * 100) / 1024.0;\n }",
"public double getReadPressure(){\n return this.mFarm.getReadPressure();\n }",
"public double get_thermal_reading() {\n\t\t\n\t\treturn 0;\n\t}",
"public int getTempoMili() {\n return tempoMili;\n }",
"public double getContainerTemperature2() {\r\n return containerTemperature2;\r\n }",
"public String getTemperatura() {\r\n return temperatura;\r\n }",
"public java.lang.String getMinTemperatureC()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MINTEMPERATUREC$10, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public void setTemperature(int value) {\n\t\tthis.temperature = value;\n\t}",
"public void setExternalTemperature(double value) {\r\n this.externalTemperature = value;\r\n }",
"public String getTemperature(JSONObject j) throws JSONException{\n return roundTwoDecimals(Utilities.convertTemp(tempUnits,j.getDouble(\"day\"))) + \"\";\n }",
"public String getPressure() {\n\t\treturn pressure;\n\t}",
"public String getPressure() {\n\t\treturn pressure;\n\t}",
"public Float getHumidity () {\n return humidity;\n }",
"protected byte[] getMeasuredFloorTemperature() {return null;}",
"public String getHumidity() {\n\t\treturn humidity;\n\t}",
"public String getHumidity() {\n\t\treturn humidity;\n\t}",
"public Double getTemperature(Double latitude, Double elevation,\r\n\t\t\tString timeStamp) {\r\n\r\n\t\tDouble timeFactor = getTimeFactor(timeStamp);\r\n\r\n\t\tDouble temperature = seaLevelTemp + (tempPerElevation1 * elevation)\r\n\t\t\t\t+ (tempPerLatitude * latitude) + timeFactor;\r\n\r\n\t\t/*\r\n\t\t * Double temperature = seaLevelTemp + timeFactor + (tempPerElevation1 *\r\n\t\t * elevation) - (tempPerLatitude * latitude);\r\n\t\t */\r\n\r\n\t\tif (temperature < -50)\r\n\t\t\ttemperature = -50.00;\r\n\r\n\t\treturn temperature;\r\n\r\n\t}",
"public java.lang.String getMinTemperatureF()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MINTEMPERATUREF$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }"
] | [
"0.79467344",
"0.781432",
"0.780037",
"0.77868557",
"0.77559",
"0.76736414",
"0.7670287",
"0.76329625",
"0.7631255",
"0.75826395",
"0.75781685",
"0.7537095",
"0.74874103",
"0.74194044",
"0.74179196",
"0.7358361",
"0.7314101",
"0.72830003",
"0.7197498",
"0.7178249",
"0.71754795",
"0.7085504",
"0.7078683",
"0.70291835",
"0.7017016",
"0.69110835",
"0.6875509",
"0.68647647",
"0.6853855",
"0.68480355",
"0.6820654",
"0.67718947",
"0.6770725",
"0.6753263",
"0.6693466",
"0.6674468",
"0.66611797",
"0.6654154",
"0.6623056",
"0.6599794",
"0.659058",
"0.6584276",
"0.65777093",
"0.65097564",
"0.6456329",
"0.6456217",
"0.63915783",
"0.63677406",
"0.6315941",
"0.630955",
"0.6272797",
"0.6270904",
"0.62695986",
"0.62692153",
"0.623474",
"0.6234418",
"0.6230318",
"0.62288076",
"0.6219137",
"0.61882055",
"0.61530006",
"0.6137046",
"0.6136548",
"0.6120434",
"0.61134976",
"0.6106012",
"0.6100946",
"0.60917",
"0.6088913",
"0.60713863",
"0.6060527",
"0.6038074",
"0.6037651",
"0.60262036",
"0.6025652",
"0.60183495",
"0.6016603",
"0.6011087",
"0.5995275",
"0.59902084",
"0.5972942",
"0.5962499",
"0.59236306",
"0.5919469",
"0.5913947",
"0.5909447",
"0.59056973",
"0.5898757",
"0.5894879",
"0.5867182",
"0.5861961",
"0.586083",
"0.58400965",
"0.58400965",
"0.58400065",
"0.5837596",
"0.5834571",
"0.5834571",
"0.5815763",
"0.58098936"
] | 0.8679418 | 0 |
Sets the value of the parcelTemperature property. | public void setParcelTemperature(double value) {
this.parcelTemperature = value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTemperature(Float temperature) {\n this.temperature = temperature;\n }",
"private void setTemp(int temperature) {\n\t\tthis.temperature.setValue(temperature);\n\t}",
"public void setTemp(int temp) {\n \tthis.temperature = temp;\n }",
"public void setTemperature(int value) {\n this.temperature = value;\n }",
"public void setTemperature(int temperature) {\n if (status) {\n this.temperature = temperature;\n } else System.out.println(\"dispozitivul este oprit\");\n }",
"public void setTemperature(String temperature) {\n this.temperature = temperature;\n }",
"public void setTemperature(int value) {\n\t\tthis.temperature = value;\n\t}",
"public void setTemperatureCelsius(final double temperatureCelsius) {\n if (temperatureCelsius >= MINIMUM_POOL_TEMP_CELSIUS\n && temperatureCelsius <= MAXIMUM_POOL_TEMP_CELSIUS) {\n this.temperatureCelsius = temperatureCelsius;\n }\n }",
"public double getParcelTemperature() {\r\n return parcelTemperature;\r\n }",
"public void setExternalTemperature(double value) {\r\n this.externalTemperature = value;\r\n }",
"public void setTemperature_unit(byte temperature_unit) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeByte(__io__address + 11, temperature_unit);\n\t\t} else {\n\t\t\t__io__block.writeByte(__io__address + 11, temperature_unit);\n\t\t}\n\t}",
"public void setTemperatureNeededToCookAt(double t) {\r\n temp = t;\r\n }",
"public void setStartingTemperature(final double temperature) {\r\n\t\tthis.setTemperature(temperature);\r\n\t}",
"public void setTemp(double currentTemp) {\n\t\tthis.currentTemp = currentTemp;\n\t}",
"public static void setModemTemperature(String temperature) {\n\t\t\n\t}",
"public void setHumidityTemperature(double value) {\r\n this.humidityTemperature = value;\r\n }",
"public void setTempLvl(int tempLvl)\n {\n if (tempLvl >= 45 & tempLvl <= 70) {\n this.tempLvl = tempLvl;\n }\n else {\n throw new IllegalArgumentException(\"Temperature level must be a number between 45 and 70\");\n }\n }",
"public void setTemperature(double temp){tempval.setText(Double.toString(temp));}",
"public double getTemperatureCelsius() {\n return temperatureCelsius;\n }",
"public void setIndoorTemperature(Double indoorTemperature) {\n this.indoorTemperature = indoorTemperature;\n }",
"public void setBodyTemperature(int bodyTemperature) {\n this.bodyTemperature = bodyTemperature;\n }",
"public IntegerProperty getTemp() {\n\t\treturn temperature;\n\t}",
"protected void setTemperatureSingle(final ProviderName providerName, final String id, final int temperature) {\n Preconditions.checkNotNull(providerName);\n Preconditions.checkNotNull(id);\n try {\n providers.get(providerName).setTemperature(id, temperature);\n } catch (final Exception e) {\n final String message = String.format(\"Failed to update temperature for %s:%s\",\n providerName.getName(), id);\n LOGGER.error(message, e);\n throw new RuntimeException(message, e);\n }\n }",
"public double getTemperature() {return temperature;}",
"@AutoGUIAnnotation(\r\n\tDescriptionForUser = \"Sets the SetPoint temperature.\",\r\n\tParameterNames = {\"Temperature [K]\"},\r\n\tDefaultValues= {\"295\"},\r\n\tToolTips = {\"Define tool-tips here\"})\r\n @iC_Annotation(MethodChecksSyntax = true )\r\n public void setTemp(float SetPoint)\r\n throws IOException, DataFormatException {\r\n\r\n\t// perform Syntax-check\r\n\tif (SetPoint < 0 || SetPoint > 500)\r\n\t\tthrow new DataFormatException(\"Set point out of range.\");\r\n\r\n\t// exit if in Syntax-check mode\r\n\tif ( inSyntaxCheckMode() )\r\n\t\treturn;\r\n\r\n // build the GPIB command string\r\n\tString str = \"SETP 1,\" + SetPoint;\r\n\r\n\t// send to the Instrument\r\n\tSendToInstrument(str);\r\n\r\n\t// wait until setpoint is reached\r\n float T;\r\n\tdo {\r\n // it is recommended to check if scripting has been paused\r\n isPaused(true);\r\n\r\n // get current temperature\r\n str = QueryInstrument(\"KRDG? A\");\r\n\r\n // convert to a float value\r\n //T = getFloat(str); // this is the recommended way of converting\r\n T = Float.parseFloat(str);\r\n\t} while ( Math.abs(T-SetPoint) > 0.1 &&\r\n m_StopScripting == false);\r\n }",
"public String getTemperature() {\r\n\t\treturn temperature;\r\n\t}",
"public final void setTemp(java.math.BigDecimal temp)\n\t{\n\t\tsetTemp(getContext(), temp);\n\t}",
"public String getTemperature() {\n\t\treturn temperature;\n\t}",
"public void setReadingTemperature(String text) {\n\t\ttextReadingTemperature.setText(text);\n\t}",
"protected void setTemperatureAll(final int temperature) {\n for (final Map.Entry<ProviderName, Provider<?, ?>> entry : providers.entrySet()) {\n try {\n for (final Light light : entry.getValue().getLights()) {\n try {\n entry.getValue().setTemperature(light.getId(), temperature);\n } catch (final Exception e) {\n final String message = String.format(\"Failed to update temperature for %s\",\n entry.getValue().getClass().getSimpleName());\n LOGGER.error(message, e);\n throw new RuntimeException(message, e);\n }\n }\n } catch (final Exception e) {\n final String message = String.format(\"Failed to fetch information for %s\",\n entry.getValue().getClass().getSimpleName());\n LOGGER.error(message, e);\n throw new RuntimeException(message, e);\n }\n }\n }",
"protected void onSetTemperatureSetting1(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"public void setContainerTemperature1(double value) {\r\n this.containerTemperature1 = value;\r\n }",
"public final void setTemp(com.mendix.systemwideinterfaces.core.IContext context, java.math.BigDecimal temp)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.Temp.toString(), temp);\n\t}",
"@JsonIgnore\n\tpublic void setTemperatureAsMeasure(DecimalMeasure<Temperature> temperature)\n\t{\n\t\tthis.temperatureAsMeasure = temperature;\n\t}",
"public int getTemperature() {\n\t\treturn temperature;\n\t}",
"public int getTemperature() {\n return temperature;\n }",
"public String getTemperature() {\n return temperature;\n }",
"public void setCelular(String celular) {\n\t\tthis.celular = celular;\n\t}",
"private void updateTemperatureValue(float temperature) {\n \t\t\n \t\tString mValue = null;\n \t\t\n \t\tif(temperatureFormat.equals(\"c\")) {\n \t\t\tmValue = String.format(celsiusFormat, temperature);\n \t\t} else if(temperatureFormat.equals(\"f\")) {\n \t\t\tmValue = String.format(fahrenheitFormat, \n \t\t\t\t\tUnitConversionUtils.comvertTemperature(temperature, UnitConversionUtils.CELSIUS, UnitConversionUtils.FAHRENHEIT));\n \t\t} else {\n \t\t\tmValue = String.format(kelvinFormat, \n \t\t\t\t\tUnitConversionUtils.comvertTemperature(temperature, UnitConversionUtils.CELSIUS, UnitConversionUtils.KELVIN));\n \t\t}\n \t\t\n temperatureValueView.setText(mValue);\n \t}",
"private void setHeatTemp(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_setHeatTemp\n\n String tempStr = this.heatTempTextField.getText();\n if (Double.parseDouble(tempStr) < 60.0 || Double.parseDouble(tempStr) > 80.0 ){\n\n System.out.println(\"Error. Please set a temperature between 60.0 - 80.0\");\n }else{\n // turn on heat and transmit the temp\n this.setTemp = Double.parseDouble(tempStr);\n this.turnOnHeat(Double.parseDouble(tempStr));\n }\n }",
"protected void onSetTemperatureSetting2(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"public double getExternalTemperature() {\r\n return externalTemperature;\r\n }",
"public Float getTemperature () {\n return temperature;\n }",
"private synchronized void setInTemp(String temp)\n {\n Platform.runLater(() -> this.inTemp.setText(temp + \"°\"));\n }",
"@Override\r\n public int getTemperature(){\r\n return 10;\r\n }",
"public void setOutdoorTemperature(Double outdoorTemperature) {\n this.outdoorTemperature = outdoorTemperature;\n }",
"public void setContainerTemperature3(double value) {\r\n this.containerTemperature3 = value;\r\n }",
"public int getTemperature() {\n return temperature;\n }",
"public static void setModemTemperatureTimestamp(long time) {\n\t\t\n\t}",
"public void updateCelcius(){\n tempInC = ( (tempInF - 32)/9 ) * 5;\n }",
"public HLAfloat32BE getTemperature() { return this.temperature; }",
"public Temperature() {\n\t\tsuper();\n\t}",
"@Override \n public double getTemperature() { \n return pin.getValue();\n }",
"public void setTcintmprice(float _tcintmprice)\r\n {\r\n this._tcintmprice = _tcintmprice;\r\n }",
"public Builder setTemperature(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n temperature_ = value;\n onChanged();\n return this;\n }",
"@JsonProperty(\"frontPanelTemperature\")\r\n public void setFrontPanelTemperature(Double frontPanelTemperature) {\r\n this.frontPanelTemperature = frontPanelTemperature;\r\n }",
"public void changeTemperature(final double delta) {\n if (getTemperatureCelsius() + delta > MAXIMUM_POOL_TEMP_CELSIUS) {\n setTemperatureCelsius(MAXIMUM_POOL_TEMP_CELSIUS);\n } else {\n setTemperatureCelsius(Math.max(getTemperatureCelsius() + delta,\n MINIMUM_POOL_TEMP_CELSIUS));\n }\n }",
"public void perferredTemperature(double mintemp, double maxtemp) {\n\t\tSystem.out.println(\"Preferredtemperature method\");\n\t\tminTemperature = mintemp;\n\t\tmaxTemperature = maxtemp;\n\t\t\n\t}",
"protected BiomeGenBase setTemperatureRainfall(float par1, float par2)\n {\n if (par1 > 0.1F && par1 < 0.2F)\n {\n throw new IllegalArgumentException(\"Please avoid temperatures in the range 0.1 - 0.2 because of snow\");\n }\n else\n {\n this.temperature = par1;\n this.rainfall = par2;\n return this;\n }\n }",
"public Temperature(double tempDegrees, String tempScale) {\n\t\tdegrees = tempDegrees; scale = tempScale;}",
"public void displayTemperature(double temperature) {\n\t\toutputPanel.displayTemperature(temperature);\n\t}",
"public float getTemperature() {\n\t\treturn (float) getRawTemperature() / 100f;\n\t}",
"public Double getThermistorCelsiusTemperature()\n {\n return finchController.getThermistorCelsiusTemperature();\n }",
"public void setTempoVolta() {\n LocalDateTime aux;\n aux = this.tempoFinal.minusHours(this.tempoInit.getHour()).minusMinutes(this.tempoInit.getMinute()).minusSeconds(this.tempoInit.getSecond()).minusNanos(this.tempoInit.getNano());\n int mili = aux.getNano()/1000000;\n this.setTempoMili(mili);\n if(this.tempoMili<10){\n this.tempoVolta = aux.getMinute() + \":\" + aux.getSecond() + \".00\" + mili;\n } else if(this.tempoMili<100){\n this.tempoVolta = aux.getMinute() + \":\" + aux.getSecond() + \".0\" + mili;\n }else{\n this.tempoVolta = aux.getMinute() + \":\" + aux.getSecond() + \".\" + mili;\n }\n this.setTempoSec((aux.getMinute()*60)+aux.getSecond());\n if(this.melhorSec == 0 && this.melhorMili == 0){\n this.melhorSec = this.tempoSec;\n this.melhorMili = this.tempoMili;\n } else {\n if(this.tempoSec<this.melhorSec){\n this.melhorSec = this.tempoSec;\n this.melhorMili = this.tempoMili;\n } else if(this.tempoSec==this.melhorSec && this.melhorMili>this.tempoMili){\n this.melhorMili = this.tempoMili;\n } \n }\n }",
"@Override\r\n\tpublic void TemperatureUpdated(Temperature temperature) {\n\t\t\r\n\t\twhile (form == null);\r\n\t\tform.UpdateTemperature(temperature.getValue());\r\n\t}",
"public void setMinTemperatureF(java.lang.String minTemperatureF)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MINTEMPERATUREF$6, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MINTEMPERATUREF$6);\n }\n target.setStringValue(minTemperatureF);\n }\n }",
"float getTemperature();",
"public double getCurrentTemperature() {\n return this.currentTemperature;\n }",
"public void setTempCoolDown(int tempCoolDown) {\n this.tempCoolDown = tempCoolDown;\n }",
"@JsonProperty(\"ioModuleTemperature\")\r\n public void setIoModuleTemperature(Double ioModuleTemperature) {\r\n this.ioModuleTemperature = ioModuleTemperature;\r\n }",
"public Thermometer(Person person){\r\n super(person);\r\n temperature = new MeasureUnit(\"Celsius\",\"º C\", 1);\r\n }",
"public void setElectricaltilt(java.math.BigDecimal newElectricaltilt)\n\t\tthrows java.rmi.RemoteException;",
"public void setThermalTreatment(ThermalTreatment thermalTreatment) {\r\n\t\tthis.thermalTreatment = thermalTreatment;\r\n\t}",
"public int getTemperature() {\n return VirtualHardwareManager.getInstance().getTemperature();\n }",
"public void setMinTemp(@NonNull Integer minTemp) {\n this.minTemp = minTemp;\n }",
"public String getTempInCelsius() {\n\t\treturn tempInCelsius;\n\t}",
"public void calculatePointTemp(Point point) {\n WorldItem containedItem = point.getContainedItem();\n\n // Maintain temperature if the item here is flammable and on fire\n if (containedItem instanceof FlammableItem) {\n if (((FlammableItem) containedItem).isOnFire()) {\n return;\n }\n }\n\n // Temperature factors\n double radQDot = calcRadQDot(point);\n double convQDot = calcConvQDot(point);\n double totalQDot = radQDot + convQDot;\n\n point.setCurrentTemp(point.getCurrentTemp() + (KW_DEGREE_INCREASE * totalQDot));\n }",
"public double getInputTemperature() throws NumberFormatException {\n\t\treturn inputPanel.getTemperature();\n\t}",
"public void setContainerTemperature2(double value) {\r\n this.containerTemperature2 = value;\r\n }",
"public AlarmTemperature getTemperature() {\n\t\treturn this.temperature;\n\t}",
"public void setTempAvgDaily(Double tempAvgDaily) {\r\n\t\tthis.tempAvgDaily = tempAvgDaily;\r\n\t}",
"public void setHumidity(Float humidity) {\n this.humidity = humidity;\n }",
"public void setTemperatura(String temperatura) {\r\n this.temperatura = temperatura;\r\n }",
"public Pi4jPCF8591TemperatureSensor(String name, Termistor termistor) {\n\t\tthis.name = name;\n\t\tthis.termistor = termistor;\n\t\tthis.duration = Duration.ofSeconds(1);\n\t\tthis.sensorValue = new ReactiveSensorValue<>(new Callable<Double>() {\n\n\t\t\t@Override\n\t\t\tpublic Double call() throws Exception {\n\t\t\t\treturn termistor.getTemperature(TemperatureScale.CELSIUS);\n\t\t\t}\n\t\t}, duration);\n\t\tthis.temperature = new Temperature() {\n\n\t\t\t@Override\n\t\t\tpublic Double getValue() {\n\t\t\t\treturn (double) sensorValue.getValue();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Mono<Double> asMono() {\n\t\t\t\treturn sensorValue.asMono();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Flux<Double> asFlux() {\n\t\t\t\treturn sensorValue.asFlux();\n\t\t\t}\n\t\t};\n\t}",
"public static void resetModemTemperature() {\n\t\t\n\t}",
"public void setCellule(Cellule cellule){\r\n if(!this.positionValide(cellule.getX(), cellule.getY())) {\r\n return;\r\n }\r\n\r\n this.tabCellules[cellule.getY()][cellule.getX()] = cellule;\r\n }",
"void setTemp(String name, Object value);",
"public void setMinTemperatureC(java.lang.String minTemperatureC)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MINTEMPERATUREC$10, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MINTEMPERATUREC$10);\n }\n target.setStringValue(minTemperatureC);\n }\n }",
"public void turnOnHeat(Double temp){\n\n this.selectedTrain.setHeat(1); // turn on heat\n this.selectedTrain.setAC(0); // turn off heat\n\n if (temp == null){ this.selectedTrain.setThermostat(60.0); } // set to default heat\n else{ this.selectedTrain.setThermostat(temp); }\n\n this.operatingLogbook.add(\"Heat Set: \" + temp.toString());\n this.printOperatingLogs();\n }",
"@Override\n\tpublic int getTemperature() throws emException, TException {\n\t\treturn 0;\n\t}",
"public void setTempo(int tempo) {\n if (tempo < 0) {\n throw new IllegalArgumentException(\"tempo can't be negative\");\n }\n this.tempo = tempo;\n }",
"public int setTemperatureMin(Float temperatureMin) {\n try {\n setTemperatureMin(temperatureMin.floatValue());\n } catch (Exception e) {\n setTemperatureMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return temperatureMinError;\n }",
"public Informer reqInformMeasuredRoomTemperature() {\n\t\t\treqInformProperty(EPC_MEASURED_ROOM_TEMPERATURE);\n\t\t\treturn this;\n\t\t}",
"void setTempo(int tempo);",
"@Test\n\tpublic void testSetTemp_1()\n\t\tthrows Exception {\n\t\tSaveScenarioAction fixture = SaveScenarioActionFactory.createInstance();\n\t\tfloat temp = 1.0f;\n\n\t\tfixture.setTemp(temp);\n\n\t\t// add additional test code here\n\t}",
"@Override\n public void setTempo(int tempo) {\n }",
"public void setTempoPatrulha(int tempoPatrulha) {\n this.tempoPatrulha = tempoPatrulha;\n }",
"@Override\n public void skinTemperature(int value, int timestamp) {\n }",
"public com.google.protobuf.ByteString\n getTemperatureBytes() {\n java.lang.Object ref = temperature_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n temperature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public int setTemperatureMin(Integer temperatureMin) {\n try {\n setTemperatureMin(temperatureMin.floatValue());\n } catch (Exception e) {\n setTemperatureMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return temperatureMinError;\n }"
] | [
"0.744391",
"0.7405276",
"0.7332398",
"0.721018",
"0.70798117",
"0.7079475",
"0.70470685",
"0.70036244",
"0.6801054",
"0.65709144",
"0.645867",
"0.6450989",
"0.64086455",
"0.6198187",
"0.6118481",
"0.6092653",
"0.60002273",
"0.59732187",
"0.5944382",
"0.5941487",
"0.5936618",
"0.5927933",
"0.59148777",
"0.5846227",
"0.58364636",
"0.5827205",
"0.58221865",
"0.5786822",
"0.5780182",
"0.5775496",
"0.57718086",
"0.57385826",
"0.5729203",
"0.57249343",
"0.5709601",
"0.56878144",
"0.5651317",
"0.5650182",
"0.56475514",
"0.5638269",
"0.56301665",
"0.5591398",
"0.5590152",
"0.55819625",
"0.5578932",
"0.5574028",
"0.5533719",
"0.5518658",
"0.55171686",
"0.55099475",
"0.55067414",
"0.5501825",
"0.5498525",
"0.54813915",
"0.54661906",
"0.54454094",
"0.54392046",
"0.5426759",
"0.5414702",
"0.54020536",
"0.5398228",
"0.53971213",
"0.53938276",
"0.53930587",
"0.5375918",
"0.53757375",
"0.53751236",
"0.5356768",
"0.5354353",
"0.53425014",
"0.5339529",
"0.5332183",
"0.53214985",
"0.53206164",
"0.5320296",
"0.5309063",
"0.5299892",
"0.5269459",
"0.5260429",
"0.5235865",
"0.5232926",
"0.51933956",
"0.518727",
"0.5176442",
"0.5176222",
"0.51733077",
"0.51351386",
"0.5133369",
"0.5128392",
"0.5122401",
"0.5119382",
"0.5116343",
"0.5111747",
"0.5103731",
"0.5091721",
"0.5088078",
"0.50762415",
"0.5068654",
"0.5067559",
"0.5064433"
] | 0.8162002 | 0 |
Create the procedure setting composite | private Composite createProcedureSettingComposite() {
final Composite composite = new Composite(tabFolder, SWT.LEFT | SWT.WRAP);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
GridLayout layoutComp;
layoutComp = new GridLayout();
layoutComp.marginWidth = 10;
layoutComp.marginHeight = 10;
layoutComp.numColumns = 2;
composite.setLayout(layoutComp);
final Label functionNameLabel = new Label(composite, SWT.NONE);
functionNameLabel.setLayoutData(CommonUITool.createGridData(1, 1, -1, -1));
functionNameLabel.setText(Messages.lblProcedureName);
procNameText = new Text(composite, SWT.BORDER);
procNameText.setTextLimit(ValidateUtil.MAX_SCHEMA_NAME_LENGTH);
procNameText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
procNameText.addKeyListener(new org.eclipse.swt.events.KeyAdapter() {
public void keyPressed(KeyEvent event) {
}
public void keyReleased(KeyEvent event) {
if (StringUtil.isEmpty(procNameText.getText())) {
getButton(IDialogConstants.OK_ID).setEnabled(false);
return;
}
getButton(IDialogConstants.OK_ID).setEnabled(true);
}
});
if (isCommentSupport) {
final Label procDescriptionLabel = new Label(composite, SWT.NONE);
procDescriptionLabel.setLayoutData(CommonUITool.createGridData(1, 1, -1, -1));
procDescriptionLabel.setText(Messages.lblProcedureDescription);
procDescriptionText = new Text(composite, SWT.BORDER);
procDescriptionText.setTextLimit(ValidateUtil.MAX_DB_OBJECT_COMMENT);
procDescriptionText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
}
final String[] userColumnNameArr = isCommentSupport
? new String[] {
Messages.tblColProcedureParamName,
Messages.tblColProcedureParamType,
Messages.tblColProcedureJavaParamType,
Messages.tblColProcedureModel,
Messages.tblColProcedureMemo }
: new String[] {
Messages.tblColProcedureParamName,
Messages.tblColProcedureParamType,
Messages.tblColProcedureJavaParamType,
Messages.tblColProcedureModel };
procParamsTableViewer = CommonUITool.createCommonTableViewer(composite,
null, userColumnNameArr,
CommonUITool.createGridData(GridData.FILL_BOTH, 6, 4, -1, 200));
procParamsTable = procParamsTableViewer.getTable();
procParamsTableViewer.getTable().addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent event) {
}
public void widgetSelected(SelectionEvent event) {
if (procParamsTableViewer.getTable().getSelectionCount() > 0) {
getButton(BUTTON_EDIT_ID).setEnabled(true);
getButton(BUTTON_UP_ID).setEnabled(true);
getButton(BUTTON_DOWN_ID).setEnabled(true);
getButton(BUTTON_DROP_ID).setEnabled(true);
}
}
});
procParamsTableViewer.setInput(procParamsListData);
procParamsTable.setLinesVisible(true);
procParamsTable.setHeaderVisible(true);
procParamsTable.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
// setBtnEnableDisable();
}
});
barComp = new Composite(composite, SWT.NONE);
final GridData gdbarComp = new GridData(GridData.FILL_HORIZONTAL);
gdbarComp.horizontalSpan = 2;
barComp.setLayoutData(gdbarComp);
GridLayout layout = new GridLayout();
layout.marginWidth = 10;
layout.marginHeight = 10;
barComp.setLayout(layout);
final Label javaNameLabel = new Label(composite, SWT.LEFT | SWT.WRAP);
javaNameLabel.setLayoutData(CommonUITool.createGridData(1, 1, -1, -1));
javaNameLabel.setText(Messages.lblJavaFunctionName);
javaNameText = new Text(composite, SWT.BORDER);
GridData gdJavaNameText = new GridData(GridData.FILL_HORIZONTAL);
javaNameText.setLayoutData(gdJavaNameText);
return composite;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ProcedureCall createProcedureCall();",
"public static <A> CompositeProcedure<A> procedure(Procedure<? super A> procedure) {\n return new CompositeProcedure<A>(procedure);\n }",
"protected PreDefinedProcedure() {\n super(new ParameterList(), new Block());\n this.name = null;\n }",
"public void tweakProcedure(Procedure proc) {\n }",
"private void makeProcedures(Patient patient, String proc) {\n patient.setLastProcedure(proc);\n }",
"Composite() {\n\n\t}",
"@Override\n\tpublic void createCpteEpargne(CompteEpargne cpt) {\n\t\t\n\t}",
"@Override\r\n\tpublic void createControl(Composite parent) {\n\t\tinitializeDialogUnits(parent);\r\n\r\n\t\tint sectionStyle = Section.TITLE_BAR | Section.CLIENT_INDENT\r\n\t\t\t\t| Section.EXPANDED;\r\n\t\tSection section = toolkit.createSection(parent, sectionStyle);\r\n\t\tsection.setText(\"Bind all parameters to values\");\r\n\t\tsection.setLayout(new GridLayout());\r\n\t\tComposite comp = toolkit.createComposite(section);\r\n\t\tcomp.setLayout(new GridLayout(2, false));\r\n\r\n\t\tcomp.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL\r\n\t\t\t\t| GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));\r\n\t\tsection.setClient(comp);\r\n\t\tselectionLabel = toolkit.createLabel(comp, \"\");\r\n\t\tGridData gridData = new GridData(GridData.VERTICAL_ALIGN_FILL\r\n\t\t\t\t| GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);\r\n\t\tgridData.horizontalSpan = 2;\r\n\t\tselectionLabel.setLayoutData(gridData);\r\n\r\n\t\tmainComp = comp;\r\n\t\t// PatternToProtocolExportWizard wizard =\r\n\t\t// (PatternToProtocolExportWizard) this\r\n\t\t// .getWizard();\r\n\t\t// assume there are not more than 10 parameters\r\n\t\tint max = 10;\r\n\t\t/*\r\n\t\t * for(CoordinationPattern pattern : wizard.getPatternList()) { int\r\n\t\t * parametersize = pattern.getPatternParameters().size();\r\n\t\t * if(parametersize > max) { max = parametersize; } }\r\n\t\t */\r\n\r\n\t\tif (max > Integer.MIN_VALUE) {\r\n\t\t\tfor (int i = 0; i < max; i++) {\r\n\t\t\t\tLabel l = toolkit.createLabel(mainComp, \"\");\r\n\t\t\t\tl.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL\r\n\t\t\t\t\t\t| GridData.HORIZONTAL_ALIGN_FILL\r\n\t\t\t\t\t\t| GridData.GRAB_HORIZONTAL));\r\n\t\t\t\tText t = toolkit.createText(mainComp, \"\");\r\n\r\n\t\t\t\tt.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL\r\n\t\t\t\t\t\t| GridData.HORIZONTAL_ALIGN_FILL\r\n\t\t\t\t\t\t| GridData.GRAB_HORIZONTAL));\r\n\t\t\t\tl.setVisible(true);\r\n\t\t\t\tt.setVisible(true);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tthis.setControl(section);\r\n\r\n\t}",
"Para createPara();",
"ProcedureDecl createProcedureDecl();",
"public ImagingStudy setProcedure(java.util.List<CodingDt> theValue) {\n\t\tmyProcedure = theValue;\n\t\treturn this;\n\t}",
"public void createPPF(){\n\t\tSystem.out.println(\"HDFC:: createed ppf\");\n\t}",
"@Override\n\tpublic void pausaParaComer() {\n\n\t}",
"public static <A, T> CompositeProcedure<A> procedure(Procedure<? super T> procedure,\n Function<? super A, ? extends T> function) {\n return new CompositeProcedure<T>(procedure).of(function);\n }",
"public void setProcedure(String Procedure) {\n this.Procedure = Procedure;\n }",
"@SuppressWarnings(\"unchecked\")\n\tProcedureCallImpl(SharedSessionContractImplementor session, ProcedureCallMementoImpl memento) {\n\t\tsuper( session, null );\n\t\tthis.procedureName = memento.getProcedureName();\n\t\tthis.globalParameterPassNullsSetting = session.getFactory().getSessionFactoryOptions().isProcedureParameterNullPassingEnabled();\n\n\t\tthis.queryReturns = memento.getQueryReturns();\n\t\tthis.synchronizedQuerySpaces = Util.copy( memento.getSynchronizedQuerySpaces() );\n\n\t\tthis.parameterMetadata = new ProcedureParameterMetadata( this );\n\t\tthis.paramBindings = new ProcedureParamBindings( parameterMetadata, this );\n\n\t\tfor ( ProcedureCallMementoImpl.ParameterMemento storedRegistration : memento.getParameterDeclarations() ) {\n\t\t\tfinal ProcedureParameterImplementor<?> registration;\n\n\t\t\tif ( StringHelper.isNotEmpty( storedRegistration.getName() ) ) {\n\t\t\t\tregistration = new ProcedureParameterImpl(\n\t\t\t\t\t\tthis,\n\t\t\t\t\t\tstoredRegistration.getName(),\n\t\t\t\t\t\tstoredRegistration.getMode(),\n\t\t\t\t\t\tstoredRegistration.getType(),\n\t\t\t\t\t\tstoredRegistration.getHibernateType(),\n\t\t\t\t\t\tstoredRegistration.isPassNullsEnabled()\n\t\t\t\t);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tregistration = new ProcedureParameterImpl(\n\t\t\t\t\t\tthis,\n\t\t\t\t\t\tstoredRegistration.getPosition(),\n\t\t\t\t\t\tstoredRegistration.getMode(),\n\t\t\t\t\t\tstoredRegistration.getType(),\n\t\t\t\t\t\tstoredRegistration.getHibernateType(),\n\t\t\t\t\t\tstoredRegistration.isPassNullsEnabled()\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tgetParameterMetadata().registerParameter( registration );\n\t\t}\n\n\t\tfor ( Map.Entry<String, Object> entry : memento.getHintsMap().entrySet() ) {\n\t\t\tsetHint( entry.getKey(), entry.getValue() );\n\t\t}\n\t}",
"public void createCompte(Compte compte);",
"@PostConstruct\n private void activate() {\n final ValueMap props = componentContext.getComponent().getProperties();\n generateDefaultCss = props.get(PN_PARSYS_GENERATE_DEAFULT_CSS, true);\n paragraphCss = props.get(PN_PARSYS_PARAGRAPH_CSS, String.class);\n newAreaCss = props.get(PN_PARSYS_NEWAREA_CSS, String.class);\n paragraphElementName = props.get(PN_PARSYS_PARAGRAPH_ELEMENT, String.class);\n wrapperElementName = props.get(PN_PARSYS_WRAPPER_ELEMENT, String.class);\n wrapperCss = props.get(PN_PARSYS_WRAPPER_CSS, String.class);\n\n // prepare paragraph items\n items = new ArrayList<>();\n if (parsysParentResource == null) {\n parsysParentResource = currentResource;\n }\n for (Resource childResource : parsysParentResource.getChildren()) {\n items.add(createResourceItem(childResource));\n }\n if (wcmMode != WCMMode.DISABLED) {\n items.add(createNewAreaItem());\n }\n }",
"Compleja createCompleja();",
"@Test(timeout = 4000)\n public void test11() throws Throwable {\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(11, \"xuL|;?{*vu=xht\");\n fBProcedureParam0.setType(11);\n fBProcedureParam0.setType((-700));\n fBProcedureCall0.getSQL(false);\n int int0 = 2;\n FBProcedureParam fBProcedureParam1 = new FBProcedureParam(2, \"xuL|;?{*vu=xht\");\n fBProcedureParam0.setValue(fBProcedureParam1);\n fBProcedureCall0.getSQL(true);\n fBProcedureParam1.setIndex((-408));\n FBProcedureParam fBProcedureParam2 = new FBProcedureParam();\n FBProcedureParam fBProcedureParam3 = new FBProcedureParam();\n fBProcedureCall0.addInputParam(fBProcedureParam3);\n int int1 = 63;\n try { \n fBProcedureParam3.setValue(fBProcedureParam1);\n fail(\"Expecting exception: FBSQLException\");\n \n } catch(FBSQLException e) {\n //\n // Cannot set parameter, since it is constant.\n //\n verifyException(\"org.firebirdsql.jdbc.FBProcedureParam\", e);\n }\n }",
"public void createPartControl(Composite parent) {\n ex = new SWTIRBConsole(parent, new IRBConfigData(){{\n setTitle(\" Welcome to the AWEScript Console \\n\\n\");\n addExtraGlobal(\"view\", RubyConsole.this);\n addExtraGlobal(\"catalog\", net.refractions.udig.catalog.CatalogPlugin.getDefault());\n addExtraGlobal(\"catalogs\", net.refractions.udig.catalog.CatalogPlugin.getDefault().getCatalogs());\n addExtraGlobal(\"projects\", net.refractions.udig.project.ui.ApplicationGIS.getProjects());\n addExtraGlobal(\"active_project\", net.refractions.udig.project.ui.ApplicationGIS.getActiveProject());\n try{\n \t// TODO: Check if 'buddy class loading' is required for this, since the plugins are not explicitly specified as dependencies\n \taddExtraGlobal(\"json_reader_class\", Class.forName(\"org.amanzi.awe.catalog.json.JSONReader\"));\n \taddExtraGlobal(\"neo_reader_class\", Class.forName(\"org.amanzi.awe.catalog.neo.NeoReader\"));\n }catch(ClassNotFoundException e){\n \tSystem.err.println(\"Cannot find possible FeatureSource class: \"+e.getMessage());\n \t//e.printStackTrace(System.err);\n }\n addExtraGlobal(\"feature_source_class\", org.geotools.data.FeatureSource.class);\n \n //manager of spreadsheets\n addExtraGlobal(\"spreadsheet_manager\", SpreadsheetManager.getInstance()); \n \n String userDir = System.getProperty(\"user.home\");\n setExtraLoadPath(new String[]{userDir+\"/.awe/script\",userDir+\"/.awe/lib\"});\n try{\n // Add the code from the internal plugin awescript.rb to the startup\n \taddExtraScript(FileLocator.toFileURL(Activator.getDefault().getBundle().getEntry(\"gisCommands.rb\")));\n addExtraScript(FileLocator.toFileURL(Activator.getDefault().getBundle().getEntry(\"awescript.rb\")));\n addExtraScript(FileLocator.toFileURL(Activator.getDefault().getBundle().getEntry(\"spreadsheet.rb\"))); \n \n }catch(Exception e){\n System.err.println(\"Failed to add internal awescript startup: \"+e);\n e.printStackTrace(System.err);\n setExtraRequire(new String[]{\"awescript\"}); // try find the script from Ruby instead\n }\n \n }});\n \t\t// Create the help context id for the viewer's control\n \t\tPlatformUI.getWorkbench().getHelpSystem().setHelp(ex, \"org.amanzi.awe.script.jirb\");\n \t\tmakeActions();\n \t\thookContextMenu();\n \t\tcontributeToActionBars();\n \t}",
"@Override\n public void createPartControl(Composite parent) {\n\n parent.setLayout(new GridLayout(1, false));\n // create textGp group. It contains text and textMode group\n textGp = new Group(parent, SWT.SHADOW_OUT);\n textGp.setLayout(new GridLayout());\n textGp.setText(\"Text Report\");\n GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);\n textGp.setLayoutData(data);\n\n\t\tcreateTextArea(textGp);\n\t\tcreateTextModeGp(textGp);\t\t\n\t\t\t\n // Create ConfigGp group. It contains dataTypegp, dataProductGp, time\n // cover group and state/stn group\n Group configGp = new Group(parent, SWT.SHADOW_ETCHED_OUT);\n configGp.setLayout(new GridLayout(3, false));\n \t\t\n\t\tcreateGpList(configGp);\n\t\t\n createProductList(configGp);\n \n createTimeCoverBtns(configGp);\n if (currentProductName != null)\n handleStnMarkingRequestByBtn();\n // createStaStnBtns(configGp);\n \n \t}",
"public StoredProcedure() {\n }",
"private void statInit() {\n\t\t//\t\n\t\tif (getAD_Process_ID() > 0) {\n\t\t\t//\tFR [ 245 ]\n\t\t\tinitProcessInfo();\n\t\t\tprocessParameterPanel = new ProcessPanel(getWindowNo(), getBrowseProcessInfo());\n\t\t\tprocessParameterPanel.setColumns(ProcessController.COLUMNS_2);\n\t\t\tprocessParameterPanel.setShowButtons(false);\n\t\t\tprocessParameterPanel.setShowDescription(false);\n\t\t\tprocessParameterPanel.createFieldsAndEditors();\n\t\t\t//\tIf don't have parameters then don'show collapsible panel\n\t\t\tif(processParameterPanel.hasParameters()) {\n\t\t\t\t//\tAdd collapsible panel for process pane;\n\t\t\t\tCollapsiblePanel collapsibleProcess = new CollapsiblePanel(Msg.getMsg(Env.getCtx(),(\"Parameter\")));\n\t\t\t\tcollapsibleProcess.add(processParameterPanel.getPanel());\n\t\t\t\tcollapsibleProcess.validate();\n\t\t\t\tprocessPanel.add(collapsibleProcess);\n\t\t\t}\n\t\t}\n\t}",
"public CodingDt addProcedure() {\n\t\tCodingDt newType = new CodingDt();\n\t\tgetProcedure().add(newType);\n\t\treturn newType; \n\t}",
"public void setComposite(Composite comp)\r\n\t{\r\n\t\t// System.out.println(\"setComposite\");\r\n\t}",
"protected JdbcProcedure() throws ProcedureException {\n defaults.set(BINDING_DB, Bindings.CONNECTION, \"\",\n \"The JDBC connection identifier.\");\n defaults.set(BINDING_SQL, Bindings.DATA, \"\",\n \"The SQL text, optionally containing arguments with \" +\n \"a ':' prefix.\");\n defaults.set(BINDING_FLAGS, Bindings.DATA, \"\",\n \"Optional execution flags, currently '[no-]metadata', \" +\n \"'[no-]column-names', '[no-]native-types', \" +\n \"'[no-]binary-data' and 'single-row' are supported.\");\n defaults.seal();\n }",
"PARAM createPARAM();",
"protected void createFromPMSInit(PMSInit init) {\n\t\tdescription = init.getDescription();\n\t\tbatchSize = init.getBatchSize() > 0 ? init.getBatchSize() : BATCH_SIZE;\n\t\tinjectBeans = init.getInjectBeans();\n\t\tcommitImmediately = init.isCommitImmediately();\n\t}",
"Compuesta createCompuesta();",
"public ProcedureFormPanel() {\n initComponents();\n }",
"@Test(timeout = 4000)\n public void test54() throws Throwable {\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(655, \"Cannot set parameter, since it is constant.\");\n fBProcedureParam0.setIndex(655);\n fBProcedureParam0.setIndex(655);\n fBProcedureParam0.setIndex(3471);\n fBProcedureParam0.setIndex(2168);\n FBProcedureParam fBProcedureParam1 = fBProcedureCall0.addParam(3471, \"Cannot set parameter, since it is constant.\");\n fBProcedureParam1.setType(4520);\n String string0 = fBProcedureCall0.getSQL(false);\n assertEquals(\"EXECUTE PROCEDURE null(Cannot set parameter, since it is constant., Cannot set parameter, since it is constant.)\", string0);\n \n fBProcedureParam1.setIndex(2);\n assertEquals(3471, fBProcedureParam1.getPosition());\n \n fBProcedureCall0.addOutputParam(fBProcedureParam1);\n fBProcedureCall0.addInputParam(fBProcedureParam1);\n fBProcedureCall0.registerOutParam(2168, (-492));\n fBProcedureCall0.addParam(284, \"EXECUTE PROCEDURE null(Cannot set parameter, since it is constant., Cannot set parameter, since it is constant.)\");\n fBProcedureCall0.addOutputParam(fBProcedureParam1);\n List<FBProcedureParam> list0 = fBProcedureCall0.getInputParams();\n assertEquals(3472, list0.size());\n }",
"private ConfigurationObject createParam(int num, String type, String value) throws Exception {\r\n ConfigurationObject param = new DefaultConfigurationObject(\"param\" + num);\r\n param.setPropertyValue(PROPERTY_TYPE, type);\r\n param.setPropertyValue(PROPERTY_VALUE, value);\r\n\r\n return param;\r\n }",
"pvcs createpvcs();",
"@Override\r\n\tpublic void createPartControl(final Composite parent) {\n\t\t\r\n\t\tComposite container = new Composite(parent, SWT.NONE);\r\n\t\tGridData data = new GridData(GridData.GRAB_HORIZONTAL);\r\n\t\tGridData dataBoth = new GridData(GridData.FILL_BOTH);\r\n\t\tGridLayout gridLayout = new GridLayout(); \r\n\t\tgridLayout.numColumns = 2; \r\n\t\tgridLayout.makeColumnsEqualWidth = true;\r\n\t\tcontainer.setLayout(gridLayout); \r\n\t\tcontainer.setLayoutData(dataBoth);\r\n\t\tGridLayout butLayout = new GridLayout();\r\n\t\tbutLayout.numColumns = 4;\r\n\t\tbutLayout.makeColumnsEqualWidth = true;\r\n\t\tComposite buttContainer = new Composite(container, SWT.NONE);\r\n\t\tbuttContainer.setLayout(butLayout);\r\n\t\tbuttContainer.setLayoutData(data); \r\n\t\t\r\n\t\t//Bottone per aprire un nuovo BM\r\n\t\tfinal Button buttonCreate = new Button(buttContainer, SWT.NONE);\r\n\t\tImage image = Activator.getImageDescriptor(\"icons/bmOpen.png\").createImage();\r\n\t\tif (image!=null)buttonCreate.setImage(image);\r\n\t\tbuttonCreate.setText(\"Open a BM\");\r\n\t\t\r\n\t\t//viewer per le connessioni attive\r\n\t\tfinal Table connTable = new Table(container, SWT.BORDER);\r\n\r\n\t connTable.setLayoutData(dataBoth);\r\n\t \r\n\r\n\t\tTableColumn tc1 = new TableColumn(connTable, SWT.CENTER);\r\n\t\tTableColumn tc2 = new TableColumn(connTable, SWT.CENTER);\r\n\t\tTableColumn tc4 = new TableColumn(connTable, SWT.CENTER);\r\n\t\tTableColumn tc5 = new TableColumn(connTable, SWT.CENTER);\r\n\t\t\t tc1.setText(\"Name\");\r\n\t\t tc2.setText(\"Path\");\r\n\t\t tc4.setText(\"BC #\");\r\n\t\t tc5.setText(\"CBC #\");\r\n\t\t\ttc1.setWidth(90);\r\n\t\t tc2.setWidth(130);\r\n\t\t tc4.setWidth(50);\r\n\t\t tc5.setWidth(50);\r\n\t\tconnTable.setHeaderVisible(true);\r\n\t\t\t\r\n\t\t\r\n\t\t//Creo un nuovo listener\r\n\t\tListener listenerCreate = new Listener() {\r\n\t\t public void handleEvent(Event event) {\r\n\t\t if (event.widget == buttonCreate) {\r\n\t\t \t\r\n\t\t \tFileDialog fileDialog = new FileDialog(new Shell());\r\n\t\t \t\t// Set the text\r\n\t\t \t\tfileDialog.setText(\"Select a Business Model\");\r\n\t\t \t\t// Set filter on .txt files\r\n\t\t \t\tfileDialog.setFilterExtensions(new String[] { \"*.bm\" });\r\n\t\t \t\t// Put in a readable name for the filter\r\n\t\t \t\tfileDialog.setFilterNames(new String[] { \"BusinessModel(*.bm)\" });\r\n\t\t \t\t// Open Dialog and save result of selection\r\n\t\t \t\tString selected = fileDialog.open();\r\n\t\t \t\t\r\n\r\n\t\t \t\t\r\n\t\t \t\ttry {\r\n\t\t \t\t\t\r\n\t\t \t\t\tString result = HunkIO.readEntireFile(selected,\r\n\t\t \t\t\t \"UTF-8\" );\r\n\t\t \t\t\tString defInfoFile = result.split(\"<DEFAULT_INFO_FILE>\")[1].split(\"</DEFAULT_INFO_FILE>\")[0];\r\n\t\t \t\t\t\r\n\t\t \t\t\tbmName = defInfoFile.split(\"#\")[0];\r\n\t\t \t\t\tbmPath = defInfoFile.split(\"#\")[1];\r\n\t\t \t\t\t\r\n\t\t \t\t\tHunkIO.writeEntireFile(HunkIO.DEFAULT_INFO_FILE, defInfoFile, \"UTF-8\");\r\n\t\t \t\t\t\r\n\t\t \t\t\t//MC: ricavo directory del progetto corrente\r\n\t\t \t\t\tURL url = getClass().getProtectionDomain().getCodeSource().getLocation();\r\n\t\t \t\t String path_project = url.toExternalForm().substring(6).replace(\"/\", \"//\");\r\n\t\t \t\t System.out.println(\"BMPoolsView path proj: \"+path_project);\r\n\t\t \t\t //MessageDialog.openInformation(new Shell(), \"BMPoolsView path proj\", path_project);\r\n\t\t \t\t \r\n\t\t \t\t\t//Workaround per export come RCP Application\r\n\t\t \t\t\t//String path_project = System.getProperty(\"user.dir\").replace(\"\\\\\", \"//\");\r\n\t\t \t\t\t//MessageDialog.openInformation(new Shell(), \"BMPoolsView\", path_project);\r\n\t\t \t\t\t//URL url = getClass().getProtectionDomain().getCodeSource().getLocation();\r\n\t\t \t\t\t//String file_name = url.toExternalForm().substring(6).replace(\"/\", \"//\");\r\n\t\t \t\t\t//MessageDialog.openInformation(new Shell(), \"Filename\", file_name);\r\n\t\t \t\t\t\r\n\t\t \t\t\t\r\n\t\t \t\t\t//Ottengo la vista\r\n\t\t \t\t\topenFile(result.split(\"<bmUniverse>\\n\")[1].split(\"</bmUniverse>\")[0]);\r\n\t\t \t\t\t\r\n\t\t \t\t\t//TODO: VERIFICARE LA CORRETTEZZA DELLA POSISZIONE\r\n\t\t \t\t\t//importo IL PERSISTENCE nella cartella d'installazione\r\n\t\t \t\t\tif (!bcList.isEmpty()){\r\n\t\t \t\t\t\tClassInfo ci =bcList.get(0);\r\n\t\t \t\t\t\tFile f = new File(ci.getRootPath()+\"src/META-INF/persistence.xml\");\r\n\t\t \t\t\t\tif (!f.exists()){\r\n\t\t \t\t\t\t\tSystem.err.println(\"IMPOSSIBILE TROVARE IL FILE DI PERSISTENZA\");\r\n\t\t \t\t\t\t\treturn;\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t\t//LO SPOSTO NELLA CARTELLA META-INF DELL'INSTALLAZIONE\r\n\t\t \t\t\t\t//f = new File(ConstantString.BMM_INSTALL_PATH+\"/META-INF/\");\r\n\t\t \t\t\t\tf = new File(path_project+\"/META-INF/\");\r\n\t\t \t\t\t\tif(!f.exists()){\r\n\t\t \t\t\t\t\tf.mkdir();\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t\tString buffer = HunkIO.readEntireFile(ci.getRootPath()+\"src/META-INF/persistence.xml\");\r\n\t\t \t\t\t\t//HunkIO.writeEntireFile(ConstantString.BMM_INSTALL_PATH+\"/META-INF/persistence.xml\", buffer);\r\n\t\t \t\t\t\tHunkIO.writeEntireFile(path_project+\"/META-INF/persistence.xml\", buffer);\r\n\t\t \t\t\t\t\r\n\r\n\t\t \t\t\t}\r\n\r\n\t\t \t\t\t//aggiorno i dati nella tabella\r\n\t\t \t\t\tTableItem ti = new TableItem(connTable, 0);\r\n\t\t \t\t\tImage imageBM = Activator.getImageDescriptor(\"icons/bm.png\").createImage();\r\n\t\t \t\t\t\r\n\t\t \t\t\tif (imageBM!=null)ti.setImage(imageBM);\r\n\t\t \t\t\t\r\n\t\t \t\t\tti.setText( new String[]{bmName,\r\n\t\t \t\t\t\t\t\tbmPath,\"\"+bcList.size(),\"\"+cbcList.size()});\r\n\t\t \t\t\t\r\n\t\t \t\t\t\r\n\t\t \t\t\t\r\n\t\t \t\t\t} catch (IOException e) {\r\n\t\t \t\t\t\te.printStackTrace();\r\n\t\t \t\t\t}\r\n\t\t }\r\n\t\t }\r\n\r\n\t\t\tprivate void openFile(String result) {\r\n\t\t\t\t\r\n\t\t\t\tString bcString = result.split(\"<bcList>\\n\")[1].split(\"</bcList>\\n\")[0];\r\n\t\t\t\tString[] bcBuffer = bcString.split(\"<bc>\\n\");\r\n\t\t\t\tString relString = result.split(\"<relList>\\n\")[1].split(\"</relList>\\n\")[0];\r\n\t\t\t\tString[] relBuffer = relString.split(\"<rel>\\n\");\r\n\t\t\t\tString cbcString = null;\r\n\t\t\t\tString[] cbcBuffer = null;\r\n\t\t\t\tif(result.contains(\"<cbcList>\\n<cbc>\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tcbcString = result.split(\"<cbcList>\\n\")[1].split(\"</cbcList>\\n\")[0];\r\n\t\t\t\t\tcbcBuffer = cbcString.split(\"<cbc>\\n\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tbcList.clear();\r\n\t\t\t\trelList.clear();\r\n\t\t\t\tcbcList.clear();\r\n\t\t\t\t\r\n\t\t\t\tfor (int k=1;k<bcBuffer.length;k++){\r\n\t\t\t\t\tString bcPath = bcBuffer[k].split(\"<bcPath>\")[1].split(\"</bcPath>\")[0];\r\n\t\t\t\t\tClassInfo ci = new ClassInfo(bcPath, null);\r\n\t\t\t\t\tci.buildClassInfo();\r\n\t\t\t\t\tbcList.add(ci);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (int k=1;k<relBuffer.length;k++){\r\n\t\t\t\t\t\r\n\t\t\t\t\tString c1 = relBuffer[k].split(\"<c1>\")[1].split(\"</c1>\")[0];\r\n\t\t\t\t\tString c2 = relBuffer[k].split(\"<c2>\")[1].split(\"</c2>\")[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* PUO' SERVIRE IN FUTURO\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * \r\n\t\t\t\t\tClassInfo ci1 = null,ci2 = null;\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (int i = 0; i < bcList.size(); i++){\r\n\t\t\t\t\t\tif (bcList.get(i).getClassPathInfo().equals(c1)){\r\n\t\t\t\t\t\t\tci1 = bcList.get(i); \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\t\r\n\t\t\t\t\tfor (int i = 0; i < bcList.size(); i++){\r\n\t\t\t\t\t\tif (bcList.get(i).getClassPathInfo().equals(c2)){\r\n\t\t\t\t\t\t\tci2 = bcList.get(i); \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\t*/\r\n\t\t\t\t\t\r\n\t\t\t\t\tString type = relBuffer[k].split(\"<type>\")[1].split(\"</type>\")[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\trelList.add(new String[]{c1,c2,type});\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tif(result.contains(\"<cbcList>\\n<cbc>\")){\r\n\t\t\t\t\tfor (int k=1;k<cbcBuffer.length;k++){\r\n\t\t\t\t\t\tString cbcPath = cbcBuffer[k].split(\"<cbcPath>\")[1].split(\"</cbcPath>\")[0];\r\n\t\t\t\t\t\tComplexClassInfo cci = new ComplexClassInfo(cbcPath, null, null, null);\r\n\t\t\t\t\t\tcci.buildClass(cbcPath);\r\n\t\t\t\t\t\tcbcList.add(cci);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t };\r\n\t\t \r\n\t\r\n\t\r\n\t\t \r\n\t//creo e associo un listener per ogni elemento della tabella delle connessioni\r\n\tconnTable.addListener(SWT.MouseDown, new Listener () {\r\n\t\tpublic void handleEvent (Event event) {\r\n\t\t\tPoint point = new Point (event.x, event.y);\r\n\t\t\tTableItem item = connTable.getItem(point);\r\n\t\t\tif (item != null) {\r\n\t\t\t\tShell shell = parent.getShell();\r\n\t\t\t\tMenu menu = new Menu (shell, SWT.POP_UP);\r\n\t\t\t\tcreateConnMenu(menu,item);\r\n\t\t\t\tmenu.setVisible(true);\r\n\t\t\t\tshell.setMenu (menu);\r\n\t\t\t\tshell.open();\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\t\r\n\t//associo il Listener\r\n\tbuttonCreate.addListener(SWT.Selection, listenerCreate);\r\n\t//buttonCreate.setLayoutData(data);\r\n\t//connTable.setLayoutData(data);\r\n\t\r\n\t\r\n\t}",
"@Test(timeout = 4000)\n public void test20() throws Throwable {\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n int int0 = 11;\n FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(11, \"^gZRnc2Y!%jU?C2`8\");\n fBProcedureCall0.getSQL(false);\n FBProcedureParam fBProcedureParam1 = fBProcedureCall0.addParam(11, \"EXECUTE PROCEDURE null(^gZRnc2Y!%jU?C2`8)\");\n fBProcedureParam0.setValue(\"^gZRnc2Y!%jU?C2`8\");\n fBProcedureParam1.setIndex(11);\n int int1 = (-1348);\n fBProcedureParam1.setType((-1348));\n fBProcedureParam0.setIndex(11);\n fBProcedureParam1.setType(11);\n fBProcedureParam1.setIndex(547);\n fBProcedureParam1.setIndex((-201774121));\n FBProcedureParam fBProcedureParam2 = fBProcedureCall0.getInputParam((-201774121));\n fBProcedureParam0.setType(11);\n fBProcedureParam1.setIndex(547);\n fBProcedureCall0.addInputParam(fBProcedureParam2);\n fBProcedureParam1.setIndex(1967);\n fBProcedureParam1.setIndex((-201774121));\n fBProcedureParam0.setValue(\"EXECUTE PROCEDURE null(^gZRnc2Y!%jU?C2`8)\");\n try { \n fBProcedureCall0.registerOutParam(1625, 749);\n fail(\"Expecting exception: FBSQLException\");\n \n } catch(FBSQLException e) {\n //\n // Cannot find parameter with the specified position.\n //\n verifyException(\"org.firebirdsql.jdbc.FBProcedureCall\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test07() throws Throwable {\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(1043, \"xuL|;?{*vu=xht\");\n fBProcedureParam0.setType(1043);\n fBProcedureParam0.setIndex(1043);\n fBProcedureParam0.setType(1043);\n fBProcedureParam0.setIndex(1043);\n FBProcedureParam fBProcedureParam1 = new FBProcedureParam();\n fBProcedureParam1.clone();\n fBProcedureParam1.setType(1043);\n fBProcedureParam0.setValue(\"xuL|;?{*vu=xht\");\n fBProcedureParam1.setType(1);\n fBProcedureParam0.setIndex(1043);\n fBProcedureCall0.registerOutParam(1043, 1319);\n fBProcedureCall0.addOutputParam(fBProcedureParam0);\n fBProcedureCall0.addOutputParam(fBProcedureParam0);\n try { \n fBProcedureCall0.registerOutParam(2030, 1);\n fail(\"Expecting exception: FBSQLException\");\n \n } catch(FBSQLException e) {\n //\n // Cannot find parameter with the specified position.\n //\n verifyException(\"org.firebirdsql.jdbc.FBProcedureCall\", e);\n }\n }",
"@Override\n\tpublic List<Component> caseProcedure(Procedure procedure) {\n\t\tsuper.caseProcedure(procedure);\n\t\treturn componentList;\n\t}",
"@Test(timeout = 4000)\n public void test23() throws Throwable {\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n FBProcedureCall fBProcedureCall1 = new FBProcedureCall();\n boolean boolean0 = FBProcedureCall.OLD_CALLABLE_STATEMENT_COMPATIBILITY;\n FBProcedureParam fBProcedureParam0 = new FBProcedureParam();\n FBProcedureCall fBProcedureCall2 = new FBProcedureCall();\n FBProcedureCall fBProcedureCall3 = new FBProcedureCall();\n FBProcedureCall fBProcedureCall4 = new FBProcedureCall();\n FBProcedureCall fBProcedureCall5 = (FBProcedureCall)fBProcedureCall4.clone();\n FBProcedureCall fBProcedureCall6 = new FBProcedureCall();\n fBProcedureCall1.addOutputParam(fBProcedureParam0);\n FBProcedureCall fBProcedureCall7 = new FBProcedureCall();\n fBProcedureCall4.equals(fBProcedureCall1);\n FBProcedureCall fBProcedureCall8 = new FBProcedureCall();\n fBProcedureCall8.clone();\n FBProcedureCall fBProcedureCall9 = new FBProcedureCall();\n fBProcedureCall9.clone();\n fBProcedureCall9.addInputParam(fBProcedureParam0);\n FBProcedureCall fBProcedureCall10 = new FBProcedureCall();\n fBProcedureCall5.addOutputParam(fBProcedureParam0);\n FBProcedureCall fBProcedureCall11 = new FBProcedureCall();\n fBProcedureCall6.addParam(1428, \"org.firebirdsl.jbc.FBrocedureCall\");\n FBProcedureCall fBProcedureCall12 = new FBProcedureCall();\n try { \n fBProcedureCall12.registerOutParam(1428, 1428);\n fail(\"Expecting exception: FBSQLException\");\n \n } catch(FBSQLException e) {\n //\n // Cannot find parameter with the specified position.\n //\n verifyException(\"org.firebirdsql.jdbc.FBProcedureCall\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test31() throws Throwable {\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n String string0 = \"lq+N[G8A4nEXb8]W'\";\n fBProcedureCall0.setName(\"lq+N[G8A4nEXb8]W'\");\n FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(1043, \"lq+N[G8A4nEXb8]W'\");\n fBProcedureCall0.addOutputParam(fBProcedureParam0);\n fBProcedureParam0.clone();\n fBProcedureCall0.getSQL(false);\n int int0 = 2820;\n fBProcedureCall0.addOutputParam(fBProcedureParam0);\n FBProcedureCall fBProcedureCall1 = new FBProcedureCall();\n fBProcedureCall0.hashCode();\n fBProcedureParam0.clone();\n fBProcedureCall0.getOutputParams();\n fBProcedureParam0.setIndex(1043);\n boolean boolean0 = false;\n int int1 = 2204;\n int int2 = (-2642);\n try { \n fBProcedureParam0.setValue(fBProcedureCall1);\n fail(\"Expecting exception: FBSQLException\");\n \n } catch(FBSQLException e) {\n //\n // Cannot set parameter, since it is constant.\n //\n verifyException(\"org.firebirdsql.jdbc.FBProcedureParam\", e);\n }\n }",
"Operacion createOperacion();",
"OperacionColeccion createOperacionColeccion();",
"private static final List<ParameterImpl> createParameters() {\n\t\tParameterImpl initialize = new ParameterImpl.Builder()\n\t\t\t\t.setLabel(\"Initialize\") // FIXME: STRING: srogers\n\t\t\t\t.setName(\"INITIALIZE\") // FIXME: STRING: srogers\n\t\t\t\t.setType(\"checkbox\")\n\t\t\t\t.setDefaultValue(\"true\")\n\t\t\t\t.setAcceptableValues(null)\n\t\t\t\t.setRequired(false)\n\t\t\t\t.build();\n\n\t\tParameterImpl run = new ParameterImpl.Builder()\n\t\t\t\t.setLabel(\"Run\") // FIXME: STRING: srogers\n\t\t\t\t.setName(\"RUN\") // FIXME: STRING: srogers\n\t\t\t\t.setType(\"checkbox\")\n\t\t\t\t.setDefaultValue(\"true\")\n\t\t\t\t.setAcceptableValues(null)\n\t\t\t\t.setRequired(false)\n\t\t\t\t.build();\n\n\t\tParameterImpl duration = new ParameterImpl.Builder()\n\t\t\t\t.setLabel(\"Duration (minutes)\") // FIXME: STRING: srogers\n\t\t\t\t.setName(\"DURATION\") // FIXME: STRING: srogers\n\t\t\t\t.setType(\"number\")\n\t\t\t\t.setDefaultValue(\"0\")\n\t\t\t\t.setAcceptableValues(null)\n\t\t\t\t.setRequired(false)\n\t\t\t\t.build();\n\n\t\tParameterImpl retrieveData = new ParameterImpl.Builder()\n\t\t\t\t.setLabel(\"Retrieve Data\") // FIXME: STRING: srogers\n\t\t\t\t.setName(\"RETRIEVE_DATA\") // FIXME: STRING: srogers\n\t\t\t\t.setType(\"checkbox\")\n\t\t\t\t.setDefaultValue(\"true\")\n\t\t\t\t.setAcceptableValues(null)\n\t\t\t\t.setRequired(false)\n\t\t\t\t.build();\n\n\t\tParameterImpl cleanup = new ParameterImpl.Builder()\n\t\t\t\t.setLabel(\"Cleanup\") // FIXME: STRING: srogers\n\t\t\t\t.setName(\"CLEANUP\") // FIXME: STRING: srogers\n\t\t\t\t.setType(\"checkbox\")\n\t\t\t\t.setDefaultValue(\"true\")\n\t\t\t\t.setAcceptableValues(null)\n\t\t\t\t.setRequired(false)\n\t\t\t\t.build();\n\n\t\tParameterImpl cancel = new ParameterImpl.Builder()\n\t\t\t\t.setLabel(\"Cancel\") // FIXME: STRING: srogers\n\t\t\t\t.setName(\"CANCEL\") // FIXME: STRING: srogers\n\t\t\t\t.setType(\"checkbox\")\n\t\t\t\t.setDefaultValue(\"false\")\n\t\t\t\t.setAcceptableValues(null)\n\t\t\t\t.setRequired(false)\n\t\t\t\t.build();\n\n\t\treturn Arrays.asList(initialize, run, duration, retrieveData, cleanup, cancel);\n\t}",
"@Test(timeout = 4000)\n public void test20() throws Throwable {\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(11, \"xuL|;?{*vu=xht\");\n fBProcedureParam0.setType(11);\n fBProcedureParam0.setIndex((-1971));\n fBProcedureParam0.setType(372);\n fBProcedureCall0.getSQL(true);\n fBProcedureParam0.setValue(\"xuL|;?{*vu=xht\");\n fBProcedureParam0.setIndex(19);\n FBProcedureParam fBProcedureParam1 = new FBProcedureParam();\n FBProcedureParam fBProcedureParam2 = new FBProcedureParam();\n fBProcedureCall0.addInputParam(fBProcedureParam1);\n fBProcedureParam2.setIndex(2152);\n fBProcedureParam1.setType((-1));\n fBProcedureParam0.setType((-6027));\n fBProcedureCall0.getInputParam((-1));\n fBProcedureParam1.setType(372);\n fBProcedureParam2.setIndex(19);\n FBProcedureParam fBProcedureParam3 = new FBProcedureParam((-1971), \"xuL|;?{*vu=xht\");\n fBProcedureCall0.addOutputParam(fBProcedureParam2);\n try { \n fBProcedureCall0.registerOutParam(12, 12);\n fail(\"Expecting exception: FBSQLException\");\n \n } catch(FBSQLException e) {\n //\n // Cannot find parameter with the specified position.\n //\n verifyException(\"org.firebirdsql.jdbc.FBProcedureCall\", e);\n }\n }",
"Param createParam();",
"Param createParam();",
"Param createParam();",
"P createP();",
"public CCA2KPABE(){\n\t\tthis.pairing = PairingFactory.getPairing(ParameterGenerator.PATH_TYPE_A_PARAMETER); \n\t}",
"public void editPAParameters() {\r\n \t\tdialogFactory.getDialog(new ParametricAnalysisPanel(model, model, model, this), \"Define What-if analysis parameters\");\r\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}",
"public void createControl(Composite parent) {\n Group group = SWTFactory.createGroup(parent, PDEUIMessages.ProfileBlock_0, 1, 1, GridData.FILL_HORIZONTAL);\n fGenerateProfileButton = SWTFactory.createCheckButton(group, PDEUIMessages.ProfileBlock_1, null, false, 1);\n fGenerateProfileButton.addSelectionListener(new SelectionAdapter() {\n\n @Override\n public void widgetSelected(SelectionEvent e) {\n fTab.updateLaunchConfigurationDialog();\n }\n });\n }",
"public SetPCProcess()\n {\n super(\"SetPC\");\n }",
"protected void createYesComposite() {\n\n\t\tScrolledComposite scroll = new ScrolledComposite(yesComposite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);\n\n\t\tdetailsComposite = new Composite(scroll, SWT.NONE);\n\n\t\tscroll.setContent(detailsComposite);\n\t\tscroll.setExpandHorizontal(true);\n\t\tscroll.setExpandVertical(true);\n\t\tscroll.setLayout(new FillLayout());\n\n\t\tGridLayout layout = new GridLayout(3, false);\n\t\tdetailsComposite.setLayout(layout);\n\n\t\tdetailsComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\n\n\t\tidText = createLabelAndText(\"Id\", 2);\n\t\ttypeText = createLabelAndText(\"Type\", 2);\n\t\tisFactText = createLabelAndText(\"Fact\", 2);\n\t\tmasterText = createLabelAndText(\"Master\", 2);\n\t\tslavesText = createLabelAndText(\"Slaves\", 2);\n\t\tviolationText = createLabelAndText(\"Violation\", 2);\n\n\t\t// Add table of parameters:\n\t\tparameterViewer = new TableViewer(detailsComposite, SWT.MULTI | SWT.H_SCROLL\n\t\t\t\t| SWT.V_SCROLL | SWT.FULL_SELECTION);\n\n\t\t// Add columns:\n\t\tparameterViewer.getTable().setHeaderVisible(true);\n\t\tparameterViewer.getTable().setLinesVisible(true);\n\n\t\tfinal TableColumn keyColumn = new TableViewerColumn(parameterViewer, SWT.NONE).getColumn();\n\t\tkeyColumn.setText(\"Variable\");\n\t\tkeyColumn.setWidth(100);\n\n\t\tfinal TableColumn valueColumn = new TableViewerColumn(parameterViewer, SWT.NONE).getColumn();\n\t\tvalueColumn.setText(\"Value\");\n\t\tvalueColumn.setWidth(100);\n\n\t\tparameterViewer.setContentProvider(new ParameterTableContentProvider());\n\t\tparameterViewer.setLabelProvider(new ParameterTableLabelProvider());\n\n\t\tparameterViewer.setInput(token);\n\n\t\tGridData gridData = new GridData();\n\t\tgridData.verticalAlignment = GridData.FILL;\n\t\tgridData.horizontalSpan = 2;\n\t\tgridData.grabExcessHorizontalSpace = true;\n\t\tgridData.grabExcessVerticalSpace = true;\n\t\tgridData.horizontalAlignment = GridData.FILL;\n\t\tparameterViewer.getControl().setLayoutData(gridData);\n\n\t\trefresh();\n\t}",
"public void createPartControl(Composite parent) {\n \n \t\tgetImages();\n \n \t\ttoolkit = new FormToolkit(parent.getDisplay());\n \t\tform = toolkit.createScrolledForm(parent);\n \t\tform.addListener(SWT.Resize, new Listener() {\n \t\t\tpublic void handleEvent(Event e) {\n \t\t\t\tform.setRedraw(false);\n \t\t\t\tform.reflow(true);\n \t\t\t\tform.layout(true, true);\n \t\t\t\tform.setRedraw(true);\n \t\t\t}\n \t\t});\n \t\tGridLayout layout = new GridLayout(2, false);\n \t\tlayout.verticalSpacing = 1;\n \t\tform.getBody().setLayout(layout);\n \n \t\tcreateURLAndToolbar();\n \n \t\tSashForm sashForm = new SashForm(form.getBody(), SWT.NONE);\n \t\tsashForm.setOrientation(SWT.HORIZONTAL);\n \t\ttoolkit.adapt(sashForm);\n \t\tGridLayout sashLayout = new GridLayout(2, false);\n \t\tsashForm.setLayout(sashLayout);\n \t\tGridData gd3 = new GridData(SWT.FILL, SWT.FILL, true, true);\n \t\tgd3.horizontalSpan = 2;\n \t\tgd3.widthHint = 1;\n \t\tsashForm.setLayoutData(gd3);\n \n \t\tcreateRequestSide(sashForm);\n \n \t\tcreateResponseSide(sashForm);\n \n \t\ttoolkit.paintBordersFor(form);\n \t\tform.reflow(true);\n \n \t\tmethodCombo.setText(JAX_WS);\n \t\tsetControlsForWSType(getCurrentTestType());\n \t\tsetControlsForMethodType(methodCombo.getText());\n \t\tsetControlsForSelectedURL();\n \t\tsetMenusForCurrentState();\n \t}",
"pcols createpcols();",
"@Override\n\tpublic void createCpteCourant(CompteCourant cpt) {\n\t\t\n\t}",
"@Test(timeout = 4000)\n public void test01() throws Throwable {\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n FBProcedureParam fBProcedureParam0 = new FBProcedureParam();\n fBProcedureParam0.setType(78);\n fBProcedureParam0.setType(0);\n fBProcedureParam0.setIndex(0);\n fBProcedureCall0.addOutputParam(fBProcedureParam0);\n FBProcedureParam fBProcedureParam1 = fBProcedureCall0.addParam(63, \",>X41y3!{JJN<`\");\n assertEquals(63, fBProcedureParam1.getPosition());\n \n fBProcedureCall0.setName(\",>X41y3!{JJN<`\");\n FBProcedureParam fBProcedureParam2 = fBProcedureCall0.getOutputParam(0);\n fBProcedureCall0.addInputParam(fBProcedureParam2);\n assertEquals(0, fBProcedureParam2.getType());\n \n fBProcedureCall0.registerOutParam(0, (-146010727));\n FBProcedureParam fBProcedureParam3 = fBProcedureCall0.getOutputParam(0);\n assertEquals((-146010727), fBProcedureParam3.getType());\n \n Object object0 = fBProcedureCall0.clone();\n assertTrue(object0.equals((Object)fBProcedureCall0));\n assertNotSame(object0, fBProcedureCall0);\n }",
"private String getSQLScript() {\n\t\tStringBuffer sb = new StringBuffer();\n\t\tStringBuffer javaSb = new StringBuffer();\n\t\tsb.append(\"CREATE\").append(\" PROCEDURE \");\n\t\tString procedureName = procNameText.getText();\n\t\tif (procedureName == null) {\n\t\t\tprocedureName = \"\";\n\t\t}\n\t\tsb.append(QuerySyntax.escapeKeyword(procedureName)).append(\"(\");\n\t\tfor (Map<String, String> map : procParamsListData) {\n\t\t\t// \"PARAMS_INDEX\", \"PARAM_NAME\", \"PARAM_TYPE\", \"JAVA_PARAM_TYPE\"\n\t\t\tString name = map.get(\"0\");\n\t\t\tString type = map.get(\"1\");\n\t\t\tString javaType = map.get(\"2\");\n\t\t\tString paramModel = map.get(\"3\");\n\t\t\tString description = map.get(\"4\");\n\t\t\tsb.append(QuerySyntax.escapeKeyword(name)).append(\" \");\n\t\t\tif (!paramModel.equalsIgnoreCase(SPArgsType.IN.toString())) {\n\t\t\t\tsb.append(paramModel).append(\" \");\n\t\t\t}\n\t\t\tsb.append(type);\n\t\t\tif (isCommentSupport && StringUtil.isNotEmpty(description)) {\n\t\t\t\tdescription = String.format(\"'%s'\", description);\n\t\t\t\tsb.append(String.format(\" COMMENT %s\", StringUtil.escapeQuotes(description)));\n\t\t\t}\n\t\t\tsb.append(\",\");\n\t\t\tjavaSb.append(javaType).append(\",\");\n\t\t}\n\t\tif (!procParamsListData.isEmpty()) {\n\t\t\tif (sb.length() > 0) {\n\t\t\t\tsb.deleteCharAt(sb.length() - 1);\n\t\t\t}\n\t\t\tif (javaSb.length() > 0) {\n\t\t\t\tjavaSb.deleteCharAt(javaSb.length() - 1);\n\t\t\t}\n\t\t}\n\t\tsb.append(\")\");\n\n\t\tsb.append(StringUtil.NEWLINE).append(\"AS LANGUAGE JAVA \").append(StringUtil.NEWLINE);\n\t\tString javaFuncName = javaNameText.getText();\n\t\tif (javaFuncName == null) {\n\t\t\tjavaFuncName = \"\";\n\t\t}\n\t\tsb.append(\"NAME '\").append(javaFuncName).append(\"(\").append(javaSb).append(\")\").append(\"'\");\n\t\tif (isCommentSupport) {\n\t\t\tString description = procDescriptionText.getText();\n\t\t\tif (StringUtil.isNotEmpty(description)) {\n\t\t\t\tdescription = String.format(\"'%s'\", description);\n\t\t\t\tsb.append(String.format(\" COMMENT %s\", StringUtil.escapeQuotes(description)));\n\t\t\t}\n\t\t}\n\t\treturn formatSql(sb.toString());\n\t}",
"void createWsMixedPayment(CompositeOperationRequest compositeOperation, TicketInfo ticket, Properties erpProperties) {\n CreateDataRequest createMixedPayment = new CreateDataRequest();\n createMixedPayment.setWebServiceType(erpProperties.getProperty(\"wsCreatePosPayment\"));\n DataRow data = new DataRow();\n data.addField(\"AD_Client_ID\", \"@C_Order.AD_Client_ID\");\n data.addField(\"AD_Org_ID\", \"@C_Order.AD_Org_ID\");\n data.addField(\"C_Order_ID\", \"@C_Order.C_Order_ID\");\n setPaymentTenderType(data, ticket);\n data.addField(\"PayAmt\", Double.toString(SyncOrders.round(ticket.getTotal(), 2)));\n createMixedPayment.setDataRow(data);\n compositeOperation.addOperation(createMixedPayment);\n }",
"public CC_OperationParameterGroup() {\n }",
"public void setRoot(typekey.CalcRoutineParamName value);",
"@Test(timeout = 4000)\n public void test36() throws Throwable {\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n fBProcedureCall0.clone();\n FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(1043, \"xuL|;?{*vu=xht\");\n FBProcedureParam fBProcedureParam1 = new FBProcedureParam();\n fBProcedureParam1.setType(1043);\n fBProcedureCall0.addOutputParam(fBProcedureParam0);\n fBProcedureCall0.getSQL(false);\n FBProcedureParam fBProcedureParam2 = new FBProcedureParam(41, \"xuL|;?{*vu=xht\");\n fBProcedureParam2.setIndex(1043);\n FBProcedureParam fBProcedureParam3 = new FBProcedureParam();\n fBProcedureCall0.addOutputParam(fBProcedureParam1);\n FBProcedureParam fBProcedureParam4 = new FBProcedureParam();\n fBProcedureCall0.addInputParam(fBProcedureParam1);\n fBProcedureCall0.getOutputParams();\n FBProcedureParam fBProcedureParam5 = null;\n try {\n fBProcedureParam5 = new FBProcedureParam(18, (String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.firebirdsql.jdbc.FBProcedureParam\", e);\n }\n }",
"interface WithConstraints {\n /**\n * Specifies constraints.\n * @param constraints Constraints associated with the Job\n * @return the next definition stage\n */\n WithCreate withConstraints(JobBasePropertiesConstraints constraints);\n }",
"public vP() {\n initComponents();\n \n crono = new Bjj();\n \n \n \n }",
"@Test(timeout = 4000)\n public void test14() throws Throwable {\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(3, \"FgZRnc2Yp%jU?C2`8\");\n fBProcedureParam0.setIndex(3);\n fBProcedureCall0.getSQL(false);\n fBProcedureParam0.setIndex(2396);\n fBProcedureParam0.setIndex((-963));\n fBProcedureParam0.setType(3);\n fBProcedureCall0.addInputParam(fBProcedureParam0);\n fBProcedureParam0.setValue(\"FgZRnc2Yp%jU?C2`8\");\n fBProcedureParam0.setIndex(1861);\n fBProcedureParam0.setIndex(1861);\n fBProcedureParam0.setIndex(547);\n fBProcedureParam0.setIndex((-201774161));\n fBProcedureParam0.setType(1861);\n fBProcedureParam0.setIndex(547);\n fBProcedureParam0.setIndex(1625);\n fBProcedureParam0.setIndex(1967);\n fBProcedureParam0.setIndex((-201774161));\n fBProcedureCall0.getSQL(false);\n try { \n fBProcedureCall0.registerOutParam(1625, 749);\n fail(\"Expecting exception: FBSQLException\");\n \n } catch(FBSQLException e) {\n //\n // Cannot find parameter with the specified position.\n //\n verifyException(\"org.firebirdsql.jdbc.FBProcedureCall\", e);\n }\n }",
"public void createPartControl(Composite parent) {\n\n Composite composite = new Composite(parent, SWT.NULL);\n GridLayout layout = new GridLayout();\n layout.marginHeight = 0;\n layout.marginWidth = 0;\n composite.setLayout(layout);\n composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL\n | GridData.HORIZONTAL_ALIGN_FILL));\n\n consoleText = new Text(composite, SWT.V_SCROLL | SWT.H_SCROLL);\n consoleText.setLayoutData(new GridData(GridData.FILL_BOTH));\n consoleText.setEditable(false);\n consoleText.setText(\"RF> Welcome to the Performance (ICM) Reasoning Framework!!!\\n\");\n consoleText.setFont(JFaceResources.getFont(JFaceResources.TEXT_FONT));\n\n consoleText.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));\n consoleColor = new Color(Display.getDefault(), new RGB(0,0,0));\n consoleText.setForeground(consoleColor);\n\n Composite bottomLine = new Composite(composite, SWT.NULL);\n GridLayout layout2 = new GridLayout();\n layout2.marginHeight = 0;\n layout2.marginWidth = 0;\n layout2.numColumns = 3;\n bottomLine.setLayout(layout2);\n bottomLine.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));\n\n startButton = new Button(bottomLine, SWT.PUSH);\n startButton.setText(\"Start\");\n startButton.setEnabled(true);\n startButton.addSelectionListener(new SelectionListener() {\n\n public void widgetSelected(SelectionEvent se) {\n consoleText.setText(\"RF> Service started\\n\");\n startButton.setEnabled(false);\n stopButton.setEnabled(true);\n startReasoningFramework();\n }\n\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent se) {\n }\n });\n\n stopButton = new Button(bottomLine, SWT.PUSH);\n stopButton.setText(\"Stop\");\n stopButton.setEnabled(false);\n stopButton.addSelectionListener(new SelectionListener() {\n\n public void widgetSelected(SelectionEvent se) {\n consoleText.setText(\"RF> Service stopped\\n\");\n startButton.setEnabled(true);\n stopButton.setEnabled(false);\n stopReasoningFramework();\n }\n\n public void widgetDefaultSelected(SelectionEvent se) {\n }\n });\n \n clearButton = new Button(bottomLine, SWT.PUSH);\n clearButton.setText(\"Clear\");\n clearButton.addSelectionListener(new SelectionListener() {\n\n public void widgetSelected(SelectionEvent se) {\n consoleText.setText(\"\");\n }\n\n public void widgetDefaultSelected(SelectionEvent se) {\n }\n });\n\n hookUpToReasoningFramework();\n }",
"@Test(timeout = 4000)\n public void test04() throws Throwable {\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(11, \"xuL|;?{*vu=xht\");\n fBProcedureParam0.setType(11);\n fBProcedureCall0.getSQL(true);\n FBProcedureParam fBProcedureParam1 = new FBProcedureParam(2, \"xuL|;?{*vu=xht\");\n fBProcedureParam0.setValue(fBProcedureParam1);\n fBProcedureCall0.getSQL(true);\n fBProcedureParam1.setIndex((-408));\n fBProcedureCall0.addOutputParam(fBProcedureParam0);\n FBProcedureParam fBProcedureParam2 = new FBProcedureParam();\n fBProcedureCall0.addInputParam(fBProcedureParam0);\n fBProcedureCall0.addParam(2, \"not\");\n FBProcedureCall fBProcedureCall1 = new FBProcedureCall();\n FBProcedureCall fBProcedureCall2 = new FBProcedureCall();\n fBProcedureCall2.getOutputParam(2762);\n FBProcedureCall fBProcedureCall3 = (FBProcedureCall)fBProcedureCall0.clone();\n fBProcedureCall0.equals(fBProcedureCall3);\n fBProcedureCall2.getName();\n assertTrue(fBProcedureCall2.equals((Object)fBProcedureCall1));\n \n FBProcedureCall fBProcedureCall4 = new FBProcedureCall();\n FBProcedureParam fBProcedureParam3 = new FBProcedureParam();\n fBProcedureCall3.getOutputParam((-1));\n fBProcedureCall1.addOutputParam(fBProcedureParam0);\n fBProcedureCall2.clone();\n assertFalse(fBProcedureCall2.equals((Object)fBProcedureCall1));\n }",
"@Test(timeout = 4000)\n public void test18() throws Throwable {\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(1043, \"xuL|;?{*vu=xht\");\n int int0 = (-38765965);\n FBProcedureCall fBProcedureCall1 = new FBProcedureCall();\n fBProcedureCall1.addOutputParam(fBProcedureParam0);\n fBProcedureCall1.getSQL(true);\n fBProcedureParam0.setIndex(1376);\n FBProcedureParam fBProcedureParam1 = fBProcedureCall0.getInputParam(1376);\n int int1 = 0;\n fBProcedureParam1.setIndex((-42724916));\n FBProcedureParam fBProcedureParam2 = new FBProcedureParam();\n try { \n fBProcedureParam2.setValue(fBProcedureParam0);\n fail(\"Expecting exception: FBSQLException\");\n \n } catch(FBSQLException e) {\n //\n // Cannot set parameter, since it is constant.\n //\n verifyException(\"org.firebirdsql.jdbc.FBProcedureParam\", e);\n }\n }",
"public void setProcedureName(String procedureName){\n this.procedureName = procedureName;\n }",
"public BPPType createBPPart(String id, String value, TypeType type) {\n\t\tBPPType bpp = mappingFactory.createBPPType();\n\t\tbpp.setId(id);\n\t\tbpp.setValue(value);\n\t\tbpp.setType(type);\n\t\treturn bpp;\n\t}",
"public CompositeProperty(List<Node> segments, PropertyMergeMode mergeMode) {\n this.segments = segments;\n this.mergeMode = mergeMode;\n }",
"@Override\r\n\tprotected void initializeLayout() {\r\n\t\tlayout = GraphLayoutFactory.createLayout(layoutType, graph, 250, 250, properties, AttributeMapSet.PROCEDURES);\r\n\t}",
"private void createRoutine() {\n String s = (String) JOptionPane.showInputDialog(\n this,\n \"Name the new routine:\",\n \"Create new\",\n JOptionPane.PLAIN_MESSAGE,\n null, null, null);\n\n if (s != null) {\n Routine r = new Routine(s);\n collection.add(r);\n listModel.addElement(r);\n list.setSelectedValue(r, true);\n new WorkoutsFrame(r);\n }\n }",
"protected Control createDialogArea(Composite parent) {\n\t\t//Composite composite = (Composite) super.createDialogArea(parent);\n\t\tComposite composite = new Composite(parent, SWT.NULL);\n\t\t\n\t\tGridLayout layout = new GridLayout(5, false);\n\t\tlayout.marginWidth = 15;\n\t\tlayout.marginHeight = 10;\n\t\tlayout.verticalSpacing = 8;\n\t\tcomposite.setLayout(layout);\n\t\t\n\t\tLabel l;\n\t\tGridData gridData;\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Fecha:\");\n\t\ttxtFecha = new Text(composite, SWT.BORDER);\n\t\tgridData = new GridData(60,15);\n\t\ttxtFecha.setLayoutData(gridData);\n\t\t//txtFecha.addKeyListener(this.crearKeyAdapter(txtFecha)); // calendar ya incluye esto\n\t\t\n\t\tbFecha = new Button(composite, SWT.NONE);\n\t\tgridData = new GridData(16,16);\n\t\t//gridData.horizontalSpan = 2;\n\t\tbFecha.setLayoutData(gridData);\n\t\timage = AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, IImageKeys.CALENDARIO);\n\t\tbFecha.setImage(image.createImage());\n\t\tbFecha.addSelectionListener(this.crearCalendario(shell, txtFecha));\n\n\t\tfinal Label labelNoches = new Label(composite, SWT.NONE);\n\t\tlabelNoches.setText(\"Cantidad:\");\n\t\t\n\t\tComposite compQty = new Composite(composite, SWT.NONE);\n\t\tlayout = new GridLayout(3, false);\n\t\tlayout.marginWidth = 0;\n\t\tcompQty.setLayout(layout);\n\t\t\n\t\ttxtCantidad = new Text(compQty, SWT.BORDER);\n\t\tgridData = new GridData(25,15);\n\t\ttxtCantidad.setLayoutData(gridData);\n\t\t\n\t\tfinal Label labelEspacios = new Label(compQty, SWT.NONE);\n\t\tlabelEspacios.setText(\"PAX(s):\");\n\t\tlabelEspacios.setAlignment(SWT.RIGHT);\n\t\tgridData = new GridData(45, 15);\n\t\tgridData.horizontalIndent = 10;\n\t\tlabelEspacios.setLayoutData(gridData);\n\t\ttxtEspacios = new Text(compQty, SWT.BORDER);\n\t\ttxtEspacios.setLayoutData(new GridData(25,15));\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Tipo:\");\n\t\tcomboTipo = new Combo(composite, SWT.READ_ONLY);\n\t\tgridData = new GridData();\n\t\tgridData.widthHint = 120;\n\t\tgridData.horizontalSpan = 2;\n\t\tcomboTipo.setLayoutData(gridData);\n\t\tcdTipoProductos = cdController.getComboDataTipoProductos();\n\t\tcomboTipo.setItems(cdTipoProductos.getTexto());\n\t\tcomboTipo.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tint indice = comboTipo.getSelectionIndex();\n\t\t\t\tif (indice != -1) {\n\t\t\t\t\tLong seleccionado = cdTipoProductos.getKeyAsLongByIndex(indice);\n\t\t\t\t\tproductos.filtrarByTipo(seleccionado, true); // eliminamos cualquier filtro previo\n\t\t\t\t}\n\t\t\t\tcomboProducto.setItems(productos.getTexto());\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Actividad:\");\n\t\tcomboProducto = new Combo(composite, SWT.READ_ONLY);\n\t\tgridData = new GridData();\n\t\tgridData.widthHint = 150;\n\t\tcomboProducto.setLayoutData(gridData);\n\t\t/*\n\t\tcomboProducto.addSelectionListener(new SelectionListener() {\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\tSystem.out.println(\"widgetDefSel: \" + comboProducto.getText());\n\t\t\t}\n\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tSystem.out.println(\"widgetSelected: \" + comboProducto.getText());\t\n\t\t\t}\n\t\t});\n\t\tcomboProducto.addModifyListener(new ModifyListener() {\n\t\t\tpublic void modifyText(ModifyEvent e) {\n\t\t\t\tSystem.out.println(\"modifyText: \" + comboProducto.getText());\t\n\t\t\t}\n\t\t});\n\t\t*/\n\t\t\n\t\tcomboProducto.addModifyListener(new ModifyListener() {\n\t\t\tpublic void modifyText(ModifyEvent e) {\n\t\t\t\tif (!comboProducto.getText().equals(\"\")) {\n\t\t\t\t\tLong idProducto = productos.getIdProductoByName(comboProducto.getText());\n\t\t\t\t\tProducto p = productos.getProductoByIdProducto(idProducto);\n\t\t\t\t\tString tipoReserva = p.getTipoReserva();\n\t\t\t\t\tisRecursoAEP = p.isHotelAEP();\n\t\t\t\t\tisModificable = p.isModificable();\n\t\t\t\t\tprecioMinimo = p.getPrecioMinimo();\n\t\t\t\t\tSystem.out.println(\"Minimo: \" + precioMinimo);\n\t\t\t\t\tif (tipoReserva.equals(\"Hotel\") || tipoReserva.equals(\"Hospedaje\")) {\n\t\t\t\t\t\tlabelNoches.setText(\"Noche(s):\");\n\t\t\t\t\t\tlabelNoches.pack();\n\t\t\t\t\t\tlabelNoches.redraw();\n\t\t\t\t\t\tlabelEspacios.setText(\"Room(s):\");\n\t\t\t\t\t\tlabelEspacios.pack();\n\t\t\t\t\t\tlabelEspacios.redraw();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlabelNoches.setText(\"Cantidad:\");\n\t\t\t\t\t\tlabelNoches.pack();\n\t\t\t\t\t\tlabelNoches.redraw();\n\t\t\t\t\t\tlabelEspacios.setText(\"PAX(s):\");\n\t\t\t\t\t\tlabelEspacios.setAlignment(SWT.RIGHT);\n\t\t\t\t\t\tlabelEspacios.pack();\n\t\t\t\t\t\tlabelEspacios.redraw();\n\t\t\t\t\t}\n\t\t\t\t\tlistaTipoPrecio.setEnabled(true);\n\t\t\t\t\tlistaTipoPrecio.deselectAll();\n\t\t\t\t\ttxtPrecio.setText(\"\");\n\t\t\t\t\ttxtPrecio.setEditable(isModificable == null ? false : isModificable.booleanValue());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t/*\n\t\tcomboProducto.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tint idProducto = productos.getIdProductoByName(comboProducto.getText());\n\t\t\t\tProducto p = productos.getProductoByIdProducto(idProducto);\n\t\t\t\tString tipoReserva = p.getTipoReserva();\n\t\t\t\tif (tipoReserva.equals(\"Hotel\") || tipoReserva.equals(\"Hospedaje\")) {\n\t\t\t\t\tlabelNoches.setText(\"Noche(s):\");\n\t\t\t\t\tlabelNoches.pack();\n\t\t\t\t\tlabelNoches.redraw();\n\t\t\t\t\tlabelEspacios.setText(\"Room(s):\");\n\t\t\t\t\tlabelEspacios.pack();\n\t\t\t\t\tlabelEspacios.redraw();\n\t\t\t\t} else {\n\t\t\t\t\tlabelNoches.setText(\"Cantidad:\");\n\t\t\t\t\tlabelNoches.pack();\n\t\t\t\t\tlabelNoches.redraw();\n\t\t\t\t\tlabelEspacios.setText(\"PAXs:\");\n\t\t\t\t\tlabelEspacios.setAlignment(SWT.RIGHT);\n\t\t\t\t\tlabelEspacios.pack();\n\t\t\t\t\tlabelEspacios.redraw();\n\t\t\t\t}\n\t\t\t\tlistaTipoPrecio.setEnabled(true);\n\t\t\t\tlistaTipoPrecio.deselectAll();\n\t\t\t\ttxtPrecio.setText(\"\");\n\t\t\t}\n\t\t});\n\t\t*/\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Tipo de precio:\");\n\t\tgridData = new GridData();\n\t\tgridData.verticalAlignment = SWT.TOP;\n\t\tgridData.verticalIndent = 3;\n\t\tl.setLayoutData(gridData);\n\t\tgridData = new GridData();\n\t\tgridData.widthHint = 75;\n\t\tgridData.horizontalSpan = 2;\n\n\t\tlistaTipoPrecio = new List(composite, SWT.SINGLE | SWT.BORDER);\n\t\tlistaTipoPrecio.setLayoutData(gridData);\n\t\tlistaTipoPrecio.setItems(new String[] {\"Comisionable\", \"Operador\", \"Público\"});\n\t\tlistaTipoPrecio.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tobtenerPrecio(listaTipoPrecio.getSelection()[0]);\n\t\t\t}\n\t\t});\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Precio:\");\n\t\tgridData = new GridData();\n\t\tgridData.verticalAlignment = SWT.TOP;\n\t\tgridData.verticalIndent = 3;\n\t\tl.setLayoutData(gridData);\n\t\t\n\t\tComposite compPrecio = new Composite(composite, SWT.NONE);\n\t\tlayout = new GridLayout(3, false);\n\t\tlayout.marginWidth = 0;\n\t\tlayout.marginHeight = 0;\n\t\tcompPrecio.setLayout(layout);\n\t\tgridData = new GridData();\n\t\tgridData.verticalAlignment = SWT.TOP;\n\t\tcompPrecio.setLayoutData(gridData);\n\t\t\n\t\ttxtPrecio = new Text(compPrecio, SWT.BORDER);\n\t\ttxtPrecio.setEditable(false);\n\t\tgridData = new GridData(50,15);\n\t\tgridData.verticalAlignment = SWT.TOP;\n\t\ttxtPrecio.setLayoutData(gridData);\n\n\t\tButton bCuadrar = new Button(compPrecio, SWT.PUSH);\n\t\tgridData = new GridData(12,16);\n\t\tbCuadrar.setLayoutData(gridData);\n\t\timage = AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, \"icons/cuadrar.gif\");\n\t\tbCuadrar.setImage(image.createImage());\n\t\tbCuadrar.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tSystem.out.println(\"Botón de cuadrar...\");\n\t\t\t\tcuadrarCotizacion();\n\t\t\t}\n\t\t});\t\n\t\t\n\t\tbVisible = new Button(compPrecio, SWT.CHECK);\n\t\tbVisible.setText(\"Visible\");\n\t\tgridData = new GridData();\n\t\tgridData.horizontalIndent = 15;\n\t\tbVisible.setLayoutData(gridData);\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Comentarios:\");\n\t\tgridData = new GridData();\n\t\tgridData.verticalAlignment = SWT.TOP;\n\t\tgridData.verticalIndent = 3;\n\t\tl.setLayoutData(gridData);\n\t\ttxtComentario = new Text(composite, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.WRAP);\n\t\tgridData = new GridData(GridData.FILL, GridData.CENTER, false, false);\n\t\tgridData.horizontalSpan = 4;\n\t\tgridData.heightHint = 40;\n\t\ttxtComentario.setLayoutData(gridData);\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Un \\\"*\\\" al inicio del comentario mostrará el mismo en el PDF de la cotización.\");\n\t\tgridData = new GridData();\n\t\tgridData.horizontalSpan = 4;\n\t\tl.setLayoutData(gridData);\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\t\n\t\tl = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t gridData = new GridData(GridData.FILL, GridData.CENTER, false, false);\n\t\tgridData.heightHint = 10;\n\t\tgridData.horizontalSpan = 5;\n\t\tl.setLayoutData(gridData);\n\n\t\tllenarCampos();\n\t\t\n\t\treturn composite;\n\t}",
"@Override\r\n\tpublic void createPartControl(Composite parent) {\n\r\n\t}",
"BOp createBOp();",
"@Override\n\tpublic void creatConfigUI(Composite parent, Map<String, String> params) {\n\n\t}",
"public void createControl(Composite parent) {\r\n \t\tinitializeDialogUnits(parent);\r\n \r\n \t\tComposite root = new Composite(parent, SWT.NONE);\r\n \t\tGridData gd = new GridData();\r\n \r\n \t\tgd.horizontalSpan = 1;\r\n \t\tgd.horizontalAlignment = GridData.FILL;\r\n \t\tgd.grabExcessHorizontalSpace = true;\r\n \t\tgd.grabExcessVerticalSpace = false;\r\n \r\n \t\tGridLayout gridLayout = new GridLayout(1, false);\r\n \t\troot.setLayout(gridLayout);\r\n \t\tGroup generalGroup = new Group(root, SWT.NONE);\r\n \t\tgeneralGroup.setLayoutData(gd);\r\n \t\tgeneralGroup.setText(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_GENERAL);\r\n \t\tgridLayout = new GridLayout(3, false);\r\n \r\n \t\tgeneralGroup.setLayout(gridLayout);\r\n \t\tregisterEditor(jBossSeamHomeEditor, generalGroup, 3);\r\n \t\tregisterEditor(jBossAsDeployAsEditor, generalGroup, 3);\r\n \r\n \t\tgd = new GridData();\r\n \t\tgd.horizontalSpan = 1;\r\n \t\tgd.horizontalAlignment = GridData.FILL;\r\n \t\tgd.grabExcessHorizontalSpace = true;\r\n \t\tgd.grabExcessVerticalSpace = false;\r\n \r\n \t\tGroup databaseGroup = new Group(root, SWT.NONE);\r\n \t\tdatabaseGroup.setLayoutData(gd);\r\n \t\tdatabaseGroup.setText(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_DATABASE);\r\n \t\tgridLayout = new GridLayout(4, false);\r\n \t\tdatabaseGroup.setLayout(gridLayout);\r\n \t\tregisterEditor(jBossHibernateDbTypeEditor, databaseGroup, 4);\r\n \t\tregisterEditor(connProfileSelEditor, databaseGroup, 4);\r\n \t\tregisterEditor(dbSchemaName, databaseGroup, 4);\r\n \t\tregisterEditor(dbCatalogName, databaseGroup, 4);\r\n \t\tregisterEditor(dbTablesExists, databaseGroup, 4);\r\n \t\tregisterEditor(recreateTablesOnDeploy, databaseGroup, 4);\r\n \t\t// registerEditor(pathToJdbcDriverJar,databaseGroup, 4);\r\n \r\n \t\tGroup generationGroup = new Group(root, SWT.NONE);\r\n \t\tgd = new GridData();\r\n \t\tgd.horizontalSpan = 1;\r\n \t\tgd.horizontalAlignment = GridData.FILL;\r\n \t\tgd.grabExcessHorizontalSpace = true;\r\n \t\tgd.grabExcessVerticalSpace = false;\r\n \r\n \t\tgenerationGroup.setLayoutData(gd);\r\n \t\tgenerationGroup.setText(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_CODE_GENERATION);\r\n \t\tgridLayout = new GridLayout(3, false);\r\n \t\tgenerationGroup.setLayout(gridLayout);\r\n \t\tregisterEditor(sessionBeanPkgNameditor, generationGroup, 3);\r\n \t\tregisterEditor(entityBeanPkgNameditor, generationGroup, 3);\r\n \t\tregisterEditor(testsPkgNameditor, generationGroup, 3);\r\n \r\n \t\tsetControl(root);\r\n \t\tNewProjectDataModelFacetWizard wizard = (NewProjectDataModelFacetWizard) getWizard();\r\n \r\n \t\tIDataModel model = wizard.getDataModel();\r\n \r\n \t\tif (validatorDelegate == null) {\r\n \t\t\tvalidatorDelegate = new DataModelValidatorDelegate(this.model, this);\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(jBossSeamHomeEditor\r\n \t\t\t\t\t.getName(),\r\n \t\t\t\t\tValidatorFactory.SEAM_RUNTIME_NAME_VALIDATOR);\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(connProfileSelEditor\r\n \t\t\t\t\t.getName(),\r\n \t\t\t\t\tValidatorFactory.CONNECTION_PROFILE_VALIDATOR);\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(testsPkgNameditor\r\n \t\t\t\t\t.getName(), new PackageNameValidator(testsPkgNameditor\r\n \t\t\t\t\t.getName(), \"tests\")); //$NON-NLS-1$\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(entityBeanPkgNameditor\r\n \t\t\t\t\t.getName(), new PackageNameValidator(entityBeanPkgNameditor\r\n \t\t\t\t\t.getName(), \"entity beans\")); //$NON-NLS-1$\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(sessionBeanPkgNameditor\r\n \t\t\t\t\t.getName(), new PackageNameValidator(\r\n \t\t\t\t\tsessionBeanPkgNameditor.getName(), \"session beans\")); //$NON-NLS-1$\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(\r\n \t\t\t\t\tIFacetDataModelProperties.FACET_PROJECT_NAME, \r\n \t\t\t\t\tnew ProjectNamesDuplicationValidator(\r\n \t\t\t\t\t\t\tIFacetDataModelProperties.FACET_PROJECT_NAME));\r\n \t\t}\r\n \r\n \t\tjBossHibernateDbTypeEditor\r\n \t\t\t\t.addPropertyChangeListener(new PropertyChangeListener() {\r\n \t\t\t\t\tpublic void propertyChange(PropertyChangeEvent evt) {\r\n \t\t\t\t\t\tSeamInstallWizardPage.this.model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_DIALECT,\r\n \t\t\t\t\t\tHIBERNATE_HELPER.getDialectClass(evt.getNewValue().toString()));\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t);\r\n \r\n\r\n\r\n Dialog.applyDialogFont(parent);\r\n \t}",
"@Test(timeout = 4000)\n public void test26() throws Throwable {\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(3, \"FgZRnc2Yp%jU?C2`8\");\n fBProcedureParam0.setIndex(3);\n fBProcedureCall0.getSQL(false);\n fBProcedureParam0.setType(3);\n fBProcedureCall0.addInputParam(fBProcedureParam0);\n fBProcedureParam0.setValue(\"FgZRnc2Yp%jU?C2`8\");\n fBProcedureParam0.setIndex(1861);\n fBProcedureParam0.setIndex(1861);\n fBProcedureParam0.setIndex(547);\n fBProcedureParam0.setIndex(887);\n fBProcedureParam0.setIndex(547);\n fBProcedureParam0.setIndex(1625);\n fBProcedureParam0.setIndex(1967);\n fBProcedureParam0.setIndex(1625);\n fBProcedureCall0.registerOutParam(1625, 749);\n fBProcedureCall0.addOutputParam(fBProcedureParam0);\n fBProcedureParam0.setIndex((-1384));\n fBProcedureParam0.setIndex(0);\n fBProcedureParam0.setIndex(887);\n fBProcedureParam0.setIndex((-1832));\n fBProcedureParam0.setIndex(1967);\n fBProcedureParam0.setIndex(18);\n assertEquals(749, fBProcedureParam0.getType());\n }",
"OPTION createOPTION();",
"ParameterRefinement createParameterRefinement();",
"public void visitProcedureNode(DeclNode.ProcedureNode node) {\n beginGen(\"Procedure\");\n // Generate code for the block\n Code code = visitBlockNode(node.getBlock());\n code.generateOp(Operation.RETURN);\n procedures.addProcedure(node.getProcEntry(), code);\n endGen(\"Procedure\");\n }",
"@Override\r\n\tpublic void updateParameterBlock() {\r\n\r\n\t\tpb.setParameter(\"Left\", ((Number) jSpinnerLeft.getValue()).intValue());\r\n\t\tpb.setParameter(\"Right\", ((Number) jSpinnerRight.getValue()).intValue());\r\n\t\tpb.setParameter(\"Top\", ((Number) jSpinnerTop.getValue()).intValue());\r\n\t\tpb.setParameter(\"Bottom\",((Number) jSpinnerBottom.getValue()).intValue());\r\n\t\tpb.setParameter(\"Const\", ((Number) jSpinnerConst.getValue()).intValue());\r\n\r\n\t\tpb.setParameter(\"NewWidth\", ((Number) jSpinnerNewWidth.getValue()).intValue());\r\n\t\tpb.setParameter(\"NewHeight\", ((Number) jSpinnerNewHeight.getValue()).intValue());\r\n\r\n\t\tif (buttZero.isSelected()) pb.setParameter(\"Method\", IqmOpBorderDescriptor.ZERO);\r\n\t\tif (buttConst.isSelected()) pb.setParameter(\"Method\", IqmOpBorderDescriptor.CONSTANT);\r\n\t\tif (buttCopy.isSelected()) pb.setParameter(\"Method\", IqmOpBorderDescriptor.COPY);\r\n\t\tif (buttReflect.isSelected()) pb.setParameter(\"Method\", IqmOpBorderDescriptor.REFLECT);\r\n\t\tif (buttWrap.isSelected()) pb.setParameter(\"Method\", IqmOpBorderDescriptor.WRAP);\r\n\t\t\r\n\t\tif (buttBorder.isSelected()) pb.setParameter(\"BorderOrSize\", IqmOpBorderDescriptor.PREFERENCE_BORDER);\r\n\t\tif (buttSize.isSelected()) pb.setParameter(\"BorderOrSize\", IqmOpBorderDescriptor.PREFERENCE_SIZE);\r\n\t}",
"public void getFactorPoliticaConv(ReformaTributariaInput reformaTributaria)throws Exception {\n Connection conn = null;\n CallableStatement call = null;\n \n try {\n\n conn = this.getConnection();\n //Deudas que forman parte de la propuesta, pero no son propias del contribuyente\n call = conn.prepareCall(\"{call PKG_REFORMA_TRIBUTARIA.Status_Contribuyente(?,?,?,?)}\");\n call.setLong(1,reformaTributaria.getRutContribuyente().intValue());/*Rut Contribuyente */\n call.registerOutParameter(2, OracleTypes.INTEGER);/*Comportamiento*/\n call.registerOutParameter(3, OracleTypes.INTEGER);/*Embargo*/\n call.registerOutParameter(4, OracleTypes.INTEGER);/*Mipe*/\n \n \n call.execute();\n\n\n reformaTributaria.setComportamientoConvenio(new Integer(call.getObject(2).toString()));\n int garantia = Integer.parseInt(call.getObject(3).toString());\n int pyme = Integer.parseInt(call.getObject(4).toString());\n \n //System.out.println(\"-------garantia-------- \"+garantia);\n //System.out.println(\"-------pyme-------- \"+pyme);\n \n \n //reformaTributaria.setTieneGarantia(tieneGarantia)(new Integer(call.getObject(3).toString()));\n //reformaTributaria.setBeneficioPyme(new Integer(call.getObject(4).toString()));\n if (garantia==1){\n \t reformaTributaria.setTieneGarantia(new Boolean(true));\n }else{\n \t reformaTributaria.setTieneGarantia(new Boolean(false));\n }\n\n if (pyme==1){\n \t reformaTributaria.setBeneficioPyme(new Boolean(true));\n }else{\n \t reformaTributaria.setBeneficioPyme(new Boolean(false));\n }\n \n \n call.close(); \n \n }catch (Exception e) {\n e.printStackTrace();\n }\n finally{\n this.closeConnection();\n }\n\t\t\n }",
"Parcelle createParcelle();",
"@Test(timeout = 4000)\n public void test17() throws Throwable {\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(3674, \"250\");\n FBProcedureParam fBProcedureParam1 = fBProcedureCall0.addParam(3674, \"oyA6@hY>6JL<<\");\n fBProcedureParam1.clone();\n fBProcedureCall0.addOutputParam(fBProcedureParam1);\n fBProcedureCall0.addParam(3674, \"250\");\n FBProcedureParam fBProcedureParam2 = new FBProcedureParam(1, \"250\");\n fBProcedureParam2.clone();\n fBProcedureParam0.setType(45);\n fBProcedureParam2.setType((-587));\n fBProcedureParam2.setIndex(3674);\n fBProcedureCall0.addOutputParam(fBProcedureParam2);\n fBProcedureCall0.addInputParam(fBProcedureParam0);\n FBProcedureParam fBProcedureParam3 = fBProcedureCall0.getOutputParam(1);\n assertEquals(0, fBProcedureParam3.getPosition());\n \n fBProcedureCall0.registerOutParam(3674, (-1587));\n FBProcedureParam fBProcedureParam4 = fBProcedureCall0.addParam(1, \"250\");\n assertEquals(1, fBProcedureParam4.getPosition());\n }",
"public PowerMethodParameter() {\r\n\t\t\r\n\t\t//constructor fara parametru, utilizat in cazul in care utilizatorul nu introduce\r\n\t\t//fisierul sursa si nici fiesierul destinatie ca parametrii in linia de comanda\r\n\t\tSystem.out.println(\"****The constructor without parameters PowerMethodParameter has been called****\");\r\n\t\tSystem.out.println(\"You did not specify the input file and the output file\");\r\n\t\t\r\n\t}",
"Parameter createParameter();",
"interface WithSecurityProfile {\n /**\n * Specifies the securityProfile property: The lab security profile..\n *\n * @param securityProfile The lab security profile.\n * @return the next definition stage.\n */\n WithCreate withSecurityProfile(SecurityProfile securityProfile);\n }",
"Prms createPrms();",
"interface WithProperties {\n /**\n * Specifies properties.\n * @param properties Properties of the secret\n * @return the next definition stage\n */\n WithCreate withProperties(SecretProperties properties);\n }",
"private void createCompositeGoodsMange() {\r\n\t\tGridLayout gridLayout = new GridLayout();\r\n\t\tgridLayout.numColumns = 3;\r\n\t\tcompositeGoodsMange = new Composite(tabFolder, SWT.NONE);\r\n\t\tcompositeGoodsMange.setLayout(gridLayout);\r\n\t\tcompositeGoodsMange.setSize(new Point(500, 400));\r\n\t\t\r\n\t\tbuttonAddGoods = new Button(compositeGoodsMange, SWT.NONE);\r\n\t\tbuttonAddGoods.setText(\"增加商品\");\r\n\t\tbuttonAddGoods.addSelectionListener(new SelectionListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tInputDialog id1=new InputDialog(sShell,\"新增商品\",\"输入商品信息,用空格分开,例如:001 方便面 6.8\",\"\",null);\r\n\t\t\t\tif(id1.open()==0){\r\n\t\t\t\t\tinput=id1.getValue();\r\n\t\t\t\t\tif(input.equals(\"\")) return;\r\n\t\t\t\t}\r\n\t\t\t\telse return;\r\n\t\t\t\tString str[]=input.split(\" \");\r\n\t\t\t\tCommonADO ado=CommonADO.getCommonADO();\r\n\t\t\t\tString sql=\"insert into Goods values('\"+str[0]+\"','\"+str[1]+\"','\"+str[2]+\"')\";\r\n\t\t\t\tado.executeUpdate(sql);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tcompositeGoodsShow.dispose();\t\t\t\t\r\n\t\t\t\tcreateCompositeGoodsShow();\r\n\t\t\t\t\r\n\t\t\t\tcompositeGoodsMange.layout(true);\r\n\t\t\t\t//compositeGoodsShow.layout(true);\r\n\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tlabel = new Label(compositeGoodsMange, SWT.NONE);\r\n\t\tlabel.setText(\" \");\r\n\t\tbuttonDeleteGoods = new Button(compositeGoodsMange, SWT.NONE);\r\n\t\tbuttonDeleteGoods.setText(\"删除商品\");\r\n\t\tbuttonDeleteGoods.addSelectionListener(new SelectionListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tInputDialog id1=new InputDialog(sShell,\"删除商品\",\"输入商品编号\",\"\",null);\r\n\t\t\t\tif(id1.open()==0){\r\n\t\t\t\t\tinput=id1.getValue();\r\n\t\t\t\t\tif(input.equals(\"\")) return;\r\n\t\t\t\t}\r\n\t\t\t\telse return;\r\n\t\t\t\t\r\n\t\t\t\tCommonADO ado=CommonADO.getCommonADO();\r\n\t\t\t\tString sql=\"delete from Goods where GoodsNo='\"+input+\"'\";\r\n\t\t\t\tado.executeUpdate(sql);\r\n\t\t\t\t//createCompositeGoodsShow();\r\n\t\t\t\tcompositeGoodsShow.dispose();\t\t\t\t\r\n\t\t\t\tcreateCompositeGoodsShow();\r\n\t\t\t\t\r\n\t\t\t\tcompositeGoodsMange.layout(true);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tcreateCompositeGoodsShow();\r\n\t}",
"public static void registerProcFunc(ISymbolTable symbolTable)\n\t\t\tthrows FFaplException {\n\t\tFFaplPreProcFuncSymbol s;\n\t\t//lcm(a,b) Integer-Integer\n\t\ts = new FFaplPreProcFuncSymbol(\"lcm\", \n null,\n new FFaplInteger(),\n ISymbol.FUNCTION);\n\t\ts.setProcFunc(new LCM());\n\t\tsymbolTable.addSymbol(s);\n\t symbolTable.openScope(false);\n\t //for Parameter\n\t symbolTable.addSymbol(\n\t \t\tnew FFaplSymbol(\"_t1\", \n null,\n new FFaplInteger(),\n ISymbol.PARAMETER));\n\t symbolTable.addSymbol(\n\t \t\tnew FFaplSymbol(\"_t2\", \n null,\n new FFaplInteger(),\n ISymbol.PARAMETER));\n\t symbolTable.closeScope();\n\t /*\n\t //lcm(a,b) Prime - Prime\n\t\ts = new FFaplPreProcFuncSymbol(\"lcm\", \n null,\n new FFaplInteger(),\n ISymbol.FUNCTION);\n\t\ts.setProcFunc(new LCM());\n\t\tsymbolTable.addSymbol(s);\n\t symbolTable.openScope(false);\n\t //for Parameter\n\t symbolTable.addSymbol(\n\t \t\tnew FFaplSymbol(\"_t1\", \n null,\n new FFaplPrime(),\n ISymbol.PARAMETER));\n\t symbolTable.addSymbol(\n\t \t\tnew FFaplSymbol(\"_t2\", \n null,\n new FFaplPrime(),\n ISymbol.PARAMETER));\n\t symbolTable.closeScope();\n\t \n\t //lcm(a,b) Integer- Prime\n\t\ts = new FFaplPreProcFuncSymbol(\"lcm\", \n null,\n new FFaplInteger(),\n ISymbol.FUNCTION);\n\t\ts.setProcFunc(new LCM());\n\t\tsymbolTable.addSymbol(s);\n\t symbolTable.openScope(false);\n\t //for Parameter\n\t symbolTable.addSymbol(\n\t \t\tnew FFaplSymbol(\"_t1\", \n null,\n new FFaplInteger(),\n ISymbol.PARAMETER));\n\t symbolTable.addSymbol(\n\t \t\tnew FFaplSymbol(\"_t2\", \n null,\n new FFaplPrime(),\n ISymbol.PARAMETER));\n\t symbolTable.closeScope();\n\t \n\t //lcm(a,b) Prime - Integer\n\t\ts = new FFaplPreProcFuncSymbol(\"lcm\", \n null,\n new FFaplInteger(),\n ISymbol.FUNCTION);\n\t\ts.setProcFunc(new LCM());\n\t\tsymbolTable.addSymbol(s);\n\t symbolTable.openScope(false);\n\t //for Parameter\n\t symbolTable.addSymbol(\n\t \t\tnew FFaplSymbol(\"_t1\", \n null,\n new FFaplPrime(),\n ISymbol.PARAMETER));\n\t symbolTable.addSymbol(\n\t \t\tnew FFaplSymbol(\"_t2\", \n null,\n new FFaplInteger(),\n ISymbol.PARAMETER));\n\t symbolTable.closeScope();\n\t */\n\t \n\t}",
"@Override\n public Control createDialogArea(Composite parent) {\n Composite top = (Composite) super.createDialogArea(parent);\n\n /*\n * Create the main layout for the shell.\n */\n GridLayout mainLayout = new GridLayout(1, false);\n mainLayout.verticalSpacing = 15;\n top.setLayout(mainLayout);\n GridData mainLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true);\n top.setLayoutData(mainLayoutData);\n\n createStormTypeArea(top);\n createViewerArea(top);\n createTransmitArea(top);\n\n /*\n * Sets dialog title\n */\n getShell().setText(\"View/Send PSH\");\n\n // Update GUI from PshData.\n updateGui(pshData);\n\n return top;\n }",
"public MParameterSystem() {\n\t\tsuper();\n\t}",
"private void createComposite1() {\n \t\t\tGridLayout gridLayout2 = new GridLayout();\n \t\t\tgridLayout2.numColumns = 7;\n \t\t\tgridLayout2.makeColumnsEqualWidth = true;\n \t\t\tGridData gridData1 = new org.eclipse.swt.layout.GridData();\n \t\t\tgridData1.horizontalSpan = 3;\n \t\t\tgridData1.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;\n \t\t\tgridData1.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;\n \t\t\tgridData1.grabExcessVerticalSpace = true;\n \t\t\tgridData1.grabExcessHorizontalSpace = true;\n \t\t\tcalendarComposite = new Composite(this, SWT.BORDER);\n \t\t\tcalendarComposite.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));\n \t\t\tcalendarComposite.setLayout(gridLayout2);\n \t\t\tcalendarComposite.setLayoutData(gridData1);\n \t\t}",
"protected void creationAppr(Connection con) {\n try {\n PreparedStatement pst = con.prepareStatement(\"SELECT identifiant, transitionIdentifier, fixIdentifiant, icaoCodeFix, secCodeFix, subCodeFix, aeroportIdentifiant, icaoCode, sequenceNumber FROM procedure where typeProcedure like 'APPR' ORDER BY aeroportIdentifiant, identifiant, transitionIdentifier ,sequenceNumber asc\");\n ResultSet rs = pst.executeQuery();\n rs.next();\n String runwayIdentifiant = rs.getString(1);\n String transitionIdentifier = rs.getString(2);\n String aeroport = rs.getString(7);\n String icaoCode = rs.getString(8);\n String premierPoint = null;\n if (transitionIdentifier.equals(\"\")) {\n premierPoint = rs.getString(3);\n } else {\n premierPoint = transitionIdentifier;\n }\n\n String sequenceNumber = rs.getString(9);\n List<LatitudeLongitude> couple = new ArrayList<>();\n do {\n System.out.println(\"Premier point\" + premierPoint);\n\n if (!transitionIdentifier.equals(rs.getString(2)) && !sequenceNumber.equals(rs.getString(9))) {\n System.out.println(\"Ajout bdd de \" + premierPoint);\n // ajout en bdd du precedent\n PreparedStatement ajoutSid = con.prepareStatement(\"INSERT INTO appr (runwayIdentifiant, typeApproche, aeroportIdentifiant, icaoCode, premierPoint ,balises) VALUES (?,CAST(? AS typeAppr),?,?,?,?)\");\n ajoutSid.setString(1, runwayIdentifiant);\n ajoutSid.setString(2, runwayIdentifiant.substring(0, 1));\n ajoutSid.setString(3, aeroport);\n ajoutSid.setString(4, icaoCode);\n ajoutSid.setString(5, premierPoint);\n\n\n String[][] tab = new String[couple.size()][2];\n for (int i = 0; i < couple.size(); i++) {\n tab[i][0] = couple.get(i).getLatitude();\n tab[i][1] = couple.get(i).getLongitude();\n }\n\n Array arraySql = con.createArrayOf(\"text\", tab);\n ajoutSid.setArray(6, arraySql);\n ajoutSid.executeUpdate();\n couple.clear();\n\n // on update l'identifiant ds la boucle\n runwayIdentifiant = rs.getString(1);\n transitionIdentifier = rs.getString(2);\n aeroport = rs.getString(7);\n icaoCode = rs.getString(8);\n if (transitionIdentifier.equals(\"\")) {\n premierPoint = rs.getString(3);\n } else {\n premierPoint = transitionIdentifier;\n }\n }\n\n ResultSet rsBalise = null;\n if (!rs.getString(3).equals(\"\")) {\n if (rs.getString(5).equals(\"D\") && rs.getString(6).equals(\"B\")) {\n //NDB\n PreparedStatement pstBalise = con.prepareStatement(\"SELECT latitude, longitude FROM ndb where identifiant like ? and icaoCode like ?\");\n pstBalise.setString(1, rs.getString(3));\n pstBalise.setString(2, rs.getString(4));\n rsBalise = pstBalise.executeQuery();\n if (rsBalise.next()) {\n couple.add(new LatitudeLongitude(rsBalise.getString(1), rsBalise.getString(2)));\n System.out.println(\"NDB\" + rs.getString(2));\n }\n rsBalise.close();\n pstBalise.close();\n\n } else if (rs.getString(5).equals(\"E\") && rs.getString(6).equals(\"A\")) {\n //waypoint en route\n PreparedStatement pstBalise = con.prepareStatement(\"SELECT latitude, longitude FROM waypoint where identifiant like ? and icaoCode like ? and aeroport like 'ENRT'\");\n pstBalise.setString(1, rs.getString(3));\n pstBalise.setString(2, rs.getString(4));\n rsBalise = pstBalise.executeQuery();\n\n if (rsBalise.next()) {\n couple.add(new LatitudeLongitude(rsBalise.getString(1), rsBalise.getString(2)));\n System.out.println(\"WayPoint\" + rs.getString(2));\n }\n rsBalise.close();\n pstBalise.close();\n\n } else if (rs.getString(5).equals(\"P\") && rs.getString(6).equals(\"C\")) {\n //waypoint terminaux\n PreparedStatement pstBalise = con.prepareStatement(\"SELECT latitude, longitude FROM waypoint where identifiant like ? and icaoCode like ? and aeroport like ?\");\n pstBalise.setString(1, rs.getString(3));\n pstBalise.setString(2, rs.getString(4));\n pstBalise.setString(3, rs.getString(7));\n rsBalise = pstBalise.executeQuery();\n\n if (rsBalise.next()) {\n couple.add(new LatitudeLongitude(rsBalise.getString(1), rsBalise.getString(2)));\n System.out.println(\"WayPoint\" + rs.getString(2));\n }\n rsBalise.close();\n pstBalise.close();\n } else if (rs.getString(5).equals(\"D\") && rs.getString(6).equals(\"\")) {\n //VHF\n PreparedStatement pstBalise = con.prepareStatement(\"(SELECT latitude, longitude from vor where identifiant=? and icaoCode=?)UNION(SELECT latitude,longitude from vorDme where identifiant=? and icaoCode=?)UNION(SELECT latitude,longitude from dme where identifiant=? and icaoCode=?)UNION(SELECT latitude,longitude from tacan where identifiant=? and icaoCode=?)UNION(SELECT latitude,longitude from ilsdme where identifiant=? and icaoCode=?)\");\n pstBalise.setString(1, rs.getString(3));\n pstBalise.setString(2, rs.getString(4));\n pstBalise.setString(3, rs.getString(3));\n pstBalise.setString(4, rs.getString(4));\n pstBalise.setString(5, rs.getString(3));\n pstBalise.setString(6, rs.getString(4));\n pstBalise.setString(7, rs.getString(3));\n pstBalise.setString(8, rs.getString(4));\n pstBalise.setString(9, rs.getString(3));\n pstBalise.setString(10, rs.getString(4));\n rsBalise = pstBalise.executeQuery();\n if (rsBalise.next()) {\n couple.add(new LatitudeLongitude(rsBalise.getString(1), rsBalise.getString(2)));\n System.out.println(\"VHF\" + rs.getString(2));\n }\n rsBalise.close();\n pstBalise.close();\n\n\n }\n\n } else {\n System.out.println(\"fix identifier vide\");\n }\n sequenceNumber = rs.getString(9);\n System.out.println(\"FIN\");\n } while (rs.next());\n\n PreparedStatement ajoutSid = con.prepareStatement(\"INSERT INTO appr (runwayIdentifiant, typeApproche, aeroportIdentifiant, icaoCode, premierPoint ,balises) VALUES (?,CAST(? AS typeAppr),?,?,?,?)\");\n ajoutSid.setString(1, runwayIdentifiant);\n ajoutSid.setString(2, runwayIdentifiant.substring(0, 1));\n ajoutSid.setString(3, aeroport);\n ajoutSid.setString(4, icaoCode);\n ajoutSid.setString(5, premierPoint);\n\n String[][] tab = new String[couple.size()][2];\n for (int i = 0; i < couple.size(); i++) {\n tab[i][0] = couple.get(i).getLatitude();\n tab[i][1] = couple.get(i).getLongitude();\n }\n\n Array arraySql = con.createArrayOf(\"text\", tab);\n ajoutSid.setArray(6, arraySql);\n ajoutSid.executeUpdate();\n couple.clear();\n\n rs.close();\n pst.close();\n\n\n } catch (SQLException ex) {\n Logger.getLogger(Approche.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n\n }",
"@Test(timeout = 4000)\n public void test37() throws Throwable {\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n FBProcedureParam fBProcedureParam0 = new FBProcedureParam();\n fBProcedureCall0.addInputParam(fBProcedureParam0);\n fBProcedureParam0.setType((-349));\n fBProcedureParam0.setType((-134));\n fBProcedureCall0.addInputParam(fBProcedureParam0);\n assertFalse(fBProcedureParam0.isParam());\n }",
"public HandicapParameterSet() {\n }"
] | [
"0.6193302",
"0.5948211",
"0.5791394",
"0.5645342",
"0.554555",
"0.548782",
"0.5473813",
"0.541088",
"0.53624684",
"0.535167",
"0.53481597",
"0.5308254",
"0.5280035",
"0.52223957",
"0.51998544",
"0.5182923",
"0.5159044",
"0.5148896",
"0.5142143",
"0.51275283",
"0.5119975",
"0.5076847",
"0.5062085",
"0.50504124",
"0.50324804",
"0.50129837",
"0.5006638",
"0.49784827",
"0.49731466",
"0.4967952",
"0.4957327",
"0.49496803",
"0.4946614",
"0.49040926",
"0.48914817",
"0.4883458",
"0.48828265",
"0.48737445",
"0.48551285",
"0.48531884",
"0.48527429",
"0.48442927",
"0.48441",
"0.4843712",
"0.48427674",
"0.48427674",
"0.48427674",
"0.48419496",
"0.48413733",
"0.48377427",
"0.48365673",
"0.48354098",
"0.48278752",
"0.4825927",
"0.48126218",
"0.48122823",
"0.48093915",
"0.4808152",
"0.48054615",
"0.4804117",
"0.47885495",
"0.47877243",
"0.47714868",
"0.47651",
"0.47623074",
"0.475778",
"0.47510982",
"0.47482455",
"0.4742117",
"0.47421026",
"0.47298402",
"0.4728284",
"0.47275835",
"0.47263452",
"0.4721233",
"0.47157064",
"0.47122282",
"0.47120222",
"0.47100404",
"0.4710029",
"0.470667",
"0.47046414",
"0.4698388",
"0.4689375",
"0.4688837",
"0.4686496",
"0.4685429",
"0.46837392",
"0.4674387",
"0.46738896",
"0.467227",
"0.46720615",
"0.46714157",
"0.4671405",
"0.4668029",
"0.46676967",
"0.46674657",
"0.4667396",
"0.46612963",
"0.46545395"
] | 0.71238863 | 0 |
Create the sql script composite | private Composite createSqlScriptComposite() {
final Composite composite = new Composite(tabFolder, SWT.NONE);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
GridLayout layout = new GridLayout();
layout.marginWidth = 10;
layout.marginHeight = 10;
sqlScriptText = new StyledText(composite, SWT.BORDER | SWT.WRAP | SWT.MULTI | SWT.READ_ONLY);
CommonUITool.registerContextMenu(sqlScriptText, false);
sqlScriptText.setLayoutData(new GridData(GridData.FILL_BOTH));
composite.setLayout(layout);
return composite;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getSQLScript() {\n\t\tStringBuffer sb = new StringBuffer();\n\t\tStringBuffer javaSb = new StringBuffer();\n\t\tsb.append(\"CREATE\").append(\" PROCEDURE \");\n\t\tString procedureName = procNameText.getText();\n\t\tif (procedureName == null) {\n\t\t\tprocedureName = \"\";\n\t\t}\n\t\tsb.append(QuerySyntax.escapeKeyword(procedureName)).append(\"(\");\n\t\tfor (Map<String, String> map : procParamsListData) {\n\t\t\t// \"PARAMS_INDEX\", \"PARAM_NAME\", \"PARAM_TYPE\", \"JAVA_PARAM_TYPE\"\n\t\t\tString name = map.get(\"0\");\n\t\t\tString type = map.get(\"1\");\n\t\t\tString javaType = map.get(\"2\");\n\t\t\tString paramModel = map.get(\"3\");\n\t\t\tString description = map.get(\"4\");\n\t\t\tsb.append(QuerySyntax.escapeKeyword(name)).append(\" \");\n\t\t\tif (!paramModel.equalsIgnoreCase(SPArgsType.IN.toString())) {\n\t\t\t\tsb.append(paramModel).append(\" \");\n\t\t\t}\n\t\t\tsb.append(type);\n\t\t\tif (isCommentSupport && StringUtil.isNotEmpty(description)) {\n\t\t\t\tdescription = String.format(\"'%s'\", description);\n\t\t\t\tsb.append(String.format(\" COMMENT %s\", StringUtil.escapeQuotes(description)));\n\t\t\t}\n\t\t\tsb.append(\",\");\n\t\t\tjavaSb.append(javaType).append(\",\");\n\t\t}\n\t\tif (!procParamsListData.isEmpty()) {\n\t\t\tif (sb.length() > 0) {\n\t\t\t\tsb.deleteCharAt(sb.length() - 1);\n\t\t\t}\n\t\t\tif (javaSb.length() > 0) {\n\t\t\t\tjavaSb.deleteCharAt(javaSb.length() - 1);\n\t\t\t}\n\t\t}\n\t\tsb.append(\")\");\n\n\t\tsb.append(StringUtil.NEWLINE).append(\"AS LANGUAGE JAVA \").append(StringUtil.NEWLINE);\n\t\tString javaFuncName = javaNameText.getText();\n\t\tif (javaFuncName == null) {\n\t\t\tjavaFuncName = \"\";\n\t\t}\n\t\tsb.append(\"NAME '\").append(javaFuncName).append(\"(\").append(javaSb).append(\")\").append(\"'\");\n\t\tif (isCommentSupport) {\n\t\t\tString description = procDescriptionText.getText();\n\t\t\tif (StringUtil.isNotEmpty(description)) {\n\t\t\t\tdescription = String.format(\"'%s'\", description);\n\t\t\t\tsb.append(String.format(\" COMMENT %s\", StringUtil.escapeQuotes(description)));\n\t\t\t}\n\t\t}\n\t\treturn formatSql(sb.toString());\n\t}",
"public static void main(String[] args) {\n MySQLScriptGen databaseobject = new MySQLScriptGen();\n\n //this is same for every model\n JsonFileReader jsonFileReader = JsonFileReader.getInstance();\n JSONObject pim = jsonFileReader.getplatformIndependentModel();\n String ddl_script = databaseobject.createDDLScript(pim);\n String dml_script = databaseobject.createDMLScript(pim);\n String dql_script = databaseobject.createDQLScript(pim);\n System.out.println(\">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\\n\");\n System.out.println(ddl_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DML_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(dml_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DML_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DQL_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(dql_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DQL_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n }",
"abstract protected String buildSQL(BatchSQLEnum sql);",
"private String createTableSQL()\n\t{\n\t\tStringBuffer str = new StringBuffer();\n\n\t\t// Keep track of the list of fields\n\t\tList<String> listFields = new ArrayList<String>();\n\n\t\t// Table command\n\t\tstr.append(\"CREATE TABLE \" + getFullPath() + \"( \");\n\t\tstr.append(createStandardGZFields());\n\n\t\t// Loop through all InputFields\n\t\tfor (InputFieldSet fieldSet : function.getInputFieldSets())\n\t\t{\n\t\t\tfor (InputField inputField : fieldSet.getInputFields())\n\t\t\t{\n\t\t\t\t// Phase 2 does not support repeating fields being journalled\n\t\t\t\tif (!Field.isRepeating(inputField))\n\t\t\t\t{\n\t\t\t\t\t// Field\n\t\t\t\t\tString fieldName = SQLToolbox.cvtToSQLFieldName(inputField.getId());\n\n\t\t\t\t\t// add if not yet existing\n\t\t\t\t\tif (listFields.indexOf(fieldName) == -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tstr.append(\", \");\n\t\t\t\t\t\tString fieldDataType = inputField.getDataType();\n\t\t\t\t\t\tString fieldType = SQLToolbox.cvtToSQLFieldType(fieldDataType, inputField.getSize(), inputField\n\t\t\t\t\t\t\t\t\t\t.getDecimals());\n\t\t\t\t\t\tString fieldDefault = SQLToolbox.cvtToSQLDefault(fieldDataType);\n\t\t\t\t\t\tstr.append(fieldName + \" \" + fieldType + \" \" + \" not null default \" + fieldDefault);\n\t\t\t\t\t\tlistFields.add(fieldName);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// End\n\t\tstr.append(\" ) \");\n\t\t// RCDFMT \" + getJournalRcdName());\n\n\t\treturn str.toString();\n\t}",
"public void makeSql() {\n\t\tfor(int i=0; i<arr_sql.length; i++) {\n\t\t\tarr_sql[i] = new StringBuffer();\n\t\t}\n\t\t\n\t\t/*\n\t\t * 공통코드 쿼리\n\t\t * 대리점구분 : CU006\n\t\t * 직판구분 : CU012\n\t\t * 지역 : SY006\n\t\t * 계약상태 : CU013\n\t\t * 사용유무 : SY011\n\t\t * 보증보험회사 : CU010\n\t\t * 하위대리점여부 : CU011\n\t\t */\n\t\tarr_sql[0].append (\"SELECT\t\t\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append (\"\t' ' head, ' ' detail, '전체' detail_nm \\n\")\n\t\t\t\t .append (\"FROM DUAL \\n\")\n\t\t\t\t .append (\"UNION ALL \\n\")\n\t\t\t\t .append (\"SELECT \\n\")\n\t\t\t\t .append (\"\tB.head, B.detail, B.detail_nm \\n\")\n\t\t\t\t .append (\"FROM \\n\")\n\t\t\t\t .append (\"\tSALES.TSY011 A, \\n\")\n\t\t\t\t .append (\"\tSALES.TSY010 B \\n\")\n\t\t\t\t .append (\"WHERE 1=1 \\n\")\n\t\t\t\t .append (\" AND A.head = B.head \\n\")\n\t\t\t\t .append (\" AND B.head = ? \\n\")\n\t\t\t\t .append (\" AND LENGTH (rtrim(B.detail)) > 0 \\n\");\n\t\t\n\t\t/*\n\t\t * 대리점 조회\n\t\t */\n\t\tarr_sql[1].append(\"SELECT T1.client_sid\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처SID \t*/\n\t \t\t .append(\"\t\t ,T1.vend_cd \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* [회계]거래처 코드 \t*/\n\t \t\t .append(\"\t\t ,T1.client_cd \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처 코드 \t*/\n\t \t\t .append(\"\t\t ,T1.client_nm \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처 명 \t*/\n\t \t\t .append(\"\t\t ,T1.client_gu \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처구분 :CU005 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.agen_gu \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 대리점구분 :CU006 \t*/\n\t \t\t .append(\"\t\t ,T1.dir_yn \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 직판여부 :CU012 \t*/\n\t \t\t .append(\"\t\t ,T1.area_cd \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지역코드 :SY006 \t*/\n\t \t\t .append(\"\t\t ,T1.sal_dam_sid \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 영업담당자코드[TSY410] */\n\t \t\t .append(\"\t\t ,T1.client_dam_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처담당자 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.tel_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 전화번호 \t*/\n\t \t\t .append(\"\t\t ,T1.mobile_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 휴대전화 \t*/\n\t \t\t .append(\"\t\t ,T1.fax_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* FAX번호 \t*/\n\t \t\t .append(\"\t\t ,T1.e_mail \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 이메일 \t*/\n\t \t\t .append(\"\t\t ,T1.zip_cd \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 우편번호[TSY110] */\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.address1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 주소1 \t*/\n\t \t\t .append(\"\t\t ,T1.address2 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 주소2 \t*/\n\t \t\t .append(\"\t\t ,T1.commi_rate \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t \t\t .append(\"\t\t ,T1.cunt_status \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 계약상태 :CU013 \t*/\n\t \t\t .append(\"\t\t ,T1.bancod \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행코드 [BANKCODE] */\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.bank_acc_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행계좌번호 \t*/\n\t \t\t .append(\"\t\t ,T1.bank_acct_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 예금주 \t*/\n\t \t\t .append(\"\t\t ,T1.use_yn \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 사용여부 :SY011 \t*/ \n\t \t\t .append(\"\t\t ,T1.client_url\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 홈페이지 URL\t\t\t\t*/\n\t \t\t .append(\"\t\t ,T2.sal_dam_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 영업담당자명 \t*/\n\t \t\t .append(\"\t\t ,T3.vend_nm \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 거래처명 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T4.bannam \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행명 \t*/\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU006',T1.agen_gu) AS agen_gu_name \t\t\t\t\t\\n\")\t/* 대리점구분명 \t\t\t\t*/ \n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU012',T1.dir_yn) AS dir_yn_name \t\t\t\t\t\\n\")\t/* 직판여부명 \t\t\t\t*/ \n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY006',T1.area_cd) AS area_nm\t\t\t\t\t\t\t\\n\")\t/* 지역명 \t\t\t\t*/\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU013',T1.cunt_status) AS cunt_status_name \t\t\t\\n\")\t/* 계약상태명 \t\t\t\t*/\n\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY011',T1.use_yn) AS use_yn_name \t\t\t\\n\")\t/* 사용여부명 \t\t\t \t*/\n\n\t \t\t .append(\"FROM SALES.TCU030 T1 LEFT OUTER JOIN SALES.TSY410 T2 ON T1.SAL_DAM_SID = T2.SAL_DAM_SID \\n\")\n\t \t\t .append(\"\t\t LEFT OUTER JOIN ACCOUNT.GCZM_VENDER T3 ON T1.VEND_CD = T3.VEND_CD \t\t\t\t\t\\n\")\n\t \t\t .append(\"\t\t LEFT OUTER JOIN ACCOUNT.BANKCODE T4 ON T1.BANCOD = T4.BANCOD \t\t\t\t\t\\n\")\n\t \t\t .append(\"WHERE 1 = 1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\n\t \t\t .append(\"\t\t AND T1.client_GU = '1' \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t/*\n\t\t * 계약정보 조회\n\t\t */\n\t\tarr_sql[2].append(\"SELECT T1.client_sid\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t .append(\"\t\t ,T1.cont_date\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,T1.expire_date\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,TO_NUMBER(T1.insur_amt) AS insur_amt\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,T1.insur_comp_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ('CU010',T1.insur_comp_cd) AS insur_comp_cd_name\t\t\\n\") \t/* 보증보험회사명 \t\t*/ \n\t\t\t\t .append(\"FROM SALES.TCU031 T1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"WHERE 1=1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t \n\t\n\t\t/*\n\t\t * 지점정보 조회\n\t\t */\n\t\tarr_sql[3].append(\"SELECT T1.client_sid\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 매출처SID \t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지점코드 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.area_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,T1.client_down_yn \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t .append(\"\t\t ,T1.empno \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.tel_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.mobile_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.fax_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_url \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY006', T1.area_cd) AS area_nm\t\t\t\t\t\t\t\\n\") \t/* 지역명:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU011',T1.client_down_yn) AS client_down_yn_name \t\\n\")\t/* 하위대리점여부명 \t\t*/\n\t\t\t\t .append(\"FROM SALES.TCU032 T1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t\n\t\t\n\t\t/*\n\t\t * 대리점 등록\n\t\t */\n\n\t\tarr_sql[4].append(\"INSERT INTO SALES.TCU030 (\")\n\t\t\t\t .append(\"\t\t\t\t client_sid \\n\")\t\n\t\t\t\t .append(\"\t\t\t\t,vend_cd \\n\")\t/* [회계]거래처 코드 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_cd \\n\")\t/* 매출처 코드 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_nm \\n\")\t/* 매출처 명 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_gu \\n\")\t/* 매출처구분 :CU005 \t*/\n\t\t\t\t .append(\"\t\t\t\t,agen_gu \\n\")\t/* 대리점구분 :CU006 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,dir_yn \\n\")\t/* 직판여부 :CU012 \t*/\n\t\t\t\t .append(\"\t\t\t\t,area_cd \\n\")\t/* 지역코드 :SY006 \t*/\n\t\t\t\t .append(\"\t\t\t\t,sal_dam_sid \\n\")\t/* 영업담당자코드[TSY410] \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_dam_nm \\n\")\t/* 매출처담당자 \t*/\n\t\t\t\t .append(\"\t\t\t\t,tel_no \\n\")\t/* 전화번호 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,mobile_no \\n\")\t/* 핸드폰 \t*/\n\t\t\t\t .append(\"\t\t\t\t,fax_no \\n\")\t/* FAX번호 \t*/\n\t\t\t\t .append(\"\t\t\t\t,e_mail \\n\")\t/* 이메일 \t*/\n\t\t\t\t .append(\"\t\t\t\t,zip_cd \\n\")\t/* 소재지우편번호[TSY110] */\n\t\t\t\t .append(\"\t\t\t\t,address1 \\n\")\t/* 소재지주소1 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,address2 \\n\")\t/* 소재지주소2 \t*/\n\t\t\t\t .append(\"\t\t\t\t,commi_rate \t\\n\") \t/* 수수료율 \t*/\n\t\t\t\t .append(\"\t\t\t\t,cunt_status \\n\")\t/* 계약상태 :CU013 \t*/\n\t\t\t\t .append(\"\t\t\t\t,bancod\t\t\t\\n\") \t/* 은행코드 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t\t\t,bank_acc_no \\n\")\t/* 은행계좌번호[BANKCODE] \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,bank_acct_nm\t\\n\")\t/* 예금주 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t\t\t,use_yn\t\t\t\\n\")\t/* 사용여부 \t\t\t\t\t*/\n\t\t\t\t\n\t\t\t\t .append(\"\t\t \t\t,u_date \t\\n\") \t/* 최종수정일자 \t*/\n\t \t\t .append(\"\t\t \t\t,u_empno \t\\n\")\t/* 최종수정자사번 \t*/\n\t \t\t .append(\"\t\t \t\t,u_ip \\n\")\t/* 최종수정IP */\t\t\t\n\t \t\t .append(\"\t\t\t\t,client_url\t\t\\n\")\t/* 홈페이지 */\n\t\t\t\t .append(\"\t\t\t)\t\t\t\t\t\\n\")\n\t\t\t\t \n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\tSALES.SWS_TCU030_ID.NEXTVAL,?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,SYSTIMESTAMP,?,?,?\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\n\t\n\t\t\n\t\t/*\n\t\t * 계약정보 등록\n\t\t */\n\t\tarr_sql[5].append(\"INSERT INTO SALES.TCU031 ( \t\\n\")\n\t\t\t\t .append(\" \t client_SID\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t .append(\"\t\t ,cont_date\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,expire_date\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,insur_amt\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,insur_comp_cd\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date\t\t\t\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t .append(\"\t\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t \n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\t\t\t\n\t\t/*\n\t\t * 지점정보 등록\n\t\t */\n\t\t\n\t\tarr_sql[6].append(\"INSERT INTO SALES.TCU032 ( \t\\n\")\n\t\t\t\t .append(\"\t\t client_SID\t\t\t\\n\") \t/* 매출처SID \t\t*/\n\t\t\t\t .append(\"\t\t ,branch_cd\t\t\t\t\\n\")\t/* 지점코드 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_nm \t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,area_cd\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,client_down_yn \t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,empno \t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,tel_no \t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,mobile_no \t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,fax_no \t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_url \t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date \t\t\t\t\\n\")\t/* 최종수정일자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\")\t/* 최종수정자사번 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_ip \t\t\t\t\\n\")\t/* 최종수정IP \t\t*/\n\t\t\t\t .append(\"\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\n\t\t/*\n\t\t * 대리점 수정\n\t\t */\n\n\t\tarr_sql[7].append(\"UPDATE SALES.TCU030 SET \t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t vend_cd\t\t= ? \t\t\t\t\\n\")\t/* [회계]거래처 코드 \t*/\n\t\t\t\t .append(\"\t\t,client_nm\t\t= ? \t\t\t\t\\n\")\t/* 매출처 명 \t*/\n\t\t\t\t .append(\"\t\t,agen_gu\t\t= ? \t\t\t\t \t\\n\")\t/* 대리점구분 :CU006 \t*/\n\t\t\t\t .append(\"\t\t,dir_yn\t\t\t= ? \t\t\t\t\\n\")\t/* 직판여부 :CU012 \t*/\n\t\t\t\t .append(\"\t\t,area_cd \t= ? \t\t\t\t\t\\n\")\t/* 지역코드 :SY006 \t*/\n\n\t\t\t\t .append(\"\t\t,sal_dam_sid\t= ? \t\t\t\t\t\\n\")\t/* 영업담당자코드[TSY410] */\n\t\t\t\t .append(\"\t\t,client_dam_nm\t= ? \t\t\t\t\t\\n\")\t/* 매출처담당자 \t*/\n\t\t\t\t .append(\"\t\t,tel_no = ?\t\t\t\t\t\t\\n\")\t/* 전화번호 \t*/\n\t\t\t\t .append(\"\t\t,mobile_no = ?\t\t\t\t\t\t\\n\")\t/* 핸드폰 \t*/\n\t\t\t\t .append(\"\t\t,fax_no = ?\t\t\t\t\t\t\\n\")\t/* FAX번호 \t*/\n\n\t\t\t\t .append(\"\t\t,e_mail = ?\t\t\t\t\t\t\\n\")\t/* 이메일 \t*/\n\t\t\t\t .append(\"\t\t,zip_cd = ?\t\t\t\t\t\t\\n\")\t/* 소재지우편번호[TSY110] \t*/\n\t\t\t\t .append(\"\t\t,address1 = ?\t\t\t\t\t\t\\n\")\t/* 소재지주소1 \t*/\n\t\t\t\t .append(\"\t\t,address2 = ?\t\t\t\t\t\t\\n\")\t/* 소재지주소2 \t*/\n\t\t\t\t .append(\"\t\t,commi_rate \t= ?\t\t\t\t\t\t\\n\") \t/* 수수료율 \t*/\n\n\t\t\t\t .append(\"\t\t,cunt_status = ?\t\t\t\t\t\t\\n\")\t/* 계약상태 :CU013 \t*/\n\t\t\t\t .append(\"\t\t,bancod\t\t\t= ?\t\t\t\t\t\t\\n\") \t/* 은행코드\t \t\t\t\t*/\n\t\t\t\t .append(\"\t\t,bank_acc_no = ?\t\t\t\t\t\t\\n\")\t/* 은행계좌번호[BANKCODE]\t\t*/\n\t\t\t\t .append(\"\t\t,bank_acct_nm\t= ?\t\t\t\t\t\t\\n\")\t/* 예금주 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t,use_yn\t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 사용여부 \t\t\t\t\t*/\n\n\t\t\t\t .append(\"\t\t,u_date \t= SYSTIMESTAMP\t\t\\n\") \t/* 최종수정일자 \t*/\n\t \t\t .append(\"\t\t,u_empno \t= ?\t\t\t\t\t\t\\n\")\t/* 최종수정자사번 \t*/\n\t \t\t .append(\"\t\t,u_ip = ?\t\t\t\t\t\t\\n\")\t/* 최종수정IP */\n\t \t\t .append(\"\t,client_url = ?\t\t\t\t\t\t\\n\")\t/* 홈페이지 */\n\t\t\t\t .append (\"WHERE client_sid \t= ? \t\t\t\t\\n\");\n\t\t\t\t \n\t\t/*\n\t\t * 계약정보 수정\n\t\t */\n\t\tarr_sql[8].append(\"UPDATE SALES.TCU031 SET\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t cont_date\t\t\t= ?\t\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,expire_date\t\t= ?\t\t\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,insur_amt\t\t\t= ?\t\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,insur_comp_cd\t\t= ?\t\t\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date\t\t\t= SYSTIMESTAMP\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t= ?\t\t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t= ?\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t .append (\"WHERE client_sid \t\t= ? AND cont_date = ? \\n\");\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\t\n\t\t/*\n\t\t * 지점정보 수정\n\t\t */\n\t\t\n\t\tarr_sql[9].append(\"UPDATE SALES.TCU032 SET \t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t branch_nm \t\t= ?\t\t\t\t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,area_cd\t\t\t= ?\t\t\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,client_down_yn \t= ?\t\t\t\t\t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,empno \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,tel_no \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,mobile_no \t\t= ?\t\t\t\t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,fax_no \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_url \t\t= ?\t\t\t\t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date \t\t\t= SYSTIMESTAMP\t\t\t\t\t\t\\n\")\t/* 최종수정일자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t= ?\t\t\\n\")\t/* 최종수정자사번 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_ip \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 최종수정IP \t\t*/\n\t\t\t\t .append (\"WHERE client_sid = ? AND branch_cd \t= ?\t\t\\n\");\n\t\t\n\t\t arr_sql[10].append(\"DELETE FROM SALES.TCU030 WHERE client_sid = ?\");\t\n\t\t arr_sql[11].append(\"DELETE FROM SALES.TCU031 WHERE client_sid = ? AND cont_date = ?\");\n\t\t arr_sql[12].append(\"DELETE FROM SALES.TCU032 WHERE client_sid = ? AND branch_cd = ?\");\n\t\t \n\t\t \n\t\t /*\n\t\t * Client SID 얻어오기\n\t\t */\n\t\t\t\n\t\t\tarr_sql[13].append(\"SELECT client_sid FROM SALES.TCU030 WHERE client_cd = ?\\n\");\n\t\t\t\n\t\t/*\n\t\t * 수수료율 조회\n\t\t */\n\t\t\tarr_sql[14].append(\"SELECT\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t.append(\" T1.CLIENT_SID AS CLIENT_SID\t\\n\") /* 매출처SID */\n\t\t\t\t\t\t.append(\" ,T1.FR_DATE AS FR_DATE \t\\n\") /* 시작일자 */\n\t\t\t\t\t\t.append(\" ,T1.TO_DATE AS TO_DATE \t\\n\") /* 종료일자 */\n\t\t\t\t\t\t.append(\" ,T1.WEEKEND_YN AS WEEKEND_YN \t\\n\") /* 주말여부 */\n\t\t\t\t\t\t.append(\" ,T1.COMMI_RATE AS COMMI_RATE\t\\n\") /* 수수료율 */\n\t\t\t\t\t\t.append(\"FROM SALES.TCU033 T1 \t\\n\")\n\t\t\t\t\t\t.append(\"WHERE 1=1 \t\t\t\t\t\t\t\\n\");\n\t\t\t\t\t\t\n\t\t/*\n\t\t * 수수료율 등록\n\t\t */\n\t\t\t\n\t\t\tarr_sql[15].append(\"INSERT INTO SALES.TCU033 ( \t\\n\")\n\t\t\t\t\t\t .append(\" \t CLIENT_SID\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t\t\t .append(\"\t\t ,FR_DATE\t\t\t\t\\n\") \t/* 시작일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,TO_DATE\t\t\t\\n\")\t/* 종료일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,COMMI_RATE\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,WEEKEND_YN\t\t\t\\n\")\t/* 주말여부 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_DATE\t\t\t\t\\n\")\t/* 최종입력일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_EMPNO \t\t\t\t\\n\") \t/* 최종입력자사번 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_IP\t\t\t\t\t\\n\")\t/* 최종입력IP \t*/\t\t\t\t\t\t \n\t\t\t\t\t\t .append(\"\t\t ,u_date\t\t\t\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t\t\t .append(\"\t\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t \n\t\t\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t\t?,?,?,?, ?,\t\t\\n\")\t\n\t\t\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?, SYSTIMESTAMP,?,?\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t)\");\n\t\t/*\n\t\t * 수수료율 수정\n\t\t */\n\t\t\tarr_sql[16].append(\"UPDATE SALES.TCU033 SET\t\t\t\t\t\t\\n\") \n\t\t\t\t\t .append(\"\t\t TO_DATE\t\t\t= ?\t\t\t\t\t\\n\")\t/* 종료일자 \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,COMMI_RATE\t\t= ?\t\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t\t\t\t\t .append(\"\t\t ,WEEKEND_YN\t\t= ?\t\t\t\t\t\\n\")\t/* 주말여부 \t*/\n\t\t\t\t\t \n\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,u_date\t\t\t= SYSTIMESTAMP\t\\n\")\t/* 최종수정일자 \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,u_empno \t\t\t= ?\t\t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t= ?\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append (\"WHERE client_sid \t\t= ? AND FR_DATE = ? AND WEEKEND_YN=? \\n\"); \n\t\t/*\n\t\t * 수수료율 삭제\n\t\t */\n\t\tarr_sql[17].append(\"DELETE FROM SALES.TCU033 WHERE client_sid = ? AND fr_date = ? AND WEEKEND_YN=? \");\t \n\t\t\t \n\n\t}",
"public void makeSQL(String dropStament, String insertStament, String createStament, boolean[] isString, String patho, String nameFile, String filtroRow, int columnaActive){\n\t\tmanagerDB.executeScript_Void(dropStament);\n\n\t\t/* Listo los archivos que hay en la carpeta para hallar el que se llama descripcion*/ \n\t\tFile[] listOfFiles = new File(patho).listFiles();\n\t\tint i=0;\n\t\twhile ( i<listOfFiles.length && !listOfFiles[i].toString().contains(nameFile) )\n\t\t\ti++;\n\n\t\t// Si encontre el archivo creo la tabla, genero un scrip de insertar, lo ejecuto desde la consola y lo borro e inserto los datos\n\t\tif (i<listOfFiles.length){\n\n\t\t\tmanagerDB.executeScript_Void(createStament);\t\t\t\t\n\n\t\t\tif (managerDB.createExecutorFile(\"C:\\\\\", \"prueba\")){\n\t\t\t\tParserSNOMED.fileToSqlScript(patho,listOfFiles[i].getName().toString(),insertStament, filtroRow,columnaActive);\n\t\t\t\tSystem.out.println(patho + listOfFiles[i].getName().toString());\n\t\t\t\ttry{\n\t\t\t\t\tThread.sleep(1000); \n\n\t\t\t\t\tRuntime.getRuntime().exec(\"cmd /c start C:\\\\prueba.bat\");\n\t\t\t\t\tmanagerDB.waitUntisFinishConsole(\"C://\",\"done.prov\" );\n\n\t\t\t\t\t// Borro todos los archivos luego de que termine el script\n\t\t\t\t\tFile file = new File(\"C:\\\\done.prov\"); \tfile.delete();\n\t\t\t\t\t//\t\t\tfile = new File(\"C:\\\\auxFile.sql\"); \tfile.delete();\n\t\t\t\t\tfile = new File(\"C:\\\\prueba.bat\");\t\tfile.delete();\n\t\t\t\t}\n\t\t\t\tcatch (Exception e1) {\n\t\t\t\t\te1.printStackTrace();}\t\t\t\t}\n\t\t}\n\t}",
"public String createCommandLine(IngresVectorwiseLoaderMeta meta) throws KettleException\n {\n StringBuffer sb = new StringBuffer(300);\n \n if ( !Const.isEmpty(meta.getSqlPath()) )\n {\n try\n {\n FileObject fileObject = KettleVFS.getFileObject(environmentSubstitute(meta.getSqlPath()), getTransMeta());\n String sqlexec = Const.optionallyQuoteStringByOS(KettleVFS.getFilename(fileObject));\n sb.append(sqlexec);\n //sql @tc-dwh-test.timocom.net,tcp_ip,VW[ingres,pwd]::dwh\n }\n catch ( KettleFileException ex )\n {\n throw new KettleException(\"Error retrieving 'sql' command string\", ex);\n } \n }\n else\n {\n if(isDetailed()) logDetailed( \"sql defaults to system path\");\n sb.append(\"sql\");\n }\n\n DatabaseMeta dm = meta.getDatabaseMeta();\n if ( dm != null )\n {\n if(meta.isUseDynamicVNode()){\n //logical portname in JDBC use a 7\n String port = environmentSubstitute(Const.NVL(dm.getDatabasePortNumberString(), \"\")).replace(\"7\", \"\");\n String userName = environmentSubstitute(Const.NVL(dm.getDatabaseInterface().getUsername(), \"\"));\n String passWord = Encr.decryptPasswordOptionallyEncrypted(environmentSubstitute(Const.NVL(dm.getDatabaseInterface().getPassword(), \"\")));\n String hostName = environmentSubstitute(Const.NVL(dm.getDatabaseInterface().getHostname(), \"\"));\n String dnName = environmentSubstitute(Const.NVL(dm.getDatabaseName(), \"\"));\n \n sb.append(\" @\").append(hostName).append(\",\").append(port).append(\"[\").append(userName).append(\",\").append(passWord).append(\"]::\").append(dnName);\n }\n else{\n // Database Name\n // \n String dnName = environmentSubstitute(Const.NVL(dm.getDatabaseName(), \"\"));\n sb.append(\" \").append(dnName);\n }\n }\n else\n {\n throw new KettleException(\"No connection specified\");\n }\n\n return sb.toString(); \n }",
"String getPostDeclareSql();",
"public String build() {\n StringBuilder scriptBuilder = new StringBuilder();\n StringBuilder scriptBody = new StringBuilder();\n String importStmt = \"import \";\n \n try {\n if (scriptCode.contains(importStmt)) {\n BufferedReader reader = new BufferedReader(new StringReader(scriptCode));\n String line;\n while ((line = reader.readLine()) != null) {\n if (line.trim().startsWith(importStmt)) {\n scriptBuilder.append(line);\n scriptBuilder.append(\"\\n\");\n } else {\n scriptBody.append((scriptBody.length() == 0 ? \"\" : \"\\n\"));\n scriptBody.append(line);\n }\n }\n } else {\n scriptBody.append(scriptCode);\n }\n } catch (IOException e) {\n throw new CitrusRuntimeException(\"Failed to construct script from template\", e);\n }\n \n scriptBuilder.append(scriptHead);\n scriptBuilder.append(scriptBody.toString());\n scriptBuilder.append(scriptTail);\n \n return scriptBuilder.toString();\n }",
"@Override\n\tprotected String getCreateSql() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic String generate() {\r\n\t\tStringBuilder query = new StringBuilder();\r\n\r\n\t\tquery.append(\"INSERT INTO \").append(tableName).append(\" (\");\r\n\t\tfor (int i = 0; i < fieldNames.size(); i++) {\r\n\t\t\tquery.append(fieldNames.get(i));\r\n\t\t\tif (i < fieldNames.size() - 1) {\r\n\t\t\t\tquery.append(\", \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tquery.append(\") VALUES (\");\r\n\t\tfor (int i = 0; i < fieldValues.size(); i++) {\r\n\t\t\tquery.append(\"'\").append(fieldValues.get(i)).append(\"'\");\r\n\t\t\tif (i < fieldValues.size() - 1) {\r\n\t\t\t\tquery.append(\", \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tquery.append(\");\");\r\n\t\treturn query.toString();\r\n\t}",
"String getInitSql();",
"final public SqlStatement ScriptStatement() throws ParseException {SqlStatement st = null;\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USE:\n case CREATE:\n case DROP:\n case SET:\n case INSERT:\n case ALTER:\n case LOCK:\n case UNLOCK:\n case START:\n case COMMIT:\n case 117:{\n st = Statement();\n jj_consume_token(117);\n break;\n }\n case 0:{\n jj_consume_token(0);\n break;\n }\n default:\n jj_la1[1] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\nreturn st;\n}",
"private void runSqlFromFile(String fileName) throws IOException {\n String[] sqlStatements = StreamUtils.copyToString( new ClassPathResource(fileName).getInputStream(), Charset.defaultCharset()).split(\";\");\n for (String sqlStatement : sqlStatements) {\n sqlStatement = sqlStatement.replace(\"CREATE TABLE \", \"CREATE TABLE OLD\");\n sqlStatement = sqlStatement.replace(\"REFERENCES \", \"REFERENCES OLD\");\n sqlStatement = sqlStatement.replace(\"INSERT INTO \", \"INSERT INTO OLD\");\n jdbcTemplate.execute(sqlStatement);\n }\n }",
"protected String generateSQL() {\n String fields = generateFieldsJSON();\n return String.format(QUERY_PATTERN, fields, esQuery.generateQuerySQL(), from, size);\n }",
"private void exportToInsertSql() {\n\n if (destTableNameList.isEmpty()) {\n JOptionPane.showMessageDialog(this, \"No table is selected.\");\n return;\n }\n final StringBuilder sb = new StringBuilder();\n for (final String tableName : destTableNameList) {\n utils.executeQuerySql(\"SELECT * FROM \" + tableName + \" WHERE 1=2\", new DataMetaUtils.QueryAction<Object>() {\n @Override\n public Object callback(ResultSet rs) throws SQLException {\n StringBuilder tableTriggerSb = new StringBuilder();\n ResultSetMetaData metaData = rs.getMetaData();\n String auditTableName = tableName + \"_AL\";\n tableTriggerSb.append(\"CREATE TABLE \").append(auditTableName).append(\" (\\n\");\n\n for (int i = 0; i < metaData.getColumnCount(); i++) {\n tableTriggerSb.append(\" \");\n tableTriggerSb.append(metaData.getColumnName(i + 1));\n String typeName = metaData.getColumnTypeName(i + 1);\n tableTriggerSb.append(\" \")\n .append(typeName);\n if (metaData.getPrecision(i + 1) > 0) {\n tableTriggerSb.append(\"(\")\n .append(metaData.getPrecision(i + 1));\n if (metaData.getScale(i + 1) > 0) {\n tableTriggerSb.append(\",\")\n .append(metaData.getScale(i + 1));\n }\n tableTriggerSb.append(\")\");\n }\n\n tableTriggerSb.append(\",\\n\");\n\n }\n tableTriggerSb.append(\" ACT_TYPE CHAR(1),\\n\")\n .append(\" ACT_BY VARCHAR2(50),\\n\")\n .append(\" ACT_TIME DATE\\n\");\n tableTriggerSb.append(\");\\n\");\n\n\n //create trigger\n StringBuilder newInsert = new StringBuilder();\n StringBuilder delInsert = new StringBuilder();\n newInsert.append(\"INSERT INTO \").append(auditTableName).append(\"(\");\n delInsert.append(\"INSERT INTO \").append(auditTableName).append(\"(\");\n\n for (int i = 0; i < metaData.getColumnCount(); i++) {\n\n newInsert.append(metaData.getColumnName(i + 1));\n newInsert.append(\",\");\n delInsert.append(metaData.getColumnName(i + 1));\n delInsert.append(\",\");\n }\n newInsert.append(\"ACT_TYPE,\")\n .append(\"ACT_BY,\")\n .append(\"ACT_TIME) VALUES(\");\n delInsert.append(\"ACT_TYPE,\")\n .append(\"ACT_BY,\")\n .append(\"ACT_TIME) VALUES(\");\n\n for (int i = 0; i < metaData.getColumnCount(); i++) {\n\n newInsert.append(\":NEWROW.\").append(metaData.getColumnName(i + 1));\n newInsert.append(\",\");\n delInsert.append(\":OLDROW.\").append(metaData.getColumnName(i + 1));\n delInsert.append(\",\");\n }\n newInsert.append(\"v_actType,\")\n .append(\":NEWROW.UPDATED_BY,\")\n .append(\"sysdate);\\n\");\n delInsert.append(\"'D',\")\n .append(\"USER,\")\n .append(\"sysdate);\\n\");\n\n tableTriggerSb.append(\"CREATE OR REPLACE TRIGGER \")\n .append(\"TR_AL_\")\n .append(tableName)\n .append(\" \\n\")\n .append(\"AFTER INSERT OR DELETE OR UPDATE ON \")\n .append(tableName)\n .append(\" \\n\")\n .append(\"REFERENCING OLD AS \\\"OLDROW\\\" NEW AS \\\"NEWROW\\\" \\n\"\n + \"FOR EACH ROW \\n\"\n + \"ENABLE\\n\")\n .append(\"DECLARE\\n\")\n .append(\"v_actType char(1);\\n\")\n .append(\"BEGIN\\n\")\n .append(\"IF INSERTING OR UPDATING THEN \\n\"\n + \"BEGIN \\n\"\n + \"IF INSERTING THEN \\n v_actType := 'I'; \\nELSE\\n v_actType := 'U';\\n END IF;\\n\");\n tableTriggerSb.append(newInsert.toString());\n tableTriggerSb.append(\"END;\\n\"\n + \" ELSIF DELETING THEN \\n\"\n + \" BEGIN \\n\");\n\n tableTriggerSb.append(delInsert.toString());\n tableTriggerSb.append(\"END;\\n\"\n + \"END IF;\\n\"\n + \"END;\\n/\\n\");\n sb.append(tableTriggerSb.toString());\n\n return null;\n }\n });\n }\n\n SqlResultForm form = new SqlResultForm(null, true);\n form.setLocationRelativeTo(null);\n form.setSqlResult(sb.toString());\n form.setTestDsKey(((ValueName) cmbDs.getSelectedItem()).getValue());\n form.setVisible(true);\n\n }",
"Script createScript();",
"public static void main(String[] args) throws InterruptedException, FileNotFoundException, IOException {\n for (int i = 0; i < args.length; i++) {\n //System.out.println(args[i]);\n }\n RunSQL2 r = new RunSQL2();\n r.ReadCatalog(args[0]);\n String lines;\n String mainQuery = \"\";\n List<String> tokens = new ArrayList<String>();\n List<String> select = new ArrayList<String>();\n List<String> from = new ArrayList<String>();\n List<String> where = new ArrayList<String>();\n StringBuilder line = new StringBuilder();\n List<String> colName = new ArrayList<String>();\n List<String> ttable = new ArrayList<String>();\n String path = args[1];\n tt1 = new ArrayList<String>();\n tt2 = new ArrayList<String>();\n tt3 = new ArrayList<String>();\n tt4 = new ArrayList<String>();\n tt5 = new ArrayList<String>();\n String tname;\n int tCount = 0;\n int ttCount = 0;\n BufferedReader br = new BufferedReader(new FileReader(path));\n while ((lines = br.readLine()) != null) {\n line.append(lines + \" \");\n }\n if (line.lastIndexOf(\";\") > -1) {\n line.deleteCharAt(line.lastIndexOf(\";\"));\n }\n mainQuery = line.toString();\n StringTokenizer st = new StringTokenizer(line.toString(), \" \");\n while (st.hasMoreTokens()) {\n tokens.add(st.nextToken());\n }\n for (int i = 0; i < tokens.size(); i++) { // SELECTED ATTRIBUTES\n if (tokens.get(i).equalsIgnoreCase(\"select\")) {\n if (tokens.get(i + 1) != null) {\n int j = i;\n while (!tokens.get(j + 1).equalsIgnoreCase(\"from\")) {\n if (tokens.get(j + 1).substring(tokens.get(j + 1).length() - 1).equals(\",\")) {\n StringBuilder sb = new StringBuilder(tokens.get(j + 1));\n sb.deleteCharAt(tokens.get(j + 1).length() - 1);\n select.add(sb.toString());\n } else {\n select.add(tokens.get(j + 1));\n }\n j++;\n }\n }\n }\n if (tokens.get(i).equalsIgnoreCase(\"from\")) {\n // TODO: SQL TABLE FROM CLAUSE FORMAT [TABLE S], OR [TABLE]\n if (tokens.get(i + 2) != null) {\n int j = i;\n while (!tokens.get(j + 2).equalsIgnoreCase(\"where\")) {\n //TODO QUERY ERROR IF NO WHERE CLAUSE\n //System.out.println(j);\n //System.out.println(tokens.get(j).toString());\n if (tokens.get(j + 1).substring(tokens.get(j + 1).length() - 1).equals(\",\")) {\n StringBuilder sb = new StringBuilder(tokens.get(j + 1));\n sb.deleteCharAt(tokens.get(j + 1).length() - 1);\n from.add(sb.toString());\n } else {\n from.add(tokens.get(j + 1));\n }\n if (j > tokens.size() - 1) {\n break;\n }\n j++;\n }\n }\n }\n }\n\n try {\n String query = \"\";\n List<String> columnNames = new ArrayList<String>();\n Class.forName(driver).newInstance();\n Connection conn;\n Statement stmt = null;\n conn = DriverManager.getConnection(connUrl + \"?verifyServerCertificate=false&useSSL=true\", connUser, connPwd);\n br = new BufferedReader(new FileReader(path));\n query = \"SELECT * FROM DTABLES\";\n PreparedStatement statement = conn\n .prepareStatement(query);\n ResultSet rs = statement.executeQuery();\n while (rs.next()) {\n if (rs.getString(\"TNAME\") != null) {\n tname = rs.getString(\"TNAME\").replaceAll(\"\\\\s+\", \"\");\n if (tname.equalsIgnoreCase(from.get(0))) {\n // TODO: MIGHT NEED TO CHANGE IT FOR DYNAMIC LOAD\n t1.add(tname);\n t2.add(rs.getString(\"NODEDRIVER\").replaceAll(\"\\\\s+\", \"\"));\n t3.add(rs.getString(\"NODEURL\").replaceAll(\"\\\\s+\", \"\"));\n t4.add(rs.getString(\"NODEUSER\").replaceAll(\"\\\\s+\", \"\"));\n t5.add(rs.getString(\"NODEPASSWD\").replaceAll(\"\\\\s+\", \"\"));\n tCount++;\n }\n if (tname.equalsIgnoreCase(from.get(2))) {\n // TODO: MIGHT NEED TO CHANGE IT FOR DYNAMIC LOAD\n tt1.add(tname);\n tt2.add(rs.getString(\"NODEDRIVER\").replaceAll(\"\\\\s+\", \"\"));\n tt3.add(rs.getString(\"NODEURL\").replaceAll(\"\\\\s+\", \"\"));\n tt4.add(rs.getString(\"NODEUSER\").replaceAll(\"\\\\s+\", \"\"));\n tt5.add(rs.getString(\"NODEPASSWD\").replaceAll(\"\\\\s+\", \"\"));\n ttCount++;\n }\n }\n }\n conn.close();\n\n // GET ATTRIBUTES FROM THE FIRST TABLE IN ORDER TO CREATE TEMP TABLE\n Class.forName(t2.get(0)).newInstance();\n conn = DriverManager.getConnection(t3.get(0) + \"?verifyServerCertificate=false&useSSL=true\", t4.get(0), t5.get(0));\n query = \"SELECT * FROM \" + t1.get(0);\n //System.out.println(query);\n statement = conn\n .prepareStatement(query);\n rs = statement.executeQuery();\n ResultSetMetaData rsmd = rs.getMetaData();\n int columnCount = rsmd.getColumnCount();\n StringBuilder sb = new StringBuilder();\n StringBuilder sb1 = new StringBuilder();\n String name;\n String export;\n String tempQuery = \"\";\n // if it is the first node, create temp table\n for (int i = 1; i <= columnCount; i++) {\n colName.add(rsmd.getColumnName(i));\n name = rsmd.getColumnName(i);\n sb1.append(name + \", \");\n if (rsmd.getColumnType(i) == Types.INTEGER) {\n sb.append(name + \" INT, \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb.append(name + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.CHAR) {\n sb.append(name + \" CHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb.append(name + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.DATE) {\n sb.append(name + \" DATE, \");\n } else if (rsmd.getColumnType(i) == Types.DECIMAL) {\n sb.append(name + \" DECIMAL (15, 2), \");\n }\n }\n sb1.setLength(sb1.length() - 2);\n sb.setLength(sb.length() - 2);\n tempQuery = sb.toString();\n export = sb1.toString();\n\n //System.out.println(sb.toString());\n conn.close();\n\n Class.forName(tt2.get(0)).newInstance();\n conn = DriverManager.getConnection(tt3.get(0) + \"?verifyServerCertificate=false&useSSL=true\", tt4.get(0), tt5.get(0));\n query = \"SELECT * FROM \" + tt1.get(0);\n //System.out.println(query);\n statement = conn\n .prepareStatement(query);\n rs = statement.executeQuery();\n rsmd = rs.getMetaData();\n columnCount = rsmd.getColumnCount();\n StringBuilder sb2 = new StringBuilder();\n StringBuilder sb3 = new StringBuilder();\n String name1;\n String export1;\n String tempQuery1 = \"\";\n // if it is the first node, create temp table\n for (int i = 1; i <= columnCount; i++) {\n colName.add(rsmd.getColumnName(i));\n name1 = rsmd.getColumnName(i);\n sb3.append(name1 + \", \");\n if (rsmd.getColumnType(i) == Types.INTEGER) {\n sb2.append(name1 + \" INT, \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb2.append(name1 + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.CHAR) {\n sb2.append(name1 + \" CHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb2.append(name1 + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.DATE) {\n sb2.append(name1 + \" DATE, \");\n } else if (rsmd.getColumnType(i) == Types.DECIMAL) {\n sb2.append(name1 + \" DECIMAL (15, 2), \");\n }\n }\n sb3.setLength(sb3.length() - 2);\n sb2.setLength(sb2.length() - 2);\n tempQuery1 = sb2.toString();\n export1 = sb3.toString();\n //System.out.println(tempQuery1);\n\n //System.out.println(sb.toString());\n conn.close();\n\n // FOR TESTING\n for (int x = 0; x < tt1.size(); x++) {\n //System.out.println(tt1.get(x));\n }\n\n // MAIN\n // CREATE TEMP TABLE FIRST AND JOIN TABLES\n // NOTE: CLOSING CONNECTION WILL DELETE TEMP TABLE\n Class.forName(localdriver).newInstance();\n // NEW CONNECTION (DO NOT USE CONN OR ELSE TEMP TABLE MIGHT DROP)\n final Connection iconn = DriverManager.getConnection(localconnUrl + \"?verifyServerCertificate=false&useSSL=true\", localconnUser, localconnPwd);\n query = \"CREATE TEMPORARY TABLE \" + t1.get(0) + \" (\" + tempQuery + \")\"; // TEMP TABLE FOR TABLE 1\n //System.out.println(query);\n stmt = iconn.createStatement();\n stmt.executeUpdate(query);\n\n query = \"CREATE TEMPORARY TABLE \" + tt1.get(0) + \" (\" + tempQuery1 + \")\"; // TEMP TABLE FOR TABLE 2\n //System.out.println(query);\n stmt = iconn.createStatement();\n stmt.executeUpdate(query);\n\n Thread thread1[] = new Thread[tCount];\n Thread thread2[] = new Thread[ttCount];\n\n for (int z = 0; z < tCount; z++) {\n final int c = z;\n final String d = export;\n // EXPORT ALL DATA TO TEMP TABLE\n thread1[z] = new Thread(new Runnable() {\n @Override\n public void run() {\n //System.out.println(\"Working on \" + Thread.currentThread());\n try {\n // EXPORT CONNECTION \n //System.out.println(t3.get(c));\n Class.forName(t2.get(c)).newInstance();\n Connection conn1 = DriverManager.getConnection(t3.get(c) + \"?verifyServerCertificate=false&useSSL=true\", t4.get(c), t5.get(c));\n //System.out.println(t1.get(c));\n // GETTING DATA FROM TABLE 1\n String exportQuery = \"SELECT * FROM \" + t1.get(c);\n PreparedStatement statement1 = conn1.prepareStatement(exportQuery);\n ResultSet rs = statement1.executeQuery();\n ResultSetMetaData rsmd = rs.getMetaData();\n List<String> columnNames = new ArrayList<String>();\n Object temp = null;\n int columnCount = rsmd.getColumnCount();\n for (int i = 1; i <= columnCount; i++) {\n columnNames.add(rsmd.getColumnName(i));\n }\n //System.out.println(sb.toString());\n while (rs.next()) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"INSERT INTO \" + t1.get(0) + \" (\" + d + \") VALUES (\");\n for (int k = 0; k < columnCount; k++) {\n if (rsmd.getColumnType(k + 1) == Types.INTEGER) {\n temp = rs.getInt(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.VARCHAR || rsmd.getColumnType(k + 1) == Types.CHAR) {\n temp = rs.getString(k + 1);\n sb.append(\"'\" + temp + \"', \");\n } else if (rsmd.getColumnType(k + 1) == Types.DECIMAL) {\n temp = rs.getFloat(k + 1);\n //System.out.println(\"temp \" + temp);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.BOOLEAN) {\n temp = rs.getBoolean(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.DATE) {\n temp = rs.getDate(k + 1);\n sb.append(\"'\" + temp + \"', \");\n }\n //sb.append(temp + \", \");\n }\n sb.setLength(sb.length() - 2);\n sb.append(\");\");\n //System.out.println(sb.toString());\n String query2 = sb.toString();\n //System.out.println(query2);\n // NEED TO PERFORM A QUERY FOR EACH ROW\n PreparedStatement pstmt;\n pstmt = iconn.prepareStatement(query2);\n pstmt.executeUpdate();\n\n }\n \n } catch (ClassNotFoundException | IllegalAccessException | InstantiationException | SQLException e) {\n System.err.println(e);\n } finally {\n //System.out.println();\n }\n\n }\n });\n thread1[z].start();\n }\n\n // CREATE TEMP TABLE FOR SECOND TABLE\n for (int i = 0; i < ttCount; i++) {\n final int c = i;\n thread2[i] = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n //System.out.println(\"Working on \" + Thread.currentThread());\n // THIS PART WILL INSERT TABLE 2 DATA TO A NODE\n //if (tt3.get(c).compareToIgnoreCase(localconnUrl) != 0) {\n //System.out.println(tt3.get(c));\n //System.out.println(localconnUrl);\n Class.forName(tt2.get(c)).newInstance();\n Connection conn1 = DriverManager.getConnection(tt3.get(c) + \"?verifyServerCertificate=false&useSSL=true\", tt4.get(c), tt5.get(c));\n String exportQuery = \"SELECT * FROM \" + tt1.get(c);\n PreparedStatement statement1 = conn1.prepareStatement(exportQuery);\n ResultSet rs = statement1.executeQuery();\n ResultSetMetaData rsmd = rs.getMetaData();\n List<String> columnNames = new ArrayList<String>();\n Object temp = null;\n String name = null;\n int columnCount = rsmd.getColumnCount();\n StringBuilder sb1 = new StringBuilder();\n for (int i = 1; i <= columnCount; i++) {\n //System.out.println(rsmd.getColumnName(i));\n columnNames.add(rsmd.getColumnName(i));\n sb1.append(rsmd.getColumnName(i) + \", \");\n }\n sb1.setLength(sb1.length() - 2);\n name = sb1.toString();\n while (rs.next()) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"INSERT INTO \" + tt1.get(0) + \" (\" + name + \") VALUES (\");\n for (int k = 0; k < columnCount; k++) {\n if (rsmd.getColumnType(k + 1) == Types.INTEGER) {\n temp = rs.getInt(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.VARCHAR || rsmd.getColumnType(k + 1) == Types.CHAR) {\n temp = rs.getString(k + 1);\n sb.append(\"'\" + temp + \"', \");\n } else if (rsmd.getColumnType(k + 1) == Types.DECIMAL) {\n temp = rs.getDouble(k + 1);\n sb.append(\"'\" + temp + \"', \");\n } else if (rsmd.getColumnType(k + 1) == Types.BOOLEAN) {\n temp = rs.getBoolean(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.DATE) {\n temp = rs.getDate(k + 1);\n sb.append(\"'\" + temp + \"', \");\n }\n //sb.append(temp + \", \");\n }\n sb.setLength(sb.length() - 2);\n sb.append(\");\");\n String query2 = sb.toString();\n //System.out.println(query2);\n\n // NEED TO PERFORM A QUERY FOR EACH ROW\n PreparedStatement pstmt;\n pstmt = iconn.prepareStatement(query2);\n pstmt.executeUpdate();\n }\n //}\n\n } catch (Exception e) {\n System.err.println(e);\n } finally {\n //System.out.println(\"Done with \" + Thread.currentThread());\n }\n }\n });\n thread2[i].start();\n }\n\n //System.out.println(mainQuery);\n for (int z = 0; z < tCount; z++) {\n thread1[z].join();\n }\n\n for (int z = 0; z < ttCount; z++) {\n thread2[z].join();\n }\n\n // JOIN SQL PERFORMS HERE\n //System.out.println(mainQuery);\n statement = iconn\n .prepareStatement(mainQuery);\n rs = statement.executeQuery();\n rsmd = rs.getMetaData();\n Object temp;\n String output;\n columnCount = rsmd.getColumnCount();\n double temp1;\n while (rs.next()) {\n StringBuilder sbb = new StringBuilder();\n for (int k = 0; k < columnCount; k++) {\n if (rsmd.getColumnType(k + 1) == Types.INTEGER || rsmd.getColumnType(k + 1) == Types.BIGINT) {\n temp = rs.getInt(k + 1);\n sbb.append(temp + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.VARCHAR || rsmd.getColumnType(k + 1) == Types.CHAR) {\n temp = rs.getString(k + 1);\n sbb.append(temp + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.FLOAT || rsmd.getColumnType(k + 1) == Types.DECIMAL) {\n temp1 = rs.getDouble(k + 1);\n sbb.append(temp1 + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.BOOLEAN) {\n temp = rs.getBoolean(k + 1);\n sbb.append(temp + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.DATE) {\n temp = rs.getDate(k + 1);\n sbb.append(temp + \" | \");\n } else {\n temp = rs.getString(k + 1);\n sbb.append(temp + \" | \");\n }\n }\n sbb.setLength(sbb.length() - 1);\n output = sbb.toString();\n System.out.println(output);\n }\n\n conn.close();\n iconn.close();\n } catch (IOException | ClassNotFoundException | IllegalAccessException | InstantiationException | SQLException e) {\n System.err.println(e);\n }\n }",
"String toSql();",
"public void makeSQLSinonimos(String insertStament, boolean[] isString, String patho, String nameFile, int columnaActive, HashSet<String> listaDrogasID, HashSet<String> listaDrogasIDTermino){ \n\t\tFile[] listOfFiles = new File(patho).listFiles();\n\t\tint i=0;\n\t\twhile ( i<listOfFiles.length && !listOfFiles[i].toString().contains(nameFile) )\n\t\t\ti++;\n\n\t\t// Si encontre el archivo creo la tabla, genero un scrip de insertar, lo ejecuto desde la consola y lo borro e inserto los datos\n\t\tif (i<listOfFiles.length){\n\n\n\t\t\tif (managerDB.createExecutorFile(\"C:\\\\\", \"prueba\")){\n\t\t\t\tParserSNOMED.fileToSqlScriptSinonimos(patho,listOfFiles[i].getName().toString(),insertStament, columnaActive, listaDrogasID, listaDrogasIDTermino);\n\t\t\t\tSystem.out.println(patho + listOfFiles[i].getName().toString());\n\t\t\t\ttry{\n\t\t\t\t\tThread.sleep(1000); \n\n\t\t\t\t\tRuntime.getRuntime().exec(\"cmd /c start C:\\\\prueba.bat\");\n\t\t\t\t\tmanagerDB.waitUntisFinishConsole(\"C://\",\"done.prov\" );\n\n\t\t\t\t\t// Borro todos los archivos luego de que termine el script\n\t\t\t\t\tFile file = new File(\"C:\\\\done.prov\"); \tfile.delete();\n\t\t\t\t\t//\t\t\tfile = new File(\"C:\\\\auxFile.sql\"); \tfile.delete();\n\t\t\t\t\tfile = new File(\"C:\\\\prueba.bat\");\t\tfile.delete();\n\t\t\t\t}\n\t\t\t\tcatch (Exception e1) {\n\t\t\t\t\te1.printStackTrace();}\t\t\t\t}\n\t\t}\n\t}",
"Statement createStatement();",
"Statement createStatement();",
"Statement createStatement();",
"@Override\n\tpublic String createTable() {\n\t\t\t\treturn \"CREATE TABLE history_table_view(id number(8) primary key not null ,sqltext text, pointid varchar2(1024), type varchar2(100))\";\n\t}",
"private void constructExecuteSql() {\n getMetaData();\n // Validate that the primary keys are present in the underlying SQL\n StringBuilder orderBySql = new StringBuilder(super.getExecuteSql()).append(\"\\n order by \");\n switch (metaData.getDbType()) {\n case ORACLE:\n orderBySql.append(createOracleOrderedByClause ());\n break;\n case SQL_SERVER:\n orderBySql.append(createSqlServerOrderedByClause());\n break;\n case UNKNOWN:\n default:\n orderBySql.append(createUnknownDBOrderedByClause());\n }\n this.executeSql = orderBySql.toString();\n }",
"private StringBuilder startBuild() {\n StringBuilder strBuilder = new StringBuilder()\n .append(\"CREATE EXTERNAL TABLE IF NOT EXISTS \");\n if (databaseName != null) {\n strBuilder.append(databaseName).append('.');\n }\n strBuilder.append(tableName);\n\n // yeah... schema is not always required.\n if (hiveSchema != null) {\n strBuilder.append(\" \").append(hiveSchema);\n }\n\n if (tableComment != null && !tableComment.isEmpty()) {\n strBuilder.append(\" COMMENT '\")\n .append(tableComment)\n .append(\"'\");\n }\n\n if (partitioning != null && !partitioning.getFields().isEmpty()) {\n strBuilder.append(\" PARTITIONED BY (\");\n for (Map.Entry<String, Partitioning.FieldType> entry : partitioning.getFields().entrySet()) {\n strBuilder = shouldEscapeColumns ?\n strBuilder.append('`').append(entry.getKey()).append('`') : strBuilder.append(entry.getKey());\n strBuilder.append(\" \")\n .append(FieldTypes.toHiveType(entry.getValue()))\n .append(\", \");\n }\n // remove trailing \", \"\n strBuilder.deleteCharAt(strBuilder.length() - 1)\n .deleteCharAt(strBuilder.length() - 1)\n .append(\")\");\n }\n\n if (rowFormat != null) {\n strBuilder.append(\" ROW FORMAT \").append(rowFormat);\n }\n return strBuilder;\n }",
"public abstract String toSQL();",
"public abstract String[] createTablesStatementStrings();",
"private static SqlScalars generateSqlForPerson(OptionsId options) {\n SqlScalars sqlScalars = new SqlScalars();\n // Make sure to set the alias for the files for the Transformation into the class\n sqlScalars.addToSql(\"SELECT DISTINCT p.id,p.name,\");\n sqlScalars.addToSql(\"p.first_name AS firstName,\");\n sqlScalars.addToSql(\"p.last_name AS lastName,\");\n sqlScalars.addToSql(\"p.birth_day AS birthDay,\");\n sqlScalars.addToSql(\"p.birth_place AS birthPlace,\");\n sqlScalars.addToSql(\"p.birth_name AS birthName,\");\n sqlScalars.addToSql(\"p.death_day AS deathDay,\");\n sqlScalars.addToSql(\"p.death_place AS deathPlace\");\n sqlScalars.addToSql(DataItemTools.addSqlDataItems(options.splitDataItems(), \"p\").toString());\n sqlScalars.addToSql(\"FROM person p\");\n\n if (options.getId() > 0L) {\n sqlScalars.addToSql(\"WHERE p.status\" + SQL_IGNORE_STATUS_SET);\n sqlScalars.addToSql(\"AND id=:id\");\n sqlScalars.addParameter(LITERAL_ID, options.getId());\n } else {\n if (MapUtils.isNotEmpty(options.splitJobs())) {\n sqlScalars.addToSql(\", cast_crew c\");\n }\n sqlScalars.addToSql(\"WHERE p.status\" + SQL_IGNORE_STATUS_SET);\n\n if (MapUtils.isNotEmpty(options.splitJobs())) {\n sqlScalars.addToSql(\"AND p.id=c.person_id\");\n sqlScalars.addToSql(\"AND c.job IN (:jobs)\");\n sqlScalars.addParameter(\"jobs\", options.getJobTypes());\n }\n\n // Add the search string\n sqlScalars.addToSql(options.getSearchString(false));\n // This will default to blank if there's no sort required\n sqlScalars.addToSql(options.getSortString());\n }\n\n sqlScalars.addScalar(LITERAL_ID, LongType.INSTANCE);\n sqlScalars.addScalar(LITERAL_NAME, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_FIRST_NAME, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_LAST_NAME, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_BIRTH_DAY, DateType.INSTANCE);\n sqlScalars.addScalar(LITERAL_BIRTH_PLACE, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_BIRTH_NAME, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_DEATH_DAY, DateType.INSTANCE);\n sqlScalars.addScalar(LITERAL_DEATH_PLACE, StringType.INSTANCE);\n\n // add Scalars for additional data item columns\n DataItemTools.addDataItemScalars(sqlScalars, options.splitDataItems());\n\n return sqlScalars;\n }",
"private void printSQLCommands(ArrayList<Map> fieldValues, ArrayList<Map> fieldAttribs, String tableName,\n String fileName){\n ArrayList<String> commands = new ArrayList<String>();\n for(Map record : fieldValues){\n String command = \"INSERT INTO \" + tableName + \" ( \";\n for(Map attrib : fieldAttribs){\n command += attrib.get(\"name\").toString() + \", \";\n }\n command = command.substring(0,command.length()-2);\n command += \" ) VALUES ( \";\n for(Map attrib : fieldAttribs){\n String column = attrib.get(\"name\").toString();\n String value = record.get(column).toString();\n if(attrib.get(\"type\").equals(\"string\")){\n command += \"\\\"\" + value + \"\\\", \";\n }else {\n command += value + \", \";\n }\n }\n command = command.substring(0,command.length()-2);\n command += \" );\";\n commands.add(command);\n }\n String currentDatabasePath = this.findCurrentDBPath();\n File file = new File(currentDatabasePath + \"/\" + fileName);\n try {\n if(!file.exists()) {\n boolean flag = file.createNewFile();\n if(flag) { System.out.println(fileName + \" created!\"); }\n else { System.out.println(\"***Error- \" + fileName + \" can not be created!\"); }\n }\n PrintWriter tableWriter = new PrintWriter(new FileWriter(file, true));\n for (String query : commands) {\n tableWriter.append(query).append(\"\\n\");\n }\n tableWriter.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public PreparedSql generatePreparedSql(String prefix);",
"private String getStringToCreateDB(String addings) {\n StringBuffer createDBStringBuffer = new StringBuffer();\n createDBStringBuffer\n .append(SQLFormater.CREATE_TABLE)\n .append(\" \")\n .append(tableName)\n .append(\"(\")\n .append(idFieldName)\n .append(\" \")\n .append(DBCreator.INTEGER_TYPE)\n .append(\" \")\n .append(SQLFormater.PRIMARY_KEY);\n mapFieldsTypes.forEach((kField, vType) -> { // add all table's fields\n createDBStringBuffer\n .append(\", \")\n .append(kField)\n .append(\" \")\n .append(vType);\n if(mapFieldsConstraints.containsKey(kField)) { // add constraint for a field\n createDBStringBuffer\n .append(\" \")\n .append(mapFieldsConstraints.get(kField));\n }\n });\n if (addings != null && !addings.isEmpty()) { // add reference\n createDBStringBuffer\n .append(\", \")\n .append(addings);\n }\n createDBStringBuffer.append(\")\");\n return createDBStringBuffer.toString();\n }",
"public RelNode genScriptPlan(\n HiveParserASTNode trfm, HiveParserQB qb, List<RexNode> operands, RelNode input)\n throws SemanticException {\n boolean isAllRexRef = operands.stream().allMatch(node -> node instanceof RexInputRef);\n int[] transformFieldIndices;\n if (!isAllRexRef) {\n input =\n LogicalProject.create(\n input, Collections.emptyList(), operands, (List<String>) null);\n transformFieldIndices = IntStream.range(0, operands.size()).toArray();\n HiveParserRowResolver rowResolver = new HiveParserRowResolver();\n // record the column info for the project node\n for (int i = 0; i < operands.size(); i++) {\n ColumnInfo oColInfo =\n new ColumnInfo(\n getColumnInternalName(i),\n HiveParserTypeConverter.convert(operands.get(i).getType()),\n null,\n false);\n rowResolver.put(null, getColumnInternalName(i), oColInfo);\n }\n relToRowResolver.put(input, rowResolver);\n } else {\n transformFieldIndices =\n operands.stream()\n .flatMapToInt(node -> IntStream.of(((RexInputRef) node).getIndex()))\n .toArray();\n }\n\n ArrayList<ColumnInfo> inputSchema = relToRowResolver.get(input).getColumnInfos();\n\n // If there is no \"AS\" clause, the output schema will be \"key,value\"\n ArrayList<ColumnInfo> outputCols = new ArrayList<>();\n int inputSerDeNum = 1, inputRecordWriterNum = 2;\n int outputSerDeNum = 4, outputRecordReaderNum = 5;\n int outputColsNum = 6;\n boolean outputColNames = false, outputColSchemas = false;\n int execPos = 3;\n boolean defaultOutputCols = false;\n\n // Go over all the children\n if (trfm.getChildCount() > outputColsNum) {\n HiveParserASTNode outCols = (HiveParserASTNode) trfm.getChild(outputColsNum);\n if (outCols.getType() == HiveASTParser.TOK_ALIASLIST) {\n outputColNames = true;\n } else if (outCols.getType() == HiveASTParser.TOK_TABCOLLIST) {\n outputColSchemas = true;\n }\n }\n\n // If column type is not specified, use a string\n if (!outputColNames && !outputColSchemas) {\n // output schema will be \"key, value\"\n String[] outputAlias = new String[] {\"key\", \"value\"};\n for (int i = 0; i < outputAlias.length; i++) {\n String intName = getColumnInternalName(i);\n ColumnInfo colInfo =\n new ColumnInfo(intName, TypeInfoFactory.stringTypeInfo, null, false);\n colInfo.setAlias(outputAlias[i]);\n outputCols.add(colInfo);\n }\n defaultOutputCols = true;\n } else {\n // column name or type is specified\n HiveParserASTNode collist = (HiveParserASTNode) trfm.getChild(outputColsNum);\n int ccount = collist.getChildCount();\n Set<String> colAliasNamesDuplicateCheck = new HashSet<>();\n for (int i = 0; i < ccount; i++) {\n ColumnInfo colInfo =\n getColumnInfoInScriptTransform(\n (HiveParserASTNode) collist.getChild(i),\n outputColSchemas,\n i,\n colAliasNamesDuplicateCheck);\n outputCols.add(colInfo);\n }\n }\n\n // input schema info\n StringBuilder inpColumns = new StringBuilder();\n StringBuilder inpColumnTypes = new StringBuilder();\n for (int i = 0; i < transformFieldIndices.length; i++) {\n if (i != 0) {\n inpColumns.append(\",\");\n inpColumnTypes.append(\",\");\n }\n inpColumns.append(inputSchema.get(transformFieldIndices[i]).getInternalName());\n inpColumnTypes.append(\n inputSchema.get(transformFieldIndices[i]).getType().getTypeName());\n }\n\n // output schema info\n StringBuilder outColumns = new StringBuilder();\n StringBuilder outColumnTypes = new StringBuilder();\n List<RelDataType> outDataTypes = new ArrayList<>();\n List<String> outColNames = new ArrayList<>();\n HiveParserRowResolver scriptRR = new HiveParserRowResolver();\n RelDataTypeFactory dtFactory = cluster.getRexBuilder().getTypeFactory();\n for (int i = 0; i < outputCols.size(); i++) {\n if (i != 0) {\n outColumns.append(\",\");\n outColumnTypes.append(\",\");\n }\n\n outColumns.append(outputCols.get(i).getInternalName());\n outColumnTypes.append(outputCols.get(i).getType().getTypeName());\n\n scriptRR.put(\n qb.getParseInfo().getAlias(), outputCols.get(i).getAlias(), outputCols.get(i));\n\n outDataTypes.add(HiveParserUtils.toRelDataType(outputCols.get(i).getType(), dtFactory));\n outColNames.add(outputCols.get(i).getInternalName());\n }\n\n String serdeName = LazySimpleSerDe.class.getName();\n int fieldSeparator = Utilities.tabCode;\n if (HiveConf.getBoolVar(hiveConf, HiveConf.ConfVars.HIVESCRIPTESCAPE)) {\n fieldSeparator = Utilities.ctrlaCode;\n }\n\n // Input and Output Serdes\n HiveParserBaseSemanticAnalyzer.SerDeClassProps inSerDeClassProps;\n if (trfm.getChild(inputSerDeNum).getChildCount() > 0) {\n // use user specified serialize class and properties\n HiveParserASTNode inputSerDeNode = (HiveParserASTNode) trfm.getChild(inputSerDeNum);\n inSerDeClassProps =\n HiveParserBaseSemanticAnalyzer.SerDeClassProps.analyzeSerDeInfo(\n (HiveParserASTNode) inputSerDeNode.getChild(0),\n inpColumns.toString(),\n inpColumnTypes.toString(),\n false);\n } else {\n // use default serialize class and properties\n Map<String, String> inSerdeProps =\n HiveParserBaseSemanticAnalyzer.SerDeClassProps.getDefaultSerDeProps(\n serdeName,\n String.valueOf(fieldSeparator),\n inpColumns.toString(),\n inpColumnTypes.toString(),\n false,\n true);\n inSerDeClassProps =\n new HiveParserBaseSemanticAnalyzer.SerDeClassProps(serdeName, inSerdeProps);\n }\n HiveParserBaseSemanticAnalyzer.SerDeClassProps outSerDeClassProps;\n if (trfm.getChild(outputSerDeNum).getChildCount() > 0) {\n // use user specified deserialize class and properties\n HiveParserASTNode outSerDeNode = (HiveParserASTNode) trfm.getChild(outputSerDeNum);\n outSerDeClassProps =\n HiveParserBaseSemanticAnalyzer.SerDeClassProps.analyzeSerDeInfo(\n (HiveParserASTNode) outSerDeNode.getChild(0),\n outColumns.toString(),\n outColumnTypes.toString(),\n false);\n } else {\n // use default deserialize class and properties\n Map<String, String> outSerdeProps =\n HiveParserBaseSemanticAnalyzer.SerDeClassProps.getDefaultSerDeProps(\n serdeName,\n String.valueOf(fieldSeparator),\n outColumns.toString(),\n outColumnTypes.toString(),\n defaultOutputCols,\n true);\n outSerDeClassProps =\n new HiveParserBaseSemanticAnalyzer.SerDeClassProps(serdeName, outSerdeProps);\n }\n\n // script input record writer\n Tree recordWriterASTNode = trfm.getChild(inputRecordWriterNum);\n String inRecordWriter =\n recordWriterASTNode.getChildCount() == 0\n ? TextRecordWriter.class.getName()\n : unescapeSQLString(recordWriterASTNode.getChild(0).getText());\n\n // script output record readers\n Tree recordReaderASTNode = trfm.getChild(outputRecordReaderNum);\n String outRecordReader =\n recordReaderASTNode.getChildCount() == 0\n ? TextRecordReader.class.getName()\n : unescapeSQLString(recordReaderASTNode.getChild(0).getText());\n\n RelDataType rowDataType = dtFactory.createStructType(outDataTypes, outColNames);\n\n String script = unescapeSQLString(trfm.getChild(execPos).getText());\n\n ScriptTransformIOInfo inputOutSchema =\n new ScriptTransformIOInfo(\n inSerDeClassProps.getSerdeClassName(),\n inSerDeClassProps.getProperties(),\n outSerDeClassProps.getSerdeClassName(),\n outSerDeClassProps.getProperties(),\n inRecordWriter,\n outRecordReader,\n new JobConfWrapper(new JobConf(hiveConf)));\n\n LogicalScriptTransform scriptTransform =\n LogicalScriptTransform.create(\n input, transformFieldIndices, script, inputOutSchema, rowDataType);\n\n relToHiveColNameCalcitePosMap.put(scriptTransform, buildHiveToCalciteColumnMap(scriptRR));\n relToRowResolver.put(scriptTransform, scriptRR);\n\n // todo\n // Add URI entity for transform script. script assumed t be local unless downloadable\n return scriptTransform;\n }",
"private String getCloneSetTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CLONE_SET(\");\n \t\tbuilder.append(\"CLONE_SET_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"OWNER_REVISION_ID LONG,\");\n \t\tbuilder.append(\"ELEMENTS TEXT NOT NULL,\");\n \t\tbuilder.append(\"NUMBER_OF_ELEMENTS INTEGER\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}",
"public void createDBSchema() throws NoConnectionToDBException, SQLException, IOException {\n \n InputStream in = EDACCApp.class.getClassLoader().getResourceAsStream(\"edacc/resources/edacc.sql\");\n if (in == null) {\n throw new SQLQueryFileNotFoundException();\n }\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n String line;\n String text = \"\";\n String l;\n while ((line = br.readLine()) != null) {\n if (!(l = line.replaceAll(\"\\\\s\", \"\")).isEmpty() && !l.startsWith(\"--\")) {\n text += line + \" \";\n }\n }\n in.close();\n Vector<String> queries = new Vector<String>();\n String query = \"\";\n String delimiter = \";\";\n int i = 0;\n while (i < text.length()) {\n if (text.toLowerCase().startsWith(\"delimiter\", i)) {\n i += 10;\n delimiter = text.substring(i, text.indexOf(' ', i));\n i = text.indexOf(' ', i);\n } else if (text.startsWith(delimiter, i)) {\n queries.add(query);\n i += delimiter.length();\n query = \"\";\n } else {\n query += text.charAt(i);\n i++;\n }\n }\n if (!query.replaceAll(\" \", \"\").equals(\"\")) {\n queries.add(query);\n }\n boolean autoCommit = getConn().getAutoCommit();\n try {\n getConn().setAutoCommit(false);\n Statement st = getConn().createStatement();\n for (String q : queries) {\n st.execute(q);\n }\n st.close();\n getConn().commit();\n } catch (SQLException e) {\n getConn().rollback();\n throw e;\n } finally {\n getConn().setAutoCommit(autoCommit);\n }\n }",
"String getCreateTableSql(String name, DataSet dataSet, boolean isTemporary,\r\n String key, FieldsRepository fieldsRepository);",
"public void createDB() {\n\t\ttry {\n\t\t\tBufferedReader br= new BufferedReader(new FileReader(\"db_schema.txt\"));\n\t\t\tString line= null;\n\t\t\tStringBuilder sb= new StringBuilder();\n\t\t\twhile ((line=br.readLine())!=null){\n\t\t\t\tsb.append(line);\n\t\t\t\tif(sb.length()>0 && sb.charAt(sb.length()-1)==';'){//see if it is the end of one line of command\n\t\t\t\t\tstatement.executeUpdate(sb.toString());\n\t\t\t\t\tsb= new StringBuilder();\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public String generateSQL(String database) {\n//\t\tString sql = \"select requesttext from dbc.tables order by createtimestamp\";\n\t\tString sql = CommonConfig.sqlQueryDDL(database);;\n//\t\tif (database!=null && !database.equals(\"\")) {\n//\t\t\tsql = \"select requesttext from dbc.tables where databasename='\"+database+\"' order by createtimestamp\";\n//\t\t}\n \t\treturn sql;\n \t}",
"@Override\r\n\tpublic String execute(String script) {\n\t\treturn script+\"sb\";\r\n\t}",
"private String getFileTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table FILE(\");\n \t\tbuilder.append(\"FILE_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"FILE_PATH TEXT,\");\n \t\tbuilder.append(\"START_REVISION_ID LONG,\");\n \t\tbuilder.append(\"END_REVISION_ID LONG\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}",
"public static String getCreateSQLString(){\n\t\treturn \"create table \" +TABLE_NAME_FAMILY_PLANNING_RECORDS +\" ( \"\n\t\t\t\t+SERVICE_REC_ID+\" integer primary key, \"\n\t\t\t\t+FamilyPlanningServices.SERVICE_ID +\" integer, \"\n\t\t\t\t+CommunityMembers.COMMUNITY_MEMBER_ID +\" integer, \"\n\t\t\t\t+SERVICE_DATE+\" text,\"\n\t\t\t\t+SCHEDULE_DATE+\" text, \"\n\t\t\t\t+QUANTITY+\" numberic ,\"\n\t\t\t\t+SERVICE_TYPE+\" integer default 0,\"\n\t\t\t\t+DataClass.REC_STATE+ \" integer \"\n\t\t\t\t+\")\";\n\t}",
"private String constructSQL() {\n\t\tString sql = \"\";\n\t\tif (!minAgeSet) {\n\t\t\tsql = \"SELECT E.EMP_ID, E.EMP_FULLNAME\" + \" FROM \" + empTable\n\t\t\t+ \" E\";\n\t\t} else {\n\t\t\tsql = \"SELECT E.EMP_ID, E.EMP_FULLNAME\" + \" FROM \" + empTable\n\t\t\t+ \" E WHERE E.EMP_BIRTH_DATE <= ? \";\n\t\t}\n\n\t\toriSqlLength = sql.length();\n\n\t\tStringTokenizer empTok = new StringTokenizer(employee, \",\");\n\t\tStringTokenizer calcTok = new StringTokenizer(calcGroup, \",\");\n\t\tStringTokenizer payTok = new StringTokenizer(payGroup, \",\");\n\t\tStringTokenizer teamTok = new StringTokenizer(team, \",\");\n\n\t\t// check if any of the selects have been used.\n\n\t\tif (empTok.hasMoreTokens() && !empTok.nextToken().equalsIgnoreCase(all))\n\t\t\tsql = groupSelect(\"employee\", sql);\n\t\tif (calcTok.hasMoreTokens()\n\t\t\t\t&& !calcTok.nextToken().equalsIgnoreCase(all))\n\t\t\tsql = groupSelect(\"calcGroup\", sql);\n\t\tif (payTok.hasMoreTokens() && !payTok.nextToken().equalsIgnoreCase(all))\n\t\t\tsql = groupSelect(\"payGroup\", sql);\n\t\tif (teamTok.hasMoreTokens()\n\t\t\t\t&& !teamTok.nextToken().equalsIgnoreCase(all))\n\t\t\tsql = groupSelect(\"team\", sql);\n\t\t\n\t\treturn sql;\n\t}",
"public PreparedSql generatePreparedSql(BoundString prefix);",
"public String[] getSqlStrings()\n {\n ArrayList<String> statements = new ArrayList<String>();\n statements.add(\"create schema bruce;\"); // hibernate won't create the schema for us\n\n try\n {\n // schema ddl is in a .sql file at the root of bruce.jar\n final String ddlString = readFileResource(\"cluster-ddl.sql\").toString();\n final StringTokenizer tokenizer = new StringTokenizer(ddlString, DDL_DELIMITER);\n while (tokenizer.hasMoreTokens())\n {\n statements.add(tokenizer.nextToken());\n }\n }\n catch (IOException e)\n {\n LOGGER.error(\"Cannot load SQL strings\", e);\n }\n return statements.toArray(new String[statements.size()]);\n }",
"String getSqlForExternalTool(Alias alias, String sql, SqlParser parser);",
"private String buildSelect() {\r\n\t\tString select = \"select all_source.line, ' '||replace(all_source.TEXT,chr(9),' ')|| ' ' line from all_source where 2=2 \";\r\n\t\tString ownerCondition = \"\";\r\n\t\tString ownerInnerCondition = \"\";\r\n\t\tString beginProcedureCondition = \"\";\r\n\r\n\t\tif (!oraJdbcDTO.dbSchema.equals(\"\")) {\r\n\t\t\townerCondition = \" and all_source.OWNER = ? \";\r\n\t\t\townerInnerCondition = \" and all_source1.OWNER = ? \";\r\n\t\t}\r\n\t\tif (!oraJdbcDTO.packageName.equals(\"\")) {\r\n\t\t\t// Procedure in package\r\n\t\t\tbeginProcedureCondition = \"and all_source.name = ?\\n\"\r\n\t\t\t\t\t+ \"and all_source.TYPE = 'PACKAGE'\\n\"\r\n\t\t\t\t\t+ \"and all_source.line >=\\n\"\r\n\t\t\t\t\t+ \" (select min(all_source1.line)\\n\"\r\n\t\t\t\t\t+ \" from all_source all_source1 where 2=2 \"\r\n\t\t\t\t\t+ ownerInnerCondition\r\n\t\t\t\t\t+ \" and all_source1.name = ?\\n\"\r\n\t\t\t\t\t+ \" and all_source1.TYPE = 'PACKAGE'\\n\"\r\n\t\t\t\t\t+ \" and instr(upper(all_source1.TEXT), ?) > 0)\";\r\n\t\t\t;\r\n\t\t} else {\r\n\t\t\t// Single procedure or function\r\n\t\t\tbeginProcedureCondition = \"and all_source.name = ?\\n\"\r\n\t\t\t\t\t+ \"and all_source.TYPE in ('PROCEDURE','FUNCTION')\";\r\n\t\t}\r\n\t\tselect = select + beginProcedureCondition + \" and all_source.line >= ?\"\r\n\t\t\t\t+ ownerCondition + \" order by all_source.line\";\r\n\r\n\t\treturn select;\r\n\t}",
"public LdSqlExecutionCreator createSqlExecutionCreator() {\r\n assertStatus(\"createSqlExecutionCreator\");\r\n return new LdSqlExecutionCreator() {\r\n public LdSqlExecution createSqlExecution() {\r\n final BeanMetaData bmd = createBeanMetaData();\r\n return createBatchDeleteEntitySqlExecution(bmd);\r\n }\r\n };\r\n }",
"<T> List<String> generateInsertScript(GremlinSource<T> source);",
"private void createClassSQLContract(){\n //---------------------------------------------------------------------------\n buffer=new StringBuffer();\n createGetColumnPropertiesHash();\n createGetPrimaryKeyVector();\n createGetTableName();\n createSetFKParent();\n\t}",
"public String getInsertContentSql(String table)\r\n \t{\r\n \t\treturn \"insert into \" + table + \" (RESOURCE_ID, BODY)\" + \" values (? , ? )\";\r\n \t}",
"private String createInsertQuery()\n {\n int i = 0;\n StringBuilder sb = new StringBuilder();\n sb.append(\"INSERT INTO \");\n sb.append(type.getSimpleName());\n sb.append(\" (\");\n for(Field field:type.getDeclaredFields()) {i++; if(i != type.getDeclaredFields().length)sb.append(field.getName() +\", \"); else sb.append(field.getName());}\n sb.append(\")\");\n sb.append(\" VALUES (\");\n i = 0;\n for(Field field:type.getDeclaredFields()) {i++; if(i!= type.getDeclaredFields().length)sb.append(\"?, \"); else sb.append(\"?\");}\n sb.append(\");\");\n return sb.toString();\n }",
"public static void main(String args[]){\n String sql = \"select * from TBLS limit 2\";\n String sqlComplex = \"select testpartition.filename,format_.o,title.s,identifier.o,id.o,date_.o \" +\n \"from testpartition join format_ on (testpartition.filename=format_.s) \" +\n \"join title on (testpartition.filename=title.s) \" +\n \"join identifier on (testpartition.filename=identifier.s) \" +\n \"join id on (testpartition.filename=id.s) \" +\n \"join date_ on (testpartition.filename=date_.s) \" +\n \"where testpartition.gid0=1 and testpartition.sid=2 and testpartition.fid<100000 and testpartition.pfid=0\";\n String sqlOriginal = \"select idTable.filename,format_.o,title.s,identifier.o,id.o,date_.o \" +\n \"from idTable join format_ on (idTable.filename=format_.s) \" +\n \"join title on (idTable.filename=title.s) \" +\n \"join identifier on (idTable.filename=identifier.s) \" +\n \"join id on (idTable.filename=id.s) \" +\n \"join date_ on (idTable.filename=date_.s) \" +\n \"where idTable.gid0=1 and idTable.sid=2 and idTable.fid<100000\";\n\n QueryRewrite my = new QueryRewrite(sqlOriginal);\n String sqlRewrite = my.rewrite();\n System.out.println(sqlRewrite);\n\n\n }",
"public RepositorioPalestraScript(Context ctx) {\n\t\t// Criar utilizando um script SQL\n\t\tdbHelper = new SQLiteHelper(ctx, RepositorioPalestraScript.NOME_BANCO, RepositorioPalestraScript.VERSAO_BANCO,\n\t\t\t\tRepositorioPalestraScript.SCRIPT_DATABASE_CREATE, RepositorioPalestraScript.SCRIPT_DATABASE_DELETE);\n\n\t\t// abre o banco no modo escrita para poder alterar tamb�m\n\t\tdb = dbHelper.getWritableDatabase();\n\t}",
"private String getCommitTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table VCS_COMMIT(\");\n \t\tbuilder.append(\"VCS_COMMIT_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"BEFORE_REVISION_ID LONG,\");\n \t\tbuilder.append(\"AFTER_REVISION_ID LONG,\");\n \t\tbuilder.append(\"BEFORE_REVISION_IDENTIFIER TEXT,\");\n \t\tbuilder.append(\"AFTER_REVISION_IDENTIFIER TEXT\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}",
"@Override\n public String toSql(ToSqlOptions options) {\n StringBuilder sb = new StringBuilder(\"LOAD DATA INPATH '\");\n sb.append(sourceDataPath_ + \"' \");\n if (overwrite_) sb.append(\"OVERWRITE \");\n sb.append(\"INTO TABLE \" + tableName_.toString());\n if (partitionSpec_ != null) sb.append(\" \" + partitionSpec_.toSql(options));\n return sb.toString();\n }",
"BSQL2Java2 createBSQL2Java2();",
"public String[] generatePigScript() {\n SortedSet<String> columnNames = getColumnNames();\n if(null==columnNames||columnNames.isEmpty()){\n throw new IllegalStateException(\"Got empty column names can not generate the script\");\n }\n\n\n\n List<String> pigScript = new ArrayList<String>();\n\n pigScript.addAll(generator.genPigScriptForNumbers());\n //pigScript.addAll(generator.genPigScriptForText());\n\n return pigScript.toArray(new String[]{});\n }",
"public String getCreationSQL(final boolean quoteNames) {\n final StringBuilder sbSQL = new StringBuilder();\n sbSQL.append(\"CREATE TABLE \");\n sbSQL.append(PgDiffUtils.getQuotedName(name, quoteNames));\n sbSQL.append(\" (\\n\");\n \n for (PgColumn column : columns) {\n sbSQL.append(\"\\t\");\n sbSQL.append(column.getFullDefinition(quoteNames, false));\n sbSQL.append(\",\\n\");\n }\n \n sbSQL.setLength(sbSQL.length() - 2);\n sbSQL.append(\"\\n)\");\n \n if ((inherits != null) && (inherits.length() > 0)) {\n sbSQL.append(\"\\nINHERITS \");\n sbSQL.append(inherits);\n }\n \n sbSQL.append(';');\n \n for (PgColumn column : getColumnsWithStatistics()) {\n sbSQL.append(\"\\nALTER TABLE ONLY \");\n sbSQL.append(PgDiffUtils.getQuotedName(name, quoteNames));\n sbSQL.append(\" ALTER COLUMN \");\n sbSQL.append(\n PgDiffUtils.getQuotedName(column.getName(), quoteNames));\n sbSQL.append(\" SET STATISTICS \");\n sbSQL.append(column.getStatistics());\n sbSQL.append(';');\n }\n \n return sbSQL.toString();\n }",
"public String getCreateSQL(View view) {\n\t\tStringBuffer sql = new StringBuffer();\n\t\tsql.append(\"CREATE VIEW \");\n\t\tsql.append(view.getFullyQualifiedName());\n\t\tsql.append(\" AS \");\n\t\tsql.append(view.getDefinition());\n\t\treturn sql.toString();\n\t}",
"public SimpleDatabase executeSqlFile(String name) {\n // possibly trim .sql extension\n if (name.toLowerCase().endsWith(\".sql\")) {\n name = name.substring(0, name.length() - 4);\n }\n SQLiteDatabase db = context.openOrCreateDatabase(name);\n int id = context.getResourceId(name, \"raw\");\n return executeSqlFile(db, id);\n }",
"public void createQueryProcessor() throws IOException {\n\t\tfor(int i=0; i<=payload.getnumber_of_grouping_variables();i++) {\n\t\t\tlistMapsAggregates.add(new HashMap<String, String>());\n\t\t}\n\t\tfor(int i=0;i<payload.getnumber_of_aggregate_functions();i++) {\n\t\t\tString[] temp = payload.getaggregate_functions().get(i).split(\"_\",3);\n\t\t\tlistMapsAggregates.get(Integer.parseInt(temp[0])).put(temp[1], temp[2]);//(key,value) -> (aggregate function , column name)\n\t\t}\n\t\tStringBuilder fileData = new StringBuilder();\n\t\tfileData.append(\"package dbmsProject;\\r\\n\\r\\n\" + \n\t\t\t\t\"import java.io.FileOutputStream;\\r\\n\" + \n\t\t\t\t\"import java.io.IOException;\\r\\n\" + \n\t\t\t\t\"import java.text.DateFormat;\\r\\n\" + \n\t\t\t\t\"import java.text.DecimalFormat;\\r\\n\" + \n\t\t\t\t\"import java.text.SimpleDateFormat;\\r\\n\" + \n\t\t\t\t\"import java.util.ArrayList;\\r\\n\" + \n\t\t\t\t\"import java.util.Calendar;\\r\\n\" + \n\t\t\t\t\"import java.util.HashMap;\\r\\n\");\n\t\tfileData.append(\"\\r\\npublic class QueryProcessor{\\n\");\n\t\tfileData.append(\"\tprivate SalesTable salesTable;\\n\");\n\t\tfileData.append(\"\tprivate ExpTree expTree;\\n\");\n\t\tfileData.append(\"\tprivate Payload payload;\\n\");\n\t\tfileData.append(\"\tprivate Helper helper;\\n\");\n\t\tfileData.append(\"\tprivate ArrayList<HashMap<String,String>> listMapsAggregates;\\r\\n\" + \n\t\t\t\t\t\t\"\tprivate HashMap<String, Double> aggregatesMap;\\r\\n\" + \n\t\t\t\t\t\t\"\tprivate ArrayList<HashMap<String, ArrayList<InputRow>>> allGroups;\\r\\n\" + \n\t\t\t\t\t\t\"\tprivate ArrayList<ArrayList<String>> allGroupKeyStrings;\\r\\n\" + \n\t\t\t\t\t\t\"\tprivate ArrayList<ArrayList<InputRow>> allGroupKeyRows;\\n\");\n\t\tfileData.append(\"\\r\\n\tpublic QueryProcessor(SalesTable salesTable, Payload payload){\\n\");\n\t\tfileData.append(\"\t\tthis.aggregatesMap = new HashMap<String, Double>();\\n\");\n\t\tfileData.append(\"\t\tthis.salesTable=salesTable;\\n\");\n\t\tfileData.append(\"\t\tthis.payload=payload;\\n\");\n\t\tfileData.append(\"\t\tthis.expTree=new ExpTree();\\n\");\n\t\tfileData.append(\"\t\tthis.helper=new Helper();\\n\"\n\t\t\t\t\t\t+ \"\t\tthis.allGroupKeyRows = new ArrayList<ArrayList<InputRow>>();\\r\\n\" + \n\t\t\t\t\t\t\"\t\tthis.allGroupKeyStrings = new ArrayList<ArrayList<String>>();\\r\\n\" + \n\t\t\t\t\t\t\"\t\tthis.listMapsAggregates = new ArrayList<HashMap<String,String>>();\\r\\n\"\t+\n\t\t\t\t\t\t\"\t\tthis.allGroups = new ArrayList<HashMap<String, ArrayList<InputRow>>>();\\n\");\n\t\tfileData.append(\"\t}\\n\");\n\t\tfileData.append(\"\\r\\n\tpublic ArrayList<InputRow> createInputSet(){\\n\");\n\t\tfileData.append(\"\t\tArrayList<InputRow> inputResultSet = new ArrayList<InputRow>();\\n\");\n\t\tfileData.append(\"\t\tfor(SalesTableRow row: salesTable.getResultSet()) {\\n\");\n\t\tfileData.append(\"\t\t\tInputRow ir=new InputRow();\\n\");\n\t\tfor(String var: this.projectionVars) {\n\t\t\tfileData.append(\"\t\t\tir.set\"+varPrefix+var+\"(row.get\"+var+\"());\\n\");\n\t\t}\n\t\tfileData.append(\"\t\t\tinputResultSet.add(ir);\\n\");\n\t\tfileData.append(\"\t\t}\\n\");\n\t\tfileData.append(\"\t\treturn inputResultSet;\\n\");\n\t\tfileData.append(\"\t}\\n\");\n\t\t\n//OUTPUT ROW CREATION LOGIC\n\t\tfileData.append(\"\\r\\n\tpublic OutputRow convertInputToOutputRow(InputRow inputRow, String str, ArrayList<String> strList){\\n\");\n\t\tfileData.append(\"\t\tString temp=\\\"\\\";\\n\");\n\t\tfileData.append(\"\t\tOutputRow outputRow = new OutputRow();\\n\");\n\t\tfor(String select: payload.getselect_variables()) {\n\t\t\tif(helper.columnMapping.containsKey(select)) {\n\t\t\t\tfileData.append(\"\t\toutputRow.set\"+varPrefix+select+\"(inputRow.get\"+varPrefix+select+\"());\\n\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tString temp=select;\n\t\t\t\tif(select.contains(\"/\")) select=select.replaceAll(\"/\", \"_divide_\");\n\t\t\t\tif(select.contains(\"*\")) select=select.replaceAll(\"*\", \"_multiply_\");\n\t\t\t\tif(select.contains(\"+\")) select=select.replaceAll(\"+\", \"_add_\");\n\t\t\t\tif(select.contains(\"-\")) select=select.replaceAll(\"-\", \"_minus_\");\n\t\t\t\tif(select.contains(\")\")) select=select.replaceAll(\"[)]+\", \"\");\n\t\t\t\tif(select.contains(\"(\")) select=select.replaceAll(\"[(]+\", \"\");\n\t\t\t\tfileData.append(\"\t\ttemp = prepareClause(inputRow, inputRow, \\\"\"+temp+\"\\\", str, strList);\\n\");\n\t\t\t\tfileData.append(\"\t\tif(temp.contains(\\\"(\\\")) temp = expTree.execute(temp);\\r\\n\");\n\t\t\t\tfileData.append(\"\t\tif(temp.equals(\\\"discard_invalid_entry\\\")) return null;\\n\");\n\t\t\t\tfileData.append(\"\t\toutputRow.set\"+varPrefix+select+\"(Double.parseDouble(temp));\\n\");\n\t\t\t}\n\t\t}\n\t\tfileData.append(\"\t\treturn outputRow;\\n\");\n\t\tfileData.append(\"\t}\\n\");\n\t\t\n//WHERE CLAUSE EXECUTOR\n\t\tfileData.append(\"\\r\\n\tpublic ArrayList<InputRow> executeWhereClause(ArrayList<InputRow> inputResultSet) {\\r\\n\" + \n\t\t\t\t\"\t\tint i=0;\\r\\n\" + \n\t\t\t\t\"\t\twhile(i<inputResultSet.size()) {\\r\\n\" + \n\t\t\t\t\"\t\t\tString condition=prepareClause(inputResultSet.get(i), inputResultSet.get(i), payload.getWhereClause(), \\\"\\\", new ArrayList<String>());\\r\\n\" + \n\t\t\t\t\"\t\t\tif(condition.equals(\\\"discard_invalid_entry\\\") || !Boolean.parseBoolean(expTree.execute(condition))){\\r\\n\" + \n\t\t\t\t\"\t\t\t\tinputResultSet.remove(i);\\r\\n\" + \n\t\t\t\t\"\t\t\t\tcontinue;\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\ti++;\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\treturn inputResultSet;\\r\\n\" + \n\t\t\t\t\"\t}\\n\");\n\n//REFINE CLAUSE FOR PROCESSING\n\t\tfileData.append(\"\\r\\n\tpublic String prepareClause(InputRow row, InputRow rowZero, String condition, String str, ArrayList<String> strList) {\\r\\n\" + \n\t\t\t\t\"\t\tfor(int i=0;i<strList.size();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tif(condition.contains(i+\\\"_\\\")) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\tboolean flag=false;\\r\\n\" + \n\t\t\t\t\"\t\t\t\tfor(String ag : payload.getaggregate_functions()) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tif(!ag.contains(i+\\\"\\\")) continue;\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tif(condition.contains(ag)) flag=true;\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tcondition=condition.replaceAll(ag, ag+\\\"_\\\"+strList.get(i));\\r\\n\" + \n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\tif(flag) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tboolean changeFlag=false;\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tfor(String key : aggregatesMap.keySet()) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\t\tif(condition.contains(key)) changeFlag=true;\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\t\tcondition = condition.replaceAll(key, Double.toString(aggregatesMap.get(key)));\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tif(!changeFlag) return \\\"discard_invalid_entry\\\";\\r\\n\" + \n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\tif(condition.contains(\\\".\\\")) {\\r\\n\");\n\t\tfor(String var: projectionVars) {\n\t\t\tif(helper.columnMapping.get(var)==0 || helper.columnMapping.get(var)==1 || helper.columnMapping.get(var)==5)\n\t\t\t\tfileData.append(\"\t\t\tcondition=condition.replaceAll(\\\"[0-9]+\\\\\\\\.\"+var+\"\\\", row.get\"+varPrefix+var+\"());\\r\\n\");\n\t\t\telse\n\t\t\t\tfileData.append(\"\t\t\tcondition=condition.replaceAll(\\\"[0-9]+\\\\\\\\.\"+var+\"\\\", Integer.toString(row.get\"+varPrefix+var+\"()));\\r\\n\");\n\t\t}\n\t\tfileData.append(\"\t\t}\\n\");\n\t\t\n\t\tfor(String var: projectionVars) {\n\t\t\tif(helper.columnMapping.get(var)==0 || helper.columnMapping.get(var)==1 || helper.columnMapping.get(var)==5)\n\t\t\t\tfileData.append(\"\t\tcondition=condition.replaceAll(\\\"\"+var+\"\\\", rowZero.get\"+varPrefix+var+\"());\\r\\n\");\n\t\t\telse\n\t\t\t\tfileData.append(\"\t\tcondition=condition.replaceAll(\\\"\"+var+\"\\\", Integer.toString(rowZero.get\"+varPrefix+var+\"()));\\r\\n\");\n\t\t}\n\t\t\n\t\tfileData.append(\n\t\t\t\t\"\t\tcondition=condition.replaceAll(\\\"\\\\\\\\s+\\\", \\\"\\\");\\r\\n\" + \n\t\t\t\t\"\t\tcondition=condition.replaceAll(\\\"\\\\\\\"\\\", \\\"\\\");\\r\\n\" + \n\t\t\t\t\"\t\tcondition=condition.replaceAll(\\\"\\\\'\\\", \\\"\\\");\\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\treturn condition;\\r\\n\" + \n\t\t\t\t\"\t}\\n\");\n\n//CREATE GROUPS\t\t\n\t\tfileData.append(\"\\r\\n\tpublic void createListsBasedOnSuchThatPredicate(ArrayList<InputRow> inputResultSet) {\\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\tfor(int i=0;i<=payload.getnumber_of_grouping_variables();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tArrayList<String> groupKeyStrings = new ArrayList<String>();\\r\\n\" + \n\t\t\t\t\"\t\t\tArrayList<InputRow> groupKeyRows = new ArrayList<InputRow>();\\r\\n\" + \n\t\t\t\t\"\t\t\tfor(InputRow row : inputResultSet) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\tStringBuilder temp=new StringBuilder();\\r\\n\" + \n\t\t\t\t\"\t\t\t\tInputRow groupRow = new InputRow();\\r\\n\" + \n\t\t\t\t\"\t\t\t\tfor(String group: payload.getGroupingAttributesOfAllGroups().get(i)) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tint col = helper.columnMapping.get(group);\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tswitch(col) {\\r\\n\");\n\t\tfor(String var: projectionVars) {\n\t\t\tfileData.append(\"\t\t\t\t\t\tcase \"+helper.columnMapping.get(var)+\":\"+\"{temp.append(row.get\"+varPrefix+var+\"()+\\\"_\\\"); groupRow.set\"+varPrefix+ var+ \"(row.get\"+varPrefix+var+\"()); break;}\\r\\n\");\n\t\t}\n\t\tfileData.append(\"\t\t\t\t\t}\\n\"+\n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\tString s=temp.toString();\\r\\n\" + \n\t\t\t\t\"\t\t\t\tif(s.charAt(s.length()-1)=='_') s=s.substring(0, s.length()-1);\\r\\n\" + \n\t\t\t\t\"\t\t\t\tif( !groupKeyStrings.contains(s) ) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tgroupKeyStrings.add(s);\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tgroupKeyRows.add(groupRow);\\r\\n\" + \n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\tallGroupKeyRows.add(groupKeyRows);\\r\\n\" + \n\t\t\t\t\"\t\t\tallGroupKeyStrings.add(groupKeyStrings);\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\tfor(int i=0;i<=payload.getnumber_of_grouping_variables();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tHashMap<String, ArrayList<InputRow>> res = new HashMap<String, ArrayList<InputRow>>();\\r\\n\" + \n\t\t\t\t\"\t\t\tString suchThat = payload.getsuch_that_predicates().get(i);\\r\\n\" + \n\t\t\t\t\"\t\t\tfor(int j=0;j<allGroupKeyRows.get(i).size();j++) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\tInputRow zeroRow = allGroupKeyRows.get(i).get(j);\\r\\n\" + \n\t\t\t\t\"\t\t\t\tArrayList<InputRow> groupMember = new ArrayList<InputRow>();\\r\\n\" + \n\t\t\t\t\"\t\t\t\tfor(InputRow salesRow : inputResultSet) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tString condition = prepareClause(salesRow, zeroRow, suchThat, \\\"\\\", new ArrayList<String>());\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tif(Boolean.parseBoolean(expTree.execute(condition))) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\t\tgroupMember.add(salesRow);\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\tres.put(allGroupKeyStrings.get(i).get(j), new ArrayList<InputRow>(groupMember));\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\tallGroups.add(new HashMap<String, ArrayList<InputRow>>(res));\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t}\\n\");\n\t\t\n//GETGROUPING VARIABLE METHOD\n\t\tfileData.append(\"\\r\\n\tpublic String getGroupingVariable(int i, InputRow row) {\\r\\n\" + \n\t\t\t\t\"\t\tswitch(i) {\\r\\n\");\n\t\tfor(String var: projectionVars) {\n\t\t\tif(helper.columnMapping.get(var)==0||helper.columnMapping.get(var)==1||helper.columnMapping.get(var)==5)\n\t\t\t\tfileData.append(\"\t\t\tcase \"+helper.columnMapping.get(var)+\": return row.get\"+varPrefix+var+\"();\\r\\n\");\n\t\t\telse if(helper.columnMapping.get(var)==7)\n\t\t\t\tfileData.append(\"\t\t\tcase \"+helper.columnMapping.get(var)+\": return \\\"all\\\"\");\n\t\t\telse\n\t\t\t\tfileData.append(\"\t\t\tcase \"+helper.columnMapping.get(var)+\": return Integer.toString(row.get\"+varPrefix+var+\"());\\r\\n\");\n\t\t}\n\t\tfileData.append(\"\t\t}\\r\\n\");\n\t\tfileData.append(\"\t\treturn \\\"__Garbage__\\\";\\r\\n\");\n\t\tfileData.append(\"\t}\\n\");\n\t\t\n//COMPUTE AGGREGATES METHOD\n\t\tfileData.append(\"\\r\\n\tpublic void computeAggregates(ArrayList<InputRow> inputResultSet) {\t\\r\\n\" + \n\t\t\t\t\"\t\tdouble val=0;\\r\\n\"+\n\t\t\t\t\"\t\tfor(int i=0; i<=payload.getnumber_of_grouping_variables();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tlistMapsAggregates.add(new HashMap<String, String>());\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\tfor(int i=0;i<payload.getnumber_of_aggregate_functions();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tString[] temp = payload.getaggregate_functions().get(i).split(\\\"_\\\",3);\\r\\n\" + \n\t\t\t\t\"\t\t\tlistMapsAggregates.get(Integer.parseInt(temp[0])).put(temp[1], temp[2]);//(key,value) -> (aggregate function , column name)\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\"+\n\t\t\t\t\"\t\tint nGroupingVariables=0;\\r\\n\"+\n\t\t\t\t\"\t\taggregatesMap = new HashMap<>();\\r\\n\"+\n\t\t\t\t\"\t\tHashMap<String,Double> tempAggregatesMap;\\r\\n\");\n\t\t\n\t\tfor(int nGroupingVariables=0;nGroupingVariables<=payload.getnumber_of_grouping_variables();nGroupingVariables++) {\n\t\t\tfileData.append(\"\\n\t\tnGroupingVariables=\"+nGroupingVariables+\";\\r\\n\");\n\t\t\tfileData.append(\n\t\t\t\t\t\t\t\"\t\ttempAggregatesMap = new HashMap<String,Double>();\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\tfor(int i=0;i<allGroupKeyRows.get(nGroupingVariables).size(); i++) {\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\tInputRow zeroRow = allGroupKeyRows.get(nGroupingVariables).get(i);\\r\\n\" );\n\t\t\t\n\t\t\t//MFvsEMF\n\t\t\tif(isGroupMF(nGroupingVariables)) fileData.append(\"\t\t\tfor(InputRow row: allGroups.get(nGroupingVariables).get(allGroupKeyStrings.get(nGroupingVariables).get(i)))\t{\\r\\n\");\n\t\t\telse fileData.append(\"\t\t\tfor(InputRow row: inputResultSet) {\\r\\n\");\n\t\t\t\n\t\t\tfileData.append(\"\t\t\t\tString condition = payload.getsuch_that_predicates().get(nGroupingVariables);\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\t\tString str = allGroupKeyStrings.get(nGroupingVariables).get(i);\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\t\tArrayList<String> strList = new ArrayList<String>();\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\t\tfor(int j=0;j<=payload.getnumber_of_grouping_variables();j++) strList.add(str);\\r\\n\" +\n\t\t\t\t\t\t\t\"\t\t\t\tcondition= prepareClause(row, zeroRow, condition, str, strList);\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\t\tif(condition.equals(\\\"discard_invalid_entry\\\") || !Boolean.parseBoolean(expTree.execute(condition))) continue;\\r\\n\"\n\t\t\t\t\t\t\t);\n\t\t\tString key1 = nGroupingVariables+\"_sum_\"+listMapsAggregates.get(nGroupingVariables).get(\"sum\");\n\t\t\tString key2 = nGroupingVariables+\"_avg_\"+listMapsAggregates.get(nGroupingVariables).get(\"avg\");\n\t\t\tString key3 = nGroupingVariables+\"_min_\"+listMapsAggregates.get(nGroupingVariables).get(\"min\");\n\t\t\tString key4 = nGroupingVariables+\"_max_\"+listMapsAggregates.get(nGroupingVariables).get(\"max\");\n\t\t\tString key5 = nGroupingVariables+\"_count_\"+listMapsAggregates.get(nGroupingVariables).get(\"count\");\n\t\t\tString key6 = nGroupingVariables+\"_count_\"+listMapsAggregates.get(nGroupingVariables).get(\"avg\");\n\t\t\t\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"sum\")) \n\t\t\t\tfileData.append(\"\t\t\t\tString key1=\\\"\"+key1+\"\\\";\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"avg\")) {\n\t\t\t\tfileData.append(\"\t\t\t\tString key2=\\\"\"+key2+\"\\\";\\r\\n\");\n\t\t\t\tfileData.append(\"\t\t\t\tString key6=\\\"\"+key6+\"\\\";\\r\\n\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"min\"))\n\t\t\t\tfileData.append(\"\t\t\t\tString key3=\\\"\"+key3+\"\\\";\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"max\"))\n\t\t\t\tfileData.append(\"\t\t\t\tString key4=\\\"\"+key4+\"\\\";\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"count\"))\n\t\t\t\tfileData.append(\"\t\t\t\tString key5=\\\"\"+key5+\"\\\";\\r\\n\");\n\t\t\t\n\t\t\tfileData.append(\"\t\t\t\tfor(String ga: payload.getGroupingAttributesOfAllGroups().get(nGroupingVariables)) {\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"sum\")) \n\t\t\t\tfileData.append(\"\t\t\t\t\tkey1=key1+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"avg\")) {\n\t\t\t\tfileData.append(\"\t\t\t\t\tkey2=key2+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\t\tfileData.append(\"\t\t\t\t\tkey6=key6+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"min\"))\n\t\t\t\tfileData.append(\"\t\t\t\t\tkey3=key3+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"max\"))\n\t\t\t\tfileData.append(\"\t\t\t\t\tkey4=key4+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"count\"))\n\t\t\t\tfileData.append(\"\t\t\t\t\tkey5=key5+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\tfileData.append(\"\t\t\t\t}\\r\\n\");\n\t\t\t\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"sum\")) {\n\t\t\t\tfileData.append(\"\t\t\tval=tempAggregatesMap.getOrDefault(key1, 0.0)+Double.parseDouble(getGroupingVariable(helper.columnMapping.get(listMapsAggregates.get(nGroupingVariables).get(\\\"sum\\\")), row));\\r\\n\" + \n\t\t\t\t\"\t\t\ttempAggregatesMap.put(key1, val);\\r\\n\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"avg\")) {\n\t\t\t\tfileData.append(\"\t\t\tval=tempAggregatesMap.getOrDefault(key2, 0.0)+Double.parseDouble(getGroupingVariable(helper.columnMapping.get(listMapsAggregates.get(nGroupingVariables).get(\\\"avg\\\")), row));\\r\\n\"+\n\t\t\t\t\"\t\t\ttempAggregatesMap.put(key2, val);\\r\\n\"+\n\t\t\t\t\"\t\t\ttempAggregatesMap.put(key6, tempAggregatesMap.getOrDefault(key6, 0.0)+1);\\r\\n\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"min\")) {\n\t\t\t\tfileData.append(\"\t\t\tval=Math.min( tempAggregatesMap.getOrDefault(key3, Double.MAX_VALUE) , Double.parseDouble(getGroupingVariable(helper.columnMapping.get(listMapsAggregates.get(nGroupingVariables).get(\\\"min\\\")), row)));\\r\\n\"+\n\t\t\t\t\"\t\t\ttempAggregatesMap.put(key3, val);\\r\\n\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"max\")) {\n\t\t\t\tfileData.append(\"\t\t\tval=Math.max( tempAggregatesMap.getOrDefault(key4, Double.MIN_VALUE) , Double.parseDouble(getGroupingVariable(helper.columnMapping.get(listMapsAggregates.get(nGroupingVariables).get(\\\"max\\\")), row)));\\r\\n\"+\n\t\t\t\t\"\t\t\ttempAggregatesMap.put(key4, val);\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"count\")) {\n\t\t\t\tfileData.append(\"\t\t\ttempAggregatesMap.put(key5, tempAggregatesMap.getOrDefault(key5, 0.0)+1);\\r\\n\");\n\t\t\t}\n\t\t\tfileData.append(\"\t\t\t}\\r\\n\");\n\t\t\tfileData.append(\"\t\t}\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"avg\")) {\n\t\t\t\tfileData.append(\n\t\t\t\t\"\t\tfor(String key: tempAggregatesMap.keySet()) {\\r\\n\"+\n\t\t\t\t\"\t\t\tif(key.contains(\\\"_avg_\\\"))\\r\\n\"+\n\t\t\t\t\"\t\t\t\ttempAggregatesMap.put(key, tempAggregatesMap.get(key)/tempAggregatesMap.get(key.replace(\\\"_avg_\\\", \\\"_count_\\\")));\\r\\n\"+\n\t\t\t\t\"\t\t}\\r\\n\");\n\t\t\t}\n\t\t\tfileData.append(\"\t\taggregatesMap.putAll(tempAggregatesMap);\\r\\n\");\n\t\t}\n\t\t\n\t\tfileData.append(\"\t}\\n\");\n\n//PREPARE THE RESULTS AND ADD THEM TO A LIST OF OUTPUTROW\n\t\tfileData.append(\"\\r\\n\tpublic ArrayList<OutputRow> createOutputResultSet() {\\r\\n\" + \n\t\t\t\t\"\t\tArrayList<OutputRow> outputRowList = new ArrayList<OutputRow>();\\r\\n\"+\n\t\t\t\t\"\t\tfor(int i=0; i<allGroupKeyRows.get(0).size();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tString str=allGroupKeyStrings.get(0).get(i);\\r\\n\" + \n\t\t\t\t\"\t\t\tString[] tempStr = str.split(\\\"_\\\");\\r\\n\" + \n\t\t\t\t\"\t\t\tArrayList<String> strList = new ArrayList<String>();\\r\\n\" + \n\t\t\t\t\"\t\t\tfor(int j=0; j<=payload.getnumber_of_grouping_variables(); j++) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\tString ss = \\\"\\\";\\r\\n\" + \n\t\t\t\t\"\t\t\t\tint k=0;\\r\\n\" + \n\t\t\t\t\"\t\t\t\tfor(String gz: payload.getgrouping_attributes()) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tif(payload.getGroupingAttributesOfAllGroups().get(j).contains(gz)) ss=ss+tempStr[k++]+\\\"_\\\";\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\telse k++;\\r\\n\" + \n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\tstrList.add(ss.substring(0, ss.length()-1));\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t//having check\\r\\n\" + \n\t\t\t\t\"\t\t\tif(payload.isHavingClause()) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\tString condition= prepareClause(allGroupKeyRows.get(0).get(i), allGroupKeyRows.get(0).get(i), payload.getHavingClause(), str, strList);\\r\\n\" + \n\t\t\t\t\"\t\t\t\tif(condition.equals(\\\"discard_invalid_entry\\\") || !Boolean.parseBoolean(expTree.execute(condition))) continue;\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\t\t\tOutputRow outputRow= convertInputToOutputRow(allGroupKeyRows.get(0).get(i), str, strList);\\r\\n\"+\n\t\t\t\t\"\t\t\tif(outputRow!=null){\\r\\n\" + \n\t\t\t\t\"\t\t\t\toutputRowList.add(outputRow);\\r\\n\"+\n\t\t\t\t\"\t\t\t}\\r\\n\"+\t\n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\treturn outputRowList;\\r\\n\"+\n\t\t\t\t\"\t}\\n\");\n\t\t\n//PRINT THE OUTPUT ROW\n\t\tfileData.append(\"\\r\\n\tpublic void printOutputResultSet(ArrayList<OutputRow> outputResultSet) throws IOException{\\r\\n\");\n\t\tfileData.append(\"\t\tCalendar now = Calendar.getInstance();\\r\\n\" + \n\t\t\t\t\"\t\tDateFormat dateFormat = new SimpleDateFormat(\\\"MM/dd/yyyy HH:mm:ss\\\");\\r\\n\" + \n\t\t\t\t\"\t\tStringBuilder fileData = new StringBuilder();\\r\\n\" + \n\t\t\t\t\"\t\tfileData.append(\\\"TIME (MM/dd/yyyy HH:mm:ss)::::\\\"+dateFormat.format(now.getTime())+\\\"\\\\r\\\\n\\\");\\r\\n\" + \n\t\t\t\t\"\t\tString addDiv = \\\" -------------- \\\";\\r\\n\" + \n\t\t\t\t\"\t\tString divide = \\\"\\\";\\r\\n\" + \n\t\t\t\t\"\t\tString header=\\\"\\\";\"+\n\t\t\t\t\"\t\tfor(String select: payload.getselect_variables()) {\\r\\n\" + \n\t\t\t\t\"\t\t\tif(select.contains(\\\"0_\\\")) select=select.substring(2);\\r\\n\" + \n\t\t\t\t\"\t\t\theader=header+\\\" \\\"+select;\\r\\n\" + \n\t\t\t\t\"\t\t\tfor(int i=0;i<14-select.length();i++) header=header+\\\" \\\";\\r\\n\" + \n\t\t\t\t\"\t\t\tdivide=divide+addDiv;\\r\\n\"+\n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\tSystem.out.println(divide); fileData.append(divide+\\\"\\\\r\\\\n\\\");\\r\\n\" + \n\t\t\t\t\"\t\tSystem.out.println(header); fileData.append(header+\\\"\\\\r\\\\n\\\");\\r\\n\" + \n\t\t\t\t\"\t\tSystem.out.println(divide); fileData.append(divide+\\\"\\\\r\\\\n\\\");\\r\\n\" + \n\t\t\t\t//\"\t\tSystem.out.println(); fileData.append(\\\"\\\\r\\\\n\\\");\\r\\n\" + \n\t\t\t\t\"\t\tString ansString=\\\"\\\";\\r\\n\" + \n\t\t\t\t\"\t\tDecimalFormat df = new DecimalFormat(\\\"#.####\\\");\\r\\n\");\n\t\tfileData.append(\"\t\tfor(OutputRow outputRow: outputResultSet) {\\r\\n\");\n\t\tfileData.append(\"\t\t\tString answer=\\\"\\\";\\r\\n\");\n\t\t\n\t\tfor(String select: payload.getselect_variables()) {\n\t\t\tif(helper.columnMapping.containsKey(select)) {\n\t\t\t\tint col = helper.columnMapping.get(select);\n\t\t\t\tif(col==0|| col==1|| col==5) {\n\t\t\t\t\t//string\n\t\t\t\t\tfileData.append(\"\t\t\tansString=outputRow.get\"+varPrefix+select+\"();\\r\\n\");\n\t\t\t\t\tfileData.append(\"\t\t\tanswer=answer+\\\" \\\"+ansString;\\r\\n\");\n\t\t\t\t\tfileData.append(\"\t\t\tfor(int k=0;k<14-ansString.length();k++) answer=answer+\\\" \\\";\\r\\n\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//int\n\t\t\t\t\tfileData.append(\"\t\t\tansString = Integer.toString(outputRow.get\"+varPrefix+select+\"());\\r\\n\");\n\t\t\t\t\tfileData.append(\"\t\t\tfor(int k=0;k<12-ansString.length();k++) answer=answer+\\\" \\\";\\r\\n\");\n\t\t\t\t\tfileData.append(\"\t\t\tanswer=answer+ansString+\\\" \\\";\\r\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//double\n\t\t\t\tif(select.contains(\"/\")) select=select.replaceAll(\"/\", \"_divide_\");\n\t\t\t\tif(select.contains(\"*\")) select=select.replaceAll(\"*\", \"_multiply_\");\n\t\t\t\tif(select.contains(\"+\")) select=select.replaceAll(\"+\", \"_add_\");\n\t\t\t\tif(select.contains(\"-\")) select=select.replaceAll(\"-\", \"_minus_\");\n\t\t\t\tif(select.contains(\")\")) select=select.replaceAll(\"[)]+\", \"\");\n\t\t\t\tif(select.contains(\"(\")) select=select.replaceAll(\"[(]+\", \"\");\n\t\t\t\tfileData.append(\"\t\t\tansString = df.format(outputRow.get\"+varPrefix+select+\"());\\r\\n\");\n\t\t\t\tfileData.append(\"\t\t\tfor(int k=0;k<12-ansString.length();k++) answer=answer+\\\" \\\";\\r\\n\");\n\t\t\t\tfileData.append(\"\t\t\tanswer=answer+ansString+\\\" \\\";\\r\\n\");\n\t\t\t}\n\t\t}\n\t\tfileData.append(\"\t\t\tSystem.out.println(answer); fileData.append(answer+\\\"\\\\r\\\\n\\\");\\r\\n\");\n\t\tfileData.append(\"\t\t}\\r\\n\");\n\t\tfileData.append(\"\t\tFileOutputStream fos = new FileOutputStream(\\\"queryOutput/\"+payload.fileName+\"\\\");\\r\\n\" + \n\t\t\t\t\"\t\tfos.write(fileData.toString().getBytes());\\r\\n\" + \n\t\t\t\t\"\t\tfos.flush();\\r\\n\" + \n\t\t\t\t\"\t\tfos.close();\\r\\n\");\n\t\tfileData.append(\"\t}\\r\\n\");\n\t\t\n\t\t\n//DRIVER METHOD OF THE QUERY PROCESSOR\n\t\tfileData.append(\"\\r\\n\tpublic void process() throws IOException{\\r\\n\" + \n\t\t\t\t\"\t\tArrayList<InputRow> inputResultSet = createInputSet();\\r\\n\" + \n\t\t\t\t\"\t\tif(payload.getIsWhereClause()) inputResultSet = executeWhereClause(inputResultSet);\\r\\n\" + \n\t\t\t\t\"\t\tif(payload.getnumber_of_grouping_variables()>0) createListsBasedOnSuchThatPredicate(inputResultSet);\\r\\n\" + \n\t\t\t\t\"\t\tcomputeAggregates(inputResultSet);\\r\\n\" + \n\t\t\t\t\"\t\tArrayList<OutputRow> outputResultSet = createOutputResultSet();\\r\\n\" + \n\t\t\t\t\"\t\tprintOutputResultSet(outputResultSet);\\r\\n\"+\n\t\t\t\t\"\t}\\n\");\n\t\t\n\t\tfileData.append(\"}\");\n\t\tFileOutputStream fos = new FileOutputStream(\"src/dbmsProject/QueryProcessor.java\");\n\t\tfos.write(fileData.toString().getBytes());\n\t\tfos.flush();\n\t\tfos.close();\n\t}",
"CompoundStatement createCompoundStatement();",
"protected abstract String assemble(Statement statement);",
"protected void executeSQLScript(SQLiteDatabase database, String assetName) {\n /*\n * variables locales para manejar la lectura del archivo de scripts\n */\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n byte buf[] = new byte[1024];\n int len;\n AssetManager assetManager = context.getAssets();\n InputStream inputStream = null;\n\n try {\n /*\n * obtenemos el asset y lo convertimos a string\n */\n inputStream = assetManager.open(assetName);\n while ((len = inputStream.read(buf)) != -1) {\n outputStream.write(buf, 0, len);\n }\n outputStream.close();\n inputStream.close();\n\n /*\n * desencriptamos el archivo\n */\n String sqlClear = Cypher.decrypt(SD, outputStream.toString());\n // String sqlClear = outputStream.toString();\n\n /*\n * separamos la cadena por el separador de sentencias\n */\n String[] createScript = sqlClear.split(\";\");\n\n /*\n * por cada sentencia del archivo ejecutamos la misma en la base de\n * datos\n */\n for (int i = 0; i < createScript.length; i++) {\n String sqlStatement = createScript[i].trim();\n\n if (sqlStatement.startsWith(\"--\")) {\n continue;\n }\n\n if (sqlStatement.length() > 0) {\n Log.i(CsTigoApplication.getContext().getString(\n CSTigoLogTags.DATABASE.getValue()),\n CsTigoApplication.getContext().getString(\n R.string.database_exec_sql)\n + sqlStatement);\n\n try {\n database.execSQL(sqlStatement + \";\");\n } catch (SQLException e) {\n Notifier.error(\n getClass(),\n CsTigoApplication.getContext().getString(\n R.string.database_statement_exec)\n + e.getMessage());\n } catch (Exception e) {\n Notifier.error(\n getClass(),\n CsTigoApplication.getContext().getString(\n R.string.database_decypt_error)\n + e.getMessage());\n }\n }\n }\n\n } catch (IOException e) {\n Notifier.error(\n getClass(),\n CsTigoApplication.getContext().getString(\n R.string.database_read_asset)\n + e.getMessage());\n } catch (SQLException e) {\n Notifier.error(\n getClass(),\n CsTigoApplication.getContext().getString(\n R.string.database_statement_exec)\n + e.getMessage());\n } catch (Exception e) {\n Notifier.error(\n getClass(),\n CsTigoApplication.getContext().getString(\n R.string.database_decypt_error)\n + e.getMessage());\n }\n }",
"private String getCrdQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CRD(\");\n \t\tbuilder.append(\"CRD_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"TYPE TEXT NOT NULL,\");\n \t\tbuilder.append(\"HEAD TEXT NOT NULL,\");\n \t\tbuilder.append(\"ANCHOR TEXT NOT NULL,\");\n \t\tbuilder.append(\"NORMALIZED_ANCHOR TEXT NOT NULL,\");\n \t\tbuilder.append(\"CM INTEGER,\");\n \t\tbuilder.append(\"ANCESTORS TEXT NOT NULL,\");\n \t\tbuilder.append(\"FULL_TEXT TEXT NOT NULL\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}",
"private String getCodeFragmentTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CODE_FRAGMENT(\");\n \t\tbuilder.append(\"CODE_FRAGMENT_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"OWNER_FILE_ID LONG,\");\n \t\tbuilder.append(\"CRD_ID LONG,\");\n \t\tbuilder.append(\"START_REVISION_ID LONG,\");\n \t\tbuilder.append(\"END_REVISION_ID LONG,\");\n \t\tbuilder.append(\"HASH LONG,\");\n \t\tbuilder.append(\"HASH_FOR_CLONE LONG,\");\n \t\tbuilder.append(\"START_LINE INTEGER,\");\n \t\tbuilder.append(\"END_LINE INTEGER,\");\n \t\tbuilder.append(\"SIZE INTEGER\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}",
"public StringBuffer createInsertBegin(String tableName){\n\t\t\n\t\tStringBuffer sql = new StringBuffer();\n\t\t\n\t\tsql.append(Constants.INSERT);\n\t\tsql.append(Constants.INTO);\n\t\tsql.append(tableName);\n\t\tsql.append(Constants.LINE_SPACE);\n\t\tsql.append(Constants.OPEN_BRACKET);\n\t\t\n\t\tint index =0;\n\t\tList<Column> nonAutoIncrementColumns = dbStructure.getTable(tableName).getNonAutoIncrementColumns();\n\t\tfor(Column column : nonAutoIncrementColumns){\n\t\t\tsql.append(column.getName());\n\t\t\tindex++;\n\t\t\tif(index < nonAutoIncrementColumns.size()) { \n\t\t\t\tsql.append(Constants.COMMA);\n\t\t\t\tsql.append(Constants.LINE_SPACE);\n\t\t\t}\n\t\t}\n\t\t\n\t\tsql.append(Constants.CLOSE_BRACKET);\n\t\tsql.append(Constants.LINE_SPACE);\n\t\tsql.append(Constants.VALUES);\n\t\n\t\treturn sql;\n\t}",
"public void setScriptSQL(String pInst)\r\n {\r\n this.scriptSQL = pInst;\r\n }",
"public static SqlTree parseSql(String sql) throws Exception {\n if (StringUtils.isBlank(sql)){\n throw new RuntimeException(\"sql is not null\");\n }\n if (LOCAL_SQL_PLUGIN_ROOT == null){\n throw new RuntimeException(\"need to set local sql plugin root\");\n }\n\n //将sql格式化成一行字符串\n sql = sql.replaceAll(\"--.*\", \"\")\n .replaceAll(\"\\r\\n\", \" \")\n .replaceAll(\"\\n\", \" \")\n .replaceAll(\"\\t\", \" \").trim();\n\n //以;将每个sql语句分割开\n List<String> sqlArr = DtStringUtil.splitIgnoreQuota(sql, SQL_DELIMITER);\n SqlTree sqlTree = new SqlTree();\n AbstractTableInfoParser tableInfoParser = new AbstractTableInfoParser();\n //遍历sql语句\n for (String childSql: sqlArr) {\n if (Strings.isNullOrEmpty(childSql)){\n continue;\n }\n boolean result = false;\n //每一条sql语句都和四种解析器做匹配CreateFuncParser, CreateTableParser, CreateTmpTableParser, InsertSqlParser\n for (IParser sqlParser: sqlParserList) {\n if (!sqlParser.verify(childSql)){\n continue;\n }\n\n sqlParser.parseSql(childSql, sqlTree);\n result = true;\n break;\n }\n if (!result){\n throw new RuntimeException(String.format(\"%s:Syntax does not support,the format of SQL like insert into tb1 select * from tb2.\", childSql));\n }\n }\n\n //解析exec-sql\n if(sqlTree.getExecSqlList().size() == 0){\n throw new RuntimeException(\"sql no executable statement\");\n }\n\n for (InsertSqlParser.SqlParseResult result: sqlTree.getExecSqlList()) {\n List<String> sourceTableList = result.getSourceTableList();\n List<String> targetTableList = result.getTargetTableList();\n Set<String> tmpTableList = sqlTree.getTmpTableMap().keySet();\n\n for(String tableName : sourceTableList){\n\n //temp 中不包括tableName ,那么这个tableName 的来源只能来自source/side\n if (!tmpTableList.contains(tableName)){\n CreateTableParser.SqlParserResult createTableResult = sqlTree.getPreDealTableMap().get(tableName);\n if(createTableResult == null){\n throw new RuntimeException(\"can't find table \" + tableName);\n }\n\n AbstractTableInfo tableInfo = tableInfoParser.parseWithTableType(ETableType.SOURCE.getType(),\n createTableResult, LOCAL_SQL_PLUGIN_ROOT);\n sqlTree.addTableInfo(tableName, tableInfo);\n }\n }\n\n for(String tableName : targetTableList){\n //temp 中不包括tableName ,那么这个tableName 的来源只能来自sink\n if (!tmpTableList.contains(tableName)){\n CreateTableParser.SqlParserResult createTableResult = sqlTree.getPreDealTableMap().get(tableName);\n if(createTableResult == null){\n throw new RuntimeException(\"can't find table \" + tableName);\n }\n\n AbstractTableInfo tableInfo = tableInfoParser.parseWithTableType(ETableType.SINK.getType(),\n createTableResult, LOCAL_SQL_PLUGIN_ROOT);\n sqlTree.addTableInfo(tableName, tableInfo);\n }\n }\n\n }\n\n\n for (CreateTmpTableParser.SqlParserResult result : sqlTree.getTmpSqlList()){\n List<String> sourceTableList = result.getSourceTableList();\n for(String tableName : sourceTableList){\n //临时表中的source不是来源子source节点\n if (!sqlTree.getTableInfoMap().keySet().contains(tableName)){\n CreateTableParser.SqlParserResult createTableResult = sqlTree.getPreDealTableMap().get(tableName);\n\n if(createTableResult == null){\n CreateTmpTableParser.SqlParserResult tmpTableResult = sqlTree.getTmpTableMap().get(tableName);\n if (tmpTableResult == null){\n throw new RuntimeException(\"can't find table \" + tableName);\n }\n } else {\n AbstractTableInfo tableInfo = tableInfoParser.parseWithTableType(ETableType.SOURCE.getType(),\n createTableResult, LOCAL_SQL_PLUGIN_ROOT);\n sqlTree.addTableInfo(tableName, tableInfo);\n }\n }\n }\n }\n\n return sqlTree;\n }",
"public static void main(String args[])\r\n {\r\n try\r\n {\r\n PrintWriter outLog = new PrintWriter(System.out);\r\n for (int i = 0; i <args.length; i++)\r\n {\r\n outLog.println(args[i]+\": generating Access Jet DDL\");\r\n in = new ObjectInputStream(new FileInputStream(args[i]));\r\n Database database = (Database)in.readObject();\r\n generate(database, \"\", outLog);\r\n }\r\n outLog.flush();\r\n }\r\n catch (Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }",
"public void createInputRow() throws IOException {\n\t\tStringBuilder fileData = new StringBuilder();\n\t\tfileData.append(\"package dbmsProject;\\n\");\n\t\tfileData.append(\"public class InputRow{\\n\");\n\t\tArrayList<String> list = new ArrayList<String>( Arrays.asList(new String[]{\"cust\", \"prod\", \"day\", \"month\", \"year\", \"state\", \"quant\"}));\n\t\tfor(int i=0;i<list.size();i++ ) {\n\t\t\tString select = list.get(i);\n\t\t\tboolean found=false;\n\t\t\tfor(String str: payload.getselect_variables()) {\n\t\t\t\tif(str.contains(select)) {\n\t\t\t\t\tprojectionVars.add(select);\n\t\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t\t\tfound=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(found) continue;\n\t\t\tfor(String str: payload.getgrouping_attributes()) {\n\t\t\t\tif(str.contains(select)) {\n\t\t\t\t\tprojectionVars.add(select);\n\t\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t\t\tfound=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(found) continue;\n\t\t\tfor(String str: payload.getaggregate_functions()) {\n\t\t\t\tif(str.contains(select)) {\n\t\t\t\t\tprojectionVars.add(select);\n\t\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t\t\tfound=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(found) continue;\n\t\t\tfor(String str: payload.getsuch_that_predicates()) {\n\t\t\t\tif(str.contains(select)) {\n\t\t\t\t\tprojectionVars.add(select);\n\t\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t\t\tfound=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(found) continue;\n\t\t\tif(payload.isHavingClause() && payload.getHavingClause().contains(select)) {\n\t\t\t\tprojectionVars.add(select);\n\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t\tfound=true;\n\t\t\t}\n\t\t\tif(found) continue;\n\t\t\tif(payload.getIsWhereClause() && payload.getWhereClause().contains(select)) {\n\t\t\t\tprojectionVars.add(select);\n\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfileData.append(\"}\\n\");\n\t\tFileOutputStream fos = new FileOutputStream(\"src/dbmsProject/InputRow.java\");\n\t\tfos.write(fileData.toString().getBytes());\n\t\tfos.flush();\n\t\tfos.close();\n\t}",
"private String produceSQL(String[] cols) {\n StringBuffer buffer = new StringBuffer();\n buffer.append('(');\n buffer.append(cols[0]);\n\n for (int i = 1; i < cols.length; i++){\n buffer.append(',');\n buffer.append(cols[i]);\n }\n buffer.append(')');\n return buffer.toString();\n }",
"@Override\n\tpublic String onPrepareStatement(String sql) {\n\t\tif(!sql.contains(INSERT)){\n\t\t\t// We have to handle criteria query bit differently since\n\t\t\t// Hibernate framework is adding extra comment (/* criteria query */) to the query.\n\t\t\tif(sql.contains(\"/* criteria query */\")){\n\t\t\t\tsql = sql.replace(\"/* criteria query */\", \"\");\n\t\t\t}\n\t\t\treturn sql;\n\t\t}\n\t\tif(sql.contains(SEPARATOR+INSERT)){\n\t\t\treturn sql;\n\t\t}\n\t\tString modelClass=\"\";\n\t\tString calComment = \"\";\n\t\t\n\t\tStringBuilder fullQuery = new StringBuilder(sql);\n\t\t// Manipulating the existing comment \n\t\ttry{\n\t\t\tif (sql.indexOf(\"/* \") != -1){\n\t\t\t\tString str = sql.substring(sql.indexOf(\"/*\")+2, sql.indexOf(\"*/\")-1);\n\t\t\t\tmodelClass = str.substring(str.lastIndexOf('.')+1,str.length());\n\t\t\t}\n\t\t\t\n\t\t\tcalComment = modelClass+SEPARATOR+INSERT ;\n\t\t\tsql = sql.substring(sql.indexOf(\"*/\")+2).trim();\n\t\t\tfullQuery = new StringBuilder(sql.length());\n\t\t\t\n\t\t\tfullQuery.append(\"/* \").append(calComment).append(\n\t\t\t\t\t\" */ \").append(sql);\n\t\t}catch (Exception e) {\n\t\t\t// No Operation -- Stick to original query and comment\n\t\t}\n\t\t\n\t\treturn fullQuery.toString();\n\t}",
"void writeSQL(boolean revTableExists, boolean pageTableExists, GeneratorMode mode)\n\t{\n\t\ttry (Writer writer = new BufferedWriter(new OutputStreamWriter(\n\t\t\t\tnew BufferedOutputStream(new FileOutputStream(outputPath)), charset))){\n\t\t\tStringBuilder dataToDump = new StringBuilder();\n\n\t\t\tdataToDump.append(generateTemplateIdSQLStatement(this.tableExists));\n\n\t\t\tif (mode.active_for_pages) {\n\t\t\t\tdataToDump.append(generatePageSQLStatement(pageTableExists,\n\t\t\t\t\t\tmode.templateNameToPageId));\n\t\t\t}\n\t\t\tif (mode.active_for_revisions) {\n\t\t\t\tdataToDump.append(generateRevisionSQLStatement(revTableExists,\n\t\t\t\t\t\tmode.templateNameToRevId));\n\t\t\t}\n\t\t\twriter.write(dataToDump.toString());\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tlogger.error(\"Error writing SQL file: {}\", e.getMessage(), e);\n\t\t}\n\t}",
"public static void main(String args[]){\n SQLTagsGeneratorTable sqlTagsGeneratorTable=new SQLTagsGeneratorTable();\n ClassSQLContract classSQLContract=\n new ClassSQLContract(sqlTagsGeneratorTable);\n System.out.println(classSQLContract.getClassSQLContract());\n\t}",
"@Override\n public List<String> buildCreateTableStatements(TableId table,\n Collection<SinkRecordField> fields) {\n List<String> sqlQueries = new ArrayList<>();\n if (table.schemaName() != null) {\n sqlQueries.add(buildCreateSchemaStatement(table));\n }\n sqlQueries.add(super.buildCreateTableStatement(table, fields));\n\n Optional<SinkRecordField> timeField = getTimeField(fields);\n if (!timeField.isPresent()) {\n log.warn(\"Time column is not present. Skipping hypertable creation..\");\n } else {\n sqlQueries.add(buildCreateHyperTableStatement(table, timeField.get().name()));\n }\n\n return sqlQueries;\n }",
"public CustomSql getCustomSqlInsert();",
"public static void CreateSpartanLHCScript(String outputPath, ArrayList<String> parameters,\n\t ArrayList<String> minVals, ArrayList<String> maxVals, ArrayList<String> baseline,\n\t ArrayList<String> increment)\n {\n\ttry\n\t{\n\t PrintWriter writer = new PrintWriter(outputPath + \"/OAT_Sampling.R\", \"UTF-8\");\n\t writer.println(\"library(spartan)\");\n\n\t // Write the filepath\n\n\t String OS = System.getProperty(\"os.name\").toLowerCase();\n\t if (OS.indexOf(\"win\") >= 0)\n\t {\n\t\tString winOutputPath = outputPath.replace(\"\\\\\", \"/\");\n\t\twriter.println(\"FILEPATH<-\\\"\" + winOutputPath + \"\\\"\");\n\t }\n\t else\n\t {\n\t\t// Not Windows\n\t\twriter.println(\"FILEPATH<-\\\"\" + outputPath + \"\\\"\");\n\t }\n\n\t // Now add the Parameters\n\t String parameterLine = \"PARAMETERS<-c(\";\n\t String minLine = \"PMIN<-c(\";\n\t String maxLine = \"PMAX<-c(\";\n\t String baselineLine = \"BASELINE<-c(\";\n\t String incLine = \"PINC<-c(\";\n\n\t for (int param = 0; param < parameters.size() - 1; param++)\n\t {\n\t\tparameterLine = parameterLine + \"\\\"\" + parameters.get(param) + \"\\\",\";\n\t\tminLine = minLine + \"\" + minVals.get(param) + \",\";\n\t\tmaxLine = maxLine + \"\" + maxVals.get(param) + \",\";\n\t\tbaselineLine = baselineLine + \"\" + baseline.get(param) + \",\";\n\t\tincLine = incLine + \"\" + increment.get(param) + \",\";\n\t }\n\t // Now add the final parameter\n\t parameterLine = parameterLine + \"\\\"\" + parameters.get(parameters.size() - 1) + \"\\\")\";\n\t minLine = minLine + \"\" + minVals.get(parameters.size() - 1) + \")\";\n\t maxLine = maxLine + \"\" + maxVals.get(parameters.size() - 1) + \")\";\n\t baselineLine = baselineLine + \"\" + baseline.get(parameters.size() - 1) + \")\";\n\t incLine = incLine + \"\" + increment.get(parameters.size() - 1) + \")\";\n\n\t writer.println(parameterLine);\n\t writer.println(minLine);\n\t writer.println(maxLine);\n\t writer.println(baselineLine);\n\t writer.println(incLine);\n\n\t // Write the call\n\t writer.println(\"oat_parameter_sampling(FILEPATH,PARAMETERS,BASELINE,PMIN,PMAX,PINC)\");\n\n\t writer.close();\n\n\t}\n\tcatch (Exception e)\n\t{\n\t e.printStackTrace();\n\t}\n\n }",
"public ListSqlHelper() {\n\t\t// for bran creation\n\t}",
"private String[] generateAlterTable(String pTableName, List<DatabaseMergeResult> pMergeResult, ObjectSet<?> pObjectSet) {\r\n\t\tList<String> scriptsList = new ArrayList<String>();\r\n\t\tString[] returnedValue = null;\r\n\t\t\r\n\t\tfor(DatabaseMergeResult result : pMergeResult) {\r\n\t\t\tswitch (result.Action) {\r\n\t\t\t\tcase DatabaseMergeResult.ACTION_ADD:\r\n\t\t\t\t\tDataMapping mapping = getDataMapping(result.FieldName, pObjectSet);\r\n\t\t\t\t\t\r\n\t\t\t\t\tString fieldScript = generateFieldScript(mapping);\r\n\t\t\t\t\tif (fieldScript != null) {\r\n\t\t\t\t\t\tscriptsList.add(String.format(\"ALTER TABLE %s ADD COLUMN %s\", pTableName, fieldScript)); \r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (scriptsList.size() > 0) {\r\n\t\t\treturnedValue = scriptsList.toArray(new String[scriptsList.size()]); \r\n\t\t}\r\n\t\tscriptsList.clear();\r\n\t\tscriptsList = null;\r\n\t\t\r\n\t\treturn returnedValue;\r\n\t}",
"public static void main(String[] args) {\r\n\t\tConvertTSVToSQLiteOperation conversion = extractArguments(args);\r\n\t\tif (conversion == null)\r\n\t\t\tdie(USAGE);\r\n\t\t// first, parse the input TSV file into an SQL commands file\r\n\t\tBufferedReader reader = null;\r\n\t\tPrintWriter writer = null;\r\n\t\ttry {\r\n\t\t\treader = new BufferedReader(new FileReader(conversion.tsvFile));\r\n\t\t\twriter = new PrintWriter(conversion.sqlCommandsFile);\r\n\t\t\t// read the header line to extract the column names\r\n\t\t\tint chunk = 0;\r\n\t\t\tString line = reader.readLine();\r\n\t\t\tif (line == null)\r\n\t\t\t\tthrow new IllegalArgumentException(String.format(\r\n\t\t\t\t\t\"File [%s] does not contain a valid header line.\",\r\n\t\t\t\t\tconversion.tsvFile.getAbsolutePath()));\r\n\t\t\tString[] columns = line.split(\"\\\\t\");\r\n\t\t\tif (columns == null || columns.length < 1)\r\n\t\t\t\tthrow new IllegalArgumentException(String.format(\r\n\t\t\t\t\t\"Header line [%s] from file [%s] could not be parsed \" +\r\n\t\t\t\t\t\"to properly extract the file's column names.\", line,\r\n\t\t\t\t\tconversion.tsvFile.getAbsolutePath()));\r\n\t\t\t// read the first row to to determine column types from the values\r\n\t\t\tline = reader.readLine();\r\n\t\t\tif (line == null)\r\n\t\t\t\tthrow new IllegalArgumentException(String.format(\r\n\t\t\t\t\t\"File [%s] contains no valid data rows.\",\r\n\t\t\t\t\tconversion.tsvFile.getAbsolutePath()));\r\n\t\t\tString[] values = line.split(\"\\\\t\");\r\n\t\t\tif (values == null || values.length != columns.length)\r\n\t\t\t\tthrow new IllegalArgumentException(String.format(\r\n\t\t\t\t\t\"First data row [%s] from file [%s] could not be parsed \" +\r\n\t\t\t\t\t\"into a valid array of values, whose length matches that \" +\r\n\t\t\t\t\t\"of the parsed header line (%d).\", line,\r\n\t\t\t\t\tconversion.tsvFile.getAbsolutePath(), columns.length));\r\n\t\t\t// start with static table creation statement\r\n\t\t\tStringBuffer tableCreation =\r\n\t\t\t\tnew StringBuffer(\"CREATE TABLE Result\\n(\");\r\n\t\t\t// add columns found in the header line\r\n\t\t\tfor (int i=0; i<columns.length; i++)\r\n\t\t\t\ttableCreation.append(String.format(\"%s %s,\\n\",\r\n\t\t\t\t\tcleanColumnName(columns[i]), getColumnType(values[i])));\r\n\t\t\t// chomp trailing comma and newline\r\n\t\t\tif (tableCreation.toString().endsWith(\",\\n\"))\r\n\t\t\t\ttableCreation.setLength(tableCreation.length() - 2);\r\n\t\t\t// close the table creation statement\r\n\t\t\ttableCreation.append(\");\");\r\n\t\t\twriter.println(tableCreation.toString());\r\n\t\t\t// write static insert statement before the first chunk of rows\r\n\t\t\twriter.println(\"INSERT INTO Result SELECT\");\r\n\t\t\t// write the first row\r\n\t\t\twriter.print(getRowInsertion(values));\r\n\t\t\tchunk++;\r\n\t\t\t// write the rest of the rows\r\n\t\t\tint row = 2;\r\n\t\t\twhile ((line = reader.readLine()) != null) {\r\n\t\t\t\t// parse the row into values\r\n\t\t\t\tvalues = line.split(\"\\\\t\");\r\n\t\t\t\tif (values == null || values.length != columns.length)\r\n\t\t\t\t\tthrow new IllegalArgumentException(String.format(\r\n\t\t\t\t\t\t\"Data row %d [%s] from file [%s] could not be \" +\r\n\t\t\t\t\t\t\"parsed into a valid array of values, whose length \" +\r\n\t\t\t\t\t\t\"matches that of the parsed header line (%d).\",\r\n\t\t\t\t\t\trow, line, conversion.tsvFile.getAbsolutePath(),\r\n\t\t\t\t\t\tcolumns.length));\r\n\t\t\t\t// SQLite will only tolerate insert statements with a\r\n\t\t\t\t// maximum of 500 rows each, so if we've reached the\r\n\t\t\t\t// end of this chunk, close it out and start a new one\r\n\t\t\t\tif (chunk >= 500) {\r\n\t\t\t\t\twriter.println(\";\");\r\n\t\t\t\t\twriter.println(\"INSERT INTO Result SELECT\");\r\n\t\t\t\t\tchunk = 0;\r\n\t\t\t\t} else writer.println(\" UNION ALL SELECT\");\r\n\t\t\t\t// write this row\r\n\t\t\t\twriter.print(getRowInsertion(values));\r\n\t\t\t\trow++;\r\n\t\t\t\tchunk++;\r\n\t\t\t}\r\n\t\t\t// close the full insert statement\r\n\t\t\twriter.println(\";\");\r\n\t\t} catch (Throwable error) {\r\n\t\t\tdie(\"Could not write parsed TSV file to \" +\r\n\t\t\t\t\"SQL database creation commands file.\", error);\r\n\t\t} finally {\r\n\t\t\ttry { reader.close(); } catch (Throwable error) {}\r\n\t\t\ttry { writer.close(); } catch (Throwable error) {}\r\n\t\t}\r\n\t\t// then, create the SQLite database and\r\n\t\t// populate it with the SQL commands file\r\n\t\tProcess process = null;\r\n\t\tInteger exitValue = null;\r\n\t\tString output = null;\r\n\t\ttry {\r\n\t\t\tProcessBuilder builder = new ProcessBuilder();\r\n\t\t\tbuilder.command(\r\n\t\t\t\t\"sqlite3\", \"-batch\", \"-init\",\r\n\t\t\t\tconversion.sqlCommandsFile.getAbsolutePath(),\r\n\t\t\t\tconversion.sqliteDBFile.getAbsolutePath(), \".exit\"\r\n\t\t\t);\r\n\t\t\tbuilder.redirectErrorStream(true);\r\n\t\t\tprocess = builder.start();\r\n\t\t\texitValue = process.waitFor();\r\n\t\t\toutput = getConsoleOutput(process);\r\n\t\t} catch (Throwable error) {\r\n\t\t\tdie(\"Could not run SQL database creation commands \" +\r\n\t\t\t\t\"file to generate SQLite result database.\", error);\r\n\t\t} finally {\r\n\t\t\ttry { process.getInputStream().close(); } catch (Throwable error) {}\r\n\t\t\ttry { process.getOutputStream().close(); } catch (Throwable error) {}\r\n\t\t\ttry { process.getErrorStream().close(); } catch (Throwable error) {}\r\n\t\t\ttry { process.destroy(); } catch (Throwable error) {}\r\n\t\t}\r\n\t\t// verify that the SQLite database was successfully created\r\n\t\tif (conversion.sqliteDBFile.canRead() &&\r\n\t\t\tdatabaseCreationSucceeded(exitValue, output) == false)\r\n\t\t\tdie(String.format(\"Failed to generate SQLite result database [%s].\",\r\n\t\t\t\tconversion.sqliteDBFile.getAbsolutePath()));\r\n\t}",
"SQLCaseWhens createSQLCaseWhens();",
"public String toSQL(String tableName, Vector pk, Map additionalColumn)\n {\n /*\n CREATE TABLE distributors (\n did integer,\n name varchar(40) );\n */\n StringBuffer buf = new StringBuffer();\n buf.append(\"CREATE TABLE \" + tableName + \"( \\n\");\n for (Iterator it = attDBTypeList.keySet().iterator(); it.hasNext(); )\n {\n String attribute = (String) it.next();\n String dbtype = (String) attDBTypeList.get(attribute);\n buf.append(\" \" + attribute + \" \" + dbtype + \",\\n\");\n }\n\n if (additionalColumn != null) // 2005-03-28\n {\n for (Iterator it = additionalColumn.keySet().iterator(); it.hasNext(); )\n {\n String attribute = (String) it.next();\n String dbtype = (String) additionalColumn.get(attribute);\n buf.append(\" \" + attribute + \" \" + dbtype + \",\\n\");\n }\n }\n\n /*\n CREATE TABLE distributors (\n did integer CHECK (did > 100),\n name varchar(40),\n CONSTRAINT distributors_pkey PRIMARY KEY (did,name)\n );\n */\n\n if (pk != null)\n {\n buf.append(\"CONSTRAINT \" + tableName + \"_pkey PRIMARY KEY (\");\n for (int i = 0; i < pk.size() - 1; i++)\n {\n buf.append(pk.elementAt(i) + \",\");\n }\n buf.append(pk.elementAt(pk.size() - 1));\n\n buf.append(\"),\\n\");\n }\n\n String sql = buf.toString();\n sql = sql.substring(0, sql.length() - 2); // filter out the last \",\\n\"\n sql = sql + \");\";\n return sql;\n }",
"public static void main(String[] args) {\n\t\tAluno cesar = new Aluno(\"Cesar\",80,26);\n\t\tGenericDao dao = new GenericDao();\n\t\tdao.generateSQL(cesar);\t\t\n\t}",
"public final void executeSQL(Connection conn,DbConnVO vo,String fileName) throws Throwable {\r\n PreparedStatement pstmt = null;\r\n StringBuffer sql = new StringBuffer(\"\");\r\n InputStream in = null;\r\n\r\n try {\r\n try {\r\n in = this.getClass().getResourceAsStream(\"/\" + fileName);\r\n }\r\n catch (Exception ex5) {\r\n }\r\n if (in==null)\r\n in = new FileInputStream(org.openswing.swing.util.server.FileHelper.getRootResource() + fileName);\r\n\r\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\r\n String line = null;\r\n ArrayList vals = new ArrayList();\r\n int pos = -1;\r\n String oldfk = null;\r\n String oldIndex = null;\r\n StringBuffer newIndex = null;\r\n StringBuffer newfk = null;\r\n ArrayList fks = new ArrayList();\r\n ArrayList indexes = new ArrayList();\r\n boolean fkFound = false;\r\n boolean indexFound = false;\r\n String defaultValue = null;\r\n int index = -1;\r\n StringBuffer unicode = new StringBuffer();\r\n boolean useDefaultValue = false;\r\n// vo.getDriverName().equals(\"oracle.jdbc.driver.OracleDriver\") ||\r\n// vo.getDriverName().equals(\"com.microsoft.jdbc.sqlserver.SQLServerDriver\") ||\r\n//\t\t\t\t\tvo.getDriverName().equals(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\") ||\r\n// vo.getDriverName().equals(\"com.mysql.jdbc.Driver\");\r\n while ( (line = br.readLine()) != null) {\r\n sql.append(' ').append(line);\r\n if (line.endsWith(\";\")) {\r\n if (vo.getDriverName().equals(\"oracle.jdbc.driver.OracleDriver\")) {\r\n sql = replace(sql, \" VARCHAR(\", \" VARCHAR2(\");\r\n sql = replace(sql, \" NUMERIC(\", \" NUMBER(\");\r\n sql = replace(sql, \" DECIMAL(\", \" NUMBER(\");\r\n sql = replace(sql, \" TIMESTAMP\", \" DATE \");\r\n sql = replace(sql, \" DATETIME\", \" DATE \");\r\n }\r\n else if (vo.getDriverName().equals(\"com.microsoft.jdbc.sqlserver.SQLServerDriver\")) {\r\n sql = replace(sql, \" TIMESTAMP\", \" DATETIME \");\r\n sql = replace(sql, \" DATE \", \" DATETIME \");\r\n }\r\n else if (vo.getDriverName().equals(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\")) {\r\n sql = replace(sql, \" TIMESTAMP\", \" DATETIME \");\r\n sql = replace(sql, \" DATE \", \" DATETIME \");\r\n }\r\n else if (vo.getDriverName().toLowerCase().contains(\"postgres\")) {\r\n sql = replace(sql, \" DATETIME\", \" TIMESTAMP \");\r\n sql = replace(sql, \" DATE \", \" TIMESTAMP \");\r\n }\r\n else {\r\n sql = replace(sql, \" DATE \", \" DATETIME \");\r\n }\r\n\r\n\r\n sql = replace(sql,\"ON DELETE NO ACTION\",\"\");\r\n sql = replace(sql,\"ON UPDATE NO ACTION\",\"\");\r\n\r\n if (sql.indexOf(\":COMPANY_CODE\") != -1) {\r\n sql = replace(sql, \":COMPANY_CODE\", \"'\" + vo.getCompanyCode() + \"'\");\r\n }\r\n if (sql.indexOf(\":COMPANY_DESCRIPTION\") != -1) {\r\n sql = replace(sql, \":COMPANY_DESCRIPTION\",\r\n \"'\" + vo.getCompanyDescription() + \"'\");\r\n }\r\n if (sql.indexOf(\":LANGUAGE_CODE\") != -1) {\r\n sql = replace(sql, \":LANGUAGE_CODE\",\r\n \"'\" + vo.getLanguageCode() + \"'\");\r\n }\r\n if (sql.indexOf(\":LANGUAGE_DESCRIPTION\") != -1) {\r\n sql = replace(sql, \":LANGUAGE_DESCRIPTION\",\r\n \"'\" + vo.getLanguageDescription() + \"'\");\r\n }\r\n if (sql.indexOf(\":CLIENT_LANGUAGE_CODE\") != -1) {\r\n sql = replace(sql, \":CLIENT_LANGUAGE_CODE\",\r\n \"'\" + vo.getClientLanguageCode() + \"'\");\r\n }\r\n if (sql.indexOf(\":PASSWORD\") != -1) {\r\n sql = replace(sql, \":PASSWORD\", \"'\" + vo.getAdminPassword() + \"'\");\r\n }\r\n if (sql.indexOf(\":DATE\") != -1) {\r\n sql = replace(sql, \":DATE\", \"?\");\r\n vals.add(new java.sql.Date(System.currentTimeMillis()));\r\n }\r\n\r\n if (sql.indexOf(\":CURRENCY_CODE\") != -1) {\r\n sql = replace(sql, \":CURRENCY_CODE\", \"'\" + vo.getCurrencyCodeREG03() + \"'\");\r\n }\r\n if (sql.indexOf(\":CURRENCY_SYMBOL\") != -1) {\r\n sql = replace(sql, \":CURRENCY_SYMBOL\", \"'\" + vo.getCurrencySymbolREG03() + \"'\");\r\n }\r\n if (sql.indexOf(\":DECIMALS\") != -1) {\r\n sql = replace(sql, \":DECIMALS\", vo.getDecimalsREG03().toString());\r\n }\r\n if (sql.indexOf(\":DECIMAL_SYMBOL\") != -1) {\r\n sql = replace(sql, \":DECIMAL_SYMBOL\", \"'\" + vo.getDecimalSymbolREG03() + \"'\");\r\n }\r\n if (sql.indexOf(\":THOUSAND_SYMBOL\") != -1) {\r\n sql = replace(sql, \":THOUSAND_SYMBOL\", \"'\" + vo.getThousandSymbolREG03() + \"'\");\r\n }\r\n\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_1\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_1\", \"'\" + vo.getUseVariantType1() + \"'\");\r\n }\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_2\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_2\", \"'\" + vo.getUseVariantType2() + \"'\");\r\n }\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_3\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_3\", \"'\" + vo.getUseVariantType3() + \"'\");\r\n }\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_4\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_4\", \"'\" + vo.getUseVariantType4() + \"'\");\r\n }\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_5\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_5\", \"'\" + vo.getUseVariantType5() + \"'\");\r\n }\r\n\r\n if (sql.indexOf(\":VARIANT_1\") != -1) {\r\n sql = replace(sql, \":VARIANT_1\", \"'\" + (vo.getVariant1()==null || vo.getVariant1().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant1()) + \"'\");\r\n }\r\n if (sql.indexOf(\":VARIANT_2\") != -1) {\r\n sql = replace(sql, \":VARIANT_2\", \"'\" + (vo.getVariant2()==null || vo.getVariant2().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant2()) + \"'\");\r\n }\r\n if (sql.indexOf(\":VARIANT_3\") != -1) {\r\n sql = replace(sql, \":VARIANT_3\", \"'\" + (vo.getVariant3()==null || vo.getVariant3().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant3()) + \"'\");\r\n }\r\n if (sql.indexOf(\":VARIANT_4\") != -1) {\r\n sql = replace(sql, \":VARIANT_4\", \"'\" + (vo.getVariant4()==null || vo.getVariant4().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant4()) + \"'\");\r\n }\r\n if (sql.indexOf(\":VARIANT_5\") != -1) {\r\n sql = replace(sql, \":VARIANT_5\", \"'\" + (vo.getVariant5()==null || vo.getVariant5().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant5()) + \"'\");\r\n }\r\n\r\n if (!useDefaultValue)\r\n while((pos=sql.indexOf(\"DEFAULT \"))!=-1) {\r\n defaultValue = sql.substring(pos, sql.indexOf(\",\", pos));\r\n sql = replace(\r\n sql,\r\n defaultValue,\r\n \"\"\r\n );\r\n }\r\n\r\n fkFound = false;\r\n while((pos=sql.indexOf(\"FOREIGN KEY\"))!=-1) {\r\n oldfk = sql.substring(pos,sql.indexOf(\")\",sql.indexOf(\")\",pos)+1)+1);\r\n sql = replace(\r\n sql,\r\n oldfk,\r\n \"\"\r\n );\r\n newfk = new StringBuffer(\"ALTER TABLE \");\r\n newfk.append(sql.substring(sql.indexOf(\" TABLE \")+7,sql.indexOf(\"(\")).trim());\r\n newfk.append(\" ADD \");\r\n newfk.append(oldfk);\r\n fks.add(newfk);\r\n fkFound = true;\r\n }\r\n\r\n if (fkFound)\r\n sql = removeCommasAtEnd(sql);\r\n\r\n indexFound = false;\r\n while((pos=sql.indexOf(\"INDEX \"))!=-1) {\r\n oldIndex = sql.substring(pos,sql.indexOf(\")\",pos)+1);\r\n sql = replace(\r\n sql,\r\n oldIndex,\r\n \"\"\r\n );\r\n newIndex = new StringBuffer(\"CREATE \");\r\n newIndex.append(oldIndex.substring(0,oldIndex.indexOf(\"(\")));\r\n newIndex.append(\" ON \");\r\n newIndex.append(sql.substring(sql.indexOf(\" TABLE \")+7,sql.indexOf(\"(\")).trim());\r\n newIndex.append( oldIndex.substring(oldIndex.indexOf(\"(\")) );\r\n indexes.add(newIndex);\r\n indexFound = true;\r\n }\r\n\r\n if (indexFound)\r\n sql = removeCommasAtEnd(sql);\r\n\r\n // check for unicode chars...\r\n while((index=sql.indexOf(\"\\\\u\"))!=-1) {\r\n for(int i=index+2;i<Math.min(sql.length(),index+2+6);i++)\r\n if (Character.isDigit(sql.charAt(i)) ||\r\n sql.charAt(i)=='A' ||\r\n sql.charAt(i)=='B' ||\r\n sql.charAt(i)=='C' ||\r\n sql.charAt(i)=='D' ||\r\n sql.charAt(i)=='E' ||\r\n sql.charAt(i)=='F')\r\n if (unicode.length() < 4)\r\n unicode.append(sql.charAt(i));\r\n else\r\n break;\r\n if (unicode.length()>0) {\r\n sql.delete(index, index+1+unicode.length());\r\n sql.setCharAt(index, new Character((char)Integer.valueOf(unicode.toString(),16).intValue()).charValue());\r\n unicode.delete(0, unicode.length());\r\n }\r\n }\r\n\r\n\r\n if (sql.toString().toUpperCase().contains(\"DROP TABLE\")) {\r\n // remove fks before dropping table!\r\n String table = sql.toString().toUpperCase().replace('\\n',' ').replace('\\r',' ').trim();\r\n table = table.substring(10).trim();\r\n if (table.endsWith(\";\"))\r\n table = table.substring(0,table.length()-1);\r\n ResultSet rset = conn.getMetaData().getExportedKeys(null,vo.getUsername().toUpperCase(),table);\r\n String fkName = null;\r\n String tName = null;\r\n Statement stmt2 = conn.createStatement();\r\n boolean fksFound = false;\r\n while(rset.next()) {\r\n fksFound = true;\r\n tName = rset.getString(7);\r\n fkName = rset.getString(12);\r\n\r\n if (vo.getDriverName().equals(\"com.mysql.jdbc.Driver\"))\r\n stmt2.execute(\"ALTER TABLE \"+tName+\" DROP FOREIGN KEY \"+fkName);\r\n else\r\n stmt2.execute(\"ALTER TABLE \"+tName+\" DROP CONSTRAINT \"+fkName);\r\n }\r\n try {\r\n rset.close();\r\n }\r\n catch (Exception ex6) {}\r\n\r\n if (!fksFound &&\r\n !vo.getDriverName().equals(\"oracle.jdbc.driver.OracleDriver\") &&\r\n !vo.getDriverName().equals(\"com.microsoft.jdbc.sqlserver.SQLServerDriver\") &&\r\n !vo.getDriverName().equals(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\") &&\r\n !vo.getDriverName().equals(\"com.mysql.jdbc.Driver\")\r\n && !vo.getDriverName().equals(\"org.sqlite.JDBC\")) {\r\n // case postgres...\r\n rset = conn.getMetaData().getExportedKeys(null,null,null);\r\n while(rset.next()) {\r\n if (rset.getString(3).toUpperCase().equals(table)) {\r\n tName = rset.getString(7);\r\n fkName = rset.getString(12);\r\n\r\n if (vo.getDriverName().equals(\"com.mysql.jdbc.Driver\"))\r\n stmt2.execute(\"ALTER TABLE \"+tName+\" DROP FOREIGN KEY \"+fkName);\r\n else\r\n stmt2.execute(\"ALTER TABLE \"+tName+\" DROP CONSTRAINT \"+fkName);\r\n }\r\n }\r\n try {\r\n rset.close();\r\n }\r\n catch (Exception ex6) {}\r\n }\r\n\r\n try {\r\n stmt2.close();\r\n }\r\n catch (Exception ex6) {}\r\n\r\n } // end if\r\n\r\n if (sql.toString().trim().length()>0) {\r\n String query = sql.toString().substring(0,sql.length() - 1);\r\n System.out.println(\"Execute query: \" + query);\r\n pstmt = conn.prepareStatement(query);\r\n for (int i = 0; i < vals.size(); i++) {\r\n pstmt.setObject(i + 1, vals.get(i));\r\n }\r\n\r\n try {\r\n pstmt.execute();\r\n }\r\n catch (SQLException ex4) {\r\n try {\r\n if (sql.toString().toUpperCase().contains(\"DROP TABLE\")) {\r\n//\t\t\t\t\t\t\t\t\tLogger.error(\"NONAME\", this.getClass().getName(), \"executeSQL\",\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"Invalid SQL: \" + sql, ex4);\r\n }\r\n else\r\n throw ex4;\r\n }\r\n catch (Exception exx4) {\r\n throw ex4;\r\n }\r\n }\r\n pstmt.close();\r\n }\r\n\r\n sql.delete(0, sql.length());\r\n vals.clear();\r\n }\r\n }\r\n br.close();\r\n\r\n for(int i=0;i<fks.size();i++) {\r\n sql = (StringBuffer)fks.get(i);\r\n pstmt = conn.prepareStatement(sql.toString());\r\n try {\r\n pstmt.execute();\r\n }\r\n catch (SQLException ex4) {\r\n Logger.error(\"NONAME\", this.getClass().getName(), \"executeSQL\",\r\n \"Invalid SQL: \" + sql, ex4);\r\n }\r\n pstmt.close();\r\n }\r\n\r\n for(int i=0;i<indexes.size();i++) {\r\n sql = (StringBuffer)indexes.get(i);\r\n pstmt = conn.prepareStatement(sql.toString());\r\n try {\r\n pstmt.execute();\r\n }\r\n catch (SQLException ex3) {\r\n Logger.error(\"NONAME\", this.getClass().getName(), \"executeSQL\",\r\n \"Invalid SQL: \" + sql, ex3);\r\n }\r\n pstmt.close();\r\n }\r\n\r\n conn.commit();\r\n\r\n }\r\n catch (Throwable ex) {\r\n try {\r\n Logger.error(\"NONAME\", this.getClass().getName(), \"executeSQL\",\r\n \"Invalid SQL: \" + sql, ex);\r\n }\r\n catch (Exception ex2) {\r\n }\r\n throw ex;\r\n }\r\n finally {\r\n try {\r\n if (pstmt!=null)\r\n pstmt.close();\r\n }\r\n catch (SQLException ex1) {\r\n }\r\n }\r\n }",
"public String getGeneratedSql() {\n/* 142 */ return this.sql;\n/* */ }",
"public Creator_4_tables() {\n// this.sourceUnits = sourceUnits;\n sourceUnits = new HashMap<String, PojoSourceCreatorUnit>();\n sourceTemplatePool.logEnvOnSrcCreate = app.cfg.getCfgBean().logEnvOnSrcCreate;\n env.setLogLeading(\"--cfenv--\");\n }",
"public AbstractSQLScriptFactory(String quotes, DataModel model, DBExecMode dbMode) {\r\n\t\tsuper();\r\n\t\tthis.dbMode = dbMode;\r\n\t\tthis.model = model;\r\n\t\tthis.quotes = quotes;\r\n\t}",
"private void createTables() {\n\t\tStatement s = null;\n\t\ttry {\n\t\t\ts = conn.createStatement();\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\tString createString = \"CREATE TABLE targeteprs (\" +\n\t\t\t\t\t \"targetepr varchar(255) NOT NULL, \" +\n\t\t\t\t\t \"processID varchar(255) NOT NULL, \" +\n\t\t\t\t\t \"operation varchar(255) NOT NULL, \" +\n\t\t\t\t\t \"status varchar(255) NOT NULL, \" +\n\t\t\t\t\t \"uniqueID varchar(255) NOT NULL, \" +\n\t\t\t\t\t \"correlationKey varchar(255) NOT NULL, \"+\n\t\t\t\t\t \"correlationValue varchar(255) NOT NULL)\";\n\t\t//System.out.println(\"CREATE: \" + createString);\n\t\tSystem.out.println(\"--> Created targetepr table.\");\n\t\ttry {\n\t\t\tthis.insertQuery(createString);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tcreateString = \"CREATE TABLE workflow (\" +\n\t\t\t\t\t \"uniqueID varchar(100) NOT NULL, \" +\n\t\t\t\t\t \"processID varchar(255) NOT NULL, \" +\n\t\t\t\t\t \"operation varchar(255) NOT NULL, \" +\n\t\t\t\t\t \"status varchar(255) NOT NULL, \" +\n\t\t\t\t\t \"correlationKey varchar(255) NOT NULL, \"+\n\t\t\t\t\t \"correlationValue varchar(255) NOT NULL)\";\n\t\t//System.out.println(\"CREATE: \" + createString);\n\t\tSystem.out.println(\"--> Created workflow table.\");\n\t\ttry {\n\t\t\tthis.insertQuery(createString);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"private String createInsertQuery() {\r\n StringBuilder query = new StringBuilder();\r\n query.append(\"insert into \").append(m_tableName)\r\n .append(\"(\").append(m_propertyNames[0]);\r\n for (int i = 1; i < m_propertyNames.length; i++) {\r\n query.append(\",\").append(m_propertyNames[i]);\r\n }\r\n query.append(\") values (?\");\r\n for (int i = 1; i < m_propertyNames.length; i++) {\r\n query.append(\",?\");\r\n }\r\n query.append(\")\");\r\n return query.toString();\r\n }",
"public final void execute() {\n try {\n\n StringBuffer preparedTableBuf = new StringBuffer();\n preparedTableBuf.append(\"create table if not exists \");\n preparedTableBuf.append(tableName + \" (\");\n\n boolean isCompoundKey = false;\n boolean isAutoKey = \"generated\".equals(pkey);\n\n String[] pkeys = pkey.split(\",\");\n StringBuffer compoundKey = new StringBuffer();\n if (pkeys.length > 1) {\n isCompoundKey = true;\n compoundKey.append(\", PRIMARY KEY (\");\n for (int i = 0; i < pkeys.length; i++) {\n compoundKey.append(pkeys[i] + (i == pkeys.length - 1 ? \")\" : \", \"));\n }\n }\n\n if (isAutoKey) {\n preparedTableBuf\n .append(\"id integer NOT NULL PRIMARY KEY AUTO_INCREMENT, \");\n }\n for (int i = 0; i < fields.length; i++) {\n preparedTableBuf.append(fields[i]\n + \" \"\n + columnTypes[i]\n + (pkey.equals(fields[i]) ? \" NOT NULL UNIQUE PRIMARY KEY\" : \"\")\n + (i == fields.length - 1 ? (isCompoundKey ? compoundKey.toString()\n : \"\") + \")\" : \", \"));\n }\n\n PreparedStatement preparedTableCreate = conn\n .prepareStatement(preparedTableBuf.toString());\n\n log.info(\"Prepared Table Statement : \" + preparedTableBuf.toString());\n preparedTableCreate.executeUpdate();\n conn.commit();\n\n } catch (Exception e) {\n log.error(e);\n }\n\n try {\n\n StringBuffer preparedInsertBuf = new StringBuffer();\n preparedInsertBuf.append(\"insert into \");\n preparedInsertBuf.append(tableName + \" (\");\n\n for (int i = 0; i < fields.length; i++) {\n preparedInsertBuf.append(fields[i]\n + (i == fields.length - 1 ? \")\" : \", \"));\n }\n\n preparedInsertBuf.append(\" values(\");\n\n for (int i = 0; i < fields.length; i++) {\n preparedInsertBuf.append(\"?\" + (i == fields.length - 1 ? \")\" : \", \"));\n }\n\n PreparedStatement insertItemRecord = conn\n .prepareStatement(preparedInsertBuf.toString());\n\n log.info(\"Rows : \" + fileImporter.getRowCount());\n log.info(\"Prepared Insert Statement : \" + preparedInsertBuf.toString());\n\n Iterator<Row> riter = fileImporter.getRowIterator();\n\n int rows = 0;\n\n int[] result = null;\n\n while (riter.hasNext()) {\n Row row = riter.next();\n\n if (!row.isValid()) {\n continue;\n } else {\n rows++;\n }\n\n try {\n for (int i = 0; i < fields.length; i++) {\n if (columnTypes[i].contains(\"char\")) {\n insertItemRecord.setString(i + 1, row.getValue(fields[i]));\n } else if (\"integer\".equals(columnTypes[i])) {\n try {\n Integer value = Integer.parseInt(row.getValue(fields[i]));\n insertItemRecord.setInt(i + 1, value);\n } catch (Exception e) {\n insertItemRecord.setInt(i + 1, 0);\n }\n } else {\n log.error(\"unsupported column type\");\n }\n }\n\n insertItemRecord.addBatch();\n\n if (rows % batchSize == 0) {\n\n try {\n result = insertItemRecord.executeBatch();\n\n conn.commit();\n log.info(\"batch update : \" + result.length);\n } catch (BatchUpdateException e) {\n log.error(\"Batch Update failed\", e);\n log.error(\"result size: \"\n + (result == null ? \"null\" : result.length));\n\n }\n\n }\n } catch (Exception e) {\n log.error(\"couldn't process row properly\", e);\n }\n }\n // the last set of updates will probably not mod to 0\n\n try {\n result = insertItemRecord.executeBatch();\n conn.commit();\n log.info(\"batch update : \" + result.length);\n } catch (BatchUpdateException e) {\n log.error(\"Batch Update failed\", e);\n log.error(\"\");\n }\n\n } catch (Exception e) {\n log.error(e);\n e.printStackTrace();\n }\n }",
"public static void generate(Database database, String output, PrintWriter outLog)\r\n {\r\n try\r\n {\r\n String fileName;\r\n if (database.output.length() > 0)\r\n fileName = database.output;\r\n else\r\n fileName = database.name;\r\n outLog.println(\"DDL: \" + output + fileName + \".sql\");\r\n OutputStream outFile = new FileOutputStream(output + fileName + \".sql\");\r\n try\r\n {\r\n PrintWriter outData = new PrintWriter(outFile);\r\n for (int i=0; i < database.tables.size(); i++)\r\n generate((Table) database.tables.elementAt(i), outData);\r\n outData.flush();\r\n }\r\n finally\r\n {\r\n outFile.close();\r\n }\r\n }\r\n catch (IOException e1)\r\n {\r\n outLog.println(\"Generate Oracle SQL IO Error\");\r\n }\r\n }",
"public static List<String> separarInstrucoesSql(String script) {\n\n\t\tList<String> retorno = new ArrayList<String>();\n\n\t\tInteger posCaractereInicio = 0;\n\t\tInteger posCaractereFim = 0;\n\t\tString terminador = \";\";\n\t\tboolean terminouScript = false;\n\n\t\tscript = script.trim();\n\n\t\twhile (!terminouScript) {\n\n\t\t\tscript = script.trim();\n\n\t\t\tif (script.length() < 3) {\n\t\t\t\tterminouScript = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// verifica se inicia com set term\n\t\t\tString caractereAvaliado = script.substring(posCaractereInicio, 10).toUpperCase();\n\t\t\tcaractereAvaliado = script.replaceAll(\" \", \"\");\n\n\t\t\tif (caractereAvaliado.startsWith(\"SETTERM\")) {\n\t\t\t\tterminador = caractereAvaliado.substring(7, 8);\n\t\t\t\tposCaractereInicio = devolvePosicaoCaractere(script, terminador) + 2;\n\n\t\t\t\tscript = script.substring(posCaractereInicio);\n\t\t\t\tposCaractereInicio = 0;\n\t\t\t}\n\n\t\t\t// comentarios fora da instrução SQL\n\t\t\tif (caractereAvaliado.substring(0, 2).equals(\"/*\")) {\n\t\t\t\tposCaractereFim = devolveUltimaPosicaoScript(script, \"*/\", true);\n\t\t\t\tscript = script.substring(posCaractereFim + 2);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tposCaractereInicio = posicaoDoPrimeiroCaracterValido(script);\n\n\t\t\tif (posCaractereInicio > 0) {\n\t\t\t\tscript = script.substring(posCaractereInicio);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// percorrer a string até encontrar o terminador\n\t\t\tposCaractereFim = devolveUltimaPosicaoScript(script, terminador);\n\n\t\t\tif (script.length() < 3) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// adicionado na lista de scripts\n\t\t\t// System.out.println(\"-----------------------------------\");\n\t\t\t// System.out.println(script.substring(posCaractereInicio,\n\t\t\t// posCaractereFim));\n\n\t\t\tretorno.add(script.substring(posCaractereInicio, posCaractereFim));\n\n\t\t\tif (script.length() > posCaractereFim + 1)\n\t\t\t\tscript = script.substring(posCaractereFim + 1);\n\n\t\t\t// terminou os scripts\n\t\t\tscript = script.trim();\n\t\t\tif (script.length() < 10)\n\t\t\t\tterminouScript = true;\n\n\t\t\tposCaractereInicio = 0;\n\n\t\t}\n\n\t\treturn retorno;\n\t}",
"String getSafeSql(String name);",
"public static void main(String[] args) throws Exception {\n\t\tConvertDB2ToOracle_v2 convert = getInstance();\n\t\tconvert.provide(\"D:\\\\others\\\\temp\\\\db2-extra-tables.txt\");\n\t\tconvert.extractSQL(\"D:\\\\others\\\\temp\\\\ddlfile.sql\");\n\t}",
"protected void setDDLText() {\n\t\tMigrationConfiguration cfg = getMigrationWizard().getMigrationConfig();\n\t\tif (cfg.sourceIsSQL()) {\n\t\t\tbtnPreviewDDL.setSelection(false);\n\t\t\tbtnPreviewDDL.setEnabled(false);\n\t\t\tswitchText(false);\n\t\t\treturn;\n\t\t}\n\t\ttxtDDL.setText(\"\");\n\t\tprepare4SaveScript();\n\t\tList<Table> tables = new ArrayList<Table>();\n\t\tfinal CUBRIDSQLHelper ddlUtils = CUBRIDSQLHelper.getInstance(null);\n\t\tStringBuffer sbConstrains = new StringBuffer();\n\t\t\n\t\tappendSchemaDDL(cfg);\n\t\t\n\t\tfor (SourceEntryTableConfig setc : cfg.getExpEntryTableCfg()) {\n\n\t\t\tif (!setc.isCreateNewTable()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tTable tarTbl = null;\n\t\t\t\n\t\t\ttarTbl = cfg.getTargetTableSchema(setc.getTargetOwner(), setc.getTarget());\n\t\t\t\n\t\t\tif (tarTbl == null || tables.contains(tarTbl)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (setc != null && setc.getComment() != null) {\n\t\t\t\tif (tarTbl.getComment() == null || tarTbl.getComment() != setc.getComment()) {\n\t\t\t\t\ttarTbl.setComment(setc.getComment());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttarTbl.setComment(null);\n\t\t\t}\n\t\t\tfor (Column tarCol : tarTbl.getColumns()) {\n\t\t\t\tSourceColumnConfig sourceCol = setc.getColumnConfigIgnoreCase(tarCol.getName());\n\t\t\t\tif (sourceCol != null && tarCol != null){\n\t\t\t\t\tif (sourceCol.getComment() != null) {\n\t\t\t\t\t\tif (tarCol.getComment() == null || tarCol.getComment() != sourceCol.getComment()){\n\t\t\t\t\t\t\ttarCol.setComment(sourceCol.getComment());\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarCol.setComment(null);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttables.add(tarTbl);\n\t\t\tString sql = ddlUtils.getTableDDL(tarTbl, cfg.isAddUserSchema());\n\t\t\ttxtDDL.append(sql);\n\t\t\ttxtDDL.append(NEWLINE);\n\n\t\t\tfinal PK pk = tarTbl.getPk();\n\t\t\tif (setc.isCreatePK() && pk != null) {\n\t\t\t\tString ddl = ddlUtils.getPKDDL(tarTbl.getOwner(), tarTbl.getName(), pk.getName(), pk.getPkColumns(), cfg.isAddUserSchema());\n\t\t\t\tsbConstrains.append(ddl);\n\t\t\t\tsbConstrains.append(\";\");\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t}\n\n\t\t\tfor (FK fk : tarTbl.getFks()) {\n\t\t\t\tString ddl = ddlUtils.getFKDDL(tarTbl.getOwner(), tarTbl.getName(), fk, cfg.isAddUserSchema());\n\t\t\t\tsbConstrains.append(ddl);\n\t\t\t\tsbConstrains.append(\";\");\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t}\n\n\t\t\tfor (Index idx : tarTbl.getIndexes()) {\n\t\t\t\tString ddl = ddlUtils.getIndexDDL(tarTbl.getOwner(), tarTbl.getName(), idx, \"\", cfg.isAddUserSchema());\n\t\t\t\tsbConstrains.append(ddl);\n\t\t\t\tsbConstrains.append(\";\");\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t}\n\n\t\t}\n\t\tfor (SourceSQLTableConfig sstc : cfg.getExpSQLCfg()) {\n\t\t\tif (!sstc.isCreateNewTable()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tTable tarTbl = cfg.getTargetTableSchema(sstc.getTarget());\n\t\t\tif (tarTbl == null || tables.contains(tarTbl)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttables.add(tarTbl);\n\t\t\tString sql = ddlUtils.getTableDDL(tarTbl, cfg.isAddUserSchema());\n\t\t\ttxtDDL.append(sql);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t}\n\t\tfor (SourceViewConfig sc : cfg.getExpViewCfg()) {\n\t\t\tif (!sc.isCreate()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tView vw = cfg.getTargetViewSchema(sc.getTargetOwner(), sc.getTarget());\n\t\t\tString ddl = ddlUtils.getViewDDL(vw, cfg.isAddUserSchema());\n\t\t\ttxtDDL.append(ddl);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t}\n\t\tfor (SourceSequenceConfig sc : cfg.getExpSerialCfg()) {\n\t\t\tif (!sc.isCreate()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSequence sq = cfg.getTargetSerialSchema(sc.getTargetOwner(), sc.getTarget());\n\t\t\tString ddl = ddlUtils.getSequenceDDL(sq, cfg.isAddUserSchema());\n\t\t\ttxtDDL.append(ddl);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t}\n\t\tfor (SourceCSVConfig sstc : cfg.getCSVConfigs()) {\n\t\t\tif (!sstc.isCreate()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tTable tarTbl = cfg.getTargetTableSchema(sstc.getTarget());\n\t\t\tif (tarTbl == null || tables.contains(tarTbl)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttables.add(tarTbl);\n\t\t\tString sql = ddlUtils.getTableDDL(tarTbl, cfg.isAddUserSchema());\n\t\t\ttxtDDL.append(sql);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t}\n\t\ttxtDDL.append(sbConstrains.toString());\n\t}",
"private String getCreateTableSql() {\n StringBuffer stringBuffer = new StringBuffer();\r\n stringBuffer.append(\"create table if not exists \");\r\n stringBuffer.append(tableName + \"(\");\r\n //反射得到所有的成员变量\r\n Field[] fields = entityClass.getDeclaredFields();\r\n for (Field field : fields) {\r\n Class type = field.getType();\r\n if (field.getAnnotation(DbField.class) != null) {\r\n if (type == String.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" TEXT,\");\r\n } else if (type == Integer.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" INTEGER,\");\r\n } else if (type == Long.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" BIGINT,\");\r\n } else if (type == Double.class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" DOUBLE,\");\r\n } else if (type == byte[].class) {\r\n stringBuffer.append(field.getAnnotation(DbField.class).value() + \" BLOB,\");\r\n } else {\r\n //不支持的类型\r\n continue;\r\n }\r\n } else {\r\n if (type == String.class) {\r\n stringBuffer.append(field.getName() + \" TEXT,\");\r\n } else if (type == Integer.class) {\r\n stringBuffer.append(field.getName() + \" INTEGER,\");\r\n } else if (type == Long.class) {\r\n stringBuffer.append(field.getName() + \" BIGINT,\");\r\n } else if (type == Double.class) {\r\n stringBuffer.append(field.getName() + \" DOUBLE,\");\r\n } else if (type == byte[].class) {\r\n stringBuffer.append(field.getName() + \" BLOB,\");\r\n } else {\r\n //不支持的类型\r\n continue;\r\n }\r\n }\r\n }\r\n if (stringBuffer.charAt(stringBuffer.length() - 1) == ',') {\r\n stringBuffer.deleteCharAt(stringBuffer.length() - 1);\r\n }\r\n stringBuffer.append(\")\");\r\n return stringBuffer.toString();\r\n\r\n }",
"static void generateImplementation(Table table, Proc proc, PrintWriter outData)\n {\n placeHolder = new PlaceHolder(proc, PostgresCCodeOutputOptions, PlaceHolder.QUESTION, \"\");\n String fullName = table.useName() + proc.upperFirst();\n outData.println(\"void T\" + fullName + \"::Exec()\");\n outData.println(\"{\");\n generateCommand(proc, outData);\n\n Map<String, Integer> duplicateFields = new HashMap<String, Integer>();\n Map<String, Integer> usedFields = new HashMap<String, Integer>();\n Vector<Field> inputs = proc.inputs;\n for (int j = 0; j < inputs.size(); j++)\n {\n Field field = (Field)inputs.elementAt(j);\n duplicateFields.putIfAbsent(field.name, 0);\n usedFields.putIfAbsent(field.name, 0);\n }\n for (int j = 0; j < proc.placeHolders.size(); j++)\n {\n String fieldName = proc.placeHolders.elementAt(j);\n duplicateFields.putIfAbsent(fieldName, 0);\n usedFields.putIfAbsent(fieldName, 0);\n }\n for (int j = 0; j < proc.placeHolders.size(); j++)\n {\n String fieldName = proc.placeHolders.elementAt(j);\n int val = duplicateFields.get(fieldName);\n duplicateFields.put(fieldName, val + 1);\n }\n\n int inputProcSize = proc.inputs.size();\n for (int j = 0; j < proc.inputs.size(); j++)\n {\n Field field = (Field)proc.inputs.elementAt(j);\n int val = duplicateFields.get(field.name);\n if (val > 1)\n {\n inputProcSize = inputProcSize + val - 1;\n }\n }\n\n if (proc.outputs.size() > 0)\n outData.println(\" q_.Open(q_.command, NOBINDS, NODEFINES, NOROWS, ROWSIZE);\");\n else if (proc.inputs.size() > 0)\n outData.println(\" q_.Open(q_.command, \" + inputProcSize + \");\");\n else\n outData.println(\" q_.Open(q_.command);\");\n\n for (int j = 0; j < proc.inputs.size(); j++)\n {\n Field field = (Field)proc.inputs.elementAt(j);\n CommonCCode.generateCppBind(field, outData);\n if (duplicateFields.containsKey(field.name))\n {\n int val = duplicateFields.get(field.name);\n if (val > 1)\n {\n for (int k = 0; k < val - 1; k++)\n {\n CommonCCode.generateCppBind(field.useName() + (k + 1), field.type, outData);\n }\n }\n }\n }\n \n int currentBindNo = 0;\n Vector<Field> blobs = new Vector<Field>();\n for (int j = 0; j < placeHolder.pairs.size(); j++)\n {\n PlaceHolderPairs pair = (PlaceHolderPairs)placeHolder.pairs.elementAt(j);\n Field field = pair.field;\n String tablename = table.tableNameWithSchema();\n String bind = \"Bind\";\n if (field.type == Field.BLOB) bind += \"Blob\";\n\n int val = duplicateFields.get(field.name);\n if (val > 1)\n {\n int usedNo = usedFields.get(field.name);\n if (usedNo == 0)\n {\n outData.println(\" q_.\" + bind + \"(\" + CommonCCode.padder(\"\" + currentBindNo + \",\", 4) + CommonCCode.cppBind(field, tablename, proc.isInsert) + CommonCCode.padder(\", \" + CommonCCode.cppDirection(field), 4) + ((CommonCCode.isNull(field)) ? \", &\" + field.useName() + \"IsNull\" : \"\") + CommonCCode.charFieldFlag(field) + \");\");\n }\n else\n {\n outData.println(\" \" + CommonCCode.cppCopy(field.useName() + (usedNo), field));\n outData.println(\" q_.\" + bind + \"(\" + CommonCCode.padder(\"\" + currentBindNo + \",\", 4) + CommonCCode.cppBind(field.useName() + (usedNo), field.type, field.length, field.scale, field.precision, tablename, proc.isInsert) + CommonCCode.padder(\", \" + CommonCCode.cppDirection(field), 4) + ((CommonCCode.isNull(field)) ? \", &\" + field.useName() + \"IsNull\" : \"\") + CommonCCode.charFieldFlag(field) + \");\");\n }\n usedFields.put(field.name, usedNo + 1);\n }\n else\n {\n outData.println(\" q_.\" + bind + \"(\" + CommonCCode.padder(\"\" + currentBindNo + \",\", 4) + CommonCCode.cppBind(field, tablename, proc.isInsert) + CommonCCode.padder(\", \" + CommonCCode.cppDirection(field), 4) + ((CommonCCode.isNull(field)) ? \", &\" + field.useName() + \"IsNull\" : \"\") + CommonCCode.charFieldFlag(field) + \");\");\n }\n\n currentBindNo += 1;\n\n if (field.type == Field.BLOB)\n blobs.addElement(field);\n }\n for (int j = 0; j < proc.outputs.size(); j++)\n {\n Field field = (Field)proc.outputs.elementAt(j);\n String define = \"Define\";\n if (field.type == Field.BLOB) define += \"Blob\";\n //else if (field.type == Field.BIGXML) define += \"BigXML\";\n outData.println(\" q_.\" + define +\"(\" + CommonCCode.padder(\"\" + j + \",\", 4) + CommonCCode.cppDefine(field) + \");\");\n }\n outData.println(\" q_.Exec();\");\n for (int j = 0; j < blobs.size(); j++)\n {\n Field field = (Field)blobs.elementAt(j);\n outData.println(\" SwapBytes(\" + field.useName() + \".len); // fixup len in data on intel type boxes\");\n }\n outData.println(\"}\");\n outData.println();\n boolean skipExecWithParms = false;\n for (int j = 0; j < proc.inputs.size(); j++)\n {\n Field field = (Field)proc.inputs.elementAt(j);\n if (field.type == Field.BLOB)// || field.type == Field.BIGXML)\n {\n skipExecWithParms = true;\n break;\n }\n }\n if (skipExecWithParms == false)\n if ((proc.inputs.size() > 0) || proc.dynamics.size() > 0)\n {\n outData.println(\"void T\" + fullName + \"::Exec(\");\n generateWithParms(proc, outData, \"\");\n outData.println(\")\");\n outData.println(\"{\");\n for (int j = 0; j < proc.inputs.size(); j++)\n {\n Field field = (Field)proc.inputs.elementAt(j);\n if ((CommonCCode.isSequence(field) && proc.isInsert)\n || (CommonCCode.isIdentity(field) && proc.isInsert)\n || field.type == Field.TIMESTAMP\n || field.type == Field.AUTOTIMESTAMP\n || field.type == Field.USERSTAMP)\n continue;\n outData.println(\" \" + CommonCCode.cppCopy(field));\n }\n for (int j = 0; j < proc.dynamics.size(); j++)\n {\n String s = (String)proc.dynamics.elementAt(j);\n outData.println(\" strncpy(\" + s + \", a\" + s + \", sizeof(\" + s + \")-1);\");\n }\n outData.println(\" Exec();\");\n if (proc.outputs.size() > 0 && proc.isInsert)\n outData.println(\" Fetch();\");\n outData.println(\"}\");\n outData.println();\n }\n if (proc.outputs.size() > 0)\n {\n outData.println(\"bool T\" + fullName + \"::Fetch()\");\n outData.println(\"{\");\n outData.println(\" if (q_.Fetch() == false)\");\n outData.println(\" return false;\");\n for (int j = 0; j < proc.outputs.size(); j++)\n {\n Field field = (Field)proc.outputs.elementAt(j);\n outData.println(\" q_.Get(\" + CommonCCode.cppGet(field) + \");\");\n if (CommonCCode.isNull(field))\n outData.println(\" q_.GetNull(\" + field.useName() + \"IsNull, \" + j + \");\");\n }\n outData.println(\" return true;\");\n outData.println(\"}\");\n outData.println();\n }\n }",
"private static String getCreateQuery(String tableName,String CSVHeader){\n\n\t\tString query=\"create table \"+tableName +\"(\";\n\t\tString columns[]=CSVHeader.split(\",\");\n\t\tfor(int i=0;i<columns.length-1;i++){\n\t\t\tquery+=columns[i]+\" string,\";\n\t\t}\n\t\tquery+=columns[columns.length-1]+\" string)\";\n\t\tquery+=\" row format delimited fields terminated by ',' stored as textfile\";\n\t\t// System.out.println(query);\n\t\treturn query;\n\t}",
"public static void main(final String[] args) {\n try {\n Class.forName(\"org.h2.Driver\");\n final Connection c = DriverManager.getConnection(\"jdbc:h2:tcp://localhost:9092/./jppf_samples;SCHEMA=PUBLIC\", \"sa\", \"\");\n final String sql = FileUtils.readTextFile(\"./db/jppf_samples-h2.sql\");\n final Statement stmt = c.createStatement();\n stmt.executeUpdate(sql);\n stmt.close();\n c.close();\n System.out.println(\"database created successfully\");\n } catch (final Exception e) {\n e.printStackTrace();\n }\n }"
] | [
"0.6939664",
"0.66297007",
"0.6523933",
"0.6518138",
"0.65102553",
"0.61504513",
"0.61359316",
"0.6087449",
"0.6072784",
"0.6048871",
"0.6044726",
"0.60420984",
"0.6011654",
"0.58969945",
"0.58858514",
"0.588034",
"0.5872639",
"0.58027303",
"0.5802102",
"0.5779321",
"0.57602286",
"0.57602286",
"0.57602286",
"0.5744406",
"0.57025117",
"0.5693269",
"0.56549066",
"0.5641341",
"0.5636572",
"0.56111944",
"0.56055284",
"0.5602992",
"0.56013083",
"0.5563856",
"0.55561614",
"0.5547268",
"0.5526311",
"0.5522126",
"0.54986507",
"0.549732",
"0.5490856",
"0.54733175",
"0.5472602",
"0.5468375",
"0.54524136",
"0.542086",
"0.54192966",
"0.5392219",
"0.5371865",
"0.53660643",
"0.53589594",
"0.5349225",
"0.5345566",
"0.5341889",
"0.5340603",
"0.533682",
"0.5336591",
"0.5328572",
"0.5325306",
"0.53241074",
"0.53237265",
"0.5302555",
"0.5286055",
"0.52795017",
"0.5270642",
"0.52686435",
"0.5266678",
"0.52655023",
"0.52569133",
"0.52529335",
"0.5242385",
"0.5236432",
"0.52288234",
"0.5225001",
"0.52244544",
"0.52213264",
"0.52202946",
"0.5204027",
"0.52013075",
"0.51924217",
"0.5192149",
"0.51786876",
"0.5173",
"0.516789",
"0.5162755",
"0.51603806",
"0.5154927",
"0.5154591",
"0.51542336",
"0.514906",
"0.5146855",
"0.5145093",
"0.51444316",
"0.5141153",
"0.5140202",
"0.51390314",
"0.51331437",
"0.5133143",
"0.51320827",
"0.51299345"
] | 0.6730324 | 1 |
Constrain the shell size | protected void constrainShellSize() {
super.constrainShellSize();
CommonUITool.centerShell(getShell());
if (isNewFlag()) {
getShell().setText(Messages.titleAddProcedureDialog);
} else {
getShell().setText(Messages.titleEditProcedureDialog);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void configureShell(Shell newShell) {\n super.configureShell(newShell);\n\n newShell.setMinimumSize(600, 400);\n }",
"private void basicSize(){\n setSize(375,400);\n }",
"public void setMaxPaddleLength(){\n myRectangle.setWidth(myScreenWidth - SIDEBAR_WIDTH);\n }",
"private void extendedSize(){\n setSize(600,400);\n }",
"private void resize() {\n }",
"void calculateChevronTrim() {\n ToolBar tb = new ToolBar( parent, SWT.FLAT );\n ToolItem ti = new ToolItem( tb, SWT.PUSH );\n // Image image = new Image (display, 1, 1);\n // ti.setImage (image);\n Point size = tb.computeSize( SWT.DEFAULT, SWT.DEFAULT );\n size = parent.fixPoint( size.x, size.y );\n CHEVRON_HORIZONTAL_TRIM = size.x - 1;\n CHEVRON_VERTICAL_TRIM = size.y - 1;\n tb.dispose();\n ti.dispose();\n // image.dispose ();\n }",
"public void setSize();",
"@Override\r\n\tprotected void pack() {\r\n\r\n\t\tRectangle displayarea = shell.getDisplay().getPrimaryMonitor().getBounds();\r\n\t\tRectangle windowarea = shell.getBounds();\r\n\t\tshell.setBounds((displayarea.width - windowarea.width) / 2,\r\n\t\t\t\t(displayarea.height - windowarea.height) / 2,\r\n\t\t\t\twindowarea.width, windowarea.height);\r\n\t}",
"protected final Dimension windowSizeControl () {\n\t\tif (!this.isMaximum && !this.isIcon && !this.isClosed) {\n\t\t\tint height = size.height;\n\t\t\tint width = size.height;\n\t\t\t\n\t\t\t// Gets the current size\n\t\t\tint currentHeight = this.getHeight();\n\t\t\tint currentWidth = this.getWidth();\n\t\t\t\n\t\t\t// Makes a pack() to get the minimum required size\n\t\t\tthis.pack();\n\t\t\t\n\t\t\t// Gets the pack size\n\t\t\tint packHeight = this.getHeight();\n\t\t\tint packWidth = this.getWidth();\n\t\t\t\n\t\t\t// Calculates the ideal height\n\t\t\tif (packHeight > currentHeight) {\n\t\t\t\theight = packHeight;\n\t\t\t} else {\n\t\t\t\theight = currentHeight;\n\t\t\t}\n\t\t\t// Calculates the ideal width\n\t\t\tif (packWidth > currentWidth) {\n\t\t\t\twidth = packWidth;\n\t\t\t} else {\n\t\t\t\twidth = currentWidth;\n\t\t\t}\n\t\t\t\n\t\t\t// It must not be greater than the desktop size\n\t\t\tint desktopHeight = parent.getDesktopPane().getHeight();\n\t\t\tint desktopWidth = parent.getDesktopPane().getWidth();\n\t\t\t\n\t\t\tif (width > desktopWidth){\n\t\t\t\twidth = desktopWidth;\n\t\t\t}\n\t\t\tif (packWidth > desktopWidth){\n\t\t\t\tpackWidth = desktopWidth;\n\t\t\t}\n\t\t\tif (height > desktopHeight){\n\t\t\t\theight = desktopHeight;\n\t\t\t}\n\t\t\tif (packHeight > desktopHeight){\n\t\t\t\tpackHeight = desktopHeight;\n\t\t\t}\n\t\t\t\n\t\t\t// Resizes the window and sets the minimum allowed size\n\t\t\tsize = new Dimension(width, height);\n\t\t\tsetSize(size);\n\t\t\tsetMinimumSize(new Dimension(packWidth, packHeight));\n\t\t}\n\t\treturn size;\n\t}",
"protected abstract void setSize();",
"@Override\n\tprotected int getShellStyle() {\n\t\treturn super.getShellStyle()|SWT.RESIZE;\n\t}",
"public void resize() {\n\t\tsp.doLayout();\n\t}",
"@Override\n\tpublic int getMinSizeX()\n\t{\n\t\treturn 50;\n\t}",
"public void settings() { size(1200, 800); }",
"public void setSize(int newSize);",
"public void setSize(int newSize);",
"public void setSize( int width, int height ) {\n checkWidget();\n int newHeight = height;\n int newWidth = width;\n Point point = parent.fixPoint( newWidth, newHeight );\n newWidth = Math.max( point.x, minimumWidth + MINIMUM_WIDTH );\n newHeight = Math.max( point.y, 0 );\n if ( !ideal ) {\n preferredWidth = newWidth;\n preferredHeight = newHeight;\n }\n itemBounds.width = requestedWidth = newWidth;\n itemBounds.height = newHeight;\n if ( control != null ) {\n int controlWidth = newWidth - MINIMUM_WIDTH;\n if ( (style & SWT.DROP_DOWN) != 0 && newWidth < preferredWidth ) {\n controlWidth -= CHEVRON_IMAGE_WIDTH + CHEVRON_HORIZONTAL_TRIM\n + CHEVRON_LEFT_MARGIN;\n }\n control.setSize( parent.fixPoint( controlWidth, newHeight ) );\n }\n parent.relayout();\n updateChevron();\n }",
"private void inputGridSize() {\n \ttest = new TextField();\n \ttest.setPrefSize(BUTTON_SIZE, TEXT_INPUT_BAR_HEIGHT);\n \tstartScreen.add(test, 2, 2);\n }",
"protected abstract void resize();",
"void setSize(Dimension size);",
"private Dimension tailleEcranAdapté(){\n GraphicsEnvironment graphicsEnvironment =GraphicsEnvironment.getLocalGraphicsEnvironment();\n //get maximum window bounds\n Rectangle rectangle =graphicsEnvironment.getMaximumWindowBounds();\n //Dimension dim = java.awt.Toolkit.getDefaultToolkit().getScreenSize();\n Dimension dim = new Dimension((int)rectangle.getWidth(),(int)rectangle.getHeight());\n return dim;\n }",
"protected void createDialogSize ()\n {\n }",
"void childResized(int w, int h);",
"protected void newSize() {\r\n adjustSize();\r\n halt();\r\n newGame();\r\n }",
"void setWindowSize(int s);",
"protected void resizePanel() {\n\t\tif (drawingAreaIsBlank) { // may have become blank after deleting the last node manually, so panel must still be shrunk\n\t\t\tsetPreferredSize(new Dimension(0,0)); // put back to small size so scrollbars disappear\n\t\t\trevalidate();\n\t\t\treturn;\n\t\t}\n\t\tgetMaxMin(); // get the extent of the tree to the left, right, bottom\n\t\tsetPreferredSize(new Dimension(maxX, maxY));\n\t\trevalidate();\n\t}",
"@Override\r\n\tpublic void resize() {\n\t\t\r\n\t}",
"@Override\n\tpublic int getMinSizeZ()\n\t{\n\t\treturn 50;\n\t}",
"public void setMaximizing() {\r\n maximizing = true;\r\n }",
"@Override\n public void settings(){\n size(500, 500);\n }",
"public void setMinSize(double aWidth, double aHeight) { setMinWidth(aWidth); setMinHeight(aHeight); }",
"void resize() {\n }",
"public void setSize(int size);",
"@Override\n\tpublic void run() {\n\t\tDisplay.getCurrent().getActiveShell().setMinimized(true);\n\t}",
"@Override\n\tpublic void resize() {\n\t\t\n\t}",
"abstract public int getMinWidth();",
"private void setSizeBox() {\n\t\t\tthis.leftX = pointsSubStroke.get(0).getX();\n\t\t\tthis.righX = pointsSubStroke.get(0).getX();\n\t\t\tthis.topY = pointsSubStroke.get(0).getY();\n\t\t\tthis.bottomY = pointsSubStroke.get(0).getY();\n\t\t\t\n\t\t\tfor(int i = 0; i < pointsSubStroke.size();i++) {\n\t\t\t\tdouble x = pointsSubStroke.get(i).getX();\n\t\t\t\tdouble y = pointsSubStroke.get(i).getX();\n\t\t\t\t\n\t\t\t\tthis.leftX = Math.min(x, leftX);\n\t\t\t\tthis.righX = Math.max(x, righX);\n\t\t\t\tthis.topY = Math.min(y, topY);\n\t\t\t\tthis.bottomY = Math.max(y, bottomY);\n\t\t\t}\n\t\t}",
"public void resize_screen(){\r\n \tstop_scn_updates();\r\n \tscn_font_size = min_font_size+1;\r\n \twhile (scn_font_size < max_font_size){\r\n \t\tscn_font = new Font(tz390.z390_font,Font.BOLD,scn_font_size);\r\n \t\tcalc_screen_size();\r\n \t\tif (scn_image.getWidth() < main_panel_width\r\n \t\t\t&& scn_image.getHeight() < main_panel_height){\r\n \t\t\tscn_font_size++;\r\n \t\t} else {\r\n \t\t scn_font_size--;\r\n \t\t break;\r\n \t\t}\r\n \t} \t\r\n \tscn_font = new Font(tz390.z390_font,Font.BOLD,scn_font_size);\r\n \tcalc_screen_size();\r\n start_scn_updates();\r\n }",
"int getWindowSize();",
"private static void center(Shell shell) \n\t{\n\n Rectangle bds = shell.getDisplay().getBounds();\n\n Point p = shell.getSize();\n\n int nLeft = (bds.width - p.x) / 2;\n int nTop = (bds.height - p.y) / 2;\n\n shell.setBounds(nLeft, nTop, p.x, p.y);\n }",
"@Override\n\tpublic void setBoxWidth(int l) {\n\t\tmaxwid = l;\n\t}",
"@Override\n\tprotected void createShell() {\n\t\tString shellText = \"Add a New Pharmacy\";\n\t\tRectangle bounds = new Rectangle(25, 0, 800, 680);\n\t\tbuildShell(shellText, bounds);\n\t}",
"public void resize(int w, int h) {}",
"public FrmMenuAdmin() {\n initComponents(); \n \n this.setExtendedState(FrmMenuAdmin.MAXIMIZED_BOTH);\n jDesktopPane1.setMaximumSize(this.getMaximumSize()); \n //tester();\n \n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n width = (int) screenSize.getWidth();\n height = (int) screenSize.getHeight(); \n this.setSize((int)width,(int)height);\n this.setExtendedState(FrmMenuAdmin.MAXIMIZED_BOTH); \n }",
"void setPaperSize(short size);",
"void setFitWidth(short width);",
"public abstract int getDisplayWidth();",
"public Dimension getPreferredSize() {\n Dimension size = super.getPreferredSize();\n size.width += extraWindowWidth;\n return size;\n }",
"private void calcContentSize() {\n }",
"void resizable1();",
"public void setMinimumSize( int width, int height ) {\n checkWidget();\n Point point = parent.fixPoint( width, height );\n minimumWidth = point.x;\n minimumHeight = point.y;\n }",
"@Override\r\n\tprotected Point getInitialSize() {\r\n\t\treturn new Point(450, 300);\r\n\t}",
"public void setSizePlayingFields()\r\n {\n setPreferredSize(new Dimension(109*8,72*8));//powieżchnia o 2 m z każdej strony większa niz boisko 106 i 69 pomnożone o 8\r\n //większe boisko żeby było widać\r\n setMaximumSize(getMaximumSize());\r\n setBackground(Color.green);\r\n }",
"@Override\n\tprotected Point getInitialSize() {\n\t\treturn new Point(600, 500);\n\t}",
"public abstract void setSize(Dimension d);",
"public void setSize(double width, double height){\r\n double topLaneHeight=height/100*myInformation.upperToDownPercent;\r\n double bottomLaneHeight=height-topLaneHeight;\r\n double leftSideWidth=width/100*myInformation.leftToRightPercent;\r\n double rightSideWidth=width-leftSideWidth-1;\r\n\r\n double buttonLeftHeight=(height-topLaneHeight)/100*myInformation.leftButtonsPercent;\r\n int countLeftButtons=0;\r\n double labelTopWidth=rightSideWidth/100*myInformation.upperButtonsPercent;\r\n int countTopLabels=0;\r\n //Regions\r\n leftVBox.setMinSize(leftSideWidth,height);\r\n leftVBox.setMaxSize(leftSideWidth,height);\r\n\r\n upperHBox.setMinSize(width,topLaneHeight);\r\n upperHBox.setMaxSize(width,topLaneHeight);\r\n\r\n canvas.setWidth(width);\r\n canvas.setHeight(bottomLaneHeight);\r\n\r\n pane.setMinSize(width,bottomLaneHeight);\r\n pane.setMaxSize(width,bottomLaneHeight);\r\n\r\n stackPane.setMinSize(width, height);\r\n stackPane.setMaxSize(width, height);\r\n\r\n mainVBox.setMinSize(width, height);\r\n mainVBox.setMaxSize(width, height);\r\n\r\n canvasStackPane.setMinSize(width,bottomLaneHeight);\r\n canvasStackPane.setMaxSize(width,bottomLaneHeight);\r\n\r\n listViewVBox.setMinSize(width, height);\r\n listViewVBox.setMaxSize(width, height);\r\n //Objects\r\n upperLeftButton.setMinSize(leftSideWidth,topLaneHeight);\r\n upperLeftButton.setMaxSize(leftSideWidth,topLaneHeight);\r\n //Left Side\r\n left1HintButton.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left1HintButton.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n left2Button.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left2Button.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n left3Button.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left3Button.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n left4Button.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left4Button.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n left5Button.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left5Button.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n double restHeight=height-(buttonLeftHeight*countLeftButtons+topLaneHeight);\r\n leftRestLabel.setMinSize(leftSideWidth,restHeight);\r\n leftRestLabel.setMaxSize(leftSideWidth,restHeight);\r\n\r\n //Top\r\n upper1Label.setMinSize(labelTopWidth,topLaneHeight);\r\n upper1Label.setMaxSize(labelTopWidth,topLaneHeight);\r\n countTopLabels++;\r\n\r\n upper2Label.setMinSize(labelTopWidth,topLaneHeight);\r\n upper2Label.setMaxSize(labelTopWidth,topLaneHeight);\r\n countTopLabels++;\r\n\r\n upper3Label.setMinSize(labelTopWidth,topLaneHeight);\r\n upper3Label.setMaxSize(labelTopWidth,topLaneHeight);\r\n countTopLabels++;\r\n\r\n double restwidth=width-upperLeftButton.getWidth()-(labelTopWidth*countTopLabels);\r\n upperRestLabel.setMinSize(restwidth,topLaneHeight);\r\n upperRestLabel.setMaxSize(restwidth,topLaneHeight);\r\n //New Gamemode stuff\r\n newGamemodeHBox.setMinSize(width,height);\r\n newGamemodeHBox.setMaxSize(width,height);\r\n double nBWidth=width/100*myInformation.newGamemodeButtonsPercent.width;\r\n double nBHeight=height/100*myInformation.newGamemodeButtonsPercent.height;\r\n\r\n newGamemodebutton1.setMinSize(nBWidth,nBHeight);\r\n newGamemodebutton1.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGamemodebutton2.setMinSize(nBWidth,nBHeight);\r\n newGamemodebutton2.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGamemodebutton3.setMinSize(nBWidth,nBHeight);\r\n newGamemodebutton3.setMaxSize(nBWidth,nBHeight);\r\n\r\n //BackButton\r\n backPane.setMinSize(width, height);\r\n backPane.setMaxSize(width, height);\r\n double backWidth=width/100*myInformation.backButtonPercent.width;\r\n double backHeight=height/100*myInformation.backButtonPercent.height;\r\n backButton.setMinSize(backWidth,backHeight);\r\n backButton.setMaxSize(backWidth,backHeight);\r\n //New Graphmode\r\n newGraphModeHBox.setMinSize(width,height);\r\n newGraphModeHBox.setMaxSize(width,height);\r\n\r\n newGraphModebutton1.setMinSize(nBWidth,nBHeight);\r\n newGraphModebutton1.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGraphModebutton2.setMinSize(nBWidth,nBHeight);\r\n newGraphModebutton2.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGraphModebutton3.setMinSize(nBWidth,nBHeight);\r\n newGraphModebutton3.setMaxSize(nBWidth,nBHeight);\r\n\r\n sMBHBox.setMinSize(width,height);\r\n sMBHBox.setMaxSize(width,height);\r\n smallButton.setMinSize(nBWidth,nBHeight);\r\n smallButton.setMaxSize(nBWidth,nBHeight);\r\n middleButton.setMinSize(nBWidth,nBHeight);\r\n middleButton.setMaxSize(nBWidth,nBHeight);\r\n bigButton.setMinSize(nBWidth,nBHeight);\r\n bigButton.setMaxSize(nBWidth,nBHeight);\r\n\r\n gameEndButton.setMinSize(nBWidth,nBHeight);\r\n gameEndButton.setMaxSize(nBWidth,nBHeight);\r\n gameEndTop.setMinSize(width/2,height/5);\r\n gameEndTop.setMaxSize(width/2,height/5);\r\n\r\n\r\n listView.setMinSize(width/8,height/2);\r\n listView.setMaxSize(width/8,height/2);\r\n submit2.setMinSize(width/8,height/10);\r\n submit2.setMaxSize(width/8,height/10);\r\n\r\n textFieldHBox.setMinSize(width,height);\r\n textFieldHBox.setMaxSize(width,height);\r\n textFieldVertices.setMinSize(nBWidth,nBHeight);\r\n textFieldVertices.setMaxSize(nBWidth,nBHeight);\r\n textFieldEdges.setMinSize(nBWidth,nBHeight);\r\n textFieldEdges.setMaxSize(nBWidth,nBHeight);\r\n\r\n buttonTextfield.setMinSize(nBWidth/2,nBHeight);\r\n buttonTextfield.setMaxSize(nBWidth/2,nBHeight);\r\n\r\n //New Graph\r\n newGraphHBox.setMinSize(width,height);\r\n newGraphHBox.setMaxSize(width,height);\r\n\r\n newGraphButtonYes.setMinSize(nBWidth,nBHeight);\r\n newGraphButtonYes.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGraphButtonNo.setMinSize(nBWidth,nBHeight);\r\n newGraphButtonNo.setMaxSize(nBWidth,nBHeight);\r\n\r\n hintButton1.setMinSize(nBWidth,nBHeight);\r\n hintButton1.setMaxSize(nBWidth,nBHeight);\r\n hintButton2.setMinSize(nBWidth,nBHeight);\r\n hintButton2.setMaxSize(nBWidth,nBHeight);\r\n hintButton3.setMinSize(nBWidth,nBHeight);\r\n hintButton3.setMaxSize(nBWidth,nBHeight);\r\n hintButton4.setMinSize(nBWidth,nBHeight);\r\n hintButton4.setMaxSize(nBWidth,nBHeight);\r\n hintButton5.setMinSize(nBWidth,nBHeight);\r\n hintButton5.setMaxSize(nBWidth,nBHeight);\r\n hintButton6.setMinSize(nBWidth,nBHeight);\r\n hintButton6.setMaxSize(nBWidth,nBHeight);\r\n hintButton7.setMinSize(nBWidth,nBHeight);\r\n hintButton7.setMaxSize(nBWidth,nBHeight);\r\n hintButton8.setMinSize(nBWidth,nBHeight);\r\n hintButton8.setMaxSize(nBWidth,nBHeight);\r\n hintButton9.setMinSize(nBWidth,nBHeight);\r\n hintButton9.setMaxSize(nBWidth,nBHeight);\r\n\r\n gameWinStackPane.setMinSize(width, height);\r\n gameWinStackPane.setMaxSize(width, height);\r\n\r\n gameWinButton1.setMinSize(nBWidth,nBHeight);\r\n gameWinButton1.setMaxSize(nBWidth,nBHeight);\r\n\r\n gameWinButton2.setMinSize(nBWidth,nBHeight);\r\n gameWinButton2.setMaxSize(nBWidth,nBHeight);\r\n\r\n gameWinHBox.setMinSize(width,height/4);\r\n gameWinHBox.setMaxSize(width,height/4);\r\n\r\n hintMenuStack.setMinSize(width, height);\r\n hintMenuStack.setMaxSize(width, height);\r\n\r\n hintMenu.setSpacing(width/30);\r\n vBoxHint.setSpacing(height/20);\r\n vBoxHint2.setSpacing(height/20);\r\n vBoxHint3.setSpacing(height/20);\r\n\r\n abstand.setMinSize(width,height/3);\r\n }",
"private Dimension taillePanelListe(){\n GraphicsEnvironment graphicsEnvironment =GraphicsEnvironment.getLocalGraphicsEnvironment();\n //get maximum window bounds\n Rectangle rectangle =graphicsEnvironment.getMaximumWindowBounds();\n //Dimension dim = java.awt.Toolkit.getDefaultToolkit().getScreenSize();\n Dimension dim = new Dimension( ((int)rectangle.getWidth()) * 2/3 , ((int)rectangle.getHeight()) * 2/3);\n return dim;\n }",
"public int winSize() { return winSize; }",
"protected void setSize(Dimension dim) {}",
"public void setMinWidth(double aWidth)\n{\n double w = aWidth<=0? 0 : aWidth; if(w==getMinWidth()) return;\n firePropertyChange(\"MinWidth\", put(\"MinWidth\", w), w, -1);\n}",
"private void setSize(int s){\n\t\tsize = s;\n\t}",
"@Override\n\tprotected Point getInitialSize() {\n\t\treturn new Point(800, 600);\n\t}",
"@Override\n\t\tpublic void resize(int arg0, int arg1) {\n\t\t \n\t\t}",
"public void adjustWidth() {\n int width = Short.MIN_VALUE;\n\n for (final TextBox tb : getAllTextBox()) {\n final int tbWidth = tb.getTextDim().width;\n\n if (tbWidth > width) width = tbWidth; // get the longer content\n }\n\n if (fullWidthStereotype > width) width = fullWidthStereotype;\n\n Change.push(new BufferBounds(this));\n\n setBounds(new Rectangle(\n bounds.x, bounds.y, width + GraphicView.getGridSize() + 15, bounds.height));\n\n Change.push(new BufferBounds(this));\n }",
"@Override\n\tprotected Point getInitialSize() {\n\t\treturn new Point(640, 600);\n\t}",
"@Override\r\n protected boolean isResizable() {\r\n return true;\r\n }",
"@Override\r\n protected boolean isResizable() {\r\n return true;\r\n }",
"@Override\n protected Layout constructShellLayout() {\n GridLayout mainLayout = new GridLayout(1, false);\n\n return mainLayout;\n }",
"public void setBestSize() { setSize(getBestWidth(), getBestHeight()); }",
"public int getSetSize(){ return Integer.parseInt(setSize.getText()); }",
"@Override\n\tprotected Point getInitialSize() {\n\t\treturn new Point(450, 300);\n\t}",
"@Override\n\tprotected Point getInitialSize() {\n\t\treturn new Point(450, 300);\n\t}",
"static Dimension frameSize(String env) {\n\t\tString s = System.getProperty(env, \"0\");\n\t\tint x = s.indexOf('x'), high = 600;\n\n\t\tif (x >= 0) {\n\t\t\thigh = Integer.parseInt(s.substring(x + 1));\n\t\t\ts = s.substring(0, x);\n\t\t}\n\t\treturn new Dimension(Integer.parseInt(s), high);\n\t}",
"protected void doResize() {\r\n\t\tif (renderer.surface == null) {\r\n\t\t\tdoNew();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tNewResizeDialog dlg = new NewResizeDialog(labels, false);\r\n\t\tdlg.widthText.setText(\"\" + renderer.surface.width);\r\n\t\tdlg.heightText.setText(\"\" + renderer.surface.height);\r\n\t\tdlg.setLocationRelativeTo(this);\r\n\t\tdlg.setVisible(true);\r\n\t\tif (dlg.success) {\r\n\t\t\trenderer.surface.width = dlg.width;\r\n\t\t\trenderer.surface.height = dlg.height;\r\n\t\t\trenderer.surface.computeRenderingLocations();\r\n\t\t}\r\n\t}",
"private SizeModifierSettingsEditor() {\n\t\tinitComponents();\n\t\tsettings = SizeModifierSettings.getInstance();\n\t\tloadSettings();\n\t\tmainShell.pack();\n\t\tmainShell.setBounds(\n\t\t\tCrunch3.mainWindow.getShell().getBounds().x + Crunch3.mainWindow.getShell().getBounds().width / 2 - mainShell.getBounds().width / 2,\n\t\t\tCrunch3.mainWindow.getShell().getBounds().y + Crunch3.mainWindow.getShell().getBounds().height / 2 - mainShell.getBounds().height / 2,\n\t\t\tmainShell.getBounds().width,\n\t\t\tmainShell.getBounds().height);\n\t\tmainShell.open();\n\t}",
"public void showRectangleSizeSetup() {\n sizeArea.removeAllViewsInLayout();\n sizeArea.addView(heightEdit);\n sizeArea.addView(widthEdit);\n }",
"@Override\n protected boolean isResizable() {\n return true;\n\n }",
"private void sendClientResized() {\n connection.updateVariable(id, \"height\", height, false);\n connection.updateVariable(id, \"width\", width, immediate);\n }",
"public CommonPopWindow setSize(int width, int height) {\n/* 140 */ this.mWidth = width;\n/* 141 */ this.mHeight = height;\n/* 142 */ return this;\n/* */ }",
"public default void resize(int w, int h) {\n }",
"public void setPtySize(int col, int row, int wp, int hp){\n setPtyType(this.ttype, col, row, wp, hp);\n if(!pty || !isConnected()){\n return;\n }\n try{\n RequestWindowChange request=new RequestWindowChange();\n request.setSize(col, row, wp, hp);\n request.request(getSession(), this);\n }\n catch(Exception e){\n //System.err.println(\"ChannelSessio.setPtySize: \"+e);\n }\n }",
"@Override\n public int getWidth() {\n return 260;\n }",
"public void createSShell() {\r\n\t\tGridData gridData = new GridData();\r\n\t\tgridData.widthHint = 500;\r\n\t\tgridData.horizontalAlignment = org.eclipse.swt.layout.GridData.CENTER;\r\n\t\tgridData.grabExcessHorizontalSpace = true;\r\n\t\tgridData.heightHint = 80;\r\n\t\tsShell = new Shell();\r\n\t\tsShell.setText(\"系统管理\");\r\n\t\tsShell.setSize(new Point(703, 656));\r\n\t\tsShell.setLayout(new GridLayout());\r\n\t\tcLabel = new CLabel(sShell, SWT.CENTER);\r\n\t\tcLabel.setImage(new Image(Display.getCurrent(), getClass().getResourceAsStream(\"/images/news.png\")));\r\n\t\tcLabel.setFont(new Font(Display.getDefault(), \"微软雅黑\", 18, SWT.NORMAL));\r\n\t\tcLabel.setLayoutData(gridData);\r\n\t\tcLabel.setText(\"系统管理\");\r\n\t\tcreateTabFolder();\r\n\t\tif(SystemMainShell.userType.equals(\"管理员\")){\r\n\t\t\tbuttonAddRoom.setEnabled(true);\r\n\t\t\tbuttonDeleteRoom.setEnabled(true);\r\n\t\t//\tbuttonAddGoods.setEnabled(true);\r\n\t\t//\tbuttonDeleteGoods.setEnabled(true);\r\n\t\t\tbuttonAddStaff.setEnabled(true);\r\n\t\t\tbuttonDeleteStaff.setEnabled(true);\r\n\t\t\tbuttonAddUser.setEnabled(true);\r\n\t\t\tbuttonDeleteUser.setEnabled(true);\r\n\t\t}else if(SystemMainShell.userType.equals(\"操作员\")){\r\n\t\t\tbuttonAddRoom.setEnabled(false);\r\n\t\t\tbuttonDeleteRoom.setEnabled(false);\r\n\t\t//\tbuttonAddGoods.setEnabled(false);\r\n\t\t//\tbuttonDeleteGoods.setEnabled(false);\r\n\t\t\tbuttonAddStaff.setEnabled(false);\r\n\t\t\tbuttonDeleteStaff.setEnabled(false);\r\n\t\t\tbuttonAddUser.setEnabled(false);\r\n\t\t\tbuttonDeleteUser.setEnabled(false);\r\n\t\t}\r\n\t}",
"@Override\n public void resize(int arg0, int arg1) {\n \n }",
"@Override\n protected Point getInitialSize() {\n return new Point(930, 614);\n }",
"public void initSize() {\n WIDTH = 320;\n //WIDTH = 640;\n HEIGHT = 240;\n //HEIGHT = 480;\n SCALE = 2;\n //SCALE = 1;\n }",
"public void setSize(float width, float height);",
"public static void main(String args[]) {\n int sizeX;\n int sizeY;\n\n // show change size window to set initial size\n CSizePanel csizePanel = new CSizePanel(new Dimension(\n LayoutPanel.defXCells, LayoutPanel.defYCells), true);\n while (true) {\n int result = JOptionPane.showConfirmDialog(null, csizePanel,\n \"Set initial size\", JOptionPane.OK_CANCEL_OPTION);\n if (result == JOptionPane.OK_OPTION) { // Afirmative\n try {\n sizeX = Integer\n .parseInt(csizePanel.tfields[CSizePanel.idxX]\n .getText());\n sizeY = Integer\n .parseInt(csizePanel.tfields[CSizePanel.idxY]\n .getText());\n if (sizeX >= LayoutPanel.minXCells\n && sizeX <= LayoutPanel.maxXCells\n && sizeY >= LayoutPanel.minYCells\n && sizeY <= LayoutPanel.maxYCells) {\n break;\n } else {\n JOptionPane.showMessageDialog(null,\n \"Size x must be between \"\n + LayoutPanel.minXCells + \" and \"\n + LayoutPanel.maxXCells\n + \", or size y must be between \"\n + LayoutPanel.minYCells + \" and \"\n + LayoutPanel.maxYCells + \".\");\n }\n } catch (NumberFormatException e) {\n JOptionPane.showMessageDialog(null, \"Invalid number.\");\n }\n } else { // cancel - exit the program\n System.exit(0);\n }\n }\n\n // create a control window\n ControlFrame frame = new ControlFrame(\"Growth Simulation Layout Editor\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.init(sizeX, sizeY);\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n }",
"@Override\n public void resize(int width, int height) {game.screenPort.update(width, height, true);}",
"@Override\n public void settings() {\n setSize(WIDTH, HEIGHT);\n }",
"public void settings() {\r\n size(750, 550);\r\n }",
"private void actionModifySize() {\n CSizePanel csizePanel = new CSizePanel(layoutPanel.getLayoutSize(),\n false);\n int result = JOptionPane.showConfirmDialog(this, csizePanel,\n \"Modify layout size\", JOptionPane.OK_CANCEL_OPTION);\n if (result == JOptionPane.OK_OPTION) { // Afirmative\n try {\n int sizeX = Integer\n .parseInt(csizePanel.tfields[CSizePanel.idxX].getText());\n int sizeY = Integer\n .parseInt(csizePanel.tfields[CSizePanel.idxY].getText());\n if (sizeX >= LayoutPanel.minXCells\n && sizeX <= LayoutPanel.maxXCells\n && sizeY >= LayoutPanel.minYCells\n && sizeY <= LayoutPanel.maxYCells) {\n RepType rtype = RepType.CLEAR;\n if (csizePanel.newButton.isSelected()) {\n rtype = RepType.CLEAR;\n } else if (csizePanel.rptButton.isSelected()) {\n rtype = RepType.REPEAT;\n } else if (csizePanel.altButton.isSelected()) {\n rtype = RepType.ALT;\n }\n\n changeLayoutSize(new Dimension(sizeX, sizeY), rtype);\n } else {\n JOptionPane.showMessageDialog(null,\n \"Size x must be between \" + LayoutPanel.minXCells\n + \" and \" + LayoutPanel.maxXCells\n + \", or size y must be between \"\n + LayoutPanel.minYCells + \" and \"\n + LayoutPanel.maxYCells + \".\");\n }\n } catch (NumberFormatException ne) {\n JOptionPane.showMessageDialog(null, \"Invalid number.\");\n }\n }\n }",
"int getCurrentSize();",
"public void testGetClientSize() {\n // Get the dimensions without any scroll bars\n Window.enableScrolling(false);\n final int oldClientHeight = Window.getClientHeight();\n final int oldClientWidth = Window.getClientWidth();\n assertTrue(oldClientHeight > 0);\n assertTrue(oldClientWidth > 0);\n \n // Compare to the dimensions with scroll bars\n Window.enableScrolling(true);\n final Label largeDOM = new Label();\n largeDOM.setPixelSize(oldClientWidth + 100, oldClientHeight + 100);\n RootPanel.get().add(largeDOM);\n DeferredCommand.addCommand(new Command() {\n public void execute() {\n int newClientHeight = Window.getClientHeight();\n int newClientWidth = Window.getClientWidth();\n assertTrue(newClientHeight < oldClientHeight);\n assertTrue(newClientWidth < oldClientWidth);\n finishTest();\n }\n });\n delayTestFinish(200);\n }",
"@Override\n\tprotected Point getInitialSize() {\n\t\treturn new Point(450, 270);\n\t}",
"public void setMinimumSize( Point size ) {\n checkWidget();\n if ( size == null )\n error( SWT.ERROR_NULL_ARGUMENT );\n setMinimumSize( size.x, size.y );\n }",
"private void resizeAnchorPane() {\n if (currentVista == null) return;\n hideBarsIfLackSpace();\n currentVista.setPrefWidth(scrollPane.getViewportBounds().getWidth());\n }",
"public void setSize(RMSize aSize) { setSize(aSize.width, aSize.height); }",
"private void setCorrectSize() {\n double newHeight = this.getContentPane().getPreferredSize().getHeight() +\n this.getContentPane().getPreferredSize().getHeight()/10 * 7;\n int newHeightInt = (int)Math.round(newHeight);\n \n this.setSize(this.getWidth(),newHeightInt);\n }",
"Dimension getSize();"
] | [
"0.64715385",
"0.6452448",
"0.6434437",
"0.62306845",
"0.61654174",
"0.6140732",
"0.61317325",
"0.6091371",
"0.6015649",
"0.5991018",
"0.59890807",
"0.59269637",
"0.5924503",
"0.5883554",
"0.5848117",
"0.5848117",
"0.583834",
"0.5805946",
"0.5769749",
"0.5765929",
"0.57622117",
"0.5747046",
"0.57464105",
"0.57342756",
"0.5727583",
"0.57273847",
"0.57144415",
"0.57031155",
"0.56620866",
"0.56570494",
"0.5653778",
"0.564547",
"0.5639214",
"0.5615294",
"0.5594484",
"0.5580044",
"0.5566128",
"0.5564341",
"0.55575985",
"0.5547812",
"0.5541109",
"0.5537795",
"0.552446",
"0.55219465",
"0.55154854",
"0.55152375",
"0.55054027",
"0.55015033",
"0.54968494",
"0.54968363",
"0.54934275",
"0.5488699",
"0.5477037",
"0.54681605",
"0.5463891",
"0.5457221",
"0.5451229",
"0.5448337",
"0.54474586",
"0.5446117",
"0.5430018",
"0.5424456",
"0.5423483",
"0.54155886",
"0.54133403",
"0.54088455",
"0.54088455",
"0.5398594",
"0.5384501",
"0.5375108",
"0.53746986",
"0.53746986",
"0.53733253",
"0.5371656",
"0.53666884",
"0.53653836",
"0.5365304",
"0.5364221",
"0.53635454",
"0.5358957",
"0.5356912",
"0.53472316",
"0.53469807",
"0.53453934",
"0.5343188",
"0.53403443",
"0.53334075",
"0.5333244",
"0.5330982",
"0.53305763",
"0.53270084",
"0.53215134",
"0.532149",
"0.5318646",
"0.5318421",
"0.53105485",
"0.5306054",
"0.5298563",
"0.5297049",
"0.5283933"
] | 0.72364247 | 0 |
Create buttons for button bar | protected void createButtonsForButtonBar(Composite parent) {
createButton(barComp, BUTTON_ADD_ID, Messages.btnAddParameter, true);
createButton(barComp, BUTTON_EDIT_ID, Messages.btnEditParameter, true);
createButton(barComp, BUTTON_DROP_ID, Messages.btnDropParameter, true);
createButton(barComp, BUTTON_UP_ID, Messages.btnUpParameter, true);
createButton(barComp, BUTTON_DOWN_ID, Messages.btnDownParameter, true);
createButton(parent, IDialogConstants.OK_ID, com.cubrid.common.ui.common.Messages.btnOK, true);
getButton(BUTTON_EDIT_ID).setEnabled(false);
getButton(BUTTON_UP_ID).setEnabled(false);
getButton(BUTTON_DOWN_ID).setEnabled(false);
getButton(BUTTON_DROP_ID).setEnabled(false);
createButton(parent, IDialogConstants.CANCEL_ID, com.cubrid.common.ui.common.Messages.btnCancel, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createButtons() {\n\t\tescapeBackground = new GRect(200, 150, 300, 400);\n\t\tescapeBackground.setFilled(true);\n\t\tescapeBackground.setColor(Color.gray);\n\n\t\tbutton1 = new GButton(\"Return to Game\", 250, 175, 200, 50, Color.cyan);\n\t\tbutton3 = new GButton(\"Exit Level\", 250, 330, 200, 50, Color.cyan);\n\t\tbutton4 = new GButton(\"Return to Menu\", 250, 475, 200, 50, Color.cyan);\n\n\t\tescapeButtons.add(button1);\n\t\tescapeButtons.add(button3);\n\t\tescapeButtons.add(button4);\n\n\t}",
"public void createButtons() {\n\t\tbutton1 = new JButton(\"Button1\");\n\t\tbutton2 = new JButton(\"Button2\");\n\t\tbutton3 = new JButton(\"Button3\");\n\t\tbutton4 = new JButton(\"Button4\");\n\t\tbutton5 = new JButton(\"Button5\");\n\t}",
"private void createButtonsPanel() {\r\n Composite buttonsPanel = new Composite(this, SWT.NONE);\r\n buttonsPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));\r\n buttonsPanel.setLayout(new GridLayout(4, true));\r\n\r\n getButtonFromAction(buttonsPanel, \"New\", new NewAction(_window));\r\n getButtonFromAction(buttonsPanel, \"Save\", new SaveAction());\r\n getButtonFromAction(buttonsPanel, \"Delete\", new DeleteAction(_window));\r\n getButtonFromAction(buttonsPanel, \"Cancel\", new CancelAction());\r\n }",
"protected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \" 设 置 \",\n\t\t\t\ttrue);//IDialogConstants.CANCEL_LABEL\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\t\" 取 消 \", false);//IDialogConstants.CANCEL_LABEL\n\t}",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent)\n\t{\n\t\tButton button_1 = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tbutton_1.setText(\"Ja\");\n\t\tButton button = createButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t\tbutton.setText(\"Nein\");\n\t}",
"@Override\n\tprotected void createCompButtons() {\n\t\tbuildCompButtons();\n\t}",
"private void createButton(){\n addButton();\n addStartButton();\n }",
"private void createButtons() {\n\t\tfor (int x = 0; x < buttons.length; x++)\n\t\t\tfor (int y = 0; y < buttons[x].length; y++) {\n\t\t\t\tif ((x % 2 == 0 && y % 2 == 0) || (x % 2 == 1 && y % 2 == 1))\n\t\t\t\t\tbuttons[x][y] = new DarkButton();\n\t\t\t\telse\n\t\t\t\t\tbuttons[x][y] = new LightButton();\n\n\t\t\t\tbuttonListener(x, y);\n\t\t\t}\n\t\t\t\n\t\t\tinitButtonIcons();\n\t}",
"private JPanel createButtons()\r\n\t{\r\n\t\tJPanel buttons = new JPanel();\r\n\t\tbuttons.setLayout(new FlowLayout(FlowLayout.TRAILING));\r\n\r\n\r\n\t\tButton save = new Button(PrimeMain1.texts.getString(\"save\"));\r\n\t\tsave.addActionListener(this);\r\n\t\tsave.setActionCommand(\"save\");\r\n\r\n\t\tButton cancel = new Button(PrimeMain1.texts.getString(\"cancel\"));\r\n\t\tcancel.addActionListener(this);\r\n\t\tcancel.setActionCommand(\"cancel\");\r\n\r\n\r\n\t\tbuttons.add(save);\r\n\t\tbuttons.add(cancel);\r\n\r\n\t\treturn buttons;\r\n\t}",
"private void generateButtons(){\n\t\tint coordX = ThreadLocalRandom.current().nextInt(0, 16);\n\t\tint coordY = ThreadLocalRandom.current().nextInt(0, 16);\n\t\t//Button button = new Button(coordX, coordY);\n\t\t//buttons.put(0, button);\n\t}",
"@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Add\",\r\n\t\t\t\ttrue);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\r\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\r\n\t}",
"public void createButtons() {\n\n addRow = new JButton(\"Add row\");\n add(addRow);\n\n deleteRow = new JButton(\"Delete row\");\n add(deleteRow);\n }",
"@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\r\n\t\tcreateButton(parent, IDialogConstants.OK_ID, Messages.BTN_ADD,\r\n\t\t\t\ttrue);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\r\n\t\t\t\tMessages.BTN_FINISH, false);\r\n\t\tinitDataBindings();\r\n\t}",
"@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\r\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Rechercher\", true);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, \"Annuler\", false);\r\n\t}",
"protected void drawButtons() {\n\t\tint spaceX = 50;\n\t\tint spaceY = 500;\t\n\t\t\n\t\tint aux = 1;\n\t\tfor(int i = 65; i < 91; i++) {\n\n\t\t\tLetterButton button = new LetterButton((char) i, (25 + spaceX ) * aux, spaceY);\n\t\t\taux++;\n\t\t\tif(aux == 14) {\n\t\t\t\tspaceY += 25 + 50;\n\t\t\t\taux = 1;\n\t\t\t}\n\t\t\tthis.add(button);\n\t\t}\n\t\t\n\t}",
"private void createBottomActionButtons() {\n Composite actionControlComp = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(2, false);\n GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);\n actionControlComp.setLayout(gl);\n actionControlComp.setLayoutData(gd);\n\n Button okBtn = new Button(actionControlComp, SWT.PUSH);\n okBtn.setText(\" OK \");\n okBtn.addSelectionListener(new SelectionAdapter() {\n\n @Override\n public void widgetSelected(SelectionEvent e) {\n if (verifySelection()) {\n close();\n }\n }\n });\n\n Button cancelBtn = new Button(actionControlComp, SWT.PUSH);\n cancelBtn.setText(\" Cancel \");\n cancelBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n close();\n }\n });\n }",
"public void createGameButtons() {\n \tcreateGameButton(myResources.getString(\"startcommand\"), 1, GAME_BUTTON_XLOCATION, GAME_BUTTON_YLOCATION);\n \tcreateGameButton(myResources.getString(\"stopcommand\"), 0, GAME_BUTTON_XLOCATION * 3, GAME_BUTTON_YLOCATION);\n \tcreateGameButton(myResources.getString(\"speedup\"), SPEED_INCREASE, GAME_BUTTON_XLOCATION*5, GAME_BUTTON_YLOCATION);\n \tcreateGameButton(myResources.getString(\"slowdown\"), 1/SPEED_INCREASE, GAME_BUTTON_XLOCATION*7, GAME_BUTTON_YLOCATION);\n }",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Speichern\",\n\t\t\t\tfalse);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\t\"Abbrechen\", false);\n\t\t\n\t}",
"@Override\n protected void createButtonsForButtonBar(Composite parent) {\n createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);\n createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);\n }",
"@Override\n\tprotected void createCompButtons() {\n\t\tbtnExcelReport = new Button(getCompButtons(), SWT.NONE);\n\t\tbtnExcelReport.setText(\"Excel Report\");\n\t\tbtnExcelReport.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tbtnExcelReport\n\t\t.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(\n\t\t\t\t\torg.eclipse.swt.events.SelectionEvent e) {\n\t\t\t\tcmdExcelReportWidgetSelected();\n\t\t\t}\n\t\t});\n\t}",
"private void createButton() {\n\t\tbtnAddTask = new JButton(\"Add Task\");\n\t\tbtnSave = new JButton(\"Save\");\n\t\tbtnCancel = new JButton(\"Cancel\");\n\n\t\tbtnAddTask.addActionListener(new ToDoAction());\n\t\tbtnSave.addActionListener(new ToDoAction());\n\t\tbtnCancel.addActionListener(new ToDoAction());\n\t}",
"protected void createButtons(Composite parent) {\n\t\tcomRoot = new Composite(parent, SWT.BORDER);\n\t\tcomRoot.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false));\n\t\tcomRoot.setLayout(new GridLayout(2, false));\n\n\t\ttbTools = new ToolBar(comRoot, SWT.WRAP | SWT.RIGHT | SWT.FLAT);\n\t\ttbTools.setLayout(new GridLayout());\n\t\ttbTools.setLayoutData(new GridData(SWT.RIGHT, SWT.BOTTOM, true, false));\n\n\t\tfinal ToolItem btnSettings = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnSettings.setText(Messages.btnAdvancedSettings);\n\t\tbtnSettings.setToolTipText(Messages.tipAdvancedSettings);\n\t\tbtnSettings.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tPerformanceSettingsDialog dialog = new PerformanceSettingsDialog(\n\t\t\t\t\t\tgetShell(), getMigrationWizard().getMigrationConfig());\n\t\t\t\tdialog.open();\n\t\t\t}\n\t\t});\n\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tbtnPreviewDDL = new ToolItem(tbTools, SWT.CHECK);\n\t\tbtnPreviewDDL.setSelection(false);\n\t\tbtnPreviewDDL.setText(Messages.btnPreviewDDL);\n\t\tbtnPreviewDDL.setToolTipText(Messages.tipPreviewDDL);\n\t\tbtnPreviewDDL.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tboolean flag = btnPreviewDDL.getSelection();\n\t\t\t\tswitchText(flag);\n\t\t\t}\n\t\t});\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\n\t\tfinal ToolItem btnExportScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnExportScript.setText(Messages.btnExportScript);\n\t\tbtnExportScript.setToolTipText(Messages.tipSaveScript);\n\t\tbtnExportScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\texportScriptToFile();\n\t\t\t}\n\t\t});\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tfinal ToolItem btnUpdateScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnUpdateScript.setText(Messages.btnUpdateScript);\n\t\tbtnUpdateScript.setToolTipText(Messages.tipUpdateScript);\n\t\tbtnUpdateScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tprepare4SaveScript();\n\t\t\t\tgetMigrationWizard().saveMigrationScript(false, isSaveSchema());\n\t\t\t\tMessageDialog.openInformation(PlatformUI.getWorkbench()\n\t\t\t\t\t\t.getDisplay().getActiveShell(),\n\t\t\t\t\t\tMessages.msgInformation, Messages.setOptionPageOKMsg);\n\t\t\t}\n\t\t});\n\t\tbtnUpdateScript\n\t\t\t\t.setEnabled(getMigrationWizard().getMigrationScript() != null);\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tfinal ToolItem btnNewScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnNewScript.setText(Messages.btnCreateNewScript);\n\t\tbtnNewScript.setToolTipText(Messages.tipCreateNewScript);\n\t\tbtnNewScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tprepare4SaveScript();\n\t\t\t\tString name = EditScriptDialog.getMigrationScriptName(\n\t\t\t\t\t\tgetShell(), getMigrationWizard().getMigrationConfig()\n\t\t\t\t\t\t\t\t.getName());\n\t\t\t\tif (StringUtils.isBlank(name)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgetMigrationWizard().getMigrationConfig().setName(name);\n\t\t\t\tgetMigrationWizard().saveMigrationScript(true, isSaveSchema());\n\t\t\t\tbtnUpdateScript.setEnabled(getMigrationWizard()\n\t\t\t\t\t\t.getMigrationScript() != null);\n\t\t\t\tMessageDialog.openInformation(PlatformUI.getWorkbench()\n\t\t\t\t\t\t.getDisplay().getActiveShell(),\n\t\t\t\t\t\tMessages.msgInformation, Messages.setOptionPageOKMsg);\n\t\t\t}\n\t\t});\n\t}",
"private void createButton() {\n this.setIcon(images.getImageIcon(fileName + \"-button\"));\n this.setActionCommand(command);\n this.setPreferredSize(new Dimension(width, height));\n this.setMaximumSize(new Dimension(width, height));\n }",
"private void createBottomButtons() {\n // Create a composite that will contain the control buttons.\n Composite bottonBtnComposite = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(3, true);\n gl.horizontalSpacing = 10;\n bottonBtnComposite.setLayout(gl);\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n bottonBtnComposite.setLayoutData(gd);\n\n // Create the Interpolate button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n interpolateBtn = new Button(bottonBtnComposite, SWT.PUSH);\n interpolateBtn.setText(\"Interpolate\");\n interpolateBtn.setLayoutData(gd);\n interpolateBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n ColorData upperColorData = upperColorWheel.getColorData();\n ColorData lowerColorData = lowerColorWheel.getColorData();\n\n colorBar.interpolate(upperColorData, lowerColorData, rgbRdo\n .getSelection());\n undoBtn.setEnabled(true);\n updateColorMap();\n }\n });\n\n // Create the Undo button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n undoBtn = new Button(bottonBtnComposite, SWT.PUSH);\n undoBtn.setText(\"Undo\");\n undoBtn.setEnabled(false);\n undoBtn.setLayoutData(gd);\n undoBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n undoBtn.setEnabled(colorBar.undoColorBar());\n updateColorMap();\n redoBtn.setEnabled(true);\n }\n });\n\n // Create the Redo button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n redoBtn = new Button(bottonBtnComposite, SWT.PUSH);\n redoBtn.setText(\"Redo\");\n redoBtn.setEnabled(false);\n redoBtn.setLayoutData(gd);\n redoBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n redoBtn.setEnabled(colorBar.redoColorBar());\n updateColorMap();\n undoBtn.setEnabled(true);\n }\n });\n\n // Create the Revert button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n revertBtn = new Button(bottonBtnComposite, SWT.PUSH);\n revertBtn.setText(\"Revert\");\n revertBtn.setLayoutData(gd);\n revertBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n colorBar.revertColorBar();\n updateColorMap();\n undoBtn.setEnabled(false);\n redoBtn.setEnabled(false);\n }\n });\n\n // Create the Save button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n saveBtn = new Button(bottonBtnComposite, SWT.PUSH);\n saveBtn.setText(\"Save\");\n saveBtn.setLayoutData(gd);\n if( seldCmapName == null ) {\n saveBtn.setEnabled(false);\n }\n \n saveBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n ColorMap cm = (ColorMap) cmapParams.getColorMap();\n seldCmapName = selCmapCombo.getText();\n \n// int sepIndx = seldCmapName.indexOf(File.separator);\n// String cmapCat = seldCmapName.substring(0,seldCmapName.indexOf(File.separator));\n// String cmapName = seldCmapName.substring( seldCmapName.indexOf(File.separator));\n if (lockedCmaps != null && lockedCmaps.isLocked(seldCmapName)) {\n \tMessageDialog confirmDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Save Colormap\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" already exists and is locked.\\n\\n\" +\n \t\t\t\"You cannot overwrite it.\",\n \t\t\tMessageDialog.INFORMATION, new String[]{\"OK\"}, 0);\n \tconfirmDlg.open();\n \tcolorBar.undoColorBar();\n updateColorMap();\n \treturn;\n } \n else if( ColorMapUtil.colorMapExists( seldCmapCat, seldCmapName ) ) {\n \tMessageDialog confirmDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Save Colormap\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" already exists.\\n\\n\" +\n \t\t\t\"Do you want to overwrite it?\",\n \t\t\tMessageDialog.QUESTION, new String[]{\"Yes\", \"No\"}, 0);\n \tconfirmDlg.open();\n\n \tif( confirmDlg.getReturnCode() == MessageDialog.CANCEL ) {\n \t\treturn;\n \t}\n }\n\n try {\n ColorMapUtil.saveColorMap( cm, seldCmapCat, seldCmapName );\n \n MessageDialog msgDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Colormap Saved\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" Saved.\",\n \t\t\tMessageDialog.INFORMATION, new String[]{\"OK\"}, 0);\n \tmsgDlg.open();\n } catch (VizException e) {\n MessageDialog msgDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Error\", null, \n \t\t\t\"Error Saving Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\"\\n\"+e.getMessage(),\n \t\t\tMessageDialog.ERROR, new String[]{\"OK\"}, 0);\n \tmsgDlg.open();\n }\n\n completeSave();\n }\n });\n\n\n // \n // Create the Delete button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n gd.grabExcessHorizontalSpace = false;\n deleteBtn = new Button(bottonBtnComposite, SWT.PUSH);\n deleteBtn.setText(\"Delete\");\n deleteBtn.setLayoutData(gd);\n deleteBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n \tdeleteColormap();\n }\n });\n Label sep = new Label(shell, SWT.SEPARATOR|SWT.HORIZONTAL);\n gd = new GridData(GridData.FILL_HORIZONTAL);\n sep.setLayoutData(gd);\n\n // \n // Create the Delete button.\n gd = new GridData(GridData.HORIZONTAL_ALIGN_END);\n Button closeBtn = new Button(shell, SWT.PUSH);\n closeBtn.setText(\" Close \");\n closeBtn.setLayoutData(gd);\n closeBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n \tshell.dispose();\n }\n });\n }",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t}",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t}",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t}",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t}",
"@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\r\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\r\n\t\t\t\ttrue);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\r\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\r\n\t}",
"private void createButtons() {\n Button helpSettingsButton = new Button(\"\",\n new Button.ClickListener() {\n private static final long serialVersionUID = -5797923866320649518L;\n\n @Override\n public void buttonClick(ClickEvent event) {\n settingsPresenter.navigateToHelp();\n }\n });\n\n// Button skillSettingsButton = new Button(\"\",\n// new Button.ClickListener() {\n// private static final long serialVersionUID = 7147554466396214893L;\n//\n// @Override\n// public void buttonClick(ClickEvent event) {\n// settingsPresenter.navigateToSkills();\n// }\n// });\n// skillSettingsButton.addStyleName(\"icon-cog\");\n\n Button medicSettingsButton = new Button(\"\",\n new Button.ClickListener() {\n private static final long serialVersionUID = 7147554466396214893L;\n\n @Override\n public void buttonClick(ClickEvent event) {\n settingsPresenter.navigateToMedic();\n }\n });\n\n\n Button logoutButton = new Button(\"\",\n new Button.ClickListener() {\n private static final long serialVersionUID = -1096188732209266611L;\n\n @Override\n public void buttonClick(ClickEvent event) {\n settingsPresenter.navigateBack();\n }\n });\n logoutButton.addStyleName(\"default\");\n\n // Adding and aligning the 3 Buttons.\n //Setting a Description for the buttons which is displayed when flying over the button\n super.verticalNavigation.addComponent(helpSettingsButton);\n super.verticalNavigation.setComponentAlignment(helpSettingsButton, Alignment.MIDDLE_CENTER);\n helpSettingsButton.setDescription(\"Set the Help options for the Patient\");\n helpSettingsButton.setIcon(new ThemeResource(\"img/contacgg.png\"), BUTTON_HELP_SETTINGS);\n helpSettingsButton.setWidth(BUTTON_WIDTH);\n helpSettingsButton.setHeight(BUTTON_HEIGHT);\n\n super.verticalNavigation.addComponent(medicSettingsButton);\n super.verticalNavigation.setComponentAlignment(medicSettingsButton, Alignment.MIDDLE_CENTER);\n medicSettingsButton.setDescription(\"Set the Medication options for the Patient\");\n medicSettingsButton.setIcon(new ThemeResource(\"img/medicine-icon-cog.png\"),BUTTON_MEDIC_SETTINGS);\n medicSettingsButton.setWidth(BUTTON_WIDTH);\n medicSettingsButton.setHeight(BUTTON_HEIGHT);\n\n// addComponent(skillSettingsButton);\n// setComponentAlignment(skillSettingsButton, Alignment.MIDDLE_CENTER);\n// skillSettingsButton.setDescription(\"Set the Skill options for the Patient\");\n// skillSettingsButton.setIcon(new ThemeResource(\"img/skill2-icon-cog.png\"), BUTTON_SKILL_SETTINGS);\n// skillSettingsButton.setWidth(BUTTON_WIDTH);\n// skillSettingsButton.setHeight(BUTTON_HEIGHT);\n\n logoutButton.setWidth(BUTTON_WIDTH);\n super.verticalNavigation.addComponent(logoutButton);\n super.verticalNavigation.setComponentAlignment(logoutButton, Alignment.MIDDLE_CENTER);\n logoutButton.setDescription(\"You will be logged out\");\n logoutButton.setIcon(new ThemeResource(\"img/logout.png\"), BUTTON_LOGOUT);\n logoutButton.setWidth(BUTTON_WIDTH);\n logoutButton.setHeight(BUTTON_HEIGHT);\n\n }",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tbutton.addSelectionListener(new SelectionListener() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDiagnosticChain diagnosticChain = new BasicDiagnostic();\n\t if (isValid(diagnosticChain)) {\n\t \t okFlag = true;\n\t\t okPressed();\n\t\t }else{\n\t\t \t Message messageDialog = new Message(EditTask.this.getShell());\n\t\t \t messageDialog.setMessage(Util.getErrorMessage(diagnosticChain));\n\t\t \t messageDialog.open();\n\t\t }\t\t\t\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t}\n\t\t});\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t}",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);\n\t\tbutton.setText(DialogStrings.RemoveUserDialog_RemoveButton);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);\n\t}",
"public void buildButtons() {\r\n\t\tImage temp1= display_img.getImage();\r\n\t\tImageIcon img=new ImageIcon(temp1.getScaledInstance(800, 800, Image.SCALE_SMOOTH));\r\n\t\timg1 = img.getImage();\r\n\t\tfor(int y=0;y<10;y++) {\r\n\t\t\tfor(int x=0; x<10; x++) {\r\n\t\t\t\tImage image = Toolkit.getDefaultToolkit().createImage(new FilteredImageSource(img1.getSource(), new CropImageFilter(x * 800 / 10, y * 800 / 10, 100, 100)));\r\n\t\t\t\tImageIcon icon = new ImageIcon(image);\r\n\t\t\t\tJButton temp = new JButton(icon);\r\n\t\t\t\ttemp.putClientProperty(\"position\", new Point(y,x));\r\n\t\t\t\tsolutions.add(new Point(y,x));\r\n\t\t\t\ttemp.putClientProperty(\"isLocked\", false);\r\n\t\t\t\ttemp.addMouseListener(new DragMouseAdapter());\r\n\t\t\t\tgrid[x][y]=temp;\r\n\r\n\t\t\t\tbuttons.add(temp);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);\n\t}",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Fermer\", true);\n\t}",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Fermer\", true);\n\t}",
"private HBox createButtons() {\n\t\tButton solve = new Button(\"Solve\");\n\t\tButton clear = new Button(\"Clear\");\n\t\tButton quit = new Button(\"Quit\");\n\t\t\n\t\tsolve.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\tclear.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\tquit.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\t\n\t\tsolve.setOnAction(e -> solve());\n\t\tclear.setOnAction(e -> clear());\n\t\tquit.setOnAction(e -> quit());\n\t\t\n\t\tHBox buttons = new HBox();\n\t\tbuttons.setSpacing(20);\n\t\tbuttons.setPadding(new Insets(20,20,20,20));\n\t\tbuttons.setAlignment(Pos.CENTER);\n\t\tbuttons.getChildren().addAll(solve, clear, quit);\n\t\tbuttons.setStyle(\"-fx-background-color: #DCDCDC;\");\n\t\t\n\t\treturn buttons;\n\t}",
"public void createButtonGrid() {\n\t\tbuttonPanel.setOpaque(false);\n\t\t\n\t\t// designs array of buttons\n\t\tfor (int counter = 1; counter <= 20; counter++) {\n\t\t\tbuttonArray[counter] = new JButton();\n\t\t\tbuttonArray[counter].setOpaque(false);\n\t\t\tbuttonArray[counter].setVisible(true);\n\t\t\tbuttonArray[counter].setBorderPainted(false);\n\t\t\tbuttonArray[counter].setHorizontalTextPosition(JButton.CENTER);\n\t\t\tbuttonArray[counter].setVerticalTextPosition(SwingConstants.CENTER);\n\t\t\tbuttonArray[counter].setFont(new Font(\"Courier\", Font.PLAIN, 15));\n\t\t\tbuttonArray[counter].setText(\"<html><font color = white>\" + Integer.toString(counter) + \"</font></html>\");\n\t\t\t// add action listener to each button\n\t\t\tbuttonArray[counter].addActionListener(eventsMain);\n\t\t\t// add each button to the container\n\t\t\tbuttonPanel.add(buttonArray[counter]);\n\t\t}\n\t\t\n\t\t// set colour for ach row of buttons\n\t\tfor (int counter = 1; counter <= 20; counter++) {\n\t\t\tif (counter >= 1 && counter < 6) {\n\t\t\t\tbuttonArray[counter].setIcon(btnBlue);\n\t\t\t} else if (counter > 5 && counter < 11) {\n\t\t\t\tbuttonArray[counter].setIcon(btnGreen);\n\t\t\t} else if (counter > 10 && counter < 16) {\n\t\t\t\tbuttonArray[counter].setIcon(btnRed);\n\t\t\t} else if (counter > 15 && counter < 21) {\n\t\t\t\tbuttonArray[counter].setIcon(btnGray);\n\t\t\t}\n\t\t}\n\t}",
"private void addButtons() {\r\n\t\troot.getChildren().add(button); // creating the Easy button \r\n\t\tb1 = new Button(\"Easy\");\r\n\t\tb1.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Easy\";\r\n\t\t\t}\r\n\t\t});\r\n\t\troot.getChildren().add(b1); // creating the Normal button\r\n\t\tb2 = new Button(\"Normal\");\r\n\t\tb2.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Normal\";\r\n\t\t\t}\r\n\t\t});\r\n\t\tb2.setLayoutX(50);\r\n\t\troot.getChildren().add(b2); // creating the Hard button\r\n\t\tb3 = new Button(\"Hard\");\r\n\t\tb3.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Hard\";\r\n\t\t\t}\r\n\t\t});\r\n\t\tb3.setLayoutX(115);\r\n\t\troot.getChildren().add(b3);\r\n\t}",
"private void createButtons() {\n\tTexture startGameTex = new Texture(\n\t\tGdx.files.internal(\"assets/data/menu/menu_start.png\"));\n\tTexture plane_p1_tex = new Texture(\n\t\tGdx.files.internal(\"assets/data/menu/menu_player1.png\"));\n\tTexture plane_p2_tex = new Texture(\n\t\tGdx.files.internal(\"assets/data/menu/menu_player2.png\"));\n\n\tplayButton = new Button(\"\", font, 0, 0, new TextureRegion(startGameTex,\n\t\t0, 0, 161, 20), new TextureRegion(startGameTex, 0, 0, 161, 20),\n\t\tnew ScreenSwitchHandler(Screen.GAME));\n\tplaneButton_p1 = new Button(\"\", font, 0, 0, new TextureRegion(\n\t\tplane_p1_tex, 0, 0, 161, 20), new TextureRegion(plane_p1_tex,\n\t\t0, 0, 161, 20), new ScreenSwitchHandler(Screen.PLANE_P1));\n\tplaneButton_p2 = new Button(\"\", font, 0, 0, new TextureRegion(\n\t\tplane_p2_tex, 0, 0, 161, 20), new TextureRegion(plane_p2_tex,\n\t\t0, 0, 161, 20), new ScreenSwitchHandler(Screen.PLANE_P2));\n\toptionsButton = new Button(\"Options\", font, new ScreenSwitchHandler(\n\t\tScreen.OPTIONS));\n\texitButton = new Button(\"Exit\", font, new ButtonHandler() {\n\t @Override\n\t public void onClick() {\n\t\tGdx.app.exit();\n\t }\n\n\t @Override\n\t public void onRelease() {\n\t\t// TODO Auto-generated method stub\n\n\t }\n\t});\n }",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button_1 = createButton(parent, CustomNo, \"No\", false);\n\t\tbutton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// \"No\" clicked\n\t\t\t\tclose();\n\t\t\t}\n\t\t});\n\t\tButton button = createButton(parent, CustomYes, \"Yes\",\n\t\t\t\ttrue);\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// \"Yes\" clicked\n\t\t\t\t\n\t\t FileDialog dlg = new FileDialog(getShell(), SWT.SAVE);\n\t\t dlg.setFilterNames(new String[]{\"All Files (*.*)\"});\n\t\t dlg.setFilterExtensions(new String[]{\"*.*\"});\n\t\t dlg.setOverwrite(true);\n\t\t dlg.setFileName(filename);\n\t\t String path = dlg.open();\n\t\t //Activator.getDefault().showDialogAsync(\"Filepath chosen\", path);\n\t\t filepath = path;\n\t\t if (path != null)\n\t\t \tclose();\n\t\t\t}\n\t\t});\n\t\tbutton.setSelection(true);\n\t}",
"void createButtons(Container cp) {\r\n JPanel pn4 = new JPanel(); // create a panel\r\n pn4.setLayout(new FlowLayout(FlowLayout.LEFT)); // set the layout\r\n for (int i=0; i<strClEx.length; i++) {\r\n // repeat for the number of the buttons\r\n bt[i] = new JButton(strClEx[i]); // create a button\r\n bt[i].addActionListener(this); // add the action listener to the button\r\n pn4.add(bt[i]); // add the button to the panel\r\n }\r\n cp.add(pn4); // add the panel to the container\r\n }",
"private void createComponentForButtons(Composite section)\n {\n createRowForNewStyleButton(section);\n createRowForNewRegexButton(section);\n createRowForNewColumnButton(section);\n createRowForDeleteButton(section);\n createRowForDeleteAllButton(section);\n }",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t\tm_bindingContext = initDataBindings();\n\t}",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button = createButton(parent, IDialogConstants.OK_ID,\n\t\t\t\tIDialogConstants.OK_LABEL, true);\n\t\tbutton.setText(\"关闭\");\n\t}",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);\n\t\tvalidate();\n\t}",
"private void configureButtons() {\n\n backToMenu = new JButton(\"Menu\");\n if(isWatching){\n backToMenu.setBounds(575, 270, 100, 50);\n }\n else{\n backToMenu.setBounds(30, 800, 100, 50);\n }\n backToMenu.setFont(new Font(\"Broadway\", Font.PLAIN, 20));\n backToMenu.setBackground(Color.RED);\n backToMenu.setFocusable(false);\n backToMenu.addActionListener(this);\n add(backToMenu);\n }",
"private void buttonInit(){\n for(int i=0; i < 3; i++){\n choice[i] = new JButton();\n\n }\n choice[0].setText(\"10x10 / 8 bombs\");\n choice[0].setBackground(new Color(86, 160, 189));\n\n\n choice[0].addActionListener(l-> makeGamePanel(10, 8));\n\n choice[1].setText(\"15x15 / 30 bombs\");\n choice[1].setBackground(new Color(238, 160, 160));\n\n\n choice[1].addActionListener(l-> makeGamePanel(15,30));\n\n choice[2].setText(\"24x24 / 70 bombs\");\n choice[2].setBackground(new Color(253, 230, 122));\n choice[2].setFont(new Font(Font.MONOSPACED, Font.BOLD, 30));\n choice[2].setForeground(new Color(45, 68, 73));\n\n choice[2].addActionListener(l-> makeGamePanel(24,70));\n\n this.add(choice[0], BorderLayout.LINE_START); this.add(choice[1], BorderLayout.LINE_END); this.add(choice[2], BorderLayout.CENTER);\n }",
"private void initButtons() {\n HBox buttons = new HBox(50);\n yes = new Button(\"Yes!\");\n no = new Button(\"No!\");\n buttons.getChildren().addAll(yes,no);\n buttons.setAlignment(Pos.CENTER);\n root.getChildren().addAll(buttons);\n }",
"@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tfinal Button bOk = createButton(parent, IDialogConstants.OK_ID,\n\t\t\t\tIDialogConstants.OK_LABEL, true);\n\n\t\tbOk.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif (selection != null && !selection.equals(initialFloorName)) {\n\t\t\t\t\tProjectModel.getInstance().acceptDeviceCoordinates(\n\t\t\t\t\t\t\tparentFloor, selection);\n\t\t\t\t} else {\n\t\t\t\t\tProjectModel.getInstance().setAdjustDeviceCoordinates(\n\t\t\t\t\t\t\tparentFloor, selection, false);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tbCancel = createButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\n\t\tbCancel.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif (initialFloorName != null) {\n\t\t\t\t\tProjectModel.getInstance().setAdjustDeviceCoordinates(\n\t\t\t\t\t\t\tparentFloor, selection, false);\n\n\t\t\t\t\tdoChangeToFloorImage(initialFloorName);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"protected void createButtons(Panel panel) {\n panel.add(new Filler(24,20));\n\n Choice drawingChoice = new Choice();\n drawingChoice.addItem(fgUntitled);\n\n\t String param = getParameter(\"DRAWINGS\");\n\t if (param == null)\n\t param = \"\";\n \tStringTokenizer st = new StringTokenizer(param);\n while (st.hasMoreTokens())\n drawingChoice.addItem(st.nextToken());\n // offer choice only if more than one\n if (drawingChoice.getItemCount() > 1)\n panel.add(drawingChoice);\n else\n panel.add(new Label(fgUntitled));\n\n\t\tdrawingChoice.addItemListener(\n\t\t new ItemListener() {\n\t\t public void itemStateChanged(ItemEvent e) {\n\t\t if (e.getStateChange() == ItemEvent.SELECTED) {\n\t\t loadDrawing((String)e.getItem());\n\t\t }\n\t\t }\n\t\t }\n\t\t);\n\n panel.add(new Filler(6,20));\n\n Button button;\n button = new CommandButton(new DeleteCommand(\"Delete\", fView));\n panel.add(button);\n\n button = new CommandButton(new DuplicateCommand(\"Duplicate\", fView));\n panel.add(button);\n\n button = new CommandButton(new GroupCommand(\"Group\", fView));\n panel.add(button);\n\n button = new CommandButton(new UngroupCommand(\"Ungroup\", fView));\n panel.add(button);\n\n button = new Button(\"Help\");\n\t\tbutton.addActionListener(\n\t\t new ActionListener() {\n\t\t public void actionPerformed(ActionEvent event) {\n\t\t showHelp();\n\t\t }\n\t\t }\n\t\t);\n panel.add(button);\n\n fUpdateButton = new Button(\"Simple Update\");\n\t\tfUpdateButton.addActionListener(\n\t\t new ActionListener() {\n\t\t public void actionPerformed(ActionEvent event) {\n if (fSimpleUpdate)\n setBufferedDisplayUpdate();\n else\n setSimpleDisplayUpdate();\n\t\t }\n\t\t }\n\t\t);\n\n // panel.add(fUpdateButton); // not shown currently\n }",
"@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\r\n\t\tbutton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\r\n\t\t\t\ttrue);\r\n\t\t//button.setEnabled(false);\r\n\t\t\r\n\t\tFile dir=new File(combo.getText());\r\n\t\tbutton.setEnabled(dir.isDirectory());\r\n\t\t\r\n\t\t\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\r\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\r\n\t}",
"private void setupButtons()\n\t{\n\t\tequals.setText(\"=\");\n\t\tequals.setBackground(Color.RED);\n\t\tequals.setForeground(Color.WHITE);\n\t\tequals.setOpaque(true);\n\t\tequals.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 50));\n\t\tequals.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tclear.setText(\"C\");\n\t\tclear.setBackground(new Color(0, 170, 100));\n\t\tclear.setForeground(Color.WHITE);\n\t\tclear.setOpaque(true);\n\t\tclear.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 50));\n\t\tclear.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tbackspace.setText(\"<--\");\n\t\tbackspace.setBackground(new Color(0, 170, 100));\n\t\tbackspace.setForeground(Color.WHITE);\n\t\tbackspace.setOpaque(true);\n\t\tbackspace.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 35));\n\t\tbackspace.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tnegative.setText(\"+/-\");\n\t\tnegative.setBackground(Color.GRAY);\n\t\tnegative.setForeground(Color.WHITE);\n\t\tnegative.setOpaque(true);\n\t\tnegative.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 35));\n\t\tnegative.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t}",
"Button createButton();",
"private void iterateOverButtons(){\n int columnRows = 4;\n integerButtons = new Button[MAX_BUTTONS];\n for (int i = 0; i < integerButtons.length; ++i) {\n integerButtons[i] = new Button(buttonText[i]);\n integerButtons[i].setId(\"buttons\");\n integerButtons[i].setPrefSize(60, 80);\n gridPane.add(integerButtons[i], i % columnRows , i / columnRows);\n }\n }",
"private void setupButtons() {\n final ButtonGroup btngrp = new ButtonGroup();\n\n for (final AbstractAction actn : myToolActions) {\n final JToggleButton btn = new JToggleButton(actn);\n btn.addActionListener(actn);\n btngrp.add(btn);\n add(btn);\n }\n\n btngrp.clearSelection();\n btngrp.getElements().nextElement().setSelected(true);\n\n }",
"private void createButtonsPane(VBox labelsPane){\n\t\tHBox buttonsPane = new HBox();\n\t\tButton easy = new Button(\"EASY\");\n\t\teasy.setFont(new Font(\"Arial Black\", 12));\n\t\teasy.setTextFill(Color.BLUE);\n\t\teasy.setFocusTraversable(false);\n\t\tButton medium = new Button(\"MEDIUM\");\n\t\tmedium.setFont(new Font(\"Arial Black\", 12));\n\t\tmedium.setTextFill(Color.BLUE);\n\t\tmedium.setFocusTraversable(false);\n\t\tButton hard = new Button(\"HARD\");\n\t\thard.setFont(new Font(\"Arial Black\", 12));\n\t\thard.setTextFill(Color.BLUE);\n\t\thard.setFocusTraversable(false);\n\t\tbuttonsPane.getChildren().addAll(easy, medium, hard);\n\t\tbuttonsPane.setMargin(easy, new Insets(10,5,5,5));\n\t\tbuttonsPane.setMargin(medium, new Insets(10,5,5,5));\n\t\tbuttonsPane.setMargin(hard, new Insets(10,5,5,5));\n\t\tbuttonsPane.setSpacing(20);\n\t\tbuttonsPane.setAlignment(Pos.CENTER);\n\t\tbuttonsPane.setStyle(\"-fx-background-color: gray;\");\n\t\teasy.setOnAction(new EasyHandler());\n\t\tmedium.setOnAction(new MediumHandler());\n\t\thard.setOnAction(new HardHandler());\n\t\tlabelsPane.getChildren().add(buttonsPane);\n\t}",
"@Override\n protected void addButtons()\n {\n JLabel agentOptions = new JLabel(\"Client Options \", SwingConstants.CENTER);\n addComponentToGridBag(this, agentOptions, 0, 0, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n\n JButton agentSendMessage = new JButton(\"Send Message\");\n addComponentToGridBag(this, agentSendMessage, 0, 2, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentSendMessage.addActionListener((ActionEvent e) ->\n {\n String to = getTo();\n String content = getContent(to);\n sendMessage(to, content);\n });\n\n JButton agentShowPortal = new JButton(\"Show Portal\");\n addComponentToGridBag(this, agentShowPortal, 0, 3, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentShowPortal.addActionListener((ActionEvent e) ->\n {\n displayConnections();\n });\n\n JButton agentexit = new JButton(\"Exit\");\n addComponentToGridBag(this, agentexit, 0, 5, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentexit.addActionListener((ActionEvent e) ->\n {\n System.exit(0);\n });\n }",
"private HorizontalPanel createCommands() {\n\t\tfinal HorizontalPanel bar = new HorizontalPanel();\n\t\tbar.addStyleName(AbstractField.CSS.cbtAbstractCommand());\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Save button\n\t\t//-----------------------------------------------\n\t\tfinal CommandButton saveButton = new CommandButton(this, AbstractField.CONSTANTS.allSave(), actorUpdate, tab++);\n\t\tsaveButton.addStyleName(AbstractField.CSS.cbtCommandButtonTwo());\n\t\tsaveButton.addStyleName(AbstractField.CSS.cbtGradientBlue());\n\t\tsaveButton.setTitle(AbstractField.CONSTANTS.helpSave());\n\t\tbar.add(saveButton);\n\n\t\t//-----------------------------------------------\n\t\t// Delete button\n\t\t//-----------------------------------------------\n\t\tfinal CommandButton deleteButton = new CommandButton(this, AccessControl.DELETE_PERMISSION, AbstractField.CONSTANTS.allDelete(), actorDelete, tab++);\n\t\tdeleteButton.addStyleName(AbstractField.CSS.cbtCommandButtonTwo());\n\t\tdeleteButton.addStyleName(AbstractField.CSS.cbtGradientRed());\n\t\tdeleteButton.setTitle(AbstractField.CONSTANTS.helpDelete());\n\t\tbar.add(deleteButton);\n\n\t\t//-----------------------------------------------\n\t\t// Transition array that defines the finite state machine\n\t\t//-----------------------------------------------\n\t\tfsm = new ArrayList<Transition>();\n\t\tfsm.add(new Transition(Party.CREATED, saveButton, Party.CREATED));\n\t\tfsm.add(new Transition(Party.CREATED, deleteButton, Party.FINAL));\n\n\t\treturn bar;\n\t}",
"@Override\n protected void createButtonsForButtonBar(Composite parent) {\n createButton(parent, IDialogConstants.CANCEL_ID, Messages.BaselineShowDialog_8, false);\n }",
"private void createUIComponents() {\n bt1 = new JButton(\"Hola\");\n }",
"public JButtonsPanel() {\r\n setBorder(BorderFactory.createEtchedBorder(Color.GREEN, new Color(148, 145, 140)));\r\n\r\n jOpen.setText(BTN_OPEN);\r\n jOpen.setToolTipText(MSG_OPEN);\r\n jOpen.setBounds(new Rectangle(BTN_LEFT, BTN_VSPACE, BTN_WIDTH, BTN_HEIGHT));\r\n add(jOpen);\r\n\r\n jCheckHealth.setText(BTN_CHECK_HEALTH);\r\n jCheckHealth.setToolTipText(MSG_CHECK_HEALTH);\r\n jCheckHealth.setBounds(new Rectangle(BTN_LEFT, (int) (jOpen.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jCheckHealth);\r\n\r\n jClose.setText(BTN_CLOSE);\r\n jClose.setToolTipText(MSG_CLOSE);\r\n jClose.setBounds(new Rectangle(BTN_LEFT, (int) (jCheckHealth.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jClose);\r\n\r\n jClaim.setText(BTN_CLAIM);\r\n jClaim.setToolTipText(MSG_CLAIM);\r\n jClaim.setBounds(new Rectangle(BTN_LEFT, (int) (jClose.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jClaim);\r\n\r\n jRelease.setText(BTN_RELEASE);\r\n jRelease.setToolTipText(MSG_RELEASE);\r\n jRelease.setBounds(new Rectangle(BTN_LEFT, (int) (jClaim.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jRelease);\r\n\r\n jDeviceEnable.setText(BTN_DEVICE_ENABLE);\r\n jDeviceEnable.setToolTipText(MSG_DEVICE_ENABLE);\r\n jDeviceEnable.setBounds(new Rectangle(BTN_LEFT, (int) (jRelease.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jDeviceEnable);\r\n\r\n jDeviceDisable.setText(BTN_DEVICE_DISABLE);\r\n jDeviceDisable.setToolTipText(MSG_DEVICE_DISABLE);\r\n jDeviceDisable.setBounds(new Rectangle(BTN_LEFT, (int) (jDeviceEnable.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jDeviceDisable);\r\n\r\n jClearData.setText(BTN_CLEAR_DATA);\r\n jClearData.setToolTipText(MSG_CLEAR_DATA);\r\n jClearData.setBounds(new Rectangle(BTN_LEFT, (int) (jDeviceDisable.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jClearData);\r\n\r\n jBeginEnrollCapture.setText(BTN_BEGIN_ENROLL_CAPTURE);\r\n jBeginEnrollCapture.setToolTipText(MSG_BEGIN_ENROLL_CAPTURE);\r\n jBeginEnrollCapture.setBounds(new Rectangle(BTN_LEFT, (int) (jClearData.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jBeginEnrollCapture);\r\n\r\n jEndCapture.setText(BTN_END_CAPTURE);\r\n jEndCapture.setToolTipText(MSG_END_CAPTURE);\r\n jEndCapture.setBounds(new Rectangle(BTN_LEFT, (int) (jBeginEnrollCapture.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jEndCapture);\r\n\r\n jBeginVerifyCapture.setText(BTN_BEGIN_VERIFY_CAPTURE);\r\n jBeginVerifyCapture.setToolTipText(MSG_BEGIN_VERIFY_CAPTURE);\r\n jBeginVerifyCapture.setBounds(new Rectangle(BTN_LEFT, (int) (jEndCapture.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jBeginVerifyCapture);\r\n\r\n jIdentifyMatch.setText(BTN_IDENTIFY_MATCH);\r\n jIdentifyMatch.setToolTipText(MSG_IDENTIFY_MATCH);\r\n jIdentifyMatch.setBounds(new Rectangle(BTN_LEFT, (int) (jBeginVerifyCapture.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jIdentifyMatch);\r\n\r\n jVerifyMatch.setText(BTN_VERIFY_MATCH);\r\n jVerifyMatch.setToolTipText(MSG_VERIFY_MATCH);\r\n jVerifyMatch.setBounds(new Rectangle(BTN_LEFT, (int) (jIdentifyMatch.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jVerifyMatch);\r\n\r\n jIdentify.setText(BTN_IDENTIFY);\r\n jIdentify.setToolTipText(MSG_IDENTIFY);\r\n jIdentify.setBounds(new Rectangle(BTN_LEFT, (int) (jVerifyMatch.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jIdentify);\r\n\r\n jVerify.setText(BTN_VERIFY);\r\n jVerify.setToolTipText(MSG_VERIFY);\r\n jVerify.setBounds(new Rectangle(BTN_LEFT, (int) (jIdentify.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jVerify);\r\n }",
"private void createButton(int i){\n\t\tint x = 10, y = 120, width = 100, height = 20;\n\t\tint temp = 0;\n\t\t\n\t\tbuttons.add(new JButton(\"New Student\"));\n\t\tbuttons.get(i).addActionListener(this);\n\t\t\n\t\tfor (int a = 0; a<i; a++){\n\t\t\tx += 110;\n\t\t\ttemp++;\n\t\t\tif(temp >= Integer.parseInt(askColumns.getText())){\n\t\t\t\ty += 140;\n\t\t\t\tx = 10;\n\t\t\t\ttemp = 0;\n\t\t\t}\n\t\t\t\n\n\t\t}\n\t\t\n\t\t\n\t\tbuttons.get(i).setBounds(x, y, width, height);\n\t\tthis.add(buttons.get(i));\t\n\t\tbuttons.get(i).revalidate();\n\t\tbuttons.get(i).repaint();\n\t\t\n\t}",
"private void makeFrontGUIButtons(){\n Dimension preferred = getPreferredSize();\n\n optionsButton = new JButton();\n makeFrontButton(optionsButton, \"optionsIcon\", \"showOptions\", new Rectangle((int) preferred.getWidth() - 60, (int) preferred.getHeight() - (int) (preferred.getHeight() * 0.98), 39, 37));\n makeSearchButton();\n\n zoomInButton = new JButton();\n makeFrontButton(zoomInButton, \"plusIcon\", \"zoomIn\", new Rectangle((int) preferred.getWidth() - 60, (int) preferred.getHeight() - (int) preferred.getHeight() / 3 * 2, 39, 37));\n\n zoomOutButton = new JButton();\n makeFrontButton(zoomOutButton, \"minusIcon\", \"zoomOut\", new Rectangle((int) preferred.getWidth() - 60, (int) preferred.getHeight() - (int) (preferred.getHeight() / 3 * 2 + 45), 39, 37));\n\n makeShowRoutePanelButton();\n\n fullscreenButton = new JButton();\n makeFrontButton(fullscreenButton, \"fullscreenIcon\", \"fullscreen\", new Rectangle((int) preferred.getWidth() - 60, (int) (preferred.getHeight() - preferred.getHeight() / 3 * 2 + 100), 39, 37));\n\n mapTypeButton = new JButton();\n makeFrontButton(mapTypeButton, \"layerIcon\", \"mapType\", new Rectangle((int) preferred.getWidth() - 49, (int) (preferred.getHeight() - preferred.getHeight() / 3 * 2 - 45), 39, 37));\n makeCloseDirectionListPanel();\n }",
"private void initBtnsArray()\r\n {\r\n for (int i = 0; i < this.buttons.length; i++)\r\n this.buttons[i] = new Button(\"Button #\" + i);\r\n }",
"private void generateButtonPanel() {\n buttonsPanel = new JPanel();\n playPauseButton = addButton(\"Play/Pause\");\n restartButton = addButton(\"Restart\");\n speedUpButton = addButton(\"Speed Up\");\n slowDownButton = addButton(\"Slow Down\");\n loopbackButton = addButton(\"Loopback\");\n keyCommandsButton = addButton(\"Key Commands\");\n textViewButton = addButton(\"Animation Text\");\n\n addShapeButton = addButton(\"Add Shape\");\n removeShapeButton = addButton(\"Remove Shape\");\n addKeyframeButton = addButton(\"Add Keyframe\");\n removeKeyframeButton = addButton(\"Remove Keyframe\");\n editKeyframeButton = addButton(\"Edit Keyframe\");\n clearAnimationButton = addButton(\"Clear Animation\");\n clearShapeButton = addButton(\"Clear Shape\");\n buttonsPanel.setLayout(new FlowLayout());\n\n mainPanel.add(buttonsPanel);\n }",
"public Button(){\n id=1+nbrButton++;\n setBounds(((id-1)*getDimX())/(Data.getNbrLevelAviable()+1),((id-1)*getDimY())/(Data.getNbrLevelAviable()+1),getDimX()/(2*Data.getNbrLevelAviable()),getDimY()/(2*Data.getNbrLevelAviable()));\n setText(id+\"\");\n setFont(Data.getFont());\n addMouseListener(this);\n setVisible(true);\n }",
"public ButtonBar() {\n scrollPane = new JScrollPane();\n scrollPane.setBorder(null);\n scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants\n .HORIZONTAL_SCROLLBAR_NEVER);\n scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants\n .VERTICAL_SCROLLBAR_AS_NEEDED);\n scrollPane.setMinimumSize(new Dimension(0,buttonHeight\n + ((int) PlatformDefaults.getUnitValueX(\"related\").getValue()) * 2));\n \n buttons = Collections.synchronizedMap(new TreeMap<FrameContainer<?>,\n JToggleButton>(new FrameContainerComparator()));\n position = FramemanagerPosition.getPosition(\n IdentityManager.getGlobalConfig().getOption(\"ui\",\n \"framemanagerPosition\"));\n \n if (position.isHorizontal()) {\n buttonPanel = new ButtonPanel(new MigLayout(\"ins rel, fill, flowx\"),\n this);\n } else {\n buttonPanel = new ButtonPanel(new MigLayout(\"ins rel, fill, flowy\"),\n this);\n }\n scrollPane.getViewport().add(buttonPanel);\n }",
"private void createButtonsForPanel(JPanel queueButtonPanel) {\n JButton playbutton = new JButton(\"Play\");\n JButton addsongbutton = new JButton(\"Add song\");\n playButtonActionListener(playbutton);\n addSongButtonActionListener(addsongbutton);\n queueButtonPanel.add(playbutton);\n queueButtonPanel.add(addsongbutton);\n }",
"private void createBeginningButtons() {\n\t createStartButtons(myResources.getString(\"game1\"), 0, 0);\n\t\tcreateStartButtons(myResources.getString(\"game2\"), 0, 1);\n\t\tcreateStartButtons(myResources.getString(\"game3\"), 0, 2);\n\t\tcreateStartButtons(myResources.getString(\"game4\"), 0, 3);\n\t\tcreateStartButtons(myResources.getString(\"game5\"), 0, 4);\n\t\tcreateInstructionButton();\n\t\tcreateStartingLabel();\n\t\tcreateGridSizeButton();\n }",
"private void CreateToolBars(){\n toolBar = new ToolBar();\n btoolBar = new ToolBar();\n login=new Button(\"Login\");\n simulate=new Button(\"Simulate\");\n scoreBoardButton=new Button(\"ScoreBoard\");\n viewBracket= new Button(\"view Bracket\");\n clearButton=new Button(\"Clear\");\n resetButton=new Button(\"Reset\");\n finalizeButton=new Button(\"Finalize\");\n toolBar.getItems().addAll(\n createSpacer(),\n login,\n simulate,\n scoreBoardButton,\n viewBracket,\n createSpacer()\n );\n btoolBar.getItems().addAll(\n createSpacer(),\n clearButton,\n resetButton,\n finalizeButton,\n createSpacer()\n );\n }",
"private JComponent buildButtons() {\n Panel panel = new Panel();\n panel.setLayout(new FlowLayout(FlowLayout.RIGHT));\n JButton button = Buttons.create(\"Create\").onClick((ev) -> {\n try {\n group.setName(name.getText());\n group.clearUsers();\n list.getSelectedValuesList().forEach((item) -> {\n group.addUser(item);\n });\n if (group.getName().isEmpty()) {\n JOptionPane.showMessageDialog(null, \"Name is required\");\n return;\n }\n if (!group.hasUsers()) {\n JOptionPane.showMessageDialog(null, \"Users are required\");\n return;\n }\n if (group.getId() == 0) {\n GroupRepository.get().save(group);\n } else {\n GroupRepository.get().update(group);\n }\n SwingUtilities.getWindowAncestor(this).dispose();\n } catch (RepositoryException ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage());\n }\n });\n button.setIcon(IconFactory.get().create(\"fa:check\"));\n panel.add(button);\n return panel;\n }",
"@Override\n\tprotected void buildButton() {\n\t\t\n\t}",
"public void drawButtons(){\r\n\t\tGuiBooleanButton showDirection = new GuiBooleanButton(1, 10, 20, 150, 20, \"Show Direction\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowdir(), \"showdir\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showdir\").split(\";\"));\r\n\t\tGuiChooseStringButton dirpos = new GuiChooseStringButton(2, width/2+50, 20, 150, 20, \"Dir-Position\", GuiPositions.getPosList(), \"posdir\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosDir()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showFPS= new GuiBooleanButton(3, 10, 45, 150, 20, \"Show FPS\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowfps(), \"showfps\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showfps\").split(\";\"));\r\n\t\tGuiChooseStringButton fpspos = new GuiChooseStringButton(4, width/2+50, 45, 150, 20, \"FPS-Position\", GuiPositions.getPosList(), \"posfps\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosFPS()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showCoor = new GuiBooleanButton(5, 10, 70, 150, 20, \"Show Coor\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowcoor(), \"showcoor\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showcoor\").split(\";\"));\r\n\t\tGuiChooseStringButton coorpos = new GuiChooseStringButton(6, width/2+50, 70, 150, 20, \"Coor-Position\", GuiPositions.getPosList(), \"poscoor\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosCoor()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showworldage = new GuiBooleanButton(7, 10, 95, 150, 20, \"Show WorldAge\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowWorldAge(), \"showworldage\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showworldage\").split(\";\"));\r\n\t\tGuiChooseStringButton worldagepos = new GuiChooseStringButton(8, width/2+50, 95, 150, 20, \"WorldAge-Position\", GuiPositions.getPosList(), \"posworldage\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosWorldAge()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\t\r\n\t\tGuiBooleanButton showFriendly = new GuiBooleanButton(7, 10, 120, 150, 20, \"Mark friendly spawns\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowingFriendlySpawns(), \"showfmobspawn\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showfriendlymobspawn\").split(\";\"));\r\n\t\tGuiBooleanButton showAggressiv = new GuiBooleanButton(7, 10, 145, 150, 20, \"Mark aggressiv spawns\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowingAggressivSpawns(), \"showamobspawn\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showaggressivmobspawn\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton dynamic = new GuiBooleanButton(7, width/2+50, 120, 150, 20, \"dynamic selection\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isDynamic(), \"dynamichsel\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.dynamicselection\").split(\";\"));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tGuiButton back = new GuiButton(9, width/2-100,height-50 , \"back to game\");\r\n\t\t\r\n\t\tbuttonList.add(showworldage);\r\n\t\tbuttonList.add(worldagepos);\r\n\t\tbuttonList.add(dirpos);\r\n\t\tbuttonList.add(fpspos);\r\n\t\tbuttonList.add(coorpos);\r\n\t\tbuttonList.add(showCoor);\r\n\t\tbuttonList.add(showFPS);\r\n\t\tbuttonList.add(showDirection);\r\n\t\t\r\n\t\tbuttonList.add(showFriendly);\r\n\t\tbuttonList.add(showAggressiv);\r\n\t\tbuttonList.add(dynamic);\r\n\t\t\r\n\t\tbuttonList.add(back);\r\n\t}",
"private void createToolButtons(final Map<PaintTool, ToolAction> theMap, \n final List<PaintTool> theTools,\n final JFrame theFrame) {\n \n final ButtonGroup toolBarGroup = new ButtonGroup();\n for (final PaintTool aT : theTools) {\n final JToggleButton button = new JToggleButton(aT.getDescription());\n toolBarGroup.add(button);\n aT.addPropertyChangeListener(this);\n button.setAction(theMap.get(aT));\n myToolBar.add(button);\n myToolBar.addSeparator();\n }\n theFrame.add(myToolBar, BorderLayout.PAGE_END);\n }",
"@NotNull\n TBItemButton addButton() {\n @NotNull TBItemButton butt = new TBItemButton(myItemListener, myStats != null ? myStats.getActionStats(\"simple_button\") : null);\n myItems.addItem(butt);\n return butt;\n }",
"@Override\n protected void createButtonsForButtonBar(final Composite parent) {\n\n GridLayout layout = (GridLayout) parent.getLayout();\n layout.marginHeight = 0;\n }",
"private void makeDayButtons() \n\t{\n\t\t\n\t\tSystem.out.println(monthMaxDays);\n\t\tfor (int i = 1; i <= monthMaxDays; i++) \n\t\t{\n\t\t\t//the first day starts from 1\n\t\t\tfinal int dayNumber = i;\n\t\t\t\n\t\t\t//create new button\n\t\t\tJButton day = new JButton(Integer.toString(dayNumber));\n\t\t\tday.setBackground(Color.WHITE);\n\t\n\t\t\t//attach a listener\n\t\t\tday.addActionListener(new \n\t\t\t\t\tActionListener() \n\t\t\t\t\t{\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//if button is pressed, highlight it \n\t\t\t\t\t\t\tborderSelected(dayNumber -1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//show the event items in the box on the right\n\t\t\t\t\t\t\twriteEvents(dayNumber);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tchangeDateLabel(dayNumber);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//make these buttons available for use\n\t\t\t\t\t\t\tnextDay.setEnabled(true);\n\t\t\t\t\t\t\tprevDay.setEnabled(true);\n\t\t\t\t\t\t\tcreateButton.setEnabled(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\n\t\t\t//add this button to the day button ArrayList\n\t\t\tbuttonArray.add(day);\n\t\t}\n\t}",
"public void addKeys() {\n\t\tbtnDot = new JButton(\".\");\n\t\tbtnDot.setBounds(42, 120, 40, 40);\n\t\tthis.add(btnDot); //Handle case\n\t\t\n\t\tbtn0 = new JButton(\"0\");\n\t\tbtn0.setBounds(81, 120, 40, 40);\n\t\tthis.add(btn0);\n\t\tnumberButtonList = new ArrayList<JButton>(10);\n\t\tnumberButtonList.add(btn0);\n\t\t\n\t\tbtnC = new JButton(\"C\");\n\t\tbtnC.setBounds(120, 120, 40, 40);\n\t\tthis.add(btnC);\n\t\t\n\t\tbtnStar = new JButton(\"*\");\n\t\tbtnStar.setBounds(159, 120, 40, 40);\n\t\tthis.add(btnStar);\n\t\toperationButtonList = new ArrayList<JButton>(10);\n\t\toperationButtonList.add(btnStar);\n\t\t\n\t\tbtnPi = new JButton(\"π\");\n\t\tbtnPi.setBounds(198, 120, 40, 40);\n\t\tthis.add(btnPi);\n\t\t//numberButtonList.add(btnPi); //Special case\n\t\tvalueButtons.add(btnPi);\n\t\t\n\t\tbtnLn = new JButton(\"ln\");\n\t\tbtnLn.setBounds(237, 120, 40, 40);\n\t\tthis.add(btnLn);\n\t\tresultOperations.add(btnLn);\n\t\t\n\t\t//Row 2\n\t\t\n\t\tbtn3 = new JButton(\"3\");\n\t\tbtn3.setBounds(42, 80, 40, 40);\n\t\tthis.add(btn3);\n\t\tnumberButtonList.add(btn3);\n\t\t\n\t\tbtn2 = new JButton(\"2\");\n\t\tbtn2.setBounds(81, 80, 40, 40);\n\t\tthis.add(btn2);\n\t\tnumberButtonList.add(btn2);\n\t\t\n\t\tbtn1 = new JButton(\"1\");\n\t\tbtn1.setBounds(120, 80, 40, 40);\n\t\tthis.add(btn1);\n\t\tnumberButtonList.add(btn1);\n\t\t\n\t\tbtnDivide = new JButton(\"/\");\n\t\tbtnDivide.setBounds(159, 80, 40, 40);\n\t\tthis.add(btnDivide);\n\t\toperationButtonList.add(btnDivide);\n\t\t\n\t\tbtnE = new JButton(\"e\");\n\t\tbtnE.setBounds(198, 80, 40, 40);\n\t\tthis.add(btnE);\n\t\tvalueButtons.add(btnE);\n\t\t//numberButtonList.add(btnE); //Special case\n\t\t\n\t\tbtnTan = new JButton(\"tan\");\n\t\tbtnTan.setBounds(237, 80, 40, 40);\n\t\tthis.add(btnTan);\n\t\tresultOperations.add(btnTan);\n\t\t\n\t\t//Row 3\n\t\t\n\t\tbtn6 = new JButton(\"6\");\n\t\tbtn6.setBounds(42, 40, 40, 40);\n\t\tthis.add(btn6);\n\t\tnumberButtonList.add(btn6);\n\t\t\n\t\tbtn5 = new JButton(\"5\");\n\t\tbtn5.setBounds(81, 40, 40, 40);\n\t\tthis.add(btn5);\n\t\tnumberButtonList.add(btn5);\n\t\t\n\t\tbtn4 = new JButton(\"4\");\n\t\tbtn4.setBounds(120, 40, 40, 40);\n\t\tthis.add(btn4);\n\t\tnumberButtonList.add(btn4);\n\t\t\n\t\tbtnMinus = new JButton(\"-\");\n\t\tbtnMinus.setBounds(159, 40, 40, 40);\n\t\tthis.add(btnMinus);\n\t\toperationButtonList.add(btnMinus);\n\t\t\n\t\tbtnSqRt = new JButton(\"√\");\n\t\tbtnSqRt.setBounds(198, 40, 40, 40);\n\t\tthis.add(btnSqRt);\n\t\tresultOperations.add(btnSqRt);\n\t\t\n\t\tbtnCos = new JButton(\"cos\");\n\t\tbtnCos.setBounds(237, 40, 40, 40);\n\t\tthis.add(btnCos);\n\t\tresultOperations.add(btnCos);\n\t\t\n\t\t//Row 4\n\t\t\n\t\tbtn9 = new JButton(\"9\");\n\t\tbtn9.setBounds(42, 0, 40, 40);\n\t\tthis.add(btn9);\n\t\tnumberButtonList.add(btn9);\n\t\t\n\t\tbtn8 = new JButton(\"8\");\n\t\tbtn8.setBounds(81, 0, 40, 40);\n\t\tthis.add(btn8);\n\t\tnumberButtonList.add(btn8);\n\t\t\n\t\tbtn7 = new JButton(\"7\");\n\t\tbtn7.setBounds(120, 0, 40, 40);\n\t\tthis.add(btn7);\n\t\tnumberButtonList.add(btn7);\n\t\t\n\t\tbtnPlus = new JButton(\"+\");\n\t\tbtnPlus.setBounds(159, 0, 40, 40);\n\t\tthis.add(btnPlus);\n\t\toperationButtonList.add(btnPlus);\n\t\t\n\t\tbtnPower = new JButton(\"^\");\n\t\tbtnPower.setBounds(198, 0, 40, 40);\n\t\tthis.add(btnPower);\n\t\toperationButtonList.add(btnPower);\n\t\t\n\t\tbtnSin = new JButton(\"sin\");\n\t\tbtnSin.setBounds(237, 0, 40, 40);\n\t\tthis.add(btnSin);\n\t\tresultOperations.add(btnSin);\n\t}",
"private void createGenerateButton(final ToolBar bar) {\r\n // image's source:\r\n // http://pixabay.com/de/w%C3%BCrfel-sechs-gesichter-rollen-35637/\r\n createButton(bar, \"images/dice-35637_640.png\", \"Generate\",\r\n new GenerateButtonListener(this));\r\n }",
"private Button createNewArrayButton(BorderPane root) {\n Button newArr = new Button(\"Generate New Array\");\n\n newArr.setOnMouseClicked(event -> {\n ((HBox) root.getTop()).getChildren().get(2).setDisable(false);\n ((HBox) root.getTop()).getChildren().get(3).setDisable(false);\n\n generateRandomHeights();\n root.setBottom(createSortingDisplay());\n });\n\n return newArr;\n }",
"public ZeePanel(Spel spel) {\n this.spel = spel;\n buttons = new JButton[16][16];\n setLayout(new GridLayout(16,16,5,5));\n for (int rij=0;rij<16;rij++)\n {\n for (int kolom=0;kolom<16;kolom++)\n {\n buttons[rij][kolom] = new JButton();\n buttons[rij][kolom].setBackground(Color.CYAN);\n add(buttons[rij][kolom]);\n buttons[rij][kolom].addActionListener(this);\n buttons[rij][kolom].setActionCommand(rij + \",\" + kolom);\n }\n }\n }",
"public void drawButtons() {\n\t\tfill(color(221, 221, 221));\n\t\tfor (int i = 0; i < NUM_BUTTONS; i++) {\n\t\t\trect(BUTTON_LEFT_OFFSET + i * (BUTTON_WIDTH + 12), BUTTON_TOP_OFFSET, BUTTON_WIDTH, BUTTON_HEIGHT);\n\t\t}\n\n\t\t// set text color on the buttons to blue\n\t\tfill(color(0, 0, 255));\n\n\t\ttext(\"Add Cards\", BUTTON_LEFT_OFFSET + 18, BUTTON_TOP_OFFSET + 22);\n\t\ttext(\" Find Set\", BUTTON_LEFT_OFFSET + 18 + BUTTON_WIDTH + 12, BUTTON_TOP_OFFSET + 22);\n\t\ttext(\"New Game\", BUTTON_LEFT_OFFSET + 18 + 2 * (BUTTON_WIDTH + 12), BUTTON_TOP_OFFSET + 22);\n\t\tif (state == State.PAUSED) {\n\t\t\ttext(\"Resume\", BUTTON_LEFT_OFFSET + 45 + 3 * (BUTTON_WIDTH + 12), BUTTON_TOP_OFFSET + 22);\n\t\t} else {\n\t\t\ttext(\"Pause\", BUTTON_LEFT_OFFSET + 54 + 3 * (BUTTON_WIDTH + 12), BUTTON_TOP_OFFSET + 22);\n\t\t}\n\t}",
"public void MakeBar() {\n\t\tBarButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(GetBarChartImage())));\t\n\t\tBarButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Bar chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(BarButton);\t\n\t}",
"private void createButton() throws SlickException {\n int width = 25*getGameContainer().getWidth()/100;\n int height = 10*getGameContainer().getHeight()/100;\n\n Image login = new Image(getReaderXmlFile().read(\"buttonLogin\")).getScaledCopy(width, height);\n Coordinate posLogin = new Coordinate((getGameContainer().getWidth() - login.getWidth())/2,55*getGameContainer().getHeight()/100);\n loginButton = new Button(getGameContainer(), login, posLogin, IDStates.MENU_STATE, this);\n\n Image account = new Image(getReaderXmlFile().read(\"buttonAccount\")).getScaledCopy(width, height);\n Coordinate posAccount = new Coordinate((getGameContainer().getWidth() - account.getWidth())/2,70*getGameContainer().getHeight()/100);\n accountButton = new Button(getGameContainer(), account, posAccount, IDStates.MENU_STATE, this);\n }",
"private void setupButtons() {\n\t\tsetupCreateCourse();\n\t\tsetupRemoveCourse();\n\t\tsetupCreateOffering();\n\t\tsetupRemoveOffering();\n\t\tsetupAddPreReq();\n\t\tsetupRemovePreReq();\n\t\tsetupBack();\n\t}",
"public MenuButtons(String nameOfButton) {\n Text text = new Text(nameOfButton);\n text.setFont(Font.font(null, FontWeight.BOLD, 18));\n text.setFill(Color.WHITESMOKE);\n\n //A rectangle that will be a part of the button\n Rectangle rectangle = new Rectangle(250,30);\n rectangle.setOpacity(0.3);\n rectangle.setFill(Color.BLUE);\n\n setAlignment(Pos.CENTER_LEFT);\n getChildren().addAll(rectangle, text);\n\n setOnMouseEntered(e -> {\n rectangle.setTranslateX(5);\n text.setTranslateX(5);\n rectangle.setFill(Color.DARKBLUE);\n });\n\n setOnMouseExited(e -> {\n rectangle.setTranslateX(0);\n text.setTranslateX(0);\n rectangle.setFill(Color.BLUE);\n });\n\n DropShadow shadowEffect = new DropShadow();\n shadowEffect.setInput(new Glow());\n\n setOnMousePressed(e -> setEffect(shadowEffect));\n setOnMouseReleased(e -> setEffect(null));\n }",
"void createButton(Button main){\n\t\tActions handler = new Actions();\r\n\t\tmain.setOnAction(handler);\r\n\t\tmain.setFont(font);\r\n\t\t//sets button preference dimensions and label \r\n\t\tmain.setPrefWidth(100);\r\n\t\tmain.setPrefHeight(60);\r\n\t\tmain.setText(\"Close\");\r\n\t}",
"private void init_buttons(){\r\n /**\r\n * BOTON NUEVO\r\n */\r\n im_tool1.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonInicio();\r\n botonNuevo();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON EDITAR\r\n */\r\n im_tool2.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonEditar();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON GUARDAR\r\n */\r\n im_tool3.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonGuardar();\r\n }\r\n }\r\n }); \r\n /**\r\n * BOTON ELIMINAR\r\n */\r\n im_tool4.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonEliminar();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON IMPRIMIR\r\n */\r\n im_tool5.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){ \r\n botonImprimir();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON REGRESAR\r\n */\r\n im_tool6.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonInicio();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON POR ASIGNAR\r\n */\r\n im_tool7.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n //\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON NOTAS DE CREDITO\r\n */\r\n im_tool8.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n //\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON DEVOLUCION\r\n */\r\n im_tool9.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n //\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON BUSCAR\r\n */\r\n im_tool12.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n switch (mouseEvent.getClickCount()){\r\n case 1:\r\n botonInicio();\r\n botonBuscar();\r\n break;\r\n case 2:\r\n Datos.setIdButton(2003041);\r\n Gui.getInstance().showBusqueda(\"Busqueda\"); \r\n break;\r\n }\r\n }\r\n });\r\n /**\r\n * SELECCION EN LA TABLA\r\n */\r\n tb_guias.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n if ((tb_guias.getItems() != null) && (!tb_guias.getItems().isEmpty()))\r\n selectedRowGuide();\r\n }\r\n }\r\n }); \r\n /**\r\n * metodo para mostrar buscar el nro de guia\r\n * param: ENTER O TAB\r\n */\r\n tf_nroguia.setOnKeyReleased((KeyEvent ke) -> {\r\n if (ke.getCode().equals(KeyCode.ENTER)){\r\n //Valida que el evento se haya generado en el campo de busqueda\r\n if(((Node)ke.getSource()).getId().equals(\"tf_nroguia\")){\r\n //Solicita los datos y envia la Respuesta a imprimirse en la Pantalla\r\n Datos.setLog_cguias(new log_CGuias()); \r\n boolean boo = Ln.getInstance().check_log_CGuias_rela_caja(tf_nroguia.getText()); \r\n numGuias = 0;\r\n if(boo){\r\n Datos.setRep_log_cguias(Ln.getInstance().find_log_CGuias(tf_nroguia.getText(), \"\", \"ncaja\", Integer.parseInt(rows)));\r\n loadTable(Datos.getRep_log_cguias()); \r\n }\r\n else{\r\n change_im_val(0, im_checkg); \r\n Gui.getInstance().showMessage(\"El Nro. de \" + ScreenName + \" NO existe!\", \"A\");\r\n tf_nroguia.requestFocus();\r\n }\r\n }\r\n }\r\n });\r\n /**\r\n * metodo para mostrar buscar el nro de guia\r\n * param: ENTER O TAB\r\n */\r\n tf_nrorguia.setOnKeyReleased((KeyEvent ke) -> {\r\n if (ke.getCode().equals(KeyCode.ENTER)){\r\n //Valida que el evento se haya generado en el campo de busqueda\r\n if(((Node)ke.getSource()).getId().equals(\"tf_nrorguia\")){\r\n //Solicita los datos y envia la Respuesta a imprimirse en la Pantalla\r\n boolean booa = true; \r\n if(booa){\r\n boolean booc = Ln.getInstance().check_log_CGuias_caja(tf_nrorguia.getText()); \r\n if(booc){\r\n change_im_val(0, im_checkg); \r\n Gui.getInstance().showMessage(\"El Nro. de Guia ya esta relacionado!\", \"A\");\r\n tf_nrorguia.requestFocus();\r\n }\r\n else{\r\n for (int i = 0; i < log_guide_guia.size(); i++) {\r\n if(tf_nrorguia.getText().equals(tb_guias.getItems().get(i).getGuias())){\r\n booa = false;\r\n Gui.getInstance().showMessage(\"El Nro. de Guia ya esta relacionado!\", \"A\");\r\n tf_nrorguia.requestFocus();\r\n break;\r\n }\r\n } \r\n if(booa){\r\n log_Guide_rel_inv guide_carga = new log_Guide_rel_inv();\r\n\r\n List<Fxp_Archguid_gfc> data = \r\n Ln.getList_log_Archguid_gfc(Ln.getInstance().find_Archguid_gfc(tf_nrorguia.getText()));\r\n\r\n if (data.get(0).getStat_guia().equals(\"X\")\r\n || data.get(0).getStat_guia().equals(\"C\")){\r\n guide_carga.setNumorden(String.valueOf((log_guide_guia.size() + 1)));\r\n guide_carga.setGuias(tf_nrorguia.getText());\r\n guide_carga.setNumfact(data.get(0).getNumfact());\r\n guide_carga.setNumclie(data.get(0).getNumclie());\r\n\r\n if (data.get(0).getStat_guia().equals(\"A\")){\r\n if (tipoOperacion == 1)\r\n guide_carga.setStat_guia(null);\r\n else\r\n guide_carga.setStat_guia(data.get(0).getStat_guia());\r\n }\r\n else{\r\n guide_carga.setStat_guia(null);\r\n }\r\n \r\n \r\n log_guide_guia.add(guide_carga);\r\n\r\n loadTableGuide_guias();\r\n change_im_val(200, im_checkg); \r\n\r\n numFactCarga = numFactCarga + data.get(0).getNumfact();\r\n numClieCarga = numClieCarga + data.get(0).getNumclie();\r\n\r\n tf_nrorguia.setText(\"\");\r\n }else{\r\n if (data.get(0).getStat_guia().equals(\"\")){\r\n Gui.getInstance().showMessage(\"El Nro. de Guia NO tiene relación de Guia de Carga!\", \"A\");\r\n }\r\n else{\r\n Gui.getInstance().showMessage(\"El Nro. de Guia ya esta relacionado!\", \"A\");\r\n }\r\n tf_nrorguia.requestFocus();\r\n }\r\n \r\n }\r\n }\r\n }\r\n else{\r\n change_im_val(0, im_checkg); \r\n Gui.getInstance().showMessage(\"El Nro. de Guia NO existe!\", \"A\");\r\n tf_nrorguia.requestFocus();\r\n }\r\n }\r\n }\r\n });\r\n }",
"@Override\n public Button createButton() {\n return new WindowsButton();\n }",
"public HBox hbButtons() {\r\n\r\n HBox hbBottom = new HBox(10); //HBox for buttons at the bottom\r\n\r\n hbBottom.setAlignment(Pos.CENTER); //Set Buttoms to center\r\n hbBottom.setPadding(new Insets(10, 1, 1, 1)); //Padd it\r\n\r\n //SetId\r\n btnConfirm.setId(\"btn\");\r\n btnEdit.setId(\"btn\");\r\n\r\n //Add buttons to the bottom HBox\r\n hbBottom.getChildren().addAll(btnConfirm, btnEdit);\r\n\r\n //Handlers\r\n btnConfirm.setOnAction(new ConfirmHandler()); //Handler for confirm\r\n btnEdit.setOnAction(new EditHandler()); //Handler for edit\r\n\r\n return hbBottom;\r\n\r\n }",
"protected void createSaveButtons() {\n Composite buttonComp = new Composite(shell, SWT.NONE);\n buttonComp.setLayout(new GridLayout(2, true));\n buttonComp.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true,\n false));\n\n int buttonWidth = 80;\n GridData gd = new GridData(SWT.RIGHT, SWT.DEFAULT, true, false);\n gd.widthHint = buttonWidth;\n Button saveBtn = new Button(buttonComp, SWT.PUSH);\n saveBtn.setText(\"Save\");\n saveBtn.setLayoutData(gd);\n saveBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n handleSaveAction();\n }\n });\n\n gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);\n gd.widthHint = buttonWidth;\n Button cancelBtn = new Button(buttonComp, SWT.PUSH);\n cancelBtn.setText(\"Cancel\");\n cancelBtn.setLayoutData(gd);\n cancelBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n setReturnValue(null);\n close();\n }\n });\n }",
"void Comunicasiones() { \t\r\n /* Comunicacion */\r\n Button dComunicacion01 = new Button();\r\n dComunicacion01.setWidth(\"73px\");\r\n dComunicacion01.setHeight(\"47px\");\r\n dComunicacion01.setIcon(ByosImagenes.icon[133]);\r\n dComunicacion01.setStyleName(EstiloCSS + \"BotonComunicacion\");\r\n layout.addComponent(dComunicacion01, \"left: 661px; top: 403px;\"); \r\n\r\n /* Comunicacion */\r\n Button iComunicacion01 = new Button();\r\n iComunicacion01.setWidth(\"73px\");\r\n iComunicacion01.setHeight(\"47px\");\r\n iComunicacion01.setIcon(ByosImagenes.icon[132]);\r\n iComunicacion01.setStyleName(EstiloCSS + \"BotonComunicacion\");\r\n layout.addComponent(iComunicacion01, \"left: 287px; top: 403px;\"); \r\n \r\n }",
"public void generateElevatorButtons() {\n\t\tfor (int i = 1; i <= Settings.NUMBER_OF_FLOORS; i++) {\n\t\t\televatorButtons.put(i, new ElevatorButton(false, i));\n\t\t}\n\t}",
"private void createRedButtons() {\r\n\t\tint y = 40;\r\n\t\tfor (int i = 60; i < 65; i++) {\r\n\t\t\tarray[i] = createRedButton(y);\r\n\t\t\ty += 40;\r\n\t\t}\r\n\t}",
"public interface Buttons {\n\n\t/**\n\t * \n\t * @param btnText - the text that will be shown when looking at the button\n\t * @param tooltip - the text that will be shown when the user is mouseover the\n\t * button\n\t * @return Button - with the text btnText and a tooltip of tooltip, the rest of\n\t * the button is very basic\n\t */\n\tpublic default Button buttons(String btnText, String tooltip) {\n\t\tButton btn = new Button(btnText);\n\t\tTooltip btnTooltip = new Tooltip(tooltip);\n\t\tbtn.setTooltip(btnTooltip);\n\t\tbtn.setMinWidth(MinWidth());\n\t\tbtn.setPrefWidth(50.0);\n\t\tbtn.setMaxWidth(50.0);\n\t\tbtn.setFont(Font.font(\"Verdana\", 20));\n\t\tEventHandler<ActionEvent> buttonHandler = new EventHandler<ActionEvent>() {\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tactionButton(btnText);\n\t\t\t\tevent.consume();\n\t\t\t}\n\n\t\t};\n\t\tbtn.setOnAction(buttonHandler);\n\t\treturn btn;\n\n\t}\n\n\t/**\n\t * all the action that will happen when the button is pressed will be defined\n\t * here\n\t * \n\t * @param text - that is on the button. \n\t */\n\tpublic void actionButton(String text);\n\n\tpublic default double MinWidth() {\n\t\treturn 50.0;\n\t}\n}",
"private void initCommandButtons(char[] levelLetters) {\n\t\tthis.btnTopFirst = (Button) findViewById(R.id.buttonTopFirst);\n\t\tthis.btnTopSecond = (Button) findViewById(R.id.buttonTopSecond);\n\t\tthis.btnTopThird = (Button) findViewById(R.id.buttonTopThird);\n\t\tthis.btnTopFourth = (Button) findViewById(R.id.buttonTopFourth);\n\n\t\tthis.btnBotFirst = (Button) findViewById(R.id.buttonBotFirst);\n\t\tthis.btnBotSecond = (Button) findViewById(R.id.buttonBotSecond);\n\t\tthis.btnBotThird = (Button) findViewById(R.id.buttonBotThird);\n\t\tthis.btnBotFourth = (Button) findViewById(R.id.buttonBotFourth);\n\t\tthis.letterButtons = new Button[] { btnBotFirst, btnBotSecond,\n\t\t\t\tbtnBotThird, btnBotFourth, btnTopFirst, btnTopSecond,\n\t\t\t\tbtnTopThird, btnTopFourth };\n\t\tthis.btnEndWord = (Button) findViewById(R.id.btnEndWord);\n\n\t\t// End word should be disabled by default\n\t\tthis.btnEndWord.setEnabled(false);\n\n\t\t// Populate level letters\n\t\tint index = 0;\n\t\tfor (Button btn : this.letterButtons) {\n\t\t\tbtn.setText(\"\" + levelLetters[index]);\n\t\t\tindex++;\n\t\t}\n\t}",
"private void createOKButtons() {\n okAddButton = addOKButton(\"Add Shape\");\n okRemoveButton = addOKButton(\"Remove Shape\");\n okAddKeyframeButton = addOKButton(\"Add Keyframe\");\n okAddKeyframeTimeButton = addOKButton(\"Add Keyframe Time\");\n okRemoveKeyframeButton = addOKButton(\"Remove Keyframe\");\n okRemoveKeyframeTimeButton = addOKButton(\"Remove Keyframe Time\");\n okEditKeyframeButton = addOKButton(\"Edit Keyframe\");\n okEditKeyframeTimeButton = addOKButton(\"Edit Keyframe Time\");\n okEditKeyframeFinalButton = addOKButton(\"Edit Keyframe Final\");\n okClearShapeButton = addOKButton(\"Clear Shape\");\n }",
"public ButtonHolderActionBarView(SpeelveldController speelveldController)\n throws RemoteException {\n this.speelveldController = speelveldController;\n this.speler = speelveldController.getSpeler();\n this.karakter = this.speler.getKarakter();\n\n container = new StackPane();\n gebruikEigenschap = new Button();\n exitbutton = new Button();\n spelregels = new Button();\n opslaanknop = new Button();\n goudbutton = new Button();\n bouwbutton = new Button();\n eindebeurtbutton = new Button();\n\n this.speler.addObserver(this);\n this.karakter.addObserver(this);\n\n this.buttonGrid.setHgap(10);\n this.buttonGrid.setVgap(10);\n this.buttonGrid.setPadding(new Insets(22.5, 0, 22.5, 0));\n\n initButton(gebruikEigenschap, \"Eigenschap\", \"button-primary\", 1, 1, 160f, 55f);\n initButton(bouwbutton, \"Bouwen\", \"button-primary\", 2, 1, 160f, 55f);\n initButton(goudbutton, \"Bonusgoud\", \"button-primary\", 1, 2, 160f, 55f);\n initButton(eindebeurtbutton, \"Einde beurt\", \"button-danger\", 2, 2, 160f, 55f);\n initButton(opslaanknop, \"Opslaan\", \"button-success\", 1, 3, 160f, 55f);\n initButton(exitbutton, \"Afsluiten\", \"button-danger\", 2, 3, 160f, 55f);\n\n opslaanknop.setOnAction(event1 -> this.speelveldController.cmdOpslaan());\n goudbutton.setOnAction(event -> this.speelveldController.cmdBonusGoud());\n bouwbutton.setOnAction(event -> this.speelveldController.cmdBouwGebouw());\n eindebeurtbutton.setOnAction(event -> this.speelveldController.cmdEindeBeurt());\n gebruikEigenschap.setOnAction(event -> this.speelveldController.cmdGebruikEigenschap());\n exitbutton.setOnAction(event -> System.exit(0));\n\n isKarakterBonusable();\n\n buttonholder = new Rectangle(0, 0, 350, 250);\n buttonholder.setFill(Color.rgb(57, 57, 57));\n this.container.getChildren().addAll(buttonholder, buttonGrid);\n }",
"private void createbuttons(){\n newPatient = (Button) findViewById(R.id.newButton);\n newPatient.setOnClickListener(buttonClick);\n\n registeredPatient = (Button) findViewById(R.id.registeredButton);\n registeredPatient.setOnClickListener(buttonClick);\n\n viewManagement = (Button) findViewById(R.id.viewStaffActivitiesButton);\n viewManagement.setOnClickListener(buttonClick);\n }"
] | [
"0.7709257",
"0.76603633",
"0.7646985",
"0.76434356",
"0.75790167",
"0.7460187",
"0.74566406",
"0.744941",
"0.7400914",
"0.73766637",
"0.73757297",
"0.7358802",
"0.73516864",
"0.7342902",
"0.73278546",
"0.7322858",
"0.7320514",
"0.7296587",
"0.727006",
"0.7266252",
"0.72366625",
"0.7235486",
"0.72310376",
"0.72172076",
"0.7205268",
"0.7205268",
"0.7205268",
"0.7205268",
"0.7200873",
"0.7188528",
"0.71623194",
"0.71602505",
"0.71590984",
"0.71552986",
"0.7153523",
"0.7153523",
"0.7144404",
"0.71167135",
"0.71079326",
"0.71067035",
"0.7076239",
"0.7058749",
"0.7032494",
"0.7023601",
"0.7015213",
"0.7009371",
"0.70069695",
"0.6997724",
"0.69888365",
"0.6980015",
"0.6964217",
"0.69459707",
"0.6937653",
"0.6931558",
"0.6918063",
"0.6906989",
"0.6889144",
"0.68675786",
"0.6866111",
"0.6841803",
"0.68364954",
"0.68341964",
"0.68283105",
"0.6823835",
"0.6806142",
"0.67969745",
"0.67370486",
"0.6730734",
"0.67291504",
"0.6727251",
"0.6725623",
"0.67253286",
"0.6719125",
"0.6698143",
"0.66951734",
"0.66828614",
"0.6682788",
"0.666822",
"0.6668218",
"0.66601694",
"0.66581",
"0.665434",
"0.66525364",
"0.6648544",
"0.6647572",
"0.66421926",
"0.66352683",
"0.66301405",
"0.6621912",
"0.66148645",
"0.6614071",
"0.6613936",
"0.66068655",
"0.6605806",
"0.6602052",
"0.65941244",
"0.6593966",
"0.6582203",
"0.6578245",
"0.65600073"
] | 0.7462435 | 5 |
When press button,call it | protected void buttonPressed(int buttonId) {
if (buttonId == BUTTON_ADD_ID) {
Map<String, String> model = new HashMap<String, String>();
try {
AddFuncParamsDialog addDlg = new AddFuncParamsDialog(
getShell(), model, sqlTypeMap, javaTypeMap, true, procParamsListData,
database);
if (addDlg.open() == IDialogConstants.OK_ID) { // add
procParamsListData.add(model);
procParamsTableViewer.refresh();
for (int i = 0; i < procParamsTableViewer.getTable().getColumnCount(); i++) {
procParamsTableViewer.getTable().getColumn(i).pack();
}
}
} catch (Exception e) {
LOGGER.error("", e);
}
} else if (buttonId == BUTTON_EDIT_ID) { // edit
int index = procParamsTable.getSelectionIndex();
if (index < 0) {
return;
}
Map<String, String> map = procParamsListData.get(index);
AddFuncParamsDialog editDlg = new AddFuncParamsDialog(getShell(),
map, sqlTypeMap, javaTypeMap, false, procParamsListData,
database);
if (editDlg.open() == IDialogConstants.OK_ID) {
procParamsTableViewer.refresh();
for (int i = 0; i < procParamsTableViewer.getTable().getColumnCount(); i++) {
procParamsTableViewer.getTable().getColumn(i).pack();
}
}
} else if (buttonId == BUTTON_UP_ID) { // up
int index = procParamsTable.getSelectionIndex();
if (index <= 0) {
return;
}
Map<String, String> map = procParamsListData.get(index);
Map<String, String> preMap = procParamsListData.get(index - 1);
procParamsListData.set(index - 1, map);
procParamsListData.set(index, preMap);
procParamsTableViewer.refresh();
} else if (buttonId == BUTTON_DOWN_ID) { // down
int index = procParamsTable.getSelectionIndex();
if (index < 0 || index >= procParamsListData.size() - 1) {
return;
}
Map<String, String> map = procParamsListData.get(index);
Map<String, String> nextMap = procParamsListData.get(index + 1);
procParamsListData.set(index + 1, map);
procParamsListData.set(index, nextMap);
procParamsTableViewer.refresh();
} else if (buttonId == BUTTON_DROP_ID) { // drop
int index = procParamsTable.getSelectionIndex();
if (index < 0) {
return;
}
procParamsListData.remove(index);
procParamsTableViewer.refresh();
getButton(BUTTON_EDIT_ID).setEnabled(false);
getButton(BUTTON_UP_ID).setEnabled(false);
getButton(BUTTON_DOWN_ID).setEnabled(false);
getButton(BUTTON_DROP_ID).setEnabled(false);
} else if (buttonId == IDialogConstants.OK_ID) {
if (valid()) {
procedureName = procNameText.getText();
CommonSQLExcuterTask task = new CommonSQLExcuterTask(database.getDatabaseInfo());
if (!newFlag) {
String dropSql = "DROP PROCEDURE " + QuerySyntax.escapeKeyword(procNameText.getText());
task.addSqls(dropSql);
}
task.addSqls(getSQLScript());
execute(IDialogConstants.OK_ID, new ITask[]{task });
}
return;
}
super.buttonPressed(buttonId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void buttonClicked();",
"public void buttonClicked() {\n mSanitizorGame.buttonClicked();\n }",
"@Override\n\tprotected void on_button_pressed(String button_name) {\n\n\t}",
"public void sButton() {\n\n\n\n }",
"String handleButtonPress(Button button);",
"public void onButtonAPressed();",
"public void ipcallButtonPressed() {\n\t\tdialButtonPressed(true) ;\n\t}",
"void mainButtonPressed();",
"@Override\n\tpublic void callButton(TrafficSignal TS) {\n\t\t\n\t}",
"void onClick();",
"public void settingBtnClick() {\n\t}",
"public void submit_intsatpos(View button) {\n }",
"public abstract void buttonPressed();",
"public void clickButton()\n {\n fieldChangeNotify( 0 );\n }",
"public void actionButton(String text);",
"void buttonGo_actionPerformed(ActionEvent e) {\n\n\n }",
"void onAddParameterButtonClick();",
"public void onClicked();",
"void userPressConnectButton();",
"public abstract void executeRunButton();",
"public void testing() {\n System.out.println(\"button pressed!\");\n }",
"protected void execute() { \t\n// \tboolean toggle=true;\n// \tboolean grab = false;\n// \tif(toggle&&button.get()) {//execute once per button push\n// \t\ttoggle=false;//prevents code from being called again until button is released and pressed again\n// \t\tif(grab){\n// \t\t\tgrab=false;\n// \t\t\tclaw.open();\n// \t\t}else {\n// \t\t\tgrab=true;\n// \t\t\tclaw.close();\n// \t\t}\n// \t}else if(!button.get()) {\n// \t\ttoggle=true;//button has been released\n// \t}\n \tclaw.open();\n }",
"void buttonPressed(ButtonType type);",
"public void onButtonBPressed();",
"void viewButton_actionPerformed(ActionEvent e) {\n doView();\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tButtonPress();\n\t}",
"protected abstract void pressedOKButton( );",
"public void clickYes ();",
"@Override\n\tprotected void OnClick() {\n\t\t\n\t}",
"private void btn_limpiarActionPerformed(java.awt.event.ActionEvent evt) {\n limpiar();\n\n }",
"public void actionPerformed(ActionEvent e) {\n \n // YOUR CODE HERE\n\n }",
"void okButtonClicked();",
"public void act() \n {\n checkClicked();\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tgeti();\n\t\t\t}",
"void enablButtonListener();",
"@Override\n public void onClick(View view) {\n if(buttonHandler != null)\n {\n //we send out to our button handler\n buttonHandler.handleEvolve(wid);\n }\n Toast.makeText(getContext(), \"Evolve please!\", Toast.LENGTH_SHORT).show();\n\n }",
"@Override\n public void run() {\n nextButtonAction(); // invoking next button //\n }",
"private void designBtnActionPerformed(ActionEvent evt) {\n }",
"private void devBtnActionPerformed(ActionEvent evt) {\n }",
"private void ViewActionPerformed(ActionEvent e) {\n\t}",
"@Override\n\t\tpublic void onClick(Widget sender) {\n\t\t\t\n\t\t}",
"@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.btn_scan:\n btnSignalScan();\n break;\n default:\n break;\n }\n }",
"@Override\n\tpublic void onClick() {\n\t\t\n\t}",
"@Override\n public void onClick() {\n System.out.println(\"Button has been JUST clicked\");\n }",
"@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\treceive();\r\n\t\t\t}",
"@Override\n public void onClick(View theView) {\n setUp();\n\n\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t}",
"public void getPress(View view){\n\n Toast.makeText(this, \"Button press! I'm connected? \" + GAC.isConnected(), Toast.LENGTH_SHORT).show();\n EditText et = (EditText) findViewById(R.id.etxtFilename);\n //loadFile(et.getText().toString());\n findFile(et.getText().toString());\n }",
"@Override\n\tpublic void onClick(View p1)\n\t{\n\t\tswitch(p1.getId()){\n\t\t\tcase R.id.btn_look:\n\t\t\t\tlook();\n\t\t\t\tbreak;\n\t\t\tcase R.id.btn_save:\n\t\t\t\tsave();\n\t\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource().equals(ClientWindow.retButtons()[0])){\n\t\t\tperformButton(0);\n\t\t}\n\t\tif(e.getSource().equals(ClientWindow.retButtons()[1])){\n\t\t\tperformButton(1);\n\t\t}\n\t\tif(e.getSource().equals(ClientWindow.retButtons()[2])){\n\t\t\tperformButton(2);\n\t\t}\n\t\tif(e.getSource().equals(ClientWindow.retButtons()[3])){\n\t\t\tperformButton(3);\n\t\t}\n\t\tif(e.getSource().equals(ClientWindow.retButtons()[4])){\n\t\t\tperformButton(4);\n\t\t}\n\t\tif(e.getSource().equals(ClientWindow.retButtons()[5])){\n\t\t\tperformButton(5);\n\t\t}\n\t\tif(e.getSource().equals(ClientWindow.retButtons()[6])){\n\t\t\tperformButton(6);\n\t\t}\n\t\tif(e.getSource().equals(ClientWindow.retButtons()[7])){\n\t\t\tperformButton(7);\n\t\t}\n\t\tif(e.getSource().equals(ClientWindow.retButtons()[8])){\n\t\t\tperformButton(8);\n\t\t}\n\t}",
"private void button1MouseClicked(MouseEvent e) {\n\t}",
"abstract void botonAyuda_actionPerformed(ActionEvent e);",
"public abstract void executeActionButton();",
"@Override\n public void onBoomButtonClick(int index) {\n }",
"@Override\n public void onClick(View v) {\n set();\n }",
"@Override\r\n\t\t\t\tpublic void onClick() {\n\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void onClick() {\n\r\n\t\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tToast.makeText(getApplicationContext(), \"Button 1\", Toast.LENGTH_SHORT).show();\n\t\t\t}",
"public void click() {\n\t\tSystem.out.println(\"LinuxButton Click\");\r\n\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}",
"@Override\n public void onClick(View view) {\n Button trykket = null;\n for (int i = 0; i < 30 ; i++) {\n if (view==buttons.get(i)){\n trykket=buttons.get(i);\n }\n }\n assert trykket != null;\n gæt(trykket);\n\n //vi afslutter spiller hvis det er slut eller vundet.\n if(logik.erSpilletSlut()){\n if(logik.erSpilletTabt()){\n // die.start();\n slutspilllet(false);\n }\n if(logik.erSpilletVundet()) slutspilllet(true);\n }\n\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t}",
"private void mymethods() {\n\t\tNew.addActionListener(new ActionListener()\r\n\t\t{\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tta1.setText(\" \");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t}",
"public void buttonOnClick(View v) {\n\n }",
"public void buttonClick() {\n if (soundToggle == true) {\n buttonClick.start();\n } // if\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == button1) {\n\t\t prefDisplay();\n\t\t }\n\t}",
"@Override\n public void onClick(View v) {\n buttonPressed = 0;\n switch (v.getId()) {\n case R.id.button01:\n buttonPressed = 1;\n break;\n\n case R.id.button02:\n buttonPressed = 2;\n break;\n }\n launchTask();\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\n public void onClick(View view) {\n kurangIsi();\n }",
"@Override\r\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\treceive();\r\n\t\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\tmCurriculumVitaeInterface.onComputer();\n\t\t\t\t\t\t}",
"public abstract void executeFightButton();",
"@Override\n public void onClick(View view)\n {\n switch(view.getId())\n {\n case R.id.button_synth_scale:\n Scale();\n break;\n case R.id.button_synth_song:\n loveYourz();\n break;\n }\n }",
"public void clickedButton(View view) {\n\n switch (view.getId()) {\n case R.id.contactBook:\n intent = new Intent(this, ContactBookActivity.class);\n startActivity(intent);\n break;\n case R.id.message:\n intent = new Intent(this, SMS_Activity.class);\n startActivity(intent);\n break;\n case R.id.fav_contacts:\n intent = new Intent(this, ContactGridActivity.class);\n startActivity(intent);\n break;\n case R.id.lastCall:\n intent = new Intent(this, LatestCallsActivity.class);\n startActivity(intent);\n break;\n case R.id.microphone:\n SpeechRecognitionHelper.run(this);\n break;\n }\n }",
"private void button1MouseClicked(MouseEvent e) {\n }",
"@Override\r\n public void onClick(View v) {\n switch (v.getId()) {\r\n case R.id.btn_u_one:\r\n startTest(ONE);\r\n break;\r\n case R.id.btn_u_two:\r\n startTest(TWO);\r\n break;\r\n }\r\n }",
"void clickSomewhereElse();",
"@Override\n\tpublic void onClick() {\n\t\tSystem.out.println(\"전화를 겁니다\");\n\t}",
"abstract void botonDemo_actionPerformed(ActionEvent e);",
"@Override \n public void onClick(View v) {\n simpandata();\n }",
"private void btnThongtinActionPerformed(java.awt.event.ActionEvent evt) {\n\n fillThongtin();\n }",
"public abstract void executeBagButton();",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}",
"void btnGenReport_actionPerformed(ActionEvent e) {\n JButtonQueryButtonAction(e);\r\n }",
"@Override\n public void onClick() {\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n if(e.getSource().equals(btnQuayLai)){\n btnquaylaiclick();}\n }",
"@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\n public void actionPerformed(ActionEvent e) {\n Main.switchViews();\n }",
"@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int button) {\n\t\t\t\t}",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int button) {\n\t\t\t}",
"@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}",
"public void actionPerformed(ActionEvent e) {\n\t\t\tnew RelatorioFuncView().iniciaGui2();\t\n\t\t\t}",
"protected void actionPerformed(GuiButton par1GuiButton)\n {\n if (par1GuiButton.id == 0)\n {\n this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));\n }\n\n if (par1GuiButton.id == 5)\n {\n this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings));\n }\n\n if (par1GuiButton.id == 1)\n {\n this.mc.displayGuiScreen(new GuiSelectWorld(this));\n }\n\n if (par1GuiButton.id == 2)\n {\n this.mc.displayGuiScreen(new GuiMultiplayer(this));\n }\n\n if (par1GuiButton.id == 3)\n {\n this.mc.displayGuiScreen(new GuiTexturePacks(this));\n }\n\n if (par1GuiButton.id == 4)\n {\n this.mc.shutdown();\n }\n }"
] | [
"0.7932945",
"0.745327",
"0.7400083",
"0.73527503",
"0.73494935",
"0.7335038",
"0.7311492",
"0.7291526",
"0.7170221",
"0.71488017",
"0.71322185",
"0.710136",
"0.7049706",
"0.7033277",
"0.6979696",
"0.6972234",
"0.69514316",
"0.6921342",
"0.6914037",
"0.690808",
"0.6907661",
"0.6895659",
"0.6894309",
"0.6892013",
"0.6873666",
"0.68647504",
"0.6864746",
"0.6862654",
"0.6846651",
"0.6836348",
"0.6829908",
"0.6808756",
"0.676877",
"0.6763301",
"0.6761877",
"0.6713395",
"0.6700305",
"0.66876274",
"0.666505",
"0.6661682",
"0.6651379",
"0.6650942",
"0.6635203",
"0.6622139",
"0.6621345",
"0.6618028",
"0.66129327",
"0.6603156",
"0.66007936",
"0.6598348",
"0.65982485",
"0.65912026",
"0.6584558",
"0.6578215",
"0.65762645",
"0.65758836",
"0.65758836",
"0.6571715",
"0.6570636",
"0.6565918",
"0.6561957",
"0.65572745",
"0.6554303",
"0.6553911",
"0.65530217",
"0.6551004",
"0.6550424",
"0.6547261",
"0.6547261",
"0.6546037",
"0.6543232",
"0.6541856",
"0.6535829",
"0.65332186",
"0.6528277",
"0.6522699",
"0.65189373",
"0.6518481",
"0.6517504",
"0.6511218",
"0.6508008",
"0.6502125",
"0.6500713",
"0.6499787",
"0.6497408",
"0.6497408",
"0.6497408",
"0.6496809",
"0.6496013",
"0.64931816",
"0.64841676",
"0.64841676",
"0.64841676",
"0.64841676",
"0.64765257",
"0.64759016",
"0.6475056",
"0.64713484",
"0.64713484",
"0.64696264",
"0.64680105"
] | 0.0 | -1 |
Check the data validation | public boolean valid() {
if (newFlag) {
if (procNameText.getText() == null || StringUtil.isEmpty(procNameText.getText())) {
CommonUITool.openErrorBox(getShell(), Messages.errInputProcedureName);
return false;
}
if (!ValidateUtil.isValidIdentifier(procNameText.getText())) {
CommonUITool.openErrorBox(getShell(),
Messages.bind(Messages.errInputParameterNameValid, procNameText.getText()));
return false;
}
if (procNameText.getText().length() > ValidateUtil.MAX_SCHEMA_NAME_LENGTH) {
CommonUITool.openErrorBox(Messages.bind(Messages.errInputFunctionNameLength, "procedure",
ValidateUtil.MAX_SCHEMA_NAME_LENGTH));
return false;
}
}
String javaName = javaNameText.getText();
if (javaName == null || "".equals(javaName)) {
CommonUITool.openErrorBox(getShell(), Messages.errInputJavaProcedureName);
return false;
}
String[] javaNames = javaName.split("\\.");
boolean isValidJavaName = true;
if (javaNames == null || javaNames.length != 2) {
isValidJavaName = false;
}
for (int i = 0; isValidJavaName && i < javaNames.length; i++) {
if (!javaNames[i].matches("^[a-zA-Z_\\$].*")) {
isValidJavaName = false;
break;
}
for (int j = 0; isValidJavaName && j < javaNames[i].length(); j++) {
if (!Character.isJavaIdentifierPart(javaNames[i].charAt(j))) {
isValidJavaName = false;
break;
}
}
}
if (!isValidJavaName) {
CommonUITool.openErrorBox(getShell(), Messages.errValidJavaFunctionName);
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void validateData() {\n }",
"protected boolean isValidData() {\n return true;\n }",
"private boolean validateData() {\n if (!mCommon.validateData()) return false;\n\n Core core = new Core(this);\n\n // Due Date is required\n if (TextUtils.isEmpty(getRecurringTransaction().getDueDateString())) {\n core.alert(R.string.due_date_required);\n return false;\n }\n\n if (TextUtils.isEmpty(mCommon.viewHolder.dateTextView.getText().toString())) {\n core.alert(R.string.error_next_occurrence_not_populate);\n\n return false;\n }\n\n // Payments Left must have a value\n if (getRecurringTransaction().getPaymentsLeft() == null) {\n core.alert(R.string.payments_left_required);\n return false;\n }\n return true;\n }",
"public String validate(Data[] data);",
"protected boolean validateData(String [] data) {\n return true;\n }",
"public void checkData(){\n if (isEmpty(etEmailLogin)){\n etEmailLogin.setError(\"Enter Email\");\n }\n\n //to check if the email is valid\n else if (!isEmail(etEmailLogin)){\n Toast.makeText(this, \"Please Enter Email Address\", Toast.LENGTH_SHORT).show();\n }\n\n //to check if the password is entered\n else if (isEmpty(etPasswordLogin)){\n etPasswordLogin.setError(\"Enter Password\");\n }\n }",
"private boolean tableDataValid()\r\n {\r\n // if there are any form level validations that should go there\r\n int rowTotal = tblProtoCorresp.getRowCount();\r\n int colTotal = tblProtoCorresp.getColumnCount();\r\n for (int rowIndex = 0; rowIndex < rowTotal ; rowIndex++)\r\n {\r\n for (int colIndex = 0; colIndex < colTotal; colIndex++)\r\n {\r\n TableColumn column = codeTableColumnModel.getColumn(colIndex) ;\r\n\r\n ColumnBean columnBean = (ColumnBean)column.getIdentifier() ;\r\n\r\n if (columnBean.getColumnEditable()\r\n && !columnBean.getColumnCanBeNull())\r\n {\r\n if ( tblProtoCorresp.getValueAt(rowIndex,colIndex) != null)\r\n {\r\n if (tblProtoCorresp.getValueAt(rowIndex,colIndex).equals(\"\")\r\n || tblProtoCorresp.getValueAt(rowIndex,colIndex).toString().trim().equals(\"\") )\r\n {\r\n String msg = coeusMessageResources.parseMessageKey(\r\n \"checkInputValue_exceptionCode.2402\");\r\n String msgColName = \" \" + columnBean.getDisplayName() + \". \";\r\n CoeusOptionPane.showInfoDialog(msg + msgColName);\r\n tblProtoCorresp.changeSelection(rowIndex, colIndex, false, false) ;\r\n return false;\r\n }\r\n }\r\n else\r\n {\r\n String msg = coeusMessageResources.parseMessageKey(\r\n \"checkInputValue_exceptionCode.2402\");\r\n\r\n String msgColName = \" \" + columnBean.getDisplayName() + \". \";\r\n CoeusOptionPane.showInfoDialog(msg + msgColName);\r\n tblProtoCorresp.changeSelection(rowIndex, colIndex, false, false) ;\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n }\r\n return true ;\r\n }",
"void checkValid();",
"@Override\n\tpublic boolean checkData() {\n\t\treturn false;\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 }",
"public void validation() {\n ValidationData();\n if (Validation == null) {\n Toast.makeText(this, \"No Data Found\", Toast.LENGTH_SHORT).show();\n } else {\n getHistory();\n }\n }",
"public boolean verifyData()\n {\n if(jTextFieldName.getText().equals(\"\") && jTextFieldNumber.getText().equals(\"\") \n || jTextFieldSupplier.getText().equals(\"\") || jTextArea1.getText().equals(\"\") || jTextFieldModel.getText().equals(\"\"))\n {\n JOptionPane.showMessageDialog(null, \"One or More Fields Are Empty\");\n return false;\n }\n \n else\n {\n return true;\n }\n \n }",
"private void validation() {\n Pattern pattern = validationfilterStringData();\n if (pattern.matcher(txtDrug.getText().trim()).matches() && pattern.matcher(txtGenericName.getText().trim()).matches()) {\n try {\n TblTreatmentadvise treatmentadvise = new TblTreatmentadvise();\n treatmentadvise.setDrugname(txtDrug.getText());\n treatmentadvise.setGenericname(txtGenericName.getText());\n treatmentadvise.setTiming(cmbDosestiming.getSelectedItem().toString());\n cmbtiming.setSelectedItem(cmbDosestiming);\n treatmentadvise.setDoses(loadcomboDoses());\n treatmentadvise.setDuration(loadcomboDuration());\n PatientService.saveEntity(treatmentadvise);\n JOptionPane.showMessageDialog(this, \"SAVE SUCCESSFULLY\");\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(this, \"STARTUP THE DATABASE CONNECTION\");\n }\n } else {\n JOptionPane.showMessageDialog(this, \"WRONG DATA ENTERED.\");\n }\n }",
"public boolean validateData(){\n boolean dataOk=true;\n if (etName.getText().toString().equals(\"\")){\n Log.i(\"ProfileEditActivity\",\"Name field is void.\");\n dataOk=false;\n }\n if (etSurname.getText().toString().equals(\"\")){\n Log.i(\"ProfileEditActivity\",\"Surname field is void.\");\n dataOk=false;\n }\n if (etDescription.getText().toString().equals(\"\")){\n Log.i(\"ProfileEditActivity\",\"Description field is void.\");\n dataOk=false;\n }\n return dataOk;\n }",
"public void validate() {}",
"private void validate() {\n\n etCardNumber.validate();\n\n etCardExpiryDate.validate();\n\n etCardCvv.validate();\n\n etCardHolderName.validate();\n\n etPhoneNumber.validate();\n\n etCustomerName.validate();\n }",
"public boolean isDataValid() {\r\n return validData;\r\n }",
"public boolean validate() {\n\t\tfor(int i=0; i<sensorData.size(); i++) {\n\t\t\tif(!sensorData.get(i).isValid()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public Boolean validEntries() {\n String orderNumber = orderNo.getText();\n String planTime = plannedTime.getText();\n String realTime = actualTime.getText();\n String worker = workerSelected();\n String productType = productTypeSelected();\n Boolean validData = false;\n if (orderNumber.equals(\"\")) {\n warning.setText(emptyOrderNum);\n } else if (!Validation.isValidOrderNumber(orderNumber)) {\n warning.setText(invalidOrderNum);\n } else if (worker.equals(\"\")) {\n warning.setText(workerNotSelected);\n } else if (productType.equals(\"\")) {\n warning.setText(productTypeNotSelected);\n } else if (planTime.equals(\"\")) {\n warning.setText(emptyPlannedTime);\n } else if (!Validation.isValidPlannedTime(planTime)) {\n warning.setText(invalidPlannedTime);\n } else if (!actualTime.getText().isEmpty() && !Validation.isValidActualTime(realTime)) {\n warning.setText(invalidActualTime);\n } else if (comboStatus.getSelectionModel().isEmpty()) {\n warning.setText(emptyStatus);\n } else validData = true;\n return validData;\n }",
"private void checkValid() {\n getSimType();\n getInitialConfig();\n getIsOutlined();\n getEdgePolicy();\n getNeighborPolicy();\n getCellShape();\n }",
"private boolean validateData() {\n boolean validData = true;\n\n String email = mUserEmail.getText().toString().trim();\n String name = mUserName.getText().toString().trim();\n String password = mUserPassword.getText().toString();\n\n // If the Name text field is empty or Name is less then 3 characters,\n // give user a error message\n if (TextUtils.isEmpty(name) || name.length() < 3) {\n mUserNameWrapper.setError(getString(R.string.text_layout_invalid_name));\n validData = false;\n } else {\n mUserNameWrapper.setErrorEnabled(false);\n }\n\n // If the email text field is empty or email address is not per EMAIL_ADDRESS pattern,\n // give user a error message\n if (TextUtils.isEmpty(email) || !android.util.Patterns.EMAIL_ADDRESS.matcher(email).matches()) {\n mUserEmailWrapper.setError(getString(R.string.text_layout_invalid_email));\n validData = false;\n } else {\n mUserEmailWrapper.setErrorEnabled(false);\n }\n\n // If the password text field is emory or password is not between 5 and 8 digits,\n // give user a error message\n if (TextUtils.isEmpty(password) || password.length() < 5 || password.length() > 8) {\n mUserPasswordWrapper.setError(getString(R.string.text_layout_invalid_password));\n validData = false;\n } else {\n mUserEmailWrapper.setErrorEnabled(false);\n }\n return validData;\n }",
"private void validate() {\n\t\t// just in case;\n\t\tfor (int i=0;i<NR_OF_FIELDS; i++) {\n\t\t\tvalid[i] = \"0\";\n\t\t}\n\t\t//\n\t\t// Validate name and surname:\n\t\t//\n\t\tif ( ! this.isUpperAlpha(nume)) {\n\t\t\tfields[0] = \"1\";\n\t\t}\n\t\t\n\t\tif ( ! this.isUpperAlphaWithSpace(nume)) {\n\t\t\tfields[1] = \"1\";\n\t\t}\n\t\t//\n\t\t// validate seria\n\t\t//\n\t\tvalid[2] = \"1\";\t\t\t\t\t\t\t// presupun ca seria este invalida, si incerc sa o validez\n\t\tfor (int i=0; i<seriiBuletin.length; i++) {\n\t\t\tif (seriiBuletin[i].equals(seria)) {\n\t\t\t\tvalid[2] = \"0\";\n\t\t\t}\n\t\t}\n\t\t//\n\t\t// validate numarul\n\t\t//\n\t\ttry {\n\t\t\tvalid[3] = \"1\";\n\t\t\tint nr = Integer.valueOf(numarul);\n\t\t\tif ( nr >= 100000 && nr <= 999999 ) {\n\t\t\t\tvalid[3] = \"0\";\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLog.d(TAG, \"Error validating seria.\");\n\t\t}\n\n\t\t//\n\t\t// validate sex\n\t\t//\n\t\tif ( ! (sex == 'M' || sex == 'F')) {\n\t\t\tvalid[6] = \"1\";\n\t\t}\n\t\t//\n\t\t// Validate valabilitate\n\t\t//\n\t\tif ( ! isNumber(this.valabilitate)) {\n\t\t\tvalid[7] = \"1\";\n\t\t}\n\t\t//\n\t\t// validate CNP\n\t\t//\n\t\tif ( ! (isNumber(CNP) && isValidCNP(CNP))) {\n\t\t\tvalid[8] = \"1\";\n\t\t}\n\t\t\n\t}",
"protected void validate() {\n // no op\n }",
"@Override\n\tprotected boolean checkDataStructure(Data data) throws ImportitException {\n\t\tdata.setDatabase(39);\n\t\tdata.setGroup(3);\n\t\tboolean validDb = checkDatabaseName(data);\n\t\tboolean validHead = false;\n\t\tboolean validTable = false;\n\t\tboolean existImportantFields = false;\n\t\tif (validDb) {\n\t\t\tList<Field> headerFields = data.getHeaderFields();\n\t\t\tList<Field> tableFields = data.getTableFields();\n\t\t\tvalidHead = false;\n\t\t\tvalidTable = false;\n\t\t\ttry {\n\n\t\t\t\tvalidHead = checkWarehouseGroupProperties(headerFields, data.getOptionCode().useEnglishVariables());\n\t\t\t\tvalidTable = checkFieldList(tableFields, 39, 3, false, data.getOptionCode().useEnglishVariables());\n\t\t\t\tString[] checkDataCustomerPartProperties = checkDataWarehouseGroupProperties(data);\n\t\t\t\texistImportantFields = checkDataCustomerPartProperties.length == 2;\n\n\t\t\t} catch (ImportitException e) {\n\t\t\t\tlogger.error(e);\n\t\t\t\tdata.appendError(Util.getMessage(\"err.structure.check\", e.getMessage()));\n\t\t\t}\n\t\t}\n\t\tif (validTable && validHead && validDb & existImportantFields) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public void validate(DataRecord value) {\n\r\n\t}",
"public boolean checkData()\n {\n boolean ok = true;\n int l = -1;\n for(Enumeration<Vector<Double>> iter = data.elements(); iter.hasMoreElements() && ok ;)\n {\n Vector<Double> v = iter.nextElement();\n if(l == -1)\n l = v.size();\n else\n ok = (l == v.size()); \n }\n return ok; \n }",
"public boolean isDataValid() {\r\n boolean dataValid = true;\r\n\r\n if (this.needDefaultValue) {\r\n try {\r\n this.getDefaultValue();\r\n } catch (Exception e) {\r\n dataValid = false;\r\n }\r\n }\r\n\r\n if (this.nameTextField.getText() == null || this.nameTextField.getText().length() == 0) {\r\n dataValid = false;\r\n }\r\n\r\n return dataValid;\r\n\r\n }",
"private void validate() {\n for (DBRow row : rows) {\n for (DBColumn column : columns) {\n Cell cell = Cell.at(row, column);\n DBValue value = values.get(cell);\n notNull(value,\"Cell \" + cell);\n }\n }\n }",
"private boolean checkInfo()\n {\n boolean flag = true;\n if(gName.isEmpty())\n {\n groupName.setError(\"Invalid name\");\n flag = false;\n }\n if(gId.isEmpty())\n {\n groupId.setError(\"Invalid id\");\n flag = false;\n }\n if(gAddress.isEmpty())\n {\n groupAddress.setError(\"Invalid address\");\n flag = false;\n }\n\n for(char c : gName.toCharArray()){\n if(Character.isDigit(c)){\n groupName.setError(\"Invalid Name\");\n flag = false;\n groupName.requestFocus();\n }\n }\n\n if(groupType.isEmpty())\n {\n flag = false;\n rPublic.setError(\"Choose one option\");\n }\n\n if(time.isEmpty())\n time = \"not set\";\n\n if(groupDescription.getText().toString().length()<20||groupDescription.getText().toString().length()>200)\n groupDescription.setError(\"Invalid description\");\n\n return flag;\n }",
"void validate();",
"void validate();",
"boolean checkValidity();",
"public boolean validation(){\n String Venuename= venuename.getText().toString();\n String Address= address.getText().toString();\n String Details= details.getText().toString();\n String Venueimage= venueimage.getText().toString();\n if(Venuename.isEmpty()){\n venuename.setError(\"Please enter the item name\");\n venuename.requestFocus();\n return false;\n }\n if(Address.isEmpty()){\n address.setError(\"Please enter the item name\");\n address.requestFocus();\n return false;\n }\n if(Details.isEmpty()){\n details.setError(\"Please enter the item name\");\n details.requestFocus();\n return false;\n }\n if(Venueimage.isEmpty()){\n venueimage.setError(\"Please Select the image first\");\n return false;\n }\n\n\n return true;\n }",
"@Override\n\t@FXML\n\tpublic boolean validate() {\n\t\t\n\t\tboolean isDataEntered = true;\n\t\tLocalDate startDate = Database.getInstance().getStartingDate();\n\t\tSystem.out.println();\n\t\tif(amountField.getText() == null || amountField.getText().trim().isEmpty())\n\t\t\tisDataEntered = setErrorTxt(\"You left the amount field empty.\");\n\t\telse if(!(Validation.validateAmount(amountField.getText())))\n\t\t\tisDataEntered = setErrorTxt(\"Please enter a valid amount\");\n\t\telse if(creditTextField.getText() == null || creditTextField.getText().trim().isEmpty())\n\t\t\tisDataEntered = setErrorTxt(\"You left the credit text field empty.\");\n\t\telse if(!(Validation.validateChars(creditTextField.getText())))\n\t\t\tisDataEntered = setErrorTxt(\"Please only enter valid characters\");\n\t\telse if(dateField.getValue() == null) {\n\t\t\tisDataEntered = setErrorTxt(\"You left the date field empty.\");\t\t\t\n\t\t}\n\t\telse if(dateField.getValue().isBefore(startDate))\n\t\t\tisDataEntered = setErrorTxt(\"Sorry, the date you entered is before the starting date.\");\n\t\treturn isDataEntered;\n\t}",
"private boolean Validate() {\n EditText titleText = findViewById(R.id.register_movie_title_txt);\n EditText yearText = findViewById(R.id.register_movie_year_txt);\n EditText ratingText = findViewById(R.id.register_movie_rating_txt);\n\n\n boolean is_filled_required_fields = false;\n is_filled_required_fields = titleText.getText().toString().length() > 0\n && yearText.getText().toString().length() > 0\n && ratingText.getText().toString().length() > 0;\n\n if (!is_filled_required_fields) {\n Snackbar mySnackbar = Snackbar.make(findViewById(R.id.activity_register_base_layout), \"Please fill required fields\", BaseTransientBottomBar.LENGTH_SHORT);\n mySnackbar.show();\n }\n return is_filled_required_fields;\n }",
"public void checkData(){\n\n }",
"@Override\r\n\tpublic void validate() {\n\t\t\r\n\t}",
"private boolean isValidate() {\n name = edt_name.getText().toString();\n phone = edt_phone.getText().toString();\n landMark = edt_landmark.getText().toString();\n address = edt_address.getText().toString();\n city = edt_city.getText().toString();\n state = edt_state.getText().toString();\n if (name.length() == 0) {\n edt_name.setError(\"Please Enter Name \");\n requestFocus(edt_name);\n return false;\n } else if (phone.isEmpty()) {\n edt_phone.setError(\"Please Enter Phone Number \");\n requestFocus(edt_phone);\n return false;\n } else if (phone.length() != 10) {\n edt_phone.setError(\"Please Enter Valid Phone Number \");\n requestFocus(edt_phone);\n return false;\n } else if (address.length() == 0) {\n edt_address.setError(\"Please Enter Address\");\n requestFocus(edt_address);\n return false;\n } else if (city.length() == 0) {\n edt_city.setError(\"Please Enter City Name\");\n requestFocus(edt_city);\n return false;\n } else if (state.length() == 0) {\n edt_state.setError(\"Please Enter State Name\");\n requestFocus(edt_state);\n return false;\n }\n return true;\n }",
"public void validate(){\r\n\t\ttry{\r\n\t\t\t//First name, last name, date of birth and email are compulsory.\r\n\t\tif(FirstName==null||LastName==null||Dob==null||Email==null) \r\n\t\t\tthrow new Exception(\"One of the field is Empty :\\n(First name / last name / dob / email )\");\r\n\t\tif(TelephoneNumber!=0||MobileNumber!=0)\r\n\t\t\tthrow new Exception(\"Enter Contact Number\");\r\n\t\t\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\t\r\n\t\t/*finally{\r\n\t\t\tSystem.out.println(\"Program Executed\");\r\n\t\t}*/\r\n\t}",
"private boolean checkFields() {\n if (editTxtName.getText().equals(\"\")) return false;//name\n if (editTxtDesc.getText().equals(\"\")) return false;//desc\n if (editClrColor.getValue() == null) return false;//color\n if (oldEnvironment == null) return false;//environment is null\n return true;//everything is valid\n }",
"@Override\r\n\tpublic boolean checkValidity() {\n\t\treturn false;\r\n\t}",
"public void ValidationData() {\n try {\n ConnectionClass connectionClass = new ConnectionClass();\n connect = connectionClass.CONN();\n if (connect == null) {\n ConnectionResult = \"Check your Internet Connection\";\n } else {\n String query = \"Select No from machinestatustest where Line='\" + Line + \"' and Station = '\" + Station + \"'\";\n Statement stmt = connect.createStatement();\n ResultSet rs = stmt.executeQuery(query);\n if (rs.next()) {\n Validation = rs.getString(\"No\");\n }\n ConnectionResult = \"Successfull\";\n connect.close();\n }\n } catch (Exception ex) {\n ConnectionResult = ex.getMessage();\n }\n }",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"private void validDataCheck() {\n dblogin.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n showData(dataSnapshot);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n }",
"public boolean validate() {\n return true;\n }",
"public boolean validate() {\n return true;\n }",
"public void setDataValidation(String dataValidation);",
"private void validateInputParameters(){\n\n }",
"private boolean isInputValid() {\n return true;\n }",
"private boolean validate(){\n return EditorUtils.editTextValidator(generalnformation,etGeneralnformation,\"Type in information\") &&\n EditorUtils.editTextValidator(symptoms,etSymptoms, \"Type in symptoms\") &&\n EditorUtils.editTextValidator(management,etManagement, \"Type in management\");\n }",
"public boolean validate(){\n return true;\n }",
"public abstract boolean validate();",
"private void checkValidation() {\n String getInstituteName = NameofInstitute.getText().toString();\n String getDegreename = SpinnerDegree.getSelectedItem().toString();\n\n\n // Check if all strings are null or not\n if (getInstituteName.equals(\"\") || getInstituteName.length() == 0 || getDegreename.equals(\"\") || getDegreename.length() == 0)\n new CustomToast().Show_Toast(getActivity(), getView(),\"All fields are required.\");\n // Else do signup or do your stuff\n else {\n //Toast.makeText(getActivity(), \"All Ok till Now\", Toast.LENGTH_SHORT).show();\n AddQualifications(getDegreename,getInstituteName);\n }\n\n }",
"private void validator() throws Exception {\n if (getDBTable() == null) throw new Exception(\"getDBTable missing\");\n if (getColumnsString() == null) throw new Exception(\"getColumnsString missing\");\n if (getColumnsType() == null || getColumnsType().size() <= 0) throw new Exception(\"getColumnsType missing\");\n if (getDuplicateUpdateColumnString() == null) {\n if (getColumnsString().split(\",\").length != getColumnsType().size())\n throw new Exception(\"mismatch for type and columns\");\n\n } else {\n if (getColumnsString().split(\",\").length +\n getDuplicateUpdateColumnString().split(\",\").length != getColumnsType().size())\n throw new Exception(\"mismatch for type and columns\");\n }\n }",
"protected void validate()\r\n\t{\r\n\t\tif( this.mapper==null )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the Mapper of this dataset.\");\r\n\t\tif( this.input_format==null )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the InputFormat of this dataset.\");\r\n\t\tif( this.inputs==null || this.inputs.size()==0 )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the input path(s) of this dataset\");\r\n\t\tif ( this.getSchema()==null || this.getSchema().size()==0 )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the schema of this dataset first\");\r\n\t}",
"@Override\n\tpublic void validate()\n\t{\n\n\t}",
"@Override\r\n public boolean validate() {\n return true;\r\n }",
"@Override\r\n\tpublic boolean validate() {\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean validate() {\n\t\treturn true;\r\n\t}",
"public boolean checkEntryInputs() {\n\t\tboolean isValid = true;\n\t\tif(sampleNumberTF.getText().equals(\"\")) {\n\t\t\tisValid = false;\n\t\t}\n\t\t\n\t\tif(materialDescriptionTF.getText().equals(\"\")) {\n\t\t\tisValid = false;\n\t\t}\n\t\t\n\t\tif(Double.valueOf(bacteroidesConcentrationTF.getText())==null) {\n\t\t\tisValid = false;\n\t\t}\n\t\treturn isValid;\n\t}",
"public boolean Validate() {\n String[] testArr = {titleTxf.getText(), fNameTxf.getText(), sNameTxf.getText(),\n initialTxf.getText(), hNumTxf.getText(), cNumTxf.getText(), emailTxf.getText(), idNumTxf.getText(),\n (String) maritalCbx.getSelectedItem(), \n resTxf1.getText() + \"\" + resTxf2.getText(), zipResTxf.getText(),postTxf1.getText() + \"\" + postTxf2.getText(),\n zipPostTxf.getText() };\n\n // verify user has entered data into required fields\n String inputTest = \"\";\n\n for (int i = 0; i < testArr.length; i++) {\n if (testArr[i].equals(inputTest)) {\n\n JOptionPane.showMessageDialog(rootPane, \"please fill in all required fields\", \"ERROR\", ERROR_MESSAGE);\n \n return false;\n \n\n }\n \n \n }\n //verify Home number\n if(hNumTxf.getText().length()!=10){\n \n JOptionPane.showMessageDialog(rootPane, \"Invaild Home number\", \"ERROR\", ERROR_MESSAGE);\n errHNum.setText(\"!\");\n \n return false;\n }\n else{\n errHNum.setText(\"\");\n }\n //verify CellNo\n if(cNumTxf.getText().length()!=10){\n \n JOptionPane.showMessageDialog(rootPane, \"Invaild Cellphone number\", \"ERROR\", ERROR_MESSAGE);\n errCNum.setText(\"!\");\n \n return false;\n \n }\n else{\n errCNum.setText(\"\");\n }\n //verify email\n String email =emailTxf.getText(); \n if(!email.contains(\"@\")|| !email.contains(\".\")){\n \n JOptionPane.showMessageDialog(rootPane, \"Invaild email address\", \"ERROR\", ERROR_MESSAGE);\n errEmail.setText(\"!\");\n return false;\n }\n else{\n errEmail.setText(\"\");\n }\n \n //verify ID No. (Local)\n String ID = idNumTxf.getText();\n if(ID.length()!=13){\n \n JOptionPane.showMessageDialog(rootPane, \"Invaild ID number\", \"ERROR\", ERROR_MESSAGE);\n errID.setText(\"!\");\n return false;\n }\n else{\n errID.setText(\"\");\n }\n \n if(zipResTxf.getText().length()!=4){\n JOptionPane.showMessageDialog(rootPane, \"Invaild Zip Code\", \"ERROR\", ERROR_MESSAGE);\n errZipRes.setText(\"!\");\n return false;\n \n }\n else{\n \n errZipRes.setText(\"\");\n }\n if(zipPostTxf.getText().length()!=4){\n JOptionPane.showMessageDialog(rootPane, \"Invaild Zip Code\", \"ERROR\", ERROR_MESSAGE);\n errZipPost.setText(\"!\");\n return false;\n \n }\n else{\n \n errZipPost.setText(\"\");\n }\n \n \n return true;\n\n }",
"private boolean checkValidations() {\n if (TextUtils.isEmpty(etFirstName.getText().toString().trim())) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.empty_name_war));\n return false;\n } else if (etPhoneNo.getText().length() > 0 && etPhoneNo.getText().toString().trim().length() < 7) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.valid_mo_no_war));\n return false;\n }\n /*else if (TextUtils.isEmpty(etAdress.getText().toString().trim())) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.empty_address_war));\n return false;\n } else if (countryId==null || countryId.equals(\"\")) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.country_war));\n return false;\n } else if (stateId==null || stateId.equals(\"\")) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.state_war));\n return false;\n }*/ /*else if (cityId==null || cityId.equals(\"\")) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.city_war));\n return false;\n }*/\n else\n return true;\n }",
"@Test\r\n\tpublic void view3_current_table_data_validation()\r\n\t{\t\r\n\t\t//Key on which we have to validate other values.\r\n\t\tString key = \"Calls In Queue\";\r\n\t\t//Text on which we will fetch other tables columns\r\n\t\tString check_text = \"Agents\";\r\n\r\n\t\t//Initialize Elements of tables and their columns data.\r\n\r\n\t\t//Table 1 - Data\r\n\t\tList<WebElement> data_of_table1 = driver.findElements(view3_Current_table_data_val);\r\n\t\t//Table 1 - Columns\r\n\t\tList<WebElement> col_of_table1 = driver.findElements(By.xpath(view3_curr_data_table));\r\n\t\t//Removing Column data from another table.\r\n\t\tdata_of_table1 = helper.modify_cols_data_of_table(col_of_table1, data_of_table1 , check_text );\r\n\t\t//Validating N/A and integer for columns\r\n\t\thelper.data_validate_Down(driver, key , col_of_table1, data_of_table1 );\r\n\t}",
"public boolean isInputValid()\n {\n String[] values = getFieldValues();\n if(values[0].length() > 0 || values[1].length() > 0 || values[2].length() > 0)\n return true;\n else\n return false;\n }",
"private boolean validateInputs() {\n return !proID.getText().isEmpty() || \n !proName.getText().isEmpty() ||\n !proPrice.getText().isEmpty();\n }",
"@Override\r\n public void validate() {\r\n }"
] | [
"0.8724793",
"0.8091506",
"0.77341616",
"0.7440744",
"0.7324354",
"0.7257509",
"0.72366476",
"0.7228365",
"0.72139657",
"0.7189038",
"0.717355",
"0.71403545",
"0.71310794",
"0.7112962",
"0.7108171",
"0.70919466",
"0.70708656",
"0.7026082",
"0.7013383",
"0.6970021",
"0.69666445",
"0.69527674",
"0.69448465",
"0.69366294",
"0.6932477",
"0.6932283",
"0.69318545",
"0.69290096",
"0.6916134",
"0.68999887",
"0.68999887",
"0.68987876",
"0.68974984",
"0.68819773",
"0.68698317",
"0.686435",
"0.68504554",
"0.6847055",
"0.6822043",
"0.6810373",
"0.68020797",
"0.67999566",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.6797014",
"0.67922467",
"0.6787844",
"0.6787844",
"0.6780556",
"0.6778762",
"0.6772269",
"0.67631227",
"0.6721403",
"0.670727",
"0.6707078",
"0.6696954",
"0.66953206",
"0.66921693",
"0.6689941",
"0.6686777",
"0.6686777",
"0.6667982",
"0.6664328",
"0.66594553",
"0.66452926",
"0.66447854",
"0.66410106",
"0.6635994"
] | 0.0 | -1 |
FIXME move this logic to core module | private String getSQLScript() {
StringBuffer sb = new StringBuffer();
StringBuffer javaSb = new StringBuffer();
sb.append("CREATE").append(" PROCEDURE ");
String procedureName = procNameText.getText();
if (procedureName == null) {
procedureName = "";
}
sb.append(QuerySyntax.escapeKeyword(procedureName)).append("(");
for (Map<String, String> map : procParamsListData) {
// "PARAMS_INDEX", "PARAM_NAME", "PARAM_TYPE", "JAVA_PARAM_TYPE"
String name = map.get("0");
String type = map.get("1");
String javaType = map.get("2");
String paramModel = map.get("3");
String description = map.get("4");
sb.append(QuerySyntax.escapeKeyword(name)).append(" ");
if (!paramModel.equalsIgnoreCase(SPArgsType.IN.toString())) {
sb.append(paramModel).append(" ");
}
sb.append(type);
if (isCommentSupport && StringUtil.isNotEmpty(description)) {
description = String.format("'%s'", description);
sb.append(String.format(" COMMENT %s", StringUtil.escapeQuotes(description)));
}
sb.append(",");
javaSb.append(javaType).append(",");
}
if (!procParamsListData.isEmpty()) {
if (sb.length() > 0) {
sb.deleteCharAt(sb.length() - 1);
}
if (javaSb.length() > 0) {
javaSb.deleteCharAt(javaSb.length() - 1);
}
}
sb.append(")");
sb.append(StringUtil.NEWLINE).append("AS LANGUAGE JAVA ").append(StringUtil.NEWLINE);
String javaFuncName = javaNameText.getText();
if (javaFuncName == null) {
javaFuncName = "";
}
sb.append("NAME '").append(javaFuncName).append("(").append(javaSb).append(")").append("'");
if (isCommentSupport) {
String description = procDescriptionText.getText();
if (StringUtil.isNotEmpty(description)) {
description = String.format("'%s'", description);
sb.append(String.format(" COMMENT %s", StringUtil.escapeQuotes(description)));
}
}
return formatSql(sb.toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n public void perish() {\n \n }",
"protected void additionalProcessing() {\n\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\tprotected void compute() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void anularFact() {\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}",
"@Override\r\n\tprotected void processInit() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"private stendhal() {\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\n protected void init() {\n }",
"public void smell() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n public void preprocess() {\n }",
"@Override\r\n\tprotected void processInit() {\n\r\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public void redibujarAlgoformers() {\n\t\t\n\t}",
"@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}",
"@Override\n public void preprocess() {\n }",
"protected boolean func_70814_o() { return true; }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"protected void mo6255a() {\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\n\tpublic void anular() {\n\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"private void parseData() {\n\t\t\r\n\t}",
"protected OpinionFinding() {/* intentionally empty block */}",
"@Override\n\tprotected void prepare() {\n\t\t\n\t}",
"@Override\n protected void prot() {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\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}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\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}",
"private void init() {\n\n\t}",
"protected void runBeforeIteration() {}",
"@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 abstract void mo70713b();",
"protected void init() {\n // to override and use this method\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void processExecute() {\n\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\r\n\tprotected void processTarget() {\n\r\n\t}",
"@Override\r\n\tprotected void processTarget() {\n\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\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"public void logic(){\r\n\r\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\tprotected void processCost() {\n\r\n\t}",
"@Override\n\tpublic void processing() {\n\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"Operations operations();",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"private void kk12() {\n\n\t}",
"private static void cajas() {\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}",
"protected void initialize() {}",
"protected void initialize() {}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n\tprotected void postRun() {\n\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tpublic void entrenar() {\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}",
"public void mo4359a() {\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 init() {}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\r\n\tprotected void intializeSpecific() {\n\r\n\t}",
"public void mo38117a() {\n }",
"public void gored() {\n\t\t\n\t}"
] | [
"0.5705014",
"0.55672723",
"0.5538089",
"0.5428307",
"0.53785384",
"0.5323571",
"0.52985805",
"0.5289693",
"0.5286366",
"0.52749735",
"0.5272612",
"0.52709955",
"0.52709955",
"0.52507925",
"0.52505606",
"0.5250279",
"0.5235792",
"0.52190113",
"0.5212114",
"0.5206608",
"0.5205695",
"0.5204928",
"0.51944685",
"0.51941675",
"0.5178552",
"0.5175793",
"0.5173057",
"0.5169949",
"0.51617074",
"0.5161647",
"0.5140512",
"0.5121559",
"0.5121559",
"0.5121559",
"0.5121559",
"0.5121559",
"0.5121559",
"0.5114366",
"0.5109294",
"0.51026595",
"0.5093391",
"0.50905085",
"0.5083772",
"0.50837624",
"0.5078409",
"0.5077448",
"0.5077448",
"0.5077448",
"0.5077448",
"0.5077448",
"0.5070758",
"0.5070758",
"0.5069798",
"0.5066181",
"0.5063595",
"0.5063595",
"0.50626516",
"0.5055934",
"0.50499713",
"0.5048237",
"0.5035151",
"0.5023304",
"0.5023304",
"0.5022287",
"0.5022287",
"0.5022287",
"0.5022287",
"0.5022287",
"0.5022287",
"0.502218",
"0.5019246",
"0.5016596",
"0.5012701",
"0.5007091",
"0.50070626",
"0.5006157",
"0.5004135",
"0.5002361",
"0.49983388",
"0.49908307",
"0.4983076",
"0.49778563",
"0.49759898",
"0.49759898",
"0.4972",
"0.4972",
"0.49505785",
"0.49494237",
"0.49484184",
"0.49463534",
"0.49462312",
"0.49462312",
"0.49462312",
"0.49447462",
"0.49444744",
"0.49444744",
"0.49376383",
"0.49335426",
"0.49322236",
"0.49282494",
"0.49257934"
] | 0.0 | -1 |
Init the sql type map | private void initSqlTypeMap() {
if (sqlTypeMap == null) {
sqlTypeMap = new TreeMap<String, String>();
}
sqlTypeMap.put("--void--", "0");
FieldHandlerUtils.initSqlTypeMap(sqlTypeMap);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\tpublic void setTypeMap(Map<String, Class<?>> map) throws SQLException {\n\t\t\t\r\n\t\t}",
"@Override\r\n\t\tpublic Map<String, Class<?>> getTypeMap() throws SQLException {\n\t\t\treturn null;\r\n\t\t}",
"private void initJavaType() { // FIXME move this logic to core module\n\t\tif (javaTypeMap == null) {\n\t\t\tjavaTypeMap = new TreeMap<String, List<String>>();\n\t\t}\n\t\tif (!javaTypeMap.containsKey(\"1\")) {\n\t\t\tList<String> list = new ArrayList<String>();\n\t\t\tlist.add(\"java.lang.String\");\n\t\t\tlist.add(\"java.sql.Date\");\n\t\t\tlist.add(\"java.sql.Time\");\n\t\t\tlist.add(\"java.sql.Timestamp\");\n\t\t\tlist.add(\"java.lang.Byte\");\n\t\t\tlist.add(\"java.lang.Short\");\n\t\t\tlist.add(\"java.lang.Integer\");\n\t\t\tlist.add(\"java.lang.Long\");\n\t\t\tlist.add(\"java.lang.Float\");\n\t\t\tlist.add(\"java.lang.Double\");\n\t\t\tlist.add(\"java.math.BigDecimal\");\n\t\t\tlist.add(\"byte\");\n\t\t\tlist.add(\"short\");\n\t\t\tlist.add(\"int\");\n\t\t\tlist.add(\"long\");\n\t\t\tlist.add(\"float\");\n\t\t\tlist.add(\"double\");\n\t\t\tjavaTypeMap.put(\"1\", list);\n\t\t}\n\t\tif (!javaTypeMap.containsKey(\"2\")) {\n\t\t\tList<String> list = new ArrayList<String>();\n\t\t\tlist.add(\"java.lang.Byte\");\n\t\t\tlist.add(\"java.lang.Short\");\n\t\t\tlist.add(\"java.lang.Integer\");\n\t\t\tlist.add(\"java.lang.Long\");\n\t\t\tlist.add(\"java.lang.Float\");\n\t\t\tlist.add(\"java.lang.Double\");\n\t\t\tlist.add(\"java.math.BigDecimal\");\n\t\t\tlist.add(\"java.lang.String\");\n\t\t\tlist.add(\"byte\");\n\t\t\tlist.add(\"short\");\n\t\t\tlist.add(\"int\");\n\t\t\tlist.add(\"long\");\n\t\t\tlist.add(\"float\");\n\t\t\tlist.add(\"double\");\n\t\t\tjavaTypeMap.put(\"2\", list);\n\t\t}\n\t\tif (!javaTypeMap.containsKey(\"3\")) {\n\t\t\tList<String> list = new ArrayList<String>();\n\t\t\tlist.add(\"java.sql.Date\");\n\t\t\tlist.add(\"java.sql.Time\");\n\t\t\tlist.add(\"java.sql.Timestamp\");\n\t\t\tlist.add(\"java.lang.String\");\n\t\t\tjavaTypeMap.put(\"3\", list);\n\t\t}\n\t\tif (!javaTypeMap.containsKey(\"4\")) {\n\t\t\tList<String> list = new ArrayList<String>();\n\t\t\tjavaTypeMap.put(\"4\", list);\n\t\t}\n\t\tif (!javaTypeMap.containsKey(\"5\")) {\n\t\t\tList<String> list = new ArrayList<String>();\n\t\t\tif (database != null) {\n\t\t\t\tString jdbcVersion = database.getDatabase().getServer().getJdbcDriverVersion();\n\t\t\t\tif (isAfterJdbc111(jdbcVersion)) {\n\t\t\t\t\tlist.add(\"cubrid.sql.CUBRIDOIDImpl\");\t\t\t\t\t\n\t\t\t\t} else { \n\t\t\t\t\tlist.add(\"cubrid.sql.CUBRIDOID\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlist.add(\"cubrid.sql.CUBRIDOID\");\n\t\t\t}\n\t\t\t\n\t\t\tjavaTypeMap.put(\"5\", list);\n\t\t}\n\t\tif (!javaTypeMap.containsKey(\"6\")) {\n\t\t\tList<String> list = new ArrayList<String>();\n\t\t\tlist.add(\"cubrid.jdbc.driver.CUBRIDResultSet\");\n\t\t\tjavaTypeMap.put(\"6\", list);\n\t\t}\n\t}",
"private static void createTypeMap() {\n\n }",
"private static HashMap<String, String> initMapping()\n {\n HashMap<String, String> typeMapping = new HashMap<String, String>();\n\n typeMapping.put(\"boolean\", \"boolean\");\n typeMapping.put(\"float\", \"float\");\n typeMapping.put(\"double\", \"double\");\n typeMapping.put(\"byte\", \"byte\");\n typeMapping.put(\"unsignedByte\", \"short\");\n typeMapping.put(\"short\", \"short\");\n typeMapping.put(\"unsignedShort\", \"int\");\n typeMapping.put(\"int\", \"int\");\n typeMapping.put(\"integer\", \"java.math.BigDecimal\");\n typeMapping.put(\"positiveInteger\", \"java.math.BigInteger\");\n typeMapping.put(\"unsignedInt\", \"java.math.BigInteger\");\n typeMapping.put(\"long\", \"java.math.BigInteger\");\n typeMapping.put(\"unsignedLong\", \"java.math.BigDecimal\");\n typeMapping.put(\"decimal\", \"java.math.BigDecimal\");\n typeMapping.put(\"string\", \"String\");\n typeMapping.put(\"hexBinary\", \"byte[]\");\n typeMapping.put(\"base64Binary\", \"byte[]\");\n typeMapping.put(\"dateTime\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"time\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"date\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gDay\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gMonth\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gMonthDay\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gYear\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gYearMonth\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"duration\", \"javax.xml.datatype.Duration\");\n typeMapping.put(\"NOTATION\", \"javax.xml.namespace.QName\");\n typeMapping.put(\"QName\", \"javax.xml.namespace.QName\");\n typeMapping.put(\"anyURI\", \"String\");\n typeMapping.put(\"Name\", \"String\");\n typeMapping.put(\"NCName\", \"String\");\n typeMapping.put(\"negativeInteger\", \"java.math.BigDecimal\");\n typeMapping.put(\"NMTOKEN\", \"String\");\n typeMapping.put(\"nonNegativeInteger\", \"java.math.BigDecimal\");\n typeMapping.put(\"nonPositiveInteger\", \"java.math.BigDecimal\");\n typeMapping.put(\"normalizedString\", \"String\");\n typeMapping.put(\"token\", \"String\");\n typeMapping.put(\"any\", \"Object\");\n\n return typeMapping;\n }",
"public static void init() {\r\n\r\n types = new HashMap();\r\n ConnectionManager manager = ConnectionManager.getInstance();\r\n DatabaseConnection con = manager.get();\r\n\r\n String str = \"select ChWord ,ChWordSpell from PtWordSpell\";\r\n try\r\n {\r\n RecordSet rs = con.executeQuery(str);\r\n \r\n while (rs.next()) {\r\n String PolyChWord = rs.getString(\"ChWord\");\r\n String enuDesc = rs.getString(\"ChWordSpell\");\r\n \r\n types.put(PolyChWord, enuDesc);\r\n \r\n }\r\n rs.close();\r\n }catch(Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n\r\n \r\n manager.release();\r\n\r\n\r\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 }",
"Hashtable createTypeMapping()\n {\n Hashtable mapping = new Hashtable();\n \n mapping.put(TypeFactory.getType(\"Double\"), \n new ParameterFactory() \n {\n public Parameter getParameter(Object o) \n {\n StratmasDecimal sObj = (StratmasDecimal) o;\n if (isBadDecimal(sObj)) {\n return null;\n } else {\n return new StratmasDecimalParameter((StratmasDecimal) o);\n }\n }\n });\n mapping.put(TypeFactory.getType(\"double\", \"http://www.w3.org/2001/XMLSchema\"), \n new ParameterFactory() \n {\n public Parameter getParameter(Object o) \n {\n StratmasDecimal sObj = (StratmasDecimal) o;\n if (isBadDecimal(sObj)) {\n return null;\n } else {\n return new StratmasDecimalParameter((StratmasDecimal) o);\n }\n }\n });\n mapping.put(TypeFactory.getType(\"NonNegativeInteger\"), \n new ParameterFactory() \n {\n public Parameter getParameter(Object o) \n {\n return new StratmasIntegerParameter((StratmasInteger) o);\n }\n });\n // Ground type type hiearchy.\n mapping.put(TypeFactory.getType(\"anyType\", \"http://www.w3.org/2001/XMLSchema\"), \n new ParameterFactory() \n {\n public Parameter getParameter(Object o) \n {\n return null;\n }\n });\n\n return mapping;\n }",
"public static void addTypeMapping(String sqlTypeName, String javaClassName)\n\tthrows SQLException\n\t{\n\t\tPreparedStatement stmt = null;\n\t\ttry\n\t\t{\n\t\t\tClassLoader loader = Loader.getCurrentLoader();\n\t\t\tClass cls = loader.loadClass(javaClassName);\n\t\t\tif(!SQLData.class.isAssignableFrom(cls))\n\t\t\t\tthrow new SQLException(\"Class \" + javaClassName\n\t\t\t\t\t+ \" does not implement java.sql.SQLData\");\n\n\t\t\tsqlTypeName = getFullSqlName(sqlTypeName);\n\t\t\tstmt = SQLUtils\n\t\t\t\t.getDefaultConnection()\n\t\t\t\t.prepareStatement(\n\t\t\t\t\t\"INSERT INTO sqlj.typemap_entry(javaName, sqlName) VALUES(?,?)\");\n\t\t\tstmt.setString(1, javaClassName);\n\t\t\tstmt.setString(2, sqlTypeName);\n\t\t\tstmt.executeUpdate();\n\t\t}\n\t\tcatch(ClassNotFoundException e)\n\t\t{\n\t\t\tthrow new SQLException(\"No such class: \" + javaClassName);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tSQLUtils.close(stmt);\n\t\t}\n\t\tLoader.clearSchemaLoaders();\n\t}",
"BaseTypeIdImpl(String SQLTypeName)\n {\n this.schemaName = null;\n this.unqualifiedName = SQLTypeName;\n }",
"private JdbcTypeRegistry() {\n }",
"private Map<String, Integer> getUserTableTypeMetaData(Connection conn, String name) throws SQLException{\n\t\t\n\t\tMap<String, Integer> colNameType = new HashMap<String, Integer>();\n\t\tPreparedStatement preparedStatement = conn.prepareStatement(TestCDTAnyDB.USER_TABLE_TYPE_QUERY);\n\t\tpreparedStatement.setString(1, name);\n\t\tResultSet rs = preparedStatement.executeQuery();\n\n\t while (rs.next()) {\n\t String colName = rs.getString(\"name\");\n\t String colType = rs.getString(\"type\");\n\t if (TYPE_MAPPING.get(colType) == null ) {\n\t \tLOG.error(\"SQL Server type \" + colType + \" hasn't been mapped in JDBC types \");\n\t \t//throw new Exception(\"wsef\");\n\t }\n\t colNameType.put(colName, TYPE_MAPPING.get(colType));\n\t }\n\t \n\t return colNameType;\t \n\t}",
"public boolean initTypes() throws RepositoryAccessException {\r\n // XXX Magic String\r\n File sqlFile = new File(m_sqlDirectory, \"types.sql\");\r\n if (!sqlFile.exists() || !sqlFile.canRead() || !sqlFile.isFile())\r\n return false;\r\n \r\n return executeScriptAndProbe(sqlFile, true);\r\n }",
"void setTypeMapper (TypeMapper typeMapper);",
"public HashMap<String,HashSet<String>> loadTypes(String typeFromO1, String typeFromO2) throws Exception;",
"private static void initDataTypeList()\n\t{\n\t\tfor(String numberType : DATA_TYPE_ARRAY)\n\t\t{\n\t\t\tdataTypeList.add(numberType);\n\t\t}\n\t\tlogger.info(\" --|*|-- All Data types are initialized! --|*|--\");\n\t}",
"public abstract String toJavaType(int sqlType);",
"public abstract Map<String, Integer> getColumnTypes(String tableName);",
"void fillDatabase() {\n Type.type( \"FOOD\" );\n Type.type( \"HOT\" );\n Type.type( \"SNACK\" );\n }",
"private static void initialize_sensorTypeToTableProperties() {\n\t\tinitialized_LinkType();\n\t\tinitialized_RoadActivitysType();\n\t\tinitialized_SealevelType();\n\t\tinitialized_SnowDepthType();\n\t\tinitialized_SnowFallType();\n\t\tinitialized_TrafficType();\n\t\tinitialized_WeatherType();\n\t\tinitialized_BikeHireType();\n\t\tinitialized_RailwayStationType();\n\t\tinitialized_ADSBHubType();\n\t}",
"public int getSqlType() { return _type; }",
"public AeTaskSQLConfig(String aType, Map aOverrideMap)\r\n {\r\n super(aType, aOverrideMap);\r\n }",
"public AbstractTypeMapping()\n {\n super();\n }",
"public TypeMap(DecompilerLanguage lang, DataType d, String meta, boolean isChar,\n\t\t\t\tboolean isUtf) {\n\t\t\tdt = d;\n\t\t\tif (d instanceof BuiltIn) {\n\t\t\t\tname = ((BuiltIn) d).getDecompilerDisplayName(lang);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tname = d.getName();\n\t\t\t}\n\t\t\tmetatype = meta;\n\t\t\tthis.isChar = isChar;\n\t\t\tthis.isUtf = isUtf;\n\t\t\tid = hashName(name);\n\t\t}",
"BoltResultSetMetaData(List<Type> types, List<String> keys) {\n\t\tsuper(keys);\n\t\tthis.columnType = types.toArray(new Type[this.keys.size() + 1]);\n\n\t\t// we init columnType with the first record\n\t\t// in case first == last record\n\t\t/*for (int i = 1; i <= this.keys.size(); i++) {\n\t\t\tcolumnType[i] = this.getColumnDriverTypeOrDefault(i, InternalTypeSystem.TYPE_SYSTEM.STRING());\n\t\t}*/\n\t}",
"void setForPersistentMapping_Type(Type type) {\n this.type = type;\n }",
"public CanvasCriteriaTypeMap()\r\n\t{\r\n\r\n\t}",
"@BeforeClass\n public static void init() throws Exception {\n Class.forName(MySQLDataType.class.getName());\n }",
"private void buildMap(int count, char type, String typeName) {\r\n\t\tfor (int i = 1; i <= count; i++) {\r\n\t\t\toriginalMaps.add(new MapType(\"map_\" + type + i, typeName, \"colony/map_\" + type + i));\r\n\t\t}\r\n\t}",
"MappedDatatype createMappedDatatype();",
"private void registerTypes(ITypeManager typeManager) {\n\t\ttypeManager.registerType(BsonString.class, StdTypeManagerPlugin.STRING_NATURE);\n\t\ttypeManager.registerType(BsonInt32.class, StdTypeManagerPlugin.INTEGER_NATURE);\n\t\ttypeManager.registerType(BsonInt64.class, StdTypeManagerPlugin.INTEGER_NATURE);\n\t\ttypeManager.registerType(BsonDouble.class, StdTypeManagerPlugin.DECIMAL_NATURE);\n\t\ttypeManager.registerType(BsonNumber.class, StdTypeManagerPlugin.DECIMAL_NATURE);\n\t\ttypeManager.registerType(BsonDateTime.class, StdTypeManagerPlugin.DATETIME_NATURE);\n\t\ttypeManager.registerType(BsonBoolean.class, StdTypeManagerPlugin.BOOLEAN_NATURE);\n\t\ttypeManager.registerType(BsonBinary.class, StdTypeManagerPlugin.BINARY_NATURE);\n\t\ttypeManager.registerType(BsonDocument.class, StdTypeManagerPlugin.COMPOSITE_NATURE);\n\t}",
"public interface TypeMapper {\n public <T> T sqlToJtype(Object sqlValue, Class<T> jType);\n public <T> T jToSql(Object jValue, String sqlType);\n}",
"private static void initializeDatafields(Class<AbstractNode> type) throws Exception {\r\n if (staticDatafieldMap == null) {\r\n staticDatafieldMap = new HashMap<Class<AbstractNode>, Set<String>>();\r\n }\r\n\r\n if (staticDatafieldMap.get(type) == null) {\r\n staticDatafieldMap.put(type, Information.getDatafieldsOfNode(type));\r\n }\r\n }",
"public abstract String toHiveType(int sqlType);",
"public AllCollTypes() {\n\t\tsuper(\"ALL_COLL_TYPES\", org.jooq.util.oracle.sys.Sys.SYS);\n\t}",
"private static void createTypeDBHelper(Context context) {\n belongTypeDBHelper = BelongTypeDBHelper.getInstance(context,\n TablesName.TYPE_TABLE_NAME);\n }",
"public DAO(String dbType){\n this.dbType = dbType;\n if(this.dbType.equals(\"MySQL\")){\n initialPool();\n\n // for q5 mysql use\n if(wholeUserIds == null){\n wholeUserIds = new TreeSet<Long>();\n }\n }\n else if(this.dbType.equals(\"Memory\")){\n // for q5 memory use\n if(wholeCountData == null){\n wholeCountData = new TreeMap<String, Integer>();\n }\n }\n\n }",
"public interface TypeHandler {\r\n\r\n public void setParamters(PreparedStatement preparedStatement, Map<String,Integer>parameterMap, Object value) throws SQLException;\r\n\r\n public Class getParameterClass(String name)throws SQLException;\r\n\r\n\tpublic void setValueForObject(ResultSet resultSet, Object object,String columnName,String propertyName)throws SQLException;\r\n}",
"public void setMapType(int type) {\n if(internalNative != null) {\n internalNative.setMapType(type);\n }\n }",
"private void init() {\n\t\tmap = new LinkedHashMap<String, HeaderData>();\r\n\t\tList<HeaderData> list = config.getColumns();\r\n\t\tfor(HeaderData info: list){\r\n\t\t\tString id = info.getId();\r\n\t\t\tif(id == null) throw new IllegalArgumentException(\"Null id found for \"+info.getClass().getName());\r\n\t\t\t// Map the id to info\r\n\t\t\tmap.put(info.getId(), info);\r\n\t\t}\r\n\t}",
"public String getInsertSqlForPreparedStatement(String table,\r\n OrderedMap mapping,\r\n Class type) throws DataLayerException {\r\n // Object[] args = {};\r\n // Object newobj = null;\r\n StringBuffer fields = new StringBuffer();\r\n StringBuffer values = new StringBuffer();\r\n StringBuffer sql = new StringBuffer(\"insert into \");\r\n sql.append(table);\r\n sql.append(\" (\");\r\n int paramCount = 0;\r\n\r\n try {\r\n PropertyDescriptor[] pds = BeanUtils.getPropertyDescriptors(type, mapping);\r\n if (mapping == null)\r\n throw new DataLayerException(\"Error creating Insert SQL. Mapping is null.\");\r\n\r\n Object temp = type.newInstance();\r\n if (!(temp instanceof Map || temp instanceof DynaActionForm)) {\r\n // Not a Map. Requires PropertyDescriptors.\r\n if (pds == null || pds.length == 0) {\r\n throw new DataLayerException(\r\n \"Error creating Insert SQL. Bean Descriptors are missing (className is \" + type.getName() + \").\");\r\n }\r\n boolean first = true;\r\n for (int i = 0; i < pds.length; i++) {\r\n String fieldName = pds[i].getName();\r\n Field fieldDef = (Field) (mapping.get(fieldName.toLowerCase()));\r\n if ((! fieldDef.getType().toLowerCase().equals(\"key\")) &&\r\n (fieldDef.getPattern() == null || fieldDef.getPattern().trim().equals(\"\"))) {\r\n if (!first) {\r\n fields.append(\", \");\r\n values.append(\", \");\r\n } else {\r\n first = false;\r\n } \r\n fields.append(pds[i].getName());\r\n values.append(\"?\");\r\n paramCount++;\r\n }\r\n }\r\n } else {\r\n log.debug(\"Bean is a Map (\" + type.getClass().getName() + \"). Field count=\" + mapping.size()); \r\n boolean first = true;\r\n Iterator it = mapping.iterator();\r\n while (it.hasNext()) {\r\n Field fieldDef = (Field)it.next();\r\n if ((! fieldDef.getType().toLowerCase().equals(\"key\")) &&\r\n (fieldDef.getPattern() == null || fieldDef.getPattern().trim().equals(\"\"))) {\r\n if (!first) {\r\n fields.append(\", \");\r\n values.append(\", \");\r\n } else {\r\n first = false;\r\n } \r\n fields.append(fieldDef.getName());\r\n values.append(\"?\");\r\n paramCount++;\r\n } else {\r\n log.debug(\"Skipping \" + fieldDef.getName() + \"... pattern=\" + fieldDef.getPattern() + \r\n \" type=\" + fieldDef.getType());\r\n }\r\n }\r\n }\r\n sql.append(fields.toString());\r\n sql.append(\") values (\");\r\n sql.append(values.toString());\r\n sql.append(\") \");\r\n logCore.debug(\"Insert SQL: \" + sql.toString() + \" SQL paramCount: \" + paramCount);\r\n return sql.toString();\r\n } catch (Exception e) {\r\n throw new DataLayerException(\"Failed in getInsertSqlGeneric()\", e);\r\n }\r\n }",
"QueryType createQueryType();",
"public HashMap<String,HashSet<String>> loadTypes(String commonTypeInstanceFile) throws Exception;",
"public PostalCodeDataBase()\n {\n codeToCityMap = new HashMap<String, Set<String>>();\n // additional instance variable(s) to be initialized in part (b)\n }",
"@Override\r\n\tpublic List<LPMapdataDto> mapSelectType(String type) {\n\t\treturn sqlSession.selectList(\"days.map_SelectType\", type);\r\n\t}",
"private void addTables() {\r\n for (SQLTable table : getType().getTables()) {\r\n if (getExpr4Tables().get(table) == null) {\r\n getExpr4Tables().put(table, new HashMap<String,AttributeTypeInterface>());\r\n }\r\n }\r\n\r\n }",
"public void setId_types(HashMap<String, Integer> id_types) {\n this.id_types = id_types;\n }",
"private TypeMapper getTypeMapper() {\n\t\tif (JjsUtils.closureStyleLiteralsNeeded(this.options)) {\n\t\t\treturn new ClosureUniqueIdTypeMapper(jprogram);\n\t\t}\n\t\tif (this.options.useDetailedTypeIds()) {\n\t\t\treturn new StringTypeMapper(jprogram);\n\t\t}\n\t\treturn this.options.isIncrementalCompileEnabled()\n\t\t\t\t? compilerContext.getMinimalRebuildCache().getTypeMapper()\n\t\t\t\t: new IntTypeMapper();\n\t}",
"private List<Type> initPersistTypeList(JCas jc) {\r\n\t\tList<Type> pTypes = new ArrayList<Type>();\r\n\t\tTypeSystem typeSystem = jc.getTypeSystem();\r\n\t\tIterator typeIterator = typeSystem.getTypeIterator();\r\n\t\tType t;\r\n\t\twhile (typeIterator.hasNext()) {\r\n\t\t\tt = (Type) typeIterator.next();\r\n\t\t\tif (!t.getName().startsWith(\"uima.\")) {\r\n\t\t\t\tList<Feature> fts = t.getFeatures();\r\n\t\t\t\tif (t.getFeatureByBaseName(pTriggerFeature)!=null) {\r\n\t\t\t\t\tif (!t.getName().contains(\".en.\"))\r\n\t\t\t\t\t\tpTypes.add(t);\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn pTypes;\r\n\t}",
"private void setupPrimitiveTypes()\n {\n primitiveTypes.add(INTEGER_TYPE);\n primitiveTypes.add(FLOAT_TYPE);\n primitiveTypes.add(DOUBLE_TYPE);\n primitiveTypes.add(STRING_TYPE);\n primitiveTypes.add(BOOL_TYPE);\n primitiveTypes.add(TIMESTAMP_TYPE);\n }",
"@Override\n\tpublic Map<String, String> toSqlMap() {\n\t\treturn null;\n\t}",
"private OpenTypeFactory() {\n\t\tcompositeTypes = new ConcurrentHashMap<String, CompositeType>();\n\t\tsimpleTypes = new ConcurrentHashMap<String, SimpleType<?>>();\n\t\tarrayTypes = new ConcurrentHashMap<String, ArrayType<?>>();\n\t\ttabularTypes = new ConcurrentHashMap<String, TabularType>();\n\t\topenTypes = new ConcurrentHashMap<String, OpenType<?>>();\n\t\tmasterIndex = new ConcurrentHashMap<String, Map<String, ? extends OpenType<?>>>();\n\t\tmxBeanMappingFactory = MXBeanMappingFactory.DEFAULT;\n\t\t\n\t\t\n\t\ttry {\n\t\t\tfor(Field f: SimpleType.class.getDeclaredFields()) {\n\t\t\t\tif(!Modifier.isStatic(f.getModifiers())) continue;\n\t\t\t\tif(!f.getType().equals(SimpleType.class)) continue;\n\t\t\t\tSimpleType<?> ot = (SimpleType<?>)f.get(null);\n\t\t\t\tsimpleTypes.put(ot.getClassName(), ot);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tthrow new RuntimeException(\"Failed to initialize OpenTypeFactory OpenType Cache\", ex);\n\t\t}\n\t}",
"private String[] buildTypeRegistrations(String[] baseKeys, boolean noSQLrecurse) {\n\t\tClassLoaderService cls = registry.getService(ClassLoaderService.class);\n\t\tArrayList<String> keys = new ArrayList<>( baseKeys.length << 1 );\n\t\tfor ( String bk : baseKeys ) {\n\t\t\tString className;\n\t\t\tboolean addSQL = true;\n\t\t\ttry {\n\t\t\t\tClass c;\n\t\t\t\tswitch ( bk ) {\n\t\t\t\t\tcase \"boolean\":\n\t\t\t\t\t\tc = boolean.class;\n\t\t\t\t\t\tclassName = \"Z\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"byte\":\n\t\t\t\t\t\tc = byte.class;\n\t\t\t\t\t\tclassName = \"B\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"char\":\n\t\t\t\t\t\tc = char.class;\n\t\t\t\t\t\tclassName = \"C\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"double\":\n\t\t\t\t\t\tc = double.class;\n\t\t\t\t\t\tclassName = \"D\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"float\":\n\t\t\t\t\t\tc = float.class;\n\t\t\t\t\t\tclassName = \"F\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"int\":\n\t\t\t\t\t\tc = int.class;\n\t\t\t\t\t\tclassName = \"I\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"long\":\n\t\t\t\t\t\tc = long.class;\n\t\t\t\t\t\tclassName = \"J\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"short\":\n\t\t\t\t\t\tc = short.class;\n\t\t\t\t\t\tclassName = \"S\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// load to make sure it exists\n\t\t\t\t\t\tc = cls.classForName( bk );\n\t\t\t\t\t\tclassName = c.getName();\n\t\t\t\t\t\taddSQL = false;\n\t\t\t\t}\n\t\t\t\tif ( c.isPrimitive() ) {\n\t\t\t\t\t// disallow. \n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif ( c.isArray() ) {\n\t\t\t\t\tkeys.add( \"[\" + className );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tkeys.add( \"[L\" + className + \";\" );\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch ( ClassLoadingException ex ) {\n\t\t\t\t// just ignore. It means we won't be adding that key\n\t\t\t}\n\t\t\tif ( addSQL ) {\n\t\t\t\t// Not all type names given are Java classes, so assume the others are Database types\n\t\t\t\tif ( noSQLrecurse ) {\n\t\t\t\t\t// type is just \"basetype ARRAY\", never \"basetype ARRAY ARRAY ARRAY\"\n\t\t\t\t\tkeys.add( bk );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// PostgreSQL type names\n\t\t\t\t\tkeys.add( bk + \"[]\" );\n\t\t\t\t\t// standard SQL\n\t\t\t\t\tkeys.add( bk + \" ARRAY\" );\n\t\t\t\t\t// also possible\n\t\t\t\t\tkeys.add( bk + \" array\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn keys.toArray( new String[keys.size()] );\n\t}",
"void setInitSql(String value);",
"private List<DataTypeHandler<K1>> loadDataType(String typeStr, Context context) {\n // Do not load the type twice\n if (!typeMap.containsKey(typeStr)) {\n\n typeMap.put(typeStr, new ArrayList<>());\n\n long myInterval = context.getConfiguration().getLong(typeStr + \".\" + DISCARD_INTERVAL, interval);\n\n dataTypeDiscardIntervalCache.put(typeStr, myInterval);\n\n log.info(\"Setting up type: \" + typeStr + \" with interval \" + myInterval);\n\n if (!TypeRegistry.getTypeNames().contains(typeStr)) {\n log.warn(\"Attempted to load configuration for a type that does not exist in the registry: \" + typeStr);\n } else {\n Type t = TypeRegistry.getType(typeStr);\n String fieldValidators = context.getConfiguration().get(typeStr + FieldValidator.FIELD_VALIDATOR_NAMES);\n\n if (fieldValidators != null) {\n String[] validatorClasses = StringUtils.split(fieldValidators, \",\");\n for (String validatorClass : validatorClasses) {\n try {\n Class<? extends FieldValidator> clazz = Class.forName(validatorClass).asSubclass(FieldValidator.class);\n FieldValidator validator = clazz.newInstance();\n validator.init(t, context.getConfiguration());\n validators.put(typeStr, validator);\n } catch (ClassNotFoundException e) {\n log.error(\"Error finding validator \" + validatorClass, e);\n } catch (InstantiationException | IllegalAccessException e) {\n log.error(\"Error creating validator \" + validatorClass, e);\n }\n }\n }\n\n String[] handlerClassNames = t.getDefaultDataTypeHandlers();\n\n if (handlerClassNames != null) {\n for (String handlerClassName : handlerClassNames) {\n log.info(\"Configuring handler: \" + handlerClassName);\n try {\n @SuppressWarnings(\"unchecked\")\n Class<? extends DataTypeHandler<K1>> clazz = (Class<? extends DataTypeHandler<K1>>) Class.forName(handlerClassName);\n DataTypeHandler<K1> h = clazz.getDeclaredConstructor().newInstance();\n // Create a counter initialized to zero for all handler types.\n getCounter(context, IngestOutput.ROWS_CREATED.name(), h.getClass().getSimpleName()).increment(0);\n // Trick here. Set the data.name parameter to type T, then call setup on the DataTypeHandler\n Configuration clone = new Configuration(context.getConfiguration());\n clone.set(DataTypeHelper.Properties.DATA_NAME, t.typeName());\n // Use the StandaloneReporter and StandaloneTaskAttemptContext for the Handlers. Because the StandaloneTaskAttemptContext\n // is a subclass of TaskInputOutputContext and TaskAttemptContext is not. We are using this to record the counters during\n // processing. We will need to add the counters in the StandaloneReporter to the Map.Context in the close call.\n // TaskAttemptContext newContext = new TaskAttemptContext(clone, context.getTaskAttemptID());\n StandaloneTaskAttemptContext<K1,V1,K2,V2> newContext = new StandaloneTaskAttemptContext<>(clone, context.getTaskAttemptID(),\n reporter);\n h.setup(newContext);\n typeMap.get(typeStr).add(h);\n } catch (ClassNotFoundException e) {\n log.error(\"Error finding DataTypeHandler \" + handlerClassName, e);\n } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {\n log.error(\"Error creating DataTypeHandler \" + handlerClassName, e);\n }\n }\n }\n }\n log.info(\"EventMapper configured with the following handlers for \" + typeStr + \": \" + typeMap.get(typeStr));\n }\n\n return typeMap.get(typeStr);\n }",
"public void initMap()\r\n/* */ {\r\n///* 36 */ putHandler(\"vwkgcode\", PDWkHeadTailVWkgcodeHandler.class);\r\n///* 37 */ putHandler(\"fcapacitycalc\", PDWkHeadTailFcapacitycalcHandler.class);\r\n///* 38 */ putHandler(\"bprodline\", PDWkHeadTailBprodlineHandler.class);\r\n/* */ }",
"public void init(Object statementType,\r\n Object resultSet,\r\n Object name,\r\n Object orderByList,\r\n Object offset,\r\n Object fetchFirst,\r\n Object updateMode,\r\n Object updatableColumns) {\r\n init(resultSet);\r\n this.name = (String)name;\r\n this.statementType = (String)statementType;\r\n this.orderByList = (OrderByList)orderByList;\r\n this.offset = (ValueNode)offset;\r\n this.fetchFirst = (ValueNode)fetchFirst;\r\n this.updateMode = (UpdateMode)updateMode;\r\n this.updatableColumns = (List<String>)updatableColumns;\r\n }",
"CodeSetsType createCodeSetsType();",
"protected void createInitialTables() throws SQLException {\n\t\n\t\t// create one table per type with the corresponding attributes\n\t\tfor (String type: entityType2attributes.keySet()) {\n\t\t\tcreateTableForEntityType(type);\n\t\t}\n\t\t\n\t\t// TODO indexes !\n\t\t\n\t}",
"public BaseTypeIdImpl() {}",
"@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 Map<String, Integer> getColumnTypesForQuery(String query) {\n LOG.error(\"This database does not support free-form query column types.\");\n return null;\n }",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic void init() {\n\t\tif (allcode.isEmpty()) {\r\n\t\t\tCode code = new Code();\r\n\r\n\t\t\tList list = this.dynamicsqldao.findbyWhere(code, Code.class);\r\n\t\t\tif (list.isEmpty() == false) {\r\n\t\t\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\t\t\tcode = new Code();\r\n\t\t\t\t\tcode = (Code) list.get(i);\r\n\t\t\t\t\tString ckey = code.getCode();\r\n\t\t\t\t\tList codelist = this.dynamicsqldao\r\n\t\t\t\t\t\t\t.findbyWhere( code, Code.class);\r\n\t\t\t\t\tallcode.put(ckey, codelist);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private static void initializeLogicalAxiomSet() {\r\n\t\tfor (AxiomType<?> type : AXIOM_TYPES) {\r\n\t\t\tif (type.isLogical()) {\r\n\t\t\t\t//System.out.println(\"LOGICAL AXIOM: \" + type);\r\n\t\t\t\tif (m.containsKey(type)) {\r\n\t\t\t\t\tlogicalAxiomTypesHGDB.add(m.get(type)); \r\n\t\t\t\t} else {\r\n\t\t\t\t\t//not yet defined in initialize\r\n\t\t\t\t\tthrow new IllegalStateException(\"logical axiomtype not found in m.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Make unmodifiable after init.\r\n\t\tlogicalAxiomTypesHGDB = Collections.unmodifiableSet(logicalAxiomTypesHGDB);\r\n\t\t//System.out.println(\"LogicalAxiomTypesHGDB Initialized, size : \" + logicalAxiomTypesHGDB.size());\r\n\t}",
"private void generateCoreTypes() {\n\t\tvoidDt = new VoidDataType(progDataTypes);\n\t\tArrayList<TypeMap> typeList = new ArrayList<>();\n\t\ttypeList.add(new TypeMap(DataType.DEFAULT, \"undefined\", \"unknown\", false, false));\n\n\t\tfor (DataType dt : Undefined.getUndefinedDataTypes()) {\n\t\t\ttypeList.add(new TypeMap(displayLanguage, dt, \"unknown\", false, false));\n\t\t}\n\t\tfor (DataType dt : AbstractIntegerDataType.getSignedDataTypes(progDataTypes)) {\n\t\t\ttypeList.add(\n\t\t\t\tnew TypeMap(displayLanguage, dt.clone(progDataTypes), \"int\", false, false));\n\t\t}\n\t\tfor (DataType dt : AbstractIntegerDataType.getUnsignedDataTypes(progDataTypes)) {\n\t\t\ttypeList.add(\n\t\t\t\tnew TypeMap(displayLanguage, dt.clone(progDataTypes), \"uint\", false, false));\n\t\t}\n\t\tfor (DataType dt : AbstractFloatDataType.getFloatDataTypes(progDataTypes)) {\n\t\t\ttypeList.add(new TypeMap(displayLanguage, dt, \"float\", false, false));\n\t\t}\n\n\t\ttypeList.add(new TypeMap(DataType.DEFAULT, \"code\", \"code\", false, false));\n\n\t\t// Set \"char\" datatype\n\t\tDataType charDataType = new CharDataType(progDataTypes);\n\n\t\tString charMetatype = null;\n\t\tboolean isChar = false;\n\t\tboolean isUtf = false;\n\t\tif (charDataType instanceof CharDataType && ((CharDataType) charDataType).isSigned()) {\n\t\t\tcharMetatype = \"int\";\n\t\t}\n\t\telse {\n\t\t\tcharMetatype = \"uint\";\n\t\t}\n\t\tif (charDataType.getLength() == 1) {\n\t\t\tisChar = true;\n\t\t}\n\t\telse {\n\t\t\tisUtf = true;\n\t\t}\n\t\ttypeList.add(new TypeMap(displayLanguage, charDataType, charMetatype, isChar, isUtf));\n\n\t\t// Set up the \"wchar_t\" datatype\n\t\tWideCharDataType wideDataType = new WideCharDataType(progDataTypes);\n\t\ttypeList.add(new TypeMap(displayLanguage, wideDataType, \"int\", false, true));\n\n\t\tif (wideDataType.getLength() != 2) {\n\t\t\ttypeList.add(new TypeMap(displayLanguage, new WideChar16DataType(progDataTypes), \"int\",\n\t\t\t\tfalse, true));\n\t\t}\n\t\tif (wideDataType.getLength() != 4) {\n\t\t\ttypeList.add(new TypeMap(displayLanguage, new WideChar32DataType(progDataTypes), \"int\",\n\t\t\t\tfalse, true));\n\t\t}\n\n\t\tDataType boolDataType = new BooleanDataType(progDataTypes);\n\t\ttypeList.add(new TypeMap(displayLanguage, boolDataType, \"bool\", false, false));\n\n\t\tcoreBuiltin = new TypeMap[typeList.size()];\n\t\ttypeList.toArray(coreBuiltin);\n\t}",
"private static String mapStatementSetter(final FieldType.Type type) {\n switch (type) {\n case DATE:\n return \"setDate\";\n case INTEGER:\n return \"setInt\";\n case REAL:\n return \"setDouble\";\n case STRING:\n return \"setString\";\n default:\n return null;\n }\n }",
"private static HashMap<String, GLSLMatrixType> createMatrixTypes() {\n HashMap<String, GLSLMatrixType> matrixTypes = new HashMap<String, GLSLMatrixType>();\n for (int x = 2; x <= 4; x++) {\n for (int y = 2; y <= 4; y++) {\n GLSLMatrixType matrixType = new GLSLMatrixType(x, y);\n matrixTypes.put(matrixType.getTypename(), matrixType);\n if (y == x) {\n matrixTypes.put(\"mat\" + x, matrixType);\n }\n }\n }\n\n return matrixTypes;\n }",
"public void setMapTyp(String mapTyp) {\n\t\tthis.mapTyp = mapTyp;\n\t}",
"private void initPlayerTypes(){\n\t\tplayerModes = new HashMap <Piece, PlayerMode>();\n\t\tfor(Piece p: this.pieces) playerModes.put(p, PlayerMode.MANUAL);\n\t}",
"public static void loadPOTables(){\n\t\ttry {\n\t\t\tfor(TableInfo tableInfo:tables.values()){\n\t\t\t\tClass c = Class.forName(DBManager.getConfiguration().getPoPackage()+\".\"+StringUtils.firstCharUpperCase(tableInfo.getTname()));\n\t\t\t\tpoClassTableMap.put(c, tableInfo);\n\t\t\t}\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n public void init() {\n this.shapes = new DatabaseShape();\n }",
"private LinkedHashMap<String, Type> scalarMappingODU() {\r\n\t\tLinkedHashMap<String, Type> scalarMapping = new LinkedHashMap<String, Type>();\r\n\t\tscalarMapping.put(DaoConstants.MAP_ODUID, StandardBasicTypes.LONG); // 0\r\n\t\tscalarMapping.put(DaoConstants.MAP_SITE_GROUP,\r\n\t\t\t\tStandardBasicTypes.STRING); // 1\r\n\t\tscalarMapping.put(DaoConstants.MAP_PARENT_CHILD,\r\n\t\t\t\tStandardBasicTypes.STRING); // 2\r\n\t\tscalarMapping.put(DaoConstants.MAP_NAME, StandardBasicTypes.STRING); // 3\r\n\t\tscalarMapping.put(DaoConstants.MAP_CENTRAL_ADDRESS,\r\n\t\t\t\tStandardBasicTypes.STRING); // 4\r\n\t\tscalarMapping.put(DaoConstants.MAP_PARENT_ID, StandardBasicTypes.LONG); // 5\r\n\t\tscalarMapping.put(DaoConstants.MAP_TYPE, StandardBasicTypes.STRING); // 6\r\n\t\tscalarMapping.put(DaoConstants.MAP_SVGMAXLATITUDE,\r\n\t\t\t\tStandardBasicTypes.DOUBLE); // 7\r\n\t\tscalarMapping.put(DaoConstants.MAP_SVGMAXLONGITUDE,\r\n\t\t\t\tStandardBasicTypes.DOUBLE); // 8\r\n\t\tscalarMapping.put(DaoConstants.MAP_SVGMINLATITUDE,\r\n\t\t\t\tStandardBasicTypes.DOUBLE); // 9\r\n\t\tscalarMapping.put(DaoConstants.MAP_SVGMINLONGITUDE,\r\n\t\t\t\tStandardBasicTypes.DOUBLE); // 10\r\n\t\tscalarMapping.put(DaoConstants.MAP_ODU_SVG_PATH,\r\n\t\t\t\tStandardBasicTypes.STRING); // 11\r\n\t\tscalarMapping.put(DaoConstants.MAP_SEVERITY, StandardBasicTypes.STRING); // 12\r\n\t\tscalarMapping.put(DaoConstants.MAP_SLINKADD, StandardBasicTypes.STRING); // 13\r\n\t\tscalarMapping.put(DaoConstants.MAP_ALARM_CODE,\r\n\t\t\t\tStandardBasicTypes.STRING); // 14\r\n\t\tscalarMapping.put(DaoConstants.MAP_C2, StandardBasicTypes.DOUBLE); // 15\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Outdoor\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Temp\r\n\t\tscalarMapping\r\n\t\t\t\t.put(DaoConstants.MAP_THRESHOLD_1, StandardBasicTypes.LONG); // 16\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// CompressorWorkingHrs_1\r\n\t\tscalarMapping\r\n\t\t\t\t.put(DaoConstants.MAP_THRESHOLD_2, StandardBasicTypes.LONG); // 17\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// CompressorWorkingHrs_2\r\n\t\tscalarMapping\r\n\t\t\t\t.put(DaoConstants.MAP_THRESHOLD_3, StandardBasicTypes.LONG); // 18\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// CompressorWorkingHrs_3\r\n\t\tscalarMapping\r\n\t\t\t\t.put(DaoConstants.MAP_THRESHOLD_4, StandardBasicTypes.LONG); // 19\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// PAC\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// CompressorWorkingHrs\r\n\t\tscalarMapping\r\n\t\t\t\t.put(DaoConstants.MAP_THRESHOLD_5, StandardBasicTypes.LONG); // 20\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// EngineWorkingHrs\r\n\t\tscalarMapping\r\n\t\t\t\t.put(DaoConstants.MAP_THRESHOLD_6, StandardBasicTypes.LONG); // 21\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// NOT_IN_USE_EnginOilChange\r\n\t\tscalarMapping.put(DaoConstants.MAP_G44, StandardBasicTypes.STRING); // 22\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// GenerationPower\r\n\t\tscalarMapping.put(DaoConstants.MAP_SVGID, StandardBasicTypes.LONG); // 23\r\n\t\tscalarMapping.put(DaoConstants.MAP_SVGNAME, StandardBasicTypes.STRING); // 24\r\n\t\tscalarMapping.put(DaoConstants.MAP_VRFHRS1, StandardBasicTypes.DOUBLE); // 25\r\n\t\tscalarMapping.put(DaoConstants.MAP_VRFHRS2, StandardBasicTypes.DOUBLE); // 26\r\n\t\tscalarMapping.put(DaoConstants.MAP_VRFHRS3, StandardBasicTypes.DOUBLE); // 27\r\n\t\tscalarMapping.put(DaoConstants.MAP_PACHRS, StandardBasicTypes.DOUBLE); // 28\r\n\t\tscalarMapping.put(DaoConstants.MAP_GHPHRS, StandardBasicTypes.DOUBLE); // 29\r\n\t\tscalarMapping.put(DaoConstants.MAP_GHPOIL, StandardBasicTypes.DOUBLE); // 30\r\n\t\tscalarMapping.put(DaoConstants.MAP_SITEPATH, StandardBasicTypes.STRING); // 31\r\n\t\tscalarMapping.put(DaoConstants.MAP_COMPANYNAME,\r\n\t\t\t\tStandardBasicTypes.STRING); // 32\r\n\t\tscalarMapping.put(DaoConstants.MAP_CASTATUS, StandardBasicTypes.STRING); // 33\r\n\t\tscalarMapping.put(DaoConstants.MAP_V23, StandardBasicTypes.STRING); // 34\r\n\t\t// Demand\r\n\t\tscalarMapping.put(DaoConstants.MAP_COMPRESSOR1,\r\n\t\t\t\tStandardBasicTypes.BOOLEAN); // 35\r\n\t\tscalarMapping.put(DaoConstants.MAP_COMPRESSOR2,\r\n\t\t\t\tStandardBasicTypes.BOOLEAN); // 36\r\n\t\tscalarMapping.put(DaoConstants.MAP_COMPRESSOR3,\r\n\t\t\t\tStandardBasicTypes.BOOLEAN); // 37\r\n\t\t//add by shanf\r\n\t\tscalarMapping.put(DaoConstants.DEVICE_MODEL,\r\n\t\t\t\tStandardBasicTypes.STRING); // 38\r\n\r\n\t\treturn scalarMapping;\r\n\t}",
"protected String getLoadSql(String table,\r\n Class type,\r\n OrderedMap mapping,\r\n String whereClause) throws DataLayerException {\r\n StringBuffer sql = new StringBuffer(\"select \");\r\n PropertyDescriptor[] pds = null;\r\n boolean isaMap = false;\r\n \r\n try {\r\n isaMap = DatabaseDriver.isaMap(type); \r\n if (! isaMap) {\r\n // POJO\r\n pds = BeanUtils.getPropertyDescriptors(type, mapping);\r\n if (pds == null || pds.length == 0) {\r\n if (type == null) {\r\n throw new DataLayerException(\r\n \"Error creating Insert SQL. Bean Discriptors are missing. Type is NULL.\");\r\n } else {\r\n throw new DataLayerException(\r\n \"Error creating Insert SQL. Bean Discriptors are missing. Type = \"\r\n + type.getName());\r\n } \r\n }\r\n boolean first = true;\r\n for (int i = 0; i < pds.length; i++) {\r\n if (!first)\r\n sql.append(\", \");\r\n else\r\n first = false;\r\n sql.append(pds[i].getName());\r\n }\r\n } else {\r\n // Map\r\n boolean first = true;\r\n Iterator it = mapping.iterator();\r\n log.debug(\"Selecting columns:\");\r\n while (it.hasNext()) {\r\n Field field = (Field)it.next();\r\n if (StringUtils.isNullOrEmpty(field.getPattern())) {\r\n log.debug(\" \" + field.getName());\r\n if (! first)\r\n sql.append(\", \");\r\n else\r\n first = false;\r\n sql.append(field.getName());\r\n } \r\n }\r\n }\r\n\r\n sql.append(\" from \");\r\n sql.append(table);\r\n sql.append(\" \");\r\n sql.append(whereClause);\r\n return sql.toString();\r\n } catch (java.lang.Exception e) {\r\n throw new DataLayerException(\"Unable to generate SQL to load data from the database.\",\r\n e);\r\n }\r\n }",
"public static Map<String, Byte> genNameToTypeMap(){\n byte[] types = genAllTypes();\n String[] names = genAllTypeNames();\n Map<String, Byte> ret = new HashMap<String, Byte>();\n for(int i=0;i<types.length;i++){\n ret.put(names[i], types[i]);\n }\n return ret;\n }",
"@Override\n public void typeManagerInitialized(ITypeManager typeman) {\n\n // Note the design choice here: 32-byte address type is kept as a primitive (along with uint64 and bool, of course)\n // the other types will be managed via pointers (bytearray, string, struct, references)\n\n IPrimitiveTypeManager pman = typeman.getPrimitives();\n pman.addPrimitive(\"bool\", 8, PrimitiveCategory.UNSIGNED);\n pman.addPrimitive(\"u64\", 8, PrimitiveCategory.UNSIGNED);\n pman.addPrimitive(\"address\", 32, PrimitiveCategory.UNSIGNED);\n\n typeman.createAlias(\"byte\", typeman.getType(\"unsigned char\"));\n typeman.createAlias(\"bytearray\", typeman.getType(\"byte*\"));\n typeman.createAlias(\"string\", typeman.getType(\"byte*\"));\n }",
"public data_types(int data_type_id, String data_type_desc) {\n this.data_type_id = data_type_id;\n this.data_type_desc = data_type_desc;\n }",
"public interface MappingManager\r\n{\r\n public static final String METADATA_EXTENSION_INSERT_FUNCTION = \"insert-function\";\r\n public static final String METADATA_EXTENSION_UPDATE_FUNCTION = \"update-function\";\r\n public static final String METADATA_EXTENSION_SELECT_FUNCTION = \"select-function\";\r\n\r\n /**\r\n * Accessor for whether a java type is supported as being mappable.\r\n * @param javaTypeName The java type name\r\n * @return Whether the class is supported (to some degree)\r\n */\r\n boolean isSupportedMappedType(String javaTypeName);\r\n\r\n /**\r\n * Accessor for the JavaTypeMapping class for the supplied java type.\r\n * @param javaTypeName The java type name\r\n * @return The JavaTypeMapping class to use\r\n */\r\n Class<? extends JavaTypeMapping> getMappingType(String javaTypeName);\r\n\r\n /**\r\n * Method to create the column mapping for a java type mapping at a particular index.\r\n * @param mapping The java mapping\r\n * @param fmd MetaData for the field\r\n * @param index Index of the column\r\n * @param column The column\r\n * @return The column mapping\r\n */\r\n ColumnMapping createColumnMapping(JavaTypeMapping mapping, AbstractMemberMetaData fmd, int index, Column column);\r\n\r\n /**\r\n * Method to create the column mapping for a particular column and java type.\r\n * @param mapping The java mapping\r\n * @param column The column\r\n * @param javaType The java type (isn't this stored in the java mapping ?)\r\n * @return The column mapping\r\n */\r\n ColumnMapping createColumnMapping(JavaTypeMapping mapping, Column column, String javaType);\r\n\r\n /**\r\n * Accessor for a mapping, for a java type.\r\n * Same as calling \"getMapping(c, false, false, (String)null);\"\r\n * @param javaType The java type\r\n * @return The mapping\r\n */\r\n JavaTypeMapping getMapping(Class javaType);\r\n\r\n /**\r\n * Accessor for a mapping, for a java type.\r\n * @param javaType The java type\r\n * @param serialised Whether the type is serialised\r\n * @param embedded Whether the type is embedded\r\n * @param fieldName Name of the field (for logging only)\r\n * @return The mapping\r\n */\r\n JavaTypeMapping getMapping(Class javaType, boolean serialised, boolean embedded, String fieldName);\r\n\r\n /**\r\n * Accessor for a mapping, for a java type complete with the column mapping.\r\n * @param javaType The java type\r\n * @param serialised Whether the type is serialised\r\n * @param embedded Whether the type is embedded\r\n * @param clr ClassLoader resolver\r\n * @return The mapping\r\n */\r\n JavaTypeMapping getMappingWithColumnMapping(Class javaType, boolean serialised, boolean embedded, ClassLoaderResolver clr);\r\n\r\n /**\r\n * Accessor for the mapping for the field of the specified table.\r\n * Can be used for fields of a class, elements of a collection of a class, elements of an array of a class, keys of a map of a class, values of a map of a class. \r\n * This is controlled by the final argument \"roleForMember\".\r\n * @param table Table to add the mapping to\r\n * @param mmd MetaData for the field/property to map\r\n * @param clr The ClassLoaderResolver\r\n * @param fieldRole Role that this mapping plays for the field/property\r\n * @return The mapping for the field.\r\n */\r\n JavaTypeMapping getMapping(Table table, AbstractMemberMetaData mmd, ClassLoaderResolver clr, FieldRole fieldRole);\r\n\r\n /**\r\n * Method to create a column in a container (table).\r\n * @param mapping The java mapping\r\n * @param javaType The java type\r\n * @param datastoreFieldIndex The index of the column to create\r\n * @return The column\r\n */\r\n Column createColumn(JavaTypeMapping mapping, String javaType, int datastoreFieldIndex);\r\n\r\n /**\r\n * Method to create a column in a container (table).\r\n * To be used for serialised PC element/key/value in a join table.\r\n * @param mapping The java mapping\r\n * @param javaType The java type\r\n * @param colmd MetaData for the column to create\r\n * @return The column\r\n */\r\n Column createColumn(JavaTypeMapping mapping, String javaType, ColumnMetaData colmd);\r\n\r\n /**\r\n * Method to create a column for a persistable mapping.\r\n * @param fmd MetaData for the field\r\n * @param table Table in the datastore\r\n * @param mapping The java mapping\r\n * @param colmd MetaData for the column to create\r\n * @param referenceCol The column to reference\r\n * @param clr ClassLoader resolver\r\n * @return The column\r\n */\r\n Column createColumn(AbstractMemberMetaData fmd, Table table, JavaTypeMapping mapping, ColumnMetaData colmd, Column referenceCol, ClassLoaderResolver clr);\r\n}",
"public Rule mapType()\n \t{\n \t\treturn sequence(SQ_BRACKET_L, noNl(), nonSimpleMapTypes(), noNl(), SP_COL, noNl(), nonSimpleMapTypes(), noNl(), SQ_BRACKET_R);\n \t}",
"private static void mapDbAsstIDs()\r\n {\r\n if (dbIdMap == null) {\r\n dbIdMap = new HashMap<String, Integer>();\r\n dbIdMap.put(\"repair\", 1);\r\n dbIdMap.put(\"fuel\", 2);\r\n dbIdMap.put(\"tuition\", 3);\r\n dbIdMap.put(\"clothing\", 4);\r\n dbIdMap.put(\"registration\", 5);\r\n dbIdMap.put(\"utilities\", 21);\r\n }\r\n }",
"public interface DBTypeMapper {\n public String getDBTypeName(Field field);\n}",
"private static String mapType(final FieldType.Type type) {\n switch (type) {\n case DATE:\n return \"Date\";\n case INTEGER:\n return \"Integer\";\n case REAL:\n return \"Double\";\n case STRING:\n return \"String\";\n default:\n return null;\n }\n }",
"public static void initModule(Class<? extends DatabaseHolder> generatedClassName) {\n loadDatabaseHolder(generatedClassName);\n }",
"InsertType createInsertType();",
"public final native void setMapTypesRegistry(MapTypeRegistry mapTypes) /*-{\n this.mapTypes = mapTypes;\n }-*/;",
"@Override\n public DatabaseType getDatabaseType() {\n return mappings.getDatabaseType();\n }",
"private void init() {\n FieldWrapper id = new FieldWrapper();\n id.fieldDescription = new HashMap<String, Object>();\n id.fieldDescription.put(\"fullName\", \"Id\");\n id.fieldDescription.put(\"type\", \"Text\");\n\n FieldWrapper name = new FieldWrapper();\n name.fieldDescription = new HashMap<String, Object>();\n name.fieldDescription.put(\"fullName\", \"Name\");\n\n FieldWrapper createdBy = new FieldWrapper();\n createdBy.fieldDescription = new HashMap<String, Object>();\n createdBy.fieldDescription.put(\"fullName\", \"CreatedBy\");\n createdBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper lastModifiedBy = new FieldWrapper();\n lastModifiedBy.fieldDescription = new HashMap<String, Object>();\n lastModifiedBy.fieldDescription.put(\"fullName\", \"LastModifiedBy\");\n lastModifiedBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper owner = new FieldWrapper();\n owner.fieldDescription = new HashMap<String, Object>();\n owner.fieldDescription.put(\"fullName\", \"Owner\");\n owner.fieldDescription.put(\"type\", \"Lookup\");\n\n fieldDescribe = new HashMap<String, FieldWrapper>();\n\n fieldDescribe.put((String) id.fieldDescription.get(\"fullName\"), id);\n fieldDescribe.put((String) name.fieldDescription.get(\"fullName\"), name);\n fieldDescribe.put((String) createdBy.fieldDescription.get(\"fullName\"), createdBy);\n fieldDescribe.put((String) lastModifiedBy.fieldDescription.get(\"fullName\"), lastModifiedBy);\n fieldDescribe.put((String) owner.fieldDescription.get(\"fullName\"), owner);\n }",
"private TypeDb createTypeInstance(long id, String nameEn) {\n TypeDb typeDb = new TypeDb();\n typeDb.setId(id);\n typeDb.setTypeNameEn(nameEn);\n typeDb.setTypeNameRu(new TypeMapper().toRu(nameEn));\n return typeDb;\n }",
"public ContentDaoImp(String content_type){\r\n\t\tsetTbl_name(content_type);\r\n\t}",
"Map<ParameterInstance, SetType> getInstanceSetTypes();",
"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}",
"void setDataType(int type );",
"@Override\r\n\tpublic boolean supportsDb(String type) {\r\n \treturn true;\r\n }",
"public int getJdbcType();",
"public TypeData getTypeData(MigrationType type);",
"public void setPreparedStatementType(Class<? extends PreparedStatement> preparedStatementType)\r\n/* 30: */ {\r\n/* 31: 78 */ this.preparedStatementType = preparedStatementType;\r\n/* 32: */ }",
"DatatypesType createDatatypesType();",
"String getSQLTypeName() throws SQLException;",
"public interface Sqlable {\n\n Map<String, Object> getSqlMap();\n\n String getTableName();\n\n}",
"public FlexData(Type type) {\n entryCollectionList = null;\n entryCollectionMap = null;\n this.type = type;\t\t\n standardDateFormat = \"yyyy-MM-dd\"; // DB2-Datum\n\t}",
"private static void initNumberTypeList()\n\t{\n\t\tfor(String numberType : NUMBER_TYPE_ARRAY)\n\t\t{\n\t\t\tnumberTypeList.add(numberType);\n\t\t}\n\t\tlogger.info(\" --|*|-- Number types are initialized! --|*|--\");\n\t}"
] | [
"0.7139734",
"0.7118448",
"0.69040334",
"0.6892424",
"0.6686532",
"0.65875167",
"0.6248621",
"0.6214681",
"0.61792624",
"0.6104074",
"0.60826325",
"0.59024686",
"0.58910173",
"0.5814971",
"0.5808944",
"0.5807305",
"0.575232",
"0.5707268",
"0.5697289",
"0.56516385",
"0.562771",
"0.55881387",
"0.5573999",
"0.5562267",
"0.55555546",
"0.55510706",
"0.554967",
"0.55421937",
"0.5533787",
"0.5527393",
"0.552373",
"0.5512421",
"0.5499824",
"0.54911506",
"0.54854935",
"0.54693514",
"0.54602957",
"0.54462427",
"0.5439584",
"0.54384184",
"0.54374766",
"0.54360366",
"0.54201084",
"0.5420088",
"0.5418188",
"0.5414801",
"0.54077953",
"0.5403255",
"0.539034",
"0.53834236",
"0.536973",
"0.53597164",
"0.5356883",
"0.53344995",
"0.53015655",
"0.52972263",
"0.5292248",
"0.5278881",
"0.5266926",
"0.52642477",
"0.52376366",
"0.5236103",
"0.52323097",
"0.5227339",
"0.52255803",
"0.52198863",
"0.5218439",
"0.5203159",
"0.5191562",
"0.51906246",
"0.51904416",
"0.5190249",
"0.5189149",
"0.5183314",
"0.51692086",
"0.51687694",
"0.516336",
"0.5139414",
"0.5131067",
"0.5128155",
"0.51262784",
"0.5117747",
"0.5116327",
"0.51090646",
"0.5106765",
"0.5099959",
"0.5097751",
"0.50911397",
"0.5090196",
"0.50896156",
"0.5077201",
"0.5072949",
"0.50615954",
"0.50610906",
"0.505478",
"0.5049801",
"0.5046716",
"0.504306",
"0.5039819",
"0.5037251"
] | 0.831517 | 0 |
Init the java type map | private void initJavaType() { // FIXME move this logic to core module
if (javaTypeMap == null) {
javaTypeMap = new TreeMap<String, List<String>>();
}
if (!javaTypeMap.containsKey("1")) {
List<String> list = new ArrayList<String>();
list.add("java.lang.String");
list.add("java.sql.Date");
list.add("java.sql.Time");
list.add("java.sql.Timestamp");
list.add("java.lang.Byte");
list.add("java.lang.Short");
list.add("java.lang.Integer");
list.add("java.lang.Long");
list.add("java.lang.Float");
list.add("java.lang.Double");
list.add("java.math.BigDecimal");
list.add("byte");
list.add("short");
list.add("int");
list.add("long");
list.add("float");
list.add("double");
javaTypeMap.put("1", list);
}
if (!javaTypeMap.containsKey("2")) {
List<String> list = new ArrayList<String>();
list.add("java.lang.Byte");
list.add("java.lang.Short");
list.add("java.lang.Integer");
list.add("java.lang.Long");
list.add("java.lang.Float");
list.add("java.lang.Double");
list.add("java.math.BigDecimal");
list.add("java.lang.String");
list.add("byte");
list.add("short");
list.add("int");
list.add("long");
list.add("float");
list.add("double");
javaTypeMap.put("2", list);
}
if (!javaTypeMap.containsKey("3")) {
List<String> list = new ArrayList<String>();
list.add("java.sql.Date");
list.add("java.sql.Time");
list.add("java.sql.Timestamp");
list.add("java.lang.String");
javaTypeMap.put("3", list);
}
if (!javaTypeMap.containsKey("4")) {
List<String> list = new ArrayList<String>();
javaTypeMap.put("4", list);
}
if (!javaTypeMap.containsKey("5")) {
List<String> list = new ArrayList<String>();
if (database != null) {
String jdbcVersion = database.getDatabase().getServer().getJdbcDriverVersion();
if (isAfterJdbc111(jdbcVersion)) {
list.add("cubrid.sql.CUBRIDOIDImpl");
} else {
list.add("cubrid.sql.CUBRIDOID");
}
} else {
list.add("cubrid.sql.CUBRIDOID");
}
javaTypeMap.put("5", list);
}
if (!javaTypeMap.containsKey("6")) {
List<String> list = new ArrayList<String>();
list.add("cubrid.jdbc.driver.CUBRIDResultSet");
javaTypeMap.put("6", list);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void createTypeMap() {\n\n }",
"private static HashMap<String, String> initMapping()\n {\n HashMap<String, String> typeMapping = new HashMap<String, String>();\n\n typeMapping.put(\"boolean\", \"boolean\");\n typeMapping.put(\"float\", \"float\");\n typeMapping.put(\"double\", \"double\");\n typeMapping.put(\"byte\", \"byte\");\n typeMapping.put(\"unsignedByte\", \"short\");\n typeMapping.put(\"short\", \"short\");\n typeMapping.put(\"unsignedShort\", \"int\");\n typeMapping.put(\"int\", \"int\");\n typeMapping.put(\"integer\", \"java.math.BigDecimal\");\n typeMapping.put(\"positiveInteger\", \"java.math.BigInteger\");\n typeMapping.put(\"unsignedInt\", \"java.math.BigInteger\");\n typeMapping.put(\"long\", \"java.math.BigInteger\");\n typeMapping.put(\"unsignedLong\", \"java.math.BigDecimal\");\n typeMapping.put(\"decimal\", \"java.math.BigDecimal\");\n typeMapping.put(\"string\", \"String\");\n typeMapping.put(\"hexBinary\", \"byte[]\");\n typeMapping.put(\"base64Binary\", \"byte[]\");\n typeMapping.put(\"dateTime\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"time\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"date\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gDay\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gMonth\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gMonthDay\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gYear\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gYearMonth\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"duration\", \"javax.xml.datatype.Duration\");\n typeMapping.put(\"NOTATION\", \"javax.xml.namespace.QName\");\n typeMapping.put(\"QName\", \"javax.xml.namespace.QName\");\n typeMapping.put(\"anyURI\", \"String\");\n typeMapping.put(\"Name\", \"String\");\n typeMapping.put(\"NCName\", \"String\");\n typeMapping.put(\"negativeInteger\", \"java.math.BigDecimal\");\n typeMapping.put(\"NMTOKEN\", \"String\");\n typeMapping.put(\"nonNegativeInteger\", \"java.math.BigDecimal\");\n typeMapping.put(\"nonPositiveInteger\", \"java.math.BigDecimal\");\n typeMapping.put(\"normalizedString\", \"String\");\n typeMapping.put(\"token\", \"String\");\n typeMapping.put(\"any\", \"Object\");\n\n return typeMapping;\n }",
"Hashtable createTypeMapping()\n {\n Hashtable mapping = new Hashtable();\n \n mapping.put(TypeFactory.getType(\"Double\"), \n new ParameterFactory() \n {\n public Parameter getParameter(Object o) \n {\n StratmasDecimal sObj = (StratmasDecimal) o;\n if (isBadDecimal(sObj)) {\n return null;\n } else {\n return new StratmasDecimalParameter((StratmasDecimal) o);\n }\n }\n });\n mapping.put(TypeFactory.getType(\"double\", \"http://www.w3.org/2001/XMLSchema\"), \n new ParameterFactory() \n {\n public Parameter getParameter(Object o) \n {\n StratmasDecimal sObj = (StratmasDecimal) o;\n if (isBadDecimal(sObj)) {\n return null;\n } else {\n return new StratmasDecimalParameter((StratmasDecimal) o);\n }\n }\n });\n mapping.put(TypeFactory.getType(\"NonNegativeInteger\"), \n new ParameterFactory() \n {\n public Parameter getParameter(Object o) \n {\n return new StratmasIntegerParameter((StratmasInteger) o);\n }\n });\n // Ground type type hiearchy.\n mapping.put(TypeFactory.getType(\"anyType\", \"http://www.w3.org/2001/XMLSchema\"), \n new ParameterFactory() \n {\n public Parameter getParameter(Object o) \n {\n return null;\n }\n });\n\n return mapping;\n }",
"public HashMap<String,HashSet<String>> loadTypes(String commonTypeInstanceFile) throws Exception;",
"public AbstractTypeMapping()\n {\n super();\n }",
"private void initSqlTypeMap() {\n\t\tif (sqlTypeMap == null) {\n\t\t\tsqlTypeMap = new TreeMap<String, String>();\n\t\t}\n\t\tsqlTypeMap.put(\"--void--\", \"0\");\n\t\tFieldHandlerUtils.initSqlTypeMap(sqlTypeMap);\n\t}",
"void setTypeMapper (TypeMapper typeMapper);",
"@Override\r\n\t\tpublic void setTypeMap(Map<String, Class<?>> map) throws SQLException {\n\t\t\t\r\n\t\t}",
"public static void init() {\r\n\r\n types = new HashMap();\r\n ConnectionManager manager = ConnectionManager.getInstance();\r\n DatabaseConnection con = manager.get();\r\n\r\n String str = \"select ChWord ,ChWordSpell from PtWordSpell\";\r\n try\r\n {\r\n RecordSet rs = con.executeQuery(str);\r\n \r\n while (rs.next()) {\r\n String PolyChWord = rs.getString(\"ChWord\");\r\n String enuDesc = rs.getString(\"ChWordSpell\");\r\n \r\n types.put(PolyChWord, enuDesc);\r\n \r\n }\r\n rs.close();\r\n }catch(Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n\r\n \r\n manager.release();\r\n\r\n\r\n }",
"@Override\r\n\t\tpublic Map<String, Class<?>> getTypeMap() throws SQLException {\n\t\t\treturn null;\r\n\t\t}",
"protected void init ()\n {\n holderClass = entry.name () + \"Holder\";\n helperClass = Util.helperName (entry, true); // <d61056>\n if (entry instanceof ValueBoxEntry)\n {\n ValueBoxEntry v = (ValueBoxEntry) entry;\n TypedefEntry member = ((InterfaceState) v.state ().elementAt (0)).entry;\n SymtabEntry mType = member.type ();\n holderType = Util.javaName (mType);\n }\n else\n holderType = Util.javaName (entry);\n }",
"private JdbcTypeRegistry() {\n }",
"@Override\n\tpublic void registerPrimaryTypes() {\n\t\tobjectType = registerJavaType(getBuilder().getName(), ClassType.CLASS);\n\t}",
"private void setupPrimitiveTypes()\n {\n primitiveTypes.add(INTEGER_TYPE);\n primitiveTypes.add(FLOAT_TYPE);\n primitiveTypes.add(DOUBLE_TYPE);\n primitiveTypes.add(STRING_TYPE);\n primitiveTypes.add(BOOL_TYPE);\n primitiveTypes.add(TIMESTAMP_TYPE);\n }",
"public HashMap<String,HashSet<String>> loadTypes(String typeFromO1, String typeFromO2) throws Exception;",
"private TypeMapper getTypeMapper() {\n\t\tif (JjsUtils.closureStyleLiteralsNeeded(this.options)) {\n\t\t\treturn new ClosureUniqueIdTypeMapper(jprogram);\n\t\t}\n\t\tif (this.options.useDetailedTypeIds()) {\n\t\t\treturn new StringTypeMapper(jprogram);\n\t\t}\n\t\treturn this.options.isIncrementalCompileEnabled()\n\t\t\t\t? compilerContext.getMinimalRebuildCache().getTypeMapper()\n\t\t\t\t: new IntTypeMapper();\n\t}",
"public Factory() {\n\t\tclassMap = new TreeMap<String,Class<T> >();\n\t}",
"private void fillEmbeddedTypes() {\n List<String> otherClassesNames = new ArrayList<>(PRIMITIVE_TYPES);\n otherClassesNames.add(\"[]\");\n otherClassesNames.add(\"...\");\n\n List<TypeConstructor> otherClasses = new ArrayList<>();\n for (String type : otherClassesNames) {\n Classifier classifier = new Classifier(type, Language.JAVA, \"\", null, new ArrayList<MemberEntity>(), \"\");\n otherClasses.add(classifier);\n QualifiedName name = new QualifiedName(OTHER_PACKAGE, type);\n classes.put(name, classifier);\n parameters.put(name, new ParametersDescription());\n superTypes.put(name, new ArrayList<JavaType>());\n createClassMaps(name);\n }\n\n PackageEntity otherPackage = new PackageEntity(OTHER_PACKAGE, Language.JAVA, otherClasses,\n new ArrayList<MemberEntity>(), new ArrayList<PackageEntity>(), \"\", null);\n packages.put(OTHER_PACKAGE, otherPackage);\n\n for (TypeConstructor otherClass : otherClasses) {\n otherClass.setContainingPackage(otherPackage);\n }\n }",
"public ClassRegistry() {\n this.classMap.putAll(CLASS_MAP);\n this.conversionMap.putAll(CONVERSION_MAP);\n conversionMap.put(\"key->new\",defaultSupplier);\n conversionMap.put(\"new\",typeName->defaultSupplier.apply(typeName));\n }",
"public final native void setMapTypesRegistry(MapTypeRegistry mapTypes) /*-{\n this.mapTypes = mapTypes;\n }-*/;",
"public void initMap()\r\n/* */ {\r\n///* 36 */ putHandler(\"vwkgcode\", PDWkHeadTailVWkgcodeHandler.class);\r\n///* 37 */ putHandler(\"fcapacitycalc\", PDWkHeadTailFcapacitycalcHandler.class);\r\n///* 38 */ putHandler(\"bprodline\", PDWkHeadTailBprodlineHandler.class);\r\n/* */ }",
"private OpenTypeFactory() {\n\t\tcompositeTypes = new ConcurrentHashMap<String, CompositeType>();\n\t\tsimpleTypes = new ConcurrentHashMap<String, SimpleType<?>>();\n\t\tarrayTypes = new ConcurrentHashMap<String, ArrayType<?>>();\n\t\ttabularTypes = new ConcurrentHashMap<String, TabularType>();\n\t\topenTypes = new ConcurrentHashMap<String, OpenType<?>>();\n\t\tmasterIndex = new ConcurrentHashMap<String, Map<String, ? extends OpenType<?>>>();\n\t\tmxBeanMappingFactory = MXBeanMappingFactory.DEFAULT;\n\t\t\n\t\t\n\t\ttry {\n\t\t\tfor(Field f: SimpleType.class.getDeclaredFields()) {\n\t\t\t\tif(!Modifier.isStatic(f.getModifiers())) continue;\n\t\t\t\tif(!f.getType().equals(SimpleType.class)) continue;\n\t\t\t\tSimpleType<?> ot = (SimpleType<?>)f.get(null);\n\t\t\t\tsimpleTypes.put(ot.getClassName(), ot);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tthrow new RuntimeException(\"Failed to initialize OpenTypeFactory OpenType Cache\", ex);\n\t\t}\n\t}",
"private static native void initCachedClassMap();",
"private JavaType(String name) {\n this.name = name;\n }",
"public TypeUtils() {\n\t}",
"public ClassTypeManagerImpl(JNIEasyImpl jniEasy)\n {\n this.jniEasy = jniEasy;\n this.classTypeFinder = new ClassTypeFinder(this);\n \n ClassTypeNativeImpl.registerAllClassTypes(this); // He calculado que tarda algo más de un segundo, pero yo creo que vale la pena\n }",
"public TypeMap(DecompilerLanguage lang, DataType d, String meta, boolean isChar,\n\t\t\t\tboolean isUtf) {\n\t\t\tdt = d;\n\t\t\tif (d instanceof BuiltIn) {\n\t\t\t\tname = ((BuiltIn) d).getDecompilerDisplayName(lang);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tname = d.getName();\n\t\t\t}\n\t\t\tmetatype = meta;\n\t\t\tthis.isChar = isChar;\n\t\t\tthis.isUtf = isUtf;\n\t\t\tid = hashName(name);\n\t\t}",
"Type() {\n }",
"public static Map<String, Byte> genNameToTypeMap(){\n byte[] types = genAllTypes();\n String[] names = genAllTypeNames();\n Map<String, Byte> ret = new HashMap<String, Byte>();\n for(int i=0;i<types.length;i++){\n ret.put(names[i], types[i]);\n }\n return ret;\n }",
"public static Map<Byte, String> genTypeToNameMap(){\n byte[] types = genAllTypes();\n String[] names = genAllTypeNames();\n Map<Byte,String> ret = new HashMap<Byte, String>();\n for(int i=0;i<types.length;i++){\n ret.put(types[i], names[i]);\n }\n return ret;\n }",
"public void setMapType(int type) {\n if(internalNative != null) {\n internalNative.setMapType(type);\n }\n }",
"public BaseTypeIdImpl() {}",
"TypeInitializer getTypeInitializer();",
"private static void initializeMap() {\n\t\tmap = new HashMap<String, MimeTransferEncoding>();\n\t\tfor (MimeTransferEncoding mte : MimeTransferEncoding.values()) {\n\t\t\tmap.put(mte.string, mte);\n\t\t}\n\t}",
"DefaultTypeParser()\r\n {\r\n importPackageNames.add(\"\");\r\n importPackageNames.add(\"java.lang.\");\r\n }",
"private static void initializeMap() {\n addressTypeToSerializerMap = new HashMap<>();\n addressTypeToSerializerMap.put(NoAddressAfi.VALUE, NoAddressSerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv4Afi.VALUE, Ipv4Serializer.getInstance());\n addressTypeToSerializerMap.put(Ipv4BinaryAfi.VALUE, Ipv4BinarySerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv4PrefixAfi.VALUE, Ipv4PrefixSerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv4PrefixBinaryAfi.VALUE, Ipv4PrefixBinarySerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv6Afi.VALUE, Ipv6Serializer.getInstance());\n addressTypeToSerializerMap.put(Ipv6BinaryAfi.VALUE, Ipv6BinarySerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv6PrefixAfi.VALUE, Ipv6PrefixSerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv6PrefixBinaryAfi.VALUE, Ipv6PrefixBinarySerializer.getInstance());\n addressTypeToSerializerMap.put(MacAfi.VALUE, MacSerializer.getInstance());\n addressTypeToSerializerMap.put(DistinguishedNameAfi.VALUE, DistinguishedNameSerializer.getInstance());\n addressTypeToSerializerMap.put(Lcaf.VALUE, LcafSerializer.getInstance());\n addressTypeToSerializerMap.put(AfiListLcaf.VALUE, AfiListSerializer.getInstance());\n addressTypeToSerializerMap.put(InstanceIdLcaf.VALUE, InstanceIdSerializer.getInstance());\n addressTypeToSerializerMap.put(ApplicationDataLcaf.VALUE, ApplicationDataSerializer.getInstance());\n addressTypeToSerializerMap.put(ExplicitLocatorPathLcaf.VALUE, ExplicitLocatorPathSerializer.getInstance());\n addressTypeToSerializerMap.put(SourceDestKeyLcaf.VALUE, SourceDestKeySerializer.getInstance());\n addressTypeToSerializerMap.put(KeyValueAddressLcaf.VALUE, KeyValueAddressSerializer.getInstance());\n addressTypeToSerializerMap.put(ServicePathLcaf.VALUE, ServicePathSerializer.getInstance());\n }",
"public JavafxTypesFactoryImpl() {\n\t\tsuper();\n\t}",
"public static JavafxTypesFactory init() {\n\t\ttry {\n\t\t\tJavafxTypesFactory theJavafxTypesFactory = (JavafxTypesFactory)EPackage.Registry.INSTANCE.getEFactory(JavafxTypesPackage.eNS_URI);\n\t\t\tif (theJavafxTypesFactory != null) {\n\t\t\t\treturn theJavafxTypesFactory;\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 JavafxTypesFactoryImpl();\n\t}",
"private void buildMap(int count, char type, String typeName) {\r\n\t\tfor (int i = 1; i <= count; i++) {\r\n\t\t\toriginalMaps.add(new MapType(\"map_\" + type + i, typeName, \"colony/map_\" + type + i));\r\n\t\t}\r\n\t}",
"public DescriptorCacheImpl() {\n super();\n \n LOG2.debug(\"New instance!\");\n \n _typeMap = new HashMap();\n _xmlNameMap = new HashMap();\n _missingTypes = new ArrayList();\n }",
"public TypeManager()\n {\n\tlistModel = new DefaultListModel();\n\tallTypes = new Vector();\n setupPrimitiveTypes();\n }",
"Class<? extends JavaTypeMapping> getMappingType(String javaTypeName);",
"public Hashtable getTypeMapping()\n {\n return this.typeMapping;\n }",
"private List<Type> initPersistTypeList(JCas jc) {\r\n\t\tList<Type> pTypes = new ArrayList<Type>();\r\n\t\tTypeSystem typeSystem = jc.getTypeSystem();\r\n\t\tIterator typeIterator = typeSystem.getTypeIterator();\r\n\t\tType t;\r\n\t\twhile (typeIterator.hasNext()) {\r\n\t\t\tt = (Type) typeIterator.next();\r\n\t\t\tif (!t.getName().startsWith(\"uima.\")) {\r\n\t\t\t\tList<Feature> fts = t.getFeatures();\r\n\t\t\t\tif (t.getFeatureByBaseName(pTriggerFeature)!=null) {\r\n\t\t\t\t\tif (!t.getName().contains(\".en.\"))\r\n\t\t\t\t\t\tpTypes.add(t);\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn pTypes;\r\n\t}",
"private void registerTypes(ITypeManager typeManager) {\n\t\ttypeManager.registerType(BsonString.class, StdTypeManagerPlugin.STRING_NATURE);\n\t\ttypeManager.registerType(BsonInt32.class, StdTypeManagerPlugin.INTEGER_NATURE);\n\t\ttypeManager.registerType(BsonInt64.class, StdTypeManagerPlugin.INTEGER_NATURE);\n\t\ttypeManager.registerType(BsonDouble.class, StdTypeManagerPlugin.DECIMAL_NATURE);\n\t\ttypeManager.registerType(BsonNumber.class, StdTypeManagerPlugin.DECIMAL_NATURE);\n\t\ttypeManager.registerType(BsonDateTime.class, StdTypeManagerPlugin.DATETIME_NATURE);\n\t\ttypeManager.registerType(BsonBoolean.class, StdTypeManagerPlugin.BOOLEAN_NATURE);\n\t\ttypeManager.registerType(BsonBinary.class, StdTypeManagerPlugin.BINARY_NATURE);\n\t\ttypeManager.registerType(BsonDocument.class, StdTypeManagerPlugin.COMPOSITE_NATURE);\n\t}",
"private static void initDataTypeList()\n\t{\n\t\tfor(String numberType : DATA_TYPE_ARRAY)\n\t\t{\n\t\t\tdataTypeList.add(numberType);\n\t\t}\n\t\tlogger.info(\" --|*|-- All Data types are initialized! --|*|--\");\n\t}",
"@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 }",
"@Override\n public void typeManagerInitialized(ITypeManager typeman) {\n\n // Note the design choice here: 32-byte address type is kept as a primitive (along with uint64 and bool, of course)\n // the other types will be managed via pointers (bytearray, string, struct, references)\n\n IPrimitiveTypeManager pman = typeman.getPrimitives();\n pman.addPrimitive(\"bool\", 8, PrimitiveCategory.UNSIGNED);\n pman.addPrimitive(\"u64\", 8, PrimitiveCategory.UNSIGNED);\n pman.addPrimitive(\"address\", 32, PrimitiveCategory.UNSIGNED);\n\n typeman.createAlias(\"byte\", typeman.getType(\"unsigned char\"));\n typeman.createAlias(\"bytearray\", typeman.getType(\"byte*\"));\n typeman.createAlias(\"string\", typeman.getType(\"byte*\"));\n }",
"private void generateCoreTypes() {\n\t\tvoidDt = new VoidDataType(progDataTypes);\n\t\tArrayList<TypeMap> typeList = new ArrayList<>();\n\t\ttypeList.add(new TypeMap(DataType.DEFAULT, \"undefined\", \"unknown\", false, false));\n\n\t\tfor (DataType dt : Undefined.getUndefinedDataTypes()) {\n\t\t\ttypeList.add(new TypeMap(displayLanguage, dt, \"unknown\", false, false));\n\t\t}\n\t\tfor (DataType dt : AbstractIntegerDataType.getSignedDataTypes(progDataTypes)) {\n\t\t\ttypeList.add(\n\t\t\t\tnew TypeMap(displayLanguage, dt.clone(progDataTypes), \"int\", false, false));\n\t\t}\n\t\tfor (DataType dt : AbstractIntegerDataType.getUnsignedDataTypes(progDataTypes)) {\n\t\t\ttypeList.add(\n\t\t\t\tnew TypeMap(displayLanguage, dt.clone(progDataTypes), \"uint\", false, false));\n\t\t}\n\t\tfor (DataType dt : AbstractFloatDataType.getFloatDataTypes(progDataTypes)) {\n\t\t\ttypeList.add(new TypeMap(displayLanguage, dt, \"float\", false, false));\n\t\t}\n\n\t\ttypeList.add(new TypeMap(DataType.DEFAULT, \"code\", \"code\", false, false));\n\n\t\t// Set \"char\" datatype\n\t\tDataType charDataType = new CharDataType(progDataTypes);\n\n\t\tString charMetatype = null;\n\t\tboolean isChar = false;\n\t\tboolean isUtf = false;\n\t\tif (charDataType instanceof CharDataType && ((CharDataType) charDataType).isSigned()) {\n\t\t\tcharMetatype = \"int\";\n\t\t}\n\t\telse {\n\t\t\tcharMetatype = \"uint\";\n\t\t}\n\t\tif (charDataType.getLength() == 1) {\n\t\t\tisChar = true;\n\t\t}\n\t\telse {\n\t\t\tisUtf = true;\n\t\t}\n\t\ttypeList.add(new TypeMap(displayLanguage, charDataType, charMetatype, isChar, isUtf));\n\n\t\t// Set up the \"wchar_t\" datatype\n\t\tWideCharDataType wideDataType = new WideCharDataType(progDataTypes);\n\t\ttypeList.add(new TypeMap(displayLanguage, wideDataType, \"int\", false, true));\n\n\t\tif (wideDataType.getLength() != 2) {\n\t\t\ttypeList.add(new TypeMap(displayLanguage, new WideChar16DataType(progDataTypes), \"int\",\n\t\t\t\tfalse, true));\n\t\t}\n\t\tif (wideDataType.getLength() != 4) {\n\t\t\ttypeList.add(new TypeMap(displayLanguage, new WideChar32DataType(progDataTypes), \"int\",\n\t\t\t\tfalse, true));\n\t\t}\n\n\t\tDataType boolDataType = new BooleanDataType(progDataTypes);\n\t\ttypeList.add(new TypeMap(displayLanguage, boolDataType, \"bool\", false, false));\n\n\t\tcoreBuiltin = new TypeMap[typeList.size()];\n\t\ttypeList.toArray(coreBuiltin);\n\t}",
"Map<Class<?>, Object> yangAugmentedInfoMap();",
"Map<Class<?>, Object> yangAugmentedInfoMap();",
"public TypeMappingRegistry getTypeMappingRegistry() {\n\t\treturn null;\n\t}",
"void setForPersistentMapping_Type(Type type) {\n this.type = type;\n }",
"public static synchronized void putAll(Map<? extends Class<?>, ? extends String> map) {\n\t\tfor (Class<?> entry : ClassRegistry.primitives.keySet()){\n\t\t\tif (map.containsKey(entry))\n\t\t\t\tthrow new IllegalArgumentException(\"A primitive type cannot be added to the class dictionary.\");\n\t\t}\n\t\tClassRegistry.dictionary.putAll(map);\n\t}",
"public static void set_Type(String s, String v) throws RuntimeException\n {\n read_if_needed_();\n UmlCom.send_cmd(CmdFamily.javaSettingsCmd, JavaSettingsCmd._setJavaTypeCmd, s, v);\n UmlCom.check();\n \n UmlBuiltin b = (UmlBuiltin) UmlSettings._map_builtins.get(s);\n \n if (b == null)\n b = UmlSettings.add_type(s);\n b.java = v;\n }",
"CodeSetsType createCodeSetsType();",
"InfiniteMap<K,V> build(MapTypes type);",
"private JavaType(Class<?> clazz) {\n this.clazz = clazz;\n }",
"public CanvasCriteriaTypeMap()\r\n\t{\r\n\r\n\t}",
"public EncodingMap() {}",
"static Map instanceOfMap(int typeMap)\n {\n if(instanceOfMap==null)\n instanceOfMap = new Map(typeMap);\n return instanceOfMap;\n }",
"public AnnotatedTypeBuilder() {\n\t\ttypeAnnotations = new AnnotationBuilder();\n\t\tconstructors = new HashMap<Constructor<?>, AnnotationBuilder>();\n\t\tconstructorParameters = new HashMap<Constructor<?>, Map<Integer, AnnotationBuilder>>();\n\t\tconstructorParameterTypes = new HashMap<Constructor<?>, Map<Integer, Type>>();\n\t\tfields = new HashMap<Field, AnnotationBuilder>();\n\t\tfieldTypes = new HashMap<Field, Type>();\n\t\tmethods = new HashMap<Method, AnnotationBuilder>();\n\t\tmethodParameters = new HashMap<Method, Map<Integer, AnnotationBuilder>>();\n\t\tmethodParameterTypes = new HashMap<Method, Map<Integer, Type>>();\n\t}",
"public final native MapTypeRegistry getMapTypeRegistry() /*-{\n return this.mapTypes;\n }-*/;",
"public ObjectMapper() {\n this.typeConverter = null;\n }",
"public void initExpTypeBeanForExistingExperiment(){\r\n \t\r\n }",
"public GeneratedTypeInitializer( ManagerEJB manager, Map params )\n\t{\n\t\tsuper( manager, params );\n\t}",
"public GeneratedTypeInitializer( ManagerEJB manager, Map params )\n\t{\n\t\tsuper( manager, params );\n\t}",
"protected Map createMapMatchingType(MappingContext mappingContext) {\n Class<?> mapType = mappingContext.getTypeInformation().getSafeToWriteClass();\n if (mapType.isAssignableFrom(LinkedHashMap.class)) {\n return new LinkedHashMap();\n } else if (mapType.isAssignableFrom(TreeMap.class)) {\n return new TreeMap();\n } else {\n throw new ConfigMeMapperException(mappingContext, \"Unsupported map type '\" + mapType + \"'\");\n }\n }",
"public Type() {\n super();\n }",
"private Type mapType(TypeResponse typeResponse) {\n return new Type(typeResponse.getType(), typeResponse.getId());\n }",
"TypeSystemDefinition createTypeSystemDefinition();",
"private static void initNumberTypeList()\n\t{\n\t\tfor(String numberType : NUMBER_TYPE_ARRAY)\n\t\t{\n\t\t\tnumberTypeList.add(numberType);\n\t\t}\n\t\tlogger.info(\" --|*|-- Number types are initialized! --|*|--\");\n\t}",
"private static void initializeDatafields(Class<AbstractNode> type) throws Exception {\r\n if (staticDatafieldMap == null) {\r\n staticDatafieldMap = new HashMap<Class<AbstractNode>, Set<String>>();\r\n }\r\n\r\n if (staticDatafieldMap.get(type) == null) {\r\n staticDatafieldMap.put(type, Information.getDatafieldsOfNode(type));\r\n }\r\n }",
"public void fromNative() {\n fromNative(nativeType);\n }",
"TypeImport createTypeImport();",
"private void init() {\n FieldWrapper id = new FieldWrapper();\n id.fieldDescription = new HashMap<String, Object>();\n id.fieldDescription.put(\"fullName\", \"Id\");\n id.fieldDescription.put(\"type\", \"Text\");\n\n FieldWrapper name = new FieldWrapper();\n name.fieldDescription = new HashMap<String, Object>();\n name.fieldDescription.put(\"fullName\", \"Name\");\n\n FieldWrapper createdBy = new FieldWrapper();\n createdBy.fieldDescription = new HashMap<String, Object>();\n createdBy.fieldDescription.put(\"fullName\", \"CreatedBy\");\n createdBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper lastModifiedBy = new FieldWrapper();\n lastModifiedBy.fieldDescription = new HashMap<String, Object>();\n lastModifiedBy.fieldDescription.put(\"fullName\", \"LastModifiedBy\");\n lastModifiedBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper owner = new FieldWrapper();\n owner.fieldDescription = new HashMap<String, Object>();\n owner.fieldDescription.put(\"fullName\", \"Owner\");\n owner.fieldDescription.put(\"type\", \"Lookup\");\n\n fieldDescribe = new HashMap<String, FieldWrapper>();\n\n fieldDescribe.put((String) id.fieldDescription.get(\"fullName\"), id);\n fieldDescribe.put((String) name.fieldDescription.get(\"fullName\"), name);\n fieldDescribe.put((String) createdBy.fieldDescription.get(\"fullName\"), createdBy);\n fieldDescribe.put((String) lastModifiedBy.fieldDescription.get(\"fullName\"), lastModifiedBy);\n fieldDescribe.put((String) owner.fieldDescription.get(\"fullName\"), owner);\n }",
"public TypeMapping getTypeMapping()\n {\n return this.javaToXSD.getSchemaCreator().getTypeMapping();\n }",
"public Map() {\n\n\t\t}",
"public static Object initClassTypeWithDefaultValue(Type genericType, Class<?> classType, int processCount,\n Map<String, String> methodPrarmGenericTypeAndNamesMap) {\n return initClassTypeWithDefaultValue(genericType, classType, processCount, false,\n methodPrarmGenericTypeAndNamesMap);\n }",
"Map<ParameterInstance, SetType> getInstanceSetTypes();",
"private Map(int typeMap ) throws IllegalArgumentException\n {\n switch (typeMap){\n case 1:\n createMapOfFirstType();\n setAdjForFirstType();\n break;\n case 2:\n createMapOfSecondType();\n setAdjForSecondType();\n break;\n case 3:\n createMapOfThirdType();\n setAdjForThirdType();\n break;\n case 4:\n createMapOfFourthType();\n setAdjForFourthType();\n break;\n default:\n throw new IllegalArgumentException();\n }\n }",
"public JTypeView() { }",
"void init() {\n\t\tinitTypes();\n\t\tinitGlobalFunctions();\n\t\tinitFunctions();\n\t\tinitClasses();\n\t}",
"public MapBuilder() {\r\n map = new Map();\r\n json = new Gson();\r\n }",
"public DictionaryModuleImpl() {\r\n }",
"public synchronized static void internal_updateKnownTypes() {\r\n Set<ChangeLogType> changeLogTypes = GrouperDAOFactory.getFactory().getChangeLogType().findAll();\r\n GrouperCache<MultiKey, ChangeLogType> newTypes = new GrouperCache<MultiKey, ChangeLogType>(\r\n ChangeLogTypeFinder.class.getName() + \".typeCache\", 10000, false, 60*10, 60*10, false);\r\n \r\n Map<String, ChangeLogType> newTypesById = new HashMap<String, ChangeLogType>();\r\n \r\n for (ChangeLogType changeLogType : GrouperUtil.nonNull(changeLogTypes)) {\r\n newTypes.put(new MultiKey(changeLogType.getChangeLogCategory(), changeLogType.getActionName()), changeLogType);\r\n newTypesById.put(changeLogType.getId(), changeLogType);\r\n }\r\n \r\n //add builtins if necessary\r\n internal_updateBuiltinTypesOnce(newTypes, newTypesById);\r\n \r\n types = newTypes;\r\n typesById = newTypesById;\r\n }",
"TypeDefinition createTypeDefinition();",
"public SourceTypeConfiguration() {\n\n\t}",
"public SystemExportGeneratorType() {\n }",
"private TypeCode() {}",
"@Before\n public void initialize()\n {\n map = new MapAdapter();\n }",
"public FactoryMapImpl()\n {\n super();\n }",
"public Map<String, Object> getTypeDefProperties()\n {\n if (typeDefProperties == null)\n {\n return null;\n }\n else if (typeDefProperties.isEmpty())\n {\n return null;\n }\n else\n {\n return new HashMap<>(typeDefProperties);\n }\n }",
"public void setMapTyp(String mapTyp) {\n\t\tthis.mapTyp = mapTyp;\n\t}",
"public MagicDictionary() {\n this.map = new HashMap<>();\n }",
"public StratmasParameterFactory() \n {\n this.typeMapping = createTypeMapping();\n }",
"@Override\n public Resource init() throws ResourceInstantiationException {\n\n // based on info from\n // http://www.iana.org/assignments/media-types/application/fastinfoset\n\n // Register XML mime type\n MimeType mime = new MimeType(\"application\", \"fastinfoset\");\n\n // Register the class handler for this mime type\n mimeString2ClassHandlerMap.put(mime.getType() + \"/\" + mime.getSubtype(),\n this);\n\n // Register the mime type with mine string\n mimeString2mimeTypeMap.put(mime.getType() + \"/\" + mime.getSubtype(), mime);\n\n // Register file sufixes for this mime type\n suffixes2mimeTypeMap.put(\"finf\", mime);\n\n // Register magic numbers for this mime type\n // this should be E0 00 00 01\n // but I can't seem to get it to work\n\n // Set the mimeType for this language resource\n setMimeType(mime);\n\n return this;\n }",
"void addTypes(EntryRep bits) {\n\tString classFor = bits.classFor();\n\tString[] superclasses = bits.superclasses();\n\n\t//The given EntryRep will add its className to the\n\t//subtype list of all its supertypes.\n\n\tString prevClass = classFor;\n\tfor (int i = 0; i < superclasses.length; i++) {\n\t if (!addKnown(superclasses[i], prevClass)) {\n\t\treturn;\n\t }\n\t prevClass = superclasses[i];\n\t}\n\n\t// If we are here prevClass must have java.Object as its\n\t// direct superclass (we don't store \"java.Object\" in\n\t// EntryRep.superclasses since that would be redundant) and\n\t// prevClass is not already in the the tree. Place it in the\n\t// \"net.jini.core.entry.Entry\" bucket so it does not get lost\n\t// if it does not have any sub-classes.\n\t//\n\t// Fix suggested by Lutz Birkhahn <[email protected]>\n\taddKnown(ROOT, prevClass);\n }",
"void constructMap(JsonArray array)\n {\n JsonObject obj = array.get(0).getAsJsonObject();\n\n // Loop on them\n for(Map.Entry<String, JsonElement> entry : obj.entrySet())\n {\n String key = entry.getKey(); // ID:TYPE\n if(!(key.matches(\"(\\\\d+):([A-Z_]+)\")))\n continue;\n\n String[] split = key.split(\":\");\n long id = Long.parseLong(split[0]);\n CodeType type = remapLegacyCodeType(split[1]);\n\n Map<CodeType, Map<String, String>> userMap = map.getOrDefault(id, new HashMap<>());\n Map<String, String> codesForTypeMap = userMap.getOrDefault(type, new HashMap<>());\n\n for(Map.Entry<String, JsonElement> code : entry.getValue().getAsJsonObject().entrySet())\n codesForTypeMap.put(code.getKey(), code.getValue().getAsString());\n\n userMap.put(type, codesForTypeMap);\n map.put(id, userMap);\n }\n\n array.remove(obj); // Remove the codes object\n }",
"private void scanAndRegisterTypes() throws Exception {\n ScannedClassLoader scl = ScannedClassLoader.getSystemScannedClassLoader();\n // search annotations\n Iterator<Metadata> it = scl.getAll(MetadataType.class, Metadata.class); //CellFactorySPI.class);\n logger.log(Level.INFO, \"[Metadata Service] about to search classloader\");\n while (it.hasNext()) {\n Metadata metadata = it.next();\n logger.log(Level.INFO, \"[Metadata Service] using system scl, scanned type:\" + metadata.simpleName());\n registerMetadataType(metadata);\n }\n }"
] | [
"0.73695034",
"0.7352207",
"0.6867339",
"0.6646845",
"0.6473126",
"0.6339552",
"0.63006955",
"0.62794185",
"0.6238768",
"0.621275",
"0.61279345",
"0.6117586",
"0.6111849",
"0.61113447",
"0.61084545",
"0.60821086",
"0.60608447",
"0.60524905",
"0.60493904",
"0.60227406",
"0.5956261",
"0.5936924",
"0.5934603",
"0.5908656",
"0.59005743",
"0.5878993",
"0.58746165",
"0.58430916",
"0.5839053",
"0.5832411",
"0.581602",
"0.5784488",
"0.5764518",
"0.57614434",
"0.57425624",
"0.57215214",
"0.57108957",
"0.57083404",
"0.56849146",
"0.5681334",
"0.56710213",
"0.5669035",
"0.5663767",
"0.5663592",
"0.56556493",
"0.56526285",
"0.56235415",
"0.5618512",
"0.5616793",
"0.5611793",
"0.5611793",
"0.5604326",
"0.56015694",
"0.56006676",
"0.5588562",
"0.55847836",
"0.5572588",
"0.555911",
"0.5546506",
"0.55362386",
"0.5520961",
"0.54960823",
"0.54959494",
"0.5493336",
"0.54919595",
"0.5484419",
"0.5484419",
"0.54685706",
"0.5460713",
"0.54524124",
"0.54465544",
"0.5439417",
"0.5429106",
"0.54279566",
"0.54230547",
"0.5410962",
"0.54027796",
"0.5401673",
"0.5394118",
"0.5390319",
"0.53767955",
"0.5373744",
"0.53709584",
"0.536613",
"0.53522664",
"0.53506905",
"0.5347734",
"0.5340459",
"0.5338813",
"0.5337561",
"0.5331812",
"0.53201604",
"0.531825",
"0.5312084",
"0.53078353",
"0.53076965",
"0.5307195",
"0.530592",
"0.5303547",
"0.5272312"
] | 0.7879367 | 0 |
Format the sql script | private String formatSql(String sql) {
String sqlStr = formator.format(sql + ";");
if (sqlStr == null) {
LOGGER.error("The formator.format(sql) is a null.");
return null;
}
String trimmedSql = sqlStr.trim();
if (!trimmedSql.endsWith(";")) {
return "";
}
String formattedSql = trimmedSql.substring(0, trimmedSql.length() - 1);
return formattedSql;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void formatSql() {\r\n if (sql == null || sql.trim().length() == 0) {\r\n throw new IllegalArgumentException(\"There is no SQL statement to format\");\r\n }\r\n sql = formatter.format(sql);\r\n }",
"String toSql();",
"protected String generateSQL() {\n String fields = generateFieldsJSON();\n return String.format(QUERY_PATTERN, fields, esQuery.generateQuerySQL(), from, size);\n }",
"public void makeSql() {\n\t\tfor(int i=0; i<arr_sql.length; i++) {\n\t\t\tarr_sql[i] = new StringBuffer();\n\t\t}\n\t\t\n\t\t/*\n\t\t * 공통코드 쿼리\n\t\t * 대리점구분 : CU006\n\t\t * 직판구분 : CU012\n\t\t * 지역 : SY006\n\t\t * 계약상태 : CU013\n\t\t * 사용유무 : SY011\n\t\t * 보증보험회사 : CU010\n\t\t * 하위대리점여부 : CU011\n\t\t */\n\t\tarr_sql[0].append (\"SELECT\t\t\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append (\"\t' ' head, ' ' detail, '전체' detail_nm \\n\")\n\t\t\t\t .append (\"FROM DUAL \\n\")\n\t\t\t\t .append (\"UNION ALL \\n\")\n\t\t\t\t .append (\"SELECT \\n\")\n\t\t\t\t .append (\"\tB.head, B.detail, B.detail_nm \\n\")\n\t\t\t\t .append (\"FROM \\n\")\n\t\t\t\t .append (\"\tSALES.TSY011 A, \\n\")\n\t\t\t\t .append (\"\tSALES.TSY010 B \\n\")\n\t\t\t\t .append (\"WHERE 1=1 \\n\")\n\t\t\t\t .append (\" AND A.head = B.head \\n\")\n\t\t\t\t .append (\" AND B.head = ? \\n\")\n\t\t\t\t .append (\" AND LENGTH (rtrim(B.detail)) > 0 \\n\");\n\t\t\n\t\t/*\n\t\t * 대리점 조회\n\t\t */\n\t\tarr_sql[1].append(\"SELECT T1.client_sid\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처SID \t*/\n\t \t\t .append(\"\t\t ,T1.vend_cd \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* [회계]거래처 코드 \t*/\n\t \t\t .append(\"\t\t ,T1.client_cd \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처 코드 \t*/\n\t \t\t .append(\"\t\t ,T1.client_nm \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처 명 \t*/\n\t \t\t .append(\"\t\t ,T1.client_gu \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처구분 :CU005 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.agen_gu \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 대리점구분 :CU006 \t*/\n\t \t\t .append(\"\t\t ,T1.dir_yn \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 직판여부 :CU012 \t*/\n\t \t\t .append(\"\t\t ,T1.area_cd \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지역코드 :SY006 \t*/\n\t \t\t .append(\"\t\t ,T1.sal_dam_sid \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 영업담당자코드[TSY410] */\n\t \t\t .append(\"\t\t ,T1.client_dam_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처담당자 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.tel_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 전화번호 \t*/\n\t \t\t .append(\"\t\t ,T1.mobile_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 휴대전화 \t*/\n\t \t\t .append(\"\t\t ,T1.fax_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* FAX번호 \t*/\n\t \t\t .append(\"\t\t ,T1.e_mail \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 이메일 \t*/\n\t \t\t .append(\"\t\t ,T1.zip_cd \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 우편번호[TSY110] */\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.address1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 주소1 \t*/\n\t \t\t .append(\"\t\t ,T1.address2 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 주소2 \t*/\n\t \t\t .append(\"\t\t ,T1.commi_rate \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t \t\t .append(\"\t\t ,T1.cunt_status \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 계약상태 :CU013 \t*/\n\t \t\t .append(\"\t\t ,T1.bancod \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행코드 [BANKCODE] */\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.bank_acc_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행계좌번호 \t*/\n\t \t\t .append(\"\t\t ,T1.bank_acct_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 예금주 \t*/\n\t \t\t .append(\"\t\t ,T1.use_yn \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 사용여부 :SY011 \t*/ \n\t \t\t .append(\"\t\t ,T1.client_url\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 홈페이지 URL\t\t\t\t*/\n\t \t\t .append(\"\t\t ,T2.sal_dam_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 영업담당자명 \t*/\n\t \t\t .append(\"\t\t ,T3.vend_nm \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 거래처명 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T4.bannam \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행명 \t*/\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU006',T1.agen_gu) AS agen_gu_name \t\t\t\t\t\\n\")\t/* 대리점구분명 \t\t\t\t*/ \n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU012',T1.dir_yn) AS dir_yn_name \t\t\t\t\t\\n\")\t/* 직판여부명 \t\t\t\t*/ \n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY006',T1.area_cd) AS area_nm\t\t\t\t\t\t\t\\n\")\t/* 지역명 \t\t\t\t*/\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU013',T1.cunt_status) AS cunt_status_name \t\t\t\\n\")\t/* 계약상태명 \t\t\t\t*/\n\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY011',T1.use_yn) AS use_yn_name \t\t\t\\n\")\t/* 사용여부명 \t\t\t \t*/\n\n\t \t\t .append(\"FROM SALES.TCU030 T1 LEFT OUTER JOIN SALES.TSY410 T2 ON T1.SAL_DAM_SID = T2.SAL_DAM_SID \\n\")\n\t \t\t .append(\"\t\t LEFT OUTER JOIN ACCOUNT.GCZM_VENDER T3 ON T1.VEND_CD = T3.VEND_CD \t\t\t\t\t\\n\")\n\t \t\t .append(\"\t\t LEFT OUTER JOIN ACCOUNT.BANKCODE T4 ON T1.BANCOD = T4.BANCOD \t\t\t\t\t\\n\")\n\t \t\t .append(\"WHERE 1 = 1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\n\t \t\t .append(\"\t\t AND T1.client_GU = '1' \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t/*\n\t\t * 계약정보 조회\n\t\t */\n\t\tarr_sql[2].append(\"SELECT T1.client_sid\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t .append(\"\t\t ,T1.cont_date\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,T1.expire_date\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,TO_NUMBER(T1.insur_amt) AS insur_amt\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,T1.insur_comp_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ('CU010',T1.insur_comp_cd) AS insur_comp_cd_name\t\t\\n\") \t/* 보증보험회사명 \t\t*/ \n\t\t\t\t .append(\"FROM SALES.TCU031 T1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"WHERE 1=1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t \n\t\n\t\t/*\n\t\t * 지점정보 조회\n\t\t */\n\t\tarr_sql[3].append(\"SELECT T1.client_sid\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 매출처SID \t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지점코드 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.area_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,T1.client_down_yn \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t .append(\"\t\t ,T1.empno \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.tel_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.mobile_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.fax_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_url \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY006', T1.area_cd) AS area_nm\t\t\t\t\t\t\t\\n\") \t/* 지역명:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU011',T1.client_down_yn) AS client_down_yn_name \t\\n\")\t/* 하위대리점여부명 \t\t*/\n\t\t\t\t .append(\"FROM SALES.TCU032 T1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t\n\t\t\n\t\t/*\n\t\t * 대리점 등록\n\t\t */\n\n\t\tarr_sql[4].append(\"INSERT INTO SALES.TCU030 (\")\n\t\t\t\t .append(\"\t\t\t\t client_sid \\n\")\t\n\t\t\t\t .append(\"\t\t\t\t,vend_cd \\n\")\t/* [회계]거래처 코드 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_cd \\n\")\t/* 매출처 코드 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_nm \\n\")\t/* 매출처 명 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_gu \\n\")\t/* 매출처구분 :CU005 \t*/\n\t\t\t\t .append(\"\t\t\t\t,agen_gu \\n\")\t/* 대리점구분 :CU006 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,dir_yn \\n\")\t/* 직판여부 :CU012 \t*/\n\t\t\t\t .append(\"\t\t\t\t,area_cd \\n\")\t/* 지역코드 :SY006 \t*/\n\t\t\t\t .append(\"\t\t\t\t,sal_dam_sid \\n\")\t/* 영업담당자코드[TSY410] \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_dam_nm \\n\")\t/* 매출처담당자 \t*/\n\t\t\t\t .append(\"\t\t\t\t,tel_no \\n\")\t/* 전화번호 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,mobile_no \\n\")\t/* 핸드폰 \t*/\n\t\t\t\t .append(\"\t\t\t\t,fax_no \\n\")\t/* FAX번호 \t*/\n\t\t\t\t .append(\"\t\t\t\t,e_mail \\n\")\t/* 이메일 \t*/\n\t\t\t\t .append(\"\t\t\t\t,zip_cd \\n\")\t/* 소재지우편번호[TSY110] */\n\t\t\t\t .append(\"\t\t\t\t,address1 \\n\")\t/* 소재지주소1 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,address2 \\n\")\t/* 소재지주소2 \t*/\n\t\t\t\t .append(\"\t\t\t\t,commi_rate \t\\n\") \t/* 수수료율 \t*/\n\t\t\t\t .append(\"\t\t\t\t,cunt_status \\n\")\t/* 계약상태 :CU013 \t*/\n\t\t\t\t .append(\"\t\t\t\t,bancod\t\t\t\\n\") \t/* 은행코드 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t\t\t,bank_acc_no \\n\")\t/* 은행계좌번호[BANKCODE] \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,bank_acct_nm\t\\n\")\t/* 예금주 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t\t\t,use_yn\t\t\t\\n\")\t/* 사용여부 \t\t\t\t\t*/\n\t\t\t\t\n\t\t\t\t .append(\"\t\t \t\t,u_date \t\\n\") \t/* 최종수정일자 \t*/\n\t \t\t .append(\"\t\t \t\t,u_empno \t\\n\")\t/* 최종수정자사번 \t*/\n\t \t\t .append(\"\t\t \t\t,u_ip \\n\")\t/* 최종수정IP */\t\t\t\n\t \t\t .append(\"\t\t\t\t,client_url\t\t\\n\")\t/* 홈페이지 */\n\t\t\t\t .append(\"\t\t\t)\t\t\t\t\t\\n\")\n\t\t\t\t \n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\tSALES.SWS_TCU030_ID.NEXTVAL,?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,SYSTIMESTAMP,?,?,?\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\n\t\n\t\t\n\t\t/*\n\t\t * 계약정보 등록\n\t\t */\n\t\tarr_sql[5].append(\"INSERT INTO SALES.TCU031 ( \t\\n\")\n\t\t\t\t .append(\" \t client_SID\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t .append(\"\t\t ,cont_date\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,expire_date\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,insur_amt\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,insur_comp_cd\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date\t\t\t\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t .append(\"\t\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t \n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\t\t\t\n\t\t/*\n\t\t * 지점정보 등록\n\t\t */\n\t\t\n\t\tarr_sql[6].append(\"INSERT INTO SALES.TCU032 ( \t\\n\")\n\t\t\t\t .append(\"\t\t client_SID\t\t\t\\n\") \t/* 매출처SID \t\t*/\n\t\t\t\t .append(\"\t\t ,branch_cd\t\t\t\t\\n\")\t/* 지점코드 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_nm \t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,area_cd\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,client_down_yn \t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,empno \t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,tel_no \t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,mobile_no \t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,fax_no \t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_url \t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date \t\t\t\t\\n\")\t/* 최종수정일자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\")\t/* 최종수정자사번 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_ip \t\t\t\t\\n\")\t/* 최종수정IP \t\t*/\n\t\t\t\t .append(\"\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\n\t\t/*\n\t\t * 대리점 수정\n\t\t */\n\n\t\tarr_sql[7].append(\"UPDATE SALES.TCU030 SET \t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t vend_cd\t\t= ? \t\t\t\t\\n\")\t/* [회계]거래처 코드 \t*/\n\t\t\t\t .append(\"\t\t,client_nm\t\t= ? \t\t\t\t\\n\")\t/* 매출처 명 \t*/\n\t\t\t\t .append(\"\t\t,agen_gu\t\t= ? \t\t\t\t \t\\n\")\t/* 대리점구분 :CU006 \t*/\n\t\t\t\t .append(\"\t\t,dir_yn\t\t\t= ? \t\t\t\t\\n\")\t/* 직판여부 :CU012 \t*/\n\t\t\t\t .append(\"\t\t,area_cd \t= ? \t\t\t\t\t\\n\")\t/* 지역코드 :SY006 \t*/\n\n\t\t\t\t .append(\"\t\t,sal_dam_sid\t= ? \t\t\t\t\t\\n\")\t/* 영업담당자코드[TSY410] */\n\t\t\t\t .append(\"\t\t,client_dam_nm\t= ? \t\t\t\t\t\\n\")\t/* 매출처담당자 \t*/\n\t\t\t\t .append(\"\t\t,tel_no = ?\t\t\t\t\t\t\\n\")\t/* 전화번호 \t*/\n\t\t\t\t .append(\"\t\t,mobile_no = ?\t\t\t\t\t\t\\n\")\t/* 핸드폰 \t*/\n\t\t\t\t .append(\"\t\t,fax_no = ?\t\t\t\t\t\t\\n\")\t/* FAX번호 \t*/\n\n\t\t\t\t .append(\"\t\t,e_mail = ?\t\t\t\t\t\t\\n\")\t/* 이메일 \t*/\n\t\t\t\t .append(\"\t\t,zip_cd = ?\t\t\t\t\t\t\\n\")\t/* 소재지우편번호[TSY110] \t*/\n\t\t\t\t .append(\"\t\t,address1 = ?\t\t\t\t\t\t\\n\")\t/* 소재지주소1 \t*/\n\t\t\t\t .append(\"\t\t,address2 = ?\t\t\t\t\t\t\\n\")\t/* 소재지주소2 \t*/\n\t\t\t\t .append(\"\t\t,commi_rate \t= ?\t\t\t\t\t\t\\n\") \t/* 수수료율 \t*/\n\n\t\t\t\t .append(\"\t\t,cunt_status = ?\t\t\t\t\t\t\\n\")\t/* 계약상태 :CU013 \t*/\n\t\t\t\t .append(\"\t\t,bancod\t\t\t= ?\t\t\t\t\t\t\\n\") \t/* 은행코드\t \t\t\t\t*/\n\t\t\t\t .append(\"\t\t,bank_acc_no = ?\t\t\t\t\t\t\\n\")\t/* 은행계좌번호[BANKCODE]\t\t*/\n\t\t\t\t .append(\"\t\t,bank_acct_nm\t= ?\t\t\t\t\t\t\\n\")\t/* 예금주 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t,use_yn\t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 사용여부 \t\t\t\t\t*/\n\n\t\t\t\t .append(\"\t\t,u_date \t= SYSTIMESTAMP\t\t\\n\") \t/* 최종수정일자 \t*/\n\t \t\t .append(\"\t\t,u_empno \t= ?\t\t\t\t\t\t\\n\")\t/* 최종수정자사번 \t*/\n\t \t\t .append(\"\t\t,u_ip = ?\t\t\t\t\t\t\\n\")\t/* 최종수정IP */\n\t \t\t .append(\"\t,client_url = ?\t\t\t\t\t\t\\n\")\t/* 홈페이지 */\n\t\t\t\t .append (\"WHERE client_sid \t= ? \t\t\t\t\\n\");\n\t\t\t\t \n\t\t/*\n\t\t * 계약정보 수정\n\t\t */\n\t\tarr_sql[8].append(\"UPDATE SALES.TCU031 SET\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t cont_date\t\t\t= ?\t\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,expire_date\t\t= ?\t\t\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,insur_amt\t\t\t= ?\t\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,insur_comp_cd\t\t= ?\t\t\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date\t\t\t= SYSTIMESTAMP\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t= ?\t\t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t= ?\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t .append (\"WHERE client_sid \t\t= ? AND cont_date = ? \\n\");\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\t\n\t\t/*\n\t\t * 지점정보 수정\n\t\t */\n\t\t\n\t\tarr_sql[9].append(\"UPDATE SALES.TCU032 SET \t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t branch_nm \t\t= ?\t\t\t\t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,area_cd\t\t\t= ?\t\t\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,client_down_yn \t= ?\t\t\t\t\t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,empno \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,tel_no \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,mobile_no \t\t= ?\t\t\t\t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,fax_no \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_url \t\t= ?\t\t\t\t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date \t\t\t= SYSTIMESTAMP\t\t\t\t\t\t\\n\")\t/* 최종수정일자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t= ?\t\t\\n\")\t/* 최종수정자사번 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_ip \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 최종수정IP \t\t*/\n\t\t\t\t .append (\"WHERE client_sid = ? AND branch_cd \t= ?\t\t\\n\");\n\t\t\n\t\t arr_sql[10].append(\"DELETE FROM SALES.TCU030 WHERE client_sid = ?\");\t\n\t\t arr_sql[11].append(\"DELETE FROM SALES.TCU031 WHERE client_sid = ? AND cont_date = ?\");\n\t\t arr_sql[12].append(\"DELETE FROM SALES.TCU032 WHERE client_sid = ? AND branch_cd = ?\");\n\t\t \n\t\t \n\t\t /*\n\t\t * Client SID 얻어오기\n\t\t */\n\t\t\t\n\t\t\tarr_sql[13].append(\"SELECT client_sid FROM SALES.TCU030 WHERE client_cd = ?\\n\");\n\t\t\t\n\t\t/*\n\t\t * 수수료율 조회\n\t\t */\n\t\t\tarr_sql[14].append(\"SELECT\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t.append(\" T1.CLIENT_SID AS CLIENT_SID\t\\n\") /* 매출처SID */\n\t\t\t\t\t\t.append(\" ,T1.FR_DATE AS FR_DATE \t\\n\") /* 시작일자 */\n\t\t\t\t\t\t.append(\" ,T1.TO_DATE AS TO_DATE \t\\n\") /* 종료일자 */\n\t\t\t\t\t\t.append(\" ,T1.WEEKEND_YN AS WEEKEND_YN \t\\n\") /* 주말여부 */\n\t\t\t\t\t\t.append(\" ,T1.COMMI_RATE AS COMMI_RATE\t\\n\") /* 수수료율 */\n\t\t\t\t\t\t.append(\"FROM SALES.TCU033 T1 \t\\n\")\n\t\t\t\t\t\t.append(\"WHERE 1=1 \t\t\t\t\t\t\t\\n\");\n\t\t\t\t\t\t\n\t\t/*\n\t\t * 수수료율 등록\n\t\t */\n\t\t\t\n\t\t\tarr_sql[15].append(\"INSERT INTO SALES.TCU033 ( \t\\n\")\n\t\t\t\t\t\t .append(\" \t CLIENT_SID\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t\t\t .append(\"\t\t ,FR_DATE\t\t\t\t\\n\") \t/* 시작일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,TO_DATE\t\t\t\\n\")\t/* 종료일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,COMMI_RATE\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,WEEKEND_YN\t\t\t\\n\")\t/* 주말여부 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_DATE\t\t\t\t\\n\")\t/* 최종입력일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_EMPNO \t\t\t\t\\n\") \t/* 최종입력자사번 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_IP\t\t\t\t\t\\n\")\t/* 최종입력IP \t*/\t\t\t\t\t\t \n\t\t\t\t\t\t .append(\"\t\t ,u_date\t\t\t\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t\t\t .append(\"\t\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t \n\t\t\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t\t?,?,?,?, ?,\t\t\\n\")\t\n\t\t\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?, SYSTIMESTAMP,?,?\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t)\");\n\t\t/*\n\t\t * 수수료율 수정\n\t\t */\n\t\t\tarr_sql[16].append(\"UPDATE SALES.TCU033 SET\t\t\t\t\t\t\\n\") \n\t\t\t\t\t .append(\"\t\t TO_DATE\t\t\t= ?\t\t\t\t\t\\n\")\t/* 종료일자 \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,COMMI_RATE\t\t= ?\t\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t\t\t\t\t .append(\"\t\t ,WEEKEND_YN\t\t= ?\t\t\t\t\t\\n\")\t/* 주말여부 \t*/\n\t\t\t\t\t \n\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,u_date\t\t\t= SYSTIMESTAMP\t\\n\")\t/* 최종수정일자 \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,u_empno \t\t\t= ?\t\t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t= ?\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append (\"WHERE client_sid \t\t= ? AND FR_DATE = ? AND WEEKEND_YN=? \\n\"); \n\t\t/*\n\t\t * 수수료율 삭제\n\t\t */\n\t\tarr_sql[17].append(\"DELETE FROM SALES.TCU033 WHERE client_sid = ? AND fr_date = ? AND WEEKEND_YN=? \");\t \n\t\t\t \n\n\t}",
"abstract protected String buildSQL(BatchSQLEnum sql);",
"private String getSQLScript() {\n\t\tStringBuffer sb = new StringBuffer();\n\t\tStringBuffer javaSb = new StringBuffer();\n\t\tsb.append(\"CREATE\").append(\" PROCEDURE \");\n\t\tString procedureName = procNameText.getText();\n\t\tif (procedureName == null) {\n\t\t\tprocedureName = \"\";\n\t\t}\n\t\tsb.append(QuerySyntax.escapeKeyword(procedureName)).append(\"(\");\n\t\tfor (Map<String, String> map : procParamsListData) {\n\t\t\t// \"PARAMS_INDEX\", \"PARAM_NAME\", \"PARAM_TYPE\", \"JAVA_PARAM_TYPE\"\n\t\t\tString name = map.get(\"0\");\n\t\t\tString type = map.get(\"1\");\n\t\t\tString javaType = map.get(\"2\");\n\t\t\tString paramModel = map.get(\"3\");\n\t\t\tString description = map.get(\"4\");\n\t\t\tsb.append(QuerySyntax.escapeKeyword(name)).append(\" \");\n\t\t\tif (!paramModel.equalsIgnoreCase(SPArgsType.IN.toString())) {\n\t\t\t\tsb.append(paramModel).append(\" \");\n\t\t\t}\n\t\t\tsb.append(type);\n\t\t\tif (isCommentSupport && StringUtil.isNotEmpty(description)) {\n\t\t\t\tdescription = String.format(\"'%s'\", description);\n\t\t\t\tsb.append(String.format(\" COMMENT %s\", StringUtil.escapeQuotes(description)));\n\t\t\t}\n\t\t\tsb.append(\",\");\n\t\t\tjavaSb.append(javaType).append(\",\");\n\t\t}\n\t\tif (!procParamsListData.isEmpty()) {\n\t\t\tif (sb.length() > 0) {\n\t\t\t\tsb.deleteCharAt(sb.length() - 1);\n\t\t\t}\n\t\t\tif (javaSb.length() > 0) {\n\t\t\t\tjavaSb.deleteCharAt(javaSb.length() - 1);\n\t\t\t}\n\t\t}\n\t\tsb.append(\")\");\n\n\t\tsb.append(StringUtil.NEWLINE).append(\"AS LANGUAGE JAVA \").append(StringUtil.NEWLINE);\n\t\tString javaFuncName = javaNameText.getText();\n\t\tif (javaFuncName == null) {\n\t\t\tjavaFuncName = \"\";\n\t\t}\n\t\tsb.append(\"NAME '\").append(javaFuncName).append(\"(\").append(javaSb).append(\")\").append(\"'\");\n\t\tif (isCommentSupport) {\n\t\t\tString description = procDescriptionText.getText();\n\t\t\tif (StringUtil.isNotEmpty(description)) {\n\t\t\t\tdescription = String.format(\"'%s'\", description);\n\t\t\t\tsb.append(String.format(\" COMMENT %s\", StringUtil.escapeQuotes(description)));\n\t\t\t}\n\t\t}\n\t\treturn formatSql(sb.toString());\n\t}",
"private void parseSql() throws IOException {\n for (int i = 0;i < 100;i++) {\n feltJusteringTegn[i] = TEXTFORMAT;\n feltLengde[i] = 0;\n }\n\n sqlStatement = \"\";\n\n mld(\"J\", \"\\n SQL statement som kjøres:\");\n\n mld(\"J\", \"_________________________________________________\");\n\n BufferedReader sqlfil = Text.open(sqlfilNavn);\n \n try {\n String linje = sqlfil.readLine();\n\n String tekst = \"\";\n int startPos = 0, sluttPos = 0;\n\n if (linje.length() > 16) tekst = linje.substring(0, 16);\n\n// sett feltformat ut fra definisjoner fra inputfil\n if (tekst.equals(\"-- fieldlengths=\")) {\n startPos = 16;\n index = 0;\n tegn = linje.charAt(startPos);\n sqlStmLength = linje.length() + 1;\n\n while (startPos < sqlStmLength && (linje.charAt(startPos) != ' ')){\n sluttPos = startPos + 3;\n\n// mld(\"J\",\"lengde feltnr. \" + index + \": \" + linje.substring(startPos, sluttPos));\n\n feltJusteringTegn[index] = linje.charAt(startPos);\n \n char c = feltJusteringTegn[index]; \n \n if (feltJusteringTegn[index] == VENSTREJUSTERT || feltJusteringTegn[index] == TEXTFORMAT) {\n \t feltJusteringTegn[index] = TEXTFORMAT;\n \t } else {\n \t\t if (feltJusteringTegn[index] == HOYREJUSTERT || feltJusteringTegn[index] == NUMERICFORMAT) {\n \t\t\t feltJusteringTegn[index] = NUMERICFORMAT;\n \t\t } else {\n \t\t\t feltJusteringTegn[index] = GENERELLFORMAT;\n \t\t\t }\n \t\t }\n\n feltLengde[index] = Integer.parseInt(linje.substring(startPos + 1, sluttPos));\n\n// mld(\"J\",\"lengde feltnr. \" + index + \": \" + feltJusteringTegn[index] + \"/\" + feltLengde[index]);\n\n startPos = startPos + 4;\n\n index ++;\n } // end while\n\n// maksAntFeltLengder = index - 1;\n\n linje = sqlfil.readLine();\n } // end if\n\n// les inn SQL linje for linje og bygg opp felttabell\n while (linje != null) {\n mld(\"J\", linje);\n \n startPos = linje.indexOf(\"--\");\n \n if (startPos > 0) {\n linje = linje.substring(0, startPos); \t \n }\n\n if (!(startPos==0)) {\n sqlStatement = sqlStatement + linje.trim() + \" \" ;\n }\n\n linje = sqlfil.readLine();\n }\n\n mld(\"J\", \"_________________________________________________\");\n\n// Text.prompt(\"Trykk enter for å fortsette!\");\n// inn.readLine();\n\n if (mldInd.equals(\"J\")) System.out.println(\"Startpos for select er : \" + startPos );\n\n startPos = 6;\n sluttPos = 0;\n \n sqlStmLength = sqlStatement.length() + 1;\n\n int fromPos = sqlStatement.indexOf(\" from \");\n \n int fromPos2 = sqlStatement.indexOf(\" FROM \");\n \n if (fromPos < 0) fromPos = sqlStmLength;\n if (fromPos2 < 0) fromPos2 = sqlStmLength;\n if (fromPos2 < fromPos) fromPos = fromPos2;\n\n while ((startPos < fromPos) & antFelt < 99){\n \t boolean isAsFelt = false;\n \t // finn først kommaposisjonen som skiller mot neste felt\n \t \n tegn = sqlStatement.charAt(startPos);\n int pos = startPos;\n int antParenteser = 0;\n\t\t\twhile ((!(tegn == ',') || antParenteser > 0) && pos < fromPos) {\n \tif (tegn == '(') {\n \t\tantParenteser++;\n \t isAsFelt = true;\n\t\t\t}\n \telse\n \t\tif (tegn == ')') {antParenteser--;}\n\t\t\t\tpos++;\n\t\t\t\ttegn = sqlStatement.charAt(pos);\n }\n\t\t\t\n\t\t\tint kommaPos = Math.min(pos, fromPos); \n \n int asPos = sqlStatement.substring(startPos, fromPos).indexOf(\" as \");\n if (asPos < 0) asPos = fromPos; else asPos = asPos + startPos;\n \n \n int asPos2 = sqlStatement.substring(startPos, fromPos).indexOf(\" AS \");\n if (asPos2 < 0) asPos2 = fromPos; else asPos2 = asPos2 + startPos;\n \n if (asPos2 < asPos) asPos = asPos2;\n \n if (isAsFelt) {\n \t kommaPos = sqlStatement.substring(asPos, fromPos).indexOf(\",\");\n \t if (kommaPos < 0) kommaPos = fromPos; else kommaPos = kommaPos + asPos;\n }\n\n if ((asPos < kommaPos)) \n \t startPos = asPos + 3;\n\n \n while (tegn == ' ' & startPos < sqlStmLength){\n startPos ++;\n\n if (mldInd.equals(\"J\")) System.out.println(tegn);\n\n tegn = sqlStatement.charAt(startPos);\n }\n\n if (kommaPos < fromPos) \n \t sluttPos = kommaPos;\n else \n \t sluttPos = fromPos;\n\n String feltNavn = sqlStatement.substring((startPos), sluttPos).trim();\n\n feltTab [antFelt] = feltNavn;\n\n antFelt ++;\n\n startPos = sluttPos + 1;\n } // end while\n\n\n } // try\n catch (NullPointerException e) {\n mld(mldInd, \" NullPointerException!\");\n } finally {\n sqlfil.close();\n }\n\t\n}",
"public abstract String toSQL();",
"String getPostDeclareSql();",
"private void printSQLCommands(ArrayList<Map> fieldValues, ArrayList<Map> fieldAttribs, String tableName,\n String fileName){\n ArrayList<String> commands = new ArrayList<String>();\n for(Map record : fieldValues){\n String command = \"INSERT INTO \" + tableName + \" ( \";\n for(Map attrib : fieldAttribs){\n command += attrib.get(\"name\").toString() + \", \";\n }\n command = command.substring(0,command.length()-2);\n command += \" ) VALUES ( \";\n for(Map attrib : fieldAttribs){\n String column = attrib.get(\"name\").toString();\n String value = record.get(column).toString();\n if(attrib.get(\"type\").equals(\"string\")){\n command += \"\\\"\" + value + \"\\\", \";\n }else {\n command += value + \", \";\n }\n }\n command = command.substring(0,command.length()-2);\n command += \" );\";\n commands.add(command);\n }\n String currentDatabasePath = this.findCurrentDBPath();\n File file = new File(currentDatabasePath + \"/\" + fileName);\n try {\n if(!file.exists()) {\n boolean flag = file.createNewFile();\n if(flag) { System.out.println(fileName + \" created!\"); }\n else { System.out.println(\"***Error- \" + fileName + \" can not be created!\"); }\n }\n PrintWriter tableWriter = new PrintWriter(new FileWriter(file, true));\n for (String query : commands) {\n tableWriter.append(query).append(\"\\n\");\n }\n tableWriter.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void setScriptFormatCorrectly()\n\t{\n\t\tint scriptFormatNeeded = 0;\n\t\tif(isMime(m_databaseFile, GZIP_MAGIC_NUMBERS))\n\t\t{\n\t\t\tm_logger.debug(\"Database is gzipped\");\n\t\t\tscriptFormatNeeded = 3;\n\t\t}\n\t\t\n\t\tboolean propsExists = Files.exists(m_databasePropertiesFile);\n\t\t\n\t\tProperties properties = new Properties();\n\t\ttry {\n\t\t properties.load(new FileInputStream(m_databasePropertiesFile.toFile()));\n\t\t} catch (IOException e) {\n\t\t}\n\t\t\n\t\tproperties.setProperty(\"hsqldb.script_format\", \"\" + scriptFormatNeeded);\n\t\tif(! propsExists) // write other info\n\t\t{\n\t\t\tproperties.setProperty(\"version\",\"2.2.8\");\n\t\t\tproperties.setProperty(\"modified\", \"yes\");\n\t\t}\n\t\t\n\t\t// Write properties file.\n\t\ttry {\n\t\t properties.store(new FileOutputStream(m_databasePropertiesFile.toFile()), null);\n\t\t} catch (IOException e) {\n\t\t}\n\t\t\n\t}",
"public String formatSqlStatement(int Difficulty) { \n \n \tString SQLStatement = \"\";\n\t\tSQLStatement += \" Where \" + COLUMN_SKIP + \"= 0\";\n\t\t\n\t\tswitch (Difficulty) { \n\t\t case 0: \n\t\t\tSQLStatement += \" and difficulty=\" + String.valueOf(Difficulty);\n\t\t break;\n\t\t case 1: \n\t\t\tSQLStatement += \" and difficulty=\" + String.valueOf(Difficulty);\n\t\t\tbreak;\n\t\t default: \n\t\t\tbreak;\n\t\t}\n \t\n\t\t\n\t\treturn SQLStatement;\n \t\n }",
"private String createTableSQL()\n\t{\n\t\tStringBuffer str = new StringBuffer();\n\n\t\t// Keep track of the list of fields\n\t\tList<String> listFields = new ArrayList<String>();\n\n\t\t// Table command\n\t\tstr.append(\"CREATE TABLE \" + getFullPath() + \"( \");\n\t\tstr.append(createStandardGZFields());\n\n\t\t// Loop through all InputFields\n\t\tfor (InputFieldSet fieldSet : function.getInputFieldSets())\n\t\t{\n\t\t\tfor (InputField inputField : fieldSet.getInputFields())\n\t\t\t{\n\t\t\t\t// Phase 2 does not support repeating fields being journalled\n\t\t\t\tif (!Field.isRepeating(inputField))\n\t\t\t\t{\n\t\t\t\t\t// Field\n\t\t\t\t\tString fieldName = SQLToolbox.cvtToSQLFieldName(inputField.getId());\n\n\t\t\t\t\t// add if not yet existing\n\t\t\t\t\tif (listFields.indexOf(fieldName) == -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tstr.append(\", \");\n\t\t\t\t\t\tString fieldDataType = inputField.getDataType();\n\t\t\t\t\t\tString fieldType = SQLToolbox.cvtToSQLFieldType(fieldDataType, inputField.getSize(), inputField\n\t\t\t\t\t\t\t\t\t\t.getDecimals());\n\t\t\t\t\t\tString fieldDefault = SQLToolbox.cvtToSQLDefault(fieldDataType);\n\t\t\t\t\t\tstr.append(fieldName + \" \" + fieldType + \" \" + \" not null default \" + fieldDefault);\n\t\t\t\t\t\tlistFields.add(fieldName);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// End\n\t\tstr.append(\" ) \");\n\t\t// RCDFMT \" + getJournalRcdName());\n\n\t\treturn str.toString();\n\t}",
"private void runSqlFromFile(String fileName) throws IOException {\n String[] sqlStatements = StreamUtils.copyToString( new ClassPathResource(fileName).getInputStream(), Charset.defaultCharset()).split(\";\");\n for (String sqlStatement : sqlStatements) {\n sqlStatement = sqlStatement.replace(\"CREATE TABLE \", \"CREATE TABLE OLD\");\n sqlStatement = sqlStatement.replace(\"REFERENCES \", \"REFERENCES OLD\");\n sqlStatement = sqlStatement.replace(\"INSERT INTO \", \"INSERT INTO OLD\");\n jdbcTemplate.execute(sqlStatement);\n }\n }",
"private String preprocessSql(String text) {\n\t\ttext = text.replace(\"(\\t\", \"(\\r\\n\\t\");\r\n\t\t// MsSql: combine primary key and foreign key clauses into a single line\r\n\t\tPattern pPrimaryKey = Pattern.compile(PRIMARY_KEY_BASE_PATTERN, Pattern.CASE_INSENSITIVE | Pattern.DOTALL);\r\n\t\tMatcher mPrimaryKey = pPrimaryKey.matcher(text);\r\n\t\twhile (mPrimaryKey.find()) {\r\n\t\t\tString originalText = mPrimaryKey.group();\r\n\t\t\tString replacedText = removeNewlines(originalText);\r\n\t\t\ttext = text.replace(originalText, replacedText);\r\n\t\t}\r\n\t\tPattern pForeignKey = Pattern.compile(FOREIGN_KEY_BASE_PATTERN, Pattern.CASE_INSENSITIVE | Pattern.DOTALL);\r\n\t\tMatcher mForeignKey = pForeignKey.matcher(text);\r\n\t\twhile (mForeignKey.find()) {\r\n\t\t\tString originalText = mForeignKey.group();\r\n\t\t\tString replacedText = removeNewlines(originalText);\r\n\t\t\ttext = text.replace(originalText, replacedText);\r\n\t\t}\r\n\t\treturn removeNewlines(text, REPLACE_NEWLINES);\r\n\t}",
"public String generateSQL(String database) {\n//\t\tString sql = \"select requesttext from dbc.tables order by createtimestamp\";\n\t\tString sql = CommonConfig.sqlQueryDDL(database);;\n//\t\tif (database!=null && !database.equals(\"\")) {\n//\t\t\tsql = \"select requesttext from dbc.tables where databasename='\"+database+\"' order by createtimestamp\";\n//\t\t}\n \t\treturn sql;\n \t}",
"@Override\r\n\tpublic String generate() {\r\n\t\tStringBuilder query = new StringBuilder();\r\n\r\n\t\tquery.append(\"INSERT INTO \").append(tableName).append(\" (\");\r\n\t\tfor (int i = 0; i < fieldNames.size(); i++) {\r\n\t\t\tquery.append(fieldNames.get(i));\r\n\t\t\tif (i < fieldNames.size() - 1) {\r\n\t\t\t\tquery.append(\", \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tquery.append(\") VALUES (\");\r\n\t\tfor (int i = 0; i < fieldValues.size(); i++) {\r\n\t\t\tquery.append(\"'\").append(fieldValues.get(i)).append(\"'\");\r\n\t\t\tif (i < fieldValues.size() - 1) {\r\n\t\t\t\tquery.append(\", \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tquery.append(\");\");\r\n\t\treturn query.toString();\r\n\t}",
"public static String SQLFromFile(String file) throws IOException{\n BufferedReader reader = new BufferedReader(new FileReader(file));\n StringBuilder sb = new StringBuilder();\n String line;\n while((line = reader.readLine()) != null){\n sb.append(line);\n sb.append(' ');\n }\n reader.close();\n return sb.toString();\n }",
"public static String clearGeneratedSQl(String sql) {\n\t\treturn sql.replaceAll(\"\\n\", \" \")\n\t\t\t\t.replace(\"REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(\", \"\")\n\t\t\t\t.replace(\", '%', '%25'), ' ', '%20'), '!', '%21'), '\\\"', '%22'), '#', '%23'), '$', '%24'), '&', '%26'), '\\\\'', '%27'), '(', '%28'), ')', '%29'), '*', '%2A'), '+', '%2B'), ',', '%2C'), '/', '%2F'), ':', '%3A'), ';', '%3B'), '<', '%3C'), '=', '%3D'), '>', '%3E'), '?', '%3F'), '@', '%40'), '[', '%5B'), '\\\\\\\\', '%5C'), ']', '%5D'), '^', '%5E'), '`', '%60'), '{', '%7B'), '|', '%7C'), '}', '%7D')\", \"\");\n\t\t\n\t}",
"private String produceSQL(String[] cols) {\n StringBuffer buffer = new StringBuffer();\n buffer.append('(');\n buffer.append(cols[0]);\n\n for (int i = 1; i < cols.length; i++){\n buffer.append(',');\n buffer.append(cols[i]);\n }\n buffer.append(')');\n return buffer.toString();\n }",
"public String getSql() {\r\n String[] splitSql = this.origSql.split(\"\\\\Q\" + IN_PARAM_ESC + \"\\\\E\");\r\n StringBuffer compSql = new StringBuffer(splitSql[0]);\r\n Integer key = null;\r\n String value = IN_PARAM_ESC;\r\n for (int i = 1; i < splitSql.length && this.inMaxSqlLength(compSql.length()); i++) {\r\n key = new Integer(i);\r\n value = IN_PARAM_ESC;\r\n if (this.paramMap.containsKey(key)) {\r\n Object x = this.paramMap.get(key);\r\n value = getSqlString(x);\r\n }\r\n compSql.append(value);\r\n compSql.append(splitSql[i]);\r\n }\r\n key = new Integer(splitSql.length);\r\n value = this.origSql.lastIndexOf(IN_PARAM_ESC) == (this.origSql.length() - 1) ?\r\n IN_PARAM_ESC : \"\";\r\n if (this.paramMap.containsKey(key) && this.inMaxSqlLength(compSql.length())) {\r\n Object x = this.paramMap.get(key);\r\n value = getSqlString(x);\r\n }\r\n compSql.append(value);\r\n \r\n if (!this.inMaxSqlLength(compSql.length())) {\r\n compSql.delete(this.maxSqlLength, compSql.length());\r\n compSql.append(INCOMPLETE);\r\n }\r\n \r\n return compSql.toString();\r\n }",
"public static String formatQuery( String sqlString ) {\n StringTokenizer st= new StringTokenizer( sqlString, \"'\" );\n StringWriter sw = new StringWriter();\n \n while (st.hasMoreTokens()) {\n sw.write( st.nextToken() );\n if (st.hasMoreTokens())\n sw.write( \"''\" );\n }\n \n return sw.toString();\n }",
"public static void main(String[] args) {\n MySQLScriptGen databaseobject = new MySQLScriptGen();\n\n //this is same for every model\n JsonFileReader jsonFileReader = JsonFileReader.getInstance();\n JSONObject pim = jsonFileReader.getplatformIndependentModel();\n String ddl_script = databaseobject.createDDLScript(pim);\n String dml_script = databaseobject.createDMLScript(pim);\n String dql_script = databaseobject.createDQLScript(pim);\n System.out.println(\">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\\n\");\n System.out.println(ddl_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DML_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(dml_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DML_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DQL_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(dql_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DQL_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n }",
"public String toSQL() {\n\t\tStringBuilder sBuider = new StringBuilder();\n\n\t\t\n\t\t\n\t\t\n\t\tString sTemp = sBuider.toString();\n\t\tSystem.out.println(this.getClass().getName() + \".toSQL(): SQL statements are \\n\" + sTemp);\n\t\t\n\t\tsBuider = null;\n\t\t\n\t\treturn sTemp;\n\t}",
"protected String createUpdateString() {\r\n\t\tStringBuilder updateStatement = new StringBuilder();\r\n\t\tupdateStatement.append(\"UPDATE \");\r\n\t\tif (this.getSchemaName() != null) {\r\n\t\t\tupdateStatement.append(this.getSchemaName());\r\n\t\t\tupdateStatement.append(\".\");\r\n\t\t}\r\n\t\tupdateStatement.append(this.getTableName());\r\n\t\tupdateStatement.append(\" SET \");\r\n\t\tint columnCount = 0;\r\n\t\tfor (String columnName : reconciledUpdatingColumns) {\r\n\t\t\tcolumnCount++;\r\n\t\t\tif (columnCount > 1) {\r\n\t\t\t\tupdateStatement.append(\", \");\r\n\t\t\t}\r\n\t\t\tupdateStatement.append(columnName);\r\n\t\t\tupdateStatement.append(\" = ? \");\r\n\t\t}\r\n\t\tif (restrictingColumns.size() > 0) {\r\n\t\t\tupdateStatement.append(\" WHERE \");\r\n\t\t\tcolumnCount = 0;\r\n\t\t\tfor (Map.Entry<String, Operator> column : restrictingColumns.entrySet()) {\r\n\t\t\t\tcolumnCount++;\r\n\t\t\t\tif (columnCount > 1) {\r\n\t\t\t\t\tupdateStatement.append(\" AND \");\r\n\t\t\t\t}\r\n\t\t\t\tupdateStatement.append(column.getKey());\r\n\t\t\t\tupdateStatement.append(\" \");\r\n\t\t\t\tupdateStatement.append(column.getValue().toString());\r\n\t\t\t\tupdateStatement.append(\" ? \");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn updateStatement.toString();\r\n\t}",
"protected String processGeneratedSql( String sql ) {\n return sql;\n }",
"public abstract void toSQL(StringBuilder ret);",
"public String convertStatement (String oraStatement);",
"public String convertStatement (String oraStatement);",
"public String prepareStatementString() throws SQLException {\n\t\tList<Object> argList = new ArrayList<Object>();\n\t\treturn buildStatementString(argList);\n\t}",
"private String buildSelect() {\r\n\t\tString select = \"select all_source.line, ' '||replace(all_source.TEXT,chr(9),' ')|| ' ' line from all_source where 2=2 \";\r\n\t\tString ownerCondition = \"\";\r\n\t\tString ownerInnerCondition = \"\";\r\n\t\tString beginProcedureCondition = \"\";\r\n\r\n\t\tif (!oraJdbcDTO.dbSchema.equals(\"\")) {\r\n\t\t\townerCondition = \" and all_source.OWNER = ? \";\r\n\t\t\townerInnerCondition = \" and all_source1.OWNER = ? \";\r\n\t\t}\r\n\t\tif (!oraJdbcDTO.packageName.equals(\"\")) {\r\n\t\t\t// Procedure in package\r\n\t\t\tbeginProcedureCondition = \"and all_source.name = ?\\n\"\r\n\t\t\t\t\t+ \"and all_source.TYPE = 'PACKAGE'\\n\"\r\n\t\t\t\t\t+ \"and all_source.line >=\\n\"\r\n\t\t\t\t\t+ \" (select min(all_source1.line)\\n\"\r\n\t\t\t\t\t+ \" from all_source all_source1 where 2=2 \"\r\n\t\t\t\t\t+ ownerInnerCondition\r\n\t\t\t\t\t+ \" and all_source1.name = ?\\n\"\r\n\t\t\t\t\t+ \" and all_source1.TYPE = 'PACKAGE'\\n\"\r\n\t\t\t\t\t+ \" and instr(upper(all_source1.TEXT), ?) > 0)\";\r\n\t\t\t;\r\n\t\t} else {\r\n\t\t\t// Single procedure or function\r\n\t\t\tbeginProcedureCondition = \"and all_source.name = ?\\n\"\r\n\t\t\t\t\t+ \"and all_source.TYPE in ('PROCEDURE','FUNCTION')\";\r\n\t\t}\r\n\t\tselect = select + beginProcedureCondition + \" and all_source.line >= ?\"\r\n\t\t\t\t+ ownerCondition + \" order by all_source.line\";\r\n\r\n\t\treturn select;\r\n\t}",
"String getInitSql();",
"public static void main(String args[]){\n String sql = \"select * from TBLS limit 2\";\n String sqlComplex = \"select testpartition.filename,format_.o,title.s,identifier.o,id.o,date_.o \" +\n \"from testpartition join format_ on (testpartition.filename=format_.s) \" +\n \"join title on (testpartition.filename=title.s) \" +\n \"join identifier on (testpartition.filename=identifier.s) \" +\n \"join id on (testpartition.filename=id.s) \" +\n \"join date_ on (testpartition.filename=date_.s) \" +\n \"where testpartition.gid0=1 and testpartition.sid=2 and testpartition.fid<100000 and testpartition.pfid=0\";\n String sqlOriginal = \"select idTable.filename,format_.o,title.s,identifier.o,id.o,date_.o \" +\n \"from idTable join format_ on (idTable.filename=format_.s) \" +\n \"join title on (idTable.filename=title.s) \" +\n \"join identifier on (idTable.filename=identifier.s) \" +\n \"join id on (idTable.filename=id.s) \" +\n \"join date_ on (idTable.filename=date_.s) \" +\n \"where idTable.gid0=1 and idTable.sid=2 and idTable.fid<100000\";\n\n QueryRewrite my = new QueryRewrite(sqlOriginal);\n String sqlRewrite = my.rewrite();\n System.out.println(sqlRewrite);\n\n\n }",
"public static void main(String[] args) throws InterruptedException, FileNotFoundException, IOException {\n for (int i = 0; i < args.length; i++) {\n //System.out.println(args[i]);\n }\n RunSQL2 r = new RunSQL2();\n r.ReadCatalog(args[0]);\n String lines;\n String mainQuery = \"\";\n List<String> tokens = new ArrayList<String>();\n List<String> select = new ArrayList<String>();\n List<String> from = new ArrayList<String>();\n List<String> where = new ArrayList<String>();\n StringBuilder line = new StringBuilder();\n List<String> colName = new ArrayList<String>();\n List<String> ttable = new ArrayList<String>();\n String path = args[1];\n tt1 = new ArrayList<String>();\n tt2 = new ArrayList<String>();\n tt3 = new ArrayList<String>();\n tt4 = new ArrayList<String>();\n tt5 = new ArrayList<String>();\n String tname;\n int tCount = 0;\n int ttCount = 0;\n BufferedReader br = new BufferedReader(new FileReader(path));\n while ((lines = br.readLine()) != null) {\n line.append(lines + \" \");\n }\n if (line.lastIndexOf(\";\") > -1) {\n line.deleteCharAt(line.lastIndexOf(\";\"));\n }\n mainQuery = line.toString();\n StringTokenizer st = new StringTokenizer(line.toString(), \" \");\n while (st.hasMoreTokens()) {\n tokens.add(st.nextToken());\n }\n for (int i = 0; i < tokens.size(); i++) { // SELECTED ATTRIBUTES\n if (tokens.get(i).equalsIgnoreCase(\"select\")) {\n if (tokens.get(i + 1) != null) {\n int j = i;\n while (!tokens.get(j + 1).equalsIgnoreCase(\"from\")) {\n if (tokens.get(j + 1).substring(tokens.get(j + 1).length() - 1).equals(\",\")) {\n StringBuilder sb = new StringBuilder(tokens.get(j + 1));\n sb.deleteCharAt(tokens.get(j + 1).length() - 1);\n select.add(sb.toString());\n } else {\n select.add(tokens.get(j + 1));\n }\n j++;\n }\n }\n }\n if (tokens.get(i).equalsIgnoreCase(\"from\")) {\n // TODO: SQL TABLE FROM CLAUSE FORMAT [TABLE S], OR [TABLE]\n if (tokens.get(i + 2) != null) {\n int j = i;\n while (!tokens.get(j + 2).equalsIgnoreCase(\"where\")) {\n //TODO QUERY ERROR IF NO WHERE CLAUSE\n //System.out.println(j);\n //System.out.println(tokens.get(j).toString());\n if (tokens.get(j + 1).substring(tokens.get(j + 1).length() - 1).equals(\",\")) {\n StringBuilder sb = new StringBuilder(tokens.get(j + 1));\n sb.deleteCharAt(tokens.get(j + 1).length() - 1);\n from.add(sb.toString());\n } else {\n from.add(tokens.get(j + 1));\n }\n if (j > tokens.size() - 1) {\n break;\n }\n j++;\n }\n }\n }\n }\n\n try {\n String query = \"\";\n List<String> columnNames = new ArrayList<String>();\n Class.forName(driver).newInstance();\n Connection conn;\n Statement stmt = null;\n conn = DriverManager.getConnection(connUrl + \"?verifyServerCertificate=false&useSSL=true\", connUser, connPwd);\n br = new BufferedReader(new FileReader(path));\n query = \"SELECT * FROM DTABLES\";\n PreparedStatement statement = conn\n .prepareStatement(query);\n ResultSet rs = statement.executeQuery();\n while (rs.next()) {\n if (rs.getString(\"TNAME\") != null) {\n tname = rs.getString(\"TNAME\").replaceAll(\"\\\\s+\", \"\");\n if (tname.equalsIgnoreCase(from.get(0))) {\n // TODO: MIGHT NEED TO CHANGE IT FOR DYNAMIC LOAD\n t1.add(tname);\n t2.add(rs.getString(\"NODEDRIVER\").replaceAll(\"\\\\s+\", \"\"));\n t3.add(rs.getString(\"NODEURL\").replaceAll(\"\\\\s+\", \"\"));\n t4.add(rs.getString(\"NODEUSER\").replaceAll(\"\\\\s+\", \"\"));\n t5.add(rs.getString(\"NODEPASSWD\").replaceAll(\"\\\\s+\", \"\"));\n tCount++;\n }\n if (tname.equalsIgnoreCase(from.get(2))) {\n // TODO: MIGHT NEED TO CHANGE IT FOR DYNAMIC LOAD\n tt1.add(tname);\n tt2.add(rs.getString(\"NODEDRIVER\").replaceAll(\"\\\\s+\", \"\"));\n tt3.add(rs.getString(\"NODEURL\").replaceAll(\"\\\\s+\", \"\"));\n tt4.add(rs.getString(\"NODEUSER\").replaceAll(\"\\\\s+\", \"\"));\n tt5.add(rs.getString(\"NODEPASSWD\").replaceAll(\"\\\\s+\", \"\"));\n ttCount++;\n }\n }\n }\n conn.close();\n\n // GET ATTRIBUTES FROM THE FIRST TABLE IN ORDER TO CREATE TEMP TABLE\n Class.forName(t2.get(0)).newInstance();\n conn = DriverManager.getConnection(t3.get(0) + \"?verifyServerCertificate=false&useSSL=true\", t4.get(0), t5.get(0));\n query = \"SELECT * FROM \" + t1.get(0);\n //System.out.println(query);\n statement = conn\n .prepareStatement(query);\n rs = statement.executeQuery();\n ResultSetMetaData rsmd = rs.getMetaData();\n int columnCount = rsmd.getColumnCount();\n StringBuilder sb = new StringBuilder();\n StringBuilder sb1 = new StringBuilder();\n String name;\n String export;\n String tempQuery = \"\";\n // if it is the first node, create temp table\n for (int i = 1; i <= columnCount; i++) {\n colName.add(rsmd.getColumnName(i));\n name = rsmd.getColumnName(i);\n sb1.append(name + \", \");\n if (rsmd.getColumnType(i) == Types.INTEGER) {\n sb.append(name + \" INT, \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb.append(name + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.CHAR) {\n sb.append(name + \" CHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb.append(name + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.DATE) {\n sb.append(name + \" DATE, \");\n } else if (rsmd.getColumnType(i) == Types.DECIMAL) {\n sb.append(name + \" DECIMAL (15, 2), \");\n }\n }\n sb1.setLength(sb1.length() - 2);\n sb.setLength(sb.length() - 2);\n tempQuery = sb.toString();\n export = sb1.toString();\n\n //System.out.println(sb.toString());\n conn.close();\n\n Class.forName(tt2.get(0)).newInstance();\n conn = DriverManager.getConnection(tt3.get(0) + \"?verifyServerCertificate=false&useSSL=true\", tt4.get(0), tt5.get(0));\n query = \"SELECT * FROM \" + tt1.get(0);\n //System.out.println(query);\n statement = conn\n .prepareStatement(query);\n rs = statement.executeQuery();\n rsmd = rs.getMetaData();\n columnCount = rsmd.getColumnCount();\n StringBuilder sb2 = new StringBuilder();\n StringBuilder sb3 = new StringBuilder();\n String name1;\n String export1;\n String tempQuery1 = \"\";\n // if it is the first node, create temp table\n for (int i = 1; i <= columnCount; i++) {\n colName.add(rsmd.getColumnName(i));\n name1 = rsmd.getColumnName(i);\n sb3.append(name1 + \", \");\n if (rsmd.getColumnType(i) == Types.INTEGER) {\n sb2.append(name1 + \" INT, \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb2.append(name1 + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.CHAR) {\n sb2.append(name1 + \" CHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.VARCHAR) {\n sb2.append(name1 + \" VARCHAR(128), \");\n } else if (rsmd.getColumnType(i) == Types.DATE) {\n sb2.append(name1 + \" DATE, \");\n } else if (rsmd.getColumnType(i) == Types.DECIMAL) {\n sb2.append(name1 + \" DECIMAL (15, 2), \");\n }\n }\n sb3.setLength(sb3.length() - 2);\n sb2.setLength(sb2.length() - 2);\n tempQuery1 = sb2.toString();\n export1 = sb3.toString();\n //System.out.println(tempQuery1);\n\n //System.out.println(sb.toString());\n conn.close();\n\n // FOR TESTING\n for (int x = 0; x < tt1.size(); x++) {\n //System.out.println(tt1.get(x));\n }\n\n // MAIN\n // CREATE TEMP TABLE FIRST AND JOIN TABLES\n // NOTE: CLOSING CONNECTION WILL DELETE TEMP TABLE\n Class.forName(localdriver).newInstance();\n // NEW CONNECTION (DO NOT USE CONN OR ELSE TEMP TABLE MIGHT DROP)\n final Connection iconn = DriverManager.getConnection(localconnUrl + \"?verifyServerCertificate=false&useSSL=true\", localconnUser, localconnPwd);\n query = \"CREATE TEMPORARY TABLE \" + t1.get(0) + \" (\" + tempQuery + \")\"; // TEMP TABLE FOR TABLE 1\n //System.out.println(query);\n stmt = iconn.createStatement();\n stmt.executeUpdate(query);\n\n query = \"CREATE TEMPORARY TABLE \" + tt1.get(0) + \" (\" + tempQuery1 + \")\"; // TEMP TABLE FOR TABLE 2\n //System.out.println(query);\n stmt = iconn.createStatement();\n stmt.executeUpdate(query);\n\n Thread thread1[] = new Thread[tCount];\n Thread thread2[] = new Thread[ttCount];\n\n for (int z = 0; z < tCount; z++) {\n final int c = z;\n final String d = export;\n // EXPORT ALL DATA TO TEMP TABLE\n thread1[z] = new Thread(new Runnable() {\n @Override\n public void run() {\n //System.out.println(\"Working on \" + Thread.currentThread());\n try {\n // EXPORT CONNECTION \n //System.out.println(t3.get(c));\n Class.forName(t2.get(c)).newInstance();\n Connection conn1 = DriverManager.getConnection(t3.get(c) + \"?verifyServerCertificate=false&useSSL=true\", t4.get(c), t5.get(c));\n //System.out.println(t1.get(c));\n // GETTING DATA FROM TABLE 1\n String exportQuery = \"SELECT * FROM \" + t1.get(c);\n PreparedStatement statement1 = conn1.prepareStatement(exportQuery);\n ResultSet rs = statement1.executeQuery();\n ResultSetMetaData rsmd = rs.getMetaData();\n List<String> columnNames = new ArrayList<String>();\n Object temp = null;\n int columnCount = rsmd.getColumnCount();\n for (int i = 1; i <= columnCount; i++) {\n columnNames.add(rsmd.getColumnName(i));\n }\n //System.out.println(sb.toString());\n while (rs.next()) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"INSERT INTO \" + t1.get(0) + \" (\" + d + \") VALUES (\");\n for (int k = 0; k < columnCount; k++) {\n if (rsmd.getColumnType(k + 1) == Types.INTEGER) {\n temp = rs.getInt(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.VARCHAR || rsmd.getColumnType(k + 1) == Types.CHAR) {\n temp = rs.getString(k + 1);\n sb.append(\"'\" + temp + \"', \");\n } else if (rsmd.getColumnType(k + 1) == Types.DECIMAL) {\n temp = rs.getFloat(k + 1);\n //System.out.println(\"temp \" + temp);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.BOOLEAN) {\n temp = rs.getBoolean(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.DATE) {\n temp = rs.getDate(k + 1);\n sb.append(\"'\" + temp + \"', \");\n }\n //sb.append(temp + \", \");\n }\n sb.setLength(sb.length() - 2);\n sb.append(\");\");\n //System.out.println(sb.toString());\n String query2 = sb.toString();\n //System.out.println(query2);\n // NEED TO PERFORM A QUERY FOR EACH ROW\n PreparedStatement pstmt;\n pstmt = iconn.prepareStatement(query2);\n pstmt.executeUpdate();\n\n }\n \n } catch (ClassNotFoundException | IllegalAccessException | InstantiationException | SQLException e) {\n System.err.println(e);\n } finally {\n //System.out.println();\n }\n\n }\n });\n thread1[z].start();\n }\n\n // CREATE TEMP TABLE FOR SECOND TABLE\n for (int i = 0; i < ttCount; i++) {\n final int c = i;\n thread2[i] = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n //System.out.println(\"Working on \" + Thread.currentThread());\n // THIS PART WILL INSERT TABLE 2 DATA TO A NODE\n //if (tt3.get(c).compareToIgnoreCase(localconnUrl) != 0) {\n //System.out.println(tt3.get(c));\n //System.out.println(localconnUrl);\n Class.forName(tt2.get(c)).newInstance();\n Connection conn1 = DriverManager.getConnection(tt3.get(c) + \"?verifyServerCertificate=false&useSSL=true\", tt4.get(c), tt5.get(c));\n String exportQuery = \"SELECT * FROM \" + tt1.get(c);\n PreparedStatement statement1 = conn1.prepareStatement(exportQuery);\n ResultSet rs = statement1.executeQuery();\n ResultSetMetaData rsmd = rs.getMetaData();\n List<String> columnNames = new ArrayList<String>();\n Object temp = null;\n String name = null;\n int columnCount = rsmd.getColumnCount();\n StringBuilder sb1 = new StringBuilder();\n for (int i = 1; i <= columnCount; i++) {\n //System.out.println(rsmd.getColumnName(i));\n columnNames.add(rsmd.getColumnName(i));\n sb1.append(rsmd.getColumnName(i) + \", \");\n }\n sb1.setLength(sb1.length() - 2);\n name = sb1.toString();\n while (rs.next()) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"INSERT INTO \" + tt1.get(0) + \" (\" + name + \") VALUES (\");\n for (int k = 0; k < columnCount; k++) {\n if (rsmd.getColumnType(k + 1) == Types.INTEGER) {\n temp = rs.getInt(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.VARCHAR || rsmd.getColumnType(k + 1) == Types.CHAR) {\n temp = rs.getString(k + 1);\n sb.append(\"'\" + temp + \"', \");\n } else if (rsmd.getColumnType(k + 1) == Types.DECIMAL) {\n temp = rs.getDouble(k + 1);\n sb.append(\"'\" + temp + \"', \");\n } else if (rsmd.getColumnType(k + 1) == Types.BOOLEAN) {\n temp = rs.getBoolean(k + 1);\n sb.append(temp + \", \");\n } else if (rsmd.getColumnType(k + 1) == Types.DATE) {\n temp = rs.getDate(k + 1);\n sb.append(\"'\" + temp + \"', \");\n }\n //sb.append(temp + \", \");\n }\n sb.setLength(sb.length() - 2);\n sb.append(\");\");\n String query2 = sb.toString();\n //System.out.println(query2);\n\n // NEED TO PERFORM A QUERY FOR EACH ROW\n PreparedStatement pstmt;\n pstmt = iconn.prepareStatement(query2);\n pstmt.executeUpdate();\n }\n //}\n\n } catch (Exception e) {\n System.err.println(e);\n } finally {\n //System.out.println(\"Done with \" + Thread.currentThread());\n }\n }\n });\n thread2[i].start();\n }\n\n //System.out.println(mainQuery);\n for (int z = 0; z < tCount; z++) {\n thread1[z].join();\n }\n\n for (int z = 0; z < ttCount; z++) {\n thread2[z].join();\n }\n\n // JOIN SQL PERFORMS HERE\n //System.out.println(mainQuery);\n statement = iconn\n .prepareStatement(mainQuery);\n rs = statement.executeQuery();\n rsmd = rs.getMetaData();\n Object temp;\n String output;\n columnCount = rsmd.getColumnCount();\n double temp1;\n while (rs.next()) {\n StringBuilder sbb = new StringBuilder();\n for (int k = 0; k < columnCount; k++) {\n if (rsmd.getColumnType(k + 1) == Types.INTEGER || rsmd.getColumnType(k + 1) == Types.BIGINT) {\n temp = rs.getInt(k + 1);\n sbb.append(temp + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.VARCHAR || rsmd.getColumnType(k + 1) == Types.CHAR) {\n temp = rs.getString(k + 1);\n sbb.append(temp + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.FLOAT || rsmd.getColumnType(k + 1) == Types.DECIMAL) {\n temp1 = rs.getDouble(k + 1);\n sbb.append(temp1 + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.BOOLEAN) {\n temp = rs.getBoolean(k + 1);\n sbb.append(temp + \" | \");\n } else if (rsmd.getColumnType(k + 1) == Types.DATE) {\n temp = rs.getDate(k + 1);\n sbb.append(temp + \" | \");\n } else {\n temp = rs.getString(k + 1);\n sbb.append(temp + \" | \");\n }\n }\n sbb.setLength(sbb.length() - 1);\n output = sbb.toString();\n System.out.println(output);\n }\n\n conn.close();\n iconn.close();\n } catch (IOException | ClassNotFoundException | IllegalAccessException | InstantiationException | SQLException e) {\n System.err.println(e);\n }\n }",
"protected void decorateSQL(Statement stmt) throws SQLException\n {\n getConnection();\n\n // create a table with some data\n stmt.executeUpdate(\n \"CREATE TABLE foo (a int, b char(100))\");\n stmt.execute(\"insert into foo values (1, 'hello world')\");\n stmt.execute(\"insert into foo values (2, 'happy world')\");\n stmt.execute(\"insert into foo values (3, 'sad world')\");\n stmt.execute(\"insert into foo values (4, 'crazy world')\");\n for (int i=0 ; i<7 ; i++)\n stmt.execute(\"insert into foo select * from foo\");\n stmt.execute(\"create index fooi on foo(a, b)\");\n }",
"private String constructSQL() {\n\t\tString sql = \"\";\n\t\tif (!minAgeSet) {\n\t\t\tsql = \"SELECT E.EMP_ID, E.EMP_FULLNAME\" + \" FROM \" + empTable\n\t\t\t+ \" E\";\n\t\t} else {\n\t\t\tsql = \"SELECT E.EMP_ID, E.EMP_FULLNAME\" + \" FROM \" + empTable\n\t\t\t+ \" E WHERE E.EMP_BIRTH_DATE <= ? \";\n\t\t}\n\n\t\toriSqlLength = sql.length();\n\n\t\tStringTokenizer empTok = new StringTokenizer(employee, \",\");\n\t\tStringTokenizer calcTok = new StringTokenizer(calcGroup, \",\");\n\t\tStringTokenizer payTok = new StringTokenizer(payGroup, \",\");\n\t\tStringTokenizer teamTok = new StringTokenizer(team, \",\");\n\n\t\t// check if any of the selects have been used.\n\n\t\tif (empTok.hasMoreTokens() && !empTok.nextToken().equalsIgnoreCase(all))\n\t\t\tsql = groupSelect(\"employee\", sql);\n\t\tif (calcTok.hasMoreTokens()\n\t\t\t\t&& !calcTok.nextToken().equalsIgnoreCase(all))\n\t\t\tsql = groupSelect(\"calcGroup\", sql);\n\t\tif (payTok.hasMoreTokens() && !payTok.nextToken().equalsIgnoreCase(all))\n\t\t\tsql = groupSelect(\"payGroup\", sql);\n\t\tif (teamTok.hasMoreTokens()\n\t\t\t\t&& !teamTok.nextToken().equalsIgnoreCase(all))\n\t\t\tsql = groupSelect(\"team\", sql);\n\t\t\n\t\treturn sql;\n\t}",
"public void writeSQL(SQLOutput stream) throws SQLException {\n\t\tstream.writeBigDecimal(Helpers.bigDecOrNull(id));\n\t\tstream.writeString(Helpers.strOrNull(rt));\n\t\tstream.writeString(Helpers.strOrNull(name));\n\t\tstream.writeString(Helpers.strOrNull(description));\n\n\t}",
"public void writeSQL(SQLOutput stream) throws SQLException{\r\n}",
"private void constructExecuteSql() {\n getMetaData();\n // Validate that the primary keys are present in the underlying SQL\n StringBuilder orderBySql = new StringBuilder(super.getExecuteSql()).append(\"\\n order by \");\n switch (metaData.getDbType()) {\n case ORACLE:\n orderBySql.append(createOracleOrderedByClause ());\n break;\n case SQL_SERVER:\n orderBySql.append(createSqlServerOrderedByClause());\n break;\n case UNKNOWN:\n default:\n orderBySql.append(createUnknownDBOrderedByClause());\n }\n this.executeSql = orderBySql.toString();\n }",
"public void parse_sql(String sql, Boolean as_is) throws ConnectorConfigException{\n\t\tif (as_is){\n\t\t\tfieldset = sql;\n\t\t\treturn;\n\t\t}\n\t\tPattern limit_regex = Pattern.compile(\"[ \\n]+limit[\\n ,0-9]\", Pattern.CASE_INSENSITIVE);\n\t\tPattern where_regex = Pattern.compile(\"[ \\n]+where\", Pattern.CASE_INSENSITIVE);\n\t\tPattern from_regex = Pattern.compile(\"[ \\n]+from\", Pattern.CASE_INSENSITIVE);\n\t\tPattern select_regex = Pattern.compile(\"select\", Pattern.CASE_INSENSITIVE);\n\t\tPattern order_regex = Pattern.compile(\"[ \\n]+order[ ]+by\", Pattern.CASE_INSENSITIVE);\n\t\tPattern empty_regex = Pattern.compile(\"[ ]+\", Pattern.CASE_INSENSITIVE);\n\t\tPattern groupby_regex = Pattern.compile(\"[ \\n]+group[ \\n]+by[ \\n]+\", Pattern.CASE_INSENSITIVE);\n\n\t\tsql = limit_regex.split(sql)[0]; //drop limit part;\n\n\t\tif (groupby_regex.split(sql).length > 1){ //workaround for GROUP BY in sql\n\t\t\tset_source(\"(\"+sql+\") dhx_group_table\");\n\t\t\treturn;\n\t\t}\n\t\t\t\n\t\t//locate select part\n\t\tString[] data = from_regex.split(sql,2);\n\t\tset_fieldset(select_regex.split(data[0],2)[1]);\n\t\t\n\t\tString [] table_data = where_regex.split(data[1],2);\n\t\tif (table_data.length>1){ //where construction exists\n\t\t\tset_source(table_data[0]);\n\t\t\tString [] where_data = order_regex.split(table_data[1]);\n\t\t\tset_filter(where_data[0]);\n\t\t\tif (where_data.length==1) return; //all parsed\n\t\t\tsql = where_data[1].trim();\n\t\t} else { //check order \n\t\t\tString [] order_data = order_regex.split(table_data[0],2);\n\t\t\tset_source(order_data[0]);\n\t\t\tif (order_data.length==1) return; //all parsed\n\t\t\tsql = order_data[1].trim();\n\t\t}\n\t\t\n\t\tif (!sql.equals(\"\")){\n\t\t\tString [] order_details = empty_regex.split(sql);\n\t\t\tset_sort(order_details[0],order_details[1]);\n\t\t}\n\t}",
"@Override\n\tpublic String onPrepareStatement(String sql) {\n\t\tif(!sql.contains(INSERT)){\n\t\t\t// We have to handle criteria query bit differently since\n\t\t\t// Hibernate framework is adding extra comment (/* criteria query */) to the query.\n\t\t\tif(sql.contains(\"/* criteria query */\")){\n\t\t\t\tsql = sql.replace(\"/* criteria query */\", \"\");\n\t\t\t}\n\t\t\treturn sql;\n\t\t}\n\t\tif(sql.contains(SEPARATOR+INSERT)){\n\t\t\treturn sql;\n\t\t}\n\t\tString modelClass=\"\";\n\t\tString calComment = \"\";\n\t\t\n\t\tStringBuilder fullQuery = new StringBuilder(sql);\n\t\t// Manipulating the existing comment \n\t\ttry{\n\t\t\tif (sql.indexOf(\"/* \") != -1){\n\t\t\t\tString str = sql.substring(sql.indexOf(\"/*\")+2, sql.indexOf(\"*/\")-1);\n\t\t\t\tmodelClass = str.substring(str.lastIndexOf('.')+1,str.length());\n\t\t\t}\n\t\t\t\n\t\t\tcalComment = modelClass+SEPARATOR+INSERT ;\n\t\t\tsql = sql.substring(sql.indexOf(\"*/\")+2).trim();\n\t\t\tfullQuery = new StringBuilder(sql.length());\n\t\t\t\n\t\t\tfullQuery.append(\"/* \").append(calComment).append(\n\t\t\t\t\t\" */ \").append(sql);\n\t\t}catch (Exception e) {\n\t\t\t// No Operation -- Stick to original query and comment\n\t\t}\n\t\t\n\t\treturn fullQuery.toString();\n\t}",
"public void setSql (String sql)\n\t{\n\t\tif (sql == null)\n\t\t\tthrow new IllegalArgumentException(\"No SQL\");\n\t\tm_sqlOriginal = sql;\n\t\tint index = m_sqlOriginal.indexOf(\"\\nFROM \");\n\t\tif (index != -1)\n\t\t\tm_sqlOriginal = m_sqlOriginal.replace(\"\\nFROM \", FROM);\n\t\tindex = m_sqlOriginal.indexOf(\"\\nWHERE \");\n\t\tif (index != -1)\n\t\t\tm_sqlOriginal = m_sqlOriginal.replace(\"\\nWHERE \", WHERE);\n\t\t//\n\t\tparse();\n\t}",
"public void setSql(String sql) {\n this.sql = sql;\n }",
"String replaceOnException(String sql);",
"protected void runSQL(String sql) {\n\t\ttry {\n\t\t\tDataSource dataSource = itemPublicacaoPersistence.getDataSource();\n\n\t\t\tDB db = DBManagerUtil.getDB();\n\n\t\t\tsql = db.buildSQL(sql);\n\t\t\tsql = PortalUtil.transformSQL(sql);\n\n\t\t\tSqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,\n\t\t\t\t\tsql);\n\n\t\t\tsqlUpdate.update();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new SystemException(e);\n\t\t}\n\t}",
"public static void test000(String[] args) throws IOException\n {\n\n\n //System.out.println(sql_insert_shipto_template);\n\n// sql_insert_shipto_template = sql_insert_shipto_template.replaceAll(\"%SALES_ORGANIZATION_CODE%\", \"261\");\n// sql_insert_shipto_template = sql_insert_shipto_template.replaceAll(\"%DC_SHORTNAME%\", \"PF\");\n// sql_insert_shipto_template = sql_insert_shipto_template.replaceAll(\"%SHIPTO_CODE%\", \"10156409\");\n// sql_insert_shipto_template = sql_insert_shipto_template.replaceAll(\"%PRODUCT_CODE%\", \"10104574\");\n// sql_insert_shipto_template = sql_insert_shipto_template.replaceAll(\"%STARTDATE%\", \"01.02.2014\");\n// sql_insert_shipto_template = sql_insert_shipto_template.replaceAll(\"%FINISHDATE%\", \"31.12.9999\");\n\n\n // String test = \"1\\t2\\t3\\n4\\t5\\t6\";\n\n String test = \"SO;SHIPTO;SHIPTO;DCSHORT;REP;GRD;Name;start date;end date\\n\" +\n \"261;10156405PF;10156405;PF;249394;10104570;A.KORKUNOV DARK 5*10*100G;07.10.2014;31.12.9999\\n\" +\n \"261;10156405CH;10156405;CH;249410;10104542;A.KORKUNOV MILK 5*10*100G;07.10.2014;31.12.9999\\n\" +\n \"377;10156409PF;10156409;PF;249399;10104574;A.KORKUNOV DARK ALMOND 5*10*100G;07.10.2014;31.12.9999\\n\";\n\n\n //CSVParser parser = CSVParser.parse(test, CSVFormat.newFormat(';'));\n File file = new File(\"c:\\\\MATDET_SHIPTO_EXAMPLE.csv\");\n CSVParser parser = CSVParser.parse(file, java.nio.charset.Charset.defaultCharset(), CSVFormat.newFormat(';'));\n\n int rownum = 0;\n for (CSVRecord strings : parser)\n {\n\n if (rownum++ == 0)\n continue;\n String SO = strings.get(0);\n String SHIPTO = strings.get(2);\n String DCSHORT = strings.get(3);\n //String REP = strings.get(4);\n String PRODUCT = strings.get(5);\n String START = strings.get(7);\n String END = strings.get(8);\n\n String temp = SQL_INSERT_TMATDET_SHIPTO_TEMPLATE;\n temp = temp.replaceAll(\"%SALES_ORGANIZATION_CODE%\", SO);\n temp = temp.replaceAll(\"%DC_SHORTNAME%\", DCSHORT);\n temp = temp.replaceAll(\"%SHIPTO_CODE%\", SHIPTO);\n temp = temp.replaceAll(\"%PRODUCT_CODE%\", PRODUCT);\n temp = temp.replaceAll(\"%STARTDATE%\", START);\n temp = temp.replaceAll(\"%FINISHDATE%\", END);\n\n\n System.out.println(temp);\n }\n\n System.out.println(\"rows=\" + rownum);\n\n\n// CsvParser parser = new CsvParserImpl();\n// CSV\n// parser.\n// List parsed = parser.parse(\"1\\t2\\t3\\n4\\t5\\t6\");\n// System.out.println(parsed.get(0));\n\n //System.out.println(sql_insert_shipto_template);\n\n }",
"@Override\n public String toSql(ToSqlOptions options) {\n StringBuilder sb = new StringBuilder(\"LOAD DATA INPATH '\");\n sb.append(sourceDataPath_ + \"' \");\n if (overwrite_) sb.append(\"OVERWRITE \");\n sb.append(\"INTO TABLE \" + tableName_.toString());\n if (partitionSpec_ != null) sb.append(\" \" + partitionSpec_.toSql(options));\n return sb.toString();\n }",
"public void writeSQL(SQLOutput stream) throws SQLException {\n}",
"public void createDB() {\n\t\ttry {\n\t\t\tBufferedReader br= new BufferedReader(new FileReader(\"db_schema.txt\"));\n\t\t\tString line= null;\n\t\t\tStringBuilder sb= new StringBuilder();\n\t\t\twhile ((line=br.readLine())!=null){\n\t\t\t\tsb.append(line);\n\t\t\t\tif(sb.length()>0 && sb.charAt(sb.length()-1)==';'){//see if it is the end of one line of command\n\t\t\t\t\tstatement.executeUpdate(sb.toString());\n\t\t\t\t\tsb= new StringBuilder();\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public String printSqlEvaluation() {\r\n boolean skipParameters = false;\r\n if (sql == null || sql.trim().length() == 0) {\r\n throw new IllegalArgumentException(\"There is no SQL statement to evaluate\");\r\n }\r\n skipParameters = !sql.contains(SQL_TOKEN);\r\n if (!skipParameters) {\r\n if (params == null || params.length == 0) {\r\n throw new IllegalArgumentException(\"The parameters you try to bound are empty\");\r\n }\r\n }\r\n int total = countReplacements(sql);\r\n if (total != params.length) {\r\n throw new IllegalArgumentException(\"The total of parameters and tokens are not the same\\nParameters: \"\r\n + params.length + \"\\nTokens: \" + total + \"\\n\" + sql);\r\n }\r\n StringBuilder sb = new StringBuilder(sql);\r\n List<String> paramsEval = new ArrayList<String>();\r\n for (Object p : params) {\r\n String finalReplacement = getFinalReplacement(p);\r\n paramsEval.add(finalReplacement);\r\n findAndReplace(sb, finalReplacement);\r\n }\r\n StringBuffer printSb = new StringBuffer();\r\n if (total != 0) {\r\n printSb.append(\"\\nParameters to be replaced in sql statement: {\" + total + \"} => \" + paramsEval);\r\n for (int i = 1; i <= paramsEval.size(); i++) {\r\n printSb.append(\"\\nSetting SQL statement parameter value: column index \" + i + \", parameter value [\"\r\n + paramsEval.get(i - 1) + \"]\");\r\n }\r\n }\r\n printSb.append(\"\\nSQL>\\n\" + sb + \"\\n\");\r\n this.setSql(sb.toString());\r\n if (log.isDebugEnabled()) {\r\n log.debug(\"Details in SQL statements\" + printSb);\r\n }\r\n return printSb.toString();\r\n }",
"final public SqlStatement ScriptStatement() throws ParseException {SqlStatement st = null;\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USE:\n case CREATE:\n case DROP:\n case SET:\n case INSERT:\n case ALTER:\n case LOCK:\n case UNLOCK:\n case START:\n case COMMIT:\n case 117:{\n st = Statement();\n jj_consume_token(117);\n break;\n }\n case 0:{\n jj_consume_token(0);\n break;\n }\n default:\n jj_la1[1] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\nreturn st;\n}",
"private void exportToInsertSql() {\n\n if (destTableNameList.isEmpty()) {\n JOptionPane.showMessageDialog(this, \"No table is selected.\");\n return;\n }\n final StringBuilder sb = new StringBuilder();\n for (final String tableName : destTableNameList) {\n utils.executeQuerySql(\"SELECT * FROM \" + tableName + \" WHERE 1=2\", new DataMetaUtils.QueryAction<Object>() {\n @Override\n public Object callback(ResultSet rs) throws SQLException {\n StringBuilder tableTriggerSb = new StringBuilder();\n ResultSetMetaData metaData = rs.getMetaData();\n String auditTableName = tableName + \"_AL\";\n tableTriggerSb.append(\"CREATE TABLE \").append(auditTableName).append(\" (\\n\");\n\n for (int i = 0; i < metaData.getColumnCount(); i++) {\n tableTriggerSb.append(\" \");\n tableTriggerSb.append(metaData.getColumnName(i + 1));\n String typeName = metaData.getColumnTypeName(i + 1);\n tableTriggerSb.append(\" \")\n .append(typeName);\n if (metaData.getPrecision(i + 1) > 0) {\n tableTriggerSb.append(\"(\")\n .append(metaData.getPrecision(i + 1));\n if (metaData.getScale(i + 1) > 0) {\n tableTriggerSb.append(\",\")\n .append(metaData.getScale(i + 1));\n }\n tableTriggerSb.append(\")\");\n }\n\n tableTriggerSb.append(\",\\n\");\n\n }\n tableTriggerSb.append(\" ACT_TYPE CHAR(1),\\n\")\n .append(\" ACT_BY VARCHAR2(50),\\n\")\n .append(\" ACT_TIME DATE\\n\");\n tableTriggerSb.append(\");\\n\");\n\n\n //create trigger\n StringBuilder newInsert = new StringBuilder();\n StringBuilder delInsert = new StringBuilder();\n newInsert.append(\"INSERT INTO \").append(auditTableName).append(\"(\");\n delInsert.append(\"INSERT INTO \").append(auditTableName).append(\"(\");\n\n for (int i = 0; i < metaData.getColumnCount(); i++) {\n\n newInsert.append(metaData.getColumnName(i + 1));\n newInsert.append(\",\");\n delInsert.append(metaData.getColumnName(i + 1));\n delInsert.append(\",\");\n }\n newInsert.append(\"ACT_TYPE,\")\n .append(\"ACT_BY,\")\n .append(\"ACT_TIME) VALUES(\");\n delInsert.append(\"ACT_TYPE,\")\n .append(\"ACT_BY,\")\n .append(\"ACT_TIME) VALUES(\");\n\n for (int i = 0; i < metaData.getColumnCount(); i++) {\n\n newInsert.append(\":NEWROW.\").append(metaData.getColumnName(i + 1));\n newInsert.append(\",\");\n delInsert.append(\":OLDROW.\").append(metaData.getColumnName(i + 1));\n delInsert.append(\",\");\n }\n newInsert.append(\"v_actType,\")\n .append(\":NEWROW.UPDATED_BY,\")\n .append(\"sysdate);\\n\");\n delInsert.append(\"'D',\")\n .append(\"USER,\")\n .append(\"sysdate);\\n\");\n\n tableTriggerSb.append(\"CREATE OR REPLACE TRIGGER \")\n .append(\"TR_AL_\")\n .append(tableName)\n .append(\" \\n\")\n .append(\"AFTER INSERT OR DELETE OR UPDATE ON \")\n .append(tableName)\n .append(\" \\n\")\n .append(\"REFERENCING OLD AS \\\"OLDROW\\\" NEW AS \\\"NEWROW\\\" \\n\"\n + \"FOR EACH ROW \\n\"\n + \"ENABLE\\n\")\n .append(\"DECLARE\\n\")\n .append(\"v_actType char(1);\\n\")\n .append(\"BEGIN\\n\")\n .append(\"IF INSERTING OR UPDATING THEN \\n\"\n + \"BEGIN \\n\"\n + \"IF INSERTING THEN \\n v_actType := 'I'; \\nELSE\\n v_actType := 'U';\\n END IF;\\n\");\n tableTriggerSb.append(newInsert.toString());\n tableTriggerSb.append(\"END;\\n\"\n + \" ELSIF DELETING THEN \\n\"\n + \" BEGIN \\n\");\n\n tableTriggerSb.append(delInsert.toString());\n tableTriggerSb.append(\"END;\\n\"\n + \"END IF;\\n\"\n + \"END;\\n/\\n\");\n sb.append(tableTriggerSb.toString());\n\n return null;\n }\n });\n }\n\n SqlResultForm form = new SqlResultForm(null, true);\n form.setLocationRelativeTo(null);\n form.setSqlResult(sb.toString());\n form.setTestDsKey(((ValueName) cmbDs.getSelectedItem()).getValue());\n form.setVisible(true);\n\n }",
"private String buildQuery(String ... sql) {\n\t\tfinal StringBuffer sb = new StringBuffer();\n\t\t\n\t\tfor (String s : sql) {\n\t\t\tsb.append(ParsingUtil.QUERY + \" \" + s + \"\\n\");\n\t\t}\n\t\t\n\t\treturn sb.toString(); \n\t}",
"protected String preprocessSQL(String sql, QueryParameters parameters, Dialect dialect)\n \t\t\tthrows HibernateException {\n \n \t\tsql = applyLocks( sql, parameters.getLockOptions(), dialect );\n \n \t\treturn getFactory().getSettings().isCommentsEnabled() ?\n \t\t\t\tprependComment( sql, parameters ) : sql;\n \t}",
"String getSafeSql(String name);",
"public StringBuffer createUpdateBegin(String tableName){\n\t\t\n\t\tStringBuffer sql = new StringBuffer();\n\t\t\n\t\tsql.append(Constants.UPDATE);\n\t\tsql.append(tableName);\n\t\tsql.append(Constants.LINE_SPACE);\n\t\tsql.append(Constants.SET);\n\t\n\t\treturn sql;\n\t}",
"public String createCommandLine(IngresVectorwiseLoaderMeta meta) throws KettleException\n {\n StringBuffer sb = new StringBuffer(300);\n \n if ( !Const.isEmpty(meta.getSqlPath()) )\n {\n try\n {\n FileObject fileObject = KettleVFS.getFileObject(environmentSubstitute(meta.getSqlPath()), getTransMeta());\n String sqlexec = Const.optionallyQuoteStringByOS(KettleVFS.getFilename(fileObject));\n sb.append(sqlexec);\n //sql @tc-dwh-test.timocom.net,tcp_ip,VW[ingres,pwd]::dwh\n }\n catch ( KettleFileException ex )\n {\n throw new KettleException(\"Error retrieving 'sql' command string\", ex);\n } \n }\n else\n {\n if(isDetailed()) logDetailed( \"sql defaults to system path\");\n sb.append(\"sql\");\n }\n\n DatabaseMeta dm = meta.getDatabaseMeta();\n if ( dm != null )\n {\n if(meta.isUseDynamicVNode()){\n //logical portname in JDBC use a 7\n String port = environmentSubstitute(Const.NVL(dm.getDatabasePortNumberString(), \"\")).replace(\"7\", \"\");\n String userName = environmentSubstitute(Const.NVL(dm.getDatabaseInterface().getUsername(), \"\"));\n String passWord = Encr.decryptPasswordOptionallyEncrypted(environmentSubstitute(Const.NVL(dm.getDatabaseInterface().getPassword(), \"\")));\n String hostName = environmentSubstitute(Const.NVL(dm.getDatabaseInterface().getHostname(), \"\"));\n String dnName = environmentSubstitute(Const.NVL(dm.getDatabaseName(), \"\"));\n \n sb.append(\" @\").append(hostName).append(\",\").append(port).append(\"[\").append(userName).append(\",\").append(passWord).append(\"]::\").append(dnName);\n }\n else{\n // Database Name\n // \n String dnName = environmentSubstitute(Const.NVL(dm.getDatabaseName(), \"\"));\n sb.append(\" \").append(dnName);\n }\n }\n else\n {\n throw new KettleException(\"No connection specified\");\n }\n\n return sb.toString(); \n }",
"public boolean writePlicSnapshotToFile(File f, String dbSchema, String dataSource){\n try{\n //Obtener la conexion JDBC del proyecto\n InitialContext ctx = new InitialContext();\n DataSource ds = (DataSource) ctx.lookup(dataSource);\n Connection connection = ds.getConnection();\n\n\t String query = \"SELECT '\\\"'||REPLACE(COALESCE(globaluniqueidentifier,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(scientificname,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(institutioncode,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||COALESCE(to_char(datelastmodified,'YYYY-MM-DD HH24:MI:SS'),'')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(taxonrecordid,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(language,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(creators,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(distribution,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(abstract,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(kingdomtaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(phylumtaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(classtaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(ordertaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(familytaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(genustaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(synonyms,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(authoryearofscientificname,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(speciespublicationreference,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(commonnames,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(typification,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(contributors,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||COALESCE(to_char(datecreated,'YYYY-MM-DD'),'')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(habit,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(lifecycle,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(reproduction,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(annualcycle,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(scientificdescription,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(briefdescription,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(feeding,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(behavior,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(interactions,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(chromosomicnumbern,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(moleculardata,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(populationbiology,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(threatstatus,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(legislation,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(habitat,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(territory,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(endemicity,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(theuses,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(themanagement,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(folklore,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(thereferences,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(unstructureddocumentation,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(otherinformationsources,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(papers,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(identificationkeys,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(migratorydata,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(ecologicalsignificance,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(unstructurednaturalhistory,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(invasivenessdata,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(targetaudiences,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(version,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(urlimage1,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(captionimage1,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(urlimage2,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(captionimage2,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(urlimage3,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(captionimage3,''),'\\r\\n', ' ')||'\\\"'\"+\n\t\t\t \" AS aux \"+\n\t\t\t \"FROM \"+dbSchema+\".plic_snapshot;\";\n\n System.out.println(query);\n\n\t\t\tStatement st = connection.createStatement();\n\t\t\tResultSet rs = st.executeQuery(query); \n\n //Imprimir los datos en el archivo\n BufferedWriter out = new BufferedWriter(new FileWriter(f));\n\t\t\twhile (rs.next()) {\n\t\t\t\tout.write(rs.getString(\"aux\")+\"\\n\");\n\t\t\t}\n out.close();\n\n //Cerrar el resultset y el statement\n rs.close();\n\t\t\tst.close();\n\n //Resultado\n return true;\n }\n catch(Exception e){\n e.printStackTrace();\n return false;}\n }",
"protected void runSQL(String sql) {\n\t\ttry {\n\t\t\tDataSource dataSource = wfms_Position_AuditPersistence.getDataSource();\n\n\t\t\tDB db = DBManagerUtil.getDB();\n\n\t\t\tsql = db.buildSQL(sql);\n\t\t\tsql = PortalUtil.transformSQL(sql);\n\n\t\t\tSqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,\n\t\t\t\t\tsql);\n\n\t\t\tsqlUpdate.update();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new SystemException(e);\n\t\t}\n\t}",
"public PreparedSql generatePreparedSql(String prefix);",
"protected abstract String assemble(Statement statement);",
"protected String getSQL (Element sql) {\r\n\r\n //local variables\r\n\r\n String SQL = \"\";\r\n\r\n //code description\r\n \r\n NodeList textlist = sql.getChildNodes();\r\n for (int i = 0; i < textlist.getLength(); i++) {\r\n if (textlist.item(i).getNodeType() == Node.TEXT_NODE) {\r\n SQL += textlist.item(i).getNodeValue();\r\n }\r\n }\r\n return SQL;\r\n\r\n }",
"public String getMainSql()\n\t{\n\t\tif (m_sql == null)\n\t\t\treturn m_sqlOriginal;\n\t\t\t\n\t\tif (m_sql.length == 1)\n\t\t\treturn m_sql[0];\n\t\tfor (int i = m_sql.length-1; i >= 0; i--)\n\t\t{\n\t\t\tif (m_sql[i].charAt(0) != '(')\n\t\t\t\treturn m_sql[i];\n\t\t}\n\t\treturn \"\";\n\t}",
"public static void executeSQLScript(Connection conn, String file) throws Exception{\n\t\tFileInputStream fis=new FileInputStream(file);\n\t\tBufferedInputStream bis=new BufferedInputStream(fis);\n\t\tStringBuffer sb=new StringBuffer(); \n\t\tbyte[] bytes=new byte[1024];\n\t\twhile (bis.available()!=0){\n\t\t\tint length=fis.read(bytes);\n\t\t\tif (length!=1024){\n\t\t\t\tbyte[] smallBytes=new byte[length];\n\t\t\t\tSystem.arraycopy(bytes,0,smallBytes,0,length);\n\t\t\t\tbytes=smallBytes;\n\t\t\t}\t\n\t\t\tsb.append(new String(bytes));\n\t\t}\n\t\tStringTokenizer st = new StringTokenizer(sb.toString(),\";\",false);\n\t\twhile (st.hasMoreTokens()) {\n\t\t\tString token=st.nextToken().trim();\t\n\t\t\tif (!token.equals(\"\")){\n\t\t\t\tif (token.equalsIgnoreCase(\"commit\")){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tconn.commit();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception e){\n\t\t\t\t\t\tDataAccessObject.rollback(conn);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (token.equalsIgnoreCase(\"quit\")){\n\t\t\t\t\t//do nothing\n\t\t\t\t}\t\t\t\t\n\t\t\t\telse if (token.substring(0,2).equals(\"--\")){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\texecuteSQLStatement(conn,token);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void setSql(String sql) {\n\t\tthis.sql = sql;\n\t}",
"protected abstract String upgradeSql(int oldVersion, int newVersion);",
"public static void main(String[] args) throws IOException {\n\t\tint id_telefone = 4;\n\t\t\n\t\tFileInputStream fis = new FileInputStream(SAMPLE_CSV_FILE_PATH);\n\t\tInputStreamReader isr = new InputStreamReader(fis, \"UTF-8\");\n\t\t\n\t\t@SuppressWarnings(\"deprecation\")\n\t\tCSVReader reader = new CSVReader(isr, ';' , '\"' , 0);\n \tString[] nextLine;\n \t\n// \tWriter writer = Files.newBufferedWriter(Paths.get(\"saida.csv\"));\n// \tCSVWriter csvWriter = new CSVWriter(writer,\n// CSVWriter.DEFAULT_SEPARATOR,\n// CSVWriter.NO_QUOTE_CHARACTER,\n// CSVWriter.DEFAULT_ESCAPE_CHARACTER,\n// CSVWriter.DEFAULT_LINE_END);\n \t\n \tFile file = new File(\"Clientes.sql\");\n \n BufferedWriter fr = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file),\"UTF-8\"));\n \t\n \twhile ((nextLine = reader.readNext()) != null) {\n \t\t\n if (nextLine != null) {\n \t\n// \tSystem.out.println(nextLine.length);\n \t\n \tString id = nextLine[0];\n \tif(!id.isEmpty()) {\n \t\n \t\tid = id.substring(5);\n \t\tid = id.replace(\".\", \"\");\n \t\t\n \t\tboolean temCEP = false;\n \t\t\n \t\tif(nextLine.length > 12) temCEP = true;\n \t\t\n \t\tString CEP = \"\";\n \t\tif(temCEP) {\n \t\t CEP = nextLine[12];\n CEP = CEP.replace(\".\", \"\");\n CEP = CEP.replaceAll(\"-\",\"\");\n CEP = CEP.replaceAll(\" \",\"\");\n \t\t};\n \n \t\n \n \tfr.write(\"INSERT INTO hmprojetos.cliente values (\" \n + id \n + \",'\" + nextLine[1]\n \t\t+ \"','\" + nextLine[2]\n \t\t\t\t+ \"','\" + nextLine[3]\n \t\t\t\t\t\t+ \"','\" + nextLine[4]\n \t\t\t\t\t\t\t\t+ \"','\" + nextLine[5]\n \t\t\t\t\t\t\t\t\t\t+ \"','\" + CEP\n \t\t\t\t\t\t\t\t\t\t\t\t+ \"','\" + nextLine[10]\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"','\" + nextLine[11]\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"','\" + nextLine[6]\n + \"');\\n\");\n \t\n \t//Criação dos INSERTS dos telefones\n \tif(!nextLine[7].isEmpty()) {\n \tfr.write(\"INSERT INTO hmprojetos.telefone values (\"\n \t\t\t+ id_telefone\n \t\t\t+ \",'','\" + nextLine[7]\n \t\t\t+ \"',\"\n \t\t\t+ id \n \t\t\t+ \");\\n\"\n \t\t\t);\n \t\tid_telefone++;\n \t}\n \tif(!nextLine[8].isEmpty()) {\n \tfr.write(\"INSERT INTO hmprojetos.telefone values (\"\n \t\t\t+ id_telefone\n \t\t\t+ \",'','\" + nextLine[8]\n \t\t\t+ \"',\"\n \t\t\t+ id \n \t\t\t+ \");\\n\"\n \t\t\t);\n \t\tid_telefone++;\n \t}\n \tif(!nextLine[9].isEmpty()) {\n \tfr.write(\"INSERT INTO hmprojetos.telefone values (\"\n \t\t\t+ id_telefone\n \t\t\t+ \",'','\" + nextLine[9]\n \t\t\t+ \"',\"\n \t\t\t+ id \n \t\t\t+ \");\\n\"\n \t\t\t);\n \t\tid_telefone++;\n \t}\n \t\n \t}\n }\n \t}\n \t\n \tfr.close();\n \tSystem.out.println(\"Done\");\n\t}",
"java.lang.String getSqlCode();",
"public final void executeSQL(Connection conn,DbConnVO vo,String fileName) throws Throwable {\r\n PreparedStatement pstmt = null;\r\n StringBuffer sql = new StringBuffer(\"\");\r\n InputStream in = null;\r\n\r\n try {\r\n try {\r\n in = this.getClass().getResourceAsStream(\"/\" + fileName);\r\n }\r\n catch (Exception ex5) {\r\n }\r\n if (in==null)\r\n in = new FileInputStream(org.openswing.swing.util.server.FileHelper.getRootResource() + fileName);\r\n\r\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\r\n String line = null;\r\n ArrayList vals = new ArrayList();\r\n int pos = -1;\r\n String oldfk = null;\r\n String oldIndex = null;\r\n StringBuffer newIndex = null;\r\n StringBuffer newfk = null;\r\n ArrayList fks = new ArrayList();\r\n ArrayList indexes = new ArrayList();\r\n boolean fkFound = false;\r\n boolean indexFound = false;\r\n String defaultValue = null;\r\n int index = -1;\r\n StringBuffer unicode = new StringBuffer();\r\n boolean useDefaultValue = false;\r\n// vo.getDriverName().equals(\"oracle.jdbc.driver.OracleDriver\") ||\r\n// vo.getDriverName().equals(\"com.microsoft.jdbc.sqlserver.SQLServerDriver\") ||\r\n//\t\t\t\t\tvo.getDriverName().equals(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\") ||\r\n// vo.getDriverName().equals(\"com.mysql.jdbc.Driver\");\r\n while ( (line = br.readLine()) != null) {\r\n sql.append(' ').append(line);\r\n if (line.endsWith(\";\")) {\r\n if (vo.getDriverName().equals(\"oracle.jdbc.driver.OracleDriver\")) {\r\n sql = replace(sql, \" VARCHAR(\", \" VARCHAR2(\");\r\n sql = replace(sql, \" NUMERIC(\", \" NUMBER(\");\r\n sql = replace(sql, \" DECIMAL(\", \" NUMBER(\");\r\n sql = replace(sql, \" TIMESTAMP\", \" DATE \");\r\n sql = replace(sql, \" DATETIME\", \" DATE \");\r\n }\r\n else if (vo.getDriverName().equals(\"com.microsoft.jdbc.sqlserver.SQLServerDriver\")) {\r\n sql = replace(sql, \" TIMESTAMP\", \" DATETIME \");\r\n sql = replace(sql, \" DATE \", \" DATETIME \");\r\n }\r\n else if (vo.getDriverName().equals(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\")) {\r\n sql = replace(sql, \" TIMESTAMP\", \" DATETIME \");\r\n sql = replace(sql, \" DATE \", \" DATETIME \");\r\n }\r\n else if (vo.getDriverName().toLowerCase().contains(\"postgres\")) {\r\n sql = replace(sql, \" DATETIME\", \" TIMESTAMP \");\r\n sql = replace(sql, \" DATE \", \" TIMESTAMP \");\r\n }\r\n else {\r\n sql = replace(sql, \" DATE \", \" DATETIME \");\r\n }\r\n\r\n\r\n sql = replace(sql,\"ON DELETE NO ACTION\",\"\");\r\n sql = replace(sql,\"ON UPDATE NO ACTION\",\"\");\r\n\r\n if (sql.indexOf(\":COMPANY_CODE\") != -1) {\r\n sql = replace(sql, \":COMPANY_CODE\", \"'\" + vo.getCompanyCode() + \"'\");\r\n }\r\n if (sql.indexOf(\":COMPANY_DESCRIPTION\") != -1) {\r\n sql = replace(sql, \":COMPANY_DESCRIPTION\",\r\n \"'\" + vo.getCompanyDescription() + \"'\");\r\n }\r\n if (sql.indexOf(\":LANGUAGE_CODE\") != -1) {\r\n sql = replace(sql, \":LANGUAGE_CODE\",\r\n \"'\" + vo.getLanguageCode() + \"'\");\r\n }\r\n if (sql.indexOf(\":LANGUAGE_DESCRIPTION\") != -1) {\r\n sql = replace(sql, \":LANGUAGE_DESCRIPTION\",\r\n \"'\" + vo.getLanguageDescription() + \"'\");\r\n }\r\n if (sql.indexOf(\":CLIENT_LANGUAGE_CODE\") != -1) {\r\n sql = replace(sql, \":CLIENT_LANGUAGE_CODE\",\r\n \"'\" + vo.getClientLanguageCode() + \"'\");\r\n }\r\n if (sql.indexOf(\":PASSWORD\") != -1) {\r\n sql = replace(sql, \":PASSWORD\", \"'\" + vo.getAdminPassword() + \"'\");\r\n }\r\n if (sql.indexOf(\":DATE\") != -1) {\r\n sql = replace(sql, \":DATE\", \"?\");\r\n vals.add(new java.sql.Date(System.currentTimeMillis()));\r\n }\r\n\r\n if (sql.indexOf(\":CURRENCY_CODE\") != -1) {\r\n sql = replace(sql, \":CURRENCY_CODE\", \"'\" + vo.getCurrencyCodeREG03() + \"'\");\r\n }\r\n if (sql.indexOf(\":CURRENCY_SYMBOL\") != -1) {\r\n sql = replace(sql, \":CURRENCY_SYMBOL\", \"'\" + vo.getCurrencySymbolREG03() + \"'\");\r\n }\r\n if (sql.indexOf(\":DECIMALS\") != -1) {\r\n sql = replace(sql, \":DECIMALS\", vo.getDecimalsREG03().toString());\r\n }\r\n if (sql.indexOf(\":DECIMAL_SYMBOL\") != -1) {\r\n sql = replace(sql, \":DECIMAL_SYMBOL\", \"'\" + vo.getDecimalSymbolREG03() + \"'\");\r\n }\r\n if (sql.indexOf(\":THOUSAND_SYMBOL\") != -1) {\r\n sql = replace(sql, \":THOUSAND_SYMBOL\", \"'\" + vo.getThousandSymbolREG03() + \"'\");\r\n }\r\n\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_1\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_1\", \"'\" + vo.getUseVariantType1() + \"'\");\r\n }\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_2\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_2\", \"'\" + vo.getUseVariantType2() + \"'\");\r\n }\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_3\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_3\", \"'\" + vo.getUseVariantType3() + \"'\");\r\n }\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_4\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_4\", \"'\" + vo.getUseVariantType4() + \"'\");\r\n }\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_5\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_5\", \"'\" + vo.getUseVariantType5() + \"'\");\r\n }\r\n\r\n if (sql.indexOf(\":VARIANT_1\") != -1) {\r\n sql = replace(sql, \":VARIANT_1\", \"'\" + (vo.getVariant1()==null || vo.getVariant1().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant1()) + \"'\");\r\n }\r\n if (sql.indexOf(\":VARIANT_2\") != -1) {\r\n sql = replace(sql, \":VARIANT_2\", \"'\" + (vo.getVariant2()==null || vo.getVariant2().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant2()) + \"'\");\r\n }\r\n if (sql.indexOf(\":VARIANT_3\") != -1) {\r\n sql = replace(sql, \":VARIANT_3\", \"'\" + (vo.getVariant3()==null || vo.getVariant3().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant3()) + \"'\");\r\n }\r\n if (sql.indexOf(\":VARIANT_4\") != -1) {\r\n sql = replace(sql, \":VARIANT_4\", \"'\" + (vo.getVariant4()==null || vo.getVariant4().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant4()) + \"'\");\r\n }\r\n if (sql.indexOf(\":VARIANT_5\") != -1) {\r\n sql = replace(sql, \":VARIANT_5\", \"'\" + (vo.getVariant5()==null || vo.getVariant5().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant5()) + \"'\");\r\n }\r\n\r\n if (!useDefaultValue)\r\n while((pos=sql.indexOf(\"DEFAULT \"))!=-1) {\r\n defaultValue = sql.substring(pos, sql.indexOf(\",\", pos));\r\n sql = replace(\r\n sql,\r\n defaultValue,\r\n \"\"\r\n );\r\n }\r\n\r\n fkFound = false;\r\n while((pos=sql.indexOf(\"FOREIGN KEY\"))!=-1) {\r\n oldfk = sql.substring(pos,sql.indexOf(\")\",sql.indexOf(\")\",pos)+1)+1);\r\n sql = replace(\r\n sql,\r\n oldfk,\r\n \"\"\r\n );\r\n newfk = new StringBuffer(\"ALTER TABLE \");\r\n newfk.append(sql.substring(sql.indexOf(\" TABLE \")+7,sql.indexOf(\"(\")).trim());\r\n newfk.append(\" ADD \");\r\n newfk.append(oldfk);\r\n fks.add(newfk);\r\n fkFound = true;\r\n }\r\n\r\n if (fkFound)\r\n sql = removeCommasAtEnd(sql);\r\n\r\n indexFound = false;\r\n while((pos=sql.indexOf(\"INDEX \"))!=-1) {\r\n oldIndex = sql.substring(pos,sql.indexOf(\")\",pos)+1);\r\n sql = replace(\r\n sql,\r\n oldIndex,\r\n \"\"\r\n );\r\n newIndex = new StringBuffer(\"CREATE \");\r\n newIndex.append(oldIndex.substring(0,oldIndex.indexOf(\"(\")));\r\n newIndex.append(\" ON \");\r\n newIndex.append(sql.substring(sql.indexOf(\" TABLE \")+7,sql.indexOf(\"(\")).trim());\r\n newIndex.append( oldIndex.substring(oldIndex.indexOf(\"(\")) );\r\n indexes.add(newIndex);\r\n indexFound = true;\r\n }\r\n\r\n if (indexFound)\r\n sql = removeCommasAtEnd(sql);\r\n\r\n // check for unicode chars...\r\n while((index=sql.indexOf(\"\\\\u\"))!=-1) {\r\n for(int i=index+2;i<Math.min(sql.length(),index+2+6);i++)\r\n if (Character.isDigit(sql.charAt(i)) ||\r\n sql.charAt(i)=='A' ||\r\n sql.charAt(i)=='B' ||\r\n sql.charAt(i)=='C' ||\r\n sql.charAt(i)=='D' ||\r\n sql.charAt(i)=='E' ||\r\n sql.charAt(i)=='F')\r\n if (unicode.length() < 4)\r\n unicode.append(sql.charAt(i));\r\n else\r\n break;\r\n if (unicode.length()>0) {\r\n sql.delete(index, index+1+unicode.length());\r\n sql.setCharAt(index, new Character((char)Integer.valueOf(unicode.toString(),16).intValue()).charValue());\r\n unicode.delete(0, unicode.length());\r\n }\r\n }\r\n\r\n\r\n if (sql.toString().toUpperCase().contains(\"DROP TABLE\")) {\r\n // remove fks before dropping table!\r\n String table = sql.toString().toUpperCase().replace('\\n',' ').replace('\\r',' ').trim();\r\n table = table.substring(10).trim();\r\n if (table.endsWith(\";\"))\r\n table = table.substring(0,table.length()-1);\r\n ResultSet rset = conn.getMetaData().getExportedKeys(null,vo.getUsername().toUpperCase(),table);\r\n String fkName = null;\r\n String tName = null;\r\n Statement stmt2 = conn.createStatement();\r\n boolean fksFound = false;\r\n while(rset.next()) {\r\n fksFound = true;\r\n tName = rset.getString(7);\r\n fkName = rset.getString(12);\r\n\r\n if (vo.getDriverName().equals(\"com.mysql.jdbc.Driver\"))\r\n stmt2.execute(\"ALTER TABLE \"+tName+\" DROP FOREIGN KEY \"+fkName);\r\n else\r\n stmt2.execute(\"ALTER TABLE \"+tName+\" DROP CONSTRAINT \"+fkName);\r\n }\r\n try {\r\n rset.close();\r\n }\r\n catch (Exception ex6) {}\r\n\r\n if (!fksFound &&\r\n !vo.getDriverName().equals(\"oracle.jdbc.driver.OracleDriver\") &&\r\n !vo.getDriverName().equals(\"com.microsoft.jdbc.sqlserver.SQLServerDriver\") &&\r\n !vo.getDriverName().equals(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\") &&\r\n !vo.getDriverName().equals(\"com.mysql.jdbc.Driver\")\r\n && !vo.getDriverName().equals(\"org.sqlite.JDBC\")) {\r\n // case postgres...\r\n rset = conn.getMetaData().getExportedKeys(null,null,null);\r\n while(rset.next()) {\r\n if (rset.getString(3).toUpperCase().equals(table)) {\r\n tName = rset.getString(7);\r\n fkName = rset.getString(12);\r\n\r\n if (vo.getDriverName().equals(\"com.mysql.jdbc.Driver\"))\r\n stmt2.execute(\"ALTER TABLE \"+tName+\" DROP FOREIGN KEY \"+fkName);\r\n else\r\n stmt2.execute(\"ALTER TABLE \"+tName+\" DROP CONSTRAINT \"+fkName);\r\n }\r\n }\r\n try {\r\n rset.close();\r\n }\r\n catch (Exception ex6) {}\r\n }\r\n\r\n try {\r\n stmt2.close();\r\n }\r\n catch (Exception ex6) {}\r\n\r\n } // end if\r\n\r\n if (sql.toString().trim().length()>0) {\r\n String query = sql.toString().substring(0,sql.length() - 1);\r\n System.out.println(\"Execute query: \" + query);\r\n pstmt = conn.prepareStatement(query);\r\n for (int i = 0; i < vals.size(); i++) {\r\n pstmt.setObject(i + 1, vals.get(i));\r\n }\r\n\r\n try {\r\n pstmt.execute();\r\n }\r\n catch (SQLException ex4) {\r\n try {\r\n if (sql.toString().toUpperCase().contains(\"DROP TABLE\")) {\r\n//\t\t\t\t\t\t\t\t\tLogger.error(\"NONAME\", this.getClass().getName(), \"executeSQL\",\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"Invalid SQL: \" + sql, ex4);\r\n }\r\n else\r\n throw ex4;\r\n }\r\n catch (Exception exx4) {\r\n throw ex4;\r\n }\r\n }\r\n pstmt.close();\r\n }\r\n\r\n sql.delete(0, sql.length());\r\n vals.clear();\r\n }\r\n }\r\n br.close();\r\n\r\n for(int i=0;i<fks.size();i++) {\r\n sql = (StringBuffer)fks.get(i);\r\n pstmt = conn.prepareStatement(sql.toString());\r\n try {\r\n pstmt.execute();\r\n }\r\n catch (SQLException ex4) {\r\n Logger.error(\"NONAME\", this.getClass().getName(), \"executeSQL\",\r\n \"Invalid SQL: \" + sql, ex4);\r\n }\r\n pstmt.close();\r\n }\r\n\r\n for(int i=0;i<indexes.size();i++) {\r\n sql = (StringBuffer)indexes.get(i);\r\n pstmt = conn.prepareStatement(sql.toString());\r\n try {\r\n pstmt.execute();\r\n }\r\n catch (SQLException ex3) {\r\n Logger.error(\"NONAME\", this.getClass().getName(), \"executeSQL\",\r\n \"Invalid SQL: \" + sql, ex3);\r\n }\r\n pstmt.close();\r\n }\r\n\r\n conn.commit();\r\n\r\n }\r\n catch (Throwable ex) {\r\n try {\r\n Logger.error(\"NONAME\", this.getClass().getName(), \"executeSQL\",\r\n \"Invalid SQL: \" + sql, ex);\r\n }\r\n catch (Exception ex2) {\r\n }\r\n throw ex;\r\n }\r\n finally {\r\n try {\r\n if (pstmt!=null)\r\n pstmt.close();\r\n }\r\n catch (SQLException ex1) {\r\n }\r\n }\r\n }",
"public String getSql() {\n return sql;\n }",
"public void toSql(String baseDir, String out) throws IOException {\n Path pBase = Paths.get(baseDir);\n final String format = \"insert into files values(null,'%s','%s');\";\n List<String> files = new ArrayList<>();\n Files.walkFileTree(pBase, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n String fileName = file.getFileName().toString();\n String path = file.toAbsolutePath().toString();\n if (filter(path) || filter(fileName)) {\n return FileVisitResult.CONTINUE;\n }\n if (fileName.length() > 128 || path.length() > 8096) {\n System.out.println(String.format(\"warning : %s %s exced the limit\", fileName, path));\n }\n\n\n String insert = String.format(format, fileName, path);\n files.add(insert);\n if (files.size() >= 10240) {\n write2File(out, files);\n files.clear();\n }\n return FileVisitResult.CONTINUE;\n }\n });\n write2File(out, files);\n }",
"private static String processall(String sql2) {\n\t\tString sql = sql2.replace(\"and txnChannel='ALL'\", \"\").replace(\"and txntype='ALL'\", \"\")\r\n\t\t\t\t.replace(\"and txncode='ALL'\", \"\");\r\n\t\treturn sql;\r\n\t}",
"private static void executeSQL(Connection connection, String file)\n\t\t\tthrows Exception {\n\t\tStatement stmt = null;\n\t\ttry {\n\t\t\tstmt = connection.createStatement();\n\n\t\t\tString[] values = readFile(file).split(\";\");\n\n\t\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\t\tString sql = values[i].trim();\n\t\t\t\tif ((sql.length() != 0) && (!sql.startsWith(\"#\"))) {\n\t\t\t\t\tstmt.executeUpdate(sql);\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\tif (stmt != null) {\n\t\t\t\tstmt.close();\n\t\t\t}\n\t\t}\n\t}",
"public String getInsertSQL()\n\t{\n\t\tString fieldList = \"parametro, dia, valor\";\n\t\treturn String.format(\"insert into alteracs (%s) values (%d, %d, %s)\",\n\t\t\t\tfieldList, parametro, dia, String.format(\"%.3f\", valor).replace(',', '.'));\n\t}",
"public void makeSQL(String dropStament, String insertStament, String createStament, boolean[] isString, String patho, String nameFile, String filtroRow, int columnaActive){\n\t\tmanagerDB.executeScript_Void(dropStament);\n\n\t\t/* Listo los archivos que hay en la carpeta para hallar el que se llama descripcion*/ \n\t\tFile[] listOfFiles = new File(patho).listFiles();\n\t\tint i=0;\n\t\twhile ( i<listOfFiles.length && !listOfFiles[i].toString().contains(nameFile) )\n\t\t\ti++;\n\n\t\t// Si encontre el archivo creo la tabla, genero un scrip de insertar, lo ejecuto desde la consola y lo borro e inserto los datos\n\t\tif (i<listOfFiles.length){\n\n\t\t\tmanagerDB.executeScript_Void(createStament);\t\t\t\t\n\n\t\t\tif (managerDB.createExecutorFile(\"C:\\\\\", \"prueba\")){\n\t\t\t\tParserSNOMED.fileToSqlScript(patho,listOfFiles[i].getName().toString(),insertStament, filtroRow,columnaActive);\n\t\t\t\tSystem.out.println(patho + listOfFiles[i].getName().toString());\n\t\t\t\ttry{\n\t\t\t\t\tThread.sleep(1000); \n\n\t\t\t\t\tRuntime.getRuntime().exec(\"cmd /c start C:\\\\prueba.bat\");\n\t\t\t\t\tmanagerDB.waitUntisFinishConsole(\"C://\",\"done.prov\" );\n\n\t\t\t\t\t// Borro todos los archivos luego de que termine el script\n\t\t\t\t\tFile file = new File(\"C:\\\\done.prov\"); \tfile.delete();\n\t\t\t\t\t//\t\t\tfile = new File(\"C:\\\\auxFile.sql\"); \tfile.delete();\n\t\t\t\t\tfile = new File(\"C:\\\\prueba.bat\");\t\tfile.delete();\n\t\t\t\t}\n\t\t\t\tcatch (Exception e1) {\n\t\t\t\t\te1.printStackTrace();}\t\t\t\t}\n\t\t}\n\t}",
"public String toSql() {\t\n int n;\t\n void a;\t\n StringBuilder a2 = new StringBuilder();\t\n Table table = MapperHelper.getTable(this.entity);\t\n a2.append(MapperHelper.getTableName((Table)a, this.entity) + \" \" + a.alias());\t\n JoinTable[] arrjoinTable = a.joinTable();\t\n int n2 = arrjoinTable.length;\t\n int n3 = n = 0;\t\n while (n3 < n2) {\t\n JoinTable a3 = arrjoinTable[n];\t\n Table a4 = MapperHelper.getTable(a3.entity());\t\n a2.append(new StringBuilder().insert(0, \" \").append(a3.type().value()).append(\" \").toString());\t\n a2.append(new StringBuilder().insert(0, MapperHelper.getTableName(a4, this.entity)).append(\" \").append(a3.alias()).toString());\t\n a2.append(new StringBuilder().insert(0, \" ON \").append(a3.on()).toString());\t\n n3 = ++n;\t\n }\t\n StringBuilder stringBuilder = a2;\t\n stringBuilder.append(MapperHelper.getSqlMapValue(this.entity, a.extFromKeys()));\t\n return stringBuilder.toString();\t\n }",
"public static void main(String[] args) {\r\n\t\tConvertTSVToSQLiteOperation conversion = extractArguments(args);\r\n\t\tif (conversion == null)\r\n\t\t\tdie(USAGE);\r\n\t\t// first, parse the input TSV file into an SQL commands file\r\n\t\tBufferedReader reader = null;\r\n\t\tPrintWriter writer = null;\r\n\t\ttry {\r\n\t\t\treader = new BufferedReader(new FileReader(conversion.tsvFile));\r\n\t\t\twriter = new PrintWriter(conversion.sqlCommandsFile);\r\n\t\t\t// read the header line to extract the column names\r\n\t\t\tint chunk = 0;\r\n\t\t\tString line = reader.readLine();\r\n\t\t\tif (line == null)\r\n\t\t\t\tthrow new IllegalArgumentException(String.format(\r\n\t\t\t\t\t\"File [%s] does not contain a valid header line.\",\r\n\t\t\t\t\tconversion.tsvFile.getAbsolutePath()));\r\n\t\t\tString[] columns = line.split(\"\\\\t\");\r\n\t\t\tif (columns == null || columns.length < 1)\r\n\t\t\t\tthrow new IllegalArgumentException(String.format(\r\n\t\t\t\t\t\"Header line [%s] from file [%s] could not be parsed \" +\r\n\t\t\t\t\t\"to properly extract the file's column names.\", line,\r\n\t\t\t\t\tconversion.tsvFile.getAbsolutePath()));\r\n\t\t\t// read the first row to to determine column types from the values\r\n\t\t\tline = reader.readLine();\r\n\t\t\tif (line == null)\r\n\t\t\t\tthrow new IllegalArgumentException(String.format(\r\n\t\t\t\t\t\"File [%s] contains no valid data rows.\",\r\n\t\t\t\t\tconversion.tsvFile.getAbsolutePath()));\r\n\t\t\tString[] values = line.split(\"\\\\t\");\r\n\t\t\tif (values == null || values.length != columns.length)\r\n\t\t\t\tthrow new IllegalArgumentException(String.format(\r\n\t\t\t\t\t\"First data row [%s] from file [%s] could not be parsed \" +\r\n\t\t\t\t\t\"into a valid array of values, whose length matches that \" +\r\n\t\t\t\t\t\"of the parsed header line (%d).\", line,\r\n\t\t\t\t\tconversion.tsvFile.getAbsolutePath(), columns.length));\r\n\t\t\t// start with static table creation statement\r\n\t\t\tStringBuffer tableCreation =\r\n\t\t\t\tnew StringBuffer(\"CREATE TABLE Result\\n(\");\r\n\t\t\t// add columns found in the header line\r\n\t\t\tfor (int i=0; i<columns.length; i++)\r\n\t\t\t\ttableCreation.append(String.format(\"%s %s,\\n\",\r\n\t\t\t\t\tcleanColumnName(columns[i]), getColumnType(values[i])));\r\n\t\t\t// chomp trailing comma and newline\r\n\t\t\tif (tableCreation.toString().endsWith(\",\\n\"))\r\n\t\t\t\ttableCreation.setLength(tableCreation.length() - 2);\r\n\t\t\t// close the table creation statement\r\n\t\t\ttableCreation.append(\");\");\r\n\t\t\twriter.println(tableCreation.toString());\r\n\t\t\t// write static insert statement before the first chunk of rows\r\n\t\t\twriter.println(\"INSERT INTO Result SELECT\");\r\n\t\t\t// write the first row\r\n\t\t\twriter.print(getRowInsertion(values));\r\n\t\t\tchunk++;\r\n\t\t\t// write the rest of the rows\r\n\t\t\tint row = 2;\r\n\t\t\twhile ((line = reader.readLine()) != null) {\r\n\t\t\t\t// parse the row into values\r\n\t\t\t\tvalues = line.split(\"\\\\t\");\r\n\t\t\t\tif (values == null || values.length != columns.length)\r\n\t\t\t\t\tthrow new IllegalArgumentException(String.format(\r\n\t\t\t\t\t\t\"Data row %d [%s] from file [%s] could not be \" +\r\n\t\t\t\t\t\t\"parsed into a valid array of values, whose length \" +\r\n\t\t\t\t\t\t\"matches that of the parsed header line (%d).\",\r\n\t\t\t\t\t\trow, line, conversion.tsvFile.getAbsolutePath(),\r\n\t\t\t\t\t\tcolumns.length));\r\n\t\t\t\t// SQLite will only tolerate insert statements with a\r\n\t\t\t\t// maximum of 500 rows each, so if we've reached the\r\n\t\t\t\t// end of this chunk, close it out and start a new one\r\n\t\t\t\tif (chunk >= 500) {\r\n\t\t\t\t\twriter.println(\";\");\r\n\t\t\t\t\twriter.println(\"INSERT INTO Result SELECT\");\r\n\t\t\t\t\tchunk = 0;\r\n\t\t\t\t} else writer.println(\" UNION ALL SELECT\");\r\n\t\t\t\t// write this row\r\n\t\t\t\twriter.print(getRowInsertion(values));\r\n\t\t\t\trow++;\r\n\t\t\t\tchunk++;\r\n\t\t\t}\r\n\t\t\t// close the full insert statement\r\n\t\t\twriter.println(\";\");\r\n\t\t} catch (Throwable error) {\r\n\t\t\tdie(\"Could not write parsed TSV file to \" +\r\n\t\t\t\t\"SQL database creation commands file.\", error);\r\n\t\t} finally {\r\n\t\t\ttry { reader.close(); } catch (Throwable error) {}\r\n\t\t\ttry { writer.close(); } catch (Throwable error) {}\r\n\t\t}\r\n\t\t// then, create the SQLite database and\r\n\t\t// populate it with the SQL commands file\r\n\t\tProcess process = null;\r\n\t\tInteger exitValue = null;\r\n\t\tString output = null;\r\n\t\ttry {\r\n\t\t\tProcessBuilder builder = new ProcessBuilder();\r\n\t\t\tbuilder.command(\r\n\t\t\t\t\"sqlite3\", \"-batch\", \"-init\",\r\n\t\t\t\tconversion.sqlCommandsFile.getAbsolutePath(),\r\n\t\t\t\tconversion.sqliteDBFile.getAbsolutePath(), \".exit\"\r\n\t\t\t);\r\n\t\t\tbuilder.redirectErrorStream(true);\r\n\t\t\tprocess = builder.start();\r\n\t\t\texitValue = process.waitFor();\r\n\t\t\toutput = getConsoleOutput(process);\r\n\t\t} catch (Throwable error) {\r\n\t\t\tdie(\"Could not run SQL database creation commands \" +\r\n\t\t\t\t\"file to generate SQLite result database.\", error);\r\n\t\t} finally {\r\n\t\t\ttry { process.getInputStream().close(); } catch (Throwable error) {}\r\n\t\t\ttry { process.getOutputStream().close(); } catch (Throwable error) {}\r\n\t\t\ttry { process.getErrorStream().close(); } catch (Throwable error) {}\r\n\t\t\ttry { process.destroy(); } catch (Throwable error) {}\r\n\t\t}\r\n\t\t// verify that the SQLite database was successfully created\r\n\t\tif (conversion.sqliteDBFile.canRead() &&\r\n\t\t\tdatabaseCreationSucceeded(exitValue, output) == false)\r\n\t\t\tdie(String.format(\"Failed to generate SQLite result database [%s].\",\r\n\t\t\t\tconversion.sqliteDBFile.getAbsolutePath()));\r\n\t}",
"default String preprocessSQL(String sql, QueryParameters queryParameters, SessionFactoryImplementor factory,\n\t\t\t\t\t\t List<AfterLoadAction> afterLoadActions) {\n\t\t// I believe this method is only needed for query-type loaders\n\t\treturn sql;\n\t}",
"public abstract String doTableConvert(String sql);",
"private static boolean determineShowSql(CommandLine optionLine)\n {\n return optionLine.hasOption(Environment.SHOW_SQL);\n }",
"String getSqlForExternalTool(Alias alias, String sql, SqlParser parser);",
"public static List<String> separarInstrucoesSql(String script) {\n\n\t\tList<String> retorno = new ArrayList<String>();\n\n\t\tInteger posCaractereInicio = 0;\n\t\tInteger posCaractereFim = 0;\n\t\tString terminador = \";\";\n\t\tboolean terminouScript = false;\n\n\t\tscript = script.trim();\n\n\t\twhile (!terminouScript) {\n\n\t\t\tscript = script.trim();\n\n\t\t\tif (script.length() < 3) {\n\t\t\t\tterminouScript = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// verifica se inicia com set term\n\t\t\tString caractereAvaliado = script.substring(posCaractereInicio, 10).toUpperCase();\n\t\t\tcaractereAvaliado = script.replaceAll(\" \", \"\");\n\n\t\t\tif (caractereAvaliado.startsWith(\"SETTERM\")) {\n\t\t\t\tterminador = caractereAvaliado.substring(7, 8);\n\t\t\t\tposCaractereInicio = devolvePosicaoCaractere(script, terminador) + 2;\n\n\t\t\t\tscript = script.substring(posCaractereInicio);\n\t\t\t\tposCaractereInicio = 0;\n\t\t\t}\n\n\t\t\t// comentarios fora da instrução SQL\n\t\t\tif (caractereAvaliado.substring(0, 2).equals(\"/*\")) {\n\t\t\t\tposCaractereFim = devolveUltimaPosicaoScript(script, \"*/\", true);\n\t\t\t\tscript = script.substring(posCaractereFim + 2);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tposCaractereInicio = posicaoDoPrimeiroCaracterValido(script);\n\n\t\t\tif (posCaractereInicio > 0) {\n\t\t\t\tscript = script.substring(posCaractereInicio);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// percorrer a string até encontrar o terminador\n\t\t\tposCaractereFim = devolveUltimaPosicaoScript(script, terminador);\n\n\t\t\tif (script.length() < 3) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// adicionado na lista de scripts\n\t\t\t// System.out.println(\"-----------------------------------\");\n\t\t\t// System.out.println(script.substring(posCaractereInicio,\n\t\t\t// posCaractereFim));\n\n\t\t\tretorno.add(script.substring(posCaractereInicio, posCaractereFim));\n\n\t\t\tif (script.length() > posCaractereFim + 1)\n\t\t\t\tscript = script.substring(posCaractereFim + 1);\n\n\t\t\t// terminou os scripts\n\t\t\tscript = script.trim();\n\t\t\tif (script.length() < 10)\n\t\t\t\tterminouScript = true;\n\n\t\t\tposCaractereInicio = 0;\n\n\t\t}\n\n\t\treturn retorno;\n\t}",
"public String[] getSqlStrings()\n {\n ArrayList<String> statements = new ArrayList<String>();\n statements.add(\"create schema bruce;\"); // hibernate won't create the schema for us\n\n try\n {\n // schema ddl is in a .sql file at the root of bruce.jar\n final String ddlString = readFileResource(\"cluster-ddl.sql\").toString();\n final StringTokenizer tokenizer = new StringTokenizer(ddlString, DDL_DELIMITER);\n while (tokenizer.hasMoreTokens())\n {\n statements.add(tokenizer.nextToken());\n }\n }\n catch (IOException e)\n {\n LOGGER.error(\"Cannot load SQL strings\", e);\n }\n return statements.toArray(new String[statements.size()]);\n }",
"private void setSql() {\n sql = sqlData.getSql();\n }",
"public static void generate(Database database, String output, PrintWriter outLog)\r\n {\r\n try\r\n {\r\n String fileName;\r\n if (database.output.length() > 0)\r\n fileName = database.output;\r\n else\r\n fileName = database.name;\r\n outLog.println(\"DDL: \" + output + fileName + \".sql\");\r\n OutputStream outFile = new FileOutputStream(output + fileName + \".sql\");\r\n try\r\n {\r\n PrintWriter outData = new PrintWriter(outFile);\r\n for (int i=0; i < database.tables.size(); i++)\r\n generate((Table) database.tables.elementAt(i), outData);\r\n outData.flush();\r\n }\r\n finally\r\n {\r\n outFile.close();\r\n }\r\n }\r\n catch (IOException e1)\r\n {\r\n outLog.println(\"Generate Oracle SQL IO Error\");\r\n }\r\n }",
"public void logSQL(BindedCompiledSQL bsql, String sqlStatment, long nanoTime) ;",
"public StringBuffer createInsertBegin(String tableName){\n\t\t\n\t\tStringBuffer sql = new StringBuffer();\n\t\t\n\t\tsql.append(Constants.INSERT);\n\t\tsql.append(Constants.INTO);\n\t\tsql.append(tableName);\n\t\tsql.append(Constants.LINE_SPACE);\n\t\tsql.append(Constants.OPEN_BRACKET);\n\t\t\n\t\tint index =0;\n\t\tList<Column> nonAutoIncrementColumns = dbStructure.getTable(tableName).getNonAutoIncrementColumns();\n\t\tfor(Column column : nonAutoIncrementColumns){\n\t\t\tsql.append(column.getName());\n\t\t\tindex++;\n\t\t\tif(index < nonAutoIncrementColumns.size()) { \n\t\t\t\tsql.append(Constants.COMMA);\n\t\t\t\tsql.append(Constants.LINE_SPACE);\n\t\t\t}\n\t\t}\n\t\t\n\t\tsql.append(Constants.CLOSE_BRACKET);\n\t\tsql.append(Constants.LINE_SPACE);\n\t\tsql.append(Constants.VALUES);\n\t\n\t\treturn sql;\n\t}",
"public static SqlTree parseSql(String sql) throws Exception {\n if (StringUtils.isBlank(sql)){\n throw new RuntimeException(\"sql is not null\");\n }\n if (LOCAL_SQL_PLUGIN_ROOT == null){\n throw new RuntimeException(\"need to set local sql plugin root\");\n }\n\n //将sql格式化成一行字符串\n sql = sql.replaceAll(\"--.*\", \"\")\n .replaceAll(\"\\r\\n\", \" \")\n .replaceAll(\"\\n\", \" \")\n .replaceAll(\"\\t\", \" \").trim();\n\n //以;将每个sql语句分割开\n List<String> sqlArr = DtStringUtil.splitIgnoreQuota(sql, SQL_DELIMITER);\n SqlTree sqlTree = new SqlTree();\n AbstractTableInfoParser tableInfoParser = new AbstractTableInfoParser();\n //遍历sql语句\n for (String childSql: sqlArr) {\n if (Strings.isNullOrEmpty(childSql)){\n continue;\n }\n boolean result = false;\n //每一条sql语句都和四种解析器做匹配CreateFuncParser, CreateTableParser, CreateTmpTableParser, InsertSqlParser\n for (IParser sqlParser: sqlParserList) {\n if (!sqlParser.verify(childSql)){\n continue;\n }\n\n sqlParser.parseSql(childSql, sqlTree);\n result = true;\n break;\n }\n if (!result){\n throw new RuntimeException(String.format(\"%s:Syntax does not support,the format of SQL like insert into tb1 select * from tb2.\", childSql));\n }\n }\n\n //解析exec-sql\n if(sqlTree.getExecSqlList().size() == 0){\n throw new RuntimeException(\"sql no executable statement\");\n }\n\n for (InsertSqlParser.SqlParseResult result: sqlTree.getExecSqlList()) {\n List<String> sourceTableList = result.getSourceTableList();\n List<String> targetTableList = result.getTargetTableList();\n Set<String> tmpTableList = sqlTree.getTmpTableMap().keySet();\n\n for(String tableName : sourceTableList){\n\n //temp 中不包括tableName ,那么这个tableName 的来源只能来自source/side\n if (!tmpTableList.contains(tableName)){\n CreateTableParser.SqlParserResult createTableResult = sqlTree.getPreDealTableMap().get(tableName);\n if(createTableResult == null){\n throw new RuntimeException(\"can't find table \" + tableName);\n }\n\n AbstractTableInfo tableInfo = tableInfoParser.parseWithTableType(ETableType.SOURCE.getType(),\n createTableResult, LOCAL_SQL_PLUGIN_ROOT);\n sqlTree.addTableInfo(tableName, tableInfo);\n }\n }\n\n for(String tableName : targetTableList){\n //temp 中不包括tableName ,那么这个tableName 的来源只能来自sink\n if (!tmpTableList.contains(tableName)){\n CreateTableParser.SqlParserResult createTableResult = sqlTree.getPreDealTableMap().get(tableName);\n if(createTableResult == null){\n throw new RuntimeException(\"can't find table \" + tableName);\n }\n\n AbstractTableInfo tableInfo = tableInfoParser.parseWithTableType(ETableType.SINK.getType(),\n createTableResult, LOCAL_SQL_PLUGIN_ROOT);\n sqlTree.addTableInfo(tableName, tableInfo);\n }\n }\n\n }\n\n\n for (CreateTmpTableParser.SqlParserResult result : sqlTree.getTmpSqlList()){\n List<String> sourceTableList = result.getSourceTableList();\n for(String tableName : sourceTableList){\n //临时表中的source不是来源子source节点\n if (!sqlTree.getTableInfoMap().keySet().contains(tableName)){\n CreateTableParser.SqlParserResult createTableResult = sqlTree.getPreDealTableMap().get(tableName);\n\n if(createTableResult == null){\n CreateTmpTableParser.SqlParserResult tmpTableResult = sqlTree.getTmpTableMap().get(tableName);\n if (tmpTableResult == null){\n throw new RuntimeException(\"can't find table \" + tableName);\n }\n } else {\n AbstractTableInfo tableInfo = tableInfoParser.parseWithTableType(ETableType.SOURCE.getType(),\n createTableResult, LOCAL_SQL_PLUGIN_ROOT);\n sqlTree.addTableInfo(tableName, tableInfo);\n }\n }\n }\n }\n\n return sqlTree;\n }",
"private static SqlScalars generateSqlForPerson(OptionsId options) {\n SqlScalars sqlScalars = new SqlScalars();\n // Make sure to set the alias for the files for the Transformation into the class\n sqlScalars.addToSql(\"SELECT DISTINCT p.id,p.name,\");\n sqlScalars.addToSql(\"p.first_name AS firstName,\");\n sqlScalars.addToSql(\"p.last_name AS lastName,\");\n sqlScalars.addToSql(\"p.birth_day AS birthDay,\");\n sqlScalars.addToSql(\"p.birth_place AS birthPlace,\");\n sqlScalars.addToSql(\"p.birth_name AS birthName,\");\n sqlScalars.addToSql(\"p.death_day AS deathDay,\");\n sqlScalars.addToSql(\"p.death_place AS deathPlace\");\n sqlScalars.addToSql(DataItemTools.addSqlDataItems(options.splitDataItems(), \"p\").toString());\n sqlScalars.addToSql(\"FROM person p\");\n\n if (options.getId() > 0L) {\n sqlScalars.addToSql(\"WHERE p.status\" + SQL_IGNORE_STATUS_SET);\n sqlScalars.addToSql(\"AND id=:id\");\n sqlScalars.addParameter(LITERAL_ID, options.getId());\n } else {\n if (MapUtils.isNotEmpty(options.splitJobs())) {\n sqlScalars.addToSql(\", cast_crew c\");\n }\n sqlScalars.addToSql(\"WHERE p.status\" + SQL_IGNORE_STATUS_SET);\n\n if (MapUtils.isNotEmpty(options.splitJobs())) {\n sqlScalars.addToSql(\"AND p.id=c.person_id\");\n sqlScalars.addToSql(\"AND c.job IN (:jobs)\");\n sqlScalars.addParameter(\"jobs\", options.getJobTypes());\n }\n\n // Add the search string\n sqlScalars.addToSql(options.getSearchString(false));\n // This will default to blank if there's no sort required\n sqlScalars.addToSql(options.getSortString());\n }\n\n sqlScalars.addScalar(LITERAL_ID, LongType.INSTANCE);\n sqlScalars.addScalar(LITERAL_NAME, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_FIRST_NAME, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_LAST_NAME, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_BIRTH_DAY, DateType.INSTANCE);\n sqlScalars.addScalar(LITERAL_BIRTH_PLACE, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_BIRTH_NAME, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_DEATH_DAY, DateType.INSTANCE);\n sqlScalars.addScalar(LITERAL_DEATH_PLACE, StringType.INSTANCE);\n\n // add Scalars for additional data item columns\n DataItemTools.addDataItemScalars(sqlScalars, options.splitDataItems());\n\n return sqlScalars;\n }",
"public void runScript(StringBuffer sqlScript)\n throws DataAccessLayerException {\n runScript(sqlScript.toString());\n }",
"private StringBuilder startBuild() {\n StringBuilder strBuilder = new StringBuilder()\n .append(\"CREATE EXTERNAL TABLE IF NOT EXISTS \");\n if (databaseName != null) {\n strBuilder.append(databaseName).append('.');\n }\n strBuilder.append(tableName);\n\n // yeah... schema is not always required.\n if (hiveSchema != null) {\n strBuilder.append(\" \").append(hiveSchema);\n }\n\n if (tableComment != null && !tableComment.isEmpty()) {\n strBuilder.append(\" COMMENT '\")\n .append(tableComment)\n .append(\"'\");\n }\n\n if (partitioning != null && !partitioning.getFields().isEmpty()) {\n strBuilder.append(\" PARTITIONED BY (\");\n for (Map.Entry<String, Partitioning.FieldType> entry : partitioning.getFields().entrySet()) {\n strBuilder = shouldEscapeColumns ?\n strBuilder.append('`').append(entry.getKey()).append('`') : strBuilder.append(entry.getKey());\n strBuilder.append(\" \")\n .append(FieldTypes.toHiveType(entry.getValue()))\n .append(\", \");\n }\n // remove trailing \", \"\n strBuilder.deleteCharAt(strBuilder.length() - 1)\n .deleteCharAt(strBuilder.length() - 1)\n .append(\")\");\n }\n\n if (rowFormat != null) {\n strBuilder.append(\" ROW FORMAT \").append(rowFormat);\n }\n return strBuilder;\n }",
"private String getCommitTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table VCS_COMMIT(\");\n \t\tbuilder.append(\"VCS_COMMIT_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"BEFORE_REVISION_ID LONG,\");\n \t\tbuilder.append(\"AFTER_REVISION_ID LONG,\");\n \t\tbuilder.append(\"BEFORE_REVISION_IDENTIFIER TEXT,\");\n \t\tbuilder.append(\"AFTER_REVISION_IDENTIFIER TEXT\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}",
"String getStartTransactionSql();",
"protected void runSQL(String sql) {\n\t\ttry {\n\t\t\tDataSource dataSource = monthlyTradingPersistence.getDataSource();\n\n\t\t\tDB db = DBManagerUtil.getDB();\n\n\t\t\tsql = db.buildSQL(sql);\n\t\t\tsql = PortalUtil.transformSQL(sql);\n\n\t\t\tSqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,\n\t\t\t\t\tsql);\n\n\t\t\tsqlUpdate.update();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new SystemException(e);\n\t\t}\n\t}",
"public void createDBSchema() throws NoConnectionToDBException, SQLException, IOException {\n \n InputStream in = EDACCApp.class.getClassLoader().getResourceAsStream(\"edacc/resources/edacc.sql\");\n if (in == null) {\n throw new SQLQueryFileNotFoundException();\n }\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n String line;\n String text = \"\";\n String l;\n while ((line = br.readLine()) != null) {\n if (!(l = line.replaceAll(\"\\\\s\", \"\")).isEmpty() && !l.startsWith(\"--\")) {\n text += line + \" \";\n }\n }\n in.close();\n Vector<String> queries = new Vector<String>();\n String query = \"\";\n String delimiter = \";\";\n int i = 0;\n while (i < text.length()) {\n if (text.toLowerCase().startsWith(\"delimiter\", i)) {\n i += 10;\n delimiter = text.substring(i, text.indexOf(' ', i));\n i = text.indexOf(' ', i);\n } else if (text.startsWith(delimiter, i)) {\n queries.add(query);\n i += delimiter.length();\n query = \"\";\n } else {\n query += text.charAt(i);\n i++;\n }\n }\n if (!query.replaceAll(\" \", \"\").equals(\"\")) {\n queries.add(query);\n }\n boolean autoCommit = getConn().getAutoCommit();\n try {\n getConn().setAutoCommit(false);\n Statement st = getConn().createStatement();\n for (String q : queries) {\n st.execute(q);\n }\n st.close();\n getConn().commit();\n } catch (SQLException e) {\n getConn().rollback();\n throw e;\n } finally {\n getConn().setAutoCommit(autoCommit);\n }\n }",
"private String getStringToCreateDB(String addings) {\n StringBuffer createDBStringBuffer = new StringBuffer();\n createDBStringBuffer\n .append(SQLFormater.CREATE_TABLE)\n .append(\" \")\n .append(tableName)\n .append(\"(\")\n .append(idFieldName)\n .append(\" \")\n .append(DBCreator.INTEGER_TYPE)\n .append(\" \")\n .append(SQLFormater.PRIMARY_KEY);\n mapFieldsTypes.forEach((kField, vType) -> { // add all table's fields\n createDBStringBuffer\n .append(\", \")\n .append(kField)\n .append(\" \")\n .append(vType);\n if(mapFieldsConstraints.containsKey(kField)) { // add constraint for a field\n createDBStringBuffer\n .append(\" \")\n .append(mapFieldsConstraints.get(kField));\n }\n });\n if (addings != null && !addings.isEmpty()) { // add reference\n createDBStringBuffer\n .append(\", \")\n .append(addings);\n }\n createDBStringBuffer.append(\")\");\n return createDBStringBuffer.toString();\n }",
"@Override\n\tpublic String toSql() {\n\t\treturn null;\n\t}",
"private String getFileTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table FILE(\");\n \t\tbuilder.append(\"FILE_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"FILE_PATH TEXT,\");\n \t\tbuilder.append(\"START_REVISION_ID LONG,\");\n \t\tbuilder.append(\"END_REVISION_ID LONG\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}",
"protected void runSQL(String sql) {\n\t\ttry {\n\t\t\tDataSource dataSource = localRichPersistence.getDataSource();\n\n\t\t\tDB db = DBManagerUtil.getDB();\n\n\t\t\tsql = db.buildSQL(sql);\n\t\t\tsql = PortalUtil.transformSQL(sql);\n\n\t\t\tSqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,\n\t\t\t\t\tsql);\n\n\t\t\tsqlUpdate.update();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new SystemException(e);\n\t\t}\n\t}",
"public String readSQLFile(String filename) {\n\t\tString query = null;\n\t\ttry (BufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(\n\t\t\t\t\t\tgetClass().getResourceAsStream(\"/sql/\" + filename + \".sql\")))) {\n\t\t\tList<String> lines = reader.lines().collect(Collectors.toList());\n\t\t\tquery = join(\" \", lines).replaceAll(\"\\\\s+\", \" \");\n\t\t} catch (IOException e) {\n\t\t\tString msg = \"Can't read SQL file \" + filename;\n\t\t\tlogger.error(msg, e);\n\t\t\tthrow new RuntimeException(msg, e);\n\t\t}\n\t\treturn query;\n\t}"
] | [
"0.7084737",
"0.6632544",
"0.6629594",
"0.65648204",
"0.65144783",
"0.65076524",
"0.644618",
"0.6268573",
"0.62072265",
"0.6203873",
"0.61247385",
"0.60779566",
"0.60773426",
"0.6057253",
"0.6048805",
"0.5974095",
"0.59367114",
"0.5904975",
"0.58781046",
"0.5874237",
"0.58499235",
"0.5844382",
"0.58332497",
"0.58244675",
"0.58075887",
"0.5796571",
"0.57893103",
"0.5779378",
"0.5779378",
"0.5776051",
"0.5741161",
"0.5738496",
"0.57358336",
"0.57163996",
"0.56962",
"0.56899506",
"0.5669045",
"0.56674814",
"0.56660944",
"0.566064",
"0.5656478",
"0.5640313",
"0.56379676",
"0.56231827",
"0.5579386",
"0.5579079",
"0.55648905",
"0.5554032",
"0.5551759",
"0.5516176",
"0.55154234",
"0.5504874",
"0.55027586",
"0.5502589",
"0.54973596",
"0.5496619",
"0.54941726",
"0.54787934",
"0.54748464",
"0.5469892",
"0.546635",
"0.54660606",
"0.5462009",
"0.5454024",
"0.5451649",
"0.54501945",
"0.5425784",
"0.54209155",
"0.5419226",
"0.5419221",
"0.5409169",
"0.5404783",
"0.54009897",
"0.5398863",
"0.53941196",
"0.539068",
"0.538994",
"0.5389662",
"0.5379533",
"0.53777885",
"0.537726",
"0.53734446",
"0.53724873",
"0.5363865",
"0.53441274",
"0.53414273",
"0.53410226",
"0.5338652",
"0.5337073",
"0.5336305",
"0.5325396",
"0.5321325",
"0.5319025",
"0.5312042",
"0.53073525",
"0.5302273",
"0.5299918",
"0.52943856",
"0.5276414",
"0.5272459"
] | 0.66595656 | 1 |
TODO Autogenerated method stub | public static void main(String[] args) {
System.out.println(pow (3,1000));
System.out.println(pow (3,1000));
} | {
"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 |
Creates new form fixedCarEntry | public FixedCarEntry() {
initComponents();
this.setIconImage(new ImageIcon(this.getClass().getResource("/images/car-icon.png")).getImage());
this.setLocationRelativeTo(null);
getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
KeyStroke.getKeyStroke(KeyEvent.VK_ACCEPT, 0), "Accept");
getRootPane().getActionMap().put("Accept", new AbstractAction(){
public void actionPerformed(ActionEvent e)
{
priceTextFieldActionPerformed(e);
}
});
getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "Escape");
getRootPane().getActionMap().put("Escape", new AbstractAction(){
public void actionPerformed(ActionEvent e)
{
setVisible(false);
}
});
getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0), "F1");
getRootPane().getActionMap().put("F1", new AbstractAction(){
public void actionPerformed(ActionEvent e)
{
priceTextFieldActionPerformed(e);
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void AddCarGUI(Car newCar){\n \n switch (newCar.path) { \n case 0:\n carModel.addRow(new Object[]{newCar.carId,\"East\",\"West\",newCar.status, newCar.timeLeft});\n break;\n case 1: \n carModel.addRow(new Object[]{newCar.carId,\"East\",\"South\",newCar.status, newCar.timeLeft});\n break; \n case 2: \n carModel.addRow(new Object[]{newCar.carId,\"West\",\"South\",newCar.status, newCar.timeLeft});\n break; \n case 3: \n carModel.addRow(new Object[]{newCar.carId,\"West\",\"East\",newCar.status, newCar.timeLeft}); \n break; \n case 4: \n carModel.addRow(new Object[]{newCar.carId,\"South\",\"East\",newCar.status, newCar.timeLeft}); \n break; \n case 5: \n carModel.addRow(new Object[]{newCar.carId,\"South\",\"West\",newCar.status, newCar.timeLeft});\n break; \n default: \n System.out.println(\"Car not reaching crossing\"); \n break; \n } \n }",
"public void createButtonClicked() {\n clearInputFieldStyle();\n setAllFieldsAndSliderDisabled(false);\n setButtonsDisabled(false, true, true);\n setDefaultValues();\n Storage.setSelectedRaceCar(null);\n }",
"@SneakyThrows\n private void addCar(ActionEvent event) {\n final Project project = table.getSelectionModel().getSelectedItem();\n if (project == null) {\n NotificationUtil.warningAlert(\"Warning\", \"Select project first\", NotificationUtil.SHORT);\n return;\n }\n final FXMLLoader fxmlLoader = new FXMLLoader();\n fxmlLoader.setLocation(getClass().getResource(\"/entity/EditCarList.fxml\"));\n final Parent parent = fxmlLoader.load();\n EditCarListController editCarListController = fxmlLoader.getController();\n editCarListController.loadCars(project);\n final Stage stage = new Stage();\n stage.setTitle(\"Patriot Defence\");\n Scene value = new Scene(parent);\n value.getStylesheets().add(\"css/main.css\");\n stage.setScene(value);\n stage.initModality(Modality.WINDOW_MODAL);\n Window window = ((Node) event.getSource()).getScene().getWindow();\n stage.initOwner(window);\n stage.show();\n\n stage.setOnHiding(e -> loadProjects());\n }",
"public void btn_newEntry() throws IOException, SQLException {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"NewEntry.fxml\"));\n Parent parent = fxmlLoader.load();\n NewEntryController newEntryController = fxmlLoader.<NewEntryController>getController();\n newEntryController.setPresenter(presenter);\n newEntryController.fillComboBox();\n this.stageNewEntry = new Stage();\n stageNewEntry.setTitle(bundle.getString(\"entryNew.title\"));\n stageNewEntry.setScene(new Scene(parent, 400, 400));\n stageNewEntry.setAlwaysOnTop(true);\n stageNewEntry.setResizable(false);\n stageNewEntry.initModality(Modality.APPLICATION_MODAL);\n stageNewEntry.getIcons().add(new Image(String.valueOf(this.getClass().getResource(\"images/logo.png\"))));\n stageNewEntry.show();\n }",
"public void newElemento(Elemento item, Carrito carrito){\n SQLiteDatabase db = helper.getWritableDatabase();\r\n\r\n // TODO: 12.- Mapeamos columnas con valores\r\n // Crea un nuevo mapa de valores, de tipo clave-valor, donde clave es nombre de columna\r\n ContentValues values = new ContentValues();\r\n values.put(ElementosContract.Entrada.COLUMNA_CARRITO_ID, carrito.getId());\r\n values.put(ElementosContract.Entrada.COLUMNA_NOMBRE_PRODUCTO, item.getNombreProducto());\r\n values.put(ElementosContract.Entrada.COLUMNA_PRECIO_PRODUCTO, item.getPrecioProducto());\r\n values.put(ElementosContract.Entrada.COLUMNA_CANTIDAD, item.getCantidad());\r\n\r\n // TODO: 13.- Insertamos fila\r\n // Inserta la nueva fila, regresando el valor de la primary key\r\n long newRowId = db.insert(ElementosContract.Entrada.NOMBRE_TABLA, null, values);\r\n\r\n // cierra conexión\r\n db.close();\r\n }",
"private void saveRaceCar() {\n if(Storage.getSelectedRaceCar() == null){\n RaceCar raceCar = new RaceCar(\n Storage.getNewId(),\n Double.valueOf(cornerWeightFLInput.getText()),\n Double.valueOf(cornerWeightFRInput.getText()),\n Double.valueOf(cornerWeightRLInput.getText()),\n Double.valueOf(cornerWeightRRInput.getText())\n );\n setRaceCarDefaultsToValues(raceCar);\n Storage.addRaceCar(raceCar);\n Storage.setSelectedRaceCar(raceCar);\n }else{\n RaceCar raceCar = Storage.getSelectedRaceCar();\n raceCar.setCornerWeightFL(Double.valueOf(cornerWeightFLInput.getText()));\n raceCar.setCornerWeightFR(Double.valueOf(cornerWeightFRInput.getText()));\n raceCar.setCornerWeightRL(Double.valueOf(cornerWeightRLInput.getText()));\n raceCar.setCornerWeightRR(Double.valueOf(cornerWeightRRInput.getText()));\n setRaceCarDefaultsToValues(raceCar);\n Storage.replaceRaceCar(raceCar);\n Storage.setSelectedRaceCar(raceCar);\n }\n }",
"@FXML\n\tprivate void handleNewTaxi() {\n\t\tTaxi tempTaxi = new Taxi();\n\t\tboolean okClicked = mainApp.showTaxiEditDialog(tempTaxi);\n\t\tif (okClicked) {\n\t\t\tmainApp.getTaxiData().add(tempTaxi);\n\t\t}\n\t}",
"private void insertFields()\n {\n RideDetails details=new RideDetails();\n details.setStartPt(editStartingPt.getText().toString());\n details.setEndPt(editEndingPt.getText().toString());\n\n try {\n details.setTravelDate(dateFormatter.parse(editDate.getText().toString()));\n\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n details.setNoSpot(Integer.parseInt(editNoSpot.getText().toString()));\n\n\n dbOperations(details);\n\n }",
"public addcar() {\n initComponents();\n }",
"@Override\r\n protected void createDbContentCreateEdit() {\n DbContentCreateEdit dbContentCreateEdit = new DbContentCreateEdit();\r\n dbContentCreateEdit.init(null);\r\n form.getModelObject().setDbContentCreateEdit(dbContentCreateEdit);\r\n dbContentCreateEdit.setParent(form.getModelObject());\r\n ruServiceHelper.updateDbEntity(form.getModelObject()); \r\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n ManufactureTxt = new javax.swing.JTextField();\n ManuYearTxt = new javax.swing.JTextField();\n ModelTxt = new javax.swing.JTextField();\n SerialNumTxt = new javax.swing.JTextField();\n SeatNumTxt = new javax.swing.JTextField();\n UpdateDateTxt = new javax.swing.JTextField();\n ExpDateTxt = new javax.swing.JTextField();\n AvailableCheckBox = new javax.swing.JCheckBox();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n LatitudeTxt = new javax.swing.JTextField();\n LongitudeTxt = new javax.swing.JTextField();\n jLabel11 = new javax.swing.JLabel();\n SaveBtn = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n jLabel12 = new javax.swing.JLabel();\n CityTxt = new javax.swing.JTextField();\n jLabel13 = new javax.swing.JLabel();\n\n jLabel1.setText(\"Create Cars\");\n\n jLabel2.setText(\"Manufacturer\");\n\n jLabel3.setText(\"Model\");\n\n jLabel4.setText(\"Manufactured Year\");\n\n jLabel5.setText(\"Serial Number\");\n\n jLabel6.setText(\"Seat Number\");\n\n jLabel7.setText(\"Updata Date\");\n\n jLabel8.setText(\"Expired Date\");\n\n ManufactureTxt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ManufactureTxtActionPerformed(evt);\n }\n });\n\n ManuYearTxt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ManuYearTxtActionPerformed(evt);\n }\n });\n\n ModelTxt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ModelTxtActionPerformed(evt);\n }\n });\n\n SerialNumTxt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n SerialNumTxtActionPerformed(evt);\n }\n });\n\n SeatNumTxt.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n SeatNumTxtKeyTyped(evt);\n }\n });\n\n AvailableCheckBox.setText(\"Availabel\");\n\n jLabel9.setText(\"Latitude\");\n\n jLabel10.setText(\"Longitude\");\n\n LongitudeTxt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n LongitudeTxtActionPerformed(evt);\n }\n });\n\n jLabel11.setText(\"GPS Location\");\n\n SaveBtn.setText(\"Save\");\n SaveBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n SaveBtnActionPerformed(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 .addGap(0, 265, Short.MAX_VALUE)\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 373, Short.MAX_VALUE)\n );\n\n jLabel12.setText(\"City\");\n\n jLabel13.setText(\"Date Format: yyyy-MM-dd\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(299, 299, 299)\n .addComponent(jLabel1))\n .addGroup(layout.createSequentialGroup()\n .addGap(66, 66, 66)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel4)\n .addComponent(jLabel2)\n .addComponent(jLabel5)\n .addComponent(jLabel6)\n .addComponent(jLabel7)\n .addComponent(jLabel3)\n .addComponent(jLabel8)\n .addComponent(jLabel12))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(CityTxt, javax.swing.GroupLayout.DEFAULT_SIZE, 120, Short.MAX_VALUE)\n .addComponent(ManufactureTxt, javax.swing.GroupLayout.DEFAULT_SIZE, 120, Short.MAX_VALUE)\n .addComponent(ManuYearTxt)\n .addComponent(ModelTxt)\n .addComponent(SerialNumTxt)\n .addComponent(SeatNumTxt)\n .addComponent(UpdateDateTxt)\n .addComponent(ExpDateTxt))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(104, 104, 104)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel10)\n .addComponent(jLabel9))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(LatitudeTxt, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)\n .addComponent(LongitudeTxt)))\n .addGroup(layout.createSequentialGroup()\n .addGap(12, 12, 12)\n .addComponent(jLabel11))))\n .addGroup(layout.createSequentialGroup()\n .addGap(148, 148, 148)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(SaveBtn)\n .addComponent(AvailableCheckBox)))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel13)))\n .addGap(57, 57, 57)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(21, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(41, 41, 41)\n .addComponent(jLabel1)\n .addGap(23, 23, 23)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel11)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(ManufactureTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel9)\n .addComponent(LatitudeTxt, 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(jLabel4)\n .addComponent(ManuYearTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel10)\n .addComponent(LongitudeTxt, 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(jLabel3)\n .addComponent(ModelTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(8, 8, 8)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(SerialNumTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(AvailableCheckBox))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(SeatNumTxt, 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(jLabel7)\n .addComponent(UpdateDateTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel13))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8)\n .addComponent(ExpDateTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(SaveBtn))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel12)\n .addComponent(CityTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(62, Short.MAX_VALUE))\n );\n }",
"private Vehicle createVehicle(/*ResultSet rs*/) {\n // creates a vehicle using the specific form data\n //Form would get every field\n //This is dummy data\n Vehicle vehicle = new Vehicle();\n// try {\n int id = 1;\n String marca = \"marca\";\n String modelo = \"modelo\";\n double cilindrada = 2.0;\n int cavalos = 120;\n double preco = 1000.0;\n int quilometros = 200000;\n java.sql.Date date = new Date(1996-10-21);\n String combustivel = \"combustivel\";\n// //ADICIONAR\n vehicle.setId(id);\n vehicle.setMarca(marca);\n vehicle.setModelo(modelo);\n vehicle.setCilindrada(cilindrada);\n vehicle.setCavalos(cavalos);\n vehicle.setPreco(preco);\n vehicle.setDate(date);\n vehicle.setQuilometros(quilometros);\n vehicle.setCombustivel(Combustiveis.valueOf(combustivel));\n\n// } catch (SQLException e) {\n// e.printStackTrace();\n// }\n return vehicle;\n }",
"public Entry create(int compoID,\n\t\t\tint entryID,\n\t\t\tString entryName,\n\t\t\tString entryDesc,\n\t\t\tString entryAuthor) throws CreateException, RemoteException;",
"public ua.org.gostroy.guestbook.model.Entry3 create(long entryId);",
"public ViewCreatePagamento() {\n initComponents();\n clientesDAO cDAO = DaoFactory.createClientesDao(); \n matriculaDAO mDAO = DaoFactory.createMatriculaDao();\n \n cmbIDClientes.addItem(null);\n cDAO.findAll().forEach((p) -> {\n cmbIDClientes.addItem(p.getNome());\n });\n \n \n txtDataAtual.setText(DateFormat.getDateInstance().format(new Date()));\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n String address = enterAddress.getText();\n String issue = enterAddress.getText();\n String model = enterModel.getText();\n //date method\n Date date = new Date();\n //creating a quick CentralAC list\n CentralAC acEntry = new CentralAC(address, issue, date, model);\n //adding items to the Arraylist\n HVACGUI.newCentralAC.add(acEntry);\n //adding items to the default list model\n HVACGUI.openService.addElement(acEntry);\n //disposing the form\n CentralAC_GUI.this.dispose();\n\n\n }",
"@Test\n public void createFormSceduleEntry(){\n ScheduleEntry entry = new ScheduleEntry(\"9;00AM\", new SystemCalendar(2018,4,25));\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n carDialog = new javax.swing.JDialog();\n saveDlgBtn = new javax.swing.JButton();\n deleteDlgBtn = new javax.swing.JButton();\n cancelDlgBtn = new javax.swing.JButton();\n jPanel4 = new javax.swing.JPanel();\n classCB = new javax.swing.JComboBox();\n yearDlgLbl = new javax.swing.JLabel();\n modelDlgTxt = new javax.swing.JTextField();\n classDlgLbl = new javax.swing.JLabel();\n colorDlgTxt = new javax.swing.JTextField();\n yearDlgSpn = new javax.swing.JSpinner();\n colorDlgLbl = new javax.swing.JLabel();\n statusDlgCB = new javax.swing.JComboBox();\n statusDlgLbl = new javax.swing.JLabel();\n plateDlgLbl = new javax.swing.JLabel();\n plateDlgTxt = new javax.swing.JTextField();\n brandDlgLbl = new javax.swing.JLabel();\n modelDlgLbl = new javax.swing.JLabel();\n brandDlgTxt = new javax.swing.JTextField();\n jPanel5 = new javax.swing.JPanel();\n serviceMonthDlgSpn = new javax.swing.JSpinner();\n milieageDlgTxt = new javax.swing.JTextField();\n mileageDlgLbl = new javax.swing.JLabel();\n branchCB = new javax.swing.JComboBox();\n branchDlgLbl = new javax.swing.JLabel();\n lastServiceMileageDlgTxt = new javax.swing.JTextField();\n lastServiceMileageDlgLbl = new javax.swing.JLabel();\n lastServiceDlgLbl = new javax.swing.JLabel();\n serviceMilesDlgLbl = new javax.swing.JLabel();\n serviceMilesDlgTxt = new javax.swing.JTextField();\n serviceMonthDlgLbl = new javax.swing.JLabel();\n carClassDialog = new javax.swing.JDialog();\n nameDlgLbl = new javax.swing.JLabel();\n nameDlgTxt = new javax.swing.JTextField();\n displayNameDlgLbl = new javax.swing.JLabel();\n displayNameDlgTxt = new javax.swing.JTextField();\n priceDlgLbl = new javax.swing.JLabel();\n priceDlgTxt = new javax.swing.JTextField();\n saveDlgBtn1 = new javax.swing.JButton();\n deleteDlgBtn1 = new javax.swing.JButton();\n cancelDlgBtn1 = new javax.swing.JButton();\n descriptionDlgLbl = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n staffDialog = new javax.swing.JDialog();\n saveDlgBtn2 = new javax.swing.JButton();\n deleteDlgBtn2 = new javax.swing.JButton();\n cancelDlgBtn2 = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n staffNameDlgLbl = new javax.swing.JLabel();\n surnameDlgLbl = new javax.swing.JLabel();\n usernameDlgLbl = new javax.swing.JLabel();\n passwordDlgLbl = new javax.swing.JLabel();\n passwordPwd = new javax.swing.JPasswordField();\n usernameDlgTxt = new javax.swing.JTextField();\n surnameDlgTxt = new javax.swing.JTextField();\n staffNameDlgTxt = new javax.swing.JTextField();\n jPanel3 = new javax.swing.JPanel();\n jScrollPane6 = new javax.swing.JScrollPane();\n addressDlgTA = new javax.swing.JTextArea();\n addressDlgLbl = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n dateOfBirthDlgLbl = new javax.swing.JLabel();\n emailDlgLbl = new javax.swing.JLabel();\n PhoneDlgLbl = new javax.swing.JLabel();\n emailDlgTxt = new javax.swing.JTextField();\n phoneDlgTxt = new javax.swing.JTextField();\n extensionDlg = new javax.swing.JDialog();\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 mainPanel = new javax.swing.JPanel();\n tabPanel = new javax.swing.JTabbedPane();\n staffPanel = new javax.swing.JPanel();\n carClassSearchPanel1 = new javax.swing.JPanel();\n staffNameLbl = new javax.swing.JLabel();\n staffSurnameLbl = new javax.swing.JLabel();\n staffNameTxt = new javax.swing.JTextField();\n staffSurnameTxt = new javax.swing.JTextField();\n staffAddBtn = new javax.swing.JButton();\n staffClearBtn = new javax.swing.JButton();\n jScrollPane5 = new javax.swing.JScrollPane();\n staffTbl = new org.jdesktop.swingx.JXTable();\n rentalPanel = new javax.swing.JPanel();\n rentalSearchPanel = new javax.swing.JPanel();\n refCodeLbl = new javax.swing.JLabel();\n rentalRefCodeTxt = new javax.swing.JTextField();\n surnameLbl = new javax.swing.JLabel();\n rentalSurnameTxt = new javax.swing.JTextField();\n rentalClearBtn = new javax.swing.JButton();\n rentalDeleteBtn = new javax.swing.JButton();\n jScrollPane2 = new javax.swing.JScrollPane();\n rentalTbl = new org.jdesktop.swingx.JXTable();\n carPanel = new javax.swing.JPanel();\n carSearchPanel = new javax.swing.JPanel();\n plateLbl = new javax.swing.JLabel();\n brandLbl = new javax.swing.JLabel();\n modelLbl = new javax.swing.JLabel();\n classLbl = new javax.swing.JLabel();\n yearLbl = new javax.swing.JLabel();\n colorLbl = new javax.swing.JLabel();\n statusLbl = new javax.swing.JLabel();\n carPlateTxt = new javax.swing.JTextField();\n carBrandTxt = new javax.swing.JTextField();\n carModelTxt = new javax.swing.JTextField();\n carClassCb = new javax.swing.JComboBox();\n carYearTxt = new javax.swing.JTextField();\n carColorTxt = new javax.swing.JTextField();\n carStatusCB = new javax.swing.JComboBox();\n carAddBtn = new javax.swing.JButton();\n carClearBtn = new javax.swing.JButton();\n jScrollPane3 = new javax.swing.JScrollPane();\n carTbl = new org.jdesktop.swingx.JXTable();\n carClassPanel = new javax.swing.JPanel();\n carClassSearchPanel = new javax.swing.JPanel();\n carClassNameLbl = new javax.swing.JLabel();\n carClassDisplayLbl = new javax.swing.JLabel();\n carClassNameTxt = new javax.swing.JTextField();\n carClassDisplayTxt = new javax.swing.JTextField();\n carClassClearBtn = new javax.swing.JButton();\n carClassAddBtn = new javax.swing.JButton();\n jScrollPane4 = new javax.swing.JScrollPane();\n carClassTbl = new org.jdesktop.swingx.JXTable();\n openStaffBtn = new javax.swing.JButton();\n\n carDialog.setAlwaysOnTop(true);\n carDialog.setMinimumSize(new java.awt.Dimension(550, 271));\n carDialog.setName(\"carDialog\"); // NOI18N\n\n org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance().getContext().getResourceMap(AdminView.class);\n saveDlgBtn.setText(resourceMap.getString(\"saveDlgBtn.text\")); // NOI18N\n saveDlgBtn.setName(\"saveDlgBtn\"); // NOI18N\n\n deleteDlgBtn.setText(resourceMap.getString(\"deleteDlgBtn.text\")); // NOI18N\n deleteDlgBtn.setName(\"deleteDlgBtn\"); // NOI18N\n\n cancelDlgBtn.setText(resourceMap.getString(\"cancelDlgBtn.text\")); // NOI18N\n cancelDlgBtn.setName(\"cancelDlgBtn\"); // NOI18N\n\n jPanel4.setName(\"jPanel4\"); // NOI18N\n\n classCB.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n classCB.setName(\"classCB\"); // NOI18N\n\n yearDlgLbl.setText(resourceMap.getString(\"yearDlgLbl.text\")); // NOI18N\n yearDlgLbl.setName(\"yearDlgLbl\"); // NOI18N\n\n modelDlgTxt.setName(\"modelDlgTxt\"); // NOI18N\n\n classDlgLbl.setText(resourceMap.getString(\"classDlgLbl.text\")); // NOI18N\n classDlgLbl.setName(\"classDlgLbl\"); // NOI18N\n\n colorDlgTxt.setName(\"colorDlgTxt\"); // NOI18N\n\n yearDlgSpn.setName(\"yearDlgSpn\"); // NOI18N\n\n colorDlgLbl.setText(resourceMap.getString(\"colorDlgLbl.text\")); // NOI18N\n colorDlgLbl.setName(\"colorDlgLbl\"); // NOI18N\n\n statusDlgCB.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n statusDlgCB.setName(\"statusDlgCB\"); // NOI18N\n\n statusDlgLbl.setText(resourceMap.getString(\"statusDlgLbl.text\")); // NOI18N\n statusDlgLbl.setName(\"statusDlgLbl\"); // NOI18N\n\n plateDlgLbl.setText(resourceMap.getString(\"plateDlgLbl.text\")); // NOI18N\n plateDlgLbl.setName(\"plateDlgLbl\"); // NOI18N\n\n plateDlgTxt.setName(\"plateDlgTxt\"); // NOI18N\n\n brandDlgLbl.setText(resourceMap.getString(\"brandDlgLbl.text\")); // NOI18N\n brandDlgLbl.setName(\"brandDlgLbl\"); // NOI18N\n\n modelDlgLbl.setText(resourceMap.getString(\"modelDlgLbl.text\")); // NOI18N\n modelDlgLbl.setName(\"modelDlgLbl\"); // NOI18N\n\n brandDlgTxt.setName(\"brandDlgTxt\"); // NOI18N\n\n javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(plateDlgLbl)\n .addComponent(modelDlgLbl)\n .addComponent(yearDlgLbl)\n .addComponent(classDlgLbl)\n .addComponent(colorDlgLbl)\n .addComponent(statusDlgLbl)\n .addComponent(brandDlgLbl))\n .addGap(18, 18, 18)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(classCB, javax.swing.GroupLayout.Alignment.TRAILING, 0, 149, Short.MAX_VALUE)\n .addComponent(modelDlgTxt, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)\n .addComponent(colorDlgTxt, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)\n .addComponent(yearDlgSpn, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)\n .addComponent(plateDlgTxt, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)\n .addComponent(statusDlgCB, javax.swing.GroupLayout.Alignment.TRAILING, 0, 149, Short.MAX_VALUE)\n .addComponent(brandDlgTxt, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)))\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addComponent(plateDlgLbl))\n .addComponent(plateDlgTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(brandDlgTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(brandDlgLbl))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGap(8, 8, 8)\n .addComponent(modelDlgLbl))\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGap(2, 2, 2)\n .addComponent(modelDlgTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addComponent(classDlgLbl))\n .addComponent(classCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addComponent(yearDlgLbl))\n .addComponent(yearDlgSpn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addComponent(colorDlgLbl))\n .addComponent(colorDlgTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addComponent(statusDlgLbl))\n .addComponent(statusDlgCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n );\n\n jPanel5.setName(\"jPanel5\"); // NOI18N\n\n serviceMonthDlgSpn.setName(\"serviceMonthDlgSpn\"); // NOI18N\n\n milieageDlgTxt.setName(\"milieageDlgTxt\"); // NOI18N\n\n mileageDlgLbl.setText(resourceMap.getString(\"mileageDlgLbl.text\")); // NOI18N\n mileageDlgLbl.setName(\"mileageDlgLbl\"); // NOI18N\n\n branchCB.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n branchCB.setName(\"branchCB\"); // NOI18N\n\n branchDlgLbl.setText(resourceMap.getString(\"branchDlgLbl.text\")); // NOI18N\n branchDlgLbl.setName(\"branchDlgLbl\"); // NOI18N\n\n lastServiceMileageDlgTxt.setName(\"lastServiceMileageDlgTxt\"); // NOI18N\n\n lastServiceMileageDlgLbl.setText(resourceMap.getString(\"lastServiceMileageDlgLbl.text\")); // NOI18N\n lastServiceMileageDlgLbl.setName(\"lastServiceMileageDlgLbl\"); // NOI18N\n\n lastServiceDlgLbl.setText(resourceMap.getString(\"lastServiceDlgLbl.text\")); // NOI18N\n lastServiceDlgLbl.setName(\"lastServiceDlgLbl\"); // NOI18N\n\n serviceMilesDlgLbl.setText(resourceMap.getString(\"serviceMilesDlgLbl.text\")); // NOI18N\n serviceMilesDlgLbl.setName(\"serviceMilesDlgLbl\"); // NOI18N\n\n serviceMilesDlgTxt.setName(\"serviceMilesDlgTxt\"); // NOI18N\n\n serviceMonthDlgLbl.setText(resourceMap.getString(\"serviceMonthDlgLbl.text\")); // NOI18N\n serviceMonthDlgLbl.setName(\"serviceMonthDlgLbl\"); // NOI18N\n\n javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);\n jPanel5.setLayout(jPanel5Layout);\n jPanel5Layout.setHorizontalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(lastServiceDlgLbl)\n .addComponent(branchDlgLbl)\n .addComponent(serviceMonthDlgLbl)\n .addComponent(serviceMilesDlgLbl)\n .addComponent(lastServiceMileageDlgLbl)\n .addComponent(mileageDlgLbl))\n .addGap(18, 18, 18)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(branchCB, 0, 149, Short.MAX_VALUE)\n .addComponent(serviceMilesDlgTxt, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(lastServiceMileageDlgTxt, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE)\n .addComponent(milieageDlgTxt, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE))\n .addGap(1, 1, 1))\n .addComponent(serviceMonthDlgSpn, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)))\n );\n jPanel5Layout.setVerticalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addComponent(mileageDlgLbl))\n .addComponent(milieageDlgTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addComponent(lastServiceMileageDlgLbl))\n .addComponent(lastServiceMileageDlgTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(lastServiceDlgLbl)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addComponent(branchDlgLbl))\n .addComponent(branchCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGap(12, 12, 12)\n .addComponent(serviceMonthDlgLbl))\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(serviceMonthDlgSpn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addComponent(serviceMilesDlgLbl))\n .addComponent(serviceMilesDlgTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n );\n\n javax.swing.GroupLayout carDialogLayout = new javax.swing.GroupLayout(carDialog.getContentPane());\n carDialog.getContentPane().setLayout(carDialogLayout);\n carDialogLayout.setHorizontalGroup(\n carDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(carDialogLayout.createSequentialGroup()\n .addGroup(carDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(carDialogLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(18, 18, 18)\n .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(carDialogLayout.createSequentialGroup()\n .addGap(144, 144, 144)\n .addComponent(saveDlgBtn)\n .addGap(18, 18, 18)\n .addComponent(deleteDlgBtn)\n .addGap(18, 18, 18)\n .addComponent(cancelDlgBtn)))\n .addContainerGap())\n );\n carDialogLayout.setVerticalGroup(\n carDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(carDialogLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(carDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(carDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE, false)\n .addComponent(saveDlgBtn)\n .addComponent(deleteDlgBtn)\n .addComponent(cancelDlgBtn))\n .addContainerGap(47, Short.MAX_VALUE))\n );\n\n carClassDialog.setAlwaysOnTop(true);\n carClassDialog.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n carClassDialog.setMinimumSize(new java.awt.Dimension(409, 296));\n carClassDialog.setModal(true);\n carClassDialog.setName(\"carClassDialog\"); // NOI18N\n\n nameDlgLbl.setText(resourceMap.getString(\"nameDlgLbl.text\")); // NOI18N\n nameDlgLbl.setName(\"nameDlgLbl\"); // NOI18N\n\n nameDlgTxt.setName(\"nameDlgTxt\"); // NOI18N\n\n displayNameDlgLbl.setText(resourceMap.getString(\"displayNameDlgLbl.text\")); // NOI18N\n displayNameDlgLbl.setName(\"displayNameDlgLbl\"); // NOI18N\n\n displayNameDlgTxt.setName(\"displayNameDlgTxt\"); // NOI18N\n\n priceDlgLbl.setText(resourceMap.getString(\"priceDlgLbl.text\")); // NOI18N\n priceDlgLbl.setName(\"priceDlgLbl\"); // NOI18N\n\n priceDlgTxt.setName(\"priceDlgTxt\"); // NOI18N\n\n saveDlgBtn1.setText(resourceMap.getString(\"saveDlgBtn1.text\")); // NOI18N\n saveDlgBtn1.setName(\"saveDlgBtn1\"); // NOI18N\n\n deleteDlgBtn1.setText(resourceMap.getString(\"deleteDlgBtn1.text\")); // NOI18N\n deleteDlgBtn1.setName(\"deleteDlgBtn1\"); // NOI18N\n\n cancelDlgBtn1.setText(resourceMap.getString(\"cancelDlgBtn1.text\")); // NOI18N\n cancelDlgBtn1.setName(\"cancelDlgBtn1\"); // NOI18N\n\n descriptionDlgLbl.setText(resourceMap.getString(\"descriptionDlgLbl.text\")); // NOI18N\n descriptionDlgLbl.setName(\"descriptionDlgLbl\"); // NOI18N\n\n jScrollPane1.setName(\"jScrollPane1\"); // NOI18N\n\n jTextArea1.setColumns(20);\n jTextArea1.setRows(5);\n jTextArea1.setName(\"jTextArea1\"); // NOI18N\n jScrollPane1.setViewportView(jTextArea1);\n\n javax.swing.GroupLayout carClassDialogLayout = new javax.swing.GroupLayout(carClassDialog.getContentPane());\n carClassDialog.getContentPane().setLayout(carClassDialogLayout);\n carClassDialogLayout.setHorizontalGroup(\n carClassDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(carClassDialogLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(carClassDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, carClassDialogLayout.createSequentialGroup()\n .addGroup(carClassDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(displayNameDlgLbl)\n .addComponent(priceDlgLbl)\n .addComponent(nameDlgLbl)\n .addComponent(descriptionDlgLbl))\n .addGap(18, 18, 18)\n .addGroup(carClassDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 298, Short.MAX_VALUE)\n .addComponent(displayNameDlgTxt, javax.swing.GroupLayout.DEFAULT_SIZE, 298, Short.MAX_VALUE)\n .addComponent(priceDlgTxt, javax.swing.GroupLayout.DEFAULT_SIZE, 298, Short.MAX_VALUE)\n .addGroup(carClassDialogLayout.createSequentialGroup()\n .addGap(1, 1, 1)\n .addComponent(nameDlgTxt, javax.swing.GroupLayout.DEFAULT_SIZE, 297, Short.MAX_VALUE))))\n .addGroup(carClassDialogLayout.createSequentialGroup()\n .addComponent(saveDlgBtn1)\n .addGap(18, 18, 18)\n .addComponent(deleteDlgBtn1)\n .addGap(18, 18, 18)\n .addComponent(cancelDlgBtn1)))\n .addContainerGap())\n );\n carClassDialogLayout.setVerticalGroup(\n carClassDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(carClassDialogLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(carClassDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(nameDlgLbl)\n .addComponent(nameDlgTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(carClassDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(displayNameDlgLbl)\n .addComponent(displayNameDlgTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(carClassDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(priceDlgLbl)\n .addComponent(priceDlgTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(11, 11, 11)\n .addGroup(carClassDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(carClassDialogLayout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)\n .addGap(18, 18, 18)\n .addGroup(carClassDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE, false)\n .addComponent(cancelDlgBtn1)\n .addComponent(deleteDlgBtn1)\n .addComponent(saveDlgBtn1)))\n .addComponent(descriptionDlgLbl))\n .addContainerGap())\n );\n\n staffDialog.setAlwaysOnTop(true);\n staffDialog.setMinimumSize(new java.awt.Dimension(517, 340));\n staffDialog.setModal(true);\n staffDialog.setName(\"staffDialog\"); // NOI18N\n\n saveDlgBtn2.setIcon(resourceMap.getIcon(\"saveDlgBtn2.icon\")); // NOI18N\n saveDlgBtn2.setText(resourceMap.getString(\"saveDlgBtn2.text\")); // NOI18N\n saveDlgBtn2.setName(\"saveDlgBtn2\"); // NOI18N\n\n deleteDlgBtn2.setIcon(resourceMap.getIcon(\"deleteDlgBtn2.icon\")); // NOI18N\n deleteDlgBtn2.setText(resourceMap.getString(\"deleteDlgBtn2.text\")); // NOI18N\n deleteDlgBtn2.setName(\"deleteDlgBtn2\"); // NOI18N\n\n cancelDlgBtn2.setIcon(resourceMap.getIcon(\"cancelDlgBtn2.icon\")); // NOI18N\n cancelDlgBtn2.setText(resourceMap.getString(\"cancelDlgBtn2.text\")); // NOI18N\n cancelDlgBtn2.setName(\"cancelDlgBtn2\"); // NOI18N\n\n jPanel1.setName(\"jPanel1\"); // NOI18N\n\n staffNameDlgLbl.setText(resourceMap.getString(\"staffNameDlgLbl.text\")); // NOI18N\n staffNameDlgLbl.setName(\"staffNameDlgLbl\"); // NOI18N\n\n surnameDlgLbl.setText(resourceMap.getString(\"surnameDlgLbl.text\")); // NOI18N\n surnameDlgLbl.setName(\"surnameDlgLbl\"); // NOI18N\n\n usernameDlgLbl.setText(resourceMap.getString(\"usernameDlgLbl.text\")); // NOI18N\n usernameDlgLbl.setName(\"usernameDlgLbl\"); // NOI18N\n\n passwordDlgLbl.setText(resourceMap.getString(\"passwordDlgLbl.text\")); // NOI18N\n passwordDlgLbl.setName(\"passwordDlgLbl\"); // NOI18N\n\n passwordPwd.setName(\"passwordPwd\"); // NOI18N\n\n usernameDlgTxt.setName(\"usernameDlgTxt\"); // NOI18N\n\n surnameDlgTxt.setName(\"surnameDlgTxt\"); // NOI18N\n\n staffNameDlgTxt.setName(\"staffNameDlgTxt\"); // NOI18N\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 .addComponent(passwordDlgLbl)\n .addComponent(usernameDlgLbl)\n .addComponent(surnameDlgLbl)\n .addComponent(staffNameDlgLbl))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(passwordPwd, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)\n .addComponent(usernameDlgTxt, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)\n .addComponent(surnameDlgTxt, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)\n .addComponent(staffNameDlgTxt, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(staffNameDlgLbl)\n .addComponent(staffNameDlgTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(surnameDlgLbl)\n .addComponent(surnameDlgTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(usernameDlgLbl)\n .addComponent(usernameDlgTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(12, 12, 12)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(passwordDlgLbl)\n .addComponent(passwordPwd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n jPanel3.setName(\"jPanel3\"); // NOI18N\n\n jScrollPane6.setName(\"jScrollPane6\"); // NOI18N\n\n addressDlgTA.setColumns(20);\n addressDlgTA.setRows(5);\n addressDlgTA.setName(\"addressDlgTA\"); // NOI18N\n jScrollPane6.setViewportView(addressDlgTA);\n\n addressDlgLbl.setText(resourceMap.getString(\"addressDlgLbl.text\")); // NOI18N\n addressDlgLbl.setName(\"addressDlgLbl\"); // NOI18N\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 .addContainerGap()\n .addComponent(addressDlgLbl)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 448, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap(17, Short.MAX_VALUE)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()\n .addComponent(addressDlgLbl)\n .addGap(44, 44, 44))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()\n .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())))\n );\n\n jPanel2.setName(\"jPanel2\"); // NOI18N\n\n dateOfBirthDlgLbl.setText(resourceMap.getString(\"dateOfBirthDlgLbl.text\")); // NOI18N\n dateOfBirthDlgLbl.setName(\"dateOfBirthDlgLbl\"); // NOI18N\n\n emailDlgLbl.setText(resourceMap.getString(\"emailDlgLbl.text\")); // NOI18N\n emailDlgLbl.setName(\"emailDlgLbl\"); // NOI18N\n\n PhoneDlgLbl.setText(resourceMap.getString(\"PhoneDlgLbl.text\")); // NOI18N\n PhoneDlgLbl.setName(\"PhoneDlgLbl\"); // NOI18N\n\n emailDlgTxt.setName(\"emailDlgTxt\"); // NOI18N\n\n phoneDlgTxt.setName(\"phoneDlgTxt\"); // NOI18N\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 .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(dateOfBirthDlgLbl)\n .addComponent(emailDlgLbl)\n .addComponent(PhoneDlgLbl))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(emailDlgTxt, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 185, Short.MAX_VALUE)\n .addComponent(phoneDlgTxt, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 185, 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(dateOfBirthDlgLbl)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(emailDlgLbl)\n .addComponent(emailDlgTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(PhoneDlgLbl)\n .addComponent(phoneDlgTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(15, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout staffDialogLayout = new javax.swing.GroupLayout(staffDialog.getContentPane());\n staffDialog.getContentPane().setLayout(staffDialogLayout);\n staffDialogLayout.setHorizontalGroup(\n staffDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, staffDialogLayout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(staffDialogLayout.createSequentialGroup()\n .addGap(104, 104, 104)\n .addComponent(saveDlgBtn2, javax.swing.GroupLayout.DEFAULT_SIZE, 85, Short.MAX_VALUE)\n .addGap(18, 18, 18)\n .addComponent(deleteDlgBtn2, javax.swing.GroupLayout.DEFAULT_SIZE, 91, Short.MAX_VALUE)\n .addGap(18, 18, 18)\n .addComponent(cancelDlgBtn2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(108, 108, 108))\n );\n staffDialogLayout.setVerticalGroup(\n staffDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(staffDialogLayout.createSequentialGroup()\n .addGroup(staffDialogLayout.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 .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.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(staffDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(deleteDlgBtn2)\n .addComponent(cancelDlgBtn2)\n .addComponent(saveDlgBtn2))\n .addContainerGap())\n );\n\n extensionDlg.setTitle(resourceMap.getString(\"extensionDlg.title\")); // NOI18N\n extensionDlg.setAlwaysOnTop(true);\n extensionDlg.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n extensionDlg.setIconImage(null);\n extensionDlg.setMinimumSize(new java.awt.Dimension(281, 200));\n extensionDlg.setModal(true);\n extensionDlg.setModalExclusionType(java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE);\n extensionDlg.setName(\"extensionDlg\"); // NOI18N\n extensionDlg.setResizable(false);\n\n oldDateLbl.setText(resourceMap.getString(\"oldDateLbl.text\")); // NOI18N\n oldDateLbl.setName(\"oldDateLbl\"); // NOI18N\n\n oldDateDP.setEditable(false);\n oldDateDP.setName(\"oldDateDP\"); // NOI18N\n\n newDateLbl.setText(resourceMap.getString(\"newDateLbl.text\")); // NOI18N\n newDateLbl.setName(\"newDateLbl\"); // NOI18N\n\n newDateDP.setName(\"newDateDP\"); // NOI18N\n\n Extendsbtn.setText(resourceMap.getString(\"Extendsbtn.text\")); // NOI18N\n Extendsbtn.setName(\"Extendsbtn\"); // NOI18N\n\n javax.swing.GroupLayout extensionDlgLayout = new javax.swing.GroupLayout(extensionDlg.getContentPane());\n extensionDlg.getContentPane().setLayout(extensionDlgLayout);\n extensionDlgLayout.setHorizontalGroup(\n extensionDlgLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(extensionDlgLayout.createSequentialGroup()\n .addGroup(extensionDlgLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, extensionDlgLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(extensionDlgLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(oldDateLbl)\n .addComponent(newDateLbl))\n .addGap(23, 23, 23)\n .addGroup(extensionDlgLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(newDateDP, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(oldDateDP, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)))\n .addGroup(extensionDlgLayout.createSequentialGroup()\n .addGap(90, 90, 90)\n .addComponent(Extendsbtn)))\n .addContainerGap())\n );\n extensionDlgLayout.setVerticalGroup(\n extensionDlgLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(extensionDlgLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(extensionDlgLayout.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(extensionDlgLayout.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 .addGap(18, 18, 18)\n .addComponent(Extendsbtn)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(resourceMap.getString(\"Form.title\")); // NOI18N\n setName(\"Admin\"); // NOI18N\n\n mainPanel.setName(\"mainPanel\"); // NOI18N\n\n tabPanel.setName(\"tabPanel\"); // NOI18N\n\n staffPanel.setName(\"staffPanel\"); // NOI18N\n\n carClassSearchPanel1.setName(\"carClassSearchPanel1\"); // NOI18N\n\n staffNameLbl.setText(resourceMap.getString(\"staffNameLbl.text\")); // NOI18N\n staffNameLbl.setName(\"staffNameLbl\"); // NOI18N\n\n staffSurnameLbl.setText(resourceMap.getString(\"staffSurnameLbl.text\")); // NOI18N\n staffSurnameLbl.setName(\"staffSurnameLbl\"); // NOI18N\n\n staffNameTxt.setName(\"staffNameTxt\"); // NOI18N\n\n staffSurnameTxt.setName(\"staffSurnameTxt\"); // NOI18N\n\n javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance().getContext().getActionMap(AdminView.class, this);\n staffAddBtn.setAction(actionMap.get(\"carDialog\")); // NOI18N\n staffAddBtn.setIcon(resourceMap.getIcon(\"staffAddBtn.icon\")); // NOI18N\n staffAddBtn.setText(resourceMap.getString(\"staffAddBtn.text\")); // NOI18N\n staffAddBtn.setName(\"staffAddBtn\"); // NOI18N\n\n staffClearBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/oscar/view/resources/clean.png\"))); // NOI18N\n staffClearBtn.setText(resourceMap.getString(\"staffClearBtn.text\")); // NOI18N\n staffClearBtn.setName(\"staffClearBtn\"); // NOI18N\n\n javax.swing.GroupLayout carClassSearchPanel1Layout = new javax.swing.GroupLayout(carClassSearchPanel1);\n carClassSearchPanel1.setLayout(carClassSearchPanel1Layout);\n carClassSearchPanel1Layout.setHorizontalGroup(\n carClassSearchPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(carClassSearchPanel1Layout.createSequentialGroup()\n .addGroup(carClassSearchPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(staffClearBtn)\n .addComponent(staffAddBtn)\n .addGroup(carClassSearchPanel1Layout.createSequentialGroup()\n .addGroup(carClassSearchPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(staffSurnameLbl)\n .addComponent(staffNameLbl))\n .addGap(18, 18, 18)\n .addGroup(carClassSearchPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(staffSurnameTxt)\n .addComponent(staffNameTxt, javax.swing.GroupLayout.DEFAULT_SIZE, 70, Short.MAX_VALUE))))\n .addContainerGap())\n );\n carClassSearchPanel1Layout.setVerticalGroup(\n carClassSearchPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(carClassSearchPanel1Layout.createSequentialGroup()\n .addGroup(carClassSearchPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(staffNameLbl)\n .addComponent(staffNameTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(carClassSearchPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(staffSurnameLbl)\n .addComponent(staffSurnameTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(staffClearBtn)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(staffAddBtn))\n );\n\n jScrollPane5.setName(\"jScrollPane5\"); // NOI18N\n\n staffTbl.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {},\n {},\n {},\n {}\n },\n new String [] {\n\n }\n ));\n staffTbl.setAutoStartEditOnKeyStroke(false);\n staffTbl.setEditable(false);\n staffTbl.setName(\"staffTbl\"); // NOI18N\n staffTbl.getTableHeader().setReorderingAllowed(false);\n jScrollPane5.setViewportView(staffTbl);\n staffTbl.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n\n javax.swing.GroupLayout staffPanelLayout = new javax.swing.GroupLayout(staffPanel);\n staffPanel.setLayout(staffPanelLayout);\n staffPanelLayout.setHorizontalGroup(\n staffPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(staffPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(carClassSearchPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 544, Short.MAX_VALUE)\n .addContainerGap())\n );\n staffPanelLayout.setVerticalGroup(\n staffPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(staffPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(staffPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 534, Short.MAX_VALUE)\n .addComponent(carClassSearchPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n tabPanel.addTab(resourceMap.getString(\"staffPanel.TabConstraints.tabTitle\"), staffPanel); // NOI18N\n\n rentalPanel.setName(\"rentalPanel\"); // NOI18N\n\n rentalSearchPanel.setName(\"rentalSearchPanel\"); // NOI18N\n\n refCodeLbl.setText(resourceMap.getString(\"refCodeLbl.text\")); // NOI18N\n refCodeLbl.setName(\"refCodeLbl\"); // NOI18N\n\n rentalRefCodeTxt.setName(\"rentalRefCodeTxt\"); // NOI18N\n\n surnameLbl.setText(resourceMap.getString(\"surnameLbl.text\")); // NOI18N\n surnameLbl.setName(\"surnameLbl\"); // NOI18N\n\n rentalSurnameTxt.setName(\"rentalSurnameTxt\"); // NOI18N\n\n rentalClearBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/oscar/view/resources/clean.png\"))); // NOI18N\n rentalClearBtn.setText(resourceMap.getString(\"rentalClearBtn.text\")); // NOI18N\n rentalClearBtn.setName(\"rentalClearBtn\"); // NOI18N\n\n rentalDeleteBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/oscar/view/resources/delete.png\"))); // NOI18N\n rentalDeleteBtn.setText(resourceMap.getString(\"rentalDeleteBtn.text\")); // NOI18N\n rentalDeleteBtn.setName(\"rentalDeleteBtn\"); // NOI18N\n\n javax.swing.GroupLayout rentalSearchPanelLayout = new javax.swing.GroupLayout(rentalSearchPanel);\n rentalSearchPanel.setLayout(rentalSearchPanelLayout);\n rentalSearchPanelLayout.setHorizontalGroup(\n rentalSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(rentalSearchPanelLayout.createSequentialGroup()\n .addGroup(rentalSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(rentalSearchPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(rentalSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(refCodeLbl)\n .addComponent(surnameLbl))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(rentalSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(rentalRefCodeTxt, javax.swing.GroupLayout.DEFAULT_SIZE, 105, Short.MAX_VALUE)\n .addComponent(rentalSurnameTxt, javax.swing.GroupLayout.DEFAULT_SIZE, 105, Short.MAX_VALUE)))\n .addComponent(rentalClearBtn)\n .addComponent(rentalDeleteBtn))\n .addContainerGap())\n );\n rentalSearchPanelLayout.setVerticalGroup(\n rentalSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(rentalSearchPanelLayout.createSequentialGroup()\n .addGroup(rentalSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(rentalRefCodeTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(refCodeLbl))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(rentalSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(rentalSurnameTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(surnameLbl))\n .addGap(18, 18, 18)\n .addComponent(rentalClearBtn)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(rentalDeleteBtn))\n );\n\n jScrollPane2.setName(\"jScrollPane2\"); // NOI18N\n\n rentalTbl.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n\n }\n ));\n rentalTbl.setAutoStartEditOnKeyStroke(false);\n rentalTbl.setEditable(false);\n rentalTbl.setName(\"rentalTbl\"); // NOI18N\n rentalTbl.getTableHeader().setReorderingAllowed(false);\n jScrollPane2.setViewportView(rentalTbl);\n rentalTbl.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n\n javax.swing.GroupLayout rentalPanelLayout = new javax.swing.GroupLayout(rentalPanel);\n rentalPanel.setLayout(rentalPanelLayout);\n rentalPanelLayout.setHorizontalGroup(\n rentalPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(rentalPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(rentalSearchPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 488, Short.MAX_VALUE)\n .addContainerGap())\n );\n rentalPanelLayout.setVerticalGroup(\n rentalPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(rentalPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(rentalPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(rentalSearchPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 534, Short.MAX_VALUE))\n .addContainerGap())\n );\n\n tabPanel.addTab(resourceMap.getString(\"rentalPanel.TabConstraints.tabTitle\"), rentalPanel); // NOI18N\n\n carPanel.setName(\"carPanel\"); // NOI18N\n\n carSearchPanel.setName(\"carSearchPanel\"); // NOI18N\n\n plateLbl.setText(resourceMap.getString(\"plateLbl.text\")); // NOI18N\n plateLbl.setName(\"plateLbl\"); // NOI18N\n\n brandLbl.setText(resourceMap.getString(\"brandLbl.text\")); // NOI18N\n brandLbl.setName(\"brandLbl\"); // NOI18N\n\n modelLbl.setText(resourceMap.getString(\"modelLbl.text\")); // NOI18N\n modelLbl.setName(\"modelLbl\"); // NOI18N\n\n classLbl.setText(resourceMap.getString(\"classLbl.text\")); // NOI18N\n classLbl.setName(\"classLbl\"); // NOI18N\n\n yearLbl.setText(resourceMap.getString(\"yearLbl.text\")); // NOI18N\n yearLbl.setName(\"yearLbl\"); // NOI18N\n\n colorLbl.setText(resourceMap.getString(\"colorLbl.text\")); // NOI18N\n colorLbl.setName(\"colorLbl\"); // NOI18N\n\n statusLbl.setText(resourceMap.getString(\"statusLbl.text\")); // NOI18N\n statusLbl.setEnabled(false);\n statusLbl.setName(\"statusLbl\"); // NOI18N\n\n carPlateTxt.setName(\"carPlateTxt\"); // NOI18N\n\n carBrandTxt.setName(\"carBrandTxt\"); // NOI18N\n\n carModelTxt.setName(\"carModelTxt\"); // NOI18N\n\n carClassCb.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n carClassCb.setName(\"carClassCb\"); // NOI18N\n\n carYearTxt.setName(\"carYearTxt\"); // NOI18N\n\n carColorTxt.setName(\"carColorTxt\"); // NOI18N\n\n carStatusCB.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n carStatusCB.setEnabled(false);\n carStatusCB.setName(\"carStatusCB\"); // NOI18N\n\n carAddBtn.setAction(actionMap.get(\"carDialog\")); // NOI18N\n carAddBtn.setIcon(resourceMap.getIcon(\"carAddBtn.icon\")); // NOI18N\n carAddBtn.setText(resourceMap.getString(\"carAddBtn.text\")); // NOI18N\n carAddBtn.setName(\"carAddBtn\"); // NOI18N\n\n carClearBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/oscar/view/resources/clean.png\"))); // NOI18N\n carClearBtn.setText(resourceMap.getString(\"carClearBtn.text\")); // NOI18N\n carClearBtn.setName(\"carClearBtn\"); // NOI18N\n\n javax.swing.GroupLayout carSearchPanelLayout = new javax.swing.GroupLayout(carSearchPanel);\n carSearchPanel.setLayout(carSearchPanelLayout);\n carSearchPanelLayout.setHorizontalGroup(\n carSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(carSearchPanelLayout.createSequentialGroup()\n .addGroup(carSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(carSearchPanelLayout.createSequentialGroup()\n .addGroup(carSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(brandLbl)\n .addComponent(plateLbl)\n .addComponent(modelLbl)\n .addComponent(classLbl)\n .addComponent(yearLbl)\n .addComponent(colorLbl)\n .addComponent(statusLbl))\n .addGap(18, 18, 18)\n .addGroup(carSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(carStatusCB, javax.swing.GroupLayout.Alignment.LEADING, 0, 66, Short.MAX_VALUE)\n .addComponent(carColorTxt, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 66, Short.MAX_VALUE)\n .addComponent(carYearTxt, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 66, Short.MAX_VALUE)\n .addComponent(carModelTxt, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 66, Short.MAX_VALUE)\n .addComponent(carBrandTxt, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 66, Short.MAX_VALUE)\n .addComponent(carPlateTxt, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 66, Short.MAX_VALUE)\n .addComponent(carClassCb, 0, 66, Short.MAX_VALUE)))\n .addComponent(carClearBtn)\n .addComponent(carAddBtn))\n .addContainerGap())\n );\n carSearchPanelLayout.setVerticalGroup(\n carSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(carSearchPanelLayout.createSequentialGroup()\n .addGroup(carSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(plateLbl)\n .addComponent(carPlateTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(carSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(brandLbl)\n .addComponent(carBrandTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(carSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(modelLbl)\n .addComponent(carModelTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(carSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(classLbl)\n .addComponent(carClassCb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(carSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(yearLbl)\n .addComponent(carYearTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(carSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(colorLbl)\n .addComponent(carColorTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(carSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(statusLbl)\n .addComponent(carStatusCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(carClearBtn)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(carAddBtn))\n );\n\n jScrollPane3.setName(\"jScrollPane3\"); // NOI18N\n\n carTbl.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {},\n {},\n {},\n {}\n },\n new String [] {\n\n }\n ));\n carTbl.setAutoStartEditOnKeyStroke(false);\n carTbl.setEditable(false);\n carTbl.setName(\"carTbl\"); // NOI18N\n carTbl.getTableHeader().setReorderingAllowed(false);\n jScrollPane3.setViewportView(carTbl);\n carTbl.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n\n javax.swing.GroupLayout carPanelLayout = new javax.swing.GroupLayout(carPanel);\n carPanel.setLayout(carPanelLayout);\n carPanelLayout.setHorizontalGroup(\n carPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(carPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(carSearchPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 544, Short.MAX_VALUE)\n .addContainerGap())\n );\n carPanelLayout.setVerticalGroup(\n carPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(carPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(carPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 534, Short.MAX_VALUE)\n .addComponent(carSearchPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n tabPanel.addTab(resourceMap.getString(\"carPanel.TabConstraints.tabTitle\"), carPanel); // NOI18N\n\n carClassPanel.setName(\"carClassPanel\"); // NOI18N\n\n carClassSearchPanel.setName(\"carClassSearchPanel\"); // NOI18N\n\n carClassNameLbl.setText(resourceMap.getString(\"carClassNameLbl.text\")); // NOI18N\n carClassNameLbl.setName(\"carClassNameLbl\"); // NOI18N\n\n carClassDisplayLbl.setText(resourceMap.getString(\"carClassDisplayLbl.text\")); // NOI18N\n carClassDisplayLbl.setName(\"carClassDisplayLbl\"); // NOI18N\n\n carClassNameTxt.setName(\"carClassNameTxt\"); // NOI18N\n\n carClassDisplayTxt.setName(\"carClassDisplayTxt\"); // NOI18N\n\n carClassClearBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/oscar/view/resources/clean.png\"))); // NOI18N\n carClassClearBtn.setText(resourceMap.getString(\"carClassClearBtn.text\")); // NOI18N\n carClassClearBtn.setName(\"carClassClearBtn\"); // NOI18N\n\n carClassAddBtn.setAction(actionMap.get(\"carDialog\")); // NOI18N\n carClassAddBtn.setIcon(resourceMap.getIcon(\"carClassAddBtn.icon\")); // NOI18N\n carClassAddBtn.setText(resourceMap.getString(\"carClassAddBtn.text\")); // NOI18N\n carClassAddBtn.setName(\"carClassAddBtn\"); // NOI18N\n\n javax.swing.GroupLayout carClassSearchPanelLayout = new javax.swing.GroupLayout(carClassSearchPanel);\n carClassSearchPanel.setLayout(carClassSearchPanelLayout);\n carClassSearchPanelLayout.setHorizontalGroup(\n carClassSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(carClassSearchPanelLayout.createSequentialGroup()\n .addGroup(carClassSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(carClassSearchPanelLayout.createSequentialGroup()\n .addGroup(carClassSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(carClassDisplayLbl)\n .addComponent(carClassNameLbl))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(carClassSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(carClassNameTxt, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE)\n .addComponent(carClassDisplayTxt, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE)))\n .addComponent(carClassClearBtn)\n .addComponent(carClassAddBtn))\n .addContainerGap())\n );\n carClassSearchPanelLayout.setVerticalGroup(\n carClassSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(carClassSearchPanelLayout.createSequentialGroup()\n .addGroup(carClassSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(carClassNameLbl)\n .addComponent(carClassNameTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(carClassSearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(carClassDisplayLbl)\n .addComponent(carClassDisplayTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(carClassClearBtn)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(carClassAddBtn))\n );\n\n jScrollPane4.setName(\"jScrollPane4\"); // NOI18N\n\n carClassTbl.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {},\n {},\n {},\n {}\n },\n new String [] {\n\n }\n ));\n carClassTbl.setAutoStartEditOnKeyStroke(false);\n carClassTbl.setEditable(false);\n carClassTbl.setName(\"carClassTbl\"); // NOI18N\n carClassTbl.getTableHeader().setReorderingAllowed(false);\n jScrollPane4.setViewportView(carClassTbl);\n carClassTbl.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n\n javax.swing.GroupLayout carClassPanelLayout = new javax.swing.GroupLayout(carClassPanel);\n carClassPanel.setLayout(carClassPanelLayout);\n carClassPanelLayout.setHorizontalGroup(\n carClassPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(carClassPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(carClassSearchPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 490, Short.MAX_VALUE)\n .addContainerGap())\n );\n carClassPanelLayout.setVerticalGroup(\n carClassPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(carClassPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(carClassPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 534, Short.MAX_VALUE)\n .addComponent(carClassSearchPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n tabPanel.addTab(resourceMap.getString(\"carClassPanel.TabConstraints.tabTitle\"), carClassPanel); // NOI18N\n\n openStaffBtn.setIcon(resourceMap.getIcon(\"openStaffBtn.icon\")); // NOI18N\n openStaffBtn.setText(resourceMap.getString(\"openStaffBtn.text\")); // NOI18N\n openStaffBtn.setName(\"openStaffBtn\"); // NOI18N\n\n javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);\n mainPanel.setLayout(mainPanelLayout);\n mainPanelLayout.setHorizontalGroup(\n mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(mainPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(tabPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 722, Short.MAX_VALUE)\n .addComponent(openStaffBtn, javax.swing.GroupLayout.Alignment.TRAILING))\n .addContainerGap())\n );\n mainPanelLayout.setVerticalGroup(\n mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(mainPanelLayout.createSequentialGroup()\n .addComponent(openStaffBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(tabPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 589, Short.MAX_VALUE)\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 .addGap(0, 746, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, 0)\n .addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(0, 0, 0)))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 636, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, 0)\n .addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(0, 0, 0)))\n );\n\n pack();\n }",
"private void prepareForNewVehicle() {\n\t\tbtnActVehUpdate.setVisibility(View.INVISIBLE);\n\t\tbtnActVehCreate.setVisibility(View.VISIBLE);\n\t\ttxtActVehAutonumberId.setText(getResources().getString(R.string.act_vehicle_id) + \": *\");\n\t\teTxtActVehLicenseplate.setText(\"\");\n\t\tautComplActVehCountry.setText(\"\");\n\t\teTxtActVehNoOfPassengers.setText(\"\");\n\t\tautComplActVehBrand.setText(\"\");\n\t\teTxtActVehVehicleType.setText(\"\");\n\t\tbtnActVehUpdate.setText(CREATE);\n\t\tvh = null;\n\t}",
"public ArticulosAdd() {\n initComponents();\n Sistema.lblNotificacion.setText(\"Ingreso Artítuclos\");\n this.setLocationRelativeTo(null);\n\n Date date = new Date();\n\n dtDesde.setDate(date);\n dtHasta.setDate(date);\n\n articulos.searchArticulo(cboArticulos, \"\", 0, 1000, 0);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n cardetail = new javax.swing.JPanel();\n carvalidity = new javax.swing.JTextField();\n caraverage = new javax.swing.JTextField();\n carcolor = new javax.swing.JTextField();\n carmodel = new javax.swing.JTextField();\n carno = new javax.swing.JTextField();\n submit1 = new javax.swing.JButton();\n cancel1 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jButton9 = new javax.swing.JButton();\n jButton7 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jSeparator2 = new javax.swing.JSeparator();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setUndecorated(true);\n setResizable(false);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n cardetail.setBackground(new java.awt.Color(204, 0, 51));\n cardetail.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n cardetail.setOpaque(false);\n cardetail.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n carvalidity.setBorder(null);\n carvalidity.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n carvalidityActionPerformed(evt);\n }\n });\n cardetail.add(carvalidity, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 140, 290, 20));\n\n caraverage.setBorder(null);\n caraverage.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n caraverageActionPerformed(evt);\n }\n });\n cardetail.add(caraverage, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 190, 320, 20));\n\n carcolor.setBorder(null);\n carcolor.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n carcolorActionPerformed(evt);\n }\n });\n cardetail.add(carcolor, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 260, 330, 20));\n\n carmodel.setBorder(null);\n cardetail.add(carmodel, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 70, 310, 20));\n\n carno.setBorder(null);\n carno.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n carnoActionPerformed(evt);\n }\n });\n cardetail.add(carno, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 10, 290, 20));\n\n submit1.setBackground(new java.awt.Color(0, 51, 204));\n submit1.setForeground(new java.awt.Color(255, 255, 255));\n submit1.setText(\"submit\");\n submit1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n submit1ActionPerformed(evt);\n }\n });\n cardetail.add(submit1, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 330, 120, 30));\n\n cancel1.setBackground(new java.awt.Color(0, 51, 204));\n cancel1.setForeground(new java.awt.Color(255, 255, 255));\n cancel1.setText(\"cancel\");\n cardetail.add(cancel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(270, 330, 110, 30));\n\n getContentPane().add(cardetail, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 230, 450, 400));\n\n jButton3.setBackground(new java.awt.Color(0, 102, 204));\n jButton3.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jButton3.setForeground(new java.awt.Color(255, 255, 255));\n jButton3.setText(\"add driver\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(830, 310, 170, 40));\n\n jButton9.setBackground(new java.awt.Color(0, 102, 204));\n jButton9.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jButton9.setForeground(new java.awt.Color(255, 255, 255));\n jButton9.setText(\"View\");\n jButton9.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton9ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton9, new org.netbeans.lib.awtextra.AbsoluteConstraints(830, 380, 170, 40));\n\n jButton7.setBackground(new java.awt.Color(0, 102, 204));\n jButton7.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jButton7.setForeground(new java.awt.Color(255, 255, 255));\n jButton7.setText(\"vehicle booking\");\n jButton7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton7ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton7, new org.netbeans.lib.awtextra.AbsoluteConstraints(830, 180, 170, 40));\n\n jButton2.setBackground(new java.awt.Color(255, 255, 255));\n jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/adminlogin/car/closedicon.png\"))); // NOI18N\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(1337, 0, 20, 30));\n\n jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/adminlogin/car/toplogo.png\"))); // NOI18N\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 10, 190, 20));\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setText(\"Add Vehicle\");\n jLabel3.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel3MouseClicked(evt);\n }\n });\n getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(880, 255, 80, 30));\n getContentPane().add(jSeparator2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 30, 1360, 80));\n\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/adminlogin/car/addcar.png\"))); // NOI18N\n jLabel1.setText(\"jLabel1\");\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(-20, -10, 1500, 760));\n\n pack();\n setLocationRelativeTo(null);\n }",
"private LCSRevisableEntity createEntries(String selectedId) {\n\t\t\n\t\tLCSRevisableEntity revEntity=null;\n\n\t\tLCSProduct product = null;\n\t\tLCSSKU lcsSku = null;\n\t\tString sizedefVR = \"\";\n\t\tString prodVR = \"\";\n\t\tString colorwayVR = \"\";\n\t\tString reventityVR = \"\";\n\t\t\n\t\tLCSLog.debug(\"****************Inside createEntries ***********************\");\n\t\t/*\n\t\t * is found in the request object.\n\t\t */\n\t\t// get division code from request.\n\t\tString divcode = this.requesttable.get(selectedId + \"_DIVISION_CODE\");\n\t\t// get material number from request\n\t\tString materialNumber = divcode\n\t\t\t\t+ this.requesttable.get(selectedId + \"_MATERIALNUMBER\");\n\t\t// get nrf code from request\n\t\tString nrfCode = \"\";\n\t\t// this.requesttable.get(selectedId + \"_NRF_CODE\");\n\t\t// get sourceVersion from request\n\t\tString sourceVersion = this.requesttable.get(selectedId + \"_SOURCE\");\n\t\t// get costsheetVersion from request\n\t\tString costsheetVersion = this.requesttable.get(selectedId + \"_COST\");\n\t\t\n\t\tString specVersion = this.requesttable.get(selectedId + \"_SPEC\");\n\t\t\n\t\tString bomRequestParam = this.requesttable.get(\"BOM\"+selectedId + \"_BOM\");\n\t\tLCSLog.debug(\"bomRequestParam = \"+bomRequestParam);\n\n\t\tString sourceName = \"\";\n\t\tString costName = \"\";\n\t\tString specName = \"\";\n\t\tString IBTINSTOREMONTH = \"\";\n\n\t\ttry {\n\t\t\t// get all the information from sourceVersion and costsheetVersion\n\t\t\tMap<String, String> map = LFIBTUtil.formatSourceOrCostsheetData(\n\t\t\t\t\tsourceVersion, costsheetVersion, specVersion);\n\t\t\t\n\t\t\t// source name\n\t\t\tsourceName = map.get(\"sourceNameKey\");\n\t\t\t// versionId\n\t\t\tsourceVersion = map.get(\"sourceVersionKey\"); \n\t\t\tLCSLog.debug(\"sourceName --- \" + sourceName);\n\t\t\t// costsheet name\n\t\t\tcostName = map.get(\"costNameKey\");\n\n\t\t\t// costsheetId\n\t\t\tcostsheetVersion = map.get(\"costsheetVersionKey\");\n\t\t\tLCSLog.debug(\"costName --- \" + costName);\n\t\t\t\n\t\t\tspecName = map.get(\"specNameKey\");\n\n\t\t\t// costsheetId\n\t\t\tspecVersion = map.get(\"specVersionKey\");\n\t\t\tLCSLog.debug(\"costName --- \" + costName);\t\t\t\n\n\t\t\tCollection<String> bomMOAStringColl = new ArrayList<String>();\n\t\t\tbomMOAStringColl = LFIBTUtil.formatBOMMultiChoiceValues(bomRequestParam);\n\t\t\t\n\t\t\tList<String> idList = LFIBTUtil.getObjects(selectedId);\n\n\t\t\t// parse and get all data\n\t\t\tMap<String, String> idMap = LFIBTUtil\n\t\t\t\t\t.createCustomMapFromList(idList);\n\t\t\t// get product ID\n\t\t\tprodVR = idMap.get(\"prodVR\");\n\n\t\t\tLCSLog.debug(\"prodVR : --\" + prodVR);\n\t\t\t// get the product object from productVR\n\t\t\tproduct = (LCSProduct) LCSProductQuery\n\t\t\t\t\t.findObjectById(\"VR:com.lcs.wc.product.LCSProduct:\"\n\t\t\t\t\t\t\t+ prodVR);\n\n\t\t\tLCSLog.debug(\"product : --\" + product);\n\n\t\t\t// size definition VR\n\t\t\tsizedefVR = idMap.get(\"sizedefVR\");\n\t\t\tLCSLog.debug(\"sizedefVR -- \" + sizedefVR);\n\n\t\t\t// colorway VR\n\t\t\tcolorwayVR = idMap.get(\"colorwayVR\");\n\t\t\tLCSLog.debug(\"colorwayVR : --\" + colorwayVR);\n\t\t\tlcsSku = (LCSSKU) LCSProductQuery\n\t\t\t\t\t.findObjectById(\"VR:com.lcs.wc.product.LCSSKU:\"\n\t\t\t\t\t\t\t+ colorwayVR);\n\n\t\t\t// NRF Code -- Build 5.16\n\t\t\tDouble d = 0.00;\n\t\t\td = (Double) lcsSku.getValue(\"lfNrfColorCode\");\n\t\t\tnrfCode = StringUtils.substringBeforeLast(Double.toString(d), \".\");\n\n\t\t\t/**\n\t\t\t * Build 5.16_3 -> START\n\t\t\t * Formatting NRF code to 3 digits before sending it to SAP\n\t\t\t */\n\t\t\t// getting length of code value\n\t\t\tint nrfCodeValueLength = nrfCode.length();\n\t\t\t// TRUE - if length is 1 or 2 digit\n\t\t\tif (nrfCodeValueLength == 2 || nrfCodeValueLength == 1) {\n\t\t\t\t// converting the value from double to integer\n\t\t\t\tint y = d.intValue();\n\t\t\t\t// formatting the value to be 3 digit always.\n\t\t\t\t// if not, append 0 to left\n\t\t\t\tnrfCode = (String.format(\"%03d\", y)).toString();\n\t\t\t}\n\t\t\t/**\n\t\t\t * Build 5.16_3 -> END\n\t\t\t */\n\n\t\t\t// get the revisable entity VR if applicable\n\t\t\treventityVR = idMap.get(\"reventityVR\");\n\n\t\t\t// Added for Build 6.14\n\t\t\t// ITC-START\n\t\t\tString materialDescription = this.requesttable.get(selectedId\n\t\t\t\t\t+ \"_MATERIALDESC\");\n\t\t\tIBTINSTOREMONTH = this.requesttable.get(selectedId + \"_INSTOREMONTH\");\n\t\t\tString styleNumber = this.requesttable.get(selectedId + \"_STYLE\");\n\t\t\t// ITC-END\n\t\t\t\n\t\t\t//MM : changes : Start ----\n\t\t\tif(!FormatHelper.hasContent(reventityVR))\n\t\t\t\treventityVR = LFIBTMaterialNumberValidator.getExistingMaterialRecords(materialNumber,false);\n\t\t\t//MM : changes : End ----\n\t\t\t/*\n\t\t\t * If the revisable entity VR exists then update the revisable\n\t\t\t * entity else create a new one.\n\t\t\t */\n\t\t\tif (reventityVR != null) \n\t\t\t{\n\t\t\t\tLCSLog.debug(\"sourceVersion -- \" + sourceVersion\n\t\t\t\t\t\t+ \" costsheetVersion - \" + costsheetVersion\n\t\t\t\t\t\t+ \" nrfCode -- \" + nrfCode\n\t\t\t\t\t\t+ \" materialDescription --\" + materialDescription\n\t\t\t\t\t\t+ \" IBTINSTOREMONTH--\" + IBTINSTOREMONTH\n\t\t\t\t\t\t+ \" style Number----\" + styleNumber);\n\n\t\t\t\t// API call to update the revisable entitity with new\n\t\t\t\t// source and cost details.\n\n\t\t\t\t// Updated for Build 6.14\n\t\t\t\tLCSLog.debug(CLASSNAME+\"createEntries()\"+\"calling updateRevisableEntry()\");\n\t\t\t\trevEntity=updateRevisableEntry(reventityVR, sourceVersion,\n\t\t\t\t\t\tcostsheetVersion,specVersion, nrfCode, materialDescription,\n\t\t\t\t\t\tsourceName, costName,specName, IBTINSTOREMONTH, styleNumber,bomMOAStringColl);\n\t\t\t\t\n\t\t\t\tLCSLog.debug(CLASSNAME+\"update revEntity---->\" +revEntity);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// API call to create fresh revisable entities.\n\n\t\t\t\t// Updated for Build 6.14\n\t\t\t\t\n\t\t\t\tLCSLog.debug(CLASSNAME+\"createEntries()\"+\"calling createRevisableEntry()\");\n\t\t\t\trevEntity=createRevisableEntry(product, lcsSku, materialNumber,\n\t\t\t\t\t\tsizedefVR, sourceVersion, costsheetVersion, specVersion, sourceName,\n\t\t\t\t\t\tcostName, specName, nrfCode, styleNumber, materialDescription,\n\t\t\t\t\t\tIBTINSTOREMONTH,bomMOAStringColl);\n\t\t\t\t\n\t\t\t\tLCSLog.debug(CLASSNAME+\"create revEntity---->\" +revEntity);\n\n\t\t\t}\n\t\t\t\n\n\t\t}\n\t\tcatch (WTException e) {\n\t\t\tLCSLog.error(\"WTException occurred!! \" + e.getMessage());\n\t\t}\n\t\tcatch (WTPropertyVetoException e) {\n\t\t\tLCSLog.error(\"WTPropertyVetoException occurred!! \" + e.getMessage());\n\t\t}\n\t\t\t\t\n\t\treturn revEntity;\n\n\t}",
"public VehicleViewRecord(String licensePlate, String modelcar, String brand, String fio, String status, Date begDate, Date endDate, Long vehiclePk, Long ptsPk, Long licenseplatePk) {\n super(VehicleView.VEHICLE_VIEW);\n\n set(0, licensePlate);\n set(1, modelcar);\n set(2, brand);\n set(3, fio);\n set(4, status);\n set(5, begDate);\n set(6, endDate);\n set(7, vehiclePk);\n set(8, ptsPk);\n set(9, licenseplatePk);\n }",
"public FrmMartialArts() {\n initComponents();\n }",
"public FrmInsertar() {\n initComponents();\n }",
"private void btn_cadActionPerformed(java.awt.event.ActionEvent evt) {\n \n CDs_dao c = new CDs_dao();\n TabelaCDsBean p = new TabelaCDsBean();\n \n TabelaGeneroBean ge = (TabelaGeneroBean) g_box.getSelectedItem();\n TabelaArtistaBean au = (TabelaArtistaBean) g_box2.getSelectedItem();\n\n //p.setId(Integer.parseInt(id_txt.getText()));\n p.setTitulo(nm_txt.getText());\n p.setPreco(Double.parseDouble(vr_txt.getText()));\n p.setGenero(ge);\n p.setArtista(au);\n c.create(p);\n\n nm_txt.setText(\"\");\n //isqn_txt.setText(\"\");\n vr_txt.setText(\"\");\n cd_txt.setText(\"\");\n g_box.setSelectedIndex(0);\n g_box2.setSelectedIndex(0);\n \n }",
"public void addEntry(ActionEvent event) {\n\t\tif(checkEntryInputs()) {\n\t\t\tBacteroidesSample newBacteroidesSample = new BacteroidesSample(sampleNumberTF.getText(),materialDescriptionTF.getText(),bacteroidesConcentration.getText());\n\t\t\tnewBacteroidesSample.setConclusionCase();\n\t\t\ttable.getItems().add(newBacteroidesSample);\n\t\t\tnewReport2.addSample(newBacteroidesSample);\n\t\t\taddConclusionNumber(newBacteroidesSample);\n\t\t\tsampleNumberTF.clear();\n\t\t\tmaterialDescriptionTF.clear();\n\t\t\tbacteroidesConcentrationTF.clear();\n\t\t}\n\t}",
"public FrmInCadLocal() {\n initComponents();\n }",
"private void setFields(RaceCar raceCar){\n setFieldsEmpty();\n nameInput.setText(raceCar.getName());\n frontTrackInput.setText(String.valueOf(raceCar.getFrontTrack()));\n cornerWeightFLInput.setText(String.valueOf(raceCar.getCornerWeightFL()));\n cornerWeightRLInput.setText(String.valueOf(raceCar.getCornerWeightRL()));\n rearTrackInput.setText(String.valueOf(raceCar.getRearTrack()));\n cornerWeightRRInput.setText(String.valueOf(raceCar.getCornerWeightRR()));\n cornerWeightFRInput.setText(String.valueOf(raceCar.getCornerWeightFR()));\n cogInput.setText(String.valueOf(raceCar.getCogHeight()));\n frontRollDistInput.setText(String.valueOf(raceCar.getFrontRollDist()));\n wheelBaseInput.setText(String.valueOf(raceCar.getWheelbase()));\n }",
"boolean addCar() {\n\n errorText.setText(\"\");\n\n String carType = carTypeTextf.getText();\n String providerComp = providerCompTextf.getText();\n Integer passenger = new Integer(passengerTextf.getText());\n Double price = new Double(priceTextf.getText());\n String color = colorTextf.getText();\n Boolean isAvailable = new Boolean(isAvailableTextf.getText());\n String status = statusTextf.getText();\n\n //\n // validation\n if (carType.equals(\"\") || providerComp.equals(\"\") || passenger.equals(\"\") || price.equals(\"\")\n || color.equals(\"\") || isAvailable.equals(\"\") || status.equals(\"\")) {\n System.out.println(\"asd\" + carType + \"asd\");\n errorText.setText(\"Please, Fill all fields first.\");\n return false;\n } else {\n CarDaoImpl databaseQuery = new CarDaoImpl();\n Car car = new Car(new Long(0), carType, providerComp, passenger, price, color, isAvailable, status);\n boolean result = databaseQuery.insertCar(car);\n System.out.println(result);\n\n if (result) {\n ObservableList<Car> carList = FXCollections.observableArrayList();\n carList = table.getItems();\n carList.add(new Car(new Long(0), carType, providerComp, passenger, price, color, isAvailable, status));\n table.setItems(carList);\n\n emptyTextFields();\n return true;\n } else {\n errorText.setText(\"System Error,Try again later.\");\n return false;\n }\n\n }\n }",
"public void nuevaRestriccion(RestricionPredio cd) {\n Map<String, List<String>> params = null;\n List<String> p = null;\n if (cd != null) {\n params = new HashMap<>();\n p = new ArrayList<>();\n p.add(cd.getId() + \"\");\n params.put(\"idRestriccion\", p);\n if (ver) {\n p = new ArrayList<>();\n p.add(ver.toString());\n params.put(\"ver\", p);\n ver = false;\n }\n } else {\n\n }\n Utils.openDialog(\"/restricciones/restriccionPredio\", params, \"500\", \"80\");\n }",
"public Car create(Car car) {\n if (car.getStation() == null) {\n throw new IllegalArgumentException(messages.get(\"carStationNotNull\"));\n }\n if (car.getStation().getId() == null || !stationService.existsById(car.getStation().getId())) {\n throw new EntityNotFoundException(messages.get(\"stationNotFound\"));\n }\n if (carRepository.existsById(car.getRegistrationNr())) {\n throw new EntityExistsException(messages.get(\"carAlreadyExists\"));\n }\n return carRepository.save(car);\n }",
"@Override\n\tpublic IAdhocTicket createTicket(String carparkId) {\n\t\tcurrentTicketNo++; // when a ticket is issued, ticketNo increments by 1\n\t\tIAdhocTicket adhocTicket = factory.make(carparkId, currentTicketNo); \n\t\t// make ticket in factory with the new ticketNo\n\t\tadhocTicketList.add(adhocTicket);\n\t\treturn adhocTicket;\n\t}",
"public sub_Form(HashMap<String, ReturnedValue> entry, int index){\n this.form_ID = entry.get(\"formID\").to_string();\n this.repID = entry.get(\"repID\").to_string();\n this.plantRegistry = entry.get(\"plantRegistry\").to_string();\n this.domesticOrImported = entry.get(\"domesticOrImported\").to_string();\n this.serialNumber = entry.get(\"serialNumber\").to_string();\n this.beverageType = entry.get(\"beverageType\").to_string();\n this.brandName = entry.get(\"brandName\").to_string();\n this.fancifulName = entry.get(\"fancifulName\").to_string();\n this.vintage = entry.get(\"vintage\").to_string();\n this.grapeVarietals = entry.get(\"grapeVarietals\").to_string();\n this.pHValue = entry.get(\"pHValue\").to_string();\n this.wineAppellation = entry.get(\"wineAppellation\").to_string();\n this.alcoholContent = entry.get(\"alcoholContent\").to_string();\n this.phoneNumber = entry.get(\"phoneNumber\").to_string();\n this.email = entry.get(\"email\").to_string();\n this.index = index;\n }",
"@Override\n\t@Transactional\n\tpublic DetalleCarrito create(DetalleCarrito entity) throws Exception {\n\t\treturn detalleCarritoRepository.save(entity);\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Title = new javax.swing.JLabel();\n NAME = new javax.swing.JLabel();\n txt_name = new javax.swing.JTextField();\n PROVIDER = new javax.swing.JLabel();\n ComboBox_provider = new javax.swing.JComboBox<>();\n CATEGORY = new javax.swing.JLabel();\n ComboBox_category = new javax.swing.JComboBox<>();\n Trademark = new javax.swing.JLabel();\n ComboBox_trademark = new javax.swing.JComboBox<>();\n COLOR = new javax.swing.JLabel();\n ComboBox_color = new javax.swing.JComboBox<>();\n SIZE = new javax.swing.JLabel();\n ComboBox_size = new javax.swing.JComboBox<>();\n MATERIAL = new javax.swing.JLabel();\n ComboBox_material = new javax.swing.JComboBox<>();\n PRICE = new javax.swing.JLabel();\n txt_price = new javax.swing.JTextField();\n SAVE = new javax.swing.JButton();\n CANCEL = new javax.swing.JButton();\n Background = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n Title.setFont(new java.awt.Font(\"Dialog\", 1, 24)); // NOI18N\n Title.setForeground(new java.awt.Color(255, 255, 255));\n Title.setText(\"NEW PRODUCT\");\n getContentPane().add(Title, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 33, -1, -1));\n\n NAME.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n NAME.setForeground(new java.awt.Color(255, 255, 255));\n NAME.setText(\"Name\");\n getContentPane().add(NAME, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 150, 70, 30));\n\n txt_name.setBackground(new java.awt.Color(51, 51, 51));\n txt_name.setForeground(new java.awt.Color(255, 255, 255));\n getContentPane().add(txt_name, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 150, 100, 30));\n\n PROVIDER.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n PROVIDER.setForeground(new java.awt.Color(255, 255, 255));\n PROVIDER.setText(\"Provider\");\n getContentPane().add(PROVIDER, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 200, 70, 30));\n\n ComboBox_provider.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_provider.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_provider.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_provider, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 200, 100, 30));\n\n CATEGORY.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n CATEGORY.setForeground(new java.awt.Color(255, 255, 255));\n CATEGORY.setText(\"Category\");\n getContentPane().add(CATEGORY, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 250, 70, 30));\n\n ComboBox_category.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_category.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_category.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_category, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 250, 100, 30));\n\n Trademark.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n Trademark.setForeground(new java.awt.Color(255, 255, 255));\n Trademark.setText(\"Trademark\");\n getContentPane().add(Trademark, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 300, 70, 30));\n\n ComboBox_trademark.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_trademark.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_trademark.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n ComboBox_trademark.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ComboBox_trademarkActionPerformed(evt);\n }\n });\n getContentPane().add(ComboBox_trademark, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 300, 100, 30));\n\n COLOR.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n COLOR.setForeground(new java.awt.Color(255, 255, 255));\n COLOR.setText(\"Color\");\n getContentPane().add(COLOR, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 150, 70, 30));\n\n ComboBox_color.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_color.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_color.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_color, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 150, 100, 30));\n\n SIZE.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n SIZE.setForeground(new java.awt.Color(255, 255, 255));\n SIZE.setText(\"Size\");\n getContentPane().add(SIZE, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 200, 70, 30));\n\n ComboBox_size.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_size.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_size.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_size, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 200, 100, 30));\n\n MATERIAL.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n MATERIAL.setForeground(new java.awt.Color(255, 255, 255));\n MATERIAL.setText(\"Material\");\n getContentPane().add(MATERIAL, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 250, 70, 30));\n\n ComboBox_material.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_material.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_material.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_material, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 250, 100, 30));\n\n PRICE.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n PRICE.setForeground(new java.awt.Color(255, 255, 255));\n PRICE.setText(\"Price\");\n getContentPane().add(PRICE, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 300, 70, 30));\n\n txt_price.setBackground(new java.awt.Color(51, 51, 51));\n txt_price.setForeground(new java.awt.Color(255, 255, 255));\n txt_price.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_priceActionPerformed(evt);\n }\n });\n getContentPane().add(txt_price, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 300, 100, 30));\n\n SAVE.setBackground(new java.awt.Color(25, 25, 25));\n SAVE.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_guardar-A.png\"))); // NOI18N\n SAVE.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n SAVE.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_guardar-B.png\"))); // NOI18N\n SAVE.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_guardar.png\"))); // NOI18N\n SAVE.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n SAVEActionPerformed(evt);\n }\n });\n getContentPane().add(SAVE, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 480, 50, 50));\n\n CANCEL.setBackground(new java.awt.Color(25, 25, 25));\n CANCEL.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_no-A.png\"))); // NOI18N\n CANCEL.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n CANCEL.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_no-B.png\"))); // NOI18N\n CANCEL.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_no.png\"))); // NOI18N\n CANCEL.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CANCELActionPerformed(evt);\n }\n });\n getContentPane().add(CANCEL, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 480, 50, 50));\n\n Background.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/fondo_windows2.jpg\"))); // NOI18N\n getContentPane().add(Background, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));\n\n pack();\n }",
"private ContactsEntry createContactsEntry(ContentResolver cr, Cursor cur) {\n\t\tString strNumber = \"\";\n\t\tString strLookupKey = \"\";\n\t\tString _ID = cur.getString(cur.getColumnIndex(ContactsContract.Contacts._ID));\n\t\tString strName = cur.getString(cur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n\n\t\tif(Integer.parseInt(cur.getString(cur.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) > 0) {\n\t\t\tString selection = new StringBuilder().append(ContactsContract.CommonDataKinds.Phone.CONTACT_ID).append(\" = ?\").toString();\n\t\t\tCursor pCur = cr.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, selection, new String[] { _ID }, null);\n\n\t\t\twhile(pCur.moveToNext()) {\n\t\t\t\tstrNumber = pCur.getString(pCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n\t\t\t}\n\n\t\t\tif(pCur != null) pCur.close();\n\t\t\tpCur = null;\n\t\t}\n\n\t\tstrLookupKey = cur.getString(cur.getColumnIndex(ContactsContract.Contacts.LOOKUP_KEY));\n\n\t\tContactsEntry entry = new ContactsEntry(strLookupKey, strNumber, strName);\n\n\t\treturn entry;\n\t}",
"private void insertEntry() {\n String desiredId = idField.getText();\n String desiredName = nameField.getText();\n String desiredMajor = majorField.getText();\n\n if (studentHashMap.containsKey(desiredId)) {\n this.displayStatusPanel(\n \"Error: A student with this information already exists.\",\n \"Error\",\n JOptionPane.WARNING_MESSAGE\n );\n } else {\n studentHashMap.put(desiredId, new Student(desiredName, desiredMajor));\n\n this.displayStatusPanel(\n \"Success: \" + desiredName + \" has been added.\",\n \"Success\",\n JOptionPane.INFORMATION_MESSAGE\n );\n }\n }",
"public void submitInfoButton(View v) {\n //each entry needs a unique ID\n Business newBusiness = new Business();\n String newKey = appState.firebaseReference.push().getKey();\n newBusiness.setName(nameField.getText().toString());\n newBusiness.setPrimaryBusiness(primaryBusinessField.getText().toString());\n newBusiness.setBusinessNumber(numberField.getText().toString());\n newBusiness.setAddress(addressField.getText().toString());\n newBusiness.setProvince(provinceField.getSelectedItem().toString());\n\n appState.firebaseReference.child(newKey).setValue(newBusiness,\n new DatabaseReference.CompletionListener(){\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference){\n if(databaseError != null){\n Toast toast = Toast.makeText(appState, \"Error: Creation failed!\",\n Toast.LENGTH_LONG);\n toast.show();\n } else {\n finish();\n Toast toast = Toast.makeText(appState, \"Business entry created\",\n Toast.LENGTH_LONG);\n toast.show();\n }\n }\n });\n }",
"public customerentry() {\n initComponents();\n }",
"public void add (Car car){\n\t\t}",
"@Override\n\tpublic com.idetronic.eis.model.KpiEntry createKpiEntry(long kpiEntryId) {\n\t\treturn _kpiEntryLocalService.createKpiEntry(kpiEntryId);\n\t}",
"public RentEntry(String carID, String model,String clientID, String clientName) {\n\n\n this.carID= new SimpleStringProperty(carID);\n this.model= new SimpleStringProperty(model);\n this.clientID= new SimpleStringProperty(clientID);\n this.clientName= new SimpleStringProperty(clientName);\n // this.approval= new SimpleStringProperty(approval);\n\n }",
"@RequestMapping(\"/newRecipe\")\r\n\tpublic ModelAndView newRecipe() {\r\n\t\tModelAndView mav = new ModelAndView();\r\n\r\n\t\tmav.addObject(\"recipe\", new Recipe());\r\n\t\tmav.addObject(\"newFlag\", true);\r\n\t\tmav.setViewName(\"recipe/editRecipe.jsp\");\r\n\r\n\t\treturn mav;\r\n\t}",
"public static AddNewScheduleDialog createInstance(int quantity){\n AddNewScheduleDialog frag = new AddNewScheduleDialog();\n frag.quantity = quantity;\n return frag;\n }",
"@Override\n\tpublic ResultMessage insertCar(Carpo po) {\n\t\treturn inList.insert(po);\n\t}",
"private void addRow(final ForeignKey fk) {\n JLabel columna = new JLabel(\"* Columna: \" + fk.getNombreColumna());\n this.add(columna);\n JLabel nombrefk = new JLabel(\"Nombre Constraint: \" + fk.getFkConstraintName());\n this.add(nombrefk);\n JLabel tablaReferencia = new JLabel(\"Tabla Referencia: \" + fk.getReferenciaTabla());\n this.add(tablaReferencia);\n JLabel columnaReferencia = new JLabel(\"Columna Referencia: \" + fk.getReferenciaColumna());\n this.add(columnaReferencia);\n JButton botonQuitar = new JButton(new Action() {\n public Object getValue(String string) {\n return null;\n }\n\n public void putValue(String string, Object o) {\n }\n\n public void setEnabled(boolean bln) {\n }\n\n public boolean isEnabled() {\n return true;\n }\n\n public void addPropertyChangeListener(PropertyChangeListener pl) {\n }\n\n public void removePropertyChangeListener(PropertyChangeListener pl) {\n }\n\n public void actionPerformed(ActionEvent ae) {\n TablaManager tm = new TablaManager();\n tm.dropConstraint(tabla, fk.getFkConstraintName());\n MainFrame.getInstance().getPanelTabla().actualizarDatos();\n DBTreeNode padre = (DBTreeNode) node.getParent();\n padre.reconstruir(true);\n }\n });\n this.add(botonQuitar);\n }",
"protected void createSmartField() {\n\t\tthis.smartField = new SmartField();\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lbl_Nombre = new javax.swing.JLabel();\n lbl_Info = new javax.swing.JLabel();\n tf_ID = new javax.swing.JTextField();\n lbl_Ciudad = new javax.swing.JLabel();\n tf_Descuento = new javax.swing.JTextField();\n btn_Crear = new javax.swing.JButton();\n btn_Cancelar = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Nuevo Cupon\");\n\n lbl_Nombre.setText(\"ID:\");\n\n lbl_Info.setText(\"Rellene los siguientes campos: \");\n\n tf_ID.setEditable(false);\n\n lbl_Ciudad.setText(\"Descuento:\");\n\n btn_Crear.setText(\"Crear Cupon\");\n btn_Crear.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_CrearActionPerformed(evt);\n }\n });\n\n btn_Cancelar.setText(\"Cancelar\");\n btn_Cancelar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_CancelarActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(lbl_Nombre, javax.swing.GroupLayout.DEFAULT_SIZE, 71, Short.MAX_VALUE)\n .addGap(11, 11, 11)\n .addComponent(tf_ID, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(btn_Cancelar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btn_Crear))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(lbl_Ciudad)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)\n .addComponent(tf_Descuento, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(lbl_Info, javax.swing.GroupLayout.Alignment.TRAILING))\n .addContainerGap(23, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addComponent(lbl_Info)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lbl_Nombre)\n .addComponent(tf_ID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lbl_Ciudad)\n .addComponent(tf_Descuento, 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(btn_Crear)\n .addComponent(btn_Cancelar))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n setSize(new java.awt.Dimension(308, 193));\n setLocationRelativeTo(null);\n }",
"public Car(String primaryKey, String name, String dealerKey, int year, Category category,\r\n double price, String displacementCC, int maxPower,\r\n String powerRPM, double torqueFtLb, String torqueRPM, DriveTrain driveTrain,\r\n Aspiration aspiration, double length, double width, double height, double weight,\r\n double maxSpeed, double acceleration, double braking, double cornering, double stability) {\r\n this.primaryKey = primaryKey;\r\n this.name = name;\r\n this.manufacturerKey = dealerKey;\r\n this.year = year;\r\n this.category = category;\r\n this.price = price;\r\n this.displacementCC = displacementCC;\r\n this.maxPower = maxPower;\r\n this.powerRPM = powerRPM;\r\n this.torqueFtLb = torqueFtLb;\r\n this.torqueRPM = torqueRPM;\r\n this.driveTrain = driveTrain;\r\n this.aspiration = aspiration;\r\n this.length = length;\r\n this.width = width;\r\n this.height = height;\r\n this.weight = weight;\r\n this.maxSpeed = maxSpeed;\r\n this.acceleration = acceleration;\r\n this.braking = braking;\r\n this.cornering = cornering;\r\n this.stability = stability;\r\n }",
"public void crearVehiculo( clsVehiculo vehiculo ){\n if( vehiculo.obtenerTipoMedioTransporte().equals(\"Carro\") ){\n //Debo llamar el modelo de CARRO\n modeloCarro.crearCarro( (clsCarro) vehiculo );\n } else if (vehiculo.obtenerTipoMedioTransporte().equals(\"Camion\")){\n //Debo llamar el modelo de CAMIÓN\n }\n }",
"public FrmCrearEmpleado() {\n initComponents();\n tFecha.setDate(new Date());\n }",
"public FrmCatalogo() {\n initComponents();\n rdCd.setSelected(true);\n this.setLocationRelativeTo(null);\n volumes = new ArrayList<>();\n }",
"private void newEntry(final int startTime, final int endTime, boolean editExisting, double temperature) {\n if (!Utility.isCurrentlyOnline()) {\n Utility.showDisconnectedPopup();\n return;\n }\n AlertDialog.Builder newEntryDialog = new AlertDialog.Builder(new ContextThemeWrapper(this, android.R.style.Theme_DeviceDefault_Light_Dialog));\n LayoutInflater factory = LayoutInflater.from(this);\n mNewEntryView = factory.inflate(R.layout.new_schedule_entry, null);\n\n if (editExisting) {\n newEntryDialog.setTitle(\"Edit existing entry\");\n } else {\n newEntryDialog.setTitle(\"Create new schedule entry\");\n }\n\n // Load view elements.\n VerticalSeekBar seekBar = (VerticalSeekBar) mNewEntryView.findViewById(R.id.new_entry_seekBar);\n final TextView start = (TextView) mNewEntryView.findViewById(R.id.new_entry_start);\n final TextView end = (TextView) mNewEntryView.findViewById(R.id.new_entry_end);\n final TextView temp = (TextView) mNewEntryView.findViewById(R.id.new_entry_temperature);\n final CheckBox check = (CheckBox) mNewEntryView.findViewById(R.id.checkBox);\n\n // Fill view elements.\n start.setText((startTime > 9 ? startTime : \"0\" + startTime) + \":00\");\n end.setText((endTime > 9 ? endTime : \"0\" + endTime) + \":00\");\n temp.setText(temperature + \"°\");\n double progress = (temperature - Utility.LOWEST_TEMPERATURE) * 2 / Utility.TEMPERATURE_STEPS;\n seekBar.setProgress((int) (progress * seekBar.getMax()));\n\n start.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mSettingStartTime = true;\n TimePickerDialog.newInstance(ScheduleActivity.this, startTime, 0, true).show(getFragmentManager(), \"timePicker\");\n }\n });\n\n end.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mSettingStartTime = false;\n TimePickerDialog.newInstance(ScheduleActivity.this, endTime, 0, true).show(getFragmentManager(), \"timePicker\");\n }\n });\n\n seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n @Override\n public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n float value = progress / 2f;\n temp.setText(String.valueOf(value + Utility.LOWEST_TEMPERATURE) + \"°\");\n }\n\n @Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n }\n\n @Override\n public void onStopTrackingTouch(SeekBar seekBar) {\n }\n });\n\n newEntryDialog.setView(mNewEntryView);\n // Positive button onClickListener will be overwritten later for input checking.\n newEntryDialog.setPositiveButton(\"Submit\", null);\n newEntryDialog.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n\n final AlertDialog newDialog = newEntryDialog.create();\n newDialog.show();\n newDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // If endTime is after startTime, mShowingError is false, thus create the new entry,\n // otherwise, keep the dialog open.\n if (!mShowingError) {\n addScheduleEntry(start.getText().toString(),\n end.getText().toString(),\n temp.getText().toString(),\n check.isChecked());\n newDialog.dismiss();\n }\n }\n });\n }",
"public void makeNew() {\n\t\towner.switchMode(WindowMode.ITEMCREATE);\n\t}",
"public CarroVO getFormCarro() {\n try {\n String placa = cadastroView.getTxtPlaca().getText().trim();\n String cor = (String) cadastroView.getCbCor().getSelectedItem();\n ModeloVO modelo = (ModeloVO) cadastroView.getCbModelo().getSelectedItem();\n MarcaVO marca = (MarcaVO) cadastroView.getCbMarca().getSelectedItem();\n modelo.setMarca(marca);\n return new CarroVO(placa, cor, modelo);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }",
"public DEditTrain(java.awt.Frame parent, boolean modal) {\n super(parent, modal);\n initComponents();\n carsForRemove = new HashMap<Car, CarLocationStructure>();\n dCarLocation = new DCarLocation(null, true);\n }",
"public Car(String description)\r\n {\r\n this.description = description;\r\n customersName = \"\";\r\n }",
"@SuppressWarnings(\"static-access\")\r\n\tprivate void abrirTelaNovoArtista() {\r\n\t\t\r\n\t\tFrmArtistaCad newArtista = new FrmArtistaCad();\r\n\t\tnewArtista.setVisible(true);\r\n\t\tnewArtista.setDefaultCloseOperation(newArtista.DISPOSE_ON_CLOSE);\r\n\t\tnewArtista.setResizable(false);\r\n\t}",
"public void saveCar(View view) {\n String name = nameTextView.getText().toString();\n\n if (!name.isEmpty()) {\n newCar.setName(name);\n cars.save(newCar);\n Intent intent = new Intent(newCarActivity.this, selectCarActivity.class);\n startActivity(intent);\n } else {\n CharSequence text = \"A nickname is required.\";\n Toast.makeText(getApplicationContext(), text, Toast.LENGTH_SHORT).show();\n }\n }",
"@Transactional\n\t@Override\n\tpublic Prenotazione create(long id,LocalDate dataInzio, LocalDate dataFine, LocalTime oraInzio, LocalTime oraFine, \n\t\t\tString descrizione, Car car, User user) {\n\t\treturn this.prenotazioneRepository.create(id, dataInzio, dataFine, oraInzio, oraFine, descrizione, car, user);\n\t}",
"public void newCrayon(Crayon cr) {\r\n\tem.getTransaction( ).begin( );\r\n em.persist(cr);\r\n em.getTransaction().commit();\r\n }",
"private void init_fields(String subor, Maps map) throws FileNotFoundException{ //inicializacia vsetkych zoznamov -> hlavne tych z triedy Maps\n map.setCars(new ArrayList<>());\n map.setStations(new ArrayList<>());\n Free_time_window free[][] = map.getFree_windows();\n Reserved_time_window reserved[][] = map.getReserved_windows();\n Road[][] road_matrix = map.getRoads();\n ArrayList<Car>cars;\n \n fr = new FileReader(subor); //nabijem do File Readera moj subor\n br = new BufferedReader(fr); //a budem ho citat\n \n cars = new ArrayList<>();\n \n for(int i= 0;i< max_NO_of_stations; i++){\n for(int j = 0;j< max_NO_of_stations; j++){\n if(i==j){ \n road_matrix[i][j] = new Road(0,-1,-1,-1);\n }\n else{\n road_matrix[i][j] = new Road(-1,-1,-1,-1);\n }\n }\n }\n \n for(int i= 0;i< max_NO_of_stations; i++){\n for(int j = 0;j< max_NO_of_windows; j++){\n free[i][j] = new Free_time_window(-1,-1,-1, -1);\n \n reserved[i][j] = new Reserved_time_window(-1,-1, new Car(-1));\n }\n }\n \n map.setFree_windows(free);\n map.setReserved_windows(reserved);\n map.setRoads(road_matrix);\n map.setCars(cars);\n }",
"public ingresarBiblioteca() {\n initComponents();\n this.nombreUsuario.setText(usuariosID[0].getNombre());\n this.Picture.setFont(new java.awt.Font(\"Dialog\", java.awt.Font.PLAIN,10));\n usuario.insertarInicio(this.nombreUsuario.getText()/*, carpeta*/);\n usuario.obtenerNodo(0).getArchivo().insertarFinal(\"GENERAL\");//carpeta.insertarFinal(\"GENERAL\");\n }",
"@Override\n\tpublic void addCarInfo(CarInfoDto carInfoDto) {\n\t\tchargeCarMapper.insertCarInfo(carInfoDto);\n\t}",
"private void initialize() {\r\n\t\tfrmTelaCadastro = new JFrame();\r\n\t\tfrmTelaCadastro.getContentPane().setBackground(Color.WHITE);\r\n\t\tfrmTelaCadastro.getContentPane().setLayout(null);\r\n\r\n\t\tconsultaagua = new CadastroAguaDAO();\r\n\r\n\t\tpanel = new JPanel();\r\n\t\tpanel.setBounds(80, 24, 832, 94);\r\n\t\tpanel.setLayout(null);\r\n\t\tfrmTelaCadastro.getContentPane().add(panel);\r\n\r\n\t\ttextField = new JTextField();\r\n\t\ttextField.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextField.setColumns(10);\r\n\t\ttextField.setBounds(64, 37, 242, 20);\r\n\t\tpanel.add(textField);\r\n\r\n\t\ttextField_1 = new JTextField();\r\n\t\ttextField_1.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextField_1.setColumns(10);\r\n\t\ttextField_1.setBounds(414, 34, 347, 20);\r\n\t\tpanel.add(textField_1);\r\n\r\n\t\ttextField_4 = new JTextField();\r\n\t\ttextField_4.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextField_4.setColumns(10);\r\n\t\ttextField_4.setBounds(105, 60, 112, 20);\r\n\t\tpanel.add(textField_4);\r\n\r\n\t\tlblNome = new JLabel(\"Nome:\");\r\n\t\tlblNome.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblNome.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tlblNome.setBounds(10, 32, 65, 28);\r\n\t\tpanel.add(lblNome);\r\n\r\n\t\tlblEndereco = new JLabel(\"Endereco:\");\r\n\t\tlblEndereco.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tlblEndereco.setBounds(356, 29, 65, 28);\r\n\t\tpanel.add(lblEndereco);\r\n\r\n\t\tlblhidrometro = new JLabel(\"Hidr\\u00F4metro:\");\r\n\t\tlblhidrometro.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblhidrometro.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tlblhidrometro.setBounds(20, 55, 75, 28);\r\n\t\tpanel.add(lblhidrometro);\r\n\r\n\t\tJButton btnNewButton = new JButton(\"Consultar\");\r\n\t\tbtnNewButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\r\n\t\t\t\tList<CadastroAgua> cadagua = new ArrayList<CadastroAgua>();\r\n\r\n\t\t\t\tCadastroAgua c = new CadastroAgua();\r\n\t\t\t\tcadagua = consultaagua.getCadastroAgua(\"8\");\r\n\t\t\t\tfor (int i = 0; i < cadagua.size(); i++)\r\n\r\n\t\t\t\t{\r\n\t\t\t\t\tc = (CadastroAgua) cadagua.get(i);\r\n\r\n\t\t\t\t\ttextRGI.setText(c.getContaAguaRGI());\r\n\t\t\t\t\ttextGrupo.setText(c.getContaAguaGrupo());\r\n\t\t\t\t\ttextNConta.setText(c.getContaAguaNConta());\r\n\t\t\t\t\ttextGrupo.setText(c.getContaAguaGrupo());\r\n\t\t\t\t\ttextMesRef.setText(c.getContaAguaMesRef());\r\n\t\t\t\t\ttextTipoLig.setText(c.getContaAguaTipoLigacao());\r\n\t\t\t\t\ttextTipoFat.setText(c.getContaAguaTipoFaturamento());\r\n\t\t\t\t\ttextConsumo.setText(c.getContaAguaConsumo());\r\n\t\t\t\t\ttextDataAtual.setText(c.getContaAguaDataLeituraAtual());\r\n\t\t\t\t\ttextLeituraAtual.setText(c.getContaAguaLeituraAtual());\r\n\t\t\t\t\ttextDataAnterior.setText(c.getContaAguaDataLeituraAnterior());\r\n\t\t\t\t\ttextLeituraAnterior.setText(c.getContaAguaLeituraAnterior());\r\n\t\t\t\t\ttextObs.setText(c.getContaAguaObservacao());\r\n\t\t\t\t\ttxtValorAgua.setText(c.getContaAguaValorAgua());\r\n\t\t\t\t\ttxtValorEsgoto.setText(c.getContaAguaValorEsgoto());\r\n\t\t\t\t\ttextValorTotal.setText(c.getContaAguaValorTotal());\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnNewButton.setBounds(414, 65, 89, 23);\r\n\t\tpanel.add(btnNewButton);\r\n\r\n\t\ttabbedPane = new JTabbedPane(JTabbedPane.TOP);\r\n\t\ttabbedPane.setBounds(80, 144, 832, 425);\r\n\t\tfrmTelaCadastro.getContentPane().add(tabbedPane);\r\n\r\n\t\tpanel1 = new JPanel();\r\n\t\ttabbedPane.addTab(\"Dados Conta\", null, panel1, null);\r\n\t\tpanel1.setLayout(null);\r\n\r\n\t\ttextNConta = new JTextField();\r\n\t\ttextNConta.setBounds(193, 54, 155, 20);\r\n\t\ttextNConta.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextNConta.setColumns(10);\r\n\t\tpanel1.add(textNConta);\r\n\r\n\t\tlblNDaConta = new JLabel(\"N\\u00BA da Conta:\");\r\n\t\tlblNDaConta.setBounds(215, 26, 97, 28);\r\n\t\tlblNDaConta.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblNDaConta.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblNDaConta);\r\n\r\n\t\tlblGrupo = new JLabel(\"Grupo:\");\r\n\t\tlblGrupo.setBounds(358, 26, 97, 28);\r\n\t\tlblGrupo.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblGrupo.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblGrupo);\r\n\r\n\t\ttextGrupo = new JTextField();\r\n\t\ttextGrupo.setBounds(384, 54, 45, 20);\r\n\t\ttextGrupo.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextGrupo.setColumns(10);\r\n\t\tpanel1.add(textGrupo);\r\n\r\n\t\tlblCodIdentificador_3 = new JLabel(\"RGI:\");\r\n\t\tlblCodIdentificador_3.setBounds(52, 26, 97, 28);\r\n\t\tlblCodIdentificador_3.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblCodIdentificador_3.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblCodIdentificador_3);\r\n\r\n\t\ttextRGI = new JTextField();\r\n\t\ttextRGI.setBounds(30, 54, 155, 20);\r\n\t\ttextRGI.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextRGI.setColumns(10);\r\n\t\tpanel1.add(textRGI);\r\n\r\n\t\tlblMesRef = new JLabel(\"M\\u00EAs Refer\\u00EAncia:\");\r\n\t\tlblMesRef.setBounds(484, 26, 97, 28);\r\n\t\tlblMesRef.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblMesRef.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblMesRef);\r\n\r\n\t\ttextMesRef = new JTextField();\r\n\t\ttextMesRef.setBounds(455, 54, 155, 20);\r\n\t\ttextMesRef.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextMesRef.setColumns(10);\r\n\t\tpanel1.add(textMesRef);\r\n\r\n\t\tlblCodIdentificador_1 = new JLabel(\"Tipo de Liga\\u00E7\\u00E3o:\");\r\n\t\tlblCodIdentificador_1.setBounds(658, 26, 97, 28);\r\n\t\tlblCodIdentificador_1.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblCodIdentificador_1.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblCodIdentificador_1);\r\n\r\n\t\ttextTipoLig = new JTextField();\r\n\t\ttextTipoLig.setBounds(636, 54, 155, 20);\r\n\t\ttextTipoLig.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextTipoLig.setColumns(10);\r\n\t\tpanel1.add(textTipoLig);\r\n\r\n\t\tlblTipFat = new JLabel(\"Tipo de Faturamento:\");\r\n\t\tlblTipFat.setBounds(215, 100, 120, 28);\r\n\t\tlblTipFat.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblTipFat.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblTipFat);\r\n\r\n\t\ttextTipoFat = new JTextField();\r\n\t\ttextTipoFat.setBounds(198, 128, 155, 20);\r\n\t\ttextTipoFat.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextTipoFat.setColumns(10);\r\n\t\tpanel1.add(textTipoFat);\r\n\r\n\t\ttextConsumo = new JTextField();\r\n\t\ttextConsumo.setBounds(455, 128, 155, 20);\r\n\t\ttextConsumo.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextConsumo.setColumns(10);\r\n\t\tpanel1.add(textConsumo);\r\n\r\n\t\tlblConsumoM = new JLabel(\"Consumo m\\u00B3:\");\r\n\t\tlblConsumoM.setBounds(472, 100, 120, 28);\r\n\t\tlblConsumoM.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblConsumoM.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblConsumoM);\r\n\r\n\t\tlblLeitAtual = new JLabel(\"Leitura Atual:\");\r\n\t\tlblLeitAtual.setBounds(203, 223, 120, 28);\r\n\t\tlblLeitAtual.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblLeitAtual.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblLeitAtual);\r\n\r\n\t\ttextDataAtual = new JTextField();\r\n\t\ttextDataAtual.setBounds(312, 227, 120, 20);\r\n\t\ttextDataAtual.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextDataAtual.setColumns(10);\r\n\t\tpanel1.add(textDataAtual);\r\n\r\n\t\tJLabel lblData = new JLabel(\"Data\");\r\n\t\tlblData.setBounds(314, 185, 120, 28);\r\n\t\tlblData.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblData.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblData);\r\n\r\n\t\tJLabel lblApresentao = new JLabel(\"Apresenta\\u00E7\\u00E3o\");\r\n\t\tlblApresentao.setBounds(205, 185, 120, 28);\r\n\t\tlblApresentao.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblApresentao.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblApresentao);\r\n\r\n\t\tJSeparator separator = new JSeparator();\r\n\t\tseparator.setBounds(130, 202, 0, 35);\r\n\t\tpanel1.add(separator);\r\n\r\n\t\tJSeparator separator_1 = new JSeparator();\r\n\t\tseparator_1.setBounds(232, 214, 355, 2);\r\n\t\tpanel1.add(separator_1);\r\n\r\n\t\tJLabel lblLeitura = new JLabel(\"Leitura\");\r\n\t\tlblLeitura.setBounds(461, 185, 120, 28);\r\n\t\tlblLeitura.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblLeitura.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblLeitura);\r\n\r\n\t\tJLabel lblLeituraAnterior = new JLabel(\"Leitura Anterior:\");\r\n\t\tlblLeituraAnterior.setBounds(203, 250, 120, 28);\r\n\t\tlblLeituraAnterior.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblLeituraAnterior.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblLeituraAnterior);\r\n\r\n\t\ttextDataAnterior = new JTextField();\r\n\t\ttextDataAnterior.setBounds(312, 254, 120, 20);\r\n\t\ttextDataAnterior.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextDataAnterior.setColumns(10);\r\n\t\tpanel1.add(textDataAnterior);\r\n\r\n\t\ttextLeituraAnterior = new JTextField();\r\n\t\ttextLeituraAnterior.setBounds(461, 254, 120, 20);\r\n\t\ttextLeituraAnterior.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextLeituraAnterior.setColumns(10);\r\n\t\tpanel1.add(textLeituraAnterior);\r\n\r\n\t\ttextLeituraAtual = new JTextField();\r\n\t\ttextLeituraAtual.setBounds(461, 227, 120, 20);\r\n\t\ttextLeituraAtual.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextLeituraAtual.setColumns(10);\r\n\t\tpanel1.add(textLeituraAtual);\r\n\r\n\t\tlblObservacao = new JLabel(\"Observa\\u00E7\\u00E3o:\");\r\n\t\tlblObservacao.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblObservacao.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tlblObservacao.setBounds(358, 288, 120, 28);\r\n\t\tpanel1.add(lblObservacao);\r\n\r\n\t\ttextObs = new JTextField();\r\n\t\ttextObs.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextObs.setColumns(10);\r\n\t\ttextObs.setBounds(35, 314, 767, 20);\r\n\t\tpanel1.add(textObs);\r\n\r\n\t\tJSeparator separator_2 = new JSeparator();\r\n\t\tseparator_2.setBounds(444, 211, 0, 78);\r\n\t\tpanel1.add(separator_2);\r\n\t\tJLabel lblValorAgua = new JLabel(\"Valor \\u00C1gua\");\r\n\t\tlblValorAgua.setBounds(130, 345, 149, 28);\r\n\t\tpanel1.add(lblValorAgua);\r\n\t\tlblValorAgua.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblValorAgua.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\ttxtValorAgua = new JTextField();\r\n\t\ttxtValorAgua.setBounds(151, 366, 106, 20);\r\n\t\tpanel1.add(txtValorAgua);\r\n\t\ttxtValorAgua.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttxtValorAgua.setColumns(10);\r\n\t\ttxtValorEsgoto = new JTextField();\r\n\t\ttxtValorEsgoto.setBounds(352, 366, 106, 20);\r\n\t\tpanel1.add(txtValorEsgoto);\r\n\t\ttxtValorEsgoto.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttxtValorEsgoto.setColumns(10);\r\n\t\tJLabel lblValorEsgoto = new JLabel(\"Valor Esgoto\");\r\n\t\tlblValorEsgoto.setBounds(331, 345, 149, 28);\r\n\t\tpanel1.add(lblValorEsgoto);\r\n\t\tlblValorEsgoto.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblValorEsgoto.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tJLabel lblValorTotal = new JLabel(\"Valor Total\");\r\n\t\tlblValorTotal.setBounds(524, 345, 149, 28);\r\n\t\tpanel1.add(lblValorTotal);\r\n\t\tlblValorTotal.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblValorTotal.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\r\n\t\ttextValorTotal = new JTextField();\r\n\t\ttextValorTotal.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextValorTotal.setColumns(10);\r\n\t\ttextValorTotal.setBounds(547, 366, 106, 20);\r\n\t\tpanel1.add(textValorTotal);\r\n\r\n\t\tJButton btnCadastro = new JButton(\"Cadastro\");\r\n\t\tbtnCadastro.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\r\n\t\t\t\tCadastroAgua cadaguadao = new CadastroAgua();\r\n\r\n\t\t\t\tcadaguadao.setContaAguaRGI(textRGI.getText());\r\n\t\t\t\tcadaguadao.setContaAguaNConta(textNConta.getText());\r\n\t\t\t\tcadaguadao.setContaAguaGrupo(textGrupo.getText());\r\n\t\t\t\tcadaguadao.setContaAguaMesRef(textMesRef.getText());\r\n\t\t\t\tcadaguadao.setContaAguaTipoLigacao(textTipoLig.getText());\r\n\t\t\t\tcadaguadao.setContaAguaTipoFaturamento(textTipoFat.getText());\r\n\t\t\t\tcadaguadao.setContaAguaConsumo(textConsumo.getText());\r\n\t\t\t\tcadaguadao.setContaAguaDataLeituraAtual(textDataAtual.getText());\r\n\t\t\t\tcadaguadao.setContaAguaLeituraAtual(textLeituraAtual.getText());\r\n\t\t\t\tcadaguadao.setContaAguaDataLeituraAnterior(textDataAnterior.getText());\r\n\t\t\t\tcadaguadao.setContaAguaLeituraAnterior(textLeituraAnterior.getText());\r\n\t\t\t\tcadaguadao.setContaAguaObservacao(textObs.getText());\r\n\t\t\t\tcadaguadao.setContaAguaValorAgua(txtValorAgua.getText());\r\n\t\t\t\tcadaguadao.setContaAguaValorEsgoto(txtValorEsgoto.getText());\r\n\t\t\t\tcadaguadao.setContaAguaValorTotal(textValorTotal.getText());\r\n\r\n\t\t\t\tif ((textRGI.getText().isEmpty()) || (textNConta.getText().isEmpty()) || (textGrupo.getText().isEmpty())\r\n\t\t\t\t\t\t|| (textMesRef.getText().isEmpty()) || (textTipoLig.getText().isEmpty())\r\n\t\t\t\t\t\t|| (textTipoFat.getText().isEmpty()) || (textConsumo.getText().isEmpty())\r\n\t\t\t\t\t\t|| (textDataAtual.getText().isEmpty()) || (textLeituraAtual.getText().isEmpty())\r\n\t\t\t\t\t\t|| (textDataAnterior.getText().isEmpty()) || (textLeituraAnterior.getText().isEmpty())\r\n\t\t\t\t\t\t|| (textObs.getText().isEmpty()) || (txtValorAgua.getText().isEmpty())\r\n\t\t\t\t\t\t|| (txtValorEsgoto.getText().isEmpty()) || (textValorTotal.getText().isEmpty())) {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Os campos não podem estar vazios\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\telse {\r\n\r\n\t\t\t\t\tCadastroAguaDAO cadagua = new CadastroAguaDAO();\r\n\t\t\t\t\tcadagua.adiciona(cadaguadao);\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Conta registrada com sucesso! \");\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttextRGI.setText(\"\");\r\n\t\t\t\ttextNConta.setText(\"\");\r\n\t\t\t\ttextGrupo.setText(\"\");\r\n\t\t\t\ttextMesRef.setText(\"\");\r\n\t\t\t\ttextTipoLig.setText(\"\");\r\n\t\t\t\ttextTipoFat.setText(\"\");\r\n\t\t\t\ttextConsumo.setText(\"\");\r\n\t\t\t\ttextDataAtual.setText(\"\");\r\n\t\t\t\ttextLeituraAtual.setText(\"\");\r\n\t\t\t\ttextDataAnterior.setText(\"\");\r\n\t\t\t\ttextLeituraAnterior.setText(\"\");\r\n\t\t\t\ttextObs.setText(\"\");\r\n\t\t\t\ttxtValorAgua.setText(\"\");\r\n\t\t\t\ttxtValorEsgoto.setText(\"\");\r\n\t\t\t\ttextValorTotal.setText(\"\");\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tbtnCadastro.setBounds(423, 623, 107, 23);\r\n\t\tfrmTelaCadastro.getContentPane().add(btnCadastro);\r\n\r\n\t\tJLabel lblNewLabel_1_1 = new JLabel(\"New label\");\r\n\t\tlblNewLabel_1_1.setIcon(new ImageIcon(\"C:\\\\Users\\\\assen\\\\eclipse-workspace\\\\TecSus\\\\img\\\\IconAgua.png\"));\r\n\t\tlblNewLabel_1_1.setBounds(10, 11, 30, 30);\r\n\t\tfrmTelaCadastro.getContentPane().add(lblNewLabel_1_1);\r\n\r\n\t\tJButton lblNewLabel_3 = new JButton(\"New label\");\r\n\t\tlblNewLabel_3.addActionListener(new ActionListener() {\r\n\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tMenuEnergia window = new MenuEnergia();\r\n\t\t\t\twindow.frmMenuEnergia.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tlblNewLabel_3.setIcon(new ImageIcon(\"C:\\\\Users\\\\assen\\\\eclipse-workspace\\\\TecSus\\\\img\\\\IconReturn.png\"));\r\n\t\tlblNewLabel_3.setForeground(Color.WHITE);\r\n\t\tlblNewLabel_3.setBackground(Color.WHITE);\r\n\t\tlblNewLabel_3.setBounds(31, 611, 60, 54);\r\n\t\tfrmTelaCadastro.getContentPane().add(lblNewLabel_3);\r\n\t\ttextField_5 = new JTextField();\r\n\t\ttextField_5.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextField_5.setColumns(10);\r\n\t\ttextField_5.setBounds(292, 702, 106, 20);\r\n\t\tfrmTelaCadastro.getContentPane().add(textField_5);\r\n\t\tfrmTelaCadastro.setResizable(false);\r\n\t\tfrmTelaCadastro.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tfrmTelaCadastro.setForeground(Color.WHITE);\r\n\t\tfrmTelaCadastro.setTitle(\"TELA CADASTRO \\u00C1GUA\");\r\n\t\tfrmTelaCadastro.setBounds(100, 100, 960, 720);\r\n\t\tfrmTelaCadastro.setLocationRelativeTo(null);\r\n\r\n\t\timageIcon = new ImageIcon(\"img/IconAgua.png\");\r\n\r\n\t}",
"public StavkaFaktureInsert() {\n initComponents();\n CBFakture();\n CBProizvod();\n }",
"@Override\n\tpublic void showCarDialog(View v) {\n\t\tDialogFragment carDialog = CarDialog\n\t\t\t\t.newInstance(new Car()\n\t\t\t\t\t\t.newInstance(uclm.esi.cardroid.data.ice.Car\n\t\t\t\t\t\t\t\t.extractObject(mCar)));\n\t\tcarDialog.show(getSupportFragmentManager(),\n\t\t\t\tCarDialog.class.getSimpleName());\n\t}",
"public ViewEntry() {\n initComponents();\n pnlRates.add(new ViewRateSchedule()); \n pnlRates.validate();\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 jSeparator2 = new javax.swing.JSeparator();\n jLabel2 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n tabela = new javax.swing.JTable();\n jSeparator1 = new javax.swing.JSeparator();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n tfModelo = new javax.swing.JTextField();\n tfCor = new javax.swing.JTextField();\n tfValor = new javax.swing.JTextField();\n cbMarca = new javax.swing.JComboBox<>();\n btSalvar = new javax.swing.JButton();\n btDeletar = new javax.swing.JButton();\n btVoltar = new javax.swing.JButton();\n jLabel9 = new javax.swing.JLabel();\n tfAno = new javax.swing.JTextField();\n btAddMarca = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Concesionaria Karchow - Cadastro de Carro\");\n addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseMoved(java.awt.event.MouseEvent evt) {\n formMouseMoved(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Dialog\", 1, 48)); // NOI18N\n jLabel1.setText(\"Concesionaria Katchow\");\n\n jLabel2.setText(\"Cadastro de Carro\");\n\n tabela.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Codigo\", \"Descricao\", \"Cor\", \"Valor\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabela.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jScrollPane1.setViewportView(tabela);\n\n jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);\n\n jLabel3.setText(\"Carros cadastrados\");\n\n jLabel4.setText(\"NOVO CARRO\");\n\n jLabel5.setText(\"Modelo\");\n\n jLabel6.setText(\"Cor\");\n\n jLabel7.setText(\"Marca\");\n\n jLabel8.setText(\"Valor\");\n\n cbMarca.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n cbMarca.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cbMarcaActionPerformed(evt);\n }\n });\n\n btSalvar.setText(\"Salvar ✔\");\n btSalvar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btSalvarActionPerformed(evt);\n }\n });\n\n btDeletar.setText(\"Deletar ✖\");\n btDeletar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btDeletarActionPerformed(evt);\n }\n });\n\n btVoltar.setText(\"↩\");\n btVoltar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btVoltarActionPerformed(evt);\n }\n });\n\n jLabel9.setText(\"Ano\");\n\n btAddMarca.setText(\"Adicionar Marca\");\n btAddMarca.setToolTipText(\"Adiciona uma nova Marca para Carros\");\n btAddMarca.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btAddMarcaActionPerformed(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(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel2)\n .addGap(0, 216, Short.MAX_VALUE))\n .addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addGroup(layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel6)\n .addComponent(jLabel5)\n .addComponent(jLabel7)\n .addComponent(jLabel8)\n .addComponent(jLabel9))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(tfModelo)\n .addComponent(cbMarca, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(tfCor)\n .addComponent(tfValor)\n .addComponent(btSalvar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(tfAno)\n .addComponent(btDeletar, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btAddMarca, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addGap(18, 18, 18))\n .addGroup(layout.createSequentialGroup()\n .addComponent(btVoltar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 405, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))))\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.TRAILING)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 427, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 399, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(tfModelo, 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(jLabel6)\n .addComponent(tfCor, 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(jLabel7)\n .addComponent(cbMarca, 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(jLabel8)\n .addComponent(tfValor, 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(jLabel9)\n .addComponent(tfAno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(btSalvar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btDeletar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btAddMarca)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(btVoltar)))))\n .addContainerGap())\n );\n\n pack();\n setLocationRelativeTo(null);\n }",
"public UIBuilder getNewInstance(Map<String, Object> entries);",
"public CreateJPanel(Car car) {\n initComponents();\n this.car=car;\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n titleLabel = new javax.swing.JLabel();\n dateLabel = new javax.swing.JLabel();\n feesLabel = new javax.swing.JLabel();\n carIDText = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n titleLabel.setFont(new java.awt.Font(\"Calibri\", 0, 18)); // NOI18N\n titleLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n\n dateLabel.setFont(new java.awt.Font(\"Calibri\", 0, 18)); // NOI18N\n dateLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n\n feesLabel.setFont(new java.awt.Font(\"Calibri\", 0, 18)); // NOI18N\n feesLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n\n carIDText.setFont(new java.awt.Font(\"Calibri\", 0, 18)); // NOI18N\n carIDText.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\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(36, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(titleLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 270, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(carIDText, javax.swing.GroupLayout.PREFERRED_SIZE, 270, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(feesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 270, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(dateLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 270, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(30, 30, 30))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(titleLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(carIDText, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(dateLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(7, 7, 7)\n .addComponent(feesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(30, Short.MAX_VALUE))\n );\n\n pack();\n }",
"private com.hps.july.persistence.CarKey keyFromFields ( int f0 ) {\n com.hps.july.persistence.CarKey keyClass = new com.hps.july.persistence.CarKey();\n keyClass.car = f0;\n return keyClass;\n }",
"@Override\r\n\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\tboolean hasIngredients = false;\r\n\t\t\tfor(JTextField f : ingredientFields){\r\n\t\t\t\tif(!f.getText().equals(\"\")){\r\n\t\t\t\t\thasIngredients = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (nameField.getText().equals(\"\") || descriptionField.getText().equals(\"\") || directionsField.getText().equals(\"\") || !hasIngredients) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Please fill out all fields.\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\tdispose();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tRecipe recipe = new Recipe(nameField.getText(), descriptionField.getText(), directionsField.getText()); \r\n\r\n\t\t\tfor(int i=0; i<ingredientFields.size(); i++) {\r\n\t\t\t\tif (!ingredientFields.get(i).getText().equals(\"\"))\r\n\t\t\t\t\t\trecipe.setIngredient(ingredientFields.get(i).getText());\r\n\t\t\t}\r\n\r\n\t\t\tlist.add(recipe);\t\t \r\n\t\t\tlistModel.addElement(nameField.getText());\r\n\t\t\tlistNames.setModel(listModel);\r\n\t\t\tlistNames.setSelectedIndex(list.size()-1);\r\n\r\n\t\t\t//saveList(list);\r\n\r\n\t\t\tdispose();\t\t\t\r\n\t\t}",
"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}",
"private void addCoche(ClickEvent clickEvent) throws NotFoundExcept {\r\n\t\tCocheDTO cocheDTO = new CocheDTO();\r\n\t\taddCocheSetValues(cocheDTO);\r\n\t\tcocheService.create(cocheDTO);\r\n\t\taddCocheEraseFields();\r\n\t\tthis.refresh(clickEvent);\r\n\t}",
"protected abstract T createNewEntry(PersistentEntity persistentEntity);",
"@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}",
"@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}",
"private void createFAB() {\r\n fab = findViewById(R.id.fabEditTask);\r\n fab.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View view) {\r\n goIntoEditMode();\r\n }\r\n });\r\n }",
"private void butNew_Click(Object sender, System.EventArgs e) throws Exception {\n FormProcCodeNew FormPCN = new FormProcCodeNew();\n FormPCN.ShowDialog();\n if (FormPCN.Changed)\n {\n changed = true;\n ProcedureCodes.refreshCache();\n fillGrid();\n }\n \n }",
"public Car () {\n\n Make = \"\";\n Model = \"\";\n Year = 2017;\n Price = 0.00;\n }",
"private void createFieldsComp() {\n Composite fieldComp = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(2, false);\n GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);\n fieldComp.setLayout(gl);\n fieldComp.setLayoutData(gd);\n\n Label nameLbl = new Label(fieldComp, SWT.LEFT);\n nameLbl.setText(\"Name: \");\n\n caseNameText = new Text(fieldComp, SWT.SINGLE);\n gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);\n gd.minimumWidth = 200;\n caseNameText.setLayoutData(gd);\n caseNameText.addKeyListener(new KeyAdapter() {\n\n @Override\n public void keyReleased(KeyEvent e) {\n super.keyReleased(e);\n if (e.character == SWT.CR || e.character == SWT.KEYPAD_CR) {\n if (verifySelection()) {\n close();\n }\n }\n }\n });\n }",
"public EntryReeferMuatBean() {\n registration = new Registration();\n registration.setMasterCustomer(new MasterCustomer());\n registration.setPlanningVessel(new PlanningVessel());\n registration.getPlanningVessel().setPreserviceVessel(new PreserviceVessel());\n registration.getPlanningVessel().getPreserviceVessel().setMasterVessel(new MasterVessel());\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 jtfPlacaVeiculo = new javax.swing.JTextField();\n jScrollPane1 = new javax.swing.JScrollPane();\n jtbVeiculos = new javax.swing.JTable();\n jbSelecionar = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jbBuscar = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Buscar Veiculo\");\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent evt) {\n formWindowClosing(evt);\n }\n });\n getContentPane().setLayout(new java.awt.CardLayout());\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n jLabel1.setText(\"Placa do Veiculo\");\n\n jtfPlacaVeiculo.setToolTipText(\"Cidade\");\n jtfPlacaVeiculo.setName(\"Placa\"); // NOI18N\n\n jtbVeiculos.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"#\", \"Capacidade\", \"Placa\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.String.class, java.lang.String.class, java.lang.String.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jtbVeiculos.getTableHeader().setReorderingAllowed(false);\n jScrollPane1.setViewportView(jtbVeiculos);\n if (jtbVeiculos.getColumnModel().getColumnCount() > 0) {\n jtbVeiculos.getColumnModel().getColumn(1).setResizable(false);\n jtbVeiculos.getColumnModel().getColumn(2).setResizable(false);\n }\n\n jbSelecionar.setText(\"Selecionar\");\n jbSelecionar.setMaximumSize(new java.awt.Dimension(73, 40));\n jbSelecionar.setMinimumSize(new java.awt.Dimension(73, 40));\n jbSelecionar.setPreferredSize(new java.awt.Dimension(73, 40));\n jbSelecionar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jbSelecionarActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Cancelar\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jbBuscar.setText(\"Buscar\");\n jbBuscar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jbBuscarActionPerformed(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 .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jbSelecionar, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jtfPlacaVeiculo)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jbBuscar)))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jtfPlacaVeiculo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jbBuscar))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 231, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jbSelecionar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n getContentPane().add(jPanel1, \"card2\");\n\n pack();\n setLocationRelativeTo(null);\n }",
"public DataEntry(java.awt.Window parent, boolean modal, DaoInterface dao) {\n super(parent);\n super.setModal(modal);\n\n initComponents();\n this.dao = dao;\n txtCategory.setEditable(true);\n categoryHolder.updateItems(dao.getCategorys());\n txtCategory.setModel(categoryHolder);\n validation.addTypeFormatter(txtPrice, \"#0.00\", BigDecimal.class);\n validation.addTypeFormatter(txtQuantity, \"#0.00\", BigDecimal.class);\n validation.addTypeFormatter(txtID, \"#0\", Integer.class);\n \n txtID.setName(\"txtID\");\n txtDescription.setName(\"txtDescription\");\n txtName.setName(\"txtName\");\n txtCategory.setName(\"txtCategory\");\n txtPrice.setName(\"txtPrice\");\n txtQuantity.setName(\"txtQuantity\"); \n saveButton.setName(\"saveButton\");\n CancelButton.setName(\"CancelButton\");\n }",
"private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.insertar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Ingresado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para guardar registro!\");\n }\n }",
"public RegistrarCompra() {\n initComponents();\n tabelaFornecedor.setModel(modelFornecedor);\n\n }",
"public void acceptEntry(View view)\n {\n\n String name = nameEdit.getText().toString();\n\n String numStandsString = numStandsEdit.getText().toString();\n int numStands = Integer.parseInt(numStandsString);\n\n if(isEdit)\n {\n Woodlot currWoodlot = WCCCProgram.getCurrWoodlot();\n currWoodlot.setName(name);\n currWoodlot.setNumStands(numStands);\n }\n else\n {\n DataBase database = WCCCProgram.getRoot();\n database.addWoodlot(new Woodlot(name, numStands));\n }\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n txtFlightNumber = new javax.swing.JTextField();\n txtArriveTime = new javax.swing.JTextField();\n txtDepartureTime = new javax.swing.JTextField();\n txtTo = new javax.swing.JTextField();\n txtFrom = new javax.swing.JTextField();\n btnBack = new javax.swing.JButton();\n btnCreateFlight = new javax.swing.JButton();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n txtPrice = new javax.swing.JTextField();\n\n jLabel1.setText(\"From:\");\n\n jLabel2.setText(\"To:\");\n\n jLabel3.setText(\"Departure Time:\");\n\n jLabel4.setText(\"Arrive Time:\");\n\n jLabel5.setText(\"Flight Number:\");\n\n btnBack.setText(\"Back\");\n btnBack.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnBackActionPerformed(evt);\n }\n });\n\n btnCreateFlight.setText(\"Create flight\");\n btnCreateFlight.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCreateFlightActionPerformed(evt);\n }\n });\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 0, 36)); // NOI18N\n jLabel6.setText(\"Create New Flight\");\n\n jLabel7.setText(\"Price:\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(68, 68, 68)\n .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(164, 164, 164)\n .addComponent(jLabel6)\n .addGap(0, 337, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(364, 364, 364)\n .addComponent(btnCreateFlight))\n .addGroup(layout.createSequentialGroup()\n .addGap(241, 241, 241)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(102, 102, 102)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtArriveTime, javax.swing.GroupLayout.DEFAULT_SIZE, 202, Short.MAX_VALUE)\n .addComponent(txtFlightNumber)\n .addComponent(txtDepartureTime)\n .addComponent(txtTo)\n .addComponent(txtFrom)\n .addComponent(txtPrice))))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(37, 37, 37)\n .addComponent(jLabel6))\n .addGroup(layout.createSequentialGroup()\n .addGap(71, 71, 71)\n .addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtFrom, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtTo, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(31, 31, 31)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtDepartureTime, javax.swing.GroupLayout.DEFAULT_SIZE, 38, Short.MAX_VALUE))\n .addGap(32, 32, 32)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtArriveTime, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(34, 34, 34)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtFlightNumber, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(26, 26, 26)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtPrice, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 26, Short.MAX_VALUE)\n .addComponent(btnCreateFlight, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(63, 63, 63))\n );\n }",
"private void azzeraInsertForm() {\n\t\tviewInserimento.getCmbbxTipologia().setSelectedIndex(-1);\n\t\tviewInserimento.getTxtFieldDataI().setText(\"\");\n\t\tviewInserimento.getTxtFieldValore().setText(\"\");\n\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t}",
"public FrCDs() {\n initComponents();\n this.setResizable(false);\n this.setLocationRelativeTo(null);\n \n Genero_dao g = new Genero_dao();\n Artista_dao a = new Artista_dao();\n CDs_dao c = new CDs_dao();\n \n for(TabelaGeneroBean ge: g.findAll()){\n g_box.addItem(ge);\n }\n for(TabelaArtistaBean ar: a.findAll()){\n g_box2.addItem(ar);\n }\n \n painel1.setVisible(false);\n btn_edit.setEnabled(false);\n btn_excluir.setEnabled(false);\n btn_cad.setEnabled(true);\n }",
"public ControllerNewCRV(newCRV fenetre, DAOProduit DaoProd, DAOCategorie DaoCat,DAOMedecin daoMed,DAOVisiteur daoVisi, DAOCompteRendu daoCRV) {\n\t\t\n\t\tthis.fenetre = fenetre;\n\t\tthis.daoCat = DaoCat;\n\t\tthis.daoProd = DaoProd;\n\t\tthis.daoMed = daoMed;\n\t\tthis.daoVisi = daoVisi;\n\t\tthis.daoCRV = daoCRV;\n\t\tfenetre.getBtnRetour().addActionListener(this);\n\t\tfenetre.getBtnValider().addActionListener(this);\n\t\tfenetre.getBtnAjouter().addActionListener(this);\n\t\tfenetre.getComboBox_cat().addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent event) {\n\t //\n\t // Get the source of the component, which is our combo\n\t // box.\n\t //\n\t JComboBox comboBox = (JComboBox) event.getSource();\n\t String comboBoxname = comboBox.getName();\n\t \t\t\n\t \t\tswitch (comboBoxname) {\n\t \t\tcase \"selectionner\":\n\t \t\t\tviewProduit();\n\t \t\t\tbreak;\t\n\n\t \t\tdefault:\n\t \t\t\tbreak;\n\t \t\t}\t\t\n\t \n\n\t }\n\t });\n\t}",
"private void criaCabecalho() {\r\n\t\tJLabel cabecalho = new JLabel(\"Cadastro de Homem\");\r\n\t\tcabecalho.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tcabecalho.setFont(new Font(\"Arial\", Font.PLAIN, 16));\r\n\t\tcabecalho.setForeground(Color.BLACK);\r\n\t\tcabecalho.setBounds(111, 41, 241, 33);\r\n\t\tpainelPrincipal.add(cabecalho);\r\n\t}",
"public CarEdition() {\n ELContext context = FacesContext.getCurrentInstance().getELContext();\n app = (CarsaleApplication) FacesContext.getCurrentInstance().getApplication().getELResolver().getValue(context, null, \"carsaleApplication\");\n try {\n this.carId = Integer.valueOf(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"carId\"));\n this.car = searchCar(this.carId);\n } catch (Exception ex) {\n Logger.getLogger(CarDetail.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public CadastroProdutoNew() {\n initComponents();\n }",
"FORM createFORM();",
"public TELA_DE_CARREGAMENTO() {\n initComponents();\n }",
"public FormInserir() {\n initComponents();\n }"
] | [
"0.5766672",
"0.5700963",
"0.56188875",
"0.5597876",
"0.5550813",
"0.554811",
"0.5492984",
"0.5453417",
"0.53971833",
"0.5383777",
"0.5338573",
"0.5328128",
"0.53029835",
"0.53017867",
"0.5237113",
"0.52347934",
"0.52334166",
"0.521426",
"0.5193777",
"0.51723564",
"0.5170215",
"0.51695406",
"0.5160823",
"0.51478165",
"0.5147746",
"0.5141931",
"0.5135755",
"0.51272833",
"0.510393",
"0.51022077",
"0.50951165",
"0.5091569",
"0.5074557",
"0.5070832",
"0.50560606",
"0.5051959",
"0.50511134",
"0.5038286",
"0.50238514",
"0.50233835",
"0.501647",
"0.5015977",
"0.5005877",
"0.500379",
"0.5002521",
"0.49845067",
"0.49793735",
"0.49696067",
"0.49679816",
"0.49651676",
"0.49625927",
"0.49560803",
"0.49511385",
"0.4939968",
"0.49387473",
"0.4936761",
"0.49342978",
"0.49254134",
"0.49188396",
"0.49104965",
"0.49101168",
"0.49063665",
"0.49055314",
"0.49055207",
"0.4904636",
"0.48955715",
"0.48950532",
"0.489257",
"0.48914832",
"0.48908877",
"0.48859572",
"0.48852605",
"0.48839918",
"0.48686448",
"0.48664245",
"0.48658693",
"0.48655483",
"0.4864222",
"0.4861758",
"0.48610917",
"0.4858391",
"0.485341",
"0.48524097",
"0.48499197",
"0.48497707",
"0.48441797",
"0.48432848",
"0.48418236",
"0.48398235",
"0.4839708",
"0.48389095",
"0.48371702",
"0.48343062",
"0.48333198",
"0.48332515",
"0.48248342",
"0.48235467",
"0.4821698",
"0.48212525",
"0.48192757"
] | 0.60235804 | 0 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jLabel3 = new javax.swing.JLabel();
jLabel1 = new javax.swing.JLabel();
entryTimeLabel = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
entryDateLabel = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
ticketLabel = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
priceTextField = new javax.swing.JTextField();
jLabel9 = new javax.swing.JLabel();
jButton1 = new javax.swing.JButton();
jLabel3.setText("jLabel3");
jLabel1.setFont(new java.awt.Font("Calibri", 1, 14)); // NOI18N
jLabel1.setText("HORA D'ENTRADA");
entryTimeLabel.setFont(new java.awt.Font("Calibri", 1, 14)); // NOI18N
entryTimeLabel.setForeground(new java.awt.Color(255, 0, 0));
jLabel4.setFont(new java.awt.Font("Calibri", 1, 14)); // NOI18N
jLabel4.setText("DATA D'ENTRADA");
entryDateLabel.setFont(new java.awt.Font("Calibri", 1, 14)); // NOI18N
entryDateLabel.setForeground(new java.awt.Color(255, 0, 0));
jLabel6.setFont(new java.awt.Font("Calibri", 1, 14)); // NOI18N
jLabel6.setText("NOMBRE DE COTXE");
ticketLabel.setFont(new java.awt.Font("Calibri", 1, 14)); // NOI18N
ticketLabel.setForeground(new java.awt.Color(255, 0, 0));
jLabel8.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N
jLabel8.setForeground(new java.awt.Color(255, 0, 0));
jLabel8.setText("QUANTITAT PACTADA");
priceTextField.setFont(new java.awt.Font("Calibri", 1, 14)); // NOI18N
priceTextField.setForeground(new java.awt.Color(255, 0, 0));
priceTextField.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
priceTextField.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));
priceTextField.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
priceTextFieldActionPerformed(evt);
}
});
jLabel9.setFont(new java.awt.Font("Calibri", 1, 14)); // NOI18N
jLabel9.setText("€");
jButton1.setText("Imprimir Ticket F1");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap(24, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jButton1)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(priceTextField)
.addComponent(ticketLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(entryDateLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(entryTimeLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel9)))
.addContainerGap(21, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap(67, Short.MAX_VALUE)
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(entryTimeLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel4)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(entryDateLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel6)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(ticketLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel8)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(priceTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel9))
.addGap(18, 18, 18)
.addComponent(jButton1)
.addContainerGap(86, Short.MAX_VALUE))
);
pack();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n initComponents();\n }",
"public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }",
"public FormListRemarking() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n \n }",
"public FormPemilihan() {\n initComponents();\n }",
"public GUIForm() { \n initComponents();\n }",
"public FrameForm() {\n initComponents();\n }",
"public TorneoForm() {\n initComponents();\n }",
"public FormCompra() {\n initComponents();\n }",
"public muveletek() {\n initComponents();\n }",
"public Interfax_D() {\n initComponents();\n }",
"public quanlixe_form() {\n initComponents();\n }",
"public SettingsForm() {\n initComponents();\n }",
"public Soru1() {\n initComponents();\n }",
"public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }",
"public soal2GUI() {\n initComponents();\n }",
"public EindopdrachtGUI() {\n initComponents();\n }",
"public MechanicForm() {\n initComponents();\n }",
"public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }",
"public quotaGUI() {\n initComponents();\n }",
"public BloodDonationGUI() {\n initComponents();\n }",
"public PatientUI() {\n initComponents();\n }",
"public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }",
"public Oddeven() {\n initComponents();\n }",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public Magasin() {\n initComponents();\n }",
"public intrebarea() {\n initComponents();\n }",
"public RadioUI()\n {\n initComponents();\n }",
"public NewCustomerGUI() {\n initComponents();\n }",
"public ZobrazUdalost() {\n initComponents();\n }",
"public FormUtama() {\n initComponents();\n }",
"public p0() {\n initComponents();\n }",
"public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }",
"public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }",
"public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }",
"public form2() {\n initComponents();\n }",
"public kunde() {\n initComponents();\n }",
"public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}",
"public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"public MusteriEkle() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }",
"public frmMain() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public DESHBORDPANAL() {\n initComponents();\n }",
"public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }",
"public frmVenda() {\n initComponents();\n }",
"public Botonera() {\n initComponents();\n }",
"public FrmMenu() {\n initComponents();\n }",
"public OffertoryGUI() {\n initComponents();\n setTypes();\n }",
"public JFFornecedores() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public EnterDetailsGUI() {\n initComponents();\n }",
"public vpemesanan1() {\n initComponents();\n }",
"public Kost() {\n initComponents();\n }",
"public UploadForm() {\n initComponents();\n }",
"public frmacceso() {\n initComponents();\n }",
"public FormHorarioSSE() {\n initComponents();\n }",
"public HW3() {\n initComponents();\n }",
"public Managing_Staff_Main_Form() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }",
"public sinavlar2() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"public P0405() {\n initComponents();\n }",
"public MiFrame2() {\n initComponents();\n }",
"public IssueBookForm() {\n initComponents();\n }",
"public Choose1() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }",
"public GUI_StudentInfo() {\n initComponents();\n }",
"public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }",
"public JFrmPrincipal() {\n initComponents();\n }",
"public bt526() {\n initComponents();\n }",
"public Pemilihan_Dokter() {\n initComponents();\n }",
"public Ablak() {\n initComponents();\n }",
"@Override\n\tprotected void initUi() {\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}",
"public Pregunta23() {\n initComponents();\n }",
"public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }",
"public AvtekOkno() {\n initComponents();\n }",
"public busdet() {\n initComponents();\n }",
"public ViewPrescriptionForm() {\n initComponents();\n }",
"public Ventaform() {\n initComponents();\n }",
"public Kuis2() {\n initComponents();\n }",
"public POS1() {\n initComponents();\n }",
"public CreateAccount_GUI() {\n initComponents();\n }",
"public Carrera() {\n initComponents();\n }",
"public EqGUI() {\n initComponents();\n }",
"public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }",
"public nokno() {\n initComponents();\n }",
"public dokter() {\n initComponents();\n }",
"public ConverterGUI() {\n initComponents();\n }",
"public hitungan() {\n initComponents();\n }",
"public Modify() {\n initComponents();\n }",
"public frmAddIncidencias() {\n initComponents();\n }",
"public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }"
] | [
"0.73195183",
"0.7290407",
"0.7290407",
"0.7290407",
"0.72855854",
"0.7248445",
"0.7213232",
"0.72084314",
"0.7195551",
"0.71902007",
"0.71835697",
"0.7158979",
"0.71473545",
"0.70928645",
"0.70807934",
"0.70575565",
"0.6987147",
"0.6976941",
"0.69544566",
"0.69541115",
"0.6943778",
"0.6942792",
"0.6935224",
"0.6931817",
"0.6928287",
"0.69246083",
"0.6924253",
"0.69117594",
"0.6910518",
"0.68936557",
"0.68927425",
"0.6891522",
"0.68911785",
"0.6889459",
"0.68826854",
"0.68823767",
"0.6880858",
"0.6878632",
"0.68753785",
"0.68741786",
"0.68710285",
"0.68593234",
"0.6856001",
"0.6855885",
"0.685485",
"0.68537056",
"0.68532616",
"0.68519884",
"0.68519884",
"0.6843908",
"0.6836617",
"0.68361354",
"0.68289286",
"0.68281245",
"0.6826939",
"0.682426",
"0.68220174",
"0.68170464",
"0.6816829",
"0.68109316",
"0.6808785",
"0.6808737",
"0.6808307",
"0.6807784",
"0.6801649",
"0.67936075",
"0.67933095",
"0.67924714",
"0.67911524",
"0.67894745",
"0.67889065",
"0.6787865",
"0.6781763",
"0.6766413",
"0.67660075",
"0.6765137",
"0.6756547",
"0.6756297",
"0.67528564",
"0.6752207",
"0.67416096",
"0.67398196",
"0.6737052",
"0.6736384",
"0.6734045",
"0.67276424",
"0.6726131",
"0.6721189",
"0.6715488",
"0.671506",
"0.67148006",
"0.6708023",
"0.67061347",
"0.67027885",
"0.6701509",
"0.670121",
"0.6699335",
"0.66989076",
"0.6694664",
"0.6690946",
"0.6688705"
] | 0.0 | -1 |
Create an empty connection | public PhysicalLink() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Connection createConnection();",
"void createConnection();",
"public Connection() {\n\t\t\n\t}",
"private Connection() {\n\t\tSystem.out.println(\"--Connection Created--\");\n\t}",
"private Connection () {}",
"public AbstractConnection() {\n }",
"private void createConnection() {\n this.callbacks = getCallbacks();\n\n Properties props = new Properties();\n props.putAll(getTestProps());\n props.putAll(getProps());\n this.connection = Connections.create((ConnectionCallbacks) callbacks, props);\n configureConnection(connection);\n }",
"public static Connection createConnection() {\n\t\treturn new FabricaDeConexoes().getConnection();\n\t}",
"private Connection() {\n \n }",
"private Connection() {\n\t\tSystem.out.println(\">> Connection Object Constructed at \"+this);\n\t}",
"abstract public boolean createConnection();",
"public Connector()\n\t{\n\t\tconn = null;\n\t}",
"public ConnectionManager() {\r\n\t\tthis(DEFAULT_PORT, true, true);\r\n\t}",
"public Connection create() {\n\t\tif(ds==null)return null ;\n\t\ttry{\n\t\t\treturn ds.getConnection();\n\t\t}catch(Exception e ){\n\t\t\tSystem.out.println(e) ;\n\t\t\treturn null ;\n\t\t}\n\t\t\n\t}",
"public DaoConnection() {\n\t\t\n\t}",
"NodeConnection createNodeConnection();",
"public SqlConnection createConnection() {\n return new SqlConnection(this, VM.getOrThrow());\n }",
"private void openConnection(){}",
"private Connection(){\n\n }",
"public boolean createConnection() throws CommunicationException;",
"public <T> Connection<T> createConnection( ConnectionContext<T> context ) throws ConnectionBuildException;",
"public void createConnection() throws ServerUnavailableException {\n clearConnection();\n while (serverSock == null) {\n try {\n // try to open a Socket to the server\n InetAddress addr = InetAddress.getByName(host);\n System.out.println(\"attempting to connect to \" + addr + \":\" + port + \"...\");\n serverSock = new Socket(addr, port);\n in = new BufferedReader(new InputStreamReader(serverSock.getInputStream()));\n out = new BufferedWriter(new OutputStreamWriter(serverSock.getOutputStream()));\n } catch (IOException e) {\n throw new ServerUnavailableException(\"Unable to connect to the server\");\n }\n }\n }",
"Connection createConnection(ExecutorService pool);",
"public ConnectionConfig createConnection()\n {\n return _connectionConfig;\n }",
"@Override\n public Connection call() throws Exception {\n return createConnection();\n }",
"protected abstract ConnectionBase createNewConnection(Socket socket);",
"public PooledConnection newInstance() {\n return new PooledConnection(pool);\n }",
"abstract public void openConnection();",
"public DBConnection()\n {\n\n }",
"ClientConnection connection();",
"public DatabaseConnection newConnection();",
"public DBConnection() {\n this(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST, DB_PORT);\n }",
"@Override\r\n\tpublic Connection getConnection() {\n\t\treturn null;\r\n\t}",
"public void newConnection(String hostname, int port) throws Exception;",
"public SocketChannelTarantoolConnection() {\n\t\tthis(\"localhost\", 33013);\n\t}",
"public static Connection getConnection() {\n return singleInstance.createConnection();\n }",
"private DbConnection() {\n }",
"public static Connection getConnection() {\n\treturn null;\n}",
"private Connection createConnection() {\n try {\n return DriverManager.getConnection(\"jdbc:mysql://\" + host + \":\" + port + \"/\" + db, user, password);\n } catch (SQLException e) {\n e.printStackTrace();\n return null;\n }\n }",
"default void connect() { }",
"public ConnectionManager() {\n }",
"private ConnectionPool() {\n connections = new LinkedBlockingQueue<>(DEFAULT_POOL_SIZE);\n this.init();\n }",
"private DBConnection() \n {\n initConnection();\n }",
"public ServerConnecter() {\r\n\r\n\t}",
"public NoConnectionProvidedException() {\n super();\n }",
"private TcpClient()\n {\n socket = null;\n writer = null;\n connected = false;\n \n connect(\"localhost\", 7778);\n }",
"protected Connection newConnection (InetAddress ip, int port){\n\t\t\treturn new ChatConnection(ip, port);\r\n\t\t}",
"public Connection createConnection(){\n Connection conn = null;\n registerDriver();\n createURL();\n\n try {\n conn = DriverManager.getConnection(urlDB,username,password);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n System.out.println((conn != null)?\"You made it, take control your database now!\":\"Failed to make connection!\");\n\n return conn;\n}",
"public static Connection getConnection() {\n\t\treturn null;\n\t}",
"public static Connection getConnection() {\n\t\treturn null;\r\n\t}",
"public ServerConnection()\n {\n //Initializing of the variables used in the constructor\n this.hostAddress = \"http://localhost\";\n this.port = 8882;\n }",
"public LDAPSDKConnection createConnection() {\r\n return new NetscapeV3Connection(false);\r\n }",
"public Connection getConnection();",
"public Connection getConnection();",
"public Connection getConnection();",
"private void establishConnection() {\n\n try {\n\n for(Clone clone:this.clones){\n ClearConnection connection = new ClearConnection();\n connection.connect(clone.getIp(), clone.getOffloadingPort(), 5 * 1000);\n this.connections.add(connection);\n }\n\n this.protocol = new ERAMProtocol();\n this.ode = new ERAMode();\n\n } catch (Exception e) {\n Log.e(TAG,\"Connection setup with the Remote Server failed - \" + e);\n }\n }",
"public void connect() {}",
"public abstract Connection getConnection();",
"void init() throws CouldNotInitializeConnectionPoolException;",
"public MapiSocket() {\n\t\tcon = null;\n\t}",
"public void setConnection(Connection connection) {\n //doNothing\n }",
"private SequencerConnection() { }",
"public void connexion() {\r\n\t\ttry {\r\n\r\n\t\t\tsoapConnFactory = SOAPConnectionFactory.newInstance();\r\n\t\t\tconnection = soapConnFactory.createConnection();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}",
"public static void connect() {\n \t\tconnPool.start();\n \t}",
"public\n Connection getConnection();",
"public Client() {}",
"public ConexionDB() {\n\n\t\tconn = null;\n\n\t}",
"public void createConnection() {\n\t\tif (path != null) {\n\t\t\ttry {\n\t\t\t\tconn = DriverManager.getConnection(path);\n\t\t\t} catch(SQLException se){\n\t\t\t //Handle errors for JDBC\n\t\t\t se.printStackTrace();\n\t\t\t }catch(Exception e){\n\t\t\t //Handle errors for Class.forName\n\t\t\t e.printStackTrace();\n\t\t\t }\n\t\t}\n\t}",
"public void initializeConnection() {\n\n cluster = Cluster.builder().addContactPoint(host).build();\n session = cluster.connect(keyspaceName);\n session.execute(\"USE \".concat(keyspaceName));\n }",
"public IPConnection() {\n\t\tbrickd = new BrickDaemon(\"2\", this);\n\t}",
"ConnectionImpl getNewConnection() {\n if (injectedConnection != null) {\n return injectedConnection;\n }\n return new ConnectionImpl();\n }",
"public static Connection establishConnection() {\n\t\tProperties props = new Properties();\n\t\tprops.setProperty(\"gssEncMode\", \"disable\");\n\t\tprops.setProperty(\"user\", \"pi\");\n\t\tprops.setProperty(\"password\", \"Bdw040795\"); // Should probably find a way to not have password in plaintext\n\t\tprops.setProperty(\"sslmode\", \"disable\");\n\t\tConnection WeatherDB;\n\t\ttry {\n\t\tWeatherDB = DriverManager.getConnection(\"jdbc:postgresql://10.0.0.100:5433/weather_app\", props);\n\t\treturn WeatherDB;\n\t\t} catch (SQLException e) {\n\t\te.printStackTrace();\n\t\tWeatherDB = null;\n\t\treturn WeatherDB;\n\t\t}\n\t}",
"public void init() {\r\n \tconnection = Connect.initConnexion();\r\n \tSystem.out.println(\"connexion :\"+connection);\r\n }",
"public TelefoneDao() {\n\t\tconnection = SingleConnection.getConnection();\n\t}",
"InternalSession createEmptySession();",
"public void initiateConnection() {\n\t\tif (Settings.getRemoteHostname() != null) {\n\t\t\ttry {\n\t\t\t\toutgoingConnection(new Socket(Settings.getRemoteHostname(), Settings.getRemotePort()));\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.error(\"failed to make connection to \" + Settings.getRemoteHostname() + \":\"\n\t\t\t\t\t\t+ Settings.getRemotePort() + \" :\" + e);\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t}\n\t}",
"private Connection generateConnection() throws SQLException, InterruptedException, TimeoutException{\n\t\tif ( activeConnectionSemaphore.tryAcquire(timeOut, TimeUnit.SECONDS) ){\n\t\t\tConnection conn = createConnection();\n\t\t\treturn conn;\n\t\t}else{\n\t\t\tthrow new TimeoutException(\"Timed out waiting for a connection.\");\n\t\t}\n\t}",
"public void makeConnection() {\n\t\t// make a socket, output stream, and try connecting to the server\n\t\twhile (!connection) {\n\t\t\ttry {\n\t\t\t\tsocket = new Socket(address, port);\n\t\t\t\toutStream = new ObjectOutputStream(socket.getOutputStream());\n\t\t\t\tconnection = true;\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"@NbBundle.Messages(value = {\n \"MSG_AgentConnectionBroken=Control connection with JShell VM is broken, could not connect to agent\",\n \"MSG_AgentNotReady=The JShell VM is not ready for operation\"\n })\n public JShellConnection createConnection() throws IOException {\n JShellConnection old;\n synchronized (this) {\n if (closed) {\n throw new IOException(Bundle.MSG_AgentConnectionBroken());\n }\n if (expectDebugger && debuggerMachine == null) {\n return null;\n }\n// old = connection;\n// connection = null;\n }\n /*\n if (old != null) {\n old.shutDown();\n // notify about the old connection being trashed\n ShellLaunchEvent ev = new ShellLaunchEvent(mgr, old, false);\n mgr.fire((l) -> l.connectionClosed(ev));\n }\n */\n SocketChannel sc = SocketChannel.open();\n sc.configureBlocking(true);\n Socket sock = sc.socket();\n sock.connect(connectAddress, ShellLaunchManager.CONNECT_TIMEOUT);\n // turn to nonblocking mode\n sc.configureBlocking(false);\n boolean notify = false;\n JShellConnection con = new JShellConnection(this, sock.getChannel());\n /*\n synchronized (this) {\n if (connection == null) {\n connection = con;\n notify = true;\n } else {\n con = connection;\n }\n }\n */\n synchronized (this) {\n connections.add(con);\n }\n if (notify) {\n ShellLaunchEvent ev = new ShellLaunchEvent(mgr, con, false);\n mgr.fire((l) -> l.connectionInitiated(ev));\n }\n return con;\n }",
"public void createCon(){\n\t\ttry {\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\t\tcon=DriverManager.getConnection(\"jdbc:oracle:thin:@172.26.132.40:1521:ORCLILP\", \"a63d\", \"a63d\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\n\t}",
"private DataConnection() {\n \tperformConnection();\n }",
"private static final HttpURLConnection createDefaultConn(final URL _url) throws IOException {\n\n\t\tfinal HttpURLConnection conn = (HttpURLConnection) _url.openConnection();\n\t\tconn.setConnectTimeout(Constants.CONN_TIMEOUT);\n\n\t\treturn conn;\n\t}",
"public DefaultConnectionProvider() {\n loadProperties();\n }",
"public static Connection connect(){\n\t\ttry {\n\t\t\tadd = Configure.getADDRESS();\n\t\t\tconn = ConnectionFactory.getConnect(add, Configure.port, \"TCP\");\n\t\t} catch (Exception e) {\n\t\t\tConfigure.logger.error(e.getMessage());\n\t\t\t//System.out.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\t//System.exit(0);\n\t\t}\n\t\treturn conn;\n\t}",
"public void buildConnection()\n {\n try\n {\n myConn = DriverManager.getConnection(url, user, pw);\n statement = myConn.createStatement();\n }\n catch(CommunicationsException e)\n {\n System.err.println(e);\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Verbindungsfehler\");\n alert.setContentText(\"Verbindung zum SQL Server fehlgeschlagen\");\n alert.showAndWait();\n }\n catch(Exception e)\n {\n System.err.println(e);\n }\n\n }",
"public InitialValuesConnectionCenter() \n\t{\n\t\ttry {\n\t\t\tserverSocket = new ServerSocket(PORT);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"IOException ServerConnectionCenter.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"void getConnection() {\n }",
"public Database() {\n\t\tconn = null;\n\t}",
"private DatabaseHandler(){\n createConnection();\n }",
"private void ensureConnection() {\n Objects.requireNonNull(connection);\n }",
"protected Connection createConnection() {\n Properties connectionProperties = new Properties();\n JdbcPropertyAdapter adapter = getPropertyAdapter(dbType, properties);\n adapter.getExtraProperties(connectionProperties);\n\n String url = translator.getUrl(properties);\n logger.info(\"Opening connection to: \" + url);\n Connection connection;\n try {\n connection = DriverManager.getConnection(url, connectionProperties);\n connection.setAutoCommit(false);\n } catch (SQLException x) {\n throw translator.translate(x);\n }\n return connection;\n }",
"@Override\n\tpublic boolean connect() {\n\t\treturn false;\n\t}",
"public ConnectionHandler createConnectionHandler() throws Exception {\n SimpleConnectionHandler handler = new SimpleConnectionHandler();\n handler.setLogger(m_logger);\n return handler;\n }",
"public interface ConnectionFactory {\n\n public abstract Connection createConnection();\n\n}",
"public void clearConnection()\n\t{\n\t\tcloseConnection();\n\t\tsetupConnection();\n\t}",
"private static Connection newConnection() throws SQLException {\n\t\tOracleDataSource ods = new OracleDataSource();\n\t\tods.setURL(dburl);\n\t\tConnection conn = ods.getConnection();\n\t\treturn conn;\n\t}",
"public SwimConnectionFactory() {\n\t\tsuper();\n\t}",
"public interface IConnectionProvider\n{\n /**\n * Returns a new {@link Connection}. The caller is in charge of calling\n * {@link Connection#close()} when finished.\n * \n * @return\n * @throws Exception\n */\n Connection newConnection() throws Exception;\n}",
"public JNDIConnector() {\n super();\n }",
"private void makeSQLConn() {\n\t\ttry {\n\t\t\tmyDB = new MySQLAccess();\n\t\t} catch (Exception e) { e.printStackTrace(); }\n\t}",
"public abstract void createConnection(Socket socket, String userName);"
] | [
"0.766512",
"0.75754833",
"0.7311997",
"0.7272112",
"0.7232501",
"0.7053262",
"0.7000605",
"0.6930628",
"0.68422896",
"0.68120676",
"0.6796998",
"0.670253",
"0.6651761",
"0.65787363",
"0.6557283",
"0.65075004",
"0.6457524",
"0.6432525",
"0.63716984",
"0.63499373",
"0.6341383",
"0.63362205",
"0.629241",
"0.6214983",
"0.6206977",
"0.61987567",
"0.6143275",
"0.61378366",
"0.6090171",
"0.6073167",
"0.6062066",
"0.6051482",
"0.60291904",
"0.6027346",
"0.60141027",
"0.6000108",
"0.5998985",
"0.59933096",
"0.59856606",
"0.59847015",
"0.5979898",
"0.5975293",
"0.59496",
"0.5943502",
"0.5941915",
"0.5910881",
"0.59037125",
"0.59030575",
"0.59027547",
"0.5892497",
"0.58842486",
"0.58836645",
"0.5868581",
"0.5868581",
"0.5868581",
"0.58573157",
"0.5848033",
"0.5835063",
"0.58203334",
"0.581586",
"0.5812115",
"0.5806503",
"0.579899",
"0.57987624",
"0.5795218",
"0.579088",
"0.5775509",
"0.57694906",
"0.57510513",
"0.57507277",
"0.57450944",
"0.57432526",
"0.5742516",
"0.57377523",
"0.573766",
"0.5737068",
"0.57335335",
"0.5728524",
"0.57247275",
"0.57101923",
"0.56985116",
"0.56971556",
"0.56951684",
"0.56939936",
"0.56737804",
"0.56688136",
"0.5668033",
"0.5651492",
"0.56491446",
"0.5648791",
"0.5644443",
"0.5639819",
"0.5639608",
"0.56340903",
"0.5631108",
"0.5616666",
"0.56133693",
"0.56060463",
"0.5601941",
"0.5594221",
"0.5593274"
] | 0.0 | -1 |
Create a connection between two devices | public PhysicalLink(Device deviceSource, int portSource, Device deviceDestination, int portDestination) {
this.deviceSource = deviceSource;
this.deviceDestination = deviceDestination;
this.portSource = portSource;
this.portDestination = portDestination;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void connectDevices() {\n Set<DeviceId> deviceSubjects =\n cfgRegistry.getSubjects(DeviceId.class, Tl1DeviceConfig.class);\n deviceSubjects.forEach(deviceId -> {\n Tl1DeviceConfig config =\n cfgRegistry.getConfig(deviceId, Tl1DeviceConfig.class);\n connectDevice(new DefaultTl1Device(config.ip(), config.port(), config.username(),\n config.password()));\n });\n }",
"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}",
"private void connectDevice(Tl1Device device) {\n try {\n // Add device to TL1 controller\n DeviceId deviceId = DeviceId.deviceId(\n new URI(Tl1DeviceConfig.TL1, device.ip() + \":\" + device.port(), null));\n\n if (controller.addDevice(deviceId, device)) {\n SparseAnnotations ann = DefaultAnnotations.builder()\n .set(AnnotationKeys.PROTOCOL, Tl1DeviceConfig.TL1.toUpperCase())\n .build();\n // Register device in the core with default parameters and mark it as unavailable\n DeviceDescription dd = new DefaultDeviceDescription(deviceId.uri(),\n Device.Type.SWITCH,\n UNKNOWN, UNKNOWN,\n UNKNOWN, UNKNOWN,\n new ChassisId(),\n false, ann);\n providerService.deviceConnected(deviceId, dd);\n }\n } catch (URISyntaxException e) {\n log.error(\"Skipping device {}\", device, e);\n }\n }",
"private void connectToPeer() {\n mStatusText.append(\"Connecting to device...\\n\");\n\n String deviceKey = (String) mDevices.getSelectedItem();\n final WifiDirectDevice device = mGoodDevices.get(deviceKey);\n if (device == null) {\n mStatusText.append(\"Device no longer exists, refreshing peers...\\n\");\n discoverPeers();\n return;\n }\n\n WifiP2pConfig config = new WifiP2pConfig();\n config.deviceAddress = device.deviceAddress;\n config.wps.setup = WpsInfo.PBC; // push-button connect (as opposed to PIN, etc)\n\n // Set groupOwnerIntent so there aren't 2 groupowners.\n // It ranges between 0-15 , higher the value, higher\n // the possibility of becoming a groupOwner\n config.groupOwnerIntent = 0;\n\n if (mServiceDevices != null) {\n final WifiDirectDevice wDevice = mServiceDevices.get(deviceKey);\n if (wDevice != null && !wDevice.isGroupOwner && Integer.valueOf(wDevice.record.get(\"id\").toString()) < WifiDirectUtilities.ID) {\n// // Create a group\n// mManager.createGroup(mChannel, new WifiP2pManager.ActionListener() {\n// @Override\n// public void onSuccess() {\n// MainActivity.this.onGroupCreateResult(-1);\n// }\n//\n// @Override\n// public void onFailure(int reasonCode) {\n// MainActivity.this.onGroupCreateResult(reasonCode);\n// }\n// });\n this.mIsGO = true;\n config.groupOwnerIntent = 1;\n }\n }\n\n mManager.connect(mChannel, config, new WifiP2pManager.ActionListener() {\n\n @Override\n public void onSuccess() {\n mStatusText.append(\"Connected via WiFi!\\n\");\n // BroadcastReceiver will note when the connection changes in WIFI_P2P_PEERS_CHANGED_ACTION\n }\n\n @Override\n public void onFailure(int reasonCode) {\n logEvent(TAG, WifiDirectUtilities.getFailureReasonMessage(reasonCode));\n }\n });\n }",
"protected void startConnect() {\n if (tcp) {\n connection = new TCPConnection(this);\n } else {\n connection = new UDPConnection(this, udpSize);\n }\n connection.connect(remoteAddr, localAddr);\n }",
"public void connect();",
"public void connect();",
"public void connect();",
"void createConnection();",
"public void connect() {}",
"private void connectDevice(String address) {\n// // Get the device MAC address\n BluetoothDevice device = mBtAdapter.getRemoteDevice(address);\n// // Attempt to connect to the device\n mChatService.connect(device, true);\n }",
"private void bluetoothConnect() {\n\n btDevice = btAdapter.getRemoteDevice(EDISON_ADDRESS);\n if (btDevice == null) {\n Log.d(TAG,\"get remote device fail!\");\n finish();\n }\n\n try {\n btSocket = btDevice.createRfcommSocketToServiceRecord(SSP_UUID);\n } catch (IOException e) {\n Log.d(TAG,\"bluetooth socket create fail.\");\n }\n //save resource by cancel discovery\n btAdapter.cancelDiscovery();\n\n //connect\n try {\n btSocket.connect();\n Log.d(TAG,\"Connection established.\");\n } catch ( IOException e) {\n try {\n btSocket.close();\n }catch (IOException e2) {\n Log.d(TAG,\"unable to close socket after connect fail.\");\n }\n }\n\n //prepare outStream to send message\n try {\n outStream = btSocket.getOutputStream();\n } catch (IOException e) {\n Log.d(TAG,\"output stream init fail!\");\n }\n\n }",
"public void connect()\n\t{\n\t\tUUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805f9b34fb\"); //Standard SerialPortService ID\n\t\ttry\n\t\t{\n\t sock = dev.createRfcommSocketToServiceRecord(uuid); \n\t sock.connect();\n\t connected = true;\n\t dev_out = sock.getOutputStream();\n\t dev_in = sock.getInputStream();\n\t write(0);\n\t write(0);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\n\t}",
"public void connectToAccessory() {\n\t\tif (mConnection != null)\n\t\t\treturn;\n\n\t\tif (getIntent().hasExtra(BTDeviceListActivity.EXTRA_DEVICE_ADDRESS)) {\n\t\t\tString address = getIntent().getStringExtra(\n\t\t\t\t\tBTDeviceListActivity.EXTRA_DEVICE_ADDRESS);\n\t\t\tLog.i(ADK.TAG, \"want to connect to \" + address);\n\t\t\tmConnection = new BTConnection(address);\n\t\t\tperformPostConnectionTasks();\n\t\t} else {\n\t\t\t// assume only one accessory (currently safe assumption)\n\t\t\tUsbAccessory[] accessories = mUSBManager.getAccessoryList();\n\t\t\tUsbAccessory accessory = (accessories == null ? null\n\t\t\t\t\t: accessories[0]);\n\t\t\tif (accessory != null) {\n\t\t\t\tif (mUSBManager.hasPermission(accessory)) {\n\t\t\t\t\topenAccessory(accessory);\n\t\t\t\t} else {\n\t\t\t\t\t// synchronized (mUsbReceiver) {\n\t\t\t\t\t// if (!mPermissionRequestPending) {\n\t\t\t\t\t// mUsbManager.requestPermission(accessory,\n\t\t\t\t\t// mPermissionIntent);\n\t\t\t\t\t// mPermissionRequestPending = true;\n\t\t\t\t\t// }\n\t\t\t\t\t// }\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Log.d(TAG, \"mAccessory is null\");\n\t\t\t}\n\t\t}\n\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 Bridge(Socket sock1, Socket sock2) {\n this.sock1 = sock1;\n this.sock2 = sock2;\n t1 = new Thread(() -> {\n try {\n //the t1 thread will create a direction from sock1 to sock2\n Tx x = new Tx(sock1.getInputStream(), sock2.getOutputStream());\n //this is a blocking call\n x.run();\n } catch(IOException ex) {\n }\n //once x.run exits, close all sockets.\n //closing all sockets will ensure that all directions are closed\n //in the event of an exception in one direction.\n closeSocket(sock1);\n closeSocket(sock2);\n });\n\n t2 = new Thread(() -> {\n try {\n //the t2 thread will create a direction from sock2 to sock1\n Tx x = new Tx(sock2.getInputStream(), sock1.getOutputStream());\n //this is a blocking call\n x.run();\n } catch(IOException ex) {\n }\n //once x.run exits, close all sockets.\n //closing all sockets will ensure that all directions are closed\n //in the event of an exception in one direction.\n closeSocket(sock1);\n closeSocket(sock2);\n });\n\n //run t1 and t2 as daemon so that they don't stop the application from exiting.\n t1.setDaemon(true);\n t2.setDaemon(true);\n }",
"private void connectBluetooth() {\n try {\n if (blueTooth == null && macSet) {\n Log.d(\"lol\", \"macSet connect bluetooootooththoth\");\n blueTooth = new BluetoothConnection(macAddress, this, listener);\n blueTooth.connect();\n }\n } catch (Exception e) {\n Log.d(\"lol\", \"Failed connection: \" + e.getMessage() + \" \" + e.getClass());\n }\n }",
"Device createDevice();",
"private static void connect(City a, City b, int d){\n a.addConnection(b, d);\n b.addConnection(a, d);\n }",
"Connection createConnection();",
"public static RemoteNXT Connect(){\n\t\tNXTCommConnector c = Bluetooth.getConnector();\r\n\t\t\n\t\t// if no devices have been recognized\n\t\t// no connection can be made,\n\t\t// therefore, the system terminates the \n\t\t// program with an error\n\t\tif (c == null) {\n\t\t\tLCD.clear();\n\t\t\tLCD.drawString(\"No device in range\", 0, 0);\n\t\t\t// terminate the program with an error\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\tString fname = \"Slave\";\r\n\t\ttry {\n\t\t\t// try to establish the connection \n\t\t\t// by passing in the name of the remote NXT brick\n\t\t\t// along with the singleton connection object\n\t\t\t// instantiated previuosly\r\n\t\t\tslave = new RemoteNXT(fname, c);\r\n\t\t} catch (IOException e) {\n\t\t\t// throw exception if connection\n\t\t\t// failed to establish\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tString con = \"Connected to \";\r\n\n\t\tLCD.clear();\n\t\tLCD.drawString(con, 2, 3);\n\t\tLCD.drawString(fname, 6, 4);\n\t\t\r\n\t\treturn slave;\r\n\t}",
"private void connect() throws Exception {\n\n Log.i(TAG, \"Attempting connection to \" + address + \"...\");\n\n // Get this device's Bluetooth adapter\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\n if ((adapter == null) || (!adapter.isEnabled())){\n throw new Exception(\"Bluetooth adapter not found or not enabled!\");\n }\n\n // Find the remote device\n BluetoothDevice remoteDevice = adapter.getRemoteDevice(address);\n\n // Create a socket with the remote device using this protocol\n socket = remoteDevice.createRfcommSocketToServiceRecord(uuid);\n\n // Make sure Bluetooth adapter is not in discovery mode\n adapter.cancelDiscovery();\n\n // Connect to the socket\n socket.connect();\n\n\n // Get input and output streams from the socket\n outStream = socket.getOutputStream();\n inStream = socket.getInputStream();\n\n Log.i(TAG, \"Connected successfully to \" + address + \".\");\n }",
"public void connect(final WifiP2pDevice device){\n WifiP2pConfig config = new WifiP2pConfig();\n config.deviceAddress = device.deviceAddress;\n config.wps.setup = WpsInfo.PBC;\n\n manager.connect(channel, config, new WifiP2pManager.ActionListener() {\n @Override\n public void onSuccess() {\n // keep the name of the latest device connected to keep track\n devicesConnected.add(device.deviceName);\n\n }\n\n\n @Override\n public void onFailure(int reason) {\n\n if(reason == WifiP2pManager.P2P_UNSUPPORTED){\n Toast.makeText(getContext(), \"P2P isn't supported on this device.\",\n Toast.LENGTH_SHORT).show();\n\n } else{\n Toast.makeText(getContext(), \"Connect failed. Retry.\",\n Toast.LENGTH_SHORT).show();\n }\n\n\n\n }\n });\n\n }",
"private void bluetooth_connect_device() throws IOException\n {\n try\n {\n myBluetooth = BluetoothAdapter.getDefaultAdapter();\n address = myBluetooth.getAddress();\n pairedDevices = myBluetooth.getBondedDevices();\n if (pairedDevices.size()>0)\n {\n for(BluetoothDevice bt : pairedDevices)\n {\n address=bt.getAddress().toString();name = bt.getName().toString();\n Toast.makeText(getApplicationContext(),\"Connected\", Toast.LENGTH_SHORT).show();\n\n }\n }\n\n }\n catch(Exception we){}\n myBluetooth = BluetoothAdapter.getDefaultAdapter();//get the mobile bluetooth device\n BluetoothDevice dispositivo = myBluetooth.getRemoteDevice(address);//connects to the device's address and checks if it's available\n btSocket = dispositivo.createInsecureRfcommSocketToServiceRecord(myUUID);//create a RFCOMM (SPP) connection\n btSocket.connect();\n try { t1.setText(\"BT Name: \"+name+\"\\nBT Address: \"+address); }\n catch(Exception e){}\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 }",
"@Override\n public abstract void connect();",
"public void addConnection(Port one, Port two) {\n function.put(one, two);\n function.put(two, one);\n }",
"public BluetoothDeviceSocketConnection(BluetoothDevice device) {\n this.device = device;\n }",
"public void connectDevice(Computer comp) {\n\n\t\tcomp.connect();\n\t}",
"public Connection(Profile person1, Profile person2) {\n\t\n\t\tthis.person1=person1;\n\t\tthis.person2=person2;\n\t}",
"NodeConnection createNodeConnection();",
"public void createConnection() {\n final Property targetProperty = getTargetProperty();\n if (targetProperty != null) {\n targetProperty.setSource(getSourceProperty());\n }\n }",
"@Override\r\n public void onDeviceConnecting(GenericDevice mDeviceHolder,\r\n PDeviceHolder innerDevice) {\n\r\n }",
"public void connectToRemoteDevice(BluetoothDevice remoteDevice, UUID uuidToTry) throws IOException {\n mRemoteDevice = remoteDevice;\n BluetoothSocket tmp = null;\n try {\n // Get a BluetoothSocket for a connection with the given BluetoothDevice (Insecure)\n tmp = mRemoteDevice.createInsecureRfcommSocketToServiceRecord(uuidToTry);\n\n } catch (IOException e) {\n Log.e(TAG, \"create() failed\", e);\n }\n bluetoothSocket = new NativeBluetoothSocket(tmp);\n mUUID = uuidToTry;\n\n Log.i(TAG, \"BEGIN mConnectThread\");\n setName(\"ConnectThread\");\n try {\n connectToSocket();\n } catch (IOException e) {\n Log.e(TAG, e.getMessage());\n throw new IOException(TAG + \" Could not connectToPegasusAP to Socket\", e);\n }\n }",
"private void openConnection () {\n String[] labels = {\"Host :\", \"Port :\"};\n String[] initialValues = {\"localhost\", \"1111\"};\n StandardDialogClient openHandler = new StandardDialogClient () {\n\t@Override\n\tpublic void dialogDismissed (StandardDialog d, int code) {\n\t try {\n\t InputDialog inputD = (InputDialog)d;\n\t if (inputD.wasCancelled ()) return;\n\t String[] results = inputD.getResults ();\n\t String host = results[0];\n\t String port = results[1];\n\t TwGateway connection =\n\t (TwGateway)TwGateway.openConnection (host, port);\n\t // The following call will fail if the G2 is secure.\n\t connection.login();\n\t setConnection (connection);\n\t } catch (Exception e) {\n\t new WarningDialog (null, \"Error During Connect\", true, e.toString (), null).setVisible (true);\n\t }\n\t}\n };\t \n\n new ConnectionInputDialog (getCurrentFrame (), \"Open Connection\",\n\t\t\t\t true, labels, initialValues,\n\t\t\t\t (StandardDialogClient) openHandler).setVisible (true);\n }",
"@Test\n public void testCreateConnections() {\n Element element = mock(Element.class);\n View<?> content = mock(View.class);\n Bounds bounds = Bounds.create(0d, 0d, 10d, 20d);\n when(element.getContent()).thenReturn(content);\n when(content.getBounds()).thenReturn(bounds);\n MagnetConnection c1 =\n ConnectionAcceptorControlImpl.createConnection(element);\n assertEquals(5,\n c1.getLocation().getX(),\n 0);\n assertEquals(10,\n c1.getLocation().getY(),\n 0);\n assertEquals(MagnetConnection.MAGNET_CENTER,\n c1.getMagnetIndex().getAsInt());\n assertFalse(c1.isAuto());\n\n // New default connection for wires.\n WiresConnection wiresConnection = mock(WiresConnection.class);\n when(wiresConnection.isAutoConnection()).thenReturn(true);\n WiresMagnet wiresMagnet = mock(WiresMagnet.class);\n when(wiresMagnet.getX()).thenReturn(122d);\n when(wiresMagnet.getY()).thenReturn(543d);\n when(wiresMagnet.getIndex()).thenReturn(7);\n MagnetConnection c2 =\n (MagnetConnection) ConnectionAcceptorControlImpl.createConnection(wiresConnection,\n wiresMagnet);\n assertEquals(122,\n c2.getLocation().getX(),\n 0);\n assertEquals(543,\n c2.getLocation().getY(),\n 0);\n assertEquals(7,\n c2.getMagnetIndex().getAsInt());\n assertTrue(c2.isAuto());\n\n // Asset connections to concrete locations, when no concrete magnets assigned.\n when(wiresConnection.getPoint()).thenReturn(new Point2D(122d, 543d));\n final Connection pointConnection = ConnectionAcceptorControlImpl.createConnection(wiresConnection, null);\n assertEquals(122d, pointConnection.getLocation().getX(), 0);\n assertEquals(543d, pointConnection.getLocation().getY(), 0);\n\n // Connections (view magnets) can be nullified.\n assertNull(ConnectionAcceptorControlImpl.createConnection(null));\n assertNull(ConnectionAcceptorControlImpl.createConnection(null,\n null));\n }",
"public void registerConnection(TCPReceiverThread receiverThread, String sourceID, String targetID);",
"private void connect(String deviceAddress, ExerciseMode exerciseMode, DeviceType deviceType, Choice choice, String exerciseID, String routineID)\n {\n //SmartGlove smartGlove;\n\n // Only connects if we have a bounded BLE service, which we should if this service has started\n if (mBleServiceBound)\n {\n//\n// List<Integer> ident = new ArrayList<>();\n// try {\n// ident = UserRepository.getInstance(this.getApplicationContext()).getAllIdentities();\n// }\n// catch(Exception e){\n// Log.d(TAG, \"onClick: Error with identities\");\n// }\n//\n// String exerciseName;\n//\n// // TODO Modify TexTronicsDevice to have static method to determine DeviceType to Use\n// switch (deviceType)\n// {\n// case SMART_GLOVE:\n// Log.e(\"Data log EXERCISE===\", choice.toString());\n// if(MainActivity.exercise_name != null) {\n// exerciseName = MainActivity.exercise_name;\n// Log.e(\"Data log EXERCISE===\", exerciseName);\n//\n// // TODO Assume connection will be successful, if connection fails we must remove it from list.\n// smartGlove = new SmartGlove(ident.size(),exerciseName, ExerciseInstructionFragment.flag,deviceAddress, exerciseMode, choice, exerciseID, routineID);\n// mTexTronicsList.put(deviceAddress, smartGlove);\n//\n// }\n//\n// break;\n// // Add Different Devices Here\n// case SMART_SOCK:\n//\n// if(MainActivity.exercise_name != null) {\n// exerciseName = MainActivity.exercise_name;\n// Log.e(\"Data log EXERCISE===\", exerciseName);\n//\n// // TODO Assume connection will be successful, if connection fails we must remove it from list.\n// smartGlove = new SmartGlove(ident.size(),exerciseName, ExerciseInstructionFragment.flag,deviceAddress, exerciseMode, choice, exerciseID, routineID);\n// mTexTronicsList.put(deviceAddress, smartGlove);\n//\n// }\n// // Added the Smart Sock code, just copied from above\n// //smartGlove = new SmartGlove(ident.size(),choice.toString(), ExerciseInstructionFragment.flag,deviceAddress, exerciseMode, choice, exerciseID, routineID);\n// //mTexTronicsList.put(deviceAddress, smartGlove);\n// break;\n// default:\n//\n// break;\n// }\n\n mBleService.connect(deviceAddress); //add_connected\n }\n else {\n Log.w(TAG,\"Cannot Connect - BLE Connection Service is not bound yet!\");\n }\n }",
"@Override\n public void establishConnectionWithYourTower() {\n }",
"public SideConnection(Side side1, Side side2) {\r\n\t\tthis.side1 = side1;\r\n\t\tthis.side2 = side2;\r\n\t}",
"public void startConnection(){\n startBTConnection(mBTDevice,MY_UUID_INSECURE);\n }",
"public void connect() {\n\t\ttry {\n\t\t\tconnection = new Socket(ip, serverPort); // 128.39.83.87 // 127.0.0.1\n\t\t\t\n\t\t\toutput = new BufferedWriter(new OutputStreamWriter(\n connection.getOutputStream()));\n\t\t\tinput = new BufferedReader(new InputStreamReader(\n connection.getInputStream()));\n\t\t\t\n\t\t\tif (hostName.equals(Constants.IDGK + Main.userName))\n\t\t\t\tsendText(\"1\" + Main.userName);\n\t\t\telse\n\t\t\t\tsendText(\"2\" + Main.userName);\n\t\t\t\n\t\t} catch (UnknownHostException e) {\n\t\t\tMain.LOGGER.log(Level.SEVERE, \"Error connecting server\", e);\n\t\t} catch (IOException e) {\n\t\t\tMain.LOGGER.log(Level.WARNING, \"Error making output/input\", e);\n\t\t}\n\t}",
"public void connectToAudio() {\n String json = new Gson().toJson(new TelevisionModel(TelevisionModel.Action.CONNECT));\n String a = sendMessage(json);\n TelevisionModel teleM = new Gson().fromJson(a, TelevisionModel.class);\n System.out.println(\"Client Received \" + json);\n\n if (teleM.getAction() == TelevisionModel.Action.CONNECT) {\n isConnecting = teleM.getValue();\n ui.updateArea(teleM.getMessage());\n };\n }",
"void connect(Context context, String deviceId, Application application) {\n myDeviceId = deviceId;\n connector.connect(context, deviceId);\n this.application = application;\n\n setConnectorHandler(new Handler(context.getMainLooper()));\n\n // Register for activity lifecyle tracking\n activityLifecycleTracker = new ActivityLifecycleTracker();\n application.registerActivityLifecycleCallbacks(activityLifecycleTracker);\n\n if (isReference) {\n getEcologyDataSync().setData(\"devices\", new HashMap<Object, Object>() {{\n put(getMyDeviceId(), true);\n }});\n }\n }",
"public void connectToServerComp() {\n\n\t\ttry \n\t\t{\n\t\t\tSocket socket = new Socket(host, 8001);\n\t\t\tfromServer = new DataInputStream(socket.getInputStream());\n\t\t\ttoServer = new DataOutputStream(socket.getOutputStream());\n\n\t\t\ttoServer.writeInt(vsCOMPUTER);\n\n\t\t} catch (IOException ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t}\n\n\t\tThread thread = new Thread(new clientHandlingComputer(fromServer, toServer));\n\t\tthread.start();\n\n\t}",
"private void connectToRoom(String appKey, String appSecret) {\n initializeSkylinkConnection();\n\n // Obtaining the Skylink connection string locally.\n // In a production environment the connection string should be given\n // by an entity external to the App,\n // such as an App server that holds the Skylink App secret.\n // This is to avoid keeping the App secret within the application\n String skylinkConnectionString = Utils.\n getSkylinkConnectionString(ROOM_NAME,\n appKey,\n appSecret, new Date(),\n SkylinkConnection\n .DEFAULT_DURATION);\n\n // The skylinkConnectionString should not be logged in production,\n // as it contains potentially sensitive information like the Skylink App key.\n\n boolean connectFailed;\n connectFailed = !skylinkConnection.connectToRoom(skylinkConnectionString, MY_USER_NAME);\n if (connectFailed) {\n String error = \"Unable to connect to Room! Rotate device to try again later.\";\n Toast.makeText(parentActivity, error, Toast.LENGTH_LONG).show();\n Log.e(TAG, error);\n return;\n }\n\n // Initialize and use the Audio router to switch between headphone and headset\n AudioRouter.startAudioRouting(parentActivity);\n }",
"private BluetoothSocket createBluetoothSocket(BluetoothDevice device) throws IOException {\n\n return device.createRfcommSocketToServiceRecord(BTMODULEUUID);\n //creates secure outgoing connection with BT device using UUID\n }",
"@Override\n\tpublic void connect() {\n\t\t\n\t}",
"@Override\n\tpublic void connect() {\n\t\t\n\t}",
"public void openConnection() {\n System.out.println(\"Opening connection...\");\n\n try {\n String HOST = \"192.168.4.1\";\n int PORT = 2323;\n connectionSocket = new Socket(HOST, PORT);\n connectionSocket.setTcpNoDelay(true);\n\n writer = new BufferedWriter(new OutputStreamWriter(new BufferedOutputStream(connectionSocket.getOutputStream())));\n reader = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream()));\n\n System.out.println(\"openConnection(): Success\");\n return;\n } catch (UnknownHostException e) {\n System.out.println(\"UnknownHostException at openConnection()\");\n } catch (IOException e) {\n System.out.println(\"IOException at openConnection()\");\n } catch (Exception e) {\n System.out.println(\"Exception at openConnection()\");\n System.out.println(e.toString());\n }\n\n System.out.println(\"Failed to connect\");\n }",
"@RequestMapping(\"/ibmiot/deviceclient/connect\")\r\n\tpublic String connectDeviceclient() {\r\n\t\tThread t1 = new Thread(commandCallbackSubscriber);\r\n\t\tt1.start();\r\n\t\tmyClient.setCommandCallback(commandCallbackSubscriber);\r\n\t\t\r\n\t\t// Connect to the IBM Watson IoT Platform\r\n\t\ttry {\r\n\t\t\tmyClient.connect();\r\n\t\t} catch (MqttException e) {\r\n\t\t\treturn \"Failed to connected with IBM IoT deviced Client\";\r\n\t\t}\r\n\t\treturn \"Connected to IBM IoT deviced Client\";\r\n\t}",
"public interface CommunicationDevice {\n String getAddress();\n\n CommunicationSocket createCommunicationSocket(UUID uuid) throws IOException;\n}",
"public void connecting() {\n\n }",
"private void establishConnection() {\n\n try {\n\n for(Clone clone:this.clones){\n ClearConnection connection = new ClearConnection();\n connection.connect(clone.getIp(), clone.getOffloadingPort(), 5 * 1000);\n this.connections.add(connection);\n }\n\n this.protocol = new ERAMProtocol();\n this.ode = new ERAMode();\n\n } catch (Exception e) {\n Log.e(TAG,\"Connection setup with the Remote Server failed - \" + e);\n }\n }",
"public void connect(String id) {\n // Android bluetooth API code\n BluetoothDevice device = null;\n try {\n device = mBluetoothAdapter.getRemoteDevice(id);\n mBluetoothAdapter.cancelDiscovery();\n }\n catch (Exception e) {\n // Show user error message\n // i.e. \"333 is not a valid bluetooth address\"\n Toast.makeText(getApplicationContext(), e.getMessage(),\n Toast.LENGTH_SHORT).show();\n }\n\n // If getRemoteDevice did not throw and device was set, connect to client\n // getRemoteDevice throws if its parameter is not a valid bluetooth address\n if (device != null) {\n try {\n btSocket = device.createRfcommSocketToServiceRecord(MY_UUID);\n btSocket.connect();\n Toast.makeText(getApplicationContext(), \"Connection made\",\n Toast.LENGTH_SHORT).show();\n connectedStatus.setText(R.string.connection_connected);\n } catch (IOException e) {\n try {\n btSocket.close();\n } catch (IOException e2) {\n Log.d(TAG, \"Unable to end the connection\");\n }\n Log.d(TAG, \"Socket creation failed\");\n }\n }\n }",
"public void connectTo(NAddress address) throws IOException;",
"public void connDevice(String address) {\n MokoSupport.getInstance().connDevice(this, address, this);\n }",
"private void connectToBluetoothDevice(String mac) {\n if (BluetoothAdapter.checkBluetoothAddress(mac)) {\n BluetoothDevice mBluetoothDevice = mBluetoothAdapter\n .getRemoteDevice(mac);\n mConnectThread = new ConnectThread(mBluetoothDevice);\n mConnectThread.start();\n }\n }",
"private void connectClient(String clientName) {\n for(String client : ports.keySet()) {\n if(client != clientName) {\n for(int i = 0; i < 2; i++) {\n //outputs of this go to inputs of others\n String out = ports.get(clientName)[1].get(i);\n String otherIn = ports.get(client)[0].get(i);\n //all outputs of other clients go to this client\n if(out != null && otherIn != null) {\n makeConnection(clientName + \":\" + out, client + \":\" + otherIn);\n }\n //outputs of others go to inputs of this\n String in = ports.get(clientName)[0].get(i);\n String otherOut = ports.get(client)[1].get(i);\n if(in != null && otherOut != null) {\n //this client's outputs go to all other clients\n makeConnection(client + \":\" + otherOut, clientName + \":\" + in);\n }\n }\n }\n }\n\t}",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.500 -0500\", hash_original_method = \"D9A9DAD002038F54D59084B945A008ED\", hash_generated_method = \"4C9173AD3605BE46EEB06DBE1A2B9E52\")\n \npublic void connect(Context srcContext, Handler srcHandler, Messenger dstMessenger) {\n if (DBG) log(\"connect srcHandler to the dstMessenger E\");\n\n // We are connected\n connected(srcContext, srcHandler, dstMessenger);\n\n // Tell source we are half connected\n replyHalfConnected(STATUS_SUCCESSFUL);\n\n if (DBG) log(\"connect srcHandler to the dstMessenger X\");\n }",
"public PeerToPeerConnection(GameController controller){\n this.controller = controller;\n clientID = \"HostClient\";\n isHost = true;\n isHost = true;\n System.out.println(\"PeerToPeerConnection: Constructor: HostClient\");\n }",
"public void connectDevice(String address) {\n try {\n device = bluetoothAdapter.getRemoteDevice(address);\n }catch(IllegalArgumentException e){\n Toast.makeText(NavigationDrawerActivity.this, \"Mac Address is not available!\", Toast.LENGTH_SHORT).show();\n }\n // Attempt to connect to the device\n chatService.connect(device);\n\n // replaceFragment(AnalysisFragment.NewInstance(),\"analysisfragment\");\n listViewNavDrawer.performItemClick(null,2,0);\n }",
"abstract public boolean createConnection();",
"public void connect(View view) {\n if (phoneNum.getText().toString().equals(\"\")) {\n Toast.makeText(getApplication(), \"Please enter a phone number\", Toast.LENGTH_SHORT).show();\n } else {\n phoneNum.setEnabled(false);\n HashMap<String, UsbDevice> usbDevices = usbManager.getDeviceList();\n if (!usbDevices.isEmpty()) {\n boolean keep = true;\n for (Map.Entry<String, UsbDevice> entry : usbDevices.entrySet()) {\n device = entry.getValue();\n int deviceVID = device.getVendorId();\n if (deviceVID == 0x2341)//Arduino Vendor ID\n {\n PendingIntent pi = PendingIntent.getBroadcast(this, 0, new Intent(ACTION_USB_PERMISSION), 0);\n usbManager.requestPermission(device, pi);\n keep = false;\n } else {\n connection = null;\n device = null;\n }\n\n if (!keep)\n break;\n }\n }\n }\n }",
"public static void connect_devices(Context context, String deviceAddress, Choice choice, ExerciseMode exerciseMode, DeviceType deviceType, UUID exerciseID, UUID routineID) {\n TexTronicsManagerService.context = context;\n TexTronicsManagerService.deviceAddress = deviceAddress;\n TexTronicsManagerService.choice = choice;\n TexTronicsManagerService.exerciseMode = exerciseMode;\n TexTronicsManagerService.deviceType = deviceType;\n Intent intent = new Intent(context, TexTronicsManagerService.class);\n intent.putExtra(EXTRA_DEVICE, deviceAddress);\n intent.putExtra(EXTRA_MODE, exerciseMode);\n intent.putExtra(EXTRA_TYPE, deviceType);\n intent.putExtra(EXTRA_CHOICE, choice);\n intent.putExtra(EXTRA_EX_ID, exerciseID.toString());\n intent.putExtra(EXTRA_ROUTINE_ID, routineID.toString());\n intent.setAction(Action.connect.toString());\n context.startService(intent);\n }",
"public LWTRTPdu connectRsp() throws IncorrectTransitionException;",
"public void connectWiFi() {\n\n // Agrego la red para poder conectarme\n conf.networkId = wifi.addNetwork(conf);\n if (conf.networkId == -1) {\n Log.i(\"#FSEM# SERVICE\", \"Fallo addNetwork\");\n return;\n }\n\n // Receiver para cambio de estado de WIFI\n IntentFilter intentFilter = new IntentFilter(WifiManager.NETWORK_STATE_CHANGED_ACTION);\n intentFilter.addAction(WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION);\n\n context.registerReceiver(this, intentFilter);\n\n // Mientras haya otra conexión con algun semaforo, espero a que se termine.\n while (SemComunication.staticState == StaticState.CONECTADO) {\n Log.i(\"#FSEM# SERVICE\", \"Me quiero conectar a \" + this.conf.SSID\n + \", pero sigue conectado a otro semaforo: \" + SemComunication.currentSSID);\n // Obligo a desconectarse.\n wifi.disconnect();\n SystemClock.sleep(1000);\n }\n\n // Me conecto con la red que quiero, y cuando lo logre\n // se ejecuta el receiver anterior\n wifi.disconnect();\n Log.i(\"#FSEM# SERVICE\", \"Me intento conectar con \" + (this.SSID));\n wifi.enableNetwork(this.conf.networkId, true);\n wifi.reconnect();\n SemComunication.staticState = StaticState.CONECTADO;\n SemComunication.networkId = this.conf.networkId;\n SemComunication.currentSSID = this.SSID;\n }",
"private GraphConnection CreateConnection(String source, String destination) {\n\t\tif (nodes.size() == 0) {\r\n\t\t\tthrow new IllegalStateException(\"Nodes needed\");\r\n\t\t}\r\n\r\n\t\telse {\r\n\t\t\tGraphNode src = null;\r\n\t\t\tGraphNode dest = null;\r\n\t\t\tfor (GraphNode node : nodes) {\r\n\t\t\t\tif (node.getText().equals(source)) {\r\n\t\t\t\t\tsrc = node;\r\n\t\t\t\t} else if (node.getText().equals(destination)) {\r\n\t\t\t\t\tdest = node;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (src == null || dest == null) {\r\n\t\t\t\tthrow new IllegalStateException(\r\n\t\t\t\t\t\t\"At least one of the nodes doesn't exist\");\r\n\t\t\t} else {\r\n\t\t\t\treturn new GraphConnection(graph, SWT.None, src, dest);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void connectDevice(Intent data, boolean secure) {\n String address = data.getExtras()\n .getString(DeviceListActivity.EXTRA_DEVICE_ADDRESS);\n BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(address);\n mChatService.connect(device, secure);\n }",
"public void connect(Integer tagId, Integer linkId);",
"private void connectToAdapter() {\n if (chosen) {\n BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();\n BluetoothDevice device = btAdapter.getRemoteDevice(deviceAddress);\n UUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805F9B34FB\");\n // creation and connection of a bluetooth socket\n try {\n BluetoothSocket socket = device.createInsecureRfcommSocketToServiceRecord(uuid);\n socket.connect();\n setBluetoothSocket(socket);\n connected = true;\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n connect.setText(\"Disconnect\");\n connect.setTextColor(Color.RED);\n }\n });\n } catch (IOException e) {\n Log.d(\"Exception\", \"Bluetooth IO Exception c\");\n connected = false;\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(currContext, R.string.cannotConnect, Toast.LENGTH_SHORT).show();\n connect.setText(\"Connect\");\n connect.setTextColor(Color.BLACK);\n mode.setEnabled(true);\n }\n });\n }\n }\n if (bluetoothSocket.getRemoteDevice().getAddress() != null)\n Log.d(TAG, \"Bluetooth connected\");\n Log.d(TAG, \"Device address: \" + bluetoothSocket.getRemoteDevice().getAddress());\n initializeCom();\n }",
"void open(String nameNport) {\n\tString[] token=nameNport.split(\":\");\n\tString host=token[0];\n\tint port=Integer.parseInt(token[1]);\n\tint proceedFlag=1;\n\tIterator<Socket> iterator=Connection.connections.iterator();\n\tif(host.equalsIgnoreCase(\"localhost\") || host.equals(\"127.0.0.1\"))\n\t\thost=simpella.infoSocket.getLocalAddress().getHostAddress();\n\tif((host.equalsIgnoreCase(simpella.infoSocket.getLocalAddress().getHostAddress())||host.equalsIgnoreCase(simpella.infoSocket.getLocalAddress().getCanonicalHostName()))&&(simpella.serverPortNo==port || simpella.downloadPortNo==port)){\n\t\tproceedFlag=0;\n\t\tSystem.out.println(\"Client: Self Connect not allowed\");\n\t\t}\n\twhile(iterator.hasNext() && proceedFlag==1)\n\t{\n\t\tSocket sock=(Socket)iterator.next();\n\t\t\n\t\tif((host.equalsIgnoreCase(sock.getInetAddress().getHostAddress()) || host.equalsIgnoreCase(sock.getInetAddress().getCanonicalHostName())) && port==sock.getPort()){\n\t\t\tproceedFlag=0; \n\t\t\tSystem.out.println(\"Client: Duplicate connection to same IP/port not allowed\");\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}\n\tif(proceedFlag==1)\n\t\t{\n\t\n\t\n\tbyte type=04;\n\tMessage msg=new Message(type);\n\ttry {\n\t\tConnection.outgoingConnPackRecv[noOfConn]=0;\n\t\tConnection.outgoingConnPackSent[noOfConn]=0;\n\t\tConnection.outgoingConnPackSentSize[noOfConn]=0;\n\t\tConnection.outgoingConnPackRecvSize[noOfConn]=0;\n\t\t\n\t\tclientSideSocket[noOfConn]=new Socket(host,port);\n\t\tSystem.out.println(\"Client:TCP Connection established...Begin handshake\");\n\t\toutToServer[noOfConn]=new ObjectOutputStream(clientSideSocket[noOfConn].getOutputStream());\n\t\tinFromServer[noOfConn]=new ObjectInputStream(clientSideSocket[noOfConn].getInputStream());\n\t\tString strToServer=\"SIMPELLA CONNECT/0.6\\r\\n\";\n\t\tbyte[] byteArray= strToServer.getBytes(\"UTF-16LE\");\n\t\tmsg.setPayload(byteArray);\n \t\n\t\tSystem.out.println(\"Client:\"+new String(byteArray));\n\t\t//outToServer.writeUTF(\"SIMPELLA CONNECT/0.6\\r\\n\");\n\t\tConnection.outgoingConnPackSent[noOfConn]++;\n\t\tConnection.outgoingConnPackSentSize[noOfConn]+=byteArray.length+23;\n\t\toutToServer[noOfConn].writeObject((Object)msg);\n\t\tConnection.outgoingConnPackRecv[noOfConn]++;\n\t\t\n\t\tMessage msg1=(Message) inFromServer[noOfConn].readObject();\n\t\tbyte[] fromServer=msg1.getPayload();\n\t\tConnection.outgoingConnPackRecvSize[noOfConn]+=fromServer.length+23;\n\t\tString strFromServer=new String(fromServer);\n\t\tSystem.out.println(\"Server:\"+strFromServer);\n\t\tif(msg1.getMessage_type()==05)\n\t\t\t{\n\t\t\tstrToServer=\"SIMPELLA/0.6 200 thank you for accepting me\\r\\n\";\n\t\t\tbyte[] byteArray1= strToServer.getBytes(\"UTF-16LE\");\n\t\t\tMessage m=new Message((byte)05);\n\t\t\tm.setPayload(byteArray1);\n\t\t\tConnection.outgoingConnPackSent[noOfConn]++;\n\t\t\tConnection.outgoingConnPackSentSize[noOfConn]+=byteArray1.length+23;\n\t\t\toutToServer[noOfConn].writeObject((Object)m);\n\t\t\t\n\t\t\tConnection.connections.add(clientSideSocket[client.noOfConn]);\n\t\t\tConnection.outgoingConnection[client.noOfConn]=clientSideSocket[client.noOfConn];\n\t\t\tConnection.clientOutStream[client.noOfConn]=outToServer[client.noOfConn];\n\t\t\tnew clientSocketListen(clientSideSocket[noOfConn],outToServer[noOfConn],inFromServer[noOfConn]);\n\t\t\tupdate();\n\t\t\tnoOfConn++;\n\t\t\t//System.out.println(\"Client:num of conn=\"+noOfConn);\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"<open>:Cannot open connection to \"+host+\" at this time\");\n\t\t\t\tclientSideSocket[noOfConn].close();\n\t\t\t\tinFromServer[noOfConn].close();\n\t\t\t\toutToServer[noOfConn].close();\n//\t\t\t\tSystem.out.println(\"Client:num of conn=\"+noOfConn);\n\t\t\t}\n\t\t\n\t\t\n\t} catch (UnknownHostException e) {\n\t\tSystem.out.println(\"Unknown Host: Destination host unreachable\");\n\t\t//e.printStackTrace();\n\t} catch (Exception e) {\n\t\tSystem.out.println(\"Connection Refused/Destination host unreachable\");\n\t}\n\t\t}\n\t}",
"private void createConnection() {\n this.callbacks = getCallbacks();\n\n Properties props = new Properties();\n props.putAll(getTestProps());\n props.putAll(getProps());\n this.connection = Connections.create((ConnectionCallbacks) callbacks, props);\n configureConnection(connection);\n }",
"abstract T connect();",
"public JmtEdge connect(JmtCell source, JmtCell target, boolean forced) {\r\n \t\t// If one of parameter is null, returns null\r\n \t\tif (source == null || target == null) {\r\n \t\t\treturn null;\r\n \t\t}\r\n \t\t// Retrives source and target keys to create connection\r\n \t\tObject sourceKey = ((CellComponent) source.getUserObject()).getKey();\r\n \t\tObject targetKey = ((CellComponent) target.getUserObject()).getKey();\r\n \t\t// Initializes correct layout for routing edges\r\n \t\tMap map = new Hashtable();\r\n \t\tGraphConstants.setRouting(map, GraphConstants.ROUTING_SIMPLE);\r\n \t\tGraphConstants.setRouting(map, JmtGraphConstants.ROUTING_JMT);\r\n \t\tGraphConstants.setLineEnd(map, GraphConstants.ARROW_CLASSIC);\r\n \t\tGraphConstants.setEndFill(map, true);\r\n \t\tMap<Object, Map> viewMap = new Hashtable<Object, Map>();\r\n \t\tJmtEdge connection = new JmtEdge(sourceKey, targetKey, this);\r\n \t\tviewMap.put(connection, map);\r\n \t\tObject[] insert = new Object[] { connection };\r\n \t\tConnectionSet cs = new ConnectionSet();\r\n \t\t// Finds sourcePort\r\n \t\tIterator it;\r\n \t\tit = source.getChildren().iterator();\r\n \t\tDefaultPort tmpPort, sourcePort, targetPort;\r\n \t\tsourcePort = null;\r\n \t\twhile (it.hasNext()) {\r\n \t\t\ttmpPort = (DefaultPort) it.next();\r\n \t\t\tif (tmpPort instanceof OutputPort) {\r\n \t\t\t\tsourcePort = tmpPort;\r\n \t\t\t}\r\n \t\t}\r\n \t\t// Finds targetPort\r\n \t\tit = target.getChildren().iterator();\r\n \t\ttargetPort = null;\r\n \t\twhile (it.hasNext()) {\r\n \t\t\ttmpPort = (DefaultPort) it.next();\r\n \t\t\tif (tmpPort instanceof InputPort) {\r\n \t\t\t\ttargetPort = tmpPort;\r\n \t\t\t}\r\n \t\t}\r\n \t\tif (sourcePort != null && targetPort != null) {\r\n \t\t\tcs.connect(connection, sourcePort, true);\r\n \t\t\tcs.connect(connection, targetPort, false);\r\n \t\t\t// Adds connection to the graph only if it can be created into data\r\n \t\t\t// structure\r\n \t\t\tif (model.setConnected(sourceKey, targetKey, true) || forced) {\r\n \t\t\t\tgraph.getModel().insert(insert, viewMap, cs, null, null);\r\n \t\t\t\treturn connection;\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}",
"public void connect(Point2D start, Point2D current, PortView inPort, PortView outPort) {\r\n \t\tPoint2D p = fromScreen(start);\r\n \t\tPoint2D p2 = fromScreen(current);\r\n \t\tif (inPort != null && outPort != null) {\r\n \t\t\tArrayList<Point2D> list = new ArrayList<Point2D>();\r\n \t\t\tlist.add(p);\r\n \t\t\tlist.add(p2);\r\n \t\t\tMap map = new Hashtable();\r\n \t\t\tGraphConstants.setPoints(map, list);\r\n \t\t\tGraphConstants.setRouting(map, GraphConstants.ROUTING_SIMPLE);\r\n \t\t\tGraphConstants.setRouting(map, JmtGraphConstants.ROUTING_JMT);\r\n \t\t\tGraphConstants.setEndFill(map, true);\r\n \r\n \t\t\t// 24/09/03 - Massimo Cattai\r\n \t\t\t// //////////////////////////////////////////\r\n \t\t\t// Add a Line End Attribute\r\n \t\t\tGraphConstants.setLineEnd(map, GraphConstants.ARROW_CLASSIC);\r\n \t\t\t// 24/09/03 - end\r\n \t\t\t// /////////////////////////////////////////////////////\r\n \t\t\tMap<Object, Map> viewMap = new Hashtable<Object, Map>();\r\n \t\t\t// ---- Adds connection into underlayng data structure -- BERTOLI\r\n \t\t\t// MARCO\r\n \t\t\tObject sourceKey = ((CellComponent) ((JmtCell) ((OutputPort) (outPort.getCell())).getUserObject()).getUserObject()).getKey();\r\n \t\t\tObject targetKey = ((CellComponent) ((JmtCell) ((InputPort) (inPort.getCell())).getUserObject()).getUserObject()).getKey();\r\n \t\t\tJmtEdge connection = new JmtEdge(sourceKey, targetKey, this);\r\n \t\t\tviewMap.put(connection, map);\r\n \t\t\tObject[] insert = new Object[] { connection };\r\n \t\t\tConnectionSet cs = new ConnectionSet();\r\n \t\t\tcs.connect(connection, outPort.getCell(), true);\r\n \t\t\tcs.connect(connection, inPort.getCell(), false);\r\n \t\t\t// Visualize connection only if it can be created into data\r\n \t\t\t// structure\r\n \t\t\tif (model.setConnected(sourceKey, targetKey, true)) {\r\n \t\t\t\tgraph.getModel().insert(insert, viewMap, cs, null, null);\r\n \t\t\t\t// FG\r\n \t\t\t\t// no = false;\r\n \t\t\t}\r\n \t\t\t// ---- End -- BERTOLI MARCO\r\n \t\t}\r\n \r\n \t}",
"private void connectToCS(int port, String host)throws Exception{\n socket = new Socket(host, port);\n inStream = new PDUInputStream(socket.getInputStream());\n outStream = new PDUOutputStream(socket.getOutputStream());\n\n PduJoin join = new PduJoin(nickName);\n outStream.writeToServer(join.getByteArray());\n\n chatCS();\n }",
"public LWTRTPdu connect() throws IncorrectTransitionException;",
"@Override\n public boolean isConnectable() {\n return true;\n }",
"private void connectingPeer() {\n for (int index = 0; index < this.peers.size(); index++) {\n String peerUrl = urlAdderP2PNodeName((String) this.peers.get(index));\n try {\n Node distNode = NodeFactory.getNode(peerUrl);\n P2PService peer = (P2PService) distNode.getActiveObjects(P2PService.class.getName())[0];\n \n if (!peer.equals(this.localP2pService)) {\n // Send a message to the remote peer to record me\n peer.register(this.localP2pService);\n // Add the peer in my group of acquaintances\n this.acqGroup.add(peer);\n }\n } catch (Exception e) {\n logger.debug(\"The peer at \" + peerUrl +\n \" couldn't be contacted\", e);\n }\n }\n }",
"private void openConnection(String host){\n try {\n this.socket = new Socket(host, PORT);\n this.fromServer = new DataInputStream(socket.getInputStream());\n this.toServer = new DataOutputStream(socket.getOutputStream());\n\n } catch (SecurityException e){\n report(\"Connect is not allowed\");\n } catch (UnknownHostException e) {\n report(\"the ip address is not found.\");\n } catch (IOException e){\n report(\"Can not connect to the server\\\"\"+host+\"\\\"\");\n }\n }",
"public void connect(View v) {\n turnOn(v);\n startActivity(new Intent(Settings.ACTION_BLUETOOTH_SETTINGS));\n Toast.makeText(getApplicationContext(), \"Select device\", Toast.LENGTH_LONG).show();\n System.err.println(bluetoothAdapter.getBondedDevices());\n }",
"public boolean connect() {\n try {\n this.bluetoothSocket = this.device.createRfcommSocketToServiceRecord(this.device.getUuids()[0].getUuid());\n this.bluetoothSocket.connect();\n return true;\n } catch (IOException ex) {\n try {\n this.bluetoothSocket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n this.bluetoothSocket = null;\n }\n return false;\n }",
"private void connectToDevice(Intent data, boolean secure){\n Log.i(TAG, \"-- connect to device --\");\n if(data == null){Log.e(TAG, \"data is null\");}\n // Get the device MAC address\n String address = data.getExtras()\n .getString(DeviceListActivity.EXTRA_DEVICE_ADDRESS);\n\n Log.i(TAG, \"-- getting to device --\");\n // Get the BluetoothDevice object\n BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(address);\n\n Log.i(TAG, \"-- connecting to device to device --\");\n // Attempt to connect to the device\n if(mClientService == null){Log.e(TAG, \"bluetooth client service is null\");}\n mClientService.connect(device, secure);\n Log.i(TAG,\"-- after connection function\");\n }",
"private void connect() {\n\t\tString portName = deviceLocation.getText();\n\n\t\t// Check the Bandwidth SelectionBox and convert them:\n\t\tint bandWidthIndex = bandWidthList.getSelectedIndex();\n\t\tswitch (bandWidthIndex) {\n\t\tcase 0:\n\t\t\tbandRate = 9600;\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tbandRate = 19200;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tbandRate = 38400;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tbandRate = 57600;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tbandRate = 115200;\n\t\t\tbreak;\n\t\t}\n\n\t\t// System Print Line: Connection information:\n\t\tlog.write(\"##############################\");\n\t\tlog.write(\"System Message: Trying to connect to:\" + portName\n\t\t\t\t+ \" with \" + bandRate + \" Bandwidth\");\n\n\t\t// Try to connect gameUi Class with specific device location and\n\t\t// bandwidth:\n\t\tif (!gameUi.connectSerial(portName, bandRate, this.log)) {\n\n\t\t\t// If Connection fails, shows an Error Message\n\t\t\tlog.write(\"System Message: Fails to connect to:\"\n\t\t\t\t\t+ portName + \" with \" + bandRate + \" Bandwidth\");\n\t\t\tlog.write(\"##############################\");\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\"Can't connect to this device, please check again.\",\n\t\t\t\t\t\"Connection Error\", JOptionPane.ERROR_MESSAGE);\n\n\t\t} else {\n\n\t\t\t// If Connection Success, then hide this connection Ui and\n\t\t\t// Change into GameUi:\n\t\t\tlog.write(\"System Message: Connect to:\" + portName\n\t\t\t\t\t+ \" with \" + bandRate + \" Bandwidth Seccessesfully\");\n\t\t\tlog.write(\"##############################\");\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\"Device Connected, have fun! :)\",\n\t\t\t\t\t\"Connection Success\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\tthis.setVisible(false);\n\t\t\tgameUi.setVisible(true);\n\t\t}\n\n\t}",
"public abstract void connectSystem();",
"@Override\n public boolean connect(BluetoothDevice bluetoothDevice) throws RemoteException {\n Parcel parcel = Parcel.obtain();\n Parcel parcel2 = Parcel.obtain();\n try {\n parcel.writeInterfaceToken(Stub.DESCRIPTOR);\n boolean bl = true;\n if (bluetoothDevice != null) {\n parcel.writeInt(1);\n bluetoothDevice.writeToParcel(parcel, 0);\n } else {\n parcel.writeInt(0);\n }\n if (!this.mRemote.transact(8, parcel, parcel2, 0) && Stub.getDefaultImpl() != null) {\n bl = Stub.getDefaultImpl().connect(bluetoothDevice);\n parcel2.recycle();\n parcel.recycle();\n return bl;\n }\n parcel2.readException();\n int n = parcel2.readInt();\n if (n == 0) {\n bl = false;\n }\n parcel2.recycle();\n parcel.recycle();\n return bl;\n }\n catch (Throwable throwable) {\n parcel2.recycle();\n parcel.recycle();\n throw throwable;\n }\n }",
"public synchronized void connect(BluetoothDevice device) {\n \tif (D) Log.d(TAG, \"connect to: \" + device);\n\n // Cancel any thread attempting to make a connection\n if (mState == STATE_CONNECTING) {\n if (mConnectThread != null) {mConnectThread.cancel(); mConnectThread = null;}\n }\n\n // Cancel any thread currently running a connection\n if (mConnectedThread != null) {mConnectedThread.cancel(); mConnectedThread = null;}\n\n // Start the thread to connect with the given device\n mConnectThread = new ConnectThread(device);\n mConnectThread.start();\n setState(STATE_CONNECTING);\n }",
"public CreateConnection(int portNumber, List<Integer> adjList, Integer key,int fromPeerid,Integer v2,int originate) //CreateConnection Constructor\n {\n this.portNumber=portNumber;\n this.adjList=adjList;\n this.key=key;\n this.fromPeerid=fromPeerid;\n this.v2=v2;\n this.originateId = originate;\n }",
"public PeerToPeerConnection(GameController controller, String ip, int port){\n this.controller = controller;\n this.ip = ip;\n this.port = port;\n clientID = \"ConnectingClient\";\n isHost = false;\n System.out.println(\"PeerToPeerConnection: Constructor: ConnectingClient\");\n }",
"public void connectFrom( Wire w ) {\n outgoing.add( w );\n }",
"public void connectTo( Wire w ) {\n inCount = inCount + 1;\n }",
"public void connect_bt(String deviceAddress) {\n Intent intent = new Intent(\"OBDStatus\");\n intent.putExtra(\"message\", \"Trying to connect with device\");\n context.sendBroadcast(intent);\n disconnect();\n BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();\n btAdapter.cancelDiscovery();\n if (deviceAddress == null || deviceAddress.isEmpty()) {\n intent.putExtra(\"message\", \"Device not found\");\n context.sendBroadcast(intent);\n return;\n }\n\n if (!btAdapter.isEnabled()) {\n intent.putExtra(\"message\", \"Bluetooth is disabled\");\n context.sendBroadcast(intent);\n return;\n }\n\n BluetoothDevice device = btAdapter.getRemoteDevice(deviceAddress);\n\n UUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805F9B34FB\");\n\n try {\n socket = device.createInsecureRfcommSocketToServiceRecord(uuid);\n socket.connect();\n isConnected = true;\n intent.putExtra(\"message\", \"OBD connected\");\n context.sendBroadcast(intent);\n } catch (IOException e) {\n Log.e(\"gping2\", \"There was an error while establishing Bluetooth connection. Falling back..\", e);\n Class<?> clazz = socket.getRemoteDevice().getClass();\n Class<?>[] paramTypes = new Class<?>[]{Integer.TYPE};\n BluetoothSocket sockFallback = null;\n try {\n Method m = clazz.getMethod(\"createInsecureRfcommSocket\", paramTypes);\n Object[] params = new Object[]{Integer.valueOf(1)};\n sockFallback = (BluetoothSocket) m.invoke(socket.getRemoteDevice(), params);\n sockFallback.connect();\n isConnected = true;\n socket = sockFallback;\n intent.putExtra(\"message\", \"OBD connected\");\n context.sendBroadcast(intent);\n } catch (Exception e2) {\n intent.putExtra(\"message\", \"OBD Connection error\");\n context.sendBroadcast(intent);\n Log.e(\"gping2\", \"BT connect error\");\n }\n }\n this.deviceAddress = deviceAddress;\n saveNewAddress();\n }",
"private void connect(){\n // Averiguem quina direccio IP hem d'utilitzar\n InetAddress iAddress;\n try {\n iAddress = InetAddress.getLocalHost();\n String IP = iAddress.getHostAddress();\n\n //Socket sServidor = new Socket(\"172.20.31.90\", 33333);\n sServidor = new Socket (String.valueOf(IP), 33333);\n doStream = new DataOutputStream(sServidor.getOutputStream());\n diStream = new DataInputStream(sServidor.getInputStream());\n } catch (ConnectException c){\n System.err.println(\"Error! El servidor no esta disponible!\");\n System.exit(0);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"protected abstract void onConnect();",
"private void connectVertex(IndoorVertex indoorV1, IndoorVertex indoorV2)\n {\n XYPos firstPos = indoorV1.getPosition();\n XYPos secondPos = indoorV2.getPosition();\n\n //Change in only X position means that the vertex's are East/West of eachother\n //Change in only Y position means that the vertex's are North/South of eachother\n if(firstPos.getX() > secondPos.getX() && Math.floor(firstPos.getY() - secondPos.getY()) == 0.0)\n {\n indoorV1.addWestConnection(indoorV2);\n indoorV2.addEastConnection(indoorV1);\n }\n else if(firstPos.getX() < secondPos.getX() && Math.floor(firstPos.getY() - secondPos.getY()) == 0.0)\n {\n indoorV1.addEastConnection(indoorV2);\n indoorV2.addWestConnection(indoorV1);\n }\n else if(firstPos.getY() > secondPos.getY() && Math.floor(firstPos.getX() - secondPos.getX()) == 0.0)\n {\n indoorV1.addSouthConnection(indoorV2);\n indoorV2.addNorthConnection(indoorV1);\n }\n else if(firstPos.getY() < secondPos.getY() && Math.floor(firstPos.getX() - secondPos.getX()) == 0.0)\n {\n indoorV1.addNorthConnection(indoorV2);\n indoorV2.addSouthConnection(indoorV1);\n }\n\n\n indoorV1.addConnection(indoorV2);\n indoorV2.addConnection(indoorV1);\n }",
"public void connect()\r\n\t{\r\n\t\tkonekcija = ConnectionClass.getConnection(adresa, port, imeBaze, korisnickoIme, sifra);\r\n\t\tSystem.out.println(\"Konekcija otvorena: \"+ konekcija.toString());\r\n\t}",
"@Override\n\tpublic boolean connect(Connection connection) {\n\t\tConnectable target = connection.getTargetConnector(this).getConnectable();\n\t\tConnector targetConnector = connection.getTargetConnector(this);\n\t\t\n\t\tif (target instanceof Instrument) {\n\t\t\tif (connection.isConnectionType(this, ConnectorType.INST_PLAY_OUT, ConnectorType.INST_PLAY_IN)) {\n\t\t\t\tconnectInstrument((Instrument) target);\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (target instanceof PatternGen) {\n\t\t\tif (connection.isConnectionType(this, ConnectorType.PATTERN_IN, ConnectorType.PATTERN_OUT)) {\n\t\t\t\tconnectPatternObject((PatternGen) target);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (target instanceof Instance) {\n\t\t\tif (connection.isConnectionType(this, ConnectorType.ACTION_OUT, ConnectorType.ACTION_IN)) {\n\t\t\t\tconnectPlayAction((Instance) target, targetConnector.getActionType());\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public void makeConnection() {\n\t\ttry {\n\t\t\tif(sock != null) {\n\t\t\t\ttable.printMsg(\"Cannot join a server twice! You've already connected.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsock = new Socket(serverIP, serverPort);\n\t\t\toos = new ObjectOutputStream(sock.getOutputStream());\n\t\t\tois = new ObjectInputStream(sock.getInputStream());\n\t\t\tThread thread = new Thread(new ServerHandler());\n\t\t\tthread.start();\n\t\t} catch(Exception e) {\n\t\t\ttable.printMsg(\"Cannot Join Server.\");\n\t\t\tsock = null;\n\t\t\ttable.repaint();\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"public void makeConnection() {\n\t\t// make a socket, output stream, and try connecting to the server\n\t\twhile (!connection) {\n\t\t\ttry {\n\t\t\t\tsocket = new Socket(address, port);\n\t\t\t\toutStream = new ObjectOutputStream(socket.getOutputStream());\n\t\t\t\tconnection = true;\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"private void connectDevice(Intent data, boolean secure) {\n String address = data.getExtras()\n .getString(EXTRA_DEVICE_ADDRESS);\n // Get the BluetoothDevice object\n BluetoothDevice device = bluetoothAdapter.getRemoteDevice(address);\n // Attempt to connect to the device\n btService.connect(device, secure);\n }"
] | [
"0.6688644",
"0.65976924",
"0.6530609",
"0.6395609",
"0.63755447",
"0.63560754",
"0.63560754",
"0.63560754",
"0.6350922",
"0.6322047",
"0.62960327",
"0.6273654",
"0.6227304",
"0.6195672",
"0.61668223",
"0.6166321",
"0.613914",
"0.61301607",
"0.61094874",
"0.61015534",
"0.60722536",
"0.6066373",
"0.6056459",
"0.60005593",
"0.60002905",
"0.5971612",
"0.5970989",
"0.5968498",
"0.596355",
"0.595549",
"0.5954515",
"0.5931336",
"0.5905607",
"0.58717054",
"0.5830748",
"0.5826477",
"0.5823637",
"0.58128977",
"0.5805947",
"0.58023643",
"0.5779318",
"0.5774624",
"0.5755691",
"0.5753872",
"0.5752496",
"0.5735376",
"0.57336867",
"0.572414",
"0.572414",
"0.5723193",
"0.57224077",
"0.5720563",
"0.5716147",
"0.5711713",
"0.57110465",
"0.56916755",
"0.56777364",
"0.567708",
"0.5676072",
"0.5675118",
"0.5672935",
"0.5668708",
"0.56530493",
"0.56492585",
"0.56446546",
"0.563386",
"0.5633322",
"0.5621409",
"0.5620617",
"0.5612436",
"0.5609701",
"0.56068385",
"0.5592537",
"0.5584381",
"0.5584177",
"0.55730444",
"0.55662644",
"0.55437344",
"0.5540292",
"0.5539509",
"0.5534284",
"0.55240226",
"0.55230236",
"0.5519168",
"0.55190945",
"0.5516975",
"0.5511536",
"0.55098706",
"0.5506778",
"0.55046725",
"0.5502456",
"0.55022526",
"0.54999775",
"0.5499367",
"0.54949325",
"0.5493834",
"0.54918313",
"0.54881656",
"0.5487423",
"0.54843664",
"0.5477434"
] | 0.0 | -1 |
Send a device to the destination. If there is no destination, the packet is ignored. | public void send(DataPacket packet){
if(deviceDestination != null){
deviceDestination.receive(packet, portDestination);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void send_data_packet(char dest, DatagramPacket dp) {\n if (win.is_local_name(dest)) {\n // Send to local node\n try {\n dp.setAddress(InetAddress.getLocalHost());\n dp.setPort(ds.getLocalPort());\n ds.send(dp);\n win.DATA_snt++;\n }\n catch (UnknownHostException e) {\n Log(\"Error sending packet to himself: \"+e+\"\\n\");\n }\n catch (IOException e) {\n Log(\"Error sending packet to himself: \"+e+\"\\n\");\n }\n \n } else { // Send to Neighbour Router\n char prox= next_Hop(dest);\n if (prox == ' ') {\n Log(\"No route to destination: packet discarded\\n\");\n } else {\n // Lookup Neighbour\n Neighbour pt= neig.locate_neig(prox);\n if (pt == null) {\n Log(\"Invalid neighbour (\"+prox+\n \") in routing table: packet discarder\\n\");\n return;\n }\n try {\n pt.send_packet(ds, dp);\n win.DATA_snt++;\n }\n catch(IOException e) {\n Log(\"Error sending DATA packet: \"+e+\"\\n\");\n }\n } \n }\n }",
"public void sendTo(P2PUser dest, Object msg) throws IOException;",
"public void sendData(String mssg, int destinationPort){\r\n\r\n\t\t\t //Creates a new socket. This will be used for sending and receiving packets\r\n\t\t\t//\t\t\tsocket.setSoTimeout(5000); //Sets the timeout value to 5 seconds. If 5 seconds elapses and no packet arrives on receive, an exception will be thrown\t\r\n\t\tInetAddress local = null;\r\n\t\t\ttry {\r\n\t\t\t\tlocal = InetAddress.getLocalHost();\r\n\t\t\t} catch (UnknownHostException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t} //Gets the local address of the computer \r\n\t\t\t\r\n\t\t\t\tbyte[] dataArray = mssg.getBytes();\r\n\r\n\t\t\t\tDatagramPacket packetToSend = new DatagramPacket(dataArray, dataArray.length, local, destinationPort); //Creates a packet from the dataArray, to be sent to the intermediate host\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsndSocket.send(packetToSend);\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\t}",
"public void send(String destination, String message, String identifier){\n return;\n }",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-02-25 10:38:11.976 -0500\", hash_original_method = \"24A3E423DE78176900F1058E127BC8B2\", hash_generated_method = \"5B5F51BF25DAE30DEF4DFB5C781A6B4A\")\n \npublic void send(InetAddress host, int port) throws IOException\n {\n __sendPacket.setAddress(host);\n __sendPacket.setPort(port);\n _socket_.send(__sendPacket);\n }",
"void send(TransportPacket pkt, Address addr) throws CCommException, IllegalStateException;",
"public void send(Packet packet);",
"public void send(T caller, Packet<T, S> packet);",
"@Override\n public SendDataToWirelessDeviceResult sendDataToWirelessDevice(SendDataToWirelessDeviceRequest request) {\n request = beforeClientExecution(request);\n return executeSendDataToWirelessDevice(request);\n }",
"public void send(String message, InetAddress targetAddress, int targetPort ) throws Exception {\r\n if (datagramSocket==null) return;\r\n\r\n if (message==null)\r\n throw new Exception(\"Cannot send an empty message\");\r\n\r\n if (targetAddress ==null)\r\n throw new Exception(\"Invalid target address\");\r\n\r\n if (targetPort <= 0)\r\n throw new Exception(\"Invalid target port\");\r\n\r\n byte[] sendData = message.getBytes(UTF_16BE);\r\n DatagramPacket packet = new DatagramPacket(sendData, sendData.length, targetAddress, targetPort);\r\n datagramSocket.send(packet);\r\n }",
"void SendPacket(int packetIdentifier);",
"public void sendRequest(Pdu packet);",
"void sendTo(String from, String to, String m_id);",
"public void sendDatagram(int outPort, DatagramSocket socket)\n\t{\n\t\t//prep packet to send\n\t\tconsole.print(\"Sending packet...\");\n\t\tsentPacket = receivedPacket;\n\t\tsentPacket.setPort(outPort );\n\t\t\n\t\t//print contents\n\t\tprintDatagram(sentPacket);\n\t\t\n\t\t//send packet\n\t\ttry\n\t\t{\n\t\t\tsocket.send(sentPacket);\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tconsole.print(\"Packet successfully sent\");\n\t\t\n\t}",
"protected void send(Node dst) {\n\t\tnew Message(this, dst).send();\n\t}",
"@Override\n\tpublic void sendMessage(String destinationUID, byte[] message) {\n\t\tbyte[] temp = new byte[ICD.UID_LENGTH + message.length];\n\t\tUtils.hexStringToBytes(destinationUID, temp, 0);\n\t\tSystem.arraycopy(message, 0, temp, ICD.UID_LENGTH, message.length);\n\t\tmessage = temp;\n\t\t\n // Create temporary object\n UdpConnectionThread thread;\n // Synchronize a copy of the ConnectedThread\n synchronized (this) {\n if (getState() != STATE_CONNECTED) return;\n thread = mUdpConnectionThread;\n } \n // Perform the write unsynchronized\n thread.sendMessage(message);\n\t}",
"void sendPacketToPlayer(Player player, Object packet);",
"void send(ByteBuffer data, Address addr) throws CCommException, IllegalStateException;",
"public void send(PacketHeader hdr, char[] data)\n\t{\n\t\tchar[] toName = new char[32];\n\n\t\t//sprintf(toName, \"SOCKET_%d\", (int)hdr.to);\n\t\t\n\t\tassert((mSendBusy == false) && (hdr.mLength > 0) \n\t\t\t&& (hdr.mLength <= MaxPacketSize) && (hdr.from == mNetworkAddress));\n\t\tDebug.print('n', \"Sending to addr %d, %d bytes... \", hdr.to, hdr.mLength);\n\n\t\tInterrupt.Schedule(NetworkSendDone, this, NetworkTime, NetworkSendInt);\n\n\t\tif (Random() % 100 >= mChanceToWork * 100) \n\t\t{ // emulate a lost packet\n\t\t\tDebug.print('n', \"oops, lost it!\\n\");\n\t\t\treturn;\n\t\t}\n\n\t\t// concatenate hdr and data into a single buffer, and send it out\n\t\tchar[] buffer = new char[MaxWireSize];\n\t\tbuffer = (char[])hdr;\n\t\t//bcopy(data, buffer + sizeof(PacketHeader), hdr.length);\n\t\tsendToSocket(mSock, buffer, MaxWireSize, toName);\n\t\t\n\t}",
"@Override\n public void Send(PacketDatagram packet) {\n try {\n //For Group Message\n if (packet.getSendMSG().isUDPMulticastMode()) {\n for (Network sendNetwork : networkManager.getNetworks().values()) {\n MakeSourceProfile(packet, sendNetwork);\n sendNetwork.sendAllNodes(packet);\n }\n } //For private message\n else {\n NetworkType nnodetype = packet.getNextNode().getNetworkType();\n Network sendNetwork = networkManager.getNetworks().get(nnodetype);\n MakeSourceProfile(packet, sendNetwork);\n sendNetwork.send(packet);\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }",
"public void sendDiscovery() {\n\t\tCharset charSet = Charset.forName(\"US-ASCII\");\n\t\t\n\t\tbyte[] b = BROADCAST.getBytes(charSet);\n\t\tDatagramPacket dgram = null;\n\t\t\n\t\ttry {\n\t\t\tdgram = new DatagramPacket(b, b.length, InetAddress.getByName(MCAST_ADDR), DEST_PORT);\n\t\t} catch (UnknownHostException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\tsocket.send(dgram);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"void sendPacket(Player player, Object packet);",
"public abstract void send(String data, String toAddress);",
"public void send(byte[] data, InetAddress address, int port) {\n\t\t\n\t\tDatagramPacket sendingPacket = new DatagramPacket(data, data.length, address, port);\n\t\t\n\t\ttry {\n\t\t\tmainSocket.send(sendingPacket);\n\t\t}\n\t\tcatch(PortUnreachableException ex) {\n\t\t\t\n\t\t\tSystem.out.println(\"PortUnreachableException caught in server side.\\n Unable to send packet\\n\");\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\t\n\t\t\tSystem.out.println(\"2. IOException Caught in server side.\\n Unable to send packet\\n\");\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t}",
"public void transportSend(PhysicalAddress dest, TransportMessage msg) throws TransportException {\n\n try {\n UDPAddress destAddr = (UDPAddress) dest;\n byte[][] outPackets;\n\n // Construct a set of packets to send by segmenting the user's\n // data into UDPTransportLayer.PACKET_SIZE byte blocks\n synchronized (destSeqNum) {\n\tInteger temp = (Integer) destSeqNum.get(destAddr);\n\tint nextSeq;\n\tif (temp == null)\n\t nextSeq = 0;\n\telse\n\t nextSeq = temp.intValue();\n\n\toutPackets = buildDataPackets(nextSeq, msg.contents);\n\tdestSeqNum.put(destAddr, new Integer(nextSeq + outPackets.length));\n\n\t// Now blast the packets out. Before sending each one out,\n\t// save it in the toResend hashtable in case it needs to be\n\t// resent.\n\tHashtable<Integer, DatagramPacket> sentMsgs = (Hashtable<Integer, DatagramPacket>) notGCd.get(destAddr);\n\tif (sentMsgs == null) {\n\t sentMsgs = new Hashtable<Integer, DatagramPacket>();\n\t notGCd.put(destAddr, sentMsgs);\n\t}\n\n\tfor(int i=0; i<outPackets.length; i++) {\n\t DatagramPacket outPacket = new DatagramPacket(outPackets[i], UDPTransportLayer.PACKET_SIZE, \n\t\t\t\t\t\t\tdestAddr.hostAddr, destAddr.hostPort);\n\t sentMsgs.put(new Integer(nextSeq + i), outPacket);\n\t socket.send(outPacket);\n\t}\n }\n\n // Anytime we dump messages into the sent messages table, set\n // needGC to true so we can generate ALIVE messages if\n // necessary.\n needGC = true;\n\n synchronized (msgsToSend) {\n\tmsgsToSend.notify();\n }\n } catch (Exception e) {\n throw new TransportException(\"error sending message\", e);\n }\n }",
"public void send(Packet<?> packet) {\n sendPacket(packet);\n }",
"protected void sendMessage() throws IOException {\r\n\t\tif (smscListener != null) {\r\n\t\t\tint procCount = processors.count();\r\n\t\t\tif (procCount > 0) {\r\n\t\t\t\tString client;\r\n\t\t\t\tSimulatorPDUProcessor proc;\r\n\t\t\t\tlistClients();\r\n\t\t\t\tif (procCount > 1) {\r\n\t\t\t\t\tSystem.out.print(\"Type name of the destination> \");\r\n\t\t\t\t\tclient = keyboard.readLine();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(0);\r\n\t\t\t\t\tclient = proc.getSystemId();\r\n\t\t\t\t}\r\n\t\t\t\tfor (int i = 0; i < procCount; i++) {\r\n\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(i);\r\n\t\t\t\t\tif (proc.getSystemId().equals(client)) {\r\n\t\t\t\t\t\tif (proc.isActive()) {\r\n\t\t\t\t\t\t\tSystem.out.print(\"Type the message> \");\r\n\t\t\t\t\t\t\tString message = keyboard.readLine();\r\n\t\t\t\t\t\t\tDeliverSM request = new DeliverSM();\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\trequest.setShortMessage(message);\r\n\t\t\t\t\t\t\t\tproc.serverRequest(request);\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Message sent.\");\r\n\t\t\t\t\t\t\t} catch (WrongLengthOfStringException e) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Message sending failed\");\r\n\t\t\t\t\t\t\t\tevent.write(e, \"\");\r\n\t\t\t\t\t\t\t} catch (IOException ioe) {\r\n\t\t\t\t\t\t\t} catch (PDUException pe) {\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tSystem.out.println(\"This session is inactive.\");\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} else {\r\n\t\t\t\tSystem.out.println(\"No client connected.\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"You must start listener first.\");\r\n\t\t}\r\n\t}",
"public void sendUdpMessageToDrone() {\n\n DatagramPacket packet = null;\n try {\n packet = new DatagramPacket(message.getBytes(), message.length(), InetAddress.getByName(\"127.0.0.1\"), 6000);\n sender.send(packet);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void send_data_packet(char sender, int seq, char dest, String msg,\n String path) {\n if (!Character.isUpperCase(sender)) {\n Log(\"Invalid sender '\"+sender+\"'\\n\");\n return;\n }\n if (!Character.isUpperCase(dest)) {\n Log(\"Invalid destination '\"+dest+\"'\\n\");\n return;\n }\n DatagramPacket dp= make_data_packet(sender, seq, dest, msg, path);\n if (dp != null) {\n send_data_packet(dest, dp);\n }\n }",
"void send(TransportPacket pkt) throws CCommException, IllegalStateException;",
"public void send(Address from, String message);",
"public void setDestination(int destination) {\r\n\t\tthis.destination = destination;\r\n\t}",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-02-25 10:38:11.979 -0500\", hash_original_method = \"C03B7BA0DE1B470242B235172550195E\", hash_generated_method = \"7D506C9D568D8CEEB8F867DEA192AADC\")\n \npublic void send(InetAddress host) throws IOException\n {\n send(host, DEFAULT_PORT);\n }",
"public static void sendTo(Player player, OwnedWarp warp) {\n if(warp == null)\n return;\n try {\n Points.teleportTo(player, warp.getTarget(), warp.getName());\n } catch (InvalidDestinationException ex) {\n player.sendMessage(ex.getMessage());\n Stdout.println(ex.getMessage(), Level.ERROR);\n }\n }",
"public static void sendPacket(int sequenceNo) throws IOException {\r\n if (sequenceNo <= packets.size()) {\r\n // System.out.println(\"Sending packet: \" + sequenceNo);\r\n byte[] packet = packets.get(sequenceNo - 1);\r\n DatagramPacket pkt = new DatagramPacket(packet, 1024, receiverIP, receiverPort);\r\n senderSocket.send(pkt);\r\n }\r\n }",
"public void sendMessage(final SendenDevice device, MessageWrapper message) {\n // Set the actual device to the message\n message.setSendenDevice(wiFiP2PInstance.getThisDevice());\n\n new AsyncTask<MessageWrapper, Void, Void>() {\n @Override\n protected Void doInBackground(MessageWrapper... params) {\n if (device != null && device.getDeviceServerSocketIP() != null) {\n try {\n Socket socket = new Socket();\n socket.bind(null);\n\n InetSocketAddress hostAddres = new InetSocketAddress(device.getDeviceServerSocketIP(), device.getDeviceServerSocketPort());\n socket.connect(hostAddres, 2000);\n\n Gson gson = new Gson();\n String messageJson = gson.toJson(params[0]);\n\n OutputStream outputStream = socket.getOutputStream();\n outputStream.write(messageJson.getBytes(), 0, messageJson.getBytes().length);\n\n Log.d(TAG, \"Sending data: \" + params[0]);\n\n socket.close();\n outputStream.close();\n } catch (IOException e) {\n Log.e(TAG, \"Error creating client socket: \" + e.getMessage());\n }\n }\n\n return null;\n }\n }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, message);\n }",
"public static DatagramPacket sendPkt(Packet pkt, InetAddress sourceIpAddr, int sourcePort, InetAddress destIpAddr,\r\n int destPort, int timeout, int bufSize) throws IOException {\r\n \tlog.debug(\"sendPkt - call with create socket for: \" + sourceIpAddr.getHostAddress() + \" and port \" + sourcePort);\r\n DatagramSocket sock = new DatagramSocket(sourcePort, sourceIpAddr);\r\n\r\n sock.setBroadcast(true);\r\n sock.setReuseAddress(true);\r\n\r\n DatagramPacket recePkt = sendPkt(sock, pkt, destIpAddr, destPort, timeout, bufSize);\r\n sock.close();\r\n\r\n return recePkt;\r\n }",
"public void sendPacket(Packet pPacket) {\n mPacket = pPacket;\r\n \r\n \r\n }",
"public Transmission sendMessage(NodeInfo destination,\n MendelMessage message) throws IOException {\n\n NetworkDestination dest = new NetworkDestination(destination\n .getHostname(), destination.getPort());\n return sendMessage(dest,message);\n }",
"public int sendPacket(DatagramPacket p){\r\n\t\t\r\n\t\tpacket = p;\r\n\t\ttry{\r\n\t\t\tsock.send(packet);\r\n\t\t}\r\n\t\tcatch(Exception ex){\r\n\t\t\tLogger.write(\"Errore invio pacchetto: \"+ex.getMessage());\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn 0;\r\n\t\t\r\n\t}",
"void sendPacket(Packet p){\n InetAddress address=p.getDestination().getAddress();\n if (this.socket.isClosed()){\n return;\n }\n if (chatRooms.containsKey(address)){\n chatRooms.get(address).sendMessage(p);\n }else{\n Socket distant;\n Discussion discussion;\n try {\n distant = new Socket(address, NetworkManager.UNICAST_PORT);\n discussion = new Discussion(distant);\n discussion.addObserver(this);\n chatRooms.put(distant.getInetAddress(), discussion);\n new Thread(discussion).start();\n discussion.sendMessage(p);\n } catch (IOException e) {\n System.out.println(\"Erreur à l'envois d'un nouveau message\");\n }\n }\n }",
"public void sendPacket(String label, byte[] data) throws UnknownHostException {\n\t\tif (data != null && data.length + PACKET_HEADER_SIZE > SERVER_PACKET_MAX_SIZE) {\n\t\t\tSystem.err.println(\"Couldn't send packet, too much data. \");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\twhile (label.length() < 4) \n\t\t\tlabel = label + \" \";\n\t\tbyte[] labelArray = Arrays.copyOf(label.getBytes(Charset.forName(\"UTF-8\")), 4);\n\t\t\n\t\tbyte[] portArray = new byte[4];\n\t\tportArray[0] = (byte) (socket.getLocalPort() >> 24 & 0xFF);\n\t\tportArray[1] = (byte) (socket.getLocalPort() >> 16 & 0xFF);\n\t\tportArray[2] = (byte) (socket.getLocalPort() >> 8 & 0xFF);\n\t\tportArray[3] = (byte) (socket.getLocalPort() & 0xFF);\n\t\t\n\t\tbyte[] header = addArrays(\n\t\t\t\taddArrays(\n\t\t\t\t\t\tlabelArray, InetAddress.getLocalHost().getAddress()), \n\t\t\t\tportArray);\n\t\t\n\t\tDatagramPacket packet;\n\t\tif (data == null) {\n\t\t\tpacket = new DatagramPacket(header, header.length, connectedIP, SERVER_PORT);\n\t\t}else {\n\t\t\tbyte[] completeData = addArrays(header, data);\n\t\t\tpacket = new DatagramPacket(completeData, completeData.length, connectedIP, SERVER_PORT);\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tsocket.send(packet);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void sendPacket(Player player, Object packet) {\n\t\ttry {\n\t\t\tObject handle = player.getClass().getMethod(\"getHandle\", new Class[0]).invoke(player, new Object[0]);\n\t\t\tObject playerConnection = handle.getClass().getField(\"playerConnection\").get(handle);\n\t\t\tplayerConnection.getClass().getMethod(\"sendPacket\", new Class[] { getNMSClass(\"Packet\") })\n\t\t\t\t\t.invoke(playerConnection, new Object[] { packet });\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void send(Object o) {\n bus.onNext(o);\n }",
"public void sendPacket() throws IOException {\n\t\tbyte[] buf = playerList.toString().getBytes();\n\n\t\t// send the message to the client to the given address and port\n\t\tInetAddress address = packet.getAddress();\n\t\tint port = packet.getPort();\n\t\tpacket = new DatagramPacket(buf, buf.length, address, port);\n\t\tsocket.send(packet);\n\t}",
"public void sendPacket(Packet packet) {\n\t\tif(packet == null) {\n\t\t\tSystem.err.println(\"attempting to send but packet is null\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tif(sOutput != null)\n\t\t\t\tsOutput.writeObject(packet);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"error sending packet: [\"+packet+\", \"+packet.getData()+\"]\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tif(sOutput != null)\n\t\t\t\tsOutput.reset();\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"error resetting output stream\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tif(sOutput != null)\n\t\t\t\tsOutput.flush();\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"error flushing output stream\");\n\t\t}\n\t}",
"public synchronized void send() throws RemoteException {\n\n if (this.temperatureQueue.isEmpty()) {\n //logger.log(Level.INFO, \"Nothing to send, bailing.\");\n return;\n }\n\n for (TemperatureMessage message : this.temperatureQueue) {\n // TODO\n // lookup the node and deliver the message.\n\n TemperatureNode destinationNode = owner.lookupNode(message.getDestination());\n if (destinationNode == null) {\n // Classic comment; this should never happen.\n System.out.println(\"Refusing to send to null node \" + message.getDestination());\n return;\n }\n destinationNode.sendMeasurement(message);\n this.owner.incrementVectorClock();\n //System.out.println(this.owner.ID() + \"Sent a message to \" + destinationNode.ID());\n\n }\n\n temperatureQueue.clear();\n }",
"@Override\npublic int sendToAddress(InetSocketAddress isa, byte[] msg) throws IOException {\n\treturn 0;\n}",
"public void Send(double[] data, int dest, int tag) {\n if (DEBUG_MODE) {\n System.err.println(\"Comm: \\tEntered Send(int[]) method\");\n }\n Message message = new Message(Message.dataToByteArray(data), Rank(), tag, Message.TYPE_DOUBLE);\n if (DEBUG_MODE) {\n System.err.println(\"Comm: \\tSending...\");\n System.err.println(message);\n }\n group_.Send(message, dest);\n }",
"@Override\n public void queueDeviceWrite(IpPacket packet) {\n\n deviceWrites.add(packet.getRawData());\n }",
"public void send(final Packet packet)\n throws InterruptedException, RemoteException\n {\n if (packet.getFrom() == null || packet.getFrom().length() == 0) {\n client.sendFromAllResources(packet);\n } else {\n client.send(packet, packet.getFrom());\n }\n }",
"public void sendPushToOneDevice() throws FirebaseMessagingException {\n String registrationToken = \"YOUR_REGISTRATION_TOKEN\";\n\n // See documentation on defining a message payload.\n Message message = Message.builder()\n .putData(\"score\", \"850\")\n .putData(\"time\", \"2:45\")\n .setToken(registrationToken)\n .build();\n\n // Send a message to the device corresponding to the provided\n // registration token.\n String response = FirebaseMessaging.getInstance().send(message);\n // Response is a message ID string.\n System.out.println(\"Successfully sent message: \" + response);\n }",
"public void sendTeleportPacket(int entityId, Vector destination, byte yaw, byte pitch) {\n Object packet = ReflectUtils.newInstance(\"PacketPlayOutEntityTeleport\");\n ReflectUtils.setField(packet, \"a\", entityId);\n\n // Set the teleport location to the position of the entity on the player's side of the portal\n ReflectUtils.setField(packet, \"b\", destination.getX());\n ReflectUtils.setField(packet, \"c\", destination.getY());\n ReflectUtils.setField(packet, \"d\", destination.getZ());\n ReflectUtils.setField(packet, \"e\", yaw);\n ReflectUtils.setField(packet, \"f\", pitch);\n\n sendPacket(packet);\n }",
"public void sendBroadcast(byte[] bytesToSend)\n {\n if (m_name != null)\n {\n m_socket.write(bytesToSend);\n }\n\n }",
"public void setDestination(String destination) {\r\n this.destination = destination;\r\n }",
"public int send(byte[] buffer) throws IllegalAccessException {\n if (!mUsbConnection.claimInterface(mUsbInterface, forceClaim))\n throw new IllegalAccessException(\"USB interface cannot be claimed\");\n return mUsbConnection.bulkTransfer(mUsbEndpointOut, buffer, buffer.length, TIMEOUT);\n }",
"public void Send(float[] data, int dest, int tag) {\n if (DEBUG_MODE) {\n System.err.println(\"Comm: \\tEntered Send(int[]) method\");\n }\n Message message = new Message(Message.dataToByteArray(data), Rank(), tag, Message.TYPE_FLOAT);\n if (DEBUG_MODE) {\n System.err.println(\"Comm: \\tSending...\");\n System.err.println(message);\n }\n group_.Send(message, dest);\n }",
"void send(SftpDatagram head,byte[] data){\r\n\t\tdata_send = data;\r\n\t\t//first send the first one\r\n\t\ttotal_datagrams = 1;\r\n\t\tcovered_datagrams++;\r\n\t\thead.send_datagram();\r\n\t\tput_and_set_timer(head);\r\n\t\t//sending\r\n\t\tif(data_send != null){\r\n\t\t\tlong size = data_send.length;\r\n\t\t\tif(size != 0)\r\n\t\t\t\ttotal_datagrams = (int)((size+BLOCK_SIZE-1) / BLOCK_SIZE);\r\n\t\t}\r\n\t\t//check sendings(if not small mode)\r\n\t\tcheck_and_send();\r\n\t}",
"private void send(final byte[] data, final InetAddress address, final int port) {\n send = new Thread(\"Send\") {\n public void run() {\n DatagramPacket packet = new DatagramPacket(data, data.length, address, port);\n try {\n socket.send(packet);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n };\n send.start();\n }",
"public synchronized void send(byte[] data, int length) throws IOException {\r\n\t\tsocket.send(new DatagramPacket(data, length, remoteAddress));\r\n\t}",
"void Send (int boardID, short addr, ByteBuffer databuf, long datacnt, int eotMode);",
"public void sendUdpMessageToESP() {\n\n DatagramPacket packet = null;\n try {\n packet = new DatagramPacket(message.getBytes(), message.length(), InetAddress.getByName(ESP_IPaddress), 6900);\n sender.send(packet);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void sendMessage() {\n if (mRecipientAddress == null) {\n if (mDevices.getSelectedItem() == null) {\n mStatusText.append(\"Please select a device to message.\\n\");\n return;\n }\n if (mMessage.getText() == null || mMessage.getText().toString().equals(\"\")) {\n mStatusText.append(\"Please enter a message to send.\\n\");\n return;\n }\n }\n WifiDirectClientAsyncTask t = new WifiDirectClientAsyncTask(this, mMessage.getText().toString());\n if (Build.VERSION.SDK_INT>=Build.VERSION_CODES.HONEYCOMB)\n t.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n else\n t.execute();\n }",
"public void setDestination (InetSocketAddress o) {\n\t\torigin = o;\n\t}",
"public int send(byte[] buffer, int timeout) throws IllegalAccessException {\n if (!mUsbConnection.claimInterface(mUsbInterface, forceClaim))\n throw new IllegalAccessException(\"USB interface cannot be claimed\");\n return mUsbConnection.bulkTransfer(mUsbEndpointOut, buffer, buffer.length, timeout);\n }",
"public void setDestination(Coordinate destination) {\n cDestination = destination;\n }",
"public void send(ILPacket dataPacket) throws IOException {\n\t\t \n\t\tDatagramPacket packet;\n\t\t\n\t\tbyte[] buffer = dataPacket.getBytes();\n\t\t\n\t\tpacket = new DatagramPacket(buffer, buffer.length, this.group, this.writePort);\n\t\tthis.outSocket.send(packet);\n\t}",
"private void sendCommand(int recipient, int action, int parameter) {\r\n\t\tString command = \"*\" + recipient + \";\" + action + \";\" + parameter + \";\"\r\n\t\t\t\t+ \"0\" + \"#\";\r\n\t\tlogger.debug(\"Sende Kommando\");\r\n\t\tcom.sendString(command);\r\n\t\tlogger.debug(\"Senden des Kommandos beendet\");\r\n\t}",
"public void packetSent(NIOSocket socket, Object tag)\n {\n }",
"private void send(Object o) {\r\n try {\r\n System.out.println(\"02. -> Sending (\" + o +\") to the client.\");\r\n this.os.writeObject(o);\r\n this.os.flush();\r\n } \r\n catch (Exception e) {\r\n System.out.println(\"XX.\" + e.getStackTrace());\r\n }\r\n }",
"public Teleporter setDestination(Location location)\r\n\t{ this.destination = location; return this; }",
"private void sendCommand(int recipient, int action, int parameter,\r\n\t\t\tint options) {\r\n\t\tString command = \"*\" + recipient + \";\" + action + \";\" + parameter + \";\"\r\n\t\t\t\t+ options + \"#\";\r\n\t\tlogger.debug(\"Sende Kommando\");\r\n\t\tcom.sendString(command);\r\n\t\tlogger.debug(\"Senden des Kommandos beendet\");\r\n\r\n\t}",
"private void send(Object o) {\n\t\ttry {\n\t\t\tSystem.out.println(\"02. -> Sending (\" + o +\") to the client.\");\n\t\t\tthis.os.writeObject(o);\n\t\t\tthis.os.flush();\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"XX.\" + e.getStackTrace());\n\t\t}\n\t}",
"public void sendData(Datapacket packet){\n try {\n oos.flush();\n oos.reset();\n oos.writeObject(packet);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void sendPacket(String message) {\n try {\r\n Thread.sleep(1000);\r\n } catch (InterruptedException ie) {\r\n }\r\n\r\n if (ipAddress == null) {\r\n MessageEvent e = new MessageEvent(MessageType.SendWarning);\r\n e.description = \"cannot send message to unreported device\";\r\n e.HWid = HWid;\r\n RGPIO.message(e);\r\n } else if (status == PDeviceStatus.ACTIVE) {\r\n UDPSender.send(message, ipAddress, this, RGPIO.devicePort);\r\n }\r\n }",
"public void sendData(byte[] data) {\r\n\t\t//send packet\r\n\t\ttry {\r\n\t\t\tout.write(data);\r\n\t\t} catch(IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void makeDestinationRequest() {\n this._hasDestinationRequests = true;\n }",
"public void setDestination(String destination1) {\r\n this.destination = destination1;\r\n }",
"public Builder setDestination(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n destination_ = value;\n onChanged();\n return this;\n }",
"public void set_dest(short value) {\n setUIntElement(offsetBits_dest(), 8, value);\n }",
"private void send(Object o) {\n try {\n System.out.println(\"02. -> Sending an object...\");\n os.writeObject(o);\n os.flush();\n } catch (Exception e) {\n System.out.println(\"XX. Exception Occurred on Sending:\" + e.toString());\n }\n }",
"private void send()\n {\n\n\tRouterPacket pkt;\n if(poisonEnabled){\n\t // Create a false distance table\n int[] tmpDistTable = new int[RouterSimulator.NUM_NODES];\n System.arraycopy(myDistTable,0,tmpDistTable,0,RouterSimulator.NUM_NODES);\n for(int i = 0;i<neighbours.length;i++){\n if(neighbours[i]){\n\t\t //Poisoned reverse\n for(int j = 0;j<route.length;j++){\n\t\t\t// All routes that goes through my node, set to infinity\n if(route[j] == i && j!=i){\n tmpDistTable[j] = RouterSimulator.INFINITY;\n }\n }\n\t\t // Send new packet\n pkt = new RouterPacket(myID,i,tmpDistTable);\n sendUpdate(pkt);\n }\n }\n } else {\n for (int i = 0; i < neighbours.length; i++) {\n if (neighbours[i]) {\n\t\t // Send new packet\n pkt = new RouterPacket(myID, i, myDistTable);\n sendUpdate(pkt);\n }\n }\n }\n\n\n }",
"public void write(byte[] buffer, int offset, int count) {\n try {\n if(buffer==null){\n Log.w(TAG, \"Can't write to device, nothing to send\");\n return;\n }\n //This would be a good spot to log out all bytes received\n mmOutStream.write(buffer, offset, count);\n if(connectionSuccessful == null){\n connectionSuccessful = false;\n }\n //Log.w(TAG, \"Wrote out to device: bytes = \"+ count);\n } catch (IOException|NullPointerException e) { // STRICTLY to catch mmOutStream NPE\n // Exception during write\n //OMG! WE MUST NOT BE CONNECTED ANYMORE! LET THE USER KNOW\n Log.e(TAG, \"Error sending bytes to connected device!\");\n connectionLost();\n }\n }",
"public synchronized void sendExplicit(byte[] buffer) throws IOException {\n try {\n byte header[] = generateHeaderByte(buffer.length);\n int offset = 0;\n for (byte b : header) {\n bufferSent[offset++] = b;\n }\n for (byte b : buffer) {\n bufferSent[offset++] = b;\n }\n for (byte b : BipUtils.messageEnd) {\n bufferSent[offset++] = b;\n }\n DatagramPacket p = new DatagramPacket(bufferSent, 0, offset, InetAddress.getByName(host), port);\n datagramSocket.send(p);\n } catch (IOException e) {\n// System.out.println(\"MessageSocketUDP::send \\n\");\n// e.printStackTrace();\n connected = false;\n throw e;\n }\n\n }",
"@Override\n\tpublic void directSend(String exchange, String routeKey, Object data) {\n\n\t}",
"public void setDestination(java.lang.String destination) {\n this.destination = destination;\n }",
"public void sendRegistration(String deviceId) {\n\t\tLog.d(TAG, \"sendRegistration\");\n\t\tif (deviceId != null) {\n\t\t\tsendSuccessResult(CALLBACK_TYPE_REGISTRATION, deviceId);\n\t\t}\n\t}",
"public void setDestination(String dest)\n\t{\n\t\tnotification.put(Attribute.Request.DESTINATION, dest);\n\t}",
"private void sendPacket(InetAddress address, byte[] data) {\n try {\n send.setAddress(address);\n send.setData(Encryption.encrypt(data));\n socket.send(send);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void sendBytesToServer(byte[] bytesToSend, int byteOffset) {\n\t\ttry { // to construct and send a packet\n\t\t\tPacket packet = new Packet(\n\t\t\t\t\t\t0, // TODO id\n\t\t\t\t\t\tthis.ownAddress,\n\t\t\t\t\t\tthis.ownPort, \n\t\t\t\t\t\tthis.serverAddress, \n\t\t\t\t\t\tthis.serverPort,\n\t\t\t\t\t\tbytesToSend, byteOffset\n\t\t\t\t);\n\t\t\t\n\t\t\tTransportLayer.sendPacket(\n\t\t\t\t\tthis.socket,\n\t\t\t\t\tpacket,\n\t\t\t\t\tthis.serverPort\n\t\t\t); \n\t\t\t\n\t\t\t// this.showNamedMessage(\"Bytes send to server!\"); // for debugging\n\t\t\t\n\t\t} catch (PacketException | IOException | UtilByteException | UtilDatagramException e) {\n\t\t\tthis.showNamedError(\"Something went wrong while sending bytes: \"\n\t\t\t\t\t+ e.getLocalizedMessage());\n\t\t}\n\t}",
"public void send(Object object)\n/* */ throws IOException\n/* */ {\n/* 89 */ send(object, null);\n/* */ }",
"void sendDataForSubscriberWithSelfPermissions(int subId, String callingPkg, String destAddr,\n String scAddr, int destPort, byte[] data, PendingIntent sentIntent,\n PendingIntent deliveryIntent);",
"void sendDataForSubscriber(int subId, String callingPkg, String destAddr,\n String scAddr, int destPort, byte[] data, PendingIntent sentIntent,\n PendingIntent deliveryIntent);",
"private void send(Message outgoing, ByteBuffer buffer, SocketChannel channel, boolean debug) throws IOException {\n\t\tif (debug)\n\t\t\tSystem.out.println(\"Worker Thread \" + threadID + \" sending new message: \" + outgoing.toString());\n\t\tbuffer = ByteBuffer.wrap(Serializer.serialize(outgoing));\n\t\tchannel.write(buffer);\n\t\tif (debug)\n\t\t\tSystem.out.println(\"Worker Thread \" + threadID + \"sent message\");\n\t}",
"public void sendJoiningPlayer() {\r\n Player p = nui.getPlayerOne();\r\n XferJoinPlayer xfer = new XferJoinPlayer(p);\r\n nui.notifyJoinConnected();\r\n networkPlayer.sendOutput(xfer);\r\n }",
"@Override\n\tpublic void send(DuDuMessage message, Object sessionToken) {\n\t\t\n\t}",
"protected int route(byte buffer[], int source) {\n \n // Get the message level\n byte messageLevel = getMessageLevel( buffer );\n // get the messageID\n byte messageID[] = getMessageID( buffer );\n \n // Check that the message was not received before\n if( messageIsNew( messageID )){\n \trecordMessageID( messageID );\n }\n else{\n \treturn Constants.SUCCESS;\n }\n \n // If I am not the sender of the message\n // add it to the message queue\n if (messageLevel == Constants.MESSAGE_ALL && source != Constants.SRC_ME){\n // Add message to message queue\n \taddMessageToQueue( buffer );\n }\n else if (messageLevel == Constants.MESSAGE_TARGET){\n \tbyte[] target = getTarget( buffer );\n \tif (target == this.address) {\n \t\t//Add to the message queue\n \t\treturn Constants.SUCCESS; //DO NOT send to all threads.\n \t}\n }\n \n // Send the message to all the threads\n synchronized (this.rwThreads) {\n for (ReadWriteThread aThread : rwThreads) {\n Log.d(TAG, \"Writing to device on thread: \" + aThread.getName());\n aThread.write(buffer);\n }\n }\n \n return Constants.SUCCESS;\n }",
"public static void sendUdpPacket(String text, InetAddress address, int port, DatagramSocket socket) throws IOException {\n var buf = text.getBytes();\n\n // Step 2 : Create the datagramPacket for sending the data\n var DpSend = new DatagramPacket(buf, buf.length, address, port);\n\n // Step 3 : invoke the send call to actually send the data\n socket.send(DpSend);\n }",
"@Override\n\tpublic void sendPacket(JBPacket packet) {\n\t\t\n\t}",
"public int send (byte []buffer, int offset, int length)\n throws IOException,IllegalArgumentException,IndexOutOfBoundsException\n {\n if (offset < 0) {\n throw new java.lang.IndexOutOfBoundsException();\n }\n if (length < 0) {\n throw new java.lang.IndexOutOfBoundsException();\n }\n if ((offset + length) > buffer.length) {\n throw new java.lang.IndexOutOfBoundsException();\n }\n return sendNative (buffer, offset, length);\n }"
] | [
"0.6092645",
"0.6012596",
"0.60090554",
"0.59283006",
"0.58234626",
"0.5754335",
"0.5690867",
"0.5676023",
"0.56621933",
"0.56449986",
"0.5595019",
"0.5517225",
"0.54761946",
"0.5440383",
"0.5411182",
"0.53399825",
"0.531895",
"0.5315918",
"0.5266743",
"0.525907",
"0.5255509",
"0.5249778",
"0.52472514",
"0.52445304",
"0.5233925",
"0.52171063",
"0.5198164",
"0.517578",
"0.517577",
"0.5118277",
"0.51106066",
"0.50997454",
"0.508815",
"0.50856596",
"0.5085384",
"0.50731945",
"0.5071253",
"0.50585705",
"0.50488394",
"0.5038651",
"0.50383145",
"0.5029261",
"0.50247455",
"0.5024512",
"0.50214404",
"0.49892884",
"0.4988595",
"0.49836934",
"0.49807733",
"0.49649042",
"0.49643257",
"0.49532348",
"0.49374014",
"0.4937048",
"0.49288872",
"0.49116302",
"0.4906435",
"0.4904488",
"0.48954394",
"0.48915964",
"0.48899287",
"0.4886643",
"0.4886282",
"0.48813727",
"0.48726532",
"0.48709697",
"0.4869182",
"0.48667476",
"0.48625198",
"0.4859135",
"0.48546803",
"0.4853428",
"0.48526886",
"0.4836291",
"0.48288146",
"0.4828585",
"0.4818684",
"0.48176706",
"0.4815292",
"0.48138502",
"0.48134962",
"0.4809362",
"0.48085347",
"0.48080632",
"0.48016435",
"0.47965452",
"0.47760475",
"0.47687885",
"0.47670272",
"0.47586384",
"0.47575969",
"0.4750832",
"0.47449097",
"0.4741225",
"0.47396713",
"0.47380587",
"0.47361332",
"0.47337577",
"0.4733628",
"0.4725477"
] | 0.708269 | 0 |
single method interface : functional interface > having single method | interface Shape{
void draw();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@FunctionalInterface\r\ninterface SingleMethod { // functional interface cant have more than one abstract method\r\n\tvoid method();\r\n\t\r\n}",
"@FunctionalInterface // or we can call it SAM\r\n interface ShowMe{\r\n\t\r\n\t void showOk();\r\n\t \r\n\tpublic default void one()\r\n\t {\r\n\t System.out.println(\"method one \");\r\n };\r\n \r\n public static void one1()\r\n {\r\n System.out.println(\"method one 1 \");\r\n };\r\n \r\n public default void one2()\r\n \t {\r\n \t System.out.println(\"method one2 \");\r\n };\r\n \r\n }",
"interface MyFirstVoidFunctionalInterface {\n\n public void methodOne();\n\n}",
"@FunctionalInterface\npublic interface Line {\n\n int line(int m, int x, int c);\n\n default void eq() {\n\n }\n}",
"@FunctionalInterface\ninterface Payment{\n\tvoid pay(int amount);\n}",
"public interface se {\n void a(List<POI> list);\n\n boolean a();\n\n void b();\n\n boolean c();\n\n List<POI> d();\n\n POI e();\n\n POI f();\n}",
"public interface U {\n void f1();\n void f2();\n void f3();\n}",
"private interface IPsi {\n public double f(int n);\n }",
"private interface FilterFunction\n\t{\n\t\tpublic Boolean filter(Review review);\n\t}",
"@FunctionalInterface\ninterface Foo {\n //TODO try to comment the next line\n void method(String string);\n\n //TODO try to create another abstract method\n// void method2(String string);\n //TODO try to create a default method\n default void method3(String string)\n {\n System.out.println(string);\n }\n //TODO create another functional interface and try to extend this one\n\n //TODO create an empty interface and extend this one\n}",
"public interface Functie {\n public int add(int a, int b);\n}",
"public abstract void operation();",
"public interface RequestFunction {}",
"@FunctionalInterface\npublic interface ReaderInterface {\n //void read(Book b);\n\n //default void unread(Book b) {}\n\n void unread(Book b);\n default void read(Book b) {}\n\n}",
"public interface FitnessCalc1 {\n public double utilityFunction(Individual X);\n public double function(double x, Individual X);\n}",
"@FunctionalInterface\npublic interface MyFunctionalInterface {\n\n // abstract method\n int addMethod(int val1, int val2);\n\n}",
"@FunctionalInterface\npublic interface Functional_Interface {\n\t\n\tpublic void printMessage(String message);\n\t\n\tdefault void printDefaultMessage(String defaultMessage)\n\t{\n\t\tSystem.out.println(\"This is default message\"+\" \"+defaultMessage);\n\t}\n\t\n\tstatic void printStaticMessage(String staticMessage)\n\t{\n\t\tSystem.out.println(\"This is static message\"+\" \"+staticMessage);\n\t}\n\t\n\n}",
"public interface Function<IN, OUT> {\n\n /**\n * Compute the result of applying the function to the input argument\n *\n * @param in the input object\n * @return the function result\n */\n OUT apply( IN in );\n\n}",
"@FunctionalInterface\npublic interface DogQuerier {\n public boolean test(Dog dog);\n}",
"@FunctionalInterface\n public interface PReturn {\n\n //functional interfaces: one abstract method, as many instance or static methods as you'd like.\n public int returnInt(int x);\n //public abstract int returnInt2(String x);\n\n //new to java 8: default methods (cannot be used with @FunctionalInterfaces\n //public default int returnInt(int x) { return x; }\n\n //new to java 8: static methods now in interfaces\n public static boolean isIReturn(Object obj) { return obj instanceof IReturn; }\n}",
"interface A {\n int summ(int x, int y);\n}",
"@FunctionalInterface\npublic interface FISample {\n\n void toLowerCase(String v);\n\n default String toUpperCase(String value) {\n return value.toUpperCase();\n }\n}",
"interface MyFunctionalInterface {\n\tpublic void execute();\n\n\tpublic default void print(String text) {\n\t\tSystem.out.println(text);\n\t}\n\n\tpublic static void print(String text, PrintWriter writer) throws IOException {\n\t\twriter.write(text);\n\t}\n}",
"public interface Service {\n void method1();\n void method2();\n}",
"interface U {\n public void A() ;\n public void B() ;\n public void C() ;\n}",
"public interface SampleA {\n void operation1();\n void operation2();\n}",
"public interface Operation {\n int operate(int args1, int args2);\n}",
"public void implementFunctionalInterface1() {\n\t\tSystem.out.println(\"\\n\\n************Implement Functional Interfaces - 1**********\");\n\t\tMyFunctionalInterface lambda = () -> System.out.println(\"Executing...\");\n\t\tlambda.execute();\n\t}",
"public interface Function1<A,B> {\n\tB apply(A a);\n}",
"abstract void method();",
"public interface _t<FROM, TO> {\n\tTO call(FROM f, int index, Iterable<FROM> list);\n}",
"public void implementFunctionalInterface2() {\n\t\tSystem.out.println(\"\\n\\n************Implement Functional Interfaces - 2**********\");\n\t\t// Functional Interface Implementations:\n\t\tMathOperation addition = (int a, int b) -> a + b;\n\t\t// without type declaration - Type is optional in lambda expression\n\t\tMathOperation subtraction = (a, b) -> a - b;\n\t\t// Curly braces are mandatory when you use the return statement\n\t\tMathOperation multiplication = (int a, int b) -> {\n\t\t\treturn a * b;\n\t\t};\n\t\tMathOperation division = (a, b) -> a / b;\n\n\t\t// Method Calls:\n\t\tSystem.out.println(\"10 + 5 = \" + addition.operation(10, 5));\n\t\tSystem.out.println(\"10 - 5 = \" + subtraction.operation(10, 5));\n\t\tSystem.out.println(\"10 x 5 = \" + multiplication.operation(10, 5));\n\t\tSystem.out.println(\"10 / 5 = \" + division.operation(10, 5));\n\t}",
"public interface IService {\n void methodA();\n void methodB();\n void methodC();\n}",
"public interface IFunctionService extends IBaseService<Function, Long> {\r\n\r\n\r\n}",
"interface Interface{\n\tObject call(Object value);\n}",
"@FunctionalInterface\npublic interface MyFunc {\n\n public String getValue(String str);\n}",
"public interface i {\n int a();\n\n boolean b();\n\n void c();\n}",
"public interface IntFunc {\n int apply(int input);\n}",
"public interface g {\n void a(int i, String str, boolean z);\n\n boolean a();\n\n void b();\n}",
"public interface IPresenterHienThiSanPhamTheoDanhMuc {\n void LayDanhSachSP_theoMaLoai(int masp,boolean kiemtra);\n}",
"public interface c {\n String a(String str);\n}",
"public interface Function {\n double f(double x);\n}",
"public interface Function {\n double f(double x);\n}",
"interface IPred<T> {\n public boolean apply(T t);\n}",
"public interface afj {\n afh a();\n\n afi b();\n}",
"interface M1 {\n\t\t void s1();\n\t\t void s2();\n\t}",
"public interface IInteractorOperations {\n\n String concatenarNombre(String nombres, String apellidos);\n int calcularEdad(String fechaNacimiento);\n}",
"@FunctionalInterface\ninterface Functional {\n String goodbye(String arg);\n}",
"public interface ICommonAction {\n\n void obtainData(Object data, String methodIndex, int status,Map<String, String> parameterMap);\n\n\n}",
"abstract Function get(Object arg);",
"@FunctionalInterface\r\npublic interface Command {\r\n\tpublic void execute();\r\n}",
"interface Squarer{ \n\t public int square(int a); \n\t}",
"@FunctionalInterface\r\npublic interface ClientViewNotify {\r\n\t\r\n\t/**\r\n\t * Updates the ClientView invoking the appropriate method according to the incoming notify\r\n\t * @param view\r\n\t */\r\n\tpublic void updateView(ClientView view);\r\n\r\n}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public interface Func<T, R> {\n R call(T t);\n}",
"@FunctionalInterface\npublic interface QuadFunction<P1, P2, P3, P4, R> extends MethodFinder {\n\n R apply(P1 p1, P2 p2, P3 p3, P4 p4);\n\n}",
"public interface GiveGift {\n\n void give1();\n void give2();\n void give3();\n}",
"public interface A {\n void f();\n}",
"@FunctionalInterface\npublic interface Subtrac {\n\n Double substrac (Double a, Double b);\n}",
"public interface a {\n void a();\n }",
"public interface a {\n void a();\n }",
"public interface f {\n void a();\n}",
"public interface MyFunc {\n int func(int n);\n}",
"interface A9 {\r\n void test(int i, String s1); //test method is taking some argument\r\n}",
"public interface FlyBehevour {\n void fly();\n}",
"interface ccf {\n void a();\n}",
"public interface Calculate {\n int add(int a, int b);\n}",
"public interface TimeFunctionRequester {\n void function();\n}",
"public interface i\n{\n\n public abstract void a(long l, a a1);\n}",
"public static void main(String[] args) {\n\n CompareInterface compareInterface = (i1,i2)->{\n if(i1>i2)\n return true;\n else\n return false;\n\n };\n System.out.println(compareInterface.iCompare(10,20));\n\n//(2) Increment the number by 1 and return incremented value Parameter (int) Return int\n IncrementInterface incrementInterface =(i1)->{\n return i1+=1;\n };\n System.out.println(\"Incremented Value : \"+incrementInterface.increament( 10));\n\n//(3) Concatination of 2 string Parameter (String , String ) Return (String)\n ConcatInterface concatInterface = (String::concat);\n System.out.println(\"Concatinated String : \"+ concatInterface.concat(\"Helo \", \"World\"));\n\n//(4) Convert a string to uppercase and return . Parameter (String) Return (String)\n ToUpperCaseInterface toUpperCaseInterface = (String::toUpperCase);\n System.out.println(toUpperCaseInterface.toUpperCase(\"aakash sinha\"));\n }",
"public interface IFlyAminal {\n void fly();\n}",
"public abstract void call();",
"public void apply();",
"public void apply();",
"public void apply();",
"public void callit();",
"public interface ch\n{\n\n public abstract void a(bv bv, p p, h h, long l, int i, int j, \n IMediaItem imediaitem);\n}",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"public interface GeneFunctions {\n /**\n * Metoda zwraca randomowy gen\n * \n * @return randomowy gen\n */\n public int randomGene();\n\n /**\n * Metoda mutuje gen i zwraca go\n * \n * @param gene\n * gen\n * @return zmutowany gen\n */\n public int mutateGene(int gene);\n}",
"@Override\n\tpublic void function() {\n\t\t\n\t}",
"public interface Hello{\n String res(String paramString) ;\n}",
"public interface a {\n void a(int i, List<String> list, boolean z, long j, String str, String str2, String str3);\n }",
"@FunctionalInterface\ninterface CircleMeasurement {\n /**\n *\n * @param radius circle radius\n * @return the value of circle measure\n */\n double value(double radius);\n}",
"@FunctionalInterface\npublic interface MyFunctional01 {\n\tvoid method();\n\t// Error:(7, 1) java: Unexpected @FunctionalInterface annotation\n\t// ru.demi.java_examples.java_8.MyFunctional01 is not a functional interface\n\t// multiple non-overriding abstract methods found in interface ru.demi.java_examples.java_8.MyFunctional01\n\t// void method02();\n}",
"@FunctionalInterface\npublic interface FunctionalListPage {\n\n List<PageData> getListPage(Page p) throws Exception;\n}",
"public interface Emitter extends UnaryVoidFunction<MethodVisitor> {\n }",
"public interface TransformFunc<FROM, TO>\r\n{\r\n TO transform(FROM source);\r\n}",
"public interface Operation {\n}",
"public interface m {\n void a(boolean z);\n}",
"@FunctionalInterface\r\npublic interface DoubleApplier extends Serializable {\r\n\t\r\n\t/**\r\n\t * Applies an operation to a double.\r\n\t * \r\n\t * @param a input\r\n\t * @return result\r\n\t */\r\n\tdouble apply(final double a);\r\n}",
"@FunctionalInterface\npublic interface FuncInterface<T> {\n T m(T t);\n //重新定义Object中的toString方法\n String toString();\n}",
"public interface Operation {\n String description();\n void command();\n}",
"public abstract void method1();",
"interface a {\n int aadd();\n int sub();\n}",
"interface IFly {\n void fly();\n}",
"public interface Function<T, R> {\n\n /**\n * Applies this function to the given argument.\n *\n * @param t the function argument\n * @return the function result\n */\n R apply(T t);\n}",
"public interface BinaryFunction<T1, T2, R> {\n\n\t/**\n\t * Invoke the function.\n\t * @param arg1 The first argument.\n\t * @param arg2 The second argument.\n\t * @return The result of the function.\n\t */\n\tpublic R invoke(T1 arg1, T2 arg2);\n\t\n}",
"public interface SimpleInterface {\n String interfaceMethod(Integer value);\n}",
"public interface Employee{\n\n void takeCall();\n void endCall();\n}",
"@Override\n\tpublic void one() {\n\t\t\n\t}"
] | [
"0.74363744",
"0.7085697",
"0.70089453",
"0.6658784",
"0.66296613",
"0.66148335",
"0.6484289",
"0.6408373",
"0.64043444",
"0.6365112",
"0.63544446",
"0.63384616",
"0.63341993",
"0.63336605",
"0.6318386",
"0.62937903",
"0.62665445",
"0.6264772",
"0.6263576",
"0.6230613",
"0.6228266",
"0.62101954",
"0.6208102",
"0.6194468",
"0.6193644",
"0.6187663",
"0.61793745",
"0.61677384",
"0.61349577",
"0.6124949",
"0.6123371",
"0.61206734",
"0.6115813",
"0.60869926",
"0.608323",
"0.60674334",
"0.6048732",
"0.6027726",
"0.6027548",
"0.6026246",
"0.6016886",
"0.6015028",
"0.6015028",
"0.6010269",
"0.600291",
"0.6001122",
"0.599396",
"0.5982629",
"0.59808445",
"0.5976249",
"0.59737265",
"0.597012",
"0.5968802",
"0.59680015",
"0.59680015",
"0.5964055",
"0.5963112",
"0.59539694",
"0.59515375",
"0.5948453",
"0.5944603",
"0.5944603",
"0.5941226",
"0.5940911",
"0.59370553",
"0.5927379",
"0.59224063",
"0.5914855",
"0.5914825",
"0.5912148",
"0.5910859",
"0.5910528",
"0.59055597",
"0.5899929",
"0.5899929",
"0.5899929",
"0.5898179",
"0.58955765",
"0.58952785",
"0.58916104",
"0.58898604",
"0.5888827",
"0.5887702",
"0.5875919",
"0.5875334",
"0.5875051",
"0.5874733",
"0.58691835",
"0.5866566",
"0.5865221",
"0.5861121",
"0.58597094",
"0.58476114",
"0.58464986",
"0.5841924",
"0.58412373",
"0.58405745",
"0.584039",
"0.5835217",
"0.5833808",
"0.5829011"
] | 0.0 | -1 |
To check before current day | public int isHistoryExist() {
int count = 0;
String selectCount = "SELECT COUNT * FROM" + DATA_TABLE
+ "WHERE" + Columns.DATE + " < DATE('NOW','LOCALTIME','START OF DAY')";
Cursor c = getReadableDatabase().rawQuery(selectCount, null);
if (c.getCount() > 0) {
c.moveToFirst();
count = c.getColumnIndex(Columns.DATE);
}
c.close();
return count;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean checkDate(){\n Calendar c = Calendar.getInstance();\n Date currentDate = new Date(c.get(Calendar.DAY_OF_MONTH),c.get(Calendar.MONTH)+1, c.get(Calendar.YEAR));\n return (isEqualOther(currentDate) || !isEarlyThanOther(currentDate));\n\n }",
"public static void playgroundForTime(){\n\t\tLocalDate localDate = LocalDate.of(2013, 4, 25);\r\n\t\tSystem.out.println(localDate.now().isBefore(localDate));\r\n\t\t\r\n\t}",
"boolean hasFromDay();",
"public boolean isBeforeNow() {\r\n return isBefore(DateTimeUtils.currentTimeMillis());\r\n }",
"boolean hasDeliveryDateBefore();",
"public boolean isBefore(@NonNull final CalendarDay other) {\n return date.isBefore(other.getDate());\n }",
"public static boolean before(Date target, Date date){\n Calendar cal1 = Calendar.getInstance();\n cal1.setTime(target);\n\n Calendar cal2 = Calendar.getInstance();\n cal2.setTime(date);\n\n if(cal1.compareTo(cal2) == -1) return true;\n return false;\n }",
"public static boolean checkDate(LocalDate birthDate, LocalDate currentDate) {\n if(birthDate.isBefore(currentDate)){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }",
"private boolean compareWithCurrentDate(LocalDateTime deadline, LocalDateTime assignDate, boolean isLessThanDay) {\n boolean isReadyToNotify=false;\n if(isLessThanDay){\n if(deadline.until(LocalDateTime.now(),HOURS)==HALF_A_DAY){\n isReadyToNotify=true;\n }\n }else{\n // if this time is the mean of deadline and assign date\n if(deadline.until(LocalDateTime.now(),HOURS) == deadline.until(assignDate,HOURS)/2){\n isReadyToNotify=true;\n }\n }\n return isReadyToNotify;\n }",
"public static void before0(){\n Calendar class0 = Calendar.getInstance();\n class0.set(2019,1,2,3,4,5);\n Calendar when = Calendar.getInstance();\n when.set(2019,1,2,3,4,6);\n boolean ret0 = class0.before(when);\n assert(class0.get(Calendar.YEAR)==2019);\n assert(class0.get(Calendar.MONTH)==1);\n assert(class0.get(Calendar.DATE)==2);\n assert(class0.get(Calendar.HOUR_OF_DAY)==3);\n assert(class0.get(Calendar.MINUTE)==4);\n assert(class0.get(Calendar.SECOND)==5);\n assert(when.get(Calendar.YEAR)==2019);\n assert(when.get(Calendar.MONTH)==1);\n assert(when.get(Calendar.DATE)==2);\n assert(when.get(Calendar.HOUR_OF_DAY)==3);\n assert(when.get(Calendar.MINUTE)==4);\n assert(when.get(Calendar.SECOND)==6);\n assert(ret0==true);\n System.out.println(ret0);\n }",
"public static void before1(){\n Calendar class0 = Calendar.getInstance();\n class0.set(2019,1,2,3,4,5);\n Calendar when = Calendar.getInstance();\n when.set(2019,1,2,3,4,5);\n boolean ret0 = class0.before(when);\n assert(class0.get(Calendar.YEAR)==2019);\n assert(class0.get(Calendar.MONTH)==1);\n assert(class0.get(Calendar.DATE)==2);\n assert(class0.get(Calendar.HOUR_OF_DAY)==3);\n assert(class0.get(Calendar.MINUTE)==4);\n assert(class0.get(Calendar.SECOND)==5);\n assert(when.get(Calendar.YEAR)==2019);\n assert(when.get(Calendar.MONTH)==1);\n assert(when.get(Calendar.DATE)==2);\n assert(when.get(Calendar.HOUR_OF_DAY)==3);\n assert(when.get(Calendar.MINUTE)==4);\n assert(when.get(Calendar.SECOND)==5);\n assert(ret0==false);\n System.out.println(ret0);\n }",
"private boolean isToday(Calendar currentCal){\n return currentCal.get(Calendar.DATE) == Calendar.getInstance().get(Calendar.DATE)\n && currentCal.get(Calendar.MONTH) == Calendar.getInstance().get(Calendar.MONTH)\n && currentCal.get(Calendar.YEAR) == Calendar.getInstance().get(Calendar.YEAR);\n }",
"public boolean isBefore(Date that) {\n return compareTo(that) < 0;\n }",
"public boolean checkCurrentDate()\n {\n boolean valid = this.check();\n if(!valid) return valid;\n\n try{\n\n date = DateHelper.stringToDate(this.getDateString());\n if(super.isMandatory() && date==null)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n }\n catch (Exception e)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n\n if (date != null\n &&\n (date.after(currentDate) || date.equals(currentDate)))\n {\n super.clearMessage();\n super.setMessage(FacesHelper.getBundleMessage(\"date_after_current\"));\n\n return valid && false;\n }\n return valid;\n }",
"public boolean checkFutureOrCurrentDate()\n {\n boolean valid = this.check();\n try{\n\n date = DateHelper.stringToDate(this.getDateString());\n if(super.isMandatory() && date==null)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n }\n catch (Exception e)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n if (date != null\n &&\n (date.before(currentDate)))\n {\n super.clearMessage();\n super.setMessage(\"Date should be in future or in present date!\");\n\n return valid && false;\n }\n return valid;\n\n }",
"public boolean isBefore(Date date)\n {\n return isBefore(new SpentOn(date));\n }",
"public void verifyDate(){\n\n // currentDateandTime dataSingleton.getDay().getDate();\n\n }",
"public boolean isOverdue(int today);",
"public static void before2(){\n Calendar class0 = Calendar.getInstance();\n class0.set(2019,1,2,3,4,5);\n Calendar when = Calendar.getInstance();\n when.set(2019,1,2,3,4,4);\n boolean ret0 = class0.before(when);\n assert(class0.get(Calendar.YEAR)==2019);\n assert(class0.get(Calendar.MONTH)==1);\n assert(class0.get(Calendar.DATE)==2);\n assert(class0.get(Calendar.HOUR_OF_DAY)==3);\n assert(class0.get(Calendar.MINUTE)==4);\n assert(class0.get(Calendar.SECOND)==5);\n assert(when.get(Calendar.YEAR)==2019);\n assert(when.get(Calendar.MONTH)==1);\n assert(when.get(Calendar.DATE)==2);\n assert(when.get(Calendar.HOUR_OF_DAY)==3);\n assert(when.get(Calendar.MINUTE)==4);\n assert(when.get(Calendar.SECOND)==4);\n assert(ret0==false);\n System.out.println(ret0);\n }",
"private boolean isPast(Calendar currentCal){\n Calendar presentCal = Calendar.getInstance();\n presentCal.set(Calendar.SECOND,59);\n return currentCal.before(presentCal);\n }",
"private Date getYestoday() {\n\t\tDate dNow = new Date(); // 当前时间\n\t\tDate dBefore = new Date();\n\t\tCalendar calendar = Calendar.getInstance(); // 得到日历\n\t\tcalendar.setTime(dNow);// 把当前时间赋给日历\n\t\tcalendar.add(Calendar.DAY_OF_MONTH, -1); // 设置为前一天\n\t\tdBefore = calendar.getTime(); // 得到前一天的时间\n\t\treturn dBefore;\n\t}",
"private boolean hasDateThreshold() {\r\n if (entity.getExpirationDate() == null) {\r\n return false;\r\n }\r\n Calendar calendar = Calendar.getInstance();\r\n calendar.add(Calendar.MONTH, 1);\r\n if (entity.getExpirationDate().before(calendar.getTime())) {\r\n return true;\r\n }\r\n return false;\r\n }",
"public static boolean isBeforeDay(Date date1, Date date2) {\n if (date1 == null || date2 == null) {\n throw new IllegalArgumentException(\"The dates must not be null\");\n }\n Calendar cal1 = Calendar.getInstance();\n cal1.setTime(date1);\n Calendar cal2 = Calendar.getInstance();\n cal2.setTime(date2);\n return isBeforeDay(cal1, cal2);\n }",
"private boolean isToday(Date lectureDate){\n Date now = new Date();\n if(lectureDate.getYear()<now.getYear()|| lectureDate.getYear()>now.getYear()){\n return false;\n }else{\n if(lectureDate.getMonth()<now.getMonth()||(lectureDate.getMonth()>now.getMonth())){\n return false;\n }else{\n if(lectureDate.getDate()<now.getDate()|| lectureDate.getDate()>now.getDate()){\n return false;\n }else{\n return true;\n }\n }\n }\n }",
"public boolean isBefore(Date b) {\r\n\t\treturn compareTo(b) < 0;\r\n\t}",
"public void date_not_before_createdAt_date(FacesContext context, UIComponent comp, Object value) {\n if (charge.getCreatedAt() != null) {\n Date paidAt = (Date) value;\n\n if (paidAt != null) {\n if (paidAt.before(charge.getCreatedAt())) {\n FacesMessage FMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR, message.translate(\"msg.error\"), message.translate(\"msg.validation.notBeforeCreatedAt\"));\n throw new ValidatorException(FMessage);\n }\n }\n }\n }",
"boolean IFbefore(Date day1, int ID1, Date day2, int ID2){\n if (day1.compareTo(day2) < 0) return true;\n if (day1.compareTo(day2) > 0) return false;\n if (ID1 < ID2) return true;\n return false;\n }",
"@Test\r\n public void testIsExpiredToday_ExpirationDateToday_ExpirationDateEarlierTime() {\r\n doTest(TEST_DATE_2_TODAY, TEST_DATE_1_TODAY, false);\r\n }",
"public static void main(String[] args) throws ParseException {\n String pattern = \"yyyy-MM-dd HH:mm:ss\";\n SimpleDateFormat sf = new SimpleDateFormat(pattern);\n Date yesterday = sf.parse(\"2016-12-11 23:59:59\");\n Date todayBegin = sf.parse(\"2016-12-12 00:00:00\");\n Date today1 = sf.parse(\"2016-12-12 00:00:01\");\n Date todayend = sf.parse(\"2016-12-12 23:23:59\");\n\n System.out.println(sf.format(yesterday) + \" is before \" + sf.format(todayBegin) + \":\" + yesterday.before(todayBegin));\n System.out.println(sf.format(todayBegin) + \" is before \" + sf.format(today1) + \":\" + todayBegin.before(today1));\n System.out.println(sf.format(todayBegin) + \" is before \" + sf.format(todayend) + \":\" + todayBegin.before(todayend));\n System.out.println(sf.format(today1) + \" is before \" + sf.format(todayend) + \":\" + today1.before(todayend));\n }",
"public boolean hasFromDay() {\n return fromDay_ != null;\n }",
"@Description(\"request was sent before {date}\")\n public static Criteria<HarEntry> recordedStartedDateTimeBefore(@DescriptionFragment(\"date\") Date date) {\n checkArgument(nonNull(date), \"Date should be defined\");\n\n return condition(entry -> {\n Date startedDateTime = entry.getStartedDateTime();\n\n return startedDateTime.before(date);\n });\n }",
"private void checksOldExpense() {\n DateUtils dateUtils = new DateUtils();\n\n // Breaking date string from date base\n String[] expenseDate = dateDue.getText().toString().split(\"-\");\n\n if((Integer.parseInt(expenseDate[GET_MONTH]) < Integer.parseInt(dateUtils.currentMonth))\n && (Integer.parseInt(expenseDate[GET_YEAR]) <= Integer.parseInt(dateUtils.currentYear))){\n\n }\n }",
"@Test\n public void testYesterdayOrBetterComparision() {\n Calendar quietAllowedForFeature = Calendar.getInstance(TimeZone.getTimeZone(\"America/Chicago\"));\n quietAllowedForFeature.setTimeInMillis(DateHelper.MILLIS_PER_DAY * 2);\n // midnight 'now' user local time\n quietAllowedForFeature = DateHelper.asDay(quietAllowedForFeature);\n // midnight day before user local time\n quietAllowedForFeature.add(Calendar.DATE, -1); //1 days quiet ok; add this as per feature setting?\n // last rec'd as user local time\n Date userLastMessageReceived = new Date(DateHelper.MILLIS_PER_DAY * 3);\n // if any messages from module after midnight yesterday (any messages yesterday or newer)\n //System.out.println(quietAllowedForFeature);\n //System.out.println(userLastMessageReceived);\n assertTrue(userLastMessageReceived.after(quietAllowedForFeature.getTime()));\n }",
"public Date getValidFrom();",
"public void checkDate() throws InvalidDateException {\n Date todayDate = new Date();\n if (!todayDate.after(date)) {\n throw new InvalidDateException(\"Date is from the future!\");\n }\n }",
"boolean hasToDay();",
"public boolean isBefore(AbsTime refEpoch)\n {\n // The result to return\n boolean res;\n\n // Check for special values.\n if (isASAP()) {\n // ASAP is before any other time, except ASAP.\n if (refEpoch.isASAP()) {\n res = false;\n } else {\n res = true;\n }\n } else if (isNEVER()) {\n // NEVER is after any other time, except NEVER.\n res = false;\n } else if (refEpoch.isASAP()) {\n // No time is before ASAP, including ASAP.\n res = false;\n } else if (refEpoch.isNEVER()) {\n // Any time is before NEVER, except NEVER, which is taken care\n // of above.\n res = true;\n } else {\n // Do the comparison.\n res = (itsValue < refEpoch.itsValue);\n }\n\n return res;\n }",
"public boolean isToday()\n {\n Calendar todayCalendar = Calendar.getInstance();\n\n return (calendar.get(Calendar.YEAR ) == todayCalendar.get(Calendar.YEAR ))\n && (calendar.get(Calendar.MONTH ) == todayCalendar.get(Calendar.MONTH ))\n && (calendar.get(Calendar.DAY_OF_MONTH) == todayCalendar.get(Calendar.DAY_OF_MONTH));\n }",
"public boolean isBefore(Date date2)\n {\n if (year < date2.year)\n return true;\n else if (year == date2.year && month < date2.month)\n return true;\n else if (year == date2.year && month == date2.month && day < date2.day)\n return true;\n else if (year == date2.year && month == date2.month && day == date2.day\n && hour < date2.hour)\n return true;\n else if (year == date2.year && month == date2.month && day == date2.day\n && hour == date2.hour && minute < date2.minute)\n return true;\n else\n return false;\n }",
"public boolean checkPastDate(boolean said)\n {\n try\n {\n if( date==null ){\n if(this.getDateString()!=null) date = DateHelper.stringToDate(this.getDateString());\n if(super.isMandatory() && date==null)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n } }\n\n }\n catch (Exception e)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n if(date==null)\n {\n if(said)\n {\n super.setMessage(\"Date is no correct\");\n }\n return false;\n }\n if(!date.before(currentDate))\n {\n if(said)\n {\n super.setMessage(\"Date is no correct\");\n }\n return false;\n\n }\n else\n {\n return true;\n }\n }",
"public boolean isBefore(Date d2)\r\n\t{\r\n\t\tint ret = this.compareTo(d2);\r\n\t\treturn ret < 0;\r\n\t}",
"@Test\r\n public void testIsExpiredToday_ExpirationDateYesterday() {\r\n doTest(TEST_DATE_2_YESTERDAY, TEST_DATE_1_TODAY, true);\r\n }",
"public boolean getNedlukket(){\n return datoForNedlukning.isBefore(LocalDate.now());\n }",
"public boolean isFirstOfTheDay() {\r\n return !strDate.equals(game.settings.getLastSeen());\r\n }",
"public boolean isBefore(MonthDay other) {\n if(month < other.month) {\n return true;\n } else if(month == other.month && day < other.day) {\n return true;\n } else {\n return false;\n }\n }",
"public static boolean isRemoteBeforeTimeValid(long before, long now) {\n return before - CLOCK_SKEW_TIME <= now;\n }",
"public static boolean notInFuture(Date data) {\r\n if (data != null) {\r\n return data.before(new Date());\r\n }\r\n return false;\r\n }",
"Date getCheckedIn();",
"boolean hasStartDate();",
"public boolean checkTimeInPast() throws ParseException {\n LocalTime ltnow = LocalTime.now();\n if(b_startTime != null && checkDateIsToday()){\n LocalTime ltstart = b_startTime.toInstant().atZone(ZoneId.systemDefault()).toLocalTime();\n return ltstart.isBefore(ltnow);\n }else{\n return false;\n }\n }",
"Date getPriorDate();",
"public boolean isBefore(SpentOn spentOn)\n {\n return ( (calendar.get(Calendar.YEAR) < spentOn.calendar.get(Calendar.YEAR))\n )\n || ( (calendar.get(Calendar.YEAR) == spentOn.calendar.get(Calendar.YEAR))\n && (calendar.get(Calendar.MONTH) < spentOn.calendar.get(Calendar.MONTH))\n )\n || ( (calendar.get(Calendar.YEAR) == spentOn.calendar.get(Calendar.YEAR))\n && (calendar.get(Calendar.MONTH) == spentOn.calendar.get(Calendar.MONTH))\n && (calendar.get(Calendar.DAY_OF_MONTH) < spentOn.calendar.get(Calendar.DAY_OF_MONTH))\n );\n }",
"public boolean checkReservationDateFromToday(String resMonth, String resDay, String resYear){\n int daysDiff,monthDiff,yearDiff; //date difference\n int monthToday,dayToday,yearToday; //date today\n int monthReserved,dayReserved,yearReserved; //date of reservation\n \n //date of reservation\n String sMonth,sDay,sYear;\n sMonth = resMonth;\n sDay = resDay;\n sYear = resYear;\n \n getCurrentDate(); //call to get current date\n \n boolean dateValid = false;\n sMonth = convertMonthToDigit(sMonth); //convert string month to string number\n \n monthToday = parseInt(month);\n dayToday = parseInt(day);\n yearToday = parseInt(year);\n \n //convert to integer\n monthReserved = parseInt(sMonth);\n dayReserved = parseInt(sDay);\n yearReserved = parseInt(sYear);\n \n //get the difference\n monthDiff = monthReserved - monthToday;\n daysDiff = dayReserved - dayToday;\n yearDiff = yearReserved - yearToday;\n \n System.out.println(\"startMonth: \"+ sMonth);\n System.out.println(\"yearDiff: \" + yearDiff);\n System.out.println(\"daysDiff: \" + daysDiff);\n System.out.println(\"monthDiff: \" + monthDiff);\n \n if(yearDiff > 0){ //next year\n return true;\n }\n \n if(yearDiff == 0){ //this year\n if(monthDiff >= 0){\n if(monthDiff == 0 && daysDiff == 0){ //cannot reserve room on the day\n //invalid day, the date is today\n dateValid = false;\n System.out.println(\"reservation day must not today.\");\n }else if(monthDiff==0 && daysDiff < 0){ // same month today, invalid day diff\n dateValid = false; \n System.out.println(\"reservation day must not in the past\");\n }else if(monthDiff>0 && daysDiff < 0){ //not the same month today, accept negative day diff\n dateValid = true;\n }else{ //the same month and valid future day\n dateValid = true;\n }\n }else{\n //invalid month\n System.out.println(\"reservation month must not in the past.\");\n }\n }else{\n //invalid year\n System.out.println(\"reservation year must not in the past.\");\n }\n \n return dateValid;\n }",
"public static final Function<Date,Boolean> before(final Date date) {\r\n return new Before(date);\r\n }",
"public void goToToday() {\n goToDate(today());\n }",
"public int getToday() {\n \treturn 0;\n }",
"private boolean checkdates(java.util.Date date,java.util.Date date2)\n\t{\n\t\tif (date==null||date2==null) return true;\n\t\tif (!date.after(date2)&&!date.before(date2))return true;\n\t\treturn date.before(date2);\n\t}",
"@Factory\r\n\tpublic static Matcher<Date> sameOrBefore(final Date date) {\r\n\t\treturn anyOf(sameInstant(date), before(date));\r\n\t}",
"public int compareWithToday() {\r\n return this.compare(HISDate.getToday());\r\n }",
"boolean isSetFoundingDate();",
"boolean hasBeginDate();",
"public Date getNextCheckDate(Date now)\r\n\t{\r\n\t\tsetTime(now);\r\n\r\n\t\tswitch (type)\r\n\t\t{\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_MINUTE:\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.MINUTE, 1);\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_HOUR:\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.HOUR_OF_DAY, 1);\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.HALF_DAY:\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tint hour = get(Calendar.HOUR_OF_DAY);\r\n\t\t\tif (hour < 12)\r\n\t\t\t{\r\n\t\t\t\tset(Calendar.HOUR_OF_DAY, 12);\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\tset(Calendar.HOUR_OF_DAY, 0);\r\n\t\t\t\tadd(Calendar.DAY_OF_MONTH, 1);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_DAY:\r\n\t\t\tset(Calendar.HOUR_OF_DAY, 0);\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.DATE, 1);\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_WEEK:\r\n\t\t\tset(Calendar.DAY_OF_WEEK, getFirstDayOfWeek());\r\n\t\t\tset(Calendar.HOUR_OF_DAY, 0);\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.WEEK_OF_YEAR, 1);\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_MONTH:\r\n\t\t\tset(Calendar.DATE, 1);\r\n\t\t\tset(Calendar.HOUR_OF_DAY, 0);\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.MONTH, 1);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tthrow new IllegalStateException(\"Unknown periodicity type.\");\r\n\t\t}\r\n\t\treturn getTime();\r\n\t}",
"public boolean validateDate() {\r\n\t\tDate now = new Date();\r\n\t\t// expire date should be in the future\r\n\t\tif (now.compareTo(getExpireDate()) != -1)\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}",
"public boolean checkFutureDate(String message)\n {\n boolean valid = this.check();\n if(!valid) return valid;\n try{\n\n date = DateHelper.stringToDate(this.getDateString());\n if(super.isMandatory() && date==null)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n }\n catch (Exception e)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n if (date != null\n &&\n (date.before(currentDate)|| date.equals(currentDate)))\n {\n super.clearMessage();\n super.setMessage(\"Date should be in future!\");\n\n return valid && false;\n }\n return valid;\n }",
"public boolean checkDate() {\n\t\tboolean cd = checkDate(this.year, this.month, this.day, this.hour);\n\t\treturn cd;\n\t}",
"@Test\r\n public void testIsExpiredToday_ExpirationDateToday_ExpirationDateLaterTime() {\r\n doTest(TEST_DATE_2_TODAY, TEST_DATE_3_TODAY, false);\r\n }",
"public boolean validarFecha(LocalDate fecha) { \n // se comprueba que la fecha sea anterior o igual a la actual\n return fecha.isBefore(LocalDate.now()) || fecha.isEqual(LocalDate.now());\n }",
"boolean hasDate();",
"public static boolean isToday(Date date) {\r\n\t\treturn isSameDay(date, Calendar.getInstance().getTime());\r\n\t}",
"public boolean testStrategyAtDayBefore (StockData sd, int strategyId, int lookBack) {\n\n\t\treturn false;\n\n\t}",
"public static boolean isBeforeDay(Calendar cal1, Calendar cal2) {\n if (cal1 == null || cal2 == null) {\n throw new IllegalArgumentException(\"The dates must not be null\");\n }\n if (cal1.get(Calendar.ERA) < cal2.get(Calendar.ERA)) return true;\n if (cal1.get(Calendar.ERA) > cal2.get(Calendar.ERA)) return false;\n if (cal1.get(Calendar.YEAR) < cal2.get(Calendar.YEAR)) return true;\n if (cal1.get(Calendar.YEAR) > cal2.get(Calendar.YEAR)) return false;\n return cal1.get(Calendar.DAY_OF_YEAR) < cal2.get(Calendar.DAY_OF_YEAR);\n }",
"public boolean wasToday() {\n\t\tlong endInMillis = endTime.getTime();\n\t\tCalendar endTimeDate = Calendar.getInstance();\n\t\tendTimeDate.setTimeInMillis(endInMillis);\n\t\tCalendar today = Calendar.getInstance();\n\t\tif (today.get(Calendar.YEAR) == endTimeDate.get(Calendar.YEAR) && today.get(Calendar.DAY_OF_YEAR) == endTimeDate.get(Calendar.DAY_OF_YEAR)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean validateDate(TradeModel tradeModel)\n {\n int i = tradeModel.getMaturityDate().compareTo(LocalDate.now());\n if (i<0)\n return false;\n else\n return true;\n }",
"@Test\r\n public void testIsExpiredToday_ExpirationDateTomorrow() {\r\n doTest(TEST_DATE_2_TOMORROW, TEST_DATE_1_TODAY, false);\r\n }",
"private Date getPreviosDayStartTime() {\n\t\treturn null;\n\t}",
"public boolean isLower(DateTime dt) {\n return Long.parseLong(this.vStamp) < Long.parseLong(dt.getStamp());\r\n }",
"private boolean isOutdatedDate(LocalDate date) {\n return date.isBefore(LocalDate.now());\n }",
"public boolean isLate(){\n Date d = givenBack != null ? givenBack : new Date();\n return expirationDate.before(d);\n }",
"private Date setDateBefore(int days) {\n Calendar cal = Calendar.getInstance();\n cal.add(Calendar.DATE, -1 * days);\n cal.set(Calendar.HOUR_OF_DAY, 0); //anything 0 - 23\n cal.set(Calendar.MINUTE, 0);\n cal.set(Calendar.SECOND, 0);\n return cal.getTime();\n }",
"public static boolean isToday(java.util.Date date) {\n return isSameDay(date, Calendar.getInstance().getTime());\n }",
"public boolean isBefore(ReadableInstant instant) {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[17]++;\nint CodeCoverConditionCoverageHelper_C5;\r\n if ((((((CodeCoverConditionCoverageHelper_C5 = 0) == 0) || true) && (\n(((CodeCoverConditionCoverageHelper_C5 |= (2)) == 0 || true) &&\n ((instant == null) && \n ((CodeCoverConditionCoverageHelper_C5 |= (1)) == 0 || true)))\n)) && (CodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.conditionCounters[5].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C5, 1) || true)) || (CodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.conditionCounters[5].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C5, 1) && false)) {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.branches[9]++;\r\n return isBeforeNow();\n\r\n } else {\n CodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.branches[10]++;}\r\n return isBefore(instant.getMillis());\r\n }",
"public java.util.Date getNotBefore() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.security.keystore.DelegatingX509Certificate.getNotBefore():java.util.Date, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.security.keystore.DelegatingX509Certificate.getNotBefore():java.util.Date\");\n }",
"@Factory\r\n\tpublic static Matcher<Date> sameOrBefore(final DayMonthYear date) {\r\n\t\treturn anyOf(sameDay(date), before(date));\r\n\t}",
"public boolean runsOn( GTFSDate date ) {\n\t\tif( date.before( this.start_date) ) {\n\t\t\tthrow new DateOutOfBoundsException( date+\" is before period start \"+this.start_date );\n\t\t}\n\t\tif( date.after( this.end_date) ) {\n\t\t\tthrow new DateOutOfBoundsException( date+\" is after period end \"+this.end_date );\n\t\t}\n\t\t\n\t\t//Return false if service is canceled on this day; true of it specifically runs\n\t\tServiceCalendarDate exception = this.getServiceCalendarDate(date);\n\t\tif(exception != null) {\n\t\t\tif( exception.exception_type.intValue() == ServiceCalendarDateExceptionType.ADDED ) {\n\t\t\t\treturn true;\n\t\t\t} else if( exception.exception_type.intValue() == ServiceCalendarDateExceptionType.REMOVED ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Return true if it runs on today's DOW\n\t\tGregorianCalendar cal = new GregorianCalendar(date.year,date.month-1,date.day);\n\t\tint dow = cal.get(GregorianCalendar.DAY_OF_WEEK);\n\t\tif((dow==GregorianCalendar.MONDAY && this.monday.val ) ||\n\t\t (dow==GregorianCalendar.TUESDAY && this.tuesday.val ) ||\n\t\t (dow==GregorianCalendar.WEDNESDAY && this.wednesday.val) ||\n\t\t (dow==GregorianCalendar.THURSDAY && this.thursday.val ) ||\n\t\t (dow==GregorianCalendar.FRIDAY && this.friday.val ) ||\n\t\t (dow==GregorianCalendar.SATURDAY && this.saturday.val ) ||\n\t\t (dow==GregorianCalendar.SUNDAY && this.sunday.val )) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"boolean hasContinuousDay();",
"boolean hasDay();",
"boolean hasDay();",
"private boolean checkIfHabitDoneToday() {\n ArrayList<HabitEvent> eventList = habit_type.getHabitEvents();\n Locale locale = new Locale(\"English\", \"Canada\");\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"EEEE',' MMMM d',' yyyy\", locale);\n String currentDate = simpleDateFormat.format(new Date());\n Calendar calendar = Calendar.getInstance();\n int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);\n if (dayOfWeek == 1) {\n dayOfWeek = 8;\n }\n if (!habit_type.getWeeklyPlan()[dayOfWeek - 2]) {\n return true;\n }\n for (HabitEvent event : eventList) {\n if (currentDate.equals(event.getCompletionDateString())) {\n return true;\n }\n }\n return false;\n }",
"public boolean isBefore(Group3Date b) {\n\t\t\treturn compareTo(b) < 0;\n\t\t}",
"boolean isSetDate();",
"public static void isValidDate(LocalDate date) throws ValidationException {\n\t\tLocalDate today = LocalDate.now();\n\t\tif (date.isBefore(today)) {\n\t\t\tthrow new ValidationException(\"Date cannot be past date\");\n\t\t}\n\t}",
"public boolean hasFromDay() {\n return fromDayBuilder_ != null || fromDay_ != null;\n }",
"private boolean checkValidDay() {\n return numDays >= 0 && numDays <= 7;\n }",
"public boolean isBefore(final String date1, final String date2) {\n return compare(date1, date2) < 0;\n }",
"private boolean isNewDay(Calendar calDate) {\n\t\tif (days.size() == 0)\r\n\t\t\treturn true;\r\n\r\n\t\t// get the last day entry\r\n\t\tDay day = days.get(days.size() - 1);\r\n\r\n\t\t// we have a new day if\r\n\t\t// 1a. the previous day was different OR\r\n\t\t// 1b. the previous day last entry was before the day begins AND\r\n\t\t// 2. if the time is after a certain hour (i.e. 4 a.m.) AND\r\n\t\t// 3. more then X number of hours have passed since anything changed\r\n\t\tif (calDate.get(Calendar.HOUR_OF_DAY) > Day.BEGINING_HOUR_OF_DAY\r\n\t\t\t\t&& (day.lastTime.get(Calendar.DAY_OF_YEAR) < calDate.get(Calendar.DAY_OF_YEAR) || day.lastTime\r\n\t\t\t\t\t\t.get(Calendar.HOUR_OF_DAY) < Day.BEGINING_HOUR_OF_DAY)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}",
"public int checkExpiryDate(LocalDate today) {\n\n final int limit = 100;\n long expirationDate = Duration.between(\n this.food.getCreateDate().atTime(0, 0), this.food.getExpiryDate().atTime(0, 0)\n ).toDays();\n long goneDate = Duration.between(\n this.food.getCreateDate().atTime(0, 0), today.atTime(0, 0)\n ).toDays();\n\n return (int) (limit * goneDate / expirationDate);\n\n }",
"@Test\n public void test0() {\n chkDate(\"> '2013'\", true);\n\n }",
"private boolean checkTime(){\n\t\treturn false;\r\n\t}",
"boolean hasOrderByDay();",
"public boolean hasPast();"
] | [
"0.7036067",
"0.70067894",
"0.6894435",
"0.6805271",
"0.6778581",
"0.6588725",
"0.6569387",
"0.6518489",
"0.6500328",
"0.6494263",
"0.6478323",
"0.64299345",
"0.6420058",
"0.63862234",
"0.6366325",
"0.6348187",
"0.6317097",
"0.6302585",
"0.6297255",
"0.6253501",
"0.6242844",
"0.6219226",
"0.6210351",
"0.62097013",
"0.6204012",
"0.61925685",
"0.6184566",
"0.6136319",
"0.6114928",
"0.6093325",
"0.6075601",
"0.6069924",
"0.6066409",
"0.6026845",
"0.60061204",
"0.5965846",
"0.59501207",
"0.5925308",
"0.5918473",
"0.5911543",
"0.59107596",
"0.5905333",
"0.58998704",
"0.5886509",
"0.5886411",
"0.5884095",
"0.5854294",
"0.58502847",
"0.584435",
"0.5840764",
"0.5827441",
"0.5825135",
"0.58158547",
"0.5813373",
"0.58111006",
"0.581015",
"0.5788051",
"0.57858783",
"0.57764953",
"0.5773413",
"0.5763938",
"0.57591826",
"0.57552934",
"0.57441646",
"0.57420254",
"0.57260793",
"0.57248825",
"0.5723688",
"0.57192093",
"0.5715852",
"0.5712594",
"0.57014394",
"0.56965923",
"0.5686898",
"0.56781745",
"0.56701005",
"0.56663954",
"0.5663922",
"0.565768",
"0.56570256",
"0.56566715",
"0.564406",
"0.56411254",
"0.56393796",
"0.56262445",
"0.5611884",
"0.5611884",
"0.56051546",
"0.5604291",
"0.55985904",
"0.5592143",
"0.5589704",
"0.55835664",
"0.5582169",
"0.55797917",
"0.5578889",
"0.5576775",
"0.55693644",
"0.5558488",
"0.55523765"
] | 0.568287 | 74 |
This program demonstrates the binarySearch algorithms. | public static void main(String[] args) {
List<Integer> integers = new ArrayList<>();
for (int i = 0; i < 49; i++) {
integers.add(i);
}
int i = Collections.binarySearch(integers, 20);
System.out.println(i);
System.out.println(integers.get(i));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void testBinarySearch() {\n\t\tint[] arr0 = {0, 1, 2, 3, 4, 5};\n\t\tassertEquals(0, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 0));\n\t\tassertEquals(1, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 1));\n\t\tassertEquals(2, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 2));\n\t\tassertEquals(3, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 3));\n\t\t\n\t\tassertEquals(-1, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 99));\n\t\t\n\t\tint[] arr1 = {0, 43, 209, 388, 401, 599};\n\t\tassertEquals(2, _01_BinarySearch.binarySearch(arr1, 0, arr0.length - 1, 209));\n\t\tassertEquals(-1, _01_BinarySearch.binarySearch(arr1, 0, arr0.length - 1, 45));\n\t}",
"@Test\n public void testBinarySearch() {\n System.out.println(\"binarySearch\");\n int[] index = {10, 11, 12, 13, 14};\n int key = 12;\n int begin = 0;\n int end = 5;\n int expResult = 2;\n int result = Utils.binarySearch(index, key, begin, end);\n assertEquals(expResult, result);\n }",
"@Test\n\tpublic void testBinarySearch() {\n\t\tint[] numbers = {0, 1, 2, 3, 4, 5, 6};\n\t\tint r1 = _01_BinarySearch.binarySearch(numbers, 0, numbers.length - 1, 4);\n\t\tassertEquals(4, r1);\n\t\t\n\t\tint[] numbers2 = {2, 4, 7, 9, 14};\n\t\tint r2 = _01_BinarySearch.binarySearch(numbers2, 0, numbers2.length - 1, 8);\n\t\tassertEquals(-1, r2);\n\t\t\n\t\tint[] numbers3 = {3, 5, 10, 16, 25};\n\t\tint r3 = _01_BinarySearch.binarySearch(numbers3, 0, numbers3.length - 1, 25);\n\t\tassertEquals(4, r3);\n\t\t\n\t}",
"@Test\n public void testBinarySearch() {\n int actualResult = binarySearch.BinarySearch(new int[]{2,4,5}, 5);\n // check if the value is correct\n assertEquals(5, actualResult);\n }",
"public static void main(String args[])\n {\n BinarySerach ob = new BinarySerach();\n int arr[] = { 2, 5, 3, 1, 7, 4 };\n\n\n // Arrays.binarySearch(arr,5);\nArrays.sort(arr);\n System.out.println(Arrays.binarySearch(arr,5));\n Arrays.sort(arr);\n int n = arr.length;\n int x = 5;\n int result = ob.binarySearch(arr, x);\n if (result == -1)\n System.out.println(\"Element not present\");\n else\n System.out.println(\"Element found at \"\n + \"index \" + result);\n }",
"public static void useBinarySearch1() {\n int[] numbers = {-3, 2, 8, 12, 17, 29, 44, 58, 79};\n int index = Arrays.binarySearch(numbers, 29);\n System.out.println(\"29 is found at index \" + index);\n }",
"public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n System.out.println(\"Enter number of elements\");\n int i = sc.nextInt();\n int[] array = new int[i];\n\n\n System.out.println(\"Enter \" + i + \" integers\");\n\n for (int c = 0; c < i; c++) {\n array[c] = sc.nextInt();\n }\n\n System.out.println(\"Enter value to find\");\n int search = sc.nextInt();\n\n MyBinarySearch mbs = new MyBinarySearch();\n Arrays.sort(array);\n System.out.println(search + \" was found at index \" + mbs.binarySearch(array, search) + \" in array \" + Arrays.toString(array));\n\n\n// MyBinarySearch mbs = new MyBinarySearch();\n// int[] arr = {2, 4, 6, 8, 10, 12, 14, 16};\n// System.out.println(\"Key 14's position: \"+mbs.binarySearch(arr, 14));\n// int[] arr1 = {6,34,78,123,432,900};\n// System.out.println(\"Key 432's position: \"+mbs.binarySearch(arr1, 432));\n }",
"@Test\r\n\tpublic void test08_binarySearch() {\r\n\t\tRecursiveMethods rm = new RecursiveMethods();\r\n\r\n\t\tint[] a7 = {};\r\n\t\tassertFalse(rm.binarySearch(a7, 5)); // Search 5 in a7 -> {} False\r\n\r\n\t\tint[] a8 = { 1, 2, 3, 4, 5 };\r\n\t\tassertTrue(rm.binarySearch(a8, 3)); // Search 3 in a8 -> {1,2,3,4,5} ->\r\n\t\t\t\t\t\t\t\t\t\t\t// True\r\n\t\tassertTrue(rm.binarySearch(a8, 1)); // Search 1 in a8 -> {1,2,3,4,5} ->\r\n\t\t\t\t\t\t\t\t\t\t\t// True\r\n\t\tassertTrue(rm.binarySearch(a8, 5)); // Search 5 in a8 -> {1,2,3,4,5} ->\r\n\t\t\t\t\t\t\t\t\t\t\t// True\r\n\t\tassertFalse(rm.binarySearch(a8, 0)); // Search 0 in a8 -> {1,2,3,4,5} ->\r\n\t\t\t\t\t\t\t\t\t\t\t\t// False\r\n\t\tassertFalse(rm.binarySearch(a8, 6)); // Search 6 in a8 -> {1,2,3,4,5} ->\r\n\t\t\t\t\t\t\t\t\t\t\t\t// False\r\n\t}",
"static int binarySearch(@NotNull int[] search, int find) {\n int start, end, midPt;\n start = 0;\n end = search.length - 1;\n\n while (start <= end) {\n midPt = (start + end) / 2;\n if (search[midPt] == find) {\n return midPt;\n } else if (search[midPt] < find) {\n start = midPt + 1;\n } else {\n end = midPt - 1;\n }\n }\n\n return -1;\n }",
"public static void main( String args[] )\n{\n Scanner input = new Scanner( System.in );\n \n int searchInt; // search key\n int position; // location of search key in array\n\n // create array and output it\n BinaryArray searchArray = new BinaryArray( 15 );\n System.out.println( searchArray );\n\n // get input from user\n System.out.print( \n \"Please enter an integer value (-1 to quit): \" );\n searchInt = input.nextInt(); // read an int from user\n System.out.println();\n\n // repeatedly input an integer; -1 terminates the program\n while ( searchInt != -1 )\n {\n // use binary search to try to find integer\n position = searchArray.binarySearch( searchInt );\n\n // return value of -1 indicates integer was not found\n if ( position == -1 )\n System.out.println( \"The integer \" + searchInt + \n \" was not found.\\n\" );\n else\n System.out.println( \"The integer \" + searchInt + \n \" was found in position \" + position + \".\\n\" );\n\n // get input from user\n System.out.print( \n \"Please enter an integer value (-1 to quit): \" );\n searchInt = input.nextInt(); // read an int from user\n System.out.println();\n } // end while\n}",
"static int binarySearchHelp(int[] array, int searched) {\n\t\tint mid = array.length / 2;\r\n\t\tint first = 0;\r\n\t\tint last = array.length - 1;\r\n\r\n\t\twhile (array[mid] != searched && first <= last) {\r\n\t\t\tmid = (first + last) / 2;\r\n\t\t\tif (searched == array[mid]) {\r\n\t\t\t\treturn mid;\r\n\t\t\t}\r\n\t\t\tif (searched < array[mid]) {\r\n\t\t\t\tlast = mid - 1;\r\n\r\n\t\t\t}\r\n\t\t\tif (searched > array[mid]) {\r\n\t\t\t\tfirst = mid + 1;\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn -1;\r\n\t}",
"abstract int binSearch(int[] array, int num, int left, int right);",
"public static void main(String[] args) {\n int[] exampleVariableOne = {1, 11, 24, 34, 67, 89, 102};\n int target = 102;\n binarySearch(exampleVariableOne, target);\n }",
"public int binarySearch(int[] numbers, int numToSearch){\n\n QuickSort quickSort = new QuickSort();\n quickSort.sort(numbers);\n\n //Above code is tightly coupled with either of the algo to be used, we can not manage using sort algo dynamically.\n\n\n // Login to search\n\n //Return the number found\n\n return 5; //returning any hypothetical number\n }",
"public static void main(String[] args) {\n\t\tint a[] = { 2, 3, 5, 6, 9, 10 };\n\t\tBinarySearch bs = new BinarySearch();\n\t\tint indexOne = bs.binarySearchAlgo(a, 0, a.length - 1, 11);\n\t\tSystem.out.println(indexOne);\n\n\t\tint indexTwo = bs.binarySearchAlgo(a, 11);\n\t\tSystem.out.println(indexTwo);\n\n\t\tint array[] = { 0, 3, 10, 10, 10, 10, 20, 25, 26 };\n\t\tint firstOccurrence = bs.firstOccurrence(array, 10);\n\t\tint lastOccurrence = bs.lastOccurrence(array, 10);\n\t\tSystem.out.println(\"First Occurrence \" + firstOccurrence + \" Last Occurrence \" + lastOccurrence);\n\n\t\tint count = bs.countDuplicateNo(array, 10);\n\t\tSystem.out.println(\"Duplicate No \" + count);\n\n\t\tint arratTwo[] = { 11, 20, 25, 30, 40, 45, 10 };\n\t\tint countRotation = bs.countRotation(arratTwo);\n\t\tSystem.out.println(\"count rotation \" + countRotation);\n\t\t\n\t\tint arrayThree[]={8,9,10,11,12,3,4,5};\n\t\tint index = bs.findElement(arrayThree,9);\n\t\tSystem.out.println(\"Element found at \"+index);\n\t}",
"public static int binarySearch(java.util.List arg0, java.lang.Object arg1)\n { return 0; }",
"static int binarySearch(int[] paramArrayOfint, int paramInt1, int paramInt2) {\n }",
"void compareSearch();",
"private int binarySearch(int[] array, int left, int right, int target) {\n\t\tif (left > right) {\n\t\t\treturn -1;\n\t\t}\n\t\twhile (left <= right) {\n\t\t\tint mid = left + (right - left) / 2;\n\t\t\tif (array[mid] == target) {\n\t\t\t\treturn mid;\n\t\t\t} else if (array[mid] < target) {\n\t\t\t\tleft = mid + 1;\n\t\t\t} else {\n\t\t\t\tright = mid - 1;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"int binarySearch(int[] arr, int low, int high, int key){\n while(low <= high){\n int mid = (low + high) / 2;\n if (key < arr[mid])\n high = mid - 1;\n else if (key > arr[mid])\n low = mid + 1;\n else\n return mid;\n }\n return -1;\n }",
"private static int binary_Search(int[] arr, int target) {\n\n\t\tint low = 0;\n\t\tint high = arr.length - 1;\n\n\t\twhile (low <= high) {\n\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tSystem.out.println(\"low = \" + low + \" mid = \" + mid + \" high =\" + high);\n\t\t\tif (arr[mid] == target) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\tif (arr[mid] < target) {\n\t\t\t\tlow = mid + 1;\n\n\t\t\t} else {\n\t\t\t\thigh = mid - 1;\n\t\t\t}\n\n\t\t\t// System.out.println(\"low = \" + low + \" high =\" + high);\n\t\t}\n\t\treturn -1;\n\t}",
"public static void main(String[] args) {\n\n\t\tint[] arr = {1, 2, 5, 5, 5, 10, 20};\n\t\t\n\t\tint search = 5;\n\t\t\n\t\tint index = Arrays.binarySearch(arr, search);\n\t\t//System.out.println(index);\n\t\t\n\t\tif(index < 0) {\n\t\t\tint lowerBound = Math.abs(index) - 2;\n\t\t\tint upperBound = Math.abs(index) - 1;\n\t\t\t\n\t\t\tSystem.out.println(lowerBound + \" \" + upperBound);\n\t\t}\n\t\t\n\t}",
"public int binarySearch(int[] nums, int target) {\n // write your code here\n if (nums == null || nums.length == 0) return -1;\n int start = 0, end = nums.length - 1;\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] == target) {\n end = mid;\n }\n else if (nums[mid] < target) {\n start = mid;\n }\n else {\n end = mid;\n }\n }\n if (nums[start] == target) return start;\n if (nums[end] == target) return end;\n return -1;\n }",
"public static void binarySearchFromFile() throws IOException\n\t{\n\t\tint elementFound=0;\n\t\tFile file = new File(\"/home/bridgeit/Desktop/program.txt\");\n\t\t\n\t\tif (file.createNewFile()){\n System.out.println(\"File is created!\");\n }else{\n System.out.println(\"File already exists.\");\n }\n\t\t\n\t\t//Write Content\n FileWriter writer = new FileWriter(file);\n writer.write(\"THIS,IS,MY,FIRST,FILE\");\n writer.close();\n int length = (int) file.length();\n \n //read the contents\n FileReader fr = new FileReader(\"/home/bridgeit/Desktop/program.txt\");\n BufferedReader br = new BufferedReader(fr);\n \n //splitting the contents\n String string = null;\n String[] splitted = new String[length];\n while ((string = br.readLine()) != null) \n {\n splitted = string.split(\",\");\n for(String display:splitted)\n {\n System.out.print(\" \"+display);\n }\n }\n System.out.println();\n \n \n //sorting of elements\n Arrays.sort(splitted);\n System.out.println(\"sorted elements are \");\n for(String display:splitted)\n {\n System.out.print(\" \"+display);\n }\n System.out.println();\n \n \n //to search the element using binary search\n System.out.println(\"enter a word to search\");\n String search = scanner.next();\n \n int min = 0;\n\t\tint max = splitted.length - 1;\n\t\tint mid = (min + max) /2;\n\t\t\n\t\tif((search.compareTo(splitted[max])<=0) && (search.compareTo(splitted[min])>=0))\n\t\t{\n\t\t\twhile(elementFound != 1)\n\t\t\t{\n\t\t\t\tif(search.compareTo(splitted[mid])==0)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"element found at \"+mid);\n\t\t\t\t\telementFound = 1;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(search.compareTo(splitted[mid]) < 0)\n\t\t\t\t{\n\t\t\t\t\tmax = mid-1;\n\t\t\t\t\tmid = (min+max)/2;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmin = mid +1;\n\t\t\t\t\tmid = (min+max)/2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\tSystem.out.println(search + \" is not present in the list.\\n\");\n\t\t}\n\t}",
"public int binarySearch(int[] nums, int target, int left, int right) {\n int res = left - 1;\n while (left <= right) {\n int mid = left + (right - left) / 2;\n if (nums[mid] <= target) {\n right = mid - 1;\n } else {\n res = mid;\n left = mid + 1;\n }\n }\n return res;\n }",
"public Integer binSearch(Integer target, Integer[] data, Integer left, Integer right) {\n if (right - left == 1) {\n if (data[left] == target) return left;\n if (data[right] == target) return right;\n }\n if (right - left == 0) {\n if (data[left] == target) return left;\n }\n Integer midpt = (right + left) / 2 ;\n if (target == data[midpt]) return midpt ;\n if (target > data[midpt] ) return binSearch(target, data, midpt, right) ;\n if (target < data[midpt] ) return binSearch(target, data, left, midpt) ;\n\n return -1;\n }",
"public void binarySearchForValue(int value){\n int lowIndex = 0;\n int highIndex = arraySize -1;\n\n while(lowIndex <= highIndex){\n int middleIndex = (lowIndex + highIndex)/2;\n\n if(theArray[middleIndex] < value){\n lowIndex = middleIndex + 1;\n } else if(theArray[middleIndex] > value) {\n highIndex = middleIndex -1;\n } else {\n System.out.println(\"Found a match for \" + value + \" at Index \" + middleIndex);\n // Exit the while loop.\n lowIndex = highIndex + 1;\n }\n\n printHorizontalArray(middleIndex, -1);\n }\n }",
"public static void main(String...args){\n\t\tint[] whitelist = new int[10];\n\t\tfor(int i=0; i<10; i++){\n\t\t\twhitelist[i] = new Random().nextInt(1000);\t\t\t\n\t\t}\n\t\t\n\t\t//sort the list\n\t\tArrays.sort(whitelist);\n\t\tfor(int i=0; i<10; i++){\n\t\t\tSystem.out.print(whitelist[i]+\", \");\n\t\t}\n\t\t\n\t\tint key = new Random().nextInt(1000);\n\t\tint res = binarySearch(key, whitelist);\n\t\tSystem.out.println(\"\\n二分搜索数字\" + key + \",得:\" + res);\n\t}",
"public int binarySearch(String searchKey) {\r\n\t\tint low = 0;\r\n\t\tint high = size -1;\r\n\t\tint middle;\r\n\t\t\r\n\t\twhile (low <= high) {\r\n\t\t\tmiddle = (high + low)/2;\r\n\t\t\tif (searchKey.equalsIgnoreCase(list[middle].getStudentName())) {\r\n\t\t\t\treturn middle; // Element was found\r\n\t\t\t}\r\n\t\t\telse if (searchKey.compareToIgnoreCase(list[middle].getStudentName())<0) {\r\n\t\t\t\thigh = middle -1;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tlow = middle +1;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1; // Element was not found\r\n\t}",
"@Test\r\n\tvoid testSearch() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(7);\r\n\t\ttest.add(10);\r\n\t\ttest.add(9);\r\n\t\tint output = test.search(10);\r\n\t\tassertEquals(1, output);\r\n\t}",
"public void binarySearchForValue(int value) {\n int lowIndex = 0;\n int highIndex = arraySize - 1;\n\n while (lowIndex <= highIndex) {\n int middleIndex = (highIndex + lowIndex) / 2;\n\n if (theArray[middleIndex] < value) {\n lowIndex = middleIndex + 1;\n } else if (theArray[middleIndex] > value) {\n highIndex = middleIndex - 1;\n } else {\n System.out.println(\"\\nFound a match for \" + value + \" at index \" + middleIndex);\n lowIndex = highIndex + 1;\n }\n\n printHorizontalArray(middleIndex, -1);\n }\n }",
"public static void main(String[] args) {\n\t\tNode a = new Node(10);\r\n\t\tNode b = new Node(-5);\r\n\t\tNode c = new Node(-10);\r\n\t\tNode d = new Node(5);\r\n\t\tNode e = new Node(25);\r\n\t\tNode f = new Node(36);\r\n\t\ta.left = b;\r\n\t\tb.left = c;\r\n\t\tb.right = d;\r\n\t\ta.right = e;\r\n\t\te.right = f;\r\n\t\tboolean found1 = search(a,22);\r\n\t\tboolean found2 = search(a,5);\r\n\t\tSystem.out.println(found1);\r\n\t\tSystem.out.println(found2);\r\n\t}",
"static void binarySearch(int mat[][], int i, int j_low, int j_high, int x){\n\t\t\n\t\twhile(j_low < j_high){\n\t\t\t\n\t\t}\n\t}",
"static boolean testSearch() {\n BinaryTree tree = new BinaryTree();\n int[] profile = new int[1];\n\n // Implment insert method\n tree.insert(\"a\", 1);\n tree.insert(\"b\", 2);\n tree.insert(\"c\", 3);\n tree.insert(\"d\", 4);\n tree.insert(\"e\", 5);\n\n // Validates that search works correctly for every key in tree\n if(tree.search(\"a\", profile) != 1)\n return false;\n if(tree.search(\"b\", profile) != 2)\n return false;\n if(tree.search(\"c\", profile) != 3)\n return false;\n if(tree.search(\"d\", profile) != 4)\n return false;\n if(tree.search(\"e\", profile) != 5)\n return false;\n\n // Validates that search works if a key has been overwritten\n tree.insert(\"a\", 3);\n if(tree.search(\"a\", profile) != 3)\n return false;\n\n // Validates that search returns -1 if value is not found\n if(tree.search(\"f\", profile) != -1)\n return false;\n\n // Validates that profile is as expected\n if(profile[0] <= 0)\n return false;\n\n return true;\n }",
"private int binarySearch(int[] nums, int target, int low, int high) {\n while (low <= high) {\n int mid = low + (high - low) / 2; // find mid\n\n if (nums[mid] == target) { // if number found\n if (mid == low || nums[mid] > nums[mid - 1]) // check if it is the first occurence\n return mid; // if it is return mid\n else\n high = mid - 1; // decrease high to reach the index\n } else if (nums[mid] > target) // if the value in num is greater\n high = mid - 1; // decrease high\n else\n low = mid + 1; // else increase low\n\n }\n\n return -1; // number not found\n }",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int elem = scanner.nextInt();\n ArrayList<Integer> list = new ArrayList<>();\n while (scanner.hasNextInt()) {\n list.add(scanner.nextInt());\n }\n int[] array = new int[list.size()];\n for (int i = 0; i < array.length; i++) {\n array[i] = list.get(i);\n }\n System.out.println(binarySearch(array,elem));\n }",
"public static int binarySearch(java.util.List arg0, java.lang.Object arg1, java.util.Comparator arg2)\n { return 0; }",
"public static void searchTest() {\n\t\t//linear tests\n\t\tStopWatch1 timer;\n\t\tint[] array = generateArray(5000000,1,5000000);\n\t\tSystem.out.printf(\"%15s%10s%10s%10s%10s%10s%n\",\"Size\",\"Sort Type\",\"Pre-sort\",\"Value\",\"Index\",\"Time\");\n\t\tfor(int i = 0; i< 5; i++) {\n\t\t\ttimer = new StopWatch1();\n\t\t\tint temp = (int)(Math.random() * (5000000)) +1;\n\t\t\tSystem.out.printf(\"%15d%10s%10s%10d\",5000000,\"Linear\",\"Random\",temp);\n\t\t\ttimer.start();\n\t\t\tint result = Search.linearSearch(array, temp);\n\t\t\ttimer.stop();\n\t\t\tif(result>0) {\n\t\t\t\tSystem.out.printf(\"%10d\",result);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.printf(\"%10s\",\"Not Found\");\n\t\t\t}\n\t\t\tSystem.out.printf(\"%10d%n\", timer.getElapsedTime());\n\t\t\t\n\t\t}\n\t\tSort.mergeSort(array);\n\t\tfor(int i = 0; i< 5; i++) {\n\t\t\ttimer = new StopWatch1();\n\t\t\tint temp = (int)(Math.random() * (5000000)) +1;\n\t\t\tSystem.out.printf(\"%15d%10s%10s%10d\",5000000,\"Linear\",\"Sorted\",temp);\n\t\t\tint result = Search.linearSearch(array, temp);\n\t\t\tif(result>0) {\n\t\t\t\tSystem.out.printf(\"%10d\",result);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.printf(\"%10s\",\"Not Found\");\n\t\t\t}\n\t\t\tSystem.out.printf(\"%10d%n\", timer.getElapsedTime());\n\t\t}\n\t\tfor(int i =0; i< 5; i++) {\n\t\t\ttimer = new StopWatch1();\n\t\t\tint temp = (int)(Math.random() * (5000000)) +1;\n\t\t\tSystem.out.printf(\"%15d%10s%10s%10d\",5000000,\"Binary\",\"Sorted\",temp);\n\t\t\tint result = Search.binarySearch(array, temp);\n\t\t\tif(result>0) {\n\t\t\t\tSystem.out.printf(\"%10d\",result);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.printf(\"%10s\",\"Not Found\");\n\t\t\t}\n\t\t\tSystem.out.printf(\"%10d%n\", timer.getElapsedTime());\n\t\t}\n\t}",
"public void binSearch(int current, int first, int last) {\r\n long average2 = 0, timeB = 0, stanDev = 0;\r\n System.out.println(\"\\nBINARY SEARCH\\n\");\r\n for (int i = 0; i < 10; i++) {\r\n long start = System.nanoTime();\r\n while (last >= first) {\r\n int mid = (last + first) / 2;//FINDS THE MID WAY POINT IN ORDER TO KEEP HALF-ING THE SEARCH RESULTS.\r\n if (A[mid] == current) {\r\n long stop = System.nanoTime();\r\n long timelength = (stop - start);\r\n timeB += timelength; // USED FOR GETTING AVERAGE. \r\n bin[k][i] = timelength;//USED FOR STORING THE TIME IT TOOK FOR EACH TEST, IT IS USED LATER ON TO DISPLAY IN THE CHART.\r\n binary[i] = timelength;//USED FOR FINDING STANDARD DEVIATION.\r\n System.out.println(\"The number: \" + current + \" was found in the array index: \" + A[mid]\r\n + \"\\nIt took: \" + timelength + \" nanoseconds.\");\r\n break;\r\n\r\n } else if (A[mid] < current) {\r\n first = mid + 1;\r\n } else {\r\n last = mid - 1;\r\n }\r\n }\r\n }\r\n average2 = (timeB / 10);\r\n linAvAndDev[h][0] = average2;\r\n for (int j = 0; j < 10; j++) {\r\n stanDev += Math.pow((binary[j] - average2), 2.0);\r\n }\r\n stanDev /= 10;\r\n stanDev = (long) Math.sqrt(stanDev);\r\n linAvAndDev[h][1] = stanDev;\r\n System.out.println(\"The Avearge time for the Binary Search was: \" + average2 + \" nanoseconds.\"\r\n + \"\\nThe Standard Deviation time for the Binary Search was: \" + stanDev + \" nanoseconds.\");\r\n h += 1;\r\n k += 1;\r\n }",
"@Test\n\tpublic void testFind() {\n\t\tBinarySearchTree binarySearchTree=new BinarySearchTree();\n\t\tbinarySearchTree.insert(3);\n\t\tbinarySearchTree.insert(2);\n\t\tbinarySearchTree.insert(4);\n\t\tassertEquals(true, binarySearchTree.find(3));\n\t\tassertEquals(true, binarySearchTree.find(2));\n\t\tassertEquals(true, binarySearchTree.find(4));\n\t\tassertEquals(false, binarySearchTree.find(5));\n\t}",
"private static int binary_search(int[] array, int num, int low, int high) {\n\t\t\n\t\treturn -1;\n\t}",
"public static void main(String args[])\n\t{\n\t\t// searching data set \n\t\tint[] data = {0,4,7,12,32,44,56,77,89,102,155};\n\t\t\n\t\t// search item\n\t\tint searchItem = 155;\n\t\t\n\t\t// binarySearch( Array , initial-position, max-position , item to be search)\n\t\tint result = binarySearch(data,0,data.length-1,searchItem);\n\t\t\n\t\tif (result == -1)\n\t\t\tSystem.out.println(\"Element not present\");\n\t\telse\n\t\t\tSystem.out.println(\"Element found at index : \" + result);\n\t}",
"public int binarySearchString(String[] s,int start,int end,String search){\r\n\t\tstart=0;\r\n\t\tend=s.length;\r\n\t\twhile(start<end){\r\n\t\t\tint mid=(start+end)/2;\r\n\t\t\tif(search.compareTo(s[mid])<0){\r\n\t\t\t\tend=mid;\r\n\t\t\t}else if(search.compareTo(s[mid])>0){\r\n\t\t\t\tstart=mid+1;\r\n\t\t\t}else{\r\n\t\t\t\treturn mid;\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn -1;\r\n\t}",
"private static int bSearch(int[] elements, int key) {\n int left = 0, right = elements.length - 1, mid = 0;\n while (left <= right) {\n mid = (left + right) / 2;\n\n if (key < elements[mid]) {\n right = mid - 1;\n } else if (key == elements[mid]) {\n return mid;\n } else {\n left = mid + 1;\n }\n }\n return -1;\n }",
"public static void main(String[] args) {\n\t\tint[] array = new int[] {1,2,3,4,5,6,7,8,9};\n\t\tbinary_search(array,4);\n\t}",
"@Test\n public void searchNodesBST()\n {\n BinarySearchTree bst = new BinarySearchTree();\n No root = new No(6);\n bst.insert(root, root);\n bst.insert(root, new No(2));\n bst.insert(root, new No(9));\n No k = new No(1);\n bst.insert(root, k);\n bst.insert(root, new No(4));\n bst.insert(root, new No(8));\n assertEquals(k, bst.search(root, k));\n //bst.inOrder(root);\n }",
"private int binarySearch(T element) {\n int start = 0, end = sortedArray.size(), mid = 0;\n while (start < end) {\n mid = (end + start) / 2;\n int cmp = sortedArray.get(mid).compareTo(element);\n if (cmp == 0) {\n start = end = mid;\n }\n else if (cmp < 0) {\n start = mid + 1;\n }\n else {\n end = mid;\n }\n }\n return start;\n }",
"void search();",
"void search();",
"private static int binarySearch(int[] arr, int low, int high, int target) {\n\n\t\tif (low <= high) {\n\n\t\t\tint mid = low + (high - low) / 2;\n\n\t\t\tif (arr[mid] == target) {\n\t\t\t\treturn mid;\n\t\t\t}\n\n\t\t\tif (arr[mid] < target) {\n\t\t\t\treturn binarySearch(arr, mid + 1, high, target);\n\t\t\t} else {\n\t\t\t\treturn binarySearch(arr, low, mid - 1, target);\n\t\t\t}\n\n\t\t}\n\n\t\treturn -1;\n\t}",
"public static Boolean binarySearch(int[] arr, int n){\r\n if(arr.length == 0) return false;\r\n if(arr.length == 1 && arr[0] != n) return false; \r\n if(arr.length == 1 && arr[0] == n) return true; \r\n int start = 0;\r\n int mid = arr.length/2;\r\n int end = arr.length;\r\n int pos = mid;\r\n while(arr[pos] != n){\r\n if(n > arr[pos]){\r\n start = mid;\r\n mid = (end-start)/2+start;\r\n } else if(n < arr[pos]){\r\n end = mid;\r\n mid = (end-start)/2+start;\r\n System.out.println(\"here \" + start+ \" \" + mid + \" \" + end + \" pos= \" + pos);\r\n }\r\n pos = mid;\r\n if(arr[pos] == n) return true;\r\n if(start+1 == end){\r\n System.out.println(start+ \" \" + mid + \" \" + end + \" pos= \" + pos);\r\n return false;\r\n }\r\n }\r\n return true;\r\n}",
"public static void main(String[] args) {\n int[] a = new int[15];\n int searchV = 0, index;\n System.out.println(\"Enter 15 numbers\");\n\n //now we put all th value in a previous define array with help of scanner class\n Scanner input = new Scanner(System.in);\n for (int i = 0; i < a.length; i++) {\n a[i] = input.nextInt();\n }\n\n System.out.print(\"Enter a number to search for: \");\n // take the user input which he want to search\n searchV = input.nextInt();\n index = binarySearch(a, searchV);\n if (index != -1) {\n System.out.println(\"Found at index: \" + index);\n } else {\n System.out.println(\"Not Found\");\n }\n }",
"public int binarySearchIterative(int[] array,int target) {\n var left = 0;\n var right = array.length -1;\n while (left <= right) {\n int middle = (left + right) / 2;\n if (array[middle] == target)\n return middle;\n if (array[middle] < target)\n left = middle + 1;\n else\n right = middle - 1;\n }\n return -1;\n }",
"public int binarySearch(int x) {\n\n int l = 0, h = length - 1, mid;\n while (l <= h) {\n mid = l + (h-l)/2;\n if (arr[mid] == x) return mid;\n else if (x < arr[mid]) h = mid - 1;\n else if (x > arr[mid]) l = mid + 1;\n }\n return -1;\n }",
"private void BinarySearch(Node node, int index) {\n Node left, right;\n left = node.left;\n right = node.right;\n\n int leftIndex = (2 * index) + 1;\n int rightIndex = (2 * index) + 2;\n if (left != null) {\n ArrayTree[leftIndex] = left.key;\n BinarySearch(left, leftIndex);\n lastIndex = Math.max(leftIndex, lastIndex);\n } else {\n if (leftIndex < ArrayTree.length - 1) {\n ArrayTree[leftIndex] = 0;\n }\n }\n\n if (right != null) {\n ArrayTree[rightIndex] = right.key;\n BinarySearch(right, rightIndex);\n lastIndex = Math.max(rightIndex, lastIndex);\n } else {\n if (rightIndex < ArrayTree.length - 1) {\n ArrayTree[rightIndex] = 0;\n }\n }\n }",
"public static void main(String[] args) {\n\n\t\tint[] arr = {10,20,30,40,50,60,70,80,90};\n\t\t\n\t\t\n\t\t//System.out.println(BinarySearch(arr,92));\n\t\t// Recursion(7);\n\t\t//System.out.println(RecursionLinear(arr,0,80));\n\t\tSystem.out.println(RecursiveBinarySearch(arr,100,0,8));\n\t}",
"protected int binarySearch(int x) {\n if (arr.length == 0) {\n return -1;\n }\n\n int left = 0;\n int right = count - 1;\n\n while (left <= right) {\n int mid = (right + left) >>> 1;\n int val = arr[mid];\n\n if (val < x) {\n left = mid + 1;\n } else if (val > x) {\n right = mid - 1;\n }\n else {\n return mid;\n }\n }\n\n return -1;\n }",
"public static int binarySearchIter(int[] arr, int from, int to, int key) {\n\t\t\n\t\tint shouldBeIndex;\n\t\twhile (from<=to){\n\t\t\tint mid=from+(to-from)/2;\n\t\t\tif (arr[mid]<key) from=mid+1;//upper\n\t\t\telse if (arr[mid]>key) to=mid-1;//lower\n\t\t\telse return mid;//found\n\t\t}\n\t\t//not found\n\t\tshouldBeIndex=from;\n\t\treturn -shouldBeIndex-1;\n\t}",
"static int binarySearch(int[] array, int start, int end, int value) {\r\n\t\tif(end>=start) {\r\n\t\t\tint mid = (start+end)/2;\r\n\t\t\tif(array[mid]==value)\r\n\t\t\t\treturn mid;\r\n if(array[mid]>value)\r\n \treturn binarySearch(array, start, mid-1, value);\r\n return binarySearch(array, mid+1, end, value);\r\n\t\t}\r\n return -1;\r\n\t}",
"public static void main(String [] args)\r\n\t{\r\n\t\tBST<Integer> search = new BST<Integer>();\r\n\t\tsearch.add(2);\r\n\t\tsearch.add(6);\r\n\t\tsearch.add(9);\r\n\t\tSystem.out.println(search);\r\n\t\tSystem.out.println(search.find(6));\r\n\t}",
"int binarySearchWithRecursion(int[] arr, int low, int high, int key){\n if (high < low)\n return -1;\n int mid = (low + high) / 2;\n if (key == arr[mid])\n return mid;\n if (key > arr[mid])\n return binarySearchWithRecursion(arr,(mid + 1), high, key);\n return binarySearchWithRecursion(arr, low, (mid - 1), key);\n }",
"public static int binSearch(int[] a, int first, int last, int key)\n\t{\t\n\t\tif(first <= last)\n\t\t{\n\t\t\tint mid = (first + last) / 2; //Divides the beginning of the array and the length of the array into 2\n\t\t\t\n\t\t\tif (a[mid] == key)\n\t\t\t{\n\t\t\t\treturn mid; \n\t\t\t}\n\t\t\t\n\t\t\telse if (a[mid] > key) //IF THE INDEX(WHICH IS THE MID) OF ARRAY A IS GREATER THAN THE KEY\n\t\t\t{\n\t\t\t\treturn last = mid - 1; //RETURNS THE LENGTH OF THE ARRAY WHICH IS THE DECREMENTED MID\n\t\t\t}\n\t\t\t\n\t\t\telse //IF THE INDEX(WHICH IS THE MID) OF ARRAY A IS LESS THAN THE KEY\n\t\t\t{\n\t\t\t\treturn first = mid + 1; //RETURNS THE FIRST = INCREMENTED MID\t\t\n\t\t\t}\n\t\t}\n\t\treturn -1;\t\n\t}",
"static int binSearch(int []arr,int key) {\n\t\tint start=0;\n\t\tint end=arr.length-1;\n\t\tdo {\n\t\t\tint pc=(start+end)/2;\n\t\t\tif(arr[pc]==key) {\n\t\t\t\treturn pc;\n\t\t\t}else if(arr[pc]<key) {\n\t\t\t\tstart=pc+1;\n\t\t\t}else\n\t\t\t\tend=pc-1;\n\t\t}while(start<=end);\n\t\t\n\t\treturn -1;\n\t}",
"@Test\r\n\tvoid testSearch2() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(7);\r\n\t\ttest.add(10);\r\n\t\ttest.add(9);\r\n\t\tint output = test.search(4);\r\n\t\tassertNotEquals(3, output);\r\n\t}",
"public int binarySearch(int[] nums, int searchFor) {\n\t\tint[] sortedNo = this.sortAlgo.sort(nums);\n\t\treturn 3;\n\t}",
"static int binarySearch(int arr[], int start, int end, int target ){\n if(start>end){\n return -1;\n }\n int mid = start+(end-start)/2;\n \n if(arr[mid] == target && (mid==0 || arr[mid-1]!=target)){\n return mid;\n }\n if(arr[mid] == target){\n return mid;\n }\n if(arr[mid]>=target && arr[mid]>arr[start]){\n return binarySearch(arr,start,mid-1,target);\n }\n // else if(arr[mid]<arr[start] && arr[mid]<target){\n // return binarySearch(arr,mid+1,end,target);\n // }\n return binarySearch(arr,mid+1,end,target);\n }",
"private int binarySearchRecursive(int[] array,int target,int left,int right) {\n if (left > right)\n return -1;\n\n int middle = (left + right) / 2;\n\n if (array[middle] == target)\n return middle;\n\n if (array[middle] < target)\n return binarySearchRecursive(array,target,middle+1,right);\n\n return binarySearchRecursive(array, target,left,middle-1);\n }",
"public static int binarySearch(int[] num, int target) {\n\t\tint left = 0;\n\t\tint right = num.length - 1;\n\t\twhile (left <= right) {\n\t\t\tint middle = (left+right)/2;\n\t\t\tif (num[middle] == target) {\n\t\t\t\treturn middle;\n\t\t\t} else if (num[middle] < target) {\n\t\t\t\tleft = middle + 1;\n\t\t\t} else {\n\t\t\t\tright = middle - 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn -1;\n\t}",
"public static int binarySearch2(int[] numbers, int target) {\n int min = 0;\n int max = numbers.length - 1;\n \n int mid = -1;\n while (min <= max) {\n mid = (max + min) / 2;\n if (numbers[mid] == target) {\n return mid; // found it!\n } else if (numbers[mid] < target) {\n min = mid + 1; // too small\n } else { // numbers[mid] > target\n max = mid - 1; // too large\n }\n mid = (max + min) / 2;\n }\n \n return -min - 1; // not found\n }",
"public static void main(String[] args) {\n\r\n\t\tint nums[] = { 4,5,6,7,0,1,2 }, target = 0; // 4,5,6,7,0,1,2\r\n\t\tSystem.out.println(search(nums, target));\r\n\t}",
"int binarySearch(int arr[], int x)\n {\n int l = 0, r = arr.length - 1;\n while (l <= r) {\n int m = l + (r - l) / 2;\n\n // Check if x is present at mid\n if (arr[m] == x)\n return m;\n\n // If x greater, ignore left half\n if (arr[m] < x)\n l = m + 1;\n\n // If x is smaller, ignore right half\n else\n r = m - 1;\n }\n\n // if we reach here, then element was\n // not present\n return -1;\n }",
"public static int binarySearch(int[] list, int key) {\n int low = 0;\n int high = list.length - 1;\n \n while (high >= low) {\n int mid = (low + high) / 2;\n if (key < list[mid])\n high = mid - 1;\n else if (key == list[mid])\n return mid;\n else\n low = mid + 1;\n }\n return -1 - 1; // now high < low, key not found\n }",
"public static void searchRange(int[] nums, int target){\n int index = binarySearch(nums, target);\n System.out.println(index);\n\n }",
"static double binarySearchForBuckets (double[] splits, double feature, boolean keepInvalid) { throw new RuntimeException(); }",
"private static boolean binarySearch(int[] arr, int num, int start, int end) {\n\t\tif(arr==null || arr.length==0){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tint mid;\r\n\t\t\r\n\t\twhile(start<=end){\r\n\t\t\t\r\n\t\t\tmid= start+ (end-start)/2;\r\n\t\t\t\r\n\t\t\tif(arr[mid]==num){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if(num < arr[mid]){\r\n\t\t\t\tend=mid-1;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tstart=mid+1;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public static void main(String[] args) {\r\n\r\n int[] nums = {1,4,2,5,34,74};\r\n int target = 2;\r\n System.out.println(linearSearch(nums,target));\r\n }",
"public static int binarySearch(int[] ary, int target, int start, int end){\r\n\t\t//get the middle index\r\n\t\tint middle = (end-start)/2 + start;\r\n\t\tint result = 0;\r\n\t\t\r\n\t\t//Some end cases (error, out of scope, etc)\r\n\t\tif(end-start<0||target<ary[0]||target>ary[ary.length-1])\r\n\t\t\t\r\n\t\t\t//If element is not in the array display \r\n\t\t\treturn -1;\r\n\r\n\r\n\t\t//Recursive case 1: If target is less than, the next search occurs within start and middle-1\r\n\r\n\t\tif (target < ary[middle]) {\r\n\t\t\tresult = binarySearch(ary, target, start, middle-1 );\r\n\t\t}\r\n\t\t\r\n\t\t//Recursive case 2: If target is greater than, the next search occurs within middle+1 and end \r\n\t\telse if(target > ary[middle]) {\r\n\t\t\tresult = binarySearch(ary, target, middle+1, end);\r\n\t\t\r\n\t\t//End cases: If target is equal, done.\r\n\t\t}\r\n\t\telse if (target == ary[middle]) {\r\n\t\t\tresult = middle;\r\n\t\t}\r\n\r\n\t\t//Return results\r\n\t\treturn result;\r\n\t}",
"private static int binarySearchMine(int[] data, int target, int low, int high) {\n while (low <= high) {\n int median = (low + high) / 2;\n int current = data[median];\n if (current == target) {\n return median;\n } else if (target < current) {\n return binarySearchMine(data, target, low, median - 1);\n } else {\n return binarySearchMine(data, target, median + 1, high);\n }\n }\n return -1;\n }",
"public static int binarySearchRec(int[] arr, int from, int to, int key) {\n\t\t\n\t\tif (from<=to) {\n\t\t\tint mid=from+(to-from)/2;\n\t\t\tif (arr[mid]<key) \t\treturn binarySearchRec(arr, ++mid, to, key);//upper\t\n\t\t\telse if (arr[mid]>key) \treturn binarySearchRec(arr, from, --mid, key); //lower\n\t\t\telse \t\t\t\t\treturn mid;//found\n\t\t}\n\t\telse {//not found\n\t\t\tint shouldBeIndex=from;\n\t\t\treturn -shouldBeIndex-1;\n\t\t}\n\t}",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n scanner.nextLine();\n int[] numbers = Arrays.stream(scanner.nextLine().split(\" \"))\n .mapToInt(Integer::parseInt).toArray();\n\n for (int i = 0; i < numbers.length; i++) {\n if (binarySearch(numbers, i) == i) {\n System.out.println(true);\n return;\n }\n }\n\n System.out.println(false);\n }",
"public static int binarySearch(int[] array, int value, int start, int end){\n if(start <= end){\n int mid = (start+end)/2;\n if (array[mid] == value) return mid;\n else if(array[mid] < value) start = mid+1;\n else end = mid-1;\n return binarySearch(array, value, start, end);\n }\n return -1;\n }",
"static int BinarySearch(int[] arr, int target, int start, int end) {\n boolean isAsc = arr[start] < arr[end];\n\n while(start <= end) {\n // find the middle element\n// int mid = (start + end) / 2; // might be possible that (start + end) exceeds the range of int in java\n int mid = start + (end - start) / 2;\n\n if (arr[mid] == target) {\n return mid;\n }\n\n if (isAsc) {\n if (target < arr[mid]) {\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n } else {\n if (target > arr[mid]) {\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n }\n }\n return -1;\n }",
"public static int binarySearch(int[] arr, int target){\n\t\tint start = 0;\n\t\tint end = arr.length - 1;\n\n\t\twhile (start <= end){\n\t\t\tint mid = (end + start) / 2;\n\t\t\tif(arr[mid] == target){\n\t\t\t\treturn mid;\n\t\t\t} else if(target < arr[mid]){\n\t\t\t\tend = mid - 1;\n\t\t\t} else if(target > arr[mid]){\n\t\t\t\tstart = mid + 1;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}",
"public int binarySearchInteger(int[] arr,int start,int end,int search){\r\n\t\tint found=0;\r\n\t\tif(start>end){\r\n\t\t\tfound=-1;\r\n\t\t}else{\r\n\t\t\tint mid=(start+end)/2;\r\n\t\t\tif(search==arr[mid]){\r\n\t\t\t\tfound=mid;\r\n\t\t\t}else if(search>arr[mid]){\r\n\t\t\t\tfound=binarySearchInteger(arr, mid+1, end, search);\r\n\t\t\t}else if(search<arr[mid]){\r\n\t\t\t\tfound=binarySearchInteger(arr, start, mid, search);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn found;\r\n\t}",
"private static boolean binarySearch(int[] data, int target, int low, int high) {\n if (low > high) {\n return false;\n } else {\n int mid = (low + high) / 2;\n if (target == data[mid]) {\n return true;\n } else if (target < data[mid]) {\n return binarySearch(data, target, low, mid - 1);\n } else {\n return binarySearch(data, target, mid + 1, high);\n }\n }\n }",
"static int binarySearch(long[] paramArrayOflong, int paramInt, long paramLong) {\n }",
"public int binarySearch(Long[] keys,Long target){\n\t\tif(keys ==null || keys.length ==0){\n\t\t\treturn -1;\n\t\t}\n\t\tint l = 0;\n\t\tint r = keys.length-1;\n\t\twhile(l<r){\n\t\t\tint mid = l + (r-l)/2;\n\t\t\tif(keys[mid] == target)\n\t\t\t\treturn mid;\n\t\t\tif(keys[mid]<target)\n\t\t\t\tl = mid+1;\n\t\t\telse\n\t\t\t\tr = mid-1;\n\t\t}\n\t\treturn l;\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tSolution s = new Solution();\n\t\tint[] nums = {4,5,6,7,0,1,2};\n\t\tSystem.out.println(s.search(nums, 0));\n\t}",
"static int binarySearch(int arr[], int l, int r, int x) {\n if (r >= l) { \r\n int mid = l + (r - l) / 2; \r\n if (arr[mid] == x) \r\n return mid; \r\n \r\n if (arr[mid] > x) \r\n return binarySearch(arr, l, mid - 1, x); \r\n \r\n \r\n return binarySearch(arr, mid + 1, r, x); \r\n } \r\n \r\n \r\n return -1; \r\n }",
"public int BinarySearch(Object[] a, int size, Object key) {\n int start = 0;\n int end = size - 1;\n while (start < end) {\n int mid = (start + size) / 2;\n if (key.equals(a[mid])) {\n return mid;\n } else if (((Comparable) key).compareTo(a[mid]) > 0) {\n start = mid + 1;\n } else {\n end = mid - 1;\n }\n }\n return -1;\n }",
"private static int binarySearchRecursively(int[] sortedArray, int input, int first, int last) {\n int mid = (first + last) / 2;\n\n if (last < first) {\n return -1;\n }\n if (input == sortedArray[mid]) {\n return mid;\n } else if (input < sortedArray[mid]) {\n return binarySearchRecursively(sortedArray, input, last, mid - 1);\n } else {\n return binarySearchRecursively(sortedArray, input, mid + 1, last);\n }\n }",
"abstract public void search();",
"private static void binarySearch(int[] sortedArray, int input) {\n int first = 0;\n int last = sortedArray.length-1;\n boolean result=false;\n while (first <= last) {\n int mid = (first + last) / 2;\n if (sortedArray[mid] < input) {\n first = mid + 1;\n } else if (sortedArray[mid] > input) {\n last = mid - 1;\n } else if (sortedArray[mid] == input) {\n result=true;\n break;\n }\n }\n String result2 = \"{\";\n for(int i=-0; i< sortedArray.length;i++) {\n result2 = result2+sortedArray[i]+\",\";\n }\n result2 =result2.substring(0,result2.length()-1);\n result2 = result2+\"}\";\n if(result) {\n System.out.println(\"The input \" + input + \" was found in the array \"+result2+\".\");\n } else {\n System.out.println(\"The input \" + input + \" was not found in the array \"+result2+\".\");\n }\n }",
"private int binarySearchQ7(int first, int last, K key)\n {\n int index;\n \n if (first > last)\n index = first; \n else \n {\n int mid = first + (last - first) / 2;\n K midKey = dictionary[mid].getKey(); \n if (key.equals(midKey))\n index = mid; \n else if (key.compareTo(midKey) < 0)\n index = binarySearchQ7(first, mid - 1, key);\n else\n index = binarySearchQ7(mid + 1, last, key);\n } \n return index;\n }",
"public static int binarySearch(int[] numbers, int target) {\n int min = 0;\n int max = numbers.length - 1;\n \n while (min <= max) {\n int mid = (max + min) / 2;\n if (numbers[mid] == target) {\n return mid; // found it!\n } else if (numbers[mid] < target) {\n min = mid + 1; // too small\n } else { // numbers[mid] > target\n max = mid - 1; // too large\n }\n }\n \n return -1; // not found\n }",
"public int binarySearchLoop(int key) {\n int first = 0;\n int last = length - 1;\n int mid = length / 2;\n //only on sorted array\n //first , mid = half(floor), last;\n //is mid the key\n //is mid < or > from the key\n //if key is bigger, then we go right, the new first is mid+1, new mid is (mid+last)/2, and last is the same until the end of the GOING searching right\n //if key is smaller then we go left, the new last is mid-1, new mid is (first + mid)/2, and first is the same until the end of GOING searching left\n\n while (first <= last) {\n if (key == arr[mid]) return mid;\n\n else if (key < arr[mid]) {\n last = mid - 1;\n mid = (first + mid) / 2;\n } else {\n first = mid + 1;\n mid = (first + last) / 2;\n }\n }\n return -1;\n }",
"public static int binSearchRotatedIter(int src[], int lo, int hi, int target){\n\n while(lo<=hi){\n int mid = lo + (hi-lo)/2;\n if(src[mid]==target) return mid;\n //if bottom half is sorted\n if(src[lo]<=src[mid]){\n \n if(src[lo]<=target && target<src[mid]){\n hi=mid-1;\n }else{\n lo=mid+1;\n }\n }\n //if upper half is sorted\n else{\n if(src[mid]<target && target<=src[hi]){\n lo=mid+1;\n }else{\n hi=mid-1;\n }\n }\n }\n return -1;\n}",
"public static void main(String[] args) {\n\t\t\r\n\t\tint[] arr = {2,4,6,8,9,12};\r\n\t\tSystem.out.println(\"Enter number to be searched:\\n\");\r\n\t\tScanner scanner = new Scanner(System.in);\r\n\t\tint num = scanner.nextInt();\r\n\t\t\r\n\t\tSystem.out.println(\"Number is \"+num);\r\n\t\t\r\n\t\tif(binarySearch(arr, num , 0 , arr.length-1)){\r\n\t\t\tSystem.out.println(\"Number is present\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(\"Number is not present\");\r\n\t\t}\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\tint[] arr = { 1, 21, 32, 49, 5 };\n\t\tSystem.out.println(linearsearch(arr, 322));\n\n\t}",
"public static void main(String[] args) throws java.lang.Exception {\n\n Scanner scn = new Scanner(System.in);\n\n int t = scn.nextInt();\n\n while (t != 0) {\n int n = scn.nextInt();\n\n int arr[] = new int[n];\n\n for (int i = 0; i < n; i++) {\n\n arr[i] = scn.nextInt();\n\n }\n int pos = scn.nextInt();\n long element = arr[pos-1];\n\n Arrays.sort(arr);\n \n for(int i=0;i<n;i++)\n System.out.print(arr[i]+\" \");\n \n System.out.println();\n System.out.println(bsearch(arr, element) +1 );\n t--;\n }\n\n }"
] | [
"0.8023146",
"0.78956133",
"0.789333",
"0.76890516",
"0.7680474",
"0.7571359",
"0.75584894",
"0.7209756",
"0.7190228",
"0.71864414",
"0.7164502",
"0.7127718",
"0.71165955",
"0.71067023",
"0.7078976",
"0.7061505",
"0.704791",
"0.7034532",
"0.70176566",
"0.7007869",
"0.699922",
"0.69903743",
"0.69885224",
"0.69226533",
"0.6906256",
"0.6900494",
"0.6874499",
"0.68487793",
"0.6847453",
"0.6839781",
"0.68380105",
"0.68303937",
"0.6821826",
"0.6821413",
"0.6819869",
"0.6808203",
"0.6803767",
"0.6794612",
"0.6786351",
"0.6779714",
"0.67782825",
"0.6770236",
"0.6765652",
"0.6757792",
"0.67504",
"0.674731",
"0.6732695",
"0.6731523",
"0.6731523",
"0.6726435",
"0.672094",
"0.6712026",
"0.6708513",
"0.6685972",
"0.66812396",
"0.6677052",
"0.66720426",
"0.6664337",
"0.66628623",
"0.6656777",
"0.664489",
"0.66412413",
"0.66374165",
"0.6635715",
"0.6634875",
"0.6633659",
"0.66205686",
"0.661726",
"0.66034967",
"0.6598416",
"0.6586428",
"0.65759075",
"0.6565874",
"0.6557804",
"0.655401",
"0.6552098",
"0.6550597",
"0.65496343",
"0.65479",
"0.6542112",
"0.6534562",
"0.6525275",
"0.6524436",
"0.6523007",
"0.65222335",
"0.65208256",
"0.6519971",
"0.6503307",
"0.65005624",
"0.6489698",
"0.6477134",
"0.6470627",
"0.6467919",
"0.64623064",
"0.64565104",
"0.6448542",
"0.64335227",
"0.64273214",
"0.6420898",
"0.6420573"
] | 0.7084216 | 14 |
deleteUser: Elimina un usuario de la BBDD | @Override
@Transactional
public void deleteUser(Long id) {
UserEntity u = userRepository.findById(id).orElseThrow(() -> {
logger.warn(DataErrorMessages.USER_NO_CONTENT);
throw new UserNoContentException(DataErrorMessages.USER_NO_CONTENT);
});
for (RolEntity r : u.getRoles())
r.getUsers().remove(u);
userRepository.delete(u);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void deleteUser(User userToDelete) throws Exception;",
"public void deleteUser(Integer uid);",
"@Override\n\tpublic void deleteUser(User user)\n\t{\n\n\t}",
"public void deleteUser(long userId);",
"public void deleteUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk deleteUser\");\r\n\t}",
"void deleteUser(String deleteUserId);",
"void deleteUser(String userId);",
"public void deleteUser(User user) {\n\t\tdelete(user);\r\n\t}",
"public void deleteUserById(Long userId);",
"void deleteUserById(Long id);",
"public void deleteUser(String name);",
"@Override\n\tpublic void deleteUser(user theUser) {\n\t\t\n\t}",
"public void deleteUser(User user) {\n update(\"DELETE FROM user WHERE id = ?\",\n new Object[] {user.getId()});\n }",
"public void deleteUser(String username);",
"@Override\n\tpublic void deleteUser(String id) throws Exception {\n\t\t\n\t}",
"void deleteUserById(Integer id);",
"@Override\r\n\tpublic int deleteUser(Users user) {\n\t\treturn 0;\r\n\t}",
"void deleteUser(int id);",
"public void deleteUser(User user) {\n SQLiteDatabase db = this.getWritableDatabase();\n // delete user record by id\n db.delete(TABLE_USER, COLUMN_USER_ID + \" = ?\",\n new String[]{String.valueOf(user.getId())});\n db.close();\n }",
"void deleteUser( String username );",
"public void deleteUser(Integer id) throws BadRequestException;",
"void deleteUser(User user, String token) throws AuthenticationException;",
"public static void deleteUser() {\n try {\n buildSocket();\n ClientService.sendMessageToServer(connectionToServer, ClientService.deleteUser());\n closeSocket();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic void deleteUser() {\n\t\tLog.d(\"HFModuleManager\", \"deleteUser\");\n\t}",
"@Override\n\tpublic void deleteUser(String userId) {\n\t\t\n\t}",
"public void deleteUser(user user) {\n SQLiteDatabase db = this.getWritableDatabase();\n // delete user record by id\n db.delete(TABLE_NAME, COLUMN_USER_ID + \" = ?\",\n new String[]{String.valueOf(user.getId())});\n db.close();\n }",
"@Override\n public boolean deleteUser(User user) {\n return false;\n }",
"public void delete(User usuario);",
"public void deleteUser(Userlist user) {\n SQLiteDatabase db = this.getWritableDatabase();\n // delete user record by id\n db.delete(TABLE_USERLIST, COLUMN_USER_ID + \" = ?\",\n new String[]{String.valueOf(user.getID())});\n db.close();\n }",
"public void deleteUser(int userid) {\n\t\t\n\t}",
"public boolean delete(User user);",
"@Override\n\tpublic void deleteUser(User user) {\n\t\topenSession().createQuery(\"DELETE FROM User where userId =\" + user.getUserId()).executeUpdate();\n\t\t\n\t}",
"@Override\n\tpublic Boolean deleteUser(User user) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic void deleteUserById(Integer id) {\n\n\t}",
"public boolean deleteUser(String user){\n\t\treturn false;\n\t}",
"public User delete(String user);",
"public void deleteUser(User user) {\n\t\t\r\n\t\tsessionFactory.getCurrentSession().delete(user);\t\r\n\t\t\r\n\t}",
"public void deleteUserById(int id){\n userListCtrl.deleteUser(id);\n }",
"public void deleteUser(int id) {\r\n userRepo.deleteById(id);\r\n }",
"public String deleteUser(){\n\t\tusersservice.delete(usersId);\n\t\treturn \"Success\";\n\t}",
"@Override\n public boolean deleteUser(User user) {\n return controller.deleteUser(user);\n }",
"Integer removeUserByUserId(Integer user_id);",
"public void deleteUser(User user) {\r\n\t\tusersPersistence.deleteUser(user);\r\n\t}",
"@Override\r\n\tpublic boolean delUser(user user) {\n\t\tif(userdao.deleteByPrimaryKey(user.gettUserid())==1){\r\n\t\t\treturn true;}else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t}",
"@Override\n\tpublic void delete_User(String user_id) {\n\t\tuserInfoDao.delete_User(user_id);\n\t}",
"public Boolean DeleteUser(User user){\n\t\t\treturn null;\n\t\t}",
"public void deleteUser(int id) {\n\t\tuserRepository.delete(id);\r\n\t}",
"public void deleteUser(long id){\n userRepository.deleteById(id);\n }",
"@Override\n\tpublic void deleteUser(NguoiDung nd) {\n\n\t}",
"public void delete(User user){\n userRepository.delete(user);\n }",
"public void deleteUser(ExternalUser userMakingRequest, String userId);",
"@Override\n\tpublic void deleteUser(User user) {\n\t\tiUserDao.deleteUser(user);\n\t}",
"void deleteUser(String username) throws UserDaoException;",
"boolean delete(User user);",
"public void deleteUser(int id){\r\n\t\tconfigDao.deleteUserById(id);\r\n\t}",
"public void deleteAppUser(AppUserTO appUser) {\n\t\ttry {\n\t\t\tthis.jdbcTemplate.update(\"delete from carbon_app_user where id=?\",\n\t\t\t\t\tappUser.getId());\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Error in AppUserDAO: deleteAppUser\", e);\n\t\t}\n\t}",
"public void delete(User user) {\n repository.delete(user);\n }",
"@Override\r\n\tpublic void deleteByUser(User user) {\n\t\tuserReposotory.delete(user);\r\n\t}",
"void removeUser(Long id);",
"public void deleteUser(int id) {\n\t\tet.begin();\n\t\tem.remove(em.find(User.class, id));\n\t\tet.commit();\n\t}",
"public void delete(User user)throws Exception;",
"void delete(User user);",
"void delete(User user);",
"@Override\n\tpublic void deleteUser(int id) {\n\t\tuserMapper.deleteUser(id);\n\t}",
"public void deleteUser(IndividualUser user) {\n try{\n PreparedStatement s = sql.prepareStatement(\"DELETE FROM Users WHERE userName=? AND id=? AND firstName=? AND lastName=?;\");\n s.setString(1, user.getId());\n s.setInt(2,user.getIdNum());\n s.setString(3, user.getFirstName());\n s.setString(4, user.getLastName());\n s.execute();\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }",
"public void delete(User user) {\n\t\tuserDao.delete(user);\n\t}",
"@Override\r\n\tpublic int delete(User user) {\n\t\treturn 0;\r\n\t}",
"@Override\n\tpublic void deleteUser(int userId) {\n\t\tuserDao.deleteUser(userId);\n\t}",
"public void removeUser(){\n googleId_ = User.getDeletedUserGoogleID();\n this.addToDB(DBUtility.get().getDb_());\n }",
"public void deleteUser(View v){\n Boolean deleteSucceeded = null;\n\n int userId = users.get(userSpinner.getSelectedItemPosition() - 1).getId();\n\n // Delete user from database\n deleteSucceeded = udbHelper.deleteUser(userId);\n\n String message = \"\";\n if(deleteSucceeded){\n message = \"Successfully removed user with id {\" + userId + \"} from database!\";\n }\n else {\n message = \"Failed to save user!\";\n }\n Toast.makeText(ManageAccountsActivity.this, message, Toast.LENGTH_LONG).show();\n\n reloadUserLists();\n }",
"private void deleteUser() throws SQLException {\n System.out.println(\"Are you sure you want to delete your user? Y/N\");\n if (input.next().equalsIgnoreCase(\"n\")) return;\n\n List<Integer> websiteIds = new ArrayList<>();\n try (PreparedStatement stmt = connection.prepareStatement(\"SELECT * FROM passwords \" +\n \"WHERE user_id like (?)\")) {\n stmt.setInt(1, user.getId());\n ResultSet rs = stmt.executeQuery();\n while (rs.next()) {\n websiteIds.add(rs.getInt(\"website_data_id\"));\n }\n }\n\n try (PreparedStatement stmt = connection.prepareStatement(\"DELETE FROM passwords \" +\n \"WHERE user_id like (?)\")) {\n stmt.setInt(1, user.getId());\n stmt.executeUpdate();\n }\n\n for (int website : websiteIds) {\n try (PreparedStatement stmt = connection.prepareStatement(\"DELETE FROM website_data \" +\n \"WHERE website_data_id like (?)\")) {\n stmt.setInt(1, website);\n stmt.executeUpdate();\n }\n }\n\n try (PreparedStatement stmt = connection.prepareStatement(\"DELETE FROM users \" +\n \"WHERE id like (?)\")) {\n stmt.setInt(1, user.getId());\n stmt.executeUpdate();\n }\n\n System.out.println(\"User \" + user.getUsername() + \" deleted.\");\n System.exit(0);\n }",
"@Override\r\n\tpublic void delete(User user) {\n\t\tint iRet = dao.delete(user);\r\n\t\tif(iRet != 1){\r\n\t\t\tlogger.error(\"删除失败\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tlogger.info(\"删除成功\");\r\n\t}",
"void remove(User user) throws SQLException;",
"@Override\r\n\tpublic void delete(User user) {\n\t\tuserDao.delete(user);\r\n\t}",
"public void deleteUsuario(Usuario usuario) {\n\t\t\n\t}",
"void DeleteCompteUser(int id);",
"@Override\n\tpublic void deleteUser(Long userId) {\n\t\tusersRepo.deleteById(userId);\n\n\t}",
"public String deleteUser(){\n\t\ttry{\n\t\t\tnew UtenteDao().deleteUser(utente_target);\n\t\t\treturn \"Utente eliminato con successo!\";\n\t\t}\n\t\tcatch(SQLException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n\tpublic void delete(User user)\n\t{\n\t\tuserDAO.delete(user);\n\t}",
"@Override\n\tpublic int delete(Users user) {\n\t\t\n\t\treturn userDAO.delete(user);\n\t}",
"@Override\n\tpublic void delete(User entity) {\n\t\tuserlist.remove(String.valueOf(entity.getDni()));\n\t}",
"public void removeuserById(User user) throws SQLException{\n String SQL = \"DELETE FROM user WHERE id = ? \";\n PreparedStatement ps = connection.prepareStatement(SQL);\n ps.setLong(1, user.getId());\n int result = ps.executeUpdate();\n if(result > 0) System.out.println(\"remoção do usuário \\\"\"+\n user.getName() + \"\\\", concluída com sucesso!\");\n else System.out.println(\"ID não cadastrado, verifique novamente...\");\n ps.close();\n }",
"void removeUser(String uid);",
"public void delete(User obj) {\n\t\t\n\t}",
"public void deleteUser(User u) {\n\t\tuserRepository.delete(u);\n\t}",
"public void deleteUser(String uid) throws Exception {\n\t\tString sql = \"delete from user where uid = ?\";\r\n\t\tObject[] params = { uid };\r\n\t\tdb.doPstm(sql, params);\r\n\t\tdb.closed();\r\n\t}",
"@Override\r\n\tpublic void delete(UserMain user) {\n\t\tusermaindao.delete(user);\r\n\t}",
"public void removeUser(User user) throws UserManagementException;",
"@Override\n public void delete(User user) {\n dao.delete(user);\n }",
"@Override\n\tpublic void delUser(String[] id) {\n\n\t}",
"@Delete({\r\n \"delete from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n int deleteByPrimaryKey(Integer user_id);",
"@Override\r\n\tpublic void delete(UserAccount userAccount) {\n\t\tConnection con = MysqlDatabase.getInstance().getConnection();\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(Delete);\r\n\t\t\tps.setInt(1, userAccount.getUser().getId());\r\n\t\t\tps.executeUpdate();\r\n\t\t\tcon.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void deleteUser(SPUser user, String tableName) { \n try {\n \t\t\tmyCon.execute(\"DELETE FROM \"+tableName+\" WHERE Username= '\"+ user.getUsername()+\"';\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n }",
"public void deleteUser(Long userID) {\n\t\t delete(userID);\r\n\t}",
"public void deleteUser(final Long id) {\n userRepository.deleteById(id);\n }",
"@Override\r\n\tpublic int deleteUser(String userId) {\n\t\treturn userMapper.deleteUser(userId);\r\n\t}",
"@Override\r\n\tpublic void deleteByIdUser(int id) {\n\t\tuserReposotory.deleteById(id);\r\n\t}",
"@Override\n\tpublic void eliminar() {\n\t\tLOG.info(\"Se elimino el usuario de la bd\");\n\t}",
"public User delete(User user);",
"@Override\n\tpublic int deleteUser(Integer id) {\n\t\treturn userDao.deleteUser(id);\n\t}",
"public void deleteUser(int id) {\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(db.DB.connectionString, db.DB.user, db.DB.password);\n Statement stmt = conn.createStatement();\n stmt.executeUpdate(\"delete from users where id_user = \" + id);\n int idx = 0;\n for (int i = 0; i < allUsers.size(); i++) {\n if (allUsers.get(i).getId() == id) {\n idx = i;\n }\n }\n allUsers.remove(idx);\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"User deleted\", null);\n FacesContext.getCurrentInstance().addMessage(null, msg);\n } catch (SQLException ex) {\n Logger.getLogger(UserController.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n clear();\n try {\n conn.close();\n } catch (Exception e) {\n /* ignored */ }\n }\n }"
] | [
"0.8310827",
"0.8137065",
"0.8047431",
"0.80393016",
"0.801543",
"0.80139816",
"0.8010507",
"0.797415",
"0.7962837",
"0.7958931",
"0.7955162",
"0.79320264",
"0.7929311",
"0.78894794",
"0.78689283",
"0.7855704",
"0.7854756",
"0.7792027",
"0.7771958",
"0.7767561",
"0.7757925",
"0.77563775",
"0.77523243",
"0.7743396",
"0.7738871",
"0.7727479",
"0.77256906",
"0.7725099",
"0.77183336",
"0.7700036",
"0.7699053",
"0.7696999",
"0.7685722",
"0.7684016",
"0.7678845",
"0.76769257",
"0.76705194",
"0.765567",
"0.7655149",
"0.76543725",
"0.7640419",
"0.76299614",
"0.7627889",
"0.76141846",
"0.7607899",
"0.7604846",
"0.7602682",
"0.7587553",
"0.7567853",
"0.7565422",
"0.753812",
"0.7535115",
"0.75319564",
"0.7526904",
"0.7508655",
"0.7505545",
"0.7498823",
"0.7494597",
"0.7488441",
"0.7469073",
"0.7459622",
"0.745624",
"0.745624",
"0.7455304",
"0.74493396",
"0.7446722",
"0.7446095",
"0.74310607",
"0.74267656",
"0.742567",
"0.7421986",
"0.74167246",
"0.74104875",
"0.741015",
"0.74067515",
"0.739694",
"0.73904014",
"0.7386337",
"0.73853725",
"0.7361441",
"0.7349961",
"0.73431283",
"0.73364294",
"0.7333094",
"0.73293513",
"0.7326648",
"0.73120946",
"0.7305929",
"0.7303122",
"0.7288383",
"0.7287414",
"0.7267094",
"0.72638524",
"0.7256175",
"0.725381",
"0.725318",
"0.72512025",
"0.72414213",
"0.72331357",
"0.722743",
"0.72181207"
] | 0.0 | -1 |
getUsers: Muestra los datos de todos los usuarios registrados en la BBDD | @Override
@Transactional(readOnly = true)
public List<UserDto> getUsers() {
List<UserEntity> userEntities = userRepository.findAll();
List<UserDto> userDTOs = new ArrayList<>();
for (UserEntity u : userEntities)
userDTOs.add(etd.getUser(u));
return userDTOs;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List getAllUsers();",
"java.util.List<com.heroiclabs.nakama.api.User> \n getUsersList();",
"List<User> getUsers();",
"List<User> getUsers();",
"public List<User> getAllUsers();",
"public static List<User> getUsersList(){\n\t\tWSResponse response = null;\n\t\tList<User> resultList = new ArrayList<User>();\n\t\ttry{\n\t\tPromise<WSResponse> result = WS.url(Utils.getApiUrl()+Urls.GET_USERS_URL)\n\t\t\t\t\t\t\t\t\t\t.setContentType(Urls.CONTENT_TYPE_JSON)\n\t\t\t\t\t\t\t\t\t\t.get();\n\t\tresponse = result.get(10000);\n\t\tGson gson = new Gson();\n\t\tUser[] users = gson.fromJson(response.getBody(), User[].class);\n\t\tfor(int i=0; i<users.length; i++){\n\t\t\tresultList.add(users[i]);\n\t\t}\n\t\t} catch(Exception exception){\n\t\t\tController.flash(Messages.ERROR, Messages.CANT_LOAD_USERS + exception);\n\t\t}\n\t\treturn resultList;\n\t}",
"public void getAllUsers() {\n\t\t\n\t}",
"@Override\n\tpublic List<Object> getAllUsers() {\n\t\tList<Object> usersList = new ArrayList<Object>();\n\t\tList<TestUser> users = dao.getAll();\n\t\tSystem.out.println(dao.exists(5));\n\t\tfor(TestUser user : users){\n\t\t\tMap<String,Object> m = new HashMap<String,Object>();\n\t\t\tm.put(\"id\", user.getId());\n\t\t\tm.put(\"name\", user.getUsername());\n\t\t\tm.put(\"pwd\", user.getPassword());\n\t\t\tJSONObject j = new JSONObject(m);\n\t\t\tusersList.add(j);\n\t\t}\n\t\treturn usersList;\n\t}",
"List<User> getAllUsers();",
"List<User> getAllUsers();",
"public List<YuserVO> getAllUsers() {\n\t\tList<YuserVO> list = null;\n\t\t\ttry {\n\t\t\t\tlist = userDao.getAllUsers();\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.out.println(\"get users failed ..................................\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\treturn list;\n\t}",
"java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();",
"java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();",
"public List<User> getAllUsers(){\n myUsers = loginDAO.getAllUsers();\n return myUsers;\n }",
"public List<User> getUsers();",
"public List<Users> getAllUsers() {\r\n\t\t// return usDao.findAll();\r\n\t\treturn usDao.getAllUsers();\r\n\t}",
"@Override\n public Users getUsers() throws UserException {\n Users users = new Users();\n log.debug(\"getUsers\");\n User user = null;\n ResultSet result;\n Connection conn = null;\n PreparedStatement stm = null;\n try {\n conn = provider.getConnection();\n\n stm = conn.prepareStatement(GET_ALL_USERS);\n result = stm.executeQuery();\n\n while (result.next()) {\n user = buildUserFromResult(result);\n log.debug(\"User found {}\", user);\n users.add((DataUser) user);\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n throw new UserException(e.getMessage());\n\n } finally {\n try {\n stm.close();\n conn.close();\n } catch (Exception e) {\n\n e.printStackTrace();\n }\n }\n return users;\n }",
"private void getAllUsers(){\n\t\t\n\t\tSystem.out.println(\"Retrieving Social Graph Data from tibbr...\"); \n\t\tDefaultHttpClient httpClient = new DefaultHttpClient();\n\n\t\tString params = \"?sort=firstNameAsc&fields=name,jive.username,-resources&count=5000&startIndex=0\"; \n\t\tHttpGet getRequest = new HttpGet(urlBase+\"/api/core/v3/people/@all\"+params);\n\t\t\n\n\t\t\t \n\t\tgetRequest.setHeader(\"Authorization\", \"Basic \" + this.auth);\n\t\t\n\t\t\t\n\t\ttry {\n\t\t\tHttpResponse response = httpClient.execute(getRequest);\n\t\t\tString jsonOut = readStream(response.getEntity().getContent());\n\t\t // Remove throwline if present\n\t\t\tjsonOut = removeThrowLine(jsonOut);\n\t\t getAllUserElements(jsonOut);\n\t\t \n\t \n\t\t} catch (ClientProtocolException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}",
"List<KingdomUser> getUsers();",
"public static ArrayList<Userdatas> getAllUsersList() {\n\t\tRequestContent rp = new RequestContent();\n\t\trp.type = RequestType.GET_ALL_USERS;\n\t\tReceiveContent rpp = sendReceive(rp);\n\t\tArrayList<Userdatas> anagList = (ArrayList<Userdatas>) rpp.parameters[0];\n\t\treturn anagList;\n\t}",
"List<KingdomUser> getAllUsers();",
"public List<User> ObtenerTodosUsuarios() throws BLException;",
"@ApiOperation(value = \"Retourne tous utilisateurs de la BD\")\n @GetMapping(\"/users\")\n @ResponseBody\n public ResponseEntity<Collection<User>> getUsers(){\n Collection<User> users = userService.findAll();\n if (users == null)\n return new ResponseEntity<>(HttpStatus.FORBIDDEN);\n return new ResponseEntity<>(users,HttpStatus.OK);\n }",
"public ArrayList<User> getAllUsersBD() {\n ArrayList<User> users = new ArrayList<>();\n Cursor cursor = this.db.query(TABLE_USER, new String[]{ID_USER, USERNAME, AUTH_KEY, PASSWORD_HASH, EMAIL, STATUS, DATA_REGISTO, DATA_ATUALIZADO},\n null, null, null, null, null);\n\n if (cursor.moveToFirst()) {\n do {\n User auxUser = new User(cursor.getInt(0),\n cursor.getString(1), cursor.getString(2),\n cursor.getString(3), cursor.getString(4),\n cursor.getInt(5), cursor.getInt(6),\n cursor.getInt(7));\n users.add(auxUser);\n } while (cursor.moveToNext());\n }\n cursor.close();\n\n return users;\n }",
"public List<UserDTO> getUsers();",
"public List<Users> getUserList(){\n\t\tList<Users> users = (List<Users>) this.userDao.findAll();\n\t\treturn users;\n\t}",
"@Override\n public List<User> selectAllUsers() {\n\n List<User> userList = new ArrayList<>();\n\n try (Connection connection = DriverManager.getConnection(URL, USERNAME, PASSWORD)) {\n\n String sql = \"SELECT * FROM ers_users\";\n\n PreparedStatement ps = connection.prepareStatement(sql);\n\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n\n userList.add(\n new User(\n rs.getInt(1)\n , rs.getString(2)\n , rs.getString(3)\n , rs.getString(4)\n , rs.getString(5)\n , rs.getString(6)\n , rs.getInt(7)\n )\n );\n }\n }\n\n catch (SQLException e) {\n\n e.printStackTrace();\n }\n\n return userList;\n }",
"public List listUsers() {\n Session session = HibernateSessionFactory.getSessionFactory().openSession();\n Transaction tx = null;\n List users = null;\n try {\n tx = session.beginTransaction();\n users = session.createQuery(\"FROM User\").list();\n for (Iterator iterator = users.iterator(); iterator.hasNext(); ) {\n User user = (User) iterator.next();\n System.out.print(\"id: \" + user.getId());\n System.out.print(\" Username: \" + user.getUsername());\n System.out.print(\" Password: \" + user.getPassword());\n System.out.println(\" Email: \" + user.getEmail());\n }\n tx.commit();\n } catch (HibernateException e) {\n if (tx != null) tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n return users;\n }",
"public List<TestUser> getAllUsers(){\n\t\tSystem.out.println(\"getting list of users..\");\n\t\tList<TestUser> user=new ArrayList<TestUser>();\n\t\tuserRepositary.findAll().forEach(user::add);\n\t\t//System.out.println(\"data: \"+userRepositary.FindById(\"ff80818163731aea0163731b190c0000\"));\n\t\treturn user;\n\t}",
"public List<NguoiNhap> getAllUsers() throws SQLException {\r\n rs = connectionAdmin(\"SELECT * FROM USER\");\r\n List<NguoiNhap> listUsers;\r\n if (rs != null) {\r\n\r\n listUsers = new ArrayList<NguoiNhap>() {\r\n {\r\n while (rs.next()) {\r\n add(new NguoiNhap(rs.getString(\"username\"), rs.getString(\"password\"), rs.getString(\"ten\"), rs.getString(\"gioitinh\"), rs.getString(\"ngaysinh\")));\r\n }\r\n rs.close();\r\n stm.close();\r\n con.close();\r\n }\r\n };\r\n\r\n return listUsers;\r\n }\r\n\r\n return null;\r\n }",
"public String[] listUsers();",
"List<UserDTO> getAllUsers();",
"com.heroiclabs.nakama.api.User getUsers(int index);",
"@Nonnull\n List<User> getUsers();",
"Iterable<User> getAllUsers();",
"public ArrayList<UserDetail> gettingAllAvailableUsers() throws Exception;",
"@GetMapping(\"/users\")\n\tpublic ResponseEntity<List<User>> getUsers() {\n\t\tlog.debug(\"REST request to get all Users\");\n\t\treturn new ResponseEntity<List<User>>(userService.getAll(), HttpStatus.OK);\n\t}",
"public static List<User> getAllUsers(){\n\t\t// getting all users\n\t\treturn dao.getAllUsers();\n\t}",
"public List getUsers(User user);",
"@GetMapping(\"/users\")\n @PreAuthorize(\"hasRole('Admin')\")\n public SuccessResponse<List<UserResponse>> getUsers() {\n if(!connectionService.isReachable()) {\n String exceptionMessage = \"Cannot connect to database.\";\n System.out.println(exceptionMessage);\n throw new DatabaseException(exceptionMessage);\n }\n\n final var users = userService\n .findAllUsers()\n .stream()\n .map(UserResponse::fromUser)\n .collect(Collectors.toList());\n return new SuccessResponse<>(users);\n }",
"@ApiResponses(value = {\n\t\t\t@ApiResponse(responseContainer = \"List\", response = User.class, code = 200, message = \"接口正常\"),\n\t\t\t@ApiResponse(code = 401, message = \"\"), @ApiResponse(code = 405, message = \"权限有问题\"),\n\t\t\t@ApiResponse(code = 500, message = \"后台报错了\") })\n\t@ApiOperation(value = \"listUsers\", httpMethod = \"GET\", notes = \"查找用户列表\")\n\t@RequestMapping(value = \"/user/listUsers\", method = RequestMethod.GET)\n\t@ResponseBody\n\tpublic List<User> listUsers() {\n\t\tList<User> users = new ArrayList<User>();\n\t\tUser user01 = new User(100L, \"name 1\", \"pwd 1\", \"email 1\", \"telephone 1\", \"address 1\");\n\t\tUser user02 = new User(100L, \"name 2\", \"pwd 1\", \"email 1\", \"telephone 1\", \"address 1\");\n\n\t\tif (users.size() == 0) {\n\t\t\tlogger.error(\"没有用户数据\");\n\t\t}\n\t\tusers.add(user01);\n\t\tusers.add(user02);\n\t\treturn users;\n\t}",
"@Override\r\n\tpublic List<User> getUsers() {\n\t\tList<User> userlist=dao.getUsers();\r\n\t\treturn userlist;\r\n\t}",
"@GET\n\t@Path(\"/allUsers\")\n\t@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })\n\tpublic Map<String, List<User>> getUser() throws JsonGenerationException, JsonMappingException, IOException {\n\t\t\n\t\tMap<String, List<User>> user = userDao.getUser();\n\t\t\n\t\treturn user; \n\t}",
"@Override\r\n\tpublic List<User> users() {\r\n\t\tList<User> ris = new ArrayList<>();\r\n\t\tList< Map <String,String>> maps = getAll(SELECT_USERS);\r\n\t\tfor (Map<String, String> map : maps) {\r\n\t\t\tris.add(IMappable.fromMap(User.class, map));\r\n\t\t}\r\n\t\treturn ris;\r\n\t}",
"@POST(\"/ListUsers\")\n\tCollection<User> listUsers();",
"@GetMapping\n public List<User> getAllUsers() {\n return userService.getAllUsers();\n }",
"public List<Usuario> getAllUsuarios(){\r\n List<Usuario> users = new ArrayList<Usuario>();\r\n try{\r\n PreparedStatement ps = bd.prepareStatement(SQLALL);\r\n ResultSet rs = ps.executeQuery();\r\n while(rs.next()){\r\n Usuario u = new Usuario();\r\n u.setId(rs.getInt(\"id\"));\r\n u.setUsuario(rs.getString(\"usuario\"));\r\n u.setNome(rs.getString(\"nome\"));\r\n u.setEmail(rs.getString(\"email\"));\r\n u.setSenha(rs.getString(\"senha\"));\r\n u.setPin(rs.getString(\"pin\"));\r\n u.setUrlfoto(rs.getString(\"urlfoto\"));\r\n u.setAcesso(rs.getTimestamp(\"acesso\"));\r\n u.setAdmin(rs.getInt(\"admin\"));\r\n users.add(u);\r\n }\r\n rs.close();\r\n ps.close();\r\n ConexaoBD.fechar(bd);\r\n } catch(SQLException sqle){\r\n System.out.println(\"Erro no getAllUsuarios no DAO: \" + sqle.getMessage());\r\n }\r\n return users;\r\n }",
"com.rpg.framework.database.Protocol.User getUsers(int index);",
"com.rpg.framework.database.Protocol.User getUsers(int index);",
"@GET\n @Path(\"/users\")\n @Produces(\"application/json\")\n public Response getUsersBatch() throws JsonProcessingException {\n LOG.info(\"Batch of users requested.\");\n @NotNull final List<UserEntity> loginUserList = DatabaseAccessLayer.getLoginUserList();\n return Response.ok(new UserBatchHolder(loginUserList).writeJson()).build();\n }",
"@GetMapping\n public ResponseEntity<List<UserEntity>> getAllUsers() {\n return ResponseEntity.ok(uService.getAllUsers());\n }",
"@Override\n\tpublic List<User> getAllUsers() {\n\t\tlog.info(\"get all users!\");\n\t\treturn userRepository.findAll();\n\t}",
"public String ListUsers(){\r\n StringBuilder listUsers = new StringBuilder();\r\n for (Utente u: utenti) { // crea la lista degli utenti registrati al servizio\r\n listUsers.append(u.getUsername()).append(\" \");\r\n \tlistUsers.append(u.getStatus()).append(\"\\n\");\r\n }\r\n return listUsers.toString(); \r\n }",
"protected void getUserList() {\n\t\tmyDatabaseHandler db = new myDatabaseHandler();\n\t\tStatement statement = db.getStatement();\n\t\t// db.createUserTable(statement);\n\t\tuserList = new ArrayList();\n\t\tsearchedUserList = new ArrayList();\n\t\tsearchedUserList = db.getUserList(statement);\n\t\tuserList = db.getUserList(statement);\n\t\tusers.removeAllElements();\n\t\tfor (User u : userList) {\n\t\t\tusers.addElement(u.getName());\n\t\t}\n\t}",
"@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}",
"@Override\n\tpublic List<Users> getAll() {\n\t\treturn usersDAO.getAll();\n\t}",
"public List<User> getAllUsers() {\n\n\t\tList<User> result = new ArrayList<User>();\n\n\t\ttry {\n\t\t\tjava.sql.PreparedStatement ps = ((org.inria.jdbc.Connection) db).prepareStatement(TCell_QEP_IDs.QEP.EP_getAllUsers);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tString query = \"SELECT IdGlobal, TCELLIP, PUBLICKEY, TCELLPORT from USER\";\n\t\t\tSystem.out.println(\"Executing query : \" + query);\t\t\t\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tint UserGID =rs.getInt(1);\n\t\t\t\tString TCellIP = rs.getString(2);\n\t\t\t\t\n\t\t\t\t//convert Blob to String\n\t\t\t\tBlob myPubKeyBlob = rs.getBlob(3);\n\t\t\t\tbyte[] bPubKey = myPubKeyBlob.getBytes(1, (int) myPubKeyBlob.length());\n\t\t\t\tString pubKey = new String(bPubKey);\n\t\t\t\t\n\t\t\t\tint port = rs.getInt(4);\n\t\t\t\tUser user = new User(UserGID,TCellIP, port, pubKey);\n\t\t\t\tresult.add(user);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t// Uncomment when the close function will be implemented\n\t\t\t// attemptToClose(ps);\n\t\t\t\n\t\t}\n\n\t\treturn result;\n\n\t}",
"public List<User> getAllUsers() {\n return users;\n }",
"public static String[] getAllUsers(Context context) {\r\n\r\n\t\tUri contentUri = Uri.withAppendedPath(EquestProvider.CONTENT_URI,\r\n\t\t\t\tEquestDbHelper.USER_TABLE);\r\n\t\tCursor cursor = context.getContentResolver().query(contentUri,\r\n\t\t\t\tnew String[] { EquestDbHelper.USERID }, null, null, null);\r\n\t\tint x = cursor.getCount();\r\n\t\tif (x == 0)\r\n\t\t\treturn new String[] { \"None Found\" };\r\n\t\tString Users[] = new String[x];\r\n\t\tint i = 0;\r\n\t\tif (cursor.moveToFirst()) {\r\n\t\t\tdo {\r\n\t\t\t\tUsers[i] = cursor.getString(cursor\r\n\t\t\t\t\t\t.getColumnIndex(EquestDbHelper.USERID));\r\n\t\t\t\ti++;\r\n\t\t\t} while (cursor.moveToNext());\r\n\t\t}\r\n\r\n\t\treturn Users;\r\n\t}",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"@RequestMapping(value = \"get_all_users\", headers = \"Accept=*/*\", method = {\n\t\t\tRequestMethod.GET }, produces = \"application/json\")\n\t@ResponseBody\n\[email protected](User.class)\n\tpublic User[] getAllUsers() {\n\t\tArrayList<User> users = new ArrayList<>();\n\t\tMongoClient mongoClient = null;\n\t\ttry {\n\t\t\t// Create Mongo client\n\t\t\tmongoClient = new MongoClient(\"localhost\", 27017);\n\t\t\tMongoDatabase db = mongoClient.getDatabase(\"projectDB\");\n\n\t\t\t// Create Users collection\n\t\t\tMongoCollection<Document> collection = db.getCollection(\"USERS\");\n\t\t\tFindIterable<Document> iterDoc = collection.find();\n\n\t\t\t// Create all users collection\n\t\t\tint i = 1;\n\t\t\tIterator it = iterDoc.iterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tDocument docUser = (Document) it.next();\n\t\t\t\tUser user = new User((String) docUser.get(\"username\"), (String) docUser.get(\"firstName\"),\n\t\t\t\t\t\t(String) docUser.get(\"lastName\"));\n\t\t\t\tusers.add(user);\n\t\t\t}\n\n\t\t\t// Close DB connection\n\t\t\tmongoClient.close();\n\n\n\t\t} catch (Exception e) {\n\t\t\tmongoClient.close();\n\t\t\tSystem.out.println(e);\n\t\t}\n\n\t\t// Insert list to array\n\t\tUser[] usersArray = new User[users.size()];\n\t\tusers.toArray(usersArray);\n\t\treturn usersArray;\n\t}",
"@Override\n public List<User> getAllUsers() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n List<User> hiberusers =\n session.createQuery(\"From User\").list();\n tx.commit();\n session.close();\n return hiberusers;\n }",
"@GetMapping(\"/allusers\")\n\t@Secured({CommonConstants.ROLE_EMPLOYEE,CommonConstants.ROLE_ADMIN})\n\tpublic ResponseEntity<List<UserEntity>> fetchUsers(){\n\t\treturn new ResponseEntity<List<UserEntity>>(this.service.findAll(), HttpStatus.OK);\n\t}",
"public List<User> getAllUsers() {\n\t\tLog.i(TAG, \"return all users list.\");\n\t\tList<User> result = new ArrayList<User>();\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tString getUsers = \"select * from \" + TABLE_USER;\n\t\tCursor cursor = db.rawQuery(getUsers, null);\n\t\tfor (cursor.moveToFirst();!cursor.isAfterLast();cursor.moveToNext()) {\n\t\t\tUser user = new User(cursor.getInt(0), cursor.getString(1), cursor.getString(2));\n\t\t\tresult.add(user);\n\t\t}\n\t\treturn result;\n\t}",
"public List<User> queryAllUsers() {\n \tList<User> userList = new ArrayList<>();\n\tUser user;\n String sql = \"SELECT * FROM users\";\n\ttry {\t\n this.statement = connection.prepareStatement(sql);\n this.resultSet = this.statement.executeQuery();\n while(this.resultSet.next()) {\n\t\tuser = new User();\n user.setUserName(this.resultSet.getString(\"user_name\"));\n user.setHashedPassword(this.resultSet.getString(\"hashed_password\"));\n\t\tuser.setEmail(this.resultSet.getString(\"email\"));\n user.setHashedAnswer(this.resultSet.getString(\"hashed_answer\"));\n user.setIsActivated(this.resultSet.getInt(\"is_activated\"));\n user.setPublicKey(this.resultSet.getString(\"pubkey\"));\n\t\tuserList.add(user);\n }\t\n this.statement.close();\n\t} \n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return userList;\n }",
"public String listUsers(){\n \tStringBuilder sb = new StringBuilder();\n \tif(users.isEmpty()){\n \t\tsb.append(\"No existing Users yet\\n\");\n \t}else{\n \t\tsb.append(\"Meeting Manager Users:\\n\");\n \t\tfor(User u : users){\n \t\t\tsb.append(\"*\"+u.getEmail()+\" \"+ u.getPassword()+\" \\n\"+u.listInterests()+\"\\n\");\n \t\t}\n \t}\n \treturn sb.toString();\n }",
"@Override\n\tpublic String DBgetAllUsers() {\n\t\tList<User> list = userRepository.getAll();\n\t\treturn dataToJson(list);\n\t}",
"@RequestMapping(value = \"/users\", method = RequestMethod.GET)\n public ResponseEntity getUsers() {\n logger.debug(\"HTTP GET /users called\");\n List<User> userList = userService.getUsers(0.00, 4000.00);\n\n return new ResponseEntity(new UserResponse(userList), HttpStatus.OK);\n }",
"@GetMapping(\"/userslist\")\n\tpublic List<User> usersList() {\n\t\treturn userService.usersList();\n\t}",
"public ArrayList<String> getAllUsers() {\n\t\tSystem.out.println(\"Looking up all users...\");\n\t\treturn new ArrayList<String>(users.keySet());\t\n\t}",
"Collection<User> getUsers() throws DataAccessException;",
"@Override\n\tpublic List<ERSUser> getAllUsers() {\n\t\treturn userDao.selectAllUsers();\n\t}",
"public List<Utilizator> listUsers();",
"private void listUsers(Request request, Response response) {\r\n\t\tList<UserBean> userList = null;\r\n\r\n\t\ttry {\r\n\t\t\tuserList = userService.findUsers();\r\n\t\t} catch (Exception e) {\r\n\t\t\tresponse.setStatus(Status.SERVER_ERROR_INTERNAL, e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t\tlog.error(e);\r\n\t\t} finally {\r\n\t\t\txmlSerializationService.generateXMLResponse(request, response,\r\n\t\t\t\t\tuserList);\r\n\t\t}\r\n\t}",
"@GetMapping(\"/\")\n\tpublic ResponseEntity<List<UsersDTO>> listAllusers(){\n\t\tList<UsersDTO> users = userJpaRepository.findAll();\n\t\tif(users.isEmpty()) {\n\t\t\treturn new ResponseEntity<List<UsersDTO>>(HttpStatus.NO_CONTENT);\n\t\t}\n\t\treturn new ResponseEntity<List<UsersDTO>>(users, HttpStatus.OK);\n\t}",
"@RequestMapping(value = \"/getAll\", method = RequestMethod.GET)\n public ResponseEntity getAllUsers() {\n List<User> users = userService.getAllUsers();\n if (CollectionUtils.isEmpty(users)) {\n return new ResponseEntity(HttpStatus.NO_CONTENT);\n }\n return new ResponseEntity(users, HttpStatus.OK);\n }",
"public List<User> getAllUsers() {\n List<User> users = null;\n Session session = null;\n try {\n session = openSession();\n users = session.createCriteria(User.class).list();\n } catch (HibernateException he) {\n logger.error(\"Hibernate Exception: \" + he);\n } catch (Exception e) {\n logger.error(\"Exception: \" + e);\n } finally {\n if (session != null) {\n session.close();\n }\n }\n return users;\n }",
"@Override\r\n\tpublic List<User> getAll() {\n\t\treturn users;\r\n\t}",
"@Override\n public ObservableList<User> getAllUsers() {\n return controller.getAllUsers();\n }",
"public List<User> getAllUsers() {\n\t\tfactory = new Configuration().configure().buildSessionFactory();\n\t\tsession = factory.getCurrentSession();\n\t\tsession.beginTransaction();\n\t\tQuery query = session.createQuery(\"from User\");\n\t\tList<User> list = query.getResultList();\n\t\tsession.close();\n\t\treturn list;\n\n\t\t\n\t}",
"public List<PojoUser> getUsers() {\n\t\tList<PojoUser> pojoUsers = new ArrayList<PojoUser>();\n\t\tfor (User u : repo.getUsers()) {\n\t\t\t\n\t\t\tPojoUser pojo = new PojoUser();\n\t\t\tpojo.setFullName(u.getFullName());\n\t\t\tpojo.setMail(u.getEmail());\n\t\t\t\n\t\t\tpojoUsers.add(pojo);\n\t\t}\n\t\treturn pojoUsers;\n\t}",
"public static ArrayList<User> selectUsers() {\n \n ArrayList<User> users = new ArrayList<>();\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n\n String query = \"SELECT * FROM users \";\n \n try {\n ps = connection.prepareStatement(query);\n rs = ps.executeQuery();\n ResultSetMetaData mD = rs.getMetaData();\n int colCount = mD.getColumnCount();\n User user = null;\n \n for (int i = 0; i < colCount; i++) {\n if (rs.next()) {\n user = new User();\n user.setUserID(rs.getInt(\"userID\"));\n user.setFirstName(rs.getString(\"firstName\"));\n user.setLastName(rs.getString(\"lastName\"));\n user.setEmail(rs.getString(\"email\"));\n user.setAddr1(rs.getString(\"addr1\"));\n user.setAddr2(rs.getString(\"addr2\"));\n user.setCity(rs.getString(\"city\"));\n user.setStateRegion(rs.getString(\"state\"));\n user.setZipcode(rs.getInt(\"zip\"));\n user.setCountry(rs.getString(\"country\"));\n user.setRoleName(rs.getString(\"roleName\"));\n System.out.println(user.getFirstName());\n users.add(user);\n }\n }\n return users;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }",
"public List getUsuarios();",
"public List<Usuario> obtenerListaUsuariosActivos(){\n return usuarioBean.obtenerListaUsuariosActivos();\n }",
"public List<User> listUsers(String userName);",
"@GetMapping(\"/users\")\n\tpublic List<User> retrieveAllUsers() {\n\t\treturn userService.findAll();\n\t}",
"List<Usuario> obtenerUsuarios() throws Exception;",
"public void getUsers() {\n CollectionReference ref = FirebaseFirestore.getInstance().collection(\"users\");\n listOfUsers = new ArrayList<>();\n\n ref.get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n if(task.isSuccessful()) {\n for(DocumentSnapshot doc: task.getResult()) {\n listOfUsers.add(doc.toObject(User.class).getUserID());\n }\n listOfUsers.remove(user.getUserID());\n }\n }\n });\n }",
"public static ObservableList<User> getUsers() throws SQLException {\n db.init();\n String q1 = \"{call [sp_retrieveUsers]}\";\n ObservableList<User> userList = FXCollections.observableArrayList();\n ResultSet rs = null;\n try {\n rs = db.callableStatementRs(q1);\n } catch (SQLException ex) {\n System.out.println(\"An error occured: \" + ex);\n }\n\n if (rs != null) {\n try {\n while (rs.next()) {\n User user = new User();\n user.setUserId(Integer.toString(rs.getInt(\"user_id\")));\n user.setFirstName(rs.getString(\"first_name\"));\n user.setLastName(rs.getString(\"last_name\"));\n user.setEmail(rs.getString(\"email\"));\n user.setUsername(rs.getString(\"username\"));\n user.setCrewId(Integer.toString(rs.getInt(\"crewId\")));\n\n userList.add(user);\n }\n } catch (SQLException ex) {\n System.out.println(\"An exception occured: \" + ex);\n log.error(ex.toString());\n }\n }\n return userList;\n }",
"@Override\n\tpublic List<ERS_USERS> getAll() {\n\t\treturn null;\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getUsers() \r\n\t{\n\t\tSession session = sessionFactory.getCurrentSession();\r\n String sql = \"select * from users\";\r\n Query query = session.createSQLQuery(sql).addEntity(User.class);\r\n\t\tSystem.out.println(\"getUsers list is : \" + query.list().size());\r\n\t\treturn query.list();\r\n\t}",
"@GetMapping(\"/users\")\n\tpublic List<User> getUsers(){\n\t\treturn userRepository.findAll();\n\t\t\n\t}",
"@RequestMapping(value = \"/users/list\", method = RequestMethod.GET)\n\tpublic @ResponseBody List<UsersDTO> findAllUsers() {\n\t\tlogger.info(\"Return All Users.\");\t\n\t\treturn (List<UsersDTO>) usersService.findAllUsers();\n\t}",
"@Override\r\n public List<User> darUsers() {\r\n Query q = em.createQuery(\"SELECT u FROM UserEntity u\");\r\n List<UserEntity> l = q.getResultList();\r\n List<User> ltr = new ArrayList();\r\n for(UserEntity te: l)\r\n {\r\n ltr.add(TransformadorEntityDto.getInstance().entityADtoUser(te));\r\n }\r\n return ltr;\r\n }",
"public List<String> getUserList() throws Exception {\n\t\tString result = null;\n\t\tArrayList<String> userList = new ArrayList<String>();\n\t\tString adminToken = this.loginAAA(this.adminUsername,\n\t\t\t\tthis.adminPassword);\n\t\tHttpURLConnection httpConn;\n\t\thttpConn = this.setHttpConnection(openAMLocation\n\t\t\t\t+ \"/json/users?_queryID=*\");\n\t\tthis.setHttpTokenInCookie(httpConn, adminToken);\n\t\tthis.setGetHttpConnection(httpConn);\n\n\t\tBufferedReader br = this.getHttpInputReader(httpConn);\n\t\tString str;\n\t\tStringBuffer sb = new StringBuffer();\n\n\t\twhile ((str = br.readLine()) != null) {\n\t\t\tsb.append(str);\n\t\t}\n\n\t\tif (httpConn.getResponseCode() == 200) {\n\t\t\tresult = sb.toString();\n\t\t\tJSONObject JsonObj = new JSONObject(result);\n\t\t\tJSONArray userArray;\n\t\t\tif (JsonObj.has(\"result\")) {\n\t\t\t\tuserArray = JsonObj.getJSONArray(\"result\");\n\t\t\t\tif (userArray != null) {\n\n\t\t\t\t\tfor (int i = 0; i < userArray.length(); i++) {\n\t\t\t\t\t\tString userAccount = userArray.getString(i);\n\t\t\t\t\t\t// System.out.println(userAccount);\n\t\t\t\t\t\tif (!userAccount.equalsIgnoreCase(\"quanta\")\n\t\t\t\t\t\t\t\t&& !userAccount.equalsIgnoreCase(\"mcumanager\")\n\t\t\t\t\t\t\t\t&& !userAccount.equalsIgnoreCase(\"rtpproxy1\")\n\t\t\t\t\t\t\t\t&& !userAccount.equalsIgnoreCase(\"rtpproxy2\")\n\t\t\t\t\t\t\t\t&& !userAccount.equalsIgnoreCase(\"amAdmin\")\n\t\t\t\t\t\t\t\t&& !userAccount.equalsIgnoreCase(\"thcadmin\")\n\t\t\t\t\t\t\t\t&& !userAccount.equalsIgnoreCase(\"cmpadmin\")\n\t\t\t\t\t\t\t\t&& !userAccount.equalsIgnoreCase(\"anonymous\"))\n\t\t\t\t\t\t\tuserList.add(userAccount);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tlogger.error(\"read User List fail, response: {}\", sb.toString());\n\t\t}\n\t\tbr.close();\n\t\t\n\t\tif (adminToken != null) {\n\t\t\tthis.logoutAAA(adminToken);\n\t\t}\n\t\treturn userList;\n\n\t}",
"public List<User> getAllUsers() {\n\t\tEntityManager entityManager = HandleConnectionToDB.getEntityManager();\n\t\tentityManager.getTransaction().begin();\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<User> users = entityManager.createQuery(\"from User\").getResultList();\n\t\tif (users.size() > 0) {\n\t\t\tusers.get(0).getFriendList().size();\n\t\t\tusers.get(0).getUserLobby().size();\n\t\t\tusers.get(0).getFriendList().size();\n\t\t}\n\t\tentityManager.getTransaction().commit();\n\n\t\tHandleConnectionToDB.closeEntityManager();\n\t\treturn users;\n\n\t}",
"Collection<GetUserDto> getAllUsers();",
"public static ArrayList<User> getUsers() {\n users = new ArrayList<User>();\n /*users.add(new User(\"Парковый Гагарина 5а/1\", \"срочный\", \"общий\"));\n users.add(new User(\"Алексеевские планы Ореховая 15 возле шлагбаума\", \"срочный\", \"общий\"));\n users.add(new User(\"Фастовецкая Азина 26\", \"срочный\", \"индивидуальный\"));*/\n //users.add(new User(MainActivity.adres.get(0), \"срочный\", \"общий\"));\n users.add(new User(\"Нет заказов\",\"срочный\",\"общий\"));\n return users;\n }",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}",
"@Override\n\tpublic List<User> get() {\n\t\tList<User> result = new ArrayList<>();\n\t\tfor (String key : userlist.keySet()) {\n\t\t\tUser user = userlist.get(key);\n\t\t\tint dni = user.getDni();\n\t\t\tString name = user.getName();\n\t\t\tString secondName = user.getSecondName();\n\t\t\tString username = user.getUser();\n\t\t\tString pass = user.getPass();\n\t\t\tresult.add(new User(dni, name, secondName, username, pass));\n\t\t}\n\t\treturn result;\n\t}"
] | [
"0.78470135",
"0.7592341",
"0.7558873",
"0.7558873",
"0.7523947",
"0.74917644",
"0.7491098",
"0.74889386",
"0.7467897",
"0.7467897",
"0.7450668",
"0.74199986",
"0.7419615",
"0.73916566",
"0.7318815",
"0.7318316",
"0.73168504",
"0.73166364",
"0.72908723",
"0.7264907",
"0.72307515",
"0.72077376",
"0.7192419",
"0.71895254",
"0.7139418",
"0.7134365",
"0.71315503",
"0.7121766",
"0.7121137",
"0.71196735",
"0.7113707",
"0.71023715",
"0.7093449",
"0.7088389",
"0.70824975",
"0.7075849",
"0.7073215",
"0.70625514",
"0.7059886",
"0.70581114",
"0.7054312",
"0.7053078",
"0.7053011",
"0.7042172",
"0.7038263",
"0.7027387",
"0.70213693",
"0.7013922",
"0.70132965",
"0.70105004",
"0.70063454",
"0.70011157",
"0.6996963",
"0.69954425",
"0.69856274",
"0.697924",
"0.69738215",
"0.69658387",
"0.69648665",
"0.6959814",
"0.6957898",
"0.69557554",
"0.6951323",
"0.6946518",
"0.69308674",
"0.69271445",
"0.6921294",
"0.691845",
"0.6918096",
"0.6910014",
"0.6908577",
"0.69054556",
"0.68949443",
"0.68896437",
"0.6888206",
"0.68848467",
"0.68749654",
"0.6872047",
"0.6871255",
"0.6866839",
"0.6865998",
"0.6859082",
"0.684344",
"0.683889",
"0.68384415",
"0.6834028",
"0.6831254",
"0.682852",
"0.6827418",
"0.68268424",
"0.6825188",
"0.682261",
"0.6821254",
"0.68193734",
"0.6817609",
"0.68171066",
"0.68147516",
"0.6814517",
"0.6811613",
"0.68000036"
] | 0.6920353 | 67 |
Carga inicial de usuarios | @Override
public void loadUsers(List<UserDto> users) {
for (UserDto userDto : users) {
userRepository.save(dte.getUser(userDto));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void CargarUsuarios(){\n administradores.clear();\n usuariosList.clear();\n for (String i: BienvenidaActivity.UsuariosRegistrados.keySet()) {\n if(EsAdmin(i)){\n administradores.add(BienvenidaActivity.UsuariosRegistrados.get(i));\n }else{\n usuariosList.add(BienvenidaActivity.UsuariosRegistrados.get(i));\n }\n }\n String admins_string = \"\";\n for(Usuario admin : administradores){\n admins_string += admin.getUsername() + \" -> \" + admin.getNombre() + \" \" + admin.getApellido() + \"\\n\";\n }\n\n String users_string = \"\";\n for(Usuario userss : usuariosList){\n users_string += userss.getUsername() + \" -> \" + userss.getNombre() + \" \" + userss.getApellido() + \"\\n\";\n }\n\n // Finalmente se coloca en la actividad\n\n txtvw_contadmin.setText(String.valueOf(administradores.size()));\n txtvw_contusers.setText(String.valueOf(usuariosList.size()));\n txtvw_admins.setText(admins_string);\n txtvw_users.setText(users_string);\n }",
"private void cargarDatosUsuario() {\n this.textUsuario.setText(this.usuarioCargado.getUsuario());\n this.textContraseña.setText(this.usuarioCargado.getContraseña());\n this.textNombre.setText(this.usuarioCargado.getNombre());\n this.textApellido.setText(this.usuarioCargado.getApellido());\n this.textDocumento.setText(String.valueOf(this.usuarioCargado.getDocumento()));\n this.textTelefono.setText(String.valueOf(this.usuarioCargado.getTelefono()));\n this.textDireccion.setText(this.usuarioCargado.getDireccion());\n this.textoIdUsuairo.setText(String.valueOf(this.usuarioCargado.getId()));\n\n }",
"@Override\r\n\tpublic void analizarUsuario() {\n\t\tfor(IAsesoria ia : usuarios) {\r\n\t\t\tia.analizarUsuario();\r\n\t\t}\t\r\n\t}",
"private void cargaUsuarios() {\n //Abre la conexion\n Connection con = Star.conAbrBas(true, false);\n \n //Declara variables de la base de datos \n java.sql.Statement st;\n java.sql.ResultSet rs; \n String sQ;\n /*Obtiene todos los datos del usuario*/\n try\n {\n sQ = \"SELECT estac FROM estacs WHERE estac <> '\" + Login.sUsrG + \"' AND admcaj <= (SELECT admcaj FROM estacs WHERE estac = '\" + Login.sUsrG + \"')\";\n st = con.createStatement();\n rs = st.executeQuery(sQ);\n /*Si hay datos*/\n while(rs.next())\n {\n /*Obtiene los datos y cargalos en sus campos*/\n jcmbUsuarios.addItem(rs.getString(\"estac\"));\n }\n //si ingreso usuarios al combo, jalo los permisos del primer usuario\n// if(jcmbUsuarios.getItemCount() > 0){\n// cargaPermisos(jcmbUsuarios.getSelectedItem().toString());\n// }\n \n }catch(SQLException expnSQL)\n {\n //Procesa el error y regresa\n Star.iErrProc(this.getClass().getName() + \" \" + expnSQL.getMessage(), Star.sErrSQL, expnSQL.getStackTrace(), con); \n }\n }",
"protected void accionUsuario() {\n\t\t\r\n\t}",
"private void cargarUsuario() {\n try {\n rol = null;\n if (usuario != null && usuario.getUsuario() != null) {\n for (SsRoles rols : usuario.getUsuario().getSsRolesList()) {\n for (String rl : ROL) {\n if (rols.getCodigoRol().equalsIgnoreCase(rl)) {\n rol = new SsRoles();\n rol = rols;\n }\n }\n }\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public usuarios Cargar_Usuario(int cedula) {\r\n base_datos_Usuarios ae_db = new base_datos_Usuarios();\r\n usuarios informacion_usuario = ae_db.Buscar_Usuario_DB(cedula);\r\n return informacion_usuario;\r\n }",
"public void CargarDatosUsuario(String nickname, String mail, String nombre, String pass, DataDireccion direccion, String apellido, Date fechaNacimiento, String rutaImagen);",
"private void controladorUser(Controlador controlador){\n this.contUserCrearProyecto = controlador.getUserCrearProyecto();\n inicioUser.setControlCrearProyecto(contUserCrearProyecto);\n \n this.contUserCrearColectivo = controlador.getUserCrearColectivo();\n inicioUser.setControlCrearColectivo(contUserCrearColectivo);\n\n this.contInformes = controlador.getInformes();\n inicioUser.setControlSolicitarInformes(contInformes); \n \n this.contFiltrar = controlador.getFiltrar();\n inicioUser.setControlFiltrar(contFiltrar);\n\n this.contLimpiar = controlador.getLimpiarFiltro();\n inicioUser.setControlLimpiarFiltro(contLimpiar);\n }",
"public TelaCadastrarUsuarios() {\n initComponents();\n carregarTabela();\n carregarComboBoxFuncionarios();\n carregarImagens();\n }",
"public void inicializarDatos(aplicacion.Usuario u){\n //Pestaña Informacion\n this.usuario=fa.obtenerUsuarioVivo(u.getIdUsuario());\n ModeloTablaBuenasAcciones mba;\n mba = (ModeloTablaBuenasAcciones) tablaBA.getModel();\n mba.setFilas(usuario.getBuenasAcciones());\n ModeloTablaPecados mp;\n mp = (ModeloTablaPecados) tablaPecados.getModel();\n mp.setFilas(usuario.getPecados());\n textoNombre.setText(usuario.getNombre());\n textoUsuario.setText(usuario.getNombreUsuario());\n textoContrasena.setText(usuario.getClave());\n textoLocalidad.setText(usuario.getLocalidad());\n textoFechaNacimiento.setText(String.valueOf(usuario.getFechaNacimiento()));\n //PestañaVenganzas\n ModeloTablaUsuarios mu;\n mu = (ModeloTablaUsuarios) tablaUsuarios.getModel();\n mu.setFilas(fa.consultarUsuariosMenos(usuario.getIdUsuario(), textoNombreBusqueda.getText()));\n ModeloTablaVenganzas mv;\n mv = (ModeloTablaVenganzas) tablaVenganzas.getModel();\n mv.setFilas(fa.listaVenganzas());\n }",
"private void cargarDatos()\n {\n // Pantalla carga\n showProgress(true, mView, mProgressView, getContext());\n Comando login = new LoginComando(KPantallas.PANTALLA_PERFIL);\n String email = UtilUI.getEmail(getContext());\n String password = UtilUI.getPassword(getContext());\n login.ejecutar(email,password);\n }",
"public void recuperandoDadosUsuarioescolhido(){\n Bundle bundle = getIntent().getExtras();\n if (bundle != null){\n if (bundle.containsKey(\"usuarioSelecionado\")){\n dadosDoUsuario = (Usuario) bundle.getSerializable(\"usuarioSelecionado\");\n }\n }\n\n // Configurando Toolbar\n\n toolbar.setTitle(dadosDoUsuario.getNome());\n setSupportActionBar(toolbar);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n\n // Configurando Imagem\n if (dadosDoUsuario.getFoto() != null){\n if (!dadosDoUsuario.getFoto().isEmpty()){\n Uri url = Uri.parse(dadosDoUsuario.getFoto());\n Glide.with(getApplicationContext()).load(url).into(civFotoPerfil);\n }\n }\n\n // Configurando Seguidores Postagens e Seguindo\n\n //stPublicacao = String.valueOf(dadosDoUsuario.getPublicacoes());\n stSeguidores = String.valueOf(dadosDoUsuario.getSeguidores());\n stSeguindo = String.valueOf(dadosDoUsuario.getSeguindo());\n\n tvSeguindo.setText(stSeguindo);\n tvSeguidores.setText(stSeguidores);\n //tvPublicacao.setText(stPublicacao);\n\n // Configurando Referencia postagens Usuario Escolhido\n postagensUsuarioRef = ConfiguracaoFirebase.getFirebaseDatabase()\n .child(\"postagens\")\n .child(dadosDoUsuario.getId());\n\n // Inicializa o Universal Image Loader\n inicializarImageLoader();\n // Recupera as Postagens do nosso Banco de Dados\n carregarFotosPostagem();\n }",
"public void subeUsuario() {\n\t\tEditText nicknameText = (EditText) findViewById(R.id.nicknameEditText);\n\t\tstrNickname = nicknameText.getText().toString().trim();\n\t\t\n\t\tif (strNickname.equals(\"\")) {\n\t\t\tToast.makeText(this, \"Nickname no puede estar vacío\",Toast.LENGTH_LONG).show();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tguardarPreferences();\n\t\t\n\t\t//lanzamos un uploadService\n\t\tIntent uploadService = new Intent(getApplicationContext(),UploadUserService.class);\n\t\t\n\t\tuploadService.putExtra(\"id\", userId);\n\t\tuploadService.putExtra(\"nickname\", strNickname);\n\t\tuploadService.putExtra(\"mail\", strEmail);\n\t\tuploadService.putExtra(\"dob\", dayOfBirth);\n\t\tuploadService.putExtra(\"pass\", strPassword);\n\t\tuploadService.putExtra(\"genero\", gender);\n\t\tuploadService.putExtra(\"avatar\", strAvatar);\n\t\t\n\t\tstartService(uploadService);\n\t}",
"public void popoulaRepositorioUsuarios(){\n Usuario usuario1 = new Usuario();\n usuario1.setUsername(\"EliSilva\");\n usuario1.setEmail(\"[email protected]\");\n usuario1.setSenha(\"123\");\n usuario1.setNome(\"Elineide Silva\");\n usuario1.setCPF(\"12345678\");\n\n\n\n Usuario usuario2 = new Usuario();\n usuario2.setUsername(\"gustavo\");\n usuario2.setEmail(\"[email protected]\");\n usuario2.setSenha(\"12345\");\n usuario2.setNome(\"Gustavo\");\n usuario2.setCPF(\"666\");\n\n Usuario usuario3 = new Usuario();\n usuario1.setUsername(\"peixe\");\n usuario1.setEmail(\"[email protected]\");\n usuario1.setSenha(\"1111\");\n usuario1.setNome(\"quem dera ser um peixe\");\n usuario1.setCPF(\"1111\");\n\n Usuario usuario4 = new Usuario();\n usuario1.setUsername(\"segundo\");\n usuario1.setEmail(\"[email protected]\");\n usuario1.setSenha(\"123\");\n usuario1.setNome(\"Elineide Silva\");\n usuario1.setCPF(\"12345678\");\n\n inserir(usuario1);\n inserir(usuario2);\n inserir(usuario3);\n inserir(usuario4);\n }",
"public Usuarios(String Cedula){ //método que retorna atributos asociados con la cedula que recibamos\n conexion = base.GetConnection();\n PreparedStatement select;\n try {\n select = conexion.prepareStatement(\"select * from usuarios where Cedula = ?\");\n select.setString(1, Cedula);\n boolean consulta = select.execute();\n if(consulta){\n ResultSet resultado = select.getResultSet();\n if(resultado.next()){\n this.Cedula= resultado.getString(1);\n this.Nombres= resultado.getString(2);\n \n this.Sexo= resultado.getString(3);\n this.Edad= resultado.getInt(4);\n this.Direccion= resultado.getString(5);\n this.Ciudad=resultado.getString(6);\n this.Contrasena=resultado.getString(7);\n this.Estrato=resultado.getInt(8);\n this.Rol=resultado.getString(9);\n }\n resultado.close();\n }\n conexion.close();\n } catch (SQLException ex) {\n System.err.println(\"Ocurrió un error: \"+ex.getMessage().toString());\n }\n}",
"public void CargarDatosUsuario(String nickname, String mail, String nombre, String pass, DataDireccion direccion, String[] rutaImagen) throws Exception;",
"private void recogerDatos() {\n\t\ttry {\n\t\t\tusuSelecc.setId(etId.getText().toString());\n\t\t\tusuSelecc.setName(etNombre.getText().toString());\n\t\t\tusuSelecc.setFirstName(etPApellido.getText().toString());\n\t\t\tusuSelecc.setLastName(etSApellido.getText().toString());\n\t\t\tusuSelecc.setEmail(etCorreo.getText().toString());\n\t\t\tusuSelecc.setCustomFields(etAuth.getText().toString());\n\t\t} catch (Exception e) {\n\t\t\t// Auto-generated catch block\n\t\t\tmostrarException(e.getMessage());\n\t\t}\n\t}",
"private void mostrarUsuarios(ArrayList<Usuario> usuarios) {\n\t\tSystem.out.println(\"Id - Nombre Apellidos / Edad / DNI / Fecha_nac\\n\");\r\n\t\tIterator<Usuario> i=usuarios.iterator();\r\n\t\twhile(i.hasNext()){\r\n\t\t\tmostrarUsuario(i.next());\r\n\t\t}\r\n\t}",
"public void altaUsuario();",
"public Asignacion_usuario_Perfil1() {\n int CodigoAplicacion = 120;\n initComponents();\n llenadoDeCombos();\n llenadoDeTablas();\n \n\n \n }",
"private void inicializarUsuarios(){\n usuarios = new ArrayList<Usuario>();\n Administrador admin=new Administrador();\n admin.setCodigo(1);\n admin.setApellidos(\"Alcaide Gomez\");\n admin.setNombre(\"Juan Carlos\");\n admin.setDni(\"31000518Z\");\n admin.setPassword(\"admin\");\n admin.setCorreo(\"[email protected]\");\n admin.setDireccion(\"Sebastian Garrido 54\");\n admin.setNacimiento(new Date(1991, 12, 29));\n admin.setNacionalidad(\"España\");\n admin.setCentro(\"Centro\");\n admin.setSexo(\"Varon\");\n admin.setDespacho(\"301\");\n usuarios.add(admin);\n \n JefeServicio js=new JefeServicio();\n js.setCodigo(2);\n js.setApellidos(\"Gutierrez Cazorla\");\n js.setNombre(\"Ruben\");\n js.setDni(\"75895329k\");\n js.setPassword(\"admin\");\n js.setCorreo(\"[email protected]\");\n js.setDireccion(\"Sebastian Garrido 54\");\n js.setNacimiento(new Date(1991, 12, 29));\n js.setNacionalidad(\"España\");\n js.setCentro(\"Centro\");\n js.setSexo(\"Varon\");\n js.setDespacho(\"301\");\n \n usuarios.add(js);\n \n \n Ciudadano c =new Ciudadano();\n c.setCodigo(3);\n c.setApellidos(\"Moreno\");\n c.setNombre(\"Maria\");\n c.setDni(\"123\");\n c.setPassword(\"123\");\n c.setCorreo(\"[email protected]\");\n c.setDireccion(\"Sebastian Garrido 54\");\n c.setNacimiento(new Date(1992, 01, 12));\n c.setCentro(\"Teatinos\");\n c.setNacionalidad(\"España\");\n c.setSexo(\"Mujer\");\n c.setTelefono(\"999\");\n usuarios.add(c);\n \n //--Administrativos--\n Administrativo a =new Administrativo();\n a.setCodigo(4);\n a.setApellidos(\"Fernández\");\n a.setNombre(\"Salva\");\n a.setDni(\"1234\");\n a.setPassword(\"1234\");\n a.setCorreo(\"[email protected]\");\n a.setDireccion(\"Sebastian Garrido 54\");\n a.setNacimiento(new Date(1991, 9, 29));\n a.setNacionalidad(\"España\");\n a.setSexo(\"Hombre\");\n a.setCentro(\"Centro\");\n usuarios.add(a);\n \n Tecnico tec=new Tecnico();\n tec.setCodigo(5);\n tec.setApellidos(\"Alcaide Gomez\");\n tec.setNombre(\"Juan Carlos\");\n tec.setDni(\"tecnico\");\n tec.setPassword(\"tecnico\");\n tec.setCorreo(\"[email protected]\");\n tec.setDireccion(\"Sebastian Garrido 54\");\n tec.setNacimiento(new Date(1991, 12, 29));\n tec.setNacionalidad(\"España\");\n tec.setCentro(\"Centro\");\n tec.setSexo(\"Varon\");\n tec.setDespacho(\"301\");\n tec.setTelefono(\"664671040\");\n tec.setEspecialidad(\"Maltrato\");\n tec.setTfijo(957375546);\n \n usuarios.add(tec);\n \n }",
"public ArrayList<Usuario> getUsuarios(Usuario creador){\r\n ArrayList<Usuario> al= new ArrayList<>();\r\n if (creador.isAdmin()){\r\n try {\r\n String sql= \"Select * from sistemasEM.usuarios\";\r\n Statement s= connection.createStatement();\r\n ResultSet rs = s.executeQuery(sql);\r\n Usuario u;\r\n while(rs.next()){\r\n TipoDescuento td = this.getTipoDescuento(rs.getInt(\"permisosDescuento\"));\r\n TipoPersonal tp = this.getTipoPersonal(rs.getInt(\"permisosPersonal\"));\r\n al.add( new Usuario(rs.getInt(\"id\"), rs.getString(\"nombre\"), rs.getString(\"mostrar\"),rs.getBoolean(\"admin\"),tp,td,rs.getBoolean(\"notas\"),rs.getBoolean(\"habilitacion\"),rs.getBoolean(\"profesor\"),rs.getInt(\"ciProfesor\"),rs.getBoolean(\"cambiarContra\")));\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ManejadorCodigoBD.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n return al;\r\n }",
"@Override\n public void mostrarUsuarios(List<UserModel> usuarios) {\n }",
"public void ponerUsuarioInactivo(String idUsuario);",
"@Override\n\tpublic List<ControlAcceso> registroUsers(String fecha, int codigo) {\n\t\treturn controlA.registroUsers(fecha, codigo);\n\t}",
"private void actualizaUsuario() {\n\t\t\n\t\tInteger edad=miCoordinador.validarEdad(campoEdad.getText().trim());\n\t\t\n\t\tif (edad!=null) {\n\t\t\t\n\t\t\tUsuarioVo miUsuarioVo=new UsuarioVo();\n\t\t\t//se asigna cada dato... el metodo trim() del final, permite eliminar espacios al inicio y al final, en caso de que se ingresen datos con espacio\n\t\t\tmiUsuarioVo.setDocumento(campoDocumento.getText().trim());\n\t\t\tmiUsuarioVo.setNombre(campoNombre.getText().trim());\n\t\t\tmiUsuarioVo.setEdad(Integer.parseInt(campoEdad.getText().trim()));\n\t\t\tmiUsuarioVo.setProfesion(campoProfesion.getText().trim());\n\t\t\tmiUsuarioVo.setTelefono(campoTelefono.getText().trim());\n\t\t\tmiUsuarioVo.setDireccion(campoDireccion.getText().trim());\n\t\t\t\n\t\t\tString actualiza=\"\";\n\t\t\t//se llama al metodo validarCampos(), este retorna true o false, dependiendo de eso ingresa a una de las opciones\n\t\t\tif (miCoordinador.validarCampos(miUsuarioVo)) {\n\t\t\t\t//si se retornó true es porque todo está correcto y se llama a actualizar\n\t\t\t\tactualiza=miCoordinador.actualizaUsuario(miUsuarioVo);//en registro se almacena ok o error, dependiendo de lo que retorne el metodo\n\t\t\t}else{\n\t\t\t\tactualiza=\"mas_datos\";//si validarCampos() retorna false, entonces se guarda la palabra mas_datos para indicar que hace falta diligenciar los campos obligatorios\n\t\t\t}\n\t\t\t\n\t\t\t//si el registro es exitoso muestra un mensaje en pantalla, sino, se valida si necesita mas datos o hay algun error\n\t\t\tif (actualiza.equals(\"ok\")) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \" Se ha Modificado Correctamente \",\"Confirmación\",JOptionPane.INFORMATION_MESSAGE);\t\t\t\n\t\t\t}else{\n\t\t\t\tif (actualiza.equals(\"mas_datos\")) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Debe Ingresar los campos obligatorios\",\"Faltan Datos\",JOptionPane.WARNING_MESSAGE);\t\t\t\n\t\t\t\t}else{\n\t\t JOptionPane.showMessageDialog(null, \"Error al Modificar\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\t\t\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\tJOptionPane.showMessageDialog(null, \"Debe ingresar una edad Valida!!!\",\"Advertencia\",JOptionPane.ERROR_MESSAGE);\n\t\t}\n\n\t\t\t\t\n\t}",
"List<Usuario> obtenerUsuarios() throws Exception;",
"public static void imprimeUsuarios( ) {\n\t\ttry {\n\t\t\tFileInputStream arq = new FileInputStream(\"database/usuarios.dat\");\n\t\t\tObjectInputStream in = new ObjectInputStream(arq);\n\t\t\tint i = 0;\n\t\t\n\t\t\tArrayList<Usuario> usuarios = new ArrayList<Usuario>();\n\t\t\t\n\t\t\ttry {\n\t\t\t for (;;) {\n\t\t\t \tUsuario aux;\n\t\t\t\t\taux = (Usuario) in.readObject();\n\t\t\t\t\tSystem.out.println(i + \"=\" + aux.getNome() + \";\" + aux.getCrm() + \";\" \n\t\t\t\t\t\t\t\t\t\t+ aux.getLogin() + \";\" + aux.getSenha());\n\t\t\t\t\tusuarios.add(aux);\n\t\t\t\t\ti++;\n\t\t\t }\n\t\t\t}\n\t\t\tcatch (EOFException exc) {\n\t\t\t // end of stream\n\t\t\t}\n\t\t\tcatch (IOException exc) {\n\t\t\t // some other I/O error: print it, log it, etc.\n\t\t\t exc.printStackTrace(); // for example\n\t\t\t}\n\t\t\t\t\n\t\t\tin.close();\n\t\t}\n\t\tcatch ( IOException exc2 ) {\n\t\t\tSystem.out.println(\"Erro ao ler o arquivo.\");\t\t\t\n\t\t}\n\t\tcatch ( ClassNotFoundException cnfex ) {\n\t\t\tSystem.out.println(\"Não achou a classe.\");\n\t\t}\n\t}",
"public List<Usuario> obtenerListaUsuariosActivos(){\n return usuarioBean.obtenerListaUsuariosActivos();\n }",
"void suplantarIdUsuer(String nombre) throws Exception {\n\t\tLibro[] librosPres = new Libro[Const.MAXLIBROSPRES];\n\t\tint bpn = busquedaPrimerNulo();\n\t\tUsuario[] vu = ArrayObject.listadoUsuarios();\n\n\t\tMiObjectInputStream oi = null;\n\n\t\ttry { // comprueba que el archivo FUSUARIOS existe antes de leerlo\n\t\t\toi = new MiObjectInputStream(new FileInputStream(Const.FUSUARIOS));\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Archivo no encontrado - suplantarIdUsuer - \" + e.toString());\n\t\t}\n\n\t\t// busca donde se encuentra el primer usuario null del archivo para crear un\n\t\t// usuario nuevo en ese mismo lugar para obtener un id ordenado. Del mismo modo\n\t\t// la primera vez que esto se ustiliza llena el archivode usuarios de nulos pero\n\t\t// no elimna los usuarios que se encuentran por debajo\n\t\tUsuario u = (Usuario) oi.readObject();\n\t\tu = new Usuario(bpn, nombre, librosPres);\n\t\tvu[bpn] = u;\n\n\t\ttry {\n\t\t\tFileOutputStream fo = new FileOutputStream(Const.FUSUARIOSAUX, true);\n\t\t\tMiObjectOutputStream oo = new MiObjectOutputStream(fo);\n\t\t\tint i = 0;\n\t\t\twhile (i < vu.length) {\n\t\t\t\tu = vu[i];\n\t\t\t\too.writeObject(u);\n\t\t\t\ti++;\n\t\t\t} // finaliza el while para la lectura\n\t\t\too.close();\n\n\t\t} catch (Exception e) { // encaso de encontrar el archivos pero no puede leerlo\n\t\t\tSystem.out.println(\"Problemas al leer el archivo - suplantarIdUsuer - \" + e.toString());\n\t\t}\n\t\toi.close();\n\t}",
"public List getUsuarios();",
"public Cgg_res_oficial_seguimiento_usuario(){}",
"public SigalPeticion reativarUsuario ( AccountTO usuario ) throws Exception {\n \n // Tratamento para controle de campos opicionais\n int totalParams = 11;\n boolean possuiCenttra = true;\n boolean possuiCodPerfil = true;\n\n if ( usuario.getCenttra() == null || usuario.getCenttra().trim().equals(\"\") ) {\n --totalParams;\n possuiCenttra = false;\n }\n\n if ( usuario.getCodperfil() == null || usuario.getCodperfil().trim().equals(\"\") ) {\n --totalParams;\n possuiCodPerfil = false;\n }\n\n SigalPeticion msgEnvio = SigalPeticion.getInstance( totalParams );\n\n msgEnvio.addParametro( --totalParams, new Parametro( \"FUNCION\", \"RE\" ) );\n\n msgEnvio.addParametro( --totalParams, new Parametro( IUsuarioXML.USUARIO,\n usuario.getUsuario() ) );\n msgEnvio.addParametro( --totalParams, new Parametro( IUsuarioXML.OFICINA,\n usuario.getOficina() ) );\n msgEnvio.addParametro( --totalParams, new Parametro( IUsuarioXML.NOMBREUSU,\n usuario.getNombreusu() ) );\n msgEnvio.addParametro( --totalParams, new Parametro( IUsuarioXML.PASSWORD,\n usuario.getPassword() ) );\n msgEnvio.addParametro( --totalParams, new Parametro( IUsuarioXML.NIVSEGUSU,\n usuario.getNivsegusu() ) );\n msgEnvio.addParametro( --totalParams, new Parametro( IUsuarioXML.CODIDIOMA,\n usuario.getCodidioma() ) );\n msgEnvio.addParametro( --totalParams, new Parametro( IUsuarioXML.FECACTIVA,\n usuario.getFecactivaForEASE() ) );\n msgEnvio.addParametro( --totalParams, new Parametro( IUsuarioXML.FECDESACT,\n usuario.getFecdesactForEASE() ) );\n\n // CAMPO OPICIONAL, alteração feita na especificação v. 5.0\n if ( possuiCenttra )\n msgEnvio.addParametro( --totalParams, new Parametro( IUsuarioXML.CENTTRA,\n usuario.getCenttra() ) );\n\n // CAMPO OPICIONAL, alteração feita na especificação v. 5.0\n if ( possuiCodPerfil ) {\n msgEnvio.addParametro( --totalParams, new Parametro( IUsuarioXML.CODPERFIL,\n usuario.getCodperfil() ) );\n }\n\n msgEnvio.setTipoOperacion( \"update\" );\n msgEnvio.setTransaccion( \"SGREUSU\" );\n\n return msgEnvio; \n }",
"public ListaUsuario() {\n initComponents();\n\n exibir();\n }",
"public AdministrarUsuarios() {\n initComponents();\n modelo = (DefaultTableModel) tablaUsuarios.getModel();\n tablaUsuarios.getTableHeader().setReorderingAllowed(false);\n tablaUsuarios.getTableHeader().setDefaultRenderer(new Facturar.HeaderColor());\n \n manejador.CargarUsuarios();\n listaTotalUsuarios = manejador.ObtenerListaUsuarios();\n cargarUsuariosEnTabla(listaTotalUsuarios);\n ocultarColumnaID();\n }",
"public List<Usuario> ultimosUsuariosCadastrados(){\r\n List<Usuario> users = new ArrayList<Usuario>();\r\n try{\r\n PreparedStatement ps = bd.prepareStatement(\"SELECT * FROM usuarios ORDER BY id DESC\");\r\n ResultSet rs = ps.executeQuery();\r\n while(rs.next()){\r\n Usuario u = new Usuario();\r\n u.setId(rs.getInt(\"id\"));\r\n u.setUsuario(rs.getString(\"usuario\"));\r\n u.setNome(rs.getString(\"nome\"));\r\n u.setEmail(rs.getString(\"email\"));\r\n u.setSenha(rs.getString(\"senha\"));\r\n u.setPin(rs.getString(\"pin\"));\r\n u.setUrlfoto(rs.getString(\"urlfoto\"));\r\n u.setAcesso(rs.getTimestamp(\"acesso\"));\r\n u.setAdmin(rs.getInt(\"admin\"));\r\n users.add(u);\r\n }\r\n rs.close();\r\n ps.close();\r\n ConexaoBD.fechar(bd);\r\n } catch(SQLException sqle){\r\n System.out.println(\"Erro ao apresentar os ultimos usuarios cadastrados: \"+sqle.getMessage());\r\n }\r\n return users;\r\n }",
"@Listen(\"onChange = #txtUsuario; onOK = #txtUsuario\")\r\n\tpublic void buscarPorLogin() {\r\n\t\tUsuario usuario = servicioUsuario.buscarPorLogin(txtUsuario.getValue());\r\n\t\tif (usuario != null)\r\n\t\t\tllenarCamposUser(usuario);\r\n\t\telse {\r\n\t\t\tmsj.mensajeAlerta(Mensaje.noHayRegistros);\r\n\t\t\tidUser = \"TODOS\";\r\n\t\t\ttxtUsuario.setValue(\"TODOS\");\r\n\t\t\tlblUsuario.setValue(\"TODOS\");\r\n\t\t\ttxtUsuario.setFocus(true);\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void analizarUsuario(String tipo) {\n\t\t\r\n\t\tswitch (tipo){\r\n\t\t\tcase \"Administrativo\":\r\n\t\t\t\tfor(IAsesoria ia : usuarios) {\r\n\t\t\t\t\tif(ia.getClass().getSimpleName().equals(tipo)) {\r\n\t\t\t\t\t\tia.analizarUsuario();\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t\tbreak;\t\r\n\t\t\tcase \"Profesional\":\r\n\t\t\t\tfor(IAsesoria ia : usuarios) {\r\n\t\t\t\t\tif(ia.getClass().getSimpleName().equals(tipo)) {\r\n\t\t\t\t\t\tia.analizarUsuario();\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Cliente\":\r\n\t\t\t\tfor(IAsesoria ia : usuarios) {\r\n\t\t\t\t\tif(ia.getClass().getSimpleName().equals(tipo)) {\r\n\t\t\t\t\t\tia.analizarUsuario();\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\t\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t}\r\n\r\n\r\n\t}",
"public List<Usuario> findAllUsuarios(){\n\t\t\t List<Usuario> listado;\n\t\t\t Query q;\n\t\t\t em.getTransaction().begin();\n\t\t\t q=em.createQuery(\"SELECT u FROM Usuario u ORDER BY u.idUsr\");\n\t\t\t listado= q.getResultList();\n\t\t\t em.getTransaction().commit();\n\t\t\t return listado;\n\t\t\t \n\t\t\t}",
"private void cargarAutorizaciones() {\r\n\t\tif (parametros_empresa != null) {\r\n\t\t\tif (parametros_empresa.getTrabaja_autorizacion()) {\r\n\t\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\t\tparametros.put(\"tipo_hc\", \"\");\r\n\t\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\t\tadmision_seleccionada);\r\n\r\n\t\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\t\tIRutas_historia.PAGINA_AUTORIZACIONES,\r\n\t\t\t\t\t\t\"AUTORIZACIONES\", parametros);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void registrar() {\n try {\r\n do {\r\n //totalUsuarios = this.registraUnUsuario(totalUsuarios);\r\n this.registraUnUsuario();\r\n } while (!this.salir());\r\n } catch (IOException e) {\r\n flujoSalida.println(\"Error de entrada/salida, finalizará la aplicación.\");\r\n }\r\n flujoSalida.println(\"Total usuarios registrados: \"+totalUsuarios);\r\n }",
"private void controladorAdminUsuarios(Controlador controlador) {\n \tthis.contAdminConfig = controlador.getAdminConfig();\n \tadminUsuarios.setControlAdminConfig(contAdminConfig);\n \t\n \tthis.contAdminProyectos = controlador.getAdminProyectos();\n \tadminUsuarios.setControlAdminProyectos(contAdminProyectos);\n \t\n \tthis.contAdminUsuariosBloq = controlador.getAdminUsuariosBloq();\n \tadminUsuarios.setControlAdminBloq(contAdminUsuariosBloq);\n \t\n }",
"public SigalPeticion getUsuarios() throws Exception {\n SigalPeticion msgEnvio = SigalPeticion.getInstance( 2 );\n\n msgEnvio.addParametro( 0, new Parametro( \"FUNCION\", \"CL\" ) ); \n msgEnvio.addParametro( 1, \n /**\n * Somente usuarios ATIVOS\n * N = Ativos\n * S = Ativos e Inativos\n */\n new Parametro( \"USUBAJAC\", \"N\" ) \n );\n\n msgEnvio.setTipoOperacion( \"view\" );\n msgEnvio.setTransaccion( \"SGCLUSU\" );\n\n return msgEnvio;\n }",
"public OtrosUsuarios(int sesID) {\n initComponents();\n this.sesID = sesID;\n Conexion sql = new Conexion();\n sql.consulta(tabla, \"select Usuario, Inicio from seleccionarUsuarios\");\n }",
"public ArrayList <Usuario>listaUsuario(){\r\n\t\treturn loja.getUsuarios();\r\n\t}",
"private void btnAgregarUsuarioActionPerformed(java.awt.event.ActionEvent evt) {\n String v_nombre=\" \";\n\n if(txtNombreAU.getText().length()==0){\n Utilidades.mensajeInformacion(\"Digite un nombre, por favor\", \"Informacion\");\n return;\n }\n v_nombre=txtNombreAU.getText(); \n //Valido la contrasenia\n if(txtContraseniaAU.getText().length()==0){\n Utilidades.mensajeInformacion(\"Es obligatorio ingresar una contraseña\", \"Informacion\");\n return;\n }\n if(!validarContraseniaUsuario(txtContraseniaAU.getText())){\n return;\n }\n String v_contrasenia=txtContraseniaAU.getText();\n //Valido nombre completo\n if(txtNombreCompletoAU.getText().length()==0){\n Utilidades.mensajeInformacion(\"Es obligatorio ingresar el nombre completo\", \"Informacion\");\n return;\n }\n String v_nombreCompleto=txtNombreCompletoAU.getText();\n \n //Valido que se escogio un valor para el cargo\n int v_cargo=0;\n //10 = Administrador, 20=Funcionario\n if(rbtnAdministradorAU.isSelected()){\n v_cargo=10;\n }else if(rbtnFuncionarioAU.isSelected()){\n v_cargo=20;\n }else{\n Utilidades.mensajeInformacion(\"Escoga un cargo\", \"Informacion\");\n return;\n }\n \n //Creo y agreggo un usuario dependiendo del cargo escogido (Administrador o funcionario)\n try{\n boolean agregado=false;\n if(v_cargo==10){\n Administrador nuevoUsuario=new Administrador(v_nombre, v_contrasenia, v_nombreCompleto, null);\n agregado = administrador.agregarUsuario(nuevoUsuario);\n\n } \n if(v_cargo==20){\n Funcionario nuevoUsuario=new Funcionario(v_nombre, v_contrasenia, v_nombreCompleto, null);\n agregado = administrador.agregarUsuario(nuevoUsuario);\n }\n\n\n if(agregado){\n Utilidades.mensajeExito(\"Se agrego el Usuario\", \"Agregacion Exitosa\");\n limpiarCamposAgregarUsuario();\n }else{\n Utilidades.mensajeError(\"El Usuario a agregar ya existe\", \"Error\");\n }\n\n }catch (IOException ex) {\n Logger.getLogger(Funcionario.class.getName()).log(Level.SEVERE, null, ex);\n Utilidades.mensajeAdvertencia(\"Se ha interrumpido la conexion con el servidor\", \"Error\");\n }\n \n }",
"private void cargarCatalogo() throws DAOException {\n\t\t List<Usuario> usuariosBD = adaptadorUsuario.recuperarTodosUsuarios();\n\t\t for (Usuario u: usuariosBD) \n\t\t\t usuarios.put(u.getTelefono(), u);\n\t}",
"public void registrarAdministrador() throws IOException {\n\n //asignamos al usuario la imagen de perfil default\n usuarioView.setUsuarioFotoRuta(getPathDefaultUsuario());\n usuarioView.setUsuarioFotoNombre(getNameDefaultUsuario());\n\n //Se genera un login y un pass aleatorio que se le envia al proveedor\n MD5 md = new MD5();\n GenerarPassword pass = new GenerarPassword();\n SendEmail email = new SendEmail();\n\n password = pass.generarPass(6);//Generamos pass aleatorio\n\n //Encriptamos las contraseñas\n usuarioView.setUsuarioPassword(md.getMD5(password));//Se encripta la contreseña\n usuarioView.setUsuarioRememberToken(md.getMD5(password));\n\n //el metodo recibe los atributos, agrega al atributo ciudad del objeto usuario un objeto correspondiente, \n //de la misma forma comprueba el rol y lo asocia, por ultimo persiste el usuario en la base de datos\n usuarioView.setSmsCiudad(ciudadDao.consultarCiudad(usuarioView.getSmsCiudad()));//Asociamos una ciudad a un usuario\n usuarioView.setSmsRol(rolDao.consultarRol(usuarioView.getSmsRol()));//Asociamos un rol a un usuario\n usuarioView.setUsuarioEstadoUsuario(1);//Asignamos un estado de cuenta\n usuarioView.setSmsNacionalidad(nacionalidadDao.consultarNacionalidad(usuarioView.getSmsNacionalidad()));\n\n //registramos el usuario y recargamos la lista de clientes\n usuarioDao.registrarUsuario(usuarioView);\n usuariosListView = adminDao.consultarUsuariosAdministradores();\n\n //Enviar correo\n email.sendEmailAdministradorBienvenida(usuarioView, password);\n\n //limpiamos objetos\n usuarioView = new SmsUsuario();\n password = \"\";\n }",
"private static void iniciarAmbienteDeUsuario() {\r\n\r\n\t\tnew AmbienteParaUsuarioEscolherGerenciamento(user);\r\n\r\n\t}",
"public void setUsuario(String usuario) {\r\n this.usuario = usuario;\r\n \r\n }",
"public void setUsuario(String usuario) {\r\n this.usuario = usuario;\r\n }",
"public void setUsuario(String usuario) {\r\n this.usuario = usuario;\r\n }",
"public List<Usuario> getAll(){\n String sql = \"SELECT * FROM usuarios \" +\n \" INNER JOIN ciudades ON ciudades.id = usuarios.id_ciudad\" +\n \" INNER JOIN provincias ON provincias.id = usuarios.id_provincia\" +\n \" INNER JOIN paises ON paises.id = usuarios.id_pais\";\n try {\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(sql);\n List<Usuario> usuarios = new ArrayList<Usuario>();\n while (rs.next()){\n Ciudad ciudad = new Ciudad(rs.getInt(\"ciudades.id\"),rs.getString(\"ciudades.nombre\"));\n\n Provincia provincia = new Provincia(rs.getInt(\"provincias.id\"),rs.getString(\"provincias.nombre\"));\n\n Pais pais = new Pais(rs.getInt(\"paises.id\"),rs.getString(\"paises.nombre\"));\n\n Usuario usuario = new Usuario(rs.getString(\"nombre\"),rs.getString(\"apellido\"),\n rs.getString(\"direccion\"), rs.getString(\"telefono\"),\n ciudad, provincia, pais, rs.getString(\"email\"),\n rs.getString(\"username\"), rs.getString(\"contrasena\"));\n usuario.setId(rs.getInt(\"usuarios.id\"));\n usuarios.add(usuario);\n }\n return usuarios;\n }catch (SQLException e){\n e.printStackTrace();\n }\n return null;\n }",
"public void cadastrarUsuario(View view){\n String textoNome= campoNome.getText().toString();\n String textoEmail= campoEmail.getText().toString();\n String textoSenha= campoSenha.getText().toString();\n\n\n if(!textoNome.isEmpty()){\n if(!textoEmail.isEmpty()){\n if(!textoSenha.isEmpty()){\n Usuario usuario = new Usuario();\n usuario.setNome(textoNome);\n usuario.setEmail(textoEmail);\n usuario.setSenha(textoSenha);\n salvarUsuario(usuario);\n\n home();\n finish();\n }else{ exibirMensagem(\"preencha sua senha\"); }\n }else{ exibirMensagem(\"preencha seu email\"); }\n }else{ exibirMensagem(\"Digite seu nome\"); }\n }",
"public adminUsuarios() {\n initComponents();\n showUsuarios();\n }",
"public static String[] leerUsuarios() {\n int cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM usuarios\");\n while (result.next()) {\n cont++;\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //matriz para guardar los registros\n String[] usuarios = new String[cont];\n cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM usuarios\");\n while (result.next()) {\n //leolos registros y los guardo cada uno en un renglon de la matriz\n System.out.println(\"ResultSet: \" + result.getString(1));\n usuarios[cont] = result.getString(1);\n cont++;\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //regreso reporte completo\n return usuarios;\n }",
"private void cadastrarUsuario(HttpServletRequest request, HttpServletResponse response) {\n\t\t\r\n\t}",
"public Usuario getUsuario(Usuario creador, int id){\r\n Usuario u=null;\r\n if (creador.isAdmin() || creador.getId()==id){\r\n try {\r\n String sql= \"Select * from sistemasEM.usuarios where id=\"+id;\r\n Statement s= connection.createStatement();\r\n ResultSet rs = s.executeQuery(sql);\r\n while(rs.next()){\r\n TipoDescuento td = this.getTipoDescuento(rs.getInt(\"permisosDescuento\"));\r\n TipoPersonal tp = this.getTipoPersonal(rs.getInt(\"permisosPersonal\"));\r\n u= new Usuario(rs.getInt(\"id\"), rs.getString(\"nombre\"), rs.getString(\"mostrar\"),rs.getBoolean(\"admin\"),tp,td,rs.getBoolean(\"notas\"),rs.getBoolean(\"habilitacion\"),rs.getBoolean(\"profesor\"),rs.getInt(\"ciProfesor\"),rs.getBoolean(\"cambiarContra\"));\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ManejadorCodigoBD.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n return u;\r\n }",
"public ModificarUser() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"Cotizador Encinales\");\n this.jLabel7.setText(\"\");\n this.jLabel8.setText(\"\");\n this.jLabel9.setText(\"\");\n this.jLabel10.setText(\"\");\n \n evitarPegar(this.TxtModCorreo);\n evitarPegar(this.TxtModNombre);\n evitarPegar(this.TxtModPassword);\n evitarPegar(this.TxtModUsuario);\n }",
"private void preencherCampos(){\n if (!TextUtils.isEmpty(usuario.getPhotoUrl())){\n Picasso.with(EditarUsuarioPerfilActivity.this).load(usuario.getPhotoUrl()).transform(new CircleTransform()).into(imgPerfilUser);\n }else{\n Picasso.with(EditarUsuarioPerfilActivity.this).load(R.drawable.ic_empresa_new).transform(new CircleTransform()).into(imgPerfilUser);\n }\n\n\n editNome.setText(usuario.getNome());\n editEmail.setText(usuario.getEmail());\n editrelefoneCel.setText(usuario.getTelefoneCel());\n editTelefoneResidencial.setText(usuario.getTelefoneResidencial());\n textUserEditHabilidades.setText(textUserEditHabilidades.getText().toString());\n editCEP.setText(usuario.getCEP());\n editPais.setText(usuario.getPais());\n editEstado.setText(usuario.getEstado());\n editCidade.setText(usuario.getCidade());\n editBairro.setText(usuario.getBairro());\n editRua.setText(usuario.getRua());\n editNumero.setText(usuario.getNumero());\n editComplemento.setText(usuario.getComplemento());\n }",
"public VOUsuario obtenerdatosUsuario(String[] val, String[] tipo) throws RemoteException {\n VOUsuario usu = null;\n if(tipo.length==val.length)\n try {\n FileReader fr = new FileReader(datos);\n BufferedReader entrada = new BufferedReader(fr);\n String s;\n String texto[]=new String[11];\n\n int n, l=0;\n int campo[]=new int[tipo.length];\n boolean encontrado=false;\n for(int i=0; i<tipo.length; i++) {\n if(tipo[i].compareTo(\"id\")==0) campo[i]=0;\n if(tipo[i].compareTo(\"nombre\")==0) campo[i]=4;\n if(tipo[i].compareTo(\"apellido\")==0) campo[i]=5;\n if(tipo[i].compareTo(\"nomuser\")==0) campo[i]=1;\n if(tipo[i].compareTo(\"email\")==0) campo[i]=7;\n if(tipo[i].compareTo(\"rut\")==0) campo[i]=6;\n if(tipo[i].compareTo(\"pass\")==0) campo[i]=3;\n }\n while((s = entrada.readLine()) != null && !encontrado) {\n texto=s.split(\" \");\n int j=0;\n boolean seguir=true;\n while(j<campo.length && seguir) {\n if(texto[campo[j]].toLowerCase().compareTo(val[j].toLowerCase())!=0) {\n seguir=false;\n j++;\n } else {\n j++;\n }\n }\n if(seguir) {\n encontrado=true;\n }\n l++;\n }\n if(encontrado) {\n int area[] = new int[texto[10].split(\"-\").length];\n String ar[]=texto[10].split(\"-\");\n for(int i=0; i<area.length; i++) {\n area[i]=Integer.parseInt(ar[i]);\n }\n usu=new VOUsuario(\n texto[0],\n texto[1],\n this.quitaGuiones(texto[2]),\n texto[3],\n this.quitaGuiones(texto[4]),\n this.quitaGuiones(texto[5]),\n this.quitaGuiones(texto[6]),\n this.quitaGuiones(texto[7]),\n this.quitaGuiones(texto[8]),\n this.quitaGuiones(texto[9]),\n area);\n entrada.close();\n }\n } catch (FileNotFoundException e) {\n System.err.println(\"FileStreamsTest: \" + e);\n } catch (IOException e) {\n System.err.println(\"FileStreamsTest: \" + e);\n }\n return usu;\n }",
"public List<Usuario> getUsuario() {\r\n return usuarios;\r\n }",
"public cambiarContrasenna() {\n initComponents();\n txtNombreUsuario.setEnabled(false);\n inicializarComponentes();\n cargarUsuarios();\n }",
"public frmUsuarios() {\n initComponents();\n mostrar(\"\");\n inhabilitar();\n }",
"@Override\r\n\tpublic List<Usuario> listarUsuario() {\n\t\treturn iUsuario.listarUsuarios();\r\n\t}",
"private void consultadadosUtilizador(String username){\n Scanner s = new Scanner(System.in); int opcao = 0;\n try{\n do{\n System.out.println(\"Informações de Conta \");\n System.out.println(b_dados.getUtilizadores().get(username).toString());\n System.out.println(\"1-Mudar localizacao\");\n System.out.println(\"0 - Retroceder\");\n\n opcao = s.nextInt();\n System.out.print(\"\\n\");\n\n switch(opcao){\n case 1:\n mudarLocalizacaoUtilizador(username);\n break;\n default:\n System.out.print(\"Opção inválida\\n\\n\");\n break;\n\n }\n }while(opcao != 0);\n }\n catch(InputMismatchException e){\n System.out.println(\"Entrada inválida\");\n menuCliente(username);\n\n }\n }",
"private void ObtenerImagenUsuario(String nombre)\n {\n // Realizamos la obtención de la imagen\n ImageLoader.getInstance().loadImage(Helpers.URLImagenes(\"Usuarios/\" + nombre + \".jpg\"), new SimpleImageLoadingListener() {\n @Override\n public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n super.onLoadingComplete(imageUri, view, loadedImage);\n\n try {\n // Procesamos los bytes de la imagen recibida\n Bitmap imagen = loadedImage;\n\n try {\n // Guardamos la imagen\n FileOutputStream fOut = new FileOutputStream(Helpers.ImagenFotoPerfil(getActivity()));\n imagen.compress(Bitmap.CompressFormat.JPEG, 100, fOut);\n fOut.flush();\n fOut.close();\n } catch (IOException ioe) {\n }\n }\n catch (Exception ex) { }\n\n // Limpiamos la opción de espera\n m_Espera.dismiss();\n\n // Si tenemos el Google Play Services\n if (GCMRegistrar.checkPlayServices(getActivity()))\n // Registramos el ID del Google Cloud Messaging\n GCMRegistrar.registrarGCM(getActivity());\n\n // Cargamos los ofertas\n Helpers.LoadFragment(getActivity(), new Ofertas(), \"Ofertas\");\n }\n\n @Override\n public void onLoadingFailed(String imageUri, View view, FailReason failReason) {\n super.onLoadingFailed(imageUri, view, failReason);\n\n // Limpiamos la opción de espera\n m_Espera.dismiss();\n\n // Si tenemos el Google Play Services\n if (GCMRegistrar.checkPlayServices(getActivity()))\n // Registramos el ID del Google Cloud Messaging\n GCMRegistrar.registrarGCM(getActivity());\n\n // Cargamos los ofertas\n Helpers.LoadFragment(getActivity(), new Ofertas(), \"Ofertas\");\n }\n });\n }",
"@Override\n\tpublic Usuario mostrar() {\n\t\tLOG.info(\"Mostrar los datos del usuario\");\n\t\treturn usuario;\n\t}",
"private boolean comprobarUsuario(String nombre, String contrasenia, String grupo) {\n\n return true;\n }",
"@PostConstruct\r\n public void leerListaUsuarios() {\r\n listaUsuarios.addAll(usuarioFacadeLocal.findAll());\r\n }",
"@RequestMapping(value = \"/consultarusuariossistema\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n public CommonsResponse findallusers(@RequestParam String llave_seguridad, HttpServletRequest request)\n {\n CommonsResponse response = new CommonsResponse();\n Map<String, String> mapConfiguration = null;\n try\n {\n logger.debug(\"Se valida la licencia si puede consumir los procesos.\");\n GatewayBaseBean.validateLicenceToWS(llave_seguridad, webUtils.getClientIp(request));\n\n List<UsersAllOutDTO> usuarios = userServices.findAllUsers();\n if (usuarios != null && !usuarios.isEmpty())\n response.setResponse(usuarios);\n else\n return response.toEmpty();\n }\n catch (LicenseException ex)\n {\n response.toLicenceWarn(messageSource, KEY_ERRORS_GENERIC + ex.getCode(), llave_seguridad);\n logger.error(\"Parametros de Licencia Errados WS [consultarusuariossistema], key[\"+llave_seguridad+\"].\", ex);\n return response;\n }\n catch (ServiceException ex)\n {\n response.toParamsWarn(messageSource, KEY_ERRORS_GENERIC + ex.getCode());\n logger.warn(\"Error de Servicio WS [consultarusuariossistema].\", ex);\n return response;\n }\n catch (Exception ex)\n {\n logger.error(\"Error Generico en WS [consultarusuariossistema].\", ex);\n GatewayBaseBean.matchToResponses(response);\n return response;\n }\n logger.info(\"Se retorna respuesta efectiva del WS [consultarusuariossistema].\");\n return response.toOk();\n }",
"public void setUsuario(Usuario usuario) {\n this.usuario = usuario;\n }",
"public void setUsuario(Usuario usuario) {\n this.usuario = usuario;\n }",
"public static void archivoUsuariosNulos() throws Exception {\n\n\t\tFileOutputStream fo = new FileOutputStream(Const.FUSUARIOS, true);\n\t\tMiObjectOutputStream oo = new MiObjectOutputStream(fo);\n\n\t\tint i = 0;\n\t\twhile (i < Const.MAXUSUARIOS) {\n\n\t\t\tUsuario u = new Usuario();\n\t\t\tu = null;\n\t\t\too.writeObject(u);\n\n\t\t\t// Guardo los usuarios en el archivo\n\t\t\ti++;\n\n\t\t} // finaliza el while para la lectura\n\t\too.close();\n\t}",
"public FrmCadUsuario() {\n initComponents();\n Connection conexao = new Conexao().getConnection();\n\n txtId.setEnabled(false);\n lista = usuarioController.getUsuarios();\n if (lista.isEmpty()) {\n JOptionPane.showMessageDialog(null, \"Ainda não foram cadastrados usuários\");\n } else {\n mostrarDados();\n }\n }",
"private void actualizarUsuario() {\n\n\n if (!altura_et.getText().toString().isEmpty() && !peso_et.getText().toString().isEmpty() &&\n !email_et.getText().toString().isEmpty() && !nombreUO_et.getText().toString().isEmpty()) {\n\n user.setAltura(Integer.parseInt(altura_et.getText().toString()));\n user.setPeso(Integer.parseInt(peso_et.getText().toString()));\n user.setCorreo(email_et.getText().toString());\n user.setUserID(nombreUO_et.getText().toString());\n\n\n }else\n Toast.makeText(this,\"Comprueba los datos\", Toast.LENGTH_LONG).show();\n\n }",
"public List<User> ObtenerTodosUsuarios() throws BLException;",
"public Usuario(int idUsuario, String nome, String email, String telefone, int motorista){\n\t\tthis.idUsuario = idUsuario;\n\t\tthis.nome = nome;\n\t\tthis.email = email;\n\t\tthis.telefone = telefone;\n\t\tthis.motorista = motorista;\n\t}",
"private void listaUsuario(HttpServletRequest req, HttpServletResponse resp) {\n\t\t\r\n\t}",
"public Usuarios() {\n initComponents();\n setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);\n panel_usuarios a = new panel_usuarios();\n a.setSize(this.getSize());\n this.add(a);\n this.setLocationRelativeTo(null);\n this.cargarUsuarios();\n usuario.requestFocus();\n }",
"public UsuarioDTO conocerUsuario(String usuario) {\n UsuarioDTO u = null;\n Conexion c = new Conexion();\n ResultSet rs = null;\n PreparedStatement ps = null;\n String sql = \"SELECT * FROM usuario WHERE usuario.usuario = ?\";\n try {\n ps = c.getConexion().prepareStatement(sql);\n u = new UsuarioDTO();\n ps.setString(1, usuario);\n rs = ps.executeQuery();\n while (rs.next()) {\n u.setID(rs.getInt(1));\n u.setNombre(rs.getString(2));\n u.setApellido(rs.getString(3));\n u.setDescripcion(rs.getString(4));\n u.setTelefono(rs.getString(5));\n u.setDireccion(rs.getString(6));\n u.setUsuario(rs.getString(7));\n u.setEmail(rs.getString(8));\n u.setPassword(rs.getString(9));\n u.setFecha_Nacimiento(rs.getString(10));\n u.setFecha_Creacion(rs.getString(11));\n u.setSexo(rs.getString(12));\n u.setImagen(rs.getAsciiStream(13));\n }\n\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n } finally {\n try {\n ps.close();\n rs.close();\n c.cerrarConexion();\n } catch (Exception ex) {\n }\n }\n return u;\n }",
"public Usuario iniciarSesion(Usuario u) {\n Usuario user = null;\n\n try {\n if (this.em.isOpen()) {\n user = (Usuario) this.em.createNamedQuery(\"Usuario.findByUsernamePass\")\n .setParameter(\"username\", u.getUsername())\n .setParameter(\"password\", u.getPassword()).getSingleResult();\n em.refresh(user);\n }\n\n } catch (Exception e) {\n //e.printStackTrace();\n\n }\n\n return (user);\n }",
"public void cargaDatosInicialesSoloParaModificacionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n selectAuxiliarParaAsignacionModificacion = cntEntidadesService.listaDeAuxiliaresPorEntidad(selectedEntidad);\n //Obtien Ajuste Fin\n\n //Activa formulario para automatico modifica \n switch (selectedEntidad.getNivel()) {\n case 1:\n swParAutomatico = true;\n numeroEspaciador = 200;\n break;\n case 2:\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciador = 200;\n break;\n case 3:\n swParAutomatico = false;\n numeroEspaciador = 1;\n break;\n default:\n break;\n }\n\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n }",
"public Usuario(){\n nombre = null;\n apellidos = null;\n dni = null;\n email = null;\n tlf = null;\n nombreUsuario = null;\n tarjetaCredito = null;\n hashPasswd = null; \n fotoPerfil = null;\n direccion = null;\n valoracionMedia = -1;\n }",
"public static Usuario getUsuario(int i)throws IOException{\n if(i>=0 && i<getNumerodeUsers()){ //si esta dentro del rango sigue con su trabajo\r\n flujou.seek(i*Tamañouser); // se posiciona en la posicion que busca\r\n return new Usuario(flujou.readUTF(),flujou.readUTF(),flujou.readFloat()); // regresa el usuario de esa posicion en el archivo\r\n \r\n }else{\r\n JOptionPane.showMessageDialog(null,\"Posicion de usuario inválida\");\r\n return null;\r\n }\r\n }",
"public void insereUsuario( Usuario usuario ) {\n\t\ttry {\n\t\t\t// le dados antigos\n\t\t\tArrayList<Usuario> usuarios = new ArrayList<Usuario>();\n\t\t\tusuarios = leUsuarios();\n\t\t\t\n\t\t\tFileOutputStream arq = new FileOutputStream(\"database/usuarios.dat\");\n\t\t\tObjectOutputStream out = new ObjectOutputStream(arq);\n\t\t\t\n\t\t\t// reescreve dados antigos\n\t\t\tboolean existe = false;\n\t\t\tfor ( int i = 0; i < usuarios.size() ; i++ ) {\n\t\t\t\tUsuario aux = usuarios.get(i);\n\t\t\t\t// Não cadastra usuário se login ou crm não for único\n\t\t\t\tif ( aux.getLogin().equals(usuario.getLogin()) || aux.getCrm().equals(usuario.getCrm()) ) {\n\t\t\t\t\texiste = true;\n\t\t\t\t}\n\t\t\t\tout.writeObject(aux);\n\t\t\t\tout.flush();\n\t\t\t}\n\t\t\t\n\t\t\t// insere novo usuário abaixo dos antigos usuários\n\t\t\tif ( !existe ) {\n\t\t\t\tUsuario aux = new Usuario(usuario.getNome(), usuario.getCrm(), \n\t\t\t\t\t\t\t\t\t\t\tusuario.getLogin(), usuario.getSenha());\n\t\t\t\tout.writeObject(aux);\n\t\t\t\tout.flush();\n\t\t\t\tSystem.out.println(\"Usuário cadastrado com sucesso\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Login ou CRM já cadastrada.\");\n\t\t\t}\n\t\t\t\t\n\t\t\tout.close();\t\n\t\t}\n\t\tcatch( IOException exc ) {\n\t\t\t\n\t\t\tSystem.out.println(\"Erro ao gravar arquivo.\");\n\t\t}\n\t}",
"public void cadastrarUsuario(final Usuario usuario){\n mAuth = ConfiguracaoFirebase.getFirebaseAuth();\n mAuth.createUserWithEmailAndPassword(\n usuario.getEmail(),usuario.getSenha()\n ).addOnCompleteListener(\n this, new OnCompleteListener<AuthResult>() {\n //Verifica exceções e se o usuário se cadastrou\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n Toast.makeText(getApplicationContext(),\"Usuário cadastrado com sucesso!\",Toast.LENGTH_SHORT).show();\n finish();\n //Convertendo email em base 64 para ser usado como uidPessoa\n try {\n String identificadorUsuario = Base64Custom.codificarBase64(FirebaseAuth.getInstance().getCurrentUser().getEmail());\n usuario.setUidPessoa(identificadorUsuario);\n usuario.setNome(FirebaseAuth.getInstance().getCurrentUser().getDisplayName());\n usuario.setEmail(FirebaseAuth.getInstance().getCurrentUser().getEmail());\n usuario.setPontos(1);\n usuario.salvar();\n cadastrarUsuario(usuario);\n logarUsuario(usuario);\n abrirTelaPrincipal();\n }catch (Exception e){\n e.printStackTrace();\n }\n }else {String excecao = \"\";\n try{\n throw task.getException();\n\n }catch (FirebaseAuthWeakPasswordException e){\n excecao = \"Digite uma senha forte!\";\n }catch (FirebaseAuthInvalidCredentialsException e){\n excecao = \"Por favor, digite um e-mail válido\";\n }catch (FirebaseAuthUserCollisionException e){\n excecao = \"esta conta já está cadastrada\";\n }catch (Exception e){\n excecao = \"Erro ao cadastrar usuário\" + e.getMessage();\n e.printStackTrace();\n }\n Toast.makeText(getApplicationContext(),excecao,Toast.LENGTH_SHORT).show();\n }\n }\n });\n }",
"private void listarUsuarios() {\r\n \t\r\n \tfor(String usuario : ConfigureSetup.getUsers()) {\r\n \t\tif(!usuario.equals(ConfigureSetup.getUserName()))\r\n \t\t\tlista_usuarios.getItems().add(usuario);\r\n \t}\r\n \t\r\n \t//lista_usuarios.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);\t\r\n }",
"public abstract Setusuario buscarUsuario(String nomUsuario);",
"@Override\n\t@Transactional\n\tpublic List<Usuario> ListaUsuarios() {\n\t\ttry {\n\t\t\tQuery query = manager.createQuery(\"from Usuario\");\n\t\t\tList<Usuario> usuarios = query.getResultList();\n\t\t\treturn usuarios;\n\t\t}catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tthrow new RuntimeException(e);\t\t\t\n\t\t} finally {\n\t\t\t// TODO: handle finally clause\n\t\t\tmanager.close();\n\t\t}\n\t}",
"public void effacerUtilisateur() {\r\n this.modele.effacerUtilisateur(this.modele);\r\n this.modele = new Utilisateurs();\r\n }",
"public login() {\n\n initComponents();\n \n usuarios.add(new usuarios(\"claudio\", \"claudioben10\"));\n usuarios.get(0).setAdminOno(true);\n \n }",
"private void cargaInfoEmpleado(){\r\n Connection conn = null;\r\n Conexion conex = null;\r\n try{\r\n if(!Config.estaCargada){\r\n Config.cargaConfig();\r\n }\r\n conex = new Conexion();\r\n conex.creaConexion(Config.host, Config.user, Config.pass, Config.port, Config.name, Config.driv, Config.surl);\r\n conn = conex.getConexion();\r\n if(conn != null){\r\n ArrayList<Object> paramsIn = new ArrayList();\r\n paramsIn.add(txtLogin);\r\n QryRespDTO resp = new Consulta().ejecutaSelectSP(conn, IQryUsuarios.NOM_FN_OBTIENE_INFO_USUARIOWEB, paramsIn);\r\n System.out.println(\"resp: \" + resp.getRes() + \"-\" + resp.getMsg());\r\n if(resp.getRes() == 1){\r\n ArrayList<ColumnaDTO> listaColumnas = resp.getColumnas();\r\n for(HashMap<String, CampoDTO> fila : resp.getDatosTabla()){\r\n usuario = new UsuarioDTO();\r\n \r\n for(ColumnaDTO col: listaColumnas){\r\n switch(col.getIdTipo()){\r\n case java.sql.Types.INTEGER:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Integer.parseInt(fila.get(col.getEtiqueta()).getValor().toString().replaceAll(\",\", \"\").replaceAll(\"$\", \"\").replaceAll(\" \", \"\")));\r\n break;\r\n \r\n case java.sql.Types.DOUBLE:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Double.parseDouble(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.FLOAT:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.DECIMAL:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.VARCHAR:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n \r\n case java.sql.Types.NUMERIC:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n default:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n } \r\n }\r\n }\r\n sesionMap.put(\"UsuarioDTO\", usuario);\r\n }else{\r\n context.getExternalContext().getApplicationMap().clear();\r\n context.getExternalContext().redirect(\"index.xhtml\");\r\n }\r\n }\r\n }catch(Exception ex){\r\n System.out.println(\"Excepcion en la cargaInfoEmpleado: \" + ex);\r\n }finally{\r\n try{\r\n conn.close();\r\n }catch(Exception ex){\r\n \r\n }\r\n }\r\n }",
"public Usuario ObtenerUsuario(String nombre)\n {\n /*creamos una instancia de la clase usuario que sera donde almacenaremos la informacion\n del usuario que deseemos analizar*/\n Usuario jugador = new Usuario(); \n //encerramos todo en un try para manejar los errores\n try\n {\n //si no hay ninguna conexion entonces generamos una\n if(con == null)\n con = Conexion_Sql.getConexion();\n \n String sql = \"SELECT * FROM puntajes WHERE nombre = ?\"; \n PreparedStatement statement = con.prepareStatement(sql);\n statement.setString(1, nombre);\n ResultSet result = statement.executeQuery();\n \n result.next();\n //agregamos toda la informacion obtenida a la instancia del objeto\n jugador = new Usuario(result.getString(1),result.getInt(2)); \n }\n catch(SQLException ex)\n {\n ex.printStackTrace();\n }\n \n //retornamos dicho producto o instancia\n return jugador;\n }",
"public static Usuario getUsuarioypass(int i)throws IOException{\n if(i>=0 && i<getNumerodeUsers()){ // si esta dentro del rango sigue su trabajo \r\n flujou.seek(i*Tamañouser); // se posiciona en la posicion del usuario\r\n return new Usuario(flujou.readUTF(),flujou.readUTF()); // regresa unicamente el usuario y contraseña segun el archivo\r\n \r\n }else{\r\n JOptionPane.showMessageDialog(null,\"Posicion de usuario inválida\");\r\n return null;\r\n }\r\n }",
"private void NuevoUsuario(String IDFacebook, Usuarios nuevo)\n {\n final String szIDFacebook = IDFacebook;\n\n // Guardamos los datos del nombre del usuario\n Helpers.setNombre(getActivity(), nuevo.NOMBRE);\n\n // Datos de la solicitud\n cliente.post(getActivity(), Helpers.URLApi(\"nuevousuario\"), Usuarios.ToStringEntity(nuevo), \"application/json\", new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n super.onSuccess(statusCode, headers, responseBody);\n\n try\n {\n // Obtenemos el objeto JSON\n JSONObject objeto = Helpers.ResponseBodyToJSON(responseBody);\n\n // Si está OK\n if (objeto.isNull(\"Error\"))\n {\n // Guardamos el token del usuario\n Helpers.setTokenAcceso(getActivity(), objeto.getJSONObject(\"usuario\").getString(\"token\"));\n\n // Guardamos el nombre del usuario\n Helpers.setNombre(getActivity(), objeto.getJSONObject(\"usuario\").getString(\"nombre\"));\n\n // Subimos la foto del usuario\n GetPictureFacebook(szIDFacebook, objeto.getJSONObject(\"usuario\").getString(\"imagen\"));\n }\n else\n {\n // Mostramos la ventana de error\n Helpers.MostrarError(getActivity(), objeto.getString(\"Error\"));\n }\n } catch (JSONException ex) {\n // Mostramos la ventana de error\n Helpers.MostrarError(getActivity(), getString(R.string.notcreateuser));\n }\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n // Mostramos la ventana de error\n Helpers.MostrarError(getActivity(), getString(R.string.notcreateuser));\n }\n });\n }",
"@Override\n\t/*Método que se va a usar para comprobar el saldo del usuario que esté logueado nada más entrar en el panel del usuario*/\n\tpublic String comprobarDatos(String nombreusuario) {\n\t\tDBConnection con = new DBConnection();\n\t\tString sql =\"SELECT * from usuarios where nombreusuario LIKE '\"+nombreusuario+\"'\"; //consulta para obtener el saldo\n\t\tString datos=\"\";\n\t\ttry {\n\t\t\tStatement st = con.getConnection().createStatement();\n\t\t\tResultSet rs=st.executeQuery(sql);\n\t\t\twhile(rs.next()) {\n\t\t\t\tString saldo=Float.toString(rs.getFloat(\"saldo\")); //cojo el saldo de la consulta y haco la conversion de float a string\n\t\t\t\tString nombre=rs.getString(\"nombre\");\n\t\t\t\tString apellidos=rs.getString(\"apellidos\");\n\t\t\t\tString clave=rs.getString(\"clave\");\n\t\t\t\tString email=rs.getString(\"email\");\n\t\t\t\tString premium=rs.getString(\"premium\");\n\t\t\t\t\n\t\t\t\tdatos=nombre+\",\"+apellidos+\",\"+clave+\",\"+email+\",\"+premium+\",\"+saldo; //se almacenan los datos obtenidos en la cadena que se va a devolver\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tst.close();\n\t\t\treturn datos; //devuelvo todos los datos que se han obtenido\n\t\t}catch(Exception e) {\n\t\t\treturn e.getMessage();\n\t\t}finally {\n\t\t\tcon.desconectar();\n\t\t\t}\n\t\t\n\t}",
"public Cgg_res_oficial_seguimiento_usuario(\n\t\t\tString inCrosg_codigo,\n\t\t\tString inCrofm_codigo,\n\t\t\tString inCusu_codigo,\n\t\t\tString inCusu_nombres,\n\t\t\tString inCusu_apellidos\n\t\t){\n\t\t\tthis.setCROSG_CODIGO(inCrosg_codigo);\n\t\t\tthis.setCROFM_CODIGO(inCrofm_codigo);\n\t\t\tthis.setCROSG_CODIGO(inCrofm_codigo);\n\t\t\tthis.setCUSU_CODIGO(inCusu_codigo);\n\t\t\tthis.setCUSU_NOMBRES(inCusu_nombres);\n\t\t\tthis.setCUSU_APELLIDOS(inCusu_apellidos);\t\t\t\n\t\t}",
"public List<Usuario> getAllUsuarios(){\r\n List<Usuario> users = new ArrayList<Usuario>();\r\n try{\r\n PreparedStatement ps = bd.prepareStatement(SQLALL);\r\n ResultSet rs = ps.executeQuery();\r\n while(rs.next()){\r\n Usuario u = new Usuario();\r\n u.setId(rs.getInt(\"id\"));\r\n u.setUsuario(rs.getString(\"usuario\"));\r\n u.setNome(rs.getString(\"nome\"));\r\n u.setEmail(rs.getString(\"email\"));\r\n u.setSenha(rs.getString(\"senha\"));\r\n u.setPin(rs.getString(\"pin\"));\r\n u.setUrlfoto(rs.getString(\"urlfoto\"));\r\n u.setAcesso(rs.getTimestamp(\"acesso\"));\r\n u.setAdmin(rs.getInt(\"admin\"));\r\n users.add(u);\r\n }\r\n rs.close();\r\n ps.close();\r\n ConexaoBD.fechar(bd);\r\n } catch(SQLException sqle){\r\n System.out.println(\"Erro no getAllUsuarios no DAO: \" + sqle.getMessage());\r\n }\r\n return users;\r\n }",
"private void registrarDatosBD(String nombre, String apellido, String usuario, String clave, String fnacim) {\n\t\tUsuario u = new Usuario(0, nombre, apellido, usuario, clave, fnacim, 0, 0);\n\t\t// 02. Registrar el obj usando la clase de gestion y guardando\n\t\tint ok = new GestionUsuarios().registrar(u);\n\n\t\t// salidas\n\t\tif (ok == 0) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Error al registrar\");\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(this, \"Registro OK\");\n\t\t}\n\t}"
] | [
"0.75745094",
"0.7522435",
"0.75197613",
"0.75144273",
"0.7483647",
"0.71692705",
"0.7089092",
"0.703124",
"0.7009955",
"0.6888007",
"0.6885774",
"0.6862427",
"0.6847042",
"0.6831291",
"0.6823443",
"0.6801252",
"0.6734518",
"0.6699745",
"0.6680509",
"0.66741025",
"0.66625506",
"0.6658656",
"0.665542",
"0.66340965",
"0.66238326",
"0.66011447",
"0.6588766",
"0.6582072",
"0.6564601",
"0.6555694",
"0.6549301",
"0.6541456",
"0.65188515",
"0.65145373",
"0.65086716",
"0.6507821",
"0.6495386",
"0.6489061",
"0.64796305",
"0.64486605",
"0.64425385",
"0.6439238",
"0.6435376",
"0.6404491",
"0.6394156",
"0.6392691",
"0.6389221",
"0.63888806",
"0.63813436",
"0.637648",
"0.6364695",
"0.63578135",
"0.63578135",
"0.6350082",
"0.63478845",
"0.6333905",
"0.6330205",
"0.6328912",
"0.6328548",
"0.6327597",
"0.6324317",
"0.63188624",
"0.631474",
"0.6312963",
"0.6307812",
"0.6307722",
"0.63050705",
"0.6305059",
"0.63028854",
"0.6297152",
"0.6291637",
"0.62868696",
"0.6284534",
"0.6284534",
"0.6282307",
"0.6281642",
"0.6281379",
"0.6280553",
"0.6280063",
"0.62787724",
"0.6277059",
"0.62654614",
"0.6244952",
"0.62386924",
"0.6237536",
"0.62339324",
"0.62333024",
"0.6230316",
"0.6226832",
"0.62265354",
"0.62173694",
"0.6211036",
"0.62095505",
"0.62095034",
"0.6206511",
"0.61984396",
"0.6193063",
"0.6190459",
"0.61882246",
"0.6182078",
"0.61749774"
] | 0.0 | -1 |
Query with from to option | public Map<Map<String, Object>, Map<String, Object>> queryFromAndTo(String siteId, int lastHours, String from, String to, String timeType) {
String[] fromToIndices = filterRangeDateIndices(from, to, lastHours, timeType);
boolean isLoggedTime = false;
if (lastHours > 0 || timeType.equals("h") || timeType.equals("m")) {
isLoggedTime = true;
}
return doMultiRequestForDays(siteId, fromToIndices, isLoggedTime, lastHours, timeType);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Timetable> getListSearch(String from, String to) throws Exception;",
"private String buildQuery(final String projectId, final Date date,\r\n\t\t\tfinal State from, final State to) {\r\n\r\n\t\treturn from.equals(to) ? buildReflexiveStateQuery(projectId, date, from)\r\n\t\t\t\t: buildFromToStateQuery(projectId, date, from, to);\r\n\t}",
"Query query();",
"ResultSet selectByTimeRanch(String from_utc, String to_utc) {\n try {\n PreparedStatement preparedStatement = connection.prepareStatement(selectStmt);\n preparedStatement.setString(1, from_utc);\n preparedStatement.setString(2, to_utc);\n return preparedStatement.executeQuery();\n } catch (SQLException e) {\n logger.log(Level.WARNING, \"SQLException \", e.getMessage());\n }\n return null;\n }",
"protected void appendSelectRange(SQLBuffer buf, long start, long end) {\n buf.append(\" FETCH FIRST \").append(Long.toString(end)).\r\n append(\" ROWS ONLY\");\r\n }",
"public List<KeyValue> scan(Key from, Key to, String queryStr) {\n List<KeyCluster> keyClusterList = findAll();\n OpType opType = ( queryStr == null ? OpType.MultiGets : OpType.MultiSelectQuery);\n //return executeRequest( keyClusterList, opType);\n int size = keyClusterList.size();\n List<Key> keyList = new ArrayList<Key>(2);\n keyList.add(from); keyList.add(to);\n ScanParaList scanParaList = new ScanParaList(OpType.Get, keyList, queryStr);\n CountDownLatch countDownLatch = new CountDownLatch(size);\n ExecutorService executor = Executors.newFixedThreadPool(size);\n List<Runnable> runnableList = new ArrayList<Runnable>(size);\n for ( int i = 0; i < size ; i++ ) {\n Request request = createScanRequest(scanParaList);\n RunThread runThread = new RunThread(request, keyClusterList.get(i), countDownLatch, OpType.Scan);\n runnableList.add( runThread);\n executor.submit( runThread );\n }\n try {\n countDownLatch.await(timeout *5, TimeUnit.MILLISECONDS);\n } catch (InterruptedException ex) {\n logger.warn(ex.getMessage(), ex);\n } finally {\n executor.shutdown();\n return mergeResponse( runnableList);\n }\n }",
"void queryTimeSeries(final Message<JsonObject> msg) {\n\n final JsonObject query = msg.body();\n LOG.debug(\"{}\\n{}\", address, query.encodePrettily());\n\n // get the paramsters from the query\n final Range range = rangeParser.parse(query.getJsonObject(\"range\").getString(\"from\"),\n query.getJsonObject(\"range\").getString(\"to\"));\n final long interval = intervalParser.parseToLong(query.getString(\"interval\"));\n final JsonArray targets = query.getJsonArray(\"targets\")\n .stream()\n .map(o -> ((JsonObject) o).getString(\"target\"))\n .collect(toJsonArray());\n\n //build the query and options\n final JsonObject tsQuery = $and(obj(\"n.begin\", $gte(range.getStart())),\n obj(\"n.begin\", $lte(range.getEnd())),\n obj(\"t.name\", $in(targets)));\n\n final FindOptions findOptions = new FindOptions().setFields(obj().put(\"t.name\", 1)\n .put(\"n.begin\", 1)\n .put(\"n.value\", 1)\n .put(\"_id\", 0)).setSort(obj(\"n.begin\", 1));\n\n long start = System.currentTimeMillis();\n //execute search and process response\n client.findWithOptions(collectionName, tsQuery, findOptions, result -> {\n\n if (result.succeeded()) {\n JsonArray resp = processResponse(range, r -> range.splitEvery(interval), targets, result);\n long end = System.currentTimeMillis();\n LOG.debug(\n \"Sending response with {} timeseries and {} datapoints (after {} ms)\",\n resp.size(),\n resp.stream()\n .map(o -> ((JsonObject) o).getJsonArray(\"datapoints\"))\n .collect(Collectors.summingInt(JsonArray::size)),\n (end - start));\n msg.reply(resp);\n\n } else {\n LOG.error(\"Annotation query failed\", result.cause());\n msg.reply(arr());\n }\n\n });\n }",
"java.util.List<AuditoriaUsuario> findRange(int startPosition, int maxResults, String sortFields, String sortDirections);",
"private int search(String query, int from, int to)\n {\n\n if(list.isEmpty() || from >= to){\n return -1;\n }\n\n TreeMap<String, Integer> mapList = new TreeMap<>();\n\n for (int i = 0; i < list.size(); i++) {\n mapList.put(list.get(i), i);\n }\n Collections.sort(list);\n\n\n\n int middle = (from + to) / 2;\n int comparison = query.compareTo(list.get(middle));\n if (comparison == 0){\n return mapList.get(list.get(middle));\n }\n if(comparison > 0){\n\n return search(query, middle, to);\n }\n\n if(comparison < 0){\n return search(query, from, middle);\n }\n\n return -1;\n }",
"@Override\n public List<UserQuery> getQueries(LocalDateTime rangeStart, LocalDateTime rangeEnd) {\n return jdbi.withHandle(handle -> {\n handle.registerRowMapper(ConstructorMapper.factory(UserQuery.class));\n return handle.createQuery(UserQuery.getExtractQuery(rangeStart, rangeEnd))\n .mapTo(UserQuery.class)\n .list();\n });\n }",
"public static Cursor query(SQLiteDatabase db, long topicId, int from, int to, int limit) {\n String sql = \"SELECT * FROM \" + TABLE_NAME +\n \" WHERE \" +\n COLUMN_NAME_TOPIC_ID + \"=\" + topicId +\n (from > 0 ? \" AND \" + COLUMN_NAME_SEQ + \">\" + from : \"\") +\n (to > 0 ? \" AND \" + COLUMN_NAME_SEQ + \"<=\" + to : \"\") +\n \" AND \" + COLUMN_NAME_STATUS + \"<=\" + BaseDb.STATUS_VISIBLE +\n \" ORDER BY \" + COLUMN_NAME_TS +\n (limit > 0 ? \" LIMIT \" + limit : \"\");\n\n // Log.d(TAG, \"Sql=[\" + sql + \"]\");\n\n return db.rawQuery(sql, null);\n }",
"public ArrayList<Timestamp> getQueryParameters(Timestamp from, Timestamp to) {\n ArrayList<Timestamp> params = new ArrayList<Timestamp>();\n params.add(to);\n params.add(to);\n return params;\n }",
"Query queryOn(Connection connection);",
"ExchangeValue findByFromAndTo(String from, String to);",
"List<ShipmentInfoPODDTO> search(String query);",
"@Test\n public void learnToQueryWithDomainSpecificRangeParam() throws Exception {\n SqlSession session = null;\n\n List<Country> lc = session.selectList(\"getCountryRange3\", new Range(22, 33));\n\n assertEquals(12, lc.size());\n Country finland = lc.get(11);\n assertEquals(\"Finland\", finland.getCountry());\n\n }",
"List<OwnerOperatorDTO> search(String query);",
"List<Room> selectRoomListWithFromIndex(@Param(\"building\") String building, @Param(\"fromIndex\") Integer fromIndex);",
"List<Transfer> search(TransferQuery query) throws DaoException;",
"CampusSearchQuery generateQuery();",
"public List<ShelfItem> getAll(String username, Integer from, Integer to);",
"private static void executeQuery3(PersistenceManager pm) {\n Query query = pm.newQuery(Book.class);\n query.setFilter(\"date >= fromDate && date <= toDate\");\n query.declareImports(\"import java.util.Date\");\n query.declareParameters(\"Date fromDate, Date toDate\");\n query.setOrdering(\"date descending\"); // order from new to old\n Collection results =\n (Collection)query.execute(getYearDate(2002), getYearDate(2003));\n printCollection(\"Books published in 2002:\", results.iterator());\n query.closeAll();\n }",
"List<ResultsView2> findByCnoBetween(int min,int max);",
"public void prepareQuery(boolean fromtext, boolean totext) {\n if (fromtext) {\n fromquery = prepareTextQuery(fromedittext.getText().toString());\n } else {\n fromquery = \"https://maps.googleapis.com/maps/api/place/textsearch/json?location=\" +\n lat + \",\" + lng + \"&radius=\" + RAD +\n \"&type=\" + fromitem +\n \"&key=\" + apikey;\n }\n\n if (totext) {\n toquery = prepareTextQuery(toedittext.getText().toString());\n } else {\n toquery = \"https://maps.googleapis.com/maps/api/place/textsearch/json?location=\" +\n lat + \",\" + lng + \"&radius=\" + RAD +\n \"&type=\" + toitem +\n \"&key=\" + apikey;\n }\n }",
"public void setLookupByToFromStatement(EdaContext xContext) throws IcofException {\n\n\t\t// Define the query.\n\t\tString query = \"select \" + ALL_COLS + \n\t\t \" from \" + TABLE_NAME + \n\t\t \" where \" + FROM_ID_COL + \" = ? \" +\n\t\t \" and \" + TO_ID_COL + \" = ? \";\n\n\t\t// Set and prepare the query and statement.\n\t\tsetQuery(xContext, query);\n\n\t}",
"public Query buildQuery(String from, String where, QueryBuilder builder){\n\t\tbuilder.from(from);\n builder.where(where);\n return builder.getQuery();\n\t}",
"List<String> queryUniqueDomains(Long from, Long to);",
"public List<Measurement> findMeasurementsByTimeRange(Date fromDate, Date toDate) {\n return entityManager.createQuery(\"SELECT m from \" +\n \"Measurement m where m.date >= :fromDate and m.date <= :toDate\", Measurement.class)\n .setParameter(\"fromDate\", fromDate)\n .setParameter(\"toDate\", toDate)\n .getResultList();\n\n }",
"List<T> getAllByRange(int firstItemNumber,\n int itemsCount,\n String sortBy,\n String sortTo);",
"@Transactional\r\n\tpublic List<Room> getReservedFromTo(LocalDate from, LocalDate to){\r\n\t\treturn this.roomRepository.findByReservationsIn(\r\n\t\t\t\tthis.reservationService.getFromTo(from, to));\r\n\t}",
"@GetMapping(path = \"/getAllDoctorsForAgendaPage/{from}/{to}\")\n\tpublic ResponseEntity<MappingJacksonValue> getAllDoctorsForAgendaPage(@PathVariable(name = \"from\") int from, @PathVariable(name = \"to\") int to) {\n\t\ttry {\n\t\t\tSimpleBeanPropertyFilter userFilter = SimpleBeanPropertyFilter.serializeAllExcept(\"username\", \"roles\", \"email\", \"language\");\n\t\t\tSimpleBeanPropertyFilter doctorFilter = SimpleBeanPropertyFilter.serializeAllExcept(\"pesel\", \"country\", \"zipCode\", \"city\", \"street\", \n\t\t\t\t\t\"streetNo\", \"unitNo\", \"phone\", \"registerDateTime\", \"editDateTime\");\n\t FilterProvider filterProvider = new SimpleFilterProvider().addFilter(\"userFilter\", userFilter).addFilter(\"doctorFilter\", doctorFilter);\n\t\t\tList<Doctor> allDoctors = visitService.getAllDoctorsForAgendaPage(from, to);\n\t\t\tMappingJacksonValue mappingJacksonValue = new MappingJacksonValue(allDoctors);\n\t\t\tmappingJacksonValue.setFilters(filterProvider);\n\t\t\treturn ResponseEntity.ok(mappingJacksonValue);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"ERROR get all doctors for agenda page\", e);\n\t\t\treturn new ResponseEntity<MappingJacksonValue>(HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t}\n\t}",
"public void setFrom(String from) {\n this.from = from;\n }",
"private void montaQuery(Publicacao object, Query q) {\t\t\n\t}",
"<T> Collection<T> query(\n\t\t\tfinal Collection<T> destination,\n\t\t\tfinal Builder<T> builder,\n\t\t\tfinal String query,\n\t\t\tfinal Object... parameters);",
"public void setFrom(int from) {\n this.from = from;\n }",
"@Override\n\tpublic TypedQuery<Plan> constructQuery(Map<String, String> customQuery) {\n\t\tCriteriaBuilder cb = null;\n\t\ttry {\n\t\t\tcb = em.getCriteriaBuilder();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tCriteriaQuery<Plan> cq = cb.createQuery(Plan.class);\n\t\tRoot<Plan> plan = cq.from(Plan.class);\n\t\tPredicate existingpredicate = null;\n\t\tint predicateCount=0;\n\t\tPredicate masterPredicate=null;\n\n\t\ttry {\n\n\t\t\tfor (Map.Entry<String,String> entry : customQuery.entrySet()) \n\t\t\t{\n\t\t\t\tif(plan.get(entry.getKey().toString()) != null)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t//Query for range values with comma(,) as delimiter\n\t\t\t\t\tif(entry.getValue().contains(\",\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tint minRange=Integer.parseInt(customQuery.get(entry.getKey().toString()).split(\",\")[0]);\n\t\t\t\t\t\tint maxRange=Integer.parseInt(customQuery.get(entry.getKey().toString()).split(\",\")[1]);\n\t\t\t\t\t\tif(predicateCount==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmasterPredicate = cb.between(plan.get(entry.getKey().toString()),minRange, maxRange );\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\texistingpredicate = cb.between(plan.get(entry.getKey().toString()),minRange, maxRange );\n\t\t\t\t\t\t\tmasterPredicate=cb.and(masterPredicate,existingpredicate);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpredicateCount++;\n\t\t\t\t\t}\n\t\t\t\t\t//Query for equals values\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(predicateCount==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmasterPredicate = cb.equal(plan.get(entry.getKey().toString()), customQuery.get(entry.getKey().toString()));\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\texistingpredicate = cb.equal(plan.get(entry.getKey().toString()), customQuery.get(entry.getKey().toString()));\n\t\t\t\t\t\t\tmasterPredicate=cb.and(masterPredicate,existingpredicate);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpredicateCount++;\n\t\t\t\t\t\t//cq.where(predicate);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcq.where(masterPredicate);\n\t\tTypedQuery<Plan> query = em.createQuery(cq);\n\t\treturn query;\n\t}",
"public java.util.List<Todo> findAll(int start, int end);",
"public void setFrom(String from) {\r\n\t\tthis.from= from;\r\n\t}",
"public List<Route> findRoutesByCountries(String fromCountry, String toCountry) {\n List<Route> res = em.createQuery(\r\n \"SELECT rt FROM Route as rt \" + \" JOIN FETCH rt.routeId.source as src \"\r\n + \" JOIN FETCH rt.routeId.destination dst \" + \"WHERE src.country=:from AND dst.country=:to\",\r\n Route.class).setParameter(\"from\", fromCountry).setParameter(\"to\", toCountry).getResultList();\r\n return res;\r\n }",
"@Override\n public List<UserMessage> searchAllMessagesFromTo(long fromUserId, long toUserId) {\n List<UserMessage> messages;\n\n PreparedStatement preparedStatement = null;\n ResultSet resultSet = null;\n try(Connection connection = ConnectionPool.getInstance().getConnection()){\n\n preparedStatement = connection.prepareStatement(SEARCH_MESSAGE_FROM_TO_SQL);\n preparedStatement.setLong(1, fromUserId);\n preparedStatement.setLong(2, toUserId);\n resultSet = preparedStatement.executeQuery();\n\n messages = DialogMapper.createMessages(resultSet);\n\n }\n catch (SQLException e) {\n LOGGER.warn(\"messages from to are not founded\", e);\n return new ArrayList<>();\n }\n finally {\n try {\n DbUtils.close(resultSet);\n }\n catch (SQLException e) {\n LOGGER.error(PufarDaoConstant.CLOSE_RESULTSET_ERROR_LOG);\n }\n try {\n DbUtils.close(preparedStatement);\n }\n catch (SQLException e) {\n LOGGER.error(PufarDaoConstant.CLOSE_STATEMENT_ERROR_LOG);\n }\n }\n\n return messages;\n }",
"Set<StewardSimpleDTO> getAllAvailable(Date from, Date to);",
"@Override\r\n\tpublic List<TUsers> queryByPage(int page, QueryUser query) {\n\t\t\r\n\t\tint start=(page-1)*contests.PAGECONT+1;\r\n\t\tint end=page*contests.PAGECONT;\r\n\t\tquery.setStart(start);\r\n\t\tquery.setEnd(end);\r\n\t\treturn dao.queryByPage(query);\r\n\t}",
"private void constructFrom(CriteriaBuilderImpl cb, AbstractQuery<?> q, Tree froms) {\n \t\tfor (int i = 0; i < froms.getChildCount(); i++) {\n \t\t\tfinal Tree from = froms.getChild(i);\n \t\t\t// root query from\n \t\t\tif (from.getType() == JpqlParser.ST_FROM) {\n \t\t\t\tfinal Aliased fromDef = new Aliased(from.getChild(0));\n \n \t\t\t\tfinal EntityTypeImpl<Object> entity = this.getEntity(fromDef.getQualified().toString());\n \n \t\t\t\tfinal RootImpl<Object> r = (RootImpl<Object>) q.from(entity);\n \t\t\t\tr.alias(fromDef.getAlias());\n \n \t\t\t\tthis.putAlias((BaseQueryImpl<?>) q, from, fromDef, r);\n \n \t\t\t\tthis.constructJoins(cb, (AbstractCriteriaQueryImpl<?>) q, r, from.getChild(1));\n \n \t\t\t\tif (from.getChild(from.getChildCount() - 1).getType() == JpqlParser.LALL_PROPERTIES) {\n \t\t\t\t\tfor (final AssociationMapping<?, ?, ?> association : entity.getAssociations()) {\n \t\t\t\t\t\tif (!association.isEager()) {\n \t\t\t\t\t\t\tfinal Iterator<String> pathIterator = Splitter.on(\".\").split(association.getPath()).iterator();\n \n \t\t\t\t\t\t\t// Drop the root part\n \t\t\t\t\t\t\tpathIterator.next();\n \n \t\t\t\t\t\t\tFetch<?, ?> fetch = null;\n \t\t\t\t\t\t\twhile (pathIterator.hasNext()) {\n \t\t\t\t\t\t\t\tfetch = fetch == null ? r.fetch(pathIterator.next()) : fetch.fetch(pathIterator.next());\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \n \t\t\t// in collection form\n \t\t\telse if (from.getType() == JpqlParser.ST_COLL) {\n \t\t\t\tfinal Aliased aliased = new Aliased(from.getChild(1));\n \n \t\t\t\tAbstractFrom<?, ?> parent = this.getAliased(q, from.getChild(0).getText());\n \n \t\t\t\tint depth = 0;\n \t\t\t\tfor (final String segment : aliased.getQualified().getSegments()) {\n \t\t\t\t\tif ((depth > 0) && (parent instanceof PluralJoin)) {\n \t\t\t\t\t\tthrow new PersistenceException(\"Cannot qualify, only embeddable joins within the path allowed, \" + \"line \" + from.getLine() + \":\"\n \t\t\t\t\t\t\t+ from.getCharPositionInLine());\n \t\t\t\t\t}\n \n \t\t\t\t\tparent = parent.join(segment, JoinType.LEFT);\n \n \t\t\t\t\tdepth++;\n \t\t\t\t}\n \n \t\t\t\tparent.alias(aliased.getAlias());\n \n \t\t\t\tthis.putAlias((BaseQueryImpl<?>) q, from.getChild(1), aliased, parent);\n \t\t\t}\n \n \t\t\t// sub query from\n \t\t\telse {\n \t\t\t\tfinal Aliased fromDef = new Aliased(from);\n \t\t\t\tfinal EntityTypeImpl<Object> entity = this.getEntity(fromDef.getQualified().toString());\n \n \t\t\t\tfinal RootImpl<Object> r = (RootImpl<Object>) q.from(entity);\n \t\t\t\tr.alias(fromDef.getAlias());\n \n \t\t\t\tthis.putAlias((BaseQuery<?>) q, from, fromDef, r);\n \t\t\t}\n \t\t}\n \t}",
"List<ResultDTO> search(String query);",
"IQuery getQuery();",
"SelectQuery createSelectQuery();",
"public void setFrom(Integer from) {\n this.from = from;\n }",
"@Transactional\r\n\tpublic List<Room> getFreeFromTo(LocalDate from, LocalDate to){\r\n\t\tList<Room> l= this.roomRepository.findByReservationsNotIn(\r\n\t\t\t\tthis.reservationService.getFromTo(from, to));\r\n\t\tl.addAll(this.roomRepository.findByReservationsIsNull());\r\n\t\treturn l;\r\n\t}",
"List<E> queryAll(String namedQuery);",
"@Override\n\tpublic QueryResult<BookType> list(String start, String limit, String[] ands) {\n\t\treturn list(start, limit, ands, null, null);\n\t}",
"Data<List<Boards>> getSearchBoards(String query);",
"List<ResultDTO> searchUser(String query);",
"@Override\r\n\tpublic List<BoardVo> boardSelectList(String keyword, int start, int end, String searchOption) {\n\t\t\r\n\t\tMap<String, Object> map = new HashMap<>();\r\n\t\tmap.put(\"keyword\", keyword);\r\n\t\tmap.put(\"searchOption\", searchOption);\r\n\t\tmap.put(\"start\", start);\r\n\t\tmap.put(\"end\", end);\r\n\t\t\r\n\t\treturn sqlSession.selectList(namespace +\"boardSelectList\", map);\r\n\t}",
"private void doRemoteSearch(String query) {\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.YEAR,2018);\n cal.set(Calendar.MONTH,12);\n\n String[] titles = {\"Search Party\", \"Lunchtime Search Basketball\", \"Search Games\", \"Pickup Soccer Search\"};\n\n for(int i = 0 ; i < 10; i++ ) {\n cal.set(Calendar.DAY_OF_MONTH,i);\n eventList.add(new Event(titles[i % titles.length], \"test description\", \"test host\", cal.getTime(),cal.getTime(), cal.getTime(), \"test category\", \"test URL\", \"test owner\", \"test location\"));\n }\n }",
"public void searchAvailability(Connection connection, String hotel_name, int branchID, java.sql.Date from, java.sql.Date to) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT type, num_avail, price FROM Information WHERE hotel_name = ? AND branch_ID = ? AND date_from >= Convert(datetime, ?) AND date_to <= Convert(datetime, ?)\";\n\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branchID);\n pStmt.setInt(2, getBranchID());\n pStmt.setDate(3, from);\n pStmt.setDate(4, to);\n\n try {\n\n System.out.printf(\" Availiabilities at %S, branch ID (%d): \\n\", getHotelName(), getBranchID());\n System.out.printf(\" Date Listing: \" + String.valueOf(from) + \" TO \" + String.valueOf(to) + \"\\n\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2) + \" \" + rs.getInt(3));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }",
"public void getRangeShowsList(JsonHttpResponseHandler handler, int page, String fromDate, String toDate) {\n RANGE_PAGE = page;\n client.get(RANGE_SHOWS_URL(fromDate, toDate), handler);\n }",
"BoundQuery<?,Ttuple> query(Query q,Focus<?> context)\n throws DataException;",
"com.exacttarget.wsdl.partnerapi.QueryRequest getQueryRequest();",
"public String toSolrQuery() {\n SolrMapping mapping = store.getMapping();\n String fld = mapping.getPrimaryKey();\n String q;\n if (getKey() != null) {\n q = fld + \":\" + SolrStore.escapeQueryKey(getKey().toString());\n } else {\n q = fld + \":[\";\n if (getStartKey() != null) {\n q += SolrStore.escapeQueryKey(getStartKey().toString());\n } else {\n q += \"*\";\n }\n q += \" TO \";\n if (getEndKey() != null) {\n q += SolrStore.escapeQueryKey(getEndKey().toString());\n } else {\n q += \"*\";\n }\n q += \"]\";\n }\n return q;\n }",
"@GetMapping(\"/by-from-data\")\n\tpublic Page<Transaction> getTransactionsByFromDataAndPageable(\n\t\t@RequestParam TransactionFromType fromType,\n\t\t@RequestParam Long fromId,\n\t\tPageable pageable) \n\t{\n\t\tPage<Transaction> pageOfTransactions = transactionService.getTransactionsByFromDataAndPageable(fromType, fromId, pageable);\n\t\treturn pageOfTransactions;\n\t}",
"String buildQueryResultXml(QueryContextTo queryContextTo);",
"String query();",
"private void setFrom (int from) {\n this.from = from;\n }",
"public interface RecipeService {\n\n @GET(\"/search\")\n Observable<SearchResult> search(@Query(\"q\") String q,\n @Query(\"app_id\") String appid,\n @Query(\"app_key\") String appkey,\n @Query(\"from\") String from,\n @Query(\"to\") String to);\n\n}",
"private void goOnQuery() {\n int end;\n for (end = mQueryTimes; end < SPEED_DIAL_MAX + 1 && TextUtils.isEmpty(mPrefNumState[end]); ++end) {\n // empty loop body\n }\n populateMatrixCursorEmpty(this, mMatrixCursor, mQueryTimes - 1, end - 1);\n Log.i(TAG, \"goOnQuery(), mQueryTimes = \" + mQueryTimes + \", end = \" + end);\n if (end > SPEED_DIAL_MAX) {\n Log.i(TAG, \"goOnQuery(), queryComplete in goOnQuery()\");\n mIsQueryContact = false;\n dismissProgressIndication();\n updatePreferences();\n showToastIfNecessary();\n mAdapter.changeCursor(mMatrixCursor);\n resumeDialog(); \n } else {\n mQueryTimes = end;\n Log.i(TAG, \"goOnQuery(), startQuery at mQueryTimes = \" + mQueryTimes);\n Log.i(TAG, \"goOnQuery(), number = \" + mPrefNumState[mQueryTimes]);\n Uri uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri\n .encode(mPrefNumState[mQueryTimes]));\n Log.i(TAG, \"goOnQuery(), uri = \" + uri);\n mQueryHandler.startQuery(QUERY_TOKEN, null, uri, QUERY_PROJECTION, null, null, null);\n // Cursor testCursor = getContentResolver().query(uri,\n // QUERY_PROJECTION, null, null, null);\n }\n }",
"ObstacleQuery createObstacleQuery();",
"@Override\n\tpublic List<Payments> query(Map<String, Object> filter, int start, int rows) {\n\t\tRowBounds rb = new RowBounds(start, rows);\n\n\t\treturn this.mapper.queryPage(filter, rb);\n\t}",
"SearchResponse query(SearchRequest request, Map<SearchParam, String> params);",
"public void set_from(String from2) {\n\t\tthis.from=from2;\n\t}",
"Condition between(QueryParameter parameter, Object x, Object y);",
"@Query(\"FROM Consulta c WHERE c.fecha BETWEEN :fechaConsulta AND :fechaSgte\")\n\tList<Consulta> buscarFecha(@Param(\"fechaConsulta\") LocalDateTime fechaConsulta,@Param(\"fechaSgte\") LocalDateTime fechaSgte);",
"List<T> getAllWithQuery(String query);",
"public List<Drive> getDrives(long from, long to, long dateFrom, long dateTo) {\n\n Query<Drive> query = and(and(equal(FROM, from), equal(TO, to)), between(DATE, dateFrom, dateTo));\n\n ResultSet<Drive> drives = drivesCache.retrieve(query, queryOptions(orderBy(ascending(DATE))));\n\n return streamOf(drives).collect(Collectors.toList());\n }",
"QueryArgs getQueryArgs();",
"@Test\n public void learnToQueryWithMultipleParams() throws Exception {\n SqlSession session = null;\n\n // TODO: get a Koan06Mapper object\n Koan06Mapper mapper = null;\n\n List<Country> lc = mapper.getCountryRange(22, 33);\n\n assertEquals(12, lc.size());\n Country finland = lc.get(11);\n assertEquals(\"Finland\", finland.getCountry());\n\n }",
"void setSelection(int from, int to);",
"@Override\n public SpanQuery toFragmentQuery () throws QueryException {\n\n // The query is null\n if (this.isNull)\n return (SpanQuery) null;\n\n if (this.isEmpty) {\n log.error(\"You can't queryize an empty query\");\n return (SpanQuery) null;\n };\n\n // The query is not a repetition query at all, but may be optional\n if (this.min == 1 && this.max == 1)\n return this.subquery.retrieveNode(this.retrieveNode)\n .toFragmentQuery();\n\n // That's a fine repetition query\n return new SpanRepetitionQuery(\n this.subquery.retrieveNode(this.retrieveNode).toFragmentQuery(),\n this.min, this.max, true);\n }",
"public Collection getPosts_fromIDRange(int fromID, int toID)\r\n throws IllegalArgumentException, DatabaseException;",
"public List getRoutes(int fromId, int toId) {\n String queryString = \"FROM Route R WHERE R.fromId =\\\"\" + fromId + \"\\\" AND R.toId = \\\"\"+ toId +\"\\\" ORDER BY R.price ASC\";\n// String queryString = \"SELECT R.airline, R.price FROM Route R WHERE R.fromId =\\\"\" + fromId + \"\\\" AND R.toId = \\\"\"+ toId +\"\\\" ORDER BY R.price ASC\";\n List<Route> routeList = null;\n try {\n org.hibernate.Transaction tx = session.beginTransaction();\n Query q = session.createQuery (queryString);\n routeList = (List<Route>) q.list();\n } catch (Exception e) {\n e.printStackTrace();\n }\n// for(Route r : routeList){\n// System.out.println(r.getAirline().getName() + \", \" + r.getPrice());\n// }\n return routeList;\n}",
"public void setQueryTO(ws.cl.gov.fonasa.certificadorprevisional.QueryTO queryTO) {\n this.queryTO = queryTO;\n }",
"Observable<List<CityEntity>> fetchAllCountryState(String country, RetrofitQueryDate from, RetrofitQueryDate to);",
"java.lang.String getQuery();",
"java.lang.String getQuery();",
"private static SolrQuery getSolrQuery(OrganizationSearch4Solr request, int start, int end) {\n\t\tSolrQuery query = new SolrQuery();\r\n\t\tquery.setHighlight(true).setStart(start);\r\n query.setTermsLimit(500);\r\n query.setRows(20000);\r\n Map<String, String> map = new HashMap<String, String>();\r\n map.put(\"wt\", \"json\");\r\n map.put(\"indent\", \"true\");\r\n StringBuilder queryPrams = new StringBuilder();\r\n queryPrams.append(\"{!q.op=OR}+isOutOfBusiness:false AND \");\r\n if (!StringUtils.isEmpty(request.getOrgId())) {\r\n \tqueryPrams.append(\"organizationId:\" + request.getOrgId() + \" AND \");\r\n }\r\n if (!StringUtils.isEmpty(request.getSiteinstanceId())) {\r\n \tqueryPrams.append(\"siteInstanceId:\" + request.getSiteinstanceId() + \" AND \");\r\n }\r\n List<String> orgIdList = request.getOrgIdList();\r\n if (orgIdList != null && orgIdList.size() > 0) {\r\n \tString idsString = \"+organizationId:(\";\r\n \tfor (String orgId : orgIdList) {\r\n \tidsString += orgId + \" \";\r\n\t\t\t}\r\n \tidsString = idsString.substring(0, idsString.length()-1) + \")\";\r\n \tqueryPrams.append(idsString + \" AND \");\r\n }\r\n if (!StringUtils.isEmpty(request.getTaxID())) {\r\n \tqueryPrams.append(\"taxIds:(\\\"\" + request.getTaxID() + \"\\\") AND \");\r\n }\r\n String orgName = request.getOrgName();\r\n if (!StringUtils.isEmpty(orgName)) {\r\n \torgName = \"(\"+ orgName +\")\";\r\n \t\t// LATIN\r\n \t\tqueryPrams.append(\"(+(organizationExtendedName:\" + orgName + \" \");\r\n \t\t// NOLATIN\r\n \t\tqueryPrams.append(\"organizationNonLatinExtendedName:\" + orgName + \" \");\r\n \t\t// ReportingName\r\n \t\tqueryPrams.append(\"organizationReportingName:\" + orgName + \" \");\r\n \t\t// LegalName\r\n \t\tqueryPrams.append(\"organizationLegalName:\" + orgName + \" \");\r\n \t\t// tradeName\r\n \t\tqueryPrams.append(\"tradeStyleNames:\" + orgName + \")) AND \");\r\n }\r\n String cityName = request.getCityName();\r\n if (!StringUtils.isEmpty(cityName)) {\r\n \t\t// LATIN\r\n \t\tqueryPrams.append(\"(+(latinCity:(\\\"\" + cityName + \"\\\") \");\r\n \t\t// NOLATIN\r\n \t\tqueryPrams.append(\"nonlatinCity:(\\\"\" + cityName + \"\\\"))) AND \");\r\n }\r\n if (!StringUtils.isEmpty(request.getPostalCode())) {\r\n queryPrams.append(\"postalCode:(\" + request.getPostalCode() + \"*) AND \");\r\n }\r\n if (!StringUtils.isEmpty(request.getCountryCode())) {\r\n queryPrams.append(\"countryCode:(\" + request.getCountryCode() + \") AND \");\r\n }\r\n String state = request.getStateProvinceName();\r\n if (!StringUtils.isEmpty(state)) {\r\n \tif(state.matches(\"\\\\p{ASCII}+\")){\r\n \t\t// LATIN\r\n queryPrams.append(\"state:(\\\"\" + state + \"\\\") AND \");\r\n \t}else{\r\n \t\t// NOLATIN\r\n queryPrams.append(\"state:(\\\"\" + state + \"\\\") AND \");\r\n \t}\r\n }\r\n\r\n queryPrams.append(\" *:* \");\r\n \r\n SolrParams params = new MapSolrParams(map);\r\n \r\n query.add(params);\r\n query.setQuery(queryPrams.toString());\r\n\t\treturn query;\r\n\t}",
"@Test\n public void testBetween1() throws Exception {\n String sql = \"SELECT a from db.g where a BETWEEN 1000 AND 2000\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, \"a\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, \"db.g\");\n\n Node criteriaNode = verify(queryNode, Query.CRITERIA_REF_NAME, BetweenCriteria.ID);\n verifyElementSymbol(criteriaNode, BetweenCriteria.EXPRESSION_REF_NAME, \"a\");\n verifyConstant(criteriaNode, BetweenCriteria.LOWER_EXPRESSION_REF_NAME, 1000);\n verifyConstant(criteriaNode, BetweenCriteria.UPPER_EXPRESSION_REF_NAME, 2000);\n \n verifySql(\"SELECT a FROM db.g WHERE a BETWEEN 1000 AND 2000\", fileNode);\n }",
"Data<List<Boards>> getSearchBoardsCursor(String query, String cursor);",
"Page<ChatDTO> search(String query, Pageable pageable);",
"@Query(\"select dailyReservation from DailyReservation dailyReservation where dailyReservation.date between :startDate and :endDate\")\n List<DailyReservation> findAllDailyReservation(@Param(\"startDate\") LocalDate startDate, @Param(\"endDate\") LocalDate endDate );",
"<Q, R> CompletableFuture<QueryResponseMessage<R>> query( QueryMessage<Q, R> query );",
"protected static Integer[] range(int from, int to) {\n if (from > to) {\n throw new IllegalArgumentException(\"from must be <= to (\" + from\n + \",\" + to + \")\");\n }\n int n = to - from + 1;\n Integer[] range = new Integer[n];\n for (int i = 0; i < n; i++) {\n range[i] = from + i;\n }\n return range;\n }",
"public List<T> query(QueryObject qo) {\n\t\treturn null;\n\t}",
"public abstract String createQuery();",
"Data<List<Pins>> getSearchPins(String query, Integer limit);",
"List<Revenue> search(String query);",
"List<LectureDTO> search(String query);",
"public static void query() {\n\n GPS = \"24.9684297,121.1959266\";\n\n SimpleDateFormat sdFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date nowDate = new Date();\n\n String startDayStr = \"2017-01-09\";\n Calendar cal = Calendar.getInstance();\n cal.setTime(nowDate);\n // cal.add(Calendar.MONTH, 3);\n cal.add(Calendar.MONTH, 1);\n String endDayStr = sdFormat.format(cal.getTime());\n\n String query = String.format(\"▽活動搜尋▼▽start_day▼%s▽end_day▼%s\", startDayStr, endDayStr);\n\n System.out.println(\"伺服器狀態測試查詢... \" + query + \" \" + GPS + \" \" + radius);\n Socket client = new Socket();\n InetSocketAddress isa = new InetSocketAddress(address, port);\n try {\n client.connect(isa, 10000);\n\n DataOutputStream out = new DataOutputStream(client.getOutputStream());\n out.writeUTF(query + \" \" + GPS + \" \" + radius + \" \" + whichFucntion + \" \" + \"test \" + quantity);\n client.shutdownOutput();\n ObjectInputStream in = new ObjectInputStream(client.getInputStream());\n Object obj = in.readObject();\n\n//\t\t\tSystem.out.println(obj.toString());\n SearchResultShopData searchResultShopData = (SearchResultShopData) obj;\n ArrayList<ShopData> a = (ArrayList<ShopData>) searchResultShopData.getShopDataList();\n//\t\t\tSystem.out.println(\"searchResultShopData.getStaut() : \" + searchResultShopData.getStaut());\n if (searchResultShopData.getStaut() == 1) {\n for (int i = 0; i < a.size(); i++) {\n if (a.get(i).getSearchEngine().equals(ShopData.SEARCH_ENGINE_ATTRIBUTE_FB_ACTIVITY_SOLR)) {\n FBShopActivityDescription fbShopActivityDescription = (FBShopActivityDescription) a.get(i);\n System.out.println(\"/////////////////////////start////////////////////////\");\n System.out.println(\"活動名稱:\" + fbShopActivityDescription.getTitle());\n System.out.println(\"活動發文連結:\" + fbShopActivityDescription.getHttp());\n System.out.println(\"GPS:\" + fbShopActivityDescription.getLatitude() + \",\" + fbShopActivityDescription.getLongitude());\n System.out.println();\n System.out.println(\"*******************活動摘要資訊********************\");\n System.out.println(\"活動開始時間:\" + fbShopActivityDescription.getStartDate());\n System.out.println(\"活動結束時間:\" + fbShopActivityDescription.getEndDate());\n System.out.println(\"活動地點:\" + fbShopActivityDescription.getAddress());\n System.out.println(\"~~~~~~~~~~~~~~~~~~HighlightFBPost~~~~~~~~~~~~~~~~~~~~\");\n System.out.println(fbShopActivityDescription.getDescription());\n System.out.println(\"////////////////////////end/////////////////////////\");\n System.out.println();\n }\n }\n }\n out.flush();\n out.close();\n out = null;\n in.close();\n in = null;\n client.close();\n client = null;\n } catch (java.io.IOException e) {\n System.err.println(\"SocketClient 連線有問題 !\");\n System.err.println(\"IOException :\" + e.toString());\n } catch (ClassNotFoundException e) {\n System.err.println(\"ClassNotFoundException :\" + e.toString());\n } catch (Exception e) {\n System.err.println(\"Exception :\" + e.toString());\n }\n\n }",
"private String queryAllFrom(String tableName) {\n return EXTRA_ALL_FROM + tableName + EXTRA_SEMI_COLON;\n }",
"public void searchAvailabilityType(Connection connection, String hotel_name, int branchID, String type, LocalDate from, LocalDate to) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT num_avail, price FROM Information WHERE hotel_name = ? AND branch_ID = ? AND type >= ? AND date_from <= to_date(?, 'YYYY-MM-DD') AND date_to = to_date(?, 'YYYY-MM-DD')\";\n\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branchID);\n pStmt.setInt(2, getBranchID());\n setType(type);\n pStmt.setString(3, getType());\n pStmt.setString(4, from.toString());\n pStmt.setString(5, to.toString());\n\n try {\n\n System.out.printf(\" Availabilities for %S type at %S, branch ID (%d): \\n\", getType(), getHotelName(), getBranchID());\n System.out.printf(\" Date Listing: \" + String.valueOf(from) + \" TO \" + String.valueOf(to) + \"\\n\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while(rs.next()) {\n System.out.println(rs.getInt(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }",
"interface FindByQueryWithQuery<T> extends TerminatingFindByQuery<T> {\n\n\t\t/**\n\t\t * Set the filter query to be used.\n\t\t *\n\t\t * @param query must not be {@literal null}.\n\t\t * @return new instance of {@link TerminatingFindByQuery}.\n\t\t * @throws IllegalArgumentException if query is {@literal null}.\n\t\t */\n\t\tTerminatingFindByQuery<T> matching(Query query);\n\n\t}",
"List<Job> findAllByJobPosition(String query);",
"String buildQuery(String field, String val, int from, int size,\n\t\t\tDomeoPermissions permissions3) {\n\t\tStringBuffer sb = new StringBuffer(\"{ \");\n\n\t\t// Check for starting position (from) and max results (size)\n\t\tif ((from > -1) && (size > -1)) {\n\t\t\tsb.append(\"\\\"from\\\" : \" + from + \", \\\"size\\\" : \" + size + \", \");\n\t\t} else if (from > -1) { // from only, no size\n\t\t\tsb.append(\"\\\"from\\\" : \" + from + \", \");\n\t\t} else if (size > -1) { // size only, no from\n\t\t\tsb.append(\"\\\"size\\\" : \" + size + \", \");\n\t\t}\n\n\t\tif (permissions3 == null) {\n\t\t\tsb.append(\"\\\"fields\\\" : [\\\"_id\\\"], \\\"query\\\" : { \\\"match\\\" : { \\\"\"\n\t\t\t\t\t+ field + \"\\\": \\\"\" + val + \"\\\" } } } \");\n\t\t} else {\n\t\t\tString filter = permissions3.buildQueryFilter();\n\t\t\tsb.append(\"\\\"fields\\\" : \\\"[_id]\\\", \\\"query\\\" : { \\\"match\\\" : { \\\"\"\n\t\t\t\t\t+ field + \"\\\": \\\"\" + val + \"\\\" } } \" + filter + \" } \");\n\t\t}\n\t\treturn sb.toString();\n\t}"
] | [
"0.62852967",
"0.61312455",
"0.6061059",
"0.60328877",
"0.59610724",
"0.5937072",
"0.59041274",
"0.5849119",
"0.5779491",
"0.5760647",
"0.57064116",
"0.5626522",
"0.5621093",
"0.55904573",
"0.5573877",
"0.5524749",
"0.5520023",
"0.54966265",
"0.5494475",
"0.5479024",
"0.5464181",
"0.5453087",
"0.5418932",
"0.5418518",
"0.53965366",
"0.53917736",
"0.5386202",
"0.53840137",
"0.5383632",
"0.5378007",
"0.5366998",
"0.5350417",
"0.53444093",
"0.53378093",
"0.5324722",
"0.53174984",
"0.5295882",
"0.5271507",
"0.5251735",
"0.524028",
"0.52313936",
"0.522686",
"0.52266634",
"0.5225455",
"0.52239954",
"0.5218002",
"0.52101004",
"0.52047205",
"0.51993877",
"0.51820713",
"0.5181146",
"0.5170357",
"0.5164959",
"0.5163999",
"0.515918",
"0.5156271",
"0.5137972",
"0.51372343",
"0.512162",
"0.51080865",
"0.5088583",
"0.5078365",
"0.5071741",
"0.5070332",
"0.50543517",
"0.5053188",
"0.50516826",
"0.5044648",
"0.50423396",
"0.5040246",
"0.5036069",
"0.50343686",
"0.5027228",
"0.5024202",
"0.5015284",
"0.5007646",
"0.5002144",
"0.49983233",
"0.49865845",
"0.49864957",
"0.4981768",
"0.49771136",
"0.49771136",
"0.49739486",
"0.49734375",
"0.497189",
"0.497043",
"0.496312",
"0.4962709",
"0.49606743",
"0.4959191",
"0.4957935",
"0.49563855",
"0.49514297",
"0.4950016",
"0.49492168",
"0.49470267",
"0.49352",
"0.49267215",
"0.49209702",
"0.4920968"
] | 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_add_new_incident, container, false);
initView(view);
incidentData();
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 |
root node is sequence | @Test
public void testSequence(){
Variable x = new Variable("x");
Operator plus = new Operator("+");
Expression one = f.createNumNode(1);
Expression two = f.createNumNode(2);
Expression exp = f.createInfixNode(plus, one, two);
Statement decl = f.createDeclNode(x);
Statement assign = f.createAssignNode(x,exp);
Statement seq = f.createSequenceNode(decl, assign);
assertEquals(seq.textRepresentation(), "var x; x = 1 + 2;");
ASTNodeCountVisitor v = new ASTNodeCountVisitor();
seq.accept(v);
assertEquals("sequence test1 fail", v.numCount, 2);
assertEquals("sequence test2 fail", v.infixCount, 1);
assertEquals("sequence test3 fail", v.decCount, 1);
assertEquals("sequence test4 fail", v.seqCount, 1);
assertEquals("sequence test5 fail", v.assignCount, 1);
assertEquals("sequence test6 fail", v.varCount, 0);
assertEquals("sequence test7 fail", v.strCount, 0);
assertEquals("sequence test8 fail", v.prefixCount, 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void root(Node n) {}",
"@Override\r\n\tpublic Node<T> getRoot() {\r\n\t\treturn raiz;\r\n\t}",
"BiNode root()\n {\n return _root;\n }",
"protected IsamIndexNode getRoot() {\n\t\treturn root;\n\t}",
"public AVLNode getRoot() {\n return root;\n }",
"public Node getRoot(){\r\n return this.root;\r\n }",
"TrieNode root();",
"public static void main(String[] args){\r\n BST_Sequences<Integer> b = new BST_Sequences<>();\r\n\r\n BinaryNode<Integer> r = new BinaryNode<>(2);\r\n BinaryNode<Integer> n1 = new BinaryNode<>(1);\r\n BinaryNode<Integer> n2 = new BinaryNode<>(3);\r\n BinaryNode<Integer> n4 = new BinaryNode<>(4);\r\n r.setLeft(n1);\r\n r.setRight(n2);\r\n n2.setRight(n4);\r\n\r\n BST<Integer> bst = new BST<>(r);\r\n\r\n ArrayList<LinkedList<Integer>> l = b.allSequences(bst.getRoot());\r\n for(LinkedList<Integer> list : l){\r\n System.out.print(\"{\");\r\n for(Integer i : list){\r\n System.out.print(i + \" \");\r\n }\r\n System.out.println(\"}\");\r\n }\r\n }",
"public TreeRootNode() {\n super(\"root\");\n }",
"BTNode<T> getRoot();",
"public AVLTree() { \n super();\n // This acts as a sentinel root node\n // How to identify a sentinel node: A node with parent == null is SENTINEL NODE\n // The actual tree starts from one of the child of the sentinel node !.\n // CONVENTION: Assume right child of the sentinel node holds the actual root! and left child will always be null.\n \n }",
"@Override\r\n\tpublic Node visitSequence(SequenceContext ctx) {\n\t\treturn super.visitSequence(ctx);\r\n\t}",
"public static void main(String[] args) {\n Node a = new Node(50);\n Node b = new Node(20);\n Node c = new Node(60);\n Node d = new Node(10);\n Node e = new Node(25);\n Node f = new Node(70);\n Node g = new Node(5);\n Node h = new Node(15);\n Node i = new Node(65);\n Node j = new Node(80);\n a.left = b;\n a.right = c;\n b.left = d;\n b.right = e;\n c.right = f;\n d.left = g;\n d.right = h;\n f.left = i;\n f.right = j;\n ArrayList<LinkedList<Integer>> lists = bstSequences(a);\n for (LinkedList sequence : lists)\n System.out.println(sequence);\n\n /*\n * 2 / \\ 1 3\n */\n a = new Node(2);\n b = new Node(1);\n c = new Node(3);\n a.left = b;\n a.right = c;\n lists = bstSequences(a);\n for (LinkedList sequence : lists)\n System.out.println(sequence);\n }",
"public Node getStart(){\n return start;\n }",
"public WAVLNode getRoot()\r\n\t {\r\n\t\t return this.root;\r\n\t }",
"public Node getRoot() {\r\n\r\n\t\treturn root;\r\n\t}",
"public MyBinNode<Type> getRoot(){\n return this.root;\n }",
"public void start(Node n) {}",
"public AVLNode<T> getRoot() {\n return root;\n }",
"public Node(){\r\n primarySequence = null;\r\n dotBracketString = null;\r\n validity = false;\r\n prev = null;\r\n next = null;\r\n }",
"@Override\r\n\tpublic Node visitSequential(SequentialContext ctx) {\n\t\treturn super.visitSequential(ctx);\r\n\t}",
"abstract protected UiElementNode getRootNode();",
"protected BSTNode root() {\n\t\treturn root;\n\t}",
"public int getRoot(){\n\t\t\treturn root;\n\t\t}",
"public TreeNode root() {\n\t\treturn root;\n\t}",
"@Override\n\tpublic int sequence() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic void addInitialState(TreeNode root) {\n\n\t}",
"public WAVLNode getRoot() // return the root of the tree\r\n {\r\n return root;\r\n }",
"public Node getRoot() {\n return root;\n }",
"public Node getRoot() {\n return root;\n }",
"public Node getRoot() {\n return root;\n }",
"@Override\n public Object root() {\n return root;\n }",
"@Override\n public Object root() {\n return root;\n }",
"private HPTNode<K, V> buildRoot() {\n HPTNode<K, V> node = new HPTNode<K, V>(keyIdSequence++, null);\n node.children = reallocate(ROOT_CAPACITY);\n return node;\n }",
"public MappingRoot getRoot() { return _root; }",
"public Node getRoot() {\n return root;\n }",
"RootNode getRootNode();",
"public RBNode<T, E> getRoot() {\r\n\t\treturn root;\r\n\t}",
"public int getRoot() {\n return _root;\n }",
"private int root(int i) {\n while (i != id[i]) {\n i = id[i];\n }\n return i;\n }",
"private int getRoot(int index) {\n while(index < nodes.length && index != nodes[index]) {\n index = nodes[index];\n }\n return nodes[index];\n }",
"public IAVLNode getRoot() {\n\t\treturn this.root;\n\t}",
"OntologyTerm getRoot();",
"private int root(int i) {\n while(id[i]!=i){\n i = id[i];\n }\n return i;\n }",
"private void createRootNode()\r\n {\r\n root = new Node(\"root\", null);\r\n Node.clear();\r\n }",
"private int root(int i){\n\t\twhile ( i != id[i].getVertexLabel())\n\t\t\ti = id[i].getVertexLabel();\n\t\treturn i;\n\t}",
"public void print_root(){\r\n\t\tfor(int id = 0; id < label.length; id++){\r\n\t\t\tSystem.out.printf(\"\"%d \"\", find(id));\r\n\t\t}\r\n\t\tSystem.out.printf(\"\"\\n\"\");\r\n\t}",
"private RBNode<T> getRoot(){\n return root.getLeft();\n }",
"private BinaryTree() {\n root = new Node(0);\n }",
"public Node( Item root ) {\r\n\t\t\tsuper( null, 0, INTERACTIVE, null );\r\n\t\t\tthis.root = root;\r\n\t\t\tthis.root.parent = this;\r\n\t\t\tthis.children = new Container( false );\r\n\t\t\tthis.children.parent = this;\r\n\t\t}",
"private int root(int i) {\n validate(i);\n while(i != id[i]) {\n i = id[i];\n }\n return i;\n }",
"public BinaryTreeByLinkedList() {\n\t\tthis.root = null;\n\t}",
"public int root(int i) {\n\t\twhile ( i != id[i] ) {\n\t\t\ti = id[i];\n\t\t}\n\t\treturn i;\n\t}",
"public int root(){\n\t\tRandom r1=new Random();\n\t\tint r2= r1.nextInt((9) + 1) + 1;\n\t\treturn r2*100;\n\t}",
"public Node()\n {\n this.name=\"/\";\n this.type=0;\n this.stage=0;\n children=new ArrayList<Node>();\n }",
"public byte[] getFirstNode()\n {\n return this.firstNode;\n }",
"Position<E> root();",
"public BTNode getRootNode() {\n return mRoot;\n }",
"@Override\n\t\tpublic String next() {\n\t\t\tString ret=null;\n\t\t\twhile(!this.stack.isEmpty() && localRoot!=null){\n\t\t\t\n\t\t\t}\n\t\t\treturn null ;\n\t\t}",
"public abstract MetricTreeNode getRoot();",
"public int fullNode(Node root) {\n\t\t\n\t\tint fullnode = 0;\n\t\t\n\t\tif(root == null)\n\t\t\treturn 0;\n\t\t\n\t\tif(root.left!=null && root.right!=null) {\n\t\t\tfullnode ++;\n\t\t\tSystem.out.print(root.data + \" \");\n\t\t}\n\t\tfullnode += fullNode(root.left)+fullNode(root.right); \n\t\n\t\treturn fullnode;\n\t\t\n\t}",
"public Node<T> getRoot() {\n\t\treturn root;\n\t}",
"@Override\n public String toString() { return root.toString(); }",
"public final Node GetRootNode(){\n return m_pRoot;\n }",
"public void printRoot()\r\n\t{\r\n\t\tSystem.out.println(\"Root is:\"+root.data);\r\n\t}",
"public Sequence(){\r\n \r\n }",
"public interface RootNode {\r\n}",
"public Node()\n\t{\n\t\toriginalValue = sumValue = 0;\n\t\tparent = -1;\n\t}",
"public AVLTree() {\n\t\tthis.root = null;\n\t}",
"public BinaryTree()\n\t{\n\t\troot = null;\n\t}",
"private int getRoot(int x) {\n\t\twhile (idNode[x] != x) {\r\n\t\t\tx = idNode[x];\r\n\t\t}\r\n\t\treturn x;\r\n\t}",
"Sequence createSequence();",
"public void add(String data, String sequence){\n Node temp = this.root;\n int i = 0;\n for(i=0;i<sequence.length()-1;i++){\n\n if(sequence.charAt(i)=='0'){\n if(temp.left == null){\n temp.left = new Node();\n temp = temp.left;\n }\n else{\n temp = (Node) temp.left;\n }\n }\n else\n if(sequence.charAt(i)=='1'){\n if(temp.right == null){\n temp.right = new Node();\n temp = temp.right;\n }\n else{\n temp = (Node) temp.right;\n }\n }\n\t\t}\n\n if(sequence.charAt(i)=='0'){\n temp.left = new Node(data); \n }\n else{\n temp.right = new Node(data); \n }\n }",
"public Node program() {\r\n\r\n this.CheckError(\"PROGRAM\");\r\n\r\n\r\n Node n_program = new Node(\"program\");\r\n n_program.setParent(null);\r\n System.out.println(\"read node from app: \"+n_program.getData());\r\n System.out.println(\" :parent: \"+n_program.getParent());\r\n\r\n Node n_declarations = n_program.setChildren(\"decl list\");\r\n System.out.println(\"read node from app :data: \"+n_declarations.getData());\r\n System.out.println(\" :parent: \"+n_declarations.getParent().getData());\r\n\r\n this.declaration(n_declarations);\r\n\r\n this.CheckError(\"BEGIN\");\r\n\r\n Node n_statementSequence = n_program.setChildren(\"stmt list\");\r\n this.statementSequence(n_statementSequence);\r\n\r\n this.CheckError(\"END\");\r\n\r\n System.out.println(\":::: Parsing Successful Hamid ::::\");\r\n\r\n return n_program;\r\n //////////////////////////////////////////// writeout PROGRAM treee -----------------\r\n //////////////////////////////////////////////////////////////////////////////////////\r\n ///////////////////////////////////////////////////////////////////////////////////\r\n ///////////output test generator\r\n /////////////////////////////////////////////////////////////////////////////////\r\n\r\n\r\n /*Node iteration = n_program;\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\"|\");\r\n System.out.print(\" \");\r\n }\r\n System.out.println();\r\n iteration = n_program.getChildren(0);\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.print(\" \");\r\n iteration = n_program.getChildren(1);\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println(\"\");\r\n System.out.print(\" \");\r\n Node iteration0= iteration.getChildren(0);\r\n for (int i=0; i<iteration0.childrenSize();i++){\r\n System.out.print(\"| \"+iteration0.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration1= iteration.getChildren(1);\r\n for (int i=0; i<iteration1.childrenSize();i++){\r\n System.out.print(\"| \"+iteration1.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration2= iteration.getChildren(2);\r\n for (int i=0; i<iteration2.childrenSize();i++){\r\n System.out.print(\"| \"+iteration2.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration3= iteration.getChildren(3);\r\n for (int i=0; i<iteration3.childrenSize();i++){\r\n System.out.print(\"| \"+iteration3.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration4= iteration.getChildren(4);\r\n for (int i=0; i<iteration4.childrenSize();i++){\r\n System.out.print(\"| \"+iteration4.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" w\\n\");\r\n System.out.print(\" \");\r\n Node iteration0w= iteration2.getChildren(0);\r\n for (int i=0; i<iteration0w.childrenSize();i++){\r\n System.out.print(\"| \"+iteration0w.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.print(\"\\n \");\r\n Node iteration1w= iteration2.getChildren(1);\r\n for (int i=0; i<iteration1w.childrenSize();i++){\r\n System.out.print(\"| \"+iteration1w.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.print(\"\\n \");\r\n iteration= iteration0w.getChildren(0);\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\" |\");\r\n }*/\r\n\r\n }",
"private void buildRoot() {\n this.root = new GPRootTreeNode(this.tree);\n }",
"@Test(timeout = 4000)\n public void test21() throws Throwable {\n byte[] byteArray0 = new byte[0];\n ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0, 1, 1);\n JavaParser javaParser0 = new JavaParser(byteArrayInputStream0);\n SimpleNode simpleNode0 = new SimpleNode(javaParser0, (-120811353));\n Node[] nodeArray0 = new Node[6];\n nodeArray0[0] = (Node) simpleNode0;\n nodeArray0[1] = (Node) simpleNode0;\n nodeArray0[2] = (Node) simpleNode0;\n nodeArray0[3] = (Node) simpleNode0;\n nodeArray0[4] = (Node) simpleNode0;\n SimpleNode simpleNode1 = new SimpleNode(javaParser0, 1);\n nodeArray0[5] = (Node) simpleNode1;\n simpleNode0.children = nodeArray0;\n int int0 = simpleNode0.jjtGetNumChildren();\n assertEquals(6, int0);\n }",
"public myBinaryNode<T> my_root();",
"public HPTNode<K, V> root() {\n return root;\n }",
"protected TreeNode<E> getRoot() {\n\t\treturn root;\n\t}",
"public BinaryTreeNode<T> getRootNode(){\n\t\treturn root;\n\t}",
"public DialogueNode getRoot() {\n\t\treturn root;\n\t}",
"@Test\n public void testGetRoot() {\n AVLNode<Integer> instance = new AVLNode<> ( 7 );\n AVLNode<Integer> expResult = new AVLNode<> (); \n expResult.setRoot(new AVLNode<>( 7 ));\n AVLNode<Integer> result = instance;\n assertEquals(expResult.getRoot().getKey(), result.getKey());\n }",
"@Override\r\n\t\tpublic Node getFirstChild()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"public pt.ist.fenixframework.adt.bplustree.AbstractNodeArray getRoot() {\n return this.root.get();\n }",
"public AVLTree() \r\n\t{\r\n\t\tthis.root = new AVLNode(null);\r\n\t}",
"int getBaseNode();",
"public void printRoot(){\n for(String temp : root){\n System.out.println(temp);\n }\n }",
"public Node top() {\r\n\t\treturn start;\r\n\t}",
"@Override\r\n\t\tpublic short getNodeType()\r\n\t\t\t{\n\t\t\t\treturn 0;\r\n\t\t\t}",
"public Boolean isRootNode();",
"public Node<T> getRoot() {\n return root;\n }",
"public AVL() {\r\n this.root = null;\r\n }",
"java.lang.String getRoot();",
"public Object getRoot(){\r\n\t\treturn _root;\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n private Collection<Node> visitSequence(Object... rawNodes) {\n List<Collection<Node>> nodes = new ArrayList<>();\n for (Object node : rawNodes) {\n if (node == null) {\n nodes.add(Collections.<Node>emptySet());\n } else if (node instanceof Node) {\n nodes.add(Collections.<Node>singleton((Node) node));\n } else {\n nodes.add((Collection<Node>)node);\n }\n }\n\n Collection<Node> fst = nodes.get(nodes.size() - 1);\n for (int i = nodes.size() - 2; i >= 0; --i) {\n for (Node node : reverse(nodes.get(i))) {\n Node ffst = visitWithSuccessors(node, fst);\n if (ffst != null) fst = Collections.<Node>singleton(ffst);\n }\n }\n return fst;\n }",
"default boolean isRoot() {\n if (isEmpty()){\n return false;\n }\n\n TreeNode treeNode = getTreeNode();\n return treeNode.getLeftValue() == 1;\n }",
"@Override\r\n\tpublic T getRootElement() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif(this.root == null) {\r\n\t\treturn null;\r\n\t\t\r\n\t\t}\r\n\t\treturn this.root.data;\r\n\t}",
"private void process(TreeNode root){\n while(root!=null){\n dq.push(root);\n root= root.left;\n }\n }",
"ISequence sequence();",
"private void singleRotationLR(BinaryNode node){\n if (node == root) {\n root = node.left;\n root.parent = null;\n root.right = node;\n node.parent = node.left;\n node.left = null;\n } else {\n if (node.parent.right == node) {\n node.parent.right = node.left;\n } else {\n node.parent.left = node.left;\n }\n node.left.parent = node.parent;\n node.left.right = node;\n node.parent = node.left;\n node.left = null;\n }\n }"
] | [
"0.6432339",
"0.63731587",
"0.6324098",
"0.617832",
"0.6107086",
"0.5991439",
"0.59525937",
"0.5935069",
"0.5910139",
"0.5908767",
"0.58819586",
"0.58312845",
"0.5828868",
"0.58168876",
"0.5803675",
"0.5773807",
"0.5768129",
"0.57662904",
"0.5760603",
"0.57599694",
"0.5746824",
"0.57420325",
"0.5739231",
"0.5738326",
"0.5735267",
"0.5720464",
"0.5668667",
"0.56683177",
"0.56575775",
"0.56575775",
"0.56575775",
"0.5654297",
"0.5654297",
"0.5652129",
"0.5640252",
"0.5635789",
"0.562172",
"0.5613667",
"0.56036204",
"0.55839175",
"0.5581685",
"0.5578089",
"0.5576234",
"0.55757153",
"0.55757064",
"0.5571477",
"0.55649865",
"0.5523254",
"0.5513994",
"0.5512085",
"0.5490914",
"0.54821247",
"0.54774517",
"0.547706",
"0.54665315",
"0.54545224",
"0.5452897",
"0.54509985",
"0.5449244",
"0.5445931",
"0.54391694",
"0.54311913",
"0.542417",
"0.5411767",
"0.5410961",
"0.54083955",
"0.5401867",
"0.5401582",
"0.53913647",
"0.5387156",
"0.5385817",
"0.53798395",
"0.5377809",
"0.5376005",
"0.53747",
"0.5373576",
"0.537292",
"0.53627706",
"0.5361231",
"0.5352196",
"0.53497463",
"0.53438973",
"0.53427994",
"0.53426003",
"0.53379685",
"0.5337386",
"0.53282666",
"0.5327911",
"0.53251183",
"0.5323546",
"0.5321341",
"0.53086466",
"0.5306378",
"0.53058016",
"0.53021896",
"0.5300718",
"0.5294881",
"0.5292381",
"0.5289213",
"0.5287941"
] | 0.5666863 | 28 |
test Assignment root node | @Test
public void testAssignment(){
Variable x = new Variable("x");
Operator plus = new Operator("+");
Expression one = f.createNumNode(1);
Expression two = f.createNumNode(2);
Expression exp = f.createInfixNode(plus, one, two);
Statement assign = f.createAssignNode(x,exp);
assertEquals(assign.textRepresentation(), "x = 1 + 2;");
ASTNodeCountVisitor v = new ASTNodeCountVisitor();
assign.accept(v);
assertEquals("assignment test1 fail", v.numCount, 2);
assertEquals("assignment test2 fail", v.infixCount, 1);
assertEquals("assignment test3 fail", v.assignCount, 1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testAssignment() {\n try {\n Lexer lexer = new Lexer(new StringReader(\"n = 0;\"));\n Parser parser = new Parser(lexer);\n RootNode node = parser.program();\n AssignNode assignment = (AssignNode) node.get(0);\n assertTrue(assignment.getClass() == AssignNode.class);\n } catch (IOException e) {\n fail(e.getMessage());\n }\n }",
"@Test\n public void testGetRoot() {\n AVLNode<Integer> instance = new AVLNode<> ( 7 );\n AVLNode<Integer> expResult = new AVLNode<> (); \n expResult.setRoot(new AVLNode<>( 7 ));\n AVLNode<Integer> result = instance;\n assertEquals(expResult.getRoot().getKey(), result.getKey());\n }",
"@Test\n public void testSetRoot() {\n AVLNode<Integer> instance = new AVLNode<> ( );\n Integer root = 7;\n instance.setRoot( new AVLNode<> ( root ) );\n assertEquals( instance.getRoot().getKey(), root );\n }",
"@Test\n\tpublic void testAddAssignment() {\n\t}",
"public void assignment(Node n_parent) {\r\n System.out.println(\":: assignment:\"+n_parent.getData());\r\n if(token.get(lookAheadPossition).contains(\"ident(\")){\r\n System.out.println(\":: assignment::if::1\");\r\n String identifier=\"\";\r\n System.out.println(\":: assignment::if::2\");\r\n identifier = token.get(lookAheadPossition).substring(6, token.get(lookAheadPossition).length() - 1);\r\n System.out.println(\":: assignment::if -id \"+identifier);\r\n String type=\"\";\r\n type = (String) symbolTable.get(identifier);\r\n type = type.toLowerCase();\r\n System.out.println(\":: assignment::if -type \"+type);\r\n\r\n n_parent.setChildren(identifier+\":\"+type);\r\n this.CheckError(token.get(lookAheadPossition));\r\n this.CheckError(\"ASGN\");\r\n this.restAssignment(n_parent);\r\n }\r\n }",
"@Test\r\n public void testIsRoot() {\r\n System.out.println(\"isRoot\");\r\n ConfigNode configNode = new ConfigNode();\r\n ConfigNode childNode1 = new ConfigNode(testLine);\r\n configNode.appendChild(childNode1);\r\n assertTrue(configNode.isRoot());\r\n assertFalse(childNode1.isRoot());\r\n }",
"@Test\r\n public void testGetRoot() {\r\n System.out.println(\"getRoot\");\r\n ConfigNode configNode = new ConfigNode();\r\n ConfigNode childNode1 = new ConfigNode(testLine);\r\n configNode.appendChild(childNode1);\r\n assertEquals(configNode, childNode1.getRoot());\r\n }",
"private static void test4() {\n BinaryTreeNode node1 = new BinaryTreeNode(5);\n BinaryTreeNode node2 = new BinaryTreeNode(4);\n BinaryTreeNode node3 = new BinaryTreeNode(3);\n BinaryTreeNode node4 = new BinaryTreeNode(2);\n BinaryTreeNode node5 = new BinaryTreeNode(1);\n node1.left = node2;\n node2.left = node3;\n node3.left = node4;\n node4.left = node5;\n test(\"Test4\", node1, false);\n }",
"private static void test1() {\n BinaryTreeNode node1 = new BinaryTreeNode(8);\n BinaryTreeNode node2 = new BinaryTreeNode(6);\n BinaryTreeNode node3 = new BinaryTreeNode(10);\n BinaryTreeNode node4 = new BinaryTreeNode(5);\n BinaryTreeNode node5 = new BinaryTreeNode(7);\n BinaryTreeNode node6 = new BinaryTreeNode(9);\n BinaryTreeNode node7 = new BinaryTreeNode(11);\n node1.left = node2;\n node1.right = node3;\n node2.left = node4;\n node2.right = node5;\n node3.left = node6;\n node3.right = node7;\n test(\"Test1\", node1, true);\n }",
"abstract void setRoot(Node<T> n);",
"private void checkAssignment(Assignment node) {\n String nodeName = node.name.name;\n boolean error = false;\n\n // check whether assignment would cause a loop\n if (node.value instanceof ConstantReference) {\n ConstantReference reference = ((ConstantReference) node.value);\n if (reference.name.equals(nodeName)) {\n node.setError(\"You can't assign a constant to itself.\");\n error = true;\n } else {\n isCircularReference(reference);\n }\n }\n // if assignment is an operation, check the operation\n if (node.value instanceof Operation) {\n checkOperation((Operation) node.value);\n }\n\n // if no error has been found add it to symboltable.\n if (!error) {\n symboltable.put(nodeName, node.value);\n }\n }",
"public void root(Node n) {}",
"private static void test2() {\n BinaryTreeNode node1 = new BinaryTreeNode(1);\n BinaryTreeNode node2 = new BinaryTreeNode(2);\n BinaryTreeNode node3 = new BinaryTreeNode(3);\n BinaryTreeNode node4 = new BinaryTreeNode(4);\n BinaryTreeNode node5 = new BinaryTreeNode(5);\n BinaryTreeNode node6 = new BinaryTreeNode(6);\n BinaryTreeNode node7 = new BinaryTreeNode(7);\n node1.left = node2;\n node1.right = node3;\n node2.left = node4;\n node2.right = node5;\n node5.left = node7;\n node3.right = node6;\n test(\"Test2\", node1, true);\n }",
"@Test\n public void testDefaultRoot() {\n assertEquals(ClassModel.getObjectClass(), node.getModel());\n assertEquals(1, node.size());\n assertEquals(0, treeHash.size());\n }",
"@Override\n\tpublic String visitAssignst(AssignstContext ctx) {\n\t\tParseTree cur = ctx.getChild(0);\n\t\tString left = null;\n\t\tString right = null;\n\t\tif(cur == ctx.ID()){\n\t\t\tString key=visitTerminal((TerminalNode)cur);\n\t\t\tRecord id= table.lookup(key);\n\t\t\tif (id==null) throw new RuntimeException(\"Identifier \"+key+\" is not declared\");\t\t\t\t\t\n\t\t\tleft = id.getReturnType();\n\t\t}\n\t\telse {left = visit(cur);}\n\t\tright = visit(ctx.getChild(2));\n\t\tif(right.equals(left)){\t\t\t\n\t\t\treturn right;\t\t\t\n\t\t}\n\t\telse throw new RuntimeException(\"Not the same type in left and right of Assign\");\n\t}",
"@Override\r\n\t\tpublic boolean isEqualNode(Node arg)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}",
"@Test\n public void testGetLeft() {\n AVLNode<Integer> left = new AVLNode<> ( 4 );\n AVLNode<Integer> instance = new AVLNode<>( 7);\n instance.setLeft(left);\n AVLNode<Integer> expResult = left;\n AVLNode<Integer> result = instance.getLeft();\n assertEquals(expResult, result);\n }",
"@Test(timeout = 4000)\n public void test37() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(2836);\n JavaParser javaParser0 = new JavaParser(\"ConditionalAndExpression\");\n SimpleNode simpleNode1 = new SimpleNode(javaParser0, 2836);\n simpleNode0.jjtSetParent(simpleNode1);\n Node node0 = simpleNode0.jjtGetParent();\n simpleNode1.jjtSetParent(node0);\n assertSame(node0, simpleNode1);\n }",
"@Test\n public void setSiblingParent() throws Exception {\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder = factory.newDocumentBuilder();\n Document mockdoc = builder.newDocument();\n Element root = mockdoc.createElement(\"root\");\n Element root1 = mockdoc.createElement(\"root1\");\n Element root2 = mockdoc.createElement(\"root2\");\n Element root12 = mockdoc.createElement(\"root12\");\n Element root22 = mockdoc.createElement(\"root22\");\n\n mockdoc.appendChild(root);\n root.appendChild(root1);\n root.appendChild(root2);\n root1.appendChild(root12);\n root1.appendChild(root22);\n\n Tester tester=new Tester();\n assertFalse(tester.test(root)==root1);\n assertFalse(tester.setSiblingParent(root)==root1);\n\n\n }",
"@Override\r\n\tpublic boolean isEqual(Node node) {\n\t\treturn false;\r\n\t}",
"Syntax.Node ParseAssignment(Token t, Syntax.NodeVar left) throws Exception{\n while (true){\n if(t.type==TokenType.ASSIGNMENT_OPERATOR){\n var right = ParseExpression();\n return new Syntax.AssignmentNode(\":=\", left, right);\n }\n else {\n lexer.putBack(t);\n break;\n //throw new Exception(\"Error in ParseAssignment!!! can't assign it \");\n }\n }\n throw new Exception(\"Error in ParseAssignment!!! \");\n\n }",
"@Test\n public void testInsertCaso1() {\n myTree.insert(50);\n Assert.assertTrue(myTree.getRoot().getData() == 50);\n Assert.assertTrue(myTree.getRoot().getParent() == null);\n Assert.assertTrue(myTree.getRoot().getLeft().equals( NIL ));\n Assert.assertTrue(myTree.getRoot().getRight().equals( NIL ));\n Assert.assertTrue(((RBNode<Integer>) myTree.getRoot()).getColour() == Colour.BLACK );\n }",
"@Test\n public void testToRulenode() {\n System.out.println(\"AbsolutePathNode - testToRulenode\");\n final AbsolutePathNode instance = new AbsolutePathNode();\n final String expResult = \"apath\";\n final String result = instance.toRulenode();\n System.out.printf(\"Expected: %s\\n\", expResult);\n System.out.printf(\" Result: %s\\n\", result);\n assertEquals(expResult, result);\n }",
"@Override\n public Operator visitAssign(Assign operator)\n {\n throw new AssertionError();\n }",
"@Test\n public void testSetRight() {\n AVLNode<Integer> instance = new AVLNode<> ( );\n Integer right = 7;\n instance.setRight( new AVLNode<> ( right ) );\n assertEquals( instance.getRight().getKey(), right );\n }",
"public static void check18 (IR.Node node){\n if (node == null) return; \n if (node instanceof AssignmentStatement){\n if ((((AssignmentStatement)node).assignExpr) != null){\n String s1 = ((AssignmentStatement)node).loc.getType(); \n String s2 = ((AssignmentStatement)node).assignExpr.getType();\n if (!(s1.equals(\"any\") || s2.equals(\"any\"))){\n if (!(((AssignmentStatement)node).loc.getType().equals(((AssignmentStatement)node).assignExpr.getType()))){\n throw new IllegalStateException (\"Bad assignment.\"); \n }\n }\n\n }\n if ((((AssignmentStatement)node).op.type == Op.Type.minusequals) || (((AssignmentStatement)node).op.type == Op.Type.plusequals)){\n String s1 = ((AssignmentStatement)node).loc.getType(); \n String s2 = ((AssignmentStatement)node).assignExpr.getType();\n if (!(s1.equals(\"any\") || s2.equals(\"any\"))){\n if (!(((AssignmentStatement)node).loc.getType().equals(\"int\"))){\n throw new IllegalStateException (\"Bad assignment.\"); \n }\n if (!(((AssignmentStatement)node).assignExpr.getType().equals(\"int\"))){\n throw new IllegalStateException (\"Bad assignment.\"); \n }\n }\n }\n if ((((AssignmentStatement)node).op.type == Op.Type.increment) || (((AssignmentStatement)node).op.type == Op.Type.decrement)){\n if (!(((AssignmentStatement)node).loc.getType().equals(\"int\"))){\n if (!(((AssignmentStatement)node).loc.getType().equals(\"any\"))){\n throw new IllegalStateException (\"Bad assignment.\");\n } \n }\n }\n }\n if (node instanceof ForStatement){\n if (((ForStatement)node).initLoc == null || ((ForStatement)node).initExpr == null){\n throw new IllegalStateException (\"Bad assignment.\"); \n }\n if (!(((ForStatement)node).initLoc.getType().equals(((ForStatement)node).initExpr.getType()))){\n throw new IllegalStateException (\"Bad assignment.\"); \n } \n }\n List <IR.Node> children = node.getChildren(); \n if (children == null) return; \n\n for (int child=0; child<children.size(); child++){\n check18 (children.get(child)); \n }\n }",
"@Test\n public void testSetMayorsSearchTree02() {\n\n System.out.println(\"setMayorsSearchTree\");\n MayorAVL expResult = new MayorAVL();\n sn10.setMayorsSearchTree();\n\n MayorAVL result = sn10.getMayorsAVL();\n\n // Verify if tree is not equal to empty list.\n assertFalse(expResult.equals(result));\n\n }",
"private void testGetRootUri003() {\n\t\tDmtSession session = null;\n\t\ttry {\n\t\t\tDefaultTestBundleControl.log(\"#testGetRootUri003\");\n\t\t\tsession = tbc.getDmtAdmin().getSession(TestExecPluginActivator.LEAF_NODE,\n\t\t\t\t\tDmtSession.LOCK_TYPE_ATOMIC);\n\t\t\tTestCase.assertEquals(\"Asserting root uri\", TestExecPluginActivator.LEAF_NODE, session.getRootUri());\n\t\t} catch (Exception e) {\n\t\t\ttbc.failUnexpectedException(e);\n\t\t} finally {\n\t\t\ttbc.closeSession(session);\n\t\t}\n\t}",
"TestNode createTestNode();",
"@Test\n public void testSetLeft() {\n AVLNode<Integer> instance = new AVLNode<> ( );\n Integer left = 7;\n instance.setLeft( new AVLNode<> ( left ) );\n assertEquals( instance.getLeft().getKey(), left );\n }",
"@Test(timeout = 4000)\n public void test06() throws Throwable {\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n SimpleNode simpleNode0 = new SimpleNode(88);\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"-eV8gMo2X fKt7:>U\");\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"{\");\n SimpleNode simpleNode1 = new SimpleNode(88);\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, true);\n simpleNode0.setIdentifier(\"{\");\n simpleNode0.setIdentifier(\"<\");\n StringWriter stringWriter0 = new StringWriter();\n StringWriter stringWriter1 = stringWriter0.append((CharSequence) \"{\");\n simpleNode0.setIdentifier(\" ]GGvp ;L;QJa,92\");\n simpleNode0.setIdentifier(\"cp6\\\"\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"cp6\\\"\");\n simpleNode0.dump(\">\", stringWriter1);\n simpleNode0.toString();\n simpleNode0.toString(\"cp6\\\"\");\n simpleNode1.jjtAddChild(simpleNode0, 88);\n simpleNode1.jjtGetChild(88);\n assertEquals(89, simpleNode1.jjtGetNumChildren());\n }",
"@Test(timeout = 4000)\n public void test32() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(271);\n Node[] nodeArray0 = new Node[0];\n simpleNode0.children = nodeArray0;\n StringWriter stringWriter0 = new StringWriter();\n stringWriter0.write(5414);\n StringWriter stringWriter1 = stringWriter0.append('1');\n simpleNode0.dump(\"Expression\", stringWriter1);\n simpleNode0.dump(\"<IDENTIFIER>\", stringWriter1);\n assertSame(stringWriter0, stringWriter1);\n }",
"@DisplayName(\"Get root\")\n @Test\n public void testGetRoot() {\n Assertions.assertEquals(0, graph.getRoot());\n }",
"public NodeTest(String name) {\n\t\tsuper(name);\n\t}",
"private void assignment() {\n\n\t\t\t}",
"public void PrintMe()\n\t{\n\t\t/********************************************/\n\t\t/* AST NODE TYPE = AST ASSIGNMENT STATEMENT */\n\t\t/********************************************/\n\t\tSystem.out.print(\"AST NODE decl ASSIGN STMT\\n\");\n\n\t\t/***********************************/\n\t\t/* RECURSIVELY PRINT EXP ...\t */\n\t\t/***********************************/\n\t\t\n\t\tif (ne != null) ne.PrintMe();\n\n\t\t/***************************************/\n\t\t/* PRINT Node to AST GRAPHVIZ DOT file */\n\t\t/***************************************/\n\t\tAST_GRAPHVIZ.getInstance().logNode(\n\t\t\tSerialNumber,\n\t\t\t\"ASSIGN\\nleft := right\\n\");\n\t\t\n\t\t/****************************************/\n\t\t/* PRINT Edges to AST GRAPHVIZ DOT file */\n\t\t/****************************************/\n\t\t\n\t\tAST_GRAPHVIZ.getInstance().logEdge(SerialNumber,ne.SerialNumber);\n\t}",
"@Test\n public void testAstGeneration() {\n System.out.println(\"AbsolutePathNode - testAstGeneration\");\n final AbsolutePathNode literal = new AbsolutePathNode();\n final String inputRuleset = literal.toRulenode();\n System.out.printf(\"Input Ruleset: %s\\n\", inputRuleset);\n final ANTLRInputStream inStream = new ANTLRInputStream(inputRuleset);\n final HCleanLexer lexer = new HCleanLexer(inStream);\n final CommonTokenStream tokenStream = new CommonTokenStream(lexer);\n final HCleanParser parser = new HCleanParser(tokenStream);\n final ParseTreeWalker walker = new ParseTreeWalker();\n final RuleListener listener = new RuleListener();\n final ParseTree parseTree = parser.absolutePath();\n walker.walk(listener, parseTree);\n final String outputRuleSet = listener.peekStack().toRulenode();\n System.out.printf(\"Expected: %s\\n\", inputRuleset);\n System.out.printf(\" Result: %s\\n\", outputRuleSet);\n assertEquals(inputRuleset, outputRuleSet);\n }",
"public void setRoot(WAVLNode root)\r\n\t {\r\n\t\t this.root = root;\r\n\t }",
"@Test\n public void allowedEmptyLeaf() throws Exception {\n Query query = Query.parse(\"/allow-empty-leaf\");\n doAllowedEmptyTest(query);\n }",
"@Override\n public void setTree(E rootData) {\n root = new TernaryNode<>(rootData);\n }",
"@Test\n\tpublic void addAssignment() {\n\t\tfinal Date dueDate = new Date();\n\t\tfinal Template template = new Template(\"Template 1\");\n\t\ttemplate.addStep(new TemplateStep(\"Step 1\", 1.0));\n\t\tfinal Assignment asgn = new Assignment(\"Assignment 1\", dueDate, template);\n\t\tasgn.addTask(new Task(\"Task 1\", 1, 1, asgn.getID()));\n\t\t\n\t\tfinal String asgnId = asgn.getID();\n\t\t\n\t\ttry {\n\t\t\tStorageService.addTemplate(template);\n\t\t\tStorageService.addAssignment(asgn);\n\t\t} catch (final StorageServiceException e) {\n\t\t\tfail(e.getMessage());\n\t\t}\n\t\t\n\t\tfinal Assignment afterAsgn = StorageService.getAssignment(asgnId);\n\t\tassertEquals(asgn.fullString(), afterAsgn.fullString());\n\t}",
"public AssignAST(String name, AST right) {\n\t\tthis.left = new SymbolAST(name);\n\t\tthis.right = right;\n\t}",
"@Test\n public void testToAstnode() {\n System.out.println(\"RelativePathNode - testToAstnode\");\n final AbsolutePathNode instance = new AbsolutePathNode();\n final String expResult = \"AbsolutePathNode()\";\n final String result = instance.toAstnode();\n System.out.printf(\"Expected: %s\\n\", expResult);\n System.out.printf(\" Result: %s\\n\", result);\n assertEquals(expResult, result);\n }",
"@Test\n public void testPhylogeneticTreeParserNoNamesNoDistance() {\n // create the actual tree\n String tree = \"(,,(,));\";\n PhylogeneticTreeItem rootActual = PhylogeneticTreeParser.parse(tree);\n\n // create the expected Tree\n // root node\n PhylogeneticTreeItem rootExpected = new PhylogeneticTreeItem();\n // add 3 child nodes\n PhylogeneticTreeItem current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n // add 2 child nodes to the third node\n PhylogeneticTreeItem current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n\n // compare the trees\n assertEquals(\"both trees do not match\", rootExpected, rootActual);\n\n }",
"@Test\r\n public void testGetOperandValueType() {\r\n System.out.println(\"getOperandValueType\");\r\n Assignment instance = new Assignment();\r\n Value.Type expResult = Value.Type.UNDEFINED;\r\n Value.Type result = instance.getOperandValueType();\r\n assertEquals(expResult, result);\r\n }",
"@Test\n public void Test7() {\n TreeNode t1 = new TreeNode(1);\n TreeNode t2 = new TreeNode(2);\n TreeNode t3 = new TreeNode(3);\n TreeNode.connect(t2, null, t3);\n TreeNode.connect(t3, t1, null);\n TreeNode root = t2;\n\n TreeNode e1 = new TreeNode(1);\n TreeNode e2 = new TreeNode(2);\n TreeNode e3 = new TreeNode(3);\n TreeNode.connect(e1, null, e3);\n TreeNode.connect(e3, e2, null);\n TreeNode expected = e1;\n\n solution.recoverTree(root);\n assertTrue(TreeNode.isSameTree(expected, root));\n }",
"public void setRoot(String root);",
"@Test\n public void syntactic_fail(){\n SetupMocks.setup();\n\n List<Token> tokens= new ArrayList<>();\n\n// tokens.add(new Token(Token.TSTRG,1,1,null));\n\n tokens.add(new Token(Token.TCOMA,1,1,null));\n\n Parser parser = new Parser(tokens);\n\n NPrintItemNode nPrintItemNode = new NPrintItemNode();\n nPrintItemNode.setnExprNode(NExprNode.INSTANCE());\n\n TreeNode printitem = nPrintItemNode.make(parser);\n\n assertEquals(TreeNode.NUNDEF, printitem.getValue());\n\n }",
"private void setRoot(IAVLNode x) {\r\n\t\t\tthis.root = x;\r\n\t\t}",
"@Test(timeout = 4000)\n public void test39() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(0);\n simpleNode0.identifiers = null;\n simpleNode0.jjtOpen();\n assertEquals(0, simpleNode0.jjtGetNumChildren());\n }",
"@Test(timeout = 4000)\n public void test11() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(73);\n simpleNode0.setIdentifier(\"`n\\tw8u)p!WbK\");\n StringWriter stringWriter0 = new StringWriter(51);\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"<=\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, (String) null);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \">=\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, false);\n simpleNode0.setIdentifier(\"]\\\"\");\n simpleNode0.setIdentifier(\"<=\");\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n StringWriter stringWriter1 = new StringWriter();\n simpleNode0.setIdentifier(\"UUC^1taN`<+z\");\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n FileSystemHandling.shouldAllThrowIOExceptions();\n simpleNode0.toString();\n JavaParser javaParser0 = new JavaParser(\"]\\\"\");\n simpleNode0.dump(\"ConditionalExpression\", stringWriter0);\n assertEquals(\"<Block>\\n <identifier>`n\\tw8u)p!WbK</identifier>\\n <identifier>]\\\"</identifier>\\n <identifier>*le</identifier>\\n <identifier>UUC^1taN`<+z</identifier>\\n</Block>\\n\", stringWriter0.toString());\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 }",
"@Test public void testNode() {\n \n }",
"@Test\n\tpublic void ifYouEncounterEqualsThenThatsNotAPattern() {\n\t\tfinal Tokenizable line = line(\"=\");\n\t\tcontext.checking(new Expectations() {{\n\t\t}});\n\t\tTDAPatternParser parser = new TDAPatternParser(errors, vnamer, builder, topLevel);\n\t\tTDAParsing nested = parser.tryParsing(line);\n\t\tassertNull(nested);\n\t\tassertEquals(0, line.at());\n\t}",
"@Test\n public void testGetRight() {\n AVLNode<Integer> right = new AVLNode<> ( 10 );\n AVLNode<Integer> instance = new AVLNode<>( 7);\n instance.setRight(right);\n AVLNode<Integer> expResult = right;\n AVLNode<Integer> result = instance.getRight();\n assertEquals(expResult, result);\n }",
"@Test\r\n\tpublic void firstTest() {\r\n\t\t\r\n\t\tTree tree = new Tree(\"greg\");\r\n\t\ttree.addElement(\"opera\");\r\n\t\ttree.addElement(\"qwerty\");\r\n\t\ttree.addElement(\"odf\");\r\n\t\ttree.addElement(7363);\r\n\t\ttree.addElement(new Double(23.3));\r\n\t\t\r\n\t\tassertTrue(tree.contains(7363));\r\n\t\tassertTrue(tree.contains(\"greg\"));\r\n\t\tassertTrue(tree.contains(\"opera\"));\r\n\t\tassertTrue(tree.contains(\"odf\"));\r\n\t}",
"@Test\r\n public void test1(){\r\n Exp one = new NumericLiteral(1);\r\n Exp three = new NumericLiteral(3);\r\n Exp exp = new PlusExp(one, three);\r\n Stmt decl = new DeclStmt(\"x\");\r\n Stmt assign = new Assignment(\"x\", exp);\r\n Stmt seq = new Sequence(decl, assign);\r\n assertEquals(seq.text(), \"var x; x = 1 + 3\");\r\n }",
"@Test(timeout = 4000)\n public void test33() throws Throwable {\n StringWriter stringWriter0 = new StringWriter(70);\n StringWriter stringWriter1 = new StringWriter();\n SimpleNode simpleNode0 = new SimpleNode(70);\n stringWriter0.close();\n simpleNode0.dump(\"]6\\\"#,U@=\", stringWriter0);\n simpleNode0.setIdentifier(\"~\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n FileSystemHandling fileSystemHandling1 = new FileSystemHandling();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"fd\\\"I%ZR-!\");\n simpleNode0.setIdentifier(\"&&\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"~\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"fd\\\"I%ZR-!\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"fd\\\"I%ZR-!\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n StringWriter stringWriter2 = new StringWriter();\n simpleNode0.dump(\".\", stringWriter0);\n assertEquals(\"<Statement>\\n <identifier>~</identifier>\\n <identifier>*amp</identifier>\\n</Statement>\\n\", stringWriter0.toString());\n \n String string0 = simpleNode0.toString();\n assertEquals(\"Statement : ~ : &&\", string0);\n }",
"void visit(final Assignment assignment);",
"@Test\n public void Test6() {\n TreeNode t1 = new TreeNode(1);\n TreeNode t2 = new TreeNode(2);\n TreeNode t3 = new TreeNode(3);\n TreeNode.connect(t3, null, t1);\n TreeNode.connect(t1, t2, null);\n TreeNode root = t3;\n\n TreeNode e1 = new TreeNode(1);\n TreeNode e2 = new TreeNode(2);\n TreeNode e3 = new TreeNode(3);\n TreeNode.connect(e1, null, e3);\n TreeNode.connect(e3, e2, null);\n TreeNode expected = e1;\n\n solution.recoverTree(root);\n assertTrue(TreeNode.isSameTree(expected, root));\n }",
"@Test(timeout = 4000)\n public void test29() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(73);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"{\");\n Node node0 = simpleNode0.parent;\n simpleNode0.setIdentifier(\"{\");\n StringWriter stringWriter0 = new StringWriter(73);\n simpleNode0.dump(\"{nt@W\\bYpd9U=VG\", stringWriter0);\n simpleNode0.setIdentifier(\"NameList\");\n simpleNode0.setIdentifier(\"^eRGLNy;\");\n FileSystemHandling.shouldAllThrowIOExceptions();\n simpleNode0.setIdentifier(\"C\");\n StringReader stringReader0 = new StringReader(\"zp@:cn>UP\");\n simpleNode0.setIdentifier(\"AllocationExpression\");\n FileSystemHandling.shouldAllThrowIOExceptions();\n simpleNode0.setIdentifier(\"NameList\");\n SimpleNode simpleNode1 = new SimpleNode(68);\n Node[] nodeArray0 = new Node[0];\n simpleNode1.children = nodeArray0;\n Node[] nodeArray1 = new Node[1];\n nodeArray1[0] = null;\n simpleNode1.children = nodeArray1;\n simpleNode1.toString(\"LT\\\"PgE')tE0cI%&Dl\");\n simpleNode0.setIdentifier(\"AllocationExpression\");\n simpleNode1.dump(\"NameList\", stringWriter0);\n simpleNode0.toString();\n simpleNode0.toString(\">=\");\n simpleNode0.dump(\"<SkoVR *\", stringWriter0);\n assertEquals(\"<Block>\\n</Block>\\n<AllocationExpression></AllocationExpression>\\n<Block>\\n <identifier>NameList</identifier>\\n <identifier>^eRGLNy;</identifier>\\n <identifier>C</identifier>\\n <identifier>AllocationExpression</identifier>\\n <identifier>NameList</identifier>\\n <identifier>AllocationExpression</identifier>\\n</Block>\\n\", stringWriter0.toString());\n }",
"public void setRoot(Node root) {\n this.root = root;\n }",
"@Test\n\tpublic void testNodeInit() {\n\t\tNode<Integer> node = new Node<Integer>(3);\n\t\tassertTrue(node.getData() == 3);\n\t\tassertTrue(node.getParent() == null);\n\t\tassertTrue(node.countChildren() == 0);\n\t}",
"@Test\r\n public void testApplyTo() throws Exception {\r\n// System.out.println(\"applyTo\");\r\n// Expression leftOperand = new Literal(new Value(\"B1\"));\r\n// Expression rightOperand = new Literal(new Value(5));\r\n// Assignment instance = new Assignment();\r\n// Value expResult = new Value(5);\r\n// Value result = instance.applyTo(leftOperand, rightOperand);\r\n// assertEquals(expResult.toText(), result.toText());\r\n }",
"NodeTest(int data)\n\t{\n\t\tthis.data = data;\n\t}",
"@Test\n\tpublic void testGetAssignmentID()\n\t{\n\t\tAssignmentHandler ah = new AssignmentHandler();\n\t\tassertEquals(1,ah.getAssignmentID(\"testAssignment\"));\n\t\tassertEquals(2,ah.getAssignmentID(\"Assignment2\"));\n\t}",
"@Test\n public void test7() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n defaultMenuItem0.getParent();\n assertEquals(true, defaultMenuItem0.isLeaf());\n }",
"@Test\n public void testAddCase2a()\n {\n RedBlackTree<Integer> tree = new RedBlackTree<Integer>();\n tree.add(1);\n tree.add(0);\n assert(\"[b:1]\\n[r:0]\\n\".equals(tree.toString()));\n }",
"@Test\n\tpublic void assignmentTask() {\n\t\tselectClass();\n\t\tnavigateTo(\"Assignments\",\"assignments\");\n\t\ttester.clickButtonWithText(\"Add\");\n\t\ttester.setWorkingForm(\"addassignment\");\n\t\ttester.setTextField(\"title\", \"Foo\");\n\t\ttester.setTextField(\"task\", \"<a href=\\\"http://unitn.it\\\">Evil Link</a>\");\n\t\ttester.setTextField(\"total\", \"10\");\n\t\ttester.setTextField(\"assigneddate\", \"1\");\n\t\ttester.setTextField(\"duedate\", \"5\");\n\t\ttester.clickButtonWithText(\"Add Assignment\");\n\t\t\n\t\ttester.assertLinkNotPresentWithText(\"Evil Link\");\n\t}",
"@Test\n\tpublic void shouldGetRootNodesCorrectly() {\n\n\t\tString acceptance = \"acceptance\";\n\t\tString plugins = \"plugins\";\n\t\tString gitPlugins = \"git-plugins\";\n\t\tString cruise = \"cruise\";\n\t\tString gitTrunk = \"git-trunk\";\n\t\tString hgTrunk = \"hg-trunk\";\n\n\t\tValueStreamMap graph = new ValueStreamMap(acceptance, null);\n\t\tgraph.addUpstreamNode(new PipelineDependencyNode(plugins, plugins), null, acceptance);\n\t\tgraph.addUpstreamNode(new PipelineDependencyNode(gitPlugins, gitPlugins), null, plugins);\n\t\tgraph.addUpstreamNode(new PipelineDependencyNode(cruise, cruise), null, plugins);\n\t\tgraph.addUpstreamMaterialNode(new SCMDependencyNode(gitTrunk, gitTrunk, \"git\"), null, cruise, new MaterialRevision(null));\n\t\tgraph.addUpstreamMaterialNode(new SCMDependencyNode(hgTrunk, hgTrunk, \"hg\"), null, cruise, new MaterialRevision(null));\n\t\tgraph.addUpstreamNode(new PipelineDependencyNode(cruise, cruise), null, acceptance);\n\t\tgraph.addUpstreamMaterialNode(new SCMDependencyNode(hgTrunk, hgTrunk, \"hg\"), null, acceptance, new MaterialRevision(null));\n\n\t\tList<Node> rootNodes = graph.getRootNodes();\n\t\tassertThat(rootNodes.size(), is(3));\n\t\tassertThat(getNodeIds(rootNodes), contains(gitPlugins, gitTrunk, hgTrunk));\n\t}",
"@Test\n \tpublic void whereClauseForNodeRoot() {\n \t\tnode23.setRoot(true);\n \t\tcheckWhereCondition(\"_rank23.root IS TRUE\");\n \t}",
"protected void root(BSTNode root) {\n\t\tthis.root = (BSTNode)root;\n\t}",
"@Test\n\tpublic void testAssignGrade() {\n\t\tthis.admin.createClass(\"Class1\", 2017, \"Instructor1\", 20);\n\t\tthis.instructor.addHomework(\"Instructor1\", \"Class1\", 2017, \"HW1\");\n\t\tthis.student.submitHomework(\"Student1\", \"HW1\", \"Solution\", \"Class1\", 2017);\n\t\tthis.instructor.assignGrade(\"Instructor1\", \"Class1\", 2017, \"HW1\", \"Student1\", 90);\n\t\tInteger grade = this.instructor.getGrade(\"Class1\", 2017, \"HW1\", \"Student1\");\n\t\tassertTrue(grade.equals(new Integer(90)));\n\t}",
"@Test(timeout = 4000)\n public void test21() throws Throwable {\n byte[] byteArray0 = new byte[0];\n ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0, 1, 1);\n JavaParser javaParser0 = new JavaParser(byteArrayInputStream0);\n SimpleNode simpleNode0 = new SimpleNode(javaParser0, (-120811353));\n Node[] nodeArray0 = new Node[6];\n nodeArray0[0] = (Node) simpleNode0;\n nodeArray0[1] = (Node) simpleNode0;\n nodeArray0[2] = (Node) simpleNode0;\n nodeArray0[3] = (Node) simpleNode0;\n nodeArray0[4] = (Node) simpleNode0;\n SimpleNode simpleNode1 = new SimpleNode(javaParser0, 1);\n nodeArray0[5] = (Node) simpleNode1;\n simpleNode0.children = nodeArray0;\n int int0 = simpleNode0.jjtGetNumChildren();\n assertEquals(6, int0);\n }",
"@Test\n public void Test2() {\n TreeNode t1 = new TreeNode(1);\n TreeNode t2 = new TreeNode(2);\n TreeNode t3 = new TreeNode(3);\n TreeNode t4 = new TreeNode(4);\n TreeNode t5 = new TreeNode(5);\n TreeNode.connect(t1, null, t4);\n TreeNode.connect(t4, null, t3);\n TreeNode.connect(t3, null, t2);\n TreeNode.connect(t2, null, t5);\n TreeNode root = t1;\n\n TreeNode e1 = new TreeNode(1);\n TreeNode e2 = new TreeNode(2);\n TreeNode e3 = new TreeNode(3);\n TreeNode e4 = new TreeNode(4);\n TreeNode e5 = new TreeNode(5);\n TreeNode.connect(e1, null, e2);\n TreeNode.connect(e2, null, e3);\n TreeNode.connect(e3, null, e4);\n TreeNode.connect(e4, null, e5);\n TreeNode expected = e1;\n\n solution.recoverTree(root);\n assertTrue(TreeNode.isSameTree(expected, root));\n }",
"public void setRoot(Node<T> root) {\n this.root = root;\n }",
"public void testIsEmpty() {\r\n assertTrue(tree.isEmpty());\r\n tree.insert(\"apple\");\r\n assertFalse(tree.isEmpty());\r\n }",
"@Test\n public void test11() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n int int0 = defaultMenuItem0.getDepth();\n assertEquals(0, int0);\n assertEquals(true, defaultMenuItem0.isLeaf());\n }",
"@Test\n public void Test1() {\n TreeNode t1 = new TreeNode(5);\n TreeNode t2 = new TreeNode(2);\n TreeNode t3 = new TreeNode(3);\n TreeNode t4 = new TreeNode(4);\n TreeNode t5 = new TreeNode(1);\n TreeNode.connect(t1, t2, null);\n TreeNode.connect(t2, t3, null);\n TreeNode.connect(t3, t4, null);\n TreeNode.connect(t4, t5, null);\n TreeNode root = t1;\n\n TreeNode e1 = new TreeNode(5);\n TreeNode e2 = new TreeNode(4);\n TreeNode e3 = new TreeNode(3);\n TreeNode e4 = new TreeNode(2);\n TreeNode e5 = new TreeNode(1);\n TreeNode.connect(e1, e2, null);\n TreeNode.connect(e2, e3, null);\n TreeNode.connect(e3, e4, null);\n TreeNode.connect(e4, e5, null);\n TreeNode expected = e1;\n\n solution.recoverTree(root);\n assertTrue(TreeNode.isSameTree(expected, root));\n }",
"void setRoot(Node<K, V> root) throws IOException;",
"@Test\r\n public void testHeightOnlyRoot(){\r\n \t//check instances where height will be 0\r\n \tassertEquals(tree.height(), 0);\r\n \ttree.add(\"a\"); //adding to root (height still 0)\r\n \tassertEquals(tree.height(), 0 );\r\n \t\r\n }",
"@Test\n public void test2() throws Throwable {\n Object object0 = new Object();\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem(object0);\n defaultMenuItem0.setParent(object0);\n assertEquals(true, defaultMenuItem0.isLeaf());\n }",
"@Test\n public void testGetBalance() {\n AVLNode<Integer> instance = new AVLNode<> ();\n instance.setBalance( 4 );\n int expResult = 4;\n int result = instance.getBalance();\n assertEquals(expResult, result);\n }",
"@Override\n\tpublic void visit(AssignNode node) {\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\t/**\n\t\t * Verificam fiii si construim perechea Variabila, Valoare pentru a fi\n\t\t * inserata in HahMap-ul din Evaluator\n\t\t */\n\t\tVariable x = null;\n\t\tValue i = null;\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\tx = new Variable(node.getChild(1).getName());\n\t\t} else {\n\t\t\ti = new Value(node.getChild(1).getName());\n\t\t}\n\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\tx = new Variable(node.getChild(0).getName());\n\t\t} else {\n\t\t\ti = new Value(node.getChild(0).getName());\n\t\t}\n\t\tEvaluator.variables.put(x.getName(), i.getName());\n\t\tnode.setName(i.getName());\n\t}",
"@Override\n\tpublic void visit(EqualityNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t * evaluam fiul stang si fiul drept\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\tString s2 = null;\n\t\tString s1 = null;\n\t\t/**\n\t\t * preluam rezultatele evaluarii celor doi fii\n\t\t */\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\ts1 = Evaluator.variables.get(node.getChild(0).getName());\n\t\t} else {\n\t\t\ts1 = node.getChild(0).getName();\n\t\t}\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ts2 = Evaluator.variables.get(node.getChild(1).getName());\n\t\t} else {\n\t\t\ts2 = node.getChild(1).getName();\n\t\t}\n\n\t\t/**\n\t\t * verificam daca cei doi fii s- au evaluat la aceeasi expresie\n\t\t */\n\t\tif (s1.contentEquals(s2)) {\n\t\t\tnode.setName(\"true\");\n\t\t} else {\n\t\t\tnode.setName(\"false\");\n\t\t}\n\n\t}",
"@Test\n public void test4() throws Throwable {\n Object object0 = new Object();\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem(object0);\n defaultMenuItem0.setName((String) null);\n assertEquals(true, defaultMenuItem0.isLeaf());\n }",
"@Override\n\tpublic Object visit(ASTAssign node, Object data) {\n\t\tnode.jjtGetChild(0).jjtAccept(this, data);\n\t\tSystem.out.print(\" := \");\n\t\tnode.jjtGetChild(1).jjtAccept(this, data);\n\t\treturn null;\n\t}",
"@Test\n public void Test5() {\n TreeNode t1 = new TreeNode(1);\n TreeNode t2 = new TreeNode(2);\n TreeNode t3 = new TreeNode(3);\n TreeNode.connect(t3, t1, t2);\n TreeNode root = t3;\n\n TreeNode e1 = new TreeNode(1);\n TreeNode e2 = new TreeNode(2);\n TreeNode e3 = new TreeNode(3);\n TreeNode.connect(e2, e1, e3);\n TreeNode expected = e2;\n\n solution.recoverTree(root);\n assertTrue(TreeNode.isSameTree(expected, root));\n }",
"public interface AssignmentNode extends StackOperationNode {\n\n TemporaryVariableName getValueName();\n\n}",
"@Test\n public void Test3() {\n TreeNode t1 = new TreeNode(1);\n TreeNode t2 = new TreeNode(2);\n TreeNode t3 = new TreeNode(3);\n TreeNode t4 = new TreeNode(4);\n TreeNode t5 = new TreeNode(5);\n TreeNode.connect(t3, t4, t2);\n TreeNode.connect(t4, t1, null);\n TreeNode.connect(t2, null, t5);\n TreeNode root = t3;\n\n TreeNode e1 = new TreeNode(1);\n TreeNode e2 = new TreeNode(2);\n TreeNode e3 = new TreeNode(3);\n TreeNode e4 = new TreeNode(4);\n TreeNode e5 = new TreeNode(5);\n TreeNode.connect(e3, e2, e4);\n TreeNode.connect(e2, e1, null);\n TreeNode.connect(e4, null, e5);\n TreeNode expected = e3;\n\n solution.recoverTree(root);\n assertTrue(TreeNode.isSameTree(expected, root));\n }",
"@Test\n public void Test4() {\n TreeNode t1 = new TreeNode(1);\n TreeNode t2 = new TreeNode(2);\n TreeNode t3 = new TreeNode(3);\n TreeNode t4 = new TreeNode(4);\n TreeNode t5 = new TreeNode(5);\n TreeNode.connect(t2, t3, t4);\n TreeNode.connect(t3, t1, null);\n TreeNode.connect(t4, null, t5);\n TreeNode root = t2;\n\n TreeNode e1 = new TreeNode(1);\n TreeNode e2 = new TreeNode(2);\n TreeNode e3 = new TreeNode(3);\n TreeNode e4 = new TreeNode(4);\n TreeNode e5 = new TreeNode(5);\n TreeNode.connect(e3, e2, e4);\n TreeNode.connect(e2, e1, null);\n TreeNode.connect(e4, null, e5);\n TreeNode expected = e3;\n\n solution.recoverTree(root);\n assertTrue(TreeNode.isSameTree(expected, root));\n }",
"@Test\n public void testAddCase3a()\n {\n RedBlackTree<Integer> tree = new RedBlackTree<Integer>();\n tree.add(3);\n tree.add(2);\n tree.add(4);\n tree.add(1);\n assert(\"[b:3]\\n[b:2]\\n[r:1]\\n[b:4]\\n\".equals(tree.toString()));\n }",
"@Test(timeout = 4000)\n public void test12() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(0);\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, true, false);\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \">\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n FileSystemHandling fileSystemHandling1 = new FileSystemHandling();\n simpleNode0.setIdentifier(\"<<\");\n simpleNode0.setIdentifier(\"y\");\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"<<\");\n StringWriter stringWriter0 = new StringWriter();\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"{\");\n simpleNode0.dump(\"}\", stringWriter0);\n assertEquals(\"<CompilationUnit>\\n <identifier>*lshft</identifier>\\n <identifier>y</identifier>\\n</CompilationUnit>\\n\", stringWriter0.toString());\n }",
"public void work(RootNode root) throws Exception;",
"@Test\n public void basicConditionTest() throws Exception {\n\n assertThat(getNode(\"1 == 2\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 == 1\", \"expr\").render(null), is((Object)true));\n }",
"@Override\n\tpublic Object visit(ASTRoot node, Object data)\n\t{\n\t\treturn singleChildValid(node, data);\n\t}",
"private void testAclConstraints002() {\n\t\tDmtSession session = null;\n\t\ttry {\n\t\t\tDefaultTestBundleControl.log(\"#testAclConstraints002\");\n\t\t\tsession = tbc.getDmtAdmin().getSession(\".\",DmtSession.LOCK_TYPE_EXCLUSIVE);\n\t\t\tString expectedRootAcl = \"Add=*&Get=*&Replace=*\";\n\t\t\tString rootAcl = session.getNodeAcl(\".\").toString();\n\t\t\tTestCase.assertEquals(\"This test asserts that if the root node ACL is not explicitly set, it should be set to Add=*&Get=*&Replace=*.\",expectedRootAcl,rootAcl);\n\t\t} catch (Exception e) {\n\t\t\ttbc.failUnexpectedException(e);\n\t\t} finally {\n\t\t\ttbc.closeSession(session);\n\t\t}\n\t}",
"public Object visitAssignment(JmmNode node, List<Report> reports) {\n JmmNode left = node.getChildren().get(0);\n // Constant Propagation and Folding\n JmmNode right = node.getChildren().get(1);\n constantPropagationAndFolding(right);\n\n if (left.getKind().equals(\"Var\")) {\n // Left Node is Variable\n String varName = left.get(\"name\");\n Symbol symbol = getVariableSymbol(varName);\n\n // Right Node is the Value\n right = node.getChildren().get(1);\n Object value = getValue(right);\n\n // Modify the Variable Value\n setVariableValue(symbol, value);\n }\n\n return null;\n }",
"@Test\r\n public void testToString() {\r\n System.out.println(\"toString\");\r\n Assignment instance = new Assignment();\r\n String expResult = \":=\";\r\n String result = instance.toString();\r\n assertEquals(expResult, result);\r\n }",
"@Test\n public void test12() throws Throwable {\n Object object0 = new Object();\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem(object0);\n assertEquals(true, defaultMenuItem0.isLeaf());\n \n defaultMenuItem0.setLeaf(false);\n assertEquals(false, defaultMenuItem0.isLeaf());\n }"
] | [
"0.7598308",
"0.6751423",
"0.660589",
"0.6367806",
"0.6331736",
"0.63049674",
"0.61460465",
"0.60963595",
"0.6074728",
"0.6010641",
"0.5973043",
"0.59586585",
"0.5953747",
"0.5904739",
"0.58141947",
"0.57918525",
"0.57812595",
"0.5764639",
"0.574947",
"0.57339334",
"0.5720572",
"0.56689984",
"0.56677705",
"0.5658751",
"0.56453884",
"0.56425107",
"0.5634398",
"0.5618102",
"0.56139773",
"0.5612634",
"0.5601981",
"0.55821717",
"0.55794066",
"0.556854",
"0.5554588",
"0.5543047",
"0.55400157",
"0.55330926",
"0.5531277",
"0.55223477",
"0.5518944",
"0.5516063",
"0.5513713",
"0.551008",
"0.5509482",
"0.550887",
"0.5498754",
"0.5493904",
"0.54892325",
"0.5488546",
"0.5482428",
"0.54806066",
"0.5477137",
"0.5475534",
"0.54712695",
"0.5467603",
"0.5453928",
"0.5452722",
"0.54518527",
"0.54450274",
"0.54351664",
"0.54314375",
"0.543141",
"0.54184806",
"0.54146236",
"0.5412476",
"0.54101205",
"0.5401132",
"0.53982055",
"0.53980184",
"0.5394099",
"0.5392975",
"0.53908116",
"0.5388928",
"0.538451",
"0.53829026",
"0.53826344",
"0.53787184",
"0.5372851",
"0.53689605",
"0.53659314",
"0.53635234",
"0.5361694",
"0.53587556",
"0.53517646",
"0.5350018",
"0.53461784",
"0.5339311",
"0.53385586",
"0.5333676",
"0.5321462",
"0.5319154",
"0.5318848",
"0.53155035",
"0.53152025",
"0.5309592",
"0.5298018",
"0.5297058",
"0.5296927",
"0.52925783"
] | 0.66485035 | 2 |
test Declaration root node | @Test
public void testDeclaration(){
Variable x = new Variable("x");
Statement decl = f.createDeclNode(x);
assertEquals(decl.textRepresentation(), "var x;");
ASTNodeCountVisitor v = new ASTNodeCountVisitor();
decl.accept(v);
assertEquals("declaration test1 fail", v.numCount, 0);
assertEquals("declaration test2 fail", v.infixCount, 0);
assertEquals("declaration test3 fail", v.decCount, 1);
assertEquals("declaration test4 fail", v.seqCount, 0);
assertEquals("declaration test5 fail", v.assignCount, 0);
assertEquals("declaration test6 fail", v.varCount, 0);
assertEquals("declaration test7 fail", v.strCount, 0);
assertEquals("declaration test8 fail", v.prefixCount, 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasAstRoot();",
"public Boolean isRootNode();",
"private boolean isDeclaration() throws IOException\n\t{\t\n\t\treturn isGlobalDeclaration();\n\t}",
"@Test\r\n public void testIsRoot() {\r\n System.out.println(\"isRoot\");\r\n ConfigNode configNode = new ConfigNode();\r\n ConfigNode childNode1 = new ConfigNode(testLine);\r\n configNode.appendChild(childNode1);\r\n assertTrue(configNode.isRoot());\r\n assertFalse(childNode1.isRoot());\r\n }",
"RootNode getRootNode();",
"@Test(timeout = 4000)\n public void test39() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(0);\n simpleNode0.identifiers = null;\n simpleNode0.jjtOpen();\n assertEquals(0, simpleNode0.jjtGetNumChildren());\n }",
"@Override\n public ClassTree declaration() {\n return null;\n }",
"@Test\r\n\tpublic void firstTest() {\r\n\t\t\r\n\t\tTree tree = new Tree(\"greg\");\r\n\t\ttree.addElement(\"opera\");\r\n\t\ttree.addElement(\"qwerty\");\r\n\t\ttree.addElement(\"odf\");\r\n\t\ttree.addElement(7363);\r\n\t\ttree.addElement(new Double(23.3));\r\n\t\t\r\n\t\tassertTrue(tree.contains(7363));\r\n\t\tassertTrue(tree.contains(\"greg\"));\r\n\t\tassertTrue(tree.contains(\"opera\"));\r\n\t\tassertTrue(tree.contains(\"odf\"));\r\n\t}",
"public boolean hasEmbeddedNodeDeclaration() {\r\n\t\t\treturn true;\r\n\t\t}",
"public void handleDeclaration(HtmlObjects.Declaration t)\n {\n }",
"public boolean hasEmbeddedNodeDeclaration() {\r\n\t\t\treturn false;\r\n\t\t}",
"@Test\n\tpublic void test_ClassDeclarationNested_Dec_1_Ref_0() {\n\t\tconfigureParser(\"public class Other { public class Foo {} }\", \"Other.Foo\", 1, 0);\n\t}",
"declaration getDeclaration();",
"@Test\n public void syntactic_fail(){\n SetupMocks.setup();\n\n List<Token> tokens= new ArrayList<>();\n\n// tokens.add(new Token(Token.TSTRG,1,1,null));\n\n tokens.add(new Token(Token.TCOMA,1,1,null));\n\n Parser parser = new Parser(tokens);\n\n NPrintItemNode nPrintItemNode = new NPrintItemNode();\n nPrintItemNode.setnExprNode(NExprNode.INSTANCE());\n\n TreeNode printitem = nPrintItemNode.make(parser);\n\n assertEquals(TreeNode.NUNDEF, printitem.getValue());\n\n }",
"public void root(Node n) {}",
"@Test\r\n public void testGetRoot() {\r\n System.out.println(\"getRoot\");\r\n ConfigNode configNode = new ConfigNode();\r\n ConfigNode childNode1 = new ConfigNode(testLine);\r\n configNode.appendChild(childNode1);\r\n assertEquals(configNode, childNode1.getRoot());\r\n }",
"@Test\n public void processContainerRootNode() throws IOException, ParserException {\n thrown.expect(ParserException.class);\n thrown.expectMessage(\"no viable alternative at input 'container'\");\n YangNode node = manager.getDataModel(\"src/test/resources/ContainerRootNode.yang\");\n }",
"@Test\n \tpublic void whereClauseForNodeRoot() {\n \t\tnode23.setRoot(true);\n \t\tcheckWhereCondition(\"_rank23.root IS TRUE\");\n \t}",
"public boolean isXMLDeclaration() {\r\n\t\treturn name==Tag.XML_DECLARATION;\r\n\t}",
"@Test\n public void testDefaultRoot() {\n assertEquals(ClassModel.getObjectClass(), node.getModel());\n assertEquals(1, node.size());\n assertEquals(0, treeHash.size());\n }",
"public void masterDeclaration();",
"public boolean isValidateRoot() {\n/* 246 */ return true;\n/* */ }",
"@Test\n\tpublic void test_ClassDeclarationNestedPackage_Dec_1_Ref_0() {\n\t\tconfigureParser(\"package bar; public class Other { public class Foo {} }\", \"bar.Other.Foo\", 1, 0);\n\t}",
"public abstract T queryRootNode();",
"@Test\n public void testGetRoot() {\n AVLNode<Integer> instance = new AVLNode<> ( 7 );\n AVLNode<Integer> expResult = new AVLNode<> (); \n expResult.setRoot(new AVLNode<>( 7 ));\n AVLNode<Integer> result = instance;\n assertEquals(expResult.getRoot().getKey(), result.getKey());\n }",
"@Override\n\tpublic void check(Block curScope, Library lib) {\n\t\tSystem.out.println(\"here typename\"+name+ \" \"+lineNum);\n\t\tPascalDecl d2 = curScope.findDecl(name,this);\n\t\t \n\t\t\n\t\t\n\t\t\n\t\n\n\n\t}",
"@Test(timeout = 4000)\n public void test22() throws Throwable {\n JavaParser javaParser0 = new JavaParser((JavaParserTokenManager) null);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager((JavaCharStream) null);\n javaParser0.ReInit(javaParserTokenManager0);\n SimpleNode simpleNode0 = new SimpleNode(26);\n int int0 = simpleNode0.jjtGetNumChildren();\n assertEquals(0, int0);\n }",
"@Test(timeout = 4000)\n public void test12() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(0);\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, true, false);\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \">\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n FileSystemHandling fileSystemHandling1 = new FileSystemHandling();\n simpleNode0.setIdentifier(\"<<\");\n simpleNode0.setIdentifier(\"y\");\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"<<\");\n StringWriter stringWriter0 = new StringWriter();\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"{\");\n simpleNode0.dump(\"}\", stringWriter0);\n assertEquals(\"<CompilationUnit>\\n <identifier>*lshft</identifier>\\n <identifier>y</identifier>\\n</CompilationUnit>\\n\", stringWriter0.toString());\n }",
"public void testTopLevelType1() throws JavaModelException {\n\t\tASTNode node = buildAST(\n\t\t\t\"/*start*/public class X {\\n\" +\n\t\t\t\"}/*end*/\"\n\t\t);\n\t\tIBinding binding = ((TypeDeclaration) node).resolveBinding();\n\t\tassertNotNull(\"No binding\", binding);\n\t\tIJavaElement element = binding.getJavaElement();\n\t\tassertElementEquals(\n\t\t\t\"Unexpected Java element\",\n\t\t\t\"X [in [Working copy] X.java [in <default> [in <project root> [in P]]]]\",\n\t\t\telement\n\t\t);\n\t\tassertTrue(\"Element should exist\", element.exists());\n\t}",
"public abstract boolean isRoot(Position<E> p);",
"private void createRootNode()\r\n {\r\n root = new Node(\"root\", null);\r\n Node.clear();\r\n }",
"@Test(timeout = 4000)\n public void test06() throws Throwable {\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n SimpleNode simpleNode0 = new SimpleNode(88);\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"-eV8gMo2X fKt7:>U\");\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"{\");\n SimpleNode simpleNode1 = new SimpleNode(88);\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, true);\n simpleNode0.setIdentifier(\"{\");\n simpleNode0.setIdentifier(\"<\");\n StringWriter stringWriter0 = new StringWriter();\n StringWriter stringWriter1 = stringWriter0.append((CharSequence) \"{\");\n simpleNode0.setIdentifier(\" ]GGvp ;L;QJa,92\");\n simpleNode0.setIdentifier(\"cp6\\\"\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"cp6\\\"\");\n simpleNode0.dump(\">\", stringWriter1);\n simpleNode0.toString();\n simpleNode0.toString(\"cp6\\\"\");\n simpleNode1.jjtAddChild(simpleNode0, 88);\n simpleNode1.jjtGetChild(88);\n assertEquals(89, simpleNode1.jjtGetNumChildren());\n }",
"public void testParse() throws Exception { \n // DTD parser test \n \n InputSource input = new InputSource(new StringReader(\"<!ELEMENT x ANY>\"));\n input.setSystemId(\"StringReader\");\n \n XMLReader peer = XMLReaderFactory.createXMLReader();\n \n TestDeclHandler dtdHandler = new TestDeclHandler();\n peer.setProperty(\"http://xml.org/sax/properties/declaration-handler\", dtdHandler);\n SAXEntityParser parser = new SAXEntityParser(peer, false);\n parser.parse(input);\n\n // Add your test code below by replacing the default call to fail.\n assertTrue(\"DTD entity parser did not detected 'x' decl!\", dtdHandler.pass);\n\n // Reentrance test\n \n boolean exceptionThrown = false;\n try {\n parser.parse(new InputSource(new StringReader(\"\")));\n } \n catch (IllegalStateException ex) {\n exceptionThrown = true;\n } \n finally {\n assertTrue(\"Parser may not be reused!\", exceptionThrown);\n }\n \n }",
"public TreeRootNode() {\n super(\"root\");\n }",
"public boolean isValidateRoot() {\n/* 463 */ return true;\n/* */ }",
"@DisplayName(\"Get root\")\n @Test\n public void testGetRoot() {\n Assertions.assertEquals(0, graph.getRoot());\n }",
"@Test\r\n public void testIsChildSupported() {\r\n System.out.println(\"isChildSupported\");\r\n String tagName = \"\";\r\n XmlRoot instance = null;\r\n boolean expResult = false;\r\n// boolean result = instance.isChildSupported(tagName);\r\n// assertEquals(expResult, result);\r\n }",
"public Node getRootNode() throws Exception;",
"public void testTopLevelType3() throws CoreException {\n\t\tASTNode node = buildAST(\n\t\t\t\"public class X {\\n\" +\n\t\t\t\" /*start*/String/*end*/ field;\\n\" +\n\t\t\t\"}\"\n\t\t);\n\t\tIBinding binding = ((SimpleType) node).resolveBinding();\n\t\tassertNotNull(\"No binding\", binding);\n\t\tIJavaElement element = binding.getJavaElement();\n\t\tassertElementEquals(\n\t\t\t\"Unexpected Java element\",\n\t\t\t\"String [in String.class [in java.lang [in \"+ getExternalJCLPathString() + \" [in P]]]]\",\n\t\t\telement\n\t\t);\n\t\tassertTrue(\"Element should exist\", element.exists());\n\t}",
"boolean isEmpty(){\n return root == null;\n }",
"default boolean isRoot() {\n if (isEmpty()){\n return false;\n }\n\n TreeNode treeNode = getTreeNode();\n return treeNode.getLeftValue() == 1;\n }",
"@Test\n public void testConfigurationDeclarationIsReserved()\n {\n DefaultConfigurationBuilder.ConfigurationDeclaration decl = new DefaultConfigurationBuilder.ConfigurationDeclaration(\n factory, factory);\n DefaultConfigurationNode parent = new DefaultConfigurationNode();\n DefaultConfigurationNode nd = new DefaultConfigurationNode(\"at\");\n parent.addAttribute(nd);\n assertTrue(\"Attribute at not recognized\", decl.isReservedNode(nd));\n nd = new DefaultConfigurationNode(\"optional\");\n parent.addAttribute(nd);\n assertTrue(\"Attribute optional not recognized\", decl.isReservedNode(nd));\n nd = new DefaultConfigurationNode(\"config-class\");\n parent.addAttribute(nd);\n assertTrue(\"Inherited attribute not recognized\", decl\n .isReservedNode(nd));\n nd = new DefaultConfigurationNode(\"different\");\n parent.addAttribute(nd);\n assertFalse(\"Wrong reserved attribute\", decl.isReservedNode(nd));\n nd = new DefaultConfigurationNode(\"at\");\n parent.addChild(nd);\n assertFalse(\"Node type not evaluated\", decl.isReservedNode(nd));\n }",
"boolean isEmpty(){\r\n\t\t\r\n\t\treturn root == null;\r\n\t}",
"@Test\r\n public void testFindXmlRoot() {\r\n System.out.println(\"findXmlRoot\");\r\n\r\n XmlRoot expResult = root;\r\n XmlCompoundElement books = new XmlDefaultElement(\"books\");\r\n root.addChild(books);\r\n\r\n XmlRoot result = (XmlRoot) XmlBase.findXmlRoot(books);\r\n assertEquals(expResult, result);\r\n\r\n XmlElement book = new XmlDefaultTextElement(\"book\");\r\n books.addChild(book);\r\n\r\n result = (XmlRoot) XmlBase.findXmlRoot(book);\r\n assertEquals(expResult, result);\r\n\r\n }",
"@Test\n public void setSiblingParent() throws Exception {\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder = factory.newDocumentBuilder();\n Document mockdoc = builder.newDocument();\n Element root = mockdoc.createElement(\"root\");\n Element root1 = mockdoc.createElement(\"root1\");\n Element root2 = mockdoc.createElement(\"root2\");\n Element root12 = mockdoc.createElement(\"root12\");\n Element root22 = mockdoc.createElement(\"root22\");\n\n mockdoc.appendChild(root);\n root.appendChild(root1);\n root.appendChild(root2);\n root1.appendChild(root12);\n root1.appendChild(root22);\n\n Tester tester=new Tester();\n assertFalse(tester.test(root)==root1);\n assertFalse(tester.setSiblingParent(root)==root1);\n\n\n }",
"public boolean isDocTypeDeclaration() {\r\n\t\treturn name==Tag.DOCTYPE_DECLARATION;\r\n\t}",
"@Test(timeout = 4000)\n public void test21() throws Throwable {\n byte[] byteArray0 = new byte[0];\n ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0, 1, 1);\n JavaParser javaParser0 = new JavaParser(byteArrayInputStream0);\n SimpleNode simpleNode0 = new SimpleNode(javaParser0, (-120811353));\n Node[] nodeArray0 = new Node[6];\n nodeArray0[0] = (Node) simpleNode0;\n nodeArray0[1] = (Node) simpleNode0;\n nodeArray0[2] = (Node) simpleNode0;\n nodeArray0[3] = (Node) simpleNode0;\n nodeArray0[4] = (Node) simpleNode0;\n SimpleNode simpleNode1 = new SimpleNode(javaParser0, 1);\n nodeArray0[5] = (Node) simpleNode1;\n simpleNode0.children = nodeArray0;\n int int0 = simpleNode0.jjtGetNumChildren();\n assertEquals(6, int0);\n }",
"@Test\n\tpublic void test_ClassDeclarationNested2Package_Dec_1_Ref_0() {\n\t\tconfigureParser(\"package bar; public class Other { public class Bar { public class Foo{} } }\", \"bar.Other.Bar.Foo\", 1, 0);\n\t}",
"@Test\n public void testAssignment() {\n try {\n Lexer lexer = new Lexer(new StringReader(\"n = 0;\"));\n Parser parser = new Parser(lexer);\n RootNode node = parser.program();\n AssignNode assignment = (AssignNode) node.get(0);\n assertTrue(assignment.getClass() == AssignNode.class);\n } catch (IOException e) {\n fail(e.getMessage());\n }\n }",
"TestNode createTestNode();",
"protected final boolean isRootNode() {\n return isRootNode;\n }",
"@Test public void testNode() {\n \n }",
"@Test\n\tpublic void test_ClassDeclarationNested2_Dec_1_Ref_0() {\n\t\tconfigureParser(\"public class Other { public class Bar { public class Foo{} } }\", \"Other.Bar.Foo\", 1, 0);\n\t}",
"public boolean empty() {\n if(root==EXT_NODE) {\r\n \treturn true;\r\n }\r\n return false;\r\n }",
"void declaration() {\n\t\tString theToken = currentToken();\r\n\r\n\t\tif (theToken.equals(\"int\") || theToken.equals(\"void\")) {\r\n\t\t\ttypeSpeci();\r\n\t\t\taccept(\"ID\");\r\n\t\t\ttheToken = currentToken();\r\n\t\t\tif (theToken.equals(\";\") || theToken.equals(\"[\"))\r\n\t\t\t\tvarDec();\r\n\r\n\t\t\t// if int ID ( param ) compoundStatment\r\n\t\t\telse if (theToken.equals(\"(\"))\r\n\t\t\t\tfunDec();\r\n\r\n\t\t}\r\n\r\n\t\telse\r\n\t\t\treturn;\r\n\t}",
"protected void verifyRootElement(String localName, String prefix)\n throws XMLStreamException\n {\n if (isValidating()) {\n /* 17-Mar-2006, TSa: Ideally, this should be a validity\n * problem?\n */\n if (mDtdRootElem != null && mDtdRootElem.length() > 0) {\n String wrongElem = null;\n \n /* Ugh. It is possible that we just don't know the prefix --\n * in repairing mode it's assigned after this check. So for\n * now, let's only verify the local name\n */\n if (localName.equals(mDtdRootElem)) {\n // good\n } else {\n int lnLen = localName.length();\n int oldLen = mDtdRootElem.length();\n \n if (oldLen > lnLen\n && mDtdRootElem.endsWith(localName)\n && mDtdRootElem.charAt(oldLen - lnLen - 1) == ':') {\n // good also\n } else {\n if (prefix == null) { // doesn't and won't have one\n wrongElem = localName;\n } else if (prefix.length() == 0) { // don't know what it'd be\n wrongElem = \"[unknown]:\"+localName;\n } else {\n wrongElem = prefix + \":\" + localName;\n }\n }\n }\n if (wrongElem != null) {\n reportValidationProblem(ErrorConsts.ERR_VLD_WRONG_ROOT, wrongElem, mDtdRootElem);\n }\n }\n }\n mState = STATE_TREE;\n }",
"@org.junit.Test\n public void constrCompelemNodeid1() {\n final XQuery query = new XQuery(\n \"for $x in <a/>, $y in element elem {$x} return exactly-one($y/a) is $x\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n assertBoolean(false)\n );\n }",
"@Test(timeout = 4000)\n public void test23() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(1990);\n simpleNode0.jjtClose();\n simpleNode0.id = (-229);\n // Undeclared exception!\n try { \n simpleNode0.jjtGetChild(0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.SimpleNode\", e);\n }\n }",
"@Test\n public final void testGetXPathWithDTDProlog() {\n \n Document testDoc = TestDocHelper.createDocument(\n \"<!DOCTYPE a [ <!ELEMENT a (#PCDATA)>]><a>text</a>\");\n \n //Move to beforeclass method\n XPathFactory xPathFac = XPathFactory.newInstance();\n XPath xpathExpr = xPathFac.newXPath();\n \n testXPathForNode(testDoc, xpathExpr);\n }",
"public boolean isRoot() { return getAncestorCount()<2; }",
"boolean hasNode();",
"boolean hasNode();",
"private void testGetRootUri003() {\n\t\tDmtSession session = null;\n\t\ttry {\n\t\t\tDefaultTestBundleControl.log(\"#testGetRootUri003\");\n\t\t\tsession = tbc.getDmtAdmin().getSession(TestExecPluginActivator.LEAF_NODE,\n\t\t\t\t\tDmtSession.LOCK_TYPE_ATOMIC);\n\t\t\tTestCase.assertEquals(\"Asserting root uri\", TestExecPluginActivator.LEAF_NODE, session.getRootUri());\n\t\t} catch (Exception e) {\n\t\t\ttbc.failUnexpectedException(e);\n\t\t} finally {\n\t\t\ttbc.closeSession(session);\n\t\t}\n\t}",
"public boolean hasAstRoot() {\n return ((bitField0_ & 0x00000010) != 0);\n }",
"@Test\r\n public void testHeightOnlyRoot(){\r\n \t//check instances where height will be 0\r\n \tassertEquals(tree.height(), 0);\r\n \ttree.add(\"a\"); //adding to root (height still 0)\r\n \tassertEquals(tree.height(), 0 );\r\n \t\r\n }",
"@Test(timeout = 4000)\n public void test00() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(3390);\n Node[] nodeArray0 = new Node[3];\n nodeArray0[0] = (Node) simpleNode0;\n nodeArray0[1] = (Node) simpleNode0;\n simpleNode0.id = 3390;\n nodeArray0[2] = (Node) simpleNode0;\n simpleNode0.children = nodeArray0;\n simpleNode0.jjtGetNumChildren();\n simpleNode0.jjtGetNumChildren();\n simpleNode0.parent = nodeArray0[0];\n simpleNode0.children = nodeArray0;\n int int0 = (-1836);\n String string0 = \"`n\\\\t\\\\w8u)p!WbK\";\n simpleNode0.setIdentifier(\"`n\\tw8u)p!WbK\");\n simpleNode0.id = (-1836);\n Node node0 = simpleNode0.jjtGetChild(2);\n simpleNode0.jjtGetParent();\n // Undeclared exception!\n try { \n node0.jjtAddChild(nodeArray0[1], (-1836));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -1836\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.SimpleNode\", e);\n }\n }",
"@Test\n public void testAllConstructions() throws IOException, LexerException, ParseException {\n TreeNode<ASTNode> tree = getTree(\"all.txt\");\n System.out.println(tree);\n }",
"@Test\n\tpublic void testNodeInit() {\n\t\tNode<Integer> node = new Node<Integer>(3);\n\t\tassertTrue(node.getData() == 3);\n\t\tassertTrue(node.getParent() == null);\n\t\tassertTrue(node.countChildren() == 0);\n\t}",
"@Test\n public void simpleXmlParsingTest() throws ParserConfigurationException, SAXException, IOException {\n String simpleInput = \"<test></test>\";\n TestTreeNode root = TestingUtils.parseXmlTree(simpleInput);\n\n assertThat(root, notNullValue());\n assertThat(root.getLabel().get(), is(\"test\"));\n assertThat(root.getChildren().isPresent(), is(false));\n }",
"public static boolean mainDeclaration(FileInputStream f) {\n if(observer != null){\n observer.parser.setCurrentRule(\"mainDeclaration\",true);\n }\n \n CToken t = new CToken();\n t = getUsePeek(f);\n\n if (!t.token.equals(\"void\")) {\n System.err.format(\"Syntax Error: In rule MainDeclaration unexpected token \\\"%s\\\" of type %s on line %d.\\n\", t.token, t.type, t.lineNum);\n System.exit(0);\n } //if not void, error\n\n CScanner.needToUsePeekedToken = false; //we have consumed the token\n t = CScanner.getNextToken(f);\n if(observer != null){\n observer.parser.setCurrentToken(t);\n }\n \n if (!t.token.equals(\"main\")) {\n System.err.format(\"Syntax Error: In rule MainDeclaration unexpected token \\\"%s\\\" of type %s on line %d.\\n\", t.token, t.type, t.lineNum);\n System.exit(0);\n }\n\n t = CScanner.getNextToken(f);\n if(observer != null){\n observer.parser.setCurrentToken(t);\n }\n \n if (!t.token.equals(\"(\")) {\n System.err.format(\"Syntax Error: In rule MainDeclaration unexpected token \\\"%s\\\" of type %s on line %d.\\n\", t.token, t.type, t.lineNum);\n System.exit(0);\n }\n\n t = CScanner.getNextToken(f);\n if(observer != null){\n observer.parser.setCurrentToken(t);\n }\n \n if (!t.token.equals(\")\")) {\n System.err.format(\"Syntax Error: In rule MainDeclaration unexpected token \\\"%s\\\" of type %s on line %d.\\n\", t.token, t.type, t.lineNum);\n System.exit(0);\n }\n\n if (!block(f)) {\n System.err.format(\"Syntax Error: In rule MainDeclaration unexpected token \\\"%s\\\" of type %s on line %d.\\n\", t.token, t.type, t.lineNum);\n System.exit(0);\n }\n if(observer != null){\n observer.parser.setCurrentRule(\"mainDeclaration\",false);\n }\n return true;\n }",
"@Test(timeout = 4000)\n public void test29() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(73);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"{\");\n Node node0 = simpleNode0.parent;\n simpleNode0.setIdentifier(\"{\");\n StringWriter stringWriter0 = new StringWriter(73);\n simpleNode0.dump(\"{nt@W\\bYpd9U=VG\", stringWriter0);\n simpleNode0.setIdentifier(\"NameList\");\n simpleNode0.setIdentifier(\"^eRGLNy;\");\n FileSystemHandling.shouldAllThrowIOExceptions();\n simpleNode0.setIdentifier(\"C\");\n StringReader stringReader0 = new StringReader(\"zp@:cn>UP\");\n simpleNode0.setIdentifier(\"AllocationExpression\");\n FileSystemHandling.shouldAllThrowIOExceptions();\n simpleNode0.setIdentifier(\"NameList\");\n SimpleNode simpleNode1 = new SimpleNode(68);\n Node[] nodeArray0 = new Node[0];\n simpleNode1.children = nodeArray0;\n Node[] nodeArray1 = new Node[1];\n nodeArray1[0] = null;\n simpleNode1.children = nodeArray1;\n simpleNode1.toString(\"LT\\\"PgE')tE0cI%&Dl\");\n simpleNode0.setIdentifier(\"AllocationExpression\");\n simpleNode1.dump(\"NameList\", stringWriter0);\n simpleNode0.toString();\n simpleNode0.toString(\">=\");\n simpleNode0.dump(\"<SkoVR *\", stringWriter0);\n assertEquals(\"<Block>\\n</Block>\\n<AllocationExpression></AllocationExpression>\\n<Block>\\n <identifier>NameList</identifier>\\n <identifier>^eRGLNy;</identifier>\\n <identifier>C</identifier>\\n <identifier>AllocationExpression</identifier>\\n <identifier>NameList</identifier>\\n <identifier>AllocationExpression</identifier>\\n</Block>\\n\", stringWriter0.toString());\n }",
"@Test\n public void jUnitTest03(){\n TigerLexer lex;\n try {\n lex = new TigerLexer(new ANTLRFileStream(\"test/jUnitTests/jUnitTest03.tig\", \"UTF8\"));\n CommonTokenStream tokens = new CommonTokenStream(lex);\n TigerParser parser = new TigerParser(tokens);\n SemantVisitor visitor = new SemantVisitor();\n parser.prog();\n boolean resp = (parser.getNumberOfSyntaxErrors() == 0 && visitor.getNumberOfSemanticErrors() == 0);\n assertTrue(resp);\n } catch (IOException ex) {\n Logger.getLogger(TesteGlobal.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Test\n public void jUnitTest07(){\n TigerLexer lex;\n try {\n lex = new TigerLexer(new ANTLRFileStream(\"test/jUnitTests/jUnitTest07.tig\", \"UTF8\"));\n CommonTokenStream tokens = new CommonTokenStream(lex);\n TigerParser parser = new TigerParser(tokens);\n SemantVisitor visitor = new SemantVisitor();\n parser.prog();\n boolean resp = (parser.getNumberOfSyntaxErrors() == 0 && visitor.getNumberOfSemanticErrors() == 0);\n assertTrue(resp);\n } catch (IOException ex) {\n Logger.getLogger(TesteGlobal.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"abstract protected UiElementNode getRootNode();",
"@Test\n public void jUnitTest04(){\n TigerLexer lex;\n try {\n lex = new TigerLexer(new ANTLRFileStream(\"test/jUnitTests/jUnitTest04.tig\", \"UTF8\"));\n CommonTokenStream tokens = new CommonTokenStream(lex);\n TigerParser parser = new TigerParser(tokens);\n SemantVisitor visitor = new SemantVisitor();\n parser.prog();\n boolean resp = (parser.getNumberOfSyntaxErrors() == 0 && visitor.getNumberOfSemanticErrors() == 0);\n assertTrue(resp);\n } catch (IOException ex) {\n Logger.getLogger(TesteGlobal.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public boolean isRealNode();",
"public boolean isRealNode();",
"@Test\n public void jUnitTest01(){\n TigerLexer lex;\n try {\n lex = new TigerLexer(new ANTLRFileStream(\"test/jUnitTests/jUnitTest01.tig\", \"UTF8\"));\n CommonTokenStream tokens = new CommonTokenStream(lex);\n TigerParser parser = new TigerParser(tokens);\n SemantVisitor visitor = new SemantVisitor();\n parser.prog();\n boolean resp = (parser.getNumberOfSyntaxErrors() == 0 && visitor.getNumberOfSemanticErrors() == 0);\n assertTrue(resp);\n } catch (IOException ex) {\n Logger.getLogger(TesteGlobal.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public boolean visit(SchemaBase node) {\n return true;\n }",
"public interface RootNode {\r\n}",
"public static boolean NodeTest(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"NodeTest\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_, NODE_TEST, \"<node test>\");\n r = KindTest(b, l + 1);\n if (!r) r = NameTest(b, l + 1);\n exit_section_(b, l, m, r, false, null);\n return r;\n }",
"@Test(timeout = 4000)\n public void test067() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"com.werken.saxpath.XPathLexer\");\n Token token0 = xPathLexer0.mod();\n assertNull(token0);\n }",
"@Test(timeout = 4000)\n public void test002() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"/a\");\n xPathLexer0.dollar();\n Token token0 = xPathLexer0.and();\n assertNull(token0);\n }",
"public static boolean declarationType(FileInputStream f){\n if(observer != null){\n observer.parser.setCurrentRule(\"declarationType\", true);\n }\n CToken t = new CToken();\n\n //DataType\n if(!dataType(f)){\n return false;\n }\n if(observer != null){\n observer.parser.setCurrentRule(\"declarationType\", true);\n }\n t = CScanner.getNextToken(f);\n if(observer != null){\n observer.parser.setCurrentToken(t);\n }\n //Identifier\n if (!t.type.equals(\"Identifier\")) {\n System.err.format(\"Syntax Error: In rule DeclarationType unexpected token \\\"%s\\\" of type %s on line %d.\\n\", t.token, t.type, t.lineNum);\n System.exit(0);\n }\n if(observer != null){\n observer.parser.setCurrentRule(\"declarationType\", false);\n }\n return true;\n }",
"@Test(timeout = 4000)\n public void test003() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"hN!SM~8ux(wB\");\n xPathLexer0.dollar();\n Token token0 = xPathLexer0.and();\n assertNull(token0);\n }",
"public void test1() {\n SAP sap = getSapFromFile(\".\\\\W6.WordNet\\\\WordNetTests\\\\TestData\\\\digraph1.txt\");\n assertEquals(\"\", 0, sap.length(3, 3));\n assertEquals(\"\", 3, sap.ancestor(3, 3));\n assertEquals(\"\", 1, sap.ancestor(11, 7));\n assertEquals(\"\", 5, sap.length(11, 7));\n \n Iterable<Integer> a1 = Arrays.asList(new Integer[]{2, 5});\n Iterable<Integer> a2 = Arrays.asList(new Integer[]{7, 7});\n assertEquals(\"\", 1, sap.ancestor(a1,a2));\n assertEquals(\"\", 3, sap.length(a1,a2));\n }",
"boolean isRoot(Position<E> p) throws IllegalArgumentException;",
"protected AST_Node() {\r\n\t}",
"@Test\n public void jUnitTest06(){\n TigerLexer lex;\n try {\n lex = new TigerLexer(new ANTLRFileStream(\"test/jUnitTests/jUnitTest06.tig\", \"UTF8\"));\n CommonTokenStream tokens = new CommonTokenStream(lex);\n TigerParser parser = new TigerParser(tokens);\n SemantVisitor visitor = new SemantVisitor();\n parser.prog();\n boolean resp = (parser.getNumberOfSyntaxErrors() == 0 && visitor.getNumberOfSemanticErrors() == 0);\n assertTrue(resp);\n } catch (IOException ex) {\n Logger.getLogger(TesteGlobal.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Test\n public void jUnitTest09(){\n TigerLexer lex;\n try {\n lex = new TigerLexer(new ANTLRFileStream(\"test/jUnitTests/jUnitTest09.tig\", \"UTF8\"));\n CommonTokenStream tokens = new CommonTokenStream(lex);\n TigerParser parser = new TigerParser(tokens);\n SemantVisitor visitor = new SemantVisitor();\n parser.prog();\n boolean resp = (parser.getNumberOfSyntaxErrors() == 0 && visitor.getNumberOfSemanticErrors() == 0);\n assertTrue(resp);\n } catch (IOException ex) {\n Logger.getLogger(TesteGlobal.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"static boolean FirstDecl(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"FirstDecl\")) return false;\n if (!nextTokenIs(b, \"\", K_DECLARE, K_IMPORT)) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = DefaultNamespaceDecl(b, l + 1);\n if (!r) r = Setter(b, l + 1);\n if (!r) r = NamespaceDecl(b, l + 1);\n if (!r) r = Import(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }",
"@Test(timeout = 4000)\n public void test025() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"d>%NV0\");\n boolean boolean0 = xPathLexer0.isIdentifierStartChar('A');\n assertTrue(boolean0);\n }",
"protected void checkRoot(){\n if (this.isEmpty() && this.root != null){\n this.root.setElement(null); //\n }\n }",
"@Override\n\tpublic boolean isRoot() {\n\t\treturn false;\n\t}",
"boolean isRoot()\n {\n return this.parent == null;\n }",
"@Test(timeout = 4000)\n public void test023() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"Z&9#+FDLX&o2GJ-\");\n boolean boolean0 = xPathLexer0.isIdentifierStartChar(']');\n assertFalse(boolean0);\n }",
"public boolean hasAstRoot() {\n return ((bitField0_ & 0x00000004) != 0);\n }",
"@Test\n public void testSetRoot() {\n AVLNode<Integer> instance = new AVLNode<> ( );\n Integer root = 7;\n instance.setRoot( new AVLNode<> ( root ) );\n assertEquals( instance.getRoot().getKey(), root );\n }",
"public static boolean definitionNode(@NotNull ASTNode node) {\n final PsiElement element = node.getPsi();\n return element instanceof PsiNamedElement && definitionNode((PsiNamedElement)element);\n }",
"public void printRoot()\r\n\t{\r\n\t\tSystem.out.println(\"Root is:\"+root.data);\r\n\t}"
] | [
"0.63489604",
"0.62658757",
"0.611871",
"0.60003644",
"0.58676076",
"0.58304435",
"0.5802004",
"0.5767723",
"0.57513034",
"0.5738997",
"0.5731783",
"0.5727531",
"0.56941676",
"0.5660233",
"0.5646456",
"0.5646306",
"0.56400955",
"0.56318027",
"0.56183344",
"0.56157094",
"0.5612202",
"0.5587825",
"0.557167",
"0.55716044",
"0.55585146",
"0.55484575",
"0.55346227",
"0.5507985",
"0.5487418",
"0.54870385",
"0.5485223",
"0.5482786",
"0.5476993",
"0.5467284",
"0.54580945",
"0.54438174",
"0.5433307",
"0.5422269",
"0.541221",
"0.5406044",
"0.54034203",
"0.5401061",
"0.54008245",
"0.5392897",
"0.53898984",
"0.53889996",
"0.53827256",
"0.53802246",
"0.537937",
"0.5367205",
"0.5360657",
"0.53575194",
"0.5353163",
"0.53491575",
"0.53275824",
"0.53188306",
"0.53128564",
"0.5307039",
"0.5302577",
"0.5300264",
"0.5280951",
"0.5280951",
"0.5279195",
"0.5268406",
"0.52639574",
"0.5260266",
"0.5257906",
"0.52524704",
"0.525168",
"0.5251503",
"0.5250311",
"0.52417475",
"0.52395916",
"0.52380306",
"0.52365845",
"0.52246463",
"0.52246463",
"0.5220672",
"0.5209668",
"0.52052057",
"0.5203754",
"0.51967925",
"0.5196607",
"0.51938444",
"0.5193796",
"0.51909816",
"0.51815504",
"0.5180521",
"0.51788366",
"0.5169282",
"0.51676935",
"0.51662606",
"0.51657325",
"0.51634556",
"0.5156987",
"0.51541024",
"0.5153546",
"0.5153261",
"0.51520896",
"0.51501435"
] | 0.64957273 | 0 |
test InfixExpression root node | @Test
public void testInfix(){
Operator plus = new Operator("+");
Expression one = f.createNumNode(1);
Expression two = f.createNumNode(2);
Expression exp = f.createInfixNode(plus, one, two);
assertEquals(exp.textRepresentation(), "1 + 2");
ASTNodeCountVisitor v = new ASTNodeCountVisitor();
exp.accept(v);
assertEquals("Infix test1 fail", v.numCount, 2);
assertEquals("Infix test2 fail", v.infixCount, 1);
assertEquals("Infix test3 fail", v.decCount, 0);
assertEquals("Infix test4 fail", v.seqCount, 0);
assertEquals("Infix test5 fail", v.assignCount, 0);
assertEquals("Infix test6 fail", v.varCount, 0);
assertEquals("Infix test7 fail", v.strCount, 0);
assertEquals("Infix test8 fail", v.prefixCount, 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private InfixExpression getNode()\n{\n return (InfixExpression) ast_node;\n}",
"@Test\n\t\tpublic void testExpression() throws LexicalException, SyntaxException {\n\t\t\tString input = \"x + 2\";\n\t\t\tPLPParser parser = makeParser(input);\n\t\t\tExpression e = parser.expression(); //call expression here instead of parse\n\t\t\tshow(e);\t\n\t\t\tassertEquals(ExpressionBinary.class, e.getClass());\n\t\t\tExpressionBinary b = (ExpressionBinary)e;\n\t\t\tassertEquals(ExpressionIdentifier.class, b.leftExpression.getClass());//\n\t\t\tExpressionIdentifier left = (ExpressionIdentifier)b.leftExpression;\n\t\t\tassertEquals(\"x\", left.name);\n\t\t\tassertEquals(ExpressionIntegerLiteral.class, b.rightExpression.getClass());\n\t\t\tExpressionIntegerLiteral right = (ExpressionIntegerLiteral)b.rightExpression;\n\t\t\tassertEquals(2, right.value);\n\t\t\tassertEquals(OP_PLUS, b.op);\n\t\t}",
"private void infix(ExpressionNodes root, StringBuilder sb)\n\t {\t\n\t \t\n\t \tif (root.left != null) // if there is a left child\n\t \t{ \n\t \t\tinfix(root.left, sb); // run recursive method \n\t \t}\n\t \t\n\t \t// add the string of this node to the the string builder \n\t \tsb.append(root.data);\n\t \t\n\t \t// add a space in between nodes for clarity.\n\t \tsb.append(\" \");\n\t \t\n\t \t\n\t \tif (root.right != null) // if there is a right child\n\t \t{ \n\t \t\tinfix(root.right, sb); // run recursive method \n\t \t}\n\t \t\n\t }",
"@Override\n\t\t\tpublic boolean visit(InfixExpression node) {\n\t\t\t\tif (node.getOperator().equals(InfixExpression.Operator.EQUALS)\n\t\t\t\t\t\t|| node.getOperator().equals(\n\t\t\t\t\t\t\t\tInfixExpression.Operator.NOT_EQUALS)) {\n\t\t\t\t\tif ( !(node.getLeftOperand() instanceof NullLiteral || node\n\t\t\t\t\t\t\t.getRightOperand() instanceof NullLiteral)\n\t\t\t\t\t\t\t&& node.getLeftOperand().resolveTypeBinding()\n\t\t\t\t\t\t\t\t\t.getQualifiedName().equals(\"java.lang.String\")) {\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * callEquals is created to write a new equals method\n\t\t\t\t\t\t * invocation\n\t\t\t\t\t\t */\n\t\t\t\t\t\tMethodInvocation callEquals = ast.newMethodInvocation();\n\t\t\t\t\t\tcallEquals.setName(ast.newSimpleName(\"equals\"));\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * expression which will invoke the equals method is\n\t\t\t\t\t\t * created from left hand expression of == comparison\n\t\t\t\t\t\t */\n\t\t\t\t\t\tExpression leftOperand = node.getLeftOperand();\n\t\t\t\t\t\tExpression newExpression = (Expression) ASTNode.copySubtree(\n\t\t\t\t\t\t\t\tast, leftOperand);\n\t\t\t\t\t\tcallEquals.setExpression(newExpression);\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * argument of equals method invocation is created from\n\t\t\t\t\t\t * right hand expression of == comparison\n\t\t\t\t\t\t */\n\t\t\t\t\t\tExpression rightOperand = node.getRightOperand();\n\t\t\t\t\t\tExpression argument = (Expression) ASTNode.copySubtree(ast,\n\t\t\t\t\t\t\t\trightOperand);\n\t\t\t\t\t\tcallEquals.arguments().add(argument);\n\n\t\t\t\t\t\t// callEquals.setExpression(ast.newSimpleName(node\n\t\t\t\t\t\t// .getLeftOperand().toString()));\n\n\t\t\t\t\t\t// StringLiteral sl1 = ast.newStringLiteral(); String\n\t\t\t\t\t\t// propname = node.getLeftOperand()\n\t\t\t\t\t\t// .resolveConstantExpressionValue().toString();\n\t\t\t\t\t\t// sl1.setLiteralValue(propname);\n\n\t\t\t\t\t\t// TextElement newTextElement = ast.newTextElement();\n\t\t\t\t\t\t// newTextElement\n\t\t\t\t\t\t// .setText(oldMethodInvocation.toString());\n\t\t\t\t\t\t// rew.replace(node, newTextElement, null);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (node.getOperator().equals(\n\t\t\t\t\t\t\t\tInfixExpression.Operator.NOT_EQUALS)) {\n\t\t\t\t\t\t\tPrefixExpression newPrefixExpression = ast\n\t\t\t\t\t\t\t\t\t.newPrefixExpression();\n\t\t\t\t\t\t\tnewPrefixExpression.setOperator(Operator.NOT);\n\t\t\t\t\t\t\tnewPrefixExpression.setOperand(callEquals);\n\n\t\t\t\t\t\t\trew.replace(node, newPrefixExpression, null);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\trew.replace(node, callEquals, null);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}",
"public void parseExpression() {\n String regex = \"[ ]\";\n //\"?<=[-+*/()ep])|(?=[-+*/()ei]\";\n String[] splitString = infix.split(regex);\n infixList.addAll(Arrays.asList(splitString));\n }",
"@Test\n public void defaultOperatorsEvaluteTrueTest() throws Exception {\n\n assertThat(getNode(\"1 == 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 != 2\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 <> 2\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 < 2\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"2 > 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 >= 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"2 >= 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 <= 2\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 <= 1\", \"expr\").render(null), is((Object)true));\n\n // negative numbers\n assertThat(getNode(\"1 > -1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"-1 < 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1.0 > -1.0\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"-1.0 < 1.0\", \"expr\").render(null), is((Object)true));\n }",
"public String getExpression() {\r\n return tree.infixExpression();\r\n }",
"@Test\n\tpublic void expression1() throws SyntaxException, LexicalException {\n\t\tString input = \"2\";\n\t\tshow(input);\n\t\tScanner scanner = new Scanner(input).scan();\n\t\tshow(scanner);\n\t\tSimpleParser parser = new SimpleParser(scanner);\n\t\tparser.expression(); // Call expression directly.\n\t}",
"private int eval(ExpressionNodes root)\n\t {\n\t \tif (root.right == null && root.left == null) \n\t \t{\n\t \t\t\tint leaf = Integer.parseInt(root.data);\n\t \t\t\treturn leaf; \n\t \t}\n\t \t\n\t \t// if the node is an operator // \n\t \telse \n\t \t{\n\t \t\t\tint op1 = eval(root.left); \n\t \t\t\tint op2 = eval(root.right);\n\t \n\t \t\n\t\t\t \tString operator = root.data; // initialize operator string \n\t\t\t \tint n = 0; // initialize the integer that will be returned \n\t\t\t \t\n\t\t\t \t// switch case to conduct for the different operators \n\t\t\t \tswitch(operator) \n\t\t\t \t{\n\t\t\t\t case \"+\":\n\t\t\t\t \tn = op1 + op2; \n\t\t\t\t \tbreak;\n\t\t\t\t \t\n\t\t\t\t case \"-\":\n\t\t\t\t n = op1 - op2; \n\t\t\t\t break;\n\t\t\t\t \n\t\t\t\t case \"*\":\n\t\t\t\t n = op1 * op2; \n\t\t\t\t break;\n\t\t\t\t \n\t\t\t\t case \"/\":\n\t\t\t\t n = op1 / op2; \n\t\t\t\t break;\n\t\t\t \t}\n\t\t\t \t\n\t\t\t \treturn n; \n\t \t}\n\t\t\t\n\t }",
"private static String infixToPostfix(String expression)\r\n {\r\n String result = \"\";\r\n char current_char = ' ';\r\n int index = 0;\r\n StackInterface<Character> operand_stack = new ArrayStack<>();\r\n switch(stack_type)\r\n {\r\n case(\"vector\"):\r\n operand_stack = new VectorStack<>();\r\n break;\r\n \r\n case(\"linked\"):\r\n operand_stack = new LinkedListStack<>();\r\n break;\r\n }\r\n\r\n //iterates through every character and puts them in the stack or the result accordingly\r\n while(index < expression.length())\r\n {\r\n current_char = expression.charAt(index);\r\n switch(current_char)\r\n {\r\n //checks if the character is an operand and if so checks if it should pop the previous input or not\r\n case '+': case '-': case '*': case '/':\r\n if(!operand_stack.isEmpty())\r\n {\r\n while(!operand_stack.isEmpty() && getOperandImportance(current_char) <= getOperandImportance(operand_stack.peek()))\r\n {\r\n result += operand_stack.pop();\r\n }\r\n operand_stack.push(current_char);\r\n }\r\n else\r\n {\r\n operand_stack.push(current_char);\r\n }\r\n break;\r\n\r\n //exponents are always pushed onto the stack\r\n case '^':\r\n operand_stack.push(current_char);\r\n break;\r\n\r\n //if an open delimiter is there, we add it to the stack\r\n case '(': case '{': case '[':\r\n operand_stack.push(current_char);\r\n break;\r\n \r\n //if the delimiter is closing we pop until we find the open equivalent\r\n case ')': case '}': case ']':\r\n while(operand_stack.peek() != delimiterEquivalent(current_char))\r\n {\r\n result += operand_stack.pop();\r\n }\r\n operand_stack.pop();\r\n break;\r\n\r\n case ' ':\r\n break;\r\n\r\n default: \r\n result += current_char;\r\n break;\r\n }\r\n index++;\r\n }\r\n\r\n //pops everything left in the stack to the result at the end\r\n while(!operand_stack.isEmpty())\r\n {\r\n result += operand_stack.pop();\r\n }\r\n\r\n return result;\r\n }",
"public String parsePrefixToPostfix(String exp) throws SyntaxError {\n \tif (exp.length() == 0) {\n \t\tthrow new SyntaxError(\"No expression has been entered.\");\n \t}\n //parser accepts user input into exp\n \tScanner parser = new Scanner(exp);\n int element;\n String operator;\n String entity;\n String postfixExpression = \"\"; \n String firstOperand, secondOperand;\n int result = 0;\n \n //tokenize prefix string and set up 2 stacks\n Stack<String> operandStack = new Stack<String>();\n Stack<String> reverseOperatorStack = new Stack<String>();\n //while statement to push onto the reversal stack if there are more tokens\n while (parser.hasNext()) {\n entity = parser.next();\n // unless there is a space\n if (!entity.equals(\" \"))\n reverseOperatorStack.push(entity);\n }\n try { \n \t// while statement to pop to reversal stack if it is not empty\n \twhile (!reverseOperatorStack.isEmpty()) {\n //peek to retrieve the token at the top of the stack\n \t\tentity = reverseOperatorStack.peek();\n \t\t//pop to take the token off the stack\n\t reverseOperatorStack.pop();\n\t \n\t // if it is an operand\n\t if (Character.isDigit(entity.charAt(0))) {\n\t \t//push token onto the operand stack\n\t \toperandStack.push(entity);\n\t }\n\t // if it is an operator\n\t else if (entity.equals(\"/\") || entity.equals(\"*\") \n\t \t\t|| entity.equals(\"+\") || entity.equals(\"-\")) {\n\t \t//retrieve, then pop first operand off the stack\n\t \tfirstOperand = operandStack.peek();\n\t operandStack.pop();\n\t //retrieve, then pop second operand off the stack\n\t secondOperand = operandStack.peek();\n\t operandStack.pop();\n\t // formats miniExpression String with the 2 operands followed by the operator \n\t String miniExpression = firstOperand + \" \" + secondOperand + \" \" + entity;\n\t //push the string onto the operand stack\n\t operandStack.push(miniExpression);\n\t }\n \t}\n \t //throws error if there is an incorrect entry improperly formatted \t\n } catch (Exception e) {\n throw new SyntaxError(\"You have entered an improper expression. Check your input.\");\n }\n //retrieve, then pop the postfix expression off the stack\n postfixExpression = operandStack.peek();\n operandStack.pop();\n //return postfix - holding the converted expression\n return postfixExpression; \n }",
"public static String infixToPostfix(String infix) throws PostFixException{\n\t\t//Create a new stack object to hold operators from infix expression\n\t\tStack<String> operatorStack = new Stack<String>();\n\t\tString postfix = \"\";\n\t\tString curToken = \"\";\n\t\tScanner getToken = new Scanner(infix);\n\t\t//holds the previous token type as a string\n\t\tString previousTokenType = \"first token\";\n\t\t\n\t\t//Iterate over all tokens in expression\n\t\twhile(getToken.hasNext()){\n\t\t\tcurToken = getToken.next();\n\t\t\t\n\t\t\t//if the token is an operand (meaning it is an integer), add to postfix expression\n\t\t\tif(isPositiveInteger(curToken)){\n\t\t\t\t//if the token sequence is valid, add the current token to the psotfix expression\n\t\t\t\tif(checkValidTokenSequence(\"operand\", previousTokenType)){\n\t\t\t\t\tpostfix += (curToken + \" \");\n\t\t\t\t\tpreviousTokenType = \"operand\";\n\t\t\t\t}\n\t\t\t\telse{ //otherwise throw an exception\n\t\t\t\t\tthrow new PostFixException(\"Invalid token sequence\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t//if the current token is a left bracket check that the token sequence is valid and push the\n\t\t\t//token on the stack\n\t\t\telse if(curToken.equals(\"(\")){\n\t\t\t\tif(checkValidTokenSequence(\"left bracket\", previousTokenType)){\n\t\t\t\t\toperatorStack.push(curToken);\n\t\t\t\t\tpreviousTokenType = \"left bracket\";\n\t\t\t\t}\n\t\t\t\telse{//if the token sequence is invalid throw and exception\n\t\t\t\t\tthrow new PostFixException(\"Invalid token sequence\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t//if the token is an operator, check sequence validity\n\t\t\telse if(curToken.equals(\"+\")||curToken.equals(\"-\")||curToken.equals(\"*\")||curToken.equals(\"/\")){\n\t\t\t\t//if the token is an operator and it is the first token, the expression is invalid\n\t\t\t\tif(previousTokenType.equals(\"first token\")){\n\t\t\t\t\tthrow new PostFixException(\"Invalid operator placement\");\n\t\t\t\t}\n\t\t\t\t//if the token sequence is valid, add all operator on stack with lower or equal precedence to\n\t\t\t\t//to the prefix expression\n\t\t\t\tif(checkValidTokenSequence(\"operator\", previousTokenType)){\n\t\t\t\t\twhile(!operatorStack.empty() && checkPrecedence(operatorStack.peek(),curToken)){\n\t\t\t\t\t\tpostfix += (operatorStack.pop() + \" \");\n\t\t\t\t\t}\n\t\t\t\t\t//push the current token on the operator stack\n\t\t\t\t\toperatorStack.push(curToken);\n\t\t\t\t\tpreviousTokenType = \"operator\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//if the token sequence is invalid, throw exception\n\t\t\t\t\tthrow new PostFixException(\"Invalid token sequence\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//if the token is a right bracket, check that token sequence is valid\n\t\t\telse if(curToken.equals(\")\")){\n\t\t\t\t\n\t\t\t\t//if the token sequence is valid, add all operators on operator stack \n\t\t\t\t//to the prefix expression until the matching left bracket is reached\n\t\t\t\tif(checkValidTokenSequence(\"right bracket\", previousTokenType)){\n\t\t\t\t\tboolean hasMatchingBracket = false;\n\t\t\t\t\t\n\t\t\t\t\twhile(!operatorStack.empty()){\n\t\t\t\t\t\tif(!operatorStack.peek().equals(\"(\")){\n\t\t\t\t\t\t\tpostfix += (operatorStack.pop() + \" \");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\toperatorStack.pop();\n\t\t\t\t\t\t\thasMatchingBracket = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//If the right bracket does not have a matching left bracket, throw an exception\n\t\t\t\t\tif(!hasMatchingBracket){\n\t\t\t\t\t\tthrow new PostFixException(\"Missing left bracket\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tpreviousTokenType = \"right bracket\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//If the token sequence is invalid throw an exception\n\t\t\t\telse{\n\t\t\t\t\tthrow new PostFixException(\"Invalid token sequence\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t//if the current token is not a valid token, throw an exception\n\t\t\telse{\n\t\t\t\tthrow new PostFixException(\"Invalid token: \" + curToken);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Check to see if the last token was an operator, if so throw an exception\n\t\tif(curToken.equals(\"+\")||curToken.equals(\"-\")||curToken.equals(\"*\")||curToken.equals(\"/\")){\n\t\t\tthrow new PostFixException(\"Invalid operator placement\");\n\t\t}\n\t\t\n\t\t//while there operator stack is not empty, pop whatever is in the stack and append\n\t\twhile(!operatorStack.empty()){\n\t\t\t//if there is a bracket left in the stack, then the infix expression is invalid\n\t\t\tif(operatorStack.peek().equals(\"(\") || operatorStack.peek().equals(\")\")){\n\t\t\t\tthrow new PostFixException(\"Bracket mismatch\");\n\t\t\t}\n\t\t\t\tpostfix += (operatorStack.pop() + \" \");\n\t\t}\n\t\t\n\t\tgetToken.close();\n\t\t\n\t\t//return the postfix expression\n\t\treturn postfix;\n\t}",
"int parseExpression() {\r\n\t\t\t\tint x = parseTerm();\r\n\t\t\t\tfor (;;) {\r\n\t\t\t\t\tif (eat('+'))\r\n\t\t\t\t\t\tx += parseTerm(); // addition\r\n\t\t\t\t\telse if (eat('-'))\r\n\t\t\t\t\t\tx -= parseTerm(); // subtraction\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn x;\r\n\t\t\t\t}\r\n\t\t\t}",
"public String infix()\n\t {\n\t \t// create an empty string builder // \n\t \tStringBuilder sb = new StringBuilder();\n\t \t\n\t \t// fill the string builder//\n\t \tinfix(root, sb);\n\t \t\n\t \treturn sb.toString().trim();\n\t }",
"public int eval(String expression) {\n String token;\n // The 3rd argument is true to indicate that the delimiters should be used\n // as tokens, too. \n this.tokenizer = new StringTokenizer(expression, DELIMITERS, true);\n\n //initialized with # operator, used as bogus to compare priorities and detect end of operatorStack.\n operatorStack.push(new PoundOperator());\n\n //Checks whether there are more tokens to be pushed in stacks\n while (this.tokenizer.hasMoreTokens()) {\n // filter out spaces\n if (!(token = this.tokenizer.nextToken()).equals(\" \")) {\n // check if token is an operand\n if (Operand.check(token)) {\n operandStack.push(new Operand(token));\n\n } else {\n if (!Operator.check(token)) {\n System.out.println(\"*****invalid token******\");\n System.exit(1);\n }\n\n //Gets a newOperator it matches from hashmap.\n Operator newOperator = Operator.getToken(token);\n\n //Processes only, when there is greater priority in stack and there are no '('\n while (operatorStack.peek().priority() >= newOperator.priority() && !newOperator.equals(Operator.getToken(\"(\"))) {\n\n //If the token read is ), then there is already '(' which is inserted in the operator stack.\n if (token.equals(\")\")) {\n //Perform until, the '(' is on top of the stack.\n while (!operatorStack.peek().equals(Operator.getToken(\"(\"))) {\n Operator oldOpr = operatorStack.pop();\n Operand op2 = operandStack.pop();\n Operand op1 = operandStack.pop();\n operandStack.push(oldOpr.execute(op1, op2));\n\n }\n\n //If '(' found on top, pop and break, to continue to read more takens\n if (operatorStack.peek().equals(Operator.getToken(\"(\"))) {\n operatorStack.pop();\n break;\n }\n\n } \n //if ')' not found, it means either its in '(' or there are no parenthesis\n else {\n Operator oldOpr = operatorStack.pop();\n Operand op2 = operandStack.pop();\n Operand op1 = operandStack.pop();\n operandStack.push(oldOpr.execute(op1, op2));\n }\n }\n //Pushes the operator, when the operator!=')'\n if (!newOperator.equals(Operator.getToken(\")\"))) {\n operatorStack.push(newOperator);\n }\n }\n }\n }\n // No more tokens to be read. All the tokens are in stacks, gets processed.\n if (!this.tokenizer.hasMoreTokens()) {\n //Keeps processing, until it reaches #\n while (operatorStack.size() != 1) {\n Operator oldOpr = operatorStack.pop();\n //Checks if there are operand left to be used,\n if (!operandStack.empty()) {\n Operand op2 = operandStack.pop();\n Operand op1 = operandStack.pop();\n operandStack.push(oldOpr.execute(op1, op2));\n } else {\n System.exit(1);\n }\n }\n }\n // Returns, the final result\n return operandStack.pop().getValue();\n }",
"protected Evaluable parseExpression() throws ParsingException {\n Evaluable sub = parseSubExpression();\n\n while (_token != null &&\n _token.type == TokenType.Operator &&\n \">=<==!=\".indexOf(_token.text) >= 0) {\n\n String op = _token.text;\n\n next(true);\n\n Evaluable sub2 = parseSubExpression();\n\n sub = new OperatorCallExpr(new Evaluable[] { sub, sub2 }, op);\n }\n\n return sub;\n }",
"@Override public void enterCompop(MicroParser.CompopContext ctx) {\n//\t\tSystem.out.println(\"Enter compop: \" + infixS);\n//\t\tSystem.out.println(ctx.getText());\n\n\t\tString lhs = infixS.get(0); //WILL NOT WORK WITH EXPRESSIONS\n\n\t\t//Determine the type of var on LHS\n\t\ttry{\n\t\t\tif(Integer.valueOf(lhs) instanceof Integer){\n\t\t\t\tIRNode.tempCnt++;\n\t\t\t\tthis.meIRL.add(new IRNode(\"STOREI\", lhs, \"\", \"$T\" + IRNode.tempCnt));\n\t\t\t\tlhsType = \"INT\";\n\t\t\t}\n\t\t}\n\t\tcatch (Exception err1){\n\t\t\ttry{\n\t\t\t\tif(Float.valueOf(lhs) instanceof Float){\n\t\t\t\t\tIRNode.tempCnt++;\n\t\t\t\t\tthis.meIRL.add(new IRNode(\"STOREF\", lhs, \"\", \"$T\" + IRNode.tempCnt));\n\t\t\t\t\tlhsType = \"FLOAT\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception err2){\n\t\t\t\t\tString type = \"\";\n\t\t\t\t\tArrayList<List<String>> varList = st.varMap.get(\"GLOBAL\");\n\t\t\t\t if(varList != null){\n\t\t\t\t for(List<String> varData : varList){\n\t\t\t\t \tif(varData.get(0).equals(lhs)){\n\t\t\t\t \t\ttype = varData.get(1);\n\t\t\t\t \t}\n\t\t\t\t }\n\t\t\t\t }\n\n\t\t\t\t\tShuntingYard sy = new ShuntingYard();\n\t\t\t\t\tString postfixS = sy.infixToPostfix(infixS);\n\n\t\t\t\t\t//Tests Postfix Tree\n\t\t\t\t\tPostfixTree pfTree = new PostfixTree();\n\t\t\t\t\tPostfixTreeNode root = pfTree.createTree(postfixS);\n\n\t\t\t\t\t//adds tree to IRList\n\t\t\t\t\troot.toIRList(root, this.meIRL, type);\n\t\t\t\t\tif(type.compareTo(\"FLOAT\") == 0){\n\t\t\t\t \t\tthis.meIRL.add(new IRNode(\"STOREF\", lhs, \"\", \"$T\"+ IRNode.tempCnt));\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.meIRL.add(new IRNode(\"STOREI\", lhs, \"\", \"$T\"+ IRNode.tempCnt));\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t \tlhsType = type;\n\t\t\t\t \tlhsTemp = IRNode.tempCnt;\n\t\t\t}\n\t\t}\n\n\t}",
"public static int evaluateExpression(String expression) {\r\n // Create operandStack of ints to store operands\r\n Stack<Integer> operandStack = new Stack<>();\r\n \r\n // Create operatorStack of characters to store operators\r\n Stack<Character> operatorStack = new Stack<>();\r\n \r\n // Insert Blanks\r\n expression = insertBlanks(expression);\r\n \r\n // Extract operands and operators by splitting around blanks\r\n String[] tokens = expression.split(\" \");\r\n \r\n /* Phase 1: Scan tokens\r\n Enhanced for loop, puts every element of tokens in token each time\r\n Like writing token = tokens[i] every time\r\n */\r\n for (String token: tokens) { \r\n if(token.length() == 0) // It's a blank\r\n continue; // Go to the while loop\r\n else if (token.charAt(0) == '+' || token.charAt(0) == '-') {\r\n // process all +, -, *, / in the top of the operator stack\r\n while (!operatorStack.isEmpty() && // While stack isn't empty\r\n (operatorStack.peek() == '+' || // and has an operator on top\r\n operatorStack.peek() == '-' || // Like if you had (2 * 3) + 5 \r\n operatorStack.peek() == '*' || // Or if you had (2 - 3) + 5, do that last no matter what b/c +- is lowest priority\r\n operatorStack.peek() == '/' ||\r\n operatorStack.peek() == '^')) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n // After processing the all the previous operations, push the +- operator onto the stack\r\n operatorStack.push(token.charAt(0));\r\n }\r\n else if (token.charAt(0) == '*' || token.charAt(0) == '/') {\r\n // Proess all *, / in the top of the operator stack\r\n while(!operatorStack.isEmpty() &&\r\n (operatorStack.peek() == '*' ||\r\n operatorStack.peek() == '/' ||\r\n operatorStack.peek() == '^')) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n //Push the * or / onto the stack\r\n operatorStack.push(token.charAt(0));\r\n }\r\n else if (token.charAt(0) == '^') {\r\n // Proess all ^ in the top of the operator stack\r\n while(!operatorStack.isEmpty() &&\r\n (operatorStack.peek() == '^')) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n //Push the ^ onto the stack\r\n operatorStack.push(token.charAt(0));\r\n }\r\n else if(token.trim().charAt(0) == '(') {\r\n operatorStack.push('(');\r\n } \r\n else if(token.trim().charAt(0) == ')') {\r\n while(operatorStack.peek() != '(') {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n operatorStack.pop(); // pop\r\n }\r\n else {\r\n operandStack.push(new Integer(token));\r\n }\r\n }\r\n // Phase two: process everything left over\r\n while (!operatorStack.isEmpty()) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n return operandStack.pop(); \r\n }",
"@Test(timeout = 4000)\n public void test075() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\") (\");\n Token token0 = xPathLexer0.equals();\n xPathLexer0.setPreviousToken(token0);\n assertEquals(21, token0.getTokenType());\n assertEquals(\")\", token0.getTokenText());\n \n Token token1 = xPathLexer0.identifierOrOperatorName();\n assertEquals(15, token1.getTokenType());\n assertEquals(\"\", token1.getTokenText());\n }",
"public static void parseLine(String input){\r\n\t\tfor(int i = 0;i<input.length();i++){\r\n\t\t\t\r\n\t\t\tString currentChar = parseChar(input,i);\r\n\t\t\ti+=currentChar.length()-1; //skip past all integer characters if there are any\r\n\t\t\t\r\n\t\t\tif(checkOperand(currentChar)){\r\n\t\t\t\texpressionTree.treeStack.push(new Node(currentChar));\r\n\t\t\t}else if(checkOperator(currentChar)){\r\n\t\t\t\tNode node = new Node(currentChar);\r\n\t\t\t\t\r\n\t\t\t\tif(!expressionTree.treeStack.empty()){\r\n\t\t\t\t\tnode.rightNode = (Node) expressionTree.treeStack.peek();\r\n\t\t\t\t\tnode.rightNode.parentNode = node;\r\n\t\t\t\t\texpressionTree.treeStack.pop();\r\n\t\t\t\t}\r\n\t\t\t\tif(!expressionTree.treeStack.empty()){\r\n\t\t\t\t\tnode.leftNode = (Node) expressionTree.treeStack.peek();\r\n\t\t\t\t\tnode.leftNode.parentNode = node;\r\n\t\t\t\t\texpressionTree.treeStack.pop();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\texpressionTree.treeStack.push(node);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic boolean visit(QualifiedName node) {\r\n\t\toperand(node,node.getFullyQualifiedName());\r\n\t\treturn false;\r\n\t}",
"public Node getExpression() {\r\n return expression;\r\n }",
"@Test\r\n\t\tpublic void testParseOperator() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tdriver.findElement(By.id(\"code_code\")).sendKeys(\"a = 5\\nb = 6\\nc = a + (b * 4)\");;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tWebElement submitButton = driver.findElement(By.xpath(\"(//input[@name='commit'])[2]\"));\r\n\t\t\tsubmitButton.click();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tWebElement e = driver.findElement(By.tagName(\"code\"));\r\n\t\t\t\tString elementText = e.getText();\r\n\t\t\t\tassertTrue(elementText.contains(\"*\"));\r\n\t\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\t\tfail();\r\n\t\t\t}\r\n\t\t}",
"public void expression(Node n_parent) {\r\n if(token.get(lookAheadPossition).contains(\"ident(\")||token.get(lookAheadPossition).contains(\"num(\")||token.get(lookAheadPossition).contains(\"boollit(\")||token.get(lookAheadPossition).equals(\"LP\")){\r\n System.out.println(\":: expression::if- \"+n_parent.getData());\r\n\r\n Node makeown = new Node (\"makeown\");\r\n Node n_factor = this.simpleExpression(makeown);\r\n\r\n //compNode = expressionNode.addChild(\"Compare\");\r\n //Node n_connect =\r\n this.restExpression(n_parent,n_factor);\r\n //n_parent.setNodeChild(n_connect);\r\n }\r\n }",
"public UnaryExpNode() {\n }",
"@Test(timeout = 4000)\n public void test135() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"d>%NV0\");\n Token token0 = xPathLexer0.leftParen();\n assertEquals(\"d\", token0.getTokenText());\n assertEquals(1, token0.getTokenType());\n \n Token token1 = xPathLexer0.nextToken();\n assertEquals(\">\", token1.getTokenText());\n assertEquals(9, token1.getTokenType());\n \n Token token2 = xPathLexer0.identifierOrOperatorName();\n assertEquals(15, token2.getTokenType());\n assertEquals(\"\", token2.getTokenText());\n }",
"@Test(timeout = 4000)\n public void test004() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"d>%NV0\");\n Token token0 = xPathLexer0.operatorName();\n assertNull(token0);\n }",
"@Test(timeout = 4000)\n public void test068() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"Y44o{5$K\");\n xPathLexer0.leftParen();\n xPathLexer0.nextToken();\n Token token0 = xPathLexer0.operatorName();\n assertNull(token0);\n }",
"@Override\n public TreeNode parse() {\n TreeNode first = ArithmeticSubexpression.getAdditive(environment).parse();\n if (first == null) return null;\n\n // Try to parse something starting with an operator.\n List<Wrapper> wrappers = RightSideSubexpression.createKleene(\n environment, ArithmeticSubexpression.getAdditive(environment),\n BemTeVicTokenType.EQUAL, BemTeVicTokenType.DIFFERENT,\n BemTeVicTokenType.GREATER_OR_EQUALS, BemTeVicTokenType.GREATER_THAN,\n BemTeVicTokenType.LESS_OR_EQUALS, BemTeVicTokenType.LESS_THAN\n ).parse();\n\n // If did not found anything starting with an operator, return the first node.\n if (wrappers.isEmpty()) return first;\n\n // Constructs a binary operator node containing the expression.\n Iterator<Wrapper> it = wrappers.iterator();\n Wrapper secondWrapper = it.next();\n BinaryOperatorNode second = new BinaryOperatorNode(secondWrapper.getTokenType(), first, secondWrapper.getOutput());\n\n if (wrappers.size() == 1) return second;\n\n // If we reach this far, the expression has more than one operator. i.e. (x = y = z),\n // which is a shortcut for (x = y AND y = z).\n\n // Firstly, determine if the operators are compatible.\n RelationalOperatorSide side = RelationalOperatorSide.NONE;\n for (Wrapper w : wrappers) {\n side = side.next(w.getTokenType());\n }\n if (side.isMixed()) {\n environment.emitError(\"XXX\");\n }\n\n // Creates the other nodes. In the expression (a = b = c = d), The \"a = b\"\n // is in the \"second\" node. Creates \"b = c\", and \"c = d\" nodes.\n List<BinaryOperatorNode> nodes = new LinkedList<BinaryOperatorNode>();\n nodes.add(second);\n\n TreeNode prev = secondWrapper.getOutput();\n while (it.hasNext()) {\n Wrapper w = it.next();\n BinaryOperatorNode current = new BinaryOperatorNode(w.getTokenType(), prev, w.getOutput());\n prev = w.getOutput();\n nodes.add(current);\n }\n\n // Combines all of the nodes in a single one using AND.\n return new VariableArityOperatorNode(BemTeVicTokenType.AND, nodes);\n }",
"XExpression getExpression();",
"@Test(timeout = 4000)\n public void test001() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"hN!SM~8ux(wB\");\n xPathLexer0.dollar();\n xPathLexer0.not();\n xPathLexer0.nextToken();\n xPathLexer0.leftParen();\n xPathLexer0.whitespace();\n xPathLexer0.plus();\n Token token0 = xPathLexer0.or();\n assertNull(token0);\n }",
"@Test(timeout = 4000)\n public void test059() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"<= \");\n Token token0 = xPathLexer0.relationalOperator();\n assertEquals(8, token0.getTokenType());\n assertNotNull(token0);\n assertEquals(\"<=\", token0.getTokenText());\n }",
"private static void startUp() throws InvalidExpression\r\n {\r\n getExpression();\r\n\r\n boolean valid_expression = checkBalance(infix_expression);\r\n checkValidity(valid_expression);\r\n }",
"@Test\n\tpublic void testExpression() throws ParseException {\n\t\tExpression expression = langParser(\"a\").expression();\n\t\tassertEquals(expression.getClass(), Identifier.class);\n\t\texpression = langParser(\"a()\").expression();\n\t\tassertEquals(expression.getClass(), FunctionCall.class);\n\t\texpression = langParser(\"a.b\").expression();\n\t\tassertEquals(expression.getClass(), MemberAccess.class);\n\t\texpression = langParser(\"1\").expression();\n\t\tassertEquals(expression.getClass(), LongLiteral.class);\n\t\texpression = langParser(\"1.1\").expression();\n\t\tassertEquals(expression.getClass(), DoubleLiteral.class);\n\t\texpression = langParser(\"if(a,b,c)\").expression();\n\t\tassertEquals(expression.getClass(), TernaryIf.class);\n\t}",
"private TreeNode exprTreeHelper(String expr) {\n if (expr.charAt(0) != '(') {\n \n \treturn new TreeNode(expr); // you fill this in\n } else{\n // expr is a parenthesized expression.\n // Strip off the beginning and ending parentheses,\n // find the main operator (an occurrence of + or * not nested\n // in parentheses, and construct the two subtrees.\n int nesting = 0;\n int opPos = 0;\n char myChar='\\0';\n \n for (int k = 1; k < expr.length() - 1; k++) {\n myChar = expr.charAt(k);\n \tif(myChar == '('){\n \tnesting++;\n }\n if(myChar==')'){\n \tnesting--;\n }\n if(nesting == 0){\n \tif(myChar == '+' || myChar == '*'){\n \t\topPos = k;\n \t break;\t\n \t}\n }\n }\n \n String opnd1 = expr.substring(1, opPos);\n String opnd2 = expr.substring(opPos + 1, expr.length() - 1);\n String op = expr.substring(opPos, opPos + 1);\n System.out.println(\"expression = \" + expr);\n System.out.println(\"operand 1 = \" + opnd1);\n System.out.println(\"operator = \" + op);\n System.out.println(\"operand 2 = \" + opnd2);\n System.out.println();\n return new TreeNode(op,exprTreeHelper(opnd1),exprTreeHelper(opnd2));\n \n }\n }",
"@Test(timeout = 4000)\n public void test074() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\") (\");\n Token token0 = xPathLexer0.notEquals();\n xPathLexer0.setPreviousToken(token0);\n assertEquals(\") \", token0.getTokenText());\n assertEquals(22, token0.getTokenType());\n \n Token token1 = xPathLexer0.identifierOrOperatorName();\n assertEquals(15, token1.getTokenType());\n assertEquals(\"\", token1.getTokenText());\n }",
"@Test(timeout = 4000)\n public void test084() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"(xA>7o;9b=;e*Y(m\");\n Token token0 = xPathLexer0.rightParen();\n xPathLexer0.setPreviousToken(token0);\n Token token1 = xPathLexer0.identifierOrOperatorName();\n assertNull(token1);\n }",
"private TreeNode exprTreeHelper(String expr) {\n if (expr.charAt(0) != '(') {\n return new TreeNode(expr); // you fill this in\n } else {\n // expr is a parenthesized expression.\n // Strip off the beginning and ending parentheses,\n // find the main operator (an occurrence of + or * not nested\n // in parentheses, and construct the two subtrees.\n int nesting = 0;\n int opPos = 0;\n for (int k = 1; k < expr.length() - 1; k++) {\n // you supply the missing code\n \tif (nesting == 0) {\n \t\tif (expr.charAt(k) == '+' || expr.charAt(k) == '*') {\n \t\t\topPos = k;\n \t\t}\n \t}\n \tif (expr.charAt(k) == '(') {\n \t\tnesting++;\n \t} else if (expr.charAt(k) == ')') {\n \t\tnesting--;\n \t}\n }\n String opnd1 = expr.substring(1, opPos);\n String opnd2 = expr.substring(opPos + 1, expr.length() - 1);\n String op = expr.substring(opPos, opPos + 1);\n System.out.println(\"expression = \" + expr);\n System.out.println(\"operand 1 = \" + opnd1);\n System.out.println(\"operator = \" + op);\n System.out.println(\"operand 2 = \" + opnd2);\n System.out.println();\n return new TreeNode(op, exprTreeHelper(opnd1), exprTreeHelper(opnd2)); // you fill this in\n }\n }",
"public String infixToPostfix(String expression) {\n\t\tStack oPSt = new Stack();\n\t\tStack Sign = new Stack();\n\t\tStringBuilder PFE = new StringBuilder();\n\t\tString n = \"\";\n\t\t// flag -> marks adding new operator to the stack with or without removing the\n\t\t// previous one\n\t\tboolean flag = true;\n\t\t//negflag -> if (true) previous character was operator thus next(-) is negative sign\n\t\t//\t\t\t if (false) previous character was operand thus next (-) is operator\n\t\tboolean negflag = true; \n\t\tint counter = 0; // expresses number of open parenthesis at the moment and if it matches the\n\t\t// counter inside Sign Stack it means that the Sign was changed at this Counter\n\t\tString open = \"(\", closed = \")\";\n\t\tfor (int i = 0; i < expression.length(); i++) {\n\t\t\tString x = expression.substring(i, i + 1);\n\t\t\tStringBuilder longIntegers = new StringBuilder();\n\t\t\tif (x.equals(\"-\") && !expression.substring(i + 1, i + 2).equals(\" \")) {\n\t\t\t\tif(negflag) {\n\t\t\t\tif (n.equals(\"\"))\n\t\t\t\t\tn = \"-\";\n\t\t\t\telse\n\t\t\t\t\tn = \"\";\n\t\t\t\tSign.push(counter);\n\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tint counter2 = 0;\n\t\t\t\twhile (counter2 + i < expression.length()\n\t\t\t\t\t\t&& (isChar(expression.substring(i + counter2, i + counter2 + 1))\n\t\t\t\t\t\t\t\t|| isNum(expression.substring(i + counter2, i + counter2 + 1)))\n\t\t\t\t\t\t&& isNotOperator(expression.substring(i + counter2, i + counter2 + 1))) {\n\t\t\t\t\tlongIntegers.append(expression.substring(i + counter2, i + 1 + counter2));\n\t\t\t\t\tcounter2++;\n\t\t\t\t}\n\t\t\t\ti = i + counter2;\n\t\t\t\tif (counter2 > 0) {\n\t\t\t\t\ti--;\n\t\t\t\t\tx = longIntegers.toString();\n\t\t\t\t}\n\t\t\t}\n\t\t\t// end of taking the expression\n\n\t\t\t// testing the expression\n\n\t\t\t// if the char. is an open parenthesis\n\t\t\tif (x.equals(open)) {\n\t\t\t\toPSt.push(x);\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t\t// if the char is a close parenthesis\n\t\t\telse if (x.equals(closed)) {\n\t\t\t\tif (counter == 0)\n\t\t\t\t\tthrow new RuntimeException(\"Invalid Input: Redundant \\\")\\\" \");\n\t\t\t\twhile (!((String) oPSt.peek()).equals(open)) {\n\t\t\t\t\tPFE.append(\" \");\n\t\t\t\t\tPFE.append(oPSt.pop());\n\t\t\t\t}\n\t\t\t\toPSt.pop();\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t\t// checks if char was an operator\n\t\t\telse if (x.equals(\"*\") || x.equals(\"+\") || x.equals(\"/\") || x.equals(\"-\")) {\n\t\t\t\tnegflag = true;\n\t\t\t\twhile (!oPSt.isEmpty() && !((String) oPSt.peek()).equals(\"(\")) {\n\t\t\t\t\t// see which character has higher precedence\n\t\t\t\t\tflag = highOrLow(((String) oPSt.peek()).charAt(0), x.charAt(0));\n\t\t\t\t\tif (flag)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\telse {\n\t\t\t\t\t\tPFE.append(\" \");\n\t\t\t\t\t\tPFE.append(oPSt.pop());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toPSt.push(x);\n\t\t\t}\n\t\t\t// if the char is space then check if the previous was space to avoid having two\n\t\t\t// spaces after each other\n\t\t\t// if the char was a new space/wasn't a space then it's definitely a\n\t\t\t// number/variable and will be pushed to PFE\n\t\t\telse if (!x.equals(\" \") || (PFE.length() > 0 && (char) PFE.charAt(PFE.length() - 1) != ' ')) {\n\t\t\t\tPFE.append(\" \");\n\t\t\t\tif (!x.equals(\" \")) {\n\t\t\t\t\tnegflag = false;\n\t\t\t\t\tPFE.append(n + x);\n\t\t\t}else \n\t\t\t\t\tPFE.append(x);\n\t\t\t\t\n\t\t\t}\n\t\t\twhile (!Sign.isEmpty() && counter == (int) Sign.peek()) {\n\t\t\t\tif (n.equals(\"\"))\n\t\t\t\t\tn = \"-\";\n\t\t\t\telse\n\t\t\t\t\tn = \"\";\n\t\t\t\tSign.pop();\n\t\t\t}\n\t\t}\n\t\t// add all the operator remaining in stack to the PFE except if '(' was found\n\t\t// then there's an runtime exception\n\t\twhile (!oPSt.isEmpty()) {\n\t\t\tif (((String) oPSt.peek()).equals(\"(\"))\n\t\t\t\tthrow new RuntimeException(\"Invalid Input : Redundant \\\"(\\\" \");\n\t\t\tPFE.append(\" \");\n\t\t\tPFE.append(oPSt.pop());\n\t\t}\n\t\t// replace any two consecutive spaces with only one\n\t\tint i = 0;\n\t\twhile (PFE.charAt(i) == ' ' && i < PFE.length() - 1) {\n\t\t\tPFE.deleteCharAt(i);\n\t\t}\n\t\tfor (i = 0; i < PFE.length() - 1; i++) {\n\t\t\tif (PFE.charAt(i) == ' ' && PFE.charAt(i + 1) == ' ') {\n\t\t\t\tPFE.deleteCharAt(i);\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t\treturn PFE.toString();\n\n\t}",
"@Override\r\n\tpublic void visit(BinaryExpression binaryExpression) {\n\r\n\t}",
"public String processInfix(char[] input) {\n String result = \"\"; //Initialize the string. This will be the postfix formatted input.\n\n for (int i = 0; i < input.length; i++) {\n\n //If it is a digit it is sent straight to the result\n if (Character.isDigit(input[i])) {\n result += input[i];\n }\n\n //If it is an open bracket it is pushed into the stack.\n else if (input[i] == '(') {\n s.push(input[i]);\n }\n\n //If it is a closed bracket, all items in the stack are popped until an open bracket is found.\n //Both brackets are then discarded\n else if (input[i] == ')') {\n\n while (!s.isEmpty() && (char)s.top() != '(') {\n result += (char)s.pop();\n }\n\n if (!s.isEmpty() && (char)s.top() != '(') {\n System.out.println(\"Invalid Expression. A '(' character must be followed by a ')' in the Expression.\");\n } else {\n s.pop(); //get rid of ( from the eq.\n }\n }\n\n //Else it must be an operand...\n else {\n //loop checks:\n // 1. that the stack is not empty and\n // 2. that the current token is less or equal in priority to the one on the top of the stack\n // If it both are true then the operator is sent to the result\n while(!s.isEmpty() && getPriority(input[i]) <= getPriority((char)s.top())){\n result += (char)s.pop();\n }\n s.push(input[i]);\n }\n }\n\n //Pop the remainder of the stack to the result\n while(!s.isEmpty()){\n result += (char)s.pop();\n }\n\n return result;\n }",
"protected UnaryExpNode(ExpNode expr) {\n this.expr = expr;\n }",
"public void convertInfixToPostfix() {\n\t\t// Create operator stack\n\t\tStack<String> op_stack = new Stack<String>();\n\n\t\t// Prepare the input string\n\t\tprepareInput();\n\t\t\n\t\t// Split the expression \n\t\tString[] tokens = input.split(\"(?<=[^\\\\.a-zA-Z\\\\d])|(?=[^\\\\.a-zA-Z\\\\d])\");\n\t\t\n\t\t//For each token\n\t\tfor (String t : tokens) {\n\t\t\t// If the token is empty, skip it\n\t\t\tif(t.equals(\"\") || t.equals(\" \")) continue;\n\t\t\t\n\t\t\t// If operator (o1)\n\t\t\tif (Operator.isOperator(t)) {\n\n\t\t\t\t// While there is an operator (o2) an the stack and\n\t\t\t\t// (o1 is left associative AND o2 precedence is higher or equal to o1 precedence)\n\t\t\t\t// OR\n\t\t\t\t// (o1 is right associative AND o2 precedence is higher than o1 precedence)\n\t\t\t\twhile (!op_stack.empty()\n\t\t\t\t\t\t&& Operator.isOperator(op_stack.peek())\n\t\t\t\t\t\t&& (\n\t\t\t\t\t\t\t((Operator.getAssociativity(t) == Operator.LEFT) && Operator.comparePrec(op_stack.peek(), t) >= 0) \n\t\t\t\t\t\t\t|| \n\t\t\t\t\t\t\t((Operator.getAssociativity(t) == Operator.RIGHT) && Operator.comparePrec(op_stack.peek(), t) > 0)\n\t\t\t\t\t\t )\n\t\t\t\t ) \n\t\t\t\t{\n\t\t\t\t\t// add o2 to the output\n\t\t\t\t\toutput.add(op_stack.pop());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Push o1 on to the stack.\n\t\t\t\top_stack.push(t);\n\t\t\t}\n\n\t\t\telse if (t.equals(\"(\")) {\n\t\t\t\top_stack.push(t);\n\t\t\t}\n\n\t\t\telse if (t.equals(\")\")) {\n\t\t\t\t// While there is not a left parenthesis, add the top token from the stack to the output\n\t\t\t\twhile (!op_stack.peek().equals(\"(\")) {\n\t\t\t\t\toutput.add(op_stack.pop());\n\t\t\t\t}\n\n\t\t\t\t// Pop out the left parenthesis\n\t\t\t\top_stack.pop();\n\t\t\t\t\n\t\t\t\t// While there is a function on the top of the stack, add it to the output\n\t\t\t\tif(!op_stack.empty() && Function.isFunction(op_stack.peek())) output.add(op_stack.pop());\n\t\t\t}\n\t\t\telse if(Function.isFunction(t)){\n\t\t\t\top_stack.push(t);\n\t\t\t}\n\t\t\telse if(isNumeric(t) || isVariable(t)){\n\t\t\t\toutput.add(t);\n\t\t\t}\n\t\t}\n\n\t\t// Finally empty the stack, by adding all remaining tokens to the output.\n\t\twhile (!op_stack.empty()) {\n\t\t\toutput.add(op_stack.pop());\n\t\t}\n\t}",
"Expr expr();",
"@Test(timeout = 4000)\n public void test076() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"5!\");\n Token token0 = xPathLexer0.star();\n xPathLexer0.setPreviousToken(token0);\n assertEquals(20, token0.getTokenType());\n assertEquals(\"5\", token0.getTokenText());\n \n Token token1 = xPathLexer0.identifierOrOperatorName();\n assertEquals(15, token1.getTokenType());\n assertEquals(\"\", token1.getTokenText());\n }",
"@Test(timeout = 4000)\n public void test060() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer();\n Token token0 = xPathLexer0.relationalOperator();\n assertNull(token0);\n }",
"@Override\n\tpublic String visitExpr(MicroParser.ExprContext ctx) {\n\t\tString prefix = visit(ctx.expr_prefix());\n\t\tString expr = prefix + visit(ctx.term());\n\t\t\n\t\t//System.out.println(\"in visit expr: \"+expr);\n\t\t//System.out.println(\"in visit expr: prefix is: \"+prefix);\n\t\tif((prefix.contentEquals(\"\"))) return expr;\n\t\tString op1, op2, result;\n\t\tString type = currentType;\n\t\tString[] ids = expr.split(\"\\\\-|\\\\+\");\n\t List<String> operands = new ArrayList<String>();\n\t List<Character> addops = new ArrayList<Character>();\n\t \n\t for(int i=0;i<expr.length();i++) {\n\t \tif(expr.charAt(i)=='+' || expr.charAt(i)=='-')\n\t \t\taddops.add(expr.charAt(i));\n\t }\n\t //create a list of addops\n\t \n\t //create a list of operands \n\t for(String i:ids) \n\t \t operands.add(i);\n\t \n\t op1 = operands.get(0);\n\t op2 = operands.get(1);\n\t temp = new Temporary(type);\n\t result = temp.fullName;\n\t tempList.addT(temp);\n\t //System.out.println(\"in visit expr, ops are: \"+op1+\" \"+ op2);\n\t //System.out.println(\"in visit expr, result is: \"+ result);\n\t if(addops.get(0)=='+') {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"ADD\", op1, op2, result));\n\t \toperands.remove(0); operands.remove(0); addops.remove(0);\n\t }\n\t \t\n\t else {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"SUB\", op1, op2, result));\n\t \toperands.remove(0); operands.remove(0); addops.remove(0);\n\t }\n\t \n\t \t\n\t if(operands.size()==0) return result;\n\t \n\t for(int i=0; i<operands.size();i++) {\n\t \top1 = result;\n\t \top2 = operands.get(i);\n\t \ttemp = new Temporary(type);\n\t \tresult = temp.fullName;\n\t \ttempList.addT(temp);\n\t \tif(addops.get(0)=='+') {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"ADD\", op1, op2, result));\n\t\t \taddops.remove(0);\n\t \t}\n\t\t \t\n\t\t else {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"SUB\", op1, op2, result));\n\t\t \taddops.remove(0);\n\t\t }\n\t\t \t\n\t }\n\t return result; \n\t\t\n\t}",
"private void assertProperExpression(String expression) throws InvalidExpressionException {\n char lastItem = '^';\n int parentheseseCount = 0;\n\n for (int i = 0; i < expression.length(); i++) {\n char item = expression.charAt(i);\n // ignore spaces\n if (item == ' ') continue;\n\n // asserts that item is digit or operator\n if (!isDigit(item) && !isOperator(item) && !isParenthesis(item))\n throw new InvalidExpressionException(\"INVALID CHARACTER\", i);\n // asserts that here are more open parentheses than closed\n if (item == '(') parentheseseCount++;\n if (item == ')') parentheseseCount--;\n if (parentheseseCount < 0)\n throw new InvalidExpressionException(\"TOO MANY CLOSING PARENTHESES\", i); \n // asserts there are never two digits in a row\n if (isDigit(lastItem) && isDigit(item))\n throw new InvalidExpressionException(\"TOO MANY DIGITS IN NUMBER\", i);\n // asserts coefficients to expressions in parentheses have astrisks: \"6(1)\" invalid\n if (isDigit(lastItem) && item == '(')\n throw new InvalidExpressionException(\"USE ASTRISK FOR MULTIPLICATION\", i);\n // asserts there are never two operators in a row, except for parentheses\n if (isOperator(lastItem) && isOperator(item))\n throw new InvalidExpressionException(\"TOO MANY OPERATORS IN A ROW\", i);\n // asserts there are no parenthesese open or closed on operators: \"+)\" or \"(+\"\n if (isOperator(lastItem) && item == ')' || lastItem == '(' && isOperator(item))\n throw new InvalidExpressionException(\"PARENTHESIS NEXT TO OPERATOR\", i);\n // asserts there are no empty parenthesis: \"()\"\n if (lastItem == '(' && item == ')')\n throw new InvalidExpressionException(\"EMPTY PARENTHESESE ARE INVALID\", i);\n // asserts the expression does not end with an operator\n if (i == expression.length()-1 && isOperator(item))\n throw new InvalidExpressionException(\"INVALID OPERATOR AT END OF EXPRESSION\", i);\n\n lastItem = item;\n }\n\n // asserts parenthesese were all closed\n if (parentheseseCount != 0)\n throw new InvalidExpressionException(\"TOO MANY OPENING PARENTHESES\");\n }",
"private Expression parseParen(Tokenizer in) {\n\t\tExpression expr = parseExpr(in,OperatorLevel.lowest);\n\t\tToken expectParen = in.next();\n\t\tif (expectParen.type != Token.TokenType.CLOSE_PARENTHESIS)\n\t\t\tthrow new SyntaxError(\"Expected ) got: '\" + expectParen + \"'\" + expectParen.generateLineChar());\n\t\treturn expr;\n\t}",
"public Node expression()\r\n\t{\r\n\t\tNode lhs = term();\r\n\t\tif(lhs!=null)\r\n\t\t{\r\n\t\t\tint index = lexer.getPosition();\r\n\t\t\tLexer.Token token = lexer.getToken();\r\n\t\t\twhile(token == Lexer.Token.PLUS\r\n\t\t\t\t||token == Lexer.Token.MINUS)\r\n\t\t\t{\r\n\t\t\t\tNode rhs = term(); \r\n\t\t\t\tif(rhs!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(token == Lexer.Token.PLUS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Add(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(token == Lexer.Token.MINUS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Sub(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tindex = lexer.getPosition();\r\n\t\t\t\t\ttoken = lexer.getToken();\r\n\t\t\t\t}\r\n\t\t\t\telse break;\r\n\t\t\t}\r\n\t\t\tlexer.setPosition(index);\r\n\t\t}\r\n\t\treturn lhs;\r\n\t}",
"private boolean dividingByZero(String operator){\n if (numStack.peek() == 0 && operator.equals(\"/\")){\n return true;\n }\n return false;\n }",
"@Test\n public void defaultOperatorsEvaluateFalseTest() throws Exception {\n\n assertThat(getNode(\"1 == 2\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 != 1\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 <> 1\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 < 0\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"2 > 4\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 >= 3\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"2 >= 4\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 <= 0\", \"expr\").render(null), is((Object)false));\n }",
"@Override public JannotTreeJCExpression getLeftOperand()\n{\n return createTree(getNode().getLeftOperand()); \n}",
"public String parsePostfixToPrefix(String exp) throws SyntaxError {\n \t// throws error message if there is no expression entered\n \tif (exp.length() == 0) {\n \t\tthrow new SyntaxError(\"No expression has been entered.\");\n \t}\n Scanner parser = new Scanner(exp);\n String entity;\n //tokenize the string containing the postfix expression\n Stack<String> operandStack = new Stack<String>();\n String firstOperand, secondOperand;\n // try-catch to validate data has been entered\n try {\n\t \t//while there are more tokens\n \t\twhile (parser.hasNext()) {\n\t entity = parser.next();\n\t // if it is a space, skip it\n\t if (entity.equals(\" \"));\n\t // if it is a operand, push it onto the operand stack\n\t if (Character.isDigit(entity.charAt(0)))\n\t operandStack.push(entity);\n\t // if it is an operator\n\t else if (entity.equals(\"/\") || entity.equals(\"*\") \n\t || entity.equals(\"+\") || entity.equals(\"-\")) {\n\t \t//retrieve, then pop operand 1 off the operand stack\n\t \tsecondOperand = operandStack.peek();\n\t operandStack.pop();\n\t //retrieve, then pop operand 2 off the operand stack\n\t firstOperand = operandStack.peek();\n\t operandStack.pop();\n\t // formats miniExpression String with the operator followed by 2 operands\n\t String miniExpression = entity + \" \" + firstOperand + \" \" + secondOperand;\n\t //push the miniExpression string onto the operand stack\n\t operandStack.push(miniExpression);\n\t }\n\t }\n\t //throws error if there is an incorrect entry improperly formatted \t\n } catch (Exception e) {\n \tthrow new SyntaxError(\"You have entered an improper expression. Check your input.\");\n }\n //retrieve, then pop the prefix expression off the operand stack\n String prefix = operandStack.peek();\n operandStack.pop();\n //return prefix - holding the converted expression\n return prefix;\n }",
"@Test(timeout = 4000)\n public void test071() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"com.werken.saxpath.XPathLexer\");\n xPathLexer0.pipe();\n xPathLexer0.slashes();\n xPathLexer0.minus();\n Token token0 = xPathLexer0.number();\n xPathLexer0.setPreviousToken(token0);\n Token token1 = xPathLexer0.identifierOrOperatorName();\n assertNull(token1);\n }",
"JannotTreeJCBinary(InfixExpression n) \n{\n super(n);\n}",
"public String convertInfix (String exp) throws NumberFormatException \n {\n \n initStack.clear();\n queue.clear();\n finalStack.clear();\n postfixExp = \"\";\n \n for (int i = 0; i<exp.length(); ++i){\n char c = exp.charAt(i); \n if(i > 0){\n char previous = exp.charAt(i-1);\n if((isNumber(c) && isNumber(previous)) || isBalanced(exp) == false){\n throw new NumberFormatException(\"**Invalid Expression**\");\n }\n }\n \n if (Precedence(c) > 0)\n {\n while(initStack.isEmpty() == false && Precedence((char) initStack.top()) >= Precedence(c))\n {\n queue.insertBack(initStack.pop());\n }\n initStack.push(c);\n }\n else if (c ==')')\n {\n char x = (char) initStack.pop();\n while(x!= '(')\n {\n queue.insertBack(x);\n x = (char) initStack.pop();\n }\n }\n else if (c == '(')\n {\n initStack.push(c);\n }\n else\n {\n queue.insertBack(c);\n }\n }\n while (!initStack.isEmpty()) \n {\n queue.insertBack(initStack.pop());\n }\n postfixExp = queue.postFixString();\n postfixExp = postfixExp.replaceAll(\"\\\\s\",\"\");\n return postfixExp;\n }",
"public static String convertInfixToPostfix(String infix) throws InvalidNotationFormatException {\n\t\tNotationQueue<String> postfix = new NotationQueue<String>(infix.length());\n\t\tNotationStack<String> eval = new NotationStack<String>(infix.length());\n\t\tchar[] expr = infix.toCharArray();\n\t\tfor (int i = 0; i < expr.length; i++) {\n\t\t\tif (Character.isDigit(expr[i])) {\n\t\t\t\ttry {\n\t\t\t\t\tpostfix.enqueue(String.valueOf(expr[i]));\n\t\t\t\t}catch(QueueOverflowException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}else if (expr[i] == '(') {\n\t\t\t\ttry {\n\t\t\t\t\teval.push(String.valueOf(expr[i]));\n\t\t\t\t}catch(StackOverflowException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}else if (expr[i]=='+'||expr[i]=='-'||expr[i]=='*'||expr[i]=='/') {\n\t\t\t\ttry {\n\t\t\t\t\twhile(!eval.isEmpty() && eval.top().charAt(0)!='(' && prec(expr[i]) <= prec(eval.top().charAt(0))){\n\t\t\t\t\t\tString pop1 = eval.pop();\n\t\t\t\t\t\tpostfix.enqueue(pop1);\n\t\t\t\t\t}\n\t\t\t\t\teval.push(String.valueOf(expr[i]));\n\t\t\t\t}catch (StackUnderflowException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}catch (QueueOverflowException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}catch (StackOverflowException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}else if (expr[i]==')') { \n\t\t\t\ttry {\n\t\t\t\t\twhile(!eval.isEmpty() && eval.top().charAt(0)!='(') {\n\t\t\t\t\t\tString pop1 = eval.pop();\n\t\t\t\t\t\tpostfix.enqueue(pop1);\n\t\t\t\t\t}\n\t\t\t\t\tif(eval.size()==0){\n\t\t\t\t\t\tthrow new InvalidNotationFormatException();\n\t\t\t\t\t}else {\n\t\t\t\t\t\teval.pop();\n\t\t\t\t\t}\n\t\t\t\t}catch (StackUnderflowException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}catch (QueueOverflowException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\twhile(!eval.isEmpty()) {\n\t\t\t\tString pop1 = eval.pop();\n\t\t\t\tpostfix.enqueue(pop1);\n\t\t\t}\n\t\t}catch (StackUnderflowException e) {\n\t\t\te.printStackTrace();\n\t\t}catch (QueueOverflowException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn postfix.toString();\n\t}",
"@Test\n public void ensureCompileTreeWorksAsIntended() throws Exception {\n String formula = \"#euro{2$+25$}\";\n CommonTree ast = new MonetaryExpressionCompiler().compileTree(formula);\n boolean verdict = ast.toStringTree().equals(\"(euro (+ ($ 2) ($ 25)))\");\n assertEquals(true, verdict);\n }",
"public abstract XPathExpression getExpression();",
"public static void main(String[] args) throws InvalidExpression\r\n {\r\n getStackType();\r\n while(run_again)\r\n {\r\n startUp();\r\n System.out.println(\"The postfix and prefix equivalents of \" + infix_expression + \" are as follows:\");\r\n System.out.println(\"Postfix: \" + infixToPostfix(infix_expression));\r\n System.out.println(\"Prefix: \" + infixToPrefix(infix_expression) + \"\\n\");\r\n runAgain();\r\n }\r\n }",
"public interface AstIncreUnaryExpression extends AstUnaryExpression {\r\n}",
"@Test(timeout = 4000)\n public void test011() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\") (\");\n String string0 = xPathLexer0.getXPath();\n assertEquals(\") (\", string0);\n }",
"public void infixLeft(TokenType token, int precedence) {\n register(token, new BinaryOperatorParselet(precedence, false));\n }",
"public interface Expression {\n \n enum ExpressivoGrammar {ROOT, SUM, PRODUCT, TOKEN, PRIMITIVE_1, PRIMITIVE_2, \n NUMBER, INT, DECIMAL, WHITESPACE, VARIABLE};\n \n public static Expression buildAST(ParseTree<ExpressivoGrammar> concreteSymbolTree) {\n \n if (concreteSymbolTree.getName() == ExpressivoGrammar.DECIMAL) {\n /* reached a double terminal */\n return new Num(Double.parseDouble(concreteSymbolTree.getContents())); \n }\n\n else if (concreteSymbolTree.getName() == ExpressivoGrammar.INT) {\n /* reached an int terminal */\n return new Num(Integer.parseInt(concreteSymbolTree.getContents()));\n }\n \n else if (concreteSymbolTree.getName() == ExpressivoGrammar.VARIABLE) {\n /* reached a terminal */\n return new Var(concreteSymbolTree.getContents());\n }\n \n else if (concreteSymbolTree.getName() == ExpressivoGrammar.ROOT || \n concreteSymbolTree.getName() == ExpressivoGrammar.TOKEN || \n concreteSymbolTree.getName() == ExpressivoGrammar.PRIMITIVE_1 || \n concreteSymbolTree.getName() == ExpressivoGrammar.PRIMITIVE_2 || \n concreteSymbolTree.getName() == ExpressivoGrammar.NUMBER) {\n \n /* non-terminals with only one child */\n for (ParseTree<ExpressivoGrammar> child: concreteSymbolTree.children()) {\n if (child.getName() != ExpressivoGrammar.WHITESPACE) \n return buildAST(child);\n }\n \n // should never reach here\n throw new IllegalArgumentException(\"error in parsing\");\n }\n \n else if (concreteSymbolTree.getName() == ExpressivoGrammar.SUM || concreteSymbolTree.getName() == ExpressivoGrammar.PRODUCT) {\n /* a sum or product node can have one or more children that need to be accumulated together */\n return accumulator(concreteSymbolTree, concreteSymbolTree.getName()); \n }\n \n else {\n throw new IllegalArgumentException(\"error in input: should never reach here\");\n }\n \n }\n \n /**\n * (1) Create parser using lib6005.parser from grammar file\n * (2) Parse string input into CST\n * (3) Build AST from this CST using buildAST()\n * @param input\n * @return Expression (AST)\n */\n public static Expression parse(String input) {\n \n try {\n Parser<ExpressivoGrammar> parser = GrammarCompiler.compile(\n new File(\"src/expressivo/Expression.g\"), ExpressivoGrammar.ROOT);\n ParseTree<ExpressivoGrammar> concreteSymbolTree = parser.parse(input);\n \n// tree.display();\n \n return buildAST(concreteSymbolTree);\n \n }\n \n catch (UnableToParseException e) {\n throw new IllegalArgumentException(\"Can't parse the expression...\");\n }\n catch (IOException e) {\n System.out.println(\"Cannot open file Expression.g\");\n throw new RuntimeException(\"Can't open the file with grammar...\");\n }\n }\n \n // helper methods\n public static Expression accumulator(ParseTree<ExpressivoGrammar> tree, ExpressivoGrammar grammarObj) {\n Expression expr = null;\n boolean first = true;\n List<ParseTree<ExpressivoGrammar>> children = tree.children();\n int len = children.size();\n for (int i = len-1; i >= 0; i--) {\n /* the first child */\n ParseTree<ExpressivoGrammar> child = children.get(i);\n if (first) {\n expr = buildAST(child);\n first = false;\n }\n \n /* accumulate this by creating a new binaryOp object with\n * expr as the leftOp and the result as rightOp\n **/\n \n else if (child.getName() == ExpressivoGrammar.WHITESPACE) continue;\n else {\n if (grammarObj == ExpressivoGrammar.SUM)\n expr = new Sum(buildAST(child), expr);\n else\n expr = new Product(buildAST(child), expr);\n }\n }\n \n return expr;\n \n }\n \n // ----------------- problems 3-4 -----------------\n \n public static Expression create(Expression leftExpr, Expression rightExpr, char op) {\n if (op == '+')\n return Sum.createSum(leftExpr, rightExpr);\n else\n return Product.createProduct(leftExpr, rightExpr);\n }\n\n public Expression differentiate(Var x);\n \n public Expression simplify(Map<String, Double> env);\n\n}",
"public static void expression(CommonTree ast, IRTree irt)\n {\n CommonTree ast1;\n IRTree irt1 = new IRTree();\n Token t = ast.getToken();\n int tt = t.getType();\n if (tt == REALNUM) {\n constant(ast, irt1);\n irt.setOp(\"CONST\");\n irt.addSub(irt1);\n }\n else if(tt == PLUS || tt == MINUS || tt == TIMES || tt == DIVIDE)\n {\n //do something\n irt.setOp(\"BINOP\");\n IRTree irt2 = new IRTree();\n expression((CommonTree)ast.getChild(0), irt1);\n expression((CommonTree)ast.getChild(1), irt2);\n\tif(tt == PLUS)\n \t\t irt.addSub(new IRTree(\"+\")); \n\telse if(tt == MINUS)\n\t\tirt.addSub(new IRTree(\"-\"));\n\telse if(tt == TIMES)\n\t\tirt.addSub(new IRTree(\"*\"));\n\telse if(tt == DIVIDE)\n\t\tirt.addSub(new IRTree(\"/\"));\n irt.addSub(irt1);\n irt.addSub(irt2);\n }\n else\n\tSystem.out.println(\"unrecognised type \" + tt);\n }",
"@Test\r\n\tpublic void testParseOperator() {\r\n\r\n\t\t// find the number of operators in the input\r\n\r\n\t\tint add = 0;\r\n\t\tint minus = 0;\r\n\t\tint multiply = 0;\r\n\t\tint divide = 0;\r\n\t\tString input = \"a = 5\\nb = a - 1\\nc = a + (b / 2 * 4)\";\r\n\t\tfor (int i = 0; i < input.length(); i++) {\r\n\t\t\tif (input.charAt(i) == '+')\r\n\t\t\t\tadd++;\r\n\t\t\tif (input.charAt(i) == '-')\r\n\t\t\t\tminus++;\r\n\t\t\tif (input.charAt(i) == '*')\r\n\t\t\t\tmultiply++;\r\n\t\t\tif (input.charAt(i) == '/')\r\n\t\t\t\tdivide++;\r\n\t\t}\r\n\r\n\t\t// Enter the code\r\n\r\n\t\tdriver.findElement(By.name(\"code[code]\")).sendKeys(input);\r\n\r\n\t\t// Look for the \"Parse\" button and click\r\n\r\n\t\tdriver.findElements(By.name(\"commit\")).get(1).click();\r\n\r\n\t\t// Check that there contains corresponding quantity of operators\r\n\r\n\t\ttry {\r\n\t\t\tWebElement code = driver.findElement(By.tagName(\"code\"));\r\n\t\t\tString res = code.getText();\r\n\t\t\tint add1 = 0, minus1 = 0, multiply1 = 0, divide1 = 0;\r\n\t\t\tfor (int i = 0; i < res.length(); i++) {\r\n\t\t\t\tif (res.charAt(i) == '+')\r\n\t\t\t\t\tadd1++;\r\n\t\t\t\tif (res.charAt(i) == '-')\r\n\t\t\t\t\tminus1++;\r\n\t\t\t\tif (res.charAt(i) == '*')\r\n\t\t\t\t\tmultiply1++;\r\n\t\t\t\tif (res.charAt(i) == '/')\r\n\t\t\t\t\tdivide1++;\r\n\t\t\t}\r\n\t\t\tassertEquals(add, add1);\r\n\t\t\tassertEquals(minus, minus1);\r\n\t\t\tassertEquals(multiply, multiply1);\r\n\t\t\tassertEquals(divide, divide1);\r\n\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\tfail();\r\n\t\t}\r\n\t}",
"@Test\n public void testCalculateRPNStack() throws Exception {\n String[] expression = {\"3\",\"4\",\"+\",\"8\",\"3\",\"-\",\"+\",\"10\",\"2\",\"/\", \"3\", \"+\", \"*\", \"15\",\"/\"};\n double result = solver.calculateRPNCustom(expression);\n\n assertThat(result, is(6.4));\n }",
"public abstract Expression getInitialExpression();",
"private Object parseExpr() throws IOException, FSException{\n\n ETreeNode curNode=null;\n boolean end=false;\n Object val;\n boolean negate=false; //flag for unary minus\n boolean not=false;//flag for unary not.\n boolean prevOp=true;//flag - true if previous value was an operator\n\n while (!end){\n\n switch (tok.ttype) {\n\n\n //the various possible 'values'\n case LexAnn.TT_INTEGER:\n case LexAnn.TT_DOUBLE:\n case LexAnn.TT_STRING:\n case LexAnn.TT_WORD:\n case LexAnn.TT_FUNC:\n case LexAnn.TT_NULL:\n case LexAnn.TT_ARRAY:{\n\n if (!prevOp){\n parseError(\"Expected Operator\");\n } else {\n\n val=null;\n ETreeNode node=new ETreeNode();\n node.type=ETreeNode.E_VAL;\n\n switch (tok.ttype){\n //numbers - just get them\n case LexAnn.TT_INTEGER:{\n val=tok.value;\n break;\n }\n case LexAnn.TT_DOUBLE:{\n val=tok.value;\n break;\n }\n //functions - evaluate them\n case LexAnn.TT_FUNC:{\n String name=(String)tok.value;\n getNextToken();\n val=parseCallFunc(name);\n break;\n }\n //arrays - evaluate them\n case LexAnn.TT_ARRAY:{\n String name=(String)tok.value;\n getNextToken(); //should be a '['\n getNextToken(); //should be the index\n Object index=parseExpr();\n try {\n val=host.getVarEntry(name,index);\n } catch (Exception e) {\n parseError(e.getMessage());\n }\n break;\n }\n //variables - resolve them\n case LexAnn.TT_WORD:{\n if (hasVar((String)tok.value)) {\n val=getVar((String)tok.value);\n } else {\n try {\n val=host.getVarEntry((String)tok.value,null);\n } catch (Exception e) {\n parseError(e.getMessage());\n }\n }\n break;\n }\n //strings - just get again\n case LexAnn.TT_STRING:{\n val=tok.value;\n break;\n }\n //null\n case LexAnn.TT_NULL:{\n val=new FSObject(null);\n break;\n }\n }\n\n //unary not\n if (not){\n if (val instanceof Integer){\n if (((Integer)val).intValue()==0){\n val=FS_TRUE;\n } else {\n val=FS_FALSE;\n }\n not=false;\n } else if (val instanceof FSObject && ((FSObject)val).getObject() instanceof Boolean) {\n if (((FSObject)val).getObject().equals(Boolean.FALSE)) {\n val=FS_TRUE;\n } else {\n val=FS_FALSE;\n }\n } else if (val instanceof FSObject && ((FSObject)val).getObject() instanceof Integer) {\n if (((Integer)((FSObject)val).getObject()).intValue()==0) {\n val=FS_TRUE;\n } else {\n val=FS_FALSE;\n }\n } else {\n String msg=val.getClass().getName();\n if (val instanceof FSObject) msg=\"FSObject with \"+((FSObject)val).getNullClass().getName();\n parseError(\"Type mismatch for ! \"+msg);\n }\n }\n\n //unary minus\n if (negate) {\n if (val instanceof Integer){\n val=new Integer(-((Integer)val).intValue());\n } else if (val instanceof Double){\n val=new Double(-((Double)val).doubleValue());\n } else {\n parseError(\"Type mistmatch for unary -\");\n }\n }\n\n node.value=val;\n\n if (curNode!=null){\n if (curNode.left==null){\n curNode.left=node;\n node.parent=curNode;\n curNode=node;\n\n } else if (curNode.right==null){\n curNode.right=node;\n node.parent=curNode;\n curNode=node;\n\n }\n } else {\n curNode=node;\n }\n\n prevOp=false;\n }\n break;\n }\n /*operators - have to be more carefull with these.\n We build an expression tree - inserting the nodes at the right\n points to get a reasonable approximation to correct operator\n precidence*/\n case LexAnn.TT_LEQ:\n case LexAnn.TT_LNEQ:\n case LexAnn.TT_MULT:\n case LexAnn.TT_DIV:\n case LexAnn.TT_MOD:\n case LexAnn.TT_PLUS:\n case LexAnn.TT_MINUS:\n case LexAnn.TT_LGR:\n case LexAnn.TT_LGRE:\n case LexAnn.TT_LLSE:\n case LexAnn.TT_LLS:\n case LexAnn.TT_NOT:\n case LexAnn.TT_LAND:\n case LexAnn.TT_LOR: {\n if (prevOp){\n if (tok.ttype==LexAnn.TT_MINUS){\n negate=true;\n } else if (tok.ttype==LexAnn.TT_NOT){\n not=true;\n } else {\n parseError(\"Expected Expression\");\n }\n } else {\n\n ETreeNode node=new ETreeNode();\n\n node.type=ETreeNode.E_OP;\n node.value=new Integer(tok.ttype);\n\n if (curNode.parent!=null){\n\n int curPrio=getPrio(tok.ttype);\n int parPrio=\n getPrio(((Integer)curNode.parent.value).intValue());\n\n if (curPrio<=parPrio){\n //this nodes parent is the current nodes grandparent\n node.parent=curNode.parent.parent;\n //our nodes left leg is now linked into the current nodes\n //parent\n node.left=curNode.parent;\n //hook into grandparent\n if (curNode.parent.parent!=null){\n curNode.parent.parent.right=node;\n }\n\n //the current nodes parent is now us (because of above)\n curNode.parent=node;\n //set the current node.\n curNode=node;\n } else {\n //current node's parent's right is now us.\n curNode.parent.right=node;\n //our nodes left is the current node.\n node.left=curNode;\n //our nodes parent is the current node's parent.\n node.parent=curNode.parent;\n //curent nodes parent is now us.\n curNode.parent=node;\n //set the current node.\n curNode=node;\n }\n } else {\n //our node's left is the current node\n node.left=curNode;\n //current node's parent is us now\n //we don't have to set our parent, as it is null.\n curNode.parent=node;\n //set current node\n curNode=node;\n }\n prevOp=true;\n }\n break;\n }\n case '(':\n //start of an bracketed expression, recursively call ourself\n //to get a value\n {\n getNextToken();\n val=parseExpr();\n\n if (negate) {\n if (val instanceof Integer){\n val=new Integer(-((Integer)val).intValue());\n } else if (val instanceof Double){\n val=new Double(-((Double)val).doubleValue());\n } else {\n parseError(\"Type mistmatch for unary -\");\n }\n }\n\n ETreeNode node=new ETreeNode();\n node.value=val;\n node.type=ETreeNode.E_VAL;\n\n if (curNode!=null){\n if (curNode.left==null){\n curNode.left=node;\n node.parent=curNode;\n curNode=node;\n\n } else if (curNode.right==null){\n curNode.right=node;\n node.parent=curNode;\n curNode=node;\n\n }\n } else {\n curNode=node;\n }\n prevOp=false;\n break;\n }\n\n default: {\n end=true;\n }\n\n }\n if (!end){\n tok.nextToken();\n }\n }\n\n //find the top of the tree we just built.\n if (curNode==null) parseError(\"Missing Expression\");\n while(curNode.parent!=null){\n curNode=curNode.parent;\n }\n\n\n return evalETree(curNode);\n\n }",
"@Override\n\tpublic int evalTree() {\n\t\tint num;\n\t\tExpressionTree left, right;\n\t\t\n\t\ttry {\n\t\t\tnum = Integer.parseInt(EMPTY + this.getValue());\n\n\t\t\treturn num;\n\t\t}\n\n\t\tcatch (NumberFormatException n) {\n\t\t\tleft = new ExpressionTree(getLeft());\n\t\t\tright = new ExpressionTree(getRight());\n\t\t\tif(TIMES_SIGN.equals(this.getValue()))\n\t\t\t\treturn left.evalTree() * right.evalTree();\n\t\t\telse\n\t\t\t\treturn left.evalTree() + right.evalTree();\n\t\t}\n\t}",
"@Test(timeout = 4000)\n public void test003() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"hN!SM~8ux(wB\");\n xPathLexer0.dollar();\n Token token0 = xPathLexer0.and();\n assertNull(token0);\n }",
"private String translateInfixExpression(InfixExpression e) {\n String left = translateExpression(e.getLeft());\n String right = translateExpression(e.getRight());\n return String.format(\"(%s %s %s)\", left, e.getOp(), right);\n }",
"@Test(timeout = 4000)\n public void test112() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"ji{:[5xw96\");\n Token token0 = xPathLexer0.rightParen();\n assertEquals(2, token0.getTokenType());\n assertEquals(\"j\", token0.getTokenText());\n \n Token token1 = xPathLexer0.dollar();\n assertEquals(26, token1.getTokenType());\n assertEquals(\"i\", token1.getTokenText());\n \n Token token2 = xPathLexer0.notEquals();\n assertEquals(\"{:\", token2.getTokenText());\n assertEquals(22, token2.getTokenType());\n \n Token token3 = xPathLexer0.nextToken();\n assertEquals(3, token3.getTokenType());\n assertEquals(\"[\", token3.getTokenText());\n \n Token token4 = xPathLexer0.identifierOrOperatorName();\n assertEquals(15, token4.getTokenType());\n assertEquals(\"5xw96\", token4.getTokenText());\n }",
"public static String convertInfixToPostfix(String infixExpression) {\r\n //Initializing final return string\r\n String postfix = \"\";\r\n //String Array of all elements\r\n String[] expElements = infixExpression.split(\" \");\r\n //New String Array for the numbers\r\n String[] operands = new String[infixExpression.length()];\r\n //New expressions for operators\r\n Expressions operators = new Expressions();\r\n //New stack for operators\r\n Stack operatorStack = new Stack();\r\n \r\n //Trackers for parentheses\r\n int openParenthesis = 0;\r\n int closedParenthesis = 0;\r\n \r\n //Iterate through for length of array of all expressions\r\n for(int i = 0; i < expElements.length; i++) {\r\n //If operator than push to stack\r\n if(expElements[i].equals(\"*\")||expElements[i].equals(\"/\")\r\n ||expElements[i].equals(\"+\")||expElements[i].equals(\"-\")) {\r\n operatorStack.push(new Expressions(expElements[i]));\r\n }\r\n //if open parenthesis add to count\r\n else if(expElements[i].equals(\"(\")) {\r\n openParenthesis++;\r\n }\r\n //if closed parenthesis add to count and pop operator\r\n else if(expElements[i].equals(\")\")) {\r\n closedParenthesis++;\r\n postfix += \" \" + operatorStack.pop();\r\n }\r\n //otherwise it is an integer, add it to array of operands\r\n else {\r\n operands[i] = expElements[i];\r\n postfix += \" \" + operands[i];\r\n }\r\n \r\n }\r\n //Error detection for not enough matching parentheses.\r\n if(openParenthesis!=closedParenthesis){\r\n postfix = \"Parenthesis not equal error.\";\r\n }\r\n //return final expression in postfix notation, delimited by spaces\r\n return postfix; \r\n }",
"public Expression parseExpression(SyntaxTreeNode parent, String exp) {\n return (Expression)parseTopLevel(parent, \"<EXPRESSION>\"+exp, null);\n }",
"public void testNested1() throws Exception {\n String contents = \n \"(true ? 2 : 7) + 9\";\n assertType(contents, \"java.lang.Integer\");\n }",
"@Test(timeout = 4000)\n public void test085() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"com.werken.saxpath.XPathLexer\");\n xPathLexer0.setXPath(\"[ (2) (c)\");\n Token token0 = xPathLexer0.notEquals();\n assertEquals(22, token0.getTokenType());\n assertEquals(\"[ \", token0.getTokenText());\n \n Token token1 = xPathLexer0.nextToken();\n assertEquals(\"(\", token1.getTokenText());\n \n Token token2 = xPathLexer0.identifierOrOperatorName();\n assertNotNull(token2);\n assertEquals(15, token2.getTokenType());\n assertEquals(\"2\", token2.getTokenText());\n }",
"private static void getExpression()\r\n {\r\n System.out.print(\"Please enter an equation you want changed to postfix and prefix: \");\r\n infix_expression = scanner.nextLine();\r\n }",
"@Test\n public void operator_literal() {\n OutputNode output = new OutputNode(\"testing\", typeOf(Result.class), typeOf(String.class));\n OperatorNode operator = new OperatorNode(\n classOf(SimpleOp.class), typeOf(Result.class), typeOf(String.class),\n output, new ValueElement(valueOf(\"???\")));\n InputNode root = new InputNode(operator);\n MockContext context = new MockContext();\n testing(root, context, op -> {\n op.process(\"Hello, world!\");\n });\n assertThat(context.get(\"testing\"), contains(\"Hello, world!???\"));\n }",
"@Test\n public void equalityForDifferentBinaryOps() {\n XPathStringLiteral leftStringExpr = new XPathStringLiteral(\"left side\");\n XPathNumericLiteral zero = new XPathNumericLiteral(0d);\n\n // Setup expressions to test equality over.\n // Note: these binary expressions make semantic sense\n XPathArithExpr additionExpr = new XPathArithExpr(XPathArithExpr.ADD, leftStringExpr, zero);\n XPathArithExpr additionExprClone = new XPathArithExpr(XPathArithExpr.ADD, leftStringExpr, zero);\n XPathArithExpr subtractExpr = new XPathArithExpr(XPathArithExpr.SUBTRACT, leftStringExpr, zero);\n\n XPathBoolExpr andExpr = new XPathBoolExpr(XPathBoolExpr.AND, leftStringExpr, zero);\n XPathBoolExpr andExprClone = new XPathBoolExpr(XPathBoolExpr.AND, leftStringExpr, zero);\n XPathBoolExpr orExpr = new XPathBoolExpr(XPathBoolExpr.OR, leftStringExpr, zero);\n\n XPathCmpExpr lessThanExpr = new XPathCmpExpr(XPathCmpExpr.LT, leftStringExpr, zero);\n XPathCmpExpr greaterThanExpr = new XPathCmpExpr(XPathCmpExpr.GT, leftStringExpr, zero);\n\n XPathEqExpr eqExpr = new XPathEqExpr(XPathEqExpr.EQ, leftStringExpr, zero);\n XPathEqExpr neqExpr = new XPathEqExpr(XPathEqExpr.NEQ, leftStringExpr, zero);\n\n XPathUnionExpr union = new XPathUnionExpr(leftStringExpr, zero);\n XPathUnionExpr differentUnion = new XPathUnionExpr(zero, zero);\n\n // basic equality tests over same subclass\n Assert.assertEquals(\"Same + expression reference is equal\", additionExpr, additionExpr);\n Assert.assertEquals(\"Same + expression is equal\", additionExpr, additionExprClone);\n Assert.assertNotEquals(\"+ not equal to -\", additionExpr, subtractExpr);\n Assert.assertEquals(\"Same && expression reference is equal\", andExpr, andExpr);\n Assert.assertEquals(\"Same && expression is equal\", andExpr, andExprClone);\n Assert.assertNotEquals(\"&& not equal to ||\", andExpr, orExpr);\n Assert.assertEquals(\"Same < expression is equal\", lessThanExpr, lessThanExpr);\n Assert.assertNotEquals(\"< not equal to >\", lessThanExpr, greaterThanExpr);\n Assert.assertEquals(\"Same == expression is equal\", eqExpr, eqExpr);\n Assert.assertNotEquals(\"== not equal to !=\", eqExpr, neqExpr);\n\n // make sure different binary expressions with same op code aren't equal\n Assert.assertNotEquals(\"+ not equal to &&\", additionExpr, andExpr);\n Assert.assertNotEquals(\"+ not equal to <\", additionExpr, lessThanExpr);\n Assert.assertNotEquals(\"+ not equal to ==\", additionExpr, eqExpr);\n Assert.assertNotEquals(\"- not equal to ||\", subtractExpr, orExpr);\n Assert.assertNotEquals(\"- not equal to >\", subtractExpr, greaterThanExpr);\n Assert.assertNotEquals(\"- not equal to !=\", subtractExpr, neqExpr);\n\n // make sure union equality, which doesn't have an op code, works\n Assert.assertEquals(\"same union instance is equal to itself\", union, union);\n Assert.assertNotEquals(union, differentUnion);\n Assert.assertNotEquals(\"+ not equal to union\", additionExpr, union);\n }",
"@Override\n public void visit(CalcExpr node) {\n }",
"@Test(timeout = 4000)\n public void test118() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\">Uuu/X==mpx'Q N+\");\n Token token0 = xPathLexer0.leftParen();\n assertEquals(1, token0.getTokenType());\n assertEquals(\">\", token0.getTokenText());\n \n Token token1 = xPathLexer0.nextToken();\n assertEquals(15, token1.getTokenType());\n assertEquals(\"Uuu\", token1.getTokenText());\n }",
"public void buildTree() throws RuntimeException, DivideByZero {\r\n // define local variable to count number of times an operator \r\n // is pushed into it's associated stack. This will be use to \r\n // count register values\r\n int i = 0;\r\n\r\n // split postfix expression enterend into the textbox into tokens using \r\n // StringTokenizer. Delimeters are used so that different inputs \r\n // can be parsed without spaces being necessary \r\n StringTokenizer token = new StringTokenizer(inputExpression, \" */+-\", true);\r\n\r\n // while loop to build tree out of the postfix expression\r\n while (token.hasMoreTokens()) {\r\n // get the next token in series\r\n String nextItem = token.nextToken();\r\n\r\n // use selection statements to determine if the next token\r\n // in the String is an operand, operator, or unknown\r\n if (nextItem.matches(\"[0-9]+\")) {\r\n // push operand to associated stack\r\n operandStk.push(nextItem);\r\n \r\n // push operand to AssemblyCode class\r\n assemblyCode.pushStack(nextItem);\r\n\r\n } else if (nextItem.equals(\"*\") || nextItem.equals(\"/\")\r\n || nextItem.equals(\"+\") || nextItem.equals(\"-\")) {\r\n // push current operator to operators stack\r\n operatorStk.push(nextItem);\r\n // call the getNodes() method to perform operation\r\n getNodes(i);\r\n // count each time an operator is pushed so registers can be counted\r\n i++;\r\n } else if (!nextItem.equals(\" \")){ \r\n // set class variable to equal invalid character\r\n invalidToken = nextItem; \r\n // throw exception if illegal operator or operand is parsed\r\n throw new RuntimeException();\r\n }\r\n } // end while loop\r\n }",
"@Override\r\n\tpublic void visit(UnaryExpression unaryExpression) {\n\r\n\t}",
"@Test\n public void syntactic_fail(){\n SetupMocks.setup();\n\n List<Token> tokens= new ArrayList<>();\n\n// tokens.add(new Token(Token.TSTRG,1,1,null));\n\n tokens.add(new Token(Token.TCOMA,1,1,null));\n\n Parser parser = new Parser(tokens);\n\n NPrintItemNode nPrintItemNode = new NPrintItemNode();\n nPrintItemNode.setnExprNode(NExprNode.INSTANCE());\n\n TreeNode printitem = nPrintItemNode.make(parser);\n\n assertEquals(TreeNode.NUNDEF, printitem.getValue());\n\n }",
"@Test(timeout = 4000)\n public void test019() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\">6_XdrPl\");\n Token token0 = xPathLexer0.relationalOperator();\n assertNotNull(token0);\n assertEquals(\">\", token0.getTokenText());\n assertEquals(9, token0.getTokenType());\n \n Token token1 = xPathLexer0.rightParen();\n assertEquals(2, token1.getTokenType());\n assertEquals(\"6\", token1.getTokenText());\n \n char char0 = xPathLexer0.LA(0);\n assertEquals('6', char0);\n }",
"private final boolean IsBinaryOp(String expression, String symbol, String leftExpression, String rightExpression) {\r\n boolean isBinaryOp = false;\r\n if (expression.contains(symbol)) {\r\n int openParanthesisCount = 0;\r\n int closeParanthesisCount = 0;\r\n for (int i = 0; (i < expression.length()); i++) {\r\n String currentChar = expression.substring(i, 1);\r\n if ((currentChar.equals(symbol) \r\n && (openParanthesisCount == closeParanthesisCount))) {\r\n leftExpression = expression.substring(0, i);\r\n rightExpression = expression.substring((i + 1), (expression.length() - (i - 1)));\r\n isBinaryOp = true;\r\n break;\r\n }\r\n else if (currentChar.equals(\"(\")) {\r\n openParanthesisCount++;\r\n }\r\n else if (currentChar.equals(\")\")) {\r\n closeParanthesisCount++;\r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n return isBinaryOp;\r\n }",
"private boolean containsOperands(final String exp)\n {\n for (int i = 0; i < 10; i++) {\n if (exp.contains(\"\"+i))\n return true; //Expression contains a digit\n }\n return false; //Expression does not contain digits\n }",
"@Test(timeout = 4000)\n public void test039() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"[ (\");\n xPathLexer0.consume((-663));\n // Undeclared exception!\n try { \n xPathLexer0.operatorName();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }",
"LogicExpression getLeftExp();",
"@Test(timeout = 4000)\n public void test162() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"com.werken.saxpath.XPathLexer\");\n xPathLexer0.rightParen();\n xPathLexer0.notEquals();\n xPathLexer0.nextToken();\n Token token0 = xPathLexer0.identifierOrOperatorName();\n assertNull(token0);\n }",
"@Test(timeout = 4000)\n public void test070() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer();\n xPathLexer0.nextToken();\n xPathLexer0.setXPath(\"y]jad[mR3w=N\");\n xPathLexer0.leftParen();\n xPathLexer0.doubleColon();\n Token token0 = xPathLexer0.identifierOrOperatorName();\n assertNull(token0);\n }",
"public interface Unary extends Expr \n{\n /** Unary expression operator. */\n public static enum Operator {\n BIT_NOT (\"~\", true),\n NEG (\"-\", true),\n POST_INC (\"++\", false),\n POST_DEC (\"--\", false),\n PRE_INC (\"++\", true),\n PRE_DEC (\"--\", true),\n POS (\"+\", true),\n NOT (\"!\", true),\n CARET (\"^\", true),\n BAR (\"|\", true),\n AMPERSAND(\"&\", true),\n STAR (\"*\", true),\n SLASH (\"/\", true),\n PERCENT (\"%\", true);\n\n protected boolean prefix;\n protected String name;\n\n private Operator(String name, boolean prefix) {\n this.name = name;\n this.prefix = prefix;\n }\n\n /** Returns true of the operator is a prefix operator, false if\n * postfix. */\n public boolean isPrefix() { return prefix; }\n\n @Override public String toString() { return name; }\n }\n\n public static final Operator BIT_NOT = Operator.BIT_NOT;\n public static final Operator NEG = Operator.NEG;\n public static final Operator POST_INC = Operator.POST_INC;\n public static final Operator POST_DEC = Operator.POST_DEC;\n public static final Operator PRE_INC = Operator.PRE_INC;\n public static final Operator PRE_DEC = Operator.PRE_DEC;\n public static final Operator POS = Operator.POS;\n public static final Operator NOT = Operator.NOT;\n public static final Operator CARET = Operator.CARET;\n public static final Operator BAR = Operator.BAR;\n public static final Operator AMPERSAND = Operator.AMPERSAND;\n public static final Operator STAR = Operator.STAR;\n public static final Operator SLASH = Operator.SLASH;\n public static final Operator PERCENT = Operator.PERCENT;\n\n /** The sub-expression on that to apply the operator. */\n Expr expr();\n /** Set the sub-expression on that to apply the operator. */\n Unary expr(Expr e);\n\n /** The operator to apply on the sub-expression. */\n Operator operator();\n /** Set the operator to apply on the sub-expression. */\n Unary operator(Operator o);\n}",
"Expression() { }",
"@Test\n\tpublic void parenthesses_should_notbalanced_expr()\n\t{\n\t\tString result=\"\";String expr=\"\";\n\t\t\n\t\texpr=\"(a+b(a+c)\";\n\t\t result=com.bridgelabz.util.DataStructure.BalanaceParenthes(expr);\n\t\tassertTrue(\"not balanced\", result!=\"balaced\");\n\t}",
"public binary_ex(String expression) {\n try {\n fullExpression = expression.trim();\n if (expression.contains(\"*\"))\n splitExpression(expression, \"*\");\n else if (expression.contains(\"/\"))\n splitExpression(expression, \"/\");\n else if (expression.contains(\"+\"))\n splitExpression(expression, \"+\");\n else if (expression.contains(\"-\"))\n splitExpression(expression, \"-\");\n else if (expression.contains(\"%\"))\n splitExpression(expression, \"%\");\n else if (expression.contains(\"\\\\\"))\n splitExpression(expression, \"\\\\\");\n else\n throw new JuliaSyntaxException(\"arith\");\n } catch (JuliaSyntaxException e) {\n\n }\n }",
"public Node Infix2BT(String infix) {\r\n char[] a = infix.toCharArray();\r\n String[] tempb = new String[a.length];\r\n int arraysize = 0;\r\n for (int i = 0; i < a.length - 1; i++) {\r\n tempb[i] = infix.subSequence(i, i + 1).toString();\r\n int tempcount = i;\r\n if (tempb[i].equals(\"\"+\"\") == false && tempb[i].equals(\"\"-\"\") == false && tempb[i].equals(\"\"*\"\") == false && tempb[i].equals(\"\"/\"\") == false && tempb[i].equals(\"\"(\"\") == false && tempb[i].equals(\"\")\"\") == false) {\r\n for (int j = i + 1; j < a.length - 1; j++) {\r\n String tempbb = infix.subSequence(j, j + 1).toString();\r\n if (tempbb.equals(\"\"+\"\") == false && tempbb.equals(\"\"-\"\") == false && tempbb.equals(\"\"*\"\") == false && tempbb.equals(\"\"/\"\") == false && tempbb.equals(\"\"(\"\") == false && tempbb.equals(\"\")\"\") == false) {\r\n tempcount = j;\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n if (tempcount != i) {\r\n tempb[i] = infix.subSequence(i, tempcount + 1).toString();\r\n i = tempcount;\r\n }\r\n }\r\n arraysize++;\r\n }\r\n int idx = 0;\r\n b = new String[arraysize];\r\n for (int i = 0; i < tempb.length; i++) {\r\n if (tempb[i] != null) {\r\n b[idx] = tempb[i];\r\n System.out.print(b[idx]);\r\n idx++;\r\n }\r\n }\r\n \r\n root = new Node(null, null, null);\r\n //若為(1+(1+1))的形式\r\n Stack<String> stack = new Stack<String>();\r\n if (b[2].equals(\"\"+\"\") || b[2].equals(\"\"-\"\") || b[2].equals(\"\"*\"\") || b[2].equals(\"\"/\"\")) {\r\n root.setValue(b[2]);\r\n Node temp = new Node(null, null, b[1]);\r\n root.setLeft(temp);\r\n int checknum = 0;\r\n Node connectnode = new Node(null, null, null);\r\n if ((b.length - 1 - 3) >= 3) {\r\n for (int i = 3; i < b.length; i++) {\r\n if (checknum == 0) {\r\n if (b[i].equals(\"\")\"\") != true) {\r\n stack.push(b[i]);\r\n } else {\r\n\r\n String rightvalue = stack.pop();\r\n Node righttemp = new Node(null, null, rightvalue);\r\n String operator = stack.pop();\r\n String leftvalue = stack.pop();\r\n Node lefttemp = new Node(null, null, leftvalue);\r\n Node temproot = new Node(lefttemp, righttemp, operator);\r\n connectnode = temproot;\r\n stack.pop(); //remove the nearest '('}\r\n checknum = 1;\r\n\r\n }\r\n } else {\r\n if (b[i].equals(\"\")\"\") != true) {\r\n stack.push(b[i]);\r\n } else {\r\n String in = stack.pop();\r\n if (in.equals(\"\"+\"\") || in.equals(\"\"-\"\") || in.equals(\"\"*\"\") || in.equals(\"\"/\"\")) {\r\n String operator = in;\r\n String leftvalue = stack.pop();\r\n Node lefttemp = new Node(null, null, leftvalue);\r\n Node temproot = new Node(lefttemp, connectnode, operator);\r\n connectnode = temproot;\r\n stack.pop(); //remove the nearest '('}\r\n } else {\r\n String rightvalue = in;\r\n Node righttemp = new Node(null, null, rightvalue);\r\n String operator = stack.pop();\r\n Node temproot = new Node(connectnode, righttemp, operator);\r\n connectnode = temproot;\r\n stack.pop(); //remove the nearest '('}\r\n }\r\n }\r\n }\r\n }\r\n root.setRight(connectnode);\r\n } else {\r\n temp = new Node(null, null, b[3]);\r\n root.setRight(temp);\r\n }\r\n } //若為((1+1)+1)的形式\r\n else if (b[b.length- 2].equals(\"\"+\"\") || b[b.length - 2].equals(\"\"-\"\") || b[b.length - 2].equals(\"\"*\"\") || b[b.length - 2].equals(\"\"/\"\")) {\r\n root.setValue(b[b.length - 2]);\r\n Node temp = new Node(null, null, b[b.length - 1]);\r\n root.setRight(temp);\r\n int checknum = 0;\r\n Node connectnode = new Node(null, null, null);\r\n for (int i = 0; i < b.length - 2; i++) {\r\n if (checknum == 0) {\r\n if (b[i].equals(\"\")\"\") != true) {\r\n stack.push(b[i]);\r\n } else {\r\n String rightvalue = stack.pop();\r\n Node righttemp = new Node(null, null, rightvalue);\r\n String operator = stack.pop();\r\n String leftvalue = stack.pop();\r\n Node lefttemp = new Node(null, null, leftvalue);\r\n Node temproot = new Node(lefttemp, righttemp, operator);\r\n connectnode = temproot;\r\n stack.pop(); //remove the nearest '('}\r\n checknum = 1;\r\n }\r\n } else {\r\n if (b[i].equals(\"\")\"\") != true) {\r\n stack.push(b[i]);\r\n } else {\r\n String in = stack.pop();\r\n if (in.equals(\"\"+\"\") || in.equals(\"\"-\"\") || in.equals(\"\"*\"\") || in.equals(\"\"/\"\")) {\r\n String operator = in;\r\n String leftvalue = stack.pop();\r\n Node lefttemp = new Node(null, null, leftvalue);\r\n Node temproot = new Node(lefttemp, connectnode, operator);\r\n connectnode = temproot;\r\n stack.pop(); //remove the nearest '('}\r\n } else {\r\n String rightvalue = in;\r\n Node righttemp = new Node(null, null, rightvalue);\r\n String operator = stack.pop();\r\n Node temproot = new Node(connectnode, righttemp, operator);\r\n connectnode = temproot;\r\n stack.pop(); //remove the nearest '('}\r\n }\r\n }\r\n }\r\n }\r\n root.setLeft(connectnode);\r\n }//若為((1+1)+(1+1))的形式\r\n else {\r\n int rootposition = 0;\r\n for (int i = 0; i < b.length; i++) {\r\n if (b[i].equals(\"\")\"\") || b[i + 2].equals(\"\"(\"\")) {\r\n rootposition = i + 1;\r\n break;\r\n }\r\n }\r\n root.setValue(b[rootposition]);\r\n int checknum = 0;\r\n Node connectnode = new Node(null, null, null);\r\n for (int i = 0; i < rootposition; i++) { //先連接root左邊\r\n if (checknum == 0) {\r\n if (b[i].equals(\"\")\"\") != true) {\r\n stack.push(b[i]);\r\n } else {\r\n String rightvalue = stack.pop();\r\n Node righttemp = new Node(null, null, rightvalue);\r\n String operator = stack.pop();\r\n String leftvalue = stack.pop();\r\n Node lefttemp = new Node(null, null, leftvalue);\r\n Node temproot = new Node(lefttemp, righttemp, operator);\r\n connectnode = temproot;\r\n stack.pop(); //remove the nearest '('}\r\n checknum = 1;\r\n }\r\n } else {\r\n if (b[i].equals(\"\")\"\") != true) {\r\n stack.push(b[i]);\r\n } else {\r\n String in = stack.pop();\r\n if (in.equals(\"\"+\"\") || in.equals(\"\"-\"\") || in.equals(\"\"*\"\") || in.equals(\"\"/\"\")) {\r\n String operator = in;\r\n String leftvalue = stack.pop();\r\n Node lefttemp = new Node(null, null, leftvalue);\r\n Node temproot = new Node(lefttemp, connectnode, operator);\r\n connectnode = temproot;\r\n stack.pop(); //remove the nearest '('}\r\n } else {\r\n String rightvalue = in;\r\n Node righttemp = new Node(null, null, rightvalue);\r\n String operator = stack.pop();\r\n Node temproot = new Node(connectnode, righttemp, operator);\r\n connectnode = temproot;\r\n stack.pop(); //remove the nearest '('}\r\n }\r\n }\r\n }\r\n }\r\n root.setLeft(connectnode);\r\n checknum = 0;\r\n for (int i = rootposition + 1; i < b.length; i++) { //再連接root右邊\r\n if (checknum == 0) {\r\n if (b[i].equals(\"\")\"\") != true) {\r\n stack.push(b[i]);\r\n } else {\r\n String rightvalue = stack.pop();\r\n Node righttemp = new Node(null, null, rightvalue);\r\n String operator = stack.pop();\r\n String leftvalue = stack.pop();\r\n Node lefttemp = new Node(null, null, leftvalue);\r\n Node temproot = new Node(lefttemp, righttemp, operator);\r\n connectnode = temproot;\r\n stack.pop(); //remove the nearest '('}\r\n checknum = 1;\r\n }\r\n } else {\r\n if (b[i].equals(\"\")\"\") != true) {\r\n stack.push(b[i]);\r\n } else {\r\n String in = stack.pop();\r\n if (in.equals(\"\"+\"\") || in.equals(\"\"-\"\") || in.equals(\"\"*\"\") || in.equals(\"\"/\"\")) {\r\n String operator = in;\r\n String leftvalue = stack.pop();\r\n Node lefttemp = new Node(null, null, leftvalue);\r\n Node temproot = new Node(lefttemp, connectnode, operator);\r\n connectnode = temproot;\r\n stack.pop(); //remove the nearest '('}\r\n } else {\r\n String rightvalue = in;\r\n Node righttemp = new Node(null, null, rightvalue);\r\n String operator = stack.pop();\r\n Node temproot = new Node(connectnode, righttemp, operator);\r\n connectnode = temproot;\r\n stack.pop(); //remove the nearest '('}\r\n }\r\n }\r\n }\r\n }\r\n root.setRight(connectnode);\r\n }\r\n\r\n return root;\r\n }\r\n\r\n private void Prefixtraversal(Node x, Queue<Node> q) {\r\n if (x == null) {\r\n return;\r\n }\r\n q.enqueue(x);\r\n Prefixtraversal(x.getLeft(), q);\r\n Prefixtraversal(x.getRight(), q);\r\n }\r\n\r\n public Node[] PrintPrefix() {\r\n if (this.root == null) {\r\n System.out.println(\"\"NullPointerException\"\");\r\n return null;\r\n }\r\n Queue<Node> q = new Queue<Node>();\r\n Prefixtraversal(this.root, q);\r\n \r\n Node[] prefix = new Node[(b.length + 2) / 2];\r\n for (int i = 0; i < prefix.length; i++) {\r\n prefix[i] = q.dequeue();\r\n // System.out.println(prefix[i].getValue());\r\n }\r\n return prefix;\r\n }\r\n\r\n private void Postfixtraversal(Node x, Queue<Node> q) {\r\n if (x == null) {\r\n return;\r\n }\r\n Postfixtraversal(x.getLeft(), q);\r\n Postfixtraversal(x.getRight(), q);\r\n q.enqueue(x);\r\n }\r\n\r\n public Node[] PrintPostfix() {\r\n if (this.root == null) {\r\n System.out.println(\"\"NullPointerException\"\");\r\n return null;\r\n }\r\n Queue<Node> q = new Queue<Node>();\r\n Postfixtraversal(this.root, q);\r\n Node[] postfix = new Node[(b.length + 2) / 2];\r\n for (int i = 0; i < postfix.length; i++) {\r\n postfix[i] = q.dequeue();\r\n }\r\n return postfix;\r\n }\r\n\r\n public double Evaluation() {\r\n if (this.root == null) {\r\n System.out.println(\"\"NullPointerException\"\");\r\n return 0.0;\r\n }\r\n Node[] c = this.PrintPostfix();\r\n Stack<Double> stack = new Stack<Double>();\r\n for (int i = 0; i < c.length; i++) {\r\n if (c[i].getValue().equals(\"\"+\"\") == false && c[i].getValue().equals(\"\"-\"\") == false && c[i].getValue().equals(\"\"*\"\") == false && c[i].getValue().equals(\"\"/\"\") == false) {\r\n stack.push(Double.valueOf(c[i].getValue()));\r\n } else {\r\n double num2 = 0.0;\r\n double num1 = 0.0;\r\n switch (c[i].getValue()) {\r\n case \"\"+\"\":\r\n num2 = stack.pop();\r\n num1 = stack.pop();\r\n stack.push(num1 + num2);\r\n break;\r\n case \"\"-\"\":\r\n num2 = stack.pop();\r\n num1 = stack.pop();\r\n stack.push(num1 - num2);\r\n break;\r\n case \"\"*\"\":\r\n num2 = stack.pop();\r\n num1 = stack.pop();\r\n stack.push(num1 * num2);\r\n break;\r\n case \"\"/\"\":\r\n num2 = stack.pop();\r\n num1 = stack.pop();\r\n stack.push(num1 / num2);\r\n break;\r\n }\r\n }\r\n\r\n }\r\n double answer = stack.pop();\r\n return answer;\r\n }\r\n\r\n public static void main(String[] args) {\r\n// Expression b = new Expression();\r\n// //Node a = b.Infix2BT(\"\"(4+(((4*2)/2)/3))\"\");\r\n// // Node a = b.Infix2BT(\"\"(12+12)\"\");\r\n// Node a = b.Infix2BT(\"\"((1+1)+(1+1))\"\");\r\n// Node[] c = b.PrintPrefix();\r\n// for (int i = 0; i < c.length; i++) {\r\n// System.out.print(c[i].getValue());\r\n// }\r\n// System.out.println(\"\" \"\");\r\n// c = b.PrintPostfix();\r\n// for (int i = 0; i < c.length; i++) {\r\n// System.out.print(c[i].getValue());\r\n// }\r\n// b.Evaluation();\r\n// System.out.println(\"\" \"\");\r\n// System.out.println(b.Evaluation());\r\n\r\n }\r\n}",
"private void processOperator() {\r\n\t\tif (expression[currentIndex] == '*') {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.AND_STRING);\r\n\t\t} else if (expression[currentIndex] == '+') {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.OR_STRING);\r\n\t\t} else if (expression[currentIndex] == '!') {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.NOT_STRING);\r\n\t\t} else {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.XOR_STRING);\r\n\t\t\t// xor operator has 2 characters more than any other operator.\r\n\t\t\tcurrentIndex += 2;\r\n\t\t}\r\n\r\n\t\tcurrentIndex++;\r\n\t}",
"@Test(timeout = 4000)\n public void test088() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"<y\");\n Token token0 = xPathLexer0.leftParen();\n assertEquals(\"<\", token0.getTokenText());\n assertEquals(1, token0.getTokenType());\n \n Token token1 = xPathLexer0.nextToken();\n assertEquals(\"y\", token1.getTokenText());\n assertEquals(15, token1.getTokenType());\n }"
] | [
"0.731527",
"0.7090504",
"0.6892176",
"0.64394957",
"0.6415602",
"0.6344996",
"0.6239656",
"0.6235181",
"0.6209506",
"0.6169098",
"0.61239386",
"0.6116347",
"0.61067665",
"0.6037107",
"0.6029156",
"0.6026183",
"0.601115",
"0.59992296",
"0.5996971",
"0.59913355",
"0.59646386",
"0.5957127",
"0.5955842",
"0.59371924",
"0.5926258",
"0.59039766",
"0.589057",
"0.58814836",
"0.58766174",
"0.5867043",
"0.586584",
"0.58641756",
"0.5855602",
"0.5851279",
"0.58482796",
"0.5842857",
"0.5840567",
"0.5834577",
"0.58318484",
"0.58226794",
"0.5820984",
"0.5810698",
"0.5806438",
"0.58057857",
"0.5793751",
"0.5783199",
"0.57807976",
"0.5777575",
"0.57747",
"0.5773316",
"0.57716185",
"0.5766223",
"0.57643646",
"0.57605356",
"0.57266533",
"0.5726413",
"0.57262",
"0.57166314",
"0.5714044",
"0.5705713",
"0.5702576",
"0.56971556",
"0.5690668",
"0.5688079",
"0.5678105",
"0.5672069",
"0.56599057",
"0.56478083",
"0.5642248",
"0.56418324",
"0.56405264",
"0.56360537",
"0.56342024",
"0.56264085",
"0.562496",
"0.56155926",
"0.5613218",
"0.5605361",
"0.5595978",
"0.5586952",
"0.5585799",
"0.5579593",
"0.5578212",
"0.5574527",
"0.55727637",
"0.5571322",
"0.55707234",
"0.55706936",
"0.55680513",
"0.5567138",
"0.5565715",
"0.55571425",
"0.55537266",
"0.5550945",
"0.55497694",
"0.55486315",
"0.55454165",
"0.5542156",
"0.5536884",
"0.5536214"
] | 0.754587 | 0 |
Wait until user comes to this tab before making the networking call. Also only make the networking call the first time the user comes to the tab. | @Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
if (isVisibleToUser && !alreadyMadeApplicationsApiCall) {
alreadyMadeApplicationsApiCall = true;
fetchItemsWithUrl(getActivity(), ApiManager.getApprovedApplicationsUrl());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void doWhenNetworkCame() {\n doLogin();\n }",
"public void resetRoster() {\r\n\r\n\t\tif (NetworkAvailabilityReceiver.isInternetAvailable(ThatItApplication.getApplication())) {\r\n\r\n\t\t\tif(MainService.mService.connection.isConnected() && MainService.mService.connection.isAuthenticated()){\r\n\t\t\t\thandler.post(new Runnable() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tUtility.FragmentContactDataFetchedOnce =false;\r\n\t\t\t\t\t\tUtility.VcardLoadedOnce = false;\r\n\t\t\t\t\t\tcallWebServiceData();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t}else{\r\n\t\t\t\tUtility.showMessage(\"Please wait while connection is restored\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tUtility.showMessage(getResources().getString(R.string.Network_Availability));\r\n\t\t}\r\n\t}",
"public void finishNativeInitialization() {\n if (IntentHandler.getExtraHeadersFromIntent(mIntent) != null) {\n mConnection.cancelSpeculation(mSession);\n }\n\n TabModelOrchestrator tabModelOrchestrator = mTabFactory.getTabModelOrchestrator();\n TabModelSelectorBase tabModelSelector = tabModelOrchestrator.getTabModelSelector();\n\n TabModel tabModel = tabModelSelector.getModel(mIntentDataProvider.isIncognito());\n tabModel.addObserver(mTabObserverRegistrar);\n\n finalizeCreatingTab(tabModelOrchestrator, tabModel);\n Tab tab = mTabProvider.getTab();\n assert tab != null;\n assert mTabProvider.getInitialTabCreationMode() != TabCreationMode.NONE;\n\n // Put Sync in the correct state by calling tab state initialized. crbug.com/581811.\n tabModelSelector.markTabStateInitialized();\n\n // Notify ServiceTabLauncher if this is an asynchronous tab launch.\n if (mIntent.hasExtra(ServiceTabLauncher.LAUNCH_REQUEST_ID_EXTRA)) {\n ServiceTabLauncher.onWebContentsForRequestAvailable(\n mIntent.getIntExtra(ServiceTabLauncher.LAUNCH_REQUEST_ID_EXTRA, 0),\n tab.getWebContents());\n }\n\n updateEngagementSignalsHandler();\n }",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n this.dialog.setMessage(waitMsg);\n this.dialog.setCancelable(false); //don't dismiss on outside touches\n this.dialog.show();\n\n ConnectivityManager connMgr = (ConnectivityManager) getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n\n /*\n ConnectivityManager Class that answers queries about the state of network connectivity.\n It also notifies applications when network connectivity changes.\n\n The getActiveNetworkInfo() method of ConnectivityManager returns a NetworkInfo instance\n representing the first connected network interface it can find or null if none if the\n interfaces are connected. Checking if this method returns null should be enough to tell\n if an internet connection is available.\n */\n\n if (networkInfo != null && networkInfo.isConnected()) {\n url = \"http://m.myapartmentmap.com/list/colleges/ma/boston_college/?page_num=\" + pagenum;\n } else {\n// chosenCity.setText(getString(R.string.noNetworkError));\n Log.e(\"Network Error\", \"No network connection\");\n try {\n // thread to sleep for 100 milliseconds\n Thread.sleep(100);\n } catch (Exception e) {\n System.out.println(e);\n }\n //onDestroy();\n onStop();\n }\n\n }",
"@Override\n protected void onResume() {\n super.onResume();\n if (connection.isOnline(this)) new LoadMeetsAsync().execute();\n fab_toolbar.hide();\n }",
"@Override\n\tprotected void onPreExecute() {\n\t\tpd.setMessage(\"Wait Connecting\");\n\t\tpd.show();\n\t\tsuper.onPreExecute();\n\t}",
"public void waitLoadPage() {\n WebDriverHelper.waitUntil(inputTeamName);\n }",
"private void onTabStateInitializedForReauth() {\n mIncognitoReauthPending = mTabModelSelector.getModel(/*incognito=*/true).getCount() > 0\n && mIsIncognitoReauthPendingOnRestoreSupplier.get();\n showDialogIfRequired();\n }",
"public void readyToReceive()\n { ua.printLog(\"WAITING FOR INCOMING CALL\");\n if (!ua.ua_profile.audio && !ua.ua_profile.video) ua.printLog(\"ONLY SIGNALING, NO MEDIA\"); \n //ua.listen();\n changeStatus(UA_IDLE);\n printOut(\"digit the callee's URL to make a call or press 'enter' to exit\");\n }",
"private void loadPage() {\n \t\n if (((sPref.equals(ANY)) && (wifiConnected || mobileConnected))\n || ((sPref.equals(WIFI)) && (wifiConnected))) {\n // AsyncTask subclass\n \t\n new DownloadXmlTask().execute(URL);\n } else {\n showErrorPage();\n }\n }",
"public void waitingForPartner();",
"@Override\n protected void onPreExecute() {\n if (!networkAvailability.isNetworkAvailable()) {\n this.cancel(true);\n rl_container_login.removeView(loaderView);\n //for enable the screen\n getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n alertDialoge.showAlertDialog(\"single\", \"No internet\", \"Please check your internet connection !\");\n }\n }",
"public void loadPage() { \n\t \n\t if((sPref.equals(ANY)) && (wifiConnected || mobileConnected)) {\n\t \tnew DownloadXmlTask().execute(URL);\n\t }\n\t else if ((sPref.equals(WIFI)) && (wifiConnected)) {\n\t new DownloadXmlTask().execute(URL);\n\t } else {\n\t // show error\n\t } \n\t }",
"public void waitForDecision(){\n if(gameOver) {\n return;\n }\n if(!decisionActive) {\n try {\n uiWaiting = true;\n synchronized(uiWait) {\n uiWait.wait();\n }\n } catch (Exception e) { logger.log(\"\"+e); }\n }\n }",
"public static void waitForPageLoad() {\n\n\t\tif (!WebController.driver.getCurrentUrl().contains(\"uhc.com/dashboard\") && !WebController.driver.getCurrentUrl().contains(\"myuhc.com/member/\") && !WebController.driver.getCurrentUrl().contains(\"=securityQuestion\")) {\n\t\t\tWaitForLoadingOverlay();\n\t\t}\n\n\t\tJavascriptExecutor js = null;\n\t\tfor (int i = 0; i < AppConfiguration.getWaitTime(); i++) {\n\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tjs = (JavascriptExecutor) WebController.driver;\n\t\t\tif (js.executeScript(\"return document.readyState\").toString().equals(\"complete\"))\n\t\t\t\tbreak;\n\n\t\t}\n\t}",
"public void initData() {\n ConnectivityManager connMgr = (ConnectivityManager)\n getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);\n\n // Get details on the currently active default data network\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n\n // If there is a network connection, fetch data\n if (networkInfo != null && networkInfo.isConnected()) {\n // Get a reference to the LoaderManager, in order to interact with loaders.\n LoaderManager loaderManager = getLoaderManager();\n\n // number the loaderManager with mPage as may be requesting up to three lots of JSON for each tab\n loaderManager.initLoader(FETCH_STOCK_PICKING_LOADER_ID, null, loadStockPickingFromServerListener);\n } else {\n // Otherwise, display error\n // First, hide loading indicator so error message will be visible\n View loadingIndicator = getView().findViewById(R.id.loading_spinner);\n loadingIndicator.setVisibility(View.GONE);\n\n // Update empty state with no connection error message\n mEmptyStateTextView.setText(R.string.error_no_internet_connection);\n }\n }",
"@Override\n public void run() {\n if (mClient.getWebContents() == null) return;\n\n // If the launch was from an External app, Chrome came from the background and\n // acted as an intermediate link redirector between two apps (crbug.com/487938).\n if (mClient.wasTabLaunchedFromExternalApp()) {\n if (mClient.getOrCreateRedirectHandler().wasTaskStartedByExternalIntent()) {\n // If Chrome was only launched to perform a redirect, don't keep its\n // task in history.\n mClient.getActivity().finishAndRemoveTask();\n } else {\n // Takes Chrome out of the back stack.\n mClient.getActivity().moveTaskToBack(false);\n }\n }\n // Closing tab must happen after we potentially call finishAndRemoveTask, as\n // closing tabs can lead to the Activity being finished, which would cause\n // Android to ignore the finishAndRemoveTask call, leaving the task around.\n mClient.closeTab();\n }",
"private void authentication() {\n if(getSmartApplication().readSharedPreferences().getString(SP_LAST_REQUEST_TIME,\"\").length()<=0){\n lnrSync.setVisibility(View.VISIBLE);\n txtSync.setText(getString(R.string.sync_with_server));\n globalConfiguration.loadGlobalConfiguration(new WebCallListener() {\n\n @Override\n public void onProgressUpdate(int progressCount) {\n }\n\n @Override\n public void onCallComplete(int responseCode, String errorMessage,\n ArrayList<HashMap<String, String>> data1, Object data2) {\n if (responseCode == 200) {\n globalConfiguration.loadAllData(true,\"1\",getLastRequestTime(),new WebCallListener() {\n @Override\n public void onCallComplete(final int responseCode, String errorMessage, ArrayList<HashMap<String, String>> data1, Object data2) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (responseCode == 200) {\n setLastRequestTime();\n getSmartApplication().writeSharedPreferences(SP_LAST_REQUEST_TIME,getLastRequestTime());\n lnrSync.setVisibility(View.GONE);\n lnrMain.setVisibility(View.VISIBLE);\n txtLoadingMsg.setText(getString(R.string.alert_loading_media));\n skProgress.setProgress(0);\n txtProgress.setText(\"0/0\");\n getSmartApplication().writeSharedPreferences(SP_ALLIMAGEDOWNLOADED,\"false\");\n new SobiproCategoriesDataProvider(IjoomerSplashActivity.this).startDownloadEntryImages(new ImageDownloadListener(){\n @Override\n public void onImgeDownload(int total, int countProgress) {\n if (countProgress < 0) {\n IjoomerUtilities.getCustomOkDialog(getString(R.string.splash),\n getString(getResources().getIdentifier(\"code\" + (599), \"string\", getPackageName())),\n getString(R.string.ok), R.layout.ijoomer_ok_dialog, new CustomAlertNeutral() {\n\n @Override\n public void NeutralMethod() {\n finish();\n }\n });\n } else {\n skProgress.setMax(total);\n skProgress.setProgress(countProgress);\n txtProgress.setText((countProgress) + \"/\" + (total));\n }\n }\n\n @Override\n public void onTaskComplete() {\n lnrMain.setVisibility(View.GONE);\n getSmartApplication().writeSharedPreferences(SP_ALLIMAGEDOWNLOADED,\"true\");\n try {\n loadNew(IjoomerHomeActivity.class,\n IjoomerSplashActivity.this, true,\n \"IN_USERID\", \"0\", \"IN_PRIVIOUS_ACTIVITY\",IN_PRIVIOUS_ACTIVITY);\n } catch (Throwable e1) {\n e1.printStackTrace();\n }\n }\n });\n\n }else{\n responseMessageHandler(responseCode, true);\n }\n }\n });\n\n }\n\n @Override\n public void onProgressUpdate(final int progressCount) {\n\n }\n });\n }else{\n responseMessageHandler(responseCode, true);\n }\n }\n });\n }else{\n lnrSync.setVisibility(View.VISIBLE);\n txtSync.setText(getString(R.string.sync_with_server));\n if(SmartApplication.REF_SMART_APPLICATION.readSharedPreferences().getString(SP_LNAGUAGE,\"\").equals(\"es\")){\n globalConfiguration.loadConfigurationForSpanish(new WebCallListener() {\n\n @Override\n public void onProgressUpdate(int progressCount) {\n }\n\n @Override\n public void onCallComplete(int responseCode, String errorMessage,ArrayList<HashMap<String, String>> data1, Object data2) {\n if(responseCode==599){\n lnrSync.setVisibility(View.GONE);\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n try {\n loadNew(IjoomerHomeActivity.class,IjoomerSplashActivity.this, true,\"IN_USERID\", \"0\",\"IN_PRIVIOUS_ACTIVITY\",IN_PRIVIOUS_ACTIVITY);\n } catch (Throwable e1) {\n e1.printStackTrace();\n }\n }\n },1000);\n\n }else{\n globalConfiguration.loadAllData(false, \"0\", getLastRequestTime(), new WebCallListener() {\n @Override\n public void onCallComplete(int responseCode, String errorMessage, ArrayList<HashMap<String, String>> data1, Object data2) {\n getSmartApplication().writeSharedPreferences(SP_LAST_REQUEST_TIME, getLastRequestTime());\n if (responseCode == 200) {\n setLastRequestTime();\n if(getSmartApplication().readSharedPreferences().getString(SP_ALLIMAGEDOWNLOADED,\"false\").equals(\"false\")){\n lnrMain.setVisibility(View.VISIBLE);\n txtLoadingMsg.setText(getString(R.string.alert_loading_media));\n skProgress.setProgress(0);\n txtProgress.setText(\"0/0\");\n getSmartApplication().writeSharedPreferences(SP_ALLIMAGEDOWNLOADED,\"false\");\n new SobiproCategoriesDataProvider(IjoomerSplashActivity.this).startDownloadEntryImages(new ImageDownloadListener(){\n @Override\n public void onImgeDownload(int total, int countProgress) {\n if (countProgress < 0) {\n IjoomerUtilities.getCustomOkDialog(getString(R.string.splash),\n getString(getResources().getIdentifier(\"code\" + (599), \"string\", getPackageName())),\n getString(R.string.ok), R.layout.ijoomer_ok_dialog, new CustomAlertNeutral() {\n\n @Override\n public void NeutralMethod() {\n finish();\n }\n });\n } else {\n skProgress.setMax(total);\n skProgress.setProgress(countProgress);\n txtProgress.setText((countProgress) + \"/\" + (total));\n }\n }\n\n @Override\n public void onTaskComplete() {\n lnrMain.setVisibility(View.GONE);\n getSmartApplication().writeSharedPreferences(SP_ALLIMAGEDOWNLOADED,\"true\");\n try {\n loadNew(IjoomerHomeActivity.class,\n IjoomerSplashActivity.this, true,\n \"IN_USERID\", \"0\",\"IN_PRIVIOUS_ACTIVITY\",IN_PRIVIOUS_ACTIVITY);\n } catch (Throwable e1) {\n e1.printStackTrace();\n }\n }\n });\n }else {\n new SobiproCategoriesDataProvider(IjoomerSplashActivity.this).startDownloadEntryImages(new ImageDownloadListener() {\n @Override\n public void onImgeDownload(int total, int countProgress) {\n\n }\n\n @Override\n public void onTaskComplete() {\n lnrSync.setVisibility(View.GONE);\n try {\n loadNew(IjoomerHomeActivity.class, IjoomerSplashActivity.this, true, \"IN_USERID\", \"0\", \"IN_PRIVIOUS_ACTIVITY\", IN_PRIVIOUS_ACTIVITY);\n } catch (Throwable e1) {\n e1.printStackTrace();\n }\n }\n });\n\n }\n } else {\n lnrSync.setVisibility(View.GONE);\n try {\n loadNew(IjoomerHomeActivity.class, IjoomerSplashActivity.this, true, \"IN_USERID\", \"0\", \"IN_PRIVIOUS_ACTIVITY\", IN_PRIVIOUS_ACTIVITY);\n } catch (Throwable e1) {\n e1.printStackTrace();\n }\n }\n }\n\n @Override\n public void onProgressUpdate(int progressCount) {\n\n }\n });\n\n\n\n }\n\n }\n });\n }else{\n globalConfiguration.loadConfigurationForEnglish(new WebCallListener() {\n\n @Override\n public void onProgressUpdate(int progressCount) {\n }\n\n @Override\n public void onCallComplete(int responseCode, String errorMessage,ArrayList<HashMap<String, String>> data1, Object data2) {\n if(responseCode==599){\n lnrSync.setVisibility(View.GONE);\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n try {\n loadNew(IjoomerHomeActivity.class,IjoomerSplashActivity.this, true,\"IN_USERID\", \"0\",\"IN_PRIVIOUS_ACTIVITY\",IN_PRIVIOUS_ACTIVITY);\n } catch (Throwable e1) {\n e1.printStackTrace();\n }\n }\n },1000);\n\n }else{\n globalConfiguration.loadAllData(false, \"0\", getLastRequestTime(), new WebCallListener() {\n @Override\n public void onCallComplete(int responseCode, String errorMessage, ArrayList<HashMap<String, String>> data1, Object data2) {\n getSmartApplication().writeSharedPreferences(SP_LAST_REQUEST_TIME, getLastRequestTime());\n if (responseCode == 200) {\n setLastRequestTime();\n if(getSmartApplication().readSharedPreferences().getString(SP_ALLIMAGEDOWNLOADED,\"false\").equals(\"false\")){\n lnrMain.setVisibility(View.VISIBLE);\n txtLoadingMsg.setText(getString(R.string.alert_loading_media));\n skProgress.setProgress(0);\n txtProgress.setText(\"0/0\");\n getSmartApplication().writeSharedPreferences(SP_ALLIMAGEDOWNLOADED,\"false\");\n new SobiproCategoriesDataProvider(IjoomerSplashActivity.this).startDownloadEntryImages(new ImageDownloadListener(){\n @Override\n public void onImgeDownload(int total, int countProgress) {\n if (countProgress < 0) {\n IjoomerUtilities.getCustomOkDialog(getString(R.string.splash),\n getString(getResources().getIdentifier(\"code\" + (599), \"string\", getPackageName())),\n getString(R.string.ok), R.layout.ijoomer_ok_dialog, new CustomAlertNeutral() {\n\n @Override\n public void NeutralMethod() {\n finish();\n }\n });\n } else {\n skProgress.setMax(total);\n skProgress.setProgress(countProgress);\n txtProgress.setText((countProgress) + \"/\" + (total));\n }\n }\n\n @Override\n public void onTaskComplete() {\n lnrMain.setVisibility(View.GONE);\n getSmartApplication().writeSharedPreferences(SP_ALLIMAGEDOWNLOADED,\"true\");\n try {\n loadNew(IjoomerHomeActivity.class,\n IjoomerSplashActivity.this, true,\n \"IN_USERID\", \"0\",\"IN_PRIVIOUS_ACTIVITY\",IN_PRIVIOUS_ACTIVITY);\n } catch (Throwable e1) {\n e1.printStackTrace();\n }\n }\n });\n }else {\n new SobiproCategoriesDataProvider(IjoomerSplashActivity.this).startDownloadEntryImages(new ImageDownloadListener() {\n @Override\n public void onImgeDownload(int total, int countProgress) {\n\n }\n\n @Override\n public void onTaskComplete() {\n lnrSync.setVisibility(View.GONE);\n try {\n loadNew(IjoomerHomeActivity.class, IjoomerSplashActivity.this, true, \"IN_USERID\", \"0\", \"IN_PRIVIOUS_ACTIVITY\", IN_PRIVIOUS_ACTIVITY);\n } catch (Throwable e1) {\n e1.printStackTrace();\n }\n }\n });\n\n }\n } else {\n lnrSync.setVisibility(View.GONE);\n try {\n loadNew(IjoomerHomeActivity.class, IjoomerSplashActivity.this, true, \"IN_USERID\", \"0\", \"IN_PRIVIOUS_ACTIVITY\", IN_PRIVIOUS_ACTIVITY);\n } catch (Throwable e1) {\n e1.printStackTrace();\n }\n }\n }\n\n @Override\n public void onProgressUpdate(int progressCount) {\n\n }\n });\n\n\n\n }\n\n }\n });\n }\n }\n\n\n }",
"@Override\r\n\tpublic void initData() {\n\t\tThreadUtils.getSinglePool().execute(new Runnable() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(2000);\r\n\t\t\t\t\tIntent intent =null;\r\n\t\t\t\t\tChainApplication application = (ChainApplication) getApplicationContext();\r\n\t\t\t\t\tUser user = application.getUserInfo();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(StringUtils.isEmpty(user.getUser_Name()) && StringUtils.isEmpty(HttpManager.getInstance().getToken(HttpManager.KEY_TOKEN))){\r\n\t\t\t\t\t\tintent = new Intent(getActivity(),LoginActivity.class);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tintent = new Intent(getActivity(), MainActivity.class);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstartActivity(intent);\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"private void callWebServiceData() {\r\n\r\n\t\tif(Utility.FragmentContactDataFetchedOnce){\r\n\t\t\tgetDataFromSharedPrefernce();\r\n\t\t} else {\r\n\t\t\t//Utility.startDialog(activity);\r\n\t\t\tnew GetDataAsynRegistration().execute();\r\n\t\t}\r\n\t}",
"public abstract void onWait();",
"private void restOfTheActivity() {\n if(SharedPrefUtils.hasTrunch(mSharedPreferences)){\n showTrunch();\n }\n loadUserImage();\n long lastTimeDownloaded = SharedPrefUtils.lastTimeDownloaded(mSharedPreferences);\n long timeDifference = System.currentTimeMillis() - lastTimeDownloaded;\n // Compare to MIN_TIME_BETWEEN_JSON_DOWNLOAD and act accordingly.\n if (timeDifference > MIN_TIME_BETWEEN_JSON_DOWNLOAD) {\n // show the splash screen\n mSplashScreenView.setVisibility(View.VISIBLE);\n // go get JSON from server\n downloadJSON();\n\n } else {\n // init tempView\n initTempView();\n }\n }",
"public void checkConnection() {\n\t\tif (isOnline()) {\n\t\t\tgetFirsTopRatedMovies();\n\t\t} else {\n\t\t\tprogress.setVisibility(View.GONE);\n\t\t\tlayout_nothing_to_show.setVisibility(View.VISIBLE);\n\t\t\tToast.makeText(this, getString(R.string.no_netowrk), Toast.LENGTH_SHORT).show();\n\t\t}\n\t}",
"public static void waitWhileLoading()\r\n {\r\n while (isLoading())\r\n ThreadUtil.sleep(10);\r\n }",
"private void startAsyncLoader() {\n if (CheckInternetConnection.isNetworkAvailable(this)) {\n Log.e(\"connection\", \"connection available\");\n if (getLoaderManager().getLoader(ASYNC_LOADER_ID) == null) {\n getLoaderManager().initLoader(ASYNC_LOADER_ID, null, new UpdateDataInfo()).forceLoad();\n } else {\n getLoaderManager().restartLoader(ASYNC_LOADER_ID, null, new UpdateDataInfo()).forceLoad();\n }\n } else {\n showMessageDialog(getResources().getString(R.string.message), getResources().getString(R.string.no_int), 1);\n }\n }",
"@Override\n public void waitUntilPageObjectIsLoaded() {\n }",
"public static void setCallback(final WaitForInternetCallback callback) { \n\t\tfinal ConnectivityManager connMan = (ConnectivityManager) callback.mActivity.getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\tfinal AtomicBoolean isConnected = new AtomicBoolean(connMan.getActiveNetworkInfo() != null && connMan.getActiveNetworkInfo().isConnected());\n\t\tif (isConnected.get()) {\n\t\t\tcallback.onConnectionSuccess();\n\t\t\treturn;\n\t\t}\n\t \n\t\tfinal AtomicBoolean isRetrying = new AtomicBoolean(true);\n\n\t\t/* dialog */\n\t\tfinal AlertDialog.Builder connDialog = new AlertDialog.Builder(callback.mActivity);\n\t\tconnDialog.setTitle(R.string.dialogWaitForInternetTitle);\n\t\tconnDialog.setMessage(R.string.dialogWaitForInternetMessage);\n\t\tconnDialog.setPositiveButton(R.string.dialogWaitForInternetBtnRetry, new DialogInterface.OnClickListener() {\n\t\t\tpublic void onClick(DialogInterface dialogInterface, int i) {\n\t\t\t\tsynchronized (isRetrying) {\n\t\t\t\t\tisRetrying.notify();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tconnDialog.setNegativeButton(R.string.dialogWaitForInternetBtnAbort, new DialogInterface.OnClickListener() {\n\t\t\tpublic void onClick(DialogInterface dialogInterface, int i) {\n\t\t\t\tsynchronized (isRetrying) {\n\t\t\t\t\tisRetrying.set(false);\n\t\t\t\t\tisRetrying.notify();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tnew Thread() {\n\t\t\tpublic void run() {\n\t\t\t\twhile (!isConnected.get() && isRetrying.get()) {\n\t\t\t\t\tcallback.mActivity.runOnUiThread(new Thread() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tconnDialog.show();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tsynchronized (isRetrying) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tisRetrying.wait();\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t//Log.w(\"WaitForInternet\", \"Error waiting for retry lock\", e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tisConnected.set( (connMan.getActiveNetworkInfo() != null && connMan.getActiveNetworkInfo().isConnected()) );\n\t\t\t\t}\n\t\t\t\tif (isConnected.get()) {\n\t\t\t\t\tcallback.onConnectionSuccess();\n\t\t\t\t} else {\n\t\t\t\t\tcallback.onConnectionFailure();\n\t\t\t\t}\n\t\t\t}\n\t\t}.start();\n\t}",
"@Override\n protected void callBeforeDataBack(HemaNetTask netTask) {\n showProgressDialog(\"加载中\");\n }",
"@Override\r\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\twait_time = 0;\r\n\t\t\t\t\t\t\twhile (true) {\r\n\t\t\t\t\t\t\t\tif (HomeView.ble_status == 0\r\n\t\t\t\t\t\t\t\t\t\t|| HomeView.ble_status == 1\r\n\t\t\t\t\t\t\t\t\t\t|| HomeView.ble_status == 2) {\r\n\r\n\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\tscanLeDevice(true);\r\n\t\t\t\t\t\t\t\t\t\tbluetoothSwitch = true;\r\n\t\t\t\t\t\t\t\t\t\tsetUI();\r\n\t\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\twait_time++;\r\n\t\t\t\t\t\t\t\tif (wait_time > 5) {\r\n\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t\t\t\t\t\t\t\twait_time = 0;\r\n\t\t\t\t\t\t\t\t\t\t\tbluetoothSwitch = false;\r\n\t\t\t\t\t\t\t\t\t\t\tsetUI();\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}",
"private void startCall() {\n // If firebase isn't auth don't call\n if (mUser == null) return;\n setupLocalVideo();\n joinChannel();\n }",
"@MainThread\n @Override\n protected void onForceLoad() {\n super.onForceLoad();\n cancelLoadHelper();\n\n makeRequest();\n }",
"public void onModuleLoad() {\n \t\tMainPage.currentPage = this;\n \t\t\n \t\tif(Window.Location.getHash().length() == 0){\n \t\t\tloggedIn = false;\n \t\t}else{\n \t\t\tloggedIn = true;\n \t\t}\n \t\t\n \t\tinitUI();\n \t\t\n \t\tif(loggedIn){\n \t\t\tsetStatus(\"fetching JSON...\", false);\n \t\t\tfbFetcher.fetchNeededJSON();\n \t\t}\n \t\t\n \t}",
"private void fetchData() {\r\n if (fetchDialogDataInBackground != null && fetchDialogDataInBackground.getStatus() != AsyncTask.Status.FINISHED)\r\n fetchDialogDataInBackground.cancel(true);\r\n fetchDialogDataInBackground = new FetchDialogDataInBackground();\r\n fetchDialogDataInBackground.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\r\n }",
"@Override\n\tprotected void onPreExecute() {\n\t\tpleaseWait.setTitle(\"Please wait\");\n\t\tpleaseWait.setMessage(\"Connecting to server\");\n\t\tpleaseWait.show();\n\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(2000);\r\n\t\t\t\t\tIntent intent =null;\r\n\t\t\t\t\tChainApplication application = (ChainApplication) getApplicationContext();\r\n\t\t\t\t\tUser user = application.getUserInfo();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(StringUtils.isEmpty(user.getUser_Name()) && StringUtils.isEmpty(HttpManager.getInstance().getToken(HttpManager.KEY_TOKEN))){\r\n\t\t\t\t\t\tintent = new Intent(getActivity(),LoginActivity.class);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tintent = new Intent(getActivity(), MainActivity.class);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstartActivity(intent);\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}",
"private void getResultsFromApi() {\n if (! isGooglePlayServicesAvailable()) {\n acquireGooglePlayServices();\n } else if (mCredential.getSelectedAccountName() == null) {\n chooseAccount();\n } else if (! isDeviceOnline()) {\n\n Toast.makeText(getApplicationContext(), \"No Network Connection\",\n Toast.LENGTH_SHORT).show();\n mOutputText.setText(\"No network connection available.\");\n } else {\n new MakeRequestTask(mCredential).execute();\n }\n }",
"public Status waitUntilFinished();",
"@Override\n public void onResume() {\n super.onResume();\n Utility.setupForegroundDispatch(this);\n Utility.startConnectivityCheck(this);\n }",
"private void promptInternetConnect() {\n android.support.v7.app.AlertDialog.Builder builder = new android.support.v7.app.AlertDialog.Builder(AdminHomePage.this);\n builder.setTitle(R.string.title_alert_no_intenet);\n builder.setMessage(R.string.msg_alert_no_internet);\n String positiveText = getString(R.string.btn_label_refresh);\n builder.setPositiveButton(positiveText,\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n //Block the Application Execution until user grants the permissions\n if (startStep2(dialog)) {\n //Now make sure about location permission.\n if (checkPermissions()) {\n //Step 2: Start the Location Monitor Service\n //Everything is there to start the service.\n startStep3();\n } else if (!checkPermissions()) {\n requestPermissions();\n }\n }\n }\n });\n android.support.v7.app.AlertDialog dialog = builder.create();\n dialog.show();\n }",
"@Override\n public boolean waitToProceed() {\n return false;\n }",
"void waitForAddStatusIsDisplayed() {\n\t\tSeleniumUtility.waitElementToBeVisible(driver, homepageVehiclePlanning.buttonTagAddStatusHomepageVehiclePlanning);\n\t}",
"private void firstNetworkCall() {\n startIndex = 0;\n getBlockListNetworkCall(getActivity(), startIndex, maxItems);\n }",
"public void listenNetwork()\n {\n final int[] num = {0};\n final Timer timers = new Timer();\n timers.schedule(new TimerTask(){\n @Override\n public void run() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n final Toast toast = Toast.makeText(getApplicationContext(), ++num[0] +\"\",Toast.LENGTH_SHORT );\n //toast.show();\n if(isNetworkAvailable())\n {\n btnLogin.setEnabled(true);\n cardError.setVisibility(View.INVISIBLE);\n }\n else\n {\n btnLogin.setEnabled(false);\n cardError.setVisibility(View.VISIBLE);\n }\n }\n });\n }\n },0,5000);\n }",
"private void loadRecent(ProfileMainProject logInResponce) {\n if (new AppCommonMethods(mContext).isNetworkAvailable()) {\n WLAPIcalls mAPIcall = new WLAPIcalls(mContext, getString(R.string.loginDate), this);\n mAPIcall.profileUpdate(logInResponce);\n } else {\n Toast.makeText(mContext, R.string.no_internet, Toast.LENGTH_SHORT).show();\n }\n }",
"public void onFinish() {\n if (isNetworkAvailable(context)){\n Intent intent = ((Activity)context).getIntent();\n ((Activity) context).finish();\n context.startActivity(intent);\n }\n }",
"private Boolean startStep2(DialogInterface dialog) {\n ConnectivityManager connectivityManager\n = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n\n if (activeNetworkInfo == null || !activeNetworkInfo.isConnected()) {\n promptInternetConnect();\n return false;\n }\n\n if (dialog != null) {\n dialog.dismiss();\n }\n //Yes there is active internet connection. Next check Location is granted by user or not.\n\n if (checkPermissions()) { //Yes permissions are granted by the user. Go to the next step.\n startStep3();\n } else { //No user has not granted the permissions yet. Request now.\n requestPermissions();\n }\n return true;\n }",
"private void sendLoadingMessage() {\n mUIHandler.removeMessages(MSG_GET_ACTIVE_USER);\n mUIHandler.sendMessageDelayed(Message.obtain(mUIHandler, MSG_GET_ACTIVE_USER), DELAY_SEND_MESSAGE_LOADING_MILLIS);\n }",
"private void initializeTab(Tab tab) {\n if (!mIntentDataProvider.isWebappOrWebApkActivity()) {\n RedirectHandlerTabHelper.updateIntentInTab(tab, mIntent);\n tab.getView().requestFocus();\n }\n\n if (!tab.isIncognito()) {\n TabObserver observer = new EmptyTabObserver() {\n @Override\n public void onContentChanged(Tab tab) {\n if (tab.getWebContents() != null) {\n mConnection.setClientDataHeaderForNewTab(mSession, tab.getWebContents());\n }\n }\n };\n tab.addObserver(observer);\n observer.onContentChanged(tab);\n }\n\n // TODO(pshmakov): invert these dependencies.\n // Please don't register new observers here. Instead, inject TabObserverRegistrar in classes\n // dedicated to your feature, and register there.\n mTabObserverRegistrar.registerTabObserver(mCustomTabObserver.get());\n mTabObserverRegistrar.registerTabObserver(mTabNavigationEventObserver);\n mTabObserverRegistrar.registerPageLoadMetricsObserver(\n new PageLoadMetricsObserver(mConnection, mSession, tab));\n mTabObserverRegistrar.registerPageLoadMetricsObserver(\n new FirstMeaningfulPaintObserver(mCustomTabObserver.get(), tab));\n\n // Immediately add the observer to PageLoadMetrics to catch early events that may\n // be generated in the middle of tab initialization.\n mTabObserverRegistrar.addObserversForTab(tab);\n prepareTabBackground(tab);\n }",
"public void waitForContentLoad() {\n verifyPageIsOpened(currentPage.get(), \"Please open some page before the waiting for content to load.\");\n currentPage.get().waitLoadFinished();\n }",
"public void setupTask() {\n\t\tif (!hasInternetConnection()) {\n\t\t\tdlgNoInet.show();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tsetupMessageHandler();\n\t\t\n\t\t// Activate text box if user is logged in.\n\t\tString userid = checkLogin();\n\t\tLog.d(\"TIMER\", \"User logged in: \" + userid);\n\t\tif (userid != null && userid.length() > 0 && etMessage != null) {\n\t\t\tsetupSendMessageListener();\n\t\t\tetMessage.setEnabled(true);\n\t\t\thideVirtualKeyboard();\n\t\t}\n\t\t\n\t\t// Setup the message cursor object.\n\t\tsetupMessageCursor();\n\n\t\t// Start message listener if base url is set.\n\t\tstartMessageListener();\n\t}",
"public synchronized void waitUntilLoad() {\n\t\twhile (!this.loaded) {\n\t\t\tSystem.out.println(\"Waiting for news to load\");\n\t\t\ttry {\n\t\t\t\twait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t}\n\t\t}\n\t}",
"private void waitUntilReady() {\n\t\t\twhile (deque.isEmpty() && loadThread.isAlive()) {\n//\t\t\t\ttry {\n//\t\t\t\t\tThread.sleep(100);\n//\t\t\t\t} catch (InterruptedException e) {\n//\t\t\t\t\tExceptionUtils.throwAsRuntimeException(e);\n//\t\t\t\t}\n\t\t\t}\n\t\t}",
"public void connect() {\n\t\tint index = shell.getConnectionsCombo().getSelectionIndex();\n\t\tif (profiles.length == 0 || index < 0 || index >= profiles.length) {\n\t\t\tupdateSelection();\n\t\t\treturn;\n\t\t}\n\t\tIConnectionProfile profile = profiles[index];\n\t\tshell.setEnabled(false);\n\t\tnetworkManager.connect(profile, (s, r) -> {\n\t\t\tif (s) {\n\t\t\t\tcompleted = true;\n\t\t\t\tclose();\n\t\t\t} else {\n\t\t\t\tplugin.sync(() -> {\n\t\t\t\t\tMessageBox messageBox = new MessageBox(shell.isDisposed() ? null : shell, SWT.ICON_ERROR);\n\t\t\t\t\tmessageBox.setMessage(\"Failed to connect!\\n\" + r);\n\t\t\t\t\tmessageBox.open();\n\t\t\t\t\tshell.setEnabled(true);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}",
"@Override\r\n protected void onPreExecute() {\r\n Log.e(LOG_TAG, \"When the onPreExecute is called?\");\r\n // Show loading indicator if the Internet Connection is delayed or slow.\r\n loadingIndicator.setVisibility(View.VISIBLE);\r\n }",
"protected void loadURL(String thisURL) {\n\t\tgetDriver().get(thisURL);\n\t\ttry {\n\t\t\tThread.sleep(2000);\n\t\t} catch (Exception e) {\n\t\t\t// nothing\n\t\t}\n\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\twait_time = 0;\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\tif (HomeView.ble_status == 0 || HomeView.ble_status == 1\r\n\t\t\t\t\t\t\t|| HomeView.ble_status == 2) {\r\n\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tscanLeDevice(true);\r\n\r\n\t\t\t\t\t\t} catch (IllegalArgumentException 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}\r\n\t\t\t\t\t\tbluetoothSwitch = true;\r\n\t\t\t\t\t\tsetUI();\r\n\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\tprogress.dismiss();\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;\r\n\t\t\t\t\t}\r\n\t\t\t\t\twait_time++;\r\n\t\t\t\t\tif (wait_time > 5) {\r\n\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t\t\t\t\twait_time = 0;\r\n\t\t\t\t\t\t\t\tbluetoothSwitch = false;\r\n\t\t\t\t\t\t\t\tsetUI();\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;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t\t} catch (InterruptedException 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}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}",
"@Override\n protected void onPreExecute() {\n progress = ProgressDialog.show(ModeSelection.this, \"Connecting...\", \"Please wait!!!\"); //show a progress dialog\n }",
"private void checkAccount() {\n Runnable load = new Runnable() {\n public void run() {\n try {\n// mPerson = mProvider.getPerson(mLogin.getUserGuid(), false);\n } catch (Exception ex) {\n ex.printStackTrace();\n } finally {\n mActivity.runOnUiThread(checkAccountRunnable);\n }\n }\n };\n\n Thread thread = new Thread(null, load, \"checkAccount\");\n thread.start();\n }",
"private void getCampaignTraining() {\n\n errorDisplayTryClick.setVisibility(View.VISIBLE);\n\n boolean isInternetPresent = connectionDetector.isConnectingToInternet();\n\n if (isInternetPresent) {\n\n errorDisplay.setVisibility(View.GONE);\n trainingList.setVisibility(View.GONE);\n\n progressDialog.setVisibility(View.VISIBLE);\n\n //Calling Service\n calletCampaignTrainingService();\n\n } else {\n\n //Hiding views\n progressDialog.setVisibility(View.GONE);\n trainingList.setVisibility(View.GONE);\n\n errorDisplay.setVisibility(View.VISIBLE);\n\n errorDisplayIcon.setImageResource(R.drawable.ic_error_internet);\n errorDisplayText.setText(getString(R.string.error_internet));\n }\n }",
"private void getResultsFromApi() {\r\n if (!isGooglePlayServicesAvailable()) {\r\n acquireGooglePlayServices();\r\n } else if (mCredential.getSelectedAccountName() == null) {\r\n chooseAccount();\r\n } else if (!isDeviceOnline()) {\r\n Toast.makeText(getActivity(), \"No network connection available.\", Toast.LENGTH_LONG).show();\r\n } else {\r\n new MakeRequestTask(mCredential).execute();\r\n }\r\n }",
"private void doApiCall() {\n\n if (currentPage != PAGE_START) adapter.removeLoading();\n\n // check weather is last page or not\n if (totalPage != 0) {\n adapter.addLoading();\n apiCall(currentPage);\n } else {\n isLastPage = true;\n }\n isLoading = false;\n }",
"@Override\n protected String doInBackground(String... params) {\n if (Utilities.isNetworkAvailable(getContext())) {\n\n // Call the method of StartAppRequests class to process App Startup Requests\n startAppRequests.RequestBanners();\n startAppRequests.RequestAllCategories(startAppRequests.page_number);\n\n return \"1\";\n } else {\n\n return \"0\";\n }\n }",
"@Override\n public void run() {\n getUserServiceability();\n handler.postDelayed(this, 20000);\n }",
"public void onFinishFetching() {\n\t\t\t\thideLoading();\n\t\t\t\tUiApplication.getUiApplication().invokeLater(new Runnable() {\n\t\t\t\t\t\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tUiApplication.getUiApplication().pushScreen(new HomeScreen());\n\t\t\t\t\t}\n\t\t\t\t});\t\n\t\t\t}",
"protected void getResultsFromApi(SheetsTaskListener listener) {\n if (! isGooglePlayServicesAvailable()) {\n acquireGooglePlayServices();\n } else if (mCredential.getSelectedAccountName() == null) {\n chooseAccount();\n } else if (! isDeviceOnline()) {\n Toast.makeText(getApplicationContext(), R.string.str_no_network, Toast.LENGTH_LONG).show();\n finish();\n } else {\n new MakeRequestTask(mCredential, listener).execute();\n }\n }",
"private void countDownToLogin() {\n\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (isOnline()) {\n if (sharedPreferences.getBoolean(Constant.AUTO_LOGIN, false)) {\n String userEmail = sharedPreferences.getString(Constant.USER_EMAIL, \"\");\n String userPw = sharedPreferences.getString(Constant.USER_PW, \"\");\n if (!userEmail.equals(\"\") && !userPw.equals(\"\")) {\n new LoginPresenter(SplashActivity.this).login(userEmail, userPw);\n } else {\n onLoginFail(null);\n }\n } else {\n onLoginFail(null);\n }\n } else {\n// startActivity(new Intent(context, DisconnectActivity.class));\n// finish();\n //Go to DisconnectActivity\n }\n\n }\n }, SPLASH_TIME);\n }",
"public void getData() {\n ConnectivityManager connMgr = (ConnectivityManager)\n getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);\n\n // Get details on the currently active default data network\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n\n // If there is a network connection, fetch data\n if (networkInfo != null && networkInfo.isConnected()) {\n // Get a reference to the LoaderManager, in order to interact with loaders.\n LoaderManager loaderManager = getLoaderManager();\n\n // number the loaderManager with mPage as may be requesting up to three lots of JSON for each tab\n loaderManager.restartLoader(FETCH_STOCK_PICKING_LOADER_ID, null, loadStockPickingFromServerListener);\n } else {\n // Otherwise, display error\n // First, hide loading indicator so error message will be visible\n View loadingIndicator = getView().findViewById(R.id.loading_spinner);\n loadingIndicator.setVisibility(View.GONE);\n\n // Update empty state with no connection error message\n mEmptyStateTextView.setText(R.string.error_no_internet_connection);\n }\n }",
"@Override\n\t\tpublic void run() {\n\t\t\tURL url;\n\t\t\ttry {\n\t\t\t\tThread.sleep(3000);\n\t\t\t\turl = new URL(strUrl);\n\t\t\t\tURLConnection con = url.openConnection();\n\t\t\t\tcon.connect();\n\t\t\t\tInputStream input = con.getInputStream();\n\t\t\t\tList<Map<String,Object>> temp = json.getListItems(input);\n\t\t\t\tif(temp != null){\n\t\t\t\t\tif(merger.mergeTwoList(list, temp, direction))\n\t\t\t\t\t\tmyHandler.sendEmptyMessage(1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tmyHandler.sendEmptyMessage(5);\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}",
"public static void waitForAI(){\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"protected void onBSStop() {\n isFinishing = true;\n mCalled = true;\n }",
"public synchronized void makeAvailable(){\n isBusy = false;\n }",
"private void showDialogIfRequired() {\n if (mIncognitoReauthCoordinator != null) return;\n if (mLayoutStateProvider == null && mIsTabbedActivity) return;\n if (!mIncognitoReauthPending) return;\n if (!mTabModelSelector.isIncognitoSelected()) return;\n if (mProfile == null) return;\n if (!IncognitoReauthManager.isIncognitoReauthEnabled(mProfile)) return;\n\n boolean showFullScreen = !mIsTabbedActivity\n || !mLayoutStateProvider.isLayoutVisible(LayoutType.TAB_SWITCHER);\n mIncognitoReauthCoordinator =\n mIncognitoReauthCoordinatorFactory.createIncognitoReauthCoordinator(\n mIncognitoReauthCallback, showFullScreen,\n mOnBackPressedInFullScreenReauthCallback);\n mIncognitoReauthCoordinator.show();\n mOnBackPressedInFullScreenReauthCallback.setEnabled(showFullScreen);\n }",
"public void runActivity(Body body) {\n this.peers = StartP2PService.checkingPeersUrl(this.peers);\n // First coontact\n connectingPeer();\n while (body.isAlive()) {\n if (this.peers.size() != 0) {\n if (this.acqGroup.size() == 0) {\n // We have some url and we know nobody\n connectingPeer();\n }\n try {\n Thread.sleep(Long.parseLong(System.getProperty(PROPERTY_TTU)));\n } catch (Exception e) {\n }\n }\n }\n }",
"public void waitForTransfer() {\n\t\tWebDriverUtil.waitForElementVisible(driver, redirectTimer, 10);\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\n\t\tLOG.info(\"waiting to be transferred to merchant site...\");\n\t\twait.until(ExpectedConditions.invisibilityOfElementLocated(By.id(\"transfer-success\")));\n\t\tLOG.info(\"done waiting\"); \n\t}",
"public void waitForData() {\n waitForData(1);\n }",
"public void run(){\n\n if(!initProxy()){\n //Check if we have been aborted\n if(mode != OK_MODE) return;\n if(net_thread != Thread.currentThread()) return;\n\n mode = COMMAND_MODE;\n warning_label.setText(\"Look up failed.\");\n warning_label.invalidate();\n return;\n }\n\n //System.out.println(\"Done!\");\n while(!warning_dialog.isShowing())\n ; /* do nothing*/;\n\n warning_dialog.dispose();\n //dispose(); //End Dialog\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\twait = new waittingDialog();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}",
"@Override\n\tprotected void onResume() {\n\n\t\tactivityVisible = true;\n\n\t\tif (TestHarnessUtils.isTestHarness()) {\n\t\t\tLocalBroadcastManager.getInstance(getApplicationContext()).registerReceiver(testHarnessUIController,\n\t\t\t\t\tTestHarnessService.IF_PROCESS_COMMAND);\n\t\t}\n\t\tsuper.onResume();\n\n\t\tif (showConnectionDialogOnResume) {\n\t\t\tshowConnectionDialogOnResume = false;\n\t\t\tif (this.connectionDialog != null && !this.connectionDialog.isVisible()) {\n\t\t\t\tconnectionDialog.show(getSupportFragmentManager(), \"ConnectionDialog\");\n\t\t\t}\n\t\t}\n\n\t\tif (dismissConnectionDialogOnResume) {\n\t\t\tdismissConnectionDialogOnResume = false;\n\t\t\tif (this.connectionDialog != null && this.connectionDialog.isVisible()) {\n\t\t\t\tconnectionDialog.dismiss();\n\t\t\t}\n\t\t\tconnectionDialog = null;\n\t\t}\n\t}",
"public void readData() {\n ConnectivityManager connMgr = (ConnectivityManager)\n this.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n // Get details on the currently active default data network\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n\n // If there is a network connection, fetch data\n if (networkInfo != null && networkInfo.isConnected()) {\n // Get a reference to the LoaderManager, in order to interact with loaders.\n LoaderManager loaderManager = getLoaderManager();\n\n // number the loaderManager with mPage as may be requesting up to three lots of JSON for each tab\n loaderManager.restartLoader(FETCH_STOCK_PICKING_LOADER_ID, null, loadStockDetailFromServerListener);\n } else {\n // Otherwise, display error\n // First, hide loading indicator so error message will be visible\n View loadingIndicator = findViewById(R.id.loading_spinner);\n loadingIndicator.setVisibility(View.GONE);\n\n // Update empty state with no connection error message\n TextView noConnectionView = (TextView) findViewById(R.id.empty_view);\n noConnectionView.setText(getString(R.string.error_no_internet_connection));\n noConnectionView.setVisibility(View.VISIBLE);\n }\n }",
"public final void activate(){\n waitingToExecute = true;\n }",
"public void runOnAvailableCallback() {\n onAvailableCallback.run();\n }",
"public void blockUntilUp() {\n while (server == null || !server.isServing()) {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n // ignore\n }\n }\n }",
"@Override\n public void onInernetConnectionStateChanged(Intent intent) {\n if (NETWORK_CUSTOM_AVAILABILITY_INTENT.equals(intent.getAction())) {\n\n if (intent.getIntExtra(\"STATUS\", NETWORK_NOT_AVAILABLE) == NETWORK_AVAILABLE) {\n\n if (firstResponsePassed) {\n onInternetConnectionResume();\n } else {\n\n Log.d(TAG, \"Internet available first intent recieved\");\n\n firstResponsePassed = true;\n internetAvailable = true;\n }\n\n\n } else if (intent.getIntExtra(\"STATUS\", NETWORK_NOT_AVAILABLE) == NETWORK_NOT_AVAILABLE) {\n\n onInternetConnectionLost();\n Log.d(TAG, \"Change Detected. Not Avaiable -1\");\n\n }\n\n //Received on requesting only\n }\n\n// else if (NETWORK_CUSTOM_AVAILABILITY_ASYNC_RESPONSE_INTENT.equals(intent.getAction())) {\n//\n// if (intent.getIntExtra(\"STATUS\", NETWORK_NOT_AVAILABLE) == NETWORK_AVAILABLE) {\n//\n// //Internet availabale\n//\n// if (firstResponsePassed) {\n//\n// Log.d(TAG, \"Response Detected. Available 1 but as first <negleced> \");\n// onInternetConnectionResume();\n//\n// } else {\n//\n// Log.d(TAG, \"Response Detected. Available 1\");\n//\n// firstResponsePassed = true;\n// internetAvaiable = true;\n// }\n//\n// } else if (intent.getIntExtra(\"STATUS\", NETWORK_NOT_AVAILABLE) == NETWORK_NOT_AVAILABLE) {\n//\n// //Interner not avaiable\n// Log.d(TAG, \"Response Detected. unAvailable -1\");\n// onInternetConnectionLost();\n//\n// }\n// }\n }",
"private void showWeb() {\n\n new Thread(() -> {\n if (!webService.isStarted()) {\n new Thread(() -> trayIcon.displayMessage(null, \"Please wait, the web server starts!\", TrayIcon.MessageType.INFO)).start();\n webService.startService();\n while (!webService.isStarted()) {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n /**NOP*/\n }\n }\n openUri();\n }).start();\n }",
"public void connected() {\n \t\t\tLog.v(TAG, \"connected(): \"+currentId);\n \t\t\tif(mCallback != null){\n \t\t\t\tmCallback.onServiceConnected();\n \t\t\t}\n \t\t\tloadPage(false, null);\n \t\t}",
"private void initiateLoader() {\n ConnectivityManager connMgr = (ConnectivityManager)\n getSystemService(Context.CONNECTIVITY_SERVICE);\n\n // Get details on the currently active default data network\n NetworkInfo networkInfo = null;\n if (connMgr != null) {\n networkInfo = connMgr.getActiveNetworkInfo();\n }\n\n // If there is a network connection, fetch data\n if (networkInfo != null && networkInfo.isConnected()) {\n // Get a reference to the LoaderManager, in order to interact with loaders.\n avi.show();\n loadingIndicator.setVisibility(View.VISIBLE);\n errorContainer.setVisibility(View.GONE);\n LoaderManager loaderManager = getSupportLoaderManager();\n String url = BASE_URL + \"&from=\" + fromDate;\n url += \"&to=\" + toDate;\n url += \"&page=\" + currentPageNo;\n url += \"&sortBy=\" + sortPreference;\n if (queryText != null) {\n url += \"&q=\" + queryText;\n }\n\n Bundle args = new Bundle();\n args.putString(URL_KEY, url);\n if (forceLoad) {\n loaderManager.restartLoader(LAST_LOADER_ID, args, this);\n forceLoad = false;\n } else {\n LAST_LOADER_ID = NEWS_LOADER_ID;\n }\n if (!loaderInitiated) {\n loaderManager.initLoader(NEWS_LOADER_ID, args, this);\n loaderInitiated = true;\n } else {\n loaderManager.restartLoader(NEWS_LOADER_ID, args, this);\n }\n } else {\n avi.hide();\n loadingIndicator.setVisibility(View.GONE);\n ((TextView) errorContainer.findViewById(R.id.tvErrorDesc)).setText(R.string.no_conn_error_message);\n errorContainer.setVisibility(View.VISIBLE);\n }\n }",
"@Override\n public void run() {\n\n new Thread() {\n\n @Override\n public void run() {\n HttpGet requestForTest = new HttpGet(\"http://m.google.com\");\n try {\n new DefaultHttpClient().execute(requestForTest); // can last...\n responded = true;\n } catch (Exception e) {}\n }\n\n }.start();\n\n try {\n int waited = 0;\n while(!responded && (waited < timeout)) {\n sleep(100);\n if(!responded ) { \n waited += 100;\n }\n }\n } \n catch(InterruptedException e) {} // do nothing \n finally { \n if (!responded) { handler.sendEmptyMessage(0); } \n else { handler.sendEmptyMessage(1); }\n }\n\n }",
"void waitingForMyTurn();",
"@Override\r\n protected Boolean doInBackground(String... args){\r\n\r\n\r\n\r\n ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\r\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\r\n if (netInfo != null && netInfo.isConnected()) {\r\n try {\r\n URL url = new URL(\"http://www.google.com\");//(\"http://www.entreprenia15.com/quiz/select_paid.php\");\r\n HttpURLConnection urlc = (HttpURLConnection) url.openConnection();\r\n urlc.setConnectTimeout(3000);\r\n urlc.connect();\r\n if (urlc.getResponseCode() == 200) {\r\n return true;\r\n }\r\n } catch (MalformedURLException e1) {\r\n // TODO Auto-generated catch block\r\n e1.printStackTrace();\r\n } catch (IOException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }\r\n return false;\r\n\r\n }",
"@Override\r\n protected Boolean doInBackground(String... args){\r\n\r\n\r\n\r\n ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\r\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\r\n if (netInfo != null && netInfo.isConnected()) {\r\n try {\r\n URL url = new URL(\"http://www.google.com\");//(\"http://www.entreprenia15.com/quiz/select_paid.php\");\r\n HttpURLConnection urlc = (HttpURLConnection) url.openConnection();\r\n urlc.setConnectTimeout(3000);\r\n urlc.connect();\r\n if (urlc.getResponseCode() == 200) {\r\n return true;\r\n }\r\n } catch (MalformedURLException e1) {\r\n // TODO Auto-generated catch block\r\n e1.printStackTrace();\r\n } catch (IOException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }\r\n return false;\r\n\r\n }",
"@Override\n protected void onResume() {\n super.onResume();\n if (moviesList.size() == 0){\n if (NetworkUtils.hasNetworkAcces(this)){\n fetchMovieData(\"popular\");\n } else {\n Toast.makeText(context,\"Internet connection failed, please try again\",Toast.LENGTH_SHORT).show();\n }\n }\n }",
"@Override \n public void run() {\n\t\tString path = Urls.URL_32;\n\t\t\n\t\tMap<String, String> map = new HashMap<String, String>();\n\t\tmap.put(\"login-name-or-mobile\", username);\n\t\tmap.put(\"pwd\", password);\n\t \tList<BasicNameValuePair> params = HttpUtils.setParams(map);\n\t \t\n\t\tMap<String, String> map2 = new HashMap<String, String>();\n\t \tmap2.put(\"Accept-Encoding\", \"gzip, deflate\");\n\t \tmap2.put(\"Accept\", \"application/json\");\n\n\t \tMap<String,String> info = new HashMap<String,String>();\n\t\tString jsonStr = \"\";\n\t\ttry {\n\t\t\tjsonStr = RequestService.getInstance().getRequest(params, path, map2);\n\t\t\t\n\t\t\tif(jsonStr==null || \"null\".equals(jsonStr) || \"\".equals(jsonStr)){\n\t\t\t\tinfo.put(\"available\", \"0\");\n\t\t\t}else{\n\t\t\t\tHttpUtils.parseJson(jsonStr, info, null);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tMessage msg = new Message(); \n\t msg.what = Constants.NETWORK_ERROR;\n\t handler.sendMessage(msg); \n\t return;\n\t\t}\n\t\t\n Message msg = new Message(); \n msg.obj = info;\n msg.what = Constants.GET_BALANCE_SUCCESS;\n handler.sendMessage(msg); \n }",
"public void upLoad(NubisDelayedAnswer delayedAnswer, boolean wait, int deleteId, int communicationType) {\n try {\n NubisHTTP httpCom = new NubisHTTP(this, delayedAnswer, null, deleteId, communicationType, settings);\n if (wait) {\n httpCom.serverInstructions = \"\";\n httpCom.execute(); //doInBackground();//.get(210000, TimeUnit.MILLISECONDS);\n\n HTTPReturnString = httpCom.serverInstructions;\n\n } else {\n httpCom.execute();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void requestConnection() {\n getGoogleApiClient().connect();\n }",
"private void waitForFirstPageToBeLoaded() {\n IdlingResource idlingResource = new ElapsedTimeIdlingResource(LATENCY_IN_MS + 1000);\n IdlingRegistry.getInstance().register(idlingResource);\n\n //Check that first item has been loaded\n onView(withItemText(\"POPULAR MOVIE #1 (1999)\")).check(matches(isDisplayed()));\n\n //Clean up\n IdlingRegistry.getInstance().unregister(idlingResource);\n }",
"public void setLaunchPage() {\n resetLaunchPageStatus();\n\n // set recognised ssid\n ssidLabel.setVisible(true);\n Color backColor = rootPanel.getBackground();\n int backRed = backColor.getRed();\n int backGreen = backColor.getGreen();\n int backBlue = backColor.getBlue();\n new Thread(() -> {\n try {\n int j=backGreen,k=backBlue;\n for(int i=backRed;i>0&&retStatus==-1;i-=3){\n j-=3;k-=3;\n if(j < 0) j=0;\n if(k < 0) k=0;\n ssidLabel.setForeground(new Color(i,j,k));\n sleep(100);\n }\n } catch (InterruptedException e) {\n System.out.println(e.getMessage());\n }\n }).start();\n\n // set break connection button to visible\n breakConnBtn.setVisible(true);\n registerBtn.setVisible(false);\n\n // set launch status based on login info\n new Thread(() -> {\n try {\n // store img status icon thread to local\n connStatusImgThread = Thread.currentThread();\n // set wifi icons\n int wifiIconIndex = 0;\n int wifiIconLen = wifiLaunchIcons.length;\n ImageIcon connStatusIcon = connectingIcon;\n String connStr = \"正在连接\";\n connectStatusL.setVisible(true);\n connectStatusL.setText(connStr);\n while(retStatus == -1) {\n connectStatusL.setIcon(connStatusIcon);\n wifiIconLabel.setIcon(wifiLaunchIcons[wifiIconIndex]);\n connStatusIcon = (connStatusIcon == connectingIcon ? connectedOpaqueIcon : connectingIcon);\n sleep(600);\n wifiIconIndex = (++wifiIconIndex) % wifiIconLen;\n }\n ssidLabel.setForeground(Color.black);\n if(retStatus == 0) {\n setBreakdownStatus();\n } else if(retStatus == 64) {\n wifiIconLabel.setIcon(wifiLaunchIcons[3]);\n connectStatusL.setIcon(connectedIcon);\n connectStatusL.setText(\"已连接 \");\n // set wallet left value\n setLoginStatus(1);\n //========== do deduction ==========//\n File file = new File(configSetting.getWpaCmdPath().concat(\"/testLeftToken\"));\n BufferedReader leftCoinReader = new BufferedReader(new FileReader(file));\n String leftCoinStr = leftCoinReader.readLine();\n if(! leftCoinStr.contains(\"registerReward\")) {\n //====== read balance from blockchain =====//\n if(Utils.getTestChain()) {\n BufferedReader tokenReader = new BufferedReader(new FileReader(rootPath.concat(\"/wpa_setup/testLeftToken\")));\n BufferedReader coinReader = new BufferedReader(new FileReader(rootPath.concat(\"/wpa_setup/testLeftCoin\")));\n leftToken = Double.valueOf(tokenReader.readLine());\n leftCoin = Double.valueOf(coinReader.readLine());\n// currency.put(\"leftToken\",Double.valueOf(tokenReader.readLine()));\n// currency.put(\"leftCoin\",Double.valueOf(coinReader.readLine()));\n tokenReader.close();\n coinReader.close();\n } else {\n try {\n ProcessBuilder pb = new ProcessBuilder(\n \"node\",\n rootPath.concat(\"/js_contact_chain/get_value.js\")\n );\n pb.redirectErrorStream(true);\n Process process = pb.start();\n BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));\n StringBuilder sb = new StringBuilder();\n String line;\n System.out.println(\"========== get reward from blockchain ==========\");\n // tricky getting coin and token\n while ((line = reader.readLine()) != null) {\n sb.append(line);\n if (Pattern.matches(\"Token:[0-9]*\",line)) {\n leftToken = Double.valueOf(line.split(\":\")[1]);\n// currency.put(\"leftToken\",Double.valueOf(line.split(\":\")[1]));\n }\n if (Pattern.matches(\"Coin:[0-9]*\",line)) {\n leftCoin = Double.valueOf(line.split(\":\")[1]);\n// currency.put(\"leftCoin\",Double.valueOf(line.split(\":\")[1]));\n }\n System.out.println(\"<reward>\" + line + \"<reward>\");\n }\n process.waitFor();\n } catch (IOException e) {\n System.out.println(e.getMessage());\n }\n // deduct 10 coin in backend\n new Thread(() -> {\n int tryout = 3;\n while(tryout > 0) {\n try {\n ArrayList<String> cmd = new ArrayList<>();\n cmd.add(\"node\");\n cmd.add(rootPath.concat(\"/js_contact_chain/client.js\"));\n cmd.add(\"DeductionToken\");\n cmd.add(\"0x01c96e4d9be1f4aef473dc5dcf13d8bd1d4133cd\");\n cmd.add(\"e16a1130062b37f038b9df02f134d7ddd9009c54c62bd92d4ed42c0dba1189a8\");\n cmd.add(\"0xf439bf68fc695b4a62f9e3322c75229ba5a0ff33\");\n ProcessBuilder pb = new ProcessBuilder(cmd);\n Process process = pb.start();\n BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));\n String line;\n // tricky getting data\n boolean isSuccess = false;\n while ((line = reader.readLine()) != null) {\n System.out.println(line);\n if (line.contains(\"status\")) {\n String[] tmpArry = line.split(\":\");\n String status = tmpArry[1];\n status = status.substring(1, status.length() - 1);\n isSuccess = Boolean.valueOf(status);\n }\n }\n if(isSuccess) {\n break;\n }\n System.out.println(\"[ERROR] Transaction failed! Deduct token failed!\");\n process.waitFor();\n } catch (IOException|InterruptedException e) {\n System.out.println(e.getMessage());\n }\n tryout--;\n }\n }).start();\n }\n leftToken = Arith.sub(leftToken,10);\n // record item\n writeRecord(\"-10: 登陆\",tokenHistoryFP);\n } else {\n String[] tmpStr = leftCoinStr.split(\":\");\n leftToken = Double.valueOf(tmpStr[1]);\n leftCoin = 0;\n// currency.put(\"leftToken\",Double.valueOf(tmpStr[1]));\n// currency.put(\"leftCoin\",0.0);\n writeRecord(\"+\"+leftToken+\": 注册\",tokenHistoryFP);\n }\n sleep(200);\n String historyStr = readRecord(historyReadlineNum,tokenHistoryFP);\n tokenHistoryLabel.setText(historyStr);\n } else {\n wifiIconLabel.setIcon(unLaunchIcon);\n connectStatusL.setIcon(unconnectedIcon);\n connectStatusL.setText(\"未连接 \");\n }\n setPageStatus();\n // set login page advertisement\n new Thread(() -> {\n try {\n int adsIndex = 0;\n int adsLen = loginAdsIcons.length;\n while (loginStatus == 1) {\n launchAdsLabel.setIcon(loginAdsIcons[adsIndex]);\n sleep(2500);\n adsIndex = ++adsIndex % adsLen;\n }\n } catch (InterruptedException e) {\n System.out.println(e.getMessage());\n }\n }).start();\n } catch (InterruptedException|IOException ex) {\n System.out.println(ex.getMessage());\n }\n }).start();\n }",
"public void waitForNotificationOrFail() {\n new PollingCheck(5000) {\n @Override\n protected boolean check() {\n return mContentChanged;\n }\n }.run();\n mHT.quit();\n }",
"private void requestServerToGetInformation() {\n Net net = Net.getInstance();\n Log.i(TAG, \"requestServerToGetInformation: Start connect server\");\n net.get(AppConstant.SERVER_COMBO_URL, new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n Log.i(TAG, \"onFailure: connect error; \" + e.getMessage());\n }\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n // get the JSON from responses.\n String jsonStr = response.body().string();\n Log.i(TAG, \"onResponse: --------------------------------\" + jsonStr);\n parseJsonAndUpdateView(jsonStr.trim());\n }\n });\n }",
"void onCreateNewNetSuccess();",
"protected abstract long waitToTravel();",
"public static void waitForIdle() {\n waitForIdle(null);\n }"
] | [
"0.60693604",
"0.5808356",
"0.5790863",
"0.5762867",
"0.5758331",
"0.5686667",
"0.56572586",
"0.5632522",
"0.5612135",
"0.5612109",
"0.5578145",
"0.5548482",
"0.5532156",
"0.5513182",
"0.5478879",
"0.5465606",
"0.545229",
"0.54249084",
"0.54220796",
"0.541424",
"0.5412872",
"0.54092807",
"0.539493",
"0.53844947",
"0.5369826",
"0.5326552",
"0.5318908",
"0.52968544",
"0.52825594",
"0.5270991",
"0.52656955",
"0.52558196",
"0.52551126",
"0.5254422",
"0.5234929",
"0.5233317",
"0.5223046",
"0.52149665",
"0.52128756",
"0.5212535",
"0.5204909",
"0.5194596",
"0.5192796",
"0.519178",
"0.5174698",
"0.51638806",
"0.5151187",
"0.5149176",
"0.5144313",
"0.5123265",
"0.5120997",
"0.51209885",
"0.51177484",
"0.51158845",
"0.5111814",
"0.5108742",
"0.51059943",
"0.5104336",
"0.5102764",
"0.50954777",
"0.50925684",
"0.50912386",
"0.5090584",
"0.5087092",
"0.50812346",
"0.5079834",
"0.5078266",
"0.5075243",
"0.50701773",
"0.5065726",
"0.5065616",
"0.5064408",
"0.50610954",
"0.5056015",
"0.5053307",
"0.50453985",
"0.5034247",
"0.5033507",
"0.5030345",
"0.50269085",
"0.5022752",
"0.50226676",
"0.5019659",
"0.5018532",
"0.50178975",
"0.5016787",
"0.50139165",
"0.50138485",
"0.50122815",
"0.50122815",
"0.50121635",
"0.5012066",
"0.501067",
"0.50103915",
"0.4999933",
"0.49981877",
"0.49972138",
"0.4996992",
"0.4995765",
"0.4990421",
"0.49895525"
] | 0.0 | -1 |
No args constructor for use in serialization | public GenObfuscatedString() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"MyEncodeableWithoutPublicNoArgConstructor() {}",
"public ObjectSerializationEncoder() {\n // Do nothing\n }",
"@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }",
"defaultConstructor(){}",
"public Data() {}",
"private SerializerFactory() {\n // do nothing\n }",
"public JsonFactory() { this(null); }",
"private SingleObject(){}",
"public CompactSerializable() {\n }",
"public Data() {\n \n }",
"public Payload() {}",
"void DefaultConstructor(){}",
"public Data() {\n }",
"public Data() {\n }",
"private SingleObject()\r\n {\r\n }",
"public CustomDateSerializer() {\n this(null);\n }",
"public ClassOne(){\n\t\tthis.age = 55;\t\t// this value won't come while de-serialization.\n\t\tSystem.out.println (\"Default Constructor Running\");\n\t}",
"private Instantiation(){}",
"public Payload() {\n\t}",
"O() { super(null); }",
"protected abstract T _createEmpty(DeserializationContext ctxt);",
"private SerializationUtils() {\n\n }",
"Reproducible newInstance();",
"private JsonUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }",
"public MinecraftJson() {\n }",
"public Constructor(){\n\t\t\n\t}",
"public \n PipedObjectReader() \n {}",
"private JsonUtils() {\n\t\tsuper();\n\t}",
"private void __sep__Constructors__() {}",
"public Pleasure() {\r\n\t\t}",
"public AvroPerson() {}",
"private SingleObject(){\n }",
"public Pojo1110110(){\r\n\t}",
"public NetworkData() {\n }",
"public JSONBuilder() {\n\t\tthis(null, null);\n\t}",
"public Member() {}",
"@SuppressWarnings(\"unchecked\")\n\tpublic UserSerializer() {\n\t\tsuper();\n\t\tmapSerializer.putAll(BeanRetriever.getBean(\"mapSerializerStrategy\", Map.class));\n\t}",
"public JSONLoader() {}",
"private SerializationUtils() {\n\t\tthrow new AssertionError();\n\t}",
"public WCSResponseSerializer()\r\n {\r\n }",
"public Clade() {}",
"public ClaseJson() {\n }",
"private Sequence() {\n this(\"<Sequence>\", null, null);\n }",
"public Item() {}",
"protected AbstractReadablePacket() {\n this.constructor = createConstructor();\n }",
"public Generic(){\n\t\tthis(null);\n\t}",
"public MetaDataContract()\n {\n }",
"public JobPayload()\n {\n \n }",
"public SpeakerSerivceImpl() {\n\t\tSystem.out.println(\"No args in constructor\");\n\t}",
"public Person() {}",
"public Item(){}",
"private Converter()\n\t{\n\t\tsuper();\n\t}",
"public JSONUtils() {\n\t\tsuper();\n\t}",
"public Value() {}",
"private Message(){\n // default constructor\n }",
"@objid (\"d5a0862c-6231-11e1-b31a-001ec947ccaf\")\n private ObjIdCollectionSerializer() {\n }",
"private NaturePackage() {}",
"public ParamJson() {\n\t\n\t}",
"public InitialData(){}",
"public PersonRecord() {}",
"public LargeObjectAvro() {}",
"protected abstract void construct();",
"public D() {}",
"@SuppressWarnings(\"unused\")\n public Item() {\n }",
"private Item(){}",
"private JSONHelper() {\r\n\t\tsuper();\r\n\t}",
"public JAXBConverter() {\n\t}",
"public Member() {\n //Empty constructor!\n }",
"public AbstractBinaryInteraction() {\n\n\t}",
"public FileObject() {\n\t}",
"public BabbleValue() {}",
"public StringData() {\n\n }",
"private AggregDayLogSerializer() {\n\t throw new UnsupportedOperationException(\n\t \"This class can't be instantiated\");\n\t }",
"public Mapping() { this(null); }",
"public Postoj() {}",
"public Node() {}",
"public Node() {}",
"public Node() {}",
"public Node() {}",
"public StudentRecord() {}",
"@Override\n\tpublic Response construct() {\n\t\treturn null;\n\t}",
"public Person()\n {\n //intentionally left empty\n }",
"public XObject(){\r\n }",
"public XObject(){\n }",
"public TeeWriter() {\r\n ; // nothing to do\r\n }",
"public ObjectUtils() {\n super();\n }",
"public Value() {\n }",
"public JsonField() {\n }",
"public Identity()\n {\n super( Fields.ARGS );\n }",
"MessageSerializer<T> create();",
"public CSSTidier() {\n\t}",
"public Value(){}",
"private NewsWriter() {\n }",
"public UE2_0_3Serializer(){\n\t\txstream = new XStream(/*new DomDriver()*/);\n\t}",
"public SensorData() {\n\n\t}",
"public Pasien() {\r\n }",
"public Node() {\n\t}",
"public LocalObject() {}",
"@SuppressWarnings(\"unused\")\r\n\tprivate Person() {\r\n\t}",
"public Book() {}",
"public Item() {\n\t}"
] | [
"0.74630904",
"0.7387007",
"0.7210724",
"0.7029566",
"0.7018587",
"0.6977819",
"0.69339114",
"0.6881743",
"0.6739828",
"0.6727297",
"0.6717886",
"0.67169136",
"0.669586",
"0.669586",
"0.66750634",
"0.66246814",
"0.6604095",
"0.6532946",
"0.65235436",
"0.6500072",
"0.6466648",
"0.64311725",
"0.6420696",
"0.63329536",
"0.6331174",
"0.63080406",
"0.6303669",
"0.6297327",
"0.6289062",
"0.62796336",
"0.62715524",
"0.6246891",
"0.6236601",
"0.6236527",
"0.62337124",
"0.621766",
"0.62073123",
"0.6205364",
"0.62028056",
"0.61931217",
"0.61913615",
"0.61901313",
"0.6187056",
"0.618604",
"0.61813384",
"0.61712974",
"0.6168396",
"0.61616594",
"0.6159333",
"0.61513215",
"0.6150306",
"0.6144834",
"0.6137297",
"0.61357254",
"0.6134681",
"0.61235094",
"0.6122921",
"0.61144346",
"0.6113325",
"0.6103046",
"0.6093859",
"0.6088237",
"0.60865474",
"0.60842085",
"0.6079729",
"0.6075916",
"0.6066694",
"0.6050046",
"0.60495526",
"0.60494757",
"0.60476506",
"0.6045192",
"0.60441047",
"0.6041579",
"0.60395074",
"0.6038388",
"0.6038388",
"0.6038388",
"0.6038388",
"0.6036713",
"0.6032801",
"0.6030977",
"0.60247785",
"0.6018193",
"0.60155535",
"0.60124946",
"0.6011776",
"0.60107607",
"0.6008726",
"0.60062283",
"0.60036933",
"0.5999471",
"0.5998251",
"0.5996513",
"0.59922075",
"0.5991442",
"0.59912944",
"0.5989887",
"0.5989741",
"0.598915",
"0.59881556"
] | 0.0 | -1 |
Call only from assert! | public synchronized boolean verifyDocCounts() {
final int docCount = mInfo.getSegmentInfo().getDocCount();
int count;
if (mLiveDocs != null) {
count = 0;
for (int docID=0; docID < docCount; docID++) {
if (mLiveDocs.get(docID))
count ++;
}
} else {
count = docCount;
}
assert docCount - mInfo.getDelCount() - mPendingDeleteCount == count:
"info.docCount=" + docCount + " info.getDelCount()=" + mInfo.getDelCount() +
" pendingDeleteCount=" + mPendingDeleteCount + " count=" + count;
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected Assert() {\n\t}",
"private void assertAll() {\n\t\t\n\t}",
"protected Assert() {\n }",
"protected Assert() {\n }",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"private Mth()\n\t{\n\t\tthrow new AssertionError();\n\t}",
"private void test() {\n\n\t}",
"protected abstract void assertFact(Object fact);",
"@Test\n public void testGetOnlinePosition() {\n assert false : \"testGetOnlinePosition not implemented.\";\n }",
"private void ThenPaymentIsProcessed() throws Exception {\n assert true;\n }",
"@VisibleForTesting\n @SuppressWarnings(\"CheckReturnValue\")\n void checkAssertions() {\n checkAssertions(root);\n }",
"Assert createAssert();",
"public void assertPerformance() {\n\tsuper.assertPerformance();\n}",
"private void AndOrderIsSentToKitchen() throws Exception {\n assert true;\n }",
"@Override\r\n\tprotected void doVerify() {\n\t\t\r\n\t}",
"public final void mo51373a() {\n }",
"private TedCorrigendumHandler() {\n throw new AssertionError();\n }",
"public void performValidation() {\n/* 623 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"private void validCheck ()\n\t{\n\t\tassert allButLast != null || cachedFlatListOrMore != null;\n\t}",
"@Override\n\t\t\t\tpublic void doFail() {\n\t\t\t\t}",
"@Override public void action() {\n //Do Nothing\n assert(checkRep());\n }",
"private void assertImmutableList() {\n\t\tassertImmutableList(wc);\n\t}",
"public void testSelf() throws Throwable {\n\n if (this instanceof SerializableAssert) {\n verifySelf(getData(), (SerializableAssert) this);\n } else {\n verifySelf(getData());\n\n }\n }",
"@Test\n public void testRwbmInternal()\n {\n generateEvents(\"dist-rwbm-internal-test\");\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }",
"public void testWriteOrders() throws Exception {\n }",
"@Test\n\tpublic void test04() throws Throwable {\n\t}",
"private test5() {\r\n\t\r\n\t}",
"@Test\n public void questionIfNotAlreadyAccusedTest() throws Exception {\n\n }",
"@Override\n public void test() {\n \n }",
"boolean assertExpected(Exception e);",
"@Override\n\t\tpublic void checkPreconditions() {\n\t\t}",
"@Test\n\tpublic void testVerify() {\n\t\t\n\t\tSystem.out.println(\"Before Verfiy\");\n\t\tSoftAssert assert1 = new SoftAssert();\n\t\t\n\t\tassert1.fail();\n\t\t\n\t\tSystem.out.println(\"After Assertion\");\n\t}",
"@Test\n public void Tester_UI_when_find_contact_not_added() throws Exception{System.out.println(\"TODO\") ;}",
"private void assertReflexive(UMLMessageArgument msgArg) throws Exception\r\n\t{\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertTrue(msgArg.equals(msgArg));\r\n\t}",
"@Test\r\n void enoughFunds() {\n BankAccount account = new BankAccount(100);\r\n \r\n // Assertion for no exceptions\r\n assertDoesNotThrow(() -> account.withdraw(100));\r\n }",
"void ensure();",
"public void testPreConditions() {\n\t\tassertNotNull(activity);\n\t\tassertNotNull(mFragment);\n\t\tassertNotNull(mAdapter);\n\t\tassertTrue(mAdapter instanceof MensaListAdapter);\n\t}",
"private ProtomakEngineTestHelper() {\r\n\t}",
"void setup() throws Exception;",
"public int describeContents() {\n/* 1781 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"abstract void setUp() throws Exception;",
"public void testInvalidNoType() { assertInvalid(\"a\"); }",
"public void testPreConditions() {\r\n\t //fail(\"Precondition check not implemented!\");\r\n\t assertEquals(true,true);\r\n\t }",
"private void m50366E() {\n }",
"public static void ensure() {\n }",
"@Test\r\n\tpublic void testSanity() {\n\t}",
"@Test\r\n public void dummyCanGiveXP() {\n\r\n dummy.giveExperience();\r\n\r\n assertEquals(DUMMY_EXPERIENCE, dummy.giveExperience());\r\n }",
"public boolean isImportantForAccessibility() {\n/* 1302 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"private static void assertObjectInGetInternalStateIsNotNull(Object object) {\n if (object == null) {\n throw new IllegalArgumentException(\"The object containing the field cannot be null\");\n }\n }",
"private void testEvidenceBankFolder() {\n LOG.debug(\"### Executing \"+ Thread.currentThread().getStackTrace()[1].getMethodName() +\" ####\");\n NodeRef eviBankFolder = getEvidenceBankFolder();\n assertNotNull(eviBankFolder);\n LOG.debug(\"Got Evidence Bank Folder NodeRef: \" + eviBankFolder); \n\n }",
"@Test\n\tpublic void testEvilPuzzleGeneration() {\n\t}",
"@Override\n\tpublic void test() {\n\t\t\n\t}",
"private static void runTestCWE4() {\n}",
"private static void runTestCWE4() {\n}",
"public void testLoadOrder() throws Exception {\n }",
"public void XtestCreateAppContext()\n {\n fail(\"Unimplemented test\");\n }",
"@Test\n public void testGetProductInfo() throws Exception {\n }",
"@Test\r\n\tpublic void contents() throws Exception {\n\t}",
"@Test\n public void sanityCheck() {\n assertThat(true, is(true));\n }",
"public void verifyEntrySet() {\n }",
"@Override\n public void setUp() throws Exception {}",
"private WinRateHelper() {\n throw new AssertionError();\n }",
"public void testCheckOxyEmpty() {\n }",
"protected void runTest() throws Throwable {\n\t\t\t\t\t\t\t\tthrow e;\n\t\t\t\t\t\t\t}",
"public static void verify() {\n\n\t\t\t\n\t\t\t\n\t\t\n\t}",
"@Override\n\tpublic void test00500Add_Validate_ExistingRecord() throws Exception\n\t{\n\t}",
"private DeleteActivitiesTestUtils() {\r\n // Do nothing\r\n }",
"@Test\r\n\t public void feelingLucky() {\r\n\t \t Assert.fail();\r\n\t Assert.fail();\r\n\t }",
"public void mo21792Q() {\n }",
"@Test\n public void testCheckPositive() {\n Helper.checkPositive(1, \"obj\", \"method\", LogManager.getLog());\n }",
"@Override\n\t@Ignore\n\t@Test\n\tpublic void testLauncherIsWhereExpected() throws Throwable {\n\t}",
"private FilterAssert() {\n }",
"public static void failUnexpectedToReachThis()\r\n\t{\r\n\t\tfail( \"Unexpected to hit this line, as the previous statement should thrown an exception\" ); \r\n\t}",
"@Test\n\tpublic void testVersionCheck() throws Exception{\n\t}",
"@Override\r\n\tpublic void testBeing() {\n\t\tSystem.out.println(msg + \",¹·°®¿Ð¹ÇÍ·\");\r\n\t}",
"@Override\n protected void setup() {\n }",
"private void checkRep() {\n\t\tassert (this != null) : \"this Edge cannot be null\";\n\t\tassert (this.label != null) : \"this Edge's label cannot be null\";\n\t\tassert (this.child != null) : \"this Edge's child cannot be null\";\n\t}",
"public boolean validateInput() {\n/* 158 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"private static void runTestCWE9() {\n}",
"private static void runTestCWE9() {\n}",
"@Override\n public void runTest() {\n }",
"private SerializationUtils() {\n\t\tthrow new AssertionError();\n\t}",
"@Override\r\n protected void setUp() {\r\n // nothing yet\r\n }",
"private void testProXml(){\n\t}",
"private void assertCondition(Condition condition) {\n\t}",
"private void someUtilityMethod() {\n }",
"private void someUtilityMethod() {\n }",
"private RendererUtils() {\n throw new AssertionError(R.string.assertion_utility_class_never_instantiated);\n }",
"@Test\r\n public void elCerdoNoSePuedeAtender() {\n }",
"private stendhal() {\n\t}",
"protected final void _verifyAlloc(Object buffer)\n/* */ {\n/* 269 */ if (buffer != null) throw new IllegalStateException(\"Trying to call same allocXxx() method second time\");\n/* */ }",
"@Test\r\nvoid test1() {\r\n\tassertThrows(RuntimeException.class,()-> Q2=new ArrayBasedQ(-5));\r\n}",
"public static void dummyTest(){}",
"public static void dummyTest(){}",
"@Test\n public void needSetACrowdTest() {\n // TODO: test needSetACrowd\n }",
"@Before\r\n\tpublic void setUp() throws Exception {\r\n\t\t//This method is unused. \r\n\t}",
"public void testGetInsDyn() {\n }",
"public abstract void mo70713b();",
"private static void runTestCWE7() {\n}",
"private static void runTestCWE7() {\n}",
"@Test\n public void accuseSuccesTest() throws Exception {\n }"
] | [
"0.71831906",
"0.6944011",
"0.6692365",
"0.6692365",
"0.6540085",
"0.6291001",
"0.6276648",
"0.6235591",
"0.6223285",
"0.6172323",
"0.6161589",
"0.6136383",
"0.60860485",
"0.60597986",
"0.60423",
"0.5975468",
"0.59589034",
"0.5957881",
"0.5948926",
"0.5942799",
"0.59387165",
"0.5926808",
"0.5900933",
"0.5893729",
"0.5877647",
"0.5863509",
"0.5861526",
"0.58435726",
"0.5839813",
"0.5839438",
"0.5836326",
"0.5829372",
"0.5823673",
"0.5822555",
"0.58039755",
"0.5798676",
"0.5791994",
"0.5789957",
"0.5781894",
"0.5777314",
"0.5776749",
"0.57760847",
"0.5775363",
"0.5768276",
"0.57624805",
"0.576097",
"0.575722",
"0.5754441",
"0.5732857",
"0.5730675",
"0.5721552",
"0.5718423",
"0.57061845",
"0.57061845",
"0.57014006",
"0.5700225",
"0.5696855",
"0.5691876",
"0.5690395",
"0.5688753",
"0.5686419",
"0.5681631",
"0.56783473",
"0.5665798",
"0.5659267",
"0.56559783",
"0.5655669",
"0.5653176",
"0.5652111",
"0.56515324",
"0.5650835",
"0.564938",
"0.56477445",
"0.5643051",
"0.5642672",
"0.56406623",
"0.5639529",
"0.56386584",
"0.563807",
"0.563807",
"0.5638009",
"0.563642",
"0.5634029",
"0.56336075",
"0.56335896",
"0.5630829",
"0.5630829",
"0.5628608",
"0.56216973",
"0.5619429",
"0.56161976",
"0.56159437",
"0.56151736",
"0.56151736",
"0.56112975",
"0.560829",
"0.56054103",
"0.56037825",
"0.56022865",
"0.56022865",
"0.55965734"
] | 0.0 | -1 |
Get reader for searching/deleting | public synchronized ISegmentReader getReader() throws IOException {
if (mReader == null) {
// We steal returned ref:
mReader = mWriter.getContext().newSegmentReader(mInfo);
if (mLiveDocs == null)
mLiveDocs = mReader.getLiveDocs();
}
// Ref for caller
mReader.increaseRef();
return mReader;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"DataReader reader();",
"public Reader getReader()\n {\n return reader;\n }",
"public JournalReader read() {\n return new JournalReader(this);\n }",
"protected final Reader getReader()\n {\n return _reader;\n }",
"public Reader getReader() {\r\n return reader;\r\n }",
"protected IndexReader getReader() {\n\t\treturn indexReader;\n\t}",
"protected abstract Reader getReader() throws IOException;",
"NffgReader getReader() throws ServiceException;",
"Read createRead();",
"@SneakyThrows\n public Reader reader() {\n return new FileReader(this.temp);\n }",
"public static FileReader getReader() {\n return new CsvFileReader();\n }",
"public Reader getReader() {\n return in;\n }",
"@Override\n public ReaderDTO deleteReaderById(Integer id) throws BadRequestException {\n\n Optional<Reader> readerOptional = readerRepository.findById(id);\n\n if (readerOptional.isPresent()) {\n readerRepository.delete(readerOptional.get());\n } else {\n throw new BadRequestException(\"Reader not present in the DB\");\n }\n\n return ReaderConverter.convert(readerOptional.get());\n }",
"StreamReader underlyingReader();",
"private static CSVData getReader(){\n\t\tCSVData csv = null;\n\t\ttry {\n\t\t\tcsv = new CSVData();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn csv;\n\t}",
"public synchronized IndexReader getReader(File indexDir) throws Exception{\r\n \tif (!mReaders.containsKey(indexDir)){\r\n \t\tsetNewReader(indexDir);\r\n \t\treturn getReader(indexDir);\r\n \t}\r\n \tsynchronized (mReaders) {\r\n \t\ttry{\r\n \t\t\t\r\n \t\tList<ReaderContainer> lReader = mReaders.get(indexDir);\r\n \t\tlog.debug(\"getReader :: lReader size = \"+lReader.size()+\" | nb index files= \"+indexDir.listFiles().length);\r\n \t\t\r\n \t\tif (lReader.size() == 0) {\r\n \t\t\tsetNewReader(indexDir);\r\n \t\t} else {\r\n \t\t\tReaderContainer readerContainer = lReader.get(lReader.size()-1);\r\n \t\t\tif (readerContainer.isClosable()){\r\n \t \t\treaderContainer.close();\r\n \t \t\tlReader.remove(readerContainer);\r\n \t \t\tlog.debug(\"getReader :: closed = (unRegister) size lreader = \"+lReader.size());\r\n \t \t\tsetNewReader(indexDir);\r\n \t \t\t\r\n \t \t}\r\n \t\t}\r\n\r\n \t\tReaderContainer readerContainer = lReader.get(lReader.size()-1);\r\n readerContainer.incNbSearch();\r\n \t\treturn readerContainer.getReader();\r\n \t\t\r\n \t\t} catch(Exception ex){\r\n \t\tlog.fatal(\"getReader :: mReaders.containsKey(indexDir)\" +mReaders.containsKey(indexDir)+\" ERR:\"+ex);\r\n \t\tif (mReaders.containsKey(indexDir)){\r\n \t\t\tList<ReaderContainer> lReader = mReaders.get(indexDir);\r\n \t\t\tlog.fatal(\"getReader :: size reader for this index : \"+lReader.size() +\" index: \"+indexDir.getCanonicalPath());\r\n \t}\r\n \t\treturn null;\r\n \t}\r\n\t\t}\r\n }",
"@Override\n\t\tpublic BufferedReader getReader() throws IOException {\n\t\t\treturn null;\n\t\t}",
"public synchronized ISegmentReader getReadOnlyClone() throws IOException {\n\t\tif (mReader == null) {\n\t\t\tgetReader().decreaseRef();\n\t\t\tassert mReader != null;\n\t\t}\n\t\tmShared = true;\n\t\tif (mLiveDocs != null) {\n\t\t\treturn mWriter.getContext().newSegmentReader(mReader, mLiveDocs, \n\t\t\t\t\tmInfo.getSegmentInfo().getDocCount() - mInfo.getDelCount() - mPendingDeleteCount);\n\t\t} else {\n\t\t\tassert mReader.getLiveDocs() == mLiveDocs;\n\t\t\tmReader.increaseRef();\n\t\t\treturn mReader;\n\t\t}\n\t}",
"int readerIndex();",
"public abstract UIReader getReaderByName(String readerName);",
"@Override\n\tpublic BufferedReader getReader() throws IOException {\n\t\treturn null;\n\t}",
"@Override\n\tpublic BufferedReader getReader() throws IOException {\n\t\treturn null;\n\t}",
"public synchronized ISegmentReader getMergeReader() throws IOException {\n\t\tif (mMergeReader == null) {\n\t\t\tif (mReader != null) {\n\t\t\t\t// Just use the already opened non-merge reader\n\t\t\t\t// for merging. In the NRT case this saves us\n\t\t\t\t// pointless double-open:\n\t\t\t\t// Ref for us:\n\t\t\t\tmReader.increaseRef();\n\t\t\t\tmMergeReader = mReader;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t// We steal returned ref:\n\t\t\t\tmMergeReader = mWriter.getContext().newSegmentReader(mInfo);\n\t\t\t\tif (mLiveDocs == null) \n\t\t\t\t\tmLiveDocs = mMergeReader.getLiveDocs();\n\t\t\t}\n\t\t}\n\n\t\t// Ref for caller\n\t\tmMergeReader.increaseRef();\n\t\treturn mMergeReader;\n\t}",
"public JodaBeanSmartReader smartReader() {\n return new JodaBeanSmartReader(this);\n }",
"private synchronized ReadOnlyDirectoryReader createReadDirectoryReader(\n\t\t\tfinal Directory directory,\n\t\t\tfinal SegmentInfos infos, \n\t\t\tfinal IndexDeletionPolicy deletionPolicy,\n\t\t\tfinal int termInfosIndexDivisor, \n\t\t\tString segmentFileName) throws CorruptIndexException, IOException {\n\t\tReadOnlyDirectoryReader reader = new ReadOnlyDirectoryReader(\n\t\t\t\tdirectory, infos, deletionPolicy, termInfosIndexDivisor, null);\n\t\t\n\t\t// Faire quelque chose...\n\t\t// Raaah c'est les SolrIndexSearchers qu'ils faut mettre a jour !! :'(\n\t\t\n\t\t// creation d'un objet de sauvegarde\n\t\tReadDirectoryReader r = new ReadDirectoryReader(directory, infos, deletionPolicy, termInfosIndexDivisor);\n\t\t// Mise a jour des anciens readers\n\t\tif (!readDirectoryReaders.isEmpty()) {\n\t\t\tupdateReadOnlyReaders(reader);\n\t\t}\n\t\treadDirectoryReaders.put(segmentFileName,r);\n\t\t\n\t\treturn reader;\n\t}",
"public Reader newReader() {\n synchronized (allReaders) {\n Reader reader = new Reader(this);\n allReaders.add(reader);\n return reader;\n }\n }",
"public IndexReader getIndexReader() {\n return indexReader;\n }",
"private static IIteratingChemObjectReader<IAtomContainer> getInputReader(\n ArgumentHandler argsH, IChemObjectBuilder builder) throws FileNotFoundException {\n DataFormat inputFormat = argsH.getInputFormat();\n IIteratingChemObjectReader<IAtomContainer> reader;\n String filepath = argsH.getInputFilepath();\n InputStream in = new FileInputStream(filepath);\n switch (inputFormat) {\n case SMILES: reader = new IteratingSMILESReader(in, builder); break;\n case SIGNATURE: reader = new IteratingSignatureReader(in, builder); break;\n case SDF: reader = new IteratingSDFReader(in, builder); break;\n case ACP: reader = new IteratingACPReader(in, builder); break;\n default: reader = null; error(\"Unrecognised format\"); break;\n }\n return reader;\n }",
"@Override\n\tpublic ReaderDTO findReaderDTObyId(long id) {\n\t\treturn null;\n\t}",
"public IndexReader getIndexReader() {\n\t\ttry {\n\t\t\tcheckDirectory();\n\t\t\tcheckIndexLocking();\n\n\t\t\tboolean exist = IndexReader.indexExists(getDirectory());\n\t\t\tif( exist ) {\n\t\t\t\treturn IndexReader.open(getDirectory());\n\t\t\t} else {\n\t\t\t\tthrow new LuceneIndexAccessException(\"The index doesn't exist for the specified directory\");\n\t\t\t}\n\t\t} catch(IOException ex) {\n\t\t\tthrow new LuceneIndexAccessException(\"Error during opening the reader\",ex);\n\t\t}\n\t}",
"public Vector<String> getReader_h() {\n\t\t\n\t\treturn reader_h;\n\t}",
"public String getReaderType() {\n\t\treturn \"DleseCollectionDocReader\";\n\t}",
"E read(K id);",
"@Override\r\npublic Detalle_pedido read(int id) {\n\treturn detalle_pedidoDao.read(id);\r\n}",
"T read(int id);",
"T read(int id);",
"public interface ReaderDAO extends DAO<Reader, Integer> {\n\n /**\n * @param email email\n * @return List of readers matching the input\n */\n List<Reader> findByEmail(String email);\n\n}",
"public Object clone() throws CloneNotSupportedException {\n\t\treturn (Reader) super.clone();\n\t}",
"@Bean\r\n public ItemReader<OrderEntity> reader(DataSource dataSource) {\r\n LOG.debug(\"=== reader\");\r\n JdbcCursorItemReader<OrderEntity> databaseReader = new JdbcCursorItemReader<>();\r\n\r\n databaseReader.setDataSource(dataSource);\r\n databaseReader.setSql(QUERY_FIND_ORDERS);\r\n databaseReader.setRowMapper(new BeanPropertyRowMapper<>(OrderEntity.class));\r\n\r\n return databaseReader;\r\n }",
"public CSVReader getCsvReader() {\n return csvReader;\n }",
"public ReaderWriterProvider readerWriterProvider() { return _readerProvider; }",
"T readOne(int id);",
"List<BookStoreElement> load(Reader reader);",
"static CellBackup read(IdReader reader, TechPool techPool) throws IOException {\n CellRevision newRevision = CellRevision.read(reader);\n boolean modified = reader.readBoolean();\n TechPool restrictedPool = techPool.restrict(newRevision.techUsages, techPool);\n return new CellBackup(newRevision, restrictedPool, modified);\n }",
"protected abstract Reader read() throws IOException;",
"@Override\n public ContentReader getMarkReader(String serialNumber, String versionNumber) {\n NodeRef nodeRef = getVersionNodeRef(serialNumber, versionNumber, TradeMarkModel.MARK_QNAME);\n return getContentReader(nodeRef, ContentModel.PROP_CONTENT);\n }",
"public StatDataFileReader createReaderInstance() throws IOException{\n return createReaderInstance(null);\n }",
"public interface ReferenceableReader extends Cloneable {\n\n public DataRef getRef() throws IOException;\n\n public void read(int docNo) throws IOException;\n\n public void close() throws IOException;\n\n public ReferenceableReader clone();\n}",
"public ValueReader findReader(Class<?> raw)\n {\n ClassKey k = (_key == null) ? new ClassKey(raw, _features) : _key.with(raw, _features);\n ValueReader vr = _knownReaders.get(k);\n if (vr != null) {\n return vr;\n }\n vr = createReader(null, raw, raw);\n // 15-Jun-2016, tatu: Let's limit maximum number of readers to prevent\n // unbounded memory retention (at least wrt readers)\n if (_knownReaders.size() >= MAX_CACHED_READERS) {\n _knownReaders.clear();\n }\n _knownReaders.putIfAbsent(new ClassKey(raw, _features), vr);\n return vr;\n }",
"@Override\r\n\tpublic Libro read(int id) {\n\t\treturn libroRepository.findById(id).get();\r\n\t}",
"private Cursor read(){\n ProjectDbHelper mDbHelper = new ProjectDbHelper(this);\n\n\n // Create and/or open a database to read from it\n SQLiteDatabase db = mDbHelper.getReadableDatabase();\n\n // retrieve data using cursor\n String[] projection = {\n ProjectContract.ProjectEntry._ID,\n ProjectContract.ProjectEntry.COLUMN_PROJECT_NAME,\n ProjectContract.ProjectEntry.COLUMN_PROJECT_TYPE,\n ProjectContract.ProjectEntry.COLUMN_PROJECT_CLIENT,\n ProjectContract.ProjectEntry.COLUMN_PROJECT_PRICE\n };\n\n Cursor cursor = db.query(\n ProjectContract.ProjectEntry.TABLE_NAME,\n projection,\n null,\n null,\n null,\n null,\n null);\n\n return cursor;\n }",
"public abstract void remove(UIReader reader);",
"@Override\n\tpublic void read(Object entidade) {\n\t\t\n\t}",
"public BufferedMCLReader getReader() {\n\t\treturn reader;\n\t}",
"@Override\n public String readFile(BufferedReader reader)\n {\n try\n {\n StringBuffer strLine = new StringBuffer();\n String line;\n\n while ((line = reader.readLine()) != null)\n {\n if (!line.startsWith(\"--\", 0))\n {\n strLine.append(line);\n\n // use ; as the command delimiter and execute the query on the database.\n if (line.endsWith(\";\"))\n {\n super.exeQuery(strLine.toString());\n strLine = new StringBuffer();\n }\n }\n }\n\n return strLine.toString();\n }\n catch (IOException ioex)\n {\n logger.error(\"Error reading contents from file.\");\n return null;\n }\n }",
"protected IndexSearcher getIndexSearcher(IndexReader reader) {\n return new IndexSearcher(reader);\n }",
"public static BufferedReader get(Reader in) {\n if(in == null || in instanceof BufferedReader) {\n return (BufferedReader)in;\n }\n return new BufferedReader(in);\n }",
"boolean getForRead();",
"public interface CatalogReader extends RelOptSchema, SqlValidatorCatalogReader, SqlOperatorTable {\n\n @Override\n PreparingTable getTableForMember( List<String> names );\n\n /**\n * Returns a catalog reader the same as this one but with a possibly different schema path.\n */\n CatalogReader withSchemaPath( List<String> schemaPath );\n\n @Override\n PreparingTable getTable( List<String> names );\n\n ThreadLocal<CatalogReader> THREAD_LOCAL = new ThreadLocal<>();\n }",
"public abstract List<UIReader> getReaderList();",
"private AbstractCursorItemReader<String> createJdbcCursorItemReader(DataSource dataSource, String name) throws Exception {\n JdbcCursorItemReader<String> jcir = new JdbcCursorItemReader<String>();\n jcir.setDataSource(dataSource);\n jcir.setSql(SELECT);\n jcir.setRowMapper(new RowMapper() {\n\n @Override\n public Object mapRow(ResultSet rs, int rowNum) throws SQLException {\n return rs.getString(1);\n }\n });\n jcir.setName(name);\n jcir.setSaveState(true);\n // jcir.afterPropertiesSet(); not mandatory yet, just checks dataSource\n\n return jcir;\n }",
"public interface Reader {\n public List<String> readAllLines();\n}",
"public abstract DBIterator NewIterator(ReadOptions options);",
"public SimpleLock readLock() {\n\n\t\treturn readerLock;\n\t}",
"private Reader saveReader(ReaderDTO readerDTO) {\n\n Reader reader = ReaderConverter.convert(readerDTO);\n\n return readerRepository.save(reader);\n }",
"@FunctionalInterface\n protected interface StreamReader<ReaderType> {\n void accept(RevisionDataInput input, ReaderType target) throws IOException;\n }",
"public <E extends Writeable> ResultSet read(CharSequence sql);",
"byte[] getRow() {\r\n return delete.getRow();\r\n }",
"@Override\r\n\tpublic CEntity read(CEntity entity, String ID) {\n\t\twhile (scanner.hasNext()) {\r\n\t\t\tentity.read(scanner);\r\n\t\t\tif (entity.getID().equals(ID))\r\n\t\t\t\treturn entity;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public synchronized BlackLabIndex getIndexFromReader(String indexName, IndexReader reader, boolean wrapIfNotFound, boolean writeMode) {\n BlackLabIndex blackLabIndex = indexReader2BlackLabIndex.get(reader);\n if (blackLabIndex == null && wrapIfNotFound) {\n // We don't have a BlackLabIndex instance for this IndexReader yet. This can occur if e.g.\n // Solr is in charge of opening IndexReaders. Create a new instance now and register it.\n try {\n blackLabIndex = wrapIndexReader(indexName, reader, false);\n registerIndex(reader, blackLabIndex);\n } catch (ErrorOpeningIndex e) {\n throw new RuntimeException(e);\n }\n }\n return blackLabIndex;\n }",
"public String getReaderType() {\n\n\t\treturn \"SimpleDocReader\";\n\n\t}",
"public Collection<AbstractReaderPlugin> getReaders();",
"public FFileInputDO findById(long inputId) throws DataAccessException;",
"static DataFrameRead read() {\n return DataFrameFactory.getInstance().read();\n }",
"public GenericRowFileRecordReader getRecordReaderForRange(int startRowId, int endRowId) {\n return new GenericRowFileRecordReader(_fileReader, startRowId, endRowId, _sortedRowIds);\n }",
"public LdDaoReadable getDaoReadable() {\r\n return getMyDao();\r\n }",
"public Reader getReader(String filename) throws FileNotFoundException {\n\t\ttry {\n\t\t\tInputStream inputStream = new FileInputStream(filename);\n\t\t\treturn new InputStreamReader(inputStream, \"UTF-8\");\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\tthrow new IllegalStateException(\"Unable to read input\", e);\n\t\t}\n\t}",
"public void doReads(Reader reader) throws IOException;",
"public Reader openReader(boolean ignoreEncodingErrors) throws IOException {\n throw new UnsupportedOperationException();\n }",
"public T read(JsonReader in) throws IOException {\n\t return null;\n\t }",
"public DleseCollectionDocReader getDocReader() {\n\t\treturn (DleseCollectionDocReader) resultDoc.getDocReader();\n\t}",
"public void otherRead(IDataHolder dc);",
"public void closeReader() throws IOException{\n if(isOpen){\n csvReader.close();\n }\n\n }",
"@Override\r\n protected void readImpl() {\r\n _recipeId = readD();\r\n }",
"public Receta read(Long codigo);",
"public void ownRead();",
"axiom Object readLine(Object BufferedReader(FileReaderr f)) {\n\treturn f.get(0);\n }",
"public RecordReader getRecordReader( InputSplit split, JobConf job, Reporter reporter ) throws IOException\n {\n MultiInputSplit multiSplit = (MultiInputSplit) split;\n JobConf currentConf = mergeConf( job, multiSplit.config, true );\n \n return currentConf.getInputFormat().getRecordReader( multiSplit.inputSplit, currentConf, reporter );\n }",
"protected IndexReader getIndexReader(String indexFolder) throws IOException {\n return DirectoryReader.open(FSDirectory.open(Paths.get(indexFolder)));\n }",
"@NotThreadSafe\npublic interface JournalReader extends Closeable {\n /**\n * Reads an entry from the journal. Return null if there is no more entry left.\n *\n * @return the journal entry, null if no more entry left\n * @throws InvalidJournalEntryException if the journal entry is invalid (e.g. corrupted entry)\n */\n JournalEntry read() throws IOException, InvalidJournalEntryException;\n\n /**\n * Gets the the sequence number of the next journal log entry to read. This method is valid\n * no matter whether this JournalReader is closed or not.\n *\n * @return the next sequence number\n */\n long getNextSequenceNumber();\n}",
"ReadOnlyEntryBook getEntryBook();",
"public List<? extends OggettoCeleste> read(OggettoCeleste oggetto) throws SQLException, DAOException {\n\t\tthrow new DAOException(\"Not implemented\");\n\t}",
"T read(String identifier) throws IOException;",
"public InputStreamReader getStreamReader() {\n return streamReader;\n }",
"public FilesInputStreamLoad readFile() throws ArcException {\r\n\tFile dir = new File(this.archiveChargement + \".dir\");\r\n\tString fileName = ManipString.substringAfterFirst(this.idSource, \"_\");\r\n\tFile toRead = new File(dir + File.separator + ManipString.redoEntryName(fileName));\r\n\tFilesInputStreamLoad filesInputStreamLoadReturned = null;\r\n\ttry {\r\n\t\tfilesInputStreamLoadReturned = new FilesInputStreamLoad (toRead);\r\n\t} catch (IOException ioReadException) {\r\n\t\tthrow new ArcException(ioReadException, ArcExceptionMessage.FILE_READ_FAILED, toRead);\r\n\t}\r\n\treturn filesInputStreamLoadReturned;\r\n }",
"public static BamLocusReader getLocusReader(String filepath){\n if(!instances.containsKey(filepath)){\n synchronized (BamLocusReader.class){\n if(!instances.containsKey(filepath)){\n SamHeaderAndIterator headerAndIterator = IOHelper.openInput(filepath);\n BamLocusReader reader = new BamLocusReader();\n reader.samHeaderAndIterator = headerAndIterator;\n instances.put(filepath, reader);\n return reader;\n }\n }\n\n }\n return instances.get(filepath);\n\n }",
"@Override\r\n\tpublic ReviewVO read(int no) {\n\t\treturn sqlSession.selectOne(namespace + \".read\", no);\r\n\t}",
"public IFormatReader getReader() {\n\t\t\treturn reader;\n\t\t}",
"List<T> readAll();",
"public Cursor retrieve()\n {\n String[] columns={Constants.ROW_ID,Constants.FIRSTNAME,Constants.LASTNAME};\n Cursor c=null;\n c=db.query(Constants.TB_NAME,columns,null,null,null,null,null);\n return c;\n }"
] | [
"0.64184695",
"0.6249266",
"0.6232591",
"0.61696935",
"0.6167807",
"0.6103768",
"0.60477316",
"0.5872433",
"0.58551645",
"0.5829053",
"0.5818624",
"0.5773362",
"0.57303023",
"0.5691014",
"0.5665921",
"0.5593763",
"0.5519685",
"0.55166006",
"0.5497982",
"0.54692864",
"0.5435363",
"0.5435363",
"0.5432181",
"0.5420505",
"0.54118735",
"0.5390255",
"0.5388167",
"0.53868705",
"0.53494775",
"0.53366",
"0.5283596",
"0.52835464",
"0.5282403",
"0.52667546",
"0.5262905",
"0.5262905",
"0.52459",
"0.52328026",
"0.52312464",
"0.5208352",
"0.51779735",
"0.51767373",
"0.51742554",
"0.517101",
"0.5155542",
"0.513157",
"0.5126358",
"0.5122742",
"0.5111807",
"0.51096094",
"0.5099433",
"0.50939816",
"0.50864184",
"0.50776017",
"0.5054044",
"0.50539315",
"0.5022348",
"0.5014611",
"0.5005867",
"0.50036883",
"0.49812898",
"0.49787253",
"0.49769324",
"0.4959562",
"0.49514005",
"0.49452606",
"0.49385",
"0.49372125",
"0.4935464",
"0.49322096",
"0.4928144",
"0.49279273",
"0.49261132",
"0.4921576",
"0.49182808",
"0.49176827",
"0.49162215",
"0.49137762",
"0.4911851",
"0.49025294",
"0.490237",
"0.48839647",
"0.4879296",
"0.48721296",
"0.4869629",
"0.4868",
"0.48624277",
"0.48612908",
"0.48424512",
"0.48315018",
"0.48288676",
"0.48109087",
"0.4809909",
"0.4805854",
"0.4803608",
"0.48011765",
"0.48009813",
"0.4798999",
"0.4787461",
"0.4784438"
] | 0.5533503 | 16 |
Get reader for merging (does not load the terms index): | public synchronized ISegmentReader getMergeReader() throws IOException {
if (mMergeReader == null) {
if (mReader != null) {
// Just use the already opened non-merge reader
// for merging. In the NRT case this saves us
// pointless double-open:
// Ref for us:
mReader.increaseRef();
mMergeReader = mReader;
} else {
// We steal returned ref:
mMergeReader = mWriter.getContext().newSegmentReader(mInfo);
if (mLiveDocs == null)
mLiveDocs = mMergeReader.getLiveDocs();
}
}
// Ref for caller
mMergeReader.increaseRef();
return mMergeReader;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract Reader getReader() throws IOException;",
"public synchronized ISegmentReader getReader() throws IOException {\n\t\tif (mReader == null) {\n\t\t\t// We steal returned ref:\n\t\t\tmReader = mWriter.getContext().newSegmentReader(mInfo);\n\t\t\tif (mLiveDocs == null) \n\t\t\t\tmLiveDocs = mReader.getLiveDocs();\n\t\t}\n\n\t\t// Ref for caller\n\t\tmReader.increaseRef();\n\t\treturn mReader;\n\t}",
"public Reader getReader()\n {\n return reader;\n }",
"public Reader getReader() {\r\n return reader;\r\n }",
"protected IndexReader getReader() {\n\t\treturn indexReader;\n\t}",
"@Override\n\t\tpublic BufferedReader getReader() throws IOException {\n\t\t\treturn null;\n\t\t}",
"public static BufferedReader concat(Reader reader1, Reader reader2) {\n if(reader1 == null) {\n return IO.get(reader2);\n }\n if(reader2 == null) {\n return IO.get(reader1);\n }\n return new BufferedReader(new ConcatenatedReader(reader1, reader2));\n }",
"public ConcatReader(Reader in){\r\n\t\taddReader(in);\r\n\t\tlastReaderAdded();\r\n\t}",
"@Override\n\tpublic BufferedReader getReader() throws IOException {\n\t\treturn null;\n\t}",
"@Override\n\tpublic BufferedReader getReader() throws IOException {\n\t\treturn null;\n\t}",
"public JournalReader read() {\n return new JournalReader(this);\n }",
"@SneakyThrows\n public Reader reader() {\n return new FileReader(this.temp);\n }",
"public BufferedMCLReader getReader() {\n\t\treturn reader;\n\t}",
"protected final Reader getReader()\n {\n return _reader;\n }",
"public synchronized IndexReader getReader(File indexDir) throws Exception{\r\n \tif (!mReaders.containsKey(indexDir)){\r\n \t\tsetNewReader(indexDir);\r\n \t\treturn getReader(indexDir);\r\n \t}\r\n \tsynchronized (mReaders) {\r\n \t\ttry{\r\n \t\t\t\r\n \t\tList<ReaderContainer> lReader = mReaders.get(indexDir);\r\n \t\tlog.debug(\"getReader :: lReader size = \"+lReader.size()+\" | nb index files= \"+indexDir.listFiles().length);\r\n \t\t\r\n \t\tif (lReader.size() == 0) {\r\n \t\t\tsetNewReader(indexDir);\r\n \t\t} else {\r\n \t\t\tReaderContainer readerContainer = lReader.get(lReader.size()-1);\r\n \t\t\tif (readerContainer.isClosable()){\r\n \t \t\treaderContainer.close();\r\n \t \t\tlReader.remove(readerContainer);\r\n \t \t\tlog.debug(\"getReader :: closed = (unRegister) size lreader = \"+lReader.size());\r\n \t \t\tsetNewReader(indexDir);\r\n \t \t\t\r\n \t \t}\r\n \t\t}\r\n\r\n \t\tReaderContainer readerContainer = lReader.get(lReader.size()-1);\r\n readerContainer.incNbSearch();\r\n \t\treturn readerContainer.getReader();\r\n \t\t\r\n \t\t} catch(Exception ex){\r\n \t\tlog.fatal(\"getReader :: mReaders.containsKey(indexDir)\" +mReaders.containsKey(indexDir)+\" ERR:\"+ex);\r\n \t\tif (mReaders.containsKey(indexDir)){\r\n \t\t\tList<ReaderContainer> lReader = mReaders.get(indexDir);\r\n \t\t\tlog.fatal(\"getReader :: size reader for this index : \"+lReader.size() +\" index: \"+indexDir.getCanonicalPath());\r\n \t}\r\n \t\treturn null;\r\n \t}\r\n\t\t}\r\n }",
"public ConcatReader(Reader in1, Reader in2){\r\n\t\taddReader(in1);\r\n\t\taddReader(in2);\r\n\t\tlastReaderAdded();\r\n\t}",
"public abstract UIReader getReaderByName(String readerName);",
"public RecordReader getRecordReader( InputSplit split, JobConf job, Reporter reporter ) throws IOException\n {\n MultiInputSplit multiSplit = (MultiInputSplit) split;\n JobConf currentConf = mergeConf( job, multiSplit.config, true );\n \n return currentConf.getInputFormat().getRecordReader( multiSplit.inputSplit, currentConf, reporter );\n }",
"public JodaBeanSmartReader smartReader() {\n return new JodaBeanSmartReader(this);\n }",
"public static FileReader getReader() {\n return new CsvFileReader();\n }",
"protected abstract ReaderType newBuilder();",
"public Object clone() throws CloneNotSupportedException {\n\t\treturn (Reader) super.clone();\n\t}",
"public Reader newReader() {\n synchronized (allReaders) {\n Reader reader = new Reader(this);\n allReaders.add(reader);\n return reader;\n }\n }",
"public Reader getReader() {\n return in;\n }",
"NffgReader getReader() throws ServiceException;",
"public synchronized ISegmentReader getReadOnlyClone() throws IOException {\n\t\tif (mReader == null) {\n\t\t\tgetReader().decreaseRef();\n\t\t\tassert mReader != null;\n\t\t}\n\t\tmShared = true;\n\t\tif (mLiveDocs != null) {\n\t\t\treturn mWriter.getContext().newSegmentReader(mReader, mLiveDocs, \n\t\t\t\t\tmInfo.getSegmentInfo().getDocCount() - mInfo.getDelCount() - mPendingDeleteCount);\n\t\t} else {\n\t\t\tassert mReader.getLiveDocs() == mLiveDocs;\n\t\t\tmReader.increaseRef();\n\t\t\treturn mReader;\n\t\t}\n\t}",
"alluxio.proto.journal.KeyValue.MergeStoreEntry getMergeStore();",
"public JodaBeanBinReader binReader() {\n return new JodaBeanBinReader(this);\n }",
"public static BufferedReader get(Reader in) {\n if(in == null || in instanceof BufferedReader) {\n return (BufferedReader)in;\n }\n return new BufferedReader(in);\n }",
"private static IIteratingChemObjectReader<IAtomContainer> getInputReader(\n ArgumentHandler argsH, IChemObjectBuilder builder) throws FileNotFoundException {\n DataFormat inputFormat = argsH.getInputFormat();\n IIteratingChemObjectReader<IAtomContainer> reader;\n String filepath = argsH.getInputFilepath();\n InputStream in = new FileInputStream(filepath);\n switch (inputFormat) {\n case SMILES: reader = new IteratingSMILESReader(in, builder); break;\n case SIGNATURE: reader = new IteratingSignatureReader(in, builder); break;\n case SDF: reader = new IteratingSDFReader(in, builder); break;\n case ACP: reader = new IteratingACPReader(in, builder); break;\n default: reader = null; error(\"Unrecognised format\"); break;\n }\n return reader;\n }",
"StreamReader underlyingReader();",
"public IndexReader getIndexReader() {\n return indexReader;\n }",
"List<BookStoreElement> load(Reader reader);",
"public StatDataFileReader createReaderInstance() throws IOException{\n return createReaderInstance(null);\n }",
"public Collection<AbstractReaderPlugin> getReaders();",
"public IFormatReader getReader() {\n\t\t\treturn reader;\n\t\t}",
"public Graph load(Reader reader, Graph g) throws IOException\n {\n return load(reader, g, null);\n }",
"@Override\n\t\tpublic RecordReader<LongWritable, Text> getRecordReader(\n\t\t\t\tInputSplit genericSplit, JobConf job, Reporter reporter)\n\t\t\t\tthrows IOException {\n\t\t\treporter.setStatus(genericSplit.toString());\n\t\t\treturn new MyRecordReader(job, (FileSplit) genericSplit);\n\t\t}",
"@Override\n\tpublic RecordReader<Text, ArchiveReader> getRecordReader(InputSplit arg0,\n\t\t\tJobConf arg1, Reporter arg2) throws IOException {\n\t\ttry {\n\t\t\treturn new WARCFileRecordReader(arg0, arg1);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"public ConcatReader(Reader[] in){\r\n\t\taddReaders(in);\r\n\t\tlastReaderAdded();\r\n\t}",
"@Override\n public RecordReader<NullWritable, Text> createRecordReader(\n InputSplit split, TaskAttemptContext context) throws IOException {\n\n if (!(split instanceof CombineFileSplit)) {\n throw new IllegalArgumentException(\"split must be a CombineFileSplit\");\n }\n return new CombineFileRecordReader<NullWritable, Text>((CombineFileSplit) split, context, WholeFileRecordReader.class);\n }",
"public synchronized BlackLabIndex getIndexFromReader(String indexName, IndexReader reader, boolean wrapIfNotFound, boolean writeMode) {\n BlackLabIndex blackLabIndex = indexReader2BlackLabIndex.get(reader);\n if (blackLabIndex == null && wrapIfNotFound) {\n // We don't have a BlackLabIndex instance for this IndexReader yet. This can occur if e.g.\n // Solr is in charge of opening IndexReaders. Create a new instance now and register it.\n try {\n blackLabIndex = wrapIndexReader(indexName, reader, false);\n registerIndex(reader, blackLabIndex);\n } catch (ErrorOpeningIndex e) {\n throw new RuntimeException(e);\n }\n }\n return blackLabIndex;\n }",
"private BufferedReader getBufferedReader(String filename) {\n\t\tBufferedReader retval;\n\t\ttry{\n\t\t\tretval = createReader(filename);\n\t\t\tif (retval != null) {\n\t\t\t\treturn retval;\n\t\t\t} else {\n\t\t\t\tDebug.error(\"Jay3DModel\", \"Unable to load file: \" + filename);\n\t\t\t}\n\t\t}catch(NullPointerException e){\n\t\t\tDebug.error(\"Jay3DModel\", \"Unable to load file: \" + filename);\n\t\t}\n\t\treturn null;\n\t}",
"public String getReaderType() {\n\t\treturn \"DleseCollectionDocReader\";\n\t}",
"private synchronized ReadOnlyDirectoryReader createReadDirectoryReader(\n\t\t\tfinal Directory directory,\n\t\t\tfinal SegmentInfos infos, \n\t\t\tfinal IndexDeletionPolicy deletionPolicy,\n\t\t\tfinal int termInfosIndexDivisor, \n\t\t\tString segmentFileName) throws CorruptIndexException, IOException {\n\t\tReadOnlyDirectoryReader reader = new ReadOnlyDirectoryReader(\n\t\t\t\tdirectory, infos, deletionPolicy, termInfosIndexDivisor, null);\n\t\t\n\t\t// Faire quelque chose...\n\t\t// Raaah c'est les SolrIndexSearchers qu'ils faut mettre a jour !! :'(\n\t\t\n\t\t// creation d'un objet de sauvegarde\n\t\tReadDirectoryReader r = new ReadDirectoryReader(directory, infos, deletionPolicy, termInfosIndexDivisor);\n\t\t// Mise a jour des anciens readers\n\t\tif (!readDirectoryReaders.isEmpty()) {\n\t\t\tupdateReadOnlyReaders(reader);\n\t\t}\n\t\treadDirectoryReaders.put(segmentFileName,r);\n\t\t\n\t\treturn reader;\n\t}",
"public ResourceHolder<ByteBuffer> getMergeBuffer()\n {\n final ByteBuffer buffer = mergeBuffers.pop();\n return new ResourceHolder<ByteBuffer>()\n {\n @Override\n public ByteBuffer get()\n {\n return buffer;\n }\n\n @Override\n public void close()\n {\n mergeBuffers.add(buffer);\n }\n };\n }",
"public synchronized void setNewReader(File indexDir) throws IOException{\r\n \tsynchronized (mReaders) {\r\n \t\ttry{\r\n \tList<ReaderContainer> lReader;\r\n \tif (!mReaders.containsKey(indexDir)){\r\n \t\tlReader = new ArrayList<ReaderContainer>();\r\n \t\tlReader.add(new ReaderContainer(IndexReader.open(FSDirectory.open(indexDir))));\r\n \t\tmReaders.put(indexDir, lReader);\r\n \t} else {\r\n \t\tlReader = mReaders.get(indexDir);\r\n \t\t\r\n \t\tif (lReader.size() > 0){\r\n \t\t\tlog.debug(\"setNewReader-STEP1 :: lReader.size() = \" + lReader.size());\r\n// \t\t\tfor (int i = lReader.size() - 1; i >= 0 ; i--) {\r\n// \t\t\t\tReaderContainer readerContainer = lReader.get(i);\r\n \t\t\tReaderContainer readerContainer = lReader.get(lReader.size() - 1);\r\n \t\t\t\r\n \tif (readerContainer.isClosable()){\r\n \t\treaderContainer.close();\r\n \t\tlReader.remove(readerContainer);\r\n \t}\r\n// \t\t\t}\r\n \t}\r\n \t\tlReader.add(new ReaderContainer(IndexReader.open(FSDirectory.open(indexDir))));\r\n \t\tlog.debug(\"setNewReader :: lReader.size() = \" + lReader.size());\r\n \t}\r\n \t\r\n \t\t} catch(Exception ex){\r\n \t\tlog.fatal(\"setNewReader :: mReaders.containsKey(indexDir)\" +mReaders.containsKey(indexDir)+\" indexDir \"+indexDir.getCanonicalPath()+\" ERR:\"+ex);\r\n \t}\r\n\t\t}\r\n }",
"@Override\n protected SearcherAndTaxonomy refreshIfNeeded(SearcherAndTaxonomy ref) throws IOException {\n final IndexReader r = ref.searcher.getIndexReader();\n final IndexReader newReader = DirectoryReader.openIfChanged((DirectoryReader) r);\n if (newReader == null) {\n return null;\n } else {\n DirectoryTaxonomyReader tr;\n try {\n tr = TaxonomyReader.openIfChanged(ref.taxonomyReader);\n } catch (Throwable t1) {\n try {\n IOUtils.close(newReader);\n } catch (Throwable t2) {\n t2.addSuppressed(t2);\n }\n throw t1;\n }\n if (tr == null) {\n ref.taxonomyReader.incRef();\n tr = ref.taxonomyReader;\n } else if (taxoWriter != null && taxoWriter.getTaxonomyEpoch() != taxoEpoch) {\n IOUtils.close(newReader, tr);\n throw new IllegalStateException(\n \"DirectoryTaxonomyWriter.replaceTaxonomy was called, which is not allowed when using SearcherTaxonomyManager\");\n }\n\n return new SearcherAndTaxonomy(\n SearcherManager.getSearcher(searcherFactory, newReader, r), tr);\n }\n }",
"DataReader reader();",
"public ReaderWriterProvider readerWriterProvider() { return _readerProvider; }",
"public interface ReferenceableReader extends Cloneable {\n\n public DataRef getRef() throws IOException;\n\n public void read(int docNo) throws IOException;\n\n public void close() throws IOException;\n\n public ReferenceableReader clone();\n}",
"private void setMatchingSegmentReaders() {\n int numReaders = mergeState.readers.size();\n mergeState.matchingSegmentReaders = new SegmentReader[numReaders];\n\n // If this reader is a SegmentReader, and all of its\n // field name -> number mappings match the \"merged\"\n // FieldInfos, then we can do a bulk copy of the\n // stored fields:\n for (int i = 0; i < numReaders; i++) {\n AtomicReader reader = mergeState.readers.get(i);\n // TODO: we may be able to broaden this to\n // non-SegmentReaders, since FieldInfos is now\n // required? But... this'd also require exposing\n // bulk-copy (TVs and stored fields) API in foreign\n // readers..\n if (reader instanceof SegmentReader) {\n SegmentReader segmentReader = (SegmentReader) reader;\n boolean same = true;\n FieldInfos segmentFieldInfos = segmentReader.getFieldInfos();\n for (FieldInfo fi : segmentFieldInfos) {\n FieldInfo other = mergeState.fieldInfos.fieldInfo(fi.number);\n if (other == null || !other.name.equals(fi.name)) {\n same = false;\n break;\n }\n }\n if (same) {\n mergeState.matchingSegmentReaders[i] = segmentReader;\n mergeState.matchedCount++;\n }\n }\n }\n\n if (mergeState.infoStream.isEnabled(\"SM\")) {\n mergeState.infoStream.message(\"SM\", \"merge store matchedCount=\" + mergeState.matchedCount + \" vs \" + mergeState.readers.size());\n if (mergeState.matchedCount != mergeState.readers.size()) {\n mergeState.infoStream.message(\"SM\", \"\" + (mergeState.readers.size() - mergeState.matchedCount) + \" non-bulk merges\");\n }\n }\n }",
"private static CSVData getReader(){\n\t\tCSVData csv = null;\n\t\ttry {\n\t\t\tcsv = new CSVData();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn csv;\n\t}",
"public ConcatReader(){\r\n\t\t// Empty Constructor\r\n\t}",
"public Vector<String> getReader_h() {\n\t\t\n\t\treturn reader_h;\n\t}",
"protected abstract Reader read() throws IOException;",
"public BuilderMapperStage reader(Reader reader) {\n if (reader == null) {\n throw new IllegalArgumentException(\"Reader argument is null.\");\n }\n\n return reader(new BufferedReader(reader));\n }",
"public interface IReaderGobbler {\n /**\n * Handle data from the reader. No effort should be made to catch any IOException.\n *\n * @since 1.0\n */\n void gobble(IReader reader) throws IOException;\n}",
"public String getReaderType() {\n\n\t\treturn \"SimpleDocReader\";\n\n\t}",
"public abstract List<UIReader> getReaderList();",
"public Graph load(Reader reader) throws IOException\n {\n return load(reader, new SparseGraph(), null);\n }",
"int readerIndex();",
"public static BufferedReader asReader(String name) throws IOException {\n ClassLoader classLoader = Reflection.getCallerClass(3).getClassLoader();\n return new BufferedReader(new InputStreamReader(asStream(name, classLoader), UTF_8));\n }",
"public abstract Map<String, ReaderBlueprint> getReaderBlueprints();",
"axiom Object readLine(Object BufferedReader(FileReaderr f)) {\n\treturn f.get(0);\n }",
"static CellBackup read(IdReader reader, TechPool techPool) throws IOException {\n CellRevision newRevision = CellRevision.read(reader);\n boolean modified = reader.readBoolean();\n TechPool restrictedPool = techPool.restrict(newRevision.techUsages, techPool);\n return new CellBackup(newRevision, restrictedPool, modified);\n }",
"Read createRead();",
"public void doReads(Reader reader) throws IOException;",
"public JodaBeanJsonReader jsonReader() {\n return new JodaBeanJsonReader(this);\n }",
"private static ICUResourceBundle getBundle(ICUResourceBundleReader reader, String baseName, String localeID, ClassLoader loader)\n/* */ {\n/* 1098 */ int rootRes = reader.getRootResource();\n/* 1099 */ ICUResourceBundleImpl bundle; if (gPublicTypes[ICUResourceBundleReader.RES_GET_TYPE(rootRes)] == 2) {\n/* 1100 */ bundle = new ICUResourceBundleImpl.ResourceTable(reader, null, \"\", rootRes, null);\n/* */ } else\n/* 1102 */ throw new IllegalStateException(\"Invalid format error\");\n/* */ ICUResourceBundleImpl bundle;\n/* 1104 */ bundle.baseName = baseName;\n/* 1105 */ bundle.localeID = localeID;\n/* 1106 */ bundle.ulocale = new ULocale(localeID);\n/* 1107 */ bundle.loader = loader;\n/* 1108 */ if (bundle.reader.getUsesPoolBundle()) {\n/* 1109 */ bundle.reader.setPoolBundleKeys(((ICUResourceBundleImpl)getBundleInstance(baseName, \"pool\", loader, true)).reader);\n/* */ }\n/* */ \n/* 1112 */ UResourceBundle alias = bundle.handleGetImpl(\"%%ALIAS\", null, bundle, null, null);\n/* 1113 */ if (alias != null) {\n/* 1114 */ return (ICUResourceBundle)UResourceBundle.getBundleInstance(baseName, alias.getString());\n/* */ }\n/* 1116 */ return bundle;\n/* */ }",
"public ResourceMount autodetectMerging() {\n\t\t_merge = null;\n\t\treturn this;\n\t}",
"public interface TagDataReader {\r\n WritableMap getTagMap();\r\n}",
"protected ValueReader beanReader(Class<?> type)\n {\n\n final ClassKey key = new ClassKey(type, _features);\n synchronized (_readerLock) {\n if (_incompleteReaders == null) {\n _incompleteReaders = new HashMap<ClassKey, ValueReader>();\n } else { // perhaps it has already been resolved?\n ValueReader vr = _incompleteReaders.get(key);\n if (vr != null) {\n return vr;\n }\n }\n final BeanReader def = _resolveBeanForDeser(type, _resolveBeanDef(type));\n try {\n _incompleteReaders.put(key, def);\n for (Map.Entry<String, BeanPropertyReader> entry : def.propertiesByName().entrySet()) {\n BeanPropertyReader prop = entry.getValue();\n entry.setValue(prop.withReader(createReader(type, prop.rawSetterType(), prop.genericSetterType())));\n }\n } finally {\n _incompleteReaders.remove(key);\n }\n return def;\n }\n }",
"public T read(JsonReader in) throws IOException {\n\t return null;\n\t }",
"public java.io.Reader getReader (URL url) throws java.io.IOException;",
"interface Source {\n /** Finds a reader for a given file name.\n */\n public java.io.Reader getReader (URL url) throws java.io.IOException;\n }",
"public BlackLabIndex wrapIndexReader(String indexName, IndexReader reader, boolean indexMode) throws ErrorOpeningIndex {\n return new BlackLabIndexIntegrated(indexName, this, reader, null, indexMode, false,\n null);\n }",
"abstract Object read(@NonNull JsonReader reader) throws IOException;",
"MergeState merge() throws IOException {\n if (!shouldMerge()) {\n throw new IllegalStateException(\"Merge would result in 0 document segment\");\n }\n // NOTE: it's important to add calls to\n // checkAbort.work(...) if you make any changes to this\n // method that will spend alot of time. The frequency\n // of this check impacts how long\n // IndexWriter.close(false) takes to actually stop the\n // threads.\n mergeFieldInfos();\n setMatchingSegmentReaders();\n long t0 = 0;\n if (mergeState.infoStream.isEnabled(\"SM\")) {\n t0 = System.nanoTime();\n }\n int numMerged = mergeFields();\n if (mergeState.infoStream.isEnabled(\"SM\")) {\n long t1 = System.nanoTime();\n mergeState.infoStream.message(\"SM\", ((t1 - t0) / 1000000) + \" msec to merge stored fields [\" + numMerged + \" docs]\");\n }\n assert numMerged == mergeState.segmentInfo.getDocCount();\n\n final SegmentWriteState segmentWriteState = new SegmentWriteState(mergeState.infoStream, directory, mergeState.segmentInfo, mergeState.fieldInfos, termIndexInterval, null, context);\n if (mergeState.infoStream.isEnabled(\"SM\")) {\n t0 = System.nanoTime();\n }\n mergeTerms(segmentWriteState);\n if (mergeState.infoStream.isEnabled(\"SM\")) {\n long t1 = System.nanoTime();\n mergeState.infoStream.message(\"SM\", ((t1 - t0) / 1000000) + \" msec to merge postings [\" + numMerged + \" docs]\");\n }\n\n if (mergeState.infoStream.isEnabled(\"SM\")) {\n t0 = System.nanoTime();\n }\n if (mergeState.fieldInfos.hasDocValues()) {\n mergeDocValues(segmentWriteState);\n }\n if (mergeState.infoStream.isEnabled(\"SM\")) {\n long t1 = System.nanoTime();\n mergeState.infoStream.message(\"SM\", ((t1 - t0) / 1000000) + \" msec to merge doc values [\" + numMerged + \" docs]\");\n }\n\n if (mergeState.fieldInfos.hasNorms()) {\n if (mergeState.infoStream.isEnabled(\"SM\")) {\n t0 = System.nanoTime();\n }\n mergeNorms(segmentWriteState);\n if (mergeState.infoStream.isEnabled(\"SM\")) {\n long t1 = System.nanoTime();\n mergeState.infoStream.message(\"SM\", ((t1 - t0) / 1000000) + \" msec to merge norms [\" + numMerged + \" docs]\");\n }\n }\n\n if (mergeState.fieldInfos.hasVectors()) {\n if (mergeState.infoStream.isEnabled(\"SM\")) {\n t0 = System.nanoTime();\n }\n numMerged = mergeVectors();\n if (mergeState.infoStream.isEnabled(\"SM\")) {\n long t1 = System.nanoTime();\n mergeState.infoStream.message(\"SM\", ((t1 - t0) / 1000000) + \" msec to merge vectors [\" + numMerged + \" docs]\");\n }\n assert numMerged == mergeState.segmentInfo.getDocCount();\n }\n\n // write the merged infos\n FieldInfosWriter fieldInfosWriter = codec.fieldInfosFormat().getFieldInfosWriter();\n fieldInfosWriter.write(directory, mergeState.segmentInfo.name, \"\", mergeState.fieldInfos, context);\n\n return mergeState;\n }",
"public IndexReader getIndexReader() {\n\t\ttry {\n\t\t\tcheckDirectory();\n\t\t\tcheckIndexLocking();\n\n\t\t\tboolean exist = IndexReader.indexExists(getDirectory());\n\t\t\tif( exist ) {\n\t\t\t\treturn IndexReader.open(getDirectory());\n\t\t\t} else {\n\t\t\t\tthrow new LuceneIndexAccessException(\"The index doesn't exist for the specified directory\");\n\t\t\t}\n\t\t} catch(IOException ex) {\n\t\t\tthrow new LuceneIndexAccessException(\"Error during opening the reader\",ex);\n\t\t}\n\t}",
"public FilesInputStreamLoad readFile() throws ArcException {\r\n\tFile dir = new File(this.archiveChargement + \".dir\");\r\n\tString fileName = ManipString.substringAfterFirst(this.idSource, \"_\");\r\n\tFile toRead = new File(dir + File.separator + ManipString.redoEntryName(fileName));\r\n\tFilesInputStreamLoad filesInputStreamLoadReturned = null;\r\n\ttry {\r\n\t\tfilesInputStreamLoadReturned = new FilesInputStreamLoad (toRead);\r\n\t} catch (IOException ioReadException) {\r\n\t\tthrow new ArcException(ioReadException, ArcExceptionMessage.FILE_READ_FAILED, toRead);\r\n\t}\r\n\treturn filesInputStreamLoadReturned;\r\n }",
"@Override\n public String readSessionInformation(BufferedReader reader, boolean merge) {\n String textLine = FileUtils.readLine(reader);\n if (textLine==null) { return \"Reading rotation matrix line.\"; }\n return readSessionInformation(reader,textLine);\n }",
"public List<Reader> getReaders()\n {\n List<Reader> list = DDVConfigFactory.getReaderPresets();\n List<Reader> result = new ArrayList<Reader>();\n for (Reader r:list)\n {\n if (r.getClass().getName().equals(CustomReader.class.getName()))\n continue; // Der ist im Payment-Server nicht zulaessig, weil hier der Benutzer\n // den CTAPI-Treiber manuell angeben muesste. Dazu muesste er aber\n // im Dateisystem des Servers browsen koennen. Und das ist mir\n // zu umstaendlich.\n \n if (!r.isSupported())\n continue; // Wird vom OS nicht unterstuetzt\n result.add(r);\n }\n return result;\n }",
"@Override\n public Reader getReader(final Object templateSource, final String encoding) throws IOException {\n try (final Reader reader = delegate.getReader(templateSource, encoding)) {\n final String templateText = IOUtils.toString(reader);\n if (!templateText.contains(\"<#ftl\")) {\n return new StringReader(ESCAPE_PREFIX + templateText + ESCAPE_SUFFIX);\n } else {\n return new StringReader(templateText);\n }\n }\n }",
"public ConfigurationReader getCrInstance() throws IOException {\n\tConfigurationReader cr = new ConfigurationReader();\n\treturn cr;\n\n\t}",
"private static ImageReader getReader(String fileName) {\n\t\ttry {\n\t\t\tObject source;\n\t\t\tif (fileName.startsWith(\"http\")) {\n\t\t\t\ttry {\n\t\t\t\t\tsource = cache.getImage(fileName);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t} catch (ExecutionException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\tsource = new File(fileName); // Create a File from the path\n\t\t\t\t\t\t\t\t\t\t\t\t// string.\n\t\t\tIterator readers = ImageIO.getImageReadersByFormatName(\"jpeg\"); // Read\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// JPEGs.\n\t\t\tImageReader reader = (ImageReader) readers.next();\n\t\t\tImageInputStream iis = ImageIO.createImageInputStream(source); // Create\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// stream.\n\t\t\treader.setInput(iis, true); // And assign it to the reader.\n\t\t\tIIOReadWarningListener rwl = new MyWarningListener(fileName); // Set\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// up\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// listeners...\n\t\t\tmrpl = new MyReadProgressListener();\n\t\t\treader.addIIOReadProgressListener(mrpl);\n\t\t\treader.addIIOReadWarningListener(rwl);\n\t\t\treturn reader; // Give back the reader.\n\t\t} catch (java.io.IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t\tSystem.out.println(\"There was an error loading the image: \"\n\t\t\t\t\t+ fileName); // Debugging.\n\t\t\treturn null;\n\t\t}\n\t}",
"private BufferedReader abrirArquivoLeitura() throws FileNotFoundException {\n\t\tBufferedReader file = null;\n\t\tfile = new BufferedReader(new FileReader(caminho));\n\t\treturn file;\n\t}",
"public IncludeReader(BufferedReader reader) {\n\t\treaders.push(reader);\n\t\trootUri = null;\n\t\tsetupIncludePath();\n\t}",
"private BufferedReader inFromFile(String indexFullName) \n {\n try \n { return new BufferedReader( new FileReader( new File( indexFullName ) ) ); } \n catch (FileNotFoundException e) \n {\n log.warn( \"could not find index file \" + indexFullName + \": no bindings created\" );\n return new BufferedReader( new EmptyReader() );\n }\n }",
"protected IndexReader getIndexReader(String indexFolder) throws IOException {\n return DirectoryReader.open(FSDirectory.open(Paths.get(indexFolder)));\n }",
"@FunctionalInterface\n protected interface StreamReader<ReaderType> {\n void accept(RevisionDataInput input, ReaderType target) throws IOException;\n }",
"public MapReader getIo() {\n\t\treturn io;\n\t}",
"public Graph load(Reader reader, NumberEdgeValue nev) throws IOException\n {\n return load(reader, new SparseGraph(), nev);\n }",
"private ICardinality getMerged(Set<SSTableReader> candidates) throws CardinalityMergeException\n {\n ICardinality[] cardinalities = new ICardinality[candidates.size() - 1];\n int i = 0;\n ICardinality first = null;\n\n for (SSTableReader sstable : candidates)\n {\n if (first == null)\n first = sstable.keyCardinalityEstimator();\n else\n cardinalities[i++] = sstable.keyCardinalityEstimator();\n }\n\n return first.merge(cardinalities);\n }",
"public abstract StatDataFileReader createReaderInstance(Object extension)\n throws IOException;",
"public alluxio.proto.journal.KeyValue.MergeStoreEntry getMergeStore() {\n return mergeStore_;\n }",
"private static BufferedReader getTagsFileBufferedReader() throws IOException {\n File tagFile = PATH.toFile();\n if(!tagFile.isFile() && !tagFile.createNewFile())\n throw new IOException(\"Could not create: \" + tagFile.getAbsolutePath());\n\n return Files.newBufferedReader(PATH);\n }",
"public fileReaderDesignated() throws FileNotFoundException{\n\t\tBufferedReader in=new BufferedReader(new FileReader(fileName));\n\t\ttry {\n\t\t\treadLargerTextFile(fileName);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private Reader (Builder builder) {\n\t\tsuper(builder);\n\t}",
"private String readAll(Reader rd) throws IOException {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tint cp;\r\n\t\twhile ((cp = rd.read()) != -1) {\r\n\t\t\tsb.append((char) cp);\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}"
] | [
"0.61853063",
"0.60354465",
"0.5982953",
"0.5927674",
"0.591132",
"0.59020746",
"0.58995587",
"0.57525575",
"0.57444835",
"0.57444835",
"0.5739936",
"0.57115763",
"0.5696198",
"0.5681752",
"0.5651881",
"0.564909",
"0.56227976",
"0.56227213",
"0.5609725",
"0.56008065",
"0.5597613",
"0.5575602",
"0.5564497",
"0.553242",
"0.551507",
"0.5511648",
"0.5464341",
"0.5458878",
"0.54535526",
"0.5441277",
"0.54256684",
"0.54113",
"0.5330926",
"0.5300254",
"0.529042",
"0.5289714",
"0.52837926",
"0.5283113",
"0.52612936",
"0.5258882",
"0.5258164",
"0.52447206",
"0.5240389",
"0.52231854",
"0.52215916",
"0.5220029",
"0.52121645",
"0.5204885",
"0.5199389",
"0.5174611",
"0.51518786",
"0.51329863",
"0.5121257",
"0.51143765",
"0.5052211",
"0.5048277",
"0.50421673",
"0.5037126",
"0.50241256",
"0.5022454",
"0.5003861",
"0.50022876",
"0.5000901",
"0.49933127",
"0.4985854",
"0.49825522",
"0.4981929",
"0.4972802",
"0.4972561",
"0.49722597",
"0.49688342",
"0.49656647",
"0.49555105",
"0.4954943",
"0.49488354",
"0.49460095",
"0.49253505",
"0.4922167",
"0.4904072",
"0.49033663",
"0.4896959",
"0.4893726",
"0.48900133",
"0.48852584",
"0.48727903",
"0.48628166",
"0.48611376",
"0.48478907",
"0.48462403",
"0.4841794",
"0.48379955",
"0.48146698",
"0.4809549",
"0.48072404",
"0.48067728",
"0.47992164",
"0.47880468",
"0.47878078",
"0.47871754",
"0.4786458"
] | 0.7346101 | 0 |
NOTE: removes callers ref | public synchronized void dropReaders() throws IOException {
if (mReader != null) {
mReader.decreaseRef();
mReader = null;
}
if (mMergeReader != null) {
mMergeReader.decreaseRef();
mMergeReader = null;
}
decreaseRef();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void removeReference()\n {\n }",
"public void ref() {\n\n\t}",
"void unsetRef();",
"private void clearRefuse() {\n \n refuse_ = false;\n }",
"protected void releaseReferences() {\r\n\r\n\t}",
"private void removeCrossReference ()\n\t{\n\t\tif (crossReference != null)\n\t\t{\n\t\t\tcrossReferences.remove (crossReference);\n\t\t}\n\t}",
"public void refill(){\r\n\t}",
"void removeHadithReferenceNo(Object oldHadithReferenceNo);",
"void decCount() {\n if (refCount > 0) {\n --refCount;\n }\n }",
"public final void removeRef() {\n // Deletion in Java is up to the garbage collector.\n refCount.decrementAndGet();\n }",
"public native void clearReferent();",
"public void remHsExtendedRef(){\n ((ExtendedRefHSDMO) core).remHsExtendedRef();\n }",
"public static void test(){\n ReferenceCountingGC a = new ReferenceCountingGC();\n ReferenceCountingGC b = new ReferenceCountingGC();\n a.instance = b;\n b.instance = a;\n\n a = null;\n b = null;\n\n System.gc();\n }",
"public native void pythonDecRef();",
"@Override\n public String getReferenceInfo()\n {\n return \"\";\n }",
"public void decrRefCounter() {\n\t\tthis.refCounter--;\n\t}",
"@Override\n\tpublic void detalhar() {\n\t\t\n\t}",
"public void softReference()\n {\n \t //====NOTE=====>>> RSN how SoftReference is created\n SoftReference<ReferenceExample> ex = new SoftReference<ReferenceExample>(new ReferenceExample(\"SoftRef\"));\n //====NOTE=====>>> RSN SUPER IMP : Note how to get hold of real object, by get() method\n System.out.println(\"Soft refrence :: \" + ex.get().getOrigin());\n \n int counter=0;\n while(counter<5)\n {\n counter++;\n System.gc();\n }\n \n System.out.println(\"SoftReference still Valid after 5 GC:\" + ex.get().getStatus() + \"Orig=\" + ex.get().getOrigin());\n }",
"@External\n\tpublic void untether() {\n\t\tif (!Context.getOrigin().equals(Context.getOwner()))\n\t\t\tContext.revert(\"Only the owner can call the untether method.\");\n\t}",
"@Override\n\tpublic void freeMe() {\n\n\t}",
"public void referToGP(){\r\n\t\t//here is some code that we do not have access to\r\n\t}",
"private native void finaliseLoggerReference();",
"private native void finaliseLoggerReference();",
"public void hiliteByReference(String ref) {\n\t}",
"@Override\n public void setCurSharedRef(MPlaceholder arg0)\n {\n \n }",
"Variable getRefers();",
"void removeBrokenRefs() \r\n {\n\r\n if (LOG.isTraceOn()) LOG.trace(\"BEGIN removeBrokenRefs\"); \r\n\r\n Iterator compItr = new ComponentTreeIterator(\r\n (BComponent) BOrd.make(\"slot:/\").resolve(service, null).get());\r\n\r\n // check every component\r\n while (compItr.hasNext())\r\n {\r\n BComponent comp = (BComponent) compItr.next();\r\n HDict tags = BHDict.findTagAnnotation(comp);\r\n if (tags == null) continue;\r\n\r\n // check if any of the tags are a broken ref\r\n Set brokenRefs = null;\r\n Iterator tagItr = tags.iterator();\r\n while (tagItr.hasNext())\r\n {\r\n Map.Entry e = (Map.Entry) tagItr.next();\r\n String name = (String) e.getKey();\r\n HVal val = (HVal) e.getValue();\r\n\r\n if (val instanceof HRef)\r\n {\r\n // try to resolve the ref\r\n try\r\n {\r\n BComponent lookup = tagMgr.lookupComponent((HRef) val);\r\n if (lookup == null)\r\n throw new IllegalStateException(\"Cannot find component for \" + val);\r\n }\r\n // failed!\r\n catch (Exception e2)\r\n {\r\n LOG.warning(\r\n \"broken ref '\" + name + \"' found in \" + \r\n comp.getSlotPath());\r\n\r\n if (brokenRefs == null)\r\n brokenRefs = new HashSet();\r\n brokenRefs.add(name);\r\n }\r\n }\r\n }\r\n\r\n // at least one broken ref was found\r\n if (brokenRefs != null)\r\n {\r\n HDictBuilder hdb = new HDictBuilder();\r\n tagItr = tags.iterator();\r\n while (tagItr.hasNext())\r\n {\r\n Map.Entry e = (Map.Entry) tagItr.next();\r\n String name = (String) e.getKey();\r\n HVal val = (HVal) e.getValue();\r\n\r\n if (!brokenRefs.contains(name))\r\n hdb.add(name, val);\r\n }\r\n comp.set(\"haystack\", BHDict.make(hdb.toDict()));\r\n }\r\n }\r\n\r\n if (LOG.isTraceOn()) LOG.trace(\"END removeBrokenRefs\"); \r\n }",
"@Override\n\tpublic void removeInUse() {\n\t\theldObj.removeInUse();\n\t}",
"protected LibReference() {\n\t}",
"void setUnused(){\n assert this.used == true;\n\n //let the parent pointer remain\n this.hf = 0;\n this.used = false;\n\n }",
"@Override\n protected boolean usesNoRefReads() {\n return true;\n }",
"public void clearLinks(){\r\n varContextObject=null; \r\n varContextFields=null; \r\n }",
"public boolean refCountDown() {\n\t\treferenceCounter--;\n\t\treturn (referenceCounter > 0) ? true : false;\n\t}",
"private void clearSharedTo() {\n \n sharedTo_ = 0;\n }",
"@Override\n\tpublic void discardUnget() {\n\t\t\n\t}",
"private VerbBridge() {\r\n\t\tvB = null;\r\n\t}",
"public void mo33816a() {\n this.f15942j = null;\n }",
"private Unescaper() {\n\n\t}",
"public void finalize()\n throws Throwable\n {\n pythonDecRef();\n }",
"private void deregisterReferences(final Resource referencer) {\n \n \t\tObject[] resImports = getImports(referencer).toArray();\n \n \t\tfor (int i = 0; i < resImports.length; i++) {\n \n \t\t\tfinal Resource referenced = (Resource) resImports[i];\n \n \t\t\tMap importsMap = getImportsMap(referencer);\n \n \t\t\tif (importsMap != null) {\n \n \t\t\t\timportsMap.remove(referenced);\n \n \t\t\t\tdomain.sendNotification(new NotificationImpl(\n \t\t\t\t\tEventTypes.IMPORT, referenced, (Object) null, -1) {\n \n \t\t\t\t\tpublic Object getNotifier() {\n \t\t\t\t\t\treturn referencer;\n \t\t\t\t\t}\n \t\t\t\t});\n \n \t\t\t\tif (importsMap.isEmpty()) {\n \t\t\t\t\timports.remove(referencer);\n \t\t\t\t}\n \t\t\t}\n \n \t\t\tMap exportsMap = getExportsMap(referenced);\n \n \t\t\tif (exportsMap != null) {\n \n \t\t\t\texportsMap.remove(referencer);\n \n \t\t\t\tdomain.sendNotification(new NotificationImpl(\n \t\t\t\t\tEventTypes.EXPORT, referencer, (Object) null, -1) {\n \n \t\t\t\t\tpublic Object getNotifier() {\n \t\t\t\t\t\treturn referenced;\n \t\t\t\t\t}\n \t\t\t\t});\n \n \t\t\t\tif (exportsMap.isEmpty()) {\n \t\t\t\t\texports.remove(referenced);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}",
"private void invalidate() {\n cud = null;\n fileNameRefs = null;\n jsniMethods = null;\n if (exposedCompiledClasses != null) {\n for (CompiledClass compiledClass : exposedCompiledClasses) {\n compiledClass.invalidate();\n }\n exposedCompiledClasses = null;\n }\n }",
"@Override\n\tpublic void copyReferences() {\n\t\tlateCopies = new LinkedHashMap<>();\n\n\t\tsuper.copyReferences();\n\n\t\tputAll(lateCopies);\n\t\tlateCopies = null;\n\t}",
"void decoller();",
"void unsetSurfaceRefs();",
"public void phantomReference() throws InterruptedException\n {\n final ReferenceQueue queue = new ReferenceQueue();\n PhantomReference<ReferenceExample> ex = \n \t\t new PhantomReference<ReferenceExample>(new ReferenceExample(\"PhantomRef\"),queue);\n \n //====NOTE=====>>> Phantom referene always retursn null, it is hardcoded to null\n System.out.println(\"Phantom ref before GC..wow where is it: \" + ex.get()); \n System.gc();\n System.out.println(\"Phatom Ref after GC:\" + ex.get() );\n queue.remove();\n System.out.println(\"Phantom reference deleted after\");\n }",
"@Override\n\tpublic void delRec() {\n\t\t\n\t}",
"private CodeRef() {\n }",
"public void mo9255d() {\n this.f1298a = null;\n }",
"public void weakReference_holdingRealObj()\n {\n int counter=0;\n //====NOTE=====>>> RSN how weak reference is created\n WeakReference<ReferenceExample> ex = new WeakReference<ReferenceExample>(new ReferenceExample(\"WeakRef2\"));\n System.out.println(\"Weak reference before GC...\" + \"Origin=\" + ex.get().getOrigin());\n ReferenceExample realEx = ex.get();\n \n //while(ex.get()!=null)\n while(counter <10)\n {\n counter++;\n System.gc();\n }\n System.out.println(\"Weak reference after:: \" + counter +\" GCs. Value after GC:\" + ex.get());\n }",
"public void removeCurrent( )\n {\n // Implemented by student.\n }",
"public final void mo118421b() {\n super.mo118421b();\n this.f120934a = null;\n }",
"public void setOriginalRef(Reference originalRef) {\n this.originalRef = originalRef;\n }",
"public void mo81218a() {\n HandlerC16593b bVar = this.f57893b;\n if (bVar != null) {\n bVar.removeCallbacksAndMessages(null);\n this.f57893b = null;\n }\n }",
"public DmcNamedObjectNontransportableREF(){\r\n\t\tobject = null;\r\n\t}",
"public static void passByRefTest(Employee obj) {\n\t\tobj = null;\n\t}",
"public void removeAllRuleRef();",
"protected void mo3470b() {\n this.f3325a = null;\n m7956e();\n }",
"Reference owner();",
"@Override\r\n\t\tpublic void remove() {\r\n\t\t\t// YOU DO NOT NEED TO WRITE THIS\r\n\t\t}",
"@Override\n\tpublic void decUses() {\n\t\theldObj.decUses();\n\t}",
"public boolean canBeReferencedByIDREF() {\n/* 171 */ return false;\n/* */ }",
"public void setReference(Reference ref)\n {\n this.ref = ref;\n }",
"@Override\n\tprotected void finalize() {\n\t\tif(refcount>0){\n\t\t\tprint(\"Error \"+refcount+\"Shared \"+id+\"objects in use\");\n\t\t}\n\t}",
"@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}",
"java.lang.String getRef();",
"public void reuse() {}",
"public void resetReferenciado();",
"@Override\n public void retrack() {\n }",
"private synchronized void invalidate() {\n MoreCloseables.closeQuietly(mNewCallsCursor);\n MoreCloseables.closeQuietly(mOldCallsCursor);\n mNewCallsCursor = null;\n mOldCallsCursor = null;\n }",
"private void deregisterReference(final Resource referencer,\n \t\t\tfinal Resource referenced) {\n \n \t\tif ((referencer != null) && (referenced != null)\n \t\t\t&& (referencer != referenced)) {\n \n \t\t\tMap importsMap = getImportsMap(referencer);\n \n \t\t\tif (importsMap != null) {\n \n \t\t\t\tInteger importsCount = (Integer) importsMap.get(referenced);\n \n \t\t\t\tif (importsCount != null) {\n \n \t\t\t\t\tif (importsCount.intValue() < 2) {\n \n \t\t\t\t\t\timportsMap.remove(referenced);\n \n \t\t\t\t\t\tdomain.sendNotification(new NotificationImpl(\n \t\t\t\t\t\t\tEventTypes.IMPORT, referenced, (Object) null, -1) {\n \n \t\t\t\t\t\t\tpublic Object getNotifier() {\n \t\t\t\t\t\t\t\treturn referencer;\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t});\n \t\t\t\t\t} else {\n \t\t\t\t\t\timportsMap.put(referenced, new Integer(importsCount\n \t\t\t\t\t\t\t.intValue() - 1));\n \t\t\t\t\t}\n \t\t\t\t}\n \n \t\t\t\tif (importsMap.isEmpty()) {\n \t\t\t\t\timports.remove(referencer);\n \t\t\t\t}\n \t\t\t}\n \n \t\t\tMap exportsMap = getExportsMap(referenced);\n \n \t\t\tif (exportsMap != null) {\n \n \t\t\t\tInteger exportsCount = (Integer) exportsMap.get(referencer);\n \n \t\t\t\tif (exportsCount != null) {\n \n \t\t\t\t\tif (exportsCount.intValue() < 2) {\n \n \t\t\t\t\t\texportsMap.remove(referencer);\n \n \t\t\t\t\t\tdomain.sendNotification(new NotificationImpl(\n \t\t\t\t\t\t\tEventTypes.EXPORT, referencer, (Object) null, -1) {\n \n \t\t\t\t\t\t\tpublic Object getNotifier() {\n \t\t\t\t\t\t\t\treturn referenced;\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t});\n \t\t\t\t\t} else {\n \t\t\t\t\t\texportsMap.put(referencer, new Integer(exportsCount\n \t\t\t\t\t\t\t.intValue() - 1));\n \t\t\t\t\t}\n \t\t\t\t}\n \n \t\t\t\tif (exportsMap.isEmpty()) {\n \t\t\t\t\texports.remove(referenced);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}",
"protected void reference(H outerRef, C childRef) {\n\t\tthis.outerRef = outerRef;\n\t\tthis.THIS = childRef;\n\t}",
"public void unget() {}",
"public void m9117d() {\r\n this.f6007a = null;\r\n }",
"final void makeNonRecursive() { this.unboundedBoundSymbols = null; }",
"static String getReferee()\n {\n int ind=random(referees.length);\n String refree=referees[ind];\n referees=removeTheElement(referees,ind);\n return refree;\n }",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 452,\n FQN=\"llvm::Module::dropAllReferences\", NM=\"_ZN4llvm6Module17dropAllReferencesEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6Module17dropAllReferencesEv\")\n //</editor-fold>\n public void dropAllReferences() {\n for (final Function /*&*/ F : /*Deref*/this) {\n F.dropAllReferences();\n }\n \n for (final GlobalVariable /*&*/ GV : globals()) {\n GV.dropAllReferences();\n }\n \n for (final GlobalAlias /*&*/ GA : aliases()) {\n GA.dropAllReferences();\n }\n \n for (final GlobalIFunc /*&*/ GIF : ifuncs()) {\n GIF.dropAllReferences();\n }\n }",
"void lostBall()\n {\n currentBall = null;\n }",
"@Override\n\t\t\t\tpublic void remove() {\n\t\t\t\t\t\n\t\t\t\t}",
"public void clear() {\n allDependenciesModificationStamp = -2;\n }",
"public void mo8778a() {\n try {\n if (this.f1286b != null) {\n this.f1286b.recycle();\n }\n if (this.f1287c != null) {\n this.f1287c.recycle();\n }\n this.f1286b = null;\n this.f1287c = null;\n if (this.f1288d != null) {\n this.f1288d.recycle();\n this.f1288d = null;\n }\n if (this.f1289e != null) {\n this.f1289e.recycle();\n this.f1289e = null;\n }\n this.f1290f = null;\n } catch (Throwable th) {\n SDKLogHandler.m2563a(th, \"WaterMarkerView\", \"destory\");\n th.printStackTrace();\n }\n }",
"public void unassignBaseBuilder() {\n\t\tbaseBuilder = null;\n\t}",
"public /* synthetic */ void remove() {\n this.a.remove();\n }",
"public String reference(Object obj) {\n return null;\n }",
"private static void removeCall(Call call, ArrayList<Call> calls)\n {\n synchronized(calls)\n {\n if(calls.contains(call))\n calls.remove(call);\n }\n }",
"private void m205c() {\r\n if (this.f161b != null && this.f161b.m543a()) {\r\n this.f161b.m545c();\r\n }\r\n this.f161b = null;\r\n }",
"public void addReference() {\r\n mReferenced = true;\r\n }",
"public abstract void detatchHistoricalWrapper();",
"public void shouldNotGc() {\n reachabilityReferenceChain = new Reference(\n new SoftReference(\n new Reference(\n new WeakReference(\n new SoftReference(\n new PhantomReference(new Object(), referenceQueue))))));\n }",
"public void setReference (SoftReference ref)\r\n {\r\n _reference = ref;\r\n }",
"public void removed() {\n }",
"@Override\n protected void removeMember() {\n }",
"public void unset(){\n\t\tcurrentInst = -1;\n\t}",
"@Override\n\tpublic boolean isRefush() {\n\t\treturn false;\n\t}",
"@Override\r\n\t\tpublic void remove() {\n\r\n\t\t}",
"public void remTargetObjectClass(){\n rem(DmpDMSAG.__targetObjectClass);\n }",
"@Override\n public void cleanup() {\n \n }",
"@Override\n public void cleanup() {\n \n }",
"public void dereferenceCache() {\n this.cache = null;\n }",
"Symbol getRef();",
"@Override\n\tpublic void recycle()\n\t{\n\t}"
] | [
"0.717062",
"0.695963",
"0.6954553",
"0.66937566",
"0.6501704",
"0.64368033",
"0.632554",
"0.61726403",
"0.60607964",
"0.59804446",
"0.5977138",
"0.5969302",
"0.5829081",
"0.5808377",
"0.58014786",
"0.57529914",
"0.56943005",
"0.5685309",
"0.56637955",
"0.5629829",
"0.56256723",
"0.5621412",
"0.5621412",
"0.5614161",
"0.56067675",
"0.5583262",
"0.558263",
"0.5582083",
"0.55766386",
"0.5567692",
"0.5559995",
"0.55535257",
"0.5533784",
"0.5532068",
"0.5521637",
"0.5504024",
"0.55018723",
"0.5501762",
"0.549791",
"0.5490939",
"0.54794306",
"0.54790026",
"0.5462755",
"0.5461609",
"0.5460207",
"0.5451809",
"0.5446764",
"0.54447395",
"0.54438853",
"0.54414064",
"0.5436728",
"0.5435533",
"0.5426454",
"0.54225254",
"0.541412",
"0.540399",
"0.54008037",
"0.5393594",
"0.5391597",
"0.53915143",
"0.53842795",
"0.53802925",
"0.53798586",
"0.53695595",
"0.53695595",
"0.53640854",
"0.5362448",
"0.5357871",
"0.53501105",
"0.53469646",
"0.5344021",
"0.53435135",
"0.53407127",
"0.53404737",
"0.5335199",
"0.5327237",
"0.5325673",
"0.53219754",
"0.53213716",
"0.5320042",
"0.53169227",
"0.5312503",
"0.53120154",
"0.53114986",
"0.53075105",
"0.5306679",
"0.530192",
"0.53009355",
"0.52970874",
"0.5295866",
"0.5292072",
"0.5290903",
"0.5289859",
"0.52827996",
"0.52808964",
"0.5280233",
"0.52760345",
"0.52760345",
"0.5275447",
"0.52752435",
"0.52727324"
] | 0.0 | -1 |
Returns a ref to a clone. NOTE: this clone is not enrolled in the pool, so you should simply close() it when you're done (ie, do not call release()). | public synchronized ISegmentReader getReadOnlyClone() throws IOException {
if (mReader == null) {
getReader().decreaseRef();
assert mReader != null;
}
mShared = true;
if (mLiveDocs != null) {
return mWriter.getContext().newSegmentReader(mReader, mLiveDocs,
mInfo.getSegmentInfo().getDocCount() - mInfo.getDelCount() - mPendingDeleteCount);
} else {
assert mReader.getLiveDocs() == mLiveDocs;
mReader.increaseRef();
return mReader;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ChannelReestablish clone() {\n\t\tlong ret = bindings.ChannelReestablish_clone(this.ptr);\n\t\tif (ret < 1024) { return null; }\n\t\tChannelReestablish ret_hu_conv = new ChannelReestablish(null, ret);\n\t\tret_hu_conv.ptrs_to.add(this);\n\t\treturn ret_hu_conv;\n\t}",
"public Function clone();",
"public /*@ non_null @*/ Object clone() { \n //@ assume owner == null;\n return this;\n }",
"public PooledConnection newInstance() {\n return new PooledConnection(pool);\n }",
"@Override\n public SharedObject clone() {\n SharedObject c;\n try {\n c = (SharedObject)super.clone();\n } catch (CloneNotSupportedException e) {\n // Should never happen.\n throw new ICUCloneNotSupportedException(e);\n }\n c.refCount = new AtomicInteger();\n return c;\n }",
"Object clone();",
"Object clone();",
"public Object clone();",
"public Object clone();",
"public Object clone();",
"public Object clone();",
"public Object clone() {\n try {\n // clones itself\n return super.clone();\n } catch (Exception exception) {\n ;\n }\n return null;\n }",
"public /*@ non_null @*/ Object clone() {\n return this;\n }",
"public abstract Object clone() ;",
"public Instance clone() {\n Instance copy;\n try {\n copy = new Instance(getNameValue().toString());\n } catch (JNCException e) {\n copy = null;\n }\n return (Instance)cloneContent(copy);\n }",
"public Object clone() {\n\t\ttry {\n\t\t\treturn super.clone();\n\t\t}\n\t\tcatch(CloneNotSupportedException exc) {\n\t\t\treturn null;\n\t\t}\n\t}",
"public Clone() {}",
"public abstract Object clone();",
"@Override public T clone() {\n T x = (T)super.clone();\n x.setCompleter(this); // Set completer, what used to be a final field\n x._topLocal = false; // Not a top job\n x._nleft = x._nrite = null;\n x. _left = x. _rite = null;\n x._fs = _fs;\n x._profile = null; // Clone needs its own profile\n x.setPendingCount(0); // Volatile write for completer field; reset pending count also\n return x;\n }",
"public Object clone(){\n \t\n \treturn this;\n \t\n }",
"public Object clone() {\n return this.copy();\n }",
"public BufferTWeak cloneMe() {\r\n BufferTWeak ib = new BufferTWeak(uc);\r\n ib.increment = increment;\r\n ib.set(new Object[objects.length]);\r\n for (int i = 0; i < objects.length; i++) {\r\n ib.objects[i] = this.objects[i];\r\n }\r\n ib.offset = this.offset;\r\n ib.count = this.count;\r\n return ib;\r\n }",
"public Instance cloneShallow() {\n Instance copy;\n try {\n copy = new Instance(getNameValue().toString());\n } catch (JNCException e) {\n copy = null;\n }\n return (Instance)cloneShallowContent(copy);\n }",
"public Object clone() {\r\n try {\r\n return super.clone();\r\n } catch (CloneNotSupportedException e) {\r\n return null;\r\n }\r\n }",
"public Image clone() {\r\n\t\treturn new Image(renderer, texture, textureX, textureY, textureWidth, textureHeight, width, height);\r\n\t}",
"public Object clone() throws CloneNotSupportedException {\n\tthrow new CloneNotSupportedException(\"This is a Singleton Ojbect; Buzz off\");\n }",
"@Override protected T clone() {\n try {\n T x = (T)super.clone();\n x.setCompleter(this); // Set completer, what used to be a final field\n x._topLocal = false; // Not a top job\n x._nleft = x._nrite = null;\n x. _left = x. _rite = null;\n x._fs = null; // Clone does not depend on extent futures\n x.setPendingCount(0); // Volatile write for completer field; reset pending count also\n return x;\n } catch( CloneNotSupportedException e ) {\n throw Log.errRTExcept(e);\n }\n }",
"public BinaryContent createClone(BinaryContent t)\r\n\t{\n\t\treturn null;\r\n\t}",
"public T copyOnWrite() {\n T r = ref;\n if(r.getRefCount() <= 1) { return r; }\n @SuppressWarnings(\"unchecked\")\n T r2 = (T)r.clone();\n r.removeRef();\n ref = r2;\n r2.addRef();\n return r2;\n }",
"public Paper clone() \r\n\t{\r\n\t\tPaper copy = null;\r\n\t\ttry\r\n\t\t{ \r\n\t\t\tcopy = new Paper(this.getId(), new String(this.getTitle()), new String(this.getURI()),\r\n\t\t\t\tthis.year, new String(this.biblio_info), \r\n\t\t\t\tnew String(this.authors), new String(this.url) ); \r\n\t\t}\r\n\t\tcatch (Exception e) { e.printStackTrace(System.out); }\r\n\t\treturn copy;\r\n\t}",
"public Object clone() {\n try {\n return super.clone();\n } catch (Exception exception) {\n throw new InternalError(\"Clone failed\");\n }\n }",
"public Object clone() {\n // No problems cloning here since private variables are immutable\n return super.clone();\n }",
"@Override\n public MetaContainer clone() {\n return clone(false);\n }",
"public Object clone() throws CloneNotSupportedException {\n // return INSTANCE\n throw new CloneNotSupportedException();\n }",
"public FirmReference clone() {\r\n try {\r\n\t\t\treturn (FirmReference) super.clone();\r\n\t\t} catch (CloneNotSupportedException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n \r\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic <T> T clon(){\n\t\ttry {\n\t\t\treturn (T) this.clone();\n\t\t} catch (CloneNotSupportedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn (T) new Object();\n\t}",
"@Override\n public MultiCache clone () {\n return new MultiCache(this);\n }",
"@Override\n protected Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException();\n // return super.clone(); // OR we can return the already present :: return getInstance();\n }",
"public Object clone()\n\t{\n\t\treturn new Tree();\n\t}",
"public Object clone() { return new ReferenceType((Name) name.clone()); }",
"public Object clone() {\r\n//STUB BEGIN\r\n \t/*\r\n DoubleLinkedList clone = null;\r\n try { \r\n \tclone = (DoubleLinkedList) super.clone();\r\n } catch (CloneNotSupportedException e) { \r\n \tthrow new InternalError();\r\n }*/ //JBSE still does not implement Object.clone\r\n \tDoubleLinkedList clone = new DoubleLinkedList();\r\n//STUB END\r\n\r\n // Put clone into \"virgin\" state\r\n//INSTRUMENTATION BEGIN\r\n //clone.header = new Entry(null, null, null);\r\n clone.header = new Entry(null, null, null, clone);\r\n//INSTRUMENTATION END\r\n clone.header.next = clone.header.previous = clone.header;\r\n clone.size = 0;\r\n clone.modCount = 0;\r\n\r\n // Initialize clone with our elements\r\n for (Entry e = header.next; e != header; e = e.next)\r\n clone.add(e.element);\r\n\r\n return clone;\r\n }",
"public T cloneDeep();",
"@Override\n public Node clone() {\n Node node = null;\n try {\n node = (Node) super.clone();\n } catch (Exception e) {\n System.err.println(\"Unable to clone!\");\n e.printStackTrace();\n }\n return node;\n }",
"@Override\n public Drop clone() {\n try {\n return (Drop) super.clone();\n } catch (CloneNotSupportedException ex) {\n // Never.\n return null;\n }\n }",
"@Override\n public CloneableInputStream clone() {\n return new CloneableInputStream(buf);\n }",
"public LinkedList<AnyType> clone() {\n LinkedList<AnyType> clone = new LinkedList<AnyType>();\n LinkedListIterator<AnyType> itr = this.first();\n LinkedListIterator<AnyType> cloneitr = clone.zeroth();\n while (itr.current != null) {\n clone.insert(itr.current.element, cloneitr);\n itr.advance();\n cloneitr.advance();\n }\n return clone;\n }",
"public SubmitServer clone() {\n try {\n return (SubmitServer) super.clone();\n } catch (CloneNotSupportedException e) {\n e.printStackTrace();\n throw new RuntimeException();\n }\n }",
"@Override\n public AbstractRelic makeCopy() {\n return new Compendium();\n }",
"public Object clone() {\n GlobalizedAnswer cloned;\n try {\n cloned = (GlobalizedAnswer)super.clone();\n }\n catch (CloneNotSupportedException e) {\n throw new Error(getClass() + \" must support cloning\", e);\n }\n assert cloned != null;\n \n // Copy mutable fields by value\n cloned.tuples = (Tuples) tuples.clone();\n \n return cloned;\n }",
"public T copy() {\n T ret = createLike();\n ret.getMatrix().setTo(this.getMatrix());\n return ret;\n }",
"public Object clone()\n\t{\n\t\tObject myClone = new Object();\n\t\tmyClone = myName + myNumberWins;\n\t\treturn myClone;\n\t}",
"public Object clone()\n/* */ {\n/* 835 */ return super.clone();\n/* */ }",
"public final PaintObject clone() {\n \t\n \ttry {\n\t\t\treturn (PaintObject) super.clone();\n\t\t} catch (CloneNotSupportedException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n }",
"public Sudoku clone() {\n\t\tSudoku s = new Sudoku(this.B);\n\t\ts.fileName = this.getFileName();\n\t\t// clone the puzzle\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tfor (int j = 1; j <= N; j++) {\n\t\t\t\ts.puzzle[i][j] = puzzle[i][j];\n\t\t\t}\n\t\t}\n\t\t// clone the constraints table\n\t\tfor (int i = 0; i <= N + 1; i++) {\n\t\t\tfor (int j = 0; j <= N; j++) {\n\t\t\t\ts.constraints[i][j] = (BitSet) constraints[i][j].clone();\n\t\t\t}\n\t\t}\n\t\t// clone the nonAssignedCells\n\t\ts.nonAssignedCells.addAll(this.nonAssignedCells);\n\t\treturn s;\n\t}",
"public Object clone () {\n\t\t\ttry {\n\t\t\t\treturn super.clone();\n\t\t\t} catch (CloneNotSupportedException e) {\n\t\t\t\tthrow new InternalError(e.toString());\n\t\t\t}\n\t\t}",
"public Object clone() {\n\t\treturn new RelExpr((Term)getTerm(0).clone(), op, (Term)getTerm(1).clone());\n\t}",
"public Object clone ()\n\t{\n\t\ttry \n\t\t{\n\t\t\treturn super.clone();\n\t\t}\n\t\tcatch (CloneNotSupportedException e) \n\t\t{\n throw new InternalError(e.toString());\n\t\t}\n\t}",
"@Override\n\tpublic Object clone() {\n\t\treturn null;\n\t}",
"Component deepClone();",
"public Complex makeDeepCopy() {\r\n Complex complex2 = new Complex(this.getReal(), this.getImaginary());\r\n return complex2;\r\n }",
"public Tree<T> clone() {\n Node<T> clonedRoot = this.root.clone();\n clone(this.root, this.root.clone());\n return new Tree<T>(clonedRoot);\n }",
"public abstract Pessoa clone();",
"public static JTensor newClone(JTensor self) {\n return new JTensor(\n TH.THTensor_(newClone)(self)\n );\n }",
"public final Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException();\n }",
"public Object clone() throws CloneNotSupportedException {\r\n\t\tthrow new CloneNotSupportedException();\r\n\t}",
"Long clone(Long id);",
"public Object clone() {\n \t\treturn new Term(this);\n \t}",
"@Override\n\tpublic Object clone() \n\t{\n\t\ttry{\n\t\t// Note all state is primitive so no need to deep copy reference types.\n\t\treturn (Tile) super.clone();\n\t\t} catch (CloneNotSupportedException e) \n\t\t{\n\t\t\t// We should not ever be here as we implement Cloneable.\n\t\t\t// It is better to deal with the exception here rather than letting\n\t\t\t// clone throw it as we would have to catch it in more places then.\n\t\t\treturn null;\n\t\t}\n\t}",
"public Object clone() throws CloneNotSupportedException {\r\n super.clone();\r\n return new JMSCacheReplicator(replicatePuts, replicateUpdates,\r\n replicateUpdatesViaCopy, replicateRemovals, replicateAsync, asynchronousReplicationInterval);\r\n }",
"public Solution clone() {\n\t\treturn new Solution(new ArrayList<City>(this.cities));\n\t}",
"public Object clone() {\n FileTransfer ft = new FileTransfer();\n ft.mLogicalFile = new String(this.mLogicalFile);\n ft.mFlags = (BitSet) this.mFlags.clone();\n ft.mTransferFlag = this.mTransferFlag;\n ft.mSize = this.mSize;\n ft.mType = this.mType;\n ft.mJob = new String(this.mJob);\n ft.mPriority = this.mPriority;\n ft.mURLForRegistrationOnDestination = this.mURLForRegistrationOnDestination;\n ft.mMetadata = (Metadata) this.mMetadata.clone();\n ft.mVerifySymlinkSource = this.mVerifySymlinkSource;\n // the maps are not cloned underneath\n\n return ft;\n }",
"public Object clone()\n {\n try {\n Object newObj = super.clone();\n ((LDAPUrl)newObj).url = (com.github.terefang.jldap.ldap.LDAPUrl)this.url.clone();\n return newObj;\n } catch( CloneNotSupportedException ce) {\n throw new RuntimeException(\"Internal error, cannot create clone\");\n }\n }",
"@Override\n public Object clone() {\n CostAndEnforcerJob task;\n try {\n task = (CostAndEnforcerJob) super.clone();\n } catch (CloneNotSupportedException ignored) {\n return null;\n }\n return task;\n }",
"public Stack<E> clone() {\n try { return (Stack<E>) super.clone(); }\n catch(CloneNotSupportedException ex) {\n System.out.println(ex.getMessage());\n System.exit(1);\n return null;\n }\n }",
"public Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException(\"clone() is not supported in \"+this.getClass().getName());\n }",
"public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n /* Cannot happen */\n throw new RuntimeException(e.getMessage(), e);\n }\n }",
"public ChannelDescriptor dup() {\n synchronized (refCounter) {\n refCounter.incrementAndGet();\n \n int newFileno = getNewFileno();\n \n if (DEBUG) getLogger(\"ChannelDescriptor\").info(\"Reopen fileno \" + newFileno + \", refs now: \" + refCounter.get());\n \n return new ChannelDescriptor(channel, newFileno, originalModes, fileDescriptor, refCounter, canBeSeekable);\n }\n }",
"public DescriptiveFramework clone();",
"public Solution deepClone() {\n\t\tArrayList<GridPoint> cloneRepresentation = new ArrayList<GridPoint>();\n\t\t\n\t\tfor(GridPoint p : solutionRepresentation) {\n\t\t\tint[] coord = new int[2];\n\t\t\tcoord[0] = p.getX();\n\t\t\tcoord[1] = p.getY();\n\t\t\tcloneRepresentation.add(new GridPoint(coord));\n\t\t}\n\t\treturn new Solution(this.host, cloneRepresentation);\n\t}",
"@Override\n\tpublic PhyphoxBuffer clone() {\n\t\treturn new PhyphoxBuffer(this, 0);\n\t}",
"public Object clone()\n {\n Object o = null;\n try \n { o = super.clone(); } \n catch(CloneNotSupportedException e) \n { System.err.println(\"Erreur dans le clonage de la cellule...\"); }\n return o;\n }",
"public Object clone()\n {\n Object o = null;\n try\n {\n o = super.clone();\n }\n catch (CloneNotSupportedException e)\n {\n e.printStackTrace();\n }\n return o;\n}",
"public Piece clone() {\n return new Pawn(new Point(this.location.x, this.location.y),\n this.color, this.numMoves, this.enPassantOk);\n }",
"public Term clone() {\n\t\treturn new Term(this.coefficient, this.exponent);\n\t}",
"public RMShape cloneDeep() { return clone(); }",
"@Override\n protected Currency clone() {\n final Currency currency = new Currency();\n if (data != null) {\n currency.data = data.clone();\n }\n return currency;\n\n }",
"public CopyBuilder copy() {\n return new CopyBuilder(this);\n }",
"public Object clone() {\n \ttry {\n \tMyClass1 result = (MyClass1) super.clone();\n \tresult.Some2Ob = (Some2)Some2Ob.clone(); ///IMPORTANT: Some2 clone method called for deep copy without calling this Some2.x will be = 12\n \t\n \treturn result;\n \t} catch (CloneNotSupportedException e) {\n \treturn null; \n \t}\n\t}",
"public Restaurant clone() {\r\n return new Restaurant(this);\r\n }",
"public abstract Instance duplicate();",
"public static ConnectionPool getInstance() {\n if (!created.get()) {\n try {\n createLock.lock();\n if (instance == null) {\n instance = new ConnectionPool();\n created.set(true);\n }\n } finally {\n createLock.unlock();\n }\n }\n return instance;\n }",
"public Object clone()\n {\n DataSetDivide new_op = new DataSetDivide( );\n // copy the data set associated\n // with this operator\n new_op.setDataSet( this.getDataSet() );\n new_op.CopyParametersFrom( this );\n\n return new_op;\n }",
"public ConfabulatorObject getCopy() {\n\t\tConfabulatorObject copy = new ConfabulatorObject(getMessenger());\n\t\tlockMe(this);\n\t\tint maxD = maxLinkDistance;\n\t\tint maxC = maxLinkCount;\n\t\tList<Link> linksCopy = new ArrayList<Link>();\n\t\tfor (Link lnk: links) {\n\t\t\tlinksCopy.add(lnk.getCopy());\n\t\t}\n\t\tunlockMe(this);\n\t\tcopy.initialize(maxD,maxC,linksCopy);\n\t\treturn copy;\n\t}",
"@Override\n\tpublic Component clone() {\n\t\treturn null;\n\t}",
"public StringStack clone()\n\t{\n\t\tStringStack clonedStack = new StringStack();\n\t\tnodePtr = top;\n\t\twhile (nodePtr!=null)\n\t\t{\n\t\t\tclonedStack.push(nodePtr.getData());\n\t\t\tnodePtr = nodePtr.getLink();\n\t\t}\n\t\treturn clonedStack;\n\t}",
"public Object clone() {\n\t\tListeningPointImpl lip =\n\t\t\tnew ListeningPointImpl(this.sipStack, this.port, null);\n\t\tlip.sipStack = this.sipStack;\n\t\treturn lip;\n\t}",
"public static ConnectionPool getInstance() {\n if (!createdInstance.get()) {\n try {\n lock.lock();\n\n if (instance == null) {\n instance = new ConnectionPool();\n createdInstance.set(true);\n\n LOGGER.log(Level.INFO, \"ConnectionPool instance created!\");\n }\n } finally {\n lock.unlock();\n }\n }\n\n return instance;\n }",
"public Binaire clone(){\n\t\treturn new Binaire(this.symbole, this.gauche.clone(), this.droit.clone());\n\t}",
"private final TypeTerm _clone ()\n {\n TypeTerm clone = null;\n try\n {\n clone = (TypeTerm)clone();\n }\n catch (Exception e)\n {\n throw new TypeDefinitionException(e);\n }\n return clone;\n }",
"public Dispatchable copy() {\n return this;\n }",
"public Object clone() {\n\t\tSubstrateNetwork s = new SubstrateNetwork(this.listNode, this.listLink);\n\t\treturn s;\n\t}"
] | [
"0.6621194",
"0.6586",
"0.65835977",
"0.6564742",
"0.6516611",
"0.6472608",
"0.6472608",
"0.64307976",
"0.64307976",
"0.64307976",
"0.64307976",
"0.63823354",
"0.63436985",
"0.63025284",
"0.6279054",
"0.62595576",
"0.6207339",
"0.61953443",
"0.61951363",
"0.6153301",
"0.61372036",
"0.6131563",
"0.60973996",
"0.6085244",
"0.6027776",
"0.6025019",
"0.60167307",
"0.59984636",
"0.5998364",
"0.59926385",
"0.59261554",
"0.5924614",
"0.5922753",
"0.5891972",
"0.587544",
"0.5870662",
"0.5869713",
"0.58440137",
"0.58222777",
"0.5813712",
"0.58096254",
"0.58094466",
"0.57906806",
"0.5776242",
"0.5775114",
"0.5762561",
"0.57347596",
"0.57320786",
"0.5727991",
"0.5709046",
"0.56763995",
"0.5670902",
"0.5667524",
"0.56594455",
"0.5656638",
"0.5642072",
"0.56399316",
"0.56345737",
"0.5632924",
"0.5624207",
"0.562255",
"0.56173986",
"0.56030434",
"0.5599107",
"0.5595553",
"0.55856675",
"0.5584788",
"0.55847603",
"0.5584014",
"0.558322",
"0.5580471",
"0.55780286",
"0.5568865",
"0.55663395",
"0.55629575",
"0.55611604",
"0.5558184",
"0.55571043",
"0.55521387",
"0.55330133",
"0.55272216",
"0.5525202",
"0.5525093",
"0.5524525",
"0.5517932",
"0.5517468",
"0.5516133",
"0.5507828",
"0.55003",
"0.54904044",
"0.54893",
"0.54850525",
"0.54819524",
"0.54805326",
"0.5466987",
"0.5465223",
"0.5464802",
"0.54638773",
"0.54603434",
"0.5459586",
"0.5453178"
] | 0.0 | -1 |
Discard (don't save) changes when we are dropping the reader; this is used only on the subreaders after a successful merge. If deletes had accumulated on those subreaders while the merge is running, by now we have carried forward those deletes onto the newly merged segment, so we can discard them on the subreaders: | public synchronized void dropChanges() {
mPendingDeleteCount = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized void dropReaders() throws IOException {\n\t\tif (mReader != null) {\n\t\t\tmReader.decreaseRef();\n\t\t\tmReader = null;\n\t\t}\n\t\tif (mMergeReader != null) {\n\t\t\tmMergeReader.decreaseRef();\n\t\t\tmMergeReader = null;\n\t\t}\n\t\tdecreaseRef();\n\t}",
"private void removeDeadReaderIfTheyAreTurnedOff(List<String> deadReaders) {\n //if some readers have been turned off\n if (this.readers.size() > deadReaders.size()) {\n List<String> toPurge = getReadersToPurge(this.readers.keySet(), deadReaders);\n\n //remove readers from dead collection (they are turned off by the user)\n for (String readerId : toPurge) {\n this.readers.remove(readerId);\n }\n }\n }",
"public void markRecordsDroppedMerge() throws JNCException {\n markLeafMerge(\"recordsDropped\");\n }",
"@Override\n public void abortTx() {\n \tfor (VBox vbox : overwrittenAncestorWriteSet) {\n \t // revert the in-place entry that had overwritten\n \t vbox.inplace = vbox.inplace.next;\n \t}\n \n this.orec.version = OwnershipRecord.ABORTED;\n for (OwnershipRecord mergedLinear : linearNestedOrecs) {\n mergedLinear.version = OwnershipRecord.ABORTED;\n }\n \tfor (ParallelNestedTransaction mergedTx : mergedTxs) {\n \t mergedTx.orec.version = OwnershipRecord.ABORTED;\n \t}\n \t\n\t// give the read set arrays, which were used exclusively by this nested or its children, back to the thread pool\n\tCons<VBox[]> parentArrays = this.getRWParent().bodiesRead;\n\tCons<VBox[]> myArrays = this.bodiesRead;\n\twhile (myArrays != parentArrays) {\n\t returnToPool(myArrays.first());\n\t myArrays = myArrays.rest();\n\t}\n\t\n \tbodiesRead = null;\n \tboxesWritten = null;\n \tboxesWrittenInPlace = null;\n \tperTxValues = null;\n \toverwrittenAncestorWriteSet = null;\n \tmergedTxs = null;\n \tlinearNestedOrecs = null;\n \tcurrent.set(this.getParent());\n }",
"void combineAndCollectSnapshotBlocks(\n INode.ReclaimContext reclaimContext, INodeFile file, FileDiff removed) {\n BlockInfo[] removedBlocks = removed.getBlocks();\n if (removedBlocks == null) {\n FileWithSnapshotFeature sf = file.getFileWithSnapshotFeature();\n assert sf != null : \"FileWithSnapshotFeature is null\";\n if(sf.isCurrentFileDeleted())\n sf.collectBlocksAndClear(reclaimContext, file);\n return;\n }\n int p = getPrior(removed.getSnapshotId(), true);\n FileDiff earlierDiff = p == Snapshot.NO_SNAPSHOT_ID ? null : getDiffById(p);\n // Copy blocks to the previous snapshot if not set already\n if (earlierDiff != null) {\n earlierDiff.setBlocks(removedBlocks);\n }\n BlockInfo[] earlierBlocks =\n (earlierDiff == null ? new BlockInfoContiguous[]{} : earlierDiff.getBlocks());\n // Find later snapshot (or file itself) with blocks\n BlockInfo[] laterBlocks = findLaterSnapshotBlocks(removed.getSnapshotId());\n laterBlocks = (laterBlocks == null) ? file.getBlocks() : laterBlocks;\n // Skip blocks, which belong to either the earlier or the later lists\n int i = 0;\n for(; i < removedBlocks.length; i++) {\n if(i < earlierBlocks.length && removedBlocks[i] == earlierBlocks[i])\n continue;\n if(i < laterBlocks.length && removedBlocks[i] == laterBlocks[i])\n continue;\n break;\n }\n // Check if last block is part of truncate recovery\n BlockInfo lastBlock = file.getLastBlock();\n BlockInfo dontRemoveBlock = null;\n if (lastBlock != null && lastBlock.getBlockUCState().equals(\n HdfsServerConstants.BlockUCState.UNDER_RECOVERY)) {\n dontRemoveBlock = lastBlock.getUnderConstructionFeature()\n .getTruncateBlock();\n }\n // Collect the remaining blocks of the file, ignoring truncate block\n for (;i < removedBlocks.length; i++) {\n if(dontRemoveBlock == null || !removedBlocks[i].equals(dontRemoveBlock)) {\n reclaimContext.collectedBlocks().addDeleteBlock(removedBlocks[i]);\n }\n }\n }",
"private void removeUnusedRevisions() {\n\n // Remove all revisions older than the one written by this transaction.\n final long oldestUsableRevisionNumber = this.targetRevisionNumber.get();\n for ( AbstractVersionedItem versionedItem : this.versionedItemsWritten ) {\n versionedItem.removeUnusedRevisions( oldestUsableRevisionNumber );\n }\n\n // Stop referencing the versioned items.\n this.versionedItemsWritten.clear();\n\n }",
"synchronized public void rdlock() {\n\t\tlong tid = Thread.currentThread().getId();\n\n\t\t// Place myself on queue\n\t\treadersQueue.enq(tid);\n\n\t\t// While its not my turn, wait\n\t\twhile (readersQueue.getFirstItem() != tid\n\t\t\t\t|| activeWriter == true\n\t\t\t\t|| activeReaders >= maxReaders\n\t\t\t\t|| (bias == 'W' && writersQueue.isEmpty() == false)) {\n\t\t\ttry {\n\t\t\t\twait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\t// Its my turn, remove myself from queue\n\t\treadersQueue.deq();\n\n\t\t// DEBUG\n if (activeWriter == true\n \t\t|| activeReaders >= maxReaders\n \t\t|| (bias == 'W' && writersQueue.isEmpty() == false)) {\n \tSystem.out.println(\"BUG IN READER\");\n }\n\n\t\t// I am now an active reader!\n\t\tactiveReaders++;\n\n\t\t// Signal all, so other readers may continue\n\t\tnotifyAll();\n\t}",
"private void removeAliveReaders(List<String> aliveReaders) {\n for (String aliveReader : aliveReaders) {\n Integer removed = this.readers.remove(aliveReader);\n if (removed != null) {\n this.logger.debug(\"Removing reader {} from the list of dead readers.\", aliveReader);\n }\n }\n }",
"public abstract void remove(UIReader reader);",
"private void discardSegment() {\n synchronized (lastSegment) {\n lastSegment.clear();\n lastSegmentTimes.clear();\n lastSegmentCurve.clear();\n }\n }",
"public void doRemove() throws VisADException, RemoteException {\n rangeRings = null;\n super.doRemove();\n }",
"@Override\n\t\tpublic void unlock() {\n\n\t\t\tsynchronized (lock) {\n\t\t\t\treaders--;\n\t\t\t\tlock.notifyAll();\n\t\t\t}\n\n\t\t}",
"protected void discard()\n {\n if (!isDiscarded())\n {\n OldOldCache map = OldOldCache.this;\n synchronized (map)\n {\n int cUnits = m_cUnits;\n if (cUnits == -1)\n {\n // entry is discarded; avoid repetitive events\n return;\n }\n\n if (cUnits > 0)\n {\n map.adjustUnits(-cUnits);\n }\n\n m_cUnits = -1;\n }\n\n // issue remove notification\n if (map.hasListeners())\n {\n map.dispatchEvent(map.instantiateMapEvent(\n MapEvent.ENTRY_DELETED, getKey(), getValue(), null));\n }\n }\n }",
"private void cleanUpOlderRevisions() {\n\n // We're no longer using the source revision.\n final long priorOldestRevisionInUse = sourceRevisionsInUse.peek();\n sourceRevisionsInUse.remove( this.sourceRevisionNumber );\n\n // Determine the oldest revision still needed.\n Long oldestRevisionInUse = sourceRevisionsInUse.peek();\n if ( oldestRevisionInUse == null ) {\n oldestRevisionInUse = priorOldestRevisionInUse;\n }\n\n // Remove each transaction awaiting clean up that has a target revision number older than needed.\n AtomicReference<StmTransaction> tref = firstTransactionAwaitingCleanUp;\n StmTransaction t = tref.get();\n if ( t == null ) {\n return;\n }\n\n AtomicReference<StmTransaction> trefNext = t.nextTransactionAwaitingCleanUp;\n StmTransaction tNext = trefNext.get();\n\n while ( true ) {\n if ( t.targetRevisionNumber.get() <= oldestRevisionInUse ) {\n if ( tref.compareAndSet( t, tNext ) ) {\n // Remove revisions older than the now unused revision number.\n t.removeUnusedRevisions();\n t.nextTransactionAwaitingCleanUp.set( null );\n }\n }\n else {\n tref = trefNext;\n }\n\n // Advance through the list of transactions awaiting clean up.\n t = tref.get();\n if ( t == null ) {\n return;\n }\n trefNext = t.nextTransactionAwaitingCleanUp;\n tNext = trefNext.get();\n }\n\n }",
"public synchronized void closeAndRemoveAllOpenedReaders() throws IOException {\n Iterator<Map.Entry<String, TsFileSequenceReader>> iterator =\n closedFileReaderMap.entrySet().iterator();\n while (iterator.hasNext()) {\n Map.Entry<String, TsFileSequenceReader> entry = iterator.next();\n entry.getValue().close();\n if (resourceLogger.isDebugEnabled()) {\n resourceLogger.debug(\"{} closedTsFileReader is closed.\", entry.getKey());\n }\n closedReferenceMap.remove(entry.getKey());\n iterator.remove();\n }\n iterator = unclosedFileReaderMap.entrySet().iterator();\n while (iterator.hasNext()) {\n Map.Entry<String, TsFileSequenceReader> entry = iterator.next();\n entry.getValue().close();\n if (resourceLogger.isDebugEnabled()) {\n resourceLogger.debug(\"{} unclosedTsFileReader is closed.\", entry.getKey());\n }\n unclosedReferenceMap.remove(entry.getKey());\n iterator.remove();\n }\n }",
"public void untagAsRemoved() {\n\t levelOfRemoval --;\n\t}",
"@Override\n protected void rebalanceDelete(Position<Entry<K, V>> p) {\n if (isRed(p)) {\n makeBlack(p);\n } else if (!isRoot(p)) {\n Position<Entry<K, V>> sib = sibling(p);\n if (isInternal(sib) & (isBlack(sib) || isInternal(left(sib)))) {\n remedyDoubleBlack(p);\n }\n }\n }",
"private void DeleteBurnInsOnPreviousSamples() {\n\t\tif (gibbs_sample_num <= num_gibbs_burn_in + 1 && gibbs_sample_num >= 2){\n\t\t\tgibbs_samples_of_bart_trees[gibbs_sample_num - 2] = null;\n\t\t}\n\t}",
"void onDiscardChangesSelected();",
"@Override\n protected synchronized void removeReader(ChannelHandlerReadSubscription subscription) {\n super.removeReader(subscription);\n }",
"public void discardCompletedSegments(final TableId id, final CommitLogPosition lowerBound, final CommitLogPosition upperBound)\n {\n logger.trace(\"discard completed log segments for {}-{}, table {}\", lowerBound, upperBound, id);\n\n // Go thru the active segment files, which are ordered oldest to newest, marking the\n // flushed CF as clean, until we reach the segment file containing the CommitLogPosition passed\n // in the arguments. Any segments that become unused after they are marked clean will be\n // recycled or discarded.\n for (Iterator<CommitLogSegment> iter = segmentManager.getActiveSegments().iterator(); iter.hasNext();)\n {\n CommitLogSegment segment = iter.next();\n segment.markClean(id, lowerBound, upperBound);\n\n if (segment.isUnused())\n {\n logger.debug(\"Commit log segment {} is unused\", segment);\n segmentManager.archiveAndDiscard(segment);\n }\n else\n {\n if (logger.isTraceEnabled())\n logger.trace(\"Not safe to delete{} commit log segment {}; dirty is {}\",\n (iter.hasNext() ? \"\" : \" active\"), segment, segment.dirtyString());\n }\n\n // Don't mark or try to delete any newer segments once we've reached the one containing the\n // position of the flush.\n if (segment.contains(upperBound))\n break;\n }\n }",
"public void markRecordsDroppedDelete() throws JNCException {\n markLeafDelete(\"recordsDropped\");\n }",
"private void finishErasing() {\n synchronized (lastEraseTrace) {\n if (lastEraseTrace.size() > 0) {\n ArrayList<Shape> t = new ArrayList<Shape>();\n t.add(new EraseTrace(lastEraseTrace, sheet.toSheet(eraserRadius)));\n sheet.doAction(new AddShapes(t));\n lastEraseTrace.clear();\n }\n }\n }",
"private void disconnectReader() {\n if (mBluetoothGatt == null) {\n updateConnectionState(BluetoothReader.STATE_DISCONNECTED);\n return;\n }\n updateConnectionState(BluetoothReader.STATE_DISCONNECTING);\n mBluetoothGatt.disconnect();\n }",
"void abort() {\n\n // Revision number = 0 indicates an aborted transaction.\n this.targetRevisionNumber.set( 0L );\n\n // Clean up aborted revisions ...\n for ( AbstractVersionedItem versionedItem : this.versionedItemsWritten ) {\n versionedItem.removeAbortedRevision();\n }\n\n this.versionedItemsRead.clear();\n this.versionedItemsWritten.clear();\n\n // Trigger any clean up that is possible from no longer needing our source version.\n this.cleanUpOlderRevisions();\n\n }",
"protected void applyPendingDeletes ()\n {\n while (!m_aDeleteStack.isEmpty ())\n removeMonitoredFile (m_aDeleteStack.pop ());\n }",
"private List<String> getReadersToPurge(Set<String> readersBeingReconnected, List<String> deadReaders) {\n\t\t\n\t\tList<String> res = new ArrayList<String>();\n\t\treadersBeingReconnected.forEach(readerId -> {\n\t\t\tif (! deadReaders.contains(readerId)) {\n\t\t\t\tres.add(readerId);\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn res;\n\t}",
"public void undo () {\n // The restores must be run in the reverse order they are added.\n for (int i = restores.size() - 1; i >= 0; --i) {\n restores.get(i).run();\n }\n restores.clear();\n }",
"public void dvRemoved()\r\n/* 61: */ {\r\n/* 62:132 */ this.numDVRecords -= 1;\r\n/* 63: */ }",
"protected void discard() {\r\n discarded = true;\r\n onDiscard();\r\n }",
"public void readerUnlock() {\n Holders rootHolder = null;\n Holders newHolder = null;\n final Thread current = Thread.currentThread();\n\n do {\n Holders holder = this.holder.get();\n newHolder = null;\n rootHolder = holder;\n // A reader lock can only exist if the holder is a ReaderList instance.\n if (holder instanceof Writer) {\n throw new IllegalStateException();\n }\n\n // A reader lock can only be unlocked if it exists.\n if (!((ReaderList)holder).contains(current)) {\n throw new IllegalStateException();\n }\n\n // get a new ReaderList without the reader lock of current Thread\n newHolder = ((ReaderList)holder).remove(current);\n\n // Attempt to update ReaderList holder.\n } while (!holder.compareAndSet(rootHolder, newHolder));\n }",
"private void cleanUpConsumedEsnRecords() {\n\t\tesnInfoRepository.findAllByIsConsumed(true).removeIf(item -> (Days\n\t\t\t\t.daysBetween(new DateTime(item.getDateImported()), new DateTime()).isGreaterThan(Days.days(30))));\n\t}",
"private CompletionStage<ReconcileResult<KafkaUserQuotas>> internalDelete(Reconciliation reconciliation, String username) {\n LOGGER.debugCr(reconciliation, \"Deleting quotas for user {}\", username);\n\n return patchQuotas(reconciliation, username, emptyQuotas())\n .handleAsync((r, e) -> {\n if (e != null) {\n LOGGER.warnCr(reconciliation, \"Failed to delete quotas for user {}\", username, e);\n throw new CompletionException(e);\n } else {\n LOGGER.debugCr(reconciliation, \"Quotas for user {} deleted\", username);\n cache.remove(username); // Update the cache\n return ReconcileResult.deleted();\n }\n }, executor);\n }",
"public void delete() {\n Utils.inWriteLock(leaderIsrUpdateLock, () -> {\n assignedReplicaMap.clear();\n Set<Replica> inSyncReplicas = Sets.newHashSet();\n leaderReplicaIdOpt = Optional.empty();\n logManager.deleteLog(new TopicAndPartition(topic, partitionId));\n// error(String.format(\"Error deleting the log for partition <%s,%d>\", topic, partitionId), e);\n// Runtime.getRuntime().halt(1);\n return null;\n });\n }",
"public void tagAsRemoved() {\n\t levelOfRemoval ++;\n\t}",
"public void abort(int tid) {\n List<Lock> lockList = null;\n for (Integer varIndex : _lockTable.keySet()) {\n lockList = _lockTable.get(varIndex);\n int size = lockList.size();\n for (int i = size - 1; i >= 0; i--) {\n if (lockList.get(i).getTranId() == tid) {\n if (lockList.get(i).getType() == Lock.Type.WRITE) {\n _uncommitDataMap.remove(varIndex);\n }\n lockList.remove(i);\n break;\n }\n }\n }\n // remove this transaction from accessed list\n _accessedTransactions.remove(tid);\n }",
"private static void trimDatabase(ContentResolver contentResolver) {\n\n final String INVISIBLE = BluetoothShare.VISIBILITY + \"=\" + BluetoothShare.VISIBILITY_HIDDEN;\n // remove the invisible/complete/outbound shares\n final String WHERE_INVISIBLE_COMPLETE_OUTBOUND = BluetoothShare.DIRECTION + \"=\"\n + BluetoothShare.DIRECTION_OUTBOUND + \" AND \" + BluetoothShare.STATUS + \">=\"\n + BluetoothShare.STATUS_SUCCESS + \" AND \" + INVISIBLE;\n int delNum = contentResolver.delete(BluetoothShare.CONTENT_URI,\n WHERE_INVISIBLE_COMPLETE_OUTBOUND, null);\n if (V) Log.v(TAG, \"Deleted complete outbound shares, number = \" + delNum);\n\n // remove the invisible/finished/inbound/failed shares\n final String WHERE_INVISIBLE_COMPLETE_INBOUND_FAILED = BluetoothShare.DIRECTION + \"=\"\n + BluetoothShare.DIRECTION_INBOUND + \" AND \" + BluetoothShare.STATUS + \">\"\n + BluetoothShare.STATUS_SUCCESS + \" AND \" + INVISIBLE;\n delNum = contentResolver.delete(BluetoothShare.CONTENT_URI,\n WHERE_INVISIBLE_COMPLETE_INBOUND_FAILED, null);\n if (V) Log.v(TAG, \"Deleted complete inbound failed shares, number = \" + delNum);\n\n // Only keep the inbound and successful shares for LiverFolder use\n // Keep the latest 1000 to easy db query\n final String WHERE_INBOUND_SUCCESS = BluetoothShare.DIRECTION + \"=\"\n + BluetoothShare.DIRECTION_INBOUND + \" AND \" + BluetoothShare.STATUS + \"=\"\n + BluetoothShare.STATUS_SUCCESS + \" AND \" + INVISIBLE;\n Cursor cursor = null;\n try {\n cursor = contentResolver.query(BluetoothShare.CONTENT_URI, new String[] {\n BluetoothShare._ID\n }, WHERE_INBOUND_SUCCESS, null, BluetoothShare._ID); // sort by id\n\n if (cursor == null) {\n return;\n }\n\n int recordNum = cursor.getCount();\n if (recordNum > Constants.MAX_RECORDS_IN_DATABASE) {\n int numToDelete = recordNum - Constants.MAX_RECORDS_IN_DATABASE;\n\n if (cursor.moveToPosition(numToDelete)) {\n int columnId = cursor.getColumnIndexOrThrow(BluetoothShare._ID);\n long id = cursor.getLong(columnId);\n delNum = contentResolver.delete(BluetoothShare.CONTENT_URI, BluetoothShare._ID\n + \" < \" + id, null);\n if (V)\n Log.v(TAG, \"Deleted old inbound success share: \" + delNum);\n }\n }\n } catch (Exception e) {\n Log.w(TAG, \"Exception accessing Bluetoothshare DB\");\n if (V) e.printStackTrace();\n } finally {\n if (cursor != null) {\n cursor.close();\n }\n }\n }",
"@Override\n\tpublic void delRec() {\n\t\t\n\t}",
"public void removeLines() {\n int compLines = 0;\n int cont2 = 0;\n\n for(cont2=20; cont2>0; cont2--) {\n while(completeLines[compLines] == cont2) {\n cont2--; compLines++;\n }\n this.copyLine(cont2, cont2+compLines);\n }\n\n lines += compLines;\n score += 10*(level+1)*compLines;\n level = lines/20;\n if(level>9) level=9;\n\n for(cont2=1; cont2<compLines+1; cont2++) copyLine(0,cont2);\n for(cont2=0; cont2<5; cont2++) completeLines[cont2] = -1;\n }",
"public static void doRemove(String fileName) {\n Stage fromSave = Utils.readObject(STAGED_FILES,\n Stage.class);\n HashSet<String> stagedFiles = fromSave.getStagedFiles();\n Commit currHead = Utils.readObject(TREE_DIR, Tree.class).\n getCurrHead();\n if (stagedFiles.contains(fileName) && currHead.getBlobs().\n containsKey(fileName)) {\n File stagedFile = Utils.join(STAGE_DIR, fileName);\n addToStageRemoval(fileName);\n removeFromWorking(fileName);\n stagedFile.delete();\n\n stagedFiles.remove(fileName);\n Stage.save(fromSave);\n } else if (stagedFiles.contains(fileName) && !currHead.getBlobs().\n containsKey(fileName)) {\n File stagedFile = Utils.join(STAGE_DIR, fileName);\n stagedFile.delete();\n\n stagedFiles.remove(fileName);\n Stage.save(fromSave);\n } else if (!stagedFiles.contains(fileName) && currHead.getBlobs().\n containsKey(fileName)) {\n if (!Utils.filesSet(WORKING_DIR).contains(fileName)) {\n File removedFile = Utils.join(STAGE_RM_DIR, fileName);\n try {\n removedFile.createNewFile();\n } catch (IOException ignored) {\n return;\n }\n String contents = currHead.getBlobs().get(fileName).\n getContents();\n Utils.writeContents(removedFile, contents);\n } else {\n addToStageRemoval(fileName);\n removeFromWorking(fileName);\n }\n } else {\n System.out.println(\"No reason to remove the file.\");\n System.exit(0);\n }\n }",
"@Transactional\n void remove(DataRistorante risto);",
"public void clean() {\n Long now = System.currentTimeMillis();\n for (Iterator<Long> iterator = this.deleted.iterator(); iterator.hasNext();) {\n Long l = iterator.next();\n if (l < now) {\n iterator.remove();\n }\n }\n }",
"public void dropSignals(ArrayList<Integer> drops) throws Exception\r\n\t{\n\t\tfor (Integer l : locked)\r\n\t\t{\r\n\t\t\tif (drops.contains(l))\r\n\t\t\t{\r\n\t\t\t\tdrops.remove(l);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (Integer d : drops)\r\n\t\t{\r\n\t\t\tvertices.remove(d); \r\n\r\n\t\t\t// sanity check with the edges\r\n\t\t\tfor (int ei = 0; ei < edges.size(); ei++)\r\n\t\t\t{\r\n\t\t\t\tif (edges.get(ei).i == d)\r\n\t\t\t\t{\r\n\t\t\t\t\t// System.err.println(\"dropped vertex \" + d + \" is the tail of an edge to \" + edges.get(ei).j);\r\n\t\t\t\t\tedges.remove(ei);\r\n\t\t\t\t\t// System.exit(-1);\r\n\t\t\t\t}\r\n\t\t\t\tif (edges.get(ei).j == d)\r\n\t\t\t\t{\r\n\t\t\t\t\t// System.err.println(\"dropped vertex \" + d + \" is the head of an edge from \" + edges.get(ei).i);\r\n\t\t\t\t\tedges.remove(ei);\r\n\t\t\t\t\t// System.exit(-1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public synchronized void unRegister(File indexDir, IndexReader reader) throws Exception{\r\n \tif (!mReaders.containsKey(indexDir)){\r\n \t\tthrow new Exception(\"Unauthorized operation\");\r\n \t}\r\n \tsynchronized (mReaders) {\r\n\t \tList<ReaderContainer> lReader = mReaders.get(indexDir);\r\n\t \t//\r\n\t \tlog.debug(\"unRegister-STEP1 :: lReader size = \"+lReader.size()+\" | index of reader = \"+lReader.indexOf(new ReaderContainer(reader)));\r\n\t \t//\r\n\t \tReaderContainer readerContainer = lReader.get(lReader.indexOf(new ReaderContainer(reader)));\r\n\t \treaderContainer.decNbSearch();\r\n\t \tif (readerContainer.isClosable()){\r\n\t \t\treaderContainer.close();\r\n\t \t\tlReader.remove(readerContainer);\r\n\t \t\tlog.debug(\"unRegister :: closed = (unRegister) size lreader = \"+lReader.size()+\" | reader = \"+reader);\r\n\t \t\t\r\n\t \t}\r\n\t \tlog.debug(\"unRegister-STEP2 :: lReader size = \"+lReader.size()+\" | index of reader = \"+lReader.indexOf(new ReaderContainer(reader)));\r\n \t}\r\n \t\r\n }",
"@Override\n\t\tpublic void unlock() {\n\n\t\t\tsynchronized (lock) {\n\t\t\t\twriters--;\n\t\t\t\tlock.notifyAll();\n\t\t\t}\n\t\t}",
"private void maintain(){\n ArrayList<Integer> shutDown = new ArrayList<Integer>();\n for (String addr : slaveMap.keySet()){\n if (!responderList.containsKey(slaveMap.get(addr))){\n shutDown.add(slaveMap.get(addr));\n }\n }\n //print\n for (Integer id : shutDown){\n synchronized (slaveList) {\n slaveList.remove(id);\n }\n }\n //TODO: one a slave lost control, what should ArcherDFS do?\n }",
"public void clearRollbackOperations() {\n restorableBlockConflictMapping.clear();\n conflictModificationMapping.clear();\n markDirty();\n }",
"@Override\r\n\tpublic void redo() \r\n\t\t{\n\t\twasRemoved = parent.removeChild(child);\r\n\t\tif (wasRemoved) \r\n\t\t\t{\r\n\t\t\tremoveArcs(sourceArcs);\r\n\t\t\tremoveArcs(targetArcs);\r\n\t\t\t}\r\n\t\t}",
"public void cleanup() {\n try {\n Files.delete(path);\n } catch (final IOException e) {\n throw new StageAccessException(\"Unable to delete staged document!\", e);\n }\n }",
"private void internalReadUnlock() {\n checkpointLock.readLock().unlock();\n\n if (ASSERTION_ENABLED)\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() - 1);\n }",
"public void undo() {\n\t\tstate = null;\n\t\tfor (Row r : containingRows)\n\t\t\tr.undo(this);\n\t}",
"@Override \n \tprotected void cleanup(Context context) throws IOException {\n \t rankread.clear();\t \n \t dang.clear();\n }",
"public void writerUnlock() throws Exception {\n\t\t// TODO\n\t\tif(holders.get() instanceof ReaderList){\n\t\t\tthrow new Exception(\"Lock was held by a reader, one should use readerUnlock()\");\n\t\t}else if(holders.get() == null){\n\t\t\tthrow new Exception(\"Lock was not held by anyone\");\n\t\t}\n\t\tfinal Thread current = Thread.currentThread();\n\t\tif(((Writer)holders.get()).thread.equals(current)){\n\t\t\tholders.compareAndSet(holders.get(), null);\n\t\t}else{\n\t\t\tthrow new Exception(\"Lock was not held by this thread \");\n\t\t}\n\t}",
"private void dropMergeTables() {\n // [2012/4/30 - ysahn] Comment this when testing, if you want to leave the temp tables\n\n try {\n callSP(buildSPCall(DROP_MAP_TABLES_PROC));\n } catch (SQLException exception) {\n logger.error(\"Error dropping id mapping tables. \", exception);\n }\n\n try {\n callSP(buildSPCall(DROP_HELPER_TABLES_PROC));\n } catch (SQLException exception) {\n logger.error(\"Error dropping id mapping tables. \", exception);\n }\n }",
"public void subIgnore() {\n\t\tignoreT--; // subtract 1 from ignoreT\n\t}",
"void deleteChains() {\n\t\tif (!params.isDebug()) {\n\t\t\tfor (File deleteCandidate : toDelete) {\n\t\t\t\tdeleteCandidate.delete();\n\t\t\t\t\n\t\t\t\ttry (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(deleteCandidate.toPath())) {\n\t\t\t\t\tfor (Path path : directoryStream) {\n\t\t\t\t\t\tif (!path.getFileName().toString().endsWith(\"_SCWRLed.pdb\")) {\n\t\t\t\t\t\t\tpath.toFile().delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void discard() {\n }",
"public void remove(Record r) \n\t{\n\t\tfilled--; //reduce load factor\n\t\tif (r.placement != -1){ //if r's expected position isnt null\n\t\t\tRecord newRecord = new Record(\"deleted\"); //make a new record with value \"deleted\n\t\t\tnewRecord.placement = -2; //set position to -1 (as is standard for deleted\n\t\t\tTable[r.placement] = newRecord; //puts deleted slot in table\n\t\t}\t\n\t}",
"protected void deleteWithoutCommit() {\n \t\ttry {\n \t\t\tcheckedActivate(3); // TODO: Figure out a suitable depth.\n \t\t\t\n \t\t\tfor(MessageReference ref : getAllMessages(false)) {\n \t\t\t\tref.initializeTransient(mFreetalk);\n \t\t\t\tref.deleteWithoutCommit();\n \t\t\t}\n \n \t\t\tcheckedDelete();\n \t\t}\n \t\tcatch(RuntimeException e) {\n \t\t\tcheckedRollbackAndThrow(e);\n \t\t}\n \n \t}",
"@DISPID(1611006076) //= 0x6006007c. The runtime will prefer the VTID if present\n @VTID(152)\n void alsoDeleteExclusiveParents(\n boolean oDeleted);",
"long trimDeltaFile(long seqNoLowerBound);",
"void unsetFurtherRelations();",
"public void drop() {\n process(4);\n }",
"private void maintainMergeLocal() {\n logger.info(\"Maintaining Merge Local\");\n try {\n Bin mergeBin;\n synchronized (geometricParts) {\n mergeBin = geometricParts.findMergeCandidates();\n }\n if (!mergeBin.isEmpty()) {\n File indexShard = getNextIndexShardFolder(mergeBin.size + 1);\n // otherwise there's something to merge\n logger.info(\"Performing merge!\");\n\n\n // merge the shards\n Parameters p = this.globalParameters.clone();\n // override each of these particular parameters\n p.set(\"indexPath\", indexShard.getAbsolutePath());\n p.set(\"inputPath\", new ArrayList<>(mergeBin.getBinPaths()));\n p.set(\"renumberDocuments\", false);\n\n App.run(\"merge-index\", p, System.out);\n\n // should make sure that these two are uninteruppable\n synchronized (geometricParts) {\n geometricParts.add(mergeBin.size + 1, indexShard.getAbsolutePath());\n geometricParts.removeShards(mergeBin);\n updateIndex();\n }\n\n // now can delete the merged indexshard folders...\n for (String file : mergeBin.getBinPaths()) {\n FSUtil.deleteDirectory(new File(file));\n }\n\n logger.info(\"Done merging.\");\n }\n } catch (Exception ex) {\n Logger.getLogger(GeometricIndex.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void updateDeletions() {\r\n for (Lane l : lanes) {\r\n Vehicle[] vehArray = l.getVehicles().toArray(new Vehicle[0]);\r\n for (Vehicle v : vehArray) {\r\n if (v.getHeadSegment().equals(l.getLastSegment())) {\r\n l.getVehicles().remove(v);\r\n numberOfVehicles--;\r\n if (v instanceof Car) {\r\n SimulationStats.incrementCars();\r\n SimulationStats.addEvent(SimulationStats.createVehicleLeavingEvent(v));\r\n } else if (v instanceof Truck) {\r\n SimulationStats.incrementTrucks();\r\n SimulationStats.addEvent(SimulationStats.createVehicleLeavingEvent(v));\r\n }\r\n }\r\n }\r\n }\r\n }",
"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 markSecondaryApnSourceGprsDelete() throws JNCException {\n markLeafDelete(\"secondaryApnSourceGprs\");\n }",
"private void setMatchingSegmentReaders() {\n int numReaders = mergeState.readers.size();\n mergeState.matchingSegmentReaders = new SegmentReader[numReaders];\n\n // If this reader is a SegmentReader, and all of its\n // field name -> number mappings match the \"merged\"\n // FieldInfos, then we can do a bulk copy of the\n // stored fields:\n for (int i = 0; i < numReaders; i++) {\n AtomicReader reader = mergeState.readers.get(i);\n // TODO: we may be able to broaden this to\n // non-SegmentReaders, since FieldInfos is now\n // required? But... this'd also require exposing\n // bulk-copy (TVs and stored fields) API in foreign\n // readers..\n if (reader instanceof SegmentReader) {\n SegmentReader segmentReader = (SegmentReader) reader;\n boolean same = true;\n FieldInfos segmentFieldInfos = segmentReader.getFieldInfos();\n for (FieldInfo fi : segmentFieldInfos) {\n FieldInfo other = mergeState.fieldInfos.fieldInfo(fi.number);\n if (other == null || !other.name.equals(fi.name)) {\n same = false;\n break;\n }\n }\n if (same) {\n mergeState.matchingSegmentReaders[i] = segmentReader;\n mergeState.matchedCount++;\n }\n }\n }\n\n if (mergeState.infoStream.isEnabled(\"SM\")) {\n mergeState.infoStream.message(\"SM\", \"merge store matchedCount=\" + mergeState.matchedCount + \" vs \" + mergeState.readers.size());\n if (mergeState.matchedCount != mergeState.readers.size()) {\n mergeState.infoStream.message(\"SM\", \"\" + (mergeState.readers.size() - mergeState.matchedCount) + \" non-bulk merges\");\n }\n }\n }",
"boolean dropHandle(Recycler.DefaultHandle<?> handle)\r\n/* 570: */ {\r\n/* 571:612 */ if (!handle.hasBeenRecycled)\r\n/* 572: */ {\r\n/* 573:613 */ if ((++this.handleRecycleCount & this.ratioMask) != 0) {\r\n/* 574:615 */ return true;\r\n/* 575: */ }\r\n/* 576:617 */ handle.hasBeenRecycled = true;\r\n/* 577: */ }\r\n/* 578:619 */ return false;\r\n/* 579: */ }",
"public void UndoRecover()\n\t{\n\t\t//System.out.println(\"Undo!\");\n\t\tif (m_backupLayerIndex != -1)\n\t\t{\n\t\t\t//if the last change was a new gate added to layer,\n\t\t\t//we need to change again the sizes of layers, as we save them\n\t\t\tif (m_layers.get(m_backupLayerIndex).IsLastChangeNewGate())\n\t\t\t{\n\t\t\t\t//system.out.format(\"Undoing a new gate: resizing the layer %d to have one less item, now %d\\n\", m_backupLayerIndex, m_layersSizes.get(m_backupLayerIndex+1)-1);\n\t\t\t\tLogger.write(\"Undoing a new gate: resizing the layer \" + String.valueOf(m_backupLayerIndex ) + \" to have one less item, now \" + String.valueOf(m_layersSizes.get(m_backupLayerIndex+1)-1 ));\n\t\t\t\tm_layersSizes.set(m_backupLayerIndex+1, m_layersSizes.get(m_backupLayerIndex+1) - 1);\n\t\t\t}\n\t\t\tm_layers.get(m_backupLayerIndex).UndoRecoverLayer();\n\t\t\tm_backupLayerIndex = -1;\n\t\t}\n\t\tif (m_secondBackupLayerIndex != -1)\n\t\t{\n\t\t\tm_layers.get(m_secondBackupLayerIndex).UndoRecoverLayer();\n\t\t\tm_secondBackupLayerIndex = -1;\n\t\t}\n\t\tm_backupLayerIndex = -1;\n\t\tm_secondBackupLayerIndex = -1;\n\t}",
"public void restorePreviousDeletion(){\n int cachePosition = deletedEntry.cachePosition;\n sortedFilesArrList.add(cachePosition, deletedEntry.cacheFileName);\n tag1ArrList.add(cachePosition, deletedEntry.cacheTag1);\n tag2ArrList.add(cachePosition, deletedEntry.cacheTag2);\n tag3ArrList.add(cachePosition, deletedEntry.cachetTag3);\n favArrList.add(cachePosition, deletedEntry.cacheFileIsFavorite);\n deletedEntry = null;\n\n notifyItemInserted(cachePosition);\n notifyItemRangeChanged(cachePosition, this.getItemCount());\n }",
"public void deleteCopiedPendingLedgerEntries();",
"@Override\n protected boolean removeChanceNode() {\n\n Node candidateToReduce;\n Node candidateToRemove;\n Node nodeToRemove;\n String operation;\n int i;\n NodeList children;\n Node valueNodeToReduce;\n\n NodeList chancesID;\n boolean removed = false;\n Node nodeUtil = null;\n\n\n\n\n // Obtain the value node \n\n //sv = ((IDWithSVNodes) diag).getTerminalValueNode();\n\n //diag.save(\"debug-mediastinet.elv\");\n\n //List of chance nodes in the diagram\n chancesID = diag.getNodesOfKind(Node.CHANCE);\n\n for (i = 0; (i < chancesID.size()) && removed == false; i++) {\n\n candidateToRemove = chancesID.elementAt(i);\n\n //Check if the candidaToRemove can be removed\n if (isRemovableChance(candidateToRemove)) {\n\n nodeToRemove = candidateToRemove;\n children = nodeToRemove.getChildrenNodes();\n //Reduce value nodes if it's necessary\n\n if (children.size() > 1) {\n //We have to reduce\n candidateToReduce = getCandidateValueNodeToReduceForChanceNode(nodeToRemove);\n\n //valueNodeToReduce =\tobtainValueNodeToReduce(reachableParents);\n valueNodeToReduce = obtainValueNodeToReduce(nodeToRemove, candidateToReduce);\n ReductionAndEvalID.reduceNode(\n (IDWithSVNodes) diag,\n valueNodeToReduce);\n nodeUtil = valueNodeToReduce;\n operation = \"Reduce: \" + nodeUtil.getName() + \" to eliminate: \" + nodeToRemove.getName();\n System.out.println(operation);\n statistics.addOperation(operation);\n\n indexOperation++;\n try {\n diag.save(\"debug-operation-\" + indexOperation + \".elv\");\n } catch (IOException ex) {\n Logger.getLogger(ArcReversalSV.class.getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n //The chance has only one child (utility)\n nodeUtil = children.elementAt(0);\n\n }\n\n\n String auxName = candidateToRemove.getName();\n operation = \"Chance node removal: \" + auxName;\n System.out.println(operation);\n statistics.addOperation(operation);\n\n //Add the name of the node to 'orderOfElimination'\n ((PropagationStatisticsID) statistics).addNameToOrderOfElimination(auxName);\n\n // The relation of the utility node is modified. In this \n // case the parents of the node to remove will be parents \n // of the utility node \n\n modifyUtilityRelation(nodeUtil, nodeToRemove, true);\n\n // Calculate the new expected utility \n getExpectedUtility(nodeUtil, nodeToRemove);\n\n // The node is deleted \n\n diag.removeNodeOnly(nodeToRemove);\n\n//\t\t\t\tStore the size of the diagram\n\n statistics.addSize(diag.calculateSizeOfPotentials());\n\n statistics.addTime(crono.getTime());\n\n indexOperation++;\n try {\n diag.save(\"debug-operation-\" + indexOperation + \".elv\");\n } catch (IOException ex) {\n Logger.getLogger(ArcReversalSV.class.getName()).log(Level.SEVERE, null, ex);\n }\n // Set removed \n removed = true;\n\n }\n }//for\n return removed;\n }",
"public void removeSeekListener(SeekListener listener){\r\n super.removeSeekListener(listener);\r\n\r\n if (listenerList.getListenerCount(SeekListener.class) == 0){\r\n setDGState(Datagram.DG_SEEK, false);\r\n setDGState(Datagram.DG_SEEK_REMOVED, false);\r\n\r\n source.lastSeekListenerRemoved();\r\n }\r\n }",
"public void discard() {\r\n\t\tif(this.markedStack.isEmpty()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.markedStack.removeLast();\r\n\t}",
"public void removed()\n {\n if (prev == null) {\n IBSPColChecker.setNodeForShape(shape, next);\n }\n else {\n prev.next = next;\n }\n\n if (next != null) {\n next.prev = prev;\n }\n }",
"@Override\n public ReaderDTO deleteReaderById(Integer id) throws BadRequestException {\n\n Optional<Reader> readerOptional = readerRepository.findById(id);\n\n if (readerOptional.isPresent()) {\n readerRepository.delete(readerOptional.get());\n } else {\n throw new BadRequestException(\"Reader not present in the DB\");\n }\n\n return ReaderConverter.convert(readerOptional.get());\n }",
"private void deregisterReferences(final Resource referencer) {\n \n \t\tObject[] resImports = getImports(referencer).toArray();\n \n \t\tfor (int i = 0; i < resImports.length; i++) {\n \n \t\t\tfinal Resource referenced = (Resource) resImports[i];\n \n \t\t\tMap importsMap = getImportsMap(referencer);\n \n \t\t\tif (importsMap != null) {\n \n \t\t\t\timportsMap.remove(referenced);\n \n \t\t\t\tdomain.sendNotification(new NotificationImpl(\n \t\t\t\t\tEventTypes.IMPORT, referenced, (Object) null, -1) {\n \n \t\t\t\t\tpublic Object getNotifier() {\n \t\t\t\t\t\treturn referencer;\n \t\t\t\t\t}\n \t\t\t\t});\n \n \t\t\t\tif (importsMap.isEmpty()) {\n \t\t\t\t\timports.remove(referencer);\n \t\t\t\t}\n \t\t\t}\n \n \t\t\tMap exportsMap = getExportsMap(referenced);\n \n \t\t\tif (exportsMap != null) {\n \n \t\t\t\texportsMap.remove(referencer);\n \n \t\t\t\tdomain.sendNotification(new NotificationImpl(\n \t\t\t\t\tEventTypes.EXPORT, referencer, (Object) null, -1) {\n \n \t\t\t\t\tpublic Object getNotifier() {\n \t\t\t\t\t\treturn referenced;\n \t\t\t\t\t}\n \t\t\t\t});\n \n \t\t\t\tif (exportsMap.isEmpty()) {\n \t\t\t\t\texports.remove(referenced);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}",
"public void discard();",
"public void delIncomingRelations();",
"public void setRemover() {\n Disposable d = Disposable.from(() -> parent.psm.remove(this));\n UNSAFE.putOrderedObject(this, REMOVE, d);\n }",
"private void processDrop() throws HsqlException {\n\n String token;\n boolean isview;\n\n session.checkReadWrite();\n session.checkAdmin();\n session.setScripting(true);\n\n token = tokenizer.getSimpleToken();\n isview = false;\n\n switch (Token.get(token)) {\n\n case Token.INDEX : {\n processDropIndex();\n\n break;\n }\n case Token.SCHEMA : {\n processDropSchema();\n\n break;\n }\n case Token.SEQUENCE : {\n processDropSequence();\n\n break;\n }\n case Token.TRIGGER : {\n processDropTrigger();\n\n break;\n }\n case Token.USER : {\n processDropUser();\n\n break;\n }\n case Token.ROLE : {\n database.getGranteeManager().dropRole(\n tokenizer.getSimpleName());\n\n break;\n }\n case Token.VIEW : {\n isview = true;\n } //fall thru\n case Token.TABLE : {\n processDropTable(isview);\n\n break;\n }\n default : {\n throw Trace.error(Trace.UNEXPECTED_TOKEN, token);\n }\n }\n }",
"public void remove() {\n\t\t if (lastReturned == null)\n\t\t throw new IllegalStateException(\n\t\t \"Iterator call to next() \" +\n\t\t \"required before calling remove()\");\n\t\t\tif (modCount != expectedModCount)\n\t\t\t\t throw new ConcurrentModificationException();\n\n\t\t\t// remove lastReturned by calling remove() in Hash.\n\t\t\t// this call will increment modCount\n\t\t\tHashAVL.this.remove(lastReturned);\n\t\t\texpectedModCount = modCount;\n\t\t\tlastReturned = null;\n\t\t}",
"public void remove() {\n super.remove();\n if (this.caughtEntity != null) {\n this.caughtEntity.noClip = false;\n }\n if (this.angler != null) {\n this.angler.fishingBobber = null;\n this.angler.noClip = false;\n }\n if(this.rod.getItem() == Items.ITEM_GRAB_HOOK){\n this.rod.getOrCreateTag().putBoolean(\"cast\", false);\n }\n }",
"private final void m118787c(bkcr bkcr) {\n if (getAdapter() instanceof bkcq) {\n ((bkcq) getAdapter()).remove(bkcr);\n }\n }",
"void oldconsume() {\n\t\tfor (;;) {\n\t\t\tif (printoldline > oldinfo.maxLine)\n\t\t\t\tbreak; /* end of file */\n\t\t\tprintnewline = oldinfo.other[printoldline];\n\t\t\tif (printnewline < 0)\n\t\t\t\tshowdelete();\n\t\t\telse if (blocklen[printoldline] < 0)\n\t\t\t\tskipold();\n\t\t\telse showmove();\n\t\t}\n\t}",
"public void cleanUp() {\n if(ticker.skipCleanup()) {\n return;\n } \n \n // At this point cleanup is inevitable, so linked list traversal should\n // be performed. \n Entry<K, V> e = segment.head();\n Entry<K, V> end = segment.tail();\n \n int processed = 0;\n long createThreshold = ticker.nextTick() - createTTL;\n long accessThreshold = ticker.nextTick() - accessTTL;\n\n Object removeKey = null;\n while ((e = e.getNext()) != end && processed++ < REMOVE_DEPTH) {\n if (null != removeKey) {\n segment.remove(removeKey);\n removeKey = null;\n }\n\n // both, access and creation thresholds might trigger entry removal \n if (e.getCreationTime() <= createThreshold || e.getAccessTime() <= accessThreshold) {\n removeKey = e.getKey();\n }\n }\n\n if (null != removeKey) {\n segment.remove(removeKey);\n } \n ticker.markCleanup();\n }",
"private void reallocateUnConsumedEsnRecords() {\n\t\tesnInfoRepository\n\t\t\t\t.findAllByIsConsumed(false).stream().filter(item -> (Days\n\t\t\t\t\t\t.daysBetween(new DateTime(item.getDateClaimed()), new DateTime()).isGreaterThan(Days.days(2))))\n\t\t\t\t.forEach(item -> {\n\t\t\t\t\titem.setUserClaimed(null);\n\t\t\t\t\titem.setDateClaimed(null);\n\t\t\t\t});\n\t}",
"void removeRowsLock();",
"public void delete() {\n mapping.getFieldOrFieldExclude().remove(field);\n }",
"void unsetCombine();",
"@Override\n public void rollback()\n throws TransactionException\n {\n Iterator<Buffer> it=branchBuffers.iterator();\n while (it.hasNext())\n { \n it.next().rollback();\n it.remove();\n }\n state=State.ABORTED;\n \n }",
"public void markRecordsDroppedReplace() throws JNCException {\n markLeafReplace(\"recordsDropped\");\n }",
"@Override\r\n public void onNeutral(String callerTag) {\r\n ComponentsGetter cg = (ComponentsGetter)getSherlockActivity();\r\n cg.getFileOperationsHelper()\r\n .removeFile(mTargetFile, true);\r\n \r\n FileDataStorageManager storageManager = cg.getStorageManager();\r\n \r\n boolean containsKeepInSync = false;\r\n if (mTargetFile.isFolder()) {\r\n Vector<OCFile> files = storageManager.getFolderContent(mTargetFile);\r\n for(OCFile file: files) {\r\n containsKeepInSync = file.keepInSync() || containsKeepInSync;\r\n\r\n if (containsKeepInSync)\r\n break;\r\n }\r\n }\r\n\r\n // Remove etag for parent, if file is a keep_in_sync \r\n // or is a folder and contains keep_in_sync \r\n if (mTargetFile.keepInSync() || containsKeepInSync) {\r\n OCFile folder = null;\r\n if (mTargetFile.isFolder()) {\r\n folder = mTargetFile;\r\n } else {\r\n folder = storageManager.getFileById(mTargetFile.getParentId());\r\n }\r\n \r\n folder.setEtag(\"\");\r\n storageManager.saveFile(folder);\r\n }\r\n }",
"public void remove() { \n if (lastAccessed == null) throw new IllegalStateException();\n Node x = lastAccessed.previous;\n Node y = lastAccessed.next;\n x.next = y;\n y.previous = x;\n size--;\n if (current == lastAccessed) current = y;\n else index--;\n lastAccessed = null;\n }",
"public final void invalidate() {\r\n synchronized (f_seaLock) {\r\n if (!f_valid) {\r\n return;\r\n }\r\n invalidate_internal();\r\n\r\n f_valid = false;\r\n // inform deponent drops\r\n for (Iterator<Drop> i = f_deponents.iterator(); i.hasNext();) {\r\n Drop deponent = i.next();\r\n deponent.removeDependent(this);\r\n }\r\n f_deponents.clear(); // consistent state\r\n // inform dependents\r\n for (Iterator<Drop> i = f_dependents.iterator(); i.hasNext();) {\r\n Drop dependent = i.next();\r\n dependent.removeDeponent(this);\r\n }\r\n f_dependents.clear(); // consistent state\r\n f_mySea.notify(this, DropEvent.Invalidated);\r\n }\r\n }",
"public void clearChangeSet()\r\n\t{\n\t\toriginal = new Hashtable(10);\r\n\t\t//System.out.println(\"111111 in clearChangeSet()\");\r\n\t\tins_mov = new Hashtable(10);\r\n\t\tdel_mod = new Hashtable(10);\r\n\r\n\t\tfor (int i = 0; i < seq.size(); i++) {\r\n\t\t\tReplicated elt = (Replicated) seq.elementAt(i);\r\n\t\t\toriginal.put(elt.getObjectID(), elt);\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void deleteRes(int rid) {\n\t\trmap.deleteRes(rid);\n\t}",
"@PreRemove\r\n public void preRemove(){\r\n this.isDeleted=true;\r\n }",
"public void delete() {\r\n\t\t\tif (!isDeleted && handles.remove(this)) {\r\n\t\t\t\telementsUsed -= count;\r\n\t\t\t\tisDeleted = true;\r\n\t\t\t\tif (elementsUsed < numElements / 4) {\r\n\t\t\t\t\tcompact();\r\n\t\t\t\t\tnumElements = Math.max(10, elementsUsed * 2);\r\n\t\t\t\t}\r\n\t\t\t\tshapePeer.vboHandle = null;\r\n\t\t\t}\r\n\t\t}"
] | [
"0.6590213",
"0.5627011",
"0.5511115",
"0.5326508",
"0.5324594",
"0.5312931",
"0.52996844",
"0.5260408",
"0.50678414",
"0.50587386",
"0.5058546",
"0.5044346",
"0.50385433",
"0.49518996",
"0.49214065",
"0.48828366",
"0.48741505",
"0.48280194",
"0.48088852",
"0.4777195",
"0.47761136",
"0.4773271",
"0.47714683",
"0.47502625",
"0.47497118",
"0.4740006",
"0.4721213",
"0.46877664",
"0.46436983",
"0.46382192",
"0.46122456",
"0.45954305",
"0.45811012",
"0.45779264",
"0.45600718",
"0.45563743",
"0.45536736",
"0.4550306",
"0.4535001",
"0.45306173",
"0.45277333",
"0.45173687",
"0.45104492",
"0.44983095",
"0.4495933",
"0.44833323",
"0.44829372",
"0.44745478",
"0.44733196",
"0.4466695",
"0.44641393",
"0.44635254",
"0.44609872",
"0.44608074",
"0.44586417",
"0.44575393",
"0.44573843",
"0.4451224",
"0.44487032",
"0.44482768",
"0.4441476",
"0.4440885",
"0.44259408",
"0.44250777",
"0.44138396",
"0.4412288",
"0.4408674",
"0.44061017",
"0.44036254",
"0.43989104",
"0.43957224",
"0.43900487",
"0.438893",
"0.43868554",
"0.43856654",
"0.43853423",
"0.43850425",
"0.43833882",
"0.43723905",
"0.4362274",
"0.4349802",
"0.4346469",
"0.43455815",
"0.4339317",
"0.43237415",
"0.43214858",
"0.4318235",
"0.4313722",
"0.4312025",
"0.4310635",
"0.4309162",
"0.43085137",
"0.4300512",
"0.42940122",
"0.42924014",
"0.4291206",
"0.4284369",
"0.42791677",
"0.42784643",
"0.42768967"
] | 0.5500313 | 3 |
Commit live docs to the directory (writes new _X_N.del files); returns true if it wrote the file and false if there were no new deletes to write: | public synchronized boolean writeLiveDocs() throws IOException {
if (mPendingDeleteCount != 0) {
// We have new deletes
assert mLiveDocs.length() == mInfo.getSegmentInfo().getDocCount();
// We can write directly to the actual name (vs to a
// .tmp & renaming it) because the file is not live
// until segments file is written:
ILiveDocsFormat liveDocsFormat = mWriter.getIndexFormat().getLiveDocsFormat();
liveDocsFormat.writeLiveDocs(mWriter.getDirectory(),
(MutableBits)mLiveDocs, mInfo, mPendingDeleteCount);
// If we hit an exc in the line above (eg disk full)
// then info remains pointing to the previous
// (successfully written) del docs:
mInfo.advanceDelGen();
mInfo.setDelCount(mInfo.getDelCount() + mPendingDeleteCount);
mPendingDeleteCount = 0;
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasDeleteFile();",
"public void testDeleteFileSuccess() throws Exception {\r\n assertNotNull(\"setup fails\", filePersistence);\r\n String writeString = \"Hello World\";\r\n String fileCreationId = filePersistence.createFile(VALID_FILELOCATION, FILENAME);\r\n filePersistence.appendBytes(fileCreationId, writeString.getBytes());\r\n filePersistence.closeFile(fileCreationId);\r\n assertTrue(\"the file should exist\", new File(VALID_FILELOCATION, FILENAME).exists());\r\n filePersistence.deleteFile(VALID_FILELOCATION, FILENAME);\r\n assertFalse(\"the file should not exist\", new File(VALID_FILELOCATION, FILENAME).exists());\r\n }",
"public static boolean addFile(TranslationFile bf) {\n System.out.println(\"File added to database.\");\n DatabaseOperations.addOrUpdateFileName(bf.getFileID(), bf.getFileName());\n String sql = \"INSERT OR REPLACE INTO corpus1(id, fileID, fileName, thai, english, committed, removed, rank) VALUES(?,?,?,?,?,?,?,?)\";\n\n try (Connection conn = DatabaseOperations.connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n\n conn.setAutoCommit(false);\n\n // this makes sure that the segments in the file, when retrieved from the db, can be ordered in the proper order.\n // simply increments by 1 on each segment. \n int rank = 0;\n // keeps count of the number of segs added so that the SQL can run a batch transaction (which is much more efficient than individual transactions).\n // when i=1000, or at the last segment, the SQL is then run as one batch transaction.\n int i = 0;\n\n for (Segment seg : bf.getActiveSegs()) {\n\n pstmt.setDouble(1, seg.getID());\n pstmt.setDouble(2, seg.getFileID());\n pstmt.setString(3, seg.getFileName());\n pstmt.setString(4, seg.getThai());\n pstmt.setString(5, seg.getEnglish());\n // committed/removed booleans are stored as binary (0 = false, 1 = true)\n pstmt.setInt(6, seg.isCommitted() ? 1 : 0);\n // removed is set to \"false\"\n pstmt.setInt(7, 0);\n pstmt.setInt(8, rank);\n pstmt.addBatch();\n rank++;\n i++;\n\n if (i % 1000 == 0 || i == bf.getActiveSegs().size()) {\n pstmt.executeBatch(); //Execute every 1000 segments.\n }\n }\n\n // resetting counters\n i = 0;\n rank = 0;\n for (Segment seg : bf.getHiddenSegs()) {\n\n pstmt.setDouble(1, seg.getID());\n pstmt.setDouble(2, seg.getFileID());\n pstmt.setString(3, seg.getFileName());\n pstmt.setString(4, seg.getThai());\n pstmt.setString(5, seg.getEnglish());\n // committed/removed booleans are stored as binary (0 = false, 1 = true)\n pstmt.setInt(6, seg.isCommitted() ? 1 : 0);\n // removed is set to \"true\"\n pstmt.setInt(7, 1);\n pstmt.setInt(8, rank);\n pstmt.addBatch();\n rank++;\n i++;\n\n if (i % 1000 == 0 || i == bf.getHiddenSegs().size()) {\n pstmt.executeBatch(); //Execute every 1000 segments.\n }\n }\n conn.commit();\n return true;\n\n } catch (SQLException e) {\n System.out.println(\"AddFileAsBatch: \" + e.getMessage());\n return false;\n }\n }",
"@Override\r\n\t\t\tpublic Boolean call() throws Exception {\n\t\t\t\tS3FileHandle updated = fileHandleDao.createFile(fh);\r\n\t\t\t\ttoDelete.add(updated.getId());\r\n\t\t\t\treturn true;\r\n\t\t\t}",
"boolean shouldCommit();",
"public boolean putNewBatch(String key) {\n if (currentFileSize<maxFileSize) {\n currentFileSize++;\n fileIndex.put(key, currentFileId);\n String file = \"idx-\"+mySerial+\"-\"+currentFileId;\n }\n else {\n currentFileId++;\n currentFileSize=0;\n fileIndex.put(key, currentFileId);\n String file = \"idx-\"+mySerial+\"-\"+currentFileId;\n }\n return false;\n }",
"public boolean delDocs (String field, String term) {\n if (field == null || term == null)\n return false;\n try {\n this.writer().deleteDocuments(new Term(field, term));\n if (++commitCounter > autoCommit) {\n this.commit();\n commitCounter = 0;\n };\n\n this.indexRevision = null;\n return true;\n }\n\n // Failed to delete document\n catch (IOException e) {\n log.error(\"Unable to delete documents\");\n };\n return false;\n }",
"public boolean UploadHugeDocumentsWithoutDelete (ClsNodeDocument[] docs, String transID, String status, String dataFlow, String submitURL, String token, Date submitted, Timestamp submittedTS, String user);",
"public void commit()\n\t{\n\t\tif (committed)\n\t\t\treturn;\n\t\t// handle the error case first\n\t\tif (error)\n\t\t{\n//\t\t\tSystem.out.println(\"Error - removing \" + source + \" and \" + generates);\n\t\t\tif (source.exists())\n\t\t\t\tsource.delete();\n\t\t\tif (generates.exists())\n\t\t\t\tgenerates.delete();\n\t\t}\n\t\telse if (source.exists() && generates.exists()) // the typical something might have changed case\n\t\t{\n\t\t\tif (dirty)\n\t\t\t{ // they are different, move ...\n//\t\t\t\tSystem.out.println(\"Built - moving \" + generates + \" to \" + source);\n\t\t\t\tboolean fd = source.delete();\n\t\t\t\tif (!fd)\n\t\t\t\t\tthrow new UtilException(\"Could not delete the file \" + source + \" when renaming \" + generates);\n\t\t\t\tboolean renameWorked = generates.renameTo(source);\n\t\t\t\tif (!renameWorked)\n\t\t\t\t\tthrow new UtilException(\"Could not rename \" + generates + \" to \" + source);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n//\t\t\t\tSystem.out.println(\"No change - removing \" +generates);\n\t\t\t\t// they're the same, the new one is uninteresting\n\t\t\t\tgenerates.delete();\n\t\t\t}\n\t\t}\n\t\telse if (!source.exists() && generates.exists()) // we didn't have a comparison file\n\t\t{\n//\t\t\tSystem.out.println(\"Clean build - saving \" + generates + \" as \" + source);\n\t\t\tboolean renameWorked = generates.renameTo(source);\n\t\t\tif (!renameWorked)\n\t\t\t\tthrow new UtilException(\"Could not rename \" + generates + \" to \" + source);\n\t\t}\n\t\telse\n\t\t\tthrow new UtilException(\"I don't think this case should be able to happen: Comparing \" + source + (source.exists()?\"(exists)\":\"(missing)\") + \" \" + generates + (generates.exists()?\"(exists)\":\"(missing)\"));\n\t\tcommitted = true;\n\t}",
"public boolean delete()\n\t{\n\t\treturn deleteRecursive( file ) ;\n\t}",
"boolean hasUpdateInodeDirectory();",
"public synchronized boolean verifyDocCounts() {\n\t\tfinal int docCount = mInfo.getSegmentInfo().getDocCount();\n\t\t\n\t\tint count;\n\t\tif (mLiveDocs != null) {\n\t\t\tcount = 0;\n\t\t\tfor (int docID=0; docID < docCount; docID++) {\n\t\t\t\tif (mLiveDocs.get(docID)) \n\t\t\t\t\tcount ++;\n\t\t\t}\n\t\t} else {\n\t\t\tcount = docCount;\n\t\t}\n\n\t\tassert docCount - mInfo.getDelCount() - mPendingDeleteCount == count: \n\t\t\t\"info.docCount=\" + docCount + \" info.getDelCount()=\" + mInfo.getDelCount() + \n\t\t\t\" pendingDeleteCount=\" + mPendingDeleteCount + \" count=\" + count;\n\t\t\n\t\treturn true;\n\t}",
"public void javadocEnded(boolean success, File destDir, boolean allDocs) { }",
"public void javadocEnded(boolean success, File destDir, boolean allDocs) { }",
"public void indexFileOrDirectory(String fileName) {\r\n\r\n addFiles(new File(fileName));\r\n\r\n int originalNumDocs = writer.numRamDocs();\r\n for (File f : queue) {\r\n try {\r\n Document doc = new Document();\r\n\r\n // Creation of a simpledateformatter in order to print the last-modified-date of our files.\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss\");\r\n String date = sdf.format(f.lastModified());\r\n\r\n if (f.getName().endsWith(\".html\")) {\r\n\r\n // Creation of a jsoup document to help us with our html parsing.\r\n org.jsoup.nodes.Document htmlFile = Jsoup.parse(f, null);\r\n String body = htmlFile.body().text();\r\n String title = htmlFile.title();\r\n String summary = getSummary(htmlFile);\r\n\r\n\r\n doc.add(new TextField(\"contents\", body + \" \" + title + \" \" + date, Field.Store.YES));\r\n doc.add(new TextField(\"title\", title, Field.Store.YES));\r\n doc.add(new StringField(\"path\", f.getPath(), Field.Store.YES));\r\n doc.add(new TextField(\"modified-date\", date, Field.Store.YES));\r\n doc.add(new StringField(\"summary\", summary, Field.Store.YES));\r\n\r\n }\r\n else {\r\n String content = FileUtils.readFileToString(f, StandardCharsets.UTF_8);\r\n\r\n doc.add(new TextField(\"contents\", content + \" \" + date, Field.Store.YES));\r\n doc.add(new StringField(\"path\", f.getPath(), Field.Store.YES));\r\n doc.add(new TextField(\"modified-date\", date, Field.Store.YES));\r\n }\r\n doc.add(new StringField(\"filename\", f.getName(), Field.Store.YES));\r\n\r\n writer.addDocument(doc);\r\n System.out.println(\"Added: \" + f);\r\n } catch (Exception e) {\r\n System.out.println(\"Could not add: \" + f);\r\n }\r\n }\r\n\r\n int newNumDocs = writer.numDocs();\r\n System.out.println(\"\");\r\n System.out.println(\"************************\");\r\n System.out.println((newNumDocs - originalNumDocs) + \" documents added.\");\r\n System.out.println(\"************************\");\r\n\r\n queue.clear();\r\n }",
"public boolean writeFile(byte[] bytes) {\n if(bytes.length > size) {\n System.out.println(\"Attempted write is bigger than the file size. Aborting.\\n\");\n return false;\n }\n\n Disk.clear(startingPosition, size);\n Disk.write(bytes, startingPosition, bytes.length);\n return true;\n }",
"protected abstract boolean deleteCheckedFiles();",
"public boolean deleteIndex(String name){\n //array to hold all database names from file\n ArrayList<String> dbNames = new ArrayList<String>();\n\n //create index if it doesn't exist\n File file = new File(\"databases/index.txt\");\n Scanner sc;\n FileWriter fw; \n\n try {\n sc = new Scanner(file); \n //read current database names to array\n String currName; \n if (sc.hasNextLine()){\n while(sc.hasNextLine()){\n currName = sc.nextLine();\n dbNames.add(currName);\n } \n }\n sc.close();\n\n //if database name already in index, remove it\n if ( dbNames.contains(name) ){\n dbNames.remove(name);\n }\n\n } catch(FileNotFoundException ex){}\n\n //create / overwrite index file\n try {\n fw = new FileWriter(\"databases/index.txt\");\n } catch (IOException ex2){\n System.out.println(\"ERROR: index not found and could not be created\");\n return false;\n }\n\n //write array of database names to file\n for (String dbName : dbNames){\n try {\n fw.write(dbName);\n fw.write(\"\\n\");\n } catch (IOException ex3) {\n System.out.println(\"ERROR: could not write to index\");\n }\n }\n\n try {\n fw.close();\n } catch (IOException ex4){\n System.out.println(\"ERROR: filewriter could not be closed\");\n return false;\n }\n\n return true;\n }",
"@Test(enabled=false)\n\tpublic void testRepeatedPutAndDeleteOfFileBug28() throws Exception {\n\t\tString testFileName = \"testRepeatedPutAndDeleteOfFileBug28andThisNameIsRealllllllllllllllllyLong.txt\";\n\t\n\t\tint nbrIterations = 10;\n\t\n\t\tFile localFile = new File(LOCAL_BINARY_FILE);\n\t\t\n\t\tfor (int i = 0; i < nbrIterations; i++) {\n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\tif (client.doesExist(\"\")) {\n\t\t\t\tclient.delete(\"\");\n\t\t\t}\n\t\t\tclient.mkdirs(\"\");\n\t\t\tclient.put(localFile.getAbsolutePath(), testFileName);\n\t\t\tclient.put(LOCAL_DIR, \"\");\n\t\t\tSystem.out.println(\"Iteration[\" + i + \"]: \" + (System.currentTimeMillis() - startTime));\n\t\t}\n\t}",
"public void tesCloseFileSuccess() throws Exception {\r\n assertNotNull(\"setup fails\", filePersistence);\r\n String writeString = \"Hello World\";\r\n String fileCreationId = filePersistence.createFile(VALID_FILELOCATION, FILENAME);\r\n filePersistence.appendBytes(fileCreationId, writeString.getBytes());\r\n filePersistence.closeFile(fileCreationId);\r\n try {\r\n filePersistence.appendBytes(fileCreationId, writeString.getBytes());\r\n fail(\"there shouldn't exist output stream with id \" + fileCreationId);\r\n } catch (FilePersistenceException e) {\r\n // good\r\n }\r\n filePersistence.deleteFile(VALID_FILELOCATION, FILENAME);\r\n }",
"@Override\n\t\t\tpublic boolean accept(File dir, String filename)\n\t\t\t{\n\t\t\t\tFile file = new File(path + \"/\" + filename);\n\t\t\t\tLong ago = file.lastModified();\n\t\t\t\tLong now = System.currentTimeMillis();\n\t\t\t\t// 如果最后一次修改时间超过一年:3153600秒\n\t\t\t\tif ((now - ago) > 31536000 / 12)\n\t\t\t\t{\n\t\t\t\t\tfile.delete();\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}",
"private void verifyBinary(byte[][][] docValues, int[] ids, int numBytesPerDim) throws Exception {\n IndexWriterConfig iwc = newIndexWriterConfig();\n\n int numDims = docValues[0].length;\n int bytesPerDim = docValues[0][0].length;\n\n // Else we can get O(N^2) merging:\n int mbd = iwc.getMaxBufferedDocs();\n if (mbd != -1 && mbd < docValues.length / 100) {\n iwc.setMaxBufferedDocs(docValues.length / 100);\n }\n iwc.setCodec(getCodec());\n\n Directory dir;\n if (docValues.length > 100000) {\n dir = newFSDirectory(createTempDir(\"TestPointQueries\"));\n } else {\n dir = newDirectory();\n }\n\n IndexWriter w = new IndexWriter(dir, iwc);\n\n int numValues = docValues.length;\n if (VERBOSE) {\n System.out.println(\n \"TEST: numValues=\"\n + numValues\n + \" numDims=\"\n + numDims\n + \" numBytesPerDim=\"\n + numBytesPerDim);\n }\n\n int missingPct = random().nextInt(100);\n int deletedPct = random().nextInt(100);\n if (VERBOSE) {\n System.out.println(\" missingPct=\" + missingPct);\n System.out.println(\" deletedPct=\" + deletedPct);\n }\n\n BitSet missing = new BitSet();\n BitSet deleted = new BitSet();\n\n Document doc = null;\n int lastID = -1;\n\n for (int ord = 0; ord < numValues; ord++) {\n if (ord % 1000 == 0) {\n if (VERBOSE) {\n System.out.println(\"Adding docs: \" + ord);\n }\n }\n int id = ids[ord];\n if (id != lastID) {\n if (random().nextInt(100) < missingPct) {\n missing.set(id);\n if (VERBOSE) {\n System.out.println(\" missing id=\" + id);\n }\n }\n\n if (doc != null) {\n w.addDocument(doc);\n if (random().nextInt(100) < deletedPct) {\n int idToDelete = random().nextInt(id);\n w.deleteDocuments(new Term(\"id\", \"\" + idToDelete));\n deleted.set(idToDelete);\n if (VERBOSE) {\n System.out.println(\" delete id=\" + idToDelete);\n }\n }\n }\n\n doc = new Document();\n doc.add(newStringField(\"id\", \"\" + id, Field.Store.NO));\n doc.add(new NumericDocValuesField(\"id\", id));\n lastID = id;\n }\n\n if (missing.get(id) == false) {\n doc.add(new BinaryPoint(\"value\", docValues[ord]));\n if (VERBOSE) {\n System.out.println(\"id=\" + id);\n for (int dim = 0; dim < numDims; dim++) {\n System.out.println(\" dim=\" + dim + \" value=\" + bytesToString(docValues[ord][dim]));\n }\n }\n }\n }\n\n w.addDocument(doc);\n\n if (random().nextBoolean()) {\n if (VERBOSE) {\n System.out.println(\" forceMerge(1)\");\n }\n w.forceMerge(1);\n }\n final IndexReader r = DirectoryReader.open(w);\n w.close();\n\n IndexSearcher s = newSearcher(r, false);\n\n int numThreads = TestUtil.nextInt(random(), 2, 5);\n\n if (VERBOSE) {\n System.out.println(\"TEST: use \" + numThreads + \" query threads; searcher=\" + s);\n }\n\n List<Thread> threads = new ArrayList<>();\n final int iters = atLeast(100);\n\n final CountDownLatch startingGun = new CountDownLatch(1);\n final AtomicBoolean failed = new AtomicBoolean();\n\n for (int i = 0; i < numThreads; i++) {\n Thread thread =\n new Thread() {\n @Override\n public void run() {\n try {\n _run();\n } catch (Exception e) {\n failed.set(true);\n throw new RuntimeException(e);\n }\n }\n\n private void _run() throws Exception {\n startingGun.await();\n\n for (int iter = 0; iter < iters && failed.get() == false; iter++) {\n\n byte[][] lower = new byte[numDims][];\n byte[][] upper = new byte[numDims][];\n for (int dim = 0; dim < numDims; dim++) {\n lower[dim] = new byte[bytesPerDim];\n random().nextBytes(lower[dim]);\n\n upper[dim] = new byte[bytesPerDim];\n random().nextBytes(upper[dim]);\n\n if (Arrays.compareUnsigned(lower[dim], 0, bytesPerDim, upper[dim], 0, bytesPerDim)\n > 0) {\n byte[] x = lower[dim];\n lower[dim] = upper[dim];\n upper[dim] = x;\n }\n }\n\n if (VERBOSE) {\n System.out.println(\n \"\\n\" + Thread.currentThread().getName() + \": TEST: iter=\" + iter);\n for (int dim = 0; dim < numDims; dim++) {\n System.out.println(\n \" dim=\"\n + dim\n + \" \"\n + bytesToString(lower[dim])\n + \" TO \"\n + bytesToString(upper[dim]));\n }\n }\n\n Query query = BinaryPoint.newRangeQuery(\"value\", lower, upper);\n\n if (VERBOSE) {\n System.out.println(Thread.currentThread().getName() + \": using query: \" + query);\n }\n\n final FixedBitSet hits =\n s.search(query, FixedBitSetCollector.createManager(r.maxDoc()));\n\n if (VERBOSE) {\n System.out.println(\n Thread.currentThread().getName() + \": hitCount: \" + hits.cardinality());\n }\n\n BitSet expected = new BitSet();\n for (int ord = 0; ord < numValues; ord++) {\n int id = ids[ord];\n if (missing.get(id) == false\n && deleted.get(id) == false\n && matches(bytesPerDim, lower, upper, docValues[ord])) {\n expected.set(id);\n }\n }\n\n NumericDocValues docIDToID = MultiDocValues.getNumericValues(r, \"id\");\n\n int failCount = 0;\n for (int docID = 0; docID < r.maxDoc(); docID++) {\n assertEquals(docID, docIDToID.nextDoc());\n int id = (int) docIDToID.longValue();\n if (hits.get(docID) != expected.get(id)) {\n System.out.println(\n \"FAIL: iter=\"\n + iter\n + \" id=\"\n + id\n + \" docID=\"\n + docID\n + \" expected=\"\n + expected.get(id)\n + \" but got \"\n + hits.get(docID)\n + \" deleted?=\"\n + deleted.get(id)\n + \" missing?=\"\n + missing.get(id));\n for (int dim = 0; dim < numDims; dim++) {\n System.out.println(\n \" dim=\"\n + dim\n + \" range: \"\n + bytesToString(lower[dim])\n + \" TO \"\n + bytesToString(upper[dim]));\n failCount++;\n }\n }\n }\n if (failCount != 0) {\n fail(failCount + \" hits were wrong\");\n }\n }\n }\n };\n thread.setName(\"T\" + i);\n thread.start();\n threads.add(thread);\n }\n\n startingGun.countDown();\n for (Thread thread : threads) {\n thread.join();\n }\n\n IOUtils.close(r, dir);\n }",
"boolean delete();",
"private boolean commitChecker() {\n\t\tFile file = new File(stagePath);\n\t\tFile[] files = file.listFiles();\n\t\tif (files.length == 0 && untrackedFiles.size() == 0) {\n\t\t\tSystem.out.println(\"No changes added to the commit.\");\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"boolean hasUpdateInodeFile();",
"private boolean dotestReadAndWrite() {\n String directoryName = SDCARD_PATH+ \"/test\";\r\n File directory = new File(directoryName);\r\n if (!directory.isDirectory()) {\r\n if (!directory.mkdirs()) {\r\n sBuilder.append(getString(R.string.MakeDir) + FAIL).append(\"\\n\");\r\n return false;\r\n } else {\r\n sBuilder.append(getString(R.string.MakeDir) + SUCCESS).append(\r\n \"\\n\");\r\n }\r\n }\r\n File f = new File(directoryName, \"SDCard.txt\");\r\n try {\r\n // Remove stale file if any\r\n if (f.exists()) {\r\n f.delete();\r\n }\r\n if (!f.createNewFile()) {\r\n sBuilder.append(getString(R.string.CreateFile) + FAIL).append(\r\n \"\\n\");\r\n return false;\r\n } else {\r\n sBuilder.append(getString(R.string.CreateFile) + SUCCESS).append(\r\n \"\\n\");\r\n\r\n doWriteFile(f.getAbsoluteFile().toString());\r\n\r\n if (doReadFile(f.getAbsoluteFile().toString()).equals(\r\n TEST_STRING)) {\r\n sBuilder.append(getString(R.string.Compare)).append(SUCCESS).append(\r\n \"\\n\");\r\n } else {\r\n sBuilder.append(getString(R.string.Compare)).append(FAIL).append(\r\n \"\\n\");\r\n return false;\r\n }\r\n }\r\n\r\n sBuilder.append(getString(R.string.FileDel)).append(\r\n (f.delete() ? SUCCESS : FAIL)).append(\"\\n\");\r\n sBuilder.append(getString(R.string.DirDel)).append(\r\n (directory.delete() ? SUCCESS : FAIL)).append(\"\\n\");\r\n return true;\r\n } catch (IOException ex) {\r\n Log.e(TAG, \"isWritable : false (IOException)!\");\r\n return false;\r\n }\r\n }",
"@Override\n public void commit() throws IOException {\n if (!committed && currentFile != null) {\n long pos = currentFile.getLineReadPos();\n currentFile.setPos(pos);\n currentFile.setLastUpdated(updateTime);\n committed = true;\n }\n }",
"public boolean delete(String filename);",
"public boolean delete();",
"boolean isUsedForWriting();",
"protected boolean process(final List<AsyncEvent> events) {\n Boolean initialPdxReadSerialized = cache.getPdxReadSerializedOverride();\n cache.setPdxReadSerializedOverride(true);\n\n Set<IndexRepository> affectedRepos = new HashSet<>();\n\n try {\n for (AsyncEvent event : events) {\n\n Region region = event.getRegion();\n Object key = event.getKey();\n Object callbackArgument = event.getCallbackArgument();\n\n IndexRepository repository = repositoryManager.getRepository(region, key, callbackArgument);\n\n Object value = getValue(region.getEntry(key));\n if (value != null) {\n repository.update(key, value);\n } else {\n repository.delete(key);\n }\n\n affectedRepos.add(repository);\n }\n\n for (IndexRepository repo : affectedRepos) {\n repo.commit();\n }\n return true;\n } catch (BucketNotFoundException | RegionDestroyedException | PrimaryBucketException e) {\n logDebugMessage(\"Bucket not found while saving to lucene index: \" + e.getMessage(), e);\n return false;\n } catch (CacheClosedException e) {\n logDebugMessage(\"Unable to save to lucene index, cache has been closed\", e);\n return false;\n } catch (AlreadyClosedException e) {\n logDebugMessage(\"Unable to commit, the lucene index is already closed\", e);\n return false;\n } catch (IOException e) {\n throw new InternalGemFireError(\"Unable to save to lucene index\", e);\n } finally {\n cache.setPdxReadSerializedOverride(initialPdxReadSerialized);\n }\n }",
"protected boolean afterDelete() {\n if (!DOCSTATUS_Drafted.equals(getDocStatus())) {\n JOptionPane.showMessageDialog(null, \"El documento no se puede eliminar ya que no esta en Estado Borrador.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n return false;\n } \n \n //C_AllocationLine\n String sql = \"DELETE FROM C_AllocationLine \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_PaymentAllocate\n sql = \"DELETE FROM C_PaymentAllocate \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_VALORPAGO\n sql = \"DELETE FROM C_VALORPAGO \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_PAYMENTVALORES\n sql = \"DELETE FROM C_PAYMENTVALORES \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_PAYMENTRET\n sql = \"DELETE FROM C_PAYMENTRET \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n return true;\n\n }",
"@Override\n\tpublic int commit() {\n\t\treturn 0;\n\t}",
"boolean dealWithFileOverwrite(String filename);",
"public void commitChanges(){\r\n try{\r\n //Record the state of unfinished set in unfinished.dat\r\n unfinishedFileOutputStream = new FileOutputStream(UNFINISHED_FILE_PATH);\r\n unfinishedSetOutputStream = new ObjectOutputStream(unfinishedFileOutputStream);\r\n unfinishedSetOutputStream.writeObject(unfinished);\r\n unfinishedSetOutputStream.close();\r\n unfinishedFileOutputStream.close();\r\n\r\n //Record the state of finished list in finished.dat\r\n finishedFileOutputStream = new FileOutputStream(FINISHED_FILE_PATH);\r\n finishedListOutputStream = new ObjectOutputStream(finishedFileOutputStream);\r\n finishedListOutputStream.writeObject(finished);\r\n finishedListOutputStream.close();\r\n finishedFileOutputStream.close();\r\n\r\n //Record the state of activities list in activities.dat\r\n activitiesFileOutputStream = new FileOutputStream(ACTIVITIES_FILE_PATH);\r\n activitiesListOutputStream = new ObjectOutputStream(activitiesFileOutputStream);\r\n activitiesListOutputStream.writeObject(activities);\r\n activitiesListOutputStream.close();\r\n activitiesFileOutputStream.close();\r\n }\r\n catch(Exception e){\r\n System.out.println(\"Stress in commiting changes: \" + e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }",
"boolean commitEntryMemTableFlush() throws IOException;",
"boolean removeDocument(String path);",
"public DBMaker deleteFilesAfterClose(){\n this.deleteFilesAfterCloseFlag = true;\n return this;\n }",
"public boolean writeDataFile();",
"protected boolean attemptCommit() {\n \t\t\tpretendCommit();\n \t\t\tif (isValid()) {\n \t\t\t\tfDocumentUndoManager.commit();\n \t\t\t\treturn true;\n \t\t\t}\n \t\t\treturn false;\n \t\t}",
"public void testDisposeSuccess() throws Exception {\r\n assertNotNull(\"setup fails\", filePersistence);\r\n String fileCreationId = filePersistence.createFile(VALID_FILELOCATION, FILENAME);\r\n filePersistence.dispose();\r\n try {\r\n filePersistence.appendBytes(fileCreationId, new byte[10]);\r\n fail(\"all open output stream should closed\");\r\n } catch (FilePersistenceException e) {\r\n // good\r\n }\r\n }",
"public boolean writeWordFile() throws Exception {\n\n InputStream is = null;\n FileOutputStream fos = null;\n\n // 1 Cannot find source file, return false\n File inputFile = new File(this.inputPath);\n if (!inputFile.exists()) {\n return false;\n }\n\n File outputFile = new File(this.outputPath);\n // 2 If the target path does not exist, create a new path\n if (!outputFile.getParentFile().exists()) {\n outputFile.getParentFile().mkdirs();\n }\n\n try {\n\n // 3 Write html file content to doc file\n is = new FileInputStream(inputFile);\n POIFSFileSystem poifs = new POIFSFileSystem();\n DirectoryEntry directory = poifs.getRoot();\n directory.createDocument(\n \"WordDocument\", is);\n\n fos = new FileOutputStream(this.outputPath);\n poifs.writeFilesystem(fos);\n\n System.out.println(\"Conversion of word files is complete!\");\n\n return true;\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (fos != null) {\n fos.close();\n }\n if (is != null) {\n is.close();\n }\n }\n\n return false;\n }",
"public boolean quitFile(OpenDefinitionsDocument doc) { return true; }",
"public boolean quitFile(OpenDefinitionsDocument doc) { return true; }",
"public void commit() {\n\t\tcommitted = true;\n\t}",
"private boolean markOrDelete(File file, CacheFileProps props)\r\n {\r\n Integer deleteWatchCount = props.getDeleteWatchCount();\r\n\r\n // Just in case the value has been corrupted somehow.\r\n if (deleteWatchCount < 0)\r\n deleteWatchCount = 0;\r\n \r\n boolean deleted = false;\r\n \r\n if (deleteWatchCount < maxDeleteWatchCount)\r\n {\r\n deleteWatchCount++;\r\n \r\n if (log.isDebugEnabled())\r\n {\r\n log.debug(\"Marking file for deletion, deleteWatchCount=\" + deleteWatchCount + \", file: \"+ file);\r\n }\r\n props.setDeleteWatchCount(deleteWatchCount);\r\n props.store();\r\n numFilesMarked++;\r\n }\r\n else\r\n {\r\n if (log.isDebugEnabled())\r\n {\r\n log.debug(\"Deleting cache file \" + file);\r\n }\r\n deleted = deleteFilesNow(file);\r\n }\r\n \r\n return deleted;\r\n }",
"private void updateIndex() throws IOException {\n // maintain the document store (corpus) - if there is one\n if (currentMemoryIndex.containsPart(\"corpus\")) {\n // get all corpora + shove into document store\n ArrayList<DocumentReader> readers = new ArrayList<>();\n readers.add((DocumentReader) currentMemoryIndex.getIndexPart(\"corpus\"));\n for (String path : geometricParts.getAllShards().getBinPaths()) {\n String corpus = path + File.separator + \"corpus\";\n readers.add(new CorpusReader(corpus));\n }\n }\n // finally write new checkpointing data (checkpoints the disk indexes)\n Parameters checkpoint = createCheckpoint();\n this.checkpointer.saveCheckpoint(checkpoint);\n }",
"public void deleteGeneratedFiles();",
"public boolean deleteFile(String inKey) throws NuxeoException;",
"public static boolean documentUpload(String path, long idSez) {\n\t\ttry {\n\t\t\tDocument newDoc = new Document();\n\t\t\tbyte[] array = Files.readAllBytes(new File(path).toPath());\n\t\t\tnewDoc.data = array;\n\t\t\tnewDoc.idSez = idSez;\n\t\t\tString replace = path.replace(\"\\\\\", \"©\");\n\n\t\t\t// Ottengo nome\n\t\t\tString[] split = replace.split(\"©\");\n\t\t\tString last = split[split.length - 1]; // prelevo l'ultimo token dell'array che ceramente conterrą il nome del file\n\t\t\tString splitq[] = last.split(\"\\\\.\");\n\n\t\t\tif (splitq.length == 1) {\n\t\t\t\t// caso particolare senza estensione\n\t\t\t\tnewDoc.name = last;\n\t\t\t\tnewDoc.docType = \"\";\n\t\t\t} else {\n\t\t\t\tnewDoc.name = splitq[0];\n\t\t\t\tnewDoc.docType = splitq[1];\n\t\t\t}\n\t\t\t\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.UPLOAD_DOCUMENT;\n\t\t\trp.parameters = new Object[] { newDoc };\n\t\t\tsend(rp);\n\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"err doc upload\");\n\n\t\t}\n\t\treturn false;\n\t}",
"boolean hasUpdateInode();",
"public boolean UploadHugeDocuments (ClsNodeDocument[] docs, String transID, String status, String dataFlow, String submitURL, String token, Date submitted, Timestamp submittedTS, String user);",
"boolean hasDelete();",
"boolean hasDelete();",
"public void testRemoveWriteEnableTagsWithDocumentInMemory() {\n String fileName = \"read_only_with_write_parts_removed_as_byte.docx\";\n String fileInput = inputDirectory + \"read_only_with_write_parts.docx\";\n String expectedResult = expectedDirectory + \"read_only_with_write_parts_removed.docx\";\n ZipFile zipFileSource1;\n try {\n zipFileSource1 = new ZipFile(fileInput);\n Package packSource1 = Package.open(zipFileSource1, PackageAccess.ReadWrite);\n WordDocument docxSource1 = new WordDocument(packSource1);\n docxSource1.removeWriteEnabledTags();\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n assertTrue(docxSource1.save(outputStream));\n byte fileAsByte[] = outputStream.toByteArray();\n FileOutputStream file = new FileOutputStream(new File(outputDirectory + fileName));\n file.write(fileAsByte);\n file.close();\n OpenXmlAssert.assertEquals(new File(outputDirectory + fileName), new File(expectedResult));\n } catch (IOException e) {\n logger.error(e);\n fail(\"cannot open:\" + fileInput);\n } catch (OpenXML4JException e) {\n logger.error(e);\n fail(\"failed\" + e.getMessage());\n }\n }",
"public boolean updateLock(int n){\n\t\tFile file = new File(baseDir, constructFilename(n));\n\t\tif (!file.exists()) {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\tDataOutputStream daos = new DataOutputStream(new FileOutputStream(file));\n\t\t\tdaos.writeUTF(new TimeTool().toString(TimeTool.FULL_ISO));\n\t\t\tdaos.close();\n\t\t\treturn true;\n\t\t} catch (Exception ex) {\n\t\t\tExHandler.handle(ex);\n\t\t\treturn false;\n\t\t}\n\t}",
"boolean hasForceDelete();",
"@Test\n public void testUpdateDelete() {\n\n Fichier fichier = new Fichier(\"\", \"test.java\", new Date(), new Date());\n Raccourci raccourci = new Raccourci(fichier, \"shortcut vers test.java\", new Date(), new Date(), \"\");\n\n assertTrue(GestionnaireRaccourcis.getInstance().getRaccourcis().contains(raccourci));\n\n fichier.delete();\n\n assertFalse(GestionnaireRaccourcis.getInstance().getRaccourcis().contains(raccourci));\n }",
"public void commit (boolean force) throws IOException {\n // There is something to commit\n if (commitCounter > 0 || !force)\n this.commit();\n }",
"private boolean prepareNewFile(Descriptor d) {\r\n\t\tBitMask b = d.getEmptyBitmask();\r\n\r\n\t\tthis.file = new File(d, b, path, name);\r\n\r\n\t\tif (this.file.reallocate()) {\r\n\t\t\tcurrentState = State.CHASING_CHUNKS;\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\tthis.file = null;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"private boolean deleteFilesNow(File cacheFile)\r\n {\r\n CacheFileProps props = new CacheFileProps(cacheFile);\r\n props.delete();\r\n long fileSize = cacheFile.length();\r\n boolean deleted = cacheFile.delete();\r\n if (deleted)\r\n {\r\n numFilesDeleted++;\r\n sizeFilesDeleted += fileSize;\r\n Deleter.deleteEmptyParents(cacheFile, cache.getCacheRoot());\r\n }\r\n \r\n return deleted;\r\n }",
"public void commitWriter () {\n try {\n writer.commit();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public synchronized int flush()\n {\n int fileCount = files.size();\n int cb = (maxFiles * maxChars * SysLib.CBCHAR) + \n (maxFiles * SysLib.CBINT);\n byte b[] = new byte[cb];\n int inodeOffset = 0;\n int fileNameOffset = fileCount * SysLib.CBINT;\n\n for (int i = 0; i < fileCount; i++)\n {\n byte strBytes[] = files.get(i).getBytes();\n int cbStr = strBytes.length;\n\n SysLib.int2bytes(cbStr, b, inodeOffset);\n inodeOffset += SysLib.CBINT;\n\n // Don't write zero-length strings\n if (strBytes.length > 0)\n {\n System.arraycopy(strBytes, 0, b, fileNameOffset, cbStr);\n\n fileNameOffset += cbStr;\n }\n }\n\n if (inode.write(0, b) < 0)\n {\n return -1;\n }\n\n return 0;\n }",
"boolean hasInodeLastModificationTime();",
"boolean doMaintenance() throws IOException;",
"private boolean make_indices_file() {\r\n\t\t_headerObject._filenames = ( String[])_headerObject._fileObjectMap.keySet().toArray( new String[ 0]);\r\n\r\n\t\tif ( !open()) {\r\n\t\t\tclose();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\t_headerObject._indices_file = new File( _headerObject._directory.getAbsolutePath() + \"/\" + HeaderObject._indices_filename);\r\n\t\t\tDataOutputStream dataOutputStream = new DataOutputStream( new FileOutputStream( _headerObject._indices_file));\r\n\t\t\tfor ( int i = 0; i < _steps.length; ++i) {\r\n\t\t\t\tif ( !write( _steps[ i], dataOutputStream)) {\r\n\t\t\t\t\tdataOutputStream.flush();\r\n\t\t\t\t\tdataOutputStream.close();\r\n\t\t\t\t\tclose();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tdataOutputStream.flush();\r\n\t\t\tdataOutputStream.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\tclose();\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tclose();\r\n\r\n\t\treturn true;\r\n\t}",
"public boolean hasDeleteFile() {\n return ((bitField0_ & 0x00000400) == 0x00000400);\n }",
"public static native boolean saveDocument(String doc, String toFile);",
"public boolean hasDeleteFile() {\n return ((bitField0_ & 0x00000400) == 0x00000400);\n }",
"private boolean writeFile(String fileName) {\n try (FSDataOutputStream os = FileSystem.get(new URI(fileName),\n new HdfsConfiguration()).create(new Path(fileName))) {\n os.write(new byte[1024]); // Write some zeroes to the file.\n return true;\n } catch (Exception e) {\n LOG.error(\"Got exception\", e);\n }\n return false;\n }",
"private boolean createHTMLFiles(final DocTrees docTree,\n final Set<? extends Element> classes) throws IOException {\n\t\tboolean createdFiles = false;\n\t\tboolean documentationErrors = false;\n\t\tboolean invalidFileContent = false;\n\n\t\tfor (final Element clazz : classes) {\n // only add classes which are registered in our modules lookup table\n\t\t\tif (fModuleNodes.containsKey(clazz.toString())) {\n\t\t\t\t// class found to create help for\n\t\t\t\tfinal HTMLWriter htmlWriter = new HTMLWriter(clazz, fLinkProvider, fModuleNodes.get(clazz.toString()).getChildren(\"dependency\"), docTree);\n\t\t\t\tfinal String content = htmlWriter.createContents(fModuleNodes.get(clazz.toString()).getString(\"name\"));\n\n\t\t\t\tif (!htmlWriter.getDocumentationErrors().isEmpty()) {\n\t\t\t\t\tdocumentationErrors = true;\n\n\t\t\t\t\t// print errors\n\t\t\t\t\tSystem.out.println((fFailOnMissingDocs ? \"ERROR\" : \"WARNING\") + \": missing documentation content for \" + clazz + \":\");\n\t\t\t\t\tfor (final String errorMessage : htmlWriter.getDocumentationErrors())\n\t\t\t\t\t\tSystem.out.println(\"\\t\" + errorMessage);\n\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tverifyContent(content);\n\t\t\t\t} catch (final Exception e) {\n\t\t\t\t\tSystem.out.println((fFailOnHTMLErrors ? \"ERROR\" : \"WARNING\") + \": invalid file content for \" + clazz + \":\");\n\t\t\t\t\tSystem.out.println(\"\\t\" + e.getMessage());\n\t\t\t\t\tSystem.out.println(\"\");\n\n\t\t\t\t\tinvalidFileContent = true;\n\t\t\t\t}\n\n\t\t\t\t// write document\n\t\t\t\tfinal File targetFile = getChild(getChild(fRootFolder, \"help\"), createHTMLFileName(fModuleNodes.get(clazz.toString()).getString(\"id\")));\n\t\t\t\twriteFile(targetFile, content);\n\t\t\t\tcreatedFiles = true;\n\t\t\t}\n\t\t}\n\n\t\tif ((fFailOnMissingDocs) && (documentationErrors))\n\t\t\tthrow new IOException(\"Documentation is not complete\");\n\n\t\tif ((fFailOnHTMLErrors) && (invalidFileContent))\n\t\t\tthrow new IOException(\"Documentation invalid\");\n\n\t\treturn createdFiles;\n\t}",
"private boolean flush()\n {\n List<Protos.SchedulerTask> tasks = this.app.getTasks();\n\n //write all tasks to db\n for(Protos.SchedulerTask task : tasks)\n {\n if( !this.dbClient.updateTask(task) )\n {\n LOGGER.error(\"Failed to flush task to persistent storage\");\n return false;\n }\n }\n\n if( !this.dbClient.updateApp(this.getAppId().getValue(), this.app.getData()) )\n {\n LOGGER.error(\"Failed to flush app to persistent storage\");\n return false;\n }\n\n return true;\n }",
"boolean hasCompleteFile();",
"private boolean commitPermitted(Collection commitInstances, Collection newInstanceIds) {\n for (Object commitInstance : commitInstances) {\n Entity entity = (Entity) commitInstance;\n String fullId = entity.getMetaClass().getName() + \"-\" + entity.getId();\n if (newInstanceIds.contains(fullId)) {\n if (!createPermitted(entity.getMetaClass()))\n return false;\n } else if (!updatePermitted(entity.getMetaClass())) {\n return false;\n }\n }\n return true;\n }",
"public boolean clean() {\n\t\tboolean result = false;\n\n\t\ttry{\n\t\t\tif (this.exists()) {\n\t\t\t\tif (this.listFiles() != null) {\n\t\t\t\t\tfor (java.io.File file : this.listFiles()) {\n\t\t\t\t\t\t((File) file).delete();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresult = true;\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn result;\n\t}",
"public boolean shouldRevertFile(OpenDefinitionsDocument doc) { return true; }",
"public boolean shouldRevertFile(OpenDefinitionsDocument doc) { return true; }",
"void writeGame(Game game, List<File> existingFiles) throws MoveAlreadyWrittenException, ResultAlreadyWrittenException;",
"private void updateFiles() {\n\t}",
"private boolean removeOlderThan(long days) {\n boolean action = false;\n long now = System.currentTimeMillis();\n for (LogFile lf : knownFiles) {\n if (olderThan(lf, days, now)) {\n lf.path.delete();\n log.info(\"Deleted: \"+lf.path);\n action = true;\n }\n }\n return action;\n }",
"public synchronized void write(StyxFileClient client, long offset, \n int count, ByteBuffer data, boolean truncate, int tag)\n throws StyxException\n {\n if (this.mustExist && !this.file.exists())\n {\n // The file has been removed\n log.debug(\"The file \" + this.file.getPath() +\n \" has been removed by another process\");\n // Remove the file from the Styx server\n this.remove();\n throw new StyxException(\"The file \" + this.name + \" was removed.\");\n }\n try\n {\n int nWritten = 0;\n // If we're writing zero bytes to the end of the file, this is an\n // EOF signal\n if (data.remaining() == 0 && offset == this.file.length())\n {\n log.debug(\"Got EOF signal\");\n this.eofWritten = true;\n }\n else\n {\n // Open a new FileChannel for writing. Can't use FileOutputStream\n // as this doesn't allow successful writing at a certain file offset:\n // for some reason everything before this offset gets turned into\n // blank spaces.\n FileChannel chan = new RandomAccessFile(this.file, \"rw\").getChannel();\n\n // Remember old limit and position\n int pos = data.position();\n int lim = data.limit();\n // Make sure only the requested number of bytes get written\n data.limit(data.position() + count);\n \n // Write to the file\n nWritten = chan.write(data.buf(), offset);\n\n // Reset former buffer positions\n data.limit(lim).position(pos);\n\n // Truncate the file at the end of the new data if requested\n if (truncate)\n {\n log.debug(\"Truncating file at \" + (offset + nWritten) + \" bytes\");\n chan.truncate(offset + nWritten);\n }\n // We haven't reached EOF yet\n this.eofWritten = false;\n // Close the channel\n chan.close();\n }\n // Reply to the client\n this.replyWrite(client, nWritten, tag);\n }\n catch(IOException ioe)\n {\n throw new StyxException(\"An error of class \" + ioe.getClass() + \n \" occurred when trying to write to \" + this.getFullPath() +\n \": \" + ioe.getMessage());\n }\n }",
"public boolean delete() {\n return new File(DataCrow.moduleDir, filename).delete();\n }",
"private synchronized boolean deleteFileOrFolder(File fileToDelete, String readablePathForLog)\n {\n if (fileToDelete != null && fileToDelete.exists())\n {\n if (fileToDelete.delete())\n {\n // Success\n //String fileMsg = \"Deleted \" + readablePathForLog;\n //LogDAO.getInstance().add(fileMsg);\n return true;\n }\n else\n {\n // Failure\n\n // Only write to log if failed\n String fileMsg = \"Failed to delete \" + readablePathForLog;\n LogDAO.getInstance().add(fileMsg);\n }\n }\n\n // Failure\n return false;\n }",
"public boolean UploadDocuments (ClsNodeDocument[] docs, String transID, String status, String dataFlow, String submitURL, String token, Date submitted, Timestamp submittedTS, String user);",
"private static boolean m97141a(File file, String str, boolean z) {\n if (TextUtils.isEmpty(str)) {\n return false;\n }\n if (!file.getParentFile().exists()) {\n file.getParentFile().mkdirs();\n }\n try {\n if (!file.exists()) {\n file.createNewFile();\n }\n if (file.length() > 5242880) {\n file.delete();\n file.createNewFile();\n }\n BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(file.getAbsolutePath(), z));\n bufferedWriter.write(str);\n bufferedWriter.flush();\n bufferedWriter.close();\n return true;\n } catch (IOException e) {\n Log.e(\"FEEDBACK_LOG\", \"writeToFile: \", e);\n return false;\n }\n throw th;\n }",
"public void commit() {\n tryCommit(true);\n }",
"void commit() throws SolrServerException, IOException;",
"public boolean commit() throws FileNotFoundException, FileAlreadyExistsException {\n\t\tif (validateStages().hasEncounteredError()) { // This should be done more thoroughly on command\n\t\t\treturn false;\n\t\t}\n\n\t\tfor (int i = 1; i <= amountOfStages; i++) {\n\t\t\tmainStagesJson.add(String.valueOf(i), stageJsons.get(i));\n\t\t}\n\n\t\tmainJson.addProperty(\"name\", scriptName); // Sets the script name as the static identifier\n\t\tmainJson.addProperty(\"entityName\", entityName);\n\t\tmainJson.addProperty(\"entityType\", entityType.name());\n\t\tmainJson.addProperty(\"amountOfStages\", amountOfStages); // Used on loading\n\t\tmainJson.add(\"stages\", mainStagesJson);\n\n\t\tStagePlay plugin = StagePlay.getInstance();\n\t\tFile pluginDirectory = plugin.getDataFolder();\n\t\tif (!pluginDirectory.exists()) {\n\t\t\tif (pluginDirectory.mkdir()) {\n\t\t\t\tplugin.getLogger().info(\"Created plugin folder for StagePlay\");\n\t\t\t} else {\n\t\t\t\tthrow new FileNotFoundException(\"StagePlay has no plugin folder and cannot create one\");\n\t\t\t}\n\t\t}\n\n\t\tFile jsonFile = new File(pluginDirectory.getPath() + \"/\" + scriptName + \".json\");\n\t\tif (jsonFile.exists()) {\n\t\t\tthrow new FileAlreadyExistsException(\"Script file \" + scriptName + \".json already exists\");\n\t\t}\n\n\t\ttry (FileWriter writer = new FileWriter(jsonFile)) {\n\t\t\twriter.write(mainJson.toString());\n\t\t\tstageJsons.clear(); // Save some memory in the editor\n\t\t\tstagesOfActions.clear();\n\t\t\treturn true;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean removeFile(String filename) {\n\n\t\tif (m_db == null)\n\t\t\treturn false;\n\t\t\n\t\ttry {\n\t\t\tlong pending_affected = 0;\n\t\t\tlong file_cache_affected = 0;\n\n\t\t\t//\n\t\t\t// remove all file references\n\t\t\t//\n\t\t\tremoveFileReferences(filename);\n\n\t\t\t//\n\t\t\t// remove file from tag store\n\t\t\t//\n\t\t\tfile_cache_affected = m_db.delete(FILE_TABLE_NAME, FILE_FIELD_PATH\n\t\t\t\t\t+ \"=?\", new String[] { filename });\n\n\t\t\t//\n\t\t\t// informal debug message\n\t\t\t//\n\t\t\tLogger.i(\"DBManager::removeFile> Pending file: \" + pending_affected\n\t\t\t\t\t+ \" TagStore Cache: \" + file_cache_affected);\n\n\t\t\t//\n\t\t\t// done\n\t\t\t//\n\t\t\treturn true;\n\t\t} catch (SQLException exc) {\n\t\t\tLogger.e(\"DBManager::removeFile> exception occured\");\n\t\t\texc.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}",
"@Override\n\tpublic void delete()\n\t{\n\t\tcachedContent = null;\n\t\tFile outputFile = getStoreLocation();\n\t\tif ((outputFile != null) && outputFile.exists())\n\t\t{\n\t\t\tif (Files.remove(outputFile) == false)\n\t\t\t{\n\t\t\t\tlog.error(\"failed to delete file: \" + outputFile.getAbsolutePath());\n\t\t\t}\n\t\t}\n\t}",
"private boolean canChangeDocuments() {\n\n // If the text is modified, give the user a chance to\n // save it. Otherwise return true.\n\n if (fDocument.isModified()) {\n byte save = askSave(this, getTitle());\n if (save == YES) {\n return doSave();\n }\n else {\n return save == NO;\n }\n }\n else {\n return true;\n }\n }",
"public void testCreIdx(){\r\n\t \r\n\t String dataDir = \"C:\\\\study\\\\Lucene\\\\Data\";\r\n\t String idxDir = \"C:\\\\study\\\\Lucene\\\\Index\";\r\n\t \r\n\t LuceneUtils.delAll(idxDir);\r\n\t \r\n\t CreateIndex ci = new CreateIndex();\r\n\t \r\n\t ci.Indexer(new File(idxDir), new File(dataDir));\r\n\t \r\n\t\t\r\n\t}",
"private boolean deleteFile(final File file)\n\t\t\tthrows WritePermissionException\n\t{\n\t\tif (!file.exists())\n\t\t\treturn false;\n\n\t\t// First try the normal deletion.\n\t\tif (file.delete()) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Try with Storage Access Framework.\n\t\tif (Util.hasLollipop())\n\t\t{\n\t\t\tUsefulDocumentFile document = getDocumentFile(file, false, true);\n\t\t\treturn document != null && document.delete();\n\t\t}\n\n\t\treturn !file.exists();\n\t}",
"public void testAppendBytesSuccess() throws Exception {\r\n assertNotNull(\"setup fails\", filePersistence);\r\n String writeString = \"Hello World\";\r\n String fileCreationId = filePersistence.createFile(VALID_FILELOCATION, FILENAME);\r\n filePersistence.appendBytes(fileCreationId, writeString.getBytes());\r\n filePersistence.closeFile(fileCreationId);\r\n File file = new File(VALID_FILELOCATION, FILENAME);\r\n assertTrue(\"the file should exist\", file.exists());\r\n assertEquals(\"the current file size not correct\", file.length(), writeString.getBytes().length);\r\n filePersistence.deleteFile(VALID_FILELOCATION, FILENAME);\r\n }",
"private boolean checkDeletion(Path folder) {\n if (logger.isDebugEnabled()) {\n logger.log(Level.DEBUG, \"Checking for: \" + folder.getFileName());\n }\n\n try {\n FileTime time = Files.getLastModifiedTime(folder);\n Calendar calTime = Calendar.getInstance();\n calTime.setTimeInMillis(time.toMillis());\n calTime.add(Calendar.HOUR_OF_DAY, CLEAN_HOURS);\n\n if (calTime.getTimeInMillis() <= Calendar.getInstance().getTimeInMillis()) {\n return true;\n }\n } catch (Exception ex) {\n logger.log(Level.ERROR, \"Cannot check file\", ex);\n }\n\n return false;\n }",
"public void commit() {\n\t\ttry {\n\t\t\tTransformer transformer = TransformerFactory.newInstance().newTransformer();\n\t\t\tDOMSource domSource = new DOMSource(document);\n\t\t\tStreamResult streamResult = new StreamResult(new File(fileName));\n\t\t\ttransformer.transform(domSource, streamResult);\n\t\t\t//Reload nodes list\n\t\t\tnodes = document.getDocumentElement().getChildNodes();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"void commit(boolean isMajor);",
"public boolean isDeleteFileWhenComplete() {\r\n\t\treturn deleteFileWhenComplete;\r\n\t}",
"private static void deleteTest() throws SailException{\n\n\t\tString dir2 = \"repo-temp\";\n\t\tSail sail2 = new NativeStore(new File(dir2));\n\t\tsail2 = new IndexingSail(sail2, IndexManager.getInstance());\n\t\t\n//\t\tsail.initialize();\n\t\tsail2.initialize();\n\t\t\n//\t\tValueFactory factory = sail2.getValueFactory();\n//\t\tCloseableIteration<? extends Statement, SailException> statements = sail2\n//\t\t\t\t.getConnection().getStatements(null, null, null, false);\n\n\t\tSailConnection connection = sail2.getConnection();\n\n\t\tint cachesize = 1000;\n\t\tint cached = 0;\n\t\tlong count = 0;\n\t\tconnection.removeStatements(null, null, null, null);\n//\t\tconnection.commit();\n\t}",
"@TestFor(issues = \"TW-42737\")\n public void test_directory_remove() throws Exception {\n CommitPatchBuilder patchBuilder = myCommitSupport.getCommitPatchBuilder(myRoot);\n patchBuilder.createFile(\"dir/file\", new ByteArrayInputStream(\"content\".getBytes()));\n patchBuilder.createFile(\"dir2/file\", new ByteArrayInputStream(\"content\".getBytes()));\n patchBuilder.commit(new CommitSettingsImpl(\"user\", \"Create dir with file\"));\n patchBuilder.dispose();\n\n RepositoryStateData state1 = myGit.getCurrentState(myRoot);\n\n patchBuilder = myCommitSupport.getCommitPatchBuilder(myRoot);\n patchBuilder.deleteDirectory(\"dir\");\n patchBuilder.commit(new CommitSettingsImpl(\"user\", \"Delete dir\"));\n patchBuilder.dispose();\n\n RepositoryStateData state2 = myGit.getCurrentState(myRoot);\n\n List<ModificationData> changes = myGit.getCollectChangesPolicy().collectChanges(myRoot, state1, state2, CheckoutRules.DEFAULT);\n then(changes).hasSize(1);\n then(changes.get(0).getChanges()).extracting(\"fileName\", \"type\").containsOnly(Tuple.tuple(\"dir/file\", VcsChange.Type.REMOVED));\n }"
] | [
"0.5377575",
"0.5374879",
"0.53617215",
"0.53609097",
"0.53327113",
"0.5291388",
"0.52312416",
"0.51503015",
"0.5139182",
"0.51371944",
"0.5131613",
"0.5058936",
"0.5058736",
"0.5058736",
"0.50403917",
"0.5031166",
"0.50205934",
"0.5012844",
"0.5011731",
"0.50012255",
"0.4991442",
"0.4979646",
"0.49750847",
"0.49722838",
"0.49307948",
"0.49197677",
"0.49077886",
"0.4889663",
"0.48820093",
"0.48769313",
"0.48492512",
"0.48388696",
"0.4837667",
"0.48242572",
"0.48229852",
"0.48111475",
"0.47973353",
"0.47948968",
"0.47932255",
"0.47586048",
"0.4758252",
"0.47388208",
"0.47290424",
"0.47290424",
"0.47284245",
"0.4720769",
"0.47164816",
"0.47110635",
"0.470079",
"0.4700043",
"0.4697826",
"0.46707594",
"0.46644157",
"0.46644157",
"0.46597338",
"0.46508643",
"0.4647564",
"0.46429348",
"0.4629869",
"0.46170932",
"0.46102327",
"0.4594172",
"0.45924717",
"0.4585722",
"0.45819145",
"0.45810735",
"0.4578267",
"0.45757988",
"0.45750815",
"0.45691648",
"0.4560287",
"0.4558881",
"0.4558299",
"0.45568883",
"0.45568615",
"0.45527473",
"0.45527473",
"0.4552271",
"0.45312142",
"0.45289618",
"0.45284402",
"0.45232496",
"0.45206395",
"0.4519826",
"0.45112765",
"0.4509946",
"0.45012772",
"0.44948515",
"0.4493851",
"0.44886363",
"0.44798094",
"0.4473328",
"0.44610247",
"0.44605204",
"0.4460212",
"0.44579038",
"0.4446618",
"0.44377452",
"0.44259018",
"0.44238317"
] | 0.74154794 | 0 |
saveMemoryFile passTwo makes final pass at source, using symbol table to generate the object code | private ByteBuffer passTwo() {
// int hiAddress = ((((instructionCounter.getCurrentLocation() - 1) / SIXTEEN) + 2) * SIXTEEN) - 1;
int hiAddress = (instructionCounter.getCurrentLocation() - 1) | 0X0F;
ByteBuffer memoryImage = ByteBuffer.allocate(hiAddress + 1);
int lowestLocationSet = instructionCounter.getLowestLocationSet();
instructionCounter.reset(lowestLocationSet);
instructionCounter.setCurrentLocation(lowestLocationSet);
int currentLocation;
String instructionImage;
SourceLineParts sourceLineParts;
while (!allLineParts.isEmpty()) {
instructionImage = EMPTY_STRING;
currentLocation = instructionCounter.getCurrentLocation();
sourceLineParts = allLineParts.poll();
if (sourceLineParts.hasInstruction()) {
instructionImage = setMemoryBytesForInstruction(sourceLineParts);
} else if (sourceLineParts.hasDirective()) {
instructionImage = setMemoryBytesForDirective(sourceLineParts);
} // if
makeListing(currentLocation, instructionImage, sourceLineParts);
if (!instructionImage.equals(EMPTY_STRING)) {
buildMemoryImage(currentLocation, instructionImage, memoryImage);
} // if
} // while
tpListing.setCaretPosition(0);
makeXrefListing();
// makeMemoryFile(memoryImage);
return memoryImage;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createExecutableFile() throws IOException {\r\n //if (report.getErrorList() == null)\r\n //{\r\n System.out.println(\"Currently generating the executable file.....\");\r\n executableFile = new File(sourceName + \".lst\");\r\n // if creating the lst file is successful, then you can start to write in the lst file\r\n executableFile.delete();\r\n if (executableFile.createNewFile()) {\r\n writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(sourceName + \".asm\"), \"utf-8\")); //create an object to write into the lst file\r\n\r\n String [] hex = generate.split(\" \");\r\n\r\n for (int index = 0; index < hex.length; index++) {\r\n String hex1 = hex[index].trim();\r\n System.out.println(hex1);\r\n\r\n int i = Integer.parseInt(hex1, 16);\r\n String bin = Integer.toBinaryString(i);\r\n System.out.println(bin);\r\n\r\n writer.write(bin); // once the instruction is converted to binary it is written into the exe file\r\n }\r\n\r\n writer.close();\r\n\r\n }\r\n }",
"public void generateByteCode(Optimizer opt) {}",
"public FstoreAOInstruction(VirtualRegisterOperand source1, VirtualRegisterOperand source2,\n\t\t\tVirtualRegisterOperand dest) {\n\t\tthis.source1 = source1;\n\t\tthis.source2 = source2;\n\t\tthis.dest = dest;\n\t}",
"public static void main(String[] args) {\n String filePath=args[0];\n Parser parser = new Parser(filePath);\n Code code = new Code();\n SymbolTable symbol = new SymbolTable();\n initSymbol(filePath, parser, symbol);\n String fileOutputPath=filePath.replace(\".asm\",\".hack\");\n Parser parser1 = new Parser(filePath);\n\n try {\n BufferedWriter writer = new BufferedWriter(new FileWriter(fileOutputPath ,true));\n PrintWriter emptyFile = new PrintWriter(fileOutputPath);\n emptyFile.print(\"\");\n emptyFile.close();\n\n //count the num of var in the program\n int numVariables = 16;\n while (parser1.hasMoreCommands()) {\n parser1.advance();\n String type = parser1.commandType();\n StringBuilder binCommand=new StringBuilder();\n switch (type) {\n case \"A_COMMAND\":\n //get the symbol\n String commandSymbol= parser1.symbol();\n Integer address=0;\n if(isNumeric(commandSymbol)){\n address=Integer.parseInt(commandSymbol);\n }\n //check if the symbol don't exist in the symbol Table and add it\n else if (!symbol.contain(commandSymbol)) {\n symbol.addEntry(commandSymbol, numVariables);\n address=symbol.getAddress(commandSymbol);\n numVariables++;\n }\n //get the symbol value from the symbol table\n else if(symbol.contain((commandSymbol))){\n address=symbol.getAddress(commandSymbol);\n }\n\n binCommand.append(Integer.toBinaryString(address));\n int j=binCommand.length();\n for (int i = 0; i < 16 - j; i++) {\n binCommand.insert(0, \"0\");\n }\n writer.append(binCommand.toString());\n writer.append('\\n');\n binCommand.setLength(0);\n break;\n case \"C_COMMAND\":\n //write the c command\n binCommand.append(\"111\");\n binCommand.append(code.comp(parser1.comp()));\n binCommand.append(code.dest(parser1.dest()));\n binCommand.append(code.jump(parser1.jump()));\n writer.append(binCommand.toString());\n writer.append('\\n');\n binCommand.setLength(0);\n break;\n }\n }\n\n writer.close();\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n }",
"private Saver(File twoStageSaveFile) throws IOException\n\t\t{\n\t\t\tsuper(new OutputStreamWriter(\n\t\t\t\tnew FileOutputStream(twoStageSaveFile)\n\t\t\t\t, encoding));\n\t\t\tthis.twoStageSaveFile = twoStageSaveFile;\n\t\t}",
"@Override\n public void saveSymbol(SecuritySymbols symbol) {\n\n }",
"@Override\r\n\tpublic void translateToAsm(PrintWriter writer, Memory stack) {\n\t\t\r\n\t}",
"@Override\n public String visit(AStoreStmt n) {\n String r1 = this.reg[n.f2.f0.which];\n int offset = Integer.parseInt(n.f1.f1.f0.tokenImage);\n Global.outputString += \"sw $\" + r1 + \", -\" + ((offset + 3) * 4)\n + \"($fp)\\n\";\n return null;\n }",
"private void saveMemory() {\n try {\n File varTmpDir = new File(\"data/\" + brainLocation + \".ser\");\n if (!varTmpDir.exists()) {\n varTmpDir.createNewFile();\n }\n FileOutputStream fileOut = new FileOutputStream(varTmpDir);\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(longTermMemory);\n out.close();\n fileOut.close();\n System.out.println(\"SAVED LONG TERM MEMORIES IN \" + brainLocation);\n } catch (IOException i) {\n i.printStackTrace();\n }\n }",
"private static void spaceSaver(FileWriter output) throws IOException {\n\t\tint totalFrequency = 0;\n\t\tint modifiedCode = 0;\n\t\t\n\t\tfor(int i = 0; i < resultIndex; i++) {\n\t\t\tmodifiedCode += (((String) results[i][1]).length()) * (Integer)(results[i][2]);\n\t\t\ttotalFrequency += (Integer)results[i][2];\n\t\t}\n\t\t\n\t\tint saved = (totalFrequency * 8) - modifiedCode;\n\t\toutput.write(\"Space Saved: \" + saved + \"bits\");\n\t}",
"private static void writeMemToFile(String outFile, String fileSource){\n\n\t\tFileInputStream instream = null;\n\t\tFileOutputStream outstream = null;\n\n\t\ttry{\n\t\t\tFile infile =new File(fileSource);\n\t\t\tFile outfile =new File(outFile);\n\t\t\tMessageDigest digest = MessageDigest.getInstance(\"SHA-256\");\n\n\t\t\tinstream = new FileInputStream(infile);\n\t\t\toutstream = new FileOutputStream(outfile);\n\n\t\t\tbyte[] buffer = new byte[1024];\n\n\t\t\tint length;\n\t\t\n\t\t\twhile ((length = instream.read(buffer)) > 0){\n\t\t\t\toutstream.write(buffer, 0, length);\n\t\t\t\tdigest.update(buffer, 0, length);\n\t\t\t}\n\n\t\t\tbyte[] hashedBytes = digest.digest();\n\t\t\toutstream.write(hashedBytes, 0, hashedBytes.length);\n\n\t\t\t//Closing the input/output file streams\n\t\t\tinstream.close();\n\t\t\toutstream.close();\n\n\t\t}catch(NoSuchAlgorithmException | IOException e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}",
"public static void main(String[] args)\r\n\t{\r\n\t\t\r\n\t\tString path = System.getProperty(\"user.dir\") + \"\\\\TestFiles\" ;\r\n//\t\tString pathOut = System.getProperty(\"user.dir\") + \"\\\\TestFilesOut\" ;\t\r\n\t\t\r\n\t\tFile folder = new File( path ) ;\r\n\t\tFile[] listOfFiles = folder.listFiles() ;\r\n\t\t\r\n\t\tfor (int i = 0; i < listOfFiles.length; i++)\r\n\t\t{\r\n\t\t\t//System.out.printf(\"%-2s %s%n\",i ,listOfFiles[i].getName()) ;\r\n\t\t\tString nameIn = null , nameOut = null ;\r\n\t\t\tPrintWriter outputFile = null ; // keep compiler happy\r\n\t\t\tSymbolTable symbolTable ;\r\n\t\t\t\r\n\t\t\tnameIn = listOfFiles[i].getPath() ;\r\n\t\t\t\r\n\t\t\tif (nameIn.substring(nameIn.indexOf(\".\") + 1).equals(\"asm\"))\r\n\t\t\t{//System.out.printf(\"%s %n %s%n\",listOfFiles[i].getName(), nameOut) ;\r\n\t\t\t\t\r\n\t\t\t\tnameOut = listOfFiles[i].getName() ;\r\n\t\t\t\tnameOut = nameOut.substring(0, nameOut.lastIndexOf('.')) + \"0\" ;\r\n\t\t\t\tnameOut = path + \"\\\\\" + nameOut + \".hack\" ;\t\r\n\t\t\t\t\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\toutputFile = new PrintWriter(new FileOutputStream(nameOut)) ;\r\n\t\t\t\t}\r\n\t\t\t\tcatch (FileNotFoundException ex)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.err.println(\"Could not open output file \" + nameOut) ;\r\n\t\t\t\t\tSystem.err.println(\"Run program again, make sure you have write permissions, etc.\") ;\r\n\t\t\t\t\tSystem.exit(0) ;\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// TODO: finish driver as algorithm describes\r\n\t\t\r\n\t\t\t\tsymbolTable = new SymbolTable() ;\r\n\t\t\t\tfirstPass(nameIn, symbolTable) ;\t\t\r\n\t\t\t\tsecondPass(nameIn, symbolTable, outputFile) ;\t\t\t\t\r\n\t\t\t\toutputFile.close() ;\t\t\r\n\t\t\t\tSystem.out.println(listOfFiles[i].getName() + \" Done successfully!\") ;\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"public abstract void buildEndSource(OutputStream out, SourceObjectDeclared o) throws IOException;",
"@Test(timeout = 4000)\n public void test083() throws Throwable {\n Label label0 = new Label();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"oc[MfnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2450));\n classWriter0.newInteger((-2450));\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n classWriter0.newConst(\"Code\");\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"Fj)3/|(;sZXz$\";\n stringArray0[1] = \"Code\";\n stringArray0[2] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[3] = \"~)yCTRxQ#s$y[Ly%\";\n stringArray0[4] = \"Fj)3/|(;sZXz$\";\n stringArray0[5] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[6] = \"Code\";\n stringArray0[7] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[8] = \"Code\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 3, \"\\\".3t\\\"0\", \"~)yCTRxQ#s$y[Ly%\", \"\\\".3t\\\"0\", stringArray0, true, false);\n Label label1 = new Label();\n byte[] byteArray0 = new byte[0];\n label1.resolve(methodWriter0, 168, byteArray0);\n classWriter0.newNameTypeItem(\"Code\", \"Fj)3/|(;sZXz$\");\n Label label2 = new Label();\n methodWriter0.visitFieldInsn(3, \"oc[MfnZM[~MHOK iO\", \"oc[MfnZM[~MHOK iO\", \"*/TEiGBLds&\");\n methodWriter0.visitLdcInsn(\"java/lang/dyn/Dynamic\");\n }",
"void saveSimpleCodesToFile() {\n\t\tPrintWriter writer;\r\n\t\ttry {\r\n\t\t\t//writer = new PrintWriter(pathStr + \"/../pt.iscte.pidesco.codegenerator/Settings/Code.cg\", \"UTF-8\");\r\n\t\t\twriter = new PrintWriter(\"Code.cg\", \"UTF-8\");\r\n\t\t\tfor (SimpleCode sc : SimpleCodeMap.values()) {\r\n\t\t\t\twriter.print(sc.getCodeName() + \"-CGSeparator-\" + sc.resultCodeToWrite());\r\n\t\t\t\twriter.print(\"-CGCodeSeparator-\");\r\n\t\t\t}\r\n\t\t\twriter.close();\r\n\t\t} catch (FileNotFoundException | UnsupportedEncodingException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"static void shld_to_mem(String passed){\n\t\tint memo_address = hexa_to_deci(passed.substring(5));\n\t\tmemory.put(memo_address, registers.get('L'));\n\t\tmemo_address++;\n\t\tmemory.put(memo_address, registers.get('H'));\n\t}",
"@Override\n public String visit(HStoreStmt n) {\n String _ret = null;\n String r1 = this.reg[n.f1.f0.which];\n String offset = n.f2.f0.tokenImage;\n String r2 = this.reg[n.f3.f0.which];\n Global.outputString += \"sw $\" + r2 + \", \" + offset + \"($\" + r1 + \")\\n\";\n return _ret;\n }",
"public byte[] emit(Model tempModel, boolean toWorkingMemory, boolean toFile) \n {\n return new byte[0]; \n }",
"public void LoadHexFile(String filename) throws RuntimeException\n {\n int memPtr = 0;\n Yytoken current_token;\n boolean moreLines = true;\n\n int startingAddress;\n String recordType;\n int valueForMemory;\n\n File theFile = new File(filename);\n if (!theFile.exists())\n throw new RuntimeException(Constants.Error(Constants.FILE_NOT_FOUND) + \" \" + filename);\n try\n {\n //Create token stream from input hex-format file\n FileInputStream is = new FileInputStream(theFile);\n Yylex yy = new Yylex(is); //instantiate lexer object\n current_token = yy.yylex(); //advance first token\n while (moreLines)\n {\n if (memPtr >= PROGRAM_MEMORY_SIZE)\n throw new RuntimeException(Constants.Error(Constants.OUT_OF_MEMORY));\n\n if(current_token.m_index == 0)\n {\n //end of file\n moreLines = false;\n }\n else if(current_token.m_index == 1)\n {\n //get starting address\n startingAddress = Integer.parseInt(current_token.m_text);\n current_token = yy.yylex(); //advance lexer\n //get record type information\n if(current_token.m_index != 2)\n {\n //file semantics incorrect (contract breached by assembler)\n throw new RuntimeException(Constants.Error(Constants.INVALID_HEXFILE));\n }\n recordType = current_token.m_text;\n current_token = yy.yylex(); //advance lexer\n\n //depending upon the record type, select record location\n if(recordType.equalsIgnoreCase(\"data record\"))\n {\n //data record: most of the action happens here\n //set memory pointer to startingAddress\n memPtr = startingAddress;\n\n // Load in the current instruction\n valueForMemory = Integer.parseInt(current_token.m_text,16);\n // Swap the nibbles\n valueForMemory = ((valueForMemory & 0xff) << 8) + ((valueForMemory & 0xff00) >> 8);\n this.setProgramMemory(memPtr++,valueForMemory);\n\n current_token = yy.yylex();\n\n //get record and then load record into memory\n while(current_token.m_index == 3)\n {\n //ASSERTION: data records are two bytes long\n //load record into memory\n valueForMemory = Integer.parseInt(current_token.m_text,16);\n // Swap the nibbles\n valueForMemory = ((valueForMemory & 0xff) << 8) + ((valueForMemory & 0xff00) >> 8);\n this.setProgramMemory(memPtr++,valueForMemory);\n current_token = yy.yylex(); //advance lexer\n }\n\n }\n else if(recordType.equalsIgnoreCase(\"end of file record\"))\n {\n //acknowledged end of file approaching\n current_token = yy.yylex(); //advance lexer\n }\n else if(recordType.equalsIgnoreCase(\"extendedSAR\"))\n {\n //extended segment address record\n //limited use in AVR\n current_token = yy.yylex(); //advance lexer\n }\n else if(recordType.equalsIgnoreCase(\"startSAR\"))\n {\n //start of segment address record\n //limited use in AVR\n current_token = yy.yylex(); //advance lexer\n }\n else if(recordType.equalsIgnoreCase(\"extendedLAR\"))\n {\n //extended linear address record\n //use unknown as yet...\n current_token = yy.yylex(); //advance lexer\n }\n else if(recordType.equalsIgnoreCase(\"startLAR\"))\n {\n //start of linear address record\n //use unknown as yet...\n current_token = yy.yylex(); //advance lexer\n }\n }\n else\n {\n //file semantics incorrect (contract breached by assembler)\n throw new RuntimeException(Constants.Error(Constants.INVALID_HEXFILE));\n }\n } // while more lines\n is.close();\n } // try block\n catch (IOException e)\n {\n throw new RuntimeException(Constants.Error(Constants.INVALID_HEXFILE));\n }\n catch (ArrayIndexOutOfBoundsException e)\n {\n //Something VERY BAD happened in the lexer:\n //failed to recognise data in file.\n throw new RuntimeException(Constants.Error(Constants.INVALID_HEXFILE));\n }\n return;\n }",
"public void save(int[][] matrix2) {\n\n\t\ttry (PrintWriter pw = new PrintWriter(REGISTER_FILE)) {\n\n\t\t\tpw.println(matrix2.length);\n\t\t\tpw.println(matrix2[0].length);\n\t\t\tfor (int row = 0; row < matrix2.length; row++) {\n\t\t\t\tfor (int column = 0; column < matrix2[0].length; column++) {\n\t\t\t\t\tint p = matrix2[row][column];\n\t\t\t\t\tpw.println(p);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.printf(\"File no exist\");\n\t\t}\n\t}",
"@Test(timeout = 4000)\n public void test099() throws Throwable {\n Label label0 = new Label();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"e5AO^\");\n ClassWriter classWriter0 = new ClassWriter((-2463));\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"e5AO^\");\n classWriter0.newConst(\"Cpd7(e\");\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"Fj)3/|(;sZXz$\";\n stringArray0[1] = \"e5AO^\";\n stringArray0[2] = \"e5AO^\";\n stringArray0[3] = \"~)yCTRxQ#s$y[Ly%\";\n stringArray0[4] = \"Fj)3/|(;sZXz$\";\n stringArray0[5] = \"e5AO^\";\n stringArray0[6] = \"Cpd7(e\";\n stringArray0[7] = \"Cpd7(e\";\n stringArray0[8] = \"Cpd7(e\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"e5AO^\", \"~)yCTRxQ#s$y[Ly%\", \"e5AO^\", stringArray0, false, false);\n methodWriter0.visitJumpInsn(1, label0);\n classWriter0.newNameTypeItem(\"Cpd7(e\", \"Cpd7(e\");\n label0.successor = label0;\n Label label1 = new Label();\n methodWriter0.visitJumpInsn(1, label0);\n methodWriter0.visitJumpInsn(2, label0.successor);\n methodWriter0.visitInsn(1);\n classWriter0.index = 2330;\n methodWriter0.visitLdcInsn(\"e5AO^\");\n methodWriter0.visitFrame(3, 268435455, stringArray0, 3239, stringArray0);\n methodWriter0.visitTypeInsn(2330, \"~hm$aI6.7xL0\");\n int int0 = methodWriter0.getSize();\n assertEquals(85, int0);\n }",
"public void dump_programmemory(String filename)\n {\n Utils.dump(program_memory, filename, PROGRAM_MEMORY_SIZE);\n }",
"public void saveBeforeCompile() { }",
"public void saveBeforeCompile() { }",
"public void saveMap() {\n this.scanMap();\n String userHome = System.getProperty(\"user.home\");\n BinaryExporter export = BinaryExporter.getInstance();\n File file = new File(userHome + \"world.j3o\");\n try {\n export.save(this.testNode, file); \n } catch (IOException ex) {\n Logger.getLogger(mapDevAppState_2.class.getName()).log(Level.SEVERE, \"File write error\");\n }\n }",
"public static void store() {\r\n//\t\tSystem.out.println(\"mar\"+readMAR().getStr());\r\n\t\tString mar = new String(readMAR().getStr());\r\n\t\tTraceINF.write(\"Write memory \"+mar);\r\n\t\tFormatstr content = new Formatstr();\r\n\t\t\r\n\t\tcontent = readMBR();\r\n\t\tgetBank(mar)[Integer.parseInt(mar.substring(0, mar.length() - 2), 2)] = content.getStr();\r\n\t\tTraceINF.write(\"Write finished.\");\r\n\t}",
"@Test(timeout = 4000)\n public void test088() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1983180321));\n byte[] byteArray0 = new byte[6];\n byteArray0[1] = (byte) (-8);\n byteArray0[2] = (byte)111;\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n byteArray0[3] = (byte)111;\n byteArray0[4] = (byte)114;\n byteArray0[5] = (byte) (-85);\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n String[] stringArray0 = new String[4];\n stringArray0[0] = \"\";\n stringArray0[1] = \"\";\n stringArray0[2] = \"\";\n stringArray0[3] = \"\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-1983180321), \"\", \"<T'RwU+).UKJX>\", \"\", stringArray0, true, false);\n methodWriter0.visitMethodInsn(183, \"\", \"\", \"<T'RwU+).UKJX>\");\n methodWriter0.visitTypeInsn((byte)0, \"HC\");\n }",
"static void stax_to_mem(String passed){\n\t\tmemory.put(hexa_to_deci(registers.get('H')+registers.get('L')),registers.get('A'));\n\t}",
"public void generateDirty(PhpWriter out)\n throws IOException\n {\n ExprGenerator objGen = ((ExprPro) _objExpr).getGenerator();\n\n objGen.generateObject(out);\n out.print(\".getField(env, \");\n out.printIntern(_name);\n out.print(\")\"); // php/3228 create the field if necessary\n }",
"public void tempSaveToFile() {\n try {\n ObjectOutputStream outputStream = new ObjectOutputStream(\n this.openFileOutput(MenuActivity2048.TEMP_SAVE_FILENAME, MODE_PRIVATE));\n outputStream.writeObject(boardManager);\n outputStream.close();\n } catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }",
"private void genSaveMapCode(String name, String keyClassSimpleName, String valueClassSimpleName, boolean elementIsPersistable) {\n\n int tabLevel = 1;\n String tabs = tabs(tabLevel);\n\n String itVarName = \"i\" + \"_\" + name;\n String vVarName = \"v\" + \"_\" + name;\n\n String keyCppType = cppType(keyClassSimpleName);\n String valueCppType = cppType(valueClassSimpleName);\n\n String mapType = \"std::map< \" + keyCppType + \", \" + valueCppType + \" >\";\n\n save.println(\"\\t// \" + mapType + \" \" + name);\n genDebug(save, \"\\tstd::cout << \\\"save \" + mapType + \" \" + name + \"\\\" << std::endl;\");\n\n // initialize local variable that points to the member map\n save.println(tabs + mapType + \"& \" + vVarName + \" = this->\" + name + \";\");\n\n // number of elements in the map\n save.println(tabs + \"int \" + vVarName + \"_length = \" + vVarName + \".size();\");\n\n save.println();\n save.println(tabs + OUTSTREAM_VAR_NAME + \".writeInt( \" + vVarName + \"_length );\");\n\n genDebugDumpValue(save, vVarName + \"_length\", tabs);\n\n // loop through the elements and save each one\n save.println();\n save.println(tabs + mapType + \"::iterator \" + itVarName + \";\");\n save.println(tabs + \"for( \" + itVarName + \" = \" + vVarName + \".begin(); \" + itVarName + \" != \" + vVarName + \".end(); ++\"\n + itVarName + \" ){\");\n\n tabs = tabs(++tabLevel);\n\n // save the key\n String keyVarName = vVarName + \"_key\";\n save.println(tabs + keyCppType + \" \" + keyVarName + \" = \" + itVarName + \"->first;\");\n save.println(tabs + genWriteCode(keyVarName, keyCppType));\n\n // save the value\n String valueVarName = vVarName + \"_value\";\n save.println(tabs + valueCppType + \" \" + valueVarName + \" = \" + itVarName + \"->second;\");\n\n if (elementIsPersistable) {\n save.println(tabs + valueVarName + \".save( \" + OUTSTREAM_VAR_NAME + \" );\");\n } else {\n save.println(tabs + genWriteCode(valueVarName, valueCppType));\n }\n\n tabs = tabs(--tabLevel);\n save.println(tabs + \"}\");\n }",
"public void writeToParcel(android.os.Parcel r1, int r2) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00f2 in method: android.location.GpsClock.writeToParcel(android.os.Parcel, int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.writeToParcel(android.os.Parcel, int):void\");\n }",
"public String saveProductionBlock(ProductionBlock pb);",
"public Codegen() {\n assembler = new LinkedList<LlvmInstruction>();\n symTab = new SymTab();\n }",
"public SaveSTF(STFFile file, File output, FileType type) {\n\t\tfile_ = file;\n\t\toutput_ = output;\n\t\ttype_ = type;\n\t}",
"public void loadMemory() {\n Converter c = new Converter(); //object to help with binary to decimal conversions and vice-versa\n \n int midpoint = (int) Math.floor(size/2); //divide memory into two haves\n \n //variables that will be needed\n int opcode;\n int address = midpoint;\n int index=0;\n\n //Initial instructions\n opcode = c.convertDecToBin(3); //0011\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //load AC from stdin\n Memory.memloc.set(index, instruction); //saving instruction to memory\n\n opcode = c.convertDecToBin(7); //0111;\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //store AC to stdout\n Memory.memloc.set(index+1, instruction);\n\n opcode = c.convertDecToBin(2); //0010\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //store AC to memory\n Memory.memloc.set(index+2, instruction); //saving instruction to memory\n\n opcode = c.convertDecToBin(3); //0011\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //load AC from stdin\n Memory.memloc.set(index+3, instruction); //saving instruction to memory\n\n opcode = c.convertDecToBin(2); //0010\n instruction = new Instruction(opcode, c.convertDecToBin(address+1)); //store AC to memory\n Memory.memloc.set(index+4, instruction); //saving instruction to memory\n\n\n //The rest of the instructions\n for (int i = 5; i < midpoint; i = i + 6) {\n index = i;\n\n if ((index + 5) < midpoint-1) { //if index + 5 is not greater than the midpoint-1\n\n opcode = c.convertDecToBin(1); //0001\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //load AC from memory\n Memory.memloc.set(index, instruction); //saving instruction to memory\n \n opcode = c.convertDecToBin(5); //0101;\n address++;\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //add to AC from memory\n Memory.memloc.set(index + 1, instruction);\n\n opcode = c.convertDecToBin(7); //0111;\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //store AC to stdout\n Memory.memloc.set(index + 2, instruction);\n\n opcode = c.convertDecToBin(2); //0010;\n address++;\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //store AC to memory\n Memory.memloc.set(index + 3, instruction);\n\n opcode = c.convertDecToBin(4); //0100;\n address--;\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //subtract from AC from memory\n Memory.memloc.set(index + 4, instruction);\n\n opcode = c.convertDecToBin(2); //0010;\n address = address + 2;\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //store AC to memory\n Memory.memloc.set(index + 5, instruction);\n\n address--;\n } \n }\n\n //Loading the final intsruction in memory\n opcode = c.convertDecToBin(15); //1111;\n address++;\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //halt\n Memory.memloc.set(index++, instruction);\n\n\n }",
"private void dumpClassBytesToFile ()\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int lastSlash =\n\t\t\t\tclassInternalName.lastIndexOf('/');\n\t\t\tfinal String pkg =\n\t\t\t\tclassInternalName.substring(0, lastSlash);\n\t\t\tfinal Path tempDir = Paths.get(\"debug\", \"jvm\");\n\t\t\tfinal Path dir = tempDir.resolve(Paths.get(pkg));\n\t\t\tFiles.createDirectories(dir);\n\t\t\tfinal String base = classInternalName.substring(lastSlash + 1);\n\t\t\tfinal Path classFile = dir.resolve(base + \".class\");\n\t\t\tFiles.write(classFile, stripNull(classBytes));\n\t\t}\n\t\tcatch (final IOException e)\n\t\t{\n\t\t\tInterpreter.log(\n\t\t\t\tInterpreter.loggerDebugJVM,\n\t\t\t\tLevel.WARNING,\n\t\t\t\t\"unable to write class bytes for generated class {0}\",\n\t\t\t\tclassInternalName);\n\t\t}\n\t}",
"@Test(timeout = 4000)\n public void test101() throws Throwable {\n Label label0 = new Label();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"oc[MfnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2463));\n classWriter0.newInteger((-2463));\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"Fj)3/|(;sZXz$\";\n stringArray0[1] = \"double\";\n stringArray0[2] = \"\\\".3t\\\"0\";\n stringArray0[3] = \"~)yCTRxQ#s$y[Ly%\";\n stringArray0[4] = \"Fj)3/|(;sZXz$\";\n stringArray0[5] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[6] = \"Cpd7(e\";\n stringArray0[7] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[8] = \"Cpd7(e\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"\\\".3t\\\"0\", \"~)yCTRxQ#s$y[Ly%\", \"double\", stringArray0, true, false);\n methodWriter0.visitJumpInsn(1, label0);\n classWriter0.newFieldItem(\"oc[MfnZM[~MHOK iO\", \"~hmio$aI6.7xL0\", \"~hmio$aI6.7xL0\");\n label0.successor = label0;\n Label label1 = new Label();\n methodWriter0.visitJumpInsn(1, label0);\n methodWriter0.visitMaxs(2708, (-1036));\n methodWriter0.visitFieldInsn(1, \"oc[MfnZM[~MHOK iO\", \"JSR/RET ar not supported with computeFrames option\", \"JSR/RET ar not supported with computeFrames option\");\n methodWriter0.visitJumpInsn(2, label0.successor);\n methodWriter0.getSize();\n // Undeclared exception!\n try { \n methodWriter0.visitInsn((-2486));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -2486\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test036() throws Throwable {\n Label label0 = new Label();\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"oc[MfnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2450));\n classWriter0.newInteger((-2450));\n classWriter0.thisName = \"p@7pE4I\";\n String[] stringArray0 = new String[0];\n classWriter0.visitInnerClass((String) null, \"p@7pE4I\", (String) null, 2257);\n ByteVector byteVector0 = new ByteVector(1);\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2217), \"p@7pE4I\", \"TET-!0-b\", (String) null, stringArray0, false, false);\n Label[] labelArray0 = new Label[4];\n label0.frame = null;\n labelArray0[0] = label0;\n labelArray0[1] = label0;\n labelArray0[2] = label0;\n labelArray0[3] = label0;\n methodWriter0.visitTableSwitchInsn(1, 512, label0, labelArray0);\n methodWriter0.put(byteVector0);\n methodWriter0.visitJumpInsn(183, label0);\n methodWriter0.visitFieldInsn(959, \"TET-!0-b\", \"),-a}=[<X(poa~{!\", \"TET-!0-b\");\n }",
"public void saveData(){\r\n file.executeAction(modelStore);\r\n }",
"@Test(timeout = 4000)\n public void test106() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-2458));\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2458), \"9~\\\"GM0+ ?&-(JmN[0f.\", \"Fj)3/|(;sZXz$\", \"oc[MfnZM[~MHOK iO\", (String[]) null, true, false);\n Item[] itemArray0 = new Item[3];\n ClassWriter classWriter1 = new ClassWriter(2082);\n Item item0 = classWriter0.key;\n itemArray0[0] = item0;\n Item item1 = classWriter1.newDouble((-1878.8802));\n itemArray0[1] = item1;\n Item item2 = classWriter1.key3;\n itemArray0[2] = item2;\n methodWriter0.visitFrame((-631), (-1299), (Object[]) null, (-2458), (Object[]) null);\n int int0 = MethodWriter.SAME_LOCALS_1_STACK_ITEM_FRAME;\n methodWriter0.visitTypeInsn((-1299), \"9~\\\"GM0+ ?&-(JmN[0f.\");\n Label label0 = new Label();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"9~\\\"GM0+ ?&-(JmN[0f.\");\n methodWriter0.visitMultiANewArrayInsn(\"Fj)3/|(;sZXz$\", (-1299));\n methodWriter0.visitMethodInsn(188, \"Fj)3/|(;sZXz$\", \".class\", \"Fj)3/|(;sZXz$\");\n methodWriter0.visitJumpInsn(64, label0);\n methodWriter0.visitFrame(63, (-3532), (Object[]) null, (-1483625616), (Object[]) null);\n methodWriter0.visitMaxs((-1483625616), 1);\n methodWriter0.visitVarInsn(57, (-1299));\n }",
"public void codeGen(PrintWriter p){\n\tthis.dotRightOffset = unrollDot();\n\n\tCodegen.p = p;\n\tCodegen.generateIndexed(\"lw\", \"$t0\", \"$fp\", this.dotRightOffset, \"load struct field: \" + myId.name());\n\tCodegen.genPush(\"$t0\");\n }",
"@Test(timeout = 4000)\n public void test071() throws Throwable {\n Label label0 = new Label();\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"oc[MfnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2450));\n classWriter0.newInteger((-2450));\n classWriter0.thisName = \"p@7pE4I\";\n String[] stringArray0 = new String[0];\n classWriter0.visitInnerClass((String) null, \"p@7pE4I\", (String) null, 2257);\n ByteVector byteVector0 = new ByteVector(1);\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2217), \"p@7pE4I\", \"TET-!0-b\", (String) null, stringArray0, false, false);\n Label[] labelArray0 = new Label[4];\n labelArray0[0] = label0;\n label0.status = (-1274);\n labelArray0[1] = label0;\n labelArray0[2] = label0;\n labelArray0[3] = label0;\n methodWriter0.visitTableSwitchInsn(1, (-2450), label0, labelArray0);\n methodWriter0.put(byteVector0);\n methodWriter0.visitJumpInsn(183, label0);\n methodWriter0.visitFieldInsn(959, \"TET-!0-b\", \"),-a}=[<X(poa~{!\", \"TET-!0-b\");\n methodWriter0.visitTryCatchBlock(label0, label0, label0, \"p@7pE4I\");\n int[] intArray0 = new int[6];\n intArray0[0] = (-2450);\n intArray0[1] = 959;\n intArray0[2] = (-484);\n intArray0[3] = (-1274);\n intArray0[4] = 183;\n intArray0[5] = (-1274);\n MethodWriter.getNewOffset(intArray0, intArray0, label0);\n assertArrayEquals(new int[] {(-2450), 959, (-484), (-1274), 183, (-1274)}, intArray0);\n }",
"void saveGameState(File saveName);",
"public void saveGame(String fileName){\n try {\n File file1 = new File(fileName);\n FileOutputStream fileOutputStream = new FileOutputStream(file1);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n objectOutputStream.writeObject(this);\n }catch (Exception e){\n System.err.println(\"Error when saving file\");\n }\n }",
"public void run(Hashtable<String, Object> hashTable) throws java.lang.Exception {\r\n\tVCDocument documentToExport = (VCDocument)hashTable.get(\"documentToExport\");\r\n\tFile exportFile = fetch(hashTable,EXPORT_FILE,File.class, true);\r\n\tExtensionFilter fileFilter = fetch(hashTable,FILE_FILTER,ExtensionFilter.class, true);\r\n\t\r\n\tDocumentManager documentManager = fetch(hashTable,DocumentManager.IDENT,DocumentManager.class,true);\r\n\tString resultString = null;\r\n\tFileCloseHelper closeThis = null;\r\n\ttry{\r\n\t\tif (documentToExport instanceof BioModel) {\r\n\t\t\tif(!(fileFilter instanceof SelectorExtensionFilter)){\r\n\t\t\t\tthrow new Exception(\"Expecting fileFilter type \"+SelectorExtensionFilter.class.getName()+\" but got \"+fileFilter.getClass().getName());\r\n\t\t\t}\r\n\t\t\tBioModel bioModel = (BioModel)documentToExport;\r\n\t\t\tSimulationContext chosenSimContext = fetch(hashTable,SIM_CONTEXT,SimulationContext.class, false);\r\n\t\t\t((SelectorExtensionFilter)fileFilter).writeBioModel(documentManager, bioModel, exportFile, chosenSimContext); \r\n\t/*\t\tDELETE this after finishing validation testing\r\n\t\t\t\r\n\t\t\t// check format requested\r\n\t\t\tif (fileFilter.getDescription().equals(FileFilters.FILE_FILTER_MATLABV6.getDescription())){\r\n\t\t\t\t// matlab from application; get application\r\n\t\t\r\n\t\t\t\tSimulationContext chosenSimContext = fetch(hashTable,SIM_CONTEXT,SimulationContext.class, true);\r\n\t\t\t\t// regenerate a fresh MathDescription\r\n\t\t\t\tMathMapping mathMapping = chosenSimContext.createNewMathMapping();\r\n\t\t\t\tMathDescription mathDesc = mathMapping.getMathDescription();\r\n\t\t\t\tif(mathDesc != null && !mathDesc.isSpatial() && !mathDesc.isNonSpatialStoch()){\r\n\t\t\t\t\t// do export\r\n\t\t\t\t\tresultString = exportMatlab(exportFile, fileFilter, mathDesc);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Exception(\"Matlab export failed: NOT an non-spatial deterministic application!\");\r\n\t\t\t\t}\r\n\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_PDF)) { \r\n\t\t\t\tFileOutputStream fos = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(exportFile);\r\n\t\t\t\t\tdocumentManager.generatePDF(bioModel, fos);\t\t\t\t\r\n\t\t\t\t} finally {\r\n\t\t\t\t\tif(fos != null) {\r\n\t\t\t\t\t\tfos.close();\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn; \t\t\t\t\t\t\t\t\t//will take care of writing to the file as well.\r\n\t\t\t}\r\n\t\t\t//Export a simulation to Smoldyn input file, if there are parameter scans\r\n\t\t\t//in simulation, we'll export multiple Smoldyn input files.\r\n\t\t\telse if (fileFilter.equals(FileFilters.FILE_FILTER_SMOLDYN_INPUT)) \r\n\t\t\t{ \r\n\t\t\t\tSimulation selectedSim = (Simulation)hashTable.get(\"selectedSimulation\");\r\n\t\t\t\tif (selectedSim != null) {\r\n\t\t\t\t\tint scanCount = selectedSim.getScanCount();\r\n\t\t\t\t\tif(scanCount > 1) // has parameter scan\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString baseExportFileName = exportFile.getPath().substring(0, exportFile.getPath().indexOf(\".\"));\r\n\t\t\t\t\t\tfor(int i=0; i<scanCount; i++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSimulationTask simTask = new SimulationTask(new SimulationJob(selectedSim, i, null),0);\r\n\t\t\t\t\t\t\t// Need to export each parameter scan into a separate file\r\n\t\t\t\t\t\t\tString newExportFileName = baseExportFileName + \"_\" + i + SMOLDYN_INPUT_FILE_EXTENSION;\r\n\t\t\t\t\t\t\texportFile = new File(newExportFileName);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tPrintWriter pw = new PrintWriter(exportFile);\r\n\t\t\t\t\t\t\tSmoldynFileWriter smf = new SmoldynFileWriter(pw, true, null, simTask, false);\r\n\t\t\t\t\t\t\tsmf.write();\r\n\t\t\t\t\t\t\tpw.close();\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(scanCount == 1)// regular simulation, no parameter scan\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSimulationTask simTask = new SimulationTask(new SimulationJob(selectedSim, 0, null),0);\r\n\t\t\t\t\t\t// export the simulation to the selected file\r\n\t\t\t\t\t\tPrintWriter pw = new PrintWriter(exportFile);\r\n\t\t\t\t\t\tSmoldynFileWriter smf = new SmoldynFileWriter(pw, true, null, simTask, false);\r\n\t\t\t\t\t\tsmf.write();\r\n\t\t\t\t\t\tpw.close();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tthrow new Exception(\"Simulation scan count is smaller than 1.\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t// convert it if other format\r\n\t\t\t\tif (!fileFilter.equals(FileFilters.FILE_FILTER_VCML)) {\r\n\t\t\t\t\t// SBML or CellML; get application name\r\n\t\t\t\t\tif ((fileFilter.equals(FileFilters.FILE_FILTER_SBML_12)) || (fileFilter.equals(FileFilters.FILE_FILTER_SBML_21)) || \r\n\t\t\t\t\t\t(fileFilter.equals(FileFilters.FILE_FILTER_SBML_22)) || (fileFilter.equals(FileFilters.FILE_FILTER_SBML_23)) || \r\n\t\t\t\t\t\t(fileFilter.equals(FileFilters.FILE_FILTER_SBML_24)) || (fileFilter.equals(FileFilters.FILE_FILTER_SBML_31_CORE)) || \r\n\t\t\t\t\t\t(fileFilter.equals(FileFilters.FILE_FILTER_SBML_31_SPATIAL)) ) {\r\n\t\t\t\t\t\tSimulationContext selectedSimContext = (SimulationContext)hashTable.get(\"selectedSimContext\");\r\n\t\t\t\t\t\tSimulation selectedSim = (Simulation)hashTable.get(\"selectedSimulation\");\r\n\t\t\t\t\t\tint sbmlLevel = 0;\r\n\t\t\t\t\t\tint sbmlVersion = 0;\r\n\t\t\t\t\t\tint sbmlPkgVersion = 0;\r\n\t\t\t\t\t\tboolean bIsSpatial = false;\r\n\t\t\t\t\t\tif ((fileFilter.equals(FileFilters.FILE_FILTER_SBML_12))) {\r\n\t\t\t\t\t\t\tsbmlLevel = 1;\r\n\t\t\t\t\t\t\tsbmlVersion = 2;\r\n\t\t\t\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_SBML_21)) {\r\n\t\t\t\t\t\t\tsbmlLevel = 2;\r\n\t\t\t\t\t\t\tsbmlVersion = 1;\r\n\t\t\t\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_SBML_22)) {\r\n\t\t\t\t\t\t\tsbmlLevel = 2;\r\n\t\t\t\t\t\t\tsbmlVersion = 2;\r\n\t\t\t\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_SBML_23)) {\r\n\t\t\t\t\t\t\tsbmlLevel = 2;\r\n\t\t\t\t\t\t\tsbmlVersion = 3;\r\n\t\t\t\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_SBML_24)) {\r\n\t\t\t\t\t\t\tsbmlLevel = 2;\r\n\t\t\t\t\t\t\tsbmlVersion = 4;\r\n\t\t\t\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_SBML_31_CORE)) {\r\n\t\t\t\t\t\t\tsbmlLevel = 3;\r\n\t\t\t\t\t\t\tsbmlVersion = 1;\r\n\t\t\t\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_SBML_31_SPATIAL)) {\r\n\t\t\t\t\t\t\tsbmlLevel = 3;\r\n\t\t\t\t\t\t\tsbmlVersion = 1;\r\n\t\t\t\t\t\t\tsbmlPkgVersion = 1;\r\n\t\t\t\t\t\t\tbIsSpatial = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (selectedSim == null) {\r\n\t\t\t\t\t\t\tresultString = XmlHelper.exportSBML(bioModel, sbmlLevel, sbmlVersion, sbmlPkgVersion, bIsSpatial, selectedSimContext, null);\r\n\t\t\t\t\t\t\tXmlUtil.writeXMLStringToFile(resultString, exportFile.getAbsolutePath(), true);\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tfor (int sc = 0; sc < selectedSim.getScanCount(); sc++) {\r\n\t\t\t\t\t\t\t\tSimulationJob simJob = new SimulationJob(selectedSim, sc, null);\r\n\t\t\t\t\t\t\t\tresultString = XmlHelper.exportSBML(bioModel, sbmlLevel, sbmlVersion, sbmlPkgVersion, bIsSpatial, selectedSimContext, simJob);\r\n\t\t\t\t\t\t\t\t// Need to export each parameter scan into a separate file \r\n\t\t\t\t\t\t\t\tString newExportFileName = exportFile.getPath().substring(0, exportFile.getPath().indexOf(\".xml\")) + \"_\" + sc + \".xml\";\r\n\t\t\t\t\t\t\t\texportFile.renameTo(new File(newExportFileName));\r\n\t\t\t\t\t\t\t\tXmlUtil.writeXMLStringToFile(resultString, exportFile.getAbsolutePath(), true);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_BNGL)) {\r\n\t\t\t\t\t\tRbmModelContainer rbmModelContainer = bioModel.getModel().getRbmModelContainer();\r\n\t\t\t\t\t\tStringWriter bnglStringWriter = new StringWriter();\r\n\t\t\t\t\t\tPrintWriter pw = new PrintWriter(bnglStringWriter);\r\n\t\t\t\t\t\tRbmNetworkGenerator.writeBngl(bioModel, pw);\r\n\t\t\t\t\t\tresultString = bnglStringWriter.toString();\r\n\t\t\t\t\t\tpw.close();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_NFSIM)) {\r\n\t\t\t\t\t\t// TODO: get the first thing we find for now, in the future we'll need to modify ChooseFile \r\n\t\t\t\t\t\t// to only offer the applications / simulations with bngl content\r\n\t\t\t\t\t\tSimulationContext simContexts[] = bioModel.getSimulationContexts();\r\n\t\t\t\t\t\tSimulationContext aSimulationContext = simContexts[0];\r\n\t\t\t\t\t\tSimulation selectedSim = aSimulationContext.getSimulations(0);\r\n\t\t\t\t\t\t//Simulation selectedSim = (Simulation)hashTable.get(\"selectedSimulation\");\r\n\t\t\t\t\t\tSimulationTask simTask = new SimulationTask(new SimulationJob(selectedSim, 0, null),0);\r\n\t\t\t\t\t\tlong randomSeed = 0;\t// a fixed seed will allow us to run reproducible simulations\r\n\t\t\t\t\t\t//long randomSeed = System.currentTimeMillis();\r\n\t\t\t\t\t\tNFsimSimulationOptions nfsimSimulationOptions = new NFsimSimulationOptions();\r\n\t\t\t\t\t\t// we get the data we need from the math description\r\n\t\t\t\t\t\tElement root = NFsimXMLWriter.writeNFsimXML(simTask, randomSeed, nfsimSimulationOptions);\r\n\t\t\t\t\t\tDocument doc = new Document();\r\n\t\t\t\t\t\tdoc.setRootElement(root);\r\n\t\t\t\t\t\tXMLOutputter xmlOut = new XMLOutputter();\r\n\t\t\t\t\t\tresultString = xmlOut.outputString(doc);\r\n\t\r\n\t\t\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_CELLML)) {\r\n\t\t\t\t\t\tInteger chosenSimContextIndex = (Integer)hashTable.get(\"chosenSimContextIndex\");\r\n\t\t\t\t\t\tString applicationName = bioModel.getSimulationContext(chosenSimContextIndex.intValue()).getName();\r\n\t\t\t\t\t\tresultString = XmlHelper.exportCellML(bioModel, applicationName);\r\n\t\t\t\t\t\t// cellml still uses default character encoding for now ... maybe UTF-8 in the future\r\n\t\t\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_OMEX)) {\r\n\t\t\t\t\t\t// export the entire biomodel to a SEDML file (for now, only non-spatial,non-stochastic applns)\r\n\t\t\t\t\t\tint sedmlLevel = 1;\r\n\t\t\t\t\t\tint sedmlVersion = 1;\r\n\t\t\t\t\t\tString sPath = FileUtils.getFullPathNoEndSeparator(exportFile.getAbsolutePath());\r\n\t\t\t\t\t\tString sFile = FileUtils.getBaseName(exportFile.getAbsolutePath());\r\n\t\t\t\t\t\tString sExt = FileUtils.getExtension(exportFile.getAbsolutePath());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tSEDMLExporter sedmlExporter = null;\r\n\t\t\t\t\t\tif (bioModel instanceof BioModel) {\r\n\t\t\t\t\t\t\tsedmlExporter = new SEDMLExporter(bioModel, sedmlLevel, sedmlVersion);\r\n\t\t\t\t\t\t\tresultString = sedmlExporter.getSEDMLFile(sPath);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tthrow new RuntimeException(\"unsupported Document Type \" + bioModel.getClass().getName() + \" for SedML export\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(sExt.equals(\"sedx\")) {\r\n\t\t\t\t\t\t\tsedmlExporter.createManifest(sPath, sFile);\r\n\t\t\t\t\t\t\tString sedmlFileName = sPath + FileUtils.WINDOWS_SEPARATOR + sFile + \".sedml\";\r\n\t\t\t\t\t\t\tXmlUtil.writeXMLStringToFile(resultString, sedmlFileName, true);\r\n\t\t\t\t\t\t\tsedmlExporter.addSedmlFileToList(sFile + \".sedml\");\r\n\t\t\t\t\t\t\tsedmlExporter.addSedmlFileToList(\"manifest.xml\");\r\n\t\t\t\t\t\t\tsedmlExporter.createZipArchive(sPath, sFile);\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tXmlUtil.writeXMLStringToFile(resultString, exportFile.getAbsolutePath(), true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// if format is VCML, get it from biomodel.\r\n\t\t\t\t\tbioModel.getVCMetaData().cleanupMetadata();\r\n\t\t\t\t\tresultString = XmlHelper.bioModelToXML(bioModel);\r\n\t\t\t\t\tXmlUtil.writeXMLStringToFile(resultString, exportFile.getAbsolutePath(), true);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}*/\r\n\t\t} else if (documentToExport instanceof MathModel) {\r\n\t\t\tMathModel mathModel = (MathModel)documentToExport;\r\n\t\t\t// check format requested\r\n\t\t\tif (fileFilter.equals(FileFilters.FILE_FILTER_MATLABV6)){\r\n\t\t\t\t//check if it's ODE\r\n\t\t\t\tif(mathModel.getMathDescription() != null && \r\n\t\t\t\t (!mathModel.getMathDescription().isSpatial() && !mathModel.getMathDescription().isNonSpatialStoch())){\r\n\t\t\t\t\tMathDescription mathDesc = mathModel.getMathDescription();\r\n\t\t\t\t\tresultString = exportMatlab(exportFile, fileFilter, mathDesc,mathModel.getOutputFunctionContext());\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Exception(\"Matlab export failed: NOT an non-spatial deterministic model.\");\r\n\t\t\t\t}\r\n\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_PDF)) { \r\n\t\t\t\tFileOutputStream fos = new FileOutputStream(exportFile);\r\n\t\t\t\tdocumentManager.generatePDF(mathModel, fos);\r\n\t\t\t\tfos.close();\r\n\t\t\t\treturn; //will take care of writing to the file as well.\r\n\t\t\t}else if (fileFilter.equals(FileFilters.FILE_FILTER_VCML)) {\r\n\t\t\t\tresultString = XmlHelper.mathModelToXML(mathModel);\r\n\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_CELLML)) {\r\n\t\t\t\tresultString = XmlHelper.exportCellML(mathModel, null);\r\n//\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_SBML_23)) {\r\n//\t\t\t\tresultString = XmlHelper.exportSBML(mathModel, 2, 3, 0, false, null, null);\r\n//\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_SBML_24)) {\r\n//\t\t\t\tresultString = XmlHelper.exportSBML(mathModel, 2, 4, 0, false, null, null);\r\n\t\t\t} \r\n\t\t\t//Export a simulation to Smoldyn input file, if there are parameter scans\r\n\t\t\t//in simulation, we'll export multiple Smoldyn input files.\r\n\t\t\telse if (fileFilter.equals(FileFilters.FILE_FILTER_SMOLDYN_INPUT)) \r\n\t\t\t{ \r\n\t\t\t\tSimulation selectedSim = (Simulation)hashTable.get(\"selectedSimulation\");\r\n\t\t\t\tif (selectedSim != null) {\r\n\t\t\t\t\tint scanCount = selectedSim.getScanCount();\r\n\t\t\t\t\t//-----\r\n\t\t\t\t\tString baseExportFileName = (scanCount==1?null:exportFile.getPath().substring(0, exportFile.getPath().indexOf(\".\")));\r\n\t\t\t\t\tfor(int i=0; i<scanCount; i++){\r\n\t\t\t\t\t\tSimulationTask simTask = new SimulationTask(new SimulationJob(selectedSim, i, null),0);\r\n\t\t\t\t\t\t// Need to export each parameter scan into a separate file\r\n\t\t\t\t\t\tFile localExportFile = (scanCount==1?exportFile:new File(baseExportFileName + \"_\" + i + SMOLDYN_INPUT_FILE_EXTENSION));\r\n\t\t\t\t\t\tFileCloseHelper localCloseThis = new FileCloseHelper(localExportFile);\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tSmoldynFileWriter smf = new SmoldynFileWriter(localCloseThis.getPrintWriter(), true, null, simTask, false);\r\n\t\t\t\t\t\t\tsmf.write();\r\n\t\t\t\t\t\t}finally{\r\n\t\t\t\t\t\t\tif(localCloseThis != null){\r\n\t\t\t\t\t\t\t\tlocalCloseThis.close();\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\treturn;\r\n\t\t\t}\r\n\t\t} else if (documentToExport instanceof Geometry){\r\n\t\t\tGeometry geom = (Geometry)documentToExport;\r\n\t\t\tif (fileFilter.equals(FileFilters.FILE_FILTER_PDF)) {\r\n\t\t\t\tdocumentManager.generatePDF(geom, (closeThis = new FileCloseHelper(exportFile)).getFileOutputStream());\r\n\t\t\t}else if (fileFilter.equals(FileFilters.FILE_FILTER_VCML)) {\r\n\t\t\t\tresultString = XmlHelper.geometryToXML(geom);\r\n\t\t\t}else if (fileFilter.equals(FileFilters.FILE_FILTER_AVS)) {\r\n\t\t\t\tcbit.vcell.export.AVS_UCD_Exporter.writeUCDGeometryOnly(geom.getGeometrySurfaceDescription(),(closeThis = new FileCloseHelper(exportFile)).getFileWriter());\r\n\t\t\t}else if (fileFilter.equals(FileFilters.FILE_FILTER_STL)) {\r\n\t\t\t\t//make sure filename end with .stl\r\n\t\t\t\tFile stlFile = exportFile;\r\n\t\t\t\tif(!exportFile.getName().toLowerCase().endsWith(\".stl\")){\r\n\t\t\t\t\tstlFile = new File(exportFile.getParentFile(),exportFile.getName()+\".stl\");\r\n\t\t\t\t}\r\n\t\t\t\tcbit.vcell.geometry.surface.StlExporter.writeBinaryStl(geom.getGeometrySurfaceDescription(),(closeThis = new FileCloseHelper(stlFile)).getRandomAccessFile(\"rw\"));\r\n\t\t\t}else if (fileFilter.equals(FileFilters.FILE_FILTER_PLY)) {\r\n\t\t\t\twriteStanfordPolygon(geom.getGeometrySurfaceDescription(), (closeThis = new FileCloseHelper(exportFile)).getFileWriter());\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(resultString != null){\r\n\t\t\t(closeThis = new FileCloseHelper(exportFile)).getFileWriter().write(resultString);\r\n\t\t}\r\n\t}finally{\r\n\t\tif(closeThis != null){\r\n\t\t\tcloseThis.close();\r\n\t\t}\r\n\t}\r\n}",
"static /* synthetic */ void m205-wrap9(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01 r1, int r2) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap9(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01, int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap9(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01, int):void\");\n }",
"public static void write2File(String fileName) throws IOException{\n BufferedWriter output = null;\n try {\n File file = new File(fileName);\n output = new BufferedWriter(new FileWriter(file));\n for(BufferIOIntercept ob : bufferIOList){\n \n output.write(ob.op + \",\" + ob.strategy + \",\" + ob.numberBte + \",\" + ob.blkSize + \",\" + ob.time + \"\\n\");\n }\n } catch ( IOException e ) {\n e.printStackTrace();\n } finally {\n if ( output != null ) output.close();\n }\n }",
"public void writeToParcel(android.os.Parcel r1, int r2) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e3 in method: android.telephony.SmsCbCmasInfo.writeToParcel(android.os.Parcel, int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.writeToParcel(android.os.Parcel, int):void\");\n }",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp\", line = 3542,\n FQN=\"llvm::Module::dump\", NM=\"_ZNK4llvm6Module4dumpEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZNK4llvm6Module4dumpEv\")\n //</editor-fold>\n public void dump() /*const*//* __attribute__((used)) __attribute__((noinline))*/ {\n print(dbgs(), (AssemblyAnnotationWriter /*P*/ )null, \n /*ShouldPreserveUseListOrder=*/ false, /*IsForDebug=*/ true);\n }",
"void exportGame();",
"public abstract void debug(RobocodeFileOutputStream output);",
"public void saveBack() {\n\t\tmodified = false;\n\n\t\t// set basics\n\t\tRubyHelper.setNum(object, \"@code\", id);\n\t\tRubyHelper.setNum(object, \"@indent\", indent);\n\n\t\t// set parameters\n\t\tRubyArray para = (RubyArray) object.getInstanceVariable(\"@parameters\");\n\t\tpara.clear();\n\n\t\tfor (IRubyObject r : parameters) {\n\t\t\tpara.add(r);\n\t\t}\n\t}",
"@Test(timeout = 4000)\n public void test085() throws Throwable {\n Label label0 = new Label();\n Label label1 = label0.getFirst();\n label0.successor = label1;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"oc[MfnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2463));\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n classWriter0.newConst(\"Cpd7(e\");\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"Fj)3/|(;sZXz$\";\n stringArray0[1] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[2] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[3] = \"~)yCTRxQ#s$y[Ly%\";\n stringArray0[4] = \"Fj)3/|(;sZXz$\";\n stringArray0[5] = \"oc[MfnZM[~MHOK iO\";\n FileSystemHandling.shouldAllThrowIOExceptions();\n classWriter0.newUTF8(\"Cpd7(e\");\n Frame frame0 = label0.successor.frame;\n label0.frame = null;\n classWriter0.index = (-2463);\n stringArray0[6] = \"Cpd7(e\";\n stringArray0[7] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[8] = \"Cpd7(e\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"oc[MfnZM[~MHOK iO\", \"~)yCTRxQ#s$y[Ly%\", \"oc[MfnZM[~MHOK iO\", stringArray0, true, false);\n methodWriter0.visitJumpInsn(1, label0);\n classWriter0.newFieldItem(\"oc[MfnZM[~MHOK iO\", \"~hm$aI6.7xL0\", \"~hm$aI6.7xL0\");\n methodWriter0.visitJumpInsn(168, label0);\n methodWriter0.visitMaxs(1, (-969));\n // Undeclared exception!\n try { \n methodWriter0.visitVarInsn((-333), 32767);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -333\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }",
"void gen() {\n X86.Operand mleft = src1.gen_source_operand(false,tempReg1); \r\n X86.Operand mright = src2.gen_source_operand(true,tempReg2); \r\n X86.emit2(\"cmp\" + X86.Size.Q,mright,mleft);\r\n X86.emit0(\"j\" + op.X86_name() + \" F\" + funcNumber + \"_\" + lab.name);\r\n }",
"@Override\n\tpublic void save(Object o, String file) {\n\t\t\n\t}",
"public synchronized void saveTable() \n\t{\n\t\ttry {\n\t\t\tFileOutputStream fos = new FileOutputStream(tableFile);\n\t\t\t\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\n\t\t\toos.writeObject(htRecords);\n\t\t\toos.close();\n\t\t\tfos.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new RuntimeException(\"Cannot save : FileNotFoundException\",e);\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(\"Cannot save : IOException\",e);\n\t\t}\n\t}",
"AnonymousClass2(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01 r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.2.<init>(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.2.<init>(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void\");\n }",
"public /* bridge */ /* synthetic */ Object mo6920a(Object obj, Object obj2) {\n mo7100a((C1680ab) obj, (C2360f) obj2);\n return C3230x.f8645a;\n }",
"@Override\n public void saveFile(Object o, File file, String ext)\n throws IOException {\n dest = file;\n }",
"public static void main(String[] args) throws Exception {\n \t\n \tbyte[] fileData = Files.readAllBytes(Paths.get(new File(System.getProperty(\"user.dir\")+\"/bin/main/re/bytecode/obfuscat/pass/vm/VMRefImpl.class\").toURI()));\n \tDSLParser p = new DSLParser();\n \tMap<String, Function> functions = p.processFile(fileData);\n \tFunction refF = MergedFunction.mergeFunctions(functions, \"process\"); // functions.get(\"process\");\n \t\n \t\n \t\n \tfileData = Files.readAllBytes(Paths.get(new File(System.getProperty(\"user.dir\")+\"/bin/test/re/bytecode/obfuscat/samples/Sample8.class\").toURI()));\n \tp = new DSLParser();\n functions = p.processFile(fileData);\n \n \tFunction f = MergedFunction.mergeFunctions(functions, \"entry\");\n \t\n\t\t//HashMap<String, Object> map = new HashMap<String, Object>();\n\t\t//Function f = Obfuscat.buildFunction(\"Test\", map);\n \t\n \t\n\t\t//HashMap<String, Object> map = new HashMap<String, Object>();\n\t\t//map.put(\"data\", new byte[] { 1, 2, 3, 4 });\n\t\t//Function f = Obfuscat.buildFunction(\"KeyBuilder\", map );\n\t\n \tf = Obfuscat.applyPass(f, \"Flatten\");\n\t\tf = Obfuscat.applyPass(f, \"OperationEncode\");\n\t\t\n\t\tint[] gen = new VMCodeGenerator(new Context(System.currentTimeMillis()), f).generate();\n\n\t\tbyte[] vmcode = new byte[gen.length];\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i < gen.length; i++) {\n\t\t\tsb.append(String.format(\"%02X\", gen[i] & 0xFF));\n\t\t\tvmcode[i] = (byte) gen[i];\n\t\t}\n\n\t\tSystem.out.println(sb.toString());\n\n\t\tSystem.out.println(\"=========================================\");\n\n\t\t\n\t\tSystem.out.println(f.getBlocks().get(0));\n\t\t\n\t\tEmulateFunction eFB = new EmulateFunction(f);\n\t\tbyte[] arr = new byte[] {0, 0, 0, 0};\n\t\tSystem.out.println(\"Emulate Original => \"+eFB.run(-1, arr));\n\t\tSystem.out.println(Arrays.toString(arr));\n\t\t\n\t\tarr = new byte[] {0, 0, 0, 0};\n\t\tSystem.out.println(\"Java Reference => \"+VMRefImpl.process(vmcode, f.getData() ,new Object[]{0, arr}));\n\t\tSystem.out.println(Arrays.toString(arr));\n\n\t\t\n\t\tEmulateFunction eFRef = new EmulateFunction(refF);\n\t\tarr = new byte[] {0, 0, 0, 0};\n\t\tSystem.out.println(\"Emulated Reference => \"+eFRef.run(-1, gen, f.getData(), new Object[] {0, arr}));\n\t\tSystem.out.println(Arrays.toString(arr));\n\t\t\n\t\tEmulateFunction eFPass = new EmulateFunction(Obfuscat.applyPass(f, \"Virtualize\"));\n\t\tarr = new byte[] {0, 0, 0, 0};\n\t\tSystem.out.println(\"Emulate Pass VM => \"+eFPass.run(-1, arr ));\n\t\tSystem.out.println(Arrays.toString(arr));\n\t\t\n\n }",
"public void method_7080(String param1, class_1293 param2) {\r\n // $FF: Couldn't be decompiled\r\n }",
"static void mvi_to_mem(String passed){\n\t\tint memory_address = memory_address_hl();\n\t\tmemory.put(memory_address, passed.substring(6));\n\t}",
"void writeToFile(){\n try{\n OutputStream o = new FileOutputStream(distanceFile);\n for(int start = 1; start < 200; start++)\n for(int to = 1; to < 200; to++)\n for(int taxi = 0; taxi < 12; taxi++)\n for(int bus = 0; bus < 9; bus++)\n o.write(distance[start][to][taxi][bus]);\n o.close();\n o = new FileOutputStream(validMoveFile);\n for(int node = 1; node < 200; node++)\n for(int taxi = 0; taxi < 3; taxi++)\n for(int bus = 0; bus < 3; bus++)\n for(int underground = 0; underground < 3; underground++)\n for(int doublet = 0; doublet < 2; doublet++)\n for(int secret = 0; secret < 3; secret++)\n for(int b = 0; b < 4; b++)\n o.write((byte) (validMoves[node][taxi][bus][underground][doublet][secret] >> ((3 - b) * 8)));\n o.close();\n }\n catch (Exception e){\n System.out.println(\"Exception: \" + e);\n }\n }",
"protected abstract SharedMemory make_infos();",
"public /* bridge */ /* synthetic */ Object mo6920a(Object obj, Object obj2) {\n mo7091a((C2792ba) obj, (String) obj2);\n return C3230x.f8645a;\n }",
"@Override\n public String visit(PassArgStmt n) {\n // 直接将参数保存到下一个栈帧\n // PASSARG 起始1\n int offset = Integer.parseInt(n.f1.f0.tokenImage);\n String r1 = this.reg[n.f2.f0.which];\n Global.outputString += \"sw $\" + r1 + \", -\" + ((offset + 2) * 4)\n + \"($sp)\\n\";\n return null;\n }",
"public void saveGame() {\r\n\t\t//separator used by system\r\n\t\tString separator = System.getProperty(\"file.separator\");\r\n\t\t//path to where files will be saved\r\n\t\tString path = System.getProperty(\"user.dir\") + separator + \"src\" + separator + \"GameFiles\" + separator;\r\n\r\n\t\ttry {\r\n\r\n\t\t\t//Save the world objects\r\n\t\t\tString world_objects_name = EnvironmentVariables.getTitle() + \"WorldObjects\";\r\n\t\t\t//create a new file with name given by user with added text for identification\r\n\t\t\tFile world_objects_file = new File(path + world_objects_name + \".txt\");\r\n\t\t\tFileOutputStream f_world_objects = new FileOutputStream(world_objects_file);\r\n\t\t\tObjectOutputStream o_world_objects = new ObjectOutputStream(f_world_objects);\r\n\r\n\t\t\t//loop through list and write each object to file\r\n\t\t\tfor(GameObject obj: EnvironmentVariables.getWorldObjects()) {\r\n\t\t\t\to_world_objects.writeObject(obj);\r\n\t\t\t}\r\n\r\n\t\t\to_world_objects.flush();\r\n\t\t\to_world_objects.close();\r\n\t\t\tf_world_objects.flush();\r\n\t\t\tf_world_objects.close();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//Save terrain is done the same ass world objects but we create a new file \r\n\t\t\t//with different added text\r\n\t\t\tString terrain_name = EnvironmentVariables.getTitle() + \"Terrain\";\r\n\t\t\tFile terrain_file = new File(path + terrain_name + \".txt\");\r\n\t\t\tFileOutputStream f_terrain = new FileOutputStream(terrain_file);\r\n\t\t\tObjectOutputStream o_terrain = new ObjectOutputStream(f_terrain);\r\n\r\n\t\t\tfor(GameObject obj: EnvironmentVariables.getTerrain()) {\r\n\t\t\t\to_terrain.writeObject(obj);\r\n\t\t\t}\r\n\r\n\t\t\to_terrain.flush();\r\n\t\t\to_terrain.close();\r\n\t\t\tf_terrain.flush();\r\n\t\t\tf_terrain.close();\r\n\t\t\t\r\n\t\t\t//Save main player, given own file but just a single object\r\n\t\t\tString main_player_name = EnvironmentVariables.getTitle() + \"MainPlayer\";\r\n\t\t\tFile main_player_file = new File(path + main_player_name + \".txt\");\r\n\t\t\tFileOutputStream f_main_player = new FileOutputStream(main_player_file);\r\n\t\t\tObjectOutputStream o_main_player = new ObjectOutputStream(f_main_player);\r\n\r\n\t\t\to_main_player.writeObject(EnvironmentVariables.getMainPlayer());\r\n\r\n\t\t\to_main_player.flush();\r\n\t\t\to_main_player.close();\r\n\t\t\tf_main_player.flush();\r\n\t\t\tf_main_player.close();\r\n\t\t\t\r\n\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"File not found\");\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\tSystem.out.println(\"Error initializing stream\");\r\n\t\t} \r\n\t\t\r\n\t\t//saving the environment variables\r\n\t\ttry {\r\n\t\t\tString env_name = EnvironmentVariables.getTitle() + \"EnvVariables\";\r\n\t\t\tFile env_file = new File(path + env_name + \".txt\");\r\n\t\t\t\r\n\t\t\tif(!env_file.exists()) {\r\n\t\t\t\tenv_file.createNewFile();\r\n\t\t }\r\n\t\t\t \r\n\t\t\t//FileWriter fw = new FileWriter(env_file);\r\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(env_file));\r\n\t\t\t//write each variable to a new line as a string\r\n\t\t\tbw.write(EnvironmentVariables.getTitle()); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getWidth())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getHeight())); bw.newLine();\r\n\t\t\tbw.write(EnvironmentVariables.getPlanet()); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getMass())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getRadius())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getAirDensity())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getMeter())); bw.newLine();\r\n\r\n\t\t\t\r\n\t\t\t//bw.flush();\r\n\t\t\tbw.close();\r\n\t\t\t\r\n\t\t}catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Error initializing stream\");\r\n\t\t}\r\n\t\t\r\n\t\tEnvironmentVariables.getTerrain().clear();\r\n\t\tEnvironmentVariables.getWorldObjects().clear();\r\n\t}",
"public void generateObject(PhpWriter out)\n throws IOException\n {\n ExprGenerator objGen = ((ExprPro) _objExpr).getGenerator();\n\n objGen.generateObject(out);\n out.print(\".getFieldObject(env, \");\n out.printIntern(_name);\n out.print(\")\");\n }",
"@Test(timeout = 4000)\n public void test047() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-4015));\n byte[] byteArray0 = new byte[0];\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", (String[]) null, false, true);\n ByteVector byteVector0 = new ByteVector(2);\n methodWriter0.visitFrame((-4015), 191, (Object[]) null, (-4058), (Object[]) null);\n }",
"private void saveindex() throws IOException {\n File dense = new File(DenseLayerPath + \"DenseLayer\" + \".class\");\n if (!dense.exists())\n dense.createNewFile();\n ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(dense));\n oos.writeObject(this);\n oos.close();\n }",
"public static void saveContext(String filePath,Monde monde) throws IOException {\n\t\tFileOutputStream fout = new FileOutputStream(filePath);\n\t\tObjectOutputStream oos = new ObjectOutputStream(fout);\n\t\toos.writeObject(monde);\n\t\toos.close();\n\t}",
"public void save (File argFile) throws IOException;",
"public void saveTypesAsOps(TextLabels labels,File file) throws IOException\n\t{\n\t\tPrintStream out = new PrintStream(new FileOutputStream(file));\n\t\tfor (Iterator i=labels.getTypes().iterator(); i.hasNext(); ) {\n\t\t\tString type = (String)i.next();\n\t\t\tfor (Span.Looper j=labels.instanceIterator(type); j.hasNext(); ) {\n\t\t\t\tSpan s = j.nextSpan();\n\t\t\t\tif (s.size()>0) {\n\t\t\t\t\tint lo = s.getTextToken(0).getLo();\n\t\t\t\t\tint hi = s.getTextToken(s.size()-1).getHi();\n\t\t\t\t\tout.println(\"addToType \"+s.getDocumentId()+\" \"+lo+\" \"+(hi-lo)+\" \"+type);\n\t\t\t\t} else {\n\t\t\t\t\tlog.warn(\"forgetting label on empty span\");\n\t\t\t\t}\n\t\t\t}\n Span.Looper it = labels.closureIterator(type);\n while (it.hasNext())\n {\n Span s = it.nextSpan();\n\t\t\t\tSpan doc = s.documentSpan();\n\t\t\t\tif (s.size()!=doc.size()) {\n\t\t\t\t\tthrow new UnsupportedOperationException(\"can't save environment with closureSpans!=docSpans\");\n\t\t\t\t}\n out.println(\"closeType \" + s.getDocumentId() + \" \" + type);\n }\n\t\t}\n\t\tfor (Iterator i=labels.getSpanProperties().iterator(); i.hasNext(); ) {\n\t\t\tString prop = (String)i.next();\n\t\t\tfor (Span.Looper j=labels.getSpansWithProperty(prop); j.hasNext(); ) {\n\t\t\t\tSpan s = j.nextSpan();\n\t\t\t\tString val = labels.getProperty(s,prop);\n\t\t\t\tint lo = s.getTextToken(0).getLo();\n\t\t\t\tint hi = s.getTextToken(s.size()-1).getHi();\n\t\t\t\tout.println(\"setSpanProp \"+s.getDocumentId()+\" \"+lo+\" \"+(hi-lo)+\" \"+prop+\" \"+val);\n\t\t\t}\n\t\t}\n\t\tout.close();\n\t}",
"protected void saveData(File file) throws Exception{\n\t\t\n\n\t \n\t\t// Build the DataThing map from the resultReferencesMap\n\t\t// First convert map of references to objects into a map of real result objects\n\t\tMap<String, Object> resultMap = new HashMap<String, Object>();\n\t\tfor (Iterator<String> i = chosenReferences.keySet().iterator(); i.hasNext();) {\n\t\t\tString portName = (String) i.next();\n\t\t\tT2Reference reference = chosenReferences.get(portName);\n\t\t\tObject obj = convertReferencesToObjects(reference);\n\t\t\tresultMap.put(portName, obj);\n\t\t}\n\t\tMap<String, DataThing> dataThings = bakeDataThingMap(resultMap);\n\t\t\n\t\tfor (String portName : dataThings.keySet()) {\n\t\t\tDataThing thing = dataThings.get(portName);\n\t\t\tthing.writeToFileSystem(file, portName);\n\t\t}\n\t}",
"private void saveToFileData() {//Context context) {\n try {\n FileOutputStream fileOutputStream = openFileOutput(fileNameData, Context.MODE_PRIVATE);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n objectOutputStream.writeObject(Data.userData);\n objectOutputStream.close();\n fileOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"static /* synthetic */ void m202-wrap6(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01 r1, int r2) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap6(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01, int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap6(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01, int):void\");\n }",
"public String LateralOp() {\n String line1, line2, tmpBuf1, tmpBuf2;\n\n try {\n BufferedReader br = new BufferedReader(new FileReader(file1));\n BufferedWriter bw = new BufferedWriter(new FileWriter(\"output\" + mProcCount + extension));\n\n // Working with two files\n if (file2 != null) {\n BufferedReader br2 = new BufferedReader(new FileReader(file2));\n\n do{\n line1 = br.readLine(); line2 = br2.readLine();\n tmpBuf1 = line1 == null ? \"\" : line1;\n tmpBuf2 = line2 == null ? \"\" : line2;\n\n bw.write(tmpBuf1 + tmpBuf2);\n bw.newLine();\n }while (line1!= null || line2 != null);\n bw.flush();\n }\n // Working with spacers\n else{\n line2 = \"\";\n for (int i = 0; i < spaceCount; ++i) {\n line2 += spacer;\n }\n do{\n line1 = br.readLine();\n bw.write(line1 + line2);\n bw.newLine();\n }while(line1 != null);\n bw.flush();\n }\n }\n catch (FileNotFoundException e) {\n System.err.println(\"ERROR: File does not exist. Please input a valid file.\");\n }\n catch (IOException e) {\n System.err.println(\"ERROR: Failure while reading from file.\");\n }\n ++mProcCount;\n return \"output\" + mProcCount + extension;\n }",
"public static void save(File mazeFile, Object maze) throws IOException {\n\n /* IO stuff */\n ObjectOutputStream oo = new ObjectOutputStream( new FileOutputStream( mazeFile ) );\n\n oo.writeObject(maze);\n\n oo.close();\n }",
"@org.jetbrains.annotations.NotNull\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public static /* synthetic */ com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection copy$default(com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection r4, com.bitcoin.mwallet.core.models.slp.Slp r5, java.util.List<kotlin.ULong> r6, com.bitcoin.bitcoink.p008tx.Satoshis r7, com.bitcoin.bitcoink.p008tx.Satoshis r8, java.util.List<com.bitcoin.mwallet.core.models.p009tx.utxo.Utxo> r9, com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection.Error r10, int r11, java.lang.Object r12) {\n /*\n r12 = r11 & 1\n if (r12 == 0) goto L_0x0006\n com.bitcoin.mwallet.core.models.slp.Slp r5 = r4.token\n L_0x0006:\n r12 = r11 & 2\n if (r12 == 0) goto L_0x000c\n java.util.List<kotlin.ULong> r6 = r4.quantities\n L_0x000c:\n r12 = r6\n r6 = r11 & 4\n if (r6 == 0) goto L_0x0013\n com.bitcoin.bitcoink.tx.Satoshis r7 = r4.fee\n L_0x0013:\n r0 = r7\n r6 = r11 & 8\n if (r6 == 0) goto L_0x001a\n com.bitcoin.bitcoink.tx.Satoshis r8 = r4.change\n L_0x001a:\n r1 = r8\n r6 = r11 & 16\n if (r6 == 0) goto L_0x0021\n java.util.List<com.bitcoin.mwallet.core.models.tx.utxo.Utxo> r9 = r4.utxos\n L_0x0021:\n r2 = r9\n r6 = r11 & 32\n if (r6 == 0) goto L_0x0028\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error r10 = r4.error\n L_0x0028:\n r3 = r10\n r6 = r4\n r7 = r5\n r8 = r12\n r9 = r0\n r10 = r1\n r11 = r2\n r12 = r3\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection r4 = r6.copy(r7, r8, r9, r10, r11, r12)\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection.copy$default(com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection, com.bitcoin.mwallet.core.models.slp.Slp, java.util.List, com.bitcoin.bitcoink.tx.Satoshis, com.bitcoin.bitcoink.tx.Satoshis, java.util.List, com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error, int, java.lang.Object):com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection\");\n }",
"public void genCode(CodeFile code) {\n\t\t\n\t}",
"@Test(timeout = 4000)\n public void test035() throws Throwable {\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"oc[MfnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2450));\n String[] stringArray0 = new String[0];\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"H\", \"H\", \"Hai4?;|GlMP=+q\", stringArray0, false, false);\n String[] stringArray1 = new String[2];\n stringArray1[0] = \"oc[MfnZM[~MHOK iO\";\n stringArray1[1] = \"Hai4?;|GlMP=+q\";\n MethodWriter methodWriter1 = new MethodWriter(classWriter0, 1, \"LocalVariableTypeTable\", \"StackMap\", \"StackMap\", stringArray1, false, false);\n methodWriter0.visitIincInsn(1243, 2);\n assertNotSame(methodWriter0, methodWriter1);\n }",
"public void saveReduceFile(Long source, ChordMessageInterface context) throws RemoteException, IOException {\n if(source != getId()){\n successor.saveReduceFile(source, context);\n }\n try {\n context.setWorkingPeer(getId());\n } catch (IOException e) {\n e.printStackTrace();\n }\n //store Breduce in file\n System.out.println(\"saveReduceFile: guid - \" + guid);\n\n String fileName = \"./\" + guid + \"/repository/\" + (guid - 1);\n String localFile = \"\" + (guid - 1);\n FileWriter file2 = new FileWriter(localFile);\n FileWriter file = new FileWriter(fileName);\n\n for(Map.Entry<Long, String> entry : BReduce.entrySet()) {\n Long key = entry.getKey();\n String value = entry.getValue();\n file.write(key + \";\" + value + \"\\n\");\n file2.write(key + \";\" + value + \"\\n\");\n\n }\n file.close();\n file2.close();\n try {\n context.completePeer(getId(), 0L);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }",
"public void visit (MemoryTraceStatement aStmt)\n {\n System.out.println(\"Markus Memory:\");\n for (String key : fMemory.keySet ())\n System.out.println(String.format(\"%s\\t%s\", key, fMemory.get (key))); \n }",
"public ProgramState(IStack<IStatement> stack, IMap<String, IValue> table, IList<IValue> output, IMap<StringValue, BufferedReader> fileTable, IHeap<Integer, IValue> heapTable, IStatement originalPrg) {\n this.executionStack = stack;\n this.symbolTable = table;\n this.outputList = output;\n this.fileTable = fileTable;\n this.originalProgram = originalPrg;\n this.heapTable = heapTable;\n\n this.executionStack.push(this.originalProgram);\n }",
"public void saveGame(File fileLocation);",
"private java.security.cert.X509Certificate generateJcaObject(com.android.org.bouncycastle.asn1.x509.TBSCertificate r1, byte[] r2) throws java.security.cert.CertificateEncodingException {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: com.android.org.bouncycastle.x509.X509V1CertificateGenerator.generateJcaObject(com.android.org.bouncycastle.asn1.x509.TBSCertificate, byte[]):java.security.cert.X509Certificate, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.x509.X509V1CertificateGenerator.generateJcaObject(com.android.org.bouncycastle.asn1.x509.TBSCertificate, byte[]):java.security.cert.X509Certificate\");\n }",
"private void saveGame(){\n\t\t\n\t}",
"private void genSaveVectorCode(String name, String classSimpleName, boolean primitive, int dimensions, String cppType) {\n int tabLevel = 1;\n String tabs = tabs(tabLevel);\n\n for (int i = 1; i <= dimensions; i++) {\n\n String itVarName = \"i\" + i + \"_\" + name;\n String vVarName = \"v\" + i + \"_\" + name;\n\n // another for(;;) loop...\n String vectorType = vectorCppTypeName(dimensions + 1 - i, cppType);\n\n if (i == 1) {\n save.println(\"\\t// \" + vectorType + \" \" + name);\n genDebug(save, \"\\tstd::cout << \\\"save \" + vectorType + \" \" + name + \"\\\" << std::endl;\");\n }\n\n if (i > 1) {\n // inside a for loop, inner vector variable initialized by\n // dereferencing iterator\n save.println(tabs + vectorType + \"& \" + vVarName + \" = (*i\" + (i - 1) + \"_\" + name + \");\");\n } else {\n // outside for loop, inner vector variable initialized to member\n // variable\n save.println(tabs + vectorType + \"& \" + vVarName + \" = this->\" + name + \";\");\n }\n\n save.println(tabs + \"int \" + vVarName + \"_length = \" + vVarName + \".size();\");\n\n save.println();\n save.println(tabs + OUTSTREAM_VAR_NAME + \".writeInt(\" + vVarName + \"_length);\");\n\n genDebugDumpValue(save, vVarName + \"_length\", tabs);\n\n save.println();\n save.println(tabs + vectorType + \"::iterator \" + itVarName + \";\");\n save.println(tabs + \"for( \" + itVarName + \" = \" + vVarName + \".begin(); \" + itVarName + \" != \" + vVarName\n + \".end(); ++\" + itVarName + \" ){\");\n\n tabLevel++;\n tabs = tabs(tabLevel);\n\n if (i == dimensions) {\n if (primitive || classSimpleName.equals(\"String\")) {\n save.println(tabs + cppType + \" v\" + i + \" = (*\" + itVarName + \");\");\n save.println(tabs + genWriteCode(\"v\" + i, cppType));\n } else {\n // save.println( tabs + type + \" v\" + i + \" = (*\" +\n // itVarName + \");\" );\n // save.println( tabs + \"v\" + i + \".save( output );\");\n save.println(tabs + itVarName + \" -> save( \" + OUTSTREAM_VAR_NAME + \" );\");\n }\n }\n\n if (i < dimensions) {\n } else {\n if (i > 1) {\n // not outside outer for(;;) loop\n // bottom\n }\n }\n }\n\n for (int i = 0; i < dimensions; i++) {\n tabLevel--;\n tabs = tabs(tabLevel);\n save.println(tabs + \"}\");\n }\n }",
"public void save(){\n try{\n Date date = new Date();\n \n PrintWriter writer = new PrintWriter(\"data.MBM\", \"UTF-8\");\n \n writer.println(\"version:\"+MBMDriver.version);\n writer.println(\"numworlds:\" + worlds.size());\n writer.println(\"lastclosed:\" + date.toString());\n writer.println(\"outDir:\"+outputDir.toPath());\n \n for(int i = 0; i < worlds.size(); i++){\n \n writer.println(\"MBMWORLD:\"+worlds.get(i).getWorldFile().getName()+\":\"+worlds.get(i).getName()+\":\"+worlds.get(i).getWorldFile().toPath()+\":\"+worlds.get(i).getLastBackupDate());\n }\n \n writer.close();\n }catch(FileNotFoundException e){\n System.out.println(\"ERROR: Failed to Find File\");\n }catch(UnsupportedEncodingException e){\n System.out.println(\"ERROR: Unsupported Encoding Exception\");\n }\n }",
"@Test(timeout = 4000)\n public void test065() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(4096);\n ClassWriter classWriter1 = new ClassWriter((-2894));\n String[] stringArray0 = new String[7];\n stringArray0[0] = \"ConstantValue\";\n stringArray0[1] = \"LocalVariableTable\";\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, true);\n stringArray0[2] = \"ConstantValue\";\n stringArray0[3] = \"ConstantValue\";\n stringArray0[4] = \"0T1MW_`O#}<L\";\n stringArray0[5] = \"h#w=z5(0SfaM)DKLY\";\n stringArray0[6] = \"Synthetic\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 1, \"ConstantValue\", \"h#w=z5(0SfaM)DKLY\", \"Synthetic\", stringArray0, true, false);\n methodWriter0.visitAnnotationDefault();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"LocalVariableTable\");\n methodWriter0.visitMaxs(1, (-160));\n Label label0 = new Label();\n Edge edge0 = label0.successors;\n Label[] labelArray0 = new Label[2];\n labelArray0[0] = label0;\n labelArray0[1] = label0;\n methodWriter0.visitTableSwitchInsn(1, 4096, label0, labelArray0);\n methodWriter0.visitMethodInsn((-2894), \"/#p[v!vM>^U#((tz?0\", \"0T1MW_`O#}<L\", \"Code\");\n }",
"private void buildSymbolTables() {\n new SymbolsTableBuilder(data).read(this);//.dump();\n }",
"@Test(timeout = 4000)\n public void test084() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1983180370));\n classWriter0.addType(\"\");\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n String[] stringArray0 = new String[4];\n stringArray0[0] = \"\\\"\";\n stringArray0[1] = \"\\\"\";\n classWriter0.newLong(32L);\n stringArray0[2] = \"\";\n stringArray0[3] = \"\\\"\";\n classWriter0.newClass(\"\\\"\");\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-1983180370), \"\", \"<T'RwU+).UKJX>\", \"\", stringArray0, true, true);\n methodWriter0.visitAnnotation(\"\", true);\n methodWriter0.visitFieldInsn(1, \"\\\"\", \"char\", \"3<|siktz\");\n Label label0 = new Label();\n label0.toString();\n ByteVector byteVector0 = new ByteVector(1);\n byteVector0.putUTF8(\"Label offset position has not been resolved yet\");\n ByteVector byteVector1 = classWriter0.pool;\n byteVector1.putInt(1);\n methodWriter0.put(byteVector1);\n methodWriter0.signature = \"\";\n methodWriter0.getSize();\n methodWriter0.visitFieldInsn(102, \"char\", \"Code\", \"\");\n methodWriter0.visitTypeInsn(4, \"zaxCQe&RK=9\");\n }",
"private void saveFunction() {\n }",
"@Test(timeout = 4000)\n public void test078() throws Throwable {\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, true, true);\n ClassWriter classWriter0 = new ClassWriter((-1878));\n classWriter0.addType(\"\");\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n String[] stringArray0 = new String[4];\n stringArray0[0] = \"\\\"\";\n stringArray0[1] = \"\\\"\";\n classWriter0.newLong(0L);\n stringArray0[2] = \"\";\n stringArray0[3] = \"\\\"\";\n classWriter0.newClass(\"\\\"\");\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-1878), \"\", \"<T'RwU+).UKJX>\", \"\", stringArray0, true, true);\n methodWriter0.visitAnnotation(\"\", true);\n methodWriter0.visitFieldInsn(1, \"\\\"\", \"char\", \"3<|siktz\");\n Label label0 = new Label();\n String string0 = label0.toString();\n assertEquals(\"L23\", string0);\n \n ByteVector byteVector0 = classWriter0.pool;\n methodWriter0.signature = \"\";\n methodWriter0.getSize();\n methodWriter0.visitFieldInsn(102, \"char\", \"Code\", \"\");\n methodWriter0.visitLocalVariable(\"\\\"\", \"Code\", \"7,9%\\\"lXhsy+;K+!\", label0, label0, 16777239);\n int int0 = methodWriter0.getSize();\n assertEquals(116, int0);\n }",
"@Override\n\tprotected String toMips(Scope symbolTable, String indent) {\n\t\tStringBuilder build = new StringBuilder(indent).append(\"#SubProgramHeadNode\\n\");\n\n\t\t//load ptr to previous stack's head to pick up values\n\t\tbuild.append(indent).append(\"lw $t0, 8($sp)\\n\");\n\t\tbuild.append(indent).append(\"lw $t0, ($t0)\\n\");\n\n\t\t//iterate across arguments\n\t\tfor (int i = 0; i < arguments.length; i++) {\n\t\t\tbuild.append(indent).append(\"lw $t1, \").append((i + 1) * 4).append(\"($t0)\\t#get loaded value from stack\\n\");\n\t\t\tbuild.append(indent).append(\"sw $t1, \").append(symbolTable.getMemoryOffset(arguments[i])).append(\"($sp)\\t#save word in correct spot (hopefully?)\\n\");\t//This is done in SubProgramNode constructor\n\t\t}\n\n\t\treturn build.toString();\n\t}",
"private void swapOut(SwappingProcess p)\n {\n \tint size = p.getSize(), i = 0;\n \tchar name = p.getName();\n \t\n for (; i < memorySize; i++)\n {\n if (mainMemory[i] == name)\n {\n break;\n }\n }\n size += i;\n for (; i < size && i < memorySize; i++)\n {\n mainMemory[i] = '.';\n }\n }",
"public void save(){\n Player temp = Arena.CUR_PLAYER;\n try{\n FileOutputStream outputFile = new FileOutputStream(\"./data.sec\");\n ObjectOutputStream objectOut = new ObjectOutputStream(outputFile);\n objectOut.writeObject(temp);\n objectOut.close();\n outputFile.close();\n }\n catch(FileNotFoundException e){\n System.out.print(\"Cannot create a file at that location\");\n }\n catch(SecurityException e){\n System.out.print(\"Permission Denied!\");\n }\n catch(IOException e){\n System.out.println(\"Error 203\");\n } \n }",
"public void method_2191(class_689 var1, byte var2) {\r\n class_1657 var10000 = this.method_2256();\r\n class_283 var10002 = new class_283;\r\n var10002.method_1635(var1, var2);\r\n var10000.method_9120(var1, var10002);\r\n }",
"@Override\n\tpublic JavaFileObject getJavaFileForOutput(Location location, String className, Kind kind, FileObject sibling) throws IOException\n\t{\n\n\t\tMemoryFileObject file = new MemoryFileObject(className, kind, \"\");\n\n\t\tif (Kind.CLASS.equals(kind))\n\t\t{\n\t\t\tmClassLoader.addFile(file);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new IllegalStateException();\n\t\t}\n\n\t\treturn file;\n\t}"
] | [
"0.54986703",
"0.5362903",
"0.53182566",
"0.524686",
"0.5164923",
"0.5134443",
"0.5132224",
"0.51221",
"0.5117948",
"0.5107276",
"0.51012397",
"0.5098782",
"0.5042294",
"0.50321573",
"0.500858",
"0.5004245",
"0.49994096",
"0.49949932",
"0.4994825",
"0.49704355",
"0.4952268",
"0.49109375",
"0.49081504",
"0.49081504",
"0.48927656",
"0.48897734",
"0.4877673",
"0.48713917",
"0.48689058",
"0.48679462",
"0.48499998",
"0.48463392",
"0.48454514",
"0.4833283",
"0.48290503",
"0.4826369",
"0.48207223",
"0.48138502",
"0.47967637",
"0.47965586",
"0.47936916",
"0.47824398",
"0.47742954",
"0.47712263",
"0.47678608",
"0.47509834",
"0.473542",
"0.47305694",
"0.47139895",
"0.47045833",
"0.4696507",
"0.46863663",
"0.4677542",
"0.466161",
"0.46596238",
"0.46582118",
"0.46558613",
"0.46507943",
"0.4636485",
"0.46271366",
"0.46218452",
"0.46216807",
"0.46189135",
"0.46121064",
"0.4609914",
"0.46092165",
"0.45944074",
"0.45877868",
"0.4584987",
"0.45839208",
"0.4583327",
"0.45684212",
"0.45682895",
"0.45657402",
"0.45597434",
"0.45574948",
"0.4556571",
"0.4545672",
"0.45401403",
"0.45320016",
"0.45304146",
"0.4529477",
"0.452423",
"0.45241898",
"0.4522934",
"0.451162",
"0.45111656",
"0.45096558",
"0.45054758",
"0.45040247",
"0.4503996",
"0.45014825",
"0.4497194",
"0.4496576",
"0.449653",
"0.4494613",
"0.44925115",
"0.44921568",
"0.44919333",
"0.4482777"
] | 0.62966317 | 0 |
makeListing passOne sets up the symbol table with initial value for Labels & symbols | private void passOne() {
// clearDoc(docListing);
int lineNumber;
String sourceLine;
// LineParser lineParser = new LineParser();
SourceLineAnalyzer lineAnalyzer = new SourceLineAnalyzer();
SourceLineParts sourceLineParts;
Scanner scannerPassOne = new Scanner(tpSource.getText());
while (scannerPassOne.hasNextLine()) {
sourceLine = scannerPassOne.nextLine();
if (sourceLine.equals(EMPTY_STRING)) {
continue;
} // if skip textbox's empty lines
sourceLineParts = lineAnalyzer.analyze(sourceLine);
if (!sourceLineParts.isLineActive()) {
continue;
} // if skip textbox's empty lines
lineNumber = sourceLineParts.getLineNumber();
allLineParts.add(sourceLineParts);
if (sourceLineParts.hasLabel()) {
processLabel(sourceLineParts, lineNumber);
} // if - has label
if (sourceLineParts.hasInstruction()) {
instructionCounter.incrementCurrentLocation(sourceLineParts.getOpCodeSize());
} // if instruction
if (sourceLineParts.hasDirective()) {
processDirectiveForLineCounter(sourceLineParts, lineNumber);
} // if directives
if (sourceLineParts.hasName()) {
processSymbol(sourceLineParts, lineNumber);
} // if has symbol
// displayStuff(lineParser);
} // while
SymbolTable.passOneDone();
scannerPassOne.close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private SequentialSearchSymbolTable() {\n\t\t\tkeySet = new ArrayList<>();\n\t\t\tvalueSet = new ArrayList<>();\n\t\t\tsize = 0;\n\t\t}",
"public SymbolTable(){\r\n\t\tthis(INIT_CAPACITY);\r\n\t}",
"public SymbolTable()\r\n {\r\n // Create the tables stack and add the top level\r\n tables = new ArrayDeque<HashMap<String,T>>();\r\n tables.add( new HashMap<String,T>() );\r\n \r\n // Ditto with the counts\r\n counts = new ArrayDeque<Integer>();\r\n counts.add( 0 );\r\n }",
"SymTable() {\n\t\tmap = new HashMap<String, Sym>();\n\t\tlist.add(map);\n\t}",
"public void genLists() {\n\t}",
"private void buildSymbolTables() {\n new SymbolsTableBuilder(data).read(this);//.dump();\n }",
"public SymbolTableEntry(){\n\t}",
"public BSTSymbolTable()\r\n\t{\r\n\t\tdata = new IterativeBinarySearchTree<Entry>();\r\n\t}",
"@Override\n\t\tpublic void inAListExpr(AListExpr node) {\n\t\t\ttry {\t\n\t\t\t\t if(node.getExpr().toString().contains(\"String\")){\n\t\t\t\t\t symbolTable.put(node.getExpr().toString(), klasses.get(\"String\"));\n\t\t\t\t }\n\t\t\t\t if(node.getExpr().toString().contains(\"Bool\")){\n\t\t\t\t\t symbolTable.put(node.getExpr().toString(), klasses.get(\"Bool\"));\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t}\n\t\t\t\t if(node.getExpr().toString().contains(\"Int\")){\n\t\t\t\t\t symbolTable.put(node.getExpr().toString(), klasses.get(\"Int\"));\n\t\t\t\t\t \n\t\t\t\t }\n\t\t\t\t if(node.getExpr().toString().contains(\"IO\")){\n\t\t\t\t\t symbolTable.put(node.getExpr().toString(), klasses.get(\"IO\"));\n\t\t\t\t }\n\t\t\t\t if(node.getExpr().toString().contains(\"Error\")){\n\t\t\t\t\t symbolTable.put(node.getExpr().toString(), klasses.get(\"Error\"));\n\t\t\t\t\t\t\t\t \n\t\t\t\t }\n\t\t\t\t if(node.getExpr().toString().contains(\"void\")){\n\t\t\t\t\t symbolTable.put(node.getExpr().toString(), klasses.get(\"void\"));\n\t\t\t\t\t \n\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t}catch(SemanticException e) {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t}",
"public void setSymbolTable(SymbolTable st) {\n\t this.st = st;\n\t }",
"private static final String renderStateAsSymbolList(Set<GdlSentence> theState) {\n\t\tString s = \"( \";\n\t\tfor (GdlSentence sent : theState) {\n\t\t\tString sentString = sent.toString();\n\t\t\ts += sentString.substring(6, sentString.length() - 2).trim() + \" \";\n\t\t}\n\t\treturn s + \")\";\n\t}",
"private void createListingFile(boolean listingEnabled) throws IOException {\r\n if (listingEnabled) {\r\n try {\r\n // instantiate the File object and creates a new file with extension lst\r\n System.out.println(\"Currently generating the listing file.....\"); //prompts user file is being created\r\n listingFile = new File(sourceName + \".lst\");\r\n // if creating the lst file is successful, then you can start to write in the lst file\r\n listingFile.delete();\r\n if (listingFile.createNewFile()) {\r\n\r\n\r\n writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(sourceName + \".lst\"), \"utf-8\")); //create an object to write into the lst file\r\n String header = String.format(\"%-16s %-16s %-16s %-16s %-16s %-16s %-16s %-16s\", \"Line\",\"Addr\",\"Machine Inst\",\"Machine Operand\", \"Label\",\"Assembly Code\", \"Label Operand\", \"Comments\"); // s string of the categories of the column\r\n writer.write(header + \"\\n\"); // prints the header\r\n\r\n // create String objects to be reused inside the for loop below\r\n String lineAddress;\r\n String label1;\r\n String opCode;\r\n String offset;\r\n String address;\r\n String address1=\"\";\r\n String label2;\r\n String assembly;\r\n String comment;\r\n String linout;\r\n String string;\r\n //String binary;\r\n // a vector of all the line statement\r\n String operand=\"\";\r\n\r\n LineStmt myLine;\r\n // loops through the vector to get each linestatement\r\n\r\n for (int index = 0; index < lineStatements.size(); index++) {\r\n LineStmt line = lineStatements.getLine(index);\r\n lineAddress = String.format(\"%02X\", line.lineAddress.getAddress());\r\n if (line.inst != null) {\r\n operand=address=offset=\"\";\r\n opCode = (line.inst.isOpcodeNull()) ? \"\" : String.format(\"%02X\", line.inst.getOpCode());\r\n\r\n offset = (line.inst.getOffset() == null) ? \"\" : String.format(\"%02X\", line.inst.getOffset().getOffset());\r\n if(offset.length()>2)\r\n offset = offset.substring(offset.length() - 2);\r\n\r\n address = (line.inst.getAddress() == null) ? \"\" : String.format(\"%04X\", line.inst.getAddress().getAddress());\r\n if(address.length()>4)\r\n address = address.substring(address.length() - 4);\r\n if(0< line.inst.getOpCode()&&line.inst.getOpCode() < 0xB0 && address.length()>2 )\r\n address = address.substring(address.length() - 2);\r\n if(address.length() == 4)\r\n address = address.substring(0,2)+\" \"+address.substring(2,4);\r\n assembly = line.inst.getMnemonic();\r\n label2 = (line.inst.getLabel() == null) ? \"\" : line.inst.getLabel().getLabelId();\r\n if(offset.isEmpty())\r\n operand=address;\r\n else\r\n operand =offset;\r\n\r\n generate = generate + \" \" +opCode.strip()+\" \"+address.strip()+\" \"+offset.strip();\r\n if (line.inst.isOpcodeNull()) {\r\n label2 = line.inst.getDirString();\r\n\r\n opCode = generateString(label2);\r\n generate = generate + opCode;\r\n }\r\n\r\n\r\n } else\r\n opCode = offset = address = label2 = assembly = \"\";\r\n\r\n label1 = (line.label == null) ? \" \" : line.label.getLabelId();\r\n comment = (line.comment == null) ? \"\" : line.comment.getCommentString();\r\n linout =\"\";\r\n\r\n linout = String.format(\"%-16s %-16s %-16s %-16s %-16s %-16s %-16s %-16s\", Integer.toString(index + 1), lineAddress, opCode, operand,label1,assembly,label2,comment);\r\n linout += \"\\n\";\r\n System.out.print(linout);\r\n if(listingEnabled)\r\n writer.write(linout); // inserts the line into the lst file+ \"\\t\\t\\t\\t\"\r\n\r\n }\r\n generate = generate.trim().replaceAll(\"\\\\s{2,}\", \" \");\r\n System.out.print(\"Generate: \"+generate);\r\n if(listingEnabled)\r\n writer.write(\"Generate: \"+generate);\r\n writer.close();\r\n }\r\n } catch (IOException e) {\r\n System.out.println(\"Error: Listing File cannot be made.\");\r\n }\r\n }\r\n }",
"private void refreshListContent() {\n\t\t//remove any label not associated with the given card, so the list reflects\n\t\t// only labels associated with all cards \n\t\tArrayList<String> labels = Card.removeStringsFromList(\n\t\t\t\tnew ArrayList<String>(cards[0].labels), \n\t\t\t\tCard.getAutoLabels());\n\t\tArrayList<String> toRemove = new ArrayList<String>();\n\t\tfor( Card c : cards ){\n\t\t\ttoRemove.clear();\n\t\t\tfor( String s : labels ){\n\t\t\t\tif( !c.labels.contains(s) )\n\t\t\t\t\ttoRemove.add(s);\n\t\t\t}\n\t\t\tlabels.removeAll(toRemove);\n\t\t\tif( labels.isEmpty() ) break;\n\t\t}\n\t\t\n\t\t//create prototype cell\n\t\tString longest = \"\";\n\t\tfor( String s : labels ) if( s.length() > longest.length() ) longest = s;\n\t\tlabelsList.setPrototypeCellValue(longest + \"WWW\"); //add some buffer room for readability\n\t\t\n\t\tlabelsList.setListData(labels.toArray(new String[0]));\n\t\tArrayList<String> remainingLabels = Card.removeStringsFromList(\n\t\t\t\tnew ArrayList<String>(Arrays.asList(dataManager.getLabels())), \n\t\t\t\tCard.getAutoLabels());\n\t\tremainingLabels.remove(Card.ALL);\n\t\tremainingLabels.removeAll(labels);\n\t\tnewLabelBox.removeAllItems();\n\t\tCollections.sort(remainingLabels);\n\t\tfor( String label : remainingLabels ){\n\t\t\tnewLabelBox.addItem(label);\n\t\t}\n\t}",
"public SymbolTable() {\n scopes = new ArrayList<>();\n currentScopeLevel = NO_SCOPE;\n }",
"public SymbolTable(Program program) {\n tableValid = true;\n this.parentSymbolTable = null;\n this.entries = new HashMap<>();\n SymbolTableBuilder stb = new SymbolTableBuilder(program, this);\n if (!stb.isBuildSuccessful()) {\n tableValid = false;\n }\n }",
"void print() {\n\n\t\t// Print \"Sym Table\"\n\t\tSystem.out.print(\"\\nSym Table\\n\");\n\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tHashMap<String, Sym> M = list.get(i);\n\t\t\t// Print each HashMap in list\n\t\t\tSystem.out.print(String.format(M.toString() + \"\\n\"));\n\t\t}\n\n\t\t// Print New Line\n\t\tSystem.out.println();\n\t}",
"public Symbol(Hashtable symbols,String name,int value,int type) {\n\tthis.name = name;\n\tthis.value = value;\n\tthis.type = type;\n\tmdefs = new Vector();\n\tif (symbols != null) symbols.put(name,this);\n }",
"public void generate (java.util.Hashtable symbolTable, com.sun.tools.corba.se.idl.SymtabEntry entry)\n {\n this.symbolTable = symbolTable;\n this.entry = entry;\n init ();\n\n openStream ();\n if (stream == null)\n return;\n writeHeading ();\n writeBody ();\n writeClosing ();\n closeStream ();\n }",
"public SymbolTable(int size) {\n table = new Hashtable<String, SymbolTableEntry>(size);\n }",
"@SuppressWarnings(\"unused\")\n private void initSymbolTable() {\n MethodType I_V = new MethodType(Type.Int, Type.Void);\n MethodType I_R = new MethodType(Type.Int, Type.Real);\n MethodType I_S = new MethodType(Type.Int, Type.String);\n MethodType I_D = new MethodType(Type.Int, Type.NodeSet);\n MethodType R_I = new MethodType(Type.Real, Type.Int);\n MethodType R_V = new MethodType(Type.Real, Type.Void);\n MethodType R_R = new MethodType(Type.Real, Type.Real);\n MethodType R_D = new MethodType(Type.Real, Type.NodeSet);\n MethodType R_O = new MethodType(Type.Real, Type.Reference);\n MethodType I_I = new MethodType(Type.Int, Type.Int);\n MethodType D_O = new MethodType(Type.NodeSet, Type.Reference);\n MethodType D_V = new MethodType(Type.NodeSet, Type.Void);\n MethodType D_S = new MethodType(Type.NodeSet, Type.String);\n MethodType D_D = new MethodType(Type.NodeSet, Type.NodeSet);\n MethodType A_V = new MethodType(Type.Node, Type.Void);\n MethodType S_V = new MethodType(Type.String, Type.Void);\n MethodType S_S = new MethodType(Type.String, Type.String);\n MethodType S_A = new MethodType(Type.String, Type.Node);\n MethodType S_D = new MethodType(Type.String, Type.NodeSet);\n MethodType S_O = new MethodType(Type.String, Type.Reference);\n MethodType B_O = new MethodType(Type.Boolean, Type.Reference);\n MethodType B_V = new MethodType(Type.Boolean, Type.Void);\n MethodType B_B = new MethodType(Type.Boolean, Type.Boolean);\n MethodType B_S = new MethodType(Type.Boolean, Type.String);\n MethodType D_X = new MethodType(Type.NodeSet, Type.Object);\n MethodType R_RR = new MethodType(Type.Real, Type.Real, Type.Real);\n MethodType I_II = new MethodType(Type.Int, Type.Int, Type.Int);\n MethodType B_RR = new MethodType(Type.Boolean, Type.Real, Type.Real);\n MethodType B_II = new MethodType(Type.Boolean, Type.Int, Type.Int);\n MethodType S_SS = new MethodType(Type.String, Type.String, Type.String);\n MethodType S_DS = new MethodType(Type.String, Type.Real, Type.String);\n MethodType S_SR = new MethodType(Type.String, Type.String, Type.Real);\n MethodType O_SO = new MethodType(Type.Reference, Type.String, Type.Reference);\n\n MethodType D_SS =\n new MethodType(Type.NodeSet, Type.String, Type.String);\n MethodType D_SD =\n new MethodType(Type.NodeSet, Type.String, Type.NodeSet);\n MethodType B_BB =\n new MethodType(Type.Boolean, Type.Boolean, Type.Boolean);\n MethodType B_SS =\n new MethodType(Type.Boolean, Type.String, Type.String);\n MethodType S_SD =\n new MethodType(Type.String, Type.String, Type.NodeSet);\n MethodType S_DSS =\n new MethodType(Type.String, Type.Real, Type.String, Type.String);\n MethodType S_SRR =\n new MethodType(Type.String, Type.String, Type.Real, Type.Real);\n MethodType S_SSS =\n new MethodType(Type.String, Type.String, Type.String, Type.String);\n\n /*\n * Standard functions: implemented but not in this table concat().\n * When adding a new function make sure to uncomment\n * the corresponding line in <tt>FunctionAvailableCall</tt>.\n */\n\n // The following functions are inlined\n\n _symbolTable.addPrimop(\"current\", A_V);\n _symbolTable.addPrimop(\"last\", I_V);\n _symbolTable.addPrimop(\"position\", I_V);\n _symbolTable.addPrimop(\"true\", B_V);\n _symbolTable.addPrimop(\"false\", B_V);\n _symbolTable.addPrimop(\"not\", B_B);\n _symbolTable.addPrimop(\"name\", S_V);\n _symbolTable.addPrimop(\"name\", S_A);\n _symbolTable.addPrimop(\"generate-id\", S_V);\n _symbolTable.addPrimop(\"generate-id\", S_A);\n _symbolTable.addPrimop(\"ceiling\", R_R);\n _symbolTable.addPrimop(\"floor\", R_R);\n _symbolTable.addPrimop(\"round\", R_R);\n _symbolTable.addPrimop(\"contains\", B_SS);\n _symbolTable.addPrimop(\"number\", R_O);\n _symbolTable.addPrimop(\"number\", R_V);\n _symbolTable.addPrimop(\"boolean\", B_O);\n _symbolTable.addPrimop(\"string\", S_O);\n _symbolTable.addPrimop(\"string\", S_V);\n _symbolTable.addPrimop(\"translate\", S_SSS);\n _symbolTable.addPrimop(\"string-length\", I_V);\n _symbolTable.addPrimop(\"string-length\", I_S);\n _symbolTable.addPrimop(\"starts-with\", B_SS);\n _symbolTable.addPrimop(\"format-number\", S_DS);\n _symbolTable.addPrimop(\"format-number\", S_DSS);\n _symbolTable.addPrimop(\"unparsed-entity-uri\", S_S);\n _symbolTable.addPrimop(\"key\", D_SS);\n _symbolTable.addPrimop(\"key\", D_SD);\n _symbolTable.addPrimop(\"id\", D_S);\n _symbolTable.addPrimop(\"id\", D_D);\n _symbolTable.addPrimop(\"namespace-uri\", S_V);\n _symbolTable.addPrimop(\"function-available\", B_S);\n _symbolTable.addPrimop(\"element-available\", B_S);\n _symbolTable.addPrimop(\"document\", D_S);\n _symbolTable.addPrimop(\"document\", D_V);\n\n // The following functions are implemented in the basis library\n _symbolTable.addPrimop(\"count\", I_D);\n _symbolTable.addPrimop(\"sum\", R_D);\n _symbolTable.addPrimop(\"local-name\", S_V);\n _symbolTable.addPrimop(\"local-name\", S_D);\n _symbolTable.addPrimop(\"namespace-uri\", S_V);\n _symbolTable.addPrimop(\"namespace-uri\", S_D);\n _symbolTable.addPrimop(\"substring\", S_SR);\n _symbolTable.addPrimop(\"substring\", S_SRR);\n _symbolTable.addPrimop(\"substring-after\", S_SS);\n _symbolTable.addPrimop(\"substring-before\", S_SS);\n _symbolTable.addPrimop(\"normalize-space\", S_V);\n _symbolTable.addPrimop(\"normalize-space\", S_S);\n _symbolTable.addPrimop(\"system-property\", S_S);\n\n // Extensions\n _symbolTable.addPrimop(\"nodeset\", D_O);\n _symbolTable.addPrimop(\"objectType\", S_O);\n _symbolTable.addPrimop(\"cast\", O_SO);\n\n // Operators +, -, *, /, % defined on real types.\n _symbolTable.addPrimop(\"+\", R_RR);\n _symbolTable.addPrimop(\"-\", R_RR);\n _symbolTable.addPrimop(\"*\", R_RR);\n _symbolTable.addPrimop(\"/\", R_RR);\n _symbolTable.addPrimop(\"%\", R_RR);\n\n // Operators +, -, * defined on integer types.\n // Operators / and % are not defined on integers (may cause exception)\n _symbolTable.addPrimop(\"+\", I_II);\n _symbolTable.addPrimop(\"-\", I_II);\n _symbolTable.addPrimop(\"*\", I_II);\n\n // Operators <, <= >, >= defined on real types.\n _symbolTable.addPrimop(\"<\", B_RR);\n _symbolTable.addPrimop(\"<=\", B_RR);\n _symbolTable.addPrimop(\">\", B_RR);\n _symbolTable.addPrimop(\">=\", B_RR);\n\n // Operators <, <= >, >= defined on int types.\n _symbolTable.addPrimop(\"<\", B_II);\n _symbolTable.addPrimop(\"<=\", B_II);\n _symbolTable.addPrimop(\">\", B_II);\n _symbolTable.addPrimop(\">=\", B_II);\n\n // Operators <, <= >, >= defined on boolean types.\n _symbolTable.addPrimop(\"<\", B_BB);\n _symbolTable.addPrimop(\"<=\", B_BB);\n _symbolTable.addPrimop(\">\", B_BB);\n _symbolTable.addPrimop(\">=\", B_BB);\n\n // Operators 'and' and 'or'.\n _symbolTable.addPrimop(\"or\", B_BB);\n _symbolTable.addPrimop(\"and\", B_BB);\n\n // Unary minus.\n _symbolTable.addPrimop(\"u-\", R_R);\n _symbolTable.addPrimop(\"u-\", I_I);\n }",
"Sym lookupLocal(String name) throws EmptySymTableException {\n\n\t\tfirstMap = list.getFirst(); // First hashmap in list\n\n\t\t// if SymTable's list empty, throw Empty\n\t\tif (list.isEmpty()) {\n\t\t\tthrow new EmptySymTableException();\n\t\t} else { // else, if the first HashMap in list contains name as key\n\t\t\tsym = firstMap.get(name);// return associated sym\n\t\t}\n\t\treturn sym;\n\t}",
"public SymbolChecking(){\n\t\t\ttop=null;\n\t\t\tlength=0;\n\t\t}",
"private void initSimpleTable(){\n List<Names> balloonVisibilityList = new ArrayList<Names>();\n balloonVisibilityList.add(Extensions.Names.FEATURE);\n\n List<Names> hList = new ArrayList<Names>();\n hList.add(Extensions.Names.BASIC_LINK);\n\n List<Names> wList = new ArrayList<Names>();\n wList.add(Extensions.Names.BASIC_LINK);\n\n List<Names> xList = new ArrayList<Names>();\n xList.add(Extensions.Names.BASIC_LINK);\n\n List<Names> yList = new ArrayList<Names>();\n yList.add(Extensions.Names.BASIC_LINK);\n\n simpleTable.put(GxConstants.TAG_BALLOON_VISIBILITY, balloonVisibilityList);\n simpleTable.put(GxConstants.TAG_H, hList);\n simpleTable.put(GxConstants.TAG_W, wList);\n simpleTable.put(GxConstants.TAG_X, xList);\n simpleTable.put(GxConstants.TAG_Y, yList);\n }",
"public void creatList()\n\t{\n\t\tbowlers.add(new Bowler(\"A\",44));\n\t\tbowlers.add(new Bowler(\"B\",25));\n\t\tbowlers.add(new Bowler(\"C\",2));\n\t\tbowlers.add(new Bowler(\"D\",10));\n\t\tbowlers.add(new Bowler(\"E\",6));\n\t}",
"public SymbolTable() {\n\t\tclassScope = new Hashtable<String, Values>();\n\t\tsubScope = new Hashtable<String, Values>();\n\t\tcurrScope = classScope;\n\t\tsubArgIdx = 0;\n\t\tsubVarIdx = 0;\n\t\tclassStaticIdx = 0;\n\t\tclassFieldIdx = 0;\n\t}",
"private void assignLabelTolist() {\n this.labelList.add(matchLabel1);\n this.labelList.add(matchLabel2);\n this.labelList.add(matchLabel3);\n this.labelList.add(matchLabel4);\n this.labelList.add(matchLabel5);\n }",
"private Symbol(String label)\n {\n this.label = label;\n this.numArgs = 0;\n }",
"private static void afftabSymb() { \r\n\t\tSystem.out.println(\" code categorie type info\");\r\n\t\tSystem.out.println(\" |--------------|--------------|-------|----\");\r\n\t\tfor (int i = 1; i <= it; i++) {\r\n\t\t\tif (i == bc) {\r\n\t\t\t\tSystem.out.print(\"bc=\");\r\n\t\t\t\tEcriture.ecrireInt(i, 3);\r\n\t\t\t} else if (i == it) {\r\n\t\t\t\tSystem.out.print(\"it=\");\r\n\t\t\t\tEcriture.ecrireInt(i, 3);\r\n\t\t\t} else\r\n\t\t\t\tEcriture.ecrireInt(i, 6);\r\n\t\t\tif (tabSymb[i] == null)\r\n\t\t\t\tSystem.out.println(\" référence NULL\");\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\" \" + tabSymb[i]);\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}",
"private void updateBundleLabelList() {\n List<String> selection = Utils.jListGetValuesWrapper(bundle_label_list);\n List<String> items = new ArrayList<String>();\n // Go through all of the header fields and add them with their variations\n boolean tags_present = false;\n BundlesG globals = getRTParent().getRootBundles().getGlobals();\n Iterator<String> it = globals.fieldIterator();\n while (it.hasNext()) {\n String fld = it.next(); int fld_i = globals.fieldIndex(fld);\n if (globals.isScalar(fld_i)) {\n items.add(fld + SIMPLESTAT_LM);\n\titems.add(fld + COMPLEXSTAT_LM);\n } else if (fld.equals(\"tags\")) {\n tags_present = true;\n } else {\n items.add(fld + ITEMS_LM);\n\titems.add(fld + COUNT_LM);\n }\n BundlesDT.DT datatype = globals.getFieldDataType(fld_i);\n if (globals.isScalar(fld_i) == false && datatype == BundlesDT.DT.INTEGER) datatype = null;\n if (datatype != null) {\n String appends[] = BundlesDT.dataTypeVariations(datatype, globals);\n\tfor (int i=0;i<appends.length;i++) items.add(fld + BundlesDT.DELIM + appends[i]);\n }\n }\n Collections.sort(items, new CaseInsensitiveComparator());\n // Add the tag options at the end\n if (tags_present) {\n items.add(\"tags\" + ITEMS_LM);\n items.add(\"tags\" + BundlesDT.MULTI + ITEMS_LM);\n items.add(\"tags\" + BundlesDT.MULTI + COUNT_LM);\n Iterator<String> it2 = globals.tagTypeIterator();\n while (it2.hasNext()) {\n String tag_type = it2.next();\n items.add(\"tags\" + BundlesDT.MULTI + BundlesDT.DELIM + tag_type + ITEMS_LM);\n items.add(\"tags\" + BundlesDT.MULTI + BundlesDT.DELIM + tag_type + COUNT_LM);\n }\n }\n // Insert the default items\n items.add(0, TIMEFRAME_LM);\n items.add(0, LASTHEARD_LM);\n items.add(0, FIRSTHEARD_LM);\n items.add(0, BUNDLECOUNT_LM);\n // Convert and update the list\n setListAndResetSelection(bundle_label_list, items, selection);\n }",
"@Override\r\n public void linkToSymbol(HashMap<Symbol, SymbolTableEntry> table) {\r\n // link id1\r\n if (id1 != null) {\r\n ste1 = linkIdToSTE(id1, table);\r\n }\r\n // link id3\r\n if (id3 != null) {\r\n ste3 = linkIdToSTE(id3, table);\r\n }\r\n }",
"public static void initSymbol(String fileName, Parser parser, SymbolTable symbol) {\n\n //add the R0,R1 ...\n for (int i = 0; i < 16; i++) {\n symbol.addEntry(\"R\" + i, i);\n }\n\n //add the save symbols\n symbol.addEntry(\"SCREEN\", 16384);\n symbol.addEntry(\"KBD\", 24576);\n symbol.addEntry(\"SP\", 0);\n symbol.addEntry(\"LCL\", 1);\n symbol.addEntry(\"ARG\", 2);\n symbol.addEntry(\"THIS\", 3);\n symbol.addEntry(\"THAT\", 4);\n\n int counterCommands = 0;\n List<String> symbolToAdd = new ArrayList<String>();\n //add the label command\n while (parser.hasMoreCommands()) {\n parser.advance();\n String type = parser.commandType();\n if (!type.equals(\"L_COMMAND\")) {\n if (symbolToAdd.size() > 0) {\n for (String s : symbolToAdd) {\n symbol.addEntry(s, counterCommands);\n }\n if (symbolToAdd.size() > 0) {\n symbolToAdd.subList(0, symbolToAdd.size()).clear();\n }\n }\n counterCommands++;\n }\n if (type.equals(\"L_COMMAND\")) {\n symbolToAdd.add(parser.symbol());\n }\n }\n\n }",
"private void fillLabelsTabel() {\n }",
"public SymTable nameAnalysis(SymTable workingSymTable)\n throws IllegalArgumentException, DuplicateSymException, EmptySymTableException {\n if (workingSymTable.lookupLocal(myId.getStrVal()) != null) {\n //process the stuff inside without adding to the symtable\n workingSymTable.addScope();\n myFormalsList.nameAnalysis(workingSymTable);\n myBody.nameAnalysis(workingSymTable);\n workingSymTable.removeScope();\n } else {\n workingSymTable.addDecl(myId.getStrVal(), new FnSym(myType.strVal(), myFormalsList.getFormalListSym()));\n workingSymTable.addScope();\n workingSymTable = myFormalsList.nameAnalysis(workingSymTable);\n workingSymTable = myBody.nameAnalysis(workingSymTable);\n workingSymTable.removeScope();\n }\n return workingSymTable;\n }",
"public ArrayList<Integer> createList(){\r\n \tArrayList<Integer> test = new ArrayList<>();\r\n \tstarLabels = new ArrayList<>();\r\n \tconstLabels = new ArrayList<>();\r\n \tplanetLabels = new ArrayList<>();\r\n \tmesrLabels = new ArrayList<>();\r\n \tmoonLabel = new ArrayList<>();\r\n \t\r\n \tint a = 0;\r\n \tint b = 1;\r\n \tint c = 2;\r\n \tint d = 3;\r\n \t\r\n \tint size;\r\n \t\r\n \t//Go through the spaceobjectlist\r\n \tfor(int i = 0; i < AlexxWork2.spaceObjList.size(); i++) {\r\n \t\t\r\n \t\t//If object is visible and object has positive altitude continue\r\n \t\tif(AlexxWork2.spaceObjList.get(i).getMagnitude() != null \r\n \t\t\t\t&& (Double.valueOf(AlexxWork2.spaceObjList.get(i).getMagnitude()) <= 6.0) \r\n \t\t\t\t&& AlexxWork2.spaceObjList.get(i).getAltitude() > 0.5) {\r\n\t \t\t\r\n \t\t\t\r\n \t\t\t//Calculate X and Y\r\n \t\t\tint x = getX(2250, 2250, 1000, \r\n \t\t\t\t\t(int)AlexxWork2.spaceObjList.get(i).getAzimuth(), \r\n \t\t\t\t\t(int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n \t\t\t\r\n\t\t\t\tint y = getY(2250, 2250, 1000, \r\n\t\t\t\t\t\t(int)AlexxWork2.spaceObjList.get(i).getAzimuth(), \r\n\t\t\t\t\t\t(int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n\t\t\t\t\r\n\t\t\t\t//Load stars\r\n\t\t\t\tif(AlexxWork2.spaceObjList.get(i).getType() == \"STAR\" \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getProperName() != null \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getProperName() != \"\") {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(AlexxWork2.starNamesCB \r\n\t\t\t\t\t\t\t&& Double.valueOf(AlexxWork2.spaceObjList.get(i).getMagnitude()) <= 6.0) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t//Filter out number only star names\r\n\t\t\t\t\t\t\tint testInt = Integer.parseInt(AlexxWork2.spaceObjList.get(i).getProperName());\r\n\t\t\t\t\t\t\t} catch (NumberFormatException | NullPointerException nfe) {\r\n\t\t\t\t\t\t\t\tstarLabels.add(AlexxWork2.spaceObjList.get(i).getProperName());\r\n\t\t\t\t\t\t\t\tstarLabels.add(String.valueOf(x));\r\n\t\t\t\t\t\t\t\tstarLabels.add(String.valueOf(y));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Load constellation data\r\n\t\t\t\t\tif(herculesNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tString name = AlexxWork2.spaceObjList.get(i).getProperName();\r\n\t\t\t\t\t\tloadHerculesLocation(name, x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(ursaMinorNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tString name = AlexxWork2.spaceObjList.get(i).getProperName();\r\n\t\t\t\t\t\tloadUrsaMinorLocation(name, x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(ursaMajorNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tString name = AlexxWork2.spaceObjList.get(i).getProperName();\r\n\t\t\t\t\t\tloadUrsaMajorLocation(name, x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(libraNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tString name = AlexxWork2.spaceObjList.get(i).getProperName();\r\n\t\t\t\t\t\tloadLibraLocation(name, x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(andromedaNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadAndromedaLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(aquariusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadAquariusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(aquilaNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadAquilaLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(ariesNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadAriesLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(aurigaNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadAurigaLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(bootesNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadBootesLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(cancerNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCancerLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(canisMajorNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCanisMajorLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(canisMinorNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCanisMinorLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(capricornusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCapricornusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(cassiopeiaNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCassiopeiaLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(centaurusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCentaurusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(cepheusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCepheusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(cruxNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCruxLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(cygnusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCygnusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(dracoNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadDracoLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(geminiNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadGeminiLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(hydraNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadHydraLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(leoNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadLeoLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(lyraNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadLyraLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(orionNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadOrionLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(pegasusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadPegasusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(perseusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadPerseusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(piscesNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadPiscesLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(sagittariusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadSagittariusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(scorpioNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadScorpioLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(taurusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadTaurusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//Add coordinates to list\r\n\t \t\ttest.add(a, x);\r\n\t \t\ttest.add(b, y);\r\n\t \t\t\r\n\t \t\t//Add moon information if visible\r\n\t \t\tif(AlexxWork2.spaceObjList.get(i).getProperName() == \"MOON\") {\r\n size = 22;\r\n String moonName = AlexxWork2.spaceObjList.get(i).getProperName() + \": \" + AlexxWork2.spaceObjList.get(i).getType();\r\n moonLabel.add(0, moonName);\r\n moonLabel.add(1, String.valueOf(x));\r\n moonLabel.add(2, String.valueOf(y));\r\n }\r\n\t \t\t\r\n\t \t\t//If object is planet, set the size\r\n\t \t\telse if(AlexxWork2.spaceObjList.get(i).getType() == \"PLAN\"){\r\n\t \t\t\tsize = 16;\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\t//Else set size based on mag\r\n\t \t\telse{\r\n\t \t\t\tsize = getSize(Double.valueOf(AlexxWork2.spaceObjList.get(i).getMagnitude()));\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\t//Add size to list\r\n\t \t\ttest.add(c, size);\r\n\t \t\ttest.add(d, size);\r\n\t \t\ta = d + 1;\r\n\t \t\tb = a + 1;\r\n\t \t\tc = b + 1;\r\n\t \t\td = c + 1;\r\n \t\t}\r\n \t\t\r\n \t\t//Load constellation labels\r\n \t\tif(AlexxWork2.constellationsCB) {\r\n\t\t\t\tif(AlexxWork2.spaceObjList.get(i).getType() == \"CONST\" \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getConstName() != null \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getConstName() != \"\"\r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getAltitude() > 1) {\r\n\t\t\t\t\tint x = getX(2250, 2250, 1000, (int)AlexxWork2.spaceObjList.get(i).getAzimuth(), (int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n\t\t\t\t\tint y = getY(2250, 2250, 1000, (int)AlexxWork2.spaceObjList.get(i).getAzimuth(), (int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tconstLabels.add(AlexxWork2.spaceObjList.get(i).getConstName());\r\n\t\t\t\t\tconstLabels.add(String.valueOf(x));\r\n\t\t\t\t\tconstLabels.add(String.valueOf(y));\r\n\t\t\t\t}\r\n\t\t\t}\r\n \t\t\r\n \t\t//Load planet labels\r\n \t\tif(AlexxWork2.planetsCB) {\r\n\t\t\t\tif(AlexxWork2.spaceObjList.get(i).getType() == \"PLAN\" \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getProperName() != null \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getProperName() != \"\"\r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getAltitude() > 1) {\r\n\t\t\t\t\tint x = getX(2250, 2250, 1000, (int)AlexxWork2.spaceObjList.get(i).getAzimuth(), (int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n\t\t\t\t\tint y = getY(2250, 2250, 1000, (int)AlexxWork2.spaceObjList.get(i).getAzimuth(), (int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tplanetLabels.add(AlexxWork2.spaceObjList.get(i).getProperName());\r\n\t\t\t\t\tplanetLabels.add(String.valueOf(x));\r\n\t\t\t\t\tplanetLabels.add(String.valueOf(y));\r\n\t\t\t\t}\r\n\t\t\t}\r\n \t\t\r\n \t\t//Load messier labels\r\n \t\tif(AlexxWork2.messierCB) {\r\n\t\t\t\tif(AlexxWork2.spaceObjList.get(i).getType() == \"MESR\" \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getProperName() != null \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getProperName() != \"\"\r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getAltitude() > 1) {\r\n\t\t\t\t\tint x = getX(2250, 2250, 1000, (int)AlexxWork2.spaceObjList.get(i).getAzimuth(), (int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n\t\t\t\t\tint y = getY(2250, 2250, 1000, (int)AlexxWork2.spaceObjList.get(i).getAzimuth(), (int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tmesrLabels.add(AlexxWork2.spaceObjList.get(i).getProperName());\r\n\t\t\t\t\tmesrLabels.add(String.valueOf(x));\r\n\t\t\t\t\tmesrLabels.add(String.valueOf(y));\r\n\t\t\t\t}\r\n\t\t\t}\r\n \t}\r\n \t\r\n \t//Return list \r\n \treturn test;\r\n }",
"private void fillInTable() {\r\n // Firstly clean up panel.\r\n myOuterPanel.clear();\r\n LabelModel theLabelModel;\r\n for (LabelUUID theLabelUUID : myCaseItem.getLabels()) {\r\n theLabelModel = myLabelDataSource.getLabel(theLabelUUID.getValue());\r\n // The only reason it could be null is that the label has been\r\n // renamed and the case has not yet been updated.\r\n if (theLabelModel != null && theLabelModel.hasToBeDisplayed()) {\r\n // Check if the label has to be displayed.\r\n // Add the label in the panel.\r\n try {\r\n myOuterPanel.add(myLabelTable.get(theLabelUUID.getValue()));\r\n } catch (Exception theE) {\r\n GWT.log(\"label not found: \" + theLabelUUID.getValue() + \",\" + theLabelUUID.getOwner().getValue(), theE);\r\n }\r\n }\r\n }\r\n }",
"public void createHashMap() {\n myList = new HashMap<>();\n scrabbleList = new HashMap<>();\n }",
"public void processLabel(StreamTokenizer st) {\n\t\tif(symtab.searchLabel(st.sval)) {\r\n\t\t\r\n\t\t\tSystem.out.println(st.sval);\r\n\t\t\tSystem.out.println(\"Error: Duplicate Label declaration\");\r\n\t\t}\r\n\t\t//otherwise, insert <st.sval,locctr> into symtab.\r\n\t\telse {\r\n\t\t\tsLocctr = Integer.toHexString(locctr.intValue());\r\n \t\tif (sLocctr.length() == 1) {\r\n \t\t\t\r\n \t\t\tsymtab.setKeyVal(new Key(st.sval,\"000\" + Integer.toHexString(locctr.intValue()),symtab), \"000\" + Integer.toHexString(locctr.intValue()));\r\n \t\t\t\r\n \t\t}\r\n \t\telse if (sLocctr.length() == 2) {\r\n \t\t\tsymtab.setKeyVal(new Key(st.sval,\"00\" + Integer.toHexString(locctr.intValue()),symtab), \"00\" + Integer.toHexString(locctr.intValue()));\r\n \t\t}\r\n \t\telse if (sLocctr.length() == 3 ) {\r\n \t\t\tsymtab.setKeyVal(new Key(st.sval,\"0\" + Integer.toHexString(locctr.intValue()),symtab), \"0\" + Integer.toHexString(locctr.intValue()));\r\n \t\t}\r\n \t\telse {\r\n \t\t\tsymtab.setKeyVal(new Key(st.sval,\"\" + Integer.toHexString(locctr.intValue()),symtab), \"\" + Integer.toHexString(locctr.intValue()));\r\n \t\t}\r\n\t\t}\r\n\t\t/*\r\n\t\ttry {\r\n\t\t\tmyWriter.write(st.sval);\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\tlabelDone = true;\r\n\t}",
"public static void listing5_16() {\n }",
"@Override\n\tpublic void buildSymbolTable(STableI table, Stack<STableI> stStack, int entryLoc, int tableLoc)\n\t\t\tthrows CompileTimeError {\n\t\t\n\t}",
"private void initList(CartInfo ci) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"public static ArrayList<String> labels() {\n\n\t\tArrayList<String> labels = new ArrayList<String>();\t\n\n\t\t//\t\tlabels.add(\t\t\"_store\"\t\t\t\t\t);\n\t\t//\t\tlabels.add(\t\t\"_dept\"\t\t\t\t\t\t);\n\t\t//\t\tlabels.add(\t\t\"_date\"\t\t\t\t\t\t);\n\t\t//\t\tlabels.add(\t\t\"weekly_Sales\"\t\t\t\t);\n\t\tlabels.add(\t\t\"intcpt_or_wklySales\"\t\t);\n\t\tlabels.add(\t\t\"size\"\t\t\t\t\t\t);\n\t\tlabels.add(\t\t\"tempImprovement\"\t\t\t);\n\t\tlabels.add(\t\t\"hotness\"\t\t\t\t\t);\n\t\tlabels.add(\t\t\"coldness\"\t\t\t\t\t);\n\t\tlabels.add(\t\t\"fuel_Price\"\t\t\t\t);\n\t\tlabels.add(\t\t\"gasChange\"\t\t\t\t\t);\n//\t\tlabels.add(\t\t\"markDown1\"\t\t\t\t\t);\n//\t\tlabels.add(\t\t\"markDown2\"\t\t\t\t\t);\n//\t\tlabels.add(\t\t\"markDown3\"\t\t\t\t\t);\n//\t\tlabels.add(\t\t\"markDown4\"\t\t\t\t\t);\n//\t\tlabels.add(\t\t\"markDown5\"\t\t\t\t\t);\n//\t\tlabels.add(\t\t\"markDown1_isNA\"\t\t\t);\n//\t\tlabels.add(\t\t\"markDown2_isNA\"\t\t\t);\n//\t\tlabels.add(\t\t\"markDown3_isNA\"\t\t\t);\n//\t\tlabels.add(\t\t\"markDown4_isNA\"\t\t\t);\n//\t\tlabels.add(\t\t\"markDown5_isNA\"\t\t\t);\n\t\tlabels.add(\t\t\"cpi\"\t\t\t\t\t\t);\n\t\tlabels.add(\t\t\"cpiChange\"\t\t\t\t\t);\n\t\tlabels.add(\t\t\"unemployment\"\t\t\t\t);\n\t\tlabels.add(\t\t\"unemploymentChange\"\t\t);\n\t\tlabels.add(\t\t\"isSuperBowl\"\t\t\t\t);\n\t\tlabels.add(\t\t\"isTGiving\"\t\t\t\t\t);\n\t\tlabels.add(\t\t\"isLaborDay\"\t\t\t\t);\n\t\tlabels.add(\t\t\"isChristmas\"\t\t\t\t);\n\t\tlabels.add(\t\t\"isAfterHoliday\"\t\t\t);\n\t\tlabels.add(\t\t\"isBeforeHoliday\"\t\t\t);\n//\t\tlabels.add(\t\t\"type_A\"\t\t\t\t\t);\n//\t\tlabels.add(\t\t\"type_B\"\t\t\t\t\t);\n//\t\tlabels.add(\t\t\"type_C\"\t\t\t\t\t);\n\n\t\tfor (int i = 0; i < Data.numTypes; i++){\n\t\t\tlabels.add(\"isTypes_\" + Data.typesList.get(i));\n\t\t}\n\n\t\tfor (int i = 0; i < Data.numStores; i++){\n\t\t\tlabels.add(\"isStores_\" + Data.storesList.get(i));\n\t\t}\n//\t\tfor (int i = 0; i < Data.numDepts; i++){\n//\t\t\tlabels.add(\"isDepts_\" + Data.deptsList.get(i));\n//\t\t}\n\t\t\n\t\treturn labels;\n\n\t}",
"public void nameAnalysis(SymTable symTab) { }",
"private void btn1Event(){\n int cnt = Integer.parseInt(tfNum1.getText());\n int i = 0;\n for (i=0; i<cnt; i++){\n list.add(new NumGenA());\n taResults.appendText(String.valueOf(i) + \n \" = \" + String.valueOf(list.get(i).getValue() + \"\\n\"));\n \n lab2.setText(String.valueOf(NumGenA.getCount()));\n }\n }",
"private Label handleLabel(String line, int lineNum, SymbolTable table) {\n\t\tLabel l = new Label(line.substring(1, line.length()-1));\n\t\tl.addToTable(lineNum, table);\n\t\treturn l;\n\t}",
"public static void first_pass(Scanner scan) {\n int line_no = 0;\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n line = line.replace(\":\", \": \");\n line = line.replace(\"#\", \" # \");\n line = line.replaceAll(\",\", \" \");\n line = line.replaceAll(\"\\\\$\", \" \\\\$\");\n line = line.trim();\n\n if (line.contains(\"#\")) {\n line = line.substring(0, line.indexOf(\"#\"));\n }\n\n if (line == null || line.length() == 0 || line.equals(\"\\\\s+\")) {\n } else {\n if (line.contains(\":\")) {\n String label = line.substring(0, line.indexOf(\":\")); // init label to have the label name\n labels_addr.put(label, line_no);\n line = line.substring(line.indexOf(\":\") + 1, line.length()); // line is the rest\n line = line.trim();\n if (line.length() < 2) {\n labels_addr.put(label, line_no);\n } else {\n instructions_addr.put(line_no, line);\n line_no++;\n }\n } else {\n instructions_addr.put(line_no, line);\n line_no++;\n }\n }\n }\n }",
"private void initList() {\n\n }",
"public interface SymbolTable\n{\n /**\n * Indicates that a symbol's integer ID could not be determined. That's\n * generally the case when constructing value instances that are not yet\n * contained by a datagram.\n */\n public final static int UNKNOWN_SYMBOL_ID = -1;\n\n\n /**\n * Gets the unique name of this symbol table.\n *\n * @return the unique name, or {@code null} if {@link #isLocalTable()}.\n */\n public String getName();\n\n\n /**\n * Gets the version of this symbol table.\n *\n * @return at least one, or zero if {@link #isLocalTable()}.\n */\n public int getVersion();\n\n\n /**\n * Determines whether this symbol table is local, and therefore unnamed\n * and unversioned.\n * <p>\n * If this method returns {@code true}, then both {@link #isSharedTable()}\n * and {@link #isSystemTable()} will return {@code false}.\n */\n public boolean isLocalTable();\n\n /**\n * Determines whether this symbol table is shared, and therefore named,\n * versioned, and {@linkplain #isReadOnly() read-only}.\n * <p>\n * If this method returns {@code true}, then {@link #isLocalTable()}\n * will return {@code false}.\n */\n public boolean isSharedTable();\n\n /**\n * Determines whether this instance is substituting for an imported\n * shared table for which no exact match was found in the catalog.\n * Such tables are not authoritative and may not even have any symbol text\n * at all (as is the case when no version of an imported table is found).\n * <p>\n * Substitute tables are always shared, non-system tables.\n *\n */\n public boolean isSubstitute();\n\n /**\n * Determines whether this symbol table is a system symbol table, and\n * therefore shared, named, versioned, and\n * {@linkplain #isReadOnly() read-only}.\n * <p>\n * If this method returns {@code true}, then {@link #isLocalTable()}\n * will return {@code false} and {@link #isSharedTable()} will return\n * {@code true}.\n */\n public boolean isSystemTable();\n\n\n /**\n * Determines whether this symbol table can have symbols added to it.\n * Shared symtabs are always read-only.\n * Local symtabs can also be {@linkplain #makeReadOnly() made read-only}\n * on demand, which enables some optimizations when writing data but will\n * cause failures if new symbols are encountered.\n *\n * @return true if this table is read-only, false if symbols may\n * be added.\n *\n * @see #makeReadOnly()\n *\n\n */\n public boolean isReadOnly();\n\n\n /**\n * Prevents this symbol table from accepting any more new symbols.\n * Shared symtabs are always read-only.\n * Making a local symtab read-only enables some optimizations when writing\n * data, but will cause failures if new symbols are encountered.\n *\n * @see #isReadOnly()\n *\n\n */\n public void makeReadOnly();\n\n\n /**\n * Gets the system symbol table being used by this local table.\n * <p>\n * If {@link #isSystemTable()} then this method returns {@code this}.\n * Otherwise, if {@link #isSharedTable()} then this method returns\n * {@code null}.\n *\n * @return not <code>null</code>, except for non-system shared tables.\n */\n public SymbolTable getSystemSymbolTable();\n\n\n /**\n * Gets the identifier for the Ion version (and thus the system symbol\n * table) used by this table.\n * The version identifier is a string of the form {@code \"$ion_X_Y\"}.\n *\n * @return the version identifier; or {@code null} for non-system shared\n * tables.\n */\n public String getIonVersionId();\n\n\n /**\n * Gets the sequence of shared symbol tables imported by this (local)\n * symbol table. The result does not include a system table.\n * <p>\n * If this local table imported a shared table for which the relevant\n * {@link IonCatalog} has the same name but different version and/or max_id,\n * then that entry will be a substitute table with the\n * correct version and max_id, wrapping the original shared symbol table\n * that was found.\n * <p>\n * If this local table imported a shared table for which the relevant\n * {@link IonCatalog} has no entry with the same name, but the import\n * declaration has a max_id available, then that entry will\n * be a substitute table with max_id undefined symbols.\n *\n * @return {@code null} if this is a shared or system table, otherwise a\n * non-null but potentially zero-length array of shared tables (but no\n * system table).\n */\n public SymbolTable[] getImportedTables();\n\n\n /**\n * Gets the highest symbol id reserved by this table's imports (including\n * system symbols). Any id higher than this value is a local symbol\n * declared by this table. This value is zero for shared symbol tables,\n * since they do not utilize imports.\n */\n public int getImportedMaxId();\n\n\n /**\n * Gets the highest symbol id reserved by this table.\n *\n * @return the largest integer such that {@link #findKnownSymbol(int)} could\n * return a non-<code>null</code> result. Note that there is no promise\n * that it <em>will</em> return a name, only that any larger id will not\n * have a name defined.\n */\n public int getMaxId();\n\n\n /**\n * Adds a new symbol to this table, or finds an existing definition of it.\n * <p>\n * The resulting {@link SymbolToken} has the same String instance that\n * was first interned. In order to reduce memory\n * footprint, callers should generally replace their copy of the text with\n * the string in the result.\n * <p>\n * This method will not necessarily return the same instance given the\n * same input.\n *\n * @param text the symbol text to intern.\n *\n * @return the interned symbol, with both text and SID defined; not null.\n *\n * @throws IonException if this symtab {@link #isReadOnly()} and\n * the text isn't already interned.\n *\n * @see #find(String)\n *\n\n */\n public SymbolToken intern(String text);\n\n\n /**\n * Finds a symbol already interned by this table.\n * <p>\n * This method will not necessarily return the same instance given the\n * same input.\n *\n * @param text the symbol text to find.\n *\n * @return the interned symbol, with both text and SID defined;\n * or {@code null} if it's not already interned.\n *\n * @see #intern(String)\n *\n\n */\n public SymbolToken find(String text);\n\n\n /**\n * Gets the symbol ID associated with a given symbol name.\n *\n * @param name must not be null or empty.\n * @return the id of the requested symbol, or\n * {@link #UNKNOWN_SYMBOL_ID} if it's not defined.\n *\n * @throws NullPointerException if {@code name} is null.\n */\n public int findSymbol(String name);\n\n\n /**\n * Gets the interned text for a symbol ID.\n *\n * @param id the requested symbol ID.\n * @return the interned text associated with the symbol ID,\n * or {@code null} if the text is not known.\n *\n * @throws IllegalArgumentException if {@code id < 1}.\n */\n public String findKnownSymbol(int id);\n\n\n /**\n * Creates an iterator that will return all non-imported symbol names, in\n * order of their symbol IDs. The iterator will return {@code null} where\n * there is an undefined sid.\n * <p>\n * The first string returned by the iterator has a symbol ID that is one\n * more than {@link #getImportedMaxId()}, and the last string has symbol\n * ID equals to {@link #getMaxId()}.\n *\n * @return a new iterator.\n */\n public Iterator<String> iterateDeclaredSymbolNames();\n\n\n /**\n * Writes an Ion representation of this symbol table.\n *\n * @param writer must not be null.\n * @throws IOException if thrown by the writer.\n */\n public void writeTo(IonWriter writer)\n throws IOException;\n}",
"public FeatureDictionary() {\n\tif (ADD_DUMMY_COMPONENT) {\n\t id2label.add( DUMMY_LABEL );\n\t label2id.put( DUMMY_LABEL, new Integer(0));\n\t}\n }",
"private Symbol(String label, int numArgs)\n {\n this.label = label;\n this.numArgs = numArgs;\n }",
"public SymbolTable(SymbolTable parentST, String id) {\n\t\tthis.scopeName = id;\n this.parentSymbolTable = parentST;\n this.entries = new HashMap<>();\n this.methodEntries = new HashMap<>();\n }",
"public DefaultTableModel makeHotellist() {\n\t\tDefaultTableModel tablemodel = new DefaultTableModel(heading, 0);\n\t\t// get data\n\t\tfor (int i = 0; i < AHR.size(); i++) {\n\t\t\tint id = AHR.get(i).getHotelID(); // id\n\t\t\tint star = AHR.get(i).getHotelStar(); // star\n\t\t\tString locality = AHR.get(i).getLocality(); // locality\n\t\t\tString address = AHR.get(i).getAddress(); // address\n\t\t\tint sroom = AHR.get(i).getSingle(); // single room\n\t\t\tint droom = AHR.get(i).getDouble(); // double room\n\t\t\tint qroom = AHR.get(i).getQuad(); // quad room\n\t\t\tint price = countSumPrice(AHR.get(i)); // price\n\t\t\tString go = \"Select\"; // select\n\t\t\tObject[] data = { id, star, locality, address, sroom, droom, qroom, price, go };\n\t\t\ttablemodel.addRow(data);\n\t\t}\n\t\treturn tablemodel;\n\t}",
"private void InitList()\n {\n Globals.list = new ArrayList<>();\n Globals.search_result = new ArrayList<>();\n Globals.selected_items = new ArrayList<>();\n\n Globals.list.add(\"Afghanistan\");\n Globals.list.add(\"Albania\");\n Globals.list.add(\"Algeria\");\n Globals.list.add(\"Andorra\");\n Globals.list.add(\"Angola\");\n Globals.list.add(\"Anguilla\");\n Globals.list.add(\"Antigua & Barbuda\");\n Globals.list.add(\"Argentina\");\n Globals.list.add(\"Armenia\");\n Globals.list.add(\"Australia\");\n Globals.list.add(\"Austria\");\n Globals.list.add(\"Azerbaijan\");\n Globals.list.add(\"Bahamas\");\n Globals.list.add(\"Bahrain\");\n Globals.list.add(\"Bangladesh\");\n Globals.list.add(\"Barbados\");\n Globals.list.add(\"Belarus\");\n Globals.list.add(\"Belgium\");\n Globals.list.add(\"Belize\");\n Globals.list.add(\"Benin\");\n Globals.list.add(\"Bermuda\");\n Globals.list.add(\"Bhutan\");\n Globals.list.add(\"Bolivia\");\n Globals.list.add(\"Bosnia & Herzegovina\");\n Globals.list.add(\"Botswana\");\n Globals.list.add(\"Brazil\");\n Globals.list.add(\"Brunei Darussalam\");\n Globals.list.add(\"Bulgaria\");\n Globals.list.add(\"Burkina Faso\");\n Globals.list.add(\"Myanmar/Burma\");\n Globals.list.add(\"Burundi\");\n Globals.list.add(\"Cambodia\");\n Globals.list.add(\"Cameroon\");\n Globals.list.add(\"Canada\");\n Globals.list.add(\"Cape Verde\");\n Globals.list.add(\"Cayman Islands\");\n Globals.list.add(\"Central African Republic\");\n Globals.list.add(\"Chad\");\n Globals.list.add(\"Chile\");\n Globals.list.add(\"China\");\n Globals.list.add(\"Colombia\");\n Globals.list.add(\"Comoros\");\n Globals.list.add(\"Congo\");\n Globals.list.add(\"Costa Rica\");\n Globals.list.add(\"Croatia\");\n Globals.list.add(\"Cuba\");\n Globals.list.add(\"Cyprus\");\n Globals.list.add(\"Czech Republic\");\n Globals.list.add(\"Democratic Republic of the Congo\");\n Globals.list.add(\"Denmark\");\n Globals.list.add(\"Djibouti\");\n Globals.list.add(\"Dominican Republic\");\n Globals.list.add(\"Dominica\");\n Globals.list.add(\"Ecuador\");\n Globals.list.add(\"Egypt\");\n Globals.list.add(\"El Salvador\");\n Globals.list.add(\"Equatorial Guinea\");\n Globals.list.add(\"Eritrea\");\n Globals.list.add(\"Estonia\");\n Globals.list.add(\"Ethiopia\");\n Globals.list.add(\"Fiji\");\n Globals.list.add(\"Finland\");\n Globals.list.add(\"France\");\n Globals.list.add(\"French Guiana\");\n Globals.list.add(\"Gabon\");\n Globals.list.add(\"Gambia\");\n Globals.list.add(\"Georgia\");\n Globals.list.add(\"Germany\");\n Globals.list.add(\"Ghana\");\n Globals.list.add(\"Great Britain\");\n Globals.list.add(\"Greece\");\n Globals.list.add(\"Grenada\");\n Globals.list.add(\"Guadeloupe\");\n Globals.list.add(\"Guatemala\");\n Globals.list.add(\"Guinea\");\n Globals.list.add(\"Guinea-Bissau\");\n Globals.list.add(\"Guyana\");\n Globals.list.add(\"Haiti\");\n Globals.list.add(\"Honduras\");\n Globals.list.add(\"Hungary\");\n }",
"public static void buildSymTable(CommonTree tree) {\n\t\tListIterator<?> tmp = tree.getChildren().listIterator();\n\t\tArrayList<CommonTree> elements = new ArrayList<CommonTree>();\n\t\twhile (tmp.hasNext())\n\t\t\telements.add((CommonTree) tmp.next()); /* Any type errors found here! */\n\t\tListIterator<CommonTree> iter = elements.listIterator();//= tree.getChildren().listIterator();\n\t\t//end type checking//\n\n\n\t\twhile(iter.hasNext()) {\n\t\t\tCommonTree element = iter.next();//this does go here \n\n\t\t\tif (element.getChildCount() == 2 && element.getText().equalsIgnoreCase(\"DECL\")){\n\t\t\t\tsymTable.insertSymbol(new Symbol(element.getChild(1).getText(),element.getChild(0).getText()));\n\t\t\t\t//System.out.println(\"Left: \" + element.getChild(0).getText());\n\t\t\t\t//System.out.println(\"Right: \" + element.getChild(1).getText());\n\t\t\t}\n\t\t\telse if (element.getChildCount() == 1){\n\t\t\t\t//System.out.println(\"Dest: \" + element.getChild(0).getText());\n\n\t\t\t}\n\t\t\telse if(element.getChildCount() == 0){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tbuildSymTable(element);\n\t\t\t}\n\t\t}\n\n\t}",
"@Override\n\tpublic String toString() {\n\t\tString[] possibleSymbols = getPossibleSymbols();\n\t\tif (possibleSymbols.length == 1) {\n\t\t\treturn possibleSymbols[0];\n\t\t} else {\n\t\t\treturn Arrays.toString(possibleSymbols);\n\t\t}\n\t}",
"private void addSymbolFirstSet(Symbol symbol) {\n if (isSymbolTerminal(symbol)) {\n return;\n }\n\n // left side is not a terminal, than we need to compute its right side\n // an non terminal may have a couple of productions\n for (int i = 0; i < symbol.productions.size(); i++) {\n // getLine every production in order\n ArrayList<Tag> production = symbol.productions.get(i);\n if (production.size() == 0) continue;\n\n // getLine symbol of this production in order\n for (int j = 0; j < production.size(); j++) {\n Tag currentTag = production.get(j);\n Symbol current = symbolMap.get(currentTag);\n if (!symbol.firstSet.containsAll(current.firstSet)) {\n needMoreRound = true;\n\n for (int k = 0; k < current.firstSet.size(); k++) {\n if (!symbol.firstSet.contains(current.firstSet.get(k))) {\n symbol.firstSet.add(current.firstSet.get(k));\n }\n }\n }\n if (!current.isNullable) break;\n }\n }\n }",
"public void listing() {\r\n int count = 1;\r\n for (AdressEntry i : addressEntryList) {\r\n System.out.print(count + \": \");\r\n System.out.println(i);\r\n count++;\r\n }\r\n System.out.println();\r\n }",
"@Override\n\tprotected String toMips(Scope symbolTable, String indent) {\n\t\tStringBuilder build = new StringBuilder(indent).append(\"#SubProgramHeadNode\\n\");\n\n\t\t//load ptr to previous stack's head to pick up values\n\t\tbuild.append(indent).append(\"lw $t0, 8($sp)\\n\");\n\t\tbuild.append(indent).append(\"lw $t0, ($t0)\\n\");\n\n\t\t//iterate across arguments\n\t\tfor (int i = 0; i < arguments.length; i++) {\n\t\t\tbuild.append(indent).append(\"lw $t1, \").append((i + 1) * 4).append(\"($t0)\\t#get loaded value from stack\\n\");\n\t\t\tbuild.append(indent).append(\"sw $t1, \").append(symbolTable.getMemoryOffset(arguments[i])).append(\"($sp)\\t#save word in correct spot (hopefully?)\\n\");\t//This is done in SubProgramNode constructor\n\t\t}\n\n\t\treturn build.toString();\n\t}",
"public abstract List<PCommand> evaluateStatement(SymbolTable symbolTable, Map<String, Type> typeTable, final LabelGenerator labelGenerator);",
"private void fillTable(){\n tblModel.setRowCount(0);// xoa cac hang trong bang\n \n for(Student st: list){\n tblModel.addRow(new String[]{st.getStudentId(), st.getName(), st.getMajor(),\"\"\n + st.getMark(), st.getCapacity(), \"\" + st.isBonnus()});\n // them (\"\" + )de chuyen doi kieu float va boolean sang string\n \n }\n tblModel.fireTableDataChanged();\n }",
"private List<StadiumModel> dummyDataStadiumList()\n\t{\n\t\tfinal StadiumModel wembley = new StadiumModel();\n\t\twembley.setCode(STADIUM_NAME);\n\t\twembley.setCapacity(STADIUM_CAPACITY);\n\t\tfinal List<StadiumModel> stadiums = new ArrayList<StadiumModel>();\n\t\tstadiums.add(wembley);\n\t\treturn stadiums;\n\t}",
"public void setFrequencies() {\n\t\tleafEntries[0] = new HuffmanData(5000, 'a');\n\t\tleafEntries[1] = new HuffmanData(2000, 'b');\n\t\tleafEntries[2] = new HuffmanData(10000, 'c');\n\t\tleafEntries[3] = new HuffmanData(8000, 'd');\n\t\tleafEntries[4] = new HuffmanData(22000, 'e');\n\t\tleafEntries[5] = new HuffmanData(49000, 'f');\n\t\tleafEntries[6] = new HuffmanData(4000, 'g');\n\t}",
"private void initTable() {\n\t\tDefaultTableModel dtm = (DefaultTableModel)table.getModel();\n\t\tdtm.setRowCount(0);\t\t\n\t\tfor(int i=0;i<MainUi.controller.sale.items.size();i++){\n\t\t\tVector v1 = new Vector();\n\t\t\tv1.add(MainUi.controller.sale.items.get(i).getProdSpec().getTitle());\n\t\t\tv1.add(MainUi.controller.sale.items.get(i).getCopies());\n\t\t\tdtm.addRow(v1);\n\t\t}\n\t\tlblNewLabel.setText(\"\"+MainUi.controller.sale.getTotal());\n\t}",
"public void plannerShoppingListSetup(){\n //Set the items of the shopping list.\n shoppingList.setItems(shoppingListIngredients);\n //Format the cells of the shopping List ListView\n Callback<ListView<Ingredient>, ListCell<Ingredient>> ingredientsMealFormat =\n new Callback<ListView<Ingredient>, ListCell<Ingredient>>() {\n @Override\n public ListCell<Ingredient> call(ListView<Ingredient> ingredientListView) {\n ListCell<Ingredient> cell = new ListCell<>(){\n @Override\n protected void updateItem(Ingredient ingredient, boolean empty) {\n super.updateItem(ingredient, empty);\n if (empty){\n setText(null);\n } else {\n String quantityName = ingredient.getQuantityName();\n double quantityInGrams = ingredient.getQuantityInGrams();\n double quantityRatio = (quantityInGrams / ingredient.getSingleQuantityInGrams());\n\n DecimalFormat df = new DecimalFormat(\"#.#\");\n DecimalFormat df2 = new DecimalFormat(\"#\");\n\n if (quantityRatio > 1){\n quantityName = quantityName + \"s\";\n }\n\n setText( ingredient.getName() + \" ( \" + df2.format(quantityInGrams) + \" grams / \" +\n df.format(quantityRatio) + \" \" + quantityName + \")\");\n }\n setFont(InterfaceStyling.textFieldFont);\n }\n };\n return cell;\n }\n };\n shoppingList.setCellFactory(ingredientsMealFormat);\n Label emptyLabel = new Label(\"Empty Shopping List\");\n emptyLabel.setFont(InterfaceStyling.textFieldFont);\n //Set the label placeholder for an empty listview.\n shoppingList.setPlaceholder(emptyLabel);\n }",
"private void createSymbolTable( Grammar grammar, State state, List<Action> tshifts, List<Action> ntshifts)\n {\n state.stackOps = new StackOp[ tshifts.size()];\n for( int i=0; i<state.stackOps.length; i++)\n {\n StackOp shift = new StackOp();\n state.stackOps[ i] = shift;\n \n int[] symbol = tshifts.get( i).symbols;\n if ( symbol.length == 2)\n {\n shift.low = symbol[ 0];\n shift.high = symbol[ 1];\n }\n else if ( symbol.length == 1)\n {\n shift.low = symbol[ 0];\n shift.high = symbol[ 0];\n }\n }\n }",
"public List<C0906d> mo10186a() {\n LinkedList linkedList = new LinkedList();\n StringBuilder sb = new StringBuilder();\n while (true) {\n int i = this.f4496d;\n if (i < this.f4494b) {\n char charAt = this.f4493a.charAt(i);\n this.f4496d++;\n switch (this.f4495c) {\n case LITERAL_STATE:\n m4675a(charAt, linkedList, sb);\n break;\n case START_STATE:\n m4677b(charAt, linkedList, sb);\n break;\n case DEFAULT_VAL_STATE:\n m4678c(charAt, linkedList, sb);\n break;\n }\n } else {\n switch (this.f4495c) {\n case LITERAL_STATE:\n m4676a(linkedList, sb);\n break;\n case START_STATE:\n sb.append('$');\n m4676a(linkedList, sb);\n break;\n case DEFAULT_VAL_STATE:\n sb.append(':');\n m4676a(linkedList, sb);\n break;\n }\n return linkedList;\n }\n }\n }",
"public static SymbolTable getInstance() { return instance ; }",
"public SymbolTable getSymbolTable() {\n return this.symbolTable;\n }",
"public void addToSymbolsTable(Token t) {\n\t\tif (!t.hasError()\n && (t.getType().equals(\"Constante\") || (t.getType().equals(\"Cadena\")))\n && !reservedWords.containsKey(t.getToken())\n && !symbolsTable.contains(t.getToken())\n ) {\n\n\t\t\tsymbolsTable.add(t);\n\t\t\t//System.out.println(\"[V] Token added line: \" + line + \" TokenType: \"\n\t\t\t//\t\t+ t.getType() + \" Token: \" + t.getToken());\n\t\t} else {\n\t\t\t//System.out.println(\"[X] Token NOT added to the symbol table. line: \"\n\t\t\t//\t\t+ line + \" TokenType: \" + t.getType() + \" Token: \"\n\t\t\t//\t\t+ t.getToken());\n\t\t}\n\n\t}",
"void initTable();",
"private DSLGrammarMap buildDummyGrammarMap() {\n DSLGrammarMap grammarMap = new DSLGrammarMap();\n {\n FunctionSymbol f = grammarMap.mkFunctionSymbol(\"f\", \"int\");\n f.addParameter(\"int\", \"x1\");\n }\n {\n FunctionSymbol g = grammarMap.mkFunctionSymbol(\"g\", \"int\");\n g.addParameter(\"int\", \"x1\");\n }\n {\n FunctionSymbol eq = grammarMap.mkFunctionSymbol(\"eq\", \"bool\");\n eq.addParameter(\"Poly\", \"x1\");\n eq.addParameter(\"Poly\", \"x2\");\n }\n return grammarMap;\n }",
"public void constructDrawing(){\r\n\r\n resetToEmpty(); // should be empty anyway\r\n\r\n// universe=TFormula.atomicTermsInListOfFormulas(fInterpretation);\r\n \r\n Set <String> universeStrSet=TFormula.atomicTermsInListOfFormulas(fInterpretation);\r\n \r\n universe=\"\";\r\n \r\n for (Iterator i=universeStrSet.iterator();i.hasNext();)\r\n \tuniverse+=i.next();\r\n \r\n\r\n findPropertyExtensions();\r\n\r\n findRelationsExtensions();\r\n\r\n determineLines();\r\n\r\n createProperties();\r\n\r\n createIndividuals();\r\n\r\n createRelations();\r\n\r\n deselect(); //all shapes are created selected\r\n\r\n\r\n fPalette.check(); // some of the names may need updating\r\n\r\n repaint();\r\n\r\n}",
"private void buildLabelLocs() {\n this.labelLocs = new HashMap<String, Integer>();\n for (int n = 0; n < this.code.size(); n++) {\n TACOp op = this.code.get(n);\n if (op.getType() == TACOpType.LABEL) {\n this.labelLocs.put(op.getLabel(), n);\n }\n }\n }",
"@Test\n\tpublic void testAddSymbolFromCatalog() throws Exception {\n\n\t\t// Choose a symbol which is not in the list, click \"Add\" and \"OK\"\n\t\tString selectedSymbol;\n\t\tboolean bSelectSymbolNotInList;\n\t\tint nListCount;\n\t\tint nIndex = 1;\n\t\tdo {\n\t\t\tmathEditSymbolsDlgViewControl.click(100 * nIndex, 10);\n\t\t\t// risk:after 6 or 7 circles, this will click out of ViewControl\n\t\t\tselectedSymbol = mathEditSymbolsDlgSymbol.getText();\n\t\t\tnIndex++;\n\t\t\t// Find if the selected symbol is already in the list\n\t\t\tbSelectSymbolNotInList = false;\n\t\t\tnListCount = mathEditSymbolsDlgSymbol.getItemCount();\n\t\t\tfor (int i = 0; i < nListCount; i++) {\n\t\t\t\tif (selectedSymbol.equals(mathEditSymbolsDlgSymbol\n\t\t\t\t\t\t.getItemText(i))) {\n\t\t\t\t\tbSelectSymbolNotInList = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} while (bSelectSymbolNotInList);\n\t\tmathEditSymbolsDlgAdd.click();\n\t\tmathEditSymbolsDlg.ok();\n\n\t\t// Verify if the symbol is added to Symbol set\n\t\tmathSymbolsDlgEditButton.click();\n\t\tbSelectSymbolNotInList = false;\n\t\tnListCount = mathEditSymbolsDlgSymbol.getItemCount();\n\t\tfor (int i = 0; i < nListCount; i++) {\n\t\t\tif (selectedSymbol.equals(mathEditSymbolsDlgSymbol.getItemText(i))) {\n\t\t\t\tbSelectSymbolNotInList = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tassertTrue(\"Symbol is not added to Symbol set\", bSelectSymbolNotInList);\n\t}",
"public void fillIdentity() {\n\t\tString shipName = ship.getShipName();\n\t\tString name = shipsNameLabel.getText();\n\t\tshipsNameLabel.setText( name + shipName);\n\t\t\n\t\tdouble shipStatus = ship.getShipsStatus();\n\t\tString status = shipsStatusLabel.getText();\n\t\tshipsStatusLabel.setText( status + shipStatus + \"HP\");\n\t\t\n\t\tdouble shipCap = ship.getCapacity();\n\t\tString capacity = shipsCurrentCapacityLabel.getText();\n\t\tshipsCurrentCapacityLabel.setText(capacity + String.format(\"%.2f\", shipCap) + \"m^3\");\n\t\t\n\t\tint shipSpeed = ship.getShipsSpeed();\n\t\tString speed = shipsSpeedLabel.getText();\n\t\tshipsSpeedLabel.setText( speed + shipSpeed + \" km/day\");\n\t\t\n\t\tint shipCrew = ship.getCrew();\n\t\tString crew = crewsInShipLabel.getText();\n\t\tcrewsInShipLabel.setText(crew + shipCrew + \" people\");\n\t\t\n\t\tArrayList<Equipment> shipsEquipment = ship.getEquipment();\n\t\tArrayList<String> shipsEquipmentName = new ArrayList<String>();\n\t\tfor (Equipment equipment: shipsEquipment) {\n\t\t\tshipsEquipmentName.add(equipment.getName());\n\t\t}\n\t\tString equipments = shipsEquipmentLabel.getText();\n\t\tshipsEquipmentLabel.setText(equipments + shipsEquipmentName);\n\t\t\n\t}",
"void fillLabelHash() {\n log.debug(\" begin fillLabelHash\");\n for (int v = 0; v < vertices.length; v++) {\n log.debug(\" ---- process vertex \" + v);\n System.err.println(\" ---- process vertex \" + v);\n\n HammingVertex vertex = vertices[v];\n\n // all users of the array MUST use exactly the same algorithm lookup sequence\n int missingBitsVertexMapsIndex = 0;\n\n for (int i = 0; i < (labelSize - 1); i++) {\n for (int j = (i + 1); j < labelSize; j++) {\n\n Map missingBitsVertexMap = missingBitsVertexMaps[missingBitsVertexMapsIndex];\n if (missingBitsVertexMap == null) {\n missingBitsVertexMap = new HashMap<Integer, List<Integer>>();\n missingBitsVertexMaps[missingBitsVertexMapsIndex] = missingBitsVertexMap;\n }\n int compressedLabel = vertex.labelWithoutMissingBitsAsInt(i, j);\n List<Integer> list = (List<Integer>) missingBitsVertexMap.get(compressedLabel);\n if (list == null) {\n list = new LinkedList<Integer>();\n missingBitsVertexMap.put(compressedLabel, list);\n }\n list.add(vertex.vertexNumber);\n\n // next missing bit hashMap in sequence\n missingBitsVertexMapsIndex++;\n }\n }\n }\n }",
"private void setUpList() {\n\n\n Contents s1 = new Contents(R.drawable.bishist,\"Bishisht Bhatta\",\"+977-9849849525\", Color.parseColor(\"#074e87\"));\n list.add(s1);\n Contents s2 = new Contents(R.drawable.sagar,\"Sagar Pant\",\"+977-9865616888\",Color.parseColor(\"#074e87\"));\n list.add(s2);\n Contents s3 = new Contents(R.drawable.rabins,\"Rabin Nath\",\"+977-9848781007\",Color.parseColor(\"#074e87\"));\n list.add(s3);\n\n\n }",
"public MatchingState(int num, String sym, FSMstate n1){\n state_no = num;\n next1 = n1;\n symbol = sym;\n }",
"public static void main(String[] args) {\n RegexParser regexParser = new RegexParser(new File(args[0]));\n regexParser.parseCharClasses();\n regexParser.parseTokens();\n regexParser.buildDFATable();\n // write DFA Table to file\n try {\n BufferedWriter tableWriter = new BufferedWriter(new FileWriter(new File(args[2])));\n for (int i = 0; i < regexParser.dfaTable.tableRows.size(); i++) {\n tableWriter.write(\"State\" + i);\n tableWriter.newLine();\n for (int j = 0; j < 95; j++) {\n //if (regexParser.dfaTable.tableRows.get(i).nextStates[j] != 1) {\n tableWriter.write(\" \" + (char)(j + 32) + \" \" + regexParser.dfaTable.tableRows.get(i).nextStates[j]);\n //}\n }\n tableWriter.newLine();\n }\n tableWriter.newLine();\n tableWriter.write(\"Accept States\");\n tableWriter.newLine();\n for (int j = 0; j < regexParser.dfaTable.tableRows.size(); j++) {\n for (int i = 0; i < regexParser.dfaTable.nfa.acceptStates.size(); i++) {\n if (regexParser.dfaTable.tableRows.get(j).nfaStates.contains(regexParser.dfaTable.nfa.acceptStates.get(i))) {\n tableWriter.write(\" \" + j);\n }\n }\n }\n tableWriter.close();\n }\n catch (Exception e) {\n System.out.println(\"Could not write to table file\");\n System.exit(0);\n }\n TableWalker tw = new TableWalker(regexParser.dfaTable, new File(args[1]), new File(args[3]));\n System.out.println(\"Success! Check your output files!\");\n//Part 2, piece 1: parsing the grammar\n LL1GrammarParser parser = new LL1GrammarParser(new File(args[4]), regexParser.specReader.tokens);\n parser.parseGrammar();\n\n//piece 2/3: first and follow sets \n System.out.println(\"Creating First and Follow Sets: \");\n\n LL1FFSets sets = new LL1FFSets(parser.rules);\n\n System.out.println(\"Working on the Parsing Table\");\n//piece 4/5: LL(1) parsing table and running it. Success/reject message here.\n LL1ParsingTable table = new LL1ParsingTable(sets, regexParser.specReader.tokens,tw.parsedTokens, parser.rules);\n System.out.println(table.run());\n\n\n }",
"private void makeDescription() {\n List switchInfo = InteractDB.getTheList(InteractDB.getFromDB(\"SwitchInfo\", idSwitch.toString()));\n\n DescriptionGen descr = new DescriptionGen(switchInfo);\n description = descr.getDescription();\n }",
"private static ElfType32.Elf32_Sym parseSymbolTable(byte[] header){\n\t\tElf32_Sym sym = new Elf32_Sym();\n\t\tsym.st_name = Utils.copyBytes(header, 0, 4);\n\t\tsym.st_value = Utils.copyBytes(header, 4, 4);\n\t\tsym.st_size = Utils.copyBytes(header, 8, 4);\n\t\tsym.st_info = header[12];\n\t\t//FIXME 这里有一个问题,就是这个字段读出来的值始终是0\n\t\tsym.st_other = header[13];\n\t\tsym.st_shndx = Utils.copyBytes(header, 14, 2);\n\t\treturn sym;\n\t}",
"private String makeLabel(String label)\n {\n \treturn label + \"$\" + Integer.toString(labelCount++);\n }",
"void buildTable(){\n HashMap<String, Integer> map = new HashMap<String, Integer>();\n while (first.hasNext()){\n String s = first.next();\n for(String key: s.split(SPLIT)) {\n int val = map.getOrDefault(key, 0);\n map.put(key, val + 1);\n }\n }\n ArrayList<Tuple> arr = new ArrayList<>();\n for (String key: map.keySet()){\n int num = map.get(key);\n //filter the unusual items\n if (num >= this.support){\n arr.add(new Tuple(key, num));\n }\n }\n //descending sort\n arr.sort((Tuple t1, Tuple t2)->{\n if (t1.num <= t2.num)\n return 1;\n else\n return -1;\n });\n\n int idx = 0;\n for(Tuple t: arr){\n this.table.add(new TableEntry(t.item, t.num));\n this.keyToNum.put(t.item, t.num);\n this.keyToIdx.put(t.item, idx);\n idx += 1;\n }\n /*\n for(TableEntry e: table){\n System.out.println(e.getItem()+ \" \"+ e.getNum());\n }*/\n }",
"protected void generateEntries() {\n Iterator<Label> entryLabelsIterator = entryLabels.iterator();\n for (KtWhenEntry entry : expression.getEntries()) {\n v.visitLabel(entryLabelsIterator.next());\n\n FrameMap.Mark mark = codegen.myFrameMap.mark();\n codegen.gen(entry.getExpression(), resultType);\n mark.dropTo();\n\n if (!entry.isElse()) {\n v.goTo(endLabel);\n }\n }\n }",
"public void createFullListing(HashMap<String,String> values) throws Exception\n\t {\n\t \tString getIDs = \"SELECT MAX(make_id), MAX(powertrain_id), MAX(engine_id), MAX(listing_id) FROM listing, powertrainhasengine\";\n\t \tStatement statement = connection.createStatement();\n\t \tResultSet ids = statement.executeQuery(getIDs);\n\t \tids.first();\n\t \tint newListing_id = ids.getInt(\"MAX(listing_id)\") + 1;\n\t \tint newMake_id = ids.getInt(\"MAX(make_id)\") + 1;\n\t \tint newPowerTrain_id = ids.getInt(\"MAX(powertrain_id)\") + 1;\n\t\tint newEngine_id = ids.getInt(\"MAX(engine_id)\") + 1;\n\t\tids.close();\n\n\t\t//Quickly add the new ids to the HashTable\n\t\tvalues.put(\"listing_id\", Integer.toString(newListing_id));\n\t\t values.put(\"make_id\", Integer.toString(newMake_id));\n\t\t values.put(\"powertrain_id\", Integer.toString(newPowerTrain_id));\n\t\t values.put(\"engine_id\", Integer.toString(newEngine_id));\n\n\t\t//Now check if the entered data exists.\n\t\tboolean makeExists = true, powertrainExists = true, engineExists = true;\n\t\tint makeID, powertrainID, engineID;\n\n\t\tString makeExistsString = \"SELECT make_id FROM make WHERE make = \" + values.get(\"make\") + \" AND model =\"\n\t\t\t\t+ values.get(\"model\") + \" AND type = \" + values.get(\"type\") + \" AND year = \" + values.get(\"year\");\n\t\tResultSet makeRS = statement.executeQuery(makeExistsString);\n\t\tif(!makeRS.next()) {\n\t\t\tmakeExists = false; //insert if does not exist\n\t\t} else {\n\t\t\tmakeID = makeRS.getInt(\"make_id\");\n\t\t\tvalues.put(\"make_id\", Integer.toString(makeID));\n\t\t}\n\t\tmakeRS.close();\n\n\t\tString powerTrainExistsString = \"SELECT powertrain_id FROM powertrain WHERE drive_type = \"\n\t\t\t\t+ values.get(\"drive_type\") + \" AND transmition = \" + values.get(\"transmition\");\n\t\tResultSet powertrainRS = statement.executeQuery(powerTrainExistsString);\n\t\tif(!powertrainRS.next()){\n\t\t\tpowertrainExists = false;\n\t\t} else {\n\t\t\tpowertrainID = powertrainRS.getInt(\"powertrain_id\");\n\t\t\tvalues.put(\"powertrain_id\", Integer.toString(powertrainID));\n\t\t}\n\t\tpowertrainRS.close();\n\n\t\tString engineExistsString = \"SELECT engine_id FROM engine WHERE size = \" + values.get(\"size\")\n\t\t\t\t+ \" AND fuel_type = \" + values.get(\"fuel_type\") + \" AND cylinders = \" + values.get(\"cylinders\");\n\t\tResultSet engineRS = statement.executeQuery(engineExistsString);\n\t\tif(!engineRS.next()){\n\t\t\tengineExists = false;\n\t\t} else {\n\t\t\tengineID = engineRS.getInt(\"engine_id\");\n\t\t\tvalues.put(\"engine_id\", Integer.toString(engineID));\n\t\t}\n\t\tengineRS.close();\n\n\t\t//in table\n\t\t if(makeExists == true && powertrainExists == true && engineExists == true) {\n\t\t\t addListing(Integer.parseInt(values.get(\"listing_id\")),Integer.parseInt(values.get(\"make_id\")),\n\t\t\t\t\t Integer.parseInt(values.get(\"mileage\")),values.get(\"color\"),\n\t\t\t\t\t Double.parseDouble(values.get(\"price\")),values.get(\"description\"));\n\t\t }\n\n\t\t //not in table\n\t\t if(engineExists == false){\n\t\t \taddEngine(newEngine_id,Integer.parseInt(values.get(\"size\")),values.get(\"fuel_type\"),\n\t\t\t\t\tInteger.parseInt(values.get(\" cylinder\")));\n\t\t }\n\t\t if(powertrainExists == false){\n\t\t \taddPowertrain(newPowerTrain_id,values.get(\"drive_type\"),\n\t\t\t\t\tvalues.get(\"transmition\"));\n\n\t\t\tif(makeExists == true) {\n\t\t\t\t//if Make is true, powertrain is false\n\t\t\t\taddMake(newMake_id, values.get(\"make\"), values.get(\"model\"), values.get(\"type\"),\n\t\t\t\t\t\tnewPowerTrain_id, Integer.parseInt(values.get(\"year\")));\n\n\t\t\t\taddMakeHasPowertrain(newMake_id, newPowerTrain_id);\n\n\t\t\t\taddListing(newListing_id,newMake_id,Integer.parseInt(values.get(\"mileage\")),values.get(\"color\"),\n\t\t\t\t\t\tDouble.parseDouble(values.get(\"price\")),values.get(\"description\"));\n\t\t\t}\n\n\t\t }\n\t\t if(engineExists == false || powertrainExists == false) {\n\t\t \taddPowertrainHasEngine(Integer.parseInt(values.get(\"powertrain_id\")),\n\t\t\t\t\tInteger.parseInt(values.get(\"engine_id\")));\n\t\t }\n\t\t if(makeExists == false) {\n\t\t \t//if make is false but powertrain is true\n\t\t \taddMake(newMake_id,values.get(\"make\"),values.get(\"model\"),values.get(\"type\"),\n\t\t\t\t\tInteger.parseInt(values.get(\"powertrain_id\")), Integer.parseInt(values.get(\"year\")));\n\n\t\t \taddMakeHasPowertrain(newMake_id,Integer.parseInt(values.get(\"powertrain_id\")));\n\n\t\t \taddListing(newListing_id,newMake_id,Integer.parseInt(values.get(\"mileage\")),values.get(\"color\"),\n\t\t\t\t\tDouble.parseDouble(values.get(\"price\")),values.get(\"description\"));\n\t\t }\n\n\t \t//use fns: addListing, addengine, addmake, addpowertrain, addmakehaspowertrain, addpowertrainhasengine\n\n\t }",
"public static Hashtable<String, Double> fakeJobDescriptionTF() {\n job_description_tf = new Hashtable<String, Double>();\n job_description_tf.put(\"am\", (double) 1 / 7);\n job_description_tf.put(\"learning\", (double) 1 / 7);\n job_description_tf.put(\"javascript\", (double) 1 / 7);\n job_description_tf.put(\"java\", (double) 1 / 7);\n job_description_tf.put(\"is\", (double) 1 / 7);\n job_description_tf.put(\"cool\", (double) 1 / 7);\n job_description_tf.put(\"language\", (double) 1 / 7);\n job_description_tf.put(\"requirement\", (double) 0);\n job_description_tf.put(\"for\", (double) 0);\n job_description_tf.put(\"this\", (double) 0);\n job_description_tf.put(\"job\", (double) 0);\n job_description_tf.put(\"python\", (double) 0);\n job_description_tf.put(\"wonderful\", (double) 0);\n return job_description_tf;\n }",
"@Override\n\tpublic BarcodePrintLabelDto getCommonLabelPrintInfoExpress(\n\t\t\tString waybillNo,String waybillstatus) {\n\t\treturn null;\n\t}",
"public Frequency(ArrayList<LottoDay> list) {\n\n\t\tfill(list);//fill the maps\n\t}",
"private void displayListings() {\r\n\r\n //Lists all current listings\r\n System.out.println(\"Current Listings: \\n\" + cars.getListings());\r\n placeBid();\r\n }",
"public Symbol(String nm , String tp, int adrs, String scp, int lngth){\n\t\tname = nm;\n\t\ttype = tp;\n\t\taddress = adrs;\n\t\tscope = scp;\n\t\tlength = lngth;\n\t\tnext = null;\n\t}",
"public void setSymbolTable(HashMap<String, Fraction> table) {\n\n\t\tthis.symbolTable = table;\n\t}",
"public SymbolTable(int capacity){\r\n\t\tN = 0;\r\n\t\tM = capacity;\r\n\t\tkeys = new String[M];\r\n\t\tvals = new Character[M];\r\n\t}",
"public void add1(Tree tree1){\n\t\tthis.list.add(tree1);\n\t\tString spt=tree1.getSpecies(); //temporary species name\n\t\tint LSS= listS.size(); // listS size\n\t\t\n\t\tif(LSS==0){\n\t\t\tSpecies tSP1 = new Species(spt,1);\n\t\t\tlistS.add(tSP1);\n\t\t\tcountS++;\n\t\t}\n\t\telse{\n\t\t\tboolean uniqueSP=true;\n\t\t\tint x;\n\t\t\tfor (x=0;x<LSS;x++){\n\t\t\t\tif (listS.get(x).getSP().equals(spt)){\n\t\t\t\t\tlistS.get(x).setSPC(listS.get(x).getSPC()+1);//increments speciesCount.\n\t\t\t\t\tuniqueSP= false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(uniqueSP==true) {\n\t\t\t\tlistS.add(new Species(spt,1)); //add new species to listS with count 1\n\t\t\t\tcountS++;\n\t\t\t}\n\t\t}\n\t\tint zpt=tree1.getZip();\n\t\tint LZS= listZ.size(); // listZ size\n\t\t\n\t\tif(LZS==0){\n\t\t\tZipCode tZP = new ZipCode(zpt);\n\t\t\tlistZ.add(tZP);\n\t\t\tcountZ++;\n\t\t}\n\t\telse{\n\t\t\tboolean uniqueZ=true;\n\t\t\tint x;\n\t\t\tfor (x=0;x<LZS;x++){\n\t\t\t\tif (listZ.get(x).getZP()==zpt){\n\t\t\t\t\tlistZ.get(x).setZC(listZ.get(x).getZC()+1);//increments speciesCount.\n\t\t\t\t\tuniqueZ= false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(uniqueZ==true) {\n\t\t\t\tlistZ.add(new ZipCode(zpt,1)); //add new species to listZ with count 1\n\t\t\t\tcountZ++;\n\t\t\t}\n\t\t}\n\t\tcountT++;\n\t}",
"private StockData addSymbolToCurrentWatchList(String symbol)\r\n {\r\n debug(\"addSymbolToCurrentWatchList(\" + symbol + \")\");\r\n // Get the index into the current selected Tabpane\r\n int index = tabPane.getSelectedIndex();\r\n // Now grab our Table and Models\r\n HGTable table = (HGTable) tableVector.elementAt(index);\r\n StockDataTableModel dataModel = (StockDataTableModel) modelVector.elementAt(index);\r\n // Get the current Selected Row.\r\n int row = ((table.getSelectedRow() >= 0) ? table.getSelectedRow() : 0);\r\n\r\n debug(\"Insert Row After row [\" + row + \"] The Row being inserted is \" + (row + 1));\r\n dataModel.insert(row + 1);\r\n // Fire a notification that we are changing the table\r\n table.tableChanged(\r\n new TableModelEvent(dataModel, row + 1, row + 1, TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT));\r\n // Set the row to be selected\r\n table.setRowSelectionInterval(row, row);\r\n table.repaint();\r\n // Now Get the StockData Obj at that row\r\n StockData sd = (StockData) dataModel.getData().elementAt(row + 1);\r\n // Now we have the Object - We still Need to pre-fill in the data\r\n sd.setSymbol(symbol, 0.00);\r\n // Set the Name as we are still Searching\r\n sd.setName(\"Search for \" + symbol);\r\n // Lets Load the Historic Data.\r\n this.loadHistoricData(sd);\r\n // We are done now.\r\n debug(\"addSymbolToCurrentWatchList(\" + symbol + \") - complete\");\r\n\r\n return sd;\r\n }",
"public void term()\n \t{\n //\t\tfor(Iterator<Technology> tIt = Technology.getTechnologies(); tIt.hasNext(); )\n //\t\t{\n //\t\t\tTechnology tech = tIt.next();\n //\n // for (Iterator<Foundry> itF = tech.getFoundries(); itF.hasNext();)\n // {\n // Foundry foundry = itF.next();\n // HashMap<Layer,String> gdsLayers = new HashMap<Layer,String>();\n // for(Iterator<Layer> lIt = tech.getLayers(); lIt.hasNext(); )\n // {\n // Layer layer = lIt.next();\n // String str = get(foundry, layer);\n // GDSLayers numbers = GDSLayers.parseLayerString(str);\n // if (numbers == null) continue;\n //\n // Setting setting = foundry.getGDSLayerSetting(layer);\n // String oldStr = getString(setting);\n // GDSLayers oldNumbers = oldStr != null ? GDSLayers.parseLayerString(oldStr) : GDSLayers.EMPTY;\n // if (!oldNumbers.equals(numbers))\n // setString(setting, numbers.toString());\n // }\n // }\n //\t\t}\n setBoolean(gdsOutMergesBoxesSetting, gdsOutputMergesBoxes.isSelected());\n setBoolean(gdsOutWritesExportPinsSetting, gdsOutputWritesExportPins.isSelected());\n setBoolean(gdsOutUpperCaseSetting, gdsOutputUpperCase.isSelected());\n setInt(gdsOutDefaultTextLayerSetting, TextUtils.atoi(gdsDefaultTextLayer.getText()));\n setBoolean(gdsOutputConvertsBracketsInExportsSetting, gdsOutputConvertsBracketsInExports.isSelected());\n setInt(gdsCellNameLenMaxSetting, TextUtils.atoi(gdsCellNameLenMax.getText()));\n \t}",
"public void initializeListings() {\n\t listings = new ArrayList<Listing>();\n\t Listings listingsToStore = Listings.getInstance();\n\t Iterator<Saveable> listingIterator = listingsToStore.iterator();\n\t\n\t int counter = 0;\n\t while (listingIterator.hasNext()) {\n\t\t Listing currentListing = listingsToStore.getListing(counter);\n\t\t for (int i = 0; i < listingIds.size(); i++) {\n\t\t\t \n\t\t\t if (currentListing.getInternalId() == listingIds.get(i)) {\n\t\t\t\t \n\t\t\t\t listings.add(currentListing);\n\t\t\t }\n\t\t }\n\t\t counter++;\n\t\t listingIterator.next();\n\t }\n\t \n }",
"private static void printTable(int numberOfDocs) {\n \n Gson gs = new Gson();\n String json = gs.toJson(wor);\n // System.out.println(json);\n \n List<String> queryWords = new ArrayList();\n //to test it for other query word you can change the following two words\n //queryWords.add(\"carpet\");\n //queryWords.add(\"hous\");\n queryWords.add(\"the\");\n queryWords.add(\"crystallin\");\n queryWords.add(\"len\");\n queryWords.add(\"vertebr\");\n queryWords.add(\"includ\");\n \n \n FrequencySummary frequencySummary = new FrequencySummary();\n frequencySummary.getSummary(json,docName, queryWords);\n \n System.exit(0);\n \n Hashtable<Integer,Integer> g = new Hashtable<>();\n \n /* wor.entrySet().forEach((wordToDocument) -> {\n String currentWord = wordToDocument.getKey();\n Map<String, Integer> documentToWordCount = wordToDocument.getValue();\n freq.set(0);\n df.set(0);\n documentToWordCount.entrySet().forEach((documentToFrequency) -> {\n String document = documentToFrequency.getKey();\n Integer wordCount = documentToFrequency.getValue();\n freq.addAndGet(wordCount);\n System.out.println(\"Word \" + currentWord + \" found \" + wordCount +\n \" times in document \" + document);\n \n if(g.getOrDefault(currentWord.hashCode(), null)==null){\n g.put(currentWord.hashCode(),1);\n \n }else {\n System.out.println(\"Hello\");\n \n int i = g.get(currentWord.hashCode());\n System.out.println(\"i \"+i);\n g.put(currentWord.hashCode(), i++);\n }\n // System.out.println(currentWord+\" \"+ g.get(currentWord.hashCode()));\n // g.put(currentWord.hashCode(), g.getOrDefault(currentWord.hashCode(), 0)+wordCount);\n \n });\n // System.out.println(freq.doubleValue());\n \n // System.out.println(\"IDF for this word: \"+Math.log10( (double)(counter/freq.doubleValue())));\n });\n // System.out.println(g.get(\"plai\".hashCode()));\n //System.out.println(\"IDF for this word: \"+Math.log10( (double)(counter/(double)g.get(\"plai\".hashCode()))));\n */\n }",
"private void fillAdjective1a()\n {\n adjective1a.add(\"Epic\");\n adjective1a.add(\"Brilliant\");\n adjective1a.add(\"Mighty\");\n adjective1a.add(\"Great\");\n adjective1a.add(\"Wonderful\");\n adjective1a.add(\"Crazy\");\n adjective1a.add(\"Sparkling\");\n adjective1a.add(\"Shiny\");\n adjective1a.add(\"Lustful\");\n adjective1a.add(\"Precious\");\n\n }",
"public static void reset()\n\t\t{\n\t\t\tfeatureSet = new THashMap();\n\t\t\tfeatureIds = new TObjectIntHashMap();\n\t\t\tnextID = 1;\t\t\t\n\t\t}",
"public static void listing5_14() {\n }",
"public void fillMyGoodsTable() {\n\t\tHashMap<Goods, Integer> myGoods = ship.getMyGoods();\n\t\tDefaultTableModel model = (DefaultTableModel)this.myGoodsTable.getModel();\n\t\tint number = 1;\n\t\tfor (HashMap.Entry<Goods, Integer> set: myGoods.entrySet()) {\n\t\t\tString name = set.getKey().getName();\n\t\t\tint quantity = set.getKey().getQuantityOwned();\n\t\t\tint price = set.getValue();\n\t\t\tmodel.addRow(new Object [] {number, name, quantity, price});\n\t\t\tnumber++;\n\t\t}\n\t}"
] | [
"0.54990137",
"0.54648757",
"0.5428848",
"0.5428714",
"0.5412602",
"0.5410967",
"0.519192",
"0.5143189",
"0.50860745",
"0.50667536",
"0.50630045",
"0.5028162",
"0.5021958",
"0.50000477",
"0.49463484",
"0.49314165",
"0.49230894",
"0.49122375",
"0.48921254",
"0.48581058",
"0.48540017",
"0.48448557",
"0.4808029",
"0.47927412",
"0.47910994",
"0.47803378",
"0.4779218",
"0.47448295",
"0.47348252",
"0.4725035",
"0.47247136",
"0.4710534",
"0.4698148",
"0.469433",
"0.4680273",
"0.4678443",
"0.466151",
"0.46564817",
"0.46558815",
"0.4652139",
"0.4641096",
"0.4639933",
"0.46323785",
"0.46252486",
"0.46228877",
"0.46184886",
"0.46170485",
"0.46165487",
"0.460831",
"0.46021798",
"0.4587027",
"0.4583763",
"0.45811394",
"0.4576625",
"0.45726797",
"0.4572663",
"0.45695898",
"0.45607394",
"0.45556808",
"0.45554125",
"0.45365143",
"0.45338222",
"0.4527268",
"0.4527154",
"0.45242068",
"0.4521566",
"0.4511861",
"0.4511074",
"0.4508018",
"0.44962037",
"0.44955596",
"0.44951445",
"0.44913137",
"0.44880494",
"0.44671258",
"0.44612408",
"0.44591364",
"0.4458164",
"0.44532117",
"0.4453087",
"0.4452364",
"0.44511664",
"0.444992",
"0.44494608",
"0.44455972",
"0.44425452",
"0.44414628",
"0.4439167",
"0.4429625",
"0.441849",
"0.44172955",
"0.44152004",
"0.44081876",
"0.4406226",
"0.43845603",
"0.43837455",
"0.438336",
"0.43809834",
"0.43784297",
"0.4373246"
] | 0.47899213 | 25 |
resolveExpression / / / Launch the application. | public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
ASM window = new ASM();
window.frmAsmAssembler.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
} // try
}// run
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static InvocationExpression invoke(Expression expression, Expression arguments[]) { throw Extensions.todo(); }",
"void launchApp();",
"private void appLaunch(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_appLaunch\n String path = System.getProperty(\"user.dir\"); // Get the application path\n File f = new File(path + File.separator + \"expressions.txt\"); // Create a file object\n\n if(f.exists()) // file exists\n {\n try\n {\n FileReader fr = new FileReader(f); // Create a reader\n BufferedReader br = new BufferedReader(fr); // Create a buffer for the reader\n int charCode;\n\n // includes newline characters\n while((charCode = br.read()) != -1) // Read the file\n {\n expressions.append(String.valueOf((char)charCode));\n }\n\n // set pointer to last line\n // if expressions empty, then pointer = 0\n pointer = getLastLine();\n\n fr.close();\n }\n catch(FileNotFoundException e)\n {\n JOptionPane.showMessageDialog(null, e.getMessage(), \"File Not Found Exception\", JOptionPane.ERROR_MESSAGE);\n }\n catch(IOException e)\n {\n JOptionPane.showMessageDialog(null, e.getMessage(), \"IO Exception\", JOptionPane.ERROR_MESSAGE);\n }\n }\n }",
"public void launchPhone(){\n\t\tIntent sendIntent = new Intent(Intent.ACTION_DIAL);\n \tsendIntent.setData(Uri.parse(\"tel:\"));\n \t\n \tfinal ResolveInfo mInfo = pacman.resolveActivity(sendIntent, 0);\n \tString s = pacman.getApplicationLabel(mInfo.activityInfo.applicationInfo).toString();\n \t\n \tif (s != null && s.length() > 2) {\n startActivity(sendIntent);\n return;\n } else {\n \tToast.makeText(context, \"No Phone Call App Availible\", Toast.LENGTH_SHORT).show();\n \treturn;\n }\n\t}",
"public static InvocationExpression invoke(Expression expression, Iterable<Expression> arguments) { throw Extensions.todo(); }",
"public static void main(String[] args) {\n if (args.length != 1) {\r\n System.out.println(\r\n \"Usage: java EvaluateExpression \\\"expression\\\"\");\r\n System.exit(1);\r\n }\r\n \r\n /* Try to evaluate the expression and throw an exception if \r\n any problems occur */\r\n try {\r\n System.out.println(evaluateExpression(args[0]));\r\n }\r\n catch(Exception ex) {\r\n System.out.println(\"Wrong expression: \" + args[0]);\r\n }\r\n \r\n }",
"private void execURL(String link) {\n Uri webLink = Uri.parse(link);\n Intent openLink = new Intent(Intent.ACTION_VIEW, webLink);\n PackageManager pm = getPackageManager();\n List<ResolveInfo> handlers = pm.queryIntentActivities(openLink, 0);\n if (handlers.size() > 0)\n startActivity(openLink);\n }",
"public static void main(String[] args) {\n\n System.out.println(\"119.1+(28.2+37.3*(46.4-55.5)-4.6+(3/2)+1) = \" + evaluateExpression(\"119.1 + ( 28.2 + 37.3 * ( 46.4 - 55.5 ) - 4.6 + ( 3 / 2 ) + 1 )\"));\n\n}",
"public void launchEmail(){\n\t\tIntent sendIntent = new Intent(Intent.ACTION_MAIN); \n \tsendIntent.addCategory(Intent.CATEGORY_APP_EMAIL);\n\n if (sendIntent.resolveActivity(pacman) != null) {\n \tstartActivity(sendIntent);\n \treturn;\n } else {\n \tToast.makeText(context, \"No Email App Availible\", Toast.LENGTH_SHORT).show();\n \treturn;\n }\n\t}",
"public void openURL() throws Exception{\r\n\r\n\t try{\r\n\t driverUtil.trigger();\r\n\t reporter.reportTestStep(\"App Launch\", \"ok\", \"ok\", \"PASS\", false);\r\n\t }\r\n\t\t\r\n\tcatch(Exception e){\r\n\t\te.printStackTrace();\r\n\t}\r\n}",
"public String evaluate(String expression);",
"@GetMapping(\"/evaluate\")\n public ResponseEntity<?> evaluateSimpleExpression(@RequestParam(\"expression\") String expression) {\n try {\n double result = Interpreter.evaluate(expression);\n return new ResponseEntity<>(result,HttpStatus.OK);\n } catch (SyntaxError | IllegalArgumentException e) {\n return new ResponseEntity<>(e.getMessage(), HttpStatus.BAD_REQUEST);\n }\n }",
"protected void execute() {\n\t\tContainer container = (Container) model;\n\t\tString name = Utilities.ask(\"Component name?\");\n\t\ttry {\n\t\t\tcontainer.launch(name);\n\t\t}catch(Exception e) {\n\t\t\t//Utilities.error(\"must be component name\");\n\t\t\tUtilities.error(e.getMessage());\n\t\t\t//System.out.println(\"The name:\" + name);\n\t\t}\n\t}",
"public final void launchAuctionRuleActivity(String str) {\n Intent intent = new Intent(this, TermsOfUseAuctionRuleActivity.class);\n intent.putExtra(Constants_MVVM.EXTRA_AUCTION_RULE_URL, str);\n startActivityForResult(intent, ActivityRequestCode.FROM_LOGIN_TO_AUCTION_RULE.getValue());\n }",
"public static void main(String[] args) throws UnknownHostException, IOException {\n\t\tApplication.launch();\n\t}",
"public static MethodCallExpression call(Expression expression, Method method, Expression expression0, Expression expression1) { throw Extensions.todo(); }",
"public static void main(String[] args) {\n try {\n EcranPrincipal window = new EcranPrincipal();\n window.open();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public static void openCalculator() throws MalformedURLException {\n\t\tDesiredCapabilities cap = new DesiredCapabilities();\n\t\tcap.setCapability(\"deviceName\", \"Mi A2\");\n\t\tcap.setCapability(\"udid\", \"b77213\");\n\t\tcap.setCapability(\"platformName\", \"Android\");\n\t\tcap.setCapability(\"platformVersion\", \"9\");\n\t\t\n\t\tcap.setCapability(\"appPackage\", \"com.google.android.calculator\");\n\t\tcap.setCapability(\"appActivity\", \"com.android.calculator2.Calculator\");\n\t\t\n\t\tURL url = new URL(\"http://127.0.0.1:4723/wd/hub\");\n\t\tdriver = new AppiumDriver<MobileElement>(url, cap);\n\t\t\n\t\tSystem.out.println(\"Application Started...\");\n\t\t\n\t\tdriver.findElement(By.id(\"digit_5\")).click();\n\t\tdriver.findElement(By.id(\"digit_1\")).click();\n\t\tdriver.findElement(By.id(\"op_add\")).click();\n\t\tdriver.findElement(By.id(\"digit_4\")).click();\n\t\tdriver.findElement(By.id(\"eq\")).click();\n\t\t\n\t\tString result = driver.findElement(By.id(\"result\")).getText();\n\t\tif (\"55\".equals(result))\n\t\t\tSystem.out.println(\"PASSED\");\n\t\telse\n\t\t\tSystem.out.println(\"FAILED\");\n\t\t\n\t\t\n\t\t\n\t}",
"private void auctionJob(String expression){\r\n currentPartial = expression;\r\n solvers = getSolvers(expression.split(\" \")[2]);\r\n for (AID s: solvers){\r\n System.out.println(s.getLocalName());\r\n }\r\n proposals = new ArrayList<ACLMessage>();\r\n ACLMessage solveRequest = new ACLMessage(ACLMessage.CFP);\r\n solveRequest.setContent(expression);\r\n for(AID s: solvers){\r\n solveRequest.addReceiver(s);\r\n }\r\n send(solveRequest);\r\n\t}",
"@Test(priority=0) \r\n\tpublic void openApplication() { \r\n\t\tdriver.get(\"https://locator.chase.com/\");\r\n\t}",
"public static MethodCallExpression call(Expression expression, Method method, Expression argument0, Expression argument1, Expression argument2) { throw Extensions.todo(); }",
"public static MethodCallExpression call(Expression expression, Method method) { throw Extensions.todo(); }",
"@Test\n\tpublic void LaunchAppTest() throws MalformedURLException {\n\n\t\t// Appium Code to Launch the Calculator App without .apk File \n\n\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\n\t\tcapabilities.setCapability(\"platformName\", \"Android\");\n\t\tcapabilities.setCapability(MobileCapabilityType.DEVICE_NAME, \"emulator-5554\");\n\t\tcapabilities.setCapability(\"appPackage\", \"com.android.calculator2\");\n\t\tcapabilities.setCapability(\"appActivity\", \"com.android.calculator2.Calculator\");\n\t\tcapabilities.setCapability(\"autoLaunch\", true);\n\t\tAndroidDriver<AndroidElement> driver = new AndroidDriver<AndroidElement>(\n\t\t\t\tnew URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\t\tdriver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);\n\t\tdriver.quit();\n\t}",
"void launch();",
"void launch();",
"void launch();",
"@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\tNaukriPopup oo= new NaukriPopup();\n\too.launch();\n\too.launch1();\n}",
"abstract /*package*/ IValue executeRVMProgram(String moduleName, String uid_main, IValue[] posArgs, Map<String,IValue> kwArgs);",
"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 }",
"public static void main(String... args) {\n\t\tApplication.launch(View.class, args);\n\t}",
"public static void main(String[] args) throws Exception {\n Path selfPath = Paths.get(TestBrowser.class.getProtectionDomain().getCodeSource().getLocation().toURI());\n ModuleFinder finder = ModuleFinder.of(\n Paths.get(System.getProperty(\"javafx.sdk.path\")),\n selfPath\n );\n\n // Load the application as a named module and invoke it\n ModuleLayer parent = ModuleLayer.boot();\n Configuration cf = parent.configuration().resolve(finder, ModuleFinder.of(), Set.of(\"ReproduceOpenjfxCrash2\"));\n ClassLoader scl = ClassLoader.getSystemClassLoader();\n ModuleLayer layer = parent.defineModulesWithOneLoader(cf, scl);\n Class appClass = layer.findLoader(\"ReproduceOpenjfxCrash2\").loadClass(\"javafx.application.Application\");\n Class testClass = layer.findLoader(\"ReproduceOpenjfxCrash2\").loadClass(\"eu.doppel_helix.dev.jdk.reproducecrash.TestBrowserImpl\");\n Method launchMethod = appClass.getMethod(\"launch\", Class.class, String[].class);\n launchMethod.invoke(null, new Object[]{testClass, args});\n }",
"public static MethodCallExpression call(Expression expression, Method method, Expression[] arguments) { throw Extensions.todo(); }",
"private void openUri() {\n try {\n Desktop.getDesktop().browse(new URI(\"http://localhost:\" + Constants.DEFAULT_PORT));\n } catch (URISyntaxException | IOException e) {\n logger.error(\"MainService error [openUri]: \" + e);\n }\n }",
"public /* synthetic */ void lambda$new$0$LaunchOpa(Uri uri) {\n updateGestureEnabled();\n }",
"public abstract String getLaunchCommand();",
"public static void main(String[] args) \r\n\t {\r\n\t\tApplication.launch(args);\r\n\t }",
"@Override\n /**\n * User clicked something---launch the browser\n */\n public void propertyChange(PropertyChangeEvent propertyChangeEvent) {\n CardData cardData = (CardData) propertyChangeEvent.getNewValue();\n String url = cardData.getUrl();\n //showErrorMessage(\"clicked on \" + propertyChangeEvent.getNewValue());\n Uri uri = Uri.parse(url);\n\n // log the activity\n\n // TODO: Map the current feed's url\n String sourceUrlPath = getCurrentStrategy().getUrlPath(); // e,g, \"/news/home\"\n String idStr = String.format(\"%d\", cardData.getId());\n\n EventDispatchService dispatchService = _dispatchPaymentFactory.createEventDispatch(idStr);\n dispatchService.sendConfirmation(getDispatchSuccessCallback(), getDispatchFailureCallback());\n\n\n AuthEventPublicDispatch eventDispatchService = _dispatchPaymentFactory.createDispatch(sourceUrlPath, uri.getPath(), url);\n eventDispatchService.sendConfirmation(getEventDispatchSuccessCallback(), getEventDispatchFailureCallback());\n\n Intent browserLaunchIntent = new Intent(Intent.ACTION_VIEW, uri);\n startActivity(browserLaunchIntent);\n\n }",
"@Test\r\n\tpublic void startapp() {\n\t\tdriver.get(\"http://q.door.fund/\");\r\n\t\tdriver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\r\n\t\tString currentURL = driver.getCurrentUrl();\r\n\t\tAssert.assertTrue(currentURL.contains(\"q.door.fund\"));\r\n\t\tSystem.out.println(\"Application loaded\");\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tApplication.launch(args);\n\t\t\n\t\t\n\t\t\n\n\t}",
"public void clickFirstProgram() throws ParseException;",
"@Override\n\t \t\t\tpublic void onClick(View arg0) {\n\t \t\t\t\tList<PackageInfo> packages = getPackageManager().getInstalledPackages(0);\n\t \t\t\t\tstartActivity(getPackageManager().getLaunchIntentForPackage(packages.get(0).applicationInfo.packageName)); \n\t \t\t\t}",
"public static void main(String[] args) {\n\t\tDoubleEvaluator evaluator = new DoubleEvaluator();\r\n\t\tString expression = \"(2^3-1)*sin(pi/4)/ln(pi^2)\";\r\n\t\t// Evaluate an expression\r\n\t\tDouble result = evaluator.evaluate(expression);\r\n\t\t// Ouput the result\r\n\t\tSystem.out.println(expression + \" = \" + result);\r\n\t}",
"private void openApp(String packageName) {\n final String launcherPackage = packageName;\n assertThat(launcherPackage, notNullValue());\n mDevice.wait(Until.hasObject(By.pkg(launcherPackage).depth(0)), LAUNCH_TIMEOUT);\n\n // Launcher app\n Context context = InstrumentationRegistry.getContext();\n final Intent intent = context.getPackageManager()\n .getLaunchIntentForPackage(packageName);\n\n // Clear out any previous instances\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n context.startActivity(intent);\n\n // Wait for the app to appear\n mDevice.wait(Until.hasObject(By.pkg(packageName).depth(0)), LAUNCH_TIMEOUT);\n }",
"public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tApplication.launch(args);\r\n\t}",
"protected Object execScript(String call) {\r\n if (call==null||call.length()==0)\r\n return null;\r\n Desktop desktop = getDesktop();\r\n Object client = desktop.getClient();\r\n Doc doc = desktop.getDoc();\r\n \r\n int left = call.indexOf('(');\r\n String name = call.substring(0, left);\r\n String args = call.substring(left+1, call.length()-1);\r\n \r\n try {\r\n Object[] params;\r\n if (args.trim().length()==0)\r\n params = null;\r\n else\r\n params = Doc.parseParameters(doc, this, args);\r\n Method m = Doc.findMethod(client, name, params);\r\n return Doc.invokeMethod(m, client, params);\r\n } catch (OxyException e) {\r\n Desktop.warn(\"error invoking method \"+name+\" with args: \"+args, e);\r\n return null;\r\n }\r\n }",
"public static MethodCallExpression call(Method method, Expression expression) { throw Extensions.todo(); }",
"public static void main(String[] args) {\n\t\tApplication.launch(args);\n\n\t}",
"public static void main(String args[] ) throws Exception {\n\n \n Scanner s = new Scanner(System.in);\n System.out.print(\"enter exprestion : \");\n String expr=s.nextLine(); \n \n \n \n\n }",
"@Override\n public void execute(AbstractVFSApplication application)\n throws CommandException\n {\n switch (args.length)\n {\n case 1:\n {\n application.setCurrent((VDirectory) resolve(application, VDisk.PATH_SEPARATOR));\n break;\n }\n case 2:\n {\n int expr = args.length - 1;\n\n for (int i = 1; i < args.length; i++)\n {\n if (args[i].equals(AbstractVFSCommand.OPTION_H) || args[i].equals(AbstractVFSCommand.OPTION_HELP))\n {\n help();\n break;\n } else\n {\n expr = Math.min(i, expr);\n }\n }\n\n VObject destination = resolve(application, args[expr]);\n if (destination != null && destination instanceof VDirectory)\n {\n application.setCurrent((VDirectory) destination);\n break;\n }\n }\n default:\n {\n usage();\n break;\n }\n }\n }",
"public static void main(String args[]) {\n try {\n Application.launch(args);\n } catch (Exception e) {\n System.out.println(\"Exception found: \" + e.getMessage());\n }\n\n }",
"FunDef resolve(\n Exp[] args,\n Validator validator,\n List<Conversion> conversions);",
"public void onClick2(View v) {\n\n\n PackageManager pm = getPackageManager();\n Intent intent = pm.getLaunchIntentForPackage(\"com.lee.test\");\n\n if (intent != null) {\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }else {\n Toast.makeText(MainActivity.this,\"空intent\",Toast.LENGTH_SHORT).show();\n }\n\n\n }",
"public static void main(String[] args) {\n\t\tApplication.launch(args);\n\t}",
"public static void main(String[] args) {\n\t\tApplication.launch(args);\n\t}",
"@Override\r\n\tpublic void launch(ISelection arg0, String arg1) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tSystem.out.println(\"Ok launch\");\r\n\t\tMessageBox dialog = new MessageBox(shell, SWT.ICON_QUESTION | SWT.OK\r\n\t\t\t\t| SWT.CANCEL);\r\n\t\tdialog.setText(\"ZCWeb Running Application\");\r\n\t\tdialog.setMessage(\"You choosed to run/debug ---- \"\r\n\t\t\t\t+ sampleGetSelectedProject() + \" ---- as a Web Application\");\r\n\t\tdialog.open();\r\n\t\tLaunchWebApp.main(args);\r\n\r\n\t}",
"@Override\n public Object execute(ExecutionEvent event) {\n\n final Shell shell = HandlerUtil.getActiveWorkbenchWindow(event).getShell();\n final Object source = HandlerUtil.getCurrentSelection(event);\n\n // System.err.println(\"Event source = \"+source.toString()+\"\\n class = \"+source.getClass().toString());\n if (!(source instanceof TreeSelection)) {// Ignore\n// System.err.println(\"Source is not an instance of TreeSelection\");\n return null;\n }\n TreeSelection selection = (TreeSelection) source;\n if (!(selection.getFirstElement() instanceof IProject)) {\n // Must be project\n// System.err.println(\"Selection.getFirstElement() is not an instance of org.eclipse.cdt.core.model.IProject\");\n return null;\n } \n IBinary[] results = LaunchParameterUtilities.searchForExecutable(selection.toArray());\n if (results.length < 1) {\n displayError(shell, \"Binary not found\\nPlease build target first\");\n return null;\n }\n IBinary bin = LaunchParameterUtilities.chooseBinary(shell, results);\n try {\n // May be cancelled so quietly check for null\n if (bin != null) {\n LaunchParameterUtilities.createLaunchConfig(shell, (IProject) selection.getFirstElement(), bin);\n }\n } catch (Exception e) {\n Activator.logError(\"Failed to launch program\", e);\n displayError(shell, e.getMessage());\n }\n return null;\n }",
"public static void main(String[] args) {\n \targuments = args;\n launch(args);\n }",
"public Object eval(String expression) throws Exception;",
"private void launchMain() {\n\t\tfinal Intent i = new Intent(this, MainActivity.class);\n\t\tstartActivity(i);\n\t}",
"public static void main(String[] args) {\n\n Application.launch(args);\n }",
"@Override\n @Argument(name = \"alert\", type = ArgumentType.RETURNS, isReturnsType = true)\n protected Alert internalExecute(JavaRuleContext context,\n AlertCreationRule.AlertCreationRuleArguments arguments) {\n log.info(\"Current application name:[{}]\", arguments.getApplication().getName());\n return arguments.getAlert();\n }",
"public static void main(String[] args) {\n\t\tlaunch(PhotoFlowApplication.class, args);\n\t}",
"public static void main(String[] args) {\n Application.launch(args);\n }",
"public void iterateAndClickParticularProgram(final String programeName);",
"private void launchCamera() {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // Create a File reference for future access\n photoFile = getPhotoFileUri(photoFileName);\n\n // wrap File object into a content provider\n // required for API >= 24\n // See https://guides.codepath.com/android/Sharing-Content-with-Intents#sharing-files-with-api-24-or-higher\n Uri fileProvider = FileProvider.getUriForFile(getContext(), \"com.codepath.fileprovider\", photoFile);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileProvider);\n\n // If you call startActivityForResult() using an intent that no app can handle, your app will crash.\n // So as long as the result is not null, it's safe to use the intent.\n if (intent.resolveActivity(getContext().getPackageManager()) != null) {\n // Start the image capture intent to take photo\n startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);\n }\n }",
"private void launchCamera() {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // Create a File reference to access to future access\n photoFile = getPhotoFileUri(photoFileName);\n\n // wrap File object into a content provider\n // required for API >= 24\n // See https://guides.codepath.com/android/Sharing-Content-with-Intents#sharing-files-with-api-24-or-higher\n Uri fileProvider = FileProvider.getUriForFile(getContext(), \"com.codepath.fileprovider\", photoFile);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileProvider);\n\n // If you call startActivityForResult() using an intent that no app can handle, your app will crash.\n // So as long as the result is not null, it's safe to use the intent.\n if (intent.resolveActivity(getContext().getPackageManager()) != null) {\n // Start the image capture intent to take photo\n startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);\n }\n }",
"public static void main(String[] args) {\r\n\t launch(args); \r\n \r\n}",
"private static int evaluateExpression(String expression, int number1, int number2){\n if(expression.equals(\"plus\")){\n \treturn (number1 + number2);\n }else if(expression.equals(\"minus\")){\n \treturn (number1 - number2);\n }else if(expression.equals(\"times\")){\n \treturn(number1 * number2);\n }else if(expression.equals(\"divide\")){\n \treturn(number1 / number2);\n }\n return 0;\n \n }",
"public static MethodCallExpression call(Method method, Expression expression0, Expression expression1) { throw Extensions.todo(); }",
"public static void main(String[] args) throws IOException {\n String result;\n\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String expression;\n do {\n // display prompt\n System.out.print(\"> \");\n // read input\n expression = in.readLine();\n // terminate if input empty\n if (!expression.equals(\"\")) {\n try {\n Differentiator diff = new Differentiator();\n result = diff.evaluate(expression, \"x\");\n System.out.println(result);\n } catch (RuntimeException re) {\n System.err.println(\"Error: \" + re.getMessage());\n } \n }\n } while (!expression.equals(\"\"));\n }",
"public static void main(String[] args) {\n\t\tApplication.launch(args); // Not needed for running from the command line\n\t}",
"public static void openPlayStoreEntry()\n\t{\n\t\tApp.getInstance().startActivity(new Intent(Intent.ACTION_VIEW)\n\t\t\t\t.setData(Uri.parse(\"market://details?id=\" + General.PKG_MESSENGERAPI+\"&referrer=utm_source%3D\"+App.getInstance().getPackageName()+\"%26utm_medium%3DAPIMethod%26utm_campaign%3DAPICampaign\"))\n\t\t\t\t.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));\n\t}",
"public void startApp()\r\n\t{\n\t}",
"public Object eval (Object expression);",
"public static void main (String args[]){\r\n\t\tCalculator s = new Calculator();\r\n\t\ts.launchFrame();\r\n\t}",
"public static MethodCallExpression call(Method method, Expression expression0, Expression expression1, Expression expression2) { throw Extensions.todo(); }",
"@Given(\"^User launches the application$\")\r\npublic void user_launches_the_application() throws Throwable {\r\n\tdriver.get(prop.getProperty(\"url\"));\r\n WebDriverWait wait = new WebDriverWait(driver,60);\r\n\t wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(prop.getProperty(\"Popup\"))));\r\n\t driver.findElement(By.xpath(prop.getProperty(\"Popup\"))).click();Thread.sleep(5000);\r\n}",
"public static void main(String[] args) {\n\t\t\n\t\tReusableMethods m = new ReusableMethods();\n\t\tm.launchApp();\n\t\tm.closeApp();\n\t\tm.launchAppWithArguments(\"http://facebook.com\");\n\t\tm.elementAvaialble(\"email\", true);\n\t\tm.elementAvaialble(\"pass\", false);\n\t\tm.elementAvaialble(\"day\", true);\n\t\tm.elementAvaialble(\"month\", false);\n\t\tm.elementsCount(\"a\", 50);\n\t\tm.elementsCount(\"img\", 5);\n\t\tm.elementsCount(\"select\", 3);\n\t\tm.closeApp();\n\t\tm.launchAppWithArguments(\"http://yahoo.com\");\n\t\tm.elementsCount(\"img\", 5);\n\t\tm.closeApp();\n\t\t\n\t\t\n\n\t}",
"public static void main(String[] args){\r\n //Launch the JavaFX app\r\n Application.launch(args);\r\n }",
"public static void main(String[] args)\r\n {\n if(args.length!=1)\r\n {\r\n System.err.println(\"invalid input\");\r\n return;\r\n }\r\n\r\n //check if the regexp command-line argument encloses within double-quote characters\r\n expression=args[0];\r\n \r\n\r\n //build the start state\r\n state start=new state(state,\"START\",0,0);\r\n stateList.add(start);\r\n state++;\r\n\r\n\r\n try\r\n {\r\n //check if the expression is valid as well as starting building our FSM\r\n parse();\r\n }\r\n catch (Exception e)\r\n {\r\n error();\r\n }\r\n\r\n //if the expression is invalid then alert the user\r\n //otherwise output FSM\r\n if(valid)\r\n {\r\n\r\n for(int i=0;i<=stateList.size()-1;i++)\r\n {\r\n stateList.get(i).print();\r\n }\r\n }\r\n else\r\n {\r\n System.out.println(valid);\r\n }\r\n\r\n\r\n }",
"public static String evaluate( String expr )\n {\n\n\tString[] arr = expr.split(\"//s+\");\n\tString ret = \"\";\n\tALStack<String> stack = new ALStack<String>();\n\tfor( String s: arr)\n\t stack.push(s);\n\n\tif( stack.peek().equals(\"(\")){\n\t stack.pop();\n\t int operator = findOp(stack.pop());\n\t ret = unload(operator, stack);\n\t return ret;\n\t}\n\treturn \"\";\n }",
"public static MethodCallExpression call(Expression expression, String methodName, Class[] typeArguments, Expression[] arguments) { throw Extensions.todo(); }",
"@SuppressWarnings(\"unchecked\")\n @Test\n public void testExecuteWithInvocationContext() throws Exception {\n TestApplicationWithoutEngine processApplication = spy(pa);\n ProcessApplicationReference processApplicationReference = mock(ProcessApplicationReference.class);\n when(processApplicationReference.getProcessApplication()).thenReturn(processApplication);\n\n // when execute with context\n InvocationContext invocationContext = new InvocationContext(mock(BaseDelegateExecution.class));\n Context.executeWithinProcessApplication(mock(Callable.class), processApplicationReference, invocationContext);\n\n // then the execute method should be invoked with context\n verify(processApplication).execute(any(Callable.class), eq(invocationContext));\n // and forward to call to the default execute method\n verify(processApplication).execute(any(Callable.class));\n }",
"public static void launch(String[] args) {\r\n\t\t// Figure out the right class to call\r\n\t\tStackTraceElement[] cause = Thread.currentThread().getStackTrace();\r\n\r\n\t\tboolean foundThisMethod = false;\r\n\t\tString callingClassName = null;\r\n\t\tfor (StackTraceElement se : cause) {\r\n\t\t\t// Skip entries until we get to the entry for this class\r\n\t\t\tString className = se.getClassName();\r\n\t\t\tString methodName = se.getMethodName();\r\n\t\t\tif (foundThisMethod) {\r\n\t\t\t\tcallingClassName = className;\r\n\t\t\t\tbreak;\r\n\t\t\t} else if (LWJGUIApplication.class.getName().equals(className) && \"launch\".equals(methodName)) {\r\n\t\t\t\tfoundThisMethod = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (callingClassName == null) {\r\n\t\t\tthrow new RuntimeException(\"Error: unable to determine main class\");\r\n\t\t}\r\n\t\tObject object = null;\r\n\t\ttry {\r\n\t\t\tClass<?> theClass = Class.forName(callingClassName, true, Thread.currentThread().getContextClassLoader());\r\n\t\t\tobject = theClass.newInstance();\r\n\t\t} catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tlaunch((LWJGUIApplication) object,args);\r\n\t}",
"public static void main(String[] args) {\n//\t\tip = args[0];\n\t\tlaunch(args);\n\t}",
"@Override // com.tapjoy.internal.fz\n public final /* bridge */ /* synthetic */ String a(Object obj) {\n return \"AppLaunch\";\n }",
"public void launch(LocalAppDesc app) throws IOException {\n \n if(app.getExecutableCmd() == null) {\n throw new IOException(\"Command not specified\");\n }\n \n String cmd = app.getExecutableCmd();\n String argsLine = app.getArgs();\n File curDir = app.getStartInDir();\n \n String args[] = null;\n if(argsLine != null) {\n args = CmdLineParser.parse(argsLine);\n }\n \n ArrayList cmds = new ArrayList();\n cmds.add(cmd);\n if(args != null) {\n cmds.addAll(Arrays.asList(args));\n }\n \n RuntimeHelper.exec((String[])cmds.toArray(new String[cmds.size()]), null, curDir);\n }",
"@Override\n public void execute () {\n if (Desktop.isDesktopSupported()) {\n try {\n Desktop.getDesktop().browse(new URI(HELP_URL));\n }\n catch (Exception e) {\n\n }\n }\n }",
"private void openUrl() throws IOException, URISyntaxException{\r\n if(Desktop.isDesktopSupported()){\r\n Desktop desktop = Desktop.getDesktop();\r\n desktop.browse(new URI(url));\r\n } else {\r\n Runtime runtime = Runtime.getRuntime();\r\n runtime.exec(\"xdg-open \" + url);\r\n }\r\n }",
"@Override\n\t\t\tprotected void invokeApplication() {\n\t\t\t\tinvokeMethod(\"#{testAction.testActionMethod}\");\n\t\t\t}",
"@Override // kotlin.jvm.functions.Function0\n public Unit invoke() {\n CameraItemPresenter.Router router = this.a.a.d;\n if (router != null) {\n router.openAppSettings();\n }\n return Unit.INSTANCE;\n }",
"public static MethodCallExpression call(Expression expression, Method method, Iterable<Expression> arguments) { throw Extensions.todo(); }",
"@Given(\"user launches application {string}\")\n\tpublic void user_launches_application(String string) {\n\t\tDriverFactory.getDriver().get(string);\n\t\tPageFactory.initElements(DriverFactory.getDriver(), this);\n\t\tthp.get();\n\t}",
"@Given(\"^user should launch the browser$\")\n\tpublic void user_should_launch_the_browser() throws Throwable {\n\t\tgetUrl(\"https://adactin.com/HotelAppBuild2/\");\n\t \n\t}",
"@SuppressWarnings(\"unchecked\")\n @Override\n public double fire(IInstantiation instantiation, double firingTime)\n {\n try\n {\n String[] arguments = new String[0];\n Class c = getClass().getClassLoader().loadClass(_className);\n // get the class\n Class[] args = new Class[1];\n args[0] = arguments.getClass();\n Method method = c.getMethod(\"main\", args);\n // get main method\n Object[] params = new Object[1];\n params[0] = arguments;\n method.invoke(null, params);\n // invoke\n }\n catch (Exception e)\n {\n LOGGER.error(\"Execute error\", e);\n throw new ModelerException(_className\n + \".main(String[]) invocation error.\", e,\n \"Are you sure you spelled the class name correctly? Is it in your path?\");\n }\n return 0.0;\n }",
"public static void jumpToApp(String paramString1, String paramString2, String paramString3, String paramString4, boolean paramBoolean, String paramString5, String paramString6, int paramInt, String paramString7) {\n }",
"public static MethodCallExpression call(Method method, Expression argument0, Expression argument1, Expression argument2, Expression argument3) { throw Extensions.todo(); }",
"public void execute() {\n _plugin.openNavigator();\n }"
] | [
"0.5620465",
"0.56057286",
"0.5579947",
"0.5558349",
"0.5384434",
"0.53202945",
"0.5188073",
"0.5002836",
"0.49598527",
"0.49281967",
"0.49277675",
"0.48254424",
"0.48131195",
"0.47931132",
"0.4790375",
"0.47465253",
"0.47424206",
"0.4738486",
"0.47291973",
"0.47246936",
"0.47046447",
"0.47033304",
"0.46986225",
"0.46984845",
"0.46984845",
"0.46984845",
"0.46838734",
"0.46838734",
"0.46838734",
"0.4681353",
"0.46782672",
"0.46703807",
"0.46505985",
"0.46480468",
"0.46447358",
"0.46447185",
"0.4643278",
"0.46385488",
"0.46229392",
"0.46086982",
"0.4588539",
"0.45650288",
"0.45649981",
"0.45630854",
"0.4552437",
"0.45440507",
"0.45405778",
"0.45393035",
"0.45381305",
"0.45320696",
"0.45308837",
"0.452292",
"0.45215377",
"0.45041475",
"0.45039818",
"0.44990128",
"0.44990128",
"0.449626",
"0.44887516",
"0.44884372",
"0.448807",
"0.44818017",
"0.44815424",
"0.4477363",
"0.44763082",
"0.44671065",
"0.44646767",
"0.44633135",
"0.44614577",
"0.445976",
"0.44586456",
"0.4455867",
"0.4453773",
"0.44377804",
"0.44373357",
"0.4421542",
"0.44139042",
"0.4410373",
"0.4407562",
"0.44014156",
"0.43998912",
"0.43994084",
"0.4396951",
"0.43909746",
"0.43715328",
"0.43704548",
"0.43698895",
"0.43640062",
"0.4362806",
"0.43580195",
"0.43578318",
"0.43571895",
"0.43539637",
"0.43497354",
"0.43490505",
"0.43437305",
"0.43209413",
"0.431818",
"0.43154246",
"0.4313818",
"0.43118578"
] | 0.0 | -1 |
constructor Initialize the contents of the frame. | private void initialize() {
frmAsmAssembler = new JFrame();
frmAsmAssembler.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent arg0) {
appClose();
}
});
frmAsmAssembler.setTitle("ASM - assembler for Zilog Z80 2.1.0");
frmAsmAssembler.setBounds(100, 100, 662, 541);
frmAsmAssembler.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
GridBagLayout gridBagLayout = new GridBagLayout();
gridBagLayout.columnWidths = new int[] { 0, 0 };
gridBagLayout.rowHeights = new int[] { 0, 30, 0 };
gridBagLayout.columnWeights = new double[] { 1.0, Double.MIN_VALUE };
gridBagLayout.rowWeights = new double[] { 1.0, 0.0, Double.MIN_VALUE };
frmAsmAssembler.getContentPane().setLayout(gridBagLayout);
JPanel panelTop = new JPanel();
GridBagConstraints gbc_panelTop = new GridBagConstraints();
gbc_panelTop.insets = new Insets(0, 0, 5, 0);
gbc_panelTop.fill = GridBagConstraints.BOTH;
gbc_panelTop.gridx = 0;
gbc_panelTop.gridy = 0;
frmAsmAssembler.getContentPane().add(panelTop, gbc_panelTop);
GridBagLayout gbl_panelTop = new GridBagLayout();
gbl_panelTop.columnWidths = new int[] { 0, 0 };
gbl_panelTop.rowHeights = new int[] { 0, 0, 0 };
gbl_panelTop.columnWeights = new double[] { 1.0, Double.MIN_VALUE };
gbl_panelTop.rowWeights = new double[] { 0.0, 1.0, Double.MIN_VALUE };
panelTop.setLayout(gbl_panelTop);
lblSourceFilePath = new JLabel(NO_FILE);
GridBagConstraints gbc_lblSourceFilePath = new GridBagConstraints();
gbc_lblSourceFilePath.insets = new Insets(0, 0, 5, 0);
gbc_lblSourceFilePath.anchor = GridBagConstraints.NORTH;
gbc_lblSourceFilePath.gridx = 0;
gbc_lblSourceFilePath.gridy = 0;
panelTop.add(lblSourceFilePath, gbc_lblSourceFilePath);
JPanel panelMain = new JPanel();
GridBagConstraints gbc_panelMain = new GridBagConstraints();
gbc_panelMain.fill = GridBagConstraints.BOTH;
gbc_panelMain.gridx = 0;
gbc_panelMain.gridy = 1;
panelTop.add(panelMain, gbc_panelMain);
GridBagLayout gbl_panelMain = new GridBagLayout();
gbl_panelMain.columnWidths = new int[] { 80, 0, 0 };
gbl_panelMain.rowHeights = new int[] { 0, 0 };
gbl_panelMain.columnWeights = new double[] { 0.0, 1.0, Double.MIN_VALUE };
gbl_panelMain.rowWeights = new double[] { 1.0, Double.MIN_VALUE };
panelMain.setLayout(gbl_panelMain);
JPanel panelLeft = new JPanel();
GridBagConstraints gbc_panelLeft = new GridBagConstraints();
gbc_panelLeft.insets = new Insets(0, 0, 0, 5);
gbc_panelLeft.fill = GridBagConstraints.VERTICAL;
gbc_panelLeft.gridx = 0;
gbc_panelLeft.gridy = 0;
panelMain.add(panelLeft, gbc_panelLeft);
GridBagLayout gbl_panelLeft = new GridBagLayout();
gbl_panelLeft.columnWidths = new int[] { 0, 0, 0 };
gbl_panelLeft.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
gbl_panelLeft.columnWeights = new double[] { 0.0, 1.0, Double.MIN_VALUE };
gbl_panelLeft.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
Double.MIN_VALUE };
panelLeft.setLayout(gbl_panelLeft);
btnStart = new JButton("Start");
btnStart.setEnabled(false);
btnStart.setName(START_BUTTON);
btnStart.addActionListener(adapterForASM);
GridBagConstraints gbc_btnStart = new GridBagConstraints();
gbc_btnStart.insets = new Insets(0, 0, 5, 5);
gbc_btnStart.anchor = GridBagConstraints.NORTH;
gbc_btnStart.gridx = 0;
gbc_btnStart.gridy = 0;
panelLeft.add(btnStart, gbc_btnStart);
rbListing = new JRadioButton("Listing");
rbListing.setSelected(true);
GridBagConstraints gbc_rbListing = new GridBagConstraints();
gbc_rbListing.anchor = GridBagConstraints.WEST;
gbc_rbListing.insets = new Insets(0, 0, 5, 5);
gbc_rbListing.gridx = 0;
gbc_rbListing.gridy = 2;
panelLeft.add(rbListing, gbc_rbListing);
rbMemFile = new JRadioButton("Mem File");
rbMemFile.setSelected(true);
GridBagConstraints gbc_rbMemFile = new GridBagConstraints();
gbc_rbMemFile.anchor = GridBagConstraints.WEST;
gbc_rbMemFile.insets = new Insets(0, 0, 5, 5);
gbc_rbMemFile.gridx = 0;
gbc_rbMemFile.gridy = 4;
panelLeft.add(rbMemFile, gbc_rbMemFile);
rbHexFile = new JRadioButton("Hex File");
rbHexFile.setSelected(true);
GridBagConstraints gbc_rbHexFile = new GridBagConstraints();
gbc_rbHexFile.anchor = GridBagConstraints.WEST;
gbc_rbHexFile.insets = new Insets(0, 0, 5, 5);
gbc_rbHexFile.gridx = 0;
gbc_rbHexFile.gridy = 6;
panelLeft.add(rbHexFile, gbc_rbHexFile);
JButton btnLoadLastFile = new JButton("Load Last File");
btnLoadLastFile.setName(BTN_LOAD_LAST_FILE);
btnLoadLastFile.addActionListener(adapterForASM);
rbTerse = new JRadioButton("Terse");
rbTerse.setSelected(true);
GridBagConstraints gbc_rbTerse = new GridBagConstraints();
gbc_rbTerse.anchor = GridBagConstraints.WEST;
gbc_rbTerse.insets = new Insets(0, 0, 5, 5);
gbc_rbTerse.gridx = 0;
gbc_rbTerse.gridy = 8;
panelLeft.add(rbTerse, gbc_rbTerse);
GridBagConstraints gbc_btnLoadLastFile = new GridBagConstraints();
gbc_btnLoadLastFile.anchor = GridBagConstraints.NORTH;
gbc_btnLoadLastFile.insets = new Insets(0, 0, 0, 5);
gbc_btnLoadLastFile.gridx = 0;
gbc_btnLoadLastFile.gridy = 10;
panelLeft.add(btnLoadLastFile, gbc_btnLoadLastFile);
splitPane = new JSplitPane();
splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
splitPane.setDividerSize(8);
splitPane.setOneTouchExpandable(true);
GridBagConstraints gbc_splitPane = new GridBagConstraints();
gbc_splitPane.fill = GridBagConstraints.BOTH;
gbc_splitPane.gridx = 1;
gbc_splitPane.gridy = 0;
panelMain.add(splitPane, gbc_splitPane);
spSource = new JScrollPane();
splitPane.setLeftComponent(spSource);
lblSourceFileName = new JLabel(NO_FILE);
lblSourceFileName.setForeground(Color.BLUE);
lblSourceFileName.setFont(new Font("Tahoma", Font.PLAIN, 15));
lblSourceFileName.setHorizontalAlignment(SwingConstants.CENTER);
spSource.setColumnHeaderView(lblSourceFileName);
tpSource = new JTextPane();
tpSource.setFont(new Font("Courier New", Font.PLAIN, 14));
spSource.setViewportView(tpSource);
spListing = new JScrollPane();
splitPane.setRightComponent(spListing);
lblListingFileName = new JLabel(NO_FILE);
lblListingFileName.setHorizontalAlignment(SwingConstants.CENTER);
lblListingFileName.setForeground(Color.BLUE);
lblListingFileName.setFont(new Font("Tahoma", Font.PLAIN, 15));
spListing.setColumnHeaderView(lblListingFileName);
tpListing = new JTextPane();
tpListing.setFont(new Font("Courier New", Font.PLAIN, 14));
spListing.setViewportView(tpListing);
panelStatus = new JPanel();
panelStatus.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
GridBagConstraints gbc_panelStatus = new GridBagConstraints();
gbc_panelStatus.fill = GridBagConstraints.BOTH;
gbc_panelStatus.gridx = 0;
gbc_panelStatus.gridy = 1;
frmAsmAssembler.getContentPane().add(panelStatus, gbc_panelStatus);
GridBagLayout gbl_panelStatus = new GridBagLayout();
gbl_panelStatus.columnWidths = new int[] { 0, 0 };
gbl_panelStatus.rowHeights = new int[] { 0, 0 };
gbl_panelStatus.columnWeights = new double[] { 0.0, Double.MIN_VALUE };
gbl_panelStatus.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
panelStatus.setLayout(gbl_panelStatus);
lblStatus = new JLabel("");
lblStatus.setForeground(Color.RED);
lblStatus.setFont(new Font("Tahoma", Font.PLAIN, 14));
GridBagConstraints gbc_lblStatus = new GridBagConstraints();
gbc_lblStatus.gridx = 0;
gbc_lblStatus.gridy = 0;
panelStatus.add(lblStatus, gbc_lblStatus);
menuBar = new JMenuBar();
frmAsmAssembler.setJMenuBar(menuBar);
JMenu mnuFile = new JMenu("File");
menuBar.add(mnuFile);
JMenuItem mnuFileOpen = new JMenuItem("Open File");
mnuFileOpen.setName(MNU_FILE_OPEN);
mnuFileOpen.addActionListener(adapterForASM);
mnuFile.add(mnuFileOpen);
separator = new JSeparator();
mnuFile.add(separator);
mnuFilePrintSource = new JMenuItem("Print Source");
mnuFilePrintSource.setName(MNU_FILE_PRINT_SOURCE);
mnuFilePrintSource.addActionListener(adapterForASM);
mnuFile.add(mnuFilePrintSource);
mnuFilePrintListing = new JMenuItem("Print Listing");
mnuFilePrintListing.setName(MNU_FILE_PRINT_LISTING);
mnuFilePrintListing.addActionListener(adapterForASM);
mnuFile.add(mnuFilePrintListing);
separator_1 = new JSeparator();
mnuFile.add(separator_1);
JMenuItem mnuFileExit = new JMenuItem("Exit");
mnuFileExit.setName(MNU_FILE_EXIT);
mnuFileExit.addActionListener(adapterForASM);
mnuFile.add(mnuFileExit);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BreukFrame() {\n super();\n initialize();\n }",
"public SiscobanFrame() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t}",
"public MainFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}",
"public Frame() {\n initComponents();\n }",
"public Frame() {\n initComponents();\n }",
"public FrameControl() {\n initComponents();\n }",
"protected HFrame(){\n\t\tinit();\n\t}",
"public SerialCommFrame()\n {\n super();\n initialize();\n }",
"public internalFrame() {\r\n initComponents();\r\n }",
"public MainFrame() {\n initComponents();\n \n }",
"private void initialize() {\n\t\tthis.setSize(211, 449);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setTitle(\"JFrame\");\n\t}",
"public EmulatorFrame() {\r\n\t\tsuper(\"Troyboy Chip8 Emulator\");\r\n\t\t\r\n\t\tsetNativeLAndF();\r\n\t\tinitComponents();\r\n\t\tinitMenubar();\r\n\t\tsetupLayout();\r\n\t\tinitFrame();\r\n\t\t//frame is now ready to run a game\r\n\t\t//running of any games must be started by loading a ROM\r\n\t}",
"private void init(Element frame) {\n\t\tthis.frameWidth = Integer.parseInt(frame.attributeValue(\"width\"));\n\t\tthis.frameHeight = Integer.parseInt(frame.attributeValue(\"height\"));\n\t\tthis.paddle = Integer.parseInt(frame.attributeValue(\"paddle\"));\n\t\tthis.size = Integer.parseInt(frame.attributeValue(\"size\"));\n\t}",
"public FrameDesign() {\n initComponents();\n }",
"public MainFrame() {\n \n initComponents();\n \n this.initNetwork();\n \n this.render();\n \n }",
"public Mainframe() {\n initComponents();\n }",
"private void initialize() {\n\t\tframe = new JFrame(\"BirdSong\");\n\t\tframe.pack();\n\t\tframe.setVisible(true);\n\t\tframe.setBounds(100, 100, 400, 200);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tabc = new BirdPanel();\n\t\ttime = new TimePanel();\n\t\tgetContentPane().setLayout(new BoxLayout(frame, BoxLayout.Y_AXIS));\n\n\t\tframe.getContentPane().add(abc, BorderLayout.NORTH);\n\t\tframe.getContentPane().add(time, BorderLayout.CENTER);\n\t}",
"public JGSFrame() {\n\tsuper();\n\tinitialize();\n }",
"public BaseFrame() {\n initComponents();\n }",
"private void initialize() {\r\n\t\tthis.setSize(530, 329);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t}",
"public MassMsgFrame() {\n\t}",
"public TestFrames() {\n\t\tclasslogger.info(\"Called constructor for TestFrames...\");\n\t}",
"public MercadoFrame() {\n initComponents();\n }",
"private void initialize() {\r\n\t\tthis.setSize(300, 200);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t}",
"public MainFrame() {\n try {\n initComponents();\n initElements();\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Error \" + e.getMessage());\n }\n }",
"private void initialize() {\n\t\tthis.setSize(329, 270);\n\t\tthis.setContentPane(getJContentPane());\n\t}",
"private void initialize() {\r\n\t\tthis.setSize(392, 496);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"Informações\");\r\n\t}",
"private void initialize() {\n\t\tthis.setSize(300, 300);\n\t\tthis.setIconifiable(true);\n\t\tthis.setClosable(true);\n\t\tthis.setTitle(\"Sobre\");\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setFrameIcon(new ImageIcon(\"images/16x16/info16x16.gif\"));\n\t}",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\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}",
"private void initialize() {\r\n\t\tthis.setSize(311, 153);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t\tsetCancelButton( btnCancel );\r\n\t}",
"StudentFrame() {\n \tgetContentPane().setFont(new Font(\"Times New Roman\", Font.PLAIN, 11));\n s1 = null; // setting to null\n initializeComponents(); // causes frame components to be initialized\n }",
"private void initialize() {\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setSize(810, 600);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setBackground(new java.awt.Color(226,226,222));\n\t\tthis.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n\t\tthis.setModal(true);\n\t\tthis.setResizable(false);\n\t\tthis.setName(\"FramePrincipalLR\");\n\t\tthis.setTitle(\"CR - Lista de Regalos\");\n\t\tthis.setLocale(new java.util.Locale(\"es\", \"VE\", \"\"));\n\t\tthis.setUndecorated(false);\n\t}",
"public Jframe() {\n initComponents();\n setIndice();\n loadTextBoxs();\n }",
"public PilaFrame() {\n initComponents();\n }",
"public LoginFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}",
"public SMFrame() {\n initComponents();\n updateComponents();\n }",
"public NewFrame() {\n initComponents();\n }",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(0, 0, 1100, 800);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tsetUIComponents();\n\t\tsetControllers();\n\n\t}",
"private void initialize() {\n\t\tframe = new JFrame(\"Media Inventory\");\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\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}",
"public MainFrame() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"private void initialize() {\r\n\t\tthis.setSize(497, 316);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t\tthis.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}",
"@SuppressWarnings(\"OverridableMethodCallInConstructor\")\n public ServerFrame() {\n initComponents();\n init();\n connection();\n }",
"public FirstNewFrame() {\n\t\tjbInit();\n\t}",
"public mainframe() {\n initComponents();\n }",
"private void initialize() {\n this.setSize(495, 276);\n this.setTitle(\"Translate Frost\");\n this.setContentPane(getJContentPane());\n }",
"public POSFrame() {\n initComponents();\n }",
"public MenuFrame() {\n initComponents();\n }",
"public FrameInsert() {\n initComponents();\n }",
"public MiFrame2() {\n initComponents();\n }",
"public MainFrameController() {\n }",
"public FramePrincipal() {\n initComponents();\n }",
"private void initialize() {\n this.setSize(253, 175);\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setContentPane(getJContentPane());\n this.setTitle(\"Breuken vereenvoudigen\");\n }",
"private void initialize() {\n this.setSize(300, 200);\n this.setContentPane(getJContentPane());\n this.pack();\n }",
"public BookingFrame() {\r\n try {\r\n jbInit();\r\n } catch (Exception exception) {\r\n exception.printStackTrace();\r\n }\r\n }",
"public FramePrincipal() {\n\t\tinitComponents();\n\t}",
"public TifViewFrame() {\n initComponents();\n }",
"public FrameForm() {\n initComponents();\n }",
"public FramePrincipal() {\r\n initComponents();\r\n }",
"private void initialize() {\n m_frame = new JFrame(\"Video Recorder\");\n m_frame.setResizable(false);\n m_frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n m_frame.setLayout(new BorderLayout());\n m_frame.add(buildContentPanel(), BorderLayout.CENTER);\n\n JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 5, 5));\n JButton startButton = new JButton(\"Start\");\n startButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent ae) {\n listen();\n }\n });\n buttonPanel.add(startButton);\n\n m_connectionLabel = new JLabel(\"Disconnected\");\n m_connectionLabel.setOpaque(true);\n m_connectionLabel.setBackground(Color.RED);\n m_connectionLabel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 3));\n m_connectionLabel.setPreferredSize(new Dimension(100, 26));\n m_connectionLabel.setHorizontalAlignment(SwingConstants.CENTER);\n buttonPanel.add(m_connectionLabel);\n\n m_frame.add(buttonPanel, BorderLayout.PAGE_END);\n }",
"public frame() {\r\n\t\tframeOwner = 0;\r\n\t\tassignedProcess = 0;\r\n\t\tpageNumber = 0;\r\n\t}",
"protected ProtocolControlFrame() {\n super();\n }",
"private void initialize() {\r\n\t\t// this.setSize(271, 295);\r\n\t\tthis.setSize(495, 392);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(ResourceBundle.getBundle(\"Etiquetas\").getString(\"MainTitle\"));\r\n\t}",
"public InfoFilterFrame() {\n enableEvents(AWTEvent.WINDOW_EVENT_MASK);\n try {\n jbInit();\n init(); // do local intializations\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void initialize() {\r\n\t\t//setFrame\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(125,175, 720, 512);\r\n\t\tframe.setTitle(\"Periodic Table\");\r\n\t\tframe.setResizable(false);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}",
"public OrganizerFrame() {\n super(\"Органайзер\");\n init();\n }",
"public addStFrame() {\n initComponents();\n }",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\taddSampleData();\n\t\tsetDefaultSettings();\n\t\topenHomePage();\n\t\tframe.setVisible(true);\n\t}",
"private void initFrame() {\n setLayout(new BorderLayout());\n }",
"private void initialize() {\r\n\t\tthis.setBounds(new Rectangle(0, 0, 670, 576));\r\n\t\tthis.setResizable(false);\r\n\t\tthis.setTitle(\"数据入库 \");\r\n\t\tthis.setLocationRelativeTo(getOwner());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}",
"private void initialize() {\n this.setLayout(new BorderLayout());\n this.setSize(new java.awt.Dimension(564, 229));\n this.add(getMessagePanel(), java.awt.BorderLayout.NORTH);\n this.add(getBalloonSettingsListBox(), java.awt.BorderLayout.CENTER);\n this.add(getBalloonSettingsButtonPane(), java.awt.BorderLayout.SOUTH);\n\n editBalloonSettingsFrame = new EditBalloonSettingsFrame();\n\n }",
"public AuthFrame() {\n initComponents();\n }",
"private void initialize() {\n\t\tthis.setSize(430, 280);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setUndecorated(true);\n\t\tthis.setModal(true);\n\t\tthis.setBackground(new java.awt.Color(226,226,222));\n\t\tthis.setTitle(\"Datos del Invitado\");\n\t\tthis.addComponentListener(this);\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}",
"private void initializeFields() {\r\n myFrame = new JFrame();\r\n myFrame.setSize(DEFAULT_SIZE);\r\n }",
"public holdersframe() {\n initComponents();\n }",
"private void initialize()\n {\n this.setTitle( \"SerialComm\" ); // Generated\n this.setSize( 500, 300 );\n this.setContentPane( getJContentPane() );\n }",
"public ChatFrame() {\n initComponents();\n }",
"public NewConnectionFrame() {\n initComponents();\n }",
"private void initialize() {\r\n\t\t// set specific properties and add inner components.\r\n\t\tthis.setBorder(BorderFactory.createEtchedBorder());\r\n\t\tthis.setSize(300, 400);\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\taddComponents();\r\n\t}",
"private void initialize() {\r\n\t\tthis.setSize(300, 200);\r\n\t\tthis.setTitle(\"Error\");\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}",
"public void buildFrame();",
"public MainFrame() {\n initComponents();\n\n\n }",
"public FrameIntroGUI() {\n\t\ttry {\n\t\t\tjbInit();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public JFrame() {\n initComponents();\n }",
"public launchFrame() {\n \n initComponents();\n \n }",
"public void init()\n {\n buildUI(getContentPane());\n }",
"private void initialize() {\r\n\t\tthis.setSize(378, 283);\r\n\t\tthis.setJMenuBar(getMenubar());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JAVIER\");\r\n\t}",
"private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}"
] | [
"0.78244245",
"0.74921596",
"0.7488774",
"0.72030306",
"0.72030306",
"0.7059994",
"0.7036561",
"0.6971081",
"0.6883096",
"0.68558747",
"0.6848607",
"0.68399507",
"0.68285596",
"0.6826888",
"0.68144494",
"0.6809286",
"0.67809606",
"0.67641187",
"0.67580295",
"0.6741946",
"0.6741929",
"0.6730182",
"0.671483",
"0.670493",
"0.6670422",
"0.6667758",
"0.6660721",
"0.66455346",
"0.66451925",
"0.66451925",
"0.66451925",
"0.66451925",
"0.66451925",
"0.66451925",
"0.66451925",
"0.66451925",
"0.66451925",
"0.66451925",
"0.66451925",
"0.66451925",
"0.6634393",
"0.6633375",
"0.661915",
"0.661705",
"0.6604297",
"0.6599518",
"0.6590155",
"0.65875834",
"0.6586771",
"0.6580666",
"0.6571715",
"0.65713334",
"0.65711915",
"0.6556992",
"0.6556651",
"0.65423685",
"0.6539058",
"0.6537557",
"0.6522847",
"0.6515687",
"0.65140545",
"0.6503445",
"0.6503079",
"0.6490656",
"0.64897984",
"0.6482605",
"0.6473171",
"0.64730537",
"0.6472742",
"0.64672947",
"0.646627",
"0.6465701",
"0.6464877",
"0.64412993",
"0.64395607",
"0.6434903",
"0.64318097",
"0.6425848",
"0.6411909",
"0.64092165",
"0.64069766",
"0.6404825",
"0.63973176",
"0.6385433",
"0.63820106",
"0.63763326",
"0.63668",
"0.63628805",
"0.6360815",
"0.63406956",
"0.6334766",
"0.6328921",
"0.63244504",
"0.6323274",
"0.6310824",
"0.6302395",
"0.6296699",
"0.6295997",
"0.62941974",
"0.62939465",
"0.6288616"
] | 0.0 | -1 |
Rest API controller for /widgets. | @RequestMapping(path = "/widgets")
public interface WidgetApi {
/**
* {@code GET /widgets}. <br>
* Lists requested widgets ordered by z-index in ascending order.
*
* @param limit Limits the amount of widgets in the output. Default value is 10 if not provided.
* Max value is 500.
* @param afterId ID token to perform widgets search after.
* @return {@link Page} of {@link List<Widget>} wrapped into {@link ResponseEntity}.
*/
@GetMapping(produces = APPLICATION_JSON_VALUE)
ResponseEntity<Page<Widget>> listWidgets(
@PathParam("limit") @Nullable Integer limit, @PathParam("afterId") @Nullable String afterId);
/**
* {@code GET /widgets/:id}. <br>
* Reads widget by provided ID.
*
* @param id ID to look for widget.
* @return {@link Widget} wrapped into {@link ResponseEntity}.
*/
@GetMapping(path = "/{id}", produces = APPLICATION_JSON_VALUE)
ResponseEntity<Widget> readWidget(@PathVariable("id") final String id);
/**
* {@code POST /widgets}. <br>
* Creates new widget. If z-index is not provided places the widget in the foreground of existing
* widgets. If z-index is provided and there is existing widget at that z-index than starting from
* the provided z-index all the widgets are shifted upwards.
*
* @param widgetToCreate Widget creation payload.
* @return {@link Widget} wrapped into {@link ResponseEntity}.
*/
@PostMapping(consumes = APPLICATION_JSON_VALUE, produces = APPLICATION_JSON_VALUE)
ResponseEntity<Widget> createWidget(@RequestBody final WidgetCreateRequest widgetToCreate);
/**
* {@code PUT /widgets/:id}. <br>
* Updates existing widgets by provided ID. If z-index is provided and there is already existing
* widget and new z-index acts similar to {@link WidgetApi#createWidget} and shifts existing
* widgets upwards.
*
* @param id ID to look for widget to update.
* @param widgetUpdate Widget update payload.
* @return {@link Widget} wrapped into {@link ResponseEntity}.
*/
@PutMapping(path = "/{id}", consumes = APPLICATION_JSON_VALUE, produces = APPLICATION_JSON_VALUE)
ResponseEntity<Widget> updateWidget(
@PathVariable("id") final String id, @RequestBody final WidgetUpdateRequest widgetUpdate);
/**
* {@code DELETE /widgets/:id}. <br>
* Removes existing widget by provided ID.
*
* @param id ID to look for widget to remove.
* @return Empty response.
*/
@DeleteMapping(path = "/{id}", produces = APPLICATION_JSON_VALUE)
ResponseEntity<?> deleteWidget(@PathVariable("id") final String id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Widget> getWidgets() {\n return widgets;\n }",
"public Action getIndexApiAction() {\r\n Thing object = new Thing.Builder()\r\n .setName(\"Dashboard Page\") // TODO: Define a title for the content shown.\r\n // TODO: Make sure this auto-generated URL is correct.\r\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\r\n .build();\r\n return new Action.Builder(Action.TYPE_VIEW)\r\n .setObject(object)\r\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\r\n .build();\r\n }",
"public Widget getWidget(){\r\n\t\treturn widget;\r\n\t}",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"dangerous_place Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Cadastro Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"ListTest Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public String getWidgetId()\r\n\t{\r\n\t\treturn widgetId;\r\n\t}",
"public Action getIndexApiAction() {\r\n Thing object = new Thing.Builder()\r\n .setName(\"Main Page\") // TODO: Define a title for the content shown.\r\n // TODO: Make sure this auto-generated URL is correct.\r\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\r\n .build();\r\n return new Action.Builder(Action.TYPE_VIEW)\r\n .setObject(object)\r\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\r\n .build();\r\n }",
"public Action getIndexApiAction() {\r\n Thing object = new Thing.Builder()\r\n .setName(\"Main Page\") // TODO: Define a title for the content shown.\r\n // TODO: Make sure this auto-generated URL is correct.\r\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\r\n .build();\r\n return new Action.Builder(Action.TYPE_VIEW)\r\n .setObject(object)\r\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\r\n .build();\r\n }",
"public Action getIndexApiAction() {\r\n Thing object = new Thing.Builder()\r\n .setName(\"Main Page\") // TODO: Define a title for the content shown.\r\n // TODO: Make sure this auto-generated URL is correct.\r\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\r\n .build();\r\n return new Action.Builder(Action.TYPE_VIEW)\r\n .setObject(object)\r\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\r\n .build();\r\n }",
"List<Widget> findAll();",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Pay Page\")\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Main Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"PlayWorkout Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"GoodsDetail Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Scan Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Map Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public Service_WidgetUpdate() {\n super(\"WidgetUpdateService\");\n }",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Main Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Main Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Main Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Main Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Main Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Main Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Main Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Main Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Main Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Main Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Main Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Main Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public interface WidgetRepository {\n\n /**\n * Finds widget by it's id.\n *\n * @param id widget identifier.\n * @return found widget or {@link Optional#empty()} if widget with specified id was not found.\n */\n Optional<Widget> findById(final String id);\n\n /**\n * Saves specified widget in repository.\n *\n * @param widget widget to be saved in repository.\n */\n void save(final Widget widget);\n\n /**\n * Deletes widget with specified identifier.\n * If widget with specified id does not exist - do nothing.\n *\n * @param id identifier of a widget to be removed.\n */\n void deleteById(final String id);\n\n /**\n * Gets all widget from repository.\n *\n * @return list of all widgets in repository.\n */\n List<Widget> findAll();\n}",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Register Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public Widget() {\r\n\t\t\r\n\t\twidgets = new LinkedHashMap<Component, String>();\r\n\t\t\r\n\t}",
"public WidgetPanel getWidgets() {\n return _widgetPanel;\n }",
"public WidgetUpdateService() {\n super(\"WidgetUpdateService\");\n }",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"FaceTracker Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n\n }",
"@CrossOrigin\n\t@RequestMapping(value = \"board\", method = RequestMethod.GET, produces = \"application/json\")\n\tpublic String showBoard() throws ServletException {\n\t\t\n\t\tParser<Persons> parser = new Parser<Persons>(personsRepository.findAll());\n\t\treturn parser.parse();\n\t}",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Login Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"SlideMain Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"TaskList Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,\n int appWidgetId) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.api_news_stand_widget);\n\n Intent intent = new Intent(context, WidgetService.class);\n\n String categoryValue = ApiNewsStandWidgetConfigureActivity.loadCategoryPref(context, appWidgetId);\n String sortByValue = ApiNewsStandWidgetConfigureActivity.loadSortByPref(context, appWidgetId);\n\n intent.putExtra(context.getString(R.string.category), categoryValue);\n intent.putExtra(context.getString(R.string.sortBy), sortByValue);\n\n intent.setData(Uri.fromParts(\"content\", String.valueOf(appWidgetId), null));\n\n views.setRemoteAdapter(R.id.widget_listView, intent);\n views.setTextViewText(R.id.Category, categoryValue);\n views.setTextViewText(R.id.SortBy, sortByValue);\n\n Intent appIntent = new Intent(context, WebViewActivity.class);\n PendingIntent appPendingIntent = PendingIntent.getActivity(context, 0,\n appIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n views.setPendingIntentTemplate(R.id.widget_listView, appPendingIntent);\n\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Main Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-HTTP-HOST-HERE]/main\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"@ResponseBody\n\t@GetMapping(\"/boats\")\n\tpublic ResponseEntity<?> getAllBoats() {\n\t\treturn ResponseEntity.ok(boats);\n\t}",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"TDVoice Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"public static void index() {\n\t\trenderJSON(\"{}\");\n\t}",
"private void updateRemoteViews(Context context, AppWidgetManager appWidgetManager,\n int appWidgetId, ArrayList<String> supplicationList)\n {\n intent = new Intent(context, WidgetService.class);\n openAppIntent = new Intent(context, MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, openAppIntent, 0);\n Bundle extrasBundle = new Bundle();\n extrasBundle.putStringArrayList(WIDGET_LIST,supplicationList);\n extrasBundle.putInt(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n intent.putExtra(WIDGET_BUNDLE_STRING, extrasBundle);\n intent.setData(Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME)));\n RemoteViews rv = new RemoteViews(context.getPackageName(), R.layout.stories_widget);\n rv.setRemoteAdapter(R.id.list, intent);\n rv.setOnClickPendingIntent(R.id.widget_container, pendingIntent);\n appWidgetManager.notifyAppWidgetViewDataChanged(appWidgetId, R.id.list);\n appWidgetManager.updateAppWidget(appWidgetId, rv);\n\n }",
"public static void createWidget(Activity act) {\n logger.debug(\"/onCreateWidget/suggesting user to add widget to dashboard\");\n AppWidgetHost host = new AppWidgetHost(act, HOST_CODE);\n int nextId = host.allocateAppWidgetId();\n Intent pickIntent = new Intent(AppWidgetManager.ACTION_APPWIDGET_PICK);\n pickIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, nextId);\n act.startActivityForResult(pickIntent, ADD_WIDGET_KEY_CODE);\n\n }",
"@Bean\n public Docket productApi() {\n return new Docket(DocumentationType.SWAGGER_2) \t\t\t\t \n\t\t .select()\n\t\t \t//.apis(RequestHandlerSelectors.any())\n\t\t \t.apis(RequestHandlerSelectors.basePackage(\"com.thingtrack.training.vertica.services.controller\"))\n\t\t \t.paths(PathSelectors.any())\t\t \t\t \n\t\t \t.build()\n\t\t .securitySchemes(Lists.newArrayList(apiKey()))\n\t\t .securityContexts(Lists.newArrayList(securityContext()))\t\t \t\n\t\t .apiInfo(metaData());\n }",
"private void handleActionUpdateBakingWidgets(){\n AppDatabase myDatabase = RecipeRoomSingleton.getInstance(this);\n //If it's empty, forget it.\n if(myDatabase.daoAccess().getAll().isEmpty())return;\n //Get the items\n ArrayList<Ingredient> ingredients = (myDatabase.daoAccess().getAll()).get(0).getIngredients();\n //Get the WidgetManager\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this);\n //Get the widget IDs\n int[] appWidgetIds = appWidgetManager.getAppWidgetIds(new ComponentName(this, BakingWidget.class));\n //Notify the manager that the data has changed for the listview\n appWidgetManager.notifyAppWidgetViewDataChanged(appWidgetIds, R.id.appwidget_listview);\n\n //Update the appwidget\n BakingWidget.updateAppWidget(this, appWidgetIds, appWidgetManager, ingredients);\n }",
"public void setWidgetId(String widgetId)\r\n\t{\r\n\t\tthis.widgetId = widgetId;\r\n\t}",
"public JComponent setWidget( JComponent w ) {\n widget = w;\n return w;\n }",
"@Transactional\n\t@RequestMapping( value = \"/{apiType}\", method = RequestMethod.GET )\n\tpublic ModelAndView getSources( @PathVariable String apiType, final HttpServletResponse response ) throws InterruptedException\n\t{\n\t\tModelAndView model = null;\n\n\t\tmodel = TemplateHelper.createViewWithLink( \"widgetLayoutAjax\", LINK_NAME );\n\t\tList<Widget> widgets = persistenceStrategy.getWidgetDAO().getActiveWidgetByWidgetTypeAndGroup( WidgetType.ADMINISTRATION, \"api-\" + apiType );\n\n\t\t// get list of sources and sort\n\t\tList<Source> sources = persistenceStrategy.getSourceDAO().getAllSource();\n\t\tCollections.sort( sources, new SourceByNaturalOrderComparator() );\n\n\t\t// assign the model\n\t\tmodel.addObject( \"widgets\", widgets );\n\t\tmodel.addObject( \"header\", \"api\" + apiType );\n\n\t\treturn model;\n\t}",
"public WidgetPanel() {\n\n // setup the master panel\n HorizontalPanel outer = new HorizontalPanel();\n HorizontalPanel border = new HorizontalPanel();\n border.setStyleName(\"WidgetPanelBorder\");\n border.setHeight(\"100%\");\n outer.add(border);\n\n // setup the widgets panel\n widgets.setStyleName(\"WidgetPanel\");\n widgets.setHeight(\"100%\");\n outer.add(widgets);\n \n // init the outer panel\n initWidget(outer);\n }",
"private void widgetsHandler(Set<Class> widgetList, String uri, StringWriter out, RDFaMetaWriter writer, RDFRepository _repository) throws RepositoryException, QueryEvaluationException, IOException{\n\t\tSet<Object> setWidgetList = new HashSet<Object>();\n\t\tfor (Iterator<Class> iWidgetList = widgetList.iterator(); iWidgetList.hasNext();) {\n\n\t\t\tObject varList = iWidgetList.next();\n\t\t\t// Get the next WidgetList\n\t\t\tObject WidgetListObject = varList;\n\t\t\tif (!setWidgetList.contains(varList)) {\n\t\t\t\torg.openrdf.model.URI uriWidgetListObject = c.getValueFactory().createURI(WidgetListObject.toString());\t\t\t\t\t\t\t\t\n\t\t\t\tResource widgetsTypeList = c.getObject(Resource.class, uriWidgetListObject);\n\n\t\t\t\t// Get all widgets in the RDF Seq\n\t\t\t\tString widgetTypeList = widgetsTypeList.getRdfsMembers().toString().replaceAll(\"\\\\[|\\\\]\", \"\");\n\t\t\t\tString[] unknownType = widgetTypeList.split(\", \");\n\t\t\t\tSet<Object> setUnknownType = new HashSet<Object>();\n\n\t\t\t\t// Write the WidgetList\n\t\t\t\twriteSequenceList(uriWidgetListObject, unknownType, 0, out, _repository);\n\t\t\t\t\n\t\t\t\t/*//added by pcc 21,Jun. 11 for profiling\n\t\t\t\tTimeWContainer = System.currentTimeMillis() - startTime;\t\t\t\t\t\t\t\t\n\t\t\t\t//added by pcc 21,Jun. 11 for profiling*/\n\t\t\t\t\n\t\t\t\t// Iterate through the Widgets and determine\n\t\t\t\t// their type\n\t\t\t\tfor (int iUnknownType = 0; iUnknownType < unknownType.length; iUnknownType++) {\n\t\t\t\t\tObject unknownTypeList = unknownType[iUnknownType];\n\t\t\t\t\tObject varUnknownType = unknownType[iUnknownType];\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif (!setUnknownType.contains(varUnknownType)) {\n\t\t\t\t\t\torg.openrdf.model.URI unknownTypeBox = c.getValueFactory().createURI(unknownTypeList.toString());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// get Textbox\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t/*//added by pcc 21,Jun. 11 for profiling\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tstartTime = System.currentTimeMillis();\n\t\t\t\t\t\t\t//added by pcc 21,Jun. 11 for profiling*/\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tTextbox textbox = c.getObject(Textbox.class, unknownTypeBox);\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tTextboxHandler(textbox, uri, out, writer, _repository);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*//added by pcc 21,Jun. 11 for profiling\n\t\t\t\t\t\t\taccTimeTextbox += System.currentTimeMillis() - startTime;\n\t\t\t\t\t\t\t//added by pcc 21,Jun. 11 for profiling*/\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue; //added by pcc\n\t\t\t\t\t\t} catch (ClassCastException e) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// get Listbox\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*//added by pcc 21,Jun. 11 for profiling\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tstartTime = System.currentTimeMillis();\n\t\t\t\t\t\t\t//added by pcc 21,Jun. 11 for profiling*/\n\n\t\t\t\t\t\t\tListbox listbox = c.getObject(Listbox.class, unknownTypeBox);\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tListboxHandler(listbox, uri, out, writer, _repository);\n\t\t\t\t\t\t\tListBoxOptionsHandler(listbox, uri, out, writer, _repository);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*//added by pcc 21,Jun. 11 for profiling\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\taccTimeListbox += System.currentTimeMillis() - startTime;\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//added by pcc 21,Jun. 11 for profiling*/\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue; //added by pcc\n\t\t\t\t\t\t} catch (ClassCastException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\t//added by pcc\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tGroup group = c.getObject(Group.class, unknownTypeBox);\n\t\t\t\t\t\t\tGroupHandler(group, uri, out, writer, _repository);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue; //added by pcc\n\t\t\t\t\t\t} catch (ClassCastException e) {\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// get Button\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*//added by pcc 21,Jun. 11 for profiling\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tstartTime = System.currentTimeMillis();\n\t\t\t\t\t\t\t//added by pcc 21,Jun. 11 for profiling*/\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tButton button = c.getObject(Button.class, unknownTypeBox);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*//added by pcc 21,Jun. 11 for profiling\n\t\t\t\t\t\t\tnumButton++;\n\t\t\t\t\t\t\t//added by pcc 21,Jun. 11 for profiling*/\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tURI ButtonType = raulButton;\n\n\t\t\t\t\t\t\t// Determine if the Button type is\n\t\t\t\t\t\t\t// Checkbox or Radiobutton\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tRadiobutton radiobutton = c.getObject(Radiobutton.class, unknownTypeBox);\n\t\t\t\t\t\t\t\t/*//added by pcc 21,Jun. 11 for profiling\n\t\t\t\t\t\t\t\tnumButton--;\n\t\t\t\t\t\t\t\tnumRButton++;\n\t\t\t\t\t\t\t\t//added by pcc 21,Jun. 11 for profiling*/\n\t\t\t\t\t\t\t\tButtonType = raulRadiobutton;\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} catch (ClassCastException e) {\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tCheckbox checkbox = c.getObject(Checkbox.class, unknownTypeBox);\n\t\t\t\t\t\t\t\t/*//added by pcc 21,Jun. 11 for profiling\n\t\t\t\t\t\t\t\tnumButton--;\n\t\t\t\t\t\t\t\tnumCheckbox++;\n\t\t\t\t\t\t\t\t//added by pcc 21,Jun. 11 for profiling*/\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tButtonType = raulCheckbox;\n\t\t\t\t\t\t\t} catch (ClassCastException e) {\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tButtonHandler(button, uri, ButtonType, out, writer, _repository);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*//added by pcc 21,Jun. 11 for profiling\n\t\t\t\t\t\t\tif(ButtonType == raulRadiobutton){\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\taccTimeRButton += System.currentTimeMillis() - startTime;\n\t\t\t\t\t\t\t}else if(ButtonType == raulCheckbox){\n\t\t\t\t\t\t\t\taccTimeCheckbox += System.currentTimeMillis() - startTime;\n\t\t\t\t\t\t\t}else if(ButtonType == raulButton){\n\t\t\t\t\t\t\t\taccTimeButton += System.currentTimeMillis() - startTime;\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//added by pcc 21,Jun. 11 for profiling*/\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue; //added by pcc\n\t\t\t\t\t\t} catch (ClassCastException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// get DynamicGroup added by pcc\n\t\t\t\t\t\ttry {\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tDynamicGroup dynamicgroup = c.getObject(DynamicGroup.class, unknownTypeBox);\n\t\t\t\t\t\t\tDynamicGroupHandler(dynamicgroup, uri, out, writer, _repository);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue; //added by pcc\n\t\t\t\t\t\t} catch (ClassCastException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tsetUnknownType.add(varUnknownType);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetUnknownType.add(varUnknownType);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tsetWidgetList.add(varList);\n\t\t\t} else {\n\t\t\t\tsetWidgetList.add(varList);\n\t\t\t}\n\n\t\t}\n\t}",
"private void dataGraphGen_widgetsHandler(Set<Class> widgetList, String uri, RDFRepository _repository, RDFRepository _dataGraph) throws RepositoryException, QueryEvaluationException, IOException, RepositoryConfigException{\n\t\tSet<Object> setWidgetList = new HashSet<Object>();\n\t\tfor (Iterator<Class> iWidgetList = widgetList.iterator(); iWidgetList.hasNext();) {\n\n\t\t\tObject varList = iWidgetList.next();\n\t\t\t\n\t\t\t// Get the next WidgetList\n\t\t\tObject WidgetListObject = varList;\n\t\t\tif (!setWidgetList.contains(varList)) {\n\t\t\t\torg.openrdf.model.URI uriWidgetListObject = c.getValueFactory().createURI(WidgetListObject.toString());\t\t\t\t\t\t\t\t\n\t\t\t\tResource widgetsTypeList = c.getObject(Resource.class, uriWidgetListObject);\n\n\t\t\t\t// Get all widgets in the RDF Seq\n\t\t\t\t\n\t\t\t\tString widgetTypeList = widgetsTypeList.getRdfsMembers().toString().replaceAll(\"\\\\[|\\\\]\", \"\");\n\t\t\t\tString[] unknownType = widgetTypeList.split(\", \");\n\t\t\t\tSet<Object> setUnknownType = new HashSet<Object>();\n\t\t\t\t\n\t\t\t\t// Iterate through the Widgets and determine\n\t\t\t\t// their type\n\t\t\t\tfor (int iUnknownType = 0; iUnknownType < unknownType.length; iUnknownType++) {\n\t\t\t\t\tObject unknownTypeList = unknownType[iUnknownType];\n\t\t\t\t\tObject varUnknownType = unknownType[iUnknownType];\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif (!setUnknownType.contains(varUnknownType)) {\t\t\t\t\t\t\n\t\t\t\t\t\torg.openrdf.model.URI unknownTypeBox = c.getValueFactory().createURI(unknownTypeList.toString());\n\t\t\t\t\t\t// get Textbox\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tTextbox textbox = c.getObject(Textbox.class, unknownTypeBox);\n\t\t\t\t\t\t\tSet<String> textboxValues = textbox.getRaulValues();\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdataGraphGen_Statement(textboxValues, _dataGraph);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue; //added by pcc\n\t\t\t\t\t\t} catch (ClassCastException e) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// get Listbox\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tListbox listbox = c.getObject(Listbox.class, unknownTypeBox);\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSet<String> ListboxValues = listbox.getRaulValues();\n\t\t\t\t\t\t\tdataGraphGen_Statement(ListboxValues, _dataGraph);\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue; //added by pcc\n\t\t\t\t\t\t} catch (ClassCastException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\t//added by pcc\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tGroup group = c.getObject(Group.class, unknownTypeBox);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSet<Class> GroupWidgetList = group.getRaulLists();\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSet<String> GroupValues = group.getRaulValues();\n\t\t\t\t\t\t\tdataGraphGen_Statement(GroupValues, _dataGraph);\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdataGraphGen_widgetsHandler(GroupWidgetList, uri, _repository, _dataGraph);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue; //added by pcc\n\t\t\t\t\t\t} catch (ClassCastException e) {\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// get Button\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tButton button = c.getObject(Button.class, unknownTypeBox);\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tURI ButtonType = raulButton;\n\t\t\t\t\t\t\t// Determine if the Button type is\n\t\t\t\t\t\t\t// Checkbox or Radiobutton\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tRadiobutton radiobutton = c.getObject(Radiobutton.class, unknownTypeBox);\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tButtonType = raulRadiobutton;\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} catch (ClassCastException e) {\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tCheckbox checkbox = c.getObject(Checkbox.class, unknownTypeBox);\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tButtonType = raulCheckbox;\n\t\t\t\t\t\t\t} catch (ClassCastException e) {\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tSet<String> ButtonValues = button.getRaulValues();\n\t\t\t\t\t\t\tif(ButtonType != raulButton) dataGraphGen_Statement(ButtonValues, _dataGraph);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue; //added by pcc\n\t\t\t\t\t\t} catch (ClassCastException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// get DynamicGroup added by pcc\n\t\t\t\t\t\ttry {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tDynamicGroup dynamicgroup = c.getObject(DynamicGroup.class, unknownTypeBox);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSet<Class> dynamicWidgetList = dynamicgroup.getRaulLists();\n\t\t\t\t\t\t\tdataGraphGen_widgetsHandler(dynamicWidgetList, uri, _repository, _dataGraph);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue; //added by pcc\n\t\t\t\t\t\t} catch (ClassCastException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tsetUnknownType.add(varUnknownType);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetUnknownType.add(varUnknownType);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tsetWidgetList.add(varList);\n\t\t\t} else {\n\t\t\t\tsetWidgetList.add(varList);\n\t\t\t}\n\n\t\t}\n\t}",
"static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,\n int requestedRecipe, int totalRecipes, int appWidgetId) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.recipe_widget_provider);\n\n //Setup button intent\n Intent buttonIntent = new Intent(context, UpdateWidgetService.class);\n buttonIntent.putExtra(RECIPE_TAG, requestedRecipe);\n buttonIntent.setAction(UpdateWidgetService.ACTION_UPDATE_WIDGET);\n PendingIntent buttonPendingIntent = PendingIntent.getService(context, 0, buttonIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n views.setOnClickPendingIntent(R.id.next_button_widget, buttonPendingIntent);\n\n //Setup the WidgetService intent to act as the adapter for the ListView\n Intent intent = new Intent(context, WidgetService.class);\n //Add the id of the recipe we want to display as a ListView\n intent.putExtra(WidgetService.REQUESTED_RECIPE, requestedRecipe);\n //Send off to have the Widget Service to create the adapter\n intent.putExtra(WidgetService.TOTAL_RECIPES, totalRecipes);\n views.setRemoteAdapter(R.id.widget_lv_steps, intent);\n\n //Set the RecipeDetails activity to launch when clicked\n Intent appLaunchIntent = new Intent(context, RecipeDetails.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0 , appLaunchIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n views.setPendingIntentTemplate(R.id.widget_lv_steps, pendingIntent);\n\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }",
"@Bean\n public Docket productApi() {\n return new Docket(DocumentationType.SWAGGER_2)\n .select()\n .paths(PathSelectors.regex(\"/api/.*\"))\n .apis(RequestHandlerSelectors.basePackage(\"com.stackroute.muzix\"))\n .build()\n .apiInfo(apiDetails());\n }",
"@Test\n public void testCreateWidget() throws Exception {\n WidgetUtils.RemoveWidgetByName(driver, wait, baseUrl, widgetName);\n\n //Create widget with specific parameter\n driver = WidgetUtils.CreateWidgetWithParameter(driver, wait, baseUrl, widgetName, paramName);\n }",
"@RequiresApi(api = Build.VERSION_CODES.ICE_CREAM_SANDWICH)\n static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,\n int appWidgetId) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.baking_recipes_widget);\n\n Intent intent = new Intent(context, RecipesActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);\n\n views.setOnClickPendingIntent(R.id.widget_toolbar, pendingIntent);\n // Instruct the widget manager to update the widget\n Intent intnt = new Intent(context, WidgetService.class);\n views.setRemoteAdapter(R.id.widget_ingredients_list_view, intnt);\n\n Intent ingListIntent = new Intent(context, RecipeListActivity.class);\n PendingIntent ingPendingIntent = PendingIntent.getActivity(context, 0, ingListIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n views.setPendingIntentTemplate(R.id.widget_ingredients_list_view, ingPendingIntent);\n\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }",
"@Bean\n public Docket swaggerYogurtApi() {\n return new Docket(DocumentationType.SWAGGER_2)\n .groupName(\"Yogurt\")\n .select()\n .apis(RequestHandlerSelectors.basePackage(\"com.yogurt.controller.v1.api\"))\n .paths(PathSelectors.any())\n .build()\n .apiInfo(apiInfo())\n .securitySchemes(Arrays.asList(apiKey()));\n }",
"public Docket api( ) {\r\n\t\t return new Docket(DocumentationType.SWAGGER_2)\r\n\t .select()\r\n\t .apis(RequestHandlerSelectors.any())\r\n\t .paths(regex(\"/.*\"))\r\n\t .build().apiInfo(apiInfo());\r\n\t}",
"public Action getIndexApiAction0() {\n Thing object = new Thing.Builder()\n .setName(\"Main Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"IWDViewController wdGetAPI();",
"@Bean\n\tpublic Docket api() {\n\t\treturn new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.any())\n\t\t\t\t.paths(PathSelectors.any()).build();\n\t}",
"private void updateAppWidget(Context context, AppWidgetManager appWidgetManager, int appWidgetId)\n {\n RemoteViews views=new RemoteViews(context.getPackageName(), R.layout.new_app_widget);\n\n\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }",
"public Controller(){\n initControl();\n this.getStylesheets().addAll(\"/resource/style.css\");\n }",
"public void updateWidgetFor(String name) {\n }",
"@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n\n //setup the intent such that it calls the service to populate the widget views\n Intent intent = new Intent(context, BucketListWidgetService.class);\n\n //add the app widget ID to the intent extras.\n intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n intent.setData(Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME)));\n\n //instantiate the RemoteViews object for the app widget layout\n RemoteViews rv = new RemoteViews(context.getPackageName(), R.layout.bucketlist_widget);\n //setup the adapter such that it populates the data\n rv.setRemoteAdapter(R.id.widget_listview, intent);\n //if there are no items in the bucket list, display this empty view\n rv.setEmptyView(R.id.widget_listview, R.id.empty_view);\n\n //setup onclick actions for the listview and empty view\n final Intent onClickIntent = new Intent(context, BucketListWidgetProvider.class);\n onClickIntent.setAction(BucketListWidgetProvider.CLICK_ACTION);\n onClickIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n onClickIntent.setData(Uri.parse(onClickIntent.toUri(Intent.URI_INTENT_SCHEME)));\n final PendingIntent onClickPendingIntent = PendingIntent.getBroadcast(context, 0, onClickIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);\n rv.setOnClickPendingIntent(R.id.empty_view, onClickPendingIntent);\n rv.setPendingIntentTemplate(R.id.widget_listview, onClickPendingIntent);\n\n appWidgetManager.updateAppWidget(appWidgetId, rv);\n }\n\n super.onUpdate(context, appWidgetManager, appWidgetIds);\n }",
"@RequestMapping(value=\"/treenit\", method = RequestMethod.GET)\n\tpublic @ResponseBody List<Treeni> treeniListaRest() {\t\n\t return (List<Treeni>) repository.findAll();\n\t}",
"@RequestMapping(\"/\")\n public String index() {\n return \"redirect:/api/v1/tool\";\n }",
"public interface WarsawApiInterface {\n\n @GET(\"/api/action/wfsstore_get\")\n Call<WarsawResult> getPlacesByType(@Query(\"id\") String id, @Query(\"circle\") String circle, @Query(\"apikey\") String apikey);\n}",
"static void updateAppWidget(Context context, AppWidgetManager appWidgetManager, Recipe recipe, int appWidgetId) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.recipe_app_widget);\n\n views.setTextViewText(R.id.recipe_name, context.getString(R.string.widget_recipe_name, recipe.getName()));\n\n Intent intent = new Intent(context, GridWidgetService.class);\n intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n intent.setData(Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME)));\n Bundle bundle = new Bundle();\n bundle.putParcelable(EXTRA_RECIPE, recipe);\n intent.putExtra(BUNDLE, bundle);\n views.setRemoteAdapter(R.id.list_view_ingredients, intent);\n\n views.setEmptyView(R.id.list_view_ingredients, R.id.empty_view);\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }",
"@Bean\n\tpublic Docket createRestApi() {\n\t\treturn new Docket(DocumentationType.SWAGGER_2)\n\t\t\t\t.apiInfo(apiInfo())\n\t\t\t\t.groupName(\"rest\")\n\t\t\t\t.select()\n\t\t\t\t.apis(RequestHandlerSelectors.basePackage(\"com.ly.edu.controller\"))\n\t\t\t\t.paths(PathSelectors.any())\n\t\t\t\t.build();\n\t}",
"public ServerConnectionWidgetController() {\n\t\tsetUpMVC(model, view);\n\t\tregister(InBankServer.DB_CONNECTED);\n\t\tregister(InBankServer.DB_DISCONNECTED);\n\t\tregister(InBankServer.RMI_CONNECTED);\n\t\tmodel.dbDisconnected();\n\t\tmodel.rmiDisconnected();\n\t}",
"public JsStatement widget()\n\t{\n\t\treturn new JsQuery(getComponent()).$().chain(\"draggable\", \"'widget'\");\n\t}",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"HomeView Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"@Bean\n\tpublic Docket postApi() {\n\t\treturn new Docket(DocumentationType.SWAGGER_2)\n\t\t\t\t.apiInfo(metadata()).select().paths(regex(\"/api.*\")).build();\n\t}",
"public int getWidgetCount() {\n return widgets.size(); \n }",
"@NonNull\n @WidgetType\n public String getWidgetType() {\n return mWidgetType;\n }",
"@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n mContext = context;\n for (int appWidgetId : appWidgetIds) {\n\n\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.my_stocks);\n Intent widgetIntent = new Intent(context, MyStocksActivity.class);\n PendingIntent pi = PendingIntent.getActivity(context, 0, widgetIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n views.setPendingIntentTemplate(R.id.listView, pi);\n\n\n Intent i = new Intent(context, WidgetService.class);\n i.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n i.setData(Uri.parse(i.toUri(Intent.URI_INTENT_SCHEME)));\n views.setRemoteAdapter(R.id.listView, i);\n\n\n views.setEmptyView(R.id.listView, R.id.emptyList);\n\n\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n\n }\n super.onUpdate(context, appWidgetManager, appWidgetIds);\n }",
"@Api(value = \"课程分类管理\",description = \"课程分类管理\",tags = {\"课程分类管理\"})\npublic interface CategoryControllerApi {\n @ApiOperation(\"查询分类\")\n public CategoryNode findList(String id);\n}",
"@Override\n\tpublic void registerWidget(String socketName, IWidget widget) {\n\t\tint widgetId = widgetIdCounter++;\n\t\tHeadElement head = Document.get().getHead();\n\t\tif(widget.getStylingUrls() != null) {\n\t\t\tfor(String styleUrl : widget.getStylingUrls()) {\n\t\t\t\tLinkElement cssLink = LinkElement.as(DOM.createElement(\"link\"));\n\t\t\t\tcssLink.setRel(\"stylesheet\");\n\t\t\t\tcssLink.setHref(styleUrl);\n\t\t\t\tcssLink.addClassName(\"sccp-widget-\" + widgetId);\n\t\t\t\thead.appendChild(cssLink);\n\t\t\t}\n\t\t}\n\t\tif(widget.getScriptUrls() != null) {\n\t\t\tfor(String scriptUrl : widget.getScriptUrls()) {\n\t\t\t\tScriptElement scriptLink = ScriptElement.as(DOM.createElement(\"script\"));\n\t\t\t\tscriptLink.setSrc(scriptUrl);\n\t\t\t\tscriptLink.addClassName(\"sccp-widget-\" + widgetId);\n\t\t\t\thead.appendChild(scriptLink);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(widget.getStaticContent() != null) {\n\t\t\tBodyElement body = Document.get().getBody();\n\t\t\tDivElement staticContentDiv = DivElement.as(DOM.createDiv());\n\t\t\tstaticContentDiv.setInnerHTML(widget.getStaticContent());\n\t\t\tstaticContentDiv.setId(\"sccp-widget-\" + widgetId);\n\t\t\tbody.appendChild(staticContentDiv);\n\t\t}\n\t\t\n\t\twidgets.put(widgetId, widget);\n\t\tISocketDefinition socket = getOrCreateSocketDefinition(socketName);\n\t\tsocket.addWidget(widget);\n\t\t\n\t\t//TODO: Check if this Widget is usable by any Sockets awaiting Widget\n\t}",
"public WidgetRenderer() {\r\n super(\"\");\r\n setUIID(\"ListRenderer\");\r\n }",
"private void startWidget() {\n\t\tIntent intent = new Intent();\n\t\tintent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n\t\tsetResult(Activity.RESULT_OK, intent);\n\n\t\t// start your service\n\t\t// to fetch data from web\n\t\tIntent serviceIntent = new Intent(this, RemoteFetchService.class);\n\t\tserviceIntent\n\t\t\t\t.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n\t\tstartService(serviceIntent);\n\n\t\t// finish this activity\n\t\tthis.finish();\n\n\t}",
"SourceBuilder createRestController();",
"public interface WallpaperApi {\n @GET(\"api.php?latest\")\n Call<ImageList> getLastest();\n\n @GET(\"api.php?cat_list\")\n Call<CategoryList> getCategory();\n\n @GET(\"api.php\")\n Call<ImageList> getCategoryItem(@Query(\"cat_id\") String catId);\n}",
"@Bean\n public Docket api() {\n return new Docket(DocumentationType.SWAGGER_2)\n .groupName(groupName)\n .select()\n .apis(RequestHandlerSelectors.basePackage(basePackage))\n .paths(PathSelectors.any())\n .build()\n .enable(enable)\n .apiInfo(apiInfo());\n }",
"@RequestMapping(\"/comment/gettweet\")\n @CrossOrigin\n String gettweet(@RequestParam int count);",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Signup Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"@Override\n public Widget getWidget() {\n if (widget == null) {\n if (Profiler.isEnabled()) {\n Profiler.enter(\"AbstractComponentConnector.createWidget for \"\n + getClass().getSimpleName());\n }\n widget = createWidget();\n if (Profiler.isEnabled()) {\n Profiler.leave(\"AbstractComponentConnector.createWidget for \"\n + getClass().getSimpleName());\n }\n }\n\n return widget;\n }",
"@GetMapping(\"/api\")\r\n public RepresentationModel<?> root() {\r\n RepresentationModel<?> rootResource = new RepresentationModel<>();\r\n rootResource.add(\r\n linkTo(methodOn(BandController.class).getAllBands()).withRel(\"bands\"),\r\n linkTo(methodOn(MusicianController.class).getAllMusicians()).withRel(\"musicians\"),\r\n linkTo(methodOn(RootController.class).root()).withSelfRel());\r\n return rootResource;\r\n }",
"@GET\n @Path(\"/\")\n @Produces(\"application/json\")\n public Response all() {\n // Return some cliched textual content\n return Response.ok(\"clients list goes here\", MediaType.APPLICATION_JSON).build();\n }",
"@WithMockUser(username = \"admin\", authorities = { \"ROLE_ADMIN\" })\n\t@Test\n\tvoid authenticatedCallShouldBeOkForAdminAuthorizationOnWidgetWithLimit() throws Exception {\n\t\tfor(int i=0; i<5; i++) {\n\t\t\tthis.mockMvc.perform(post(\"/api/widgets\").contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t\t.content(new ObjectMapper().writeValueAsString(new Widget(null, \"test widget\", \"test source\")))\n\t\t\t\t\t)\n\t\t\t.andExpect(status().isCreated());\n\t\t}\n\t\t//Limit test\n\t\tthis.mockMvc.perform(post(\"/api/widgets\").contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t.content(new ObjectMapper().writeValueAsString(new Widget(null, \"test widget\", \"test source\")))\n\t\t\t\t)\n\t\t.andExpect(status().isForbidden());\n\t}",
"public Widget asWidget();",
"@Override\r\n\tpublic Widget getWidget() {\n\t\treturn asWidget();\r\n\t}",
"@RequestMapping(\"\")\n public Object getAuctions() {\n List<AuctionWrapper> auctions = Arrays.asList(auctionRestTemplate.get(auctionURL, AuctionWrapper[].class).getBody());\n ModelAndView modelAndView = new ModelAndView(\"player/auctions\");\n modelAndView.addObject(\"auctions\", auctions);\n return modelAndView;\n }",
"@RequestMapping(value = \"mybooking\", method = RequestMethod.GET)\r\n\t@ResponseBody\r\n\tpublic ModelAndView myBookings() {\r\n\t\tModelAndView modelAndView = new ModelAndView(\"happy_mybookings\");\r\n\t\treturn modelAndView;\r\n\t}",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public Response getProductos() {\n //TODO return proper representation object\n return controller.mostrarProductos();\n }",
"@Override\n protected String getViewBasePath() {\n //region your codes 2\n return \"/operation/activityHall\";\n //endregion your codes 2\n }",
"private String instantiateWidget(Element widget){\n\t\tString response = null;\n\t\tString widgetUri = widget.getAttributeValue(\"identifier\");\n\t\t// instantiate widget and parse results\n\t\ttry {\n\t\t\tHttpClient client = new HttpClient();\n\t\t\tPostMethod post = new PostMethod(TEST_INSTANCES_SERVICE_URL_VALID);\n\t\t\tpost.setQueryString(\"api_key=\"+API_KEY_VALID+\"&widgetid=\"+widgetUri+\"&userid=test&shareddatakey=test\");\n\t\t\tclient.executeMethod(post);\n\t\t\tresponse = IOUtils.toString(post.getResponseBodyAsStream());\n\t\t\tpost.releaseConnection();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\t//e.printStackTrace();\n\t\t\tfail(\"failed to instantiate widget\");\n\t\t}\n\t\treturn response;\t\t\n\t}"
] | [
"0.57292897",
"0.5500789",
"0.53985196",
"0.5360569",
"0.5248249",
"0.5226917",
"0.5167984",
"0.516721",
"0.516721",
"0.516721",
"0.51336706",
"0.5131223",
"0.51290303",
"0.5127846",
"0.51075906",
"0.50901",
"0.50860256",
"0.50836587",
"0.50825286",
"0.50825286",
"0.50825286",
"0.50825286",
"0.50825286",
"0.50825286",
"0.50825286",
"0.50825286",
"0.50825286",
"0.50825286",
"0.50825286",
"0.50825286",
"0.50727385",
"0.50641584",
"0.5059051",
"0.50376403",
"0.5033607",
"0.50036234",
"0.49972957",
"0.49912614",
"0.49822542",
"0.49766448",
"0.49698782",
"0.49696887",
"0.49400365",
"0.490748",
"0.4877642",
"0.48707855",
"0.486973",
"0.4860691",
"0.48348883",
"0.48103544",
"0.4793431",
"0.47887832",
"0.47799763",
"0.47772273",
"0.47698262",
"0.47350127",
"0.47295105",
"0.47184137",
"0.47085884",
"0.46916184",
"0.4687687",
"0.46822104",
"0.46650094",
"0.46615434",
"0.4656944",
"0.46555194",
"0.4655052",
"0.46501073",
"0.46357465",
"0.46351603",
"0.4626958",
"0.46252808",
"0.4624072",
"0.46196458",
"0.46166134",
"0.46159756",
"0.4613377",
"0.45973772",
"0.45966828",
"0.4594465",
"0.4588537",
"0.45838913",
"0.45823878",
"0.45605686",
"0.45598057",
"0.4554647",
"0.45339403",
"0.45335627",
"0.45315456",
"0.45299357",
"0.4525171",
"0.45237082",
"0.45181343",
"0.4515683",
"0.45084664",
"0.4482751",
"0.44699422",
"0.4469599",
"0.44666764",
"0.44638"
] | 0.7103527 | 0 |
Do something before each test method. | @Before
public void setUp() throws Exception {
INIT_LOC = new Location(INIT_LOC_STRING);
ERR_LOC = new Location(ERR_LOC_STRING);
INIT_LOCGRB = new LocationGroup(INIT_LOCGB_STRING);
ERR_LOCGRB = new LocationGroup(ERR_LOCGB_STRING);
mockMvc = MockMvcBuilders
.webAppContextSetup(context)
.apply(MockMvcRestDocumentation.documentationConfiguration(restDocumentation).uris()
.withPort(8888))
.addFilters(new CharacterEncodingFilter("UTF-8", true))
.build();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void runBeforeTest() {}",
"@Before\n public void setUp() {\n System.out.println(\"\\n@Before - Setting Up Stuffs: Pass \"\n + ++setUpCount);\n // write setup code that must be executed before each test method run\n }",
"@Before\n public void beforeTest(){\n\n\n }",
"@BeforeAll\n static void setup() {\n log.info(\"@BeforeAll - executes once before all test methods in this class\");\n }",
"@Before\n public void setupThis() {\n System.out.println(\"* Before test method *\");\n }",
"public void before() {\n }",
"public void before() {\n }",
"@BeforeMethod\r\n\tpublic void beforeMethod() {\r\n\t\t//initializeTestBaseSetup();\r\n\t}",
"@Override\n public void beforeMethod(BQTestScope scope, ExtensionContext context) {\n this.withinTestMethod = true;\n\n // TODO: prefilter callbacks collection of \"beforeTestIfStarted\" in a separate collection to avoid iteration\n // on every run?\n if (isStarted()) {\n callbacks.forEach((k, v) -> beforeTestIfStarted(cayenneRuntime, k, v));\n }\n }",
"@Stub\n\tpublic void before()\n\t{\n\t\t//\n\t}",
"@Before\r\n\tpublic void before() {\r\n\t}",
"@BeforeTest\n\n public void Initialize() {\n\n\n}",
"void before();",
"@Before\n public void before() {\n }",
"@Before\n public void before() {\n }",
"@Before\r\n\tpublic void doThisEveryTime() {\n\t}",
"@BeforeMethod\n\tpublic void beforeMethod() {\n\t}",
"@BeforeClass\n\tpublic void beforeClass() {\n\t}",
"@Before public void setUp() {\n }",
"@Before public void setUp() {\n }",
"@Before public void setUp() {\n }",
"@Before public void setUp() {\n }",
"@Before public void setUp() {\n }",
"@BeforeClass\r\n\tpublic static void beforeClass() {\r\n\t\tSystem.out.println(\"in before class\");\r\n\t}",
"@Before public void setUp() { }",
"protected void runBeforeIterations() {}",
"@BeforeClass\n public void beforeclass() {\n\t}",
"@BeforeClass\n public static void beforeClass() {\n }",
"@BeforeClass(enabled =true)\n\tpublic void beforeClass(){\n\t\tSystem.out.println(\"In BeforeClass\");\n\t}",
"@BeforeTest\npublic void hai()\n{\n\t\n\tHello();\n\t\n}",
"@Before\r\n public void before() throws Exception {\r\n }",
"@BeforeClass\n\tpublic static void testSetup() {\n\t\t// do something before all tests\n\t}",
"@Before\r\n\t public void setUp(){\n\t }",
"protected abstract void before();",
"@BeforeAll\n public static void executedBeforeAll() {\n System.out.println(\"\\n@Before: executedBeforeall\");\n }",
"void beforeRun();",
"@Before\n public void postSetUpPerTest(){\n\n }",
"@BeforeEach\n\tpublic void runBeforeTests() {\n\t\ttestArrayList = new ArrayList<>(Arrays.asList(38, 3, 33, 36, 5, 70, 24, 47, 7, 27, 15, 48, 53, 32, 93));\n\t}",
"protected void runBeforeStep() {}",
"@Override\n @Before\n public void before() throws Exception {\n\n super.before();\n }",
"@Before\n\t public void setUp() {\n\t }",
"@BeforeMethod(alwaysRun = true)\r\n\tpublic void testMethodSetup() {\r\n\t\tif (driver == null)\r\n\t\t\tinitializeDriver();\r\n\t\tlaunchURl();\r\n\t\twaitForPageLoad(1000);\r\n\t}",
"@BeforeMethod\n public void preCondtions() {\n }",
"@Before\r\n public void setUp()\r\n {\r\n }",
"@Before\r\n public void setUp()\r\n {\r\n }",
"@Before\r\n public void setUp()\r\n {\r\n }",
"@Before\r\n public void setUp()\r\n {\r\n }",
"@Before\n public void init() {\n this.testMethodName = this.getTestMethodName();\n this.initialize();\n }",
"@BeforeSuite\r\n\t\tpublic void BeforeSute()\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Before suite\");\r\n\t\t}",
"@Before\r\n\tpublic void setUp() {\n\t}",
"@Before\r\n\tpublic void setUp() throws Exception {\r\n\t\t//This method is unused. \r\n\t}",
"@Before\n public void setUp() {\n }",
"@Before\n\tpublic void setUp() {\n\t\ttest_count++;\n\t\tSystem.out.println(\"Test \"+ test_count);\n\t}",
"@Before\n public void beforeScenario() {\n }",
"protected void runBeforeIteration() {}",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp() {\n }",
"@Before\n public void setUp() {\n }",
"@Before\n public void setUp() {\n }",
"@Before\n public void setUp() {\n }",
"@Before\n public void setUp() {\n }",
"@Before\n\tpublic void setUp() {\n\t}",
"@Before\n public void setUp() {\n }",
"@BeforeAll\n public static void beforeAllInit()\n {\n System.out.println(\"Before all initialized .......\");\n }",
"@Before\n public void before() {\n System.out.format(\"In Before of %s\\n\", ExecutionProcedureJunit2.class.getName());\n }",
"@Before\n public void setUp () {\n }",
"@Before\r\n\tpublic void set_up(){\n\t}",
"@Before\n public final void setUp() throws Exception\n {\n // Empty\n }",
"@BeforeTest\n\tpublic void beforeTest() throws Exception {\n\t\textent = ExtentManager.getReporter(filePath);\n\t\trowData = testcase.get(this.getClass().getSimpleName());\n\t\ttest = extent.startTest(rowData.getTestcaseId(), rowData.getTestcaseDescription()).assignCategory(\"Watchlist\");\n\n\t}",
"@Before\n public void setup() {\n }",
"public void setUp()\r\n {\r\n //empty on purpose\r\n }",
"@BeforeTest\n\tpublic void beforeTest() throws Exception {\n\t\textent = ExtentManager.getReporter(filePath);\n\t\trowData = testcase.get(this.getClass().getSimpleName());\n\t\ttest = extent.startTest(rowData.getTestcaseId(), rowData.getTestcaseDescription()).assignCategory(\"IPA\");\n\t}",
"@BeforeClass\n public static void setup() {\n System.out.println(\"*** Before Class ***\");\n }",
"@Before\n public void setup() {\n }",
"@Before\n public void setup() {\n }",
"@Before\n public void setup() {\n }",
"@Before\r\n\tpublic void before() {\r\n\t\tSystem.out.println(\" Before() \");\r\n\t\tcalc = new CalculadoraDos();// no forma parte del test es una precondicion para ejecutar el test\r\n\t}",
"@Before\r\n\tpublic void setup() {\r\n\t}",
"@BeforeMethod\n\tpublic void beforeMethod() {\n//\t\tSeleniumWrapper.openPage(\"http://localhost:8080\");\n//\t\tm_logMessage = new StringBuilder();\n//\t\tm_logMessage.append(String.format(\"TestCase - %s, started @ %s \\n\", m_currentTestCaseName,\n//\t\t\t\tCommonUtil.getFormatedDate(\"yyyy-MM-dd HH:mm:ss.SSS \")));\n//\t\tm_logMessage.append(\n//\t\t\t\t\"------------------------------------------------------------------------------------------------------------------------- \\n\");\n//\t\tm_logMessage.append(String.format(\"Description: %s. \\nTest Steps: \\n\", m_currentTestCaseDescription));\n//\t\tlogFullTestDescription();\n//\t\tLog.writeMessage(LogLevel.INFO, m_logMessage.toString());\n\t\tHelper.sleep(4000);\n\t}",
"@BeforeAll\n\tstatic void initOperate()\n\t{\t\n\t\tSystem.out.println(\"only Before All the tests....\");\n\t\toperate = new Operations();\n\t}",
"@BeforeAll\n static void init() {\n }",
"@BeforeAll\n public void prepare() {\n }",
"@BeforeClass // runs before all test cases; runs only once\n public static void setUpSuite() {\n\n }",
"@BeforeClass\n\t public void setUp() {\n\t }"
] | [
"0.83572924",
"0.8082353",
"0.7994191",
"0.79801756",
"0.7842301",
"0.7835119",
"0.7835119",
"0.7819091",
"0.77521104",
"0.77314323",
"0.77110744",
"0.76923996",
"0.7684611",
"0.7680175",
"0.7680175",
"0.76422644",
"0.76041543",
"0.75971746",
"0.7537205",
"0.7537205",
"0.7537205",
"0.7537205",
"0.7537205",
"0.7521879",
"0.75188625",
"0.751202",
"0.7496027",
"0.748136",
"0.74622726",
"0.74608743",
"0.74605817",
"0.74570143",
"0.744871",
"0.74277794",
"0.74254733",
"0.7417733",
"0.7411849",
"0.7387982",
"0.7376452",
"0.7372518",
"0.7349728",
"0.7304753",
"0.7285683",
"0.7280661",
"0.7280661",
"0.7280661",
"0.7280661",
"0.7279778",
"0.7266343",
"0.7263362",
"0.72492605",
"0.7242898",
"0.7188199",
"0.71773636",
"0.7174546",
"0.71738696",
"0.71738696",
"0.71738696",
"0.71738696",
"0.71738696",
"0.71738696",
"0.71738696",
"0.71738696",
"0.71738696",
"0.71738696",
"0.71738696",
"0.71738696",
"0.71738696",
"0.71738696",
"0.71738696",
"0.71738696",
"0.71738696",
"0.71738696",
"0.716893",
"0.716893",
"0.716893",
"0.716893",
"0.716893",
"0.71654403",
"0.7157966",
"0.71406126",
"0.7132963",
"0.71221745",
"0.71197754",
"0.71186525",
"0.71178436",
"0.71143997",
"0.711008",
"0.71059895",
"0.7102541",
"0.71008515",
"0.71008515",
"0.71008515",
"0.70973676",
"0.70810246",
"0.7071412",
"0.7046142",
"0.7043662",
"0.70420843",
"0.70384645",
"0.7024604"
] | 0.0 | -1 |
TODO Check if .sqlite exists. If not, initialise one. | public void start()
{
try
{
new JDABuilder(this.appconfig.authType)
.setToken(this.appconfig.authToken)
.setAudioEnabled(false)
.setAutoReconnect(true)
.addEventListener(new DiscordMonitorListenerAdapterPrep())
.buildBlocking(); // TODO use .buildAsync()?
}
catch (LoginException | IllegalArgumentException e)
{
System.err.println("error: Log in failed. Please check provided token.");
}
catch (RateLimitedException e)
{
System.err.println("error: This application is being rate limited by Discord.");
}
catch (InterruptedException e)
{
System.err.println("fatal: Unexpected interrupt.");
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initialize() {\n if (databaseExists()) {\n SharedPreferences prefs = PreferenceManager\n .getDefaultSharedPreferences(mContext);\n int dbVersion = prefs.getInt(SP_KEY_DB_VER, 1);\n if (DATABASE_VERSION != dbVersion) {\n File dbFile = mContext.getDatabasePath(DBNAME);\n if (!dbFile.delete()) {\n Log.w(TAG, \"Unable to update database\");\n }\n }\n }\n if (!databaseExists()) {\n createDatabase();\n }\n }",
"private void setupDb(){\n try {\n openConnection();\n s.executeUpdate(\"CREATE TABLE IF NOT EXISTS LIB (NAME text UNIQUE , TYPE text, LANGUAGE text, INTRUSIVE text, OPENSOURCE text)\");\n }catch (SQLException e) {\n System.err.println(e.getMessage());\n }finally {\n if (c != null){\n close(c);\n }\n }\n }",
"public static File getSqliteDb(String name) {\n\n File nwdSqliteFolder = getDirectoryStoragePath(\"/NWD/sqlite\");\n\n String dbFilePath = nwdSqliteFolder.getAbsolutePath() + File.separator + name;\n\n if (!dbFilePath.endsWith(\".db\"))\n {\n dbFilePath += \".db\" ;\n }\n\n return new File(dbFilePath);\n }",
"private static void initialization() {\n File installationDir = new File(Constants.INSTALL_DIRECTORY, \"docli\");\n if(installationDir.exists()) {\n // user file exists\n } else {\n String s = String.format(\"Installing files at %s\", Constants.INSTALL_DIRECTORY);\n display.display(s);\n installationDir.mkdir();\n try {\n File f = new File(installationDir, \"docli_database.db\");\n f.createNewFile();\n }catch (IOException e) {\n System.out.println(e.getMessage());\n }\n manager.executeDMLStatementSync(Constants.CREATE_TABLE_ITEM);\n }\n }",
"public SQLite(String dbLocation) {\n this.dbLocation = dbLocation;\n }",
"public void init(String path, DatabaseHelper helper) {\n try {\n connection = DriverManager.getConnection(\"jdbc:sqlite:\" + path);\n\n queryCache = new QueryCache();\n\n Statement statement = connection.createStatement();\n ResultSet rs = statement.executeQuery(\"PRAGMA user_version;\");\n int version = rs.getInt(1);\n rs.close();\n\n if(version != DATABASE_SCHEMA_VERSION) {\n Log.debug(\"Database version was {0} but Schema version is {1}\", version, DATABASE_SCHEMA_VERSION);\n\n // Create default data\n if(version == 0) {\n helper.onCreate(this);\n } else {\n helper.onMigration(this, version, DATABASE_SCHEMA_VERSION);\n }\n\n statement = connection.createStatement();\n statement.execute(\"PRAGMA user_version = \" + DATABASE_SCHEMA_VERSION + \";\");\n }\n \n } catch (SQLException ex) {\n Log.error(\"{0}\", ex);\n throw new RuntimeException(\"Database connection failed!\", ex);\n }\n }",
"private SQLite sqLiteConnect(DatabaseConfig config){\n SQLite result;\n String filePath = String.format(\"database\\\\%s.db\", config.getSqlName());\n result = new SQLite(filePath);\n\n if(result.connect())\n ItemBox.getLogger().info(\"[Database] connect successful \" + filePath);\n\n else{\n ItemBox.getLogger().severe(\"[Database] connect fail \" + filePath);\n return null;\n }\n\n SQLiteTable sqLiteTable = convertToSQLiteTable(config);\n SQLite.Status sqLiteResult = result.createTable(sqLiteTable);\n\n if(sqLiteResult == SQLite.Status.SUCCESS){\n ItemBox.getLogger().info(String.format(\"[Database] add table \\\"%s\\\" to %s\", config.getTableName(), filePath));\n }else{\n ItemBox.getLogger().info(String.format(\"[Database] found table \\\"%s\\\" from %s\", config.getTableName(), filePath));\n }\n\n ItemBox.getLogger().info(String.format(\"[Database] sql \\\"%s\\\" connected\", config.getSqlName()));\n return result;\n }",
"DatabaseTable_DataSource(SQLiteDatabase db) {\n createIfNotExists(db);\n }",
"private void initDb() {\n\t\tif (dbHelper == null) {\n\t\t\tdbHelper = new DatabaseOpenHelper(this);\n\t\t}\n\t\tif (dbAccess == null) {\n\t\t\tdbAccess = new DatabaseAccess(dbHelper.getWritableDatabase());\n\t\t}\n\t}",
"private DbHandler()\n\t{\n\t\ttry\n\t\t{\n\t\t\t// Check if library exists\n\t\t\tClass.forName(DRIVER_CLASS);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tIO.dbOutF(\"Failed to load the SQLite JDBC Driver.\");\n\t\t}\n\t}",
"public SQLiteHelper(Context context) {\n\t\tsuper(context, getDefaultDatabaseName(context), null, DEFAULT_VERSION);\n\t\t\n\t\tLogger.log(\"Database path:\"+ context.getDatabasePath(getDefaultDatabaseName(context)));\n\t}",
"private createSingletonDatabase()\n\t{\n\t\tConnection conn = createDatabase();\n\t\tcreateTable();\n\t\tString filename = \"Summer expereince survey 2016 for oliver.csv\"; \n\t\timportData(conn, filename);\n\t}",
"public void createDB(){\r\n\t\t\r\n\t\t Connection connection = null;\r\n\t try\r\n\t {\r\n\t // create a database connection\r\n\t connection = DriverManager.getConnection(\"jdbc:sqlite:project.sqlite\");\r\n\t Statement statement = connection.createStatement();\r\n\t statement.setQueryTimeout(30); // set timeout to 30 sec.\r\n\r\n\t statement.executeUpdate(\"drop table if exists task\");\r\n\t statement.executeUpdate(\"create table task (taskId integer primary key asc, description string, status string, createDate datetime default current_timestamp)\");\r\n\t statement.executeUpdate(\"insert into task values(1, 'leo', 'Active', null)\");\r\n\t statement.executeUpdate(\"insert into task values(2, 'yui', 'Complete', null)\");\r\n\t }\r\n\t catch(SQLException ex){\r\n\t \tthrow new RuntimeException(ex);\r\n\t }\r\n\t\t\r\n\t}",
"private DBManager() throws Exception {\n file = new File(\"pdfLibraryDB.mv.db\");\n if (!file.exists()) {\n conn = connect();\n stmt = conn.createStatement();\n query = \"CREATE TABLE user(username VARCHAR(30) PRIMARY KEY, password VARCHAR(32));\" +\n \"CREATE TABLE category(id VARCHAR(30) PRIMARY KEY, name VARCHAR(30), username VARCHAR(30), FOREIGN KEY(username) REFERENCES user(username) ON UPDATE CASCADE ON DELETE CASCADE);\"+\n \"CREATE TABLE favorite(id VARCHAR(30) PRIMARY KEY, path VARCHAR(500), keyword VARCHAR(200), searchType VARCHAR(10), category VARCHAR(30),username VARCHAR(30), FOREIGN KEY(username) REFERENCES user(username) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY(category) REFERENCES category(id) ON UPDATE CASCADE ON DELETE CASCADE);\" +\n \"CREATE TABLE history(id VARCHAR(30) PRIMARY KEY, keyword VARCHAR(200), type VARCHAR(10), directory VARCHAR(500), username VARCHAR(30), FOREIGN KEY(username) REFERENCES user(username) ON UPDATE CASCADE ON DELETE CASCADE);\";\n stmt.executeUpdate(query);\n stmt.close();\n conn.close();\n System.out.println(\"DB created!\");\n }\n }",
"private Connection createConnection() {\r\n\tConnection result = null;\r\n\r\n\ttry {\r\n\t Class.forName(\"org.sqlite.JDBC\");\r\n\t result = DriverManager.getConnection(\"jdbc:sqlite:\" + fileName);\r\n\t} catch (Exception e) {\r\n\t result = null;\r\n\t}\r\n\r\n\treturn result;\r\n }",
"private SQLiteDatabase openDatabase(String name){\n\n SQLiteDatabase result = null;\n\n try{\n result = SQLiteDatabase.openDatabase(name, null, 0);\n this.isActive = true;\n }\n catch(Exception e){\n // result = this.createDatabase(name);\n }\n\n return result;\n\n }",
"private void createDatabase() {\n String parentPath = mContext.getDatabasePath(DBNAME).getParent();\n String path = mContext.getDatabasePath(DBNAME).getPath();\n\n File file = new File(parentPath);\n if (!file.exists()) {\n if (!file.mkdir()) {\n Log.w(TAG, \"Unable to create database directory\");\n return;\n }\n }\n\n InputStream is = null;\n OutputStream os = null;\n try {\n is = mContext.getAssets().open(DBNAME);\n os = new FileOutputStream(path);\n\n byte[] buffer = new byte[1024];\n int length;\n while ((length = is.read(buffer)) > 0) {\n os.write(buffer, 0, length);\n }\n os.flush();\n SharedPreferences prefs = PreferenceManager\n .getDefaultSharedPreferences(mContext);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putInt(SP_KEY_DB_VER, DATABASE_VERSION);\n editor.commit();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (is != null) {\n try {\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (os != null) {\n try {\n os.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }",
"public Database initDB() {\n Database db = new Database(\"dataBase.db\");\n\n// db.insertData(\"1 Dragos Dinescu [email protected] 0744522600 Digi 10-12-2020\");\n// db.insertData(\"2 Adelina Mirea [email protected] 0733651320 Orange 14-10-2020\");\n// db.insertData(\"3 Radu Sorostinean [email protected] 0733723321 Digi 1-10-2020\");\n// db.insertData(\"4 Andrei Brasoveanu [email protected] 0732341390 Vodafone 12-11-2020\");\n return db;\n\n //db.deleteFromDB();\n //db.updateDB(\"1 alex radu [email protected] 022256926 orange 10/08/2010\");\n }",
"private void initDB() {\n dataBaseHelper = new DataBaseHelper(this);\n }",
"private void initDB(){\n gistHelper = new GistSQLiteHelper(mainActivity, \"GistsDB\", null, 1);\n db = gistHelper.getWritableDatabase();\n }",
"public static SqliteModelFactory init()\n {\n try\n {\n SqliteModelFactory theSqliteModelFactory = (SqliteModelFactory)EPackage.Registry.INSTANCE.getEFactory(SqliteModelPackage.eNS_URI);\n if (theSqliteModelFactory != null)\n {\n return theSqliteModelFactory;\n }\n }\n catch (Exception exception)\n {\n EcorePlugin.INSTANCE.log(exception);\n }\n return new SqliteModelFactoryImpl();\n }",
"private void open() throws SQLiteException {\n\n database = dbHelper.getWritableDatabase();\n }",
"public void initDatabase(){\n CovidOpener cpHelper = new CovidOpener(this);\n cdb = cpHelper.getWritableDatabase();\n }",
"private boolean initDB() {\n\t\tDataBaseHelper myDbHelper = new DataBaseHelper(this);\n\t\tif (!myDbHelper.checkDataBase()) {\n\t\t\tmyDbHelper.dbDelete();\n\t\t\tdownloadDB();\n\t\t\treturn false;\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tif (!myDbHelper.openDataBase()) {\n\t\t\t\t\tLog.e(TAG, \"Unable to open database\");\n\t\t\t\t\tstopService();\n\t\t\t\t\tmyDbHelper.dbDelete();\n\t\t\t\t\tdownloadDB();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.e(TAG, \"Unable to open database\", e);\n\t\t\t\tstopService();\n\t\t\t\tmyDbHelper.dbDelete();\n\t\t\t\tdownloadDB();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tstartSync();\n\t\t\t\treturn initUI();\n\t\t\t} catch (Exception ioe) {\n\t\t\t\tLog.e(TAG, \"Unable to launch activity\");\n\t\t\t}\n\n\t\t}\n\n\t\treturn false;\n\t}",
"@Override\n public SQLiteDatabase openOrCreateDatabase(String name,\n int mode,\n SQLiteDatabase.CursorFactory factory) {\n final File path = getDatabasePath(name);\n Logger.pii(LOG_TAG, \"Opening database through absolute path \" + path.getAbsolutePath());\n return SQLiteDatabase.openOrCreateDatabase(path, null);\n }",
"public Database(Context context)\n\t{\n\t\t/* Instanciation de l'openHelper */\n\t\tDBOpenHelper helper = new DBOpenHelper(context);\n\t\t\n\t\t/* Load de la database */\n\t\t//TODO passer en asynchrone pour les perfs\n\t\tmainDatabase = helper.getWritableDatabase();\n\t\t\n\t\t/* DEBUG PRINT */\n\t\tLog.i(\"info\", \"Database Loading Suceeded\");\n\t}",
"private static void initializeDatabase() {\n\t\tArrayList<String> data = DatabaseHandler.readDatabase(DATABASE_NAME);\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\trecords = serializer.deserialize(data);\n\t}",
"public MyApp()\n { \n \ttry{\n \t\tURI uri = URI.create(path.Path());\n\t \tDatabase sqliteDB = DatabaseFactory.create(uri);\n\t \t\n\t\t \tStatement cu = sqliteDB.createStatement(statement.CreateUser());\t\t\t\t\n\t\t \tcu.prepare();\n\t\t \tcu.execute();\n\t\t \tcu.close();\n\t\t\t\t\n\t\t\t\tStatement cp = sqliteDB.createStatement(statement.CategoriaProducto());\t\t\t\t\n\t\t\t\tcp.prepare();\n\t\t\t\tcp.execute();\n\t\t\t\tcp.close();\n\t\t\t\t\n\t\t\t\tStatement cpt = sqliteDB.createStatement(statement.TemporadaCategoriaProducto());\t\t\t\t\n\t\t\t\tcpt.prepare();\n\t\t\t\tcpt.execute();\n\t\t\t\tcpt.close();\n\t\t\t\t\n\t\t\t\tStatement p = sqliteDB.createStatement(statement.Producto());\t\t\t\t\n\t\t\t\tp.prepare();\n\t\t\t\tp.execute();\n\t\t\t\tp.close();\n\t\t\t\t\n\t\t\t\tStatement pt = sqliteDB.createStatement(statement.TemporadaProducto());\t\t\t\t\n\t\t\t\tpt.prepare();\n\t\t\t\tpt.execute();\n\t\t\t\tpt.close();\n\t\t\t\t\n\t\t\t\tStatement cm = sqliteDB.createStatement(statement.Municipio());\t\t\t\t\n\t\t\t\tcm.prepare();\n\t\t\t\tcm.execute();\n\t\t\t\tcm.close();\n\t\t\t\t\n\t\t\t\tStatement cmt = sqliteDB.createStatement(statement.TemporadaMunicipio());\t\t\t\t\n\t\t\t\tcmt.prepare();\n\t\t\t\tcmt.execute();\n\t\t\t\tcmt.close();\n\t\t\t\t\n\t\t\t\tStatement ce = sqliteDB.createStatement(statement.Establecimiento());\t\t\t\t\n\t\t\t\tce.prepare();\n\t\t\t\tce.execute();\n\t\t\t\tce.close();\n\t\t\t\t\n\t\t\t\tStatement cet = sqliteDB.createStatement(statement.TemporadaEstablecimiento());\t\t\t\t\n\t\t\t\tcet.prepare();\n\t\t\t\tcet.execute();\n\t\t\t\tcet.close();\n\t\t\t\t\n\t\t\t\tStatement cpr = sqliteDB.createStatement(statement.Presentacion());\t\t\t\t\n\t\t\t\tcpr.prepare();\n\t\t\t\tcpr.execute();\n\t\t\t\tcpr.close();\n\t\t\t\t\n\t\t\t\tStatement cprt = sqliteDB.createStatement(statement.TemporadaPresentacion());\t\t\t\t\n\t\t\t\tcprt.prepare();\n\t\t\t\tcprt.execute();\n\t\t\t\tcprt.close();\n\t\t\t\t\n\t\t\t\tStatement cpf = sqliteDB.createStatement(statement.ProductoFiltrado());\t\t\t\t\n\t\t\t\tcpf.prepare();\n\t\t\t\tcpf.execute();\n\t\t\t\tcpf.close();\n\t\t\t\t\n\t\t\t\tStatement cpft = sqliteDB.createStatement(statement.TemporadaProductoFiltrado());\t\t\t\t\n\t\t\t\tcpft.prepare();\n\t\t\t\tcpft.execute();\n\t\t\t\tcpft.close();\n\t\t\t\t\n\t\t\t\tStatement cb = sqliteDB.createStatement(statement.Busqueda());\t\t\t\t\n\t\t\t\tcb.prepare();\n\t\t\t\tcb.execute();\n\t\t\t\tcb.close();\n\t\t\t\t\n\t\t\t\tStatement cbt = sqliteDB.createStatement(statement.TemporadaBusqueda());\t\t\t\t\n\t\t\t\tcbt.prepare();\n\t\t\t\tcbt.execute();\n\t\t\t\tcbt.close();\n\t\t\t\t\n\t\t\t\tStatement cf = sqliteDB.createStatement(statement.Favorito());\t\t\t\t\n\t\t\t\tcf.prepare();\n\t\t\t\tcf.execute();\n\t\t\t\tcf.close();\n\t\t\t\t\n\t\t\t\tStatement cftu = sqliteDB.createStatement(statement.TemporalUser());\t\t\t\t\n\t\t\t\tcftu.prepare();\n\t\t\t\tcftu.execute();\n\t\t\t\tcftu.close();\n\t\t\t\t\n\t\t\t\tStatement clc = sqliteDB.createStatement(statement.ListaCompras());\t\t\t\t\n\t\t\t\tclc.prepare();\n\t\t\t\tclc.execute();\n\t\t\t\tclc.close();\n\t\t\t\t\n\t\t\t\tStatement crc = sqliteDB.createStatement(statement.RutaCompras());\t\t\t\t\n\t\t\t\tcrc.prepare();\n\t\t\t\tcrc.execute();\n\t\t\t\tcrc.close();\n\t\t\t\t\n\t\t\t\tStatement cpc = sqliteDB.createStatement(statement.ProductoCompras());\t\t\t\t\n\t\t\t\tcpc.prepare();\n\t\t\t\tcpc.execute();\n\t\t\t\tcpc.close();\n\t\t\t\t\n\t\t\tsqliteDB.close();\n\t \t\n \t}catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}finally{\n \t//Llamar SplashScreen\n \tsplashScreen = new SplashScreen();\n \t\n \t\n \t\n // Push a screen onto the UI stack for rendering.\n //pushScreen(new MyScreen());\n \tpushScreen(splashScreen);\n\t\t}\n }",
"private void setupDatabase() {\r\n\t\tDatabaseHelperFactory.init(this);\r\n\t\tdatabase = DatabaseHelperFactory.getInstance();\r\n\t}",
"private void testSQLite() {\n\t\tConnection conn=null;\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\n\t\t\tconn = DriverManager.getConnection(DATABASE_CONNECTION);\n\t\t\t// 建立事务机制,禁止自动提交,设置回滚点\n\t\t\tconn.setAutoCommit(false);\n\n\t\t\tStatement stat = conn.createStatement();\n\t\t\t// User{weibo=null, id=2438418282, name='心情慵懒',\n\t\t\t// screenName='心情慵懒', location='甘肃 陇南', description='',\n\t\t\t// profileImageUrl='http://tp3.sinaimg.cn/2438418282/50/5612515360/1',\n\t\t\t// province='62', city='26', domain ='', gender ='m',\n\t\t\t// url='',\n\t\t\t// allowAllActMsg=false,\n\t\t\t// followersCount=1,\n\t\t\t// friendsCount=40, createdAt=Sun Oct 02 00:00:00 CST 2011,\n\t\t\t// favouritesCount=0, following=false, statusesCount=0,\n\t\t\t// geoEnabled=false,\n\t\t\t// voiderified=false,\n\t\t\t// status=null}\n\n\t\t\tstat.executeUpdate(\"create table userInfo (\"\n\t\t\t\t\t+ \"id PRIMARY KEY NOT NULL,\"// 用户UID\",主键\n\t\t\t\t\t+ \"screenName,\"// 微博昵称\n\t\t\t\t\t+ \"name,\"// 友好显示名称,同微博昵称\n\t\t\t\t\t+ \"province,\"// 省份编码(参考省份编码表)\n\t\t\t\t\t+ \"city,\"// 城市编码(参考城市编码表)\n\t\t\t\t\t+ \"location,\"// 地址\n\t\t\t\t\t+ \"description,\"// 个人描述\n\t\t\t\t\t+ \"url,\"// 用户博客地址\n\t\t\t\t\t+ \"profileImageUrl,\"// 自定义图像\n\t\t\t\t\t+ \"domain,\"// 用户个性化URL\n\t\t\t\t\t+ \"gender,\"// 性别,m--男,f--女,n--未知\n\t\t\t\t\t+ \"followersCount,\"// 粉丝数\n\t\t\t\t\t+ \"friendsCount,\"// 关注数\n\t\t\t\t\t+ \"statusesCount,\"// 微博数\n\t\t\t\t\t+ \"favouritesCount,\"// 收藏数\n\t\t\t\t\t+ \"createdAt,\"// 创建时间\n\t\t\t\t\t+ \"following,\"// 是否已关注(此特性暂不支持)\n\t\t\t\t\t+ \"verified,\"// 加V标示,是否微博认证用户\n\t\t\t\t\t+ \"status,\"// 状态,由取回的字符中提取,意义不明\n\t\t\t\t\t+ \"geoEnabled,\"// 地理状态信息\n\t\t\t\t\t+ \"allowAllActMsg,\"// 由取回的字符中提取,意义不明\n\t\t\t\t\t+ \"weibo,\"// 由取回的字符中提取,意义不明\n\t\t\t\t\t+ \"access_token,\"// 访问Token\n\t\t\t\t\t+ \"access_secret)\");// 访问密钥\n\n\t\t\t// [createdAt=Sat Oct 01 23:51:54 CST 2011,\n\t\t\t// id=3363835379243442, text=养生之道,首在养气。,\n\t\t\t// source=<a href=\"http://mail.sina.com.cn\"\n\t\t\t// rel=\"nofollow\">新浪免费邮箱</a>,\n\t\t\t// isTruncated=false, inReplyToStatusId=-1, inReplyToUserId=-1,\n\t\t\t// isFavorited=false, inReplyToScreenName=,\n\t\t\t// latitude=-1.0,\n\t\t\t// longitude=-1.0,\n\t\t\t// thumbnail_pic=, bmiddle_pic=,\n\t\t\t// original_pic=,\n\t\t\t// mid=3363835379243442,\n\t\t\t// user=null,\n\t\t\t// retweeted_status=null]}\n\n\t\t\tstat.executeUpdate(\"create table statusInfo (\" + \"created_at,\"// 创建时间\n\t\t\t\t\t+ \"id PRIMARY KEY NOT NULL,\"// 微博ID,主键\n\t\t\t\t\t+ \"text,\"// 微博信息内容\n\t\t\t\t\t+ \"source,\"// 微博来源\n\t\t\t\t\t+ \"favorited,\"// 是否已收藏\n\t\t\t\t\t+ \"truncated,\"// 是否被截断\n\t\t\t\t\t+ \"in_reply_to_status_id,\"// 回复ID\n\t\t\t\t\t+ \"in_reply_to_user_id,\"// 回复人UID\n\t\t\t\t\t+ \"in_reply_to_screen_name,\"// 回复人昵称\n\t\t\t\t\t+ \"thumbnail_pic,\"// 缩略图\n\t\t\t\t\t+ \"bmiddle_pic,\"// 中型图片\n\t\t\t\t\t+ \"original_pic,\"// 原始图片\n\t\t\t\t\t+ \"user,\"// 作者信息\n\t\t\t\t\t+ \"retweeted_status)\");// 转发的博文,内容为status,如果不是转发,则没有此字段\n\t\t\tconn.commit();\n\t\t\tconn.close();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"create table error\");\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tconn.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"private void createDB() {\n try {\n Statement stat = conn.createStatement();\n stat.execute(\"CREATE TABLE settings (name TEXT, state);\");\n stat.execute(\"CREATE TABLE expressions (id INTEGER PRIMARY KEY ASC AUTOINCREMENT, expression TEXT);\");\n stat.execute(\"CREATE TABLE summaries (id INTEGER PRIMARY KEY ASC, expression_id INTEGER, title TEXT, abstract TEXT);\");\n stat.execute(\"CREATE TABLE history (id INTEGER PRIMARY KEY ASC AUTOINCREMENT, expression TEXT);\");\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n }\n }",
"private void m14053d() {\n try {\n File file = new File(f18051l);\n File file2 = new File(f18052m);\n if (!file.exists()) {\n file.mkdirs();\n }\n if (!file2.exists()) {\n file2.createNewFile();\n }\n if (file2.exists()) {\n SQLiteDatabase openOrCreateDatabase = SQLiteDatabase.openOrCreateDatabase(file2, null);\n openOrCreateDatabase.execSQL(\"CREATE TABLE IF NOT EXISTS bdcltb09(id CHAR(40) PRIMARY KEY,time DOUBLE,tag DOUBLE, type DOUBLE , ac INT);\");\n openOrCreateDatabase.execSQL(\"CREATE TABLE IF NOT EXISTS wof(id CHAR(15) PRIMARY KEY,mktime DOUBLE,time DOUBLE, ac INT, bc INT, cc INT);\");\n openOrCreateDatabase.setVersion(1);\n openOrCreateDatabase.close();\n }\n this.f18053a = true;\n } catch (Exception e) {\n }\n }",
"private static void loadDriver() {\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"Database createDatabase();",
"public void beginInitialization() {\n SQLiteDatabase db = this.helper.getWritableDatabase();\n db.beginTransaction();\n populateMeasurementVersionsCache(db);\n }",
"public void initDb() {\n String createVac = \"create table if not exists vacancies(id serial primary key,\"\n + \"name varchar(1500) NOT NULL UNIQUE, url varchar (1500), description text, dateVac timestamp);\";\n try (Statement st = connection.createStatement()) {\n st.execute(createVac);\n } catch (SQLException e) {\n LOG.error(e.getMessage());\n }\n }",
"private void open() {\n\t\tFile dbf = new File( dbName );\n\n\t\tif ( dbf.exists( ) == false ) {\n\t\t\tSystem.out.println(\n\t\t\t\t \"SQLite database file [\"\n\t\t\t\t+ dbName\n\t\t\t\t+ \"] does not exist\");\n\t\t\tSystem.exit( 0 );\n\t\t}\n\t\n\t\ttry {\n\t\t\tClass.forName( JDBC_DRIVER );\n\t\t\tgetConnection( );\n\t\t}\n\t\tcatch ( ClassNotFoundException cnfe ) {\n\t\t\tnotify( \"Db.Open\", cnfe );\n\t\t}\n\n\t\tif ( debug )\n\t\t\tSystem.out.println( \"Db.Open : leaving\" );\n\t}",
"public void createDB() {\n String url = \"jdbc:sqlite:stats.db\";\n Statement stmt = null;\n try (Connection conn = DriverManager.getConnection(url)) {\n stmt = conn.createStatement();\n String query = \"CREATE TABLE IF NOT EXISTS games \"\n + \"(ownships int, \"\n + \"ownremaining int, \"\n + \"aiships int,\"\n + \"airemaining int, \"\n + \"turns int)\";\n\n stmt.executeUpdate(query);\n\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n }",
"@Override\n public boolean onCreate() {\n\n // password helper that uses Android shared preferences\n passwordHelper = new SharedPreferencesPasswordHelper();\n\n // Creates a new database helper object.\n // Note: database itself isn't opened until something tries to access it,\n // and it's only created if it doesn't already exist.\n databaseHelper = new DatabaseHelper(getContext());\n\n try {\n SQLiteDatabase.loadLibs(getContext());\n } catch (Exception e) {\n Log.e(DATABASE_NAME, e.getMessage(), e);\n }\n return true;\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 }",
"public synchronized void createIfNotExists(SQLiteDatabase db) {\n db.execSQL(SQL_CREATE_DATASOURCE);\n }",
"public void testCreateDb() throws Throwable {\n // build a HashSet of all of the table names we wish to look for\n // Note that there will be another table in the DB that stores the\n // Android metadata (db version information)\n final HashSet<String> tableNameHashSet = new HashSet<String>();\n tableNameHashSet.add(MediaContract.MediaEntry.TABLE_NAME);\n\n mContext.deleteDatabase(MediaDbHelper.DATABASE_NAME);\n SQLiteDatabase db = new MediaDbHelper(\n this.mContext).getWritableDatabase();\n assertEquals(true, db.isOpen());\n\n // have we created the tables we want?\n Cursor c = db.rawQuery(\"SELECT name FROM sqlite_master WHERE type='table'\", null);\n\n assertTrue(\"Error: This means that the database has not been created correctly\",\n c.moveToFirst());\n\n // verify that the tables have been created\n do {\n tableNameHashSet.remove(c.getString(0));\n } while( c.moveToNext() );\n\n // if this fails, it means that your database doesn't contain both the location entry\n // and weather entry tables\n assertTrue(\"Error: Your database was created without both the location entry and weather entry tables\",\n tableNameHashSet.isEmpty());\n\n // now, do our tables contain the correct columns?\n c = db.rawQuery(\"PRAGMA table_info(\" + MediaContract.MediaEntry.TABLE_NAME + \")\",\n null);\n\n assertTrue(\"Error: This means that we were unable to query the database for table information.\",\n c.moveToFirst());\n\n // Build a HashSet of all of the column names we want to look for\n final HashSet<String> mediaColumnHashSet = new HashSet<String>();\n mediaColumnHashSet.add(MediaContract.MediaEntry._ID);\n mediaColumnHashSet.add(MediaContract.MediaEntry.COLUMN_AUTHOR);\n mediaColumnHashSet.add(MediaContract.MediaEntry.COLUMN_COMPLETION);\n mediaColumnHashSet.add(MediaContract.MediaEntry.COLUMN_DATE);\n mediaColumnHashSet.add(MediaContract.MediaEntry.COLUMN_DESCRIPTION);\n mediaColumnHashSet.add(MediaContract.MediaEntry.COLUMN_RATING);\n mediaColumnHashSet.add(MediaContract.MediaEntry.COLUMN_TITLE);\n mediaColumnHashSet.add(MediaContract.MediaEntry.COLUMN_TYPE);\n mediaColumnHashSet.add(MediaContract.MediaEntry.COLUMN_URL);\n\n int columnNameIndex = c.getColumnIndex(\"name\");\n do {\n String columnName = c.getString(columnNameIndex);\n mediaColumnHashSet.remove(columnName);\n } while(c.moveToNext());\n\n // if this fails, it means that your database doesn't contain all of the required media\n // entry columns\n assertTrue(\"Error: The database doesn't contain all of the required media entry columns\",\n mediaColumnHashSet.isEmpty());\n db.close();\n }",
"public void open(){\n\t\tbdd = maBaseSQLite.getWritableDatabase();\n\t}",
"private void initDB() {\n dataBaseHelper = new DataBaseHelper(getActivity());\n }",
"@Before\r\n public void initDb() throws Exception {\n mDatabase = Room.inMemoryDatabaseBuilder(ApplicationProvider.getApplicationContext(),\r\n MyDatabase.class)\r\n // allowing main thread queries, just for testing\r\n .allowMainThreadQueries()\r\n .build();\r\n\r\n mTemplateDao = mDatabase.templateDao();\r\n }",
"public DB(String db) throws ClassNotFoundException, SQLException {\n // Set up a connection and store it in a field\n Class.forName(\"org.sqlite.JDBC\");\n String url = \"jdbc:sqlite:\" + db;\n\n // stop conn from creating a file if does not exists\n SQLiteConfig config = new SQLiteConfig();\n config.resetOpenMode(SQLiteOpenMode.CREATE);\n\n //connect to the file\n conn = DriverManager.getConnection(url, config.toProperties());\n try (Statement stat = conn.createStatement();) {\n stat.executeUpdate(\"PRAGMA foreign_keys = ON;\");\n }\n }",
"@Before\n public void initDb() {\n mDatabase = Room.inMemoryDatabaseBuilder(InstrumentationRegistry.getContext(),\n ToDoDatabase.class).build();\n }",
"public SQLiteDatabase openDatabase() {\n synchronized (mLock) {\n Log.d(\"Opening database.\");\n File path = mContext.getDatabasePath(DatabaseOpenHelper.NAME);\n //Check if database exists and if not copy from assests folder\n if (!path.exists()) {\n try {\n mOpenHelper = new DatabaseOpenHelper(mContext);\n mOpenHelper.getWritableDatabase();\n\n copyDataBase();\n }\n catch (IOException e) {\n Log.e(\"Could not copy dictionary.\", e);\n }\n }\n if (mOpenHelper == null) {\n mOpenHelper = new DatabaseOpenHelper(mContext);\n }\n return mOpenHelper.getWritableDatabase();\n }\n }",
"private void initDatabase() {\n\n String sql = \"CREATE TABLE IF NOT EXISTS books (\\n\"\n + \"\tISBN integer PRIMARY KEY,\\n\"\n + \"\tBookName text NOT NULL,\\n\"\n + \" AuthorName text NOT NULL, \\n\"\n + \"\tPrice integer\\n\"\n + \");\";\n\n try (Connection conn = DriverManager.getConnection(urlPath);\n Statement stmt = conn.createStatement()) {\n System.out.println(\"Database connected\");\n stmt.execute(sql);\n\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }",
"private DatabaseRepository() {\n try {\n // connect to database\n\n DB_URL = \"jdbc:sqlite:\"\n + this.getClass().getProtectionDomain()\n .getCodeSource()\n .getLocation()\n .toURI()\n .getPath().replaceAll(\"[/\\\\\\\\]\\\\w*\\\\.jar\", \"/\")\n + \"lib/GM-SIS.db\";\n connection = DriverManager.getConnection(DB_URL);\n mapper = ObjectRelationalMapper.getInstance();\n mapper.initialize(this);\n }\n catch (SQLException | URISyntaxException e) {\n System.out.println(e.toString());\n }\n }",
"public static Connection getConnection() {\n if(connection == null) {\n Statement statement = null;\n try {\n Class.forName(\"org.sqlite.JDBC\");\n connection = DriverManager.getConnection(\"jdbc:sqlite::memory:\");\n \n statement = connection.createStatement();\n \n BufferedReader input = new BufferedReader(new FileReader(\"db/schema.sql\"));\n String contents;\n String sql = \"\";\n while((contents = input.readLine()) != null) {\n sql += contents;\n }\n input.close();\n \n statement.executeUpdate(sql);\n }\n catch (Exception e) \n { \n e.printStackTrace(); \n }\n finally {\n try {\n statement.close();\n }\n catch (Exception e) \n { \n e.printStackTrace(); \n }\n }\n }\n return connection;\n }",
"public interface ISQLiteOpenHelper {\n\n ISQLiteDatabase openForWriting();\n\n String getDatabasePath();\n\n boolean deleteDatabase();\n\n void close();\n\n}",
"private void connect() {\n try {\n Class.forName(\"org.sqlite.JDBC\");\n this.conn = DriverManager.getConnection(\"jdbc:sqlite:settings.db\");\n } catch (ClassNotFoundException | SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n }\n }",
"public void init() {\r\n\t\tdbVersion = new DBVersion( getDefaultDatabase(), progress, upgradeFile.versionTableName, upgradeFile.logTableName );\r\n\t}",
"public SqliteModelFactoryImpl()\n {\n super();\n }",
"@Override\n\tpublic void initDemoDB() {\n\t}",
"private static void initializeDatabase()\n\t{\n\t\tResultSet resultSet = dbConnect.getMetaData().getCatalogs();\n\t\tStatment statement = dbConnect.createStatement();\n\t\t\n\t\tif (resultSet.next())\n\t\t{\n\t\t\tstatement.execute(\"USE \" + resultSet.getString(1));\n\t\t\tstatement.close();\n\t\t\tresultSet.close();\n\t\t\treturn; //A database exists already\n\t\t}\n\t\tresultSet.close();\n\t\t//No database exists yet, create it.\n\t\t\n\t\tstatement.execute(\"CREATE DATABASE \" + dbName);\n\t\tstatement.execute(\"USE \" + dbName);\n\t\tstatement.execute(createTableStatement);\n\t\tstatement.close();\n\t\treturn;\n\t}",
"public boolean initStore(String dbname) {\n return true;\n }",
"public boolean initDB() {\n System.out.println(\"initDB\");\n\n boolean initOK = false;\n\n String s;\n StringBuilder sb = new StringBuilder();\n\n try {\n FileReader fr = new FileReader(new File(\"resources\\\\initDB.sql\"));\n BufferedReader br = new BufferedReader(fr);\n\n while ((s = br.readLine()) != null) {\n sb.append(s);\n }\n br.close();\n\n String[] inst = sb.toString().split(\";\");\n\n Statement stmt = getConnection().createStatement();\n\n for (int i = 0, instLength = inst.length; i < instLength; i++) {\n String anInst = inst[i];\n if (!anInst.trim().equals(\"\")) {\n System.out.println(i + \": \" + anInst);\n\n try {\n stmt.executeUpdate(anInst);\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }\n }\n\n initOK = true;\n } catch (FileNotFoundException ex) {\n ex.printStackTrace();\n// throw new RuntimeException(ex);\n } catch (SQLException ex) {\n ex.printStackTrace();\n// throw new RuntimeException(ex);\n } catch (IOException ex) {\n ex.printStackTrace();\n// throw new RuntimeException(ex);\n } catch (NullPointerException ex) {\n ex.printStackTrace();\n }\n\n return initOK;\n }",
"private boolean dbCheck() {\n SQLiteDatabase db = null;\n try\n {\n String dbPath = DB_PATH + DB_NAME;\n Log.e(\"database\",\"path created \");\n Log.d(\"dbPath\", dbPath);\n db = SQLiteDatabase.openDatabase(dbPath, null, SQLiteDatabase.OPEN_READWRITE);\n Log.e(\"database\",\"open database \");\n db.setLocale(Locale.getDefault());\n Log.e(\"database\",\"set locale \");\n db.setVersion(1);\n Log.e(\"database\",\"version set\");\n }catch (SQLiteException e)\n {\n e.printStackTrace();\n Log.d(\"SQLHelper\", \"couldnt find database\");\n\n }\n if (db !=null)\n {\n db.close();\n }\n return db != null ? true : false;\n }",
"public static void connect() {\n\n\t\t/* Where the last part is the name of the database file */\n\t\tString database = \"jdbc:sqlite:plugins/PvPTeleport/PvPTeleport.sqlite\";\n\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t\tconn = DriverManager.getConnection(database);\n\n\t\t\tStatement st = conn.createStatement();\n\n\t\t\t/* Get database version */\n\t\t\tResultSet rs = st.executeQuery(\"PRAGMA user_version;\");\n\n\t\t\trs.next();\n\t\t\tint user_version = rs.getInt(\"user_version\");\n\n\t\t\trs.close();\n\n\t\t\tswitch (user_version) {\n\n\t\t\t/* Database is brand new. Create tables */\n\t\t\tcase 0: {\n\t\t\t\tPvPTeleport.instance.getLogger().info(\"Database not yet created. Creating ...\");\n\t\t\t\tString query = \"CREATE TABLE worldlocs \" // Player locations in the 'world' world. Used when players teleport to both deathban world and pvpworld\n\t\t\t\t\t\t+ \"(id INTEGER PRIMARY KEY AUTOINCREMENT,\"\n\t\t\t\t\t\t+ \"uuid BLOB,\"\n\t\t\t\t\t\t+ \"x INT,\"\n\t\t\t\t\t\t+ \"y INT,\"\n\t\t\t\t\t\t+ \"z INT);\"\n\n\t\t\t\t\t\t+ \"CREATE TABLE deathbanlocs\" // Player locations in the deathban world. Used when players teleport out of deathban world.\n\t\t\t\t\t\t+ \"(id INTEGER PRIMARY KEY AUTOINCREMENT,\"\n\t\t\t\t\t\t+ \"uuid BLOB,\"\n\t\t\t\t\t\t+ \"x INT,\"\n\t\t\t\t\t\t+ \"y INT,\"\n\t\t\t\t\t\t+ \"z INT);\"\n\n\t\t\t\t\t\t+ \"CREATE TABLE deathbandata\" // Data for each player in the current deathban tournament.\n\t\t\t\t\t\t+ \"(id INTEGER PRIMARY KEY AUTOINCREMENT,\"\n\t\t\t\t\t\t+ \"uuid BLOB,\"\n\t\t\t\t\t\t+ \"points INT,\" // 1 point = 1 kill.\n\t\t\t\t\t\t+ \"status INT);\"; // 0 = not dead. 1 = dead.\n\t\t\t\tst.executeUpdate(query);\n\t\t\t\tquery = \"PRAGMA user_version = 1;\";\n\t\t\t\tst.executeUpdate(query);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tst.close();\n\n\t\t} catch ( Exception e ) {\n\t\t\tPvPTeleport.instance.getLogger().info(e.getMessage() );\n\t\t\treturn;\n\t\t}\n\n\t}",
"private boolean checkDataBase() {\n// boolean checkDB = false;\n File dbfile = null;\n try {\n String myPath = DBLOCATION + DBNAME;\n dbfile = new File(myPath);\n// checkDB = dbfile.exists();\n } catch (SQLiteException e) {\n }\n// return checkDB;\n return dbfile.exists();\n }",
"public void testCreateDb() throws Throwable {\n final HashSet<String> tableNameHashSet = new HashSet<String>();\n tableNameHashSet.add(MovieContract.MovieEntry.TABLE_NAME);\n tableNameHashSet.add(MovieContract.TrailerEntry.TABLE_NAME);\n\n mContext.deleteDatabase(MovieDBHelper.DATABASE_NAME);\n SQLiteDatabase db = new MovieDBHelper(\n this.mContext).getWritableDatabase();\n assertEquals(true, db.isOpen());\n\n // have we created the tables we want?\n Cursor c = db.rawQuery(\"SELECT name FROM sqlite_master WHERE type='table'\", null);\n\n assertTrue(\"Error: This means that the database has not been created correctly\",\n c.moveToFirst());\n\n // verify that the tables have been created\n do {\n tableNameHashSet.remove(c.getString(0));\n } while (c.moveToNext());\n\n // if this fails, it means that your database doesn't contain both the location entry\n // and weather entry tables\n assertTrue(\"Error: Your database was created without both the location entry and weather entry tables\",\n tableNameHashSet.isEmpty());\n\n // now, do our tables contain the correct columns?\n c = db.rawQuery(\"PRAGMA table_info(\" + MovieContract.MovieEntry.TABLE_NAME + \")\",\n null);\n\n assertTrue(\"Error: This means that we were unable to query the database for table information.\",\n c.moveToFirst());\n\n // Build a HashSet of all of the column names we want to look for\n final HashSet<String> movieColumnHashSet = new HashSet<String>();\n movieColumnHashSet.add(MovieContract.MovieEntry._ID);\n movieColumnHashSet.add(MovieContract.MovieEntry.COLUMN_MOVIE_ID);\n movieColumnHashSet.add(MovieContract.MovieEntry.COLUMN_MOVIE_TITLE);\n movieColumnHashSet.add(MovieContract.MovieEntry.COLUMN_MOVIE_POSTER);\n movieColumnHashSet.add(MovieContract.MovieEntry.COLUMN_PLOT_SYNOPSIS);\n movieColumnHashSet.add(MovieContract.MovieEntry.COLUMN_RELEASE_YEAR);\n movieColumnHashSet.add(MovieContract.MovieEntry.COLUMN_USER_RATING);\n movieColumnHashSet.add(MovieContract.MovieEntry.COLUMN_LENGTH);\n\n int columnNameIndex = c.getColumnIndex(\"name\");\n do {\n String columnName = c.getString(columnNameIndex);\n movieColumnHashSet.remove(columnName);\n } while (c.moveToNext());\n\n // if this fails, it means that your database doesn't contain all of the required location\n // entry columns\n assertTrue(\"Error: The database doesn't contain all of the required location entry columns\",\n movieColumnHashSet.isEmpty());\n db.close();\n }",
"public SQLiteHandler(Context context) {\n\n super(context, DATABASE_NAME, null, DATABASE_VERSION);\n }",
"public static Connection connectToDB(){\n Connection c = null;\n try {\n Class.forName(\"org.sqlite.JDBC\");\n c = DriverManager.getConnection(\"jdbc:sqlite:C:\\\\Users\\\\abbas\\\\Documents\\\\NetBeansProjects\\\\Plookify\\\\build\\\\classes\\\\Abbas\\\\plookifyDB.sqlite\");\n c.setAutoCommit(false);\n System.out.println(\"Opened database successfully\");\n } catch ( Exception e ) {\n System.err.println( e.getClass().getName() + \": \" + e.getMessage() );\n }\n //System.out.println(\"Opened database successfully\");\n return c;\n }",
"public boolean initializeDB() {\n return false;\n }",
"void smem_init_db() throws SoarException, SQLException, IOException\n {\n smem_init_db(false);\n }",
"public synchronized static SQLiteStorage build(Context context) {\n if (instance == null) {\n // Note: context is used for the paths to the DB. It should not matter which view\n // of the app calls the bulld() method first.\n instance = new SQLiteStorage(context);\n Log.i(TAG, \"Created SQLiteStorage for context \" + context);\n }\n Log.i(TAG, \"Using SQLiteStorage in context \" + context);\n return instance;\n }",
"@Test\n\tpublic void convertingWithNullDatabaseFileNameTest()\n\t{\n\t\t/*try\n\t\t {\n\t\t OsmXmlToSQLiteDatabaseConverter converter = new OsmXmlToSQLiteDatabaseConverter();\n\t\t converter.convert(IOTester.TEST_FILE_NAME, null, new TestMapObjectsIdentifiersFinder());\n\t\t fail();\n\t\t }\n\t\t catch (IllegalArgumentException ex)\n\t\t {\n\t\t // ok\n\t\t }*/\n\t}",
"public int maDBOpen(String path)\n \t{\n \t\ttry\n \t\t{\n \t\t\tMoDatabase database = MoDatabase.create(path);\n \t\t\t++mDatabaseCounter;\n \t\t\taddDatabase(mDatabaseCounter, database);\n \t\t\treturn mDatabaseCounter;\n \t\t}\n \t\tcatch (SQLiteException ex)\n \t\t{\n \t\t\tlogStackTrace(ex);\n \t\t\treturn MA_DB_ERROR;\n \t\t}\n \t}",
"public void open() {\n dbHelper = new DatabaseHelper(context);\n sqLiteDatabase = dbHelper.getWritableDatabase();\n }",
"public void initializeDataBase() {\r\n\r\n\r\n\r\n\t\tgetWritableDatabase();\r\n\t\tLog.e(\"DBHelper initializeDataBase \", \"Entered\");\r\n\t\tcreateDatabase = true;\r\n\t\tif (createDatabase) {\r\n\t\t\tLog.e(\"DBHelper createDatabase \", \"true\");\r\n\t\t\t/*\r\n\t\t\t * If the database is created by the copy method, then the creation\r\n\t\t\t * code needs to go here. This method consists of copying the new\r\n\t\t\t * database from assets into internal storage and then caching it.\r\n\t\t\t */\r\n\t\t\ttry {\r\n\t\t\t\t/*\r\n\t\t\t\t * Write over the empty data that was created in internal\r\n\t\t\t\t * storage with the one in assets and then cache it.\r\n\t\t\t\t */\r\n\t\t\t\tcopyStream(DB_PATH_IN, new FileOutputStream(DB_PATH));\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) \r\n\t\t\t{\r\n\t\t\t\tthrow new Error(\"Error copying database\");\r\n\t\t\t}\r\n\t\t} \r\n\t\telse if (upgradeDatabase) \r\n\t\t{\r\n\t\t\tLog.e(\"DBHelper upgradeDatabase \", \"true\");\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t/*\r\n\t\t\t\t * Write over the empty data that was created in internal\r\n\t\t\t\t * storage with the one in assets and then cache it.\r\n\t\t\t\t */\r\n\t\t\t\tcopyStream(DB_PATH_IN, new FileOutputStream(DB_PATH));\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tthrow new Error(\"Error copying database\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tLog.e(\"DBHelper clear \", \"true\");\r\n\t}",
"public void testCreateDb() throws Throwable {\n final HashSet<String> tableNameHashSet = new HashSet<String>();\n tableNameHashSet.add(MoviesContract.MovieEntry.TABLE_NAME);\n //Add all the remaining tables\n\n //mContext.deleteDatabase(MoviesDbHelper.DATABASE_NAME);\n SQLiteDatabase db = new MoviesDbHelper(\n this.mContext).getWritableDatabase();\n assertEquals(true, db.isOpen());\n\n // have we created the tables we want?\n Cursor c = db.rawQuery(\"SELECT name FROM sqlite_master WHERE type='table'\", null);\n\n assertTrue(\"Error: This means that the database has not been created correctly\",\n c.moveToFirst());\n\n // verify that the tables have been created\n do {\n tableNameHashSet.remove(c.getString(0));\n } while( c.moveToNext() );\n\n // if this fails, it means that your database doesn't contain both the movie entry\n // and weather entry tables\n assertTrue(\"Error: Your database was created without the movie entry tables\",\n tableNameHashSet.isEmpty());\n\n // now, do our tables contain the correct columns?\n c = db.rawQuery(\"PRAGMA table_info(\" + MoviesContract.MovieEntry.TABLE_NAME + \")\",\n null);\n\n assertTrue(\"Error: This means that we were unable to query the database for table information.\",\n c.moveToFirst());\n\n // Build a HashSet of all of the column names we want to look for\n final HashSet<String> movieColumnHashSet = new HashSet<String>();\n movieColumnHashSet.add(MoviesContract.MovieEntry._ID);\n movieColumnHashSet.add(MoviesContract.MovieEntry.COLUMN_THEMOVIEDB_ID);\n movieColumnHashSet.add(MoviesContract.MovieEntry.COLUMN_SORTBY_SETTING);\n movieColumnHashSet.add(MoviesContract.MovieEntry.COLUMN_ORIGINAL_TITLE);\n movieColumnHashSet.add(MoviesContract.MovieEntry.COLUMN_POSTER_PATH);\n movieColumnHashSet.add(MoviesContract.MovieEntry.COLUMN_OVERVIEW);\n movieColumnHashSet.add(MoviesContract.MovieEntry.COLUMN_VOTE_AVERAGE);\n movieColumnHashSet.add(MoviesContract.MovieEntry.COLUMN_RELEASE_DATE);\n\n int columnNameIndex = c.getColumnIndex(\"name\");\n do {\n String columnName = c.getString(columnNameIndex);\n movieColumnHashSet.remove(columnName);\n } while(c.moveToNext());\n\n // if this fails, it means that your database doesn't contain all of the required movie\n // entry columns\n assertTrue(\"Error: The database doesn't contain all of the required movie entry columns\",\n movieColumnHashSet.isEmpty());\n db.close();\n }",
"@Override\n\tpublic void CreateDatabaseFromFile() {\n\t\tfinal String FILENAME = \"fandv.sql\";\n\t\tint[] updates = null;\n\t\ttry {\n\t\t\tMyDatabase db = new MyDatabase();\n\t\t\tupdates = db.updateAll(FILENAME);\n\t\t} catch (FileNotFoundException | SQLException | ClassNotFoundException e) {\n\t\t\tSystem.out.println(\"Database issue\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < updates.length; i++) {\n\t\t\tsum += updates[i];\n\t\t}\n\t\tSystem.out.println(\"Number of updates: \" + sum);\n\t}",
"private void copyDataBase() throws IOException {\n InputStream myInput = this.getAssets().open(\"nes.sqlite\");\n // Path to the just created empty db\n\n String outFileName = getApplicationInfo().dataDir + \"/databases/\" + \"nes.sqlite\";\n //String outFileName = \"/data/data/\" +getApplicationContext().getPackageName() + \"/databases/\" + \"nes.sqlite\";\n // Open the empty db as the output stream\n OutputStream myOutput = new FileOutputStream(outFileName);\n // transfer bytes from the inputfile to the outputfile\n byte[] buffer = new byte[1024];\n int length;\n while ((length = myInput.read(buffer)) > 0) {\n myOutput.write(buffer, 0, length);\n\n }\n // Close the streams\n myOutput.flush();\n myOutput.close();\n myInput.close();\n //Toast toast = Toast.makeText(getApplicationContext(),\n // \"Creating nes database\",\n // Toast.LENGTH_SHORT);\n //toast.show();\n }",
"public void open() {\n db = dbHelper.getWritableDatabase();\n articleDAO.open(db);\n categoryDAO.open(db);\n sourceDAO.open(db);\n }",
"public interface ContextSQLiteAware {\r\n SQLiteDatabase getContextDB();\r\n}",
"private void openDB()\r\n \t{\n \t\tif ( lootDB != null )\r\n \t\t\treturn;\r\n \t\t\r\n \t\ttry\r\n \t\t{\r\n \t\t\tlootDB = SQLiteDatabase.openDatabase( DB_PATH, null, SQLiteDatabase.OPEN_READWRITE );\r\n \t\t\tif ( lootDB.needUpgrade( DB_VERSION ) )\r\n \t\t\t\tif ( !this.upgradeDB( DB_VERSION ) )\r\n \t\t\t\t\tlootDB = null;\r\n \t\t}\r\n \t\t// catch SQLiteException if the database doesn't exist, then create it\r\n \t\tcatch (SQLiteException sqle)\r\n \t\t{\r\n \t\t\ttry\r\n \t\t\t{\r\n \t\t\t\tlootDB = SQLiteDatabase.openOrCreateDatabase( DB_PATH, null);\r\n \t\t\t\tif ( !createDB(lootDB) )\r\n \t\t\t\t\tlootDB = null;\r\n \t\t\t}\r\n \t\t\t// something went wrong creating the database\r\n \t\t\tcatch ( SQLiteException e )\r\n \t\t\t{\r\n \t\t\t\tlootDB = null;\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\t// throw an exception if we've made it through the try/catch block\r\n \t\t// and the database is still not opened\r\n \t\tif ( lootDB == null )\r\n \t\t{\r\n \t\t\tthrow new SQLException( \"Database could not be opened\" );\r\n \t\t}\r\n \t}",
"public SqliteDatabase(Context context) {\n super(context, databaseName, null, 2);\n SQLiteDatabase db = this.getWritableDatabase();\n\n // context.deleteDatabase(databaseName);\n }",
"public void copyDatabaseFromAsset() {\n\n /** Just to calculate time How much it will take to copy database */\n //Utility t = new Utility();\n\n\t\t/* Insert Database */\n DBHelper db = new DBHelper(this);\n\n try {\n boolean dbExist = db.isDataBaseAvailable();\n\n if (!dbExist)\n db.copyDataBaseFromAsset();\n\n /* Force fully calling onCreate to create table of Favourite*/\n //db.onCreate(db.getWritableDatabase());\n\n } catch (Exception e) {\n AppLogger.writeLog(\"state \" + TAG + \" -- \" + e.toString());\n\n if (AppConstants.DEBUG)\n Log.e(\"\", e.toString());\n }\n }",
"@Override\n\tpublic Database createDatabase(Type type) throws FSException {\n\t\treturn new DummyDatabase();\n\t}",
"public void onCreate(SQLiteDatabase db) {\n Cursor cursor = db.rawQuery(\n \"SELECT name FROM sqlite_master \" +\n \"WHERE type='table' AND name='\" +\n SymptomCheckinTable.TABLE_NAME + \"' \", null);\n try {\n if (cursor.getCount()==0) {\n db.execSQL(SymptomCheckinTable.DATABASE_CREATE);\n db.execSQL(MedicationIntakeTable.DATABASE_CREATE);\n }\n }\n finally {\n cursor.close();\n }\n }",
"public static void InitializeDatabase() throws SQLException {\n dataSource = new SQLiteConnectionPoolDataSource();\n dataSource.setUrl(\"jdbc:sqlite:application.db\");\n\n // Optional Configuration Settings\n org.sqlite.SQLiteConfig config = new org.sqlite.SQLiteConfig();\n config.enforceForeignKeys(true);\n config.enableLoadExtension(true);\n dataSource.setConfig(config);\n\n connectionPool = dataSource.getPooledConnection();\n }",
"public SQLiteDatabase openDatabaseSafe() {\n SQLiteDatabase db = null;\n try {\n db = SQLiteDatabase.openDatabase(DB_PATH, null, SQLiteDatabase.OPEN_READONLY);\n } catch(SQLiteException e){\n Log.i(TAG, \"Error: could not open database.\", e);\n }\n return db;\n }",
"@Override\n public boolean onCreate() {\n myOpenHelper = new MySQLiteOpenHelper(getContext(),\n MySQLiteOpenHelper.DATABASE_NAME, null, \n MySQLiteOpenHelper.DATABASE_VERSION);\n \n return true;\n }",
"private boolean checkDataBase() {\r\n SQLiteDatabase checkDB = null;\r\n try {\r\n checkDB = SQLiteDatabase.openDatabase(\"/data/data/me.shubhamgoswami.adharshilasurvey/adharShila.db\", null,\r\n SQLiteDatabase.OPEN_READONLY);\r\n checkDB.close();\r\n } catch (SQLiteException e) {\r\n // database doesn't exist yet.\r\n }\r\n return checkDB != null;\r\n }",
"private void openDatabase() {\r\n SearchHelper = new DBHelper(this);\r\n }",
"public static void useTempFileDatabase() {\n\t\tsetDatabaseMap(TempFileDatabaseMap.class);\n\t}",
"DataBase createDataBase();",
"@Override\n public Database getAndInitialize() throws IOException {\n Database database = Databases.createPostgresDatabaseWithRetry(\n username,\n password,\n connectionString,\n isDatabaseConnected(databaseName));\n\n new ExceptionWrappingDatabase(database).transaction(ctx -> {\n boolean hasTables = tableNames.stream().allMatch(tableName -> hasTable(ctx, tableName));\n if (hasTables) {\n LOGGER.info(\"The {} database has been initialized\", databaseName);\n return null;\n }\n LOGGER.info(\"The {} database has not been initialized; initializing it with schema: {}\", databaseName, initialSchema);\n ctx.execute(initialSchema);\n return null;\n });\n\n return database;\n }",
"public static LocalDatabase dbSetup(String name)\n\t{\n\t\tLocalDatabase local = new LocalDatabase(name);\n\t\tlocal.loadDriver();\n\t\tlocal.openConnection();\n\t\tlocal.createTablePersons();\n\t\tlocal.createTableListenings();\n\t\tlocal.createTableRecordings();\n\t\tlocal.closeConnection();\n\t\treturn local;\n\t}",
"private void onCreate() {\n\n\n if (!db.hasTable(DbTables.PLAYER)) {\n db.execSQL(CREATE_PLAYER_TABLE);\n }\n\n if (!db.hasTable(DbTables.SHIP)) {\n db.execSQL(CREATE_SHIP_TABLE);\n }\n\n if (!db.hasTable(DbTables.CARGO)) {\n db.execSQL(CREATE_CARGO_TABLE);\n }\n }",
"public void dbConnection()\n {\n\t try {\n\t \t\tClass.forName(\"org.sqlite.JDBC\");\n // userName=rpanel.getUserName();\n String dbName=userName+\".db\";\n c = DriverManager.getConnection(\"jdbc:sqlite:database/\"+dbName);\n }\n //catch the exception\n catch ( Exception e ) \n { \n System.err.println( \"error in catch\"+e.getClass().getName() + \": \" + e.getMessage() );\n System.exit(0);\n }\n\t if(c!=null)\n\t {\n System.out.println(\"Opened database successfully\");\n\t System.out.println(c);\n createData();\n\t}\n }",
"private void initConfig() throws DatabaseAccessException {\n\t\tStatement stmt = null;\n\n\t\ttry {\n\t\t\tstmt = this.connection.createStatement();\n\n\t\t\t// With synchronous OFF, SQLite continues without syncing\n\t\t\t// as soon as it has handed data off to the operating system.\n\t\t\tstmt.execute(\"PRAGMA synchronous = OFF;\");\n\n\t\t\t// The MEMORY journaling mode stores the rollback journal in volatile RAM.\n\t\t\t// This saves disk I/O but at the expense of database safety and integrity.\n\t\t\tstmt.execute(\"PRAGMA journal_mode = MEMORY;\");\n\n\t\t\t// The journal_size_limit pragma may be used to limit the size of rollback-journal.\n\t\t\t// -1 means no limit.\n\t\t\tstmt.execute(\"PRAGMA journal_size_limit = -1;\");\n\n\t\t\t// If the argument N is negative, then the number of cache pages\n\t\t\t// is adjusted to use approximately N*1024 bytes of memory.\n\t\t\tstmt.execute(\"PRAGMA cache_size = -50000;\");\n\n\t\t\t// Once an encoding has been set for a database, it cannot be changed.\n\t\t\tstmt.execute(\"PRAGMA encoding = \\\"UTF-8\\\";\");\n\n\t\t\t// When temp_store is MEMORY temporary tables and indices are kept\n\t\t\t// in as if they were pure in-memory databases memory.\n\t\t\tstmt.execute(\"PRAGMA temp_store = MEMORY;\");\n\n\t\t\tstmt.close();\n\n\t\t} catch (SQLException e) {\n\t\t\tthrow new DatabaseAccessException(Failure.CONFIG);\n\t\t}\n\t}",
"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 }",
"public void open() {\n this.db = this.mSqlHelper.getWritableDatabase();\n }",
"private void getDatabase(){\n\n }",
"private void copyDatabase() throws IOException {\n // Open your local database as the input stream\n InputStream inputStream = mContext.getAssets().open(DB_NAME);\n try {\n // Path to the newly created empty database\n String outFileName = DB_PATH + DB_NAME;\n OutputStream outputStream = new FileOutputStream(outFileName);\n try {\n // Transfer bytes from input file to output file\n byte[] buffer = new byte[1024];\n int len;\n while ((len = inputStream.read(buffer)) > 0) {\n outputStream.write(buffer, 0, len);\n }\n outputStream.flush();\n } finally {\n outputStream.close();\n }\n } finally {\n inputStream.close();\n }\n }",
"@Override\n public void onCreate(SQLiteDatabase db) {\n db.execSQL(\n \"create table notes \" +\n \"(id integer primary key autoincrement, \" +\n \"unit text,version interger,content blob)\"\n );\n }",
"SimpleDatabaseHelper(Context context) {\n _openHelper = new SimpleSQLiteOpenHelper(context);\n }",
"public Dataset openTDB(String directory){\n Dataset dataset = TDBFactory.createDataset(directory);\n return dataset;\n}"
] | [
"0.64703035",
"0.64495844",
"0.644251",
"0.6418665",
"0.6382899",
"0.62805676",
"0.6230859",
"0.61717254",
"0.61601835",
"0.61522526",
"0.6130959",
"0.6099755",
"0.6096142",
"0.60049766",
"0.5998406",
"0.5988261",
"0.5980787",
"0.59629756",
"0.5958582",
"0.59373903",
"0.59294677",
"0.59283805",
"0.59259033",
"0.59223527",
"0.5917402",
"0.5904218",
"0.5889678",
"0.58853114",
"0.5881754",
"0.587182",
"0.5863429",
"0.58451056",
"0.58259517",
"0.582029",
"0.57959884",
"0.57930166",
"0.578254",
"0.5779424",
"0.5776939",
"0.57768065",
"0.5773636",
"0.57727426",
"0.5752265",
"0.57417256",
"0.5735453",
"0.57284373",
"0.5727716",
"0.57276535",
"0.57267374",
"0.57244796",
"0.57108593",
"0.5710727",
"0.57098454",
"0.57057285",
"0.57033056",
"0.56974643",
"0.5666191",
"0.5658332",
"0.5657665",
"0.5656606",
"0.5627165",
"0.5619648",
"0.56172067",
"0.5612054",
"0.5610018",
"0.5605963",
"0.5603188",
"0.5599664",
"0.55961895",
"0.5593111",
"0.5575913",
"0.55719846",
"0.5570008",
"0.55672836",
"0.5562434",
"0.5546277",
"0.5541893",
"0.55262566",
"0.5524668",
"0.5521412",
"0.55211675",
"0.5501537",
"0.5497955",
"0.54973364",
"0.5492204",
"0.5488561",
"0.5485663",
"0.5474473",
"0.54556817",
"0.54532367",
"0.5452495",
"0.54524946",
"0.54524714",
"0.5451028",
"0.5444507",
"0.5440757",
"0.54400533",
"0.54394424",
"0.54347056",
"0.5432129",
"0.5431801"
] | 0.0 | -1 |
Can apparently only happen in TextChannels (guilds). | @Override
public void onMessageBulkDelete(MessageBulkDeleteEvent event)
{
//These are provided with every event in JDA
JDA jda = event.getJDA(); //JDA, the core of the api.
long serverId = event.getGuild().getIdLong();
long channelId = event.getChannel().getIdLong();
boolean declaredLoggableHit = false;
for (DiscordMonitorTargetIdentifier targetid : DiscordMonitor.this.appconfig.logTargets)
{
if (!targetid.matches(serverId, channelId, null, null, null, MessageEventType.DELETE))
continue;
// All conditions passed.
if (!declaredLoggableHit)
{
declaredLoggableHit = true;
System.out.print("(i) Logging for:");
}
System.out.print(" " + targetid.identifierLabel);
}
if (declaredLoggableHit)
System.out.println();
boolean declaredNotificationHit = false;
for (DiscordMonitorTargetIdentifier targetid : DiscordMonitor.this.appconfig.notificationWatchlist)
{
if (!targetid.matches(serverId, channelId, null, null, null, MessageEventType.DELETE))
continue;
// All conditions passed.
if (!declaredNotificationHit)
{
declaredNotificationHit = true;
System.out.print("/!\\ WATCHLIST HIT:");
}
System.out.print(" " + targetid.identifierLabel);
}
if (declaredNotificationHit)
System.out.println();
StringBuilder msg = new StringBuilder("\n")
.append("Time: ").append(OffsetDateTime.now().format(DiscordMonitor.LOG_DATETIME_FORMAT)).append(" (approximate)")
.append("\nMESSAGES DELETED:");
for (String msgId : event.getMessageIds())
msg.append(" ").append(msgId);
//TODO Poll .sqlite db for previous message details
TextChannel textChannel = (TextChannel)event.getChannel();
System.out.printf("(%s)[%s]: %s\n\n", textChannel.getGuild().getName(), textChannel.getName(), msg);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getChannel();",
"@Override\n\tprotected void channelRead0(ChannelHandlerContext ctx, WsClientMessage msg) throws Exception {\n\t}",
"@Override\n public void channelActive(ChannelHandlerContext ctx) throws Exception {\n super.channelActive(ctx);\n \n }",
"@Override\n\tpublic void channelParted(String channel) {\n\t}",
"public Channel method_4121() {\n return null;\n }",
"protected boolean processChannelTell(String username, String titles, int channelNumber, String message){return false;}",
"@Override\n public void channelActive(ChannelHandlerContext ctx) throws Exception {\n }",
"@Override\r\n\tpublic void onChannelSuccess() {\n\t\t\r\n\t}",
"public Channel method_4090() {\n return null;\n }",
"@Override\n public void channelActive(final ChannelHandlerContext ctx) throws UnknownHostException {\n System.err.println(\"处于活连接\");\n //ctx.writeAndFlush(\"Welcome to secure chat service!\\n\");\n }",
"@Override\n public void onGuildMessageReceived(@NotNull GuildMessageReceivedEvent event) {\n if (event.getAuthor().isBot() ||\n !event.getMessage().getType().equals(MessageType.DEFAULT)) return; // Bot messages will be ignored\n String args[] = event.getMessage().getContentRaw().split(\"\\\\s+\");\n\n switch (args[0].replace(Settings.COMMAND_PREFIX, \"\")){\n case \"youtube\":\n Color c = Settings.getConferenceColor(event.getChannel().getParent());\n event.getChannel().sendMessage(new EmbedBuilder()\n .setTitle(\"Youtube \" + Settings.CONFERENCE_NAME, Settings.YOUTUBE)\n .setColor(c).build()).queue();\n break;\n case \"stream\":\n case \"live\":\n // Display the current live stream depending on the current track\n event.getChannel().sendMessage(makeYoutubeLive(event.getChannel().getParent())).queue();\n if (event.getChannel().getParent().getId().equals(Settings.CATEGORY_BOT_ID) && args.length == 3){\n switch (args[1].toLowerCase()){\n case \"gcpr\":\n Settings.STREAM_URL[0] = args[2];\n System.out.println(\"[GCPR STREAM] Updated\");\n break;\n case \"vmv\":\n Settings.STREAM_URL[1] = args[2];\n System.out.println(\"[VMV STREAM] Updated\");\n break;\n case \"vcbm\":\n Settings.STREAM_URL[2] = args[2];\n System.out.println(\"[VCBM STREAM] Updated\");\n break;\n case \"joint\":\n Settings.STREAM_URL[3] = args[2];\n System.out.println(\"[JOINT STREAM] Updated\");\n break;\n default:\n break;\n }\n\n }\n break;\n case \"program\":\n case \"programm\": // Yes I often misspelled it during dev\n // Show a link to the program page\n event.getChannel().sendMessage(new EmbedBuilder()\n .setTitle(\"Program :alarm_clock:\", Settings.PROGRAMM)\n .setColor(Settings.getConferenceColor(event.getChannel().getParent()))\n .build()).queue();\n break;\n case \"web\":\n // Display Conference Web presence\n event.getChannel().sendMessage(new EmbedBuilder()\n .setTitle(\"Conference Website :desktop:\", Settings.URL)\n .setColor(Settings.getConferenceColor(event.getChannel().getParent()))\n .build()).queue();\n break;\n case \"ping\":\n // This is the mighty debug command\n //if(!event.getChannel().getParent().getId().equals(Settings.CATEGORY_BOT_ID)) break; // Comment in after first `!ping`\n event.getChannel().sendMessage(\"pong!\").queue();\n debugMessage(event);\n break;\n case \"channels\":\n // Sends a list of active channels with links to the Channel that issued the command\n if(!event.getChannel().getParent().getId().equals(Settings.CATEGORY_BOT_ID)) break;\n printChannels(event);\n break;\n case \"help\":\n case \"commands\":\n // Show a list of the above mentioned commands\n EmbedBuilder embed = new EmbedBuilder().setTitle(\":bulb: Commands / Help\")\n .setDescription(\"The following commands can be used in the text-channels.\\n\" +\n \"*speaker and chair roles are assigned through direct messages to @ConferenceBot*\")\n .setColor(Settings.getConferenceColor(event.getChannel().getParent()))\n .addField(\"`!program`\", \"Link to programm on the conference website.\", false)\n .addField(\"`!web`\", \"Conference website\", false)\n .addField(\"`!stream` / `!live`\", \"Link to youtube livestream\", false)\n .addField(\"`!youtube`\", \"Link to Conference YouTube channel\", false)\n .addField(\"`!help` / `!commands`\", \"Displays this message\", false);\n if (event.getChannel().getParent().getId().equals(Settings.CATEGORY_BOT_ID)) {\n embed.addBlankField(false)\n .addField(\"`!{stream|live} {gcpr|vmv|vcbm|joint} $StreamLink`\",\n \"Change Link to respective live String\", false)\n .addField(\"`!ping`\", \"Prints extensive debug message to CLI\", false)\n .addField(\"`!channels`\",\n \"Sends and prints all channel names and channel links as \" +\n \"text message to channel of origin (just Bot dev) and to CLI\", false);\n }\n event.getChannel().sendMessage(embed.build()).queue();\n default:\n break;\n }\n }",
"public Channel method_4112() {\n return null;\n }",
"@Override\n public int getChannel()\n {\n return channel;\n }",
"@Override\n public void channelActive(ChannelHandlerContext ctx) {\n ctx.writeAndFlush(Unpooled.copiedBuffer(\"Netty rocks!\", CharsetUtil.UTF_8));\n }",
"private void printChannels(GuildMessageReceivedEvent event) {\n // All hail the LAMBDA!\n event.getGuild().getCategories().forEach(category -> {\n System.out.println(category.getName());\n event.getChannel().sendMessage(category.getName()).queue();\n category.getChannels().forEach(guildChannel -> {\n if (guildChannel.getType().equals(ChannelType.TEXT)){\n System.out.println(guildChannel.getName() +\n \":\\thttps://www.discord.com/channels/\" + category.getGuild().getId() + \"/\" + guildChannel.getId());\n event.getChannel().sendMessage(guildChannel.getName() +\n \":\\thttps://www.discord.com/channels/\" + category.getGuild().getId() + \"/\" + guildChannel.getId()).queue();\n }});\n });\n }",
"public int GetChannel();",
"@Override\n\tpublic void onMessage(CommandMessage msg) {\n\t}",
"@Override\n public void execute(Guild guild, User author, MessageChannel channel, String message) {\n BotUtils.CLIENT.getGuildById(Snowflake.of(message.split(\" \", 2)[1])).block().leave().block();\n }",
"protected void onPart(String channel, String sender, String login, String hostname) {}",
"@Override\n public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) {\n Channel channel = ctx.getChannel();\n //session.setAttachment(new Player(session));\n Client client = new Client(channel);\n channel.setAttachment(client);\n engine.addClient(client);\n }",
"@Override\n public void channelActive(ChannelHandlerContext ctx) throws Exception {\n ctx.write(\"Welcome to \" + InetAddress.getLocalHost().getHostName() + \"!\\r\\n\");\n ctx.write(\"It is \" + new Date() + \" now.\\r\\n\");\n ctx.flush();\n }",
"EzyChannel getChannel();",
"@Override\n public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {\n\n log.info( ctx.channel().id().asLongText()+\"-> channelRead , msg={}\" , msg.getClass().getName());\n\n ctx.fireChannelRead( msg ) ;\n }",
"@Override\n\tpublic void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {\n\t\tLog.i(\"channelRead\", ((String) msg));\n\t\tsuper.channelRead(ctx, msg);\n\t}",
"public abstract void message(String channel, String message);",
"@Test\n\tpublic void testGetChannel() {\n\t}",
"@Override\n public void onMessageReceived(MessageReceivedEvent event)\n {\n JDA jda = event.getJDA(); //JDA, the core of the api.\n long responseNumber = event.getResponseNumber();//The amount of discord events that JDA has received since the last reconnect.\n\n //Event specific information\n User author = event.getAuthor(); //The user that sent the message\n Message message = event.getMessage(); //The message that was received.\n MessageChannel channel = event.getChannel(); //This is the MessageChannel that the message was sent to.\n // This could be a TextChannel, PrivateChannel, or Group!\n\n String msg = message.getContentDisplay(); //This returns a human readable version of the Message. Similar to\n // what you would see in the client.\n\n boolean bot = author.isBot(); //This boolean is useful to determine if the User that\n // sent the Message is a BOT or not!\n\n if (event.isFromType(ChannelType.TEXT)) //If this message was sent to a Guild TextChannel\n {\n //Because we now know that this message was sent in a Guild, we can do guild specific things\n // Note, if you don't check the ChannelType before using these methods, they might return null due\n // the message possibly not being from a Guild!\n\n Guild guild = event.getGuild(); //The Guild that this message was sent in. (note, in the API, Guilds are Servers)\n TextChannel textChannel = event.getTextChannel(); //The TextChannel that this message was sent to.\n Member member = event.getMember(); //This Member that sent the message. Contains Guild specific information about the User!\n\n String name;\n if (message.isWebhookMessage())\n {\n name = author.getName(); //If this is a Webhook message, then there is no Member associated\n } // with the User, thus we default to the author for name.\n else\n {\n name = member.getEffectiveName(); //This will either use the Member's nickname if they have one,\n } // otherwise it will default to their username. (User#getName())\n\n System.out.printf(\"(%s)[%s]<%s>: %s\\n\", guild.getName(), textChannel.getName(), name, msg);\n }\n else if (event.isFromType(ChannelType.PRIVATE)) //If this message was sent to a PrivateChannel\n {\n //The message was sent in a PrivateChannel.\n //In this example we don't directly use the privateChannel, however, be sure, there are uses for it!\n PrivateChannel privateChannel = event.getPrivateChannel();\n\n System.out.printf(\"[PRIV]<%s>: %s\\n\", author.getName(), msg);\n }\n else if (event.isFromType(ChannelType.GROUP)) //If this message was sent to a Group. This is CLIENT only!\n {\n //The message was sent in a Group. It should be noted that Groups are CLIENT only.\n Group group = event.getGroup();\n String groupName = group.getName() != null ? group.getName() : \"\"; //A group name can be null due to it being unnamed.\n\n System.out.printf(\"[GRP: %s]<%s>: %s\\n\", groupName, author.getName(), msg);\n }\n //calls specific (working) commands to call from command files\n commands.caseratis.Commands.pwing(msg, channel);\n\n commands.katekat.Commands.psing(msg, channel);\n\n commands.lwbuchanan.Commands.pzing(msg, channel);\n\n commands.notahackr.Commands.poing(msg, channel);\n\n commands.redmario.Commands.pxing(msg, channel);\n\n commands.thebriankong.Commands.paing(msg, channel);\n\n commands.thebuttermatrix.Commands.ping(msg, channel);\n commands.thebuttermatrix.Commands.countdown(msg, channel);\n commands.thebuttermatrix.Commands.pid(msg, channel);\n\n commands.raybipse.Master.messageReceived(msg, channel, event);\n }",
"@Override\n\t\t\t\t\t\tpublic void channelActive(ChannelHandlerContext ctx) {\n\t\t\t\t\t\t\tSystem.out.println(RestResult.success(\"channel active!\"));\n\t\t\t\t\t\t}",
"public ChannelConfig method_4104() {\n return null;\n }",
"public void partChannel(String channel, String reason);",
"@Override\n\tpublic void onChatReceived(ChatEvent arg0) {\n\t\t\n\t}",
"private SocketChannel getChannel(){\n if ( key == null ) {\n return getSocket().getChannel();\n } else {\n return (SocketChannel)key.channel();\n }\n }",
"@Override\n\tpublic void onCommand(CommandSender sender, String[] args) {\n\t\t\n\t}",
"@Override\n\tpublic void onCommand(CommandSender sender, String[] args) {\n\t\t\n\t}",
"@Override\n protected void initChannel (SocketChannel ch) throws Exception {\n // can utilize channel to push message to different client since one channel correspond to one client\n System.out.println(\"client socket channel hashcode = \" + ch.hashCode());\n ch.pipeline().addLast(new NettyServerHandler());\n }",
"@Override\n\tpublic void channelActive(GaoContext context) {\n\t\t\n\t}",
"private static PluginMessageRecipient getThroughWhomSendMessage() {\n\t\treturn Remain.getOnlinePlayers().isEmpty() ? Bukkit.getServer() : Remain.getOnlinePlayers().iterator().next();\n\t}",
"public Channel channel()\r\n/* 36: */ {\r\n/* 37: 68 */ return this.channel;\r\n/* 38: */ }",
"Channel channel() {\n return channel;\n }",
"@Override\n\tpublic User getChannel() {\n\t\treturn null;\n\t}",
"@Override\n\tprotected void channelRead0(ChannelHandlerContext ctx, TextWebSocketFrame frame) throws Exception\n\t{\n\t\tci.invoke(frame.text());\n\t}",
"@Override\n public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) {\n Channel ch = ctx.getChannel();\n //Player player = (Player) ch.getAttachment();\n Client client = (Client) ch.getAttachment();\n \n if (ch.isConnected()) { // && !client.getPlayer().destroyed() \n RSCPacket packet = (RSCPacket) e.getMessage();\n //player.addPacket(p); // Used to log packets for macro detection\n //engine.addPacket(p); // This one actually results in the packet being processed!\n client.pushToMessageQueue(packet);\n }\n }",
"protected void onMessage(String channel, String sender, String login, String realName, String message) {}",
"public String getChannel() {\r\n return channel;\r\n }",
"protected Channel getChannel()\n {\n return mChannel;\n }",
"public ChannelId method_4117() {\n return null;\n }",
"public int getChannelType( ) {\r\n return 1;\r\n }",
"@SideOnly(Side.CLIENT)\n private void channelTickClient()\n {\n }",
"public UTIL_SET_CHANNELS() {\n }",
"java.lang.String getChannelName();",
"public TextChannel getSupportChannel() { return supportChannel; }",
"public interface ServerTextChannel extends TextableRegularServerChannel, ServerTextChannelAttachableListenerManager {\n\n /**\n * Gets the default auto archive duration for threads that will be created in this channel.\n *\n * @return The default auto archive duration for this channel.\n */\n int getDefaultAutoArchiveDuration();\n\n /**\n * Gets the topic of the channel.\n *\n * @return The topic of the channel.\n */\n String getTopic();\n\n /**\n * Creates an updater for this channel.\n *\n * @return An updater for this channel.\n */\n default ServerTextChannelUpdater createUpdater() {\n return new ServerTextChannelUpdater(this);\n }\n\n /**\n * Updates the topic of the channel.\n *\n * <p>If you want to update several settings at once, it's recommended to use the\n * {@link ServerTextChannelUpdater} from {@link #createUpdater()} which provides a better performance!\n *\n * @param topic The new topic of the channel.\n * @return A future to check if the update was successful.\n */\n default CompletableFuture<Void> updateTopic(String topic) {\n return createUpdater().setTopic(topic).update();\n }\n\n @Override\n default Optional<ServerTextChannel> getCurrentCachedInstance() {\n return getApi().getServerById(getServer().getId()).flatMap(server -> server.getTextChannelById(getId()));\n }\n\n @Override\n default CompletableFuture<ServerTextChannel> getLatestInstance() {\n Optional<ServerTextChannel> currentCachedInstance = getCurrentCachedInstance();\n if (currentCachedInstance.isPresent()) {\n return CompletableFuture.completedFuture(currentCachedInstance.get());\n } else {\n CompletableFuture<ServerTextChannel> result = new CompletableFuture<>();\n result.completeExceptionally(new NoSuchElementException());\n return result;\n }\n }\n\n /**\n * Creates a thread for a message in this ServerTextChannel.\n *\n * @param message The message to create the thread for.\n * @param name The Thread name.\n * @param autoArchiveDuration Duration in minutes to automatically archive the thread after recent activity.\n * @return The created ServerThreadChannel.\n */\n default CompletableFuture<ServerThreadChannel> createThreadForMessage(Message message, String name,\n AutoArchiveDuration autoArchiveDuration) {\n return createThreadForMessage(message, name, autoArchiveDuration.asInt());\n }\n\n /**\n * Creates a thread for a message in this ServerTextChannel.\n *\n * @param message The message to create the thread for.\n * @param name The Thread name.\n * @param autoArchiveDuration Duration in minutes to automatically archive the thread after recent activity.\n * @return The created ServerThreadChannel.\n */\n default CompletableFuture<ServerThreadChannel> createThreadForMessage(Message message, String name,\n Integer autoArchiveDuration) {\n return new ServerThreadChannelBuilder(message, name).setAutoArchiveDuration(autoArchiveDuration).create();\n }\n\n /**\n * Creates a thread which is not related to a message.\n *\n * <p>Creating a private thread requires the server to be boosted.\n * The 3 day and 7 day archive durations require the server to be boosted.\n * The server features will indicate if that is possible for the server.\n *\n * @param channelType A ChannelType for a thread.\n * @param name The thread name.\n * @param autoArchiveDuration Duration in minutes to automatically archive the thread after recent activity.\n * @return The created ServerThreadChannel.\n */\n default CompletableFuture<ServerThreadChannel> createThread(ChannelType channelType, String name,\n Integer autoArchiveDuration) {\n return createThread(channelType, name, autoArchiveDuration, null);\n }\n\n /**\n * Creates a thread which is not related to a message.\n *\n * <p>Creating a private thread requires the server to be boosted.\n * The 3 day and 7 day archive durations require the server to be boosted.\n * The server features will indicate if that is possible for the server.\n *\n * @param channelType A ChannelType for a thread.\n * @param name The thread name.\n * @param autoArchiveDuration Duration in minutes to automatically archive the thread after recent activity.\n * @return The created ServerThreadChannel.\n */\n default CompletableFuture<ServerThreadChannel> createThread(ChannelType channelType, String name,\n AutoArchiveDuration autoArchiveDuration) {\n return createThread(channelType, name, autoArchiveDuration.asInt(), null);\n }\n\n /**\n * Creates a thread which is not related to a message.\n *\n * <p>Creating a private thread requires the server to be boosted.\n * The 3 day and 7 day archive durations require the server to be boosted.\n * The server features will indicate if that is possible for the server.\n *\n * @param channelType A ChannelType for a thread.\n * @param name The thread name.\n * @param autoArchiveDuration Duration in minutes to automatically archive the thread after recent activity.\n * @param inviteable Whether non-moderators can add other non-moderators to a thread;\n * only available when creating a private thread.\n * @return The created ServerThreadChannel.\n */\n default CompletableFuture<ServerThreadChannel> createThread(ChannelType channelType, String name,\n Integer autoArchiveDuration,\n Boolean inviteable) {\n return new ServerThreadChannelBuilder(this, channelType, name)\n .setAutoArchiveDuration(autoArchiveDuration)\n .setInvitableFlag(inviteable).create();\n }\n\n /**\n * Creates a thread which is not related to a message.\n *\n * <p>Creating a private thread requires the server to be boosted.\n * The 3 day and 7 day archive durations require the server to be boosted.\n * The server features will indicate if that is possible for the server.\n *\n * @param channelType A ChannelType for a thread.\n * @param name The thread name.\n * @param autoArchiveDuration Duration in minutes to automatically archive the thread after recent activity.\n * @param inviteable Whether non-moderators can add other non-moderators to a thread;\n * only available when creating a private thread.\n * @return The created ServerThreadChannel.\n */\n default CompletableFuture<ServerThreadChannel> createThread(ChannelType channelType, String name,\n AutoArchiveDuration autoArchiveDuration,\n Boolean inviteable) {\n return createThread(channelType, name, autoArchiveDuration.asInt(), inviteable);\n }\n\n /**\n * Gets the public archived threads.\n *\n * <p>Returns archived threads in the channel that are public.\n * When called on a SERVER_TEXT_CHANNEL, returns threads of type SERVER_PUBLIC_THREAD.\n * When called on a SERVER_NEWS_CHANNEL returns threads of type SERVER_NEWS_THREAD.\n * Threads are ordered by archive_timestamp, in descending order.\n * Requires the READ_MESSAGE_HISTORY permission.\n *\n * @return The ArchivedThreads.\n */\n default CompletableFuture<ArchivedThreads> getPublicArchivedThreads() {\n return getPublicArchivedThreads(null, null);\n }\n\n /**\n * Gets the public archived threads.\n *\n * <p>Returns archived threads in the channel that are public.\n * When called on a SERVER_TEXT_CHANNEL, returns threads of type SERVER_PUBLIC_THREAD.\n * When called on a SERVER_NEWS_CHANNEL returns threads of type SERVER_NEWS_THREAD.\n * Threads are ordered by archive_timestamp, in descending order.\n * Requires the READ_MESSAGE_HISTORY permission.\n *\n * @param before Get public archived threads before the thread with this id.\n * @return The ArchivedThreads.\n */\n default CompletableFuture<ArchivedThreads> getPublicArchivedThreads(long before) {\n return getPublicArchivedThreads(before, null);\n }\n\n /**\n * Gets the public archived threads.\n *\n * <p>Returns archived threads in the channel that are public.\n * When called on a SERVER_TEXT_CHANNEL, returns threads of type SERVER_PUBLIC_THREAD.\n * When called on a SERVER_NEWS_CHANNEL returns threads of type SERVER_NEWS_THREAD.\n * Threads are ordered by archive_timestamp, in descending order.\n * Requires the READ_MESSAGE_HISTORY permission.\n *\n * @param limit The maximum amount of public archived threads.\n * @return The ArchivedThreads.\n */\n default CompletableFuture<ArchivedThreads> getPublicArchivedThreads(int limit) {\n return getPublicArchivedThreads(null, limit);\n }\n\n /**\n * Gets the public archived threads.\n *\n * <p>Returns archived threads in the channel that are public.\n * When called on a SERVER_TEXT_CHANNEL, returns threads of type SERVER_PUBLIC_THREAD.\n * When called on a SERVER_NEWS_CHANNEL returns threads of type SERVER_NEWS_THREAD.\n * Threads are ordered by archive_timestamp, in descending order.\n * Requires the READ_MESSAGE_HISTORY permission.\n *\n * @param before Get public archived threads before the thread with this id.\n * @param limit The maximum amount of public archived threads.\n * @return The ArchivedThreads.\n */\n CompletableFuture<ArchivedThreads> getPublicArchivedThreads(Long before, Integer limit);\n\n /**\n * Gets the private archived threads.\n *\n * <p>Returns archived threads in the channel that are of type SERVER_PRIVATE_THREAD.\n * Threads are ordered by archive_timestamp, in descending order.\n * Requires both the READ_MESSAGE_HISTORY and MANAGE_THREADS permissions.\n *\n * @return The ArchivedThreads.\n */\n default CompletableFuture<ArchivedThreads> getPrivateArchivedThreads() {\n return getPrivateArchivedThreads(null, null);\n }\n\n /**\n * Gets the private archived threads.\n *\n * <p>Returns archived threads in the channel that are of type SERVER_PRIVATE_THREAD.\n * Threads are ordered by archive_timestamp, in descending order.\n * Requires both the READ_MESSAGE_HISTORY and MANAGE_THREADS permissions.\n *\n * @param before Get private archived threads before the thread with this id.\n * @return The ArchivedThreads.\n */\n default CompletableFuture<ArchivedThreads> getPrivateArchivedThreads(long before) {\n return getPrivateArchivedThreads(before, null);\n }\n\n /**\n * Gets the private archived threads.\n *\n * <p>Returns archived threads in the channel that are of type SERVER_PRIVATE_THREAD.\n * Threads are ordered by archive_timestamp, in descending order.\n * Requires both the READ_MESSAGE_HISTORY and MANAGE_THREADS permissions.\n *\n * @param limit The maximum amount of private archived threads.\n * @return The ArchivedThreads.\n */\n default CompletableFuture<ArchivedThreads> getPrivateArchivedThreads(int limit) {\n return getPrivateArchivedThreads(null, limit);\n }\n\n /**\n * Gets the private archived threads.\n *\n * <p>Returns archived threads in the channel that are of type SERVER_PRIVATE_THREAD.\n * Threads are ordered by archive_timestamp, in descending order.\n * Requires both the READ_MESSAGE_HISTORY and MANAGE_THREADS permissions.\n *\n * @param before Get private archived threads before the thread with this id.\n * @param limit The maximum amount of private archived threads.\n * @return The ArchivedThreads.\n */\n CompletableFuture<ArchivedThreads> getPrivateArchivedThreads(Long before, Integer limit);\n\n /**\n * Gets the joined private archived threads.\n *\n * <p>Returns archived threads in the channel that are of type SERVER_PRIVATE_THREAD, and the user has joined.\n *\n * @return The ArchivedThreads.\n */\n default CompletableFuture<ArchivedThreads> getJoinedPrivateArchivedThreads() {\n return getJoinedPrivateArchivedThreads(null, null);\n }\n\n /**\n * Gets the joined private archived threads.\n *\n * <p>Returns archived threads in the channel that are of type SERVER_PRIVATE_THREAD, and the user has joined.\n *\n * @param before Get the joined private archived threads before the thread with this id.\n * @return The ArchivedThreads.\n */\n default CompletableFuture<ArchivedThreads> getJoinedPrivateArchivedThreads(long before) {\n return getJoinedPrivateArchivedThreads(before, null);\n }\n\n /**\n * Gets the joined private archived threads.\n *\n * <p>Returns archived threads in the channel that are of type SERVER_PRIVATE_THREAD, and the user has joined.\n *\n * @param limit The maximum amount of private archived threads.\n * @return The ArchivedThreads.\n */\n default CompletableFuture<ArchivedThreads> getJoinedPrivateArchivedThreads(int limit) {\n return getJoinedPrivateArchivedThreads(null, limit);\n }\n\n /**\n * Gets the joined private archived threads.\n *\n * <p>Returns archived threads in the channel that are of type SERVER_PRIVATE_THREAD, and the user has joined.\n *\n * @param before Get the joined private archived threads before the thread with this id.\n * @param limit The maximum amount of private archived threads.\n * @return The ArchivedThreads.\n */\n CompletableFuture<ArchivedThreads> getJoinedPrivateArchivedThreads(Long before, Integer limit);\n}",
"public Channel getChannel() {\n return channel;\n }",
"private static boolean musicCommands(CommandContext context, Guild guild, Command invoked, TextChannel channel, Member invoker) {\n if ((invoked instanceof IMusicCommand || invoked instanceof AkinatorCommand) // the hate is real\n && guild.getId().equals(BotConstants.FREDBOAT_HANGOUT_ID)\n && guild.getJDA().getSelfUser().getId().equals(BotConstants.MUSIC_BOT_ID)) {\n if (!channel.getId().equals(\"174821093633294338\") // #spam_and_music\n && !channel.getId().equals(\"217526705298866177\") // #staff\n && !invoker.getUser().getId().equals(\"203330266461110272\")//Cynth\n && !invoker.getUser().getId().equals(\"81011298891993088\")) { // Fre_d\n context.deleteMessage();\n context.replyWithName(\"Please don't spam music commands outside of <#174821093633294338>.\",\n msg -> CentralMessaging.restService.schedule(() -> CentralMessaging.deleteMessage(msg),\n 5, TimeUnit.SECONDS));\n return true;\n }\n }\n return false;\n }",
"@Override\n\tpublic void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {\n\t\tctx.write(msg);\n\t}",
"public String getChannel() {\n return channel;\n }",
"@Override\n public void channelActive(ChannelHandlerContext ctx) throws Exception {\n System.out.println(\"【channelActive】。。。\");\n }",
"protected void onJoin(String channel, String sender, String login, String hostname) {}",
"@Override\n public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {\n }",
"private boolean handleChannelTell(String line){\n if (line.indexOf(\"): \") == -1)\n return false;\n \n Matcher matcher = CHANNEL_TELL_REGEX.matcher(line);\n if (!matcher.matches())\n return false;\n\n String username = matcher.group(1);\n String titles = matcher.group(2);\n String channelNumberString = matcher.group(3);\n String message = matcher.group(4);\n\n int channelNumber = Integer.parseInt(channelNumberString);\n\n if (!processChannelTell(username, titles, channelNumber, message))\n processLine(line);\n\n return true;\n }",
"@Override\r\n\t\t\tpublic void onChat(String message) {\n\r\n\t\t\t}",
"@Override\n\tpublic void sendMessage() {\n\t\t\n\t}",
"private void cs0() {\n\t\t\tif(!Method.isChatiing()){\n\t\t\t\tMethod.npcInteract(RUNESCAPEGUIDE, \"Talk-to\");\n\t\t\t}\n\t\t\t\n\t\t}",
"boolean hasChannel();",
"boolean hasChannel();",
"String getServerConnectionChannelName();",
"@Override\r\n public void handleMessage(Message msg) {\n }",
"public String getChannel() {\r\n\t\treturn this.channel;\r\n\t}",
"@SideOnly(Side.CLIENT)\n private void channelEndClient()\n {\n }",
"@Override\n\tpublic void onGuildMessageReceived(GuildMessageReceivedEvent e) {\n\t\tif (e.getAuthor().getId().equals(e.getJDA().getSelfUser().getId())) {\n\t\t\treturn;\n\t\t}\n\n\t\tString[] args = e.getMessage().getRawContent().split(\" \");\n\n\t\t// Reply only if @botname is args[0] and args.length == 1\n\t\tif (args[0].equals(\"<@\" + e.getJDA().getSelfUser().getId() + \">\") && args.length == 1) {\n\t\t\tMessageBuilder mb = new MessageBuilder();\n\t\t\tString prefix = SettingsManager.getInstance(e.getGuild().getId()).getSettings().getPrefix();\n\t\t\t\n\t\t\tmb.append(\"Hello \").append(e.getAuthor()).append(\"! \");\n\t\t\tif (prefix.isEmpty()) {\n\t\t\t\tmb.append(\"This guild does not have a command prefix.\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmb.append(\"You can use commands in this guild by using the prefix \\\"\" + prefix + \"\\\" or mention instead of using a prefix.\\n\"\n\t\t\t\t\t\t+ \"Use the help and about commands for more information.\");\n\t\t\t}\n\t\t\t\n\t\t\tSendMessage.sendMessage(e.getChannel(), mb.build());\n\t\t}\n\t}",
"@Override\n\tpublic String getChannelId()\n\t{\n\t\treturn null;\n\t}",
"@Override\n\tpublic void handleServerCmd() {\n\t\t\n\t}",
"private static void debugMessage(GuildMessageReceivedEvent event) {\n String preface = \"[Discord IDs] \";\n\n System.out.println(\"====== PING COMMAND ======\");\n System.out.println(preface + \"`!ping` SENDER:\");\n System.out.println(\n \"\\t{USER} ID: \" + event.getAuthor().getId() +\n \"\\tName: \" + event.getMember().getEffectiveName() +\n \" (\" + event.getAuthor().getAsTag() + \")\");\n\n System.out.println(preface + \"BOT ID:\\t\" + event.getJDA().getSelfUser().getId());\n System.out.println(preface + \"GUILD ID:\\t\" + event.getGuild().getId());\n\n System.out.println(preface + \"ROLES:\");\n event.getGuild().getRoles().forEach(role -> {\n System.out.println(\"\\t{ROLES} ID: \" + role.getId() + \"\\tName: \" + role.getName());\n });\n\n System.out.println(preface + \"MEMBERS:\");\n event.getGuild().getMembers().forEach(member -> {\n System.out.println(\n \"\\t{MEMEBERS} ID: \" + member.getUser().getId() +\n \"\\tName: \" + member.getEffectiveName() +\n \" (\" + member.getUser().getAsTag() + \")\");\n });\n\n System.out.println(preface + \"Categories:\");\n event.getGuild().getCategories().forEach(category -> {\n System.out.println(\"\\t{CATEGORY} ID: \" + category.getId() + \"\\tName: \" + category.getName());\n category.getChannels().forEach(guildChannel -> {\n System.out.println(\n \"\\t\\t:\" + guildChannel.getType().name().toUpperCase() + \":\" +\n \"\\tID: \" + guildChannel.getId() +\n \"\\tName: \" + guildChannel.getName() +\n \"\\tlink: \" + \"https://discord.com/channels/\" + Settings.GUILD_ID + \"/\" + guildChannel.getId());\n });\n });\n System.out.println(\"==== PING COMMAND END ====\");\n }",
"public Channel getChannel()\n {\n return channel;\n }",
"@Override\n protected void initChannel(SocketChannel ch) throws Exception {\n //4. Add ChannelHandler to intercept events and allow to react on them\n ch.pipeline().addLast(new ChannelHandlerAdapter() {\n @Override\n public void channelActive(ChannelHandlerContext ctx) throws Exception {\n //5. Write message to client and add ChannelFutureListener to close connection once message written\n ctx.write(buf.duplicate()).addListener(ChannelFutureListener.CLOSE);\n }\n });\n }",
"@Override\n\tpublic String getSubChannelId()\n\t{\n\t\treturn null;\n\t}",
"public int getChannelConfig() {\n return 0;\n }",
"public void sendeLobby();",
"public SocketChannel getChannel() { return null; }",
"@Override\n public void onWrite() {\n onChannelPreWrite();\n }",
"@Override\n public void channelRead0(ChannelHandlerContext ctx, String msg) throws Exception {\n System.err.println(\"来自client的信息:\" + msg);\n Gson gson = new Gson();\n UserInfo userInfo = gson.fromJson(msg, UserInfo.class);\n\n msg = \"用户名:\"+ userInfo.getUsername()+ \" 密码:\" + userInfo.getPassword() + \"----\" + ctx.channel().remoteAddress()+ \"----\" + msg;\n Log.d(\"tag\",msg);\n System.out.println(ctx.channel().id());\n ctx.writeAndFlush(\"1\\n\");\n //ctx.writeAndFlush(\"[\" + ctx.channel().remoteAddress() + \"] \" + msg + '\\n');\n\n }",
"@Override\n\tpublic void logicHandle(ChannelBuffer buffer, Channel channel) {\n\n\t}",
"@Override\n public void runCommand(MessageReceivedEvent event, List<String> args) {\n IVoiceChannel aspectChannel = event.getClient().getOurUser().getVoiceStateForGuild(event.getGuild()).getChannel();\n IVoiceChannel userChannel = event.getAuthor().getVoiceStateForGuild(event.getGuild()).getChannel();\n AudioPlayer player = MasterManager.getGuildAudioPlayer(event.getGuild()).getPlayer();\n\n if (aspectChannel != userChannel) { //cant use .equals b/c could be null\n BotUtils.joinVC(event);\n MasterManager.getGuildAudioPlayer(event.getGuild()).setThisStartTime(System.currentTimeMillis());\n }\n\n // restart\n AudioTrack curr = player.getPlayingTrack();\n if (curr.getPosition() > 1000 * 10) { // more than 10 sec in\n curr.setPosition(0); // restart\n } else {\n // go back a song\n }\n\n if (player.isPaused()) {\n player.setPaused(false);\n BotUtils.send(event.getChannel(), \"Player is now unpaused.\");\n }\n\n\n }",
"@Test\n public void getAllMessages() {\n IUser userOne = new User(\"UserOne\", \"password\");\n IUser userTwo = new User(\"UserTwo\", \"password\");\n\n IMessageContent textMessageOne = new MessageContent(\"Hello my friends\", MessageType.TEXT);\n IMessageContent textMessageTwo = new MessageContent(\"Hi how are you?\", MessageType.TEXT);\n\n IMessage messageOne = new Message(userOne,textMessageOne);\n IMessage messageTwo = new Message(userTwo,textMessageTwo);\n\n //User needs to be a part of channel to send message\n channel.join(userOne);\n channel.join(userTwo);\n\n channel.sendMessage(messageOne);\n channel.sendMessage(messageTwo);\n\n\n //2 sent messages, 2 join message from base user joining.\n assertTrue(channel.getAllMessages().size() == 4);\n\n }",
"@Override\n\tpublic void channelReadComplete(ChannelHandlerContext ctx) throws Exception {\n\t}",
"@Override\n public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {\n// ctx.pipeline().write(buffer);\n\n// System.out.println(\"received msg: \"+ msg.toString()\n// + \" ---current thread: \" + Thread.currentThread().getName());\n\n logger.info(\"received msg: \" + msg.toString());\n User user = (User) msg;\n user.setUserName(\"server-robbie\");\n ctx.pipeline().write(user);\n }",
"@Override\n\tpublic void channelActive(ChannelHandlerContext ctx) throws Exception {\n\t\tLog.i(\"MySocketHandler\", \"channelActive\");\n\t\tsuper.channelActive(ctx);\n\t}",
"@Test\r\n\tpublic final void testGetChannel() {\n\t\tassertEquals(\"starGold\",t.getChannel());\r\n\t}",
"@Override\n public void channelActive(ChannelHandlerContext ctx) throws Exception {\n ctx.fireChannelActive();\n\n ctx.executor().scheduleAtFixedRate(new Runnable() {\n @Override\n public void run() {\n log.info(\"send heart beat\");\n HeartBeat heartBeat = new HeartBeat();\n ctx.writeAndFlush(heartBeat);\n }\n }, 0, 5, TimeUnit.SECONDS);\n }",
"public String getChannelName()\r\n\t{\r\n\t\treturn this.sChannelName;\r\n\t}",
"@Override\n\tpublic void channelActive(ChannelHandlerContext ctx) throws Exception {\n\t\tctx.writeAndFlush(firstMessage);\n\t}",
"public static void logCommand(GuildMessageReceivedEvent event) {\n }",
"@Override\r\n public void notLeader() {\n }",
"@Override\n public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e)\n {\n \n Channel connectedChannel = e.getChannel();\n allChannels.add(connectedChannel);\n \n msg = StringAppender.mergeToStr(connectedMsg, e.getChannel().getLocalAddress().toString(), \" , Connections:\", String.valueOf(allChannels.size()));\n logger.info(msg);\n \n }",
"public boolean isNChannel() {\n/* 107 */ return \"NChannel\".equals(this.dictionary.getNameAsString(COSName.SUBTYPE));\n/* */ }",
"@Override\r\n\tpublic void changeChannel(int channel) {\n\t\tSystem.out.println(\"채널을 바꾸다\");\r\n\t}",
"public interface ServerCommand {\n\t\n\t/**\n\t * Command wird ausgeführt.\n\t * \n\t * @param m Member, welcher den Command ausgeführt hat.\n\t * @param c TextChannel, in dem der Command ausgeführt wurde.\n\t * @param msg Message, in der der Command steht.\n\t */\n public abstract void performCommand(Member m, TextChannel c, Message msg);\n}",
"public int getChannel() {\n return channel;\n }",
"@Override\n public void channelActive(ChannelHandlerContext ctx) throws Exception {\n UserInfo[] userInfos = userInfo();\n for (int i = 0; i < userInfos.length; i++) {\n ctx.writeAndFlush(userInfos[i]);\n }\n }",
"@Override\n\tpublic void send(String msg) {\n\t}",
"private void channelPrivilegedUserUpdate() {\n String userKey = builder.getPersonalUser().getUserKey();\n if (channel.getPrivilegedUsers().size() != 0) {\n ArrayList<String> members = new ArrayList<>();\n for (User user : channel.getPrivilegedUsers()) {\n members.add(user.getId());\n }\n String[] membersArray = members.toArray(new String[0]);\n // send update to server\n restClient.updateChannel(server.getId(), channel.getCategories().getId(), channel.getId(), userKey,\n channel.getName(), channel.isPrivilege(), membersArray, response -> {\n });\n } else {\n channel.setPrivilege(false);\n restClient.updateChannel(server.getId(), channel.getCategories().getId(), channel.getId(), userKey,\n channel.getName(), false, null, response -> {\n });\n }\n }"
] | [
"0.62562484",
"0.614711",
"0.608656",
"0.60818833",
"0.6045069",
"0.60338587",
"0.60250765",
"0.60201836",
"0.59872633",
"0.59408593",
"0.5926235",
"0.5887051",
"0.58763343",
"0.5861408",
"0.5832927",
"0.582569",
"0.57994294",
"0.57975364",
"0.5751802",
"0.57416236",
"0.5731147",
"0.56925327",
"0.56528115",
"0.56492543",
"0.56305707",
"0.5613783",
"0.56102705",
"0.5577244",
"0.55539495",
"0.5552101",
"0.5535967",
"0.5525645",
"0.5518285",
"0.5518285",
"0.55132896",
"0.55068725",
"0.54894704",
"0.54827386",
"0.5482381",
"0.5479768",
"0.54795396",
"0.5475724",
"0.5474838",
"0.5470196",
"0.5449843",
"0.54483354",
"0.5447369",
"0.5441673",
"0.54371786",
"0.5430207",
"0.543014",
"0.54279923",
"0.5424528",
"0.54238075",
"0.5408749",
"0.5405897",
"0.539437",
"0.5380136",
"0.5372826",
"0.5372819",
"0.53720564",
"0.5371997",
"0.53694284",
"0.53683466",
"0.53683466",
"0.5366929",
"0.53628665",
"0.5361342",
"0.5359632",
"0.5351224",
"0.5347807",
"0.5310248",
"0.53101134",
"0.5306179",
"0.5302577",
"0.5296537",
"0.52952",
"0.5294444",
"0.5291642",
"0.5284613",
"0.52844685",
"0.5284088",
"0.52727765",
"0.5270925",
"0.52686995",
"0.5267301",
"0.5266655",
"0.52657706",
"0.525642",
"0.52518773",
"0.5248829",
"0.52486134",
"0.52439696",
"0.52425224",
"0.52400494",
"0.5233263",
"0.52311325",
"0.52266717",
"0.5223864",
"0.5215515",
"0.52128047"
] | 0.0 | -1 |
EFFECTS: returns a String describing the location of the person, or the police station where the fingerprints are being held | String getLocation(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"java.lang.String getLocation();",
"private String describeLocation() {\n\t\tSWLocation location = this.world.getEntityManager().whereIs(this);\n\t\treturn this.getShortDescription() + \" [\" + this.getHitpoints() + \"] is at \" + location.getShortDescription();\n\t}",
"String getLocation(boolean detail);",
"@Override\r\n\tpublic String getInfo() {\n\t\treturn \"Grass... stay away from it when a fire is near.\";\r\n\t}",
"private String requestInfo(Location location) {\n return \"location(lat \" + location.getLat() + \", lon \" + location.getLat() + \") \";\n }",
"public abstract String getLocation();",
"String getLocationLabel();",
"public abstract String getDisplayLocation();",
"public String getGPS();",
"public String describeLocation(Player player)\n {\n StringBuilder narration = new StringBuilder(\"You are in \");\n narration.append(getDescription()).append(\".\\n\");\n narration.append(\"You can see:\\n\");\n // we want all entities present, not including the player that is looking\n for(int i = 0; i < getAllOtherEntities(player).size(); i++){\n narration.append(getAllOtherEntities(player).get(i).getDescription()).append(\"\\n\");\n }\n narration.append(\"You can access from here:\\n\");\n narration.append(pathList());\n return narration.toString();\n }",
"private String printName() {\n \t\treturn GPSFilterTextUtils.printName( this.getResources(), this.area.getName() );\n \t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn getLocation();\r\n\t}",
"String getArrivalLocation();",
"public static String location(SensorDetails details) {\r\n\t\treturn details.location;\r\n\t}",
"public String getLocationString() {\r\n\t\treturn \"Location = (\" + Math.round(getLocationX() * 10) / 10.0 + \", \" + Math.round(getLocationY() * 10) / 10.0 + \")\";\r\n\t}",
"public String toString()\n {\n return \"(\"+getType()+\")\"+getLocation(); \n }",
"public String toString(){\n if(trackLat != null && trackLon != null)\n return (trackNumber+\"; lat=\" + trackLat.getValue() + \";lon=\" + trackLon.getValue());\n else\n return (trackNumber+\" No location detail\");\n }",
"private String report(){\r\n if(location[0] > plateau[0] || location[0] < 0 || location[1] > plateau[1] || location[1] < 0)\r\n return \"Rover has stopped responding. Last transmission suggests Rover has fallen off the plateau.\\nPlease take better care of the rovers, these things are expensive.\";\r\n else\r\n return location[0] + \" \" + location[1] + \" \" + orientation;\r\n }",
"public String getDetails()\n\t{\n\t return \"Point (\"+x+\",\"+y+\")\";\n\t}",
"private static String fingerprint(GeoElement statement) {\n\t\treturn Prover.getTextFormat(statement);\n\t}",
"String getPersonality();",
"public String getLocationString(){\n return \"(\" + x + \", \" + y + \")\";\n }",
"public String getLocation() {\n\t\treturn \"-12.9990189,-38.5140298\";\n\t}",
"java.lang.String getFingerPrint();",
"public String toString()\r\n {\r\n return getCandidate().getName() + \"'s phone fundraiser takes place in: \" + getLocation() + \" and has \" + getDonors() + \" donors attending.\\n\";\r\n }",
"public String getPlaceSound() {\n\t\treturn \"random.anvil_land\";\n\t}",
"public String getInfoString();",
"public static String locationToString(Location location) {\n\n return location.getWorld().getName() + \",\" + location.getX() + \",\" + location.getY() + \",\" + location.getZ() + \",\" + location.getYaw() + \",\" + location.getPitch();\n\n }",
"@Override\n\tpublic String getLog() {\n\t\t\n\t\tString cartelSightings = \"\";\n\t\t\n\t\tfor (Sighting sight: sightings) {\n\t\t\tcartelSightings += sight.getLocation();\n\t\t\tcartelSightings += \" (\" + sight.getDetails() + \")\\n\";\n\t\t}\n\t\treturn cartelSightings;\n\t}",
"public String getLocationString() {\n return getCenter().toString();\n }",
"String getLocation() {\n return super.getLocation()+ \", z : \" + z;\n }",
"public String getSpawnLocationString(){\n\t\tStringBuilder sb = new StringBuilder();\n\t\tList<Location> locs = getSpawns();\n\t\tfor (int i=0;i<locs.size(); i++ ){\n\t\t\tif (locs.get(i) != null) sb.append(\"[\").append(i + 1).append(\":\").\n append(Util.getLocString(locs.get(i))).append(\"] \");\n\t\t}\n\t\treturn sb.toString();\n\t}",
"public String toString() {\n\t\tString s = \"Spike at x=\" + x + \"y=\" + y;\n\t\treturn s;\n\t}",
"synchronized String getLocString() {\n String MSG_TERMINATOR = \";\";\n String DATA_SEPARATOR = \",\";\n\n if (loc == null) {\n return System.currentTimeMillis() + DATA_SEPARATOR + \"No Location!\" + MSG_TERMINATOR;\n }\n\n return String.valueOf(System.currentTimeMillis()) +\n DATA_SEPARATOR +\n loc.getLongitude() +\n DATA_SEPARATOR +\n loc.getLatitude() +\n DATA_SEPARATOR +\n loc.getAltitude() +\n DATA_SEPARATOR +\n loc.getSpeed() +\n DATA_SEPARATOR +\n loc.getBearing() +\n DATA_SEPARATOR +\n loc.getAccuracy() +\n DATA_SEPARATOR +\n loc.getTime() +\n DATA_SEPARATOR +\n providerEnabled.toString() +\n DATA_SEPARATOR +\n lastTemp +\n DATA_SEPARATOR +\n lastGravity +\n DATA_SEPARATOR +\n lastPressure +\n MSG_TERMINATOR;\n }",
"public String diagnostic() {\n\t\tString output = \"\";\n\t\tString stateString = \"\";\n\t\tif (this.getState() == Player.HUMAN)\n\t\t\tstateString = \"is selected by the player\";\n\t\telse if (this.getState() == Player.COMPUTER)\n\t\t\tstateString = \"is selected by the computer\";\n\t\telse\n\t\t\tstateString = \"is not selected\";\n\t\t\t\n\t\toutput += \"The point \" + this.toString() + \" \" + stateString +\n\t\t\t\t\t\" and is associated with the rows:\\n\";\n\t\tfor (Row r : containingRows) {\n\t\t\toutput += r + \"\\n\";\n\t\t}\n\t\treturn output;\n\t}",
"public String locationToString(Location loc) {\n return loc.getWorld().getName() + \"|\" + loc.getBlockX() + \"|\" + loc.getBlockY() + \"|\" + loc.getBlockZ();\n }",
"public void printLocationInfo()\n {\n System.out.println(currentRoom.getLongDescription());\n System.out.println();\n }",
"String getInfo();",
"@Override\n public String getCosmetics() {\n return \"Jeans\" + avatar.getCosmetics();\n }",
"public String location(int locx, int locy) {\n if ((WASTELEFT <= locx && locx < WASTERIGHT)\n && (WASTETOP <= locy && locy < WASTEBOTTOM)) {\n return \"waste\";\n }\n if ((STOCKLEFT <= locx && locx < STOCKRIGHT)\n && (RESERVETOP <= locy && locy < RESERVEBOTTOM)) {\n return \"reserve\";\n }\n if (RESERVETOP <= locy && locy < RESERVEBOTTOM) {\n if (FIRSTLEFT <= locx && locx < FIRSTRIGHT) {\n return \"f1\";\n }\n if (SECONDLEFT <= locx && locx < SECONDRIGHT) {\n return \"f2\";\n }\n if (THIRDLEFT <= locx && locx < THIRDRIGHT) {\n return \"f3\";\n }\n if (FOURTHLEFT <= locx && locx < FOURTHRIGHT) {\n return \"f4\";\n }\n }\n if ((FIRSTLEFT <= locx && locx < FIRSTRIGHT)\n && (WASTETOP <= locy && locy <= WASTETOP\n + (_game.tableauSize(FIRSTPILE) - 1)\n * DIFFERENCE + CARD_HEIGHT)) {\n return \"t1\";\n }\n if ((SECONDLEFT <= locx && locx < SECONDRIGHT)\n && (WASTETOP <= locy && locy <= WASTETOP\n + (_game.tableauSize(SECONDPILE) - 1)\n * DIFFERENCE + CARD_HEIGHT)) {\n return \"t2\";\n }\n if ((THIRDLEFT <= locx && locx < THIRDRIGHT)\n && (WASTETOP <= locy && locy <= WASTETOP\n + (_game.tableauSize(THIRDPILE) - 1)\n * DIFFERENCE + CARD_HEIGHT)) {\n return \"t3\";\n }\n if ((FOURTHLEFT <= locx && locx < FOURTHRIGHT)\n && (WASTETOP <= locy && locy <= WASTETOP\n + (_game.tableauSize(FOURTHPILE) - 1)\n * DIFFERENCE + CARD_HEIGHT)) {\n return \"t4\";\n }\n return \"\";\n }",
"static String look(Player player) {\n String stuff = player.getLocation().whatStuff();\n if (!stuff.equals(\"\")) {\n if(player.getLocation().contains(\"Charlie McDowell\")){\n return \"-You hear the sound of typing echoing throughout room...\\n\" +\n \"Charlie Bot: Oh my word is that...is that ME? It seems that the mysterious intruder was\\n\" +\n \"simply a robotic copy of myself. On the other hand, I see the transmitter, 525!\\n\" +\n \"However, it appears that it has fallen into the intruder's clutches.\\n\" +\n \"More specifically, it seems to be in his back pocket.\\n\" +\n \"Great. He looks like an ordinary human, but I would brace yourself for battle, 525.\\n\\n\" +\n \"He hasn't noticed you...arm yourself and attempt to take the transmitter from him.\\n\\n\" +\n \"-You see:\\n\" + stuff;\n } else {\n return \"-You see:\\n\" + stuff;\n }\n } else {\n return \"The room is empty.\";\n }\n }",
"public String getLocation() { return location; }",
"public String getLocation() { return location; }",
"String getFpDescription();",
"private String ruptureString(ProbEqkRupture rupture) {\n\n String rupInfo = \"\";\n rupInfo += \"Probability = \" + (float)rupture.getProbability() +\"\\n\";\n rupInfo += \"Magnitude = \" + (float)rupture.getMag() +\"\\n\";\n\n RuptureSurface surface = rupture.getRuptureSurface();\n double gridSpacing = (float)this.getGridSpacing((EvenlyGriddedSurface)surface);\n rupInfo += \"GridSpacing = \" + gridSpacing +\"\\n\";\n ListIterator it = rupture.getAddedParametersIterator();\n if (it != null) {\n while (it.hasNext()) {\n Parameter param = (Parameter) it.next();\n rupInfo += param.getName() + \"=\" + param.getValue() + \"\\n\";\n }\n }\n\n double rake = rupture.getAveRake();\n double dip = surface.getAveDip();\n\n //Local Strike for each grid centered location on the rupture\n double[] localStrikeList = this.getLocalStrikeList((EvenlyGriddedSurface)surface);\n\n AbstractEvenlyGriddedSurface rupSurface = new EvenlyGridCenteredSurface((EvenlyGriddedSurface)surface);\n int numRows = rupSurface.getNumRows();\n int numCols = rupSurface.getNumCols();\n rupInfo += \"NumRows = \"+numRows+\"\\n\";\n rupInfo += \"NumCols = \"+numCols+\"\\n\";\n rupInfo +=\"# Lat Lon Depth Rake Dip Strike\\n\";\n for(int i=0;i<numRows;++i){\n for (int j = 0; j < numCols; ++j) {\n Location loc = rupSurface.getLocation(i,j);\n rupInfo += (float)loc.getLatitude() + \" \" + (float)loc.getLongitude() + \" \" +\n (float)loc.getDepth() +\" \"+(float)rake+\" \"+(float)dip+\" \"+(float)localStrikeList[j]+\"\\n\";\n }\n }\n return rupInfo;\n }",
"String getDepartureLocation();",
"public String getLocation(){\r\n return location;\r\n }",
"@DSSource({DSSourceKind.SENSITIVE_UNCATEGORIZED})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:58:12.107 -0500\", hash_original_method = \"958E0B7EB30F5353747022B831D2FD74\", hash_generated_method = \"ADF84B7CD584A3086AA314B699B00CEF\")\n \npublic String getLocation() {\n return location;\n }",
"public String getLocationName(){\n return myLoc;\n }",
"java.lang.String getSnapshotLocation();",
"public String getLocation(){\r\n return Location;\r\n }",
"public int getLocation()\r\n {\n }",
"int getMoistureCode(int x, int y);",
"public String getLocation(){\n return location;\n }",
"org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.Pinger getPingerLoc();",
"public String getAnalysisString() {\n //TODO - change this when we get some measure of monster # and deadly score\n int totalMonsters = 0;\n //If this room should have monsters in it...\n if (roomShouldHaveMonsters()) {\n //If there are none yet, generate them!\n if (numMonstersByType == null) {\n genRandomMonsters();\n } else {\n //if they've already been generated, add them up!\n for (Integer num : numMonstersByType.values()) {\n totalMonsters += num;\n }\n }\n }\n\n int miniBoss = contents.contains(roomContents.MINI_BOSS) ? 1 : 0;\n\n return coords[0] + \",\" + coords[1] + \",\" + totalMonsters + \",\" + miniBoss;\n }",
"public String weather() {\r\n\t\treturn weather(random.nextInt(4));\r\n\t}",
"public String getLocation(){\n return this.location;\n }",
"@Override\r\n\tpublic String Land() {\n\t\treturn \"SuperMan I Land\";\r\n\t}",
"public String getTravelTrackerSignatureString(){\n return getTravelTrackerSignaturePrefixString() + \"\\\">\" + mContext.getResources().getString(R.string.app_name) + \"</a>\";\n }",
"public java.lang.String getShipCaptain() {\n\t\treturn _tempNoTiceShipMessage.getShipCaptain();\n\t}",
"public String toString() \r\n {\r\n return \"The cruise ship \\\"\"+GetName()+\"\\\" was built in \"+GetYear()+\". It has a maximum payload of \"+maxPassengers+\" passengers and is currently carrying \"+curPassengers+\" passengers.\";\r\n }",
"public String toString()\n\t{\n\t\tStringBuilder sb = new StringBuilder(\"Suspect: \");\n\t\t\n\t\tsb.append(\"disease = \").append(disease).append(\"; \");\n\t\tsb.append(\"visit = \").append(visit).append(\".\");\n\t\t\n\t\treturn sb.toString();\n\t}",
"public java.lang.String getLocation() {\n return location;\n }",
"public String getLocation()\n {\n return location;\n }",
"String getFullEffectWithExampleParametersAsString();",
"public String getFromStation();",
"private String getCords() {\n return current.getLocString();\n\n }",
"public java.lang.String getLocation() {\n return location;\n }",
"public void lands_of_my_father(String location){\n System.out.println(location+\", Chittagong, Noakhali\");\n }",
"public String infoName();",
"void updateSignToPlayer(Player player, Location location, String[] lines);",
"public String getLocation() {\n return location;\n }",
"private String displayText() {\n // Location is unknown, tell the user as such.\n if (!storage.explored[numX][numY])\n return \" Unknown Location\";\n // Uses the specific cell to generate the name.\n if (numX == 8 && numY == 4)\n return \" Great Hollow Entrance\";\n if ((numY == 3 || numY == 2 || numY == 1) && (numX == 7 || numX == 8 || numX == 9))\n return \" Faron Woods\";\n if (numY == 0 && (numX == 7 || numX == 8))\n return \" Faron Woods\";\n if (numY == 4 && (numX == 7 || numX == 9))\n return \" Faron Woods\";\n if (numY == 5 && (numX == 7 || numX == 9))\n return \" Faron Woods Entrance\";\n if (numY == 5 && numX == 8)\n return \" Carthell Village Outskirts\";\n if ((numY == 7 || numY == 8) && numX == 7)\n return \" Carthell Village Outskirts\";\n if (numY == 6 && numX == 8)\n return \" Aragoth's Fountain\";\n if (numY == 6 && numX == 7)\n return \" Unoccupied House\";\n if (numY == 9 && numX == 11)\n return \" Carthell Library\";\n if (numY == 8 && numX == 10)\n return \" Carthell Marketplace\";\n if (numY == 7 && numX == 11)\n return \" Four Statue Square\";\n if (numY == 6 && (numX == 9 || numX == 10 || numX == 11 || numX == 12))\n return \" Carthell Village\";\n if (numY == 7 && (numX == 8 || numX == 9 || numX == 10 || numX == 12))\n return \" Carthell Village\";\n if (numY == 8 && (numX == 8 || numX == 9 || numX == 11 || numX == 12))\n return \" Carthell Village\";\n if (numY == 9 && (numX == 8 || numX == 9 || numX == 10 || numX == 12))\n return \" Carthell Village\";\n if (numX == 10 && numY == 3)\n return \" Fairy Queen's Fountain\";\n return \"\";\n }",
"private String getLocationForPrint(double latitude, double longitude) {\n int latDegree = (new Double(Math.floor(latitude))).intValue();\n int longDegree = (new Double(Math.floor(longitude))).intValue();\n String latEnd = getString(R.string.latitude_south);\n String longEnd = getString(R.string.longitude_west);\n if (latDegree > 0) {\n latEnd = getString(R.string.latitude_north);\n\n }\n if (longDegree > 0) {\n longEnd = getString(R.string.longitude_east);\n }\n double latSecond = (latitude - latDegree) * 100;\n double latMinDouble = (latSecond * 3d / 5d);\n int latMinute = new Double(Math.floor(latMinDouble)).intValue();\n\n double longSecond = (longitude - longDegree) * 100;\n double longMinDouble = (longSecond * 3d / 5d);\n int longMinute = new Double(Math.floor(longMinDouble)).intValue();\n// return String.format(getString(R.string.geo_location_info), latDegree,\n// latMinute, latEnd, longDegree, longMinute, longEnd);\n return getString(R.string.geo_location_info);\n\n }",
"public void initiateLocationIC(){\r\n\t\ttry {\r\n\t\t\tOutputStream out = new FileOutputStream(\"D:/Workspace_J2EE/SECoG/Data/Location/LocationInformationContents.txt\");\r\n\t\t\tPrintStream printStream = new PrintStream(out);\r\n\t\t\t\r\n\t\t\tprintStream.println(\"campus\");\r\n\t\t\tprintStream.println(\"0\");\r\n\t\t\tprintStream.println(-Math.log(1));\r\n\t\t\t\r\n\t\t\tprintStream.println(\"engineeringbuilding\");\r\n\t\t\tprintStream.println(\"00\");\r\n\t\t\tprintStream.println(-Math.log((float)6/(float)7));\r\n\t\t\t\r\n\t\t\tprintStream.println(\"floor5\");\r\n\t\t\tprintStream.println(\"000\");\r\n\t\t\tprintStream.println(-Math.log((float)3/(float)7));\r\n\t\t\t\r\n\t\t\tprintStream.println(\"floor6\");\r\n\t\t\tprintStream.println(\"001\");\r\n\t\t\tprintStream.println(-Math.log((float)2/(float)7));\r\n\t\t\t\r\n\t\t\tprintStream.println(\"529\");\r\n\t\t\tprintStream.println(\"0000\");\r\n\t\t\tprintStream.println(-Math.log((float)1/(float)7));\r\n\t\t\t\r\n\t\t\tprintStream.println(\"527\");\r\n\t\t\tprintStream.println(\"0001\");\r\n\t\t\tprintStream.println(-Math.log((float)1/(float)7));\r\n\t\t\t\r\n\t\t\tprintStream.println(\"cdma\");\r\n\t\t\tprintStream.println(\"0010\");\r\n\t\t\tprintStream.println(-Math.log((float)1/(float)7));\r\n\t\t\t\r\n\t\t\tprintStream.close();\r\n\t\t\tout.close();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Initiate location information contents done!\");\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public String toString()\n {\n return id() + location().toString() + direction().toString();\n }",
"public String getToStationName();",
"public String getLocation() {\r\n return location;\r\n }",
"public void displayPatientPicture(Resident res){\n }",
"void getReverInfo(int longitude,int latitude);",
"public String toString() {\n\t\t// initialize the string\n\t\tString fuelCanDetails = \"FuelCan: \";\n\t\t\n\t\t// prep decimal formatting\n\t\tDecimalFormat df = new DecimalFormat();\n\t\tdf.applyPattern(\"##.#\");\n\t\t\n\t\t// add details to the string for...\n\t\t\n\t\t// location\n\t\tfuelCanDetails += \"loc=\";\n\t\tfuelCanDetails += df.format( this.getLocation().getX() ) + \",\" + df.format( this.getLocation().getY() ) + \" \";\n\t\t\n\t\t// color\n\t\tfuelCanDetails += \"color=[\" + this.getColor().getRed() + \",\" + this.getColor().getGreen() + \",\" + this.getColor().getBlue() + \"] \";\n\t\t\n\t\t// size\n\t\tfuelCanDetails += \"size=\" + this.getSize();\n\t\t\n\t\t// return the fuel can details\n\t\treturn fuelCanDetails;\n\t}",
"@Override\n public String toString() {\n String s = shipName + \" located at\";\n\n for (Point p : shipLocation) {\n s += \" (\" + (p.x + 1) + \",\" + (p.y + 1) + \")\";\n }\n\n return s;\n }",
"public String toString() {\n\t\tString blawk = \"X: \" + getLocation().getX() + \", Y: \" + getLocation().getY() + \", Id: \" + getId();\n\t\treturn blawk;\n\t}",
"public Point getRobotLocation();",
"public String getRHandLocFeatures() {\n double[] angle = new double[] {getAngle(linAccSample)};\n\n // 15 linear accelerometer features (means etc across 3 axes)\n double[] linAccMeans = getMean(linAccSample);\n double[] linAccStdDevs = getStdDev(linAccSample);\n double[] linAccSkewness = getSkewness(linAccSample);\n double[] linAccKurtosis = getKurtosis(linAccSample);\n double linAcc1Norm = getL1Norm(linAccMatrix);\n double linAccInfNorm = getInfNorm(linAccMatrix);\n double linAccFroNorm = getFroNorm(linAccMatrix);\n\n double[] linAccNorms = new double[]{linAcc1Norm, linAccInfNorm, linAccFroNorm};\n\n // 15 gyroscope features\n double[] gyroMeans = getMean(gyroSample);\n double[] gyroStdDevs = getStdDev(gyroSample);\n double[] gyroSkewness = getSkewness(gyroSample);\n double[] gyroKurtosis = getKurtosis(gyroSample);\n double gyro1Norm = getL1Norm(gyroMatrix);\n double gyroInfNorm = getInfNorm(gyroMatrix);\n double gyroFroNorm = getFroNorm(gyroMatrix);\n\n double[] gyroNorms = new double[] {gyro1Norm, gyroInfNorm, gyroFroNorm};\n\n // 9 pearson features\n double[] pearsonCoeffs = getPearsonCoeff(linAccSample, gyroSample);\n\n double[] featureArray = merge(\n angle,\n linAccMeans, linAccStdDevs, linAccSkewness, linAccKurtosis, linAccNorms,\n gyroMeans, gyroStdDevs, gyroSkewness, gyroKurtosis, gyroNorms,\n pearsonCoeffs);\n\n StringBuilder featureString = new StringBuilder();\n for (int i = 0; i < featureArray.length; i++) {\n featureString.append(i+1);\n featureString.append(':');\n featureString.append(featureArray[i]);\n featureString.append(' ');\n }\n return featureString.toString(); }",
"public String get_loc_and_direc() {\n try {\n Object obj = JsonUtil.getInstance().getParser().parse(this.text);\n JSONObject jsonObject = (JSONObject) obj;\n String location = (String) jsonObject.get(\"location\");\n String direction = (String) jsonObject.get(\"direction\");\n return location + \"-\" + direction;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }",
"private String makeEventLocation(String location) {\n return \"LOCATION:\" + location + \"\\n\";\n }",
"public String getFromStationName();",
"public static String globalInfo() {\n return \"This is a normation method based on Fitness Sharing. It adds a penalty for too similar individuals on the standard Normation method.\";\n }"
] | [
"0.6199599",
"0.6199599",
"0.6199599",
"0.6199599",
"0.6199599",
"0.6199599",
"0.6199599",
"0.6199599",
"0.5966612",
"0.5886528",
"0.5666697",
"0.5653689",
"0.5620554",
"0.56076473",
"0.5599191",
"0.5582682",
"0.5581724",
"0.55758053",
"0.5574918",
"0.55261105",
"0.5515098",
"0.55067754",
"0.5475036",
"0.5474345",
"0.54740953",
"0.54520833",
"0.54187167",
"0.53911906",
"0.5378605",
"0.5375717",
"0.53669196",
"0.5365326",
"0.53577733",
"0.53365266",
"0.5327097",
"0.53180474",
"0.5309823",
"0.530864",
"0.52818364",
"0.5270232",
"0.52636623",
"0.5263407",
"0.5250001",
"0.52404386",
"0.5239558",
"0.52302927",
"0.52297854",
"0.52297294",
"0.52281696",
"0.52275527",
"0.52275527",
"0.5224547",
"0.5208573",
"0.5199022",
"0.51973057",
"0.518364",
"0.5179553",
"0.51741403",
"0.51740456",
"0.5172173",
"0.5164228",
"0.5161144",
"0.51580584",
"0.51532215",
"0.5127178",
"0.5121389",
"0.5119501",
"0.5112653",
"0.51057047",
"0.5093798",
"0.50888425",
"0.5087592",
"0.50835687",
"0.5071946",
"0.5062199",
"0.50569844",
"0.50534624",
"0.5052656",
"0.5051001",
"0.50506425",
"0.5028867",
"0.5028568",
"0.5027905",
"0.5018152",
"0.50099736",
"0.5009945",
"0.5008192",
"0.500817",
"0.5007019",
"0.5004847",
"0.49992862",
"0.49941504",
"0.49846536",
"0.4982454",
"0.49760988",
"0.49747804",
"0.49722162",
"0.49704552"
] | 0.613609 | 9 |
EFFECTS: returns an object to help police officers find suspect ex. the cell phone, or the person with the fingerprint | Object getTrace(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@RestrictTo(Scope.LIBRARY_GROUP)\n @Nullable\n Fingerprint getFingerprint();",
"public String getFingerprint() {\n return fingerprint;\n }",
"java.lang.String getFingerPrint();",
"private meterMaidPerception getPerceptions() {\n\t\t\r\n\t\tMessageTemplate mt = MessageTemplate.MatchPerformative(ACLMessage.INFORM);\r\n\t\tACLMessage msg = receive(mt);\r\n\t\tif (msg != null && msg.getContent() != null) {\r\n\t\t\tString[] perceptions = msg.getContent().split(\";\");\r\n\t\t\tif (perceptions.length < 2)\r\n\t\t\t\treturn meterMaidPerception.NOTHING_TO_SAY;\r\n\t\t\tcar = perceptions[1];\r\n\t\t\tif (CAR_PASSED_ON_RED_SIGN.equals(perceptions[0]))\r\n\t\t\t\treturn meterMaidPerception.CAR_IGNORED_RED_SIGN;\r\n\t\t\telse if (CAR_IN_ZEBRA_CROSSING.equals(perceptions[0]))\r\n\t\t\t\treturn meterMaidPerception.CAR_STOP_ON_ZEBRA_CROSSING;\r\n\t\t}\r\n\t\t\r\n\t\treturn meterMaidPerception.NOTHING_TO_SAY;\r\n\t}",
"public Fingerprint[] fingerprints();",
"public String getFingerprint() {\n return fingerprint;\n }",
"public String getFingerprint() {\n return fingerprint;\n }",
"public String getFingerprint() {\n return fingerprint;\n }",
"public String getFingerprint() {\n return fingerprint;\n }",
"public void displayPatientPicture(Resident res){\n }",
"public void identificarPersona() {\n try {\n //Obtiene todas las huellas de la bd\n ResultSet rsIdentificar = identificarhue.executeQuery();\n \n //Si se encuentra la huella en la base de datos\n while(rsIdentificar.next()){\n //Lee la plantilla de la base de datos\n byte templateBuffer[] = rsIdentificar.getBytes(\"huellap\");\n //Crea una nueva plantilla\n Template referenceTemplate = new Template(templateBuffer);\n \n //compara las plantilas (actual vs bd)\n boolean coinciden = fingerprintSDK.verify(template,referenceTemplate);\n \n //Si encuentra coincidencia entonces envia true y si no entonces envia false\n if (coinciden){ \n objpantprincipal.coincidehuella(true);\n return;\n }\n else{\n objpantprincipal.coincidehuella(false);\n }\n } \n \n } catch (SQLException e) { \n initDB();\n identificarPersona();\n } catch (GrFingerJavaException e) {\n Toolkit.getDefaultToolkit().beep();\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }",
"Reference getPatient();",
"public void onFingerUp(String idSensor) // evento que se genera al levantar el dedo del lector\n{\n objpantprincipal.repintarp();\n if (conectado == true)\n identificarPersona();\n}",
"void getEmergencyContact();",
"void fire(WarParticipant target, WarParticipant attacker, int noOfShooters);",
"kr.pik.message.Profile.Contact getContact();",
"public FighterCharacteristics characteristics();",
"PatientInfo getPatientInfo(int patientId);",
"void onFingerprintEntered();",
"public int magicMissile();",
"private void updatePeople() {\n \tArrayList<Device> keyfobs = alertMe.retrieveDevices(Device.KEYFOB);\n \tint personCount = 0;\n \tint total = keyfobs.size();\n \tfor(Device keyfob: keyfobs) {\n \t\tif (keyfob.attributes.containsKey(AlertMeConstants.STR_PRESENCE)) {\n \t\t\tString pres = (String) keyfob.attributes.get(AlertMeConstants.STR_PRESENCE);\n \t\t\tif (pres!=null) {\n \t\t\t\tpres = pres.trim().toLowerCase();\n \t\t\tpersonCount += (pres.equals(AlertMeConstants.STR_TRUE))? 1: 0;\n \t\t\t}\n \t\t}\n \t}\n \tupdateScreenPeople(personCount, total);\n }",
"public String getRingerDevice();",
"public void careForPatient(Patient patient);",
"void doEffect(Skill castSkill, double power, Creature performer, Item target) {\n/* 87 */ if ((!target.isMailBox() && !target.isSpringFilled() && !target.isPuppet() && \n/* 88 */ !target.isUnenchantedTurret() && !target.isEnchantedTurret()) || (target\n/* 89 */ .hasDarkMessenger() && !target.isEnchantedTurret())) {\n/* */ \n/* 91 */ performer.getCommunicator().sendNormalServerMessage(\"The spell fizzles.\", (byte)3);\n/* */ return;\n/* */ } \n/* 94 */ if (target.isUnenchantedTurret() || target.isEnchantedTurret()) {\n/* */ \n/* 96 */ int spirit = Zones.getSpiritsForTile(performer.getTileX(), performer.getTileY(), performer.isOnSurface());\n/* 97 */ String sname = \"no spirits\";\n/* 98 */ int templateId = 934;\n/* 99 */ if (spirit == 4) {\n/* */ \n/* 101 */ templateId = 942;\n/* 102 */ sname = \"There are plenty of air spirits at this height.\";\n/* */ } \n/* 104 */ if (spirit == 2) {\n/* */ \n/* 106 */ templateId = 968;\n/* 107 */ sname = \"Some water spirits were closeby.\";\n/* */ } \n/* 109 */ if (spirit == 3) {\n/* */ \n/* 111 */ templateId = 940;\n/* 112 */ sname = \"Earth spirits are everywhere below ground.\";\n/* */ } \n/* 114 */ if (spirit == 1) {\n/* */ \n/* 116 */ sname = \"Some nearby fire spirits are drawn to your contraption.\";\n/* 117 */ templateId = 941;\n/* */ } \n/* 119 */ if (templateId == 934) {\n/* */ \n/* 121 */ performer.getCommunicator().sendAlertServerMessage(\"There are no spirits nearby. Nothing happens.\", (byte)3);\n/* */ \n/* */ return;\n/* */ } \n/* 125 */ if (target.isUnenchantedTurret()) {\n/* */ \n/* 127 */ performer.getCommunicator().sendSafeServerMessage(sname);\n/* 128 */ target.setTemplateId(templateId);\n/* 129 */ target.setAuxData(performer.getKingdomId());\n/* */ }\n/* 131 */ else if (target.isEnchantedTurret()) {\n/* */ \n/* 133 */ if (target.getTemplateId() != templateId) {\n/* */ \n/* 135 */ performer.getCommunicator().sendAlertServerMessage(\"The nearby spirits ignore your contraption. Nothing happens.\", (byte)3);\n/* */ \n/* */ return;\n/* */ } \n/* */ \n/* 140 */ performer.getCommunicator().sendSafeServerMessage(sname);\n/* */ } \n/* */ } \n/* */ \n/* 144 */ ItemSpellEffects effs = target.getSpellEffects();\n/* 145 */ if (effs == null)\n/* 146 */ effs = new ItemSpellEffects(target.getWurmId()); \n/* 147 */ SpellEffect eff = effs.getSpellEffect(this.enchantment);\n/* 148 */ if (eff == null) {\n/* */ \n/* 150 */ performer.getCommunicator().sendNormalServerMessage(\"You summon nearby spirits into the \" + target\n/* 151 */ .getName() + \".\", (byte)2);\n/* */ \n/* 153 */ eff = new SpellEffect(target.getWurmId(), this.enchantment, (float)power, 20000000);\n/* 154 */ effs.addSpellEffect(eff);\n/* 155 */ Server.getInstance().broadCastAction(performer\n/* 156 */ .getName() + \" looks pleased as \" + performer.getHeSheItString() + \" summons some spirits into the \" + target\n/* 157 */ .getName() + \".\", performer, 5);\n/* 158 */ if (!target.isEnchantedTurret()) {\n/* 159 */ target.setHasCourier(true);\n/* */ \n/* */ }\n/* */ }\n/* 163 */ else if (eff.getPower() > power) {\n/* */ \n/* 165 */ performer.getCommunicator().sendNormalServerMessage(\"You frown as you fail to summon more spirits into the \" + target\n/* 166 */ .getName() + \".\", (byte)3);\n/* */ \n/* 168 */ Server.getInstance().broadCastAction(performer.getName() + \" frowns.\", performer, 5);\n/* */ }\n/* */ else {\n/* */ \n/* 172 */ performer.getCommunicator().sendNormalServerMessage(\"You succeed in summoning more spirits into the \" + this.name + \".\", (byte)2);\n/* */ \n/* */ \n/* 175 */ eff.improvePower(performer, (float)power);\n/* 176 */ if (!target.isEnchantedTurret())\n/* 177 */ target.setHasCourier(true); \n/* 178 */ Server.getInstance().broadCastAction(performer\n/* 179 */ .getName() + \" looks pleased as \" + performer.getHeSheItString() + \" summons some spirits into the \" + target\n/* 180 */ .getName() + \".\", performer, 5);\n/* */ } \n/* */ }",
"public void setFingerprint(String fingerprint) {\n this.fingerprint = fingerprint;\n }",
"Fingerprint findFingerprintByUserAndMetadata(String user, SongMetadata smd) throws SQLException;",
"@RestrictTo(Scope.LIBRARY_GROUP)\n @Nullable\n public Fingerprint getFingerprint() {\n return mFingerprint;\n }",
"@RestrictTo(Scope.LIBRARY_GROUP)\n @Nullable\n public Fingerprint getFingerprint() {\n return mFingerprint;\n }",
"@RestrictTo(Scope.LIBRARY_GROUP)\n @Nullable\n public Fingerprint getFingerprint() {\n return mFingerprint;\n }",
"@RestrictTo(Scope.LIBRARY_GROUP)\n @Nullable\n public Fingerprint getFingerprint() {\n return mFingerprint;\n }",
"@RestrictTo(Scope.LIBRARY_GROUP)\n @Nullable\n public Fingerprint getFingerprint() {\n return mFingerprint;\n }",
"@RestrictTo(Scope.LIBRARY_GROUP)\n @Nullable\n public Fingerprint getFingerprint() {\n return mFingerprint;\n }",
"@RestrictTo(Scope.LIBRARY_GROUP)\n @Nullable\n public Fingerprint getFingerprint() {\n return mFingerprint;\n }",
"@RestrictTo(Scope.LIBRARY_GROUP)\n @Nullable\n public Fingerprint getFingerprint() {\n return mFingerprint;\n }",
"@RestrictTo(Scope.LIBRARY_GROUP)\n @Nullable\n public Fingerprint getFingerprint() {\n return mFingerprint;\n }",
"@RestrictTo(Scope.LIBRARY_GROUP)\n @Nullable\n public Fingerprint getFingerprint() {\n return mFingerprint;\n }",
"@RestrictTo(Scope.LIBRARY_GROUP)\n @Nullable\n public Fingerprint getFingerprint() {\n return mFingerprint;\n }",
"@RestrictTo(Scope.LIBRARY_GROUP)\n @Nullable\n public Fingerprint getFingerprint() {\n return mFingerprint;\n }",
"@RestrictTo(Scope.LIBRARY_GROUP)\n @Nullable\n public Fingerprint getFingerprint() {\n return mFingerprint;\n }",
"@RestrictTo(Scope.LIBRARY_GROUP)\n @Nullable\n public Fingerprint getFingerprint() {\n return mFingerprint;\n }",
"@RestrictTo(Scope.LIBRARY_GROUP)\n @Nullable\n public Fingerprint getFingerprint() {\n return mFingerprint;\n }",
"@RestrictTo(Scope.LIBRARY_GROUP)\n @Nullable\n public Fingerprint getFingerprint() {\n return mFingerprint;\n }",
"@RestrictTo(Scope.LIBRARY_GROUP)\n @Nullable\n public Fingerprint getFingerprint() {\n return mFingerprint;\n }",
"public interface C0407a {\n void shakeDetected();\n }",
"public void a(PotionEffect paramwq)\r\n/* 44: */ {\r\n/* 45: 52 */ if (this.id != paramwq.id) {\r\n/* 46: 53 */ a.warn(\"This method should only be called for matching effects!\");\r\n/* 47: */ }\r\n/* 48: 55 */ if (paramwq.amplifier > this.amplifier)\r\n/* 49: */ {\r\n/* 50: 56 */ this.amplifier = paramwq.amplifier;\r\n/* 51: 57 */ this.duration = paramwq.duration;\r\n/* 52: */ }\r\n/* 53: 58 */ else if ((paramwq.amplifier == this.amplifier) && (this.duration < paramwq.duration))\r\n/* 54: */ {\r\n/* 55: 59 */ this.duration = paramwq.duration;\r\n/* 56: */ }\r\n/* 57: 60 */ else if ((!paramwq.ambient) && (this.ambient))\r\n/* 58: */ {\r\n/* 59: 61 */ this.ambient = paramwq.ambient;\r\n/* 60: */ }\r\n/* 61: 63 */ this.showParticles = paramwq.showParticles;\r\n/* 62: */ }",
"void ponderhit();",
"boolean isAllowFriendlyFire();",
"Map<String, Object> getFingerprint() {\r\n return delete.getFingerprint();\r\n }",
"public void LookupPatient(View v){\n\t\tEditText HealthCardNum = (EditText) findViewById(R.id.p_HID);\n\t\tString healthcard_ID = HealthCardNum.getText().toString();\n\t\n\t\t//check the empty case of edittext\n\t\tif (healthcard_ID.length() == 0){\n\t\t\tMissHCNBox(v);\n\t\t}else if(! physician.HavePatient(healthcard_ID)){\n\t\t\t//if the input health card number does not exist\n\t\t\tPatientNoExist(v);\n\t\t}else{\n\t\t\t\n\t\t\tpatient = physician.getByHealthCard(healthcard_ID);\n\t\t\t//item will be passed to alert box to display the successful work\n\t\t\titem = patient.getName() + \" \" + healthcard_ID;\n\t\t\t\n\t\t\t//show the layout and display the information for user\n\t\t\tprescriptionlayout.setVisibility(View.VISIBLE);\n\t\t\tpatientinfodisplay.setVisibility(View.VISIBLE);\n\t\t\t\n\t\t\t//get target patient's information and display\n\t\t\tString display = patient.showInfo();\n\t\t\tviewdisplay.setText(display);\n\t\t\t\n\t\t}\n\t\t\n\t}",
"PartyType getFreightForwarderParty();",
"public byte[] getFingerprint()\n {\n byte[] tmp = new byte[fingerprint.length];\n \n System.arraycopy(fingerprint, 0, tmp, 0, tmp.length);\n \n return tmp;\n }",
"String getHandOwner();",
"public void extract() {\n \n try {\n //Extrae la plantilla de la imagen. \n template = fingerprintSDK.extract(fingerprint);\n \n //Notifies it has been extracted and the quality of the extraction\n //write template quality to log\n switch (template.getQuality()){\n case Template.HIGH_QUALITY: \n objpantprincipal.pintaraltacalidad();\n break;\n case Template.MEDIUM_QUALITY: \n objpantprincipal.pintarmedianacalidad();\n break;\n case Template.LOW_QUALITY: \n objpantprincipal.pintarbajacalidad();\n break;\n }\n //Muestra la plantilla en la imagen\n objpantprincipal.showImage(GrFingerJava.getBiometricImage(template,fingerprint));\n objpantprincipal.writeLog(\"Minucias extraidas con éxito\");\n } catch (GrFingerJavaException e) {\n //write error to log\n Toolkit.getDefaultToolkit().beep();\n objpantprincipal.writeLog(\"Error, no se pudieron extraer las minucias, vuelva a intentarlo\");\n }\n \n }",
"private AppHandShake m10411a(AppHandShake appHandShake, String str) {\n AppResponseJson appResponseJson;\n AppRequestJson appRequestJson = null;\n if (!(appHandShake == null || appHandShake.getRequestJson() == null)) {\n switch (appHandShake.getRequestJson().getTp()) {\n case 0:\n boolean z = !C3608c.m10650c();\n appResponseJson = AppResponseJson.ResponseTypeGeneral(this.f9296e, z ? 1 : 0, Bridgefy.getInstance().getBridgefyClient().getUserUuid());\n break;\n case 1:\n if (!C3608c.m10650c()) {\n appResponseJson = AppResponseJson.ResponseTypeTelephone(null, Bridgefy.getInstance().getBridgefyClient().getUserUuid());\n appResponseJson.setDn(true);\n break;\n } else {\n appResponseJson = AppResponseJson.ResponseTypeTelephone(C3608c.m10654g(), Bridgefy.getInstance().getBridgefyClient().getUserUuid());\n appResponseJson.setDn(false);\n break;\n }\n }\n }\n appResponseJson = null;\n if (!(appHandShake == null || appHandShake.getResponseJson() == null)) {\n switch (appHandShake.getResponseJson().getTp()) {\n case 0:\n if (appHandShake.getResponseJson().getUid() != null) {\n FriendDTO c = this.f9293b.query_friend_dto_by_id(appHandShake.getResponseJson().getUid());\n if (c == null) {\n c = new FriendDTO(appHandShake.getResponseJson().getUid(), appHandShake.getResponseJson().getUn(), null);\n this.f9293b.set_friend_dto(c);\n }\n if (c.getPhoneNumber() == null && appHandShake.getResponseJson().getVrf() != 1) {\n appRequestJson = new AppRequestJson(1, BleHandshake.DEVICE_TYPE);\n break;\n }\n }\n break;\n case 1:\n if (!appHandShake.getResponseJson().isDn()) {\n FriendDTO c2 = this.f9293b.query_friend_dto_by_id(str);\n c2.setPhoneNumber(appHandShake.getResponseJson().getPh());\n this.f9293b.set_friend_dto(c2);\n break;\n } else {\n appResponseJson = AppResponseJson.ResponseTypeHandshakeFinished(str);\n m10413a(str);\n break;\n }\n case 2:\n if (this.f9293b.query_friend_dto_by_id(str) == null) {\n appRequestJson = new AppRequestJson(0, BleHandshake.DEVICE_TYPE);\n break;\n } else {\n m10413a(str);\n return null;\n }\n }\n }\n FriendDTO c3 = this.f9293b.query_friend_dto_by_id(str);\n if (appRequestJson == null && c3 == null) {\n appRequestJson = new AppRequestJson(0, BleHandshake.DEVICE_TYPE);\n } else if (!(c3 == null || ((c3.getPhoneNumber() != null && c3.getPhoneNumber().trim().length() != 0) || appHandShake == null || appHandShake.getResponseJson() == null || appHandShake.getResponseJson().getVrf() == 1 || appHandShake.getResponseJson().isDn()))) {\n appRequestJson = new AppRequestJson(1, BleHandshake.DEVICE_TYPE);\n }\n if (!(appHandShake == null || appHandShake.getRequestJson() != null || appRequestJson != null || appHandShake.getResponseJson() == null || appHandShake.getResponseJson().getTp() == 2)) {\n appResponseJson = AppResponseJson.ResponseTypeHandshakeFinished(str);\n m10413a(str);\n }\n if (appRequestJson == null && appResponseJson == null) {\n appResponseJson = AppResponseJson.ResponseTypeHandshakeFinished(str);\n m10413a(str);\n }\n return new AppHandShake(appRequestJson, appResponseJson);\n }",
"private static ImageModel m24645a(C9507h hVar) {\n if (hVar != null) {\n C9511l lVar = hVar.f26023d;\n if (lVar != null) {\n User user = lVar.f26032a;\n if (user != null) {\n C2380l userHonor = user.getUserHonor();\n if (userHonor != null) {\n return userHonor.mo8707k();\n }\n }\n }\n }\n return null;\n }",
"Object getPurpose();",
"@Test\n public void testFingerprintPerturbation()\n {\n IDoubleArray M = null;\n IDoubleArray p0 = null;\n IDoubleArray observable = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.fingerprintPerturbation(M, p0, observable);\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 }",
"String getPersonality();",
"@Override\n public String getCosmetics() {\n return \"Jeans\" + avatar.getCosmetics();\n }",
"@Override\n\tpublic Iphone detail(Iphone iphone) {\n\t\treturn null;\n\t}",
"public short getHandThrowDamage();",
"public void createPHR(String name) {\n Bundle response;\n String[] splitName = name.split(\"\\\\s+\");\n String given = splitName[0], family = splitName[1];\n try {\n response = client.search()\n .forResource(Patient.class)\n .where(Patient.GIVEN.matches().value(given))\n .where(Patient.FAMILY.matches().value(family))\n .returnBundle(Bundle.class)\n .execute();\n for(Bundle.Entry entry : response.getEntry()) {\n String ID = entry.getResource().getIdElement().getIdPart();\n CustomPatient customPatient = CustomHAPIClasses.getCustomPatient((Patient) entry.getResource());\n PatientDetails patientDetails = new PatientDetails(ID,customPatient);\n patientHealthRecords.put(ID,patientDetails);\n }\n } catch (Exception e) {\n System.out.println(\"Error Occurred: \" + e);\n }\n }",
"private void getphoneinformaition() {\n\t\ttry {\n\t\t\tsoftVersion = this.getPackageManager().getPackageInfo(\n\t\t\t\t\tthis.getPackageName(), 0).versionName;\n\t\t} catch (NameNotFoundException e) {\n\t\t\tsoftVersion = \"NULL\";\n\t\t}\n\n\t\tif (Build.BRAND != null) {\n\t\t\tphoneBrand = Build.BRAND;\n\t\t}\n\t\tif (Build.MODEL != null) {\n\t\t\tphoneModel = Build.MODEL;\n\t\t}\n\t\tif (Build.VERSION.RELEASE != null) {\n\t\t\tphoneOs = Build.VERSION.RELEASE;\n\t\t}\n\n\t\ttry {\n\t\t\tDisplayMetrics metric = new DisplayMetrics();\n\t\t\tgetWindowManager().getDefaultDisplay().getMetrics(metric);\n\t\t\tint width = metric.widthPixels; // 屏幕宽度(像素)\n\t\t\tint height = metric.heightPixels; // 屏幕高度(像素)\n\t\t\tString w = String.valueOf(width);\n\t\t\tString h = String.valueOf(height);\n\t\t\tStringBuffer s = new StringBuffer();\n\t\t\ts.append(w);\n\t\t\ts.append(\"*\");\n\t\t\ts.append(h);\n\t\t\tphoneResolution = s.toString();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tphoneResolution = \"NULL\";\n\t\t}\n\n\t\tFileLog.i(TAG, softVersion);\n\t\tFileLog.i(TAG, phoneBrand);\n\t\tFileLog.i(TAG, phoneModel);\n\t\tFileLog.i(TAG, phoneOs);\n\t\tFileLog.i(TAG, phoneResolution);\n\n\t}",
"com.polytech.spik.protocol.SpikMessages.Contact getContact();",
"@SystemAPI\n\tPatient getPatient();",
"void onOtherInfoToolCard(int id, Match match);",
"ILogo getMugShot();",
"@Override\n\tpublic void detail(Iphone phone) {\n\t\t\n\t}",
"protected void treatSpeakers()\n\t{\n\t\tint nHP = (Integer) results[0];\n\t\tdouble Xdist = (Double)results[1];\n\t\tdouble Ydist = (Double)results[2];\n\t\tdouble shift = (Double)results[3];\n\t\tfloat height = (Float) results[4];\n\t\tint numHP1 = (Integer) results[5];\n\t\tboolean stereoOrder = (Boolean)results[6];\n\t\tint lastHP = (replace ? 0 : gp.speakers.size()-1);\n\t\tint numHP;\n\t\tint rangees = (nHP / 2);\n\t\tfloat X, Y;\n\t\tif(replace) gp.speakers = new Vector<HoloSpeaker>(nHP);\n\t\tnumHP1 = (evenp(nHP) ? numHP1 : 1 + numHP1);\n\t\t// Creation des HPs en fonction de ces parametres\n\t\tfor (int i = 1; i <= rangees; i++)\n\t\t\t{\n\t\t\t\t// on part du haut a droite, on descend puis on remonte\n\t\t\t\t\n\t\t\t\tX = (float) (-Xdist);\n\t\t\t\tY = (float) (shift + (Ydist * (rangees - 1) * 0.5) - (Ydist * (i - 1)));\n\t\t\t\tif(stereoOrder)\n\t\t\t\t\tnumHP = numHP1+(i-1)*2;\n\t\t\t\telse\n\t\t\t\t\tnumHP = (numHP1 + rangees + rangees - i) % nHP + 1;\n\t\t\t\tgp.speakers.add(new HoloSpeaker(X, Y, height, numHP+lastHP,-1));\n\t\t\t\t\n\t\t\t\tX = (float) (Xdist);\n\t\t\t\tY = (float) (shift + (Ydist * (rangees - 1) * 0.5) - (Ydist * (i - 1)));\n\t\t\t\tif(stereoOrder)\n\t\t\t\t\tnumHP = numHP1+(i-1)*2+1;\n\t\t\t\telse\n\t\t\t\t\tnumHP = (numHP1 + i - 1) % nHP + 1;\n\t\t\t\tgp.speakers.add(new HoloSpeaker(X, Y, height, numHP+lastHP,-1));\n\t\t\t\tinc();\n\t\t\t}\n\n\t\t\tif (!evenp(nHP))\n\t\t\t{\n\t\t\tX = 0;\n\t\t\tY = (float) (shift + (Ydist * (rangees - 1) * 0.5));\n\t\t\tnumHP = ((numHP1 - 1) % nHP) + 1;\n\t\t\tgp.speakers.add(new HoloSpeaker(X, Y, height, numHP+lastHP,-1));\n\t\t}\n\t}",
"public static void launchFirewor(Player p) {\n Firework fw = (Firework) p.getWorld().spawnEntity(p.getLocation(), EntityType.FIREWORK);\n FireworkMeta fwm = fw.getFireworkMeta();\n \n //Our random generator\n Random r = new Random(); \n\n //Get the type\n int rt = r.nextInt(4) + 1;\n Type type = Type.BALL; \n if (rt == 1) type = Type.BALL;\n if (rt == 2) type = Type.BALL_LARGE;\n if (rt == 3) type = Type.BURST;\n if (rt == 4) type = Type.CREEPER;\n if (rt == 5) type = Type.STAR;\n \n //Get our random colours \n Color c1 = Color.AQUA;\n Color c2 = Color.BLACK;\n \n //Create our effect with this\n FireworkEffect effect = FireworkEffect.builder().flicker(r.nextBoolean()).withColor(c1).withFade(c2).with(type).trail(r.nextBoolean()).build();\n \n //Then apply the effect to the meta\n fwm.addEffect(effect);\n \n //Generate some random power and set it\n int rp = r.nextInt(2) + 1;\n fwm.setPower(rp);\n \n //Then apply this to our rocket\n fw.setFireworkMeta(fwm); \n\t}",
"public Image getPunch1(int player, boolean ep) {if (player==1) return punchP11; else return punchP21;}",
"public Image getPunch2(int player, boolean ep) {if (player==1) return punchP12; else return punchP22;}",
"Party getParty();",
"public Result call()\n {\n // create peptide\n Peptide peptide = Rotamer.reconstitute(startingPeptide, rotamersToReconstitute);\n\n // analyze interactions\n List<Interaction> interactions = OPLScalculator.getInteractions(peptide);\n\n // initialize maps that will contain the answers\n Map<Rotamer,Double> rotamerMap = new LinkedHashMap<>();\n\n // analyze all interactions in this peptide\n Double[][] energyMatrix = Interaction.getRotamerEnergyMatrix(peptide, interactions, true);\n\n // get rotamer energies\n for (Rotamer rotamer : rotamers)\n {\n Double singleEnergy = Interaction.getRotamerEnergy(rotamer, energyMatrix); \n //if ( rotamerMap.containsKey(rotamer) && Math.abs(rotamerMap.get(rotamer) - singleEnergy) > 0.01 )\n // System.out.println(\"mismatch\");\n rotamerMap.put(rotamer,singleEnergy);\n }\n\n // get backbone energy\n double thisBackboneEnergy = Interaction.getBackboneEnergy(energyMatrix); \n\n // concurrently update results\n map.putAll(rotamerMap);\n backboneEnergy.compareAndSet(0.0, thisBackboneEnergy);\n\n // return result\n //return new RotamerEnergyResult(rotamerMap, rotamerPairMap, thisBackboneEnergy); \n return null;\n }",
"PartyType getOriginalDespatchParty();",
"final String [] getPersonalInfo(Object value) {\n int countInfo = 3; //Cound of the personal information fields\n String toString [] = new String[countInfo];\n //Extract some information\n toString[0] = (String) ((AbstractPerson) value).getFirstName();\n toString[1] = (String) ((AbstractPerson) value).getLastName();\n toString[2] = (String) ((AbstractPerson) value).getEmail();\n return toString;\n }",
"public Speakers getSpeaker(){\n int speaker_id = getIntent().getExtras().getInt(AppController.SPEAKER_ID);\n DatabaseHandler dh = new DatabaseHandler(this);\n return dh.getSpeaker(speaker_id);\n }",
"private static void doEffect(Thing caster, Thing spell, Thing target) {\r\n \t\tint magicSkill=Spell.calcMagicSkill(caster,spell);\r\n \t\tint magicDefence=Spell.calcAntiMagic(target);\r\n \t\tint magicPower=Spell.calcMagicPower(caster,spell);\r\n \t\t\r\n \t\t// work out whether spell is effective\r\n \t\tboolean effective=true;\r\n \t\tboolean visible=target.isVisible(Game.hero());\r\n \t\tif ((magicDefence>0)&&spell.getStat(\"SpellUsage\")==Spell.SPELL_OFFENCE) {\r\n \t\t\tmagicSkill+=magicPower/5;\r\n \t\t\tGame.warn(\"Magic test: \"+magicSkill+\" vs. \"+magicDefence);\r\n \t\t\t\r\n \t\t\teffective=magicSkill>=(magicDefence*RPG.luckRandom(caster,target));\r\n \t\t}\r\n \t\t\r\n \t\tif ((caster!=null)&&target.getFlag(\"IsBeing\")&&(spell.getStat(\"SpellUsage\")==Spell.SPELL_OFFENCE)) {\r\n \t\t\tAI.notifyAttack(target,caster);\r\n \t\t}\r\n \t\t\r\n \t\tString hitname=spell.getString(\"HitName\");\r\n \t\tif (effective){\r\n \t\t\tif (hitname!=null) target.message(\"You are hit by the \"+hitname);\r\n \t\t\tEvent e=new Event(\"Effect\");\r\n \t\t\te.set(\"Strength\",magicPower);\r\n \t\t\te.set(\"Caster\",caster);\r\n \t\t\te.set(\"Target\",target);\r\n \t\t\tspell.handle(e);\r\n \t\t} else {\r\n \t\t\tif (visible) Game.message(target.getTheName()+\" \"+target.verb(\"resist\")+\" the \"+hitname);\r\n \t\t}\r\n \t}",
"public static void main(String[] args) {\nPhone iphone=new iPhone();\niphone.call();\niphone.text();\niphone.takePicture();\niphone.playMusic();\n\nPhone samsung=new Samsung();\nsamsung.call();\nsamsung.text();\nsamsung.takePicture();\nsamsung.playMusic();\n\n\n}",
"public static void main(String[] args) throws MobileException {\n\n HTC mobil_htc = new HTC(\"HTC\", \"Desire\", true, true);\n Nokia mobil_nokia = new Nokia(\"Nokia\", \"N650\", true, false);\n\n\n try {\n mobil_htc.callContact(\"Iulian\");\n mobil_htc.getMobileInfo();\n mobil_htc.printContactNumber(\"Mihai\");\n mobil_nokia.getMobileInfo();\n mobil_nokia.testForWirelessConnection();\n mobil_htc.testForWirelessConnection();\n mobil_htc.chargeBattery();\n mobil_nokia.chargeBattery();\n mobil_htc.sendMessage(\"Politia\");\n mobil_htc.callContact(\"Salvare\");\n mobil_htc.setPowerON(false);\n mobil_htc.printContactNumber(\"Giulia\");// first exception: the device is turned off and cannot perform actions\n\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n\n try {\n mobil_htc.setPowerON(true);\n mobil_htc.printContactNumber(\"Giulia\");\n mobil_htc.callContact(\"Ajutor\");\n // mobil_htc.callContact(\"Mirel\"); // second exception: contact does not exist\n mobil_htc.getMobileInfo();\n mobil_htc.getMobileInfo();\n // mobil_htc.callContact(\"Ajutor\"); //third exception: battery level too low to perform this action;\n mobil_htc.chargeBattery();\n mobil_htc.chargeBattery();\n mobil_htc.setPowerON(true);\n mobil_htc.callContact(\"Ajutor\");\n mobil_nokia.sendMessage(\"Politia\");\n mobil_nokia.callContact(\"Salvare\");\n mobil_nokia.setPowerON(false);\n // mobil_nokia.printContactNumber(\"Giulia\"); //fourth exception: the device is turned off and cannot perform actions\n mobil_nokia.setPowerON(true);\n mobil_nokia.printContactNumber(\"Giulia\");\n mobil_nokia.callContact(\"Ajutor\");\n System.out.println(\"Sfarsit testare.\");\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }",
"protected void prospect(){\n //While the Gold Position is undetermined, keep updating the camera\n cam.activateTFOD();\n\n runtime.reset();\n resetHeading();\n rotatedLeft = false;\n rotatedRight = false;\n rotatePhoneMount(.48);\n\n while(cam.getGoldPosition() == BuggleCam.GOLD_POSITION.NULL && runtime.seconds() < 4 && opModeIsActive()) {\n cam.betterUpdate(telemetry);\n //telemetry.update();\n if(runtime.seconds() > 2 && !rotatedRight) {\n rotatePhoneMount(.65);\n rotatedRight = true;\n }\n }\n if(cam.getGoldPosition() == BuggleCam.GOLD_POSITION.NULL)\n rotatedLeft = true;\n if(rotatedRight && !rotatedLeft)\n cam.setGoldPosition(BuggleCam.GOLD_POSITION.RIGHT);\n else if(rotatedRight)\n cam.setGoldPosition(BuggleCam.GOLD_POSITION.LEFT);\n cam.stopTFOD();\n\n }",
"private void fortificationPhase(Player p) \n\t{\n\t\tp.fortify();\n\t}",
"@Override\n\tpublic void detail(GalaxyNote phone) {\n\t\t\n\t}",
"private String handRequestProfile (String text, Event event) {\n\t\tString result = \"\";\n\t\t\n\t\tMatcher m = Pattern.compile(\"weight|meal|general\", Pattern.CASE_INSENSITIVE).matcher(text);\n\t\tif (m.find()) {\n\t\t\tswitch (m.group().toLowerCase()) {\n\t\t\t\tcase \"weight\": {\n\t\t\t\t\tresult = user.outputWeight(\"\"+event.getSource().getUserId());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"meal\": {\n\t\t\t\t\tresult = user.outputMeal(\"\"+event.getSource().getUserId());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"general\": {\n\t\t\t\t\tresult = user.outputGeneral(\"\"+event.getSource().getUserId());\n\t\t\t\t\tresult += user.outputInterest(\"\"+event.getSource().getUserId());\n\t\t\t\t\tSystem.out.println(\"interest works here\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tprofile = null;\n\t\t\tcategories = Categories.MAIN_MENU;\n\t\t}\n\t\telse {\n\t\t\tresult = \"Did not understand\";\n\t\t}\n\t\treturn result;\n\t}",
"private static /* synthetic */ boolean[] m37846a() {\n boolean[] zArr = f35340a;\n if (zArr != null) {\n return zArr;\n }\n boolean[] probes = Offline.getProbes(1575301677882808626L, \"com/mopub/mobileads/native_video/R$id\", 1);\n f35340a = probes;\n return probes;\n }",
"public Result call()\n {\n HashMap<RotamerPair,Double> tempMap = new HashMap<>();\n for ( Map.Entry<Rotamer,Rotamer> entry : work.entries() )\n {\n Rotamer rotamer1 = entry.getKey();\n Rotamer rotamer2 = entry.getValue();\n RotamerPair pair = new RotamerPair(rotamer1, rotamer2);\n if ( incompatiblePairs.contains(pair) )\n continue;\n \n //Atom extraAtom1 = null;\n //if ( rotamer1.description.indexOf(\"proline\") == -1 )\n // extraAtom1 = peptide.sequence.get(rotamer1.sequenceIndex).HN;\n \n //Atom extraAtom2 = null;\n //if ( rotamer2.description.indexOf(\"proline\") == -1 )\n // extraAtom2 = peptide.sequence.get(rotamer2.sequenceIndex).HN;\n \n //double energy = OPLScalculator.getInteractionEnergy(rotamer1, extraAtom1, rotamer2, extraAtom2);\n double energy = OPLScalculator.getInteractionEnergy(rotamer1, null, rotamer2, null);\n tempMap.put(pair,energy);\n }\n map.putAll(tempMap);\n return null;\n }",
"public void getAttackedByDarknessMagicBook(IEquipableItem item){item.strongAttackTo(this.getOwner());}",
"private static /* synthetic */ boolean[] m37843a() {\n boolean[] zArr = f35337a;\n if (zArr != null) {\n return zArr;\n }\n boolean[] probes = Offline.getProbes(2117124487222320605L, \"com/mopub/mobileads/native_video/R$color\", 1);\n f35337a = probes;\n return probes;\n }",
"public static String getFingerPrint(String slideRef, String... varargs) {\n\t\t// setting the default value when arguments' value is omitted\n\t\tString sessionID = varargs.length > 0 ? varargs[0] : null;\n\t\t// Get the fingerprint for a specific slide\n\t\tsessionID = sessionId(sessionID);\n\t\tString fingerprint;\n\t\tString url = apiUrl(sessionID, false) + \"GetFingerprint?sessionID=\" + PMA.pmaQ(sessionID) + \"&pathOrUid=\"\n\t\t\t\t+ PMA.pmaQ(slideRef);\n\t\ttry {\n\t\t\tURL urlResource = new URL(url);\n\t\t\tHttpURLConnection con;\n\t\t\tif (url.startsWith(\"https\")) {\n\t\t\t\tcon = (HttpsURLConnection) urlResource.openConnection();\n\t\t\t} else {\n\t\t\t\tcon = (HttpURLConnection) urlResource.openConnection();\n\t\t\t}\n\t\t\tcon.setRequestMethod(\"GET\");\n\t\t\tString jsonString = PMA.getJSONAsStringBuffer(con).toString();\n\t\t\tif (PMA.isJSONObject(jsonString)) {\n\t\t\t\tJSONObject jsonResponse = PMA.getJSONObjectResponse(jsonString);\n\t\t\t\tpmaAmountOfDataDownloaded.put(sessionID,\n\t\t\t\t\t\tpmaAmountOfDataDownloaded.get(sessionID) + jsonResponse.length());\n\t\t\t\tif (jsonResponse.has(\"Code\")) {\n\t\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\t\tPMA.logger.severe(\"get_fingerprint on \" + slideRef + \" resulted in: \"\n\t\t\t\t\t\t\t\t+ jsonResponse.get(\"Message\") + \" (keep in mind that slideRef is case sensitive!)\");\n\t\t\t\t\t}\n\t\t\t\t\tthrow new Exception(\"get_fingerprint on \" + slideRef + \" resulted in: \"\n\t\t\t\t\t\t\t+ jsonResponse.get(\"Message\") + \" (keep in mind that slideRef is case sensitive!)\");\n\t\t\t\t} else {\n\t\t\t\t\treturn jsonResponse.getString(\"d\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tpmaAmountOfDataDownloaded.put(sessionID,\n\t\t\t\t\t\tpmaAmountOfDataDownloaded.get(sessionID) + jsonString.length());\n\t\t\t\tfingerprint = jsonString.replace(\"\\\"\", \"\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tif (PMA.logger != null) {\n\t\t\t\tStringWriter sw = new StringWriter();\n\t\t\t\te.printStackTrace(new PrintWriter(sw));\n\t\t\t\tPMA.logger.severe(sw.toString());\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t\treturn fingerprint;\n\t}",
"java.lang.String getUserPhone();",
"Map<Long, Object[]> getAllFingerprintsForUser(String user) throws SQLException;",
"public abstract String getPhone3();",
"protected void recordPatientVisit() {\r\n\r\n\t\t// obtain unique android id for the device\r\n\t\tString android_device_id = Secure.getString(getApplicationContext().getContentResolver(),\r\n Secure.ANDROID_ID); \r\n\t\t\r\n\t\t// add the patient record to the DB\r\n\t\tgetSupportingLifeService().createPatientAssessment(getPatientAssessment(), android_device_id);\r\n\t}",
"public ArrayList<DetailModel> getPhonesFromFavorite(){\n\n return null;\n }",
"@Test\n public void testFingerprintCorrelation()\n {\n IDoubleArray M = null;\n IDoubleArray observable1 = null;\n IDoubleArray observable2 = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.fingerprintCorrelation(M, observable1, observable2);\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 abstract String getPhone2();",
"public Predator reproduce() {\n if(eaten < 2) return null;\n else {\n if ((int) (Math.random() * 100) >= 80) {\n predatorsSpawned++;\n return new Predator(((int) ((speed + Math.random()) * 5)), ((int) (maxEnergy + Math.random()\n * 50)), world, true);\n }\n predatorsSpawned++;\n return new Predator(speed, maxEnergy, world);\n }\n }",
"PartyType getNotifyParty();",
"public static void caso32(){\n\t FilterManager fm= new FilterManager(\"resources/stopWordsList.txt\",\"resources/useCaseWeight.properties\");\n\t\t\tQualityAttributeBelongable qualityAttributeBelongable = new OntologyManager(\"file:resources/caso3.owl\",\"file:resources/caso3.repository\",fm);\n\t\t\tMap<QualityAttributeInterface,Double> map = qualityAttributeBelongable.getWordPertenence(\"response2\");\n\t\t\tif(map==null){\n\t\t\t\tSystem.out.println(\"El map es null\");\n\t\t\t}else{\n\t\t\t\tMapUtils.imprimirMap(map);\n\t\t\t}\n\t}",
"public void recordVictims(){\n\t\t\n\t\tfor (int i = 0; i < parts.size(); i++) {\n BodyPart joe = parts.get(i);\n int x = (int)Math.round((joe.getLocationX() * scale) + width/2);\n int y = (int)Math.round((joe.getLocationY() * scale) + height/2);\n g2d.setColor(Color.red);\n g2d.fillRect(x,y,4,4);\n\t\t\t\t\t \n }\n\t\t\tfor (int i = 0; i < people.size(); i++) {\n BodyPart joe = people.get(i);\n int x = (int)Math.round((joe.getLocationX() * scale) + width/2);\n int y = (int)Math.round((joe.getLocationY() * scale) + height/2);\n g2d.setColor(Color.cyan);\n g2d.fillRect(x,y,7,7);\n\t\t\t\t\t \n }\n\t}",
"public Person[] getPatientsByHeartConditionCause(int cause) {\n int count = 0;\n for(int i = 0; i < listOfPatients.length; i++)\n {\n if(listOfPatients[i].getCause() == cause)\n count++;\n }\n \n if(count == 0)\n return null;\n\n int index = 0;\n Person[] patientsByHeartConditionCause = new Person[count];\n for(int i = 0; i < listOfPatients.length; i++)\n {\n if(listOfPatients[i].getCause() == cause)\n patientsByHeartConditionCause[index++] = listOfPatients[i];\n }\n\n return patientsByHeartConditionCause;\n }"
] | [
"0.5227843",
"0.51711655",
"0.5168261",
"0.51660115",
"0.5090433",
"0.5064033",
"0.5064033",
"0.5064033",
"0.5017273",
"0.5015996",
"0.4974751",
"0.49521005",
"0.48710153",
"0.4853605",
"0.4852547",
"0.48478055",
"0.4847254",
"0.4810902",
"0.47980332",
"0.47955713",
"0.47903106",
"0.4786912",
"0.47761482",
"0.47652274",
"0.47563308",
"0.4747005",
"0.47443095",
"0.47443095",
"0.47443095",
"0.47443095",
"0.47443095",
"0.47443095",
"0.47443095",
"0.47443095",
"0.47443095",
"0.47443095",
"0.47443095",
"0.47443095",
"0.47443095",
"0.47443095",
"0.47443095",
"0.47443095",
"0.47443095",
"0.47221613",
"0.47166848",
"0.47044903",
"0.46996573",
"0.46977994",
"0.46959117",
"0.46929136",
"0.46892715",
"0.46835157",
"0.4682801",
"0.46419343",
"0.46343052",
"0.4632987",
"0.46141264",
"0.4607727",
"0.45983905",
"0.45926034",
"0.4575672",
"0.4565909",
"0.45618436",
"0.45542625",
"0.45443785",
"0.4519021",
"0.45171988",
"0.45166203",
"0.45162508",
"0.45009276",
"0.449133",
"0.44901642",
"0.44874975",
"0.448412",
"0.4483586",
"0.44807214",
"0.4470737",
"0.44666594",
"0.44646332",
"0.44537362",
"0.4451551",
"0.44469252",
"0.4445335",
"0.4443128",
"0.44427806",
"0.44373304",
"0.4432888",
"0.4428736",
"0.4427937",
"0.44264534",
"0.44253948",
"0.44229943",
"0.44191346",
"0.44142577",
"0.44087803",
"0.44067398",
"0.44004086",
"0.43979964",
"0.43972176",
"0.43967518",
"0.43791533"
] | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.